From a25a6b049a7550d76aa091f4c3f31c0d4b76e5ae Mon Sep 17 00:00:00 2001 From: Florian Pix Date: Mon, 24 Aug 2026 15:00:11 +0200 Subject: [PATCH 1/2] fix: serialization of box/lasso select data for multiple subplots --- CHANGELOG.md | 2 +- js/src/widget.ts | 32 ++++++++++++-------- plotly/package_data/widgetbundle.js | 46 ++++++++++++++--------------- 3 files changed, 43 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc5b3cc5e9a..436ee0661e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fix `hex_to_rgb` parsing of 3-digit shorthand hexadecimal colors such as `#FFF` [[#5662](https://github.com/plotly/plotly.py/pull/5662)], with thanks to @genrichez for the contribution! - Add `` to the `to_html()` template to comply with modern web standards [[#5693](https://github.com/plotly/plotly.py/pull/5693)], with thanks to @mishrakushal for the contribution! - Fix `mpl_to_plotly` silently dropping matplotlib path collections in data coordinates (such as violin plots, pcolor, event plots, stack plots, fill_between, and stem plots) by rendering them as filled polygons or lines [[#5702](https://github.com/plotly/plotly.py/pull/5702)], with thanks to @robertoffmoura for the contribution! - +- Fix serialization of box/lasso select data for multiple subplots ## [6.9.0] - 2026-07-09 diff --git a/js/src/widget.ts b/js/src/widget.ts index 284116648da..cd21d6bf964 100644 --- a/js/src/widget.ts +++ b/js/src/widget.ts @@ -109,9 +109,7 @@ type Py2JsUpdateMsg = Py2JsMsg & { type Selector = { type: "box" | "lasso"; - selector_state: - | { xrange: number[]; yrange: number[] } - | { xs: number[]; ys: number[] }; + selector_state: Record; }; // Model @@ -1149,22 +1147,30 @@ export class FigureView { var selectorObject: Selector; if (data.hasOwnProperty("range")) { - // Box selection + // Box selection - preserve all subplot-specific axis keys (x, x2, x3, ... and y, y2, y3, ...) + var rangeData = data["range"]; + // Verify we have at least an x and y range (in any subplot) + var hasXRange = Object.keys(rangeData || {}).some((key: string) => /^x\d*$/.test(key)); + var hasYRange = Object.keys(rangeData || {}).some((key: string) => /^y\d*$/.test(key)); + if (!hasXRange || !hasYRange) { + return null; + } selectorObject = { type: "box", - selector_state: { - xrange: data["range"]["x"], - yrange: data["range"]["y"], - }, + selector_state: rangeData, }; } else if (data.hasOwnProperty("lassoPoints")) { - // Lasso selection + // Lasso selection - preserve all subplot-specific axis keys + var lassoData = data["lassoPoints"]; + // Verify we have at least an x and y coordinate array (in any subplot) + var hasXCoords = Object.keys(lassoData || {}).some((key: string) => /^x\d*$/.test(key)); + var hasYCoords = Object.keys(lassoData || {}).some((key: string) => /^y\d*$/.test(key)); + if (!hasXCoords || !hasYCoords) { + return null; + } selectorObject = { type: "lasso", - selector_state: { - xs: data["lassoPoints"]["x"], - ys: data["lassoPoints"]["y"], - }, + selector_state: lassoData, }; } else { selectorObject = null; diff --git a/plotly/package_data/widgetbundle.js b/plotly/package_data/widgetbundle.js index 8649f29a710..d3f975ae213 100644 --- a/plotly/package_data/widgetbundle.js +++ b/plotly/package_data/widgetbundle.js @@ -1,11 +1,11 @@ -var iX=Object.create;var Wk=Object.defineProperty;var nX=Object.getOwnPropertyDescriptor;var oX=Object.getOwnPropertyNames;var sX=Object.getPrototypeOf,lX=Object.prototype.hasOwnProperty;var uX=(fe,_e)=>()=>(_e||fe((_e={exports:{}}).exports,_e),_e.exports);var cX=(fe,_e,Xe,Lt)=>{if(_e&&typeof _e=="object"||typeof _e=="function")for(let gr of oX(_e))!lX.call(fe,gr)&&gr!==Xe&&Wk(fe,gr,{get:()=>_e[gr],enumerable:!(Lt=nX(_e,gr))||Lt.enumerable});return fe};var fX=(fe,_e,Xe)=>(Xe=fe!=null?iX(sX(fe)):{},cX(_e||!fe||!fe.__esModule?Wk(Xe,"default",{value:fe,enumerable:!0}):Xe,fe));var a7=uX((r7,c2)=>{(function(fe,_e){typeof c2=="object"&&c2.exports?c2.exports=_e():fe.moduleName=_e()})(typeof self<"u"?self:r7,()=>{"use strict";var fe=(()=>{var _e=Object.create,Xe=Object.defineProperty,Lt=Object.defineProperties,gr=Object.getOwnPropertyDescriptor,Yr=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols,oi=Object.getPrototypeOf,Ln=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,Fn=(Z,q,v)=>q in Z?Xe(Z,q,{enumerable:!0,configurable:!0,writable:!0,value:v}):Z[q]=v,So=(Z,q)=>{for(var v in q||(q={}))Ln.call(q,v)&&Fn(Z,v,q[v]);if(ei)for(var v of ei(q))_n.call(q,v)&&Fn(Z,v,q[v]);return Z},vs=(Z,q)=>Lt(Z,Yr(q)),Qs=(Z,q)=>{var v={};for(var _ in Z)Ln.call(Z,_)&&q.indexOf(_)<0&&(v[_]=Z[_]);if(Z!=null&&ei)for(var _ of ei(Z))q.indexOf(_)<0&&_n.call(Z,_)&&(v[_]=Z[_]);return v},Ho=(Z,q,v)=>function(){if(v)throw v[0];try{return Z&&(q=(0,Z[Ea(Z)[0]])(Z=0)),q}catch(S){throw v=[S],S}},He=(Z,q)=>function(){try{return q||(0,Z[Ea(Z)[0]])((q={exports:{}}).exports,q),q.exports}catch(_){throw q=0,_}},Jl=(Z,q)=>{for(var v in q)Xe(Z,v,{get:q[v],enumerable:!0})},ou=(Z,q,v,_)=>{if(q&&typeof q=="object"||typeof q=="function")for(let S of Ea(q))!Ln.call(Z,S)&&S!==v&&Xe(Z,S,{get:()=>q[S],enumerable:!(_=gr(q,S))||_.enumerable});return Z},jp=(Z,q,v)=>(v=Z!=null?_e(oi(Z)):{},ou(q||!Z||!Z.__esModule?Xe(v,"default",{value:Z,enumerable:!0}):v,Z)),zf=Z=>ou(Xe({},"__esModule",{value:!0}),Z),Gh=He({"src/version.js"(Z){"use strict";Z.version="3.7.0"}}),Ff=He({"node_modules/native-promise-only/lib/npo.src.js"(Z,q){(function(_,S,M){S[_]=S[_]||M(),typeof q<"u"&&q.exports&&(q.exports=S[_])})("Promise",typeof window<"u"?window:Z,function(){"use strict";var _,S,M,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(x){return setImmediate(x)}:setTimeout;try{Object.defineProperty({},"x",{}),_=function(x,w,A,E){return Object.defineProperty(x,w,{value:A,writable:!0,configurable:E!==!1})}}catch{_=function(w,A,E){return w[A]=E,w}}M=function(){var x,w,A;function E(p,b){this.fn=p,this.self=b,this.next=void 0}return{add:function(b,d){A=new E(b,d),w?w.next=A:x=A,w=A,A=void 0},drain:function(){var b=x;for(x=w=S=void 0;b;)b.fn.call(b.self),b=b.next}}}();function r(l,x){M.add(l,x),S||(S=t(M.drain))}function o(l){var x,w=typeof l;return l!=null&&(w=="object"||w=="function")&&(x=l.then),typeof x=="function"?x:!1}function a(){for(var l=0;l0&&r(a,w))}catch(A){s.call(new f(w),A)}}}function s(l){var x=this;x.triggered||(x.triggered=!0,x.def&&(x=x.def),x.msg=l,x.state=2,x.chain.length>0&&r(a,x))}function h(l,x,w,A){for(var E=0;EDe?1:me>=De?0:NaN}v.descending=function(me,De){return Deme?1:De>=me?0:NaN},v.min=function(me,De){var et=-1,dt=me.length,yt,Tt;if(arguments.length===1){for(;++et=Tt){yt=Tt;break}for(;++etTt&&(yt=Tt)}else{for(;++et=Tt){yt=Tt;break}for(;++etTt&&(yt=Tt)}return yt},v.max=function(me,De){var et=-1,dt=me.length,yt,Tt;if(arguments.length===1){for(;++et=Tt){yt=Tt;break}for(;++etyt&&(yt=Tt)}else{for(;++et=Tt){yt=Tt;break}for(;++etyt&&(yt=Tt)}return yt},v.extent=function(me,De){var et=-1,dt=me.length,yt,Tt,tr;if(arguments.length===1){for(;++et=Tt){yt=tr=Tt;break}for(;++etTt&&(yt=Tt),tr=Tt){yt=tr=Tt;break}for(;++etTt&&(yt=Tt),tr1)return tr/(_r-1)},v.deviation=function(){var me=v.variance.apply(this,arguments);return me&&Math.sqrt(me)};function m(me){return{left:function(De,et,dt,yt){for(arguments.length<3&&(dt=0),arguments.length<4&&(yt=De.length);dt>>1;me(De[Tt],et)<0?dt=Tt+1:yt=Tt}return dt},right:function(De,et,dt,yt){for(arguments.length<3&&(dt=0),arguments.length<4&&(yt=De.length);dt>>1;me(De[Tt],et)>0?yt=Tt:dt=Tt+1}return dt}}}var c=m(s);v.bisectLeft=c.left,v.bisect=v.bisectRight=c.right,v.bisector=function(me){return m(me.length===1?function(De,et){return s(me(De),et)}:me)},v.shuffle=function(me,De,et){(dt=arguments.length)<3&&(et=me.length,dt<2&&(De=0));for(var dt=et-De,yt,Tt;dt;)Tt=Math.random()*dt--|0,yt=me[dt+De],me[dt+De]=me[Tt+De],me[Tt+De]=yt;return me},v.permute=function(me,De){for(var et=De.length,dt=new Array(et);et--;)dt[et]=me[De[et]];return dt},v.pairs=function(me){for(var De=0,et=me.length-1,dt,yt=me[0],Tt=new Array(et<0?0:et);De=0;)for(tr=me[De],et=tr.length;--et>=0;)Tt[--yt]=tr[et];return Tt};var l=Math.abs;v.range=function(me,De,et){if(arguments.length<3&&(et=1,arguments.length<2&&(De=me,me=0)),(De-me)/et===1/0)throw new Error("infinite range");var dt=[],yt=x(l(et)),Tt=-1,tr;if(me*=yt,De*=yt,et*=yt,et<0)for(;(tr=me+et*++Tt)>De;)dt.push(tr/yt);else for(;(tr=me+et*++Tt)=De.length)return yt?yt.call(me,_r):dt?_r.sort(dt):_r;for(var Xr=-1,wa=_r.length,pa=De[Gr++],Ja,ti,Sa,za=new A,Xa;++Xr=De.length)return zt;var Gr=[],Xr=et[_r++];return zt.forEach(function(wa,pa){Gr.push({key:wa,values:tr(pa,_r)})}),Xr?Gr.sort(function(wa,pa){return Xr(wa.key,pa.key)}):Gr}return me.map=function(zt,_r){return Tt(_r,zt,0)},me.entries=function(zt){return tr(Tt(v.map,zt,0),0)},me.key=function(zt){return De.push(zt),me},me.sortKeys=function(zt){return et[De.length-1]=zt,me},me.sortValues=function(zt){return dt=zt,me},me.rollup=function(zt){return yt=zt,me},me},v.set=function(me){var De=new z;if(me)for(var et=0,dt=me.length;et=0&&(dt=me.slice(et+1),me=me.slice(0,et)),me)return arguments.length<2?this[me].on(dt):this[me].on(dt,De);if(arguments.length===2){if(De==null)for(me in this)this.hasOwnProperty(me)&&this[me].on(dt,null);return this}};function W(me){var De=[],et=new A;function dt(){for(var yt=De,Tt=-1,tr=yt.length,zt;++Tt=0&&(et=me.slice(0,De))!=="xmlns"&&(me=me.slice(De+1)),pe.hasOwnProperty(et)?{space:pe[et],local:me}:me}},ae.attr=function(me,De){if(arguments.length<2){if(typeof me=="string"){var et=this.node();return me=v.ns.qualify(me),me.local?et.getAttributeNS(me.space,me.local):et.getAttribute(me)}for(De in me)this.each(we(De,me[De]));return this}return this.each(we(me,De))};function we(me,De){me=v.ns.qualify(me);function et(){this.removeAttribute(me)}function dt(){this.removeAttributeNS(me.space,me.local)}function yt(){this.setAttribute(me,De)}function Tt(){this.setAttributeNS(me.space,me.local,De)}function tr(){var _r=De.apply(this,arguments);_r==null?this.removeAttribute(me):this.setAttribute(me,_r)}function zt(){var _r=De.apply(this,arguments);_r==null?this.removeAttributeNS(me.space,me.local):this.setAttributeNS(me.space,me.local,_r)}return De==null?me.local?dt:et:typeof De=="function"?me.local?zt:tr:me.local?Tt:yt}function Se(me){return me.trim().replace(/\s+/g," ")}ae.classed=function(me,De){if(arguments.length<2){if(typeof me=="string"){var et=this.node(),dt=(me=Pe(me)).length,yt=-1;if(De=et.classList){for(;++yt=0;)(Tt=et[dt])&&(yt&&yt!==Tt.nextSibling&&yt.parentNode.insertBefore(Tt,yt),yt=Tt);return this},ae.sort=function(me){me=Ce.apply(this,arguments);for(var De=-1,et=this.length;++De=De&&(De=yt+1);!(_r=tr[De])&&++De0&&(me=me.slice(0,yt));var tr=Bt.get(me);tr&&(me=tr,Tt=Ar);function zt(){var Xr=this[dt];Xr&&(this.removeEventListener(me,Xr,Xr.$),delete this[dt])}function _r(){var Xr=Tt(De,S(arguments));zt.call(this),this.addEventListener(me,this[dt]=Xr,Xr.$=et),Xr._=De}function Gr(){var Xr=new RegExp("^__on([^.]+)"+v.requote(me)+"$"),wa;for(var pa in this)if(wa=pa.match(Xr)){var Ja=this[pa];this.removeEventListener(wa[1],Ja,Ja.$),delete this[pa]}}return yt?De?_r:zt:De?U:Gr}var Bt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});M&&Bt.forEach(function(me){"on"+me in M&&Bt.remove(me)});function Vt(me,De){return function(et){var dt=v.event;v.event=et,De[0]=this.__data__;try{me.apply(this,De)}finally{v.event=dt}}}function Ar(me,De){var et=Vt(me,De);return function(dt){var yt=this,Tt=dt.relatedTarget;(!Tt||Tt!==yt&&!(Tt.compareDocumentPosition(yt)&8))&&et.call(yt,dt)}}var vr,qr=0;function kr(me){var De=".dragsuppress-"+ ++qr,et="click"+De,dt=v.select(t(me)).on("touchmove"+De,$).on("dragstart"+De,$).on("selectstart"+De,$);if(vr==null&&(vr="onselectstart"in me?!1:O(me.style,"userSelect")),vr){var yt=e(me).style,Tt=yt[vr];yt[vr]="none"}return function(tr){if(dt.on(De,null),vr&&(yt[vr]=Tt),tr){var zt=function(){dt.on(et,null)};dt.on(et,function(){$(),zt()},!0),setTimeout(zt,0)}}}v.mouse=function(me){return _t(me,ue())};var Ur=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _t(me,De){De.changedTouches&&(De=De.changedTouches[0]);var et=me.ownerSVGElement||me;if(et.createSVGPoint){var dt=et.createSVGPoint();if(Ur<0){var yt=t(me);if(yt.scrollX||yt.scrollY){et=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=et[0][0].getScreenCTM();Ur=!(Tt.f||Tt.e),et.remove()}}return Ur?(dt.x=De.pageX,dt.y=De.pageY):(dt.x=De.clientX,dt.y=De.clientY),dt=dt.matrixTransform(me.getScreenCTM().inverse()),[dt.x,dt.y]}var tr=me.getBoundingClientRect();return[De.clientX-tr.left-me.clientLeft,De.clientY-tr.top-me.clientTop]}v.touch=function(me,De,et){if(arguments.length<3&&(et=De,De=ue().changedTouches),De){for(var dt=0,yt=De.length,Tt;dt0?1:me<0?-1:0}function Pt(me,De,et){return(De[0]-me[0])*(et[1]-me[1])-(De[1]-me[1])*(et[0]-me[0])}function jt(me){return me>1?0:me<-1?Le:Math.acos(me)}function cr(me){return me>1?st:me<-1?-st:Math.asin(me)}function or(me){return((me=Math.exp(me))-1/me)/2}function nr(me){return((me=Math.exp(me))+1/me)/2}function Pr(me){return((me=Math.exp(2*me))-1)/(me+1)}function _a(me){return(me=Math.sin(me/2))*me}var Fa=Math.SQRT2,Ra=2,qa=4;v.interpolateZoom=function(me,De){var et=me[0],dt=me[1],yt=me[2],Tt=De[0],tr=De[1],zt=De[2],_r=Tt-et,Gr=tr-dt,Xr=_r*_r+Gr*Gr,wa,pa;if(Xr0&&(mn=mn.transition().duration(tr)),mn.call(ni.event)}function Jn(){za&&za.domain(Sa.range().map(function(mn){return(mn-me.x)/me.k}).map(Sa.invert)),fi&&fi.domain(Xa.range().map(function(mn){return(mn-me.y)/me.k}).map(Xa.invert))}function ro(mn){zt++||mn({type:"zoomstart"})}function $o(mn){Jn(),mn({type:"zoom",scale:me.k,translate:[me.x,me.y]})}function no(mn){--zt||(mn({type:"zoomend"}),et=null)}function Xo(){var mn=this,po=ti.of(mn,arguments),fs=0,ms=v.select(t(mn)).on(Gr,Su).on(Xr,Rl),Tl=La(v.mouse(mn)),Wl=kr(mn);Bn.call(mn),ro(po);function Su(){fs=1,dn(v.mouse(mn),Tl),$o(po)}function Rl(){ms.on(Gr,null).on(Xr,null),Wl(fs),no(po)}}function cl(){var mn=this,po=ti.of(mn,arguments),fs={},ms=0,Tl,Wl=".zoom-"+v.event.changedTouches[0].identifier,Su="touchmove"+Wl,Rl="touchend"+Wl,_c=[],it=v.select(mn),Xt=kr(mn);oa(),ro(po),it.on(_r,null).on(pa,oa);function fr(){var xa=v.touches(mn);return Tl=me.k,xa.forEach(function(Ya){Ya.identifier in fs&&(fs[Ya.identifier]=La(Ya))}),xa}function oa(){var xa=v.event.target;v.select(xa).on(Su,Ta).on(Rl,ma),_c.push(xa);for(var Ya=v.event.changedTouches,bi=0,yi=Ya.length;bi1){var zi=si[0],Ei=si[1],Na=zi[0]-Ei[0],ea=zi[1]-Ei[1];ms=Na*Na+ea*ea}}function Ta(){var xa=v.touches(mn),Ya,bi,yi,si;Bn.call(mn);for(var gn=0,zi=xa.length;gn1?1:De,et=et<0?0:et>1?1:et,yt=et<=.5?et*(1+De):et+De-et*De,dt=2*et-yt;function Tt(zt){return zt>360?zt-=360:zt<0&&(zt+=360),zt<60?dt+(yt-dt)*zt/60:zt<180?yt:zt<240?dt+(yt-dt)*(240-zt)/60:dt}function tr(zt){return Math.round(Tt(zt)*255)}return new xt(tr(me+120),tr(me),tr(me-120))}v.hcl=Jt;function Jt(me,De,et){return this instanceof Jt?(this.h=+me,this.c=+De,void(this.l=+et)):arguments.length<2?me instanceof Jt?new Jt(me.h,me.c,me.l):me instanceof ra?Ia(me.l,me.a,me.b):Ia((me=Hr((me=v.rgb(me)).r,me.g,me.b)).l,me.a,me.b):new Jt(me,De,et)}var Fr=Jt.prototype=new wi;Fr.brighter=function(me){return new Jt(this.h,this.c,Math.min(100,this.l+ca*(arguments.length?me:1)))},Fr.darker=function(me){return new Jt(this.h,this.c,Math.max(0,this.l-ca*(arguments.length?me:1)))},Fr.rgb=function(){return ta(this.h,this.c,this.l).rgb()};function ta(me,De,et){return isNaN(me)&&(me=0),isNaN(De)&&(De=0),new ra(et,Math.cos(me*=ot)*De,Math.sin(me)*De)}v.lab=ra;function ra(me,De,et){return this instanceof ra?(this.l=+me,this.a=+De,void(this.b=+et)):arguments.length<2?me instanceof ra?new ra(me.l,me.a,me.b):me instanceof Jt?ta(me.h,me.c,me.l):Hr((me=xt(me)).r,me.g,me.b):new ra(me,De,et)}var ca=18,Ba=.95047,$a=1,Za=1.08883,ri=ra.prototype=new wi;ri.brighter=function(me){return new ra(Math.min(100,this.l+ca*(arguments.length?me:1)),this.a,this.b)},ri.darker=function(me){return new ra(Math.max(0,this.l-ca*(arguments.length?me:1)),this.a,this.b)},ri.rgb=function(){return pi(this.l,this.a,this.b)};function pi(me,De,et){var dt=(me+16)/116,yt=dt+De/500,Tt=dt-et/200;return yt=rn(yt)*Ba,dt=rn(dt)*$a,Tt=rn(Tt)*Za,new xt(cn(3.2404542*yt-1.5371385*dt-.4985314*Tt),cn(-.969266*yt+1.8760108*dt+.041556*Tt),cn(.0556434*yt-.2040259*dt+1.0572252*Tt))}function Ia(me,De,et){return me>0?new Jt(Math.atan2(et,De)*Ut,Math.sqrt(De*De+et*et),me):new Jt(NaN,NaN,me)}function rn(me){return me>.206893034?me*me*me:(me-4/29)/7.787037}function tn(me){return me>.008856?Math.pow(me,1/3):7.787037*me+4/29}function cn(me){return Math.round(255*(me<=.00304?12.92*me:1.055*Math.pow(me,1/2.4)-.055))}v.rgb=xt;function xt(me,De,et){return this instanceof xt?(this.r=~~me,this.g=~~De,void(this.b=~~et)):arguments.length<2?me instanceof xt?new xt(me.r,me.g,me.b):Rr(""+me,xt,Zt):new xt(me,De,et)}function ut(me){return new xt(me>>16,me>>8&255,me&255)}function Or(me){return ut(me)+""}var Cr=xt.prototype=new wi;Cr.brighter=function(me){me=Math.pow(.7,arguments.length?me:1);var De=this.r,et=this.g,dt=this.b,yt=30;return!De&&!et&&!dt?new xt(yt,yt,yt):(De&&De>4,dt=dt>>4|dt,yt=_r&240,yt=yt>>4|yt,Tt=_r&15,Tt=Tt<<4|Tt):me.length===7&&(dt=(_r&16711680)>>16,yt=(_r&65280)>>8,Tt=_r&255)),De(dt,yt,Tt))}function Nr(me,De,et){var dt=Math.min(me/=255,De/=255,et/=255),yt=Math.max(me,De,et),Tt=yt-dt,tr,zt,_r=(yt+dt)/2;return Tt?(zt=_r<.5?Tt/(yt+dt):Tt/(2-yt-dt),me==yt?tr=(De-et)/Tt+(De0&&_r<1?0:tr),new Yt(tr,zt,_r)}function Hr(me,De,et){me=gt(me),De=gt(De),et=gt(et);var dt=tn((.4124564*me+.3575761*De+.1804375*et)/Ba),yt=tn((.2126729*me+.7151522*De+.072175*et)/$a),Tt=tn((.0193339*me+.119192*De+.9503041*et)/Za);return ra(116*yt-16,500*(dt-yt),200*(yt-Tt))}function gt(me){return(me/=255)<=.04045?me/12.92:Math.pow((me+.055)/1.055,2.4)}function Kt(me){var De=parseFloat(me);return me.charAt(me.length-1)==="%"?Math.round(De*2.55):De}var mr=v.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});mr.forEach(function(me,De){mr.set(me,ut(De))});function Ir(me){return typeof me=="function"?me:function(){return me}}v.functor=Ir,v.xhr=va(F);function va(me){return function(De,et,dt){return arguments.length===2&&typeof et=="function"&&(dt=et,et=null),Pa(De,et,me,dt)}}function Pa(me,De,et,dt){var yt={},Tt=v.dispatch("beforesend","progress","load","error"),tr={},zt=new XMLHttpRequest,_r=null;self.XDomainRequest&&!("withCredentials"in zt)&&/^(http(s)?:)?\/\//.test(me)&&(zt=new XDomainRequest),"onload"in zt?zt.onload=zt.onerror=Gr:zt.onreadystatechange=function(){zt.readyState>3&&Gr()};function Gr(){var Xr=zt.status,wa;if(!Xr&&la(zt)||Xr>=200&&Xr<300||Xr===304){try{wa=et.call(yt,zt)}catch(pa){Tt.error.call(yt,pa);return}Tt.load.call(yt,wa)}else Tt.error.call(yt,zt)}return zt.onprogress=function(Xr){var wa=v.event;v.event=Xr;try{Tt.progress.call(yt,zt)}finally{v.event=wa}},yt.header=function(Xr,wa){return Xr=(Xr+"").toLowerCase(),arguments.length<2?tr[Xr]:(wa==null?delete tr[Xr]:tr[Xr]=wa+"",yt)},yt.mimeType=function(Xr){return arguments.length?(De=Xr==null?null:Xr+"",yt):De},yt.responseType=function(Xr){return arguments.length?(_r=Xr,yt):_r},yt.response=function(Xr){return et=Xr,yt},["get","post"].forEach(function(Xr){yt[Xr]=function(){return yt.send.apply(yt,[Xr].concat(S(arguments)))}}),yt.send=function(Xr,wa,pa){if(arguments.length===2&&typeof wa=="function"&&(pa=wa,wa=null),zt.open(Xr,me,!0),De!=null&&!("accept"in tr)&&(tr.accept=De+",*/*"),zt.setRequestHeader)for(var Ja in tr)zt.setRequestHeader(Ja,tr[Ja]);return De!=null&&zt.overrideMimeType&&zt.overrideMimeType(De),_r!=null&&(zt.responseType=_r),pa!=null&&yt.on("error",pa).on("load",function(ti){pa(null,ti)}),Tt.beforesend.call(yt,zt),zt.send(wa??null),yt},yt.abort=function(){return zt.abort(),yt},v.rebind(yt,Tt,"on"),dt==null?yt:yt.get(ga(dt))}function ga(me){return me.length===1?function(De,et){me(De==null?et:null)}:me}function la(me){var De=me.responseType;return De&&De!=="text"?me.response:me.responseText}v.dsv=function(me,De){var et=new RegExp('["'+me+` -]`),dt=me.charCodeAt(0);function yt(Gr,Xr,wa){arguments.length<3&&(wa=Xr,Xr=null);var pa=Pa(Gr,De,Xr==null?Tt:tr(Xr),wa);return pa.row=function(Ja){return arguments.length?pa.response((Xr=Ja)==null?Tt:tr(Ja)):Xr},pa}function Tt(Gr){return yt.parse(Gr.responseText)}function tr(Gr){return function(Xr){return yt.parse(Xr.responseText,Gr)}}yt.parse=function(Gr,Xr){var wa;return yt.parseRows(Gr,function(pa,Ja){if(wa)return wa(pa,Ja-1);var ti=function(Sa){for(var za={},Xa=pa.length,fi=0;fi=ti)return pa;if(fi)return fi=!1,wa;var sn=Sa;if(Gr.charCodeAt(sn)===34){for(var an=sn;an++()=>(_e||fe((_e={exports:{}}).exports,_e),_e.exports);var cX=(fe,_e,Xe,Lt)=>{if(_e&&typeof _e=="object"||typeof _e=="function")for(let gr of oX(_e))!lX.call(fe,gr)&&gr!==Xe&&Wk(fe,gr,{get:()=>_e[gr],enumerable:!(Lt=nX(_e,gr))||Lt.enumerable});return fe};var fX=(fe,_e,Xe)=>(Xe=fe!=null?iX(sX(fe)):{},cX(_e||!fe||!fe.__esModule?Wk(Xe,"default",{value:fe,enumerable:!0}):Xe,fe));var a7=uX((r7,c2)=>{(function(fe,_e){typeof c2=="object"&&c2.exports?c2.exports=_e():fe.moduleName=_e()})(typeof self<"u"?self:r7,()=>{"use strict";var fe=(()=>{var _e=Object.create,Xe=Object.defineProperty,Lt=Object.defineProperties,gr=Object.getOwnPropertyDescriptor,Zr=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertyNames,ei=Object.getOwnPropertySymbols,ai=Object.getPrototypeOf,wn=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,Fn=(Z,q,v)=>q in Z?Xe(Z,q,{enumerable:!0,configurable:!0,writable:!0,value:v}):Z[q]=v,So=(Z,q)=>{for(var v in q||(q={}))wn.call(q,v)&&Fn(Z,v,q[v]);if(ei)for(var v of ei(q))_n.call(q,v)&&Fn(Z,v,q[v]);return Z},vs=(Z,q)=>Lt(Z,Zr(q)),Qs=(Z,q)=>{var v={};for(var _ in Z)wn.call(Z,_)&&q.indexOf(_)<0&&(v[_]=Z[_]);if(Z!=null&&ei)for(var _ of ei(Z))q.indexOf(_)<0&&_n.call(Z,_)&&(v[_]=Z[_]);return v},Ho=(Z,q,v)=>function(){if(v)throw v[0];try{return Z&&(q=(0,Z[Ea(Z)[0]])(Z=0)),q}catch(S){throw v=[S],S}},He=(Z,q)=>function(){try{return q||(0,Z[Ea(Z)[0]])((q={exports:{}}).exports,q),q.exports}catch(_){throw q=0,_}},Jl=(Z,q)=>{for(var v in q)Xe(Z,v,{get:q[v],enumerable:!0})},ou=(Z,q,v,_)=>{if(q&&typeof q=="object"||typeof q=="function")for(let S of Ea(q))!wn.call(Z,S)&&S!==v&&Xe(Z,S,{get:()=>q[S],enumerable:!(_=gr(q,S))||_.enumerable});return Z},jp=(Z,q,v)=>(v=Z!=null?_e(ai(Z)):{},ou(q||!Z||!Z.__esModule?Xe(v,"default",{value:Z,enumerable:!0}):v,Z)),zf=Z=>ou(Xe({},"__esModule",{value:!0}),Z),Gh=He({"src/version.js"(Z){"use strict";Z.version="3.7.0"}}),Ff=He({"node_modules/native-promise-only/lib/npo.src.js"(Z,q){(function(_,S,M){S[_]=S[_]||M(),typeof q<"u"&&q.exports&&(q.exports=S[_])})("Promise",typeof window<"u"?window:Z,function(){"use strict";var _,S,M,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(x){return setImmediate(x)}:setTimeout;try{Object.defineProperty({},"x",{}),_=function(x,w,A,E){return Object.defineProperty(x,w,{value:A,writable:!0,configurable:E!==!1})}}catch{_=function(w,A,E){return w[A]=E,w}}M=function(){var x,w,A;function E(p,b){this.fn=p,this.self=b,this.next=void 0}return{add:function(b,d){A=new E(b,d),w?w.next=A:x=A,w=A,A=void 0},drain:function(){var b=x;for(x=w=S=void 0;b;)b.fn.call(b.self),b=b.next}}}();function r(l,x){M.add(l,x),S||(S=t(M.drain))}function o(l){var x,w=typeof l;return l!=null&&(w=="object"||w=="function")&&(x=l.then),typeof x=="function"?x:!1}function a(){for(var l=0;l0&&r(a,w))}catch(A){s.call(new f(w),A)}}}function s(l){var x=this;x.triggered||(x.triggered=!0,x.def&&(x=x.def),x.msg=l,x.state=2,x.chain.length>0&&r(a,x))}function h(l,x,w,A){for(var E=0;EDe?1:me>=De?0:NaN}v.descending=function(me,De){return Deme?1:De>=me?0:NaN},v.min=function(me,De){var et=-1,dt=me.length,yt,Tt;if(arguments.length===1){for(;++et=Tt){yt=Tt;break}for(;++etTt&&(yt=Tt)}else{for(;++et=Tt){yt=Tt;break}for(;++etTt&&(yt=Tt)}return yt},v.max=function(me,De){var et=-1,dt=me.length,yt,Tt;if(arguments.length===1){for(;++et=Tt){yt=Tt;break}for(;++etyt&&(yt=Tt)}else{for(;++et=Tt){yt=Tt;break}for(;++etyt&&(yt=Tt)}return yt},v.extent=function(me,De){var et=-1,dt=me.length,yt,Tt,tr;if(arguments.length===1){for(;++et=Tt){yt=tr=Tt;break}for(;++etTt&&(yt=Tt),tr=Tt){yt=tr=Tt;break}for(;++etTt&&(yt=Tt),tr1)return tr/(_r-1)},v.deviation=function(){var me=v.variance.apply(this,arguments);return me&&Math.sqrt(me)};function m(me){return{left:function(De,et,dt,yt){for(arguments.length<3&&(dt=0),arguments.length<4&&(yt=De.length);dt>>1;me(De[Tt],et)<0?dt=Tt+1:yt=Tt}return dt},right:function(De,et,dt,yt){for(arguments.length<3&&(dt=0),arguments.length<4&&(yt=De.length);dt>>1;me(De[Tt],et)>0?yt=Tt:dt=Tt+1}return dt}}}var c=m(s);v.bisectLeft=c.left,v.bisect=v.bisectRight=c.right,v.bisector=function(me){return m(me.length===1?function(De,et){return s(me(De),et)}:me)},v.shuffle=function(me,De,et){(dt=arguments.length)<3&&(et=me.length,dt<2&&(De=0));for(var dt=et-De,yt,Tt;dt;)Tt=Math.random()*dt--|0,yt=me[dt+De],me[dt+De]=me[Tt+De],me[Tt+De]=yt;return me},v.permute=function(me,De){for(var et=De.length,dt=new Array(et);et--;)dt[et]=me[De[et]];return dt},v.pairs=function(me){for(var De=0,et=me.length-1,dt,yt=me[0],Tt=new Array(et<0?0:et);De=0;)for(tr=me[De],et=tr.length;--et>=0;)Tt[--yt]=tr[et];return Tt};var l=Math.abs;v.range=function(me,De,et){if(arguments.length<3&&(et=1,arguments.length<2&&(De=me,me=0)),(De-me)/et===1/0)throw new Error("infinite range");var dt=[],yt=x(l(et)),Tt=-1,tr;if(me*=yt,De*=yt,et*=yt,et<0)for(;(tr=me+et*++Tt)>De;)dt.push(tr/yt);else for(;(tr=me+et*++Tt)=De.length)return yt?yt.call(me,_r):dt?_r.sort(dt):_r;for(var Xr=-1,wa=_r.length,pa=De[Gr++],Ja,ti,Sa,za=new A,Xa;++Xr=De.length)return zt;var Gr=[],Xr=et[_r++];return zt.forEach(function(wa,pa){Gr.push({key:wa,values:tr(pa,_r)})}),Xr?Gr.sort(function(wa,pa){return Xr(wa.key,pa.key)}):Gr}return me.map=function(zt,_r){return Tt(_r,zt,0)},me.entries=function(zt){return tr(Tt(v.map,zt,0),0)},me.key=function(zt){return De.push(zt),me},me.sortKeys=function(zt){return et[De.length-1]=zt,me},me.sortValues=function(zt){return dt=zt,me},me.rollup=function(zt){return yt=zt,me},me},v.set=function(me){var De=new z;if(me)for(var et=0,dt=me.length;et=0&&(dt=me.slice(et+1),me=me.slice(0,et)),me)return arguments.length<2?this[me].on(dt):this[me].on(dt,De);if(arguments.length===2){if(De==null)for(me in this)this.hasOwnProperty(me)&&this[me].on(dt,null);return this}};function W(me){var De=[],et=new A;function dt(){for(var yt=De,Tt=-1,tr=yt.length,zt;++Tt=0&&(et=me.slice(0,De))!=="xmlns"&&(me=me.slice(De+1)),pe.hasOwnProperty(et)?{space:pe[et],local:me}:me}},ae.attr=function(me,De){if(arguments.length<2){if(typeof me=="string"){var et=this.node();return me=v.ns.qualify(me),me.local?et.getAttributeNS(me.space,me.local):et.getAttribute(me)}for(De in me)this.each(we(De,me[De]));return this}return this.each(we(me,De))};function we(me,De){me=v.ns.qualify(me);function et(){this.removeAttribute(me)}function dt(){this.removeAttributeNS(me.space,me.local)}function yt(){this.setAttribute(me,De)}function Tt(){this.setAttributeNS(me.space,me.local,De)}function tr(){var _r=De.apply(this,arguments);_r==null?this.removeAttribute(me):this.setAttribute(me,_r)}function zt(){var _r=De.apply(this,arguments);_r==null?this.removeAttributeNS(me.space,me.local):this.setAttributeNS(me.space,me.local,_r)}return De==null?me.local?dt:et:typeof De=="function"?me.local?zt:tr:me.local?Tt:yt}function Se(me){return me.trim().replace(/\s+/g," ")}ae.classed=function(me,De){if(arguments.length<2){if(typeof me=="string"){var et=this.node(),dt=(me=Pe(me)).length,yt=-1;if(De=et.classList){for(;++yt=0;)(Tt=et[dt])&&(yt&&yt!==Tt.nextSibling&&yt.parentNode.insertBefore(Tt,yt),yt=Tt);return this},ae.sort=function(me){me=Ce.apply(this,arguments);for(var De=-1,et=this.length;++De=De&&(De=yt+1);!(_r=tr[De])&&++De0&&(me=me.slice(0,yt));var tr=Bt.get(me);tr&&(me=tr,Tt=Ar);function zt(){var Xr=this[dt];Xr&&(this.removeEventListener(me,Xr,Xr.$),delete this[dt])}function _r(){var Xr=Tt(De,S(arguments));zt.call(this),this.addEventListener(me,this[dt]=Xr,Xr.$=et),Xr._=De}function Gr(){var Xr=new RegExp("^__on([^.]+)"+v.requote(me)+"$"),wa;for(var pa in this)if(wa=pa.match(Xr)){var Ja=this[pa];this.removeEventListener(wa[1],Ja,Ja.$),delete this[pa]}}return yt?De?_r:zt:De?U:Gr}var Bt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});M&&Bt.forEach(function(me){"on"+me in M&&Bt.remove(me)});function Vt(me,De){return function(et){var dt=v.event;v.event=et,De[0]=this.__data__;try{me.apply(this,De)}finally{v.event=dt}}}function Ar(me,De){var et=Vt(me,De);return function(dt){var yt=this,Tt=dt.relatedTarget;(!Tt||Tt!==yt&&!(Tt.compareDocumentPosition(yt)&8))&&et.call(yt,dt)}}var vr,qr=0;function kr(me){var De=".dragsuppress-"+ ++qr,et="click"+De,dt=v.select(t(me)).on("touchmove"+De,$).on("dragstart"+De,$).on("selectstart"+De,$);if(vr==null&&(vr="onselectstart"in me?!1:O(me.style,"userSelect")),vr){var yt=e(me).style,Tt=yt[vr];yt[vr]="none"}return function(tr){if(dt.on(De,null),vr&&(yt[vr]=Tt),tr){var zt=function(){dt.on(et,null)};dt.on(et,function(){$(),zt()},!0),setTimeout(zt,0)}}}v.mouse=function(me){return _t(me,ue())};var Ur=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _t(me,De){De.changedTouches&&(De=De.changedTouches[0]);var et=me.ownerSVGElement||me;if(et.createSVGPoint){var dt=et.createSVGPoint();if(Ur<0){var yt=t(me);if(yt.scrollX||yt.scrollY){et=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=et[0][0].getScreenCTM();Ur=!(Tt.f||Tt.e),et.remove()}}return Ur?(dt.x=De.pageX,dt.y=De.pageY):(dt.x=De.clientX,dt.y=De.clientY),dt=dt.matrixTransform(me.getScreenCTM().inverse()),[dt.x,dt.y]}var tr=me.getBoundingClientRect();return[De.clientX-tr.left-me.clientLeft,De.clientY-tr.top-me.clientTop]}v.touch=function(me,De,et){if(arguments.length<3&&(et=De,De=ue().changedTouches),De){for(var dt=0,yt=De.length,Tt;dt0?1:me<0?-1:0}function Pt(me,De,et){return(De[0]-me[0])*(et[1]-me[1])-(De[1]-me[1])*(et[0]-me[0])}function jt(me){return me>1?0:me<-1?Le:Math.acos(me)}function cr(me){return me>1?st:me<-1?-st:Math.asin(me)}function or(me){return((me=Math.exp(me))-1/me)/2}function nr(me){return((me=Math.exp(me))+1/me)/2}function Pr(me){return((me=Math.exp(2*me))-1)/(me+1)}function _a(me){return(me=Math.sin(me/2))*me}var Fa=Math.SQRT2,Ra=2,qa=4;v.interpolateZoom=function(me,De){var et=me[0],dt=me[1],yt=me[2],Tt=De[0],tr=De[1],zt=De[2],_r=Tt-et,Gr=tr-dt,Xr=_r*_r+Gr*Gr,wa,pa;if(Xr0&&(mn=mn.transition().duration(tr)),mn.call(oi.event)}function Jn(){za&&za.domain(Sa.range().map(function(mn){return(mn-me.x)/me.k}).map(Sa.invert)),fi&&fi.domain(Xa.range().map(function(mn){return(mn-me.y)/me.k}).map(Xa.invert))}function ro(mn){zt++||mn({type:"zoomstart"})}function $o(mn){Jn(),mn({type:"zoom",scale:me.k,translate:[me.x,me.y]})}function no(mn){--zt||(mn({type:"zoomend"}),et=null)}function Xo(){var mn=this,po=ti.of(mn,arguments),fs=0,ms=v.select(t(mn)).on(Gr,Su).on(Xr,Rl),Tl=La(v.mouse(mn)),Wl=kr(mn);Bn.call(mn),ro(po);function Su(){fs=1,dn(v.mouse(mn),Tl),$o(po)}function Rl(){ms.on(Gr,null).on(Xr,null),Wl(fs),no(po)}}function cl(){var mn=this,po=ti.of(mn,arguments),fs={},ms=0,Tl,Wl=".zoom-"+v.event.changedTouches[0].identifier,Su="touchmove"+Wl,Rl="touchend"+Wl,_c=[],it=v.select(mn),Xt=kr(mn);oa(),ro(po),it.on(_r,null).on(pa,oa);function fr(){var xa=v.touches(mn);return Tl=me.k,xa.forEach(function(Ya){Ya.identifier in fs&&(fs[Ya.identifier]=La(Ya))}),xa}function oa(){var xa=v.event.target;v.select(xa).on(Su,Ta).on(Rl,ma),_c.push(xa);for(var Ya=v.event.changedTouches,bi=0,yi=Ya.length;bi1){var zi=si[0],Ei=si[1],Na=zi[0]-Ei[0],ea=zi[1]-Ei[1];ms=Na*Na+ea*ea}}function Ta(){var xa=v.touches(mn),Ya,bi,yi,si;Bn.call(mn);for(var gn=0,zi=xa.length;gn1?1:De,et=et<0?0:et>1?1:et,yt=et<=.5?et*(1+De):et+De-et*De,dt=2*et-yt;function Tt(zt){return zt>360?zt-=360:zt<0&&(zt+=360),zt<60?dt+(yt-dt)*zt/60:zt<180?yt:zt<240?dt+(yt-dt)*(240-zt)/60:dt}function tr(zt){return Math.round(Tt(zt)*255)}return new xt(tr(me+120),tr(me),tr(me-120))}v.hcl=Jt;function Jt(me,De,et){return this instanceof Jt?(this.h=+me,this.c=+De,void(this.l=+et)):arguments.length<2?me instanceof Jt?new Jt(me.h,me.c,me.l):me instanceof ra?Ia(me.l,me.a,me.b):Ia((me=Hr((me=v.rgb(me)).r,me.g,me.b)).l,me.a,me.b):new Jt(me,De,et)}var Fr=Jt.prototype=new wi;Fr.brighter=function(me){return new Jt(this.h,this.c,Math.min(100,this.l+ca*(arguments.length?me:1)))},Fr.darker=function(me){return new Jt(this.h,this.c,Math.max(0,this.l-ca*(arguments.length?me:1)))},Fr.rgb=function(){return ta(this.h,this.c,this.l).rgb()};function ta(me,De,et){return isNaN(me)&&(me=0),isNaN(De)&&(De=0),new ra(et,Math.cos(me*=ot)*De,Math.sin(me)*De)}v.lab=ra;function ra(me,De,et){return this instanceof ra?(this.l=+me,this.a=+De,void(this.b=+et)):arguments.length<2?me instanceof ra?new ra(me.l,me.a,me.b):me instanceof Jt?ta(me.h,me.c,me.l):Hr((me=xt(me)).r,me.g,me.b):new ra(me,De,et)}var ca=18,Ba=.95047,$a=1,Za=1.08883,ri=ra.prototype=new wi;ri.brighter=function(me){return new ra(Math.min(100,this.l+ca*(arguments.length?me:1)),this.a,this.b)},ri.darker=function(me){return new ra(Math.max(0,this.l-ca*(arguments.length?me:1)),this.a,this.b)},ri.rgb=function(){return pi(this.l,this.a,this.b)};function pi(me,De,et){var dt=(me+16)/116,yt=dt+De/500,Tt=dt-et/200;return yt=rn(yt)*Ba,dt=rn(dt)*$a,Tt=rn(Tt)*Za,new xt(cn(3.2404542*yt-1.5371385*dt-.4985314*Tt),cn(-.969266*yt+1.8760108*dt+.041556*Tt),cn(.0556434*yt-.2040259*dt+1.0572252*Tt))}function Ia(me,De,et){return me>0?new Jt(Math.atan2(et,De)*Ut,Math.sqrt(De*De+et*et),me):new Jt(NaN,NaN,me)}function rn(me){return me>.206893034?me*me*me:(me-4/29)/7.787037}function tn(me){return me>.008856?Math.pow(me,1/3):7.787037*me+4/29}function cn(me){return Math.round(255*(me<=.00304?12.92*me:1.055*Math.pow(me,1/2.4)-.055))}v.rgb=xt;function xt(me,De,et){return this instanceof xt?(this.r=~~me,this.g=~~De,void(this.b=~~et)):arguments.length<2?me instanceof xt?new xt(me.r,me.g,me.b):Rr(""+me,xt,Zt):new xt(me,De,et)}function ut(me){return new xt(me>>16,me>>8&255,me&255)}function Or(me){return ut(me)+""}var Cr=xt.prototype=new wi;Cr.brighter=function(me){me=Math.pow(.7,arguments.length?me:1);var De=this.r,et=this.g,dt=this.b,yt=30;return!De&&!et&&!dt?new xt(yt,yt,yt):(De&&De>4,dt=dt>>4|dt,yt=_r&240,yt=yt>>4|yt,Tt=_r&15,Tt=Tt<<4|Tt):me.length===7&&(dt=(_r&16711680)>>16,yt=(_r&65280)>>8,Tt=_r&255)),De(dt,yt,Tt))}function Nr(me,De,et){var dt=Math.min(me/=255,De/=255,et/=255),yt=Math.max(me,De,et),Tt=yt-dt,tr,zt,_r=(yt+dt)/2;return Tt?(zt=_r<.5?Tt/(yt+dt):Tt/(2-yt-dt),me==yt?tr=(De-et)/Tt+(De0&&_r<1?0:tr),new Yt(tr,zt,_r)}function Hr(me,De,et){me=gt(me),De=gt(De),et=gt(et);var dt=tn((.4124564*me+.3575761*De+.1804375*et)/Ba),yt=tn((.2126729*me+.7151522*De+.072175*et)/$a),Tt=tn((.0193339*me+.119192*De+.9503041*et)/Za);return ra(116*yt-16,500*(dt-yt),200*(yt-Tt))}function gt(me){return(me/=255)<=.04045?me/12.92:Math.pow((me+.055)/1.055,2.4)}function Kt(me){var De=parseFloat(me);return me.charAt(me.length-1)==="%"?Math.round(De*2.55):De}var mr=v.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});mr.forEach(function(me,De){mr.set(me,ut(De))});function Ir(me){return typeof me=="function"?me:function(){return me}}v.functor=Ir,v.xhr=va(F);function va(me){return function(De,et,dt){return arguments.length===2&&typeof et=="function"&&(dt=et,et=null),Pa(De,et,me,dt)}}function Pa(me,De,et,dt){var yt={},Tt=v.dispatch("beforesend","progress","load","error"),tr={},zt=new XMLHttpRequest,_r=null;self.XDomainRequest&&!("withCredentials"in zt)&&/^(http(s)?:)?\/\//.test(me)&&(zt=new XDomainRequest),"onload"in zt?zt.onload=zt.onerror=Gr:zt.onreadystatechange=function(){zt.readyState>3&&Gr()};function Gr(){var Xr=zt.status,wa;if(!Xr&&la(zt)||Xr>=200&&Xr<300||Xr===304){try{wa=et.call(yt,zt)}catch(pa){Tt.error.call(yt,pa);return}Tt.load.call(yt,wa)}else Tt.error.call(yt,zt)}return zt.onprogress=function(Xr){var wa=v.event;v.event=Xr;try{Tt.progress.call(yt,zt)}finally{v.event=wa}},yt.header=function(Xr,wa){return Xr=(Xr+"").toLowerCase(),arguments.length<2?tr[Xr]:(wa==null?delete tr[Xr]:tr[Xr]=wa+"",yt)},yt.mimeType=function(Xr){return arguments.length?(De=Xr==null?null:Xr+"",yt):De},yt.responseType=function(Xr){return arguments.length?(_r=Xr,yt):_r},yt.response=function(Xr){return et=Xr,yt},["get","post"].forEach(function(Xr){yt[Xr]=function(){return yt.send.apply(yt,[Xr].concat(S(arguments)))}}),yt.send=function(Xr,wa,pa){if(arguments.length===2&&typeof wa=="function"&&(pa=wa,wa=null),zt.open(Xr,me,!0),De!=null&&!("accept"in tr)&&(tr.accept=De+",*/*"),zt.setRequestHeader)for(var Ja in tr)zt.setRequestHeader(Ja,tr[Ja]);return De!=null&&zt.overrideMimeType&&zt.overrideMimeType(De),_r!=null&&(zt.responseType=_r),pa!=null&&yt.on("error",pa).on("load",function(ti){pa(null,ti)}),Tt.beforesend.call(yt,zt),zt.send(wa??null),yt},yt.abort=function(){return zt.abort(),yt},v.rebind(yt,Tt,"on"),dt==null?yt:yt.get(ga(dt))}function ga(me){return me.length===1?function(De,et){me(De==null?et:null)}:me}function la(me){var De=me.responseType;return De&&De!=="text"?me.response:me.responseText}v.dsv=function(me,De){var et=new RegExp('["'+me+` +]`),dt=me.charCodeAt(0);function yt(Gr,Xr,wa){arguments.length<3&&(wa=Xr,Xr=null);var pa=Pa(Gr,De,Xr==null?Tt:tr(Xr),wa);return pa.row=function(Ja){return arguments.length?pa.response((Xr=Ja)==null?Tt:tr(Ja)):Xr},pa}function Tt(Gr){return yt.parse(Gr.responseText)}function tr(Gr){return function(Xr){return yt.parse(Xr.responseText,Gr)}}yt.parse=function(Gr,Xr){var wa;return yt.parseRows(Gr,function(pa,Ja){if(wa)return wa(pa,Ja-1);var ti=function(Sa){for(var za={},Xa=pa.length,fi=0;fi=ti)return pa;if(fi)return fi=!1,wa;var sn=Sa;if(Gr.charCodeAt(sn)===34){for(var an=sn;an++24?(isFinite(De)&&(clearTimeout(Ki),Ki=setTimeout(On,De)),ki=0):(ki=1,Mn(On))}v.timer.flush=function(){En(),ao()};function En(){for(var me=Date.now(),De=ba;De;)me>=De.t&&De.c(me-De.t)&&(De.c=null),De=De.n;return me}function ao(){for(var me,De=ba,et=1/0;De;)De.c?(De.t=0;--zt)Sa.push(yt[Gr[wa[zt]][2]]);for(zt=+Ja;zt1&&Pt(me[et[dt-2]],me[et[dt-1]],me[yt])<=0;)--dt;et[dt++]=yt}return et.slice(0,dt)}function kn(me,De){return me[0]-De[0]||me[1]-De[1]}v.geom.polygon=function(me){return Y(me,wo),me};var wo=v.geom.polygon.prototype=[];wo.area=function(){for(var me=-1,De=this.length,et,dt=this[De-1],yt=0;++meYe)zt=zt.L;else if(tr=De-lo(zt,et),tr>Ye){if(!zt.R){dt=zt;break}zt=zt.R}else{Tt>-Ye?(dt=zt.P,yt=zt):tr>-Ye?(dt=zt,yt=zt.N):dt=yt=zt;break}var _r=Ko(me);if(Yn.insert(dt,_r),!(!dt&&!yt)){if(dt===yt){Po(dt),yt=Ko(dt.site),Yn.insert(_r,yt),_r.edge=yt.edge=Nl(dt.site,_r.site),yn(dt),yn(yt);return}if(!yt){_r.edge=Nl(dt.site,_r.site);return}Po(dt),Po(yt);var Gr=dt.site,Xr=Gr.x,wa=Gr.y,pa=me.x-Xr,Ja=me.y-wa,ti=yt.site,Sa=ti.x-Xr,za=ti.y-wa,Xa=2*(pa*za-Ja*Sa),fi=pa*pa+Ja*Ja,ni=Sa*Sa+za*za,La={x:(za*fi-Ja*ni)/Xa+Xr,y:(pa*ni-Sa*fi)/Xa+wa};Ts(yt.edge,Gr,ti,La),_r.edge=Nl(Gr,me,null,La),yt.edge=Nl(me,ti,null,La),yn(dt),yn(yt)}}function bs(me,De){var et=me.site,dt=et.x,yt=et.y,Tt=yt-De;if(!Tt)return dt;var tr=me.P;if(!tr)return-1/0;et=tr.site;var zt=et.x,_r=et.y,Gr=_r-De;if(!Gr)return zt;var Xr=zt-dt,wa=1/Tt-1/Gr,pa=Xr/Gr;return wa?(-pa+Math.sqrt(pa*pa-2*wa*(Xr*Xr/(-2*Gr)-_r+Gr/2+yt-Tt/2)))/wa+dt:(dt+zt)/2}function lo(me,De){var et=me.N;if(et)return bs(et,De);var dt=me.site;return dt.y===De?dt.x:1/0}function Zo(me){this.site=me,this.edges=[]}Zo.prototype.prepare=function(){for(var me=this.edges,De=me.length,et;De--;)et=me[De].edge,(!et.b||!et.a)&&me.splice(De,1);return me.sort(Hs),me.length};function ws(me){for(var De=me[0][0],et=me[1][0],dt=me[0][1],yt=me[1][1],Tt,tr,zt,_r,Gr=jo,Xr=Gr.length,wa,pa,Ja,ti,Sa,za;Xr--;)if(wa=Gr[Xr],!(!wa||!wa.prepare()))for(Ja=wa.edges,ti=Ja.length,pa=0;paYe||l(_r-tr)>Ye)&&(Ja.splice(pa,0,new Ls(Ks(wa.site,za,l(zt-De)Ye?{x:De,y:l(Tt-De)Ye?{x:l(tr-yt)Ye?{x:et,y:l(Tt-et)Ye?{x:l(tr-dt)=-Ae)){var pa=_r*_r+Gr*Gr,Ja=Xr*Xr+za*za,ti=(za*pa-Gr*Ja)/wa,Sa=(_r*Ja-Xr*pa)/wa,za=Sa+zt,Xa=_s.pop()||new il;Xa.arc=me,Xa.site=yt,Xa.x=ti+tr,Xa.y=za+Math.sqrt(ti*ti+Sa*Sa),Xa.cy=za,me.circle=Xa;for(var fi=null,ni=ss._;ni;)if(Xa.y0)){if(Sa/=Ja,Ja<0){if(Sa0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}if(Sa=et-zt,!(!Ja&&Sa<0)){if(Sa/=Ja,Ja<0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}else if(Ja>0){if(Sa0)){if(Sa/=ti,ti<0){if(Sa0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}if(Sa=dt-_r,!(!ti&&Sa<0)){if(Sa/=ti,ti<0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}else if(ti>0){if(Sa0&&(yt.a={x:zt+wa*Ja,y:_r+wa*ti}),pa<1&&(yt.b={x:zt+pa*Ja,y:_r+pa*ti}),yt}}}}}}function Ws(me){for(var De=ys,et=To(me[0][0],me[0][1],me[1][0],me[1][1]),dt=De.length,yt;dt--;)yt=De[dt],(!Ll(yt,me)||!et(yt)||l(yt.a.x-yt.b.x)=Tt)return;if(Xr>pa){if(!dt)dt={x:ti,y:tr};else if(dt.y>=zt)return;et={x:ti,y:zt}}else{if(!dt)dt={x:ti,y:zt};else if(dt.y1)if(Xr>pa){if(!dt)dt={x:(tr-Xa)/za,y:tr};else if(dt.y>=zt)return;et={x:(zt-Xa)/za,y:zt}}else{if(!dt)dt={x:(zt-Xa)/za,y:zt};else if(dt.y=Tt)return;et={x:Tt,y:za*Tt+Xa}}else{if(!dt)dt={x:Tt,y:za*Tt+Xa};else if(dt.x=Xr&&Xa.x<=pa&&Xa.y>=wa&&Xa.y<=Ja?[[Xr,Ja],[pa,Ja],[pa,wa],[Xr,wa]]:[];fi.point=_r[Sa]}),Gr}function zt(_r){return _r.map(function(Gr,Xr){return{x:Math.round(dt(Gr,Xr)/Ye)*Ye,y:Math.round(yt(Gr,Xr)/Ye)*Ye,i:Xr}})}return tr.links=function(_r){return du(zt(_r)).edges.filter(function(Gr){return Gr.l&&Gr.r}).map(function(Gr){return{source:_r[Gr.l.i],target:_r[Gr.r.i]}})},tr.triangles=function(_r){var Gr=[];return du(zt(_r)).cells.forEach(function(Xr,wa){for(var pa=Xr.site,Ja=Xr.edges.sort(Hs),ti=-1,Sa=Ja.length,za,Xa,fi=Ja[Sa-1].edge,ni=fi.l===pa?fi.r:fi.l;++tini&&(ni=Xr.x),Xr.y>La&&(La=Xr.y),Ja.push(Xr.x),ti.push(Xr.y);else for(Sa=0;Sani&&(ni=sn),an>La&&(La=an),Ja.push(sn),ti.push(an)}var dn=ni-Xa,In=La-fi;dn>In?La=fi+dn:ni=Xa+In;function Jn(no,Xo,cl,al,_l,mn,po,fs){if(!(isNaN(cl)||isNaN(al)))if(no.leaf){var ms=no.x,Tl=no.y;if(ms!=null)if(l(ms-cl)+l(Tl-al)<.01)ro(no,Xo,cl,al,_l,mn,po,fs);else{var Wl=no.point;no.x=no.y=no.point=null,ro(no,Wl,ms,Tl,_l,mn,po,fs),ro(no,Xo,cl,al,_l,mn,po,fs)}else no.x=cl,no.y=al,no.point=Xo}else ro(no,Xo,cl,al,_l,mn,po,fs)}function ro(no,Xo,cl,al,_l,mn,po,fs){var ms=(_l+po)*.5,Tl=(mn+fs)*.5,Wl=cl>=ms,Su=al>=Tl,Rl=Su<<1|Wl;no.leaf=!1,no=no.nodes[Rl]||(no.nodes[Rl]=uu()),Wl?_l=ms:po=ms,Su?mn=Tl:fs=Tl,Jn(no,Xo,cl,al,_l,mn,po,fs)}var $o=uu();if($o.add=function(no){Jn($o,no,+wa(no,++Sa),+pa(no,Sa),Xa,fi,ni,La)},$o.visit=function(no){Pl(no,$o,Xa,fi,ni,La)},$o.find=function(no){return ic($o,no[0],no[1],Xa,fi,ni,La)},Sa=-1,De==null){for(;++SaTt||pa>tr||Ja=sn,In=et>=an,Jn=In<<1|dn,ro=Jn+4;Jnet&&(Tt=De.slice(et,Tt),zt[tr]?zt[tr]+=Tt:zt[++tr]=Tt),(dt=dt[0])===(yt=yt[0])?zt[tr]?zt[tr]+=yt:zt[++tr]=yt:(zt[++tr]=null,_r.push({i:tr,x:vl(dt,yt)})),et=nc.lastIndex;return et=0&&!(dt=v.interpolators[et](me,De)););return dt}v.interpolators=[function(me,De){var et=typeof De;return(et==="string"?mr.has(De.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(De)?Ou:As:De instanceof wi?Ou:Array.isArray(De)?qu:et==="object"&&isNaN(De)?nl:vl)(me,De)}],v.interpolateArray=qu;function qu(me,De){var et=[],dt=[],yt=me.length,Tt=De.length,tr=Math.min(me.length,De.length),zt;for(zt=0;zt=0?me.slice(0,De):me,dt=De>=0?me.slice(De+1):"in";return et=xh.get(et)||fl,dt=us.get(dt)||F,bh(dt(et.apply(null,_.call(arguments,1))))};function bh(me){return function(De){return De<=0?0:De>=1?1:me(De)}}function Ps(me){return function(De){return 1-me(1-De)}}function to(me){return function(De){return .5*(De<.5?me(2*De):2-me(2-2*De))}}function Xc(me){return me*me}function Vu(me){return me*me*me}function ql(me){if(me<=0)return 0;if(me>=1)return 1;var De=me*me,et=De*me;return 4*(me<.5?et:3*(me-De)+et-.75)}function Mf(me){return function(De){return Math.pow(De,me)}}function Ac(me){return 1-Math.cos(me*st)}function nf(me){return Math.pow(2,10*(me-1))}function Ql(me){return 1-Math.sqrt(1-me*me)}function Jf(me,De){var et;return arguments.length<2&&(De=.45),arguments.length?et=De/We*Math.asin(1/me):(me=1,et=De/4),function(dt){return 1+me*Math.pow(2,-10*dt)*Math.sin((dt-et)*We/De)}}function Of(me){return me||(me=1.70158),function(De){return De*De*((me+1)*De-me)}}function of(me){return me<1/2.75?7.5625*me*me:me<2/2.75?7.5625*(me-=1.5/2.75)*me+.75:me<2.5/2.75?7.5625*(me-=2.25/2.75)*me+.9375:7.5625*(me-=2.625/2.75)*me+.984375}v.interpolateHcl=jc;function jc(me,De){me=v.hcl(me),De=v.hcl(De);var et=me.h,dt=me.c,yt=me.l,Tt=De.h-et,tr=De.c-dt,zt=De.l-yt;return isNaN(tr)&&(tr=0,dt=isNaN(dt)?De.c:dt),isNaN(Tt)?(Tt=0,et=isNaN(et)?De.h:et):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(_r){return ta(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}v.interpolateHsl=Bf;function Bf(me,De){me=v.hsl(me),De=v.hsl(De);var et=me.h,dt=me.s,yt=me.l,Tt=De.h-et,tr=De.s-dt,zt=De.l-yt;return isNaN(tr)&&(tr=0,dt=isNaN(dt)?De.s:dt),isNaN(Tt)?(Tt=0,et=isNaN(et)?De.h:et):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(_r){return Zt(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}v.interpolateLab=Nf;function Nf(me,De){me=v.lab(me),De=v.lab(De);var et=me.l,dt=me.a,yt=me.b,Tt=De.l-et,tr=De.a-dt,zt=De.b-yt;return function(_r){return pi(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}v.interpolateRound=Gu;function Gu(me,De){return De-=me,function(et){return Math.round(me+De*et)}}v.transform=function(me){var De=M.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(et){if(et!=null){De.setAttribute("transform",et);var dt=De.transform.baseVal.consolidate()}return new Ef(dt?dt.matrix:qc)})(me)};function Ef(me){var De=[me.a,me.b],et=[me.c,me.d],dt=Zc(De),yt=oc(De,et),Tt=Zc(eu(et,De,-yt))||0;De[0]*et[1]180?De+=360:De-me>180&&(me+=360),dt.push({i:et.push(Sc(et)+"rotate(",null,")")-2,x:vl(me,De)})):De&&et.push(Sc(et)+"rotate("+De+")")}function fh(me,De,et,dt){me!==De?dt.push({i:et.push(Sc(et)+"skewX(",null,")")-2,x:vl(me,De)}):De&&et.push(Sc(et)+"skewX("+De+")")}function Uf(me,De,et,dt){if(me[0]!==De[0]||me[1]!==De[1]){var yt=et.push(Sc(et)+"scale(",null,",",null,")");dt.push({i:yt-4,x:vl(me[0],De[0])},{i:yt-2,x:vl(me[1],De[1])})}else(De[0]!==1||De[1]!==1)&&et.push(Sc(et)+"scale("+De+")")}function Yc(me,De){var et=[],dt=[];return me=v.transform(me),De=v.transform(De),Zs(me.translate,De.translate,et,dt),kf(me.rotate,De.rotate,et,dt),fh(me.skew,De.skew,et,dt),Uf(me.scale,De.scale,et,dt),me=De=null,function(yt){for(var Tt=-1,tr=dt.length,zt;++Tt0?Tt=La:(et.c=null,et.t=NaN,et=null,De.end({type:"end",alpha:Tt=0})):La>0&&(De.start({type:"start",alpha:Tt=La}),et=wn(me.tick)),me):Tt},me.start=function(){var La,sn=Ja.length,an=ti.length,dn=dt[0],In=dt[1],Jn,ro;for(La=0;La=0;)Tt.push(Xr=Gr[_r]),Xr.parent=zt,Xr.depth=zt.depth+1;et&&(zt.value=0),zt.children=Gr}else et&&(zt.value=+et.call(dt,zt,zt.depth)||0),delete zt.children;return mc(yt,function(wa){var pa,Ja;me&&(pa=wa.children)&&pa.sort(me),et&&(Ja=wa.parent)&&(Ja.value+=wa.value)}),tr}return dt.sort=function(yt){return arguments.length?(me=yt,dt):me},dt.children=function(yt){return arguments.length?(De=yt,dt):De},dt.value=function(yt){return arguments.length?(et=yt,dt):et},dt.revalue=function(yt){return et&&(Ec(yt,function(Tt){Tt.children&&(Tt.value=0)}),mc(yt,function(Tt){var tr;Tt.children||(Tt.value=+et.call(dt,Tt,Tt.depth)||0),(tr=Tt.parent)&&(tr.value+=Tt.value)})),yt},dt};function Bu(me,De){return v.rebind(me,De,"sort","children","value"),me.nodes=me,me.links=Nu,me}function Ec(me,De){for(var et=[me];(me=et.pop())!=null;)if(De(me),(yt=me.children)&&(dt=yt.length))for(var dt,yt;--dt>=0;)et.push(yt[dt])}function mc(me,De){for(var et=[me],dt=[];(me=et.pop())!=null;)if(dt.push(me),(tr=me.children)&&(Tt=tr.length))for(var yt=-1,Tt,tr;++ytyt&&(yt=zt),dt.push(zt)}for(tr=0;trdt&&(et=De,dt=yt);return et}function hl(me){return me.reduce(uf,0)}function uf(me,De){return me+De[1]}v.layout.histogram=function(){var me=!0,De=Number,et=gf,dt=kc;function yt(Tt,pa){for(var zt=[],_r=Tt.map(De,this),Gr=et.call(this,_r,pa),Xr=dt.call(this,Gr,_r,pa),wa,pa=-1,Ja=_r.length,ti=Xr.length-1,Sa=me?1:1/Ja,za;++pa0)for(pa=-1;++pa=Gr[0]&&za<=Gr[1]&&(wa=zt[v.bisect(Xr,za,1,ti)-1],wa.y+=Sa,wa.push(Tt[pa]));return zt}return yt.value=function(Tt){return arguments.length?(De=Tt,yt):De},yt.range=function(Tt){return arguments.length?(et=Ir(Tt),yt):et},yt.bins=function(Tt){return arguments.length?(dt=typeof Tt=="number"?function(tr){return Hu(tr,Tt)}:Ir(Tt),yt):dt},yt.frequency=function(Tt){return arguments.length?(me=!!Tt,yt):me},yt};function kc(me,De){return Hu(me,Math.ceil(Math.log(De.length)/Math.LN2+1))}function Hu(me,De){for(var et=-1,dt=+me[0],yt=(me[1]-dt)/De,Tt=[];++et<=De;)Tt[et]=yt*et+dt;return Tt}function gf(me){return[v.min(me),v.max(me)]}v.layout.pack=function(){var me=v.layout.hierarchy().sort(Wu),De=0,et=[1,1],dt;function yt(Tt,tr){var zt=me.call(this,Tt,tr),_r=zt[0],Gr=et[0],Xr=et[1],wa=dt==null?Math.sqrt:typeof dt=="function"?dt:function(){return dt};if(_r.x=_r.y=0,mc(_r,function(Ja){Ja.r=+wa(Ja.value)}),mc(_r,Vf),De){var pa=De*(dt?1:Math.max(2*_r.r/Gr,2*_r.r/Xr))/2;mc(_r,function(Ja){Ja.r+=pa}),mc(_r,Vf),mc(_r,function(Ja){Ja.r-=pa})}return gc(_r,Gr/2,Xr/2,dt?1:1/Math.max(2*_r.r/Gr,2*_r.r/Xr)),zt}return yt.size=function(Tt){return arguments.length?(et=Tt,yt):et},yt.radius=function(Tt){return arguments.length?(dt=Tt==null||typeof Tt=="function"?Tt:+Tt,yt):dt},yt.padding=function(Tt){return arguments.length?(De=+Tt,yt):De},Bu(yt,me)};function Wu(me,De){return me.value-De.value}function Jc(me,De){var et=me._pack_next;me._pack_next=De,De._pack_prev=me,De._pack_next=et,et._pack_prev=De}function Lf(me,De){me._pack_next=De,De._pack_prev=me}function nu(me,De){var et=De.x-me.x,dt=De.y-me.y,yt=me.r+De.r;return .999*yt*yt>et*et+dt*dt}function Vf(me){if(!(De=me.children)||!(pa=De.length))return;var De,et=1/0,dt=-1/0,yt=1/0,Tt=-1/0,tr,zt,_r,Gr,Xr,wa,pa;function Ja(La){et=Math.min(La.x-La.r,et),dt=Math.max(La.x+La.r,dt),yt=Math.min(La.y-La.r,yt),Tt=Math.max(La.y+La.r,Tt)}if(De.forEach(Xu),tr=De[0],tr.x=-tr.r,tr.y=0,Ja(tr),pa>1&&(zt=De[1],zt.x=zt.r,zt.y=0,Ja(zt),pa>2))for(_r=De[2],Vl(tr,zt,_r),Ja(_r),Jc(tr,_r),tr._pack_prev=_r,Jc(_r,zt),zt=tr._pack_next,Gr=3;Grza.x&&(za=sn),sn.depth>Xa.depth&&(Xa=sn)});var fi=De(Sa,za)/2-Sa.x,ni=et[0]/(za.x+De(za,Sa)/2+fi),La=et[1]/(Xa.depth||1);Ec(Ja,function(sn){sn.x=(sn.x+fi)*ni,sn.y=sn.depth*La})}return pa}function Tt(Xr){for(var wa={A:null,children:[Xr]},pa=[wa],Ja;(Ja=pa.pop())!=null;)for(var ti=Ja.children,Sa,za=0,Xa=ti.length;za0&&(sc(Qt(Sa,Xr,pa),Xr,sn),Xa+=sn,fi+=sn),ni+=Sa.m,Xa+=Ja.m,La+=za.m,fi+=ti.m;Sa&&!$c(ti)&&(ti.t=Sa,ti.m+=ni-fi),Ja&&!Lc(za)&&(za.t=Ja,za.m+=Xa-La,pa=Xr)}return pa}function Gr(Xr){Xr.x*=et[0],Xr.y=Xr.depth*et[1]}return yt.separation=function(Xr){return arguments.length?(De=Xr,yt):De},yt.size=function(Xr){return arguments.length?(dt=(et=Xr)==null?Gr:null,yt):dt?null:et},yt.nodeSize=function(Xr){return arguments.length?(dt=(et=Xr)==null?null:Gr,yt):dt?et:null},Bu(yt,me)};function xu(me,De){return me.parent==De.parent?1:2}function Lc(me){var De=me.children;return De.length?De[0]:me.t}function $c(me){var De=me.children,et;return(et=De.length)?De[et-1]:me.t}function sc(me,De,et){var dt=et/(De.i-me.i);De.c-=dt,De.s+=et,me.c+=dt,De.z+=et,De.m+=et}function Pc(me){for(var De=0,et=0,dt=me.children,yt=dt.length,Tt;--yt>=0;)Tt=dt[yt],Tt.z+=De,Tt.m+=De,De+=Tt.s+(et+=Tt.c)}function Qt(me,De,et){return me.a.parent===De.parent?me.a:et}v.layout.cluster=function(){var me=v.layout.hierarchy().sort(null).value(null),De=xu,et=[1,1],dt=!1;function yt(Tt,tr){var zt=me.call(this,Tt,tr),_r=zt[0],Gr,Xr=0;mc(_r,function(Sa){var za=Sa.children;za&&za.length?(Sa.x=aa(za),Sa.y=xr(za)):(Sa.x=Gr?Xr+=De(Sa,Gr):0,Sa.y=0,Gr=Sa)});var wa=$r(_r),pa=ka(_r),Ja=wa.x-De(wa,pa)/2,ti=pa.x+De(pa,wa)/2;return mc(_r,dt?function(Sa){Sa.x=(Sa.x-_r.x)*et[0],Sa.y=(_r.y-Sa.y)*et[1]}:function(Sa){Sa.x=(Sa.x-Ja)/(ti-Ja)*et[0],Sa.y=(1-(_r.y?Sa.y/_r.y:1))*et[1]}),zt}return yt.separation=function(Tt){return arguments.length?(De=Tt,yt):De},yt.size=function(Tt){return arguments.length?(dt=(et=Tt)==null,yt):dt?null:et},yt.nodeSize=function(Tt){return arguments.length?(dt=(et=Tt)!=null,yt):dt?et:null},Bu(yt,me)};function xr(me){return 1+v.max(me,function(De){return De.y})}function aa(me){return me.reduce(function(De,et){return De+et.x},0)/me.length}function $r(me){var De=me.children;return De&&De.length?$r(De[0]):me}function ka(me){var De=me.children,et;return De&&(et=De.length)?ka(De[et-1]):me}v.layout.treemap=function(){var me=v.layout.hierarchy(),De=Math.round,et=[1,1],dt=null,yt=li,Tt=!1,tr,zt="squarify",_r=.5*(1+Math.sqrt(5));function Gr(Sa,za){for(var Xa=-1,fi=Sa.length,ni,La;++Xa0;)fi.push(La=ni[In-1]),fi.area+=La.area,zt!=="squarify"||(an=pa(fi,dn))<=sn?(ni.pop(),sn=an):(fi.area-=fi.pop().area,Ja(fi,dn,Xa,!1),dn=Math.min(Xa.dx,Xa.dy),fi.length=fi.area=0,sn=1/0);fi.length&&(Ja(fi,dn,Xa,!0),fi.length=fi.area=0),za.forEach(Xr)}}function wa(Sa){var za=Sa.children;if(za&&za.length){var Xa=yt(Sa),fi=za.slice(),ni,La=[];for(Gr(fi,Xa.dx*Xa.dy/Sa.value),La.area=0;ni=fi.pop();)La.push(ni),La.area+=ni.area,ni.z!=null&&(Ja(La,ni.z?Xa.dx:Xa.dy,Xa,!fi.length),La.length=La.area=0);za.forEach(wa)}}function pa(Sa,za){for(var Xa=Sa.area,fi,ni=0,La=1/0,sn=-1,an=Sa.length;++snni&&(ni=fi));return Xa*=Xa,za*=za,Xa?Math.max(za*ni*_r/Xa,Xa/(za*La*_r)):1/0}function Ja(Sa,za,Xa,fi){var ni=-1,La=Sa.length,sn=Xa.x,an=Xa.y,dn=za?De(Sa.area/za):0,In;if(za==Xa.dx){for((fi||dn>Xa.dy)&&(dn=Xa.dy);++niXa.dx)&&(dn=Xa.dx);++ni1);return me+De*dt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var me=v.random.normal.apply(v,arguments);return function(){return Math.exp(me())}},bates:function(me){var De=v.random.irwinHall(me);return function(){return De()/me}},irwinHall:function(me){return function(){for(var De=0,et=0;et2?mi:pn,Gr=dt?Cu:$f;return yt=_r(me,De,Gr,et),Tt=_r(De,me,Gr,jl),zt}function zt(_r){return yt(_r)}return zt.invert=function(_r){return Tt(_r)},zt.domain=function(_r){return arguments.length?(me=_r.map(Number),tr()):me},zt.range=function(_r){return arguments.length?(De=_r,tr()):De},zt.rangeRound=function(_r){return zt.range(_r).interpolate(Gu)},zt.clamp=function(_r){return arguments.length?(dt=_r,tr()):dt},zt.interpolate=function(_r){return arguments.length?(et=_r,tr()):et},zt.ticks=function(_r){return co(me,_r)},zt.tickFormat=function(_r,Gr){return d3_scale_linearTickFormat(me,_r,Gr)},zt.nice=function(_r){return io(me,_r),tr()},zt.copy=function(){return Sn(me,De,et,dt)},tr()}function Qn(me,De){return v.rebind(me,De,"range","rangeRound","interpolate","clamp")}function io(me,De){return Pi(me,Di(eo(me,De)[2])),Pi(me,Di(eo(me,De)[2])),me}function eo(me,De){De==null&&(De=10);var et=Hi(me),dt=et[1]-et[0],yt=Math.pow(10,Math.floor(Math.log(dt/De)/Math.LN10)),Tt=De/dt*yt;return Tt<=.15?yt*=10:Tt<=.35?yt*=5:Tt<=.75&&(yt*=2),et[0]=Math.ceil(et[0]/yt)*yt,et[1]=Math.floor(et[1]/yt)*yt+yt*.5,et[2]=yt,et}function co(me,De){return v.range.apply(v,eo(me,De))}var Tn={s:1,g:1,p:1,r:1,e:1};function un(me){return-Math.floor(Math.log(me)/Math.LN10+.01)}function yo(me,De){var et=un(De[2]);return me in Tn?Math.abs(et-un(Math.max(l(De[0]),l(De[1]))))+ +(me!=="e"):et-(me==="%")*2}v.scale.log=function(){return Qo(v.scale.linear().domain([0,1]),10,!0,[1,10])};function Qo(me,De,et,dt){function yt(zt){return(et?Math.log(zt<0?0:zt):-Math.log(zt>0?0:-zt))/Math.log(De)}function Tt(zt){return et?Math.pow(De,zt):-Math.pow(De,-zt)}function tr(zt){return me(yt(zt))}return tr.invert=function(zt){return Tt(me.invert(zt))},tr.domain=function(zt){return arguments.length?(et=zt[0]>=0,me.domain((dt=zt.map(Number)).map(yt)),tr):dt},tr.base=function(zt){return arguments.length?(De=+zt,me.domain(dt.map(yt)),tr):De},tr.nice=function(){var zt=Pi(dt.map(yt),et?Math:ks);return me.domain(zt),dt=zt.map(Tt),tr},tr.ticks=function(){var zt=Hi(dt),_r=[],Gr=zt[0],Xr=zt[1],wa=Math.floor(yt(Gr)),pa=Math.ceil(yt(Xr)),Ja=De%1?2:De;if(isFinite(pa-wa)){if(et){for(;wa0;ti--)_r.push(Tt(wa)*ti);for(wa=0;_r[wa]Xr;pa--);_r=_r.slice(wa,pa)}return _r},tr.copy=function(){return Qo(me.copy(),De,et,dt)},Qn(tr,me)}var ks={floor:function(me){return-Math.ceil(-me)},ceil:function(me){return-Math.floor(-me)}};v.scale.pow=function(){return rl(v.scale.linear(),1,[0,1])};function rl(me,De,et){var dt=Ns(De),yt=Ns(1/De);function Tt(tr){return me(dt(tr))}return Tt.invert=function(tr){return yt(me.invert(tr))},Tt.domain=function(tr){return arguments.length?(me.domain((et=tr.map(Number)).map(dt)),Tt):et},Tt.ticks=function(tr){return co(et,tr)},Tt.tickFormat=function(tr,zt){return d3_scale_linearTickFormat(et,tr,zt)},Tt.nice=function(tr){return Tt.domain(io(et,tr))},Tt.exponent=function(tr){return arguments.length?(dt=Ns(De=tr),yt=Ns(1/De),me.domain(et.map(dt)),Tt):De},Tt.copy=function(){return rl(me.copy(),De,et)},Qn(Tt,me)}function Ns(me){return function(De){return De<0?-Math.pow(-De,me):Math.pow(De,me)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return el([],{t:"range",a:[[]]})};function el(me,De){var et,dt,yt;function Tt(zt){return dt[((et.get(zt)||(De.t==="range"?et.set(zt,me.push(zt)):NaN))-1)%dt.length]}function tr(zt,_r){return v.range(me.length).map(function(Gr){return zt+_r*Gr})}return Tt.domain=function(zt){if(!arguments.length)return me;me=[],et=new A;for(var _r=-1,Gr=zt.length,Xr;++_r0?et[Tt-1]:me[0],Ttpa?0:1;if(Xr=Ke)return _r(Xr,ti)+(Gr?_r(Gr,1-ti):"")+"Z";var Sa,za,Xa,fi,ni=0,La=0,sn,an,dn,In,Jn,ro,$o,no,Xo=[];if((fi=(+tr.apply(this,arguments)||0)/2)&&(Xa=dt===Iu?Math.sqrt(Gr*Gr+Xr*Xr):+dt.apply(this,arguments),ti||(La*=-1),Xr&&(La=cr(Xa/Xr*Math.sin(fi))),Gr&&(ni=cr(Xa/Gr*Math.sin(fi)))),Xr){sn=Xr*Math.cos(wa+La),an=Xr*Math.sin(wa+La),dn=Xr*Math.cos(pa-La),In=Xr*Math.sin(pa-La);var cl=Math.abs(pa-wa-2*La)<=Le?0:1;if(La&&yc(sn,an,dn,In)===ti^cl){var al=(wa+pa)/2;sn=Xr*Math.cos(al),an=Xr*Math.sin(al),dn=In=null}}else sn=an=0;if(Gr){Jn=Gr*Math.cos(pa-ni),ro=Gr*Math.sin(pa-ni),$o=Gr*Math.cos(wa+ni),no=Gr*Math.sin(wa+ni);var _l=Math.abs(wa-pa+2*ni)<=Le?0:1;if(ni&&yc(Jn,ro,$o,no)===1-ti^_l){var mn=(wa+pa)/2;Jn=Gr*Math.cos(mn),ro=Gr*Math.sin(mn),$o=no=null}}else Jn=ro=0;if(Ja>Ye&&(Sa=Math.min(Math.abs(Xr-Gr)/2,+et.apply(this,arguments)))>.001){za=Gr0?0:1}function fo(me,De,et,dt,yt){var Tt=me[0]-De[0],tr=me[1]-De[1],zt=(yt?dt:-dt)/Math.sqrt(Tt*Tt+tr*tr),_r=zt*tr,Gr=-zt*Tt,Xr=me[0]+_r,wa=me[1]+Gr,pa=De[0]+_r,Ja=De[1]+Gr,ti=(Xr+pa)/2,Sa=(wa+Ja)/2,za=pa-Xr,Xa=Ja-wa,fi=za*za+Xa*Xa,ni=et-dt,La=Xr*Ja-pa*wa,sn=(Xa<0?-1:1)*Math.sqrt(Math.max(0,ni*ni*fi-La*La)),an=(La*Xa-za*sn)/fi,dn=(-La*za-Xa*sn)/fi,In=(La*Xa+za*sn)/fi,Jn=(-La*za+Xa*sn)/fi,ro=an-ti,$o=dn-Sa,no=In-ti,Xo=Jn-Sa;return ro*ro+$o*$o>no*no+Xo*Xo&&(an=In,dn=Jn),[[an-_r,dn-Gr],[an*et/ni,dn*et/ni]]}function Fo(){return!0}function Dc(me){var De=Co,et=bo,dt=Fo,yt=Yu,Tt=yt.key,tr=.7;function zt(_r){var Gr=[],Xr=[],wa=-1,pa=_r.length,Ja,ti=Ir(De),Sa=Ir(et);function za(){Gr.push("M",yt(me(Xr),tr))}for(;++wa1?me.join("L"):me+"Z"}function Oe(me){return me.join("L")+"Z"}function I(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De1&&yt.push("H",dt[0]),yt.join("")}function ie(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De1){zt=De[1],Tt=me[_r],_r++,dt+="C"+(yt[0]+tr[0])+","+(yt[1]+tr[1])+","+(Tt[0]-zt[0])+","+(Tt[1]-zt[1])+","+Tt[0]+","+Tt[1];for(var Gr=2;Gr9&&(Tt=et*3/Math.sqrt(Tt),tr[zt]=Tt*dt,tr[zt+1]=Tt*yt));for(zt=-1;++zt<=_r;)Tt=(me[Math.min(_r,zt+1)][0]-me[Math.max(0,zt-1)][0])/(6*(1+tr[zt]*tr[zt])),De.push([Tt||0,tr[zt]*Tt||0]);return De}function ur(me){return me.length<3?Yu(me):me[0]+wt(me,Dt(me))}v.svg.line.radial=function(){var me=Dc(yr);return me.radius=me.x,delete me.x,me.angle=me.y,delete me.y,me};function yr(me){for(var De,et=-1,dt=me.length,yt,Tt;++etLe)+",1 "+wa}function Gr(Xr,wa,pa,Ja){return"Q 0,0 "+Ja}return Tt.radius=function(Xr){return arguments.length?(et=Ir(Xr),Tt):et},Tt.source=function(Xr){return arguments.length?(me=Ir(Xr),Tt):me},Tt.target=function(Xr){return arguments.length?(De=Ir(Xr),Tt):De},Tt.startAngle=function(Xr){return arguments.length?(dt=Ir(Xr),Tt):dt},Tt.endAngle=function(Xr){return arguments.length?(yt=Ir(Xr),Tt):yt},Tt};function ha(me){return me.radius}v.svg.diagonal=function(){var me=jr,De=Qr,et=Aa;function dt(yt,Tt){var tr=me.call(this,yt,Tt),zt=De.call(this,yt,Tt),_r=(tr.y+zt.y)/2,Gr=[tr,{x:tr.x,y:_r},{x:zt.x,y:_r},zt];return Gr=Gr.map(et),"M"+Gr[0]+"C"+Gr[1]+" "+Gr[2]+" "+Gr[3]}return dt.source=function(yt){return arguments.length?(me=Ir(yt),dt):me},dt.target=function(yt){return arguments.length?(De=Ir(yt),dt):De},dt.projection=function(yt){return arguments.length?(et=yt,dt):et},dt};function Aa(me){return[me.x,me.y]}v.svg.diagonal.radial=function(){var me=v.svg.diagonal(),De=Aa,et=me.projection;return me.projection=function(dt){return arguments.length?et(Da(De=dt)):De},me};function Da(me){return function(){var De=me.apply(this,arguments),et=De[0],dt=De[1]-st;return[et*Math.cos(dt),et*Math.sin(dt)]}}v.svg.symbol=function(){var me=Vi,De=ci;function et(dt,yt){return(on.get(me.call(this,dt,yt))||ji)(De.call(this,dt,yt))}return et.type=function(dt){return arguments.length?(me=Ir(dt),et):me},et.size=function(dt){return arguments.length?(De=Ir(dt),et):De},et};function ci(){return 64}function Vi(){return"circle"}function ji(me){var De=Math.sqrt(me/Le);return"M0,"+De+"A"+De+","+De+" 0 1,1 0,"+-De+"A"+De+","+De+" 0 1,1 0,"+De+"Z"}var on=v.map({circle:ji,cross:function(me){var De=Math.sqrt(me/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(me){var De=Math.sqrt(me/(2*Kn)),et=De*Kn;return"M0,"+-De+"L"+et+",0 0,"+De+" "+-et+",0Z"},square:function(me){var De=Math.sqrt(me)/2;return"M"+-De+","+-De+"L"+De+","+-De+" "+De+","+De+" "+-De+","+De+"Z"},"triangle-down":function(me){var De=Math.sqrt(me/An),et=De*An/2;return"M0,"+et+"L"+De+","+-et+" "+-De+","+-et+"Z"},"triangle-up":function(me){var De=Math.sqrt(me/An),et=De*An/2;return"M0,"+-et+"L"+De+","+et+" "+-De+","+et+"Z"}});v.svg.symbolTypes=on.keys();var An=Math.sqrt(3),Kn=Math.tan(30*ot);ae.transition=function(me){for(var De=ds||++Yo,et=ts(me),dt=[],yt,Tt,tr=ul||{time:Date.now(),ease:ql,delay:0,duration:250},zt=-1,_r=this.length;++zt<_r;){dt.push(yt=[]);for(var Gr=this[zt],Xr=-1,wa=Gr.length;++Xr0;)wa[--fi].call(me,Xa);if(za>=1)return tr.event&&tr.event.end.call(me,me.__data__,De),--Tt.count?delete Tt[dt]:delete me[et],1}tr||(zt=yt.time,_r=wn(pa,0,zt),tr=Tt[dt]={tween:new A,time:zt,timer:_r,delay:yt.delay,duration:yt.duration,ease:yt.ease,index:De},yt=null,++Tt.count)}v.svg.axis=function(){var me=v.scale.linear(),De=tu,et=6,dt=6,yt=3,Tt=[10],tr=null,zt;function _r(Gr){Gr.each(function(){var Xr=v.select(this),wa=this.__chart__||me,pa=this.__chart__=me.copy(),Ja=tr??(pa.ticks?pa.ticks.apply(pa,Tt):pa.domain()),ti=zt??(pa.tickFormat?pa.tickFormat.apply(pa,Tt):F),Sa=Xr.selectAll(".tick").data(Ja,pa),za=Sa.enter().insert("g",".domain").attr("class","tick").style("opacity",Ye),Xa=v.transition(Sa.exit()).style("opacity",Ye).remove(),fi=v.transition(Sa.order()).style("opacity",1),ni=Math.max(et,0)+yt,La,sn=Qi(pa),an=Xr.selectAll(".domain").data([0]),dn=(an.enter().append("path").attr("class","domain"),v.transition(an));za.append("line"),za.append("text");var In=za.select("line"),Jn=fi.select("line"),ro=Sa.select("text").text(ti),$o=za.select("text"),no=fi.select("text"),Xo=De==="top"||De==="left"?-1:1,cl,al,_l,mn;if(De==="bottom"||De==="top"?(La=vu,cl="x",_l="y",al="x2",mn="y2",ro.attr("dy",Xo<0?"0em":".71em").style("text-anchor","middle"),dn.attr("d","M"+sn[0]+","+Xo*dt+"V0H"+sn[1]+"V"+Xo*dt)):(La=wl,cl="y",_l="x",al="y2",mn="x2",ro.attr("dy",".32em").style("text-anchor",Xo<0?"end":"start"),dn.attr("d","M"+Xo*dt+","+sn[0]+"H0V"+sn[1]+"H"+Xo*dt)),In.attr(mn,Xo*et),$o.attr(_l,Xo*ni),Jn.attr(al,0).attr(mn,Xo*et),no.attr(cl,0).attr(_l,Xo*ni),pa.rangeBand){var po=pa,fs=po.rangeBand()/2;wa=pa=function(ms){return po(ms)+fs}}else wa.rangeBand?wa=pa:Xa.call(La,pa,wa);za.call(La,wa,pa),fi.call(La,pa,pa)})}return _r.scale=function(Gr){return arguments.length?(me=Gr,_r):me},_r.orient=function(Gr){return arguments.length?(De=Gr in Ru?Gr+"":tu,_r):De},_r.ticks=function(){return arguments.length?(Tt=S(arguments),_r):Tt},_r.tickValues=function(Gr){return arguments.length?(tr=Gr,_r):tr},_r.tickFormat=function(Gr){return arguments.length?(zt=Gr,_r):zt},_r.tickSize=function(Gr){var Xr=arguments.length;return Xr?(et=+Gr,dt=+arguments[Xr-1],_r):et},_r.innerTickSize=function(Gr){return arguments.length?(et=+Gr,_r):et},_r.outerTickSize=function(Gr){return arguments.length?(dt=+Gr,_r):dt},_r.tickPadding=function(Gr){return arguments.length?(yt=+Gr,_r):yt},_r.tickSubdivide=function(){return arguments.length&&_r},_r};var tu="bottom",Ru={top:1,right:1,bottom:1,left:1};function vu(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate("+(isFinite(yt)?yt:et(dt))+",0)"})}function wl(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate(0,"+(isFinite(yt)?yt:et(dt))+")"})}v.svg.brush=function(){var me=ce(Xr,"brushstart","brush","brushend"),De=null,et=null,dt=[0,0],yt=[0,0],Tt,tr,zt=!0,_r=!0,Gr=uc[0];function Xr(Sa){Sa.each(function(){var za=v.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ti).on("touchstart.brush",ti),Xa=za.selectAll(".background").data([0]);Xa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),za.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var fi=za.selectAll(".resize").data(Gr,F);fi.exit().remove(),fi.enter().append("g").attr("class",function(an){return"resize "+an}).style("cursor",function(an){return fu[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"),fi.style("display",Xr.empty()?"none":null);var ni=v.transition(za),La=v.transition(Xa),sn;De&&(sn=Qi(De),La.attr("x",sn[0]).attr("width",sn[1]-sn[0]),pa(ni)),et&&(sn=Qi(et),La.attr("y",sn[0]).attr("height",sn[1]-sn[0]),Ja(ni)),wa(ni)})}Xr.event=function(Sa){Sa.each(function(){var za=me.of(this,arguments),Xa={x:dt,y:yt,i:Tt,j:tr},fi=this.__chart__||Xa;this.__chart__=Xa,ds?v.select(this).transition().each("start.brush",function(){Tt=fi.i,tr=fi.j,dt=fi.x,yt=fi.y,za({type:"brushstart"})}).tween("brush:brush",function(){var ni=qu(dt,Xa.x),La=qu(yt,Xa.y);return Tt=tr=null,function(sn){dt=Xa.x=ni(sn),yt=Xa.y=La(sn),za({type:"brush",mode:"resize"})}}).each("end.brush",function(){Tt=Xa.i,tr=Xa.j,za({type:"brush",mode:"resize"}),za({type:"brushend"})}):(za({type:"brushstart"}),za({type:"brush",mode:"resize"}),za({type:"brushend"}))})};function wa(Sa){Sa.selectAll(".resize").attr("transform",function(za){return"translate("+dt[+/e$/.test(za)]+","+yt[+/^s/.test(za)]+")"})}function pa(Sa){Sa.select(".extent").attr("x",dt[0]),Sa.selectAll(".extent,.n>rect,.s>rect").attr("width",dt[1]-dt[0])}function Ja(Sa){Sa.select(".extent").attr("y",yt[0]),Sa.selectAll(".extent,.e>rect,.w>rect").attr("height",yt[1]-yt[0])}function ti(){var Sa=this,za=v.select(v.event.target),Xa=me.of(Sa,arguments),fi=v.select(Sa),ni=za.datum(),La=!/^(n|s)$/.test(ni)&&De,sn=!/^(e|w)$/.test(ni)&&et,an=za.classed("extent"),dn=kr(Sa),In,Jn=v.mouse(Sa),ro,$o=v.select(t(Sa)).on("keydown.brush",cl).on("keyup.brush",al);if(v.event.changedTouches?$o.on("touchmove.brush",_l).on("touchend.brush",po):$o.on("mousemove.brush",_l).on("mouseup.brush",po),fi.interrupt().selectAll("*").interrupt(),an)Jn[0]=dt[0]-Jn[0],Jn[1]=yt[0]-Jn[1];else if(ni){var no=+/w$/.test(ni),Xo=+/^n/.test(ni);ro=[dt[1-no]-Jn[0],yt[1-Xo]-Jn[1]],Jn[0]=dt[no],Jn[1]=yt[Xo]}else v.event.altKey&&(In=Jn.slice());fi.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",za.style("cursor")),Xa({type:"brushstart"}),_l();function cl(){v.event.keyCode==32&&(an||(In=null,Jn[0]-=dt[1],Jn[1]-=yt[1],an=2),$())}function al(){v.event.keyCode==32&&an==2&&(Jn[0]+=dt[1],Jn[1]+=yt[1],an=0,$())}function _l(){var fs=v.mouse(Sa),ms=!1;ro&&(fs[0]+=ro[0],fs[1]+=ro[1]),an||(v.event.altKey?(In||(In=[(dt[0]+dt[1])/2,(yt[0]+yt[1])/2]),Jn[0]=dt[+(fs[0]0))return Vt;do Vt.push(Ar=new Date(+St)),Ce(St,Bt),ne(St);while(Ar=kt)for(;ne(kt),!St(kt);)kt.setTime(kt-1)},function(kt,Bt){if(kt>=kt)if(Bt<0)for(;++Bt<=0;)for(;Ce(kt,-1),!St(kt););else for(;--Bt>=0;)for(;Ce(kt,1),!St(kt););})},Ze&&(Je.count=function(St,kt){return _.setTime(+St),S.setTime(+kt),ne(_),ne(S),Math.floor(Ze(_,S))},Je.every=function(St){return St=Math.floor(St),!isFinite(St)||!(St>0)?null:St>1?Je.filter(rt?function(kt){return rt(kt)%St===0}:function(kt){return Je.count(0,kt)%St===0}):Je}),Je}var e=M(function(){},function(ne,Ce){ne.setTime(+ne+Ce)},function(ne,Ce){return Ce-ne});e.every=function(ne){return ne=Math.floor(ne),!isFinite(ne)||!(ne>0)?null:ne>1?M(function(Ce){Ce.setTime(Math.floor(Ce/ne)*ne)},function(Ce,Ze){Ce.setTime(+Ce+Ze*ne)},function(Ce,Ze){return(Ze-Ce)/ne}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=M(function(ne){ne.setTime(ne-ne.getMilliseconds())},function(ne,Ce){ne.setTime(+ne+Ce*r)},function(ne,Ce){return(Ce-ne)/r},function(ne){return ne.getUTCSeconds()}),h=s.range,f=M(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*r)},function(ne,Ce){ne.setTime(+ne+Ce*o)},function(ne,Ce){return(Ce-ne)/o},function(ne){return ne.getMinutes()}),m=f.range,c=M(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*r-ne.getMinutes()*o)},function(ne,Ce){ne.setTime(+ne+Ce*a)},function(ne,Ce){return(Ce-ne)/a},function(ne){return ne.getHours()}),T=c.range,l=M(function(ne){ne.setHours(0,0,0,0)},function(ne,Ce){ne.setDate(ne.getDate()+Ce)},function(ne,Ce){return(Ce-ne-(Ce.getTimezoneOffset()-ne.getTimezoneOffset())*o)/i},function(ne){return ne.getDate()-1}),x=l.range;function w(ne){return M(function(Ce){Ce.setDate(Ce.getDate()-(Ce.getDay()+7-ne)%7),Ce.setHours(0,0,0,0)},function(Ce,Ze){Ce.setDate(Ce.getDate()+Ze*7)},function(Ce,Ze){return(Ze-Ce-(Ze.getTimezoneOffset()-Ce.getTimezoneOffset())*o)/n})}var A=w(0),E=w(1),p=w(2),b=w(3),d=w(4),u=w(5),g=w(6),y=A.range,D=E.range,P=p.range,z=b.range,F=d.range,N=u.range,O=g.range,L=M(function(ne){ne.setDate(1),ne.setHours(0,0,0,0)},function(ne,Ce){ne.setMonth(ne.getMonth()+Ce)},function(ne,Ce){return Ce.getMonth()-ne.getMonth()+(Ce.getFullYear()-ne.getFullYear())*12},function(ne){return ne.getMonth()}),U=L.range,B=M(function(ne){ne.setMonth(0,1),ne.setHours(0,0,0,0)},function(ne,Ce){ne.setFullYear(ne.getFullYear()+Ce)},function(ne,Ce){return Ce.getFullYear()-ne.getFullYear()},function(ne){return ne.getFullYear()});B.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:M(function(Ce){Ce.setFullYear(Math.floor(Ce.getFullYear()/ne)*ne),Ce.setMonth(0,1),Ce.setHours(0,0,0,0)},function(Ce,Ze){Ce.setFullYear(Ce.getFullYear()+Ze*ne)})};var W=B.range,$=M(function(ne){ne.setUTCSeconds(0,0)},function(ne,Ce){ne.setTime(+ne+Ce*o)},function(ne,Ce){return(Ce-ne)/o},function(ne){return ne.getUTCMinutes()}),ue=$.range,ce=M(function(ne){ne.setUTCMinutes(0,0,0)},function(ne,Ce){ne.setTime(+ne+Ce*a)},function(ne,Ce){return(Ce-ne)/a},function(ne){return ne.getUTCHours()}),de=ce.range,Y=M(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCDate(ne.getUTCDate()+Ce)},function(ne,Ce){return(Ce-ne)/i},function(ne){return ne.getUTCDate()-1}),X=Y.range;function Q(ne){return M(function(Ce){Ce.setUTCDate(Ce.getUTCDate()-(Ce.getUTCDay()+7-ne)%7),Ce.setUTCHours(0,0,0,0)},function(Ce,Ze){Ce.setUTCDate(Ce.getUTCDate()+Ze*7)},function(Ce,Ze){return(Ze-Ce)/n})}var V=Q(0),le=Q(1),ae=Q(2),j=Q(3),ee=Q(4),te=Q(5),pe=Q(6),we=V.range,Se=le.range,Re=ae.range,Pe=j.range,je=ee.range,at=te.range,nt=pe.range,tt=M(function(ne){ne.setUTCDate(1),ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCMonth(ne.getUTCMonth()+Ce)},function(ne,Ce){return Ce.getUTCMonth()-ne.getUTCMonth()+(Ce.getUTCFullYear()-ne.getUTCFullYear())*12},function(ne){return ne.getUTCMonth()}),Ve=tt.range,he=M(function(ne){ne.setUTCMonth(0,1),ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCFullYear(ne.getUTCFullYear()+Ce)},function(ne,Ce){return Ce.getUTCFullYear()-ne.getUTCFullYear()},function(ne){return ne.getUTCFullYear()});he.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:M(function(Ce){Ce.setUTCFullYear(Math.floor(Ce.getUTCFullYear()/ne)*ne),Ce.setUTCMonth(0,1),Ce.setUTCHours(0,0,0,0)},function(Ce,Ze){Ce.setUTCFullYear(Ce.getUTCFullYear()+Ze*ne)})};var se=he.range;v.timeDay=l,v.timeDays=x,v.timeFriday=u,v.timeFridays=N,v.timeHour=c,v.timeHours=T,v.timeInterval=M,v.timeMillisecond=e,v.timeMilliseconds=t,v.timeMinute=f,v.timeMinutes=m,v.timeMonday=E,v.timeMondays=D,v.timeMonth=L,v.timeMonths=U,v.timeSaturday=g,v.timeSaturdays=O,v.timeSecond=s,v.timeSeconds=h,v.timeSunday=A,v.timeSundays=y,v.timeThursday=d,v.timeThursdays=F,v.timeTuesday=p,v.timeTuesdays=P,v.timeWednesday=b,v.timeWednesdays=z,v.timeWeek=A,v.timeWeeks=y,v.timeYear=B,v.timeYears=W,v.utcDay=Y,v.utcDays=X,v.utcFriday=te,v.utcFridays=at,v.utcHour=ce,v.utcHours=de,v.utcMillisecond=e,v.utcMilliseconds=t,v.utcMinute=$,v.utcMinutes=ue,v.utcMonday=le,v.utcMondays=Se,v.utcMonth=tt,v.utcMonths=Ve,v.utcSaturday=pe,v.utcSaturdays=nt,v.utcSecond=s,v.utcSeconds=h,v.utcSunday=V,v.utcSundays=we,v.utcThursday=ee,v.utcThursdays=je,v.utcTuesday=ae,v.utcTuesdays=Re,v.utcWednesday=j,v.utcWednesdays=Pe,v.utcWeek=V,v.utcWeeks=we,v.utcYear=he,v.utcYears=se,Object.defineProperty(v,"__esModule",{value:!0})})}}),Zv=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,dd()):(v=v||self,_(v.d3=v.d3||{},v.d3))})(Z,function(v,_){"use strict";function S(Fe){if(0<=Fe.y&&Fe.y<100){var Ye=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return Ye.setFullYear(Fe.y),Ye}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function M(Fe){if(0<=Fe.y&&Fe.y<100){var Ye=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return Ye.setUTCFullYear(Fe.y),Ye}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function e(Fe,Ye,Ae){return{y:Fe,m:Ye,d:Ae,H:0,M:0,S:0,L:0}}function t(Fe){var Ye=Fe.dateTime,Ae=Fe.date,Le=Fe.time,We=Fe.periods,Ke=Fe.days,st=Fe.shortDays,ot=Fe.months,Ut=Fe.shortMonths,Ct=h(We),Pt=f(We),jt=h(Ke),cr=f(Ke),or=h(st),nr=f(st),Pr=h(ot),_a=f(ot),Fa=h(Ut),Ra=f(Ut),qa={a:$a,A:Za,b:ri,B:pi,c:null,d:L,e:L,f:ue,H:U,I:B,j:W,L:$,m:ce,M:de,p:Ia,q:rn,Q:kt,s:Bt,S:Y,u:X,U:Q,V,w:le,W:ae,x:null,X:null,y:j,Y:ee,Z:te,"%":St},Wa={a:tn,A:cn,b:xt,B:ut,c:null,d:pe,e:pe,f:je,H:we,I:Se,j:Re,L:Pe,m:at,M:nt,p:Or,q:Cr,Q:kt,s:Bt,S:tt,u:Ve,U:he,V:se,w:ne,W:Ce,x:null,X:null,y:Ze,Y:rt,Z:Je,"%":St},Ca={a:Zt,A:Jt,b:Fr,B:ta,c:ra,d,e:d,f:z,H:g,I:g,j:u,L:P,m:b,M:y,p:Rt,q:p,Q:N,s:O,S:D,u:c,U:T,V:l,w:m,W:x,x:ca,X:Ba,y:A,Y:w,Z:E,"%":F};qa.x=hi(Ae,qa),qa.X=hi(Le,qa),qa.c=hi(Ye,qa),Wa.x=hi(Ae,Wa),Wa.X=hi(Le,Wa),Wa.c=hi(Ye,Wa);function hi(wr,Rr){return function(Nr){var Hr=[],gt=-1,Kt=0,mr=wr.length,Ir,va,Pa;for(Nr instanceof Date||(Nr=new Date(+Nr));++gt53)return null;"w"in Hr||(Hr.w=1),"Z"in Hr?(Kt=M(e(Hr.y,0,1)),mr=Kt.getUTCDay(),Kt=mr>4||mr===0?_.utcMonday.ceil(Kt):_.utcMonday(Kt),Kt=_.utcDay.offset(Kt,(Hr.V-1)*7),Hr.y=Kt.getUTCFullYear(),Hr.m=Kt.getUTCMonth(),Hr.d=Kt.getUTCDate()+(Hr.w+6)%7):(Kt=S(e(Hr.y,0,1)),mr=Kt.getDay(),Kt=mr>4||mr===0?_.timeMonday.ceil(Kt):_.timeMonday(Kt),Kt=_.timeDay.offset(Kt,(Hr.V-1)*7),Hr.y=Kt.getFullYear(),Hr.m=Kt.getMonth(),Hr.d=Kt.getDate()+(Hr.w+6)%7)}else("W"in Hr||"U"in Hr)&&("w"in Hr||(Hr.w="u"in Hr?Hr.u%7:"W"in Hr?1:0),mr="Z"in Hr?M(e(Hr.y,0,1)).getUTCDay():S(e(Hr.y,0,1)).getDay(),Hr.m=0,Hr.d="W"in Hr?(Hr.w+6)%7+Hr.W*7-(mr+5)%7:Hr.w+Hr.U*7-(mr+6)%7);return"Z"in Hr?(Hr.H+=Hr.Z/100|0,Hr.M+=Hr.Z%100,M(Hr)):S(Hr)}}function Yt(wr,Rr,Nr,Hr){for(var gt=0,Kt=Rr.length,mr=Nr.length,Ir,va;gt=mr)return-1;if(Ir=Rr.charCodeAt(gt++),Ir===37){if(Ir=Rr.charAt(gt++),va=Ca[Ir in r?Rr.charAt(gt++):Ir],!va||(Hr=va(wr,Nr,Hr))<0)return-1}else if(Ir!=Nr.charCodeAt(Hr++))return-1}return Hr}function Rt(wr,Rr,Nr){var Hr=Ct.exec(Rr.slice(Nr));return Hr?(wr.p=Pt[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Zt(wr,Rr,Nr){var Hr=or.exec(Rr.slice(Nr));return Hr?(wr.w=nr[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Jt(wr,Rr,Nr){var Hr=jt.exec(Rr.slice(Nr));return Hr?(wr.w=cr[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Fr(wr,Rr,Nr){var Hr=Fa.exec(Rr.slice(Nr));return Hr?(wr.m=Ra[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function ta(wr,Rr,Nr){var Hr=Pr.exec(Rr.slice(Nr));return Hr?(wr.m=_a[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function ra(wr,Rr,Nr){return Yt(wr,Ye,Rr,Nr)}function ca(wr,Rr,Nr){return Yt(wr,Ae,Rr,Nr)}function Ba(wr,Rr,Nr){return Yt(wr,Le,Rr,Nr)}function $a(wr){return st[wr.getDay()]}function Za(wr){return Ke[wr.getDay()]}function ri(wr){return Ut[wr.getMonth()]}function pi(wr){return ot[wr.getMonth()]}function Ia(wr){return We[+(wr.getHours()>=12)]}function rn(wr){return 1+~~(wr.getMonth()/3)}function tn(wr){return st[wr.getUTCDay()]}function cn(wr){return Ke[wr.getUTCDay()]}function xt(wr){return Ut[wr.getUTCMonth()]}function ut(wr){return ot[wr.getUTCMonth()]}function Or(wr){return We[+(wr.getUTCHours()>=12)]}function Cr(wr){return 1+~~(wr.getUTCMonth()/3)}return{format:function(wr){var Rr=hi(wr+="",qa);return Rr.toString=function(){return wr},Rr},parse:function(wr){var Rr=wi(wr+="",!1);return Rr.toString=function(){return wr},Rr},utcFormat:function(wr){var Rr=hi(wr+="",Wa);return Rr.toString=function(){return wr},Rr},utcParse:function(wr){var Rr=wi(wr+="",!0);return Rr.toString=function(){return wr},Rr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Fe,Ye,Ae){var Le=Fe<0?"-":"",We=(Le?-Fe:Fe)+"",Ke=We.length;return Le+(Ke68?1900:2e3),Ae+Le[0].length):-1}function E(Fe,Ye,Ae){var Le=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ye.slice(Ae,Ae+6));return Le?(Fe.Z=Le[1]?0:-(Le[2]+(Le[3]||"00")),Ae+Le[0].length):-1}function p(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+1));return Le?(Fe.q=Le[0]*3-3,Ae+Le[0].length):-1}function b(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.m=Le[0]-1,Ae+Le[0].length):-1}function d(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.d=+Le[0],Ae+Le[0].length):-1}function u(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+3));return Le?(Fe.m=0,Fe.d=+Le[0],Ae+Le[0].length):-1}function g(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.H=+Le[0],Ae+Le[0].length):-1}function y(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.M=+Le[0],Ae+Le[0].length):-1}function D(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.S=+Le[0],Ae+Le[0].length):-1}function P(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+3));return Le?(Fe.L=+Le[0],Ae+Le[0].length):-1}function z(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+6));return Le?(Fe.L=Math.floor(Le[0]/1e3),Ae+Le[0].length):-1}function F(Fe,Ye,Ae){var Le=a.exec(Ye.slice(Ae,Ae+1));return Le?Ae+Le[0].length:-1}function N(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae));return Le?(Fe.Q=+Le[0],Ae+Le[0].length):-1}function O(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae));return Le?(Fe.s=+Le[0],Ae+Le[0].length):-1}function L(Fe,Ye){return n(Fe.getDate(),Ye,2)}function U(Fe,Ye){return n(Fe.getHours(),Ye,2)}function B(Fe,Ye){return n(Fe.getHours()%12||12,Ye,2)}function W(Fe,Ye){return n(1+_.timeDay.count(_.timeYear(Fe),Fe),Ye,3)}function $(Fe,Ye){return n(Fe.getMilliseconds(),Ye,3)}function ue(Fe,Ye){return $(Fe,Ye)+"000"}function ce(Fe,Ye){return n(Fe.getMonth()+1,Ye,2)}function de(Fe,Ye){return n(Fe.getMinutes(),Ye,2)}function Y(Fe,Ye){return n(Fe.getSeconds(),Ye,2)}function X(Fe){var Ye=Fe.getDay();return Ye===0?7:Ye}function Q(Fe,Ye){return n(_.timeSunday.count(_.timeYear(Fe)-1,Fe),Ye,2)}function V(Fe,Ye){var Ae=Fe.getDay();return Fe=Ae>=4||Ae===0?_.timeThursday(Fe):_.timeThursday.ceil(Fe),n(_.timeThursday.count(_.timeYear(Fe),Fe)+(_.timeYear(Fe).getDay()===4),Ye,2)}function le(Fe){return Fe.getDay()}function ae(Fe,Ye){return n(_.timeMonday.count(_.timeYear(Fe)-1,Fe),Ye,2)}function j(Fe,Ye){return n(Fe.getFullYear()%100,Ye,2)}function ee(Fe,Ye){return n(Fe.getFullYear()%1e4,Ye,4)}function te(Fe){var Ye=Fe.getTimezoneOffset();return(Ye>0?"-":(Ye*=-1,"+"))+n(Ye/60|0,"0",2)+n(Ye%60,"0",2)}function pe(Fe,Ye){return n(Fe.getUTCDate(),Ye,2)}function we(Fe,Ye){return n(Fe.getUTCHours(),Ye,2)}function Se(Fe,Ye){return n(Fe.getUTCHours()%12||12,Ye,2)}function Re(Fe,Ye){return n(1+_.utcDay.count(_.utcYear(Fe),Fe),Ye,3)}function Pe(Fe,Ye){return n(Fe.getUTCMilliseconds(),Ye,3)}function je(Fe,Ye){return Pe(Fe,Ye)+"000"}function at(Fe,Ye){return n(Fe.getUTCMonth()+1,Ye,2)}function nt(Fe,Ye){return n(Fe.getUTCMinutes(),Ye,2)}function tt(Fe,Ye){return n(Fe.getUTCSeconds(),Ye,2)}function Ve(Fe){var Ye=Fe.getUTCDay();return Ye===0?7:Ye}function he(Fe,Ye){return n(_.utcSunday.count(_.utcYear(Fe)-1,Fe),Ye,2)}function se(Fe,Ye){var Ae=Fe.getUTCDay();return Fe=Ae>=4||Ae===0?_.utcThursday(Fe):_.utcThursday.ceil(Fe),n(_.utcThursday.count(_.utcYear(Fe),Fe)+(_.utcYear(Fe).getUTCDay()===4),Ye,2)}function ne(Fe){return Fe.getUTCDay()}function Ce(Fe,Ye){return n(_.utcMonday.count(_.utcYear(Fe)-1,Fe),Ye,2)}function Ze(Fe,Ye){return n(Fe.getUTCFullYear()%100,Ye,2)}function rt(Fe,Ye){return n(Fe.getUTCFullYear()%1e4,Ye,4)}function Je(){return"+0000"}function St(){return"%"}function kt(Fe){return+Fe}function Bt(Fe){return Math.floor(+Fe/1e3)}var Vt;Ar({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 Ar(Fe){return Vt=t(Fe),v.timeFormat=Vt.format,v.timeParse=Vt.parse,v.utcFormat=Vt.utcFormat,v.utcParse=Vt.utcParse,Vt}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function qr(Fe){return Fe.toISOString()}var kr=Date.prototype.toISOString?qr:v.utcFormat(vr);function Ur(Fe){var Ye=new Date(Fe);return isNaN(Ye)?null:Ye}var _t=+new Date("2000-01-01T00:00:00.000Z")?Ur:v.utcParse(vr);v.isoFormat=kr,v.isoParse=_t,v.timeFormatDefaultLocale=Ar,v.timeFormatLocale=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),YA=He({"node_modules/d3-format/dist/d3-format.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=typeof globalThis<"u"?globalThis:v||self,_(v.d3=v.d3||{}))})(Z,function(v){"use strict";function _(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function S(b,d){if((u=(b=d?b.toExponential(d-1):b.toExponential()).indexOf("e"))<0)return null;var u,g=b.slice(0,u);return[g.length>1?g[0]+g.slice(2):g,+b.slice(u+1)]}function M(b){return b=S(Math.abs(b)),b?b[1]:NaN}function e(b,d){return function(u,g){for(var y=u.length,D=[],P=0,z=b[0],F=0;y>0&&z>0&&(F+z+1>g&&(z=Math.max(1,g-F)),D.push(u.substring(y-=z,y+z)),!((F+=z+1)>g));)z=b[P=(P+1)%b.length];return D.reverse().join(d)}}function t(b){return function(d){return d.replace(/[0-9]/g,function(u){return b[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(b){if(!(d=r.exec(b)))throw new Error("invalid format: "+b);var d;return new a({fill:d[1],align:d[2],sign:d[3],symbol:d[4],zero:d[5],width:d[6],comma:d[7],precision:d[8]&&d[8].slice(1),trim:d[9],type:d[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 d=b.length,u=1,g=-1,y;u0&&(g=0);break}return g>0?b.slice(0,g)+b.slice(y+1):b}var n;function s(b,d){var u=S(b,d);if(!u)return b+"";var g=u[0],y=u[1],D=y-(n=Math.max(-8,Math.min(8,Math.floor(y/3)))*3)+1,P=g.length;return D===P?g:D>P?g+new Array(D-P+1).join("0"):D>0?g.slice(0,D)+"."+g.slice(D):"0."+new Array(1-D).join("0")+S(b,Math.max(0,d+D-1))[0]}function h(b,d){var u=S(b,d);if(!u)return b+"";var g=u[0],y=u[1];return y<0?"0."+new Array(-y).join("0")+g:g.length>y+1?g.slice(0,y+1)+"."+g.slice(y+1):g+new Array(y-g.length+2).join("0")}var f={"%":function(b,d){return(b*100).toFixed(d)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:_,e:function(b,d){return b.toExponential(d)},f:function(b,d){return b.toFixed(d)},g:function(b,d){return b.toPrecision(d)},o:function(b){return Math.round(b).toString(8)},p:function(b,d){return h(b*100,d)},r:h,s,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function m(b){return b}var c=Array.prototype.map,T=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function l(b){var d=b.grouping===void 0||b.thousands===void 0?m:e(c.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",g=b.currency===void 0?"":b.currency[1]+"",y=b.decimal===void 0?".":b.decimal+"",D=b.numerals===void 0?m:t(c.call(b.numerals,String)),P=b.percent===void 0?"%":b.percent+"",z=b.minus===void 0?"-":b.minus+"",F=b.nan===void 0?"NaN":b.nan+"";function N(L){L=o(L);var U=L.fill,B=L.align,W=L.sign,$=L.symbol,ue=L.zero,ce=L.width,de=L.comma,Y=L.precision,X=L.trim,Q=L.type;Q==="n"?(de=!0,Q="g"):f[Q]||(Y===void 0&&(Y=12),X=!0,Q="g"),(ue||U==="0"&&B==="=")&&(ue=!0,U="0",B="=");var V=$==="$"?u:$==="#"&&/[boxX]/.test(Q)?"0"+Q.toLowerCase():"",le=$==="$"?g:/[%p]/.test(Q)?P:"",ae=f[Q],j=/[defgprs%]/.test(Q);Y=Y===void 0?6:/[gprs]/.test(Q)?Math.max(1,Math.min(21,Y)):Math.max(0,Math.min(20,Y));function ee(te){var pe=V,we=le,Se,Re,Pe;if(Q==="c")we=ae(te)+we,te="";else{te=+te;var je=te<0||1/te<0;if(te=isNaN(te)?F:ae(Math.abs(te),Y),X&&(te=i(te)),je&&+te==0&&W!=="+"&&(je=!1),pe=(je?W==="("?W:z:W==="-"||W==="("?"":W)+pe,we=(Q==="s"?T[8+n/3]:"")+we+(je&&W==="("?")":""),j){for(Se=-1,Re=te.length;++SePe||Pe>57){we=(Pe===46?y+te.slice(Se+1):te.slice(Se))+we,te=te.slice(0,Se);break}}}de&&!ue&&(te=d(te,1/0));var at=pe.length+te.length+we.length,nt=at>1)+pe+te+we+nt.slice(at);break;default:te=nt+pe+te+we;break}return D(te)}return ee.toString=function(){return L+""},ee}function O(L,U){var B=N((L=o(L),L.type="f",L)),W=Math.max(-8,Math.min(8,Math.floor(M(U)/3)))*3,$=Math.pow(10,-W),ue=T[8+W/3];return function(ce){return B($*ce)+ue}}return{format:N,formatPrefix:O}}var x;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return x=l(b),v.format=x.format,v.formatPrefix=x.formatPrefix,x}function A(b){return Math.max(0,-M(Math.abs(b)))}function E(b,d){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(M(d)/3)))*3-M(Math.abs(b)))}function p(b,d){return b=Math.abs(b),d=Math.abs(d)-b,Math.max(0,M(d)-M(b))+1}v.FormatSpecifier=a,v.formatDefaultLocale=w,v.formatLocale=l,v.formatSpecifier=o,v.precisionFixed=A,v.precisionPrefix=E,v.precisionRound=p,Object.defineProperty(v,"__esModule",{value:!0})})}}),l7=He({"node_modules/is-string-blank/index.js"(Z,q){"use strict";q.exports=function(v){for(var _=v.length,S,M=0;M<_;M++)if(S=v.charCodeAt(M),(S<9||S>13)&&S!==32&&S!==133&&S!==160&&S!==5760&&S!==6158&&(S<8192||S>8205)&&S!==8232&&S!==8233&&S!==8239&&S!==8287&&S!==8288&&S!==12288&&S!==65279)return!1;return!0}}}),ns=He({"node_modules/fast-isnumeric/index.js"(Z,q){"use strict";var v=l7();q.exports=function(_){var S=typeof _;if(S==="string"){var M=_;if(_=+_,_===0&&v(M))return!1}else if(S!=="number")return!1;return _-_<1}}}),Gs=He({"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"}}}),KA=He({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=typeof globalThis<"u"?globalThis:v||self,_(v["base64-arraybuffer"]={}))})(Z,function(v){"use strict";for(var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),M=0;M<_.length;M++)S[_.charCodeAt(M)]=M;var e=function(r){var o=new Uint8Array(r),a,i=o.length,n="";for(a=0;a>2],n+=_[(o[a]&3)<<4|o[a+1]>>4],n+=_[(o[a+1]&15)<<2|o[a+2]>>6],n+=_[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,h,f,m;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var c=new ArrayBuffer(o),T=new Uint8Array(c);for(i=0;i>4,T[n++]=(h&15)<<4|f>>2,T[n++]=(f&3)<<6|m&63;return c};v.decode=t,v.encode=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),Yv=He({"src/lib/is_plain_object.js"(Z,q){"use strict";q.exports=function(_){return window&&window.process&&window.process.versions?Object.prototype.toString.call(_)==="[object Object]":Object.prototype.toString.call(_)==="[object Object]"&&Object.getPrototypeOf(_).hasOwnProperty("hasOwnProperty")}}}),hp=He({"src/lib/array.js"(Z){"use strict";var q=KA().decode,v=Yv(),_=Array.isArray,S=ArrayBuffer,M=DataView;function e(s){return S.isView(s)&&!(s instanceof M)}Z.isTypedArray=e;function t(s){return _(s)||e(s)}Z.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Z.isArray1D=r,Z.ensureArray=function(s,h){return _(s)||(s=[]),s.length=h,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 h=[],f=i(s),m=f.dtype,c=o[m];if(!c)throw new Error('Error in dtype: "'+m+'"');var T=c.BYTES_PER_ELEMENT,l=f.bdata;a(l)||(l=q(l));var x=f.shape===void 0?[l.byteLength/T]:(""+f.shape).split(",");x.reverse();var w=x.length,A,E,p=+x[0],b=T*p,d=0;if(w===1)h=new c(l);else if(w===2)for(A=+x[1],E=0;E2)return c[A]=c[A]|e,x.set(w,null);if(l){for(h=A;h0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(M[0],M[1]))/Math.LN10;return v(e)||(e=Math.log(Math.max(M[0],M[1]))/Math.LN10-6),e}}}),f7=He({"src/lib/relink_private.js"(Z,q){"use strict";var v=hp().isArrayOrTypedArray,_=Yv();q.exports=function S(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(v(r)&&v(o)&&_(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;iM/2?S-Math.round(S/M)*M:S}q.exports={mod:v,modHalf:_}}}),Ch=He({"node_modules/tinycolor2/tinycolor.js"(Z,q){(function(v){var _=/^\s+/,S=/\s+$/,M=0,e=v.round,t=v.min,r=v.max,o=v.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 te=i(j);this._originalInput=j,this._r=te.r,this._g=te.g,this._b=te.b,this._a=te.a,this._roundA=e(100*this._a)/100,this._format=ee.format||te.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=te.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,te,pe,we,Se,Re;return ee=j.r/255,te=j.g/255,pe=j.b/255,ee<=.03928?we=ee/12.92:we=v.pow((ee+.055)/1.055,2.4),te<=.03928?Se=te/12.92:Se=v.pow((te+.055)/1.055,2.4),pe<=.03928?Re=pe/12.92:Re=v.pow((pe+.055)/1.055,2.4),.2126*we+.7152*Se+.0722*Re},setAlpha:function(j){return this._a=L(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),te=e(j.s*100),pe=e(j.v*100);return this._a==1?"hsv("+ee+", "+te+"%, "+pe+"%)":"hsva("+ee+", "+te+"%, "+pe+"%, "+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),te=e(j.s*100),pe=e(j.l*100);return this._a==1?"hsl("+ee+", "+te+"%, "+pe+"%)":"hsla("+ee+", "+te+"%, "+pe+"%, "+this._roundA+")"},toHex:function(j){return c(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(U(this._r,255)*100)+"%",g:e(U(this._g,255)*100)+"%",b:e(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(U(this._r,255)*100)+"%, "+e(U(this._g,255)*100)+"%, "+e(U(this._b,255)*100)+"%)":"rgba("+e(U(this._r,255)*100)+"%, "+e(U(this._g,255)*100)+"%, "+e(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:N[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(j){var ee="#"+l(this._r,this._g,this._b,this._a),te=ee,pe=this._gradientType?"GradientType = 1, ":"";if(j){var we=a(j);te="#"+l(we._r,we._g,we._b,we._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+ee+",endColorstr="+te+")"},toString:function(j){var ee=!!j;j=j||this._format;var te=!1,pe=this._a<1&&this._a>=0,we=!ee&&pe&&(j==="hex"||j==="hex6"||j==="hex3"||j==="hex4"||j==="hex8"||j==="name");return we?j==="name"&&this._a===0?this.toName():this.toRgbString():(j==="rgb"&&(te=this.toRgbString()),j==="prgb"&&(te=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(te=this.toHexString()),j==="hex3"&&(te=this.toHexString(!0)),j==="hex4"&&(te=this.toHex8String(!0)),j==="hex8"&&(te=this.toHex8String()),j==="name"&&(te=this.toName()),j==="hsl"&&(te=this.toHslString()),j==="hsv"&&(te=this.toHsvString()),te||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(j,ee){var te=j.apply(null,[this].concat([].slice.call(ee)));return this._r=te._r,this._g=te._g,this._b=te._b,this.setAlpha(te._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(p,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(x,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(j,ee){return j.apply(null,[this].concat([].slice.call(ee)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},a.fromRatio=function(j,ee){if(typeof j=="object"){var te={};for(var pe in j)j.hasOwnProperty(pe)&&(pe==="a"?te[pe]=j[pe]:te[pe]=de(j[pe]));j=te}return a(j,ee)};function i(j){var ee={r:0,g:0,b:0},te=1,pe=null,we=null,Se=null,Re=!1,Pe=!1;return typeof j=="string"&&(j=le(j)),typeof j=="object"&&(V(j.r)&&V(j.g)&&V(j.b)?(ee=n(j.r,j.g,j.b),Re=!0,Pe=String(j.r).substr(-1)==="%"?"prgb":"rgb"):V(j.h)&&V(j.s)&&V(j.v)?(pe=de(j.s),we=de(j.v),ee=m(j.h,pe,we),Re=!0,Pe="hsv"):V(j.h)&&V(j.s)&&V(j.l)&&(pe=de(j.s),Se=de(j.l),ee=h(j.h,pe,Se),Re=!0,Pe="hsl"),j.hasOwnProperty("a")&&(te=j.a)),te=L(te),{ok:Re,format:j.format||Pe,r:t(255,r(ee.r,0)),g:t(255,r(ee.g,0)),b:t(255,r(ee.b,0)),a:te}}function n(j,ee,te){return{r:U(j,255)*255,g:U(ee,255)*255,b:U(te,255)*255}}function s(j,ee,te){j=U(j,255),ee=U(ee,255),te=U(te,255);var pe=r(j,ee,te),we=t(j,ee,te),Se,Re,Pe=(pe+we)/2;if(pe==we)Se=Re=0;else{var je=pe-we;switch(Re=Pe>.5?je/(2-pe-we):je/(pe+we),pe){case j:Se=(ee-te)/je+(ee1&&(tt-=1),tt<1/6?at+(nt-at)*6*tt:tt<1/2?nt:tt<2/3?at+(nt-at)*(2/3-tt)*6:at}if(ee===0)pe=we=Se=te;else{var Pe=te<.5?te*(1+ee):te+ee-te*ee,je=2*te-Pe;pe=Re(je,Pe,j+1/3),we=Re(je,Pe,j),Se=Re(je,Pe,j-1/3)}return{r:pe*255,g:we*255,b:Se*255}}function f(j,ee,te){j=U(j,255),ee=U(ee,255),te=U(te,255);var pe=r(j,ee,te),we=t(j,ee,te),Se,Re,Pe=pe,je=pe-we;if(Re=pe===0?0:je/pe,pe==we)Se=0;else{switch(pe){case j:Se=(ee-te)/je+(ee>1)+720)%360;--ee;)pe.h=(pe.h+we)%360,Se.push(a(pe));return Se}function z(j,ee){ee=ee||6;for(var te=a(j).toHsv(),pe=te.h,we=te.s,Se=te.v,Re=[],Pe=1/ee;ee--;)Re.push(a({h:pe,s:we,v:Se})),Se=(Se+Pe)%1;return Re}a.mix=function(j,ee,te){te=te===0?0:te||50;var pe=a(j).toRgb(),we=a(ee).toRgb(),Se=te/100,Re={r:(we.r-pe.r)*Se+pe.r,g:(we.g-pe.g)*Se+pe.g,b:(we.b-pe.b)*Se+pe.b,a:(we.a-pe.a)*Se+pe.a};return a(Re)},a.readability=function(j,ee){var te=a(j),pe=a(ee);return(v.max(te.getLuminance(),pe.getLuminance())+.05)/(v.min(te.getLuminance(),pe.getLuminance())+.05)},a.isReadable=function(j,ee,te){var pe=a.readability(j,ee),we,Se;switch(Se=!1,we=ae(te),we.level+we.size){case"AAsmall":case"AAAlarge":Se=pe>=4.5;break;case"AAlarge":Se=pe>=3;break;case"AAAsmall":Se=pe>=7;break}return Se},a.mostReadable=function(j,ee,te){var pe=null,we=0,Se,Re,Pe,je;te=te||{},Re=te.includeFallbackColors,Pe=te.level,je=te.size;for(var at=0;atwe&&(we=Se,pe=a(ee[at]));return a.isReadable(j,pe,{level:Pe,size:je})||!Re?pe:(te.includeFallbackColors=!1,a.mostReadable(j,["#fff","#000"],te))};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"},N=a.hexNames=O(F);function O(j){var ee={};for(var te in j)j.hasOwnProperty(te)&&(ee[j[te]]=te);return ee}function L(j){return j=parseFloat(j),(isNaN(j)||j<0||j>1)&&(j=1),j}function U(j,ee){$(j)&&(j="100%");var te=ue(j);return j=t(ee,r(0,parseFloat(j))),te&&(j=parseInt(j*ee,10)/100),v.abs(j-ee)<1e-6?1:j%ee/parseFloat(ee)}function B(j){return t(1,r(0,j))}function W(j){return parseInt(j,16)}function $(j){return typeof j=="string"&&j.indexOf(".")!=-1&&parseFloat(j)===1}function ue(j){return typeof j=="string"&&j.indexOf("%")!=-1}function ce(j){return j.length==1?"0"+j:""+j}function de(j){return j<=1&&(j=j*100+"%"),j}function Y(j){return v.round(parseFloat(j)*255).toString(16)}function X(j){return W(j)/255}var Q=function(){var j="[-\\+]?\\d+%?",ee="[-\\+]?\\d*\\.\\d+%?",te="(?:"+ee+")|(?:"+j+")",pe="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?",we="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?";return{CSS_UNIT:new RegExp(te),rgb:new RegExp("rgb"+pe),rgba:new RegExp("rgba"+we),hsl:new RegExp("hsl"+pe),hsla:new RegExp("hsla"+we),hsv:new RegExp("hsv"+pe),hsva:new RegExp("hsva"+we),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function V(j){return!!Q.CSS_UNIT.exec(j)}function le(j){j=j.replace(_,"").replace(S,"").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 te;return(te=Q.rgb.exec(j))?{r:te[1],g:te[2],b:te[3]}:(te=Q.rgba.exec(j))?{r:te[1],g:te[2],b:te[3],a:te[4]}:(te=Q.hsl.exec(j))?{h:te[1],s:te[2],l:te[3]}:(te=Q.hsla.exec(j))?{h:te[1],s:te[2],l:te[3],a:te[4]}:(te=Q.hsv.exec(j))?{h:te[1],s:te[2],v:te[3]}:(te=Q.hsva.exec(j))?{h:te[1],s:te[2],v:te[3],a:te[4]}:(te=Q.hex8.exec(j))?{r:W(te[1]),g:W(te[2]),b:W(te[3]),a:X(te[4]),format:ee?"name":"hex8"}:(te=Q.hex6.exec(j))?{r:W(te[1]),g:W(te[2]),b:W(te[3]),format:ee?"name":"hex"}:(te=Q.hex4.exec(j))?{r:W(te[1]+""+te[1]),g:W(te[2]+""+te[2]),b:W(te[3]+""+te[3]),a:X(te[4]+""+te[4]),format:ee?"name":"hex8"}:(te=Q.hex3.exec(j))?{r:W(te[1]+""+te[1]),g:W(te[2]+""+te[2]),b:W(te[3]+""+te[3]),format:ee?"name":"hex"}:!1}function ae(j){var ee,te;return j=j||{level:"AA",size:"small"},ee=(j.level||"AA").toUpperCase(),te=(j.size||"small").toLowerCase(),ee!=="AA"&&ee!=="AAA"&&(ee="AA"),te!=="small"&&te!=="large"&&(te="small"),{level:ee,size:te}}typeof q<"u"&&q.exports?q.exports=a:window.tinycolor=a})(Math)}}),rs=He({"src/lib/extend.js"(Z){"use strict";var q=Yv(),v=Array.isArray;function _(M,e){var t,r;for(t=0;t=0)))return a;if(f===3)s[f]>1&&(s[f]=1);else if(s[f]>=1)return a}var m=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return h?"rgba("+m+", "+s[3]+")":"rgb("+m+")"}}}),Km=He({"src/constants/interactions.js"(Z,q){"use strict";q.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=He({"src/lib/regex.js"(Z){"use strict";Z.counter=function(q,v,_,S){var M=(v||"")+(_?"":"$"),e=S===!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)}}}),h7=He({"src/lib/coerce.js"(Z){"use strict";var q=ns(),v=Ch(),_=rs().extendFlat,S=au(),M=W0(),e=$n(),t=Km().DESELECTDIM,r=b_(),o=Jy().counter,a=Yy().modHalf,i=hp().isArrayOrTypedArray,n=hp().isTypedArraySpec,s=hp().decodeTypedArraySpec;Z.valObjectMeta={data_array:{coerceFunction:function(f,m,c){m.set(i(f)?f:n(f)?s(f):c)}},enumerated:{coerceFunction:function(f,m,c,T){T.coerceNumber&&(f=+f),T.values.indexOf(f)===-1?m.set(c):m.set(f)},validateFunction:function(f,m){m.coerceNumber&&(f=+f);for(var c=m.values,T=0;Tx===!0||x===!1;l(f)||T.arrayOk&&Array.isArray(f)&&f.length>0&&f.every(l)?m.set(f):m.set(c)}},number:{coerceFunction:function(f,m,c,T){n(f)&&(f=s(f)),!q(f)||T.min!==void 0&&fT.max?m.set(c):m.set(+f)}},integer:{coerceFunction:function(f,m,c,T){if((T.extras||[]).indexOf(f)!==-1){m.set(f);return}n(f)&&(f=s(f)),f%1||!q(f)||T.min!==void 0&&fT.max?m.set(c):m.set(+f)}},string:{coerceFunction:function(f,m,c,T){if(typeof f!="string"){var l=typeof f=="number";T.strict===!0||!l?m.set(c):m.set(String(f))}else T.noBlank&&!f?m.set(c):m.set(f)}},color:{coerceFunction:function(f,m,c){n(f)&&(f=s(f)),v(f).isValid()?m.set(f):m.set(c)}},colorlist:{coerceFunction:function(f,m,c){function T(l){return v(l).isValid()}!Array.isArray(f)||!f.length?m.set(c):f.every(T)?m.set(f):m.set(c)}},colorscale:{coerceFunction:function(f,m,c){m.set(M.get(f,c))}},angle:{coerceFunction:function(f,m,c){n(f)&&(f=s(f)),f==="auto"?m.set("auto"):q(f)?m.set(a(+f,360)):m.set(c)}},subplotid:{coerceFunction:function(f,m,c,T){var l=T.regex||o(c);let x=w=>typeof w=="string"&&l.test(w);x(f)||T.arrayOk&&i(f)&&f.length>0&&f.every(x)?m.set(f):m.set(c)},validateFunction:function(f,m){var c=m.dflt;return f===c?!0:typeof f!="string"?!1:!!o(c).test(f)}},flaglist:{coerceFunction:function(f,m,c,T){if((T.extras||[]).indexOf(f)!==-1){m.set(f);return}if(typeof f!="string"){m.set(c);return}for(var l=f.split("+"),x=0;x/g),c=0;c1){var e=["LOG:"];for(M=0;M1){var t=[];for(M=0;M"),"long")}},S.warn=function(){var M;if(v.logging>0){var e=["WARN:"];for(M=0;M0){var t=[];for(M=0;M"),"stick")}},S.error=function(){var M;if(v.logging>0){var e=["ERROR:"];for(M=0;M0){var t=[];for(M=0;M"),"stick")}}}}),p2=He({"src/lib/noop.js"(Z,q){"use strict";q.exports=function(){}}}),$A=He({"src/lib/push_unique.js"(Z,q){"use strict";q.exports=function(_,S){if(S instanceof RegExp){for(var M=S.toString(),e=0;e<_.length;e++)if(_[e]instanceof RegExp&&_[e].toString()===M)return _;_.push(S)}else(S||S===0)&&_.indexOf(S)===-1&&_.push(S);return _}}}),p7=He({"node_modules/gl-mat4/create.js"(Z,q){q.exports=v;function v(){var _=new Float32Array(16);return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),d7=He({"node_modules/gl-mat4/clone.js"(Z,q){q.exports=v;function v(_){var S=new Float32Array(16);return S[0]=_[0],S[1]=_[1],S[2]=_[2],S[3]=_[3],S[4]=_[4],S[5]=_[5],S[6]=_[6],S[7]=_[7],S[8]=_[8],S[9]=_[9],S[10]=_[10],S[11]=_[11],S[12]=_[12],S[13]=_[13],S[14]=_[14],S[15]=_[15],S}}}),v7=He({"node_modules/gl-mat4/copy.js"(Z,q){q.exports=v;function v(_,S){return _[0]=S[0],_[1]=S[1],_[2]=S[2],_[3]=S[3],_[4]=S[4],_[5]=S[5],_[6]=S[6],_[7]=S[7],_[8]=S[8],_[9]=S[9],_[10]=S[10],_[11]=S[11],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15],_}}}),QA=He({"node_modules/gl-mat4/identity.js"(Z,q){q.exports=v;function v(_){return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),m7=He({"node_modules/gl-mat4/transpose.js"(Z,q){q.exports=v;function v(_,S){if(_===S){var M=S[1],e=S[2],t=S[3],r=S[6],o=S[7],a=S[11];_[1]=S[4],_[2]=S[8],_[3]=S[12],_[4]=M,_[6]=S[9],_[7]=S[13],_[8]=e,_[9]=r,_[11]=S[14],_[12]=t,_[13]=o,_[14]=a}else _[0]=S[0],_[1]=S[4],_[2]=S[8],_[3]=S[12],_[4]=S[1],_[5]=S[5],_[6]=S[9],_[7]=S[13],_[8]=S[2],_[9]=S[6],_[10]=S[10],_[11]=S[14],_[12]=S[3],_[13]=S[7],_[14]=S[11],_[15]=S[15];return _}}}),g7=He({"node_modules/gl-mat4/invert.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],h=S[9],f=S[10],m=S[11],c=S[12],T=S[13],l=S[14],x=S[15],w=M*a-e*o,A=M*i-t*o,E=M*n-r*o,p=e*i-t*a,b=e*n-r*a,d=t*n-r*i,u=s*T-h*c,g=s*l-f*c,y=s*x-m*c,D=h*l-f*T,P=h*x-m*T,z=f*x-m*l,F=w*z-A*P+E*D+p*y-b*g+d*u;return F?(F=1/F,_[0]=(a*z-i*P+n*D)*F,_[1]=(t*P-e*z-r*D)*F,_[2]=(T*d-l*b+x*p)*F,_[3]=(f*b-h*d-m*p)*F,_[4]=(i*y-o*z-n*g)*F,_[5]=(M*z-t*y+r*g)*F,_[6]=(l*E-c*d-x*A)*F,_[7]=(s*d-f*E+m*A)*F,_[8]=(o*P-a*y+n*u)*F,_[9]=(e*y-M*P-r*u)*F,_[10]=(c*b-T*E+x*w)*F,_[11]=(h*E-s*b-m*w)*F,_[12]=(a*g-o*D-i*u)*F,_[13]=(M*D-e*g+t*u)*F,_[14]=(T*A-c*p-l*w)*F,_[15]=(s*p-h*A+f*w)*F,_):null}}}),y7=He({"node_modules/gl-mat4/adjoint.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],h=S[9],f=S[10],m=S[11],c=S[12],T=S[13],l=S[14],x=S[15];return _[0]=a*(f*x-m*l)-h*(i*x-n*l)+T*(i*m-n*f),_[1]=-(e*(f*x-m*l)-h*(t*x-r*l)+T*(t*m-r*f)),_[2]=e*(i*x-n*l)-a*(t*x-r*l)+T*(t*n-r*i),_[3]=-(e*(i*m-n*f)-a*(t*m-r*f)+h*(t*n-r*i)),_[4]=-(o*(f*x-m*l)-s*(i*x-n*l)+c*(i*m-n*f)),_[5]=M*(f*x-m*l)-s*(t*x-r*l)+c*(t*m-r*f),_[6]=-(M*(i*x-n*l)-o*(t*x-r*l)+c*(t*n-r*i)),_[7]=M*(i*m-n*f)-o*(t*m-r*f)+s*(t*n-r*i),_[8]=o*(h*x-m*T)-s*(a*x-n*T)+c*(a*m-n*h),_[9]=-(M*(h*x-m*T)-s*(e*x-r*T)+c*(e*m-r*h)),_[10]=M*(a*x-n*T)-o*(e*x-r*T)+c*(e*n-r*a),_[11]=-(M*(a*m-n*h)-o*(e*m-r*h)+s*(e*n-r*a)),_[12]=-(o*(h*l-f*T)-s*(a*l-i*T)+c*(a*f-i*h)),_[13]=M*(h*l-f*T)-s*(e*l-t*T)+c*(e*f-t*h),_[14]=-(M*(a*l-i*T)-o*(e*l-t*T)+c*(e*i-t*a)),_[15]=M*(a*f-i*h)-o*(e*f-t*h)+s*(e*i-t*a),_}}}),_7=He({"node_modules/gl-mat4/determinant.js"(Z,q){q.exports=v;function v(_){var S=_[0],M=_[1],e=_[2],t=_[3],r=_[4],o=_[5],a=_[6],i=_[7],n=_[8],s=_[9],h=_[10],f=_[11],m=_[12],c=_[13],T=_[14],l=_[15],x=S*o-M*r,w=S*a-e*r,A=S*i-t*r,E=M*a-e*o,p=M*i-t*o,b=e*i-t*a,d=n*c-s*m,u=n*T-h*m,g=n*l-f*m,y=s*T-h*c,D=s*l-f*c,P=h*l-f*T;return x*P-w*D+A*y+E*g-p*u+b*d}}}),x7=He({"node_modules/gl-mat4/multiply.js"(Z,q){q.exports=v;function v(_,S,M){var e=S[0],t=S[1],r=S[2],o=S[3],a=S[4],i=S[5],n=S[6],s=S[7],h=S[8],f=S[9],m=S[10],c=S[11],T=S[12],l=S[13],x=S[14],w=S[15],A=M[0],E=M[1],p=M[2],b=M[3];return _[0]=A*e+E*a+p*h+b*T,_[1]=A*t+E*i+p*f+b*l,_[2]=A*r+E*n+p*m+b*x,_[3]=A*o+E*s+p*c+b*w,A=M[4],E=M[5],p=M[6],b=M[7],_[4]=A*e+E*a+p*h+b*T,_[5]=A*t+E*i+p*f+b*l,_[6]=A*r+E*n+p*m+b*x,_[7]=A*o+E*s+p*c+b*w,A=M[8],E=M[9],p=M[10],b=M[11],_[8]=A*e+E*a+p*h+b*T,_[9]=A*t+E*i+p*f+b*l,_[10]=A*r+E*n+p*m+b*x,_[11]=A*o+E*s+p*c+b*w,A=M[12],E=M[13],p=M[14],b=M[15],_[12]=A*e+E*a+p*h+b*T,_[13]=A*t+E*i+p*f+b*l,_[14]=A*r+E*n+p*m+b*x,_[15]=A*o+E*s+p*c+b*w,_}}}),b7=He({"node_modules/gl-mat4/translate.js"(Z,q){q.exports=v;function v(_,S,M){var e=M[0],t=M[1],r=M[2],o,a,i,n,s,h,f,m,c,T,l,x;return S===_?(_[12]=S[0]*e+S[4]*t+S[8]*r+S[12],_[13]=S[1]*e+S[5]*t+S[9]*r+S[13],_[14]=S[2]*e+S[6]*t+S[10]*r+S[14],_[15]=S[3]*e+S[7]*t+S[11]*r+S[15]):(o=S[0],a=S[1],i=S[2],n=S[3],s=S[4],h=S[5],f=S[6],m=S[7],c=S[8],T=S[9],l=S[10],x=S[11],_[0]=o,_[1]=a,_[2]=i,_[3]=n,_[4]=s,_[5]=h,_[6]=f,_[7]=m,_[8]=c,_[9]=T,_[10]=l,_[11]=x,_[12]=o*e+s*t+c*r+S[12],_[13]=a*e+h*t+T*r+S[13],_[14]=i*e+f*t+l*r+S[14],_[15]=n*e+m*t+x*r+S[15]),_}}}),w7=He({"node_modules/gl-mat4/scale.js"(Z,q){q.exports=v;function v(_,S,M){var e=M[0],t=M[1],r=M[2];return _[0]=S[0]*e,_[1]=S[1]*e,_[2]=S[2]*e,_[3]=S[3]*e,_[4]=S[4]*t,_[5]=S[5]*t,_[6]=S[6]*t,_[7]=S[7]*t,_[8]=S[8]*r,_[9]=S[9]*r,_[10]=S[10]*r,_[11]=S[11]*r,_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15],_}}}),T7=He({"node_modules/gl-mat4/rotate.js"(Z,q){q.exports=v;function v(_,S,M,e){var t=e[0],r=e[1],o=e[2],a=Math.sqrt(t*t+r*r+o*o),i,n,s,h,f,m,c,T,l,x,w,A,E,p,b,d,u,g,y,D,P,z,F,N;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,h=S[0],f=S[1],m=S[2],c=S[3],T=S[4],l=S[5],x=S[6],w=S[7],A=S[8],E=S[9],p=S[10],b=S[11],d=t*t*s+n,u=r*t*s+o*i,g=o*t*s-r*i,y=t*r*s-o*i,D=r*r*s+n,P=o*r*s+t*i,z=t*o*s+r*i,F=r*o*s-t*i,N=o*o*s+n,_[0]=h*d+T*u+A*g,_[1]=f*d+l*u+E*g,_[2]=m*d+x*u+p*g,_[3]=c*d+w*u+b*g,_[4]=h*y+T*D+A*P,_[5]=f*y+l*D+E*P,_[6]=m*y+x*D+p*P,_[7]=c*y+w*D+b*P,_[8]=h*z+T*F+A*N,_[9]=f*z+l*F+E*N,_[10]=m*z+x*F+p*N,_[11]=c*z+w*F+b*N,S!==_&&(_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_)}}}),A7=He({"node_modules/gl-mat4/rotateX.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[4],o=S[5],a=S[6],i=S[7],n=S[8],s=S[9],h=S[10],f=S[11];return S!==_&&(_[0]=S[0],_[1]=S[1],_[2]=S[2],_[3]=S[3],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[4]=r*t+n*e,_[5]=o*t+s*e,_[6]=a*t+h*e,_[7]=i*t+f*e,_[8]=n*t-r*e,_[9]=s*t-o*e,_[10]=h*t-a*e,_[11]=f*t-i*e,_}}}),S7=He({"node_modules/gl-mat4/rotateY.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[0],o=S[1],a=S[2],i=S[3],n=S[8],s=S[9],h=S[10],f=S[11];return S!==_&&(_[4]=S[4],_[5]=S[5],_[6]=S[6],_[7]=S[7],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[0]=r*t-n*e,_[1]=o*t-s*e,_[2]=a*t-h*e,_[3]=i*t-f*e,_[8]=r*e+n*t,_[9]=o*e+s*t,_[10]=a*e+h*t,_[11]=i*e+f*t,_}}}),M7=He({"node_modules/gl-mat4/rotateZ.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[0],o=S[1],a=S[2],i=S[3],n=S[4],s=S[5],h=S[6],f=S[7];return S!==_&&(_[8]=S[8],_[9]=S[9],_[10]=S[10],_[11]=S[11],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[0]=r*t+n*e,_[1]=o*t+s*e,_[2]=a*t+h*e,_[3]=i*t+f*e,_[4]=n*t-r*e,_[5]=s*t-o*e,_[6]=h*t-a*e,_[7]=f*t-i*e,_}}}),E7=He({"node_modules/gl-mat4/fromRotation.js"(Z,q){q.exports=v;function v(_,S,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(S),t=Math.cos(S),r=1-t,_[0]=o*o*r+t,_[1]=a*o*r+i*e,_[2]=i*o*r-a*e,_[3]=0,_[4]=o*a*r-i*e,_[5]=a*a*r+t,_[6]=i*a*r+o*e,_[7]=0,_[8]=o*i*r+a*e,_[9]=a*i*r-o*e,_[10]=i*i*r+t,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_)}}}),k7=He({"node_modules/gl-mat4/fromRotationTranslation.js"(Z,q){q.exports=v;function v(_,S,M){var e=S[0],t=S[1],r=S[2],o=S[3],a=e+e,i=t+t,n=r+r,s=e*a,h=e*i,f=e*n,m=t*i,c=t*n,T=r*n,l=o*a,x=o*i,w=o*n;return _[0]=1-(m+T),_[1]=h+w,_[2]=f-x,_[3]=0,_[4]=h-w,_[5]=1-(s+T),_[6]=c+l,_[7]=0,_[8]=f+x,_[9]=c-l,_[10]=1-(s+m),_[11]=0,_[12]=M[0],_[13]=M[1],_[14]=M[2],_[15]=1,_}}}),C7=He({"node_modules/gl-mat4/fromScaling.js"(Z,q){q.exports=v;function v(_,S){return _[0]=S[0],_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=S[1],_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=S[2],_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),L7=He({"node_modules/gl-mat4/fromTranslation.js"(Z,q){q.exports=v;function v(_,S){return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=S[0],_[13]=S[1],_[14]=S[2],_[15]=1,_}}}),P7=He({"node_modules/gl-mat4/fromXRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=e,_[6]=M,_[7]=0,_[8]=0,_[9]=-M,_[10]=e,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),I7=He({"node_modules/gl-mat4/fromYRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=e,_[1]=0,_[2]=-M,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=M,_[9]=0,_[10]=e,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),R7=He({"node_modules/gl-mat4/fromZRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=e,_[1]=M,_[2]=0,_[3]=0,_[4]=-M,_[5]=e,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),D7=He({"node_modules/gl-mat4/fromQuat.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=M+M,a=e+e,i=t+t,n=M*o,s=e*o,h=e*a,f=t*o,m=t*a,c=t*i,T=r*o,l=r*a,x=r*i;return _[0]=1-h-c,_[1]=s+x,_[2]=f-l,_[3]=0,_[4]=s-x,_[5]=1-n-c,_[6]=m+T,_[7]=0,_[8]=f+l,_[9]=m-T,_[10]=1-n-h,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),z7=He({"node_modules/gl-mat4/frustum.js"(Z,q){q.exports=v;function v(_,S,M,e,t,r,o){var a=1/(M-S),i=1/(t-e),n=1/(r-o);return _[0]=r*2*a,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=r*2*i,_[6]=0,_[7]=0,_[8]=(M+S)*a,_[9]=(t+e)*i,_[10]=(o+r)*n,_[11]=-1,_[12]=0,_[13]=0,_[14]=o*r*2*n,_[15]=0,_}}}),F7=He({"node_modules/gl-mat4/perspective.js"(Z,q){q.exports=v;function v(_,S,M,e,t){var r=1/Math.tan(S/2),o=1/(e-t);return _[0]=r/M,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=r,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=(t+e)*o,_[11]=-1,_[12]=0,_[13]=0,_[14]=2*t*e*o,_[15]=0,_}}}),O7=He({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(Z,q){q.exports=v;function v(_,S,M,e){var t=Math.tan(S.upDegrees*Math.PI/180),r=Math.tan(S.downDegrees*Math.PI/180),o=Math.tan(S.leftDegrees*Math.PI/180),a=Math.tan(S.rightDegrees*Math.PI/180),i=2/(o+a),n=2/(t+r);return _[0]=i,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=n,_[6]=0,_[7]=0,_[8]=-((o-a)*i*.5),_[9]=(t-r)*n*.5,_[10]=e/(M-e),_[11]=-1,_[12]=0,_[13]=0,_[14]=e*M/(M-e),_[15]=0,_}}}),B7=He({"node_modules/gl-mat4/ortho.js"(Z,q){q.exports=v;function v(_,S,M,e,t,r,o){var a=1/(S-M),i=1/(e-t),n=1/(r-o);return _[0]=-2*a,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=-2*i,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=2*n,_[11]=0,_[12]=(S+M)*a,_[13]=(t+e)*i,_[14]=(o+r)*n,_[15]=1,_}}}),N7=He({"node_modules/gl-mat4/lookAt.js"(Z,q){var v=QA();q.exports=_;function _(S,M,e,t){var r,o,a,i,n,s,h,f,m,c,T=M[0],l=M[1],x=M[2],w=t[0],A=t[1],E=t[2],p=e[0],b=e[1],d=e[2];return Math.abs(T-p)<1e-6&&Math.abs(l-b)<1e-6&&Math.abs(x-d)<1e-6?v(S):(h=T-p,f=l-b,m=x-d,c=1/Math.sqrt(h*h+f*f+m*m),h*=c,f*=c,m*=c,r=A*m-E*f,o=E*h-w*m,a=w*f-A*h,c=Math.sqrt(r*r+o*o+a*a),c?(c=1/c,r*=c,o*=c,a*=c):(r=0,o=0,a=0),i=f*a-m*o,n=m*r-h*a,s=h*o-f*r,c=Math.sqrt(i*i+n*n+s*s),c?(c=1/c,i*=c,n*=c,s*=c):(i=0,n=0,s=0),S[0]=r,S[1]=i,S[2]=h,S[3]=0,S[4]=o,S[5]=n,S[6]=f,S[7]=0,S[8]=a,S[9]=s,S[10]=m,S[11]=0,S[12]=-(r*T+o*l+a*x),S[13]=-(i*T+n*l+s*x),S[14]=-(h*T+f*l+m*x),S[15]=1,S)}}}),U7=He({"node_modules/gl-mat4/str.js"(Z,q){q.exports=v;function v(_){return"mat4("+_[0]+", "+_[1]+", "+_[2]+", "+_[3]+", "+_[4]+", "+_[5]+", "+_[6]+", "+_[7]+", "+_[8]+", "+_[9]+", "+_[10]+", "+_[11]+", "+_[12]+", "+_[13]+", "+_[14]+", "+_[15]+")"}}}),e5=He({"node_modules/gl-mat4/index.js"(Z,q){q.exports={create:p7(),clone:d7(),copy:v7(),identity:QA(),transpose:m7(),invert:g7(),adjoint:y7(),determinant:_7(),multiply:x7(),translate:b7(),scale:w7(),rotate:T7(),rotateX:A7(),rotateY:S7(),rotateZ:M7(),fromRotation:E7(),fromRotationTranslation:k7(),fromScaling:C7(),fromTranslation:L7(),fromXRotation:P7(),fromYRotation:I7(),fromZRotation:R7(),fromQuat:D7(),frustum:z7(),perspective:F7(),perspectiveFromFieldOfView:O7(),ortho:B7(),lookAt:N7(),str:U7()}}}),d2=He({"src/lib/matrix.js"(Z){"use strict";var q=e5();Z.init2dArray=function(v,_){for(var S=new Array(v),M=0;MSo({valType:"string",dflt:"",editType:M},e!==!1?{arrayOk:!0}:{}),Z.texttemplateAttrs=({editType:M="calc",arrayOk:e}={},t={})=>So({valType:"string",dflt:"",editType:M},e!==!1?{arrayOk:!0}:{}),Z.shapeTexttemplateAttrs=({editType:M="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:M}),Z.templatefallbackAttrs=({editType:M="none"}={})=>({valType:"any",dflt:"-",editType:M})}}),v2=He({"src/components/shapes/label_texttemplate.js"(Z,q){"use strict";function v(A,E){return E?E.d2l(A):A}function _(A,E){return E?E.l2d(A):A}function S(A){return A.x0}function M(A){return A.x1}function e(A){return A.y0}function t(A){return A.y1}function r(A){return A.x0shift||0}function o(A){return A.x1shift||0}function a(A){return A.y0shift||0}function i(A){return A.y1shift||0}function n(A,E){return v(A.x1,E)+o(A)-v(A.x0,E)-r(A)}function s(A,E,p){return v(A.y1,p)+i(A)-v(A.y0,p)-a(A)}function h(A,E){return Math.abs(n(A,E))}function f(A,E,p){return Math.abs(s(A,E,p))}function m(A,E,p){return A.type!=="line"?void 0:Math.sqrt(Math.pow(n(A,E),2)+Math.pow(s(A,E,p),2))}function c(A,E){return _((v(A.x1,E)+o(A)+v(A.x0,E)+r(A))/2,E)}function T(A,E,p){return _((v(A.y1,p)+i(A)+v(A.y0,p)+a(A))/2,p)}function l(A,E,p){return A.type!=="line"?void 0:s(A,E,p)/n(A,E)}var x=["x0","x1","y0","y1","dy","height","ycenter"],w=["x0","x1","y0","y1","dx","width","xcenter"];q.exports={x0:S,x1:M,y0:e,y1:t,slope:l,dx:n,dy:s,width:h,height:f,length:m,xcenter:c,ycenter:T,simpleXVariables:x,simpleYVariables:w}}}),j7=He({"src/components/shapes/draw_newshape/attributes.js"(Z,q){"use strict";var v=pc().overrideAll,_=au(),S=tc(),M=Hh().dash,e=rs().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=v2();q.exports=v({newshape:{visible:e({},_.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},_.legend,{}),legendgroup:e({},_.legendgroup,{}),legendgrouptitle:{text:e({},_.legendgrouptitle.text,{}),font:S({})},legendrank:e({},_.legendrank,{}),legendwidth:e({},_.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({},_.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),q7=He({"src/components/selections/draw_newselection/attributes.js"(Z,q){"use strict";var v=Hh().dash,_=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:_({},v,{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"}}}}),m2=He({"src/plots/pad_attributes.js"(Z,q){"use strict";q.exports=function(v){var _=v.editType;return{t:{valType:"number",dflt:0,editType:_},r:{valType:"number",dflt:0,editType:_},b:{valType:"number",dflt:0,editType:_},l:{valType:"number",dflt:0,editType:_},editType:_}}}}),$y=He({"src/plots/layout_attributes.js"(Z,q){"use strict";var v=tc(),_=A_(),S=sh(),M=j7(),e=q7(),t=m2(),r=rs().extendFlat,o=v({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,q.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({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:S.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:S.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:S.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({},_.transition,{editType:"none"})}}}),V7=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var Z=document.createElement("style");Z.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",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)}})()}}),so=He({"src/registry.js"(Z){"use strict";var q=Jm(),v=p2(),_=$A(),S=Yv(),M=T_().addStyleRule,e=rs(),t=au(),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 A=0;A=l&&F<=x?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var B=c(N),W=F.charAt(0);B&&(W==="G"||W==="g")&&(F=F.slice(1),N="");var $=B&&N.slice(0,7)==="chinese",ue=F.match($?f:h);if(!ue)return e;var ce=ue[1],de=ue[3]||"1",Y=Number(ue[5]||1),X=Number(ue[7]||0),Q=Number(ue[9]||0),V=Number(ue[11]||0);if(B){if(ce.length===2)return e;ce=Number(ce);var le;try{var ae=n.getComponentMethod("calendars","getCal")(N);if($){var j=de.charAt(de.length-1)==="i";de=parseInt(de,10),le=ae.newDate(ce,ae.toMonthIndex(ce,de,j),Y)}else le=ae.newDate(ce,Number(de),Y)}catch{return e}return le?(le.toJD()-i)*t+X*r+Q*o+V*a:e}ce.length===2?ce=(Number(ce)+2e3-m)%100+m:ce=Number(ce),de-=1;var ee=new Date(Date.UTC(2e3,de,Y,X,Q));return ee.setUTCFullYear(ce),ee.getUTCMonth()!==de||ee.getUTCDate()!==Y?e:ee.getTime()+V*a},l=Z.MIN_MS=Z.dateTime2ms("-9999"),x=Z.MAX_MS=Z.dateTime2ms("9999-12-31 23:59:59.9999"),Z.isDateTime=function(F,N){return Z.dateTime2ms(F,N)!==e};function w(F,N){return String(F+Math.pow(10,N)).slice(1)}var A=90*t,E=3*r,p=5*o;Z.ms2DateTime=function(F,N,O){if(typeof F!="number"||!(F>=l&&F<=x))return e;N||(N=0);var L=Math.floor(S(F+.05,1)*10),U=Math.round(F-L/10),B,W,$,ue,ce,de;if(c(O)){var Y=Math.floor(U/t)+i,X=Math.floor(S(F,t));try{B=n.getComponentMethod("calendars","getCal")(O).fromJD(Y).formatDate("yyyy-mm-dd")}catch{B=s("G%Y-%m-%d")(new Date(U))}if(B.charAt(0)==="-")for(;B.length<11;)B="-0"+B.slice(1);else for(;B.length<10;)B="0"+B;W=N=l+t&&F<=x-t))return e;var N=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-N/10)),L=q("%Y-%m-%d")(O),U=O.getHours(),B=O.getMinutes(),W=O.getSeconds(),$=O.getUTCMilliseconds()*10+N;return b(L,U,B,W,$)};function b(F,N,O,L,U){if((N||O||L||U)&&(F+=" "+w(N,2)+":"+w(O,2),(L||U)&&(F+=":"+w(L,2),U))){for(var B=4;U%10===0;)B-=1,U/=10;F+="."+w(U,B)}return F}Z.cleanDate=function(F,N,O){if(F===e)return N;if(Z.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(c(O))return _.error("JS Dates and milliseconds are incompatible with world calendars",F),N;if(F=Z.ms2DateTimeLocal(+F),!F&&N!==void 0)return N}else if(!Z.isDateTime(F,O))return _.error("unrecognized date",F),N;return F};var d=/%\d?f/g,u=/%h/g,g={1:"1",2:"1",3:"2",4:"2"};function y(F,N,O,L){F=F.replace(d,function(B){var W=Math.min(+B.charAt(1)||6,6),$=(N/1e3%1+2).toFixed(W).slice(2).replace(/0+$/,"")||"0";return $});var U=new Date(Math.floor(N+.05));if(F=F.replace(u,function(){return g[O("%q")(U)]}),c(L))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,N,L)}catch{return"Invalid"}return O(F)(U)}var D=[59,59.9,59.99,59.999,59.9999];function P(F,N){var O=S(F+.05,t),L=w(Math.floor(O/r),2)+":"+w(S(Math.floor(O/o),60),2);if(N!=="M"){v(N)||(N=0);var U=Math.min(S(F/a,60),D[N]),B=(100+U).toFixed(N).slice(1);N>0&&(B=B.replace(/0+$/,"").replace(/[\.]$/,"")),L+=":"+B}return L}Z.formatDate=function(F,N,O,L,U,B){if(U=c(U)&&U,!N)if(O==="y")N=B.year;else if(O==="m")N=B.month;else if(O==="d")N=B.dayMonth+` +`)};function zt(Gr){return Gr.map(_r).join(me)}function _r(Gr){return et.test(Gr)?'"'+Gr.replace(/\"/g,'""')+'"':Gr}return yt},v.csv=v.dsv(",","text/csv"),v.tsv=v.dsv(" ","text/tab-separated-values");var ba,Ai,ki,Ki,En=this[O(this,"requestAnimationFrame")]||function(me){setTimeout(me,17)};v.timer=function(){Tn.apply(this,arguments)};function Tn(me,De,et){var dt=arguments.length;dt<2&&(De=0),dt<3&&(et=Date.now());var yt=et+De,Tt={c:me,t:yt,n:null};return Ai?Ai.n=Tt:ba=Tt,Ai=Tt,ki||(Ki=clearTimeout(Ki),ki=1,En(On)),Tt}function On(){var me=kn(),De=ao()-me;De>24?(isFinite(De)&&(clearTimeout(Ki),Ki=setTimeout(On,De)),ki=0):(ki=1,En(On))}v.timer.flush=function(){kn(),ao()};function kn(){for(var me=Date.now(),De=ba;De;)me>=De.t&&De.c(me-De.t)&&(De.c=null),De=De.n;return me}function ao(){for(var me,De=ba,et=1/0;De;)De.c?(De.t=0;--zt)Sa.push(yt[Gr[wa[zt]][2]]);for(zt=+Ja;zt1&&Pt(me[et[dt-2]],me[et[dt-1]],me[yt])<=0;)--dt;et[dt++]=yt}return et.slice(0,dt)}function Cn(me,De){return me[0]-De[0]||me[1]-De[1]}v.geom.polygon=function(me){return Y(me,wo),me};var wo=v.geom.polygon.prototype=[];wo.area=function(){for(var me=-1,De=this.length,et,dt=this[De-1],yt=0;++meYe)zt=zt.L;else if(tr=De-lo(zt,et),tr>Ye){if(!zt.R){dt=zt;break}zt=zt.R}else{Tt>-Ye?(dt=zt.P,yt=zt):tr>-Ye?(dt=zt,yt=zt.N):dt=yt=zt;break}var _r=Ko(me);if(Yn.insert(dt,_r),!(!dt&&!yt)){if(dt===yt){Po(dt),yt=Ko(dt.site),Yn.insert(_r,yt),_r.edge=yt.edge=Nl(dt.site,_r.site),yn(dt),yn(yt);return}if(!yt){_r.edge=Nl(dt.site,_r.site);return}Po(dt),Po(yt);var Gr=dt.site,Xr=Gr.x,wa=Gr.y,pa=me.x-Xr,Ja=me.y-wa,ti=yt.site,Sa=ti.x-Xr,za=ti.y-wa,Xa=2*(pa*za-Ja*Sa),fi=pa*pa+Ja*Ja,oi=Sa*Sa+za*za,La={x:(za*fi-Ja*oi)/Xa+Xr,y:(pa*oi-Sa*fi)/Xa+wa};Ts(yt.edge,Gr,ti,La),_r.edge=Nl(Gr,me,null,La),yt.edge=Nl(me,ti,null,La),yn(dt),yn(yt)}}function bs(me,De){var et=me.site,dt=et.x,yt=et.y,Tt=yt-De;if(!Tt)return dt;var tr=me.P;if(!tr)return-1/0;et=tr.site;var zt=et.x,_r=et.y,Gr=_r-De;if(!Gr)return zt;var Xr=zt-dt,wa=1/Tt-1/Gr,pa=Xr/Gr;return wa?(-pa+Math.sqrt(pa*pa-2*wa*(Xr*Xr/(-2*Gr)-_r+Gr/2+yt-Tt/2)))/wa+dt:(dt+zt)/2}function lo(me,De){var et=me.N;if(et)return bs(et,De);var dt=me.site;return dt.y===De?dt.x:1/0}function Zo(me){this.site=me,this.edges=[]}Zo.prototype.prepare=function(){for(var me=this.edges,De=me.length,et;De--;)et=me[De].edge,(!et.b||!et.a)&&me.splice(De,1);return me.sort(Hs),me.length};function ws(me){for(var De=me[0][0],et=me[1][0],dt=me[0][1],yt=me[1][1],Tt,tr,zt,_r,Gr=jo,Xr=Gr.length,wa,pa,Ja,ti,Sa,za;Xr--;)if(wa=Gr[Xr],!(!wa||!wa.prepare()))for(Ja=wa.edges,ti=Ja.length,pa=0;paYe||l(_r-tr)>Ye)&&(Ja.splice(pa,0,new Ls(Ks(wa.site,za,l(zt-De)Ye?{x:De,y:l(Tt-De)Ye?{x:l(tr-yt)Ye?{x:et,y:l(Tt-et)Ye?{x:l(tr-dt)=-Ae)){var pa=_r*_r+Gr*Gr,Ja=Xr*Xr+za*za,ti=(za*pa-Gr*Ja)/wa,Sa=(_r*Ja-Xr*pa)/wa,za=Sa+zt,Xa=_s.pop()||new il;Xa.arc=me,Xa.site=yt,Xa.x=ti+tr,Xa.y=za+Math.sqrt(ti*ti+Sa*Sa),Xa.cy=za,me.circle=Xa;for(var fi=null,oi=ss._;oi;)if(Xa.y0)){if(Sa/=Ja,Ja<0){if(Sa0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}if(Sa=et-zt,!(!Ja&&Sa<0)){if(Sa/=Ja,Ja<0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}else if(Ja>0){if(Sa0)){if(Sa/=ti,ti<0){if(Sa0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}if(Sa=dt-_r,!(!ti&&Sa<0)){if(Sa/=ti,ti<0){if(Sa>pa)return;Sa>wa&&(wa=Sa)}else if(ti>0){if(Sa0&&(yt.a={x:zt+wa*Ja,y:_r+wa*ti}),pa<1&&(yt.b={x:zt+pa*Ja,y:_r+pa*ti}),yt}}}}}}function Ws(me){for(var De=ys,et=To(me[0][0],me[0][1],me[1][0],me[1][1]),dt=De.length,yt;dt--;)yt=De[dt],(!Ll(yt,me)||!et(yt)||l(yt.a.x-yt.b.x)=Tt)return;if(Xr>pa){if(!dt)dt={x:ti,y:tr};else if(dt.y>=zt)return;et={x:ti,y:zt}}else{if(!dt)dt={x:ti,y:zt};else if(dt.y1)if(Xr>pa){if(!dt)dt={x:(tr-Xa)/za,y:tr};else if(dt.y>=zt)return;et={x:(zt-Xa)/za,y:zt}}else{if(!dt)dt={x:(zt-Xa)/za,y:zt};else if(dt.y=Tt)return;et={x:Tt,y:za*Tt+Xa}}else{if(!dt)dt={x:Tt,y:za*Tt+Xa};else if(dt.x=Xr&&Xa.x<=pa&&Xa.y>=wa&&Xa.y<=Ja?[[Xr,Ja],[pa,Ja],[pa,wa],[Xr,wa]]:[];fi.point=_r[Sa]}),Gr}function zt(_r){return _r.map(function(Gr,Xr){return{x:Math.round(dt(Gr,Xr)/Ye)*Ye,y:Math.round(yt(Gr,Xr)/Ye)*Ye,i:Xr}})}return tr.links=function(_r){return du(zt(_r)).edges.filter(function(Gr){return Gr.l&&Gr.r}).map(function(Gr){return{source:_r[Gr.l.i],target:_r[Gr.r.i]}})},tr.triangles=function(_r){var Gr=[];return du(zt(_r)).cells.forEach(function(Xr,wa){for(var pa=Xr.site,Ja=Xr.edges.sort(Hs),ti=-1,Sa=Ja.length,za,Xa,fi=Ja[Sa-1].edge,oi=fi.l===pa?fi.r:fi.l;++tioi&&(oi=Xr.x),Xr.y>La&&(La=Xr.y),Ja.push(Xr.x),ti.push(Xr.y);else for(Sa=0;Saoi&&(oi=sn),an>La&&(La=an),Ja.push(sn),ti.push(an)}var dn=oi-Xa,In=La-fi;dn>In?La=fi+dn:oi=Xa+In;function Jn(no,Xo,cl,al,_l,mn,po,fs){if(!(isNaN(cl)||isNaN(al)))if(no.leaf){var ms=no.x,Tl=no.y;if(ms!=null)if(l(ms-cl)+l(Tl-al)<.01)ro(no,Xo,cl,al,_l,mn,po,fs);else{var Wl=no.point;no.x=no.y=no.point=null,ro(no,Wl,ms,Tl,_l,mn,po,fs),ro(no,Xo,cl,al,_l,mn,po,fs)}else no.x=cl,no.y=al,no.point=Xo}else ro(no,Xo,cl,al,_l,mn,po,fs)}function ro(no,Xo,cl,al,_l,mn,po,fs){var ms=(_l+po)*.5,Tl=(mn+fs)*.5,Wl=cl>=ms,Su=al>=Tl,Rl=Su<<1|Wl;no.leaf=!1,no=no.nodes[Rl]||(no.nodes[Rl]=uu()),Wl?_l=ms:po=ms,Su?mn=Tl:fs=Tl,Jn(no,Xo,cl,al,_l,mn,po,fs)}var $o=uu();if($o.add=function(no){Jn($o,no,+wa(no,++Sa),+pa(no,Sa),Xa,fi,oi,La)},$o.visit=function(no){Pl(no,$o,Xa,fi,oi,La)},$o.find=function(no){return ic($o,no[0],no[1],Xa,fi,oi,La)},Sa=-1,De==null){for(;++SaTt||pa>tr||Ja=sn,In=et>=an,Jn=In<<1|dn,ro=Jn+4;Jnet&&(Tt=De.slice(et,Tt),zt[tr]?zt[tr]+=Tt:zt[++tr]=Tt),(dt=dt[0])===(yt=yt[0])?zt[tr]?zt[tr]+=yt:zt[++tr]=yt:(zt[++tr]=null,_r.push({i:tr,x:vl(dt,yt)})),et=nc.lastIndex;return et=0&&!(dt=v.interpolators[et](me,De)););return dt}v.interpolators=[function(me,De){var et=typeof De;return(et==="string"?mr.has(De.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(De)?Ou:As:De instanceof wi?Ou:Array.isArray(De)?qu:et==="object"&&isNaN(De)?nl:vl)(me,De)}],v.interpolateArray=qu;function qu(me,De){var et=[],dt=[],yt=me.length,Tt=De.length,tr=Math.min(me.length,De.length),zt;for(zt=0;zt=0?me.slice(0,De):me,dt=De>=0?me.slice(De+1):"in";return et=xh.get(et)||fl,dt=us.get(dt)||F,bh(dt(et.apply(null,_.call(arguments,1))))};function bh(me){return function(De){return De<=0?0:De>=1?1:me(De)}}function Ps(me){return function(De){return 1-me(1-De)}}function to(me){return function(De){return .5*(De<.5?me(2*De):2-me(2-2*De))}}function Xc(me){return me*me}function Vu(me){return me*me*me}function ql(me){if(me<=0)return 0;if(me>=1)return 1;var De=me*me,et=De*me;return 4*(me<.5?et:3*(me-De)+et-.75)}function Mf(me){return function(De){return Math.pow(De,me)}}function Ac(me){return 1-Math.cos(me*st)}function nf(me){return Math.pow(2,10*(me-1))}function Ql(me){return 1-Math.sqrt(1-me*me)}function Jf(me,De){var et;return arguments.length<2&&(De=.45),arguments.length?et=De/We*Math.asin(1/me):(me=1,et=De/4),function(dt){return 1+me*Math.pow(2,-10*dt)*Math.sin((dt-et)*We/De)}}function Of(me){return me||(me=1.70158),function(De){return De*De*((me+1)*De-me)}}function of(me){return me<1/2.75?7.5625*me*me:me<2/2.75?7.5625*(me-=1.5/2.75)*me+.75:me<2.5/2.75?7.5625*(me-=2.25/2.75)*me+.9375:7.5625*(me-=2.625/2.75)*me+.984375}v.interpolateHcl=jc;function jc(me,De){me=v.hcl(me),De=v.hcl(De);var et=me.h,dt=me.c,yt=me.l,Tt=De.h-et,tr=De.c-dt,zt=De.l-yt;return isNaN(tr)&&(tr=0,dt=isNaN(dt)?De.c:dt),isNaN(Tt)?(Tt=0,et=isNaN(et)?De.h:et):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(_r){return ta(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}v.interpolateHsl=Bf;function Bf(me,De){me=v.hsl(me),De=v.hsl(De);var et=me.h,dt=me.s,yt=me.l,Tt=De.h-et,tr=De.s-dt,zt=De.l-yt;return isNaN(tr)&&(tr=0,dt=isNaN(dt)?De.s:dt),isNaN(Tt)?(Tt=0,et=isNaN(et)?De.h:et):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(_r){return Zt(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}v.interpolateLab=Nf;function Nf(me,De){me=v.lab(me),De=v.lab(De);var et=me.l,dt=me.a,yt=me.b,Tt=De.l-et,tr=De.a-dt,zt=De.b-yt;return function(_r){return pi(et+Tt*_r,dt+tr*_r,yt+zt*_r)+""}}v.interpolateRound=Gu;function Gu(me,De){return De-=me,function(et){return Math.round(me+De*et)}}v.transform=function(me){var De=M.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(et){if(et!=null){De.setAttribute("transform",et);var dt=De.transform.baseVal.consolidate()}return new Ef(dt?dt.matrix:qc)})(me)};function Ef(me){var De=[me.a,me.b],et=[me.c,me.d],dt=Zc(De),yt=oc(De,et),Tt=Zc(eu(et,De,-yt))||0;De[0]*et[1]180?De+=360:De-me>180&&(me+=360),dt.push({i:et.push(Sc(et)+"rotate(",null,")")-2,x:vl(me,De)})):De&&et.push(Sc(et)+"rotate("+De+")")}function fh(me,De,et,dt){me!==De?dt.push({i:et.push(Sc(et)+"skewX(",null,")")-2,x:vl(me,De)}):De&&et.push(Sc(et)+"skewX("+De+")")}function Uf(me,De,et,dt){if(me[0]!==De[0]||me[1]!==De[1]){var yt=et.push(Sc(et)+"scale(",null,",",null,")");dt.push({i:yt-4,x:vl(me[0],De[0])},{i:yt-2,x:vl(me[1],De[1])})}else(De[0]!==1||De[1]!==1)&&et.push(Sc(et)+"scale("+De+")")}function Yc(me,De){var et=[],dt=[];return me=v.transform(me),De=v.transform(De),Zs(me.translate,De.translate,et,dt),kf(me.rotate,De.rotate,et,dt),fh(me.skew,De.skew,et,dt),Uf(me.scale,De.scale,et,dt),me=De=null,function(yt){for(var Tt=-1,tr=dt.length,zt;++Tt0?Tt=La:(et.c=null,et.t=NaN,et=null,De.end({type:"end",alpha:Tt=0})):La>0&&(De.start({type:"start",alpha:Tt=La}),et=Tn(me.tick)),me):Tt},me.start=function(){var La,sn=Ja.length,an=ti.length,dn=dt[0],In=dt[1],Jn,ro;for(La=0;La=0;)Tt.push(Xr=Gr[_r]),Xr.parent=zt,Xr.depth=zt.depth+1;et&&(zt.value=0),zt.children=Gr}else et&&(zt.value=+et.call(dt,zt,zt.depth)||0),delete zt.children;return mc(yt,function(wa){var pa,Ja;me&&(pa=wa.children)&&pa.sort(me),et&&(Ja=wa.parent)&&(Ja.value+=wa.value)}),tr}return dt.sort=function(yt){return arguments.length?(me=yt,dt):me},dt.children=function(yt){return arguments.length?(De=yt,dt):De},dt.value=function(yt){return arguments.length?(et=yt,dt):et},dt.revalue=function(yt){return et&&(Ec(yt,function(Tt){Tt.children&&(Tt.value=0)}),mc(yt,function(Tt){var tr;Tt.children||(Tt.value=+et.call(dt,Tt,Tt.depth)||0),(tr=Tt.parent)&&(tr.value+=Tt.value)})),yt},dt};function Bu(me,De){return v.rebind(me,De,"sort","children","value"),me.nodes=me,me.links=Nu,me}function Ec(me,De){for(var et=[me];(me=et.pop())!=null;)if(De(me),(yt=me.children)&&(dt=yt.length))for(var dt,yt;--dt>=0;)et.push(yt[dt])}function mc(me,De){for(var et=[me],dt=[];(me=et.pop())!=null;)if(dt.push(me),(tr=me.children)&&(Tt=tr.length))for(var yt=-1,Tt,tr;++ytyt&&(yt=zt),dt.push(zt)}for(tr=0;trdt&&(et=De,dt=yt);return et}function hl(me){return me.reduce(uf,0)}function uf(me,De){return me+De[1]}v.layout.histogram=function(){var me=!0,De=Number,et=gf,dt=kc;function yt(Tt,pa){for(var zt=[],_r=Tt.map(De,this),Gr=et.call(this,_r,pa),Xr=dt.call(this,Gr,_r,pa),wa,pa=-1,Ja=_r.length,ti=Xr.length-1,Sa=me?1:1/Ja,za;++pa0)for(pa=-1;++pa=Gr[0]&&za<=Gr[1]&&(wa=zt[v.bisect(Xr,za,1,ti)-1],wa.y+=Sa,wa.push(Tt[pa]));return zt}return yt.value=function(Tt){return arguments.length?(De=Tt,yt):De},yt.range=function(Tt){return arguments.length?(et=Ir(Tt),yt):et},yt.bins=function(Tt){return arguments.length?(dt=typeof Tt=="number"?function(tr){return Hu(tr,Tt)}:Ir(Tt),yt):dt},yt.frequency=function(Tt){return arguments.length?(me=!!Tt,yt):me},yt};function kc(me,De){return Hu(me,Math.ceil(Math.log(De.length)/Math.LN2+1))}function Hu(me,De){for(var et=-1,dt=+me[0],yt=(me[1]-dt)/De,Tt=[];++et<=De;)Tt[et]=yt*et+dt;return Tt}function gf(me){return[v.min(me),v.max(me)]}v.layout.pack=function(){var me=v.layout.hierarchy().sort(Wu),De=0,et=[1,1],dt;function yt(Tt,tr){var zt=me.call(this,Tt,tr),_r=zt[0],Gr=et[0],Xr=et[1],wa=dt==null?Math.sqrt:typeof dt=="function"?dt:function(){return dt};if(_r.x=_r.y=0,mc(_r,function(Ja){Ja.r=+wa(Ja.value)}),mc(_r,Vf),De){var pa=De*(dt?1:Math.max(2*_r.r/Gr,2*_r.r/Xr))/2;mc(_r,function(Ja){Ja.r+=pa}),mc(_r,Vf),mc(_r,function(Ja){Ja.r-=pa})}return gc(_r,Gr/2,Xr/2,dt?1:1/Math.max(2*_r.r/Gr,2*_r.r/Xr)),zt}return yt.size=function(Tt){return arguments.length?(et=Tt,yt):et},yt.radius=function(Tt){return arguments.length?(dt=Tt==null||typeof Tt=="function"?Tt:+Tt,yt):dt},yt.padding=function(Tt){return arguments.length?(De=+Tt,yt):De},Bu(yt,me)};function Wu(me,De){return me.value-De.value}function Jc(me,De){var et=me._pack_next;me._pack_next=De,De._pack_prev=me,De._pack_next=et,et._pack_prev=De}function Lf(me,De){me._pack_next=De,De._pack_prev=me}function nu(me,De){var et=De.x-me.x,dt=De.y-me.y,yt=me.r+De.r;return .999*yt*yt>et*et+dt*dt}function Vf(me){if(!(De=me.children)||!(pa=De.length))return;var De,et=1/0,dt=-1/0,yt=1/0,Tt=-1/0,tr,zt,_r,Gr,Xr,wa,pa;function Ja(La){et=Math.min(La.x-La.r,et),dt=Math.max(La.x+La.r,dt),yt=Math.min(La.y-La.r,yt),Tt=Math.max(La.y+La.r,Tt)}if(De.forEach(Xu),tr=De[0],tr.x=-tr.r,tr.y=0,Ja(tr),pa>1&&(zt=De[1],zt.x=zt.r,zt.y=0,Ja(zt),pa>2))for(_r=De[2],Vl(tr,zt,_r),Ja(_r),Jc(tr,_r),tr._pack_prev=_r,Jc(_r,zt),zt=tr._pack_next,Gr=3;Grza.x&&(za=sn),sn.depth>Xa.depth&&(Xa=sn)});var fi=De(Sa,za)/2-Sa.x,oi=et[0]/(za.x+De(za,Sa)/2+fi),La=et[1]/(Xa.depth||1);Ec(Ja,function(sn){sn.x=(sn.x+fi)*oi,sn.y=sn.depth*La})}return pa}function Tt(Xr){for(var wa={A:null,children:[Xr]},pa=[wa],Ja;(Ja=pa.pop())!=null;)for(var ti=Ja.children,Sa,za=0,Xa=ti.length;za0&&(sc(Qt(Sa,Xr,pa),Xr,sn),Xa+=sn,fi+=sn),oi+=Sa.m,Xa+=Ja.m,La+=za.m,fi+=ti.m;Sa&&!$c(ti)&&(ti.t=Sa,ti.m+=oi-fi),Ja&&!Lc(za)&&(za.t=Ja,za.m+=Xa-La,pa=Xr)}return pa}function Gr(Xr){Xr.x*=et[0],Xr.y=Xr.depth*et[1]}return yt.separation=function(Xr){return arguments.length?(De=Xr,yt):De},yt.size=function(Xr){return arguments.length?(dt=(et=Xr)==null?Gr:null,yt):dt?null:et},yt.nodeSize=function(Xr){return arguments.length?(dt=(et=Xr)==null?null:Gr,yt):dt?et:null},Bu(yt,me)};function xu(me,De){return me.parent==De.parent?1:2}function Lc(me){var De=me.children;return De.length?De[0]:me.t}function $c(me){var De=me.children,et;return(et=De.length)?De[et-1]:me.t}function sc(me,De,et){var dt=et/(De.i-me.i);De.c-=dt,De.s+=et,me.c+=dt,De.z+=et,De.m+=et}function Pc(me){for(var De=0,et=0,dt=me.children,yt=dt.length,Tt;--yt>=0;)Tt=dt[yt],Tt.z+=De,Tt.m+=De,De+=Tt.s+(et+=Tt.c)}function Qt(me,De,et){return me.a.parent===De.parent?me.a:et}v.layout.cluster=function(){var me=v.layout.hierarchy().sort(null).value(null),De=xu,et=[1,1],dt=!1;function yt(Tt,tr){var zt=me.call(this,Tt,tr),_r=zt[0],Gr,Xr=0;mc(_r,function(Sa){var za=Sa.children;za&&za.length?(Sa.x=aa(za),Sa.y=xr(za)):(Sa.x=Gr?Xr+=De(Sa,Gr):0,Sa.y=0,Gr=Sa)});var wa=$r(_r),pa=ka(_r),Ja=wa.x-De(wa,pa)/2,ti=pa.x+De(pa,wa)/2;return mc(_r,dt?function(Sa){Sa.x=(Sa.x-_r.x)*et[0],Sa.y=(_r.y-Sa.y)*et[1]}:function(Sa){Sa.x=(Sa.x-Ja)/(ti-Ja)*et[0],Sa.y=(1-(_r.y?Sa.y/_r.y:1))*et[1]}),zt}return yt.separation=function(Tt){return arguments.length?(De=Tt,yt):De},yt.size=function(Tt){return arguments.length?(dt=(et=Tt)==null,yt):dt?null:et},yt.nodeSize=function(Tt){return arguments.length?(dt=(et=Tt)!=null,yt):dt?et:null},Bu(yt,me)};function xr(me){return 1+v.max(me,function(De){return De.y})}function aa(me){return me.reduce(function(De,et){return De+et.x},0)/me.length}function $r(me){var De=me.children;return De&&De.length?$r(De[0]):me}function ka(me){var De=me.children,et;return De&&(et=De.length)?ka(De[et-1]):me}v.layout.treemap=function(){var me=v.layout.hierarchy(),De=Math.round,et=[1,1],dt=null,yt=li,Tt=!1,tr,zt="squarify",_r=.5*(1+Math.sqrt(5));function Gr(Sa,za){for(var Xa=-1,fi=Sa.length,oi,La;++Xa0;)fi.push(La=oi[In-1]),fi.area+=La.area,zt!=="squarify"||(an=pa(fi,dn))<=sn?(oi.pop(),sn=an):(fi.area-=fi.pop().area,Ja(fi,dn,Xa,!1),dn=Math.min(Xa.dx,Xa.dy),fi.length=fi.area=0,sn=1/0);fi.length&&(Ja(fi,dn,Xa,!0),fi.length=fi.area=0),za.forEach(Xr)}}function wa(Sa){var za=Sa.children;if(za&&za.length){var Xa=yt(Sa),fi=za.slice(),oi,La=[];for(Gr(fi,Xa.dx*Xa.dy/Sa.value),La.area=0;oi=fi.pop();)La.push(oi),La.area+=oi.area,oi.z!=null&&(Ja(La,oi.z?Xa.dx:Xa.dy,Xa,!fi.length),La.length=La.area=0);za.forEach(wa)}}function pa(Sa,za){for(var Xa=Sa.area,fi,oi=0,La=1/0,sn=-1,an=Sa.length;++snoi&&(oi=fi));return Xa*=Xa,za*=za,Xa?Math.max(za*oi*_r/Xa,Xa/(za*La*_r)):1/0}function Ja(Sa,za,Xa,fi){var oi=-1,La=Sa.length,sn=Xa.x,an=Xa.y,dn=za?De(Sa.area/za):0,In;if(za==Xa.dx){for((fi||dn>Xa.dy)&&(dn=Xa.dy);++oiXa.dx)&&(dn=Xa.dx);++oi1);return me+De*dt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var me=v.random.normal.apply(v,arguments);return function(){return Math.exp(me())}},bates:function(me){var De=v.random.irwinHall(me);return function(){return De()/me}},irwinHall:function(me){return function(){for(var De=0,et=0;et2?mi:pn,Gr=dt?Cu:$f;return yt=_r(me,De,Gr,et),Tt=_r(De,me,Gr,jl),zt}function zt(_r){return yt(_r)}return zt.invert=function(_r){return Tt(_r)},zt.domain=function(_r){return arguments.length?(me=_r.map(Number),tr()):me},zt.range=function(_r){return arguments.length?(De=_r,tr()):De},zt.rangeRound=function(_r){return zt.range(_r).interpolate(Gu)},zt.clamp=function(_r){return arguments.length?(dt=_r,tr()):dt},zt.interpolate=function(_r){return arguments.length?(et=_r,tr()):et},zt.ticks=function(_r){return co(me,_r)},zt.tickFormat=function(_r,Gr){return d3_scale_linearTickFormat(me,_r,Gr)},zt.nice=function(_r){return io(me,_r),tr()},zt.copy=function(){return Mn(me,De,et,dt)},tr()}function Qn(me,De){return v.rebind(me,De,"range","rangeRound","interpolate","clamp")}function io(me,De){return Pi(me,Di(eo(me,De)[2])),Pi(me,Di(eo(me,De)[2])),me}function eo(me,De){De==null&&(De=10);var et=Hi(me),dt=et[1]-et[0],yt=Math.pow(10,Math.floor(Math.log(dt/De)/Math.LN10)),Tt=De/dt*yt;return Tt<=.15?yt*=10:Tt<=.35?yt*=5:Tt<=.75&&(yt*=2),et[0]=Math.ceil(et[0]/yt)*yt,et[1]=Math.floor(et[1]/yt)*yt+yt*.5,et[2]=yt,et}function co(me,De){return v.range.apply(v,eo(me,De))}var An={s:1,g:1,p:1,r:1,e:1};function un(me){return-Math.floor(Math.log(me)/Math.LN10+.01)}function yo(me,De){var et=un(De[2]);return me in An?Math.abs(et-un(Math.max(l(De[0]),l(De[1]))))+ +(me!=="e"):et-(me==="%")*2}v.scale.log=function(){return Qo(v.scale.linear().domain([0,1]),10,!0,[1,10])};function Qo(me,De,et,dt){function yt(zt){return(et?Math.log(zt<0?0:zt):-Math.log(zt>0?0:-zt))/Math.log(De)}function Tt(zt){return et?Math.pow(De,zt):-Math.pow(De,-zt)}function tr(zt){return me(yt(zt))}return tr.invert=function(zt){return Tt(me.invert(zt))},tr.domain=function(zt){return arguments.length?(et=zt[0]>=0,me.domain((dt=zt.map(Number)).map(yt)),tr):dt},tr.base=function(zt){return arguments.length?(De=+zt,me.domain(dt.map(yt)),tr):De},tr.nice=function(){var zt=Pi(dt.map(yt),et?Math:ks);return me.domain(zt),dt=zt.map(Tt),tr},tr.ticks=function(){var zt=Hi(dt),_r=[],Gr=zt[0],Xr=zt[1],wa=Math.floor(yt(Gr)),pa=Math.ceil(yt(Xr)),Ja=De%1?2:De;if(isFinite(pa-wa)){if(et){for(;wa0;ti--)_r.push(Tt(wa)*ti);for(wa=0;_r[wa]Xr;pa--);_r=_r.slice(wa,pa)}return _r},tr.copy=function(){return Qo(me.copy(),De,et,dt)},Qn(tr,me)}var ks={floor:function(me){return-Math.ceil(-me)},ceil:function(me){return-Math.floor(-me)}};v.scale.pow=function(){return rl(v.scale.linear(),1,[0,1])};function rl(me,De,et){var dt=Ns(De),yt=Ns(1/De);function Tt(tr){return me(dt(tr))}return Tt.invert=function(tr){return yt(me.invert(tr))},Tt.domain=function(tr){return arguments.length?(me.domain((et=tr.map(Number)).map(dt)),Tt):et},Tt.ticks=function(tr){return co(et,tr)},Tt.tickFormat=function(tr,zt){return d3_scale_linearTickFormat(et,tr,zt)},Tt.nice=function(tr){return Tt.domain(io(et,tr))},Tt.exponent=function(tr){return arguments.length?(dt=Ns(De=tr),yt=Ns(1/De),me.domain(et.map(dt)),Tt):De},Tt.copy=function(){return rl(me.copy(),De,et)},Qn(Tt,me)}function Ns(me){return function(De){return De<0?-Math.pow(-De,me):Math.pow(De,me)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return el([],{t:"range",a:[[]]})};function el(me,De){var et,dt,yt;function Tt(zt){return dt[((et.get(zt)||(De.t==="range"?et.set(zt,me.push(zt)):NaN))-1)%dt.length]}function tr(zt,_r){return v.range(me.length).map(function(Gr){return zt+_r*Gr})}return Tt.domain=function(zt){if(!arguments.length)return me;me=[],et=new A;for(var _r=-1,Gr=zt.length,Xr;++_r0?et[Tt-1]:me[0],Ttpa?0:1;if(Xr=Ke)return _r(Xr,ti)+(Gr?_r(Gr,1-ti):"")+"Z";var Sa,za,Xa,fi,oi=0,La=0,sn,an,dn,In,Jn,ro,$o,no,Xo=[];if((fi=(+tr.apply(this,arguments)||0)/2)&&(Xa=dt===Iu?Math.sqrt(Gr*Gr+Xr*Xr):+dt.apply(this,arguments),ti||(La*=-1),Xr&&(La=cr(Xa/Xr*Math.sin(fi))),Gr&&(oi=cr(Xa/Gr*Math.sin(fi)))),Xr){sn=Xr*Math.cos(wa+La),an=Xr*Math.sin(wa+La),dn=Xr*Math.cos(pa-La),In=Xr*Math.sin(pa-La);var cl=Math.abs(pa-wa-2*La)<=Le?0:1;if(La&&yc(sn,an,dn,In)===ti^cl){var al=(wa+pa)/2;sn=Xr*Math.cos(al),an=Xr*Math.sin(al),dn=In=null}}else sn=an=0;if(Gr){Jn=Gr*Math.cos(pa-oi),ro=Gr*Math.sin(pa-oi),$o=Gr*Math.cos(wa+oi),no=Gr*Math.sin(wa+oi);var _l=Math.abs(wa-pa+2*oi)<=Le?0:1;if(oi&&yc(Jn,ro,$o,no)===1-ti^_l){var mn=(wa+pa)/2;Jn=Gr*Math.cos(mn),ro=Gr*Math.sin(mn),$o=no=null}}else Jn=ro=0;if(Ja>Ye&&(Sa=Math.min(Math.abs(Xr-Gr)/2,+et.apply(this,arguments)))>.001){za=Gr0?0:1}function fo(me,De,et,dt,yt){var Tt=me[0]-De[0],tr=me[1]-De[1],zt=(yt?dt:-dt)/Math.sqrt(Tt*Tt+tr*tr),_r=zt*tr,Gr=-zt*Tt,Xr=me[0]+_r,wa=me[1]+Gr,pa=De[0]+_r,Ja=De[1]+Gr,ti=(Xr+pa)/2,Sa=(wa+Ja)/2,za=pa-Xr,Xa=Ja-wa,fi=za*za+Xa*Xa,oi=et-dt,La=Xr*Ja-pa*wa,sn=(Xa<0?-1:1)*Math.sqrt(Math.max(0,oi*oi*fi-La*La)),an=(La*Xa-za*sn)/fi,dn=(-La*za-Xa*sn)/fi,In=(La*Xa+za*sn)/fi,Jn=(-La*za+Xa*sn)/fi,ro=an-ti,$o=dn-Sa,no=In-ti,Xo=Jn-Sa;return ro*ro+$o*$o>no*no+Xo*Xo&&(an=In,dn=Jn),[[an-_r,dn-Gr],[an*et/oi,dn*et/oi]]}function Fo(){return!0}function Dc(me){var De=Co,et=bo,dt=Fo,yt=Yu,Tt=yt.key,tr=.7;function zt(_r){var Gr=[],Xr=[],wa=-1,pa=_r.length,Ja,ti=Ir(De),Sa=Ir(et);function za(){Gr.push("M",yt(me(Xr),tr))}for(;++wa1?me.join("L"):me+"Z"}function Oe(me){return me.join("L")+"Z"}function I(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De1&&yt.push("H",dt[0]),yt.join("")}function ie(me){for(var De=0,et=me.length,dt=me[0],yt=[dt[0],",",dt[1]];++De1){zt=De[1],Tt=me[_r],_r++,dt+="C"+(yt[0]+tr[0])+","+(yt[1]+tr[1])+","+(Tt[0]-zt[0])+","+(Tt[1]-zt[1])+","+Tt[0]+","+Tt[1];for(var Gr=2;Gr9&&(Tt=et*3/Math.sqrt(Tt),tr[zt]=Tt*dt,tr[zt+1]=Tt*yt));for(zt=-1;++zt<=_r;)Tt=(me[Math.min(_r,zt+1)][0]-me[Math.max(0,zt-1)][0])/(6*(1+tr[zt]*tr[zt])),De.push([Tt||0,tr[zt]*Tt||0]);return De}function ur(me){return me.length<3?Yu(me):me[0]+wt(me,Dt(me))}v.svg.line.radial=function(){var me=Dc(yr);return me.radius=me.x,delete me.x,me.angle=me.y,delete me.y,me};function yr(me){for(var De,et=-1,dt=me.length,yt,Tt;++etLe)+",1 "+wa}function Gr(Xr,wa,pa,Ja){return"Q 0,0 "+Ja}return Tt.radius=function(Xr){return arguments.length?(et=Ir(Xr),Tt):et},Tt.source=function(Xr){return arguments.length?(me=Ir(Xr),Tt):me},Tt.target=function(Xr){return arguments.length?(De=Ir(Xr),Tt):De},Tt.startAngle=function(Xr){return arguments.length?(dt=Ir(Xr),Tt):dt},Tt.endAngle=function(Xr){return arguments.length?(yt=Ir(Xr),Tt):yt},Tt};function ha(me){return me.radius}v.svg.diagonal=function(){var me=jr,De=Qr,et=Aa;function dt(yt,Tt){var tr=me.call(this,yt,Tt),zt=De.call(this,yt,Tt),_r=(tr.y+zt.y)/2,Gr=[tr,{x:tr.x,y:_r},{x:zt.x,y:_r},zt];return Gr=Gr.map(et),"M"+Gr[0]+"C"+Gr[1]+" "+Gr[2]+" "+Gr[3]}return dt.source=function(yt){return arguments.length?(me=Ir(yt),dt):me},dt.target=function(yt){return arguments.length?(De=Ir(yt),dt):De},dt.projection=function(yt){return arguments.length?(et=yt,dt):et},dt};function Aa(me){return[me.x,me.y]}v.svg.diagonal.radial=function(){var me=v.svg.diagonal(),De=Aa,et=me.projection;return me.projection=function(dt){return arguments.length?et(Da(De=dt)):De},me};function Da(me){return function(){var De=me.apply(this,arguments),et=De[0],dt=De[1]-st;return[et*Math.cos(dt),et*Math.sin(dt)]}}v.svg.symbol=function(){var me=Vi,De=ci;function et(dt,yt){return(on.get(me.call(this,dt,yt))||ji)(De.call(this,dt,yt))}return et.type=function(dt){return arguments.length?(me=Ir(dt),et):me},et.size=function(dt){return arguments.length?(De=Ir(dt),et):De},et};function ci(){return 64}function Vi(){return"circle"}function ji(me){var De=Math.sqrt(me/Le);return"M0,"+De+"A"+De+","+De+" 0 1,1 0,"+-De+"A"+De+","+De+" 0 1,1 0,"+De+"Z"}var on=v.map({circle:ji,cross:function(me){var De=Math.sqrt(me/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(me){var De=Math.sqrt(me/(2*Kn)),et=De*Kn;return"M0,"+-De+"L"+et+",0 0,"+De+" "+-et+",0Z"},square:function(me){var De=Math.sqrt(me)/2;return"M"+-De+","+-De+"L"+De+","+-De+" "+De+","+De+" "+-De+","+De+"Z"},"triangle-down":function(me){var De=Math.sqrt(me/Sn),et=De*Sn/2;return"M0,"+et+"L"+De+","+-et+" "+-De+","+-et+"Z"},"triangle-up":function(me){var De=Math.sqrt(me/Sn),et=De*Sn/2;return"M0,"+-et+"L"+De+","+et+" "+-De+","+et+"Z"}});v.svg.symbolTypes=on.keys();var Sn=Math.sqrt(3),Kn=Math.tan(30*ot);ae.transition=function(me){for(var De=ds||++Yo,et=ts(me),dt=[],yt,Tt,tr=ul||{time:Date.now(),ease:ql,delay:0,duration:250},zt=-1,_r=this.length;++zt<_r;){dt.push(yt=[]);for(var Gr=this[zt],Xr=-1,wa=Gr.length;++Xr0;)wa[--fi].call(me,Xa);if(za>=1)return tr.event&&tr.event.end.call(me,me.__data__,De),--Tt.count?delete Tt[dt]:delete me[et],1}tr||(zt=yt.time,_r=Tn(pa,0,zt),tr=Tt[dt]={tween:new A,time:zt,timer:_r,delay:yt.delay,duration:yt.duration,ease:yt.ease,index:De},yt=null,++Tt.count)}v.svg.axis=function(){var me=v.scale.linear(),De=tu,et=6,dt=6,yt=3,Tt=[10],tr=null,zt;function _r(Gr){Gr.each(function(){var Xr=v.select(this),wa=this.__chart__||me,pa=this.__chart__=me.copy(),Ja=tr??(pa.ticks?pa.ticks.apply(pa,Tt):pa.domain()),ti=zt??(pa.tickFormat?pa.tickFormat.apply(pa,Tt):F),Sa=Xr.selectAll(".tick").data(Ja,pa),za=Sa.enter().insert("g",".domain").attr("class","tick").style("opacity",Ye),Xa=v.transition(Sa.exit()).style("opacity",Ye).remove(),fi=v.transition(Sa.order()).style("opacity",1),oi=Math.max(et,0)+yt,La,sn=Qi(pa),an=Xr.selectAll(".domain").data([0]),dn=(an.enter().append("path").attr("class","domain"),v.transition(an));za.append("line"),za.append("text");var In=za.select("line"),Jn=fi.select("line"),ro=Sa.select("text").text(ti),$o=za.select("text"),no=fi.select("text"),Xo=De==="top"||De==="left"?-1:1,cl,al,_l,mn;if(De==="bottom"||De==="top"?(La=vu,cl="x",_l="y",al="x2",mn="y2",ro.attr("dy",Xo<0?"0em":".71em").style("text-anchor","middle"),dn.attr("d","M"+sn[0]+","+Xo*dt+"V0H"+sn[1]+"V"+Xo*dt)):(La=wl,cl="y",_l="x",al="y2",mn="x2",ro.attr("dy",".32em").style("text-anchor",Xo<0?"end":"start"),dn.attr("d","M"+Xo*dt+","+sn[0]+"H0V"+sn[1]+"H"+Xo*dt)),In.attr(mn,Xo*et),$o.attr(_l,Xo*oi),Jn.attr(al,0).attr(mn,Xo*et),no.attr(cl,0).attr(_l,Xo*oi),pa.rangeBand){var po=pa,fs=po.rangeBand()/2;wa=pa=function(ms){return po(ms)+fs}}else wa.rangeBand?wa=pa:Xa.call(La,pa,wa);za.call(La,wa,pa),fi.call(La,pa,pa)})}return _r.scale=function(Gr){return arguments.length?(me=Gr,_r):me},_r.orient=function(Gr){return arguments.length?(De=Gr in Ru?Gr+"":tu,_r):De},_r.ticks=function(){return arguments.length?(Tt=S(arguments),_r):Tt},_r.tickValues=function(Gr){return arguments.length?(tr=Gr,_r):tr},_r.tickFormat=function(Gr){return arguments.length?(zt=Gr,_r):zt},_r.tickSize=function(Gr){var Xr=arguments.length;return Xr?(et=+Gr,dt=+arguments[Xr-1],_r):et},_r.innerTickSize=function(Gr){return arguments.length?(et=+Gr,_r):et},_r.outerTickSize=function(Gr){return arguments.length?(dt=+Gr,_r):dt},_r.tickPadding=function(Gr){return arguments.length?(yt=+Gr,_r):yt},_r.tickSubdivide=function(){return arguments.length&&_r},_r};var tu="bottom",Ru={top:1,right:1,bottom:1,left:1};function vu(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate("+(isFinite(yt)?yt:et(dt))+",0)"})}function wl(me,De,et){me.attr("transform",function(dt){var yt=De(dt);return"translate(0,"+(isFinite(yt)?yt:et(dt))+")"})}v.svg.brush=function(){var me=ce(Xr,"brushstart","brush","brushend"),De=null,et=null,dt=[0,0],yt=[0,0],Tt,tr,zt=!0,_r=!0,Gr=uc[0];function Xr(Sa){Sa.each(function(){var za=v.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ti).on("touchstart.brush",ti),Xa=za.selectAll(".background").data([0]);Xa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),za.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var fi=za.selectAll(".resize").data(Gr,F);fi.exit().remove(),fi.enter().append("g").attr("class",function(an){return"resize "+an}).style("cursor",function(an){return fu[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"),fi.style("display",Xr.empty()?"none":null);var oi=v.transition(za),La=v.transition(Xa),sn;De&&(sn=Qi(De),La.attr("x",sn[0]).attr("width",sn[1]-sn[0]),pa(oi)),et&&(sn=Qi(et),La.attr("y",sn[0]).attr("height",sn[1]-sn[0]),Ja(oi)),wa(oi)})}Xr.event=function(Sa){Sa.each(function(){var za=me.of(this,arguments),Xa={x:dt,y:yt,i:Tt,j:tr},fi=this.__chart__||Xa;this.__chart__=Xa,ds?v.select(this).transition().each("start.brush",function(){Tt=fi.i,tr=fi.j,dt=fi.x,yt=fi.y,za({type:"brushstart"})}).tween("brush:brush",function(){var oi=qu(dt,Xa.x),La=qu(yt,Xa.y);return Tt=tr=null,function(sn){dt=Xa.x=oi(sn),yt=Xa.y=La(sn),za({type:"brush",mode:"resize"})}}).each("end.brush",function(){Tt=Xa.i,tr=Xa.j,za({type:"brush",mode:"resize"}),za({type:"brushend"})}):(za({type:"brushstart"}),za({type:"brush",mode:"resize"}),za({type:"brushend"}))})};function wa(Sa){Sa.selectAll(".resize").attr("transform",function(za){return"translate("+dt[+/e$/.test(za)]+","+yt[+/^s/.test(za)]+")"})}function pa(Sa){Sa.select(".extent").attr("x",dt[0]),Sa.selectAll(".extent,.n>rect,.s>rect").attr("width",dt[1]-dt[0])}function Ja(Sa){Sa.select(".extent").attr("y",yt[0]),Sa.selectAll(".extent,.e>rect,.w>rect").attr("height",yt[1]-yt[0])}function ti(){var Sa=this,za=v.select(v.event.target),Xa=me.of(Sa,arguments),fi=v.select(Sa),oi=za.datum(),La=!/^(n|s)$/.test(oi)&&De,sn=!/^(e|w)$/.test(oi)&&et,an=za.classed("extent"),dn=kr(Sa),In,Jn=v.mouse(Sa),ro,$o=v.select(t(Sa)).on("keydown.brush",cl).on("keyup.brush",al);if(v.event.changedTouches?$o.on("touchmove.brush",_l).on("touchend.brush",po):$o.on("mousemove.brush",_l).on("mouseup.brush",po),fi.interrupt().selectAll("*").interrupt(),an)Jn[0]=dt[0]-Jn[0],Jn[1]=yt[0]-Jn[1];else if(oi){var no=+/w$/.test(oi),Xo=+/^n/.test(oi);ro=[dt[1-no]-Jn[0],yt[1-Xo]-Jn[1]],Jn[0]=dt[no],Jn[1]=yt[Xo]}else v.event.altKey&&(In=Jn.slice());fi.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",za.style("cursor")),Xa({type:"brushstart"}),_l();function cl(){v.event.keyCode==32&&(an||(In=null,Jn[0]-=dt[1],Jn[1]-=yt[1],an=2),$())}function al(){v.event.keyCode==32&&an==2&&(Jn[0]+=dt[1],Jn[1]+=yt[1],an=0,$())}function _l(){var fs=v.mouse(Sa),ms=!1;ro&&(fs[0]+=ro[0],fs[1]+=ro[1]),an||(v.event.altKey?(In||(In=[(dt[0]+dt[1])/2,(yt[0]+yt[1])/2]),Jn[0]=dt[+(fs[0]0))return Vt;do Vt.push(Ar=new Date(+St)),Ce(St,Bt),ne(St);while(Ar=kt)for(;ne(kt),!St(kt);)kt.setTime(kt-1)},function(kt,Bt){if(kt>=kt)if(Bt<0)for(;++Bt<=0;)for(;Ce(kt,-1),!St(kt););else for(;--Bt>=0;)for(;Ce(kt,1),!St(kt););})},Ze&&(Je.count=function(St,kt){return _.setTime(+St),S.setTime(+kt),ne(_),ne(S),Math.floor(Ze(_,S))},Je.every=function(St){return St=Math.floor(St),!isFinite(St)||!(St>0)?null:St>1?Je.filter(rt?function(kt){return rt(kt)%St===0}:function(kt){return Je.count(0,kt)%St===0}):Je}),Je}var e=M(function(){},function(ne,Ce){ne.setTime(+ne+Ce)},function(ne,Ce){return Ce-ne});e.every=function(ne){return ne=Math.floor(ne),!isFinite(ne)||!(ne>0)?null:ne>1?M(function(Ce){Ce.setTime(Math.floor(Ce/ne)*ne)},function(Ce,Ze){Ce.setTime(+Ce+Ze*ne)},function(Ce,Ze){return(Ze-Ce)/ne}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=M(function(ne){ne.setTime(ne-ne.getMilliseconds())},function(ne,Ce){ne.setTime(+ne+Ce*r)},function(ne,Ce){return(Ce-ne)/r},function(ne){return ne.getUTCSeconds()}),h=s.range,f=M(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*r)},function(ne,Ce){ne.setTime(+ne+Ce*o)},function(ne,Ce){return(Ce-ne)/o},function(ne){return ne.getMinutes()}),m=f.range,c=M(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*r-ne.getMinutes()*o)},function(ne,Ce){ne.setTime(+ne+Ce*a)},function(ne,Ce){return(Ce-ne)/a},function(ne){return ne.getHours()}),T=c.range,l=M(function(ne){ne.setHours(0,0,0,0)},function(ne,Ce){ne.setDate(ne.getDate()+Ce)},function(ne,Ce){return(Ce-ne-(Ce.getTimezoneOffset()-ne.getTimezoneOffset())*o)/i},function(ne){return ne.getDate()-1}),x=l.range;function w(ne){return M(function(Ce){Ce.setDate(Ce.getDate()-(Ce.getDay()+7-ne)%7),Ce.setHours(0,0,0,0)},function(Ce,Ze){Ce.setDate(Ce.getDate()+Ze*7)},function(Ce,Ze){return(Ze-Ce-(Ze.getTimezoneOffset()-Ce.getTimezoneOffset())*o)/n})}var A=w(0),E=w(1),p=w(2),b=w(3),d=w(4),u=w(5),g=w(6),y=A.range,D=E.range,P=p.range,z=b.range,F=d.range,N=u.range,O=g.range,L=M(function(ne){ne.setDate(1),ne.setHours(0,0,0,0)},function(ne,Ce){ne.setMonth(ne.getMonth()+Ce)},function(ne,Ce){return Ce.getMonth()-ne.getMonth()+(Ce.getFullYear()-ne.getFullYear())*12},function(ne){return ne.getMonth()}),U=L.range,B=M(function(ne){ne.setMonth(0,1),ne.setHours(0,0,0,0)},function(ne,Ce){ne.setFullYear(ne.getFullYear()+Ce)},function(ne,Ce){return Ce.getFullYear()-ne.getFullYear()},function(ne){return ne.getFullYear()});B.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:M(function(Ce){Ce.setFullYear(Math.floor(Ce.getFullYear()/ne)*ne),Ce.setMonth(0,1),Ce.setHours(0,0,0,0)},function(Ce,Ze){Ce.setFullYear(Ce.getFullYear()+Ze*ne)})};var W=B.range,$=M(function(ne){ne.setUTCSeconds(0,0)},function(ne,Ce){ne.setTime(+ne+Ce*o)},function(ne,Ce){return(Ce-ne)/o},function(ne){return ne.getUTCMinutes()}),ue=$.range,ce=M(function(ne){ne.setUTCMinutes(0,0,0)},function(ne,Ce){ne.setTime(+ne+Ce*a)},function(ne,Ce){return(Ce-ne)/a},function(ne){return ne.getUTCHours()}),de=ce.range,Y=M(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCDate(ne.getUTCDate()+Ce)},function(ne,Ce){return(Ce-ne)/i},function(ne){return ne.getUTCDate()-1}),X=Y.range;function Q(ne){return M(function(Ce){Ce.setUTCDate(Ce.getUTCDate()-(Ce.getUTCDay()+7-ne)%7),Ce.setUTCHours(0,0,0,0)},function(Ce,Ze){Ce.setUTCDate(Ce.getUTCDate()+Ze*7)},function(Ce,Ze){return(Ze-Ce)/n})}var V=Q(0),le=Q(1),ae=Q(2),j=Q(3),ee=Q(4),te=Q(5),pe=Q(6),we=V.range,Se=le.range,Re=ae.range,Pe=j.range,je=ee.range,at=te.range,nt=pe.range,tt=M(function(ne){ne.setUTCDate(1),ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCMonth(ne.getUTCMonth()+Ce)},function(ne,Ce){return Ce.getUTCMonth()-ne.getUTCMonth()+(Ce.getUTCFullYear()-ne.getUTCFullYear())*12},function(ne){return ne.getUTCMonth()}),Ve=tt.range,he=M(function(ne){ne.setUTCMonth(0,1),ne.setUTCHours(0,0,0,0)},function(ne,Ce){ne.setUTCFullYear(ne.getUTCFullYear()+Ce)},function(ne,Ce){return Ce.getUTCFullYear()-ne.getUTCFullYear()},function(ne){return ne.getUTCFullYear()});he.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:M(function(Ce){Ce.setUTCFullYear(Math.floor(Ce.getUTCFullYear()/ne)*ne),Ce.setUTCMonth(0,1),Ce.setUTCHours(0,0,0,0)},function(Ce,Ze){Ce.setUTCFullYear(Ce.getUTCFullYear()+Ze*ne)})};var se=he.range;v.timeDay=l,v.timeDays=x,v.timeFriday=u,v.timeFridays=N,v.timeHour=c,v.timeHours=T,v.timeInterval=M,v.timeMillisecond=e,v.timeMilliseconds=t,v.timeMinute=f,v.timeMinutes=m,v.timeMonday=E,v.timeMondays=D,v.timeMonth=L,v.timeMonths=U,v.timeSaturday=g,v.timeSaturdays=O,v.timeSecond=s,v.timeSeconds=h,v.timeSunday=A,v.timeSundays=y,v.timeThursday=d,v.timeThursdays=F,v.timeTuesday=p,v.timeTuesdays=P,v.timeWednesday=b,v.timeWednesdays=z,v.timeWeek=A,v.timeWeeks=y,v.timeYear=B,v.timeYears=W,v.utcDay=Y,v.utcDays=X,v.utcFriday=te,v.utcFridays=at,v.utcHour=ce,v.utcHours=de,v.utcMillisecond=e,v.utcMilliseconds=t,v.utcMinute=$,v.utcMinutes=ue,v.utcMonday=le,v.utcMondays=Se,v.utcMonth=tt,v.utcMonths=Ve,v.utcSaturday=pe,v.utcSaturdays=nt,v.utcSecond=s,v.utcSeconds=h,v.utcSunday=V,v.utcSundays=we,v.utcThursday=ee,v.utcThursdays=je,v.utcTuesday=ae,v.utcTuesdays=Re,v.utcWednesday=j,v.utcWednesdays=Pe,v.utcWeek=V,v.utcWeeks=we,v.utcYear=he,v.utcYears=se,Object.defineProperty(v,"__esModule",{value:!0})})}}),Zv=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,dd()):(v=v||self,_(v.d3=v.d3||{},v.d3))})(Z,function(v,_){"use strict";function S(Fe){if(0<=Fe.y&&Fe.y<100){var Ye=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return Ye.setFullYear(Fe.y),Ye}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function M(Fe){if(0<=Fe.y&&Fe.y<100){var Ye=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return Ye.setUTCFullYear(Fe.y),Ye}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function e(Fe,Ye,Ae){return{y:Fe,m:Ye,d:Ae,H:0,M:0,S:0,L:0}}function t(Fe){var Ye=Fe.dateTime,Ae=Fe.date,Le=Fe.time,We=Fe.periods,Ke=Fe.days,st=Fe.shortDays,ot=Fe.months,Ut=Fe.shortMonths,Ct=h(We),Pt=f(We),jt=h(Ke),cr=f(Ke),or=h(st),nr=f(st),Pr=h(ot),_a=f(ot),Fa=h(Ut),Ra=f(Ut),qa={a:$a,A:Za,b:ri,B:pi,c:null,d:L,e:L,f:ue,H:U,I:B,j:W,L:$,m:ce,M:de,p:Ia,q:rn,Q:kt,s:Bt,S:Y,u:X,U:Q,V,w:le,W:ae,x:null,X:null,y:j,Y:ee,Z:te,"%":St},Wa={a:tn,A:cn,b:xt,B:ut,c:null,d:pe,e:pe,f:je,H:we,I:Se,j:Re,L:Pe,m:at,M:nt,p:Or,q:Cr,Q:kt,s:Bt,S:tt,u:Ve,U:he,V:se,w:ne,W:Ce,x:null,X:null,y:Ze,Y:rt,Z:Je,"%":St},Ca={a:Zt,A:Jt,b:Fr,B:ta,c:ra,d,e:d,f:z,H:g,I:g,j:u,L:P,m:b,M:y,p:Rt,q:p,Q:N,s:O,S:D,u:c,U:T,V:l,w:m,W:x,x:ca,X:Ba,y:A,Y:w,Z:E,"%":F};qa.x=hi(Ae,qa),qa.X=hi(Le,qa),qa.c=hi(Ye,qa),Wa.x=hi(Ae,Wa),Wa.X=hi(Le,Wa),Wa.c=hi(Ye,Wa);function hi(wr,Rr){return function(Nr){var Hr=[],gt=-1,Kt=0,mr=wr.length,Ir,va,Pa;for(Nr instanceof Date||(Nr=new Date(+Nr));++gt53)return null;"w"in Hr||(Hr.w=1),"Z"in Hr?(Kt=M(e(Hr.y,0,1)),mr=Kt.getUTCDay(),Kt=mr>4||mr===0?_.utcMonday.ceil(Kt):_.utcMonday(Kt),Kt=_.utcDay.offset(Kt,(Hr.V-1)*7),Hr.y=Kt.getUTCFullYear(),Hr.m=Kt.getUTCMonth(),Hr.d=Kt.getUTCDate()+(Hr.w+6)%7):(Kt=S(e(Hr.y,0,1)),mr=Kt.getDay(),Kt=mr>4||mr===0?_.timeMonday.ceil(Kt):_.timeMonday(Kt),Kt=_.timeDay.offset(Kt,(Hr.V-1)*7),Hr.y=Kt.getFullYear(),Hr.m=Kt.getMonth(),Hr.d=Kt.getDate()+(Hr.w+6)%7)}else("W"in Hr||"U"in Hr)&&("w"in Hr||(Hr.w="u"in Hr?Hr.u%7:"W"in Hr?1:0),mr="Z"in Hr?M(e(Hr.y,0,1)).getUTCDay():S(e(Hr.y,0,1)).getDay(),Hr.m=0,Hr.d="W"in Hr?(Hr.w+6)%7+Hr.W*7-(mr+5)%7:Hr.w+Hr.U*7-(mr+6)%7);return"Z"in Hr?(Hr.H+=Hr.Z/100|0,Hr.M+=Hr.Z%100,M(Hr)):S(Hr)}}function Yt(wr,Rr,Nr,Hr){for(var gt=0,Kt=Rr.length,mr=Nr.length,Ir,va;gt=mr)return-1;if(Ir=Rr.charCodeAt(gt++),Ir===37){if(Ir=Rr.charAt(gt++),va=Ca[Ir in r?Rr.charAt(gt++):Ir],!va||(Hr=va(wr,Nr,Hr))<0)return-1}else if(Ir!=Nr.charCodeAt(Hr++))return-1}return Hr}function Rt(wr,Rr,Nr){var Hr=Ct.exec(Rr.slice(Nr));return Hr?(wr.p=Pt[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Zt(wr,Rr,Nr){var Hr=or.exec(Rr.slice(Nr));return Hr?(wr.w=nr[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Jt(wr,Rr,Nr){var Hr=jt.exec(Rr.slice(Nr));return Hr?(wr.w=cr[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function Fr(wr,Rr,Nr){var Hr=Fa.exec(Rr.slice(Nr));return Hr?(wr.m=Ra[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function ta(wr,Rr,Nr){var Hr=Pr.exec(Rr.slice(Nr));return Hr?(wr.m=_a[Hr[0].toLowerCase()],Nr+Hr[0].length):-1}function ra(wr,Rr,Nr){return Yt(wr,Ye,Rr,Nr)}function ca(wr,Rr,Nr){return Yt(wr,Ae,Rr,Nr)}function Ba(wr,Rr,Nr){return Yt(wr,Le,Rr,Nr)}function $a(wr){return st[wr.getDay()]}function Za(wr){return Ke[wr.getDay()]}function ri(wr){return Ut[wr.getMonth()]}function pi(wr){return ot[wr.getMonth()]}function Ia(wr){return We[+(wr.getHours()>=12)]}function rn(wr){return 1+~~(wr.getMonth()/3)}function tn(wr){return st[wr.getUTCDay()]}function cn(wr){return Ke[wr.getUTCDay()]}function xt(wr){return Ut[wr.getUTCMonth()]}function ut(wr){return ot[wr.getUTCMonth()]}function Or(wr){return We[+(wr.getUTCHours()>=12)]}function Cr(wr){return 1+~~(wr.getUTCMonth()/3)}return{format:function(wr){var Rr=hi(wr+="",qa);return Rr.toString=function(){return wr},Rr},parse:function(wr){var Rr=wi(wr+="",!1);return Rr.toString=function(){return wr},Rr},utcFormat:function(wr){var Rr=hi(wr+="",Wa);return Rr.toString=function(){return wr},Rr},utcParse:function(wr){var Rr=wi(wr+="",!0);return Rr.toString=function(){return wr},Rr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Fe,Ye,Ae){var Le=Fe<0?"-":"",We=(Le?-Fe:Fe)+"",Ke=We.length;return Le+(Ke68?1900:2e3),Ae+Le[0].length):-1}function E(Fe,Ye,Ae){var Le=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ye.slice(Ae,Ae+6));return Le?(Fe.Z=Le[1]?0:-(Le[2]+(Le[3]||"00")),Ae+Le[0].length):-1}function p(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+1));return Le?(Fe.q=Le[0]*3-3,Ae+Le[0].length):-1}function b(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.m=Le[0]-1,Ae+Le[0].length):-1}function d(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.d=+Le[0],Ae+Le[0].length):-1}function u(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+3));return Le?(Fe.m=0,Fe.d=+Le[0],Ae+Le[0].length):-1}function g(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.H=+Le[0],Ae+Le[0].length):-1}function y(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.M=+Le[0],Ae+Le[0].length):-1}function D(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+2));return Le?(Fe.S=+Le[0],Ae+Le[0].length):-1}function P(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+3));return Le?(Fe.L=+Le[0],Ae+Le[0].length):-1}function z(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae,Ae+6));return Le?(Fe.L=Math.floor(Le[0]/1e3),Ae+Le[0].length):-1}function F(Fe,Ye,Ae){var Le=a.exec(Ye.slice(Ae,Ae+1));return Le?Ae+Le[0].length:-1}function N(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae));return Le?(Fe.Q=+Le[0],Ae+Le[0].length):-1}function O(Fe,Ye,Ae){var Le=o.exec(Ye.slice(Ae));return Le?(Fe.s=+Le[0],Ae+Le[0].length):-1}function L(Fe,Ye){return n(Fe.getDate(),Ye,2)}function U(Fe,Ye){return n(Fe.getHours(),Ye,2)}function B(Fe,Ye){return n(Fe.getHours()%12||12,Ye,2)}function W(Fe,Ye){return n(1+_.timeDay.count(_.timeYear(Fe),Fe),Ye,3)}function $(Fe,Ye){return n(Fe.getMilliseconds(),Ye,3)}function ue(Fe,Ye){return $(Fe,Ye)+"000"}function ce(Fe,Ye){return n(Fe.getMonth()+1,Ye,2)}function de(Fe,Ye){return n(Fe.getMinutes(),Ye,2)}function Y(Fe,Ye){return n(Fe.getSeconds(),Ye,2)}function X(Fe){var Ye=Fe.getDay();return Ye===0?7:Ye}function Q(Fe,Ye){return n(_.timeSunday.count(_.timeYear(Fe)-1,Fe),Ye,2)}function V(Fe,Ye){var Ae=Fe.getDay();return Fe=Ae>=4||Ae===0?_.timeThursday(Fe):_.timeThursday.ceil(Fe),n(_.timeThursday.count(_.timeYear(Fe),Fe)+(_.timeYear(Fe).getDay()===4),Ye,2)}function le(Fe){return Fe.getDay()}function ae(Fe,Ye){return n(_.timeMonday.count(_.timeYear(Fe)-1,Fe),Ye,2)}function j(Fe,Ye){return n(Fe.getFullYear()%100,Ye,2)}function ee(Fe,Ye){return n(Fe.getFullYear()%1e4,Ye,4)}function te(Fe){var Ye=Fe.getTimezoneOffset();return(Ye>0?"-":(Ye*=-1,"+"))+n(Ye/60|0,"0",2)+n(Ye%60,"0",2)}function pe(Fe,Ye){return n(Fe.getUTCDate(),Ye,2)}function we(Fe,Ye){return n(Fe.getUTCHours(),Ye,2)}function Se(Fe,Ye){return n(Fe.getUTCHours()%12||12,Ye,2)}function Re(Fe,Ye){return n(1+_.utcDay.count(_.utcYear(Fe),Fe),Ye,3)}function Pe(Fe,Ye){return n(Fe.getUTCMilliseconds(),Ye,3)}function je(Fe,Ye){return Pe(Fe,Ye)+"000"}function at(Fe,Ye){return n(Fe.getUTCMonth()+1,Ye,2)}function nt(Fe,Ye){return n(Fe.getUTCMinutes(),Ye,2)}function tt(Fe,Ye){return n(Fe.getUTCSeconds(),Ye,2)}function Ve(Fe){var Ye=Fe.getUTCDay();return Ye===0?7:Ye}function he(Fe,Ye){return n(_.utcSunday.count(_.utcYear(Fe)-1,Fe),Ye,2)}function se(Fe,Ye){var Ae=Fe.getUTCDay();return Fe=Ae>=4||Ae===0?_.utcThursday(Fe):_.utcThursday.ceil(Fe),n(_.utcThursday.count(_.utcYear(Fe),Fe)+(_.utcYear(Fe).getUTCDay()===4),Ye,2)}function ne(Fe){return Fe.getUTCDay()}function Ce(Fe,Ye){return n(_.utcMonday.count(_.utcYear(Fe)-1,Fe),Ye,2)}function Ze(Fe,Ye){return n(Fe.getUTCFullYear()%100,Ye,2)}function rt(Fe,Ye){return n(Fe.getUTCFullYear()%1e4,Ye,4)}function Je(){return"+0000"}function St(){return"%"}function kt(Fe){return+Fe}function Bt(Fe){return Math.floor(+Fe/1e3)}var Vt;Ar({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 Ar(Fe){return Vt=t(Fe),v.timeFormat=Vt.format,v.timeParse=Vt.parse,v.utcFormat=Vt.utcFormat,v.utcParse=Vt.utcParse,Vt}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function qr(Fe){return Fe.toISOString()}var kr=Date.prototype.toISOString?qr:v.utcFormat(vr);function Ur(Fe){var Ye=new Date(Fe);return isNaN(Ye)?null:Ye}var _t=+new Date("2000-01-01T00:00:00.000Z")?Ur:v.utcParse(vr);v.isoFormat=kr,v.isoParse=_t,v.timeFormatDefaultLocale=Ar,v.timeFormatLocale=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),YA=He({"node_modules/d3-format/dist/d3-format.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=typeof globalThis<"u"?globalThis:v||self,_(v.d3=v.d3||{}))})(Z,function(v){"use strict";function _(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function S(b,d){if((u=(b=d?b.toExponential(d-1):b.toExponential()).indexOf("e"))<0)return null;var u,g=b.slice(0,u);return[g.length>1?g[0]+g.slice(2):g,+b.slice(u+1)]}function M(b){return b=S(Math.abs(b)),b?b[1]:NaN}function e(b,d){return function(u,g){for(var y=u.length,D=[],P=0,z=b[0],F=0;y>0&&z>0&&(F+z+1>g&&(z=Math.max(1,g-F)),D.push(u.substring(y-=z,y+z)),!((F+=z+1)>g));)z=b[P=(P+1)%b.length];return D.reverse().join(d)}}function t(b){return function(d){return d.replace(/[0-9]/g,function(u){return b[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(b){if(!(d=r.exec(b)))throw new Error("invalid format: "+b);var d;return new a({fill:d[1],align:d[2],sign:d[3],symbol:d[4],zero:d[5],width:d[6],comma:d[7],precision:d[8]&&d[8].slice(1),trim:d[9],type:d[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 d=b.length,u=1,g=-1,y;u0&&(g=0);break}return g>0?b.slice(0,g)+b.slice(y+1):b}var n;function s(b,d){var u=S(b,d);if(!u)return b+"";var g=u[0],y=u[1],D=y-(n=Math.max(-8,Math.min(8,Math.floor(y/3)))*3)+1,P=g.length;return D===P?g:D>P?g+new Array(D-P+1).join("0"):D>0?g.slice(0,D)+"."+g.slice(D):"0."+new Array(1-D).join("0")+S(b,Math.max(0,d+D-1))[0]}function h(b,d){var u=S(b,d);if(!u)return b+"";var g=u[0],y=u[1];return y<0?"0."+new Array(-y).join("0")+g:g.length>y+1?g.slice(0,y+1)+"."+g.slice(y+1):g+new Array(y-g.length+2).join("0")}var f={"%":function(b,d){return(b*100).toFixed(d)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:_,e:function(b,d){return b.toExponential(d)},f:function(b,d){return b.toFixed(d)},g:function(b,d){return b.toPrecision(d)},o:function(b){return Math.round(b).toString(8)},p:function(b,d){return h(b*100,d)},r:h,s,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function m(b){return b}var c=Array.prototype.map,T=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function l(b){var d=b.grouping===void 0||b.thousands===void 0?m:e(c.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",g=b.currency===void 0?"":b.currency[1]+"",y=b.decimal===void 0?".":b.decimal+"",D=b.numerals===void 0?m:t(c.call(b.numerals,String)),P=b.percent===void 0?"%":b.percent+"",z=b.minus===void 0?"-":b.minus+"",F=b.nan===void 0?"NaN":b.nan+"";function N(L){L=o(L);var U=L.fill,B=L.align,W=L.sign,$=L.symbol,ue=L.zero,ce=L.width,de=L.comma,Y=L.precision,X=L.trim,Q=L.type;Q==="n"?(de=!0,Q="g"):f[Q]||(Y===void 0&&(Y=12),X=!0,Q="g"),(ue||U==="0"&&B==="=")&&(ue=!0,U="0",B="=");var V=$==="$"?u:$==="#"&&/[boxX]/.test(Q)?"0"+Q.toLowerCase():"",le=$==="$"?g:/[%p]/.test(Q)?P:"",ae=f[Q],j=/[defgprs%]/.test(Q);Y=Y===void 0?6:/[gprs]/.test(Q)?Math.max(1,Math.min(21,Y)):Math.max(0,Math.min(20,Y));function ee(te){var pe=V,we=le,Se,Re,Pe;if(Q==="c")we=ae(te)+we,te="";else{te=+te;var je=te<0||1/te<0;if(te=isNaN(te)?F:ae(Math.abs(te),Y),X&&(te=i(te)),je&&+te==0&&W!=="+"&&(je=!1),pe=(je?W==="("?W:z:W==="-"||W==="("?"":W)+pe,we=(Q==="s"?T[8+n/3]:"")+we+(je&&W==="("?")":""),j){for(Se=-1,Re=te.length;++SePe||Pe>57){we=(Pe===46?y+te.slice(Se+1):te.slice(Se))+we,te=te.slice(0,Se);break}}}de&&!ue&&(te=d(te,1/0));var at=pe.length+te.length+we.length,nt=at>1)+pe+te+we+nt.slice(at);break;default:te=nt+pe+te+we;break}return D(te)}return ee.toString=function(){return L+""},ee}function O(L,U){var B=N((L=o(L),L.type="f",L)),W=Math.max(-8,Math.min(8,Math.floor(M(U)/3)))*3,$=Math.pow(10,-W),ue=T[8+W/3];return function(ce){return B($*ce)+ue}}return{format:N,formatPrefix:O}}var x;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return x=l(b),v.format=x.format,v.formatPrefix=x.formatPrefix,x}function A(b){return Math.max(0,-M(Math.abs(b)))}function E(b,d){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(M(d)/3)))*3-M(Math.abs(b)))}function p(b,d){return b=Math.abs(b),d=Math.abs(d)-b,Math.max(0,M(d)-M(b))+1}v.FormatSpecifier=a,v.formatDefaultLocale=w,v.formatLocale=l,v.formatSpecifier=o,v.precisionFixed=A,v.precisionPrefix=E,v.precisionRound=p,Object.defineProperty(v,"__esModule",{value:!0})})}}),l7=He({"node_modules/is-string-blank/index.js"(Z,q){"use strict";q.exports=function(v){for(var _=v.length,S,M=0;M<_;M++)if(S=v.charCodeAt(M),(S<9||S>13)&&S!==32&&S!==133&&S!==160&&S!==5760&&S!==6158&&(S<8192||S>8205)&&S!==8232&&S!==8233&&S!==8239&&S!==8287&&S!==8288&&S!==12288&&S!==65279)return!1;return!0}}}),ns=He({"node_modules/fast-isnumeric/index.js"(Z,q){"use strict";var v=l7();q.exports=function(_){var S=typeof _;if(S==="string"){var M=_;if(_=+_,_===0&&v(M))return!1}else if(S!=="number")return!1;return _-_<1}}}),Gs=He({"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"}}}),KA=He({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=typeof globalThis<"u"?globalThis:v||self,_(v["base64-arraybuffer"]={}))})(Z,function(v){"use strict";for(var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),M=0;M<_.length;M++)S[_.charCodeAt(M)]=M;var e=function(r){var o=new Uint8Array(r),a,i=o.length,n="";for(a=0;a>2],n+=_[(o[a]&3)<<4|o[a+1]>>4],n+=_[(o[a+1]&15)<<2|o[a+2]>>6],n+=_[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,h,f,m;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var c=new ArrayBuffer(o),T=new Uint8Array(c);for(i=0;i>4,T[n++]=(h&15)<<4|f>>2,T[n++]=(f&3)<<6|m&63;return c};v.decode=t,v.encode=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),Yv=He({"src/lib/is_plain_object.js"(Z,q){"use strict";q.exports=function(_){return window&&window.process&&window.process.versions?Object.prototype.toString.call(_)==="[object Object]":Object.prototype.toString.call(_)==="[object Object]"&&Object.getPrototypeOf(_).hasOwnProperty("hasOwnProperty")}}}),hp=He({"src/lib/array.js"(Z){"use strict";var q=KA().decode,v=Yv(),_=Array.isArray,S=ArrayBuffer,M=DataView;function e(s){return S.isView(s)&&!(s instanceof M)}Z.isTypedArray=e;function t(s){return _(s)||e(s)}Z.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Z.isArray1D=r,Z.ensureArray=function(s,h){return _(s)||(s=[]),s.length=h,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 h=[],f=i(s),m=f.dtype,c=o[m];if(!c)throw new Error('Error in dtype: "'+m+'"');var T=c.BYTES_PER_ELEMENT,l=f.bdata;a(l)||(l=q(l));var x=f.shape===void 0?[l.byteLength/T]:(""+f.shape).split(",");x.reverse();var w=x.length,A,E,p=+x[0],b=T*p,d=0;if(w===1)h=new c(l);else if(w===2)for(A=+x[1],E=0;E2)return c[A]=c[A]|e,x.set(w,null);if(l){for(h=A;h0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(M[0],M[1]))/Math.LN10;return v(e)||(e=Math.log(Math.max(M[0],M[1]))/Math.LN10-6),e}}}),f7=He({"src/lib/relink_private.js"(Z,q){"use strict";var v=hp().isArrayOrTypedArray,_=Yv();q.exports=function S(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(v(r)&&v(o)&&_(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;iM/2?S-Math.round(S/M)*M:S}q.exports={mod:v,modHalf:_}}}),Ch=He({"node_modules/tinycolor2/tinycolor.js"(Z,q){(function(v){var _=/^\s+/,S=/\s+$/,M=0,e=v.round,t=v.min,r=v.max,o=v.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 te=i(j);this._originalInput=j,this._r=te.r,this._g=te.g,this._b=te.b,this._a=te.a,this._roundA=e(100*this._a)/100,this._format=ee.format||te.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=te.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,te,pe,we,Se,Re;return ee=j.r/255,te=j.g/255,pe=j.b/255,ee<=.03928?we=ee/12.92:we=v.pow((ee+.055)/1.055,2.4),te<=.03928?Se=te/12.92:Se=v.pow((te+.055)/1.055,2.4),pe<=.03928?Re=pe/12.92:Re=v.pow((pe+.055)/1.055,2.4),.2126*we+.7152*Se+.0722*Re},setAlpha:function(j){return this._a=L(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),te=e(j.s*100),pe=e(j.v*100);return this._a==1?"hsv("+ee+", "+te+"%, "+pe+"%)":"hsva("+ee+", "+te+"%, "+pe+"%, "+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),te=e(j.s*100),pe=e(j.l*100);return this._a==1?"hsl("+ee+", "+te+"%, "+pe+"%)":"hsla("+ee+", "+te+"%, "+pe+"%, "+this._roundA+")"},toHex:function(j){return c(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(U(this._r,255)*100)+"%",g:e(U(this._g,255)*100)+"%",b:e(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(U(this._r,255)*100)+"%, "+e(U(this._g,255)*100)+"%, "+e(U(this._b,255)*100)+"%)":"rgba("+e(U(this._r,255)*100)+"%, "+e(U(this._g,255)*100)+"%, "+e(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:N[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(j){var ee="#"+l(this._r,this._g,this._b,this._a),te=ee,pe=this._gradientType?"GradientType = 1, ":"";if(j){var we=a(j);te="#"+l(we._r,we._g,we._b,we._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+ee+",endColorstr="+te+")"},toString:function(j){var ee=!!j;j=j||this._format;var te=!1,pe=this._a<1&&this._a>=0,we=!ee&&pe&&(j==="hex"||j==="hex6"||j==="hex3"||j==="hex4"||j==="hex8"||j==="name");return we?j==="name"&&this._a===0?this.toName():this.toRgbString():(j==="rgb"&&(te=this.toRgbString()),j==="prgb"&&(te=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(te=this.toHexString()),j==="hex3"&&(te=this.toHexString(!0)),j==="hex4"&&(te=this.toHex8String(!0)),j==="hex8"&&(te=this.toHex8String()),j==="name"&&(te=this.toName()),j==="hsl"&&(te=this.toHslString()),j==="hsv"&&(te=this.toHsvString()),te||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(j,ee){var te=j.apply(null,[this].concat([].slice.call(ee)));return this._r=te._r,this._g=te._g,this._b=te._b,this.setAlpha(te._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(p,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(x,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(j,ee){return j.apply(null,[this].concat([].slice.call(ee)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},a.fromRatio=function(j,ee){if(typeof j=="object"){var te={};for(var pe in j)j.hasOwnProperty(pe)&&(pe==="a"?te[pe]=j[pe]:te[pe]=de(j[pe]));j=te}return a(j,ee)};function i(j){var ee={r:0,g:0,b:0},te=1,pe=null,we=null,Se=null,Re=!1,Pe=!1;return typeof j=="string"&&(j=le(j)),typeof j=="object"&&(V(j.r)&&V(j.g)&&V(j.b)?(ee=n(j.r,j.g,j.b),Re=!0,Pe=String(j.r).substr(-1)==="%"?"prgb":"rgb"):V(j.h)&&V(j.s)&&V(j.v)?(pe=de(j.s),we=de(j.v),ee=m(j.h,pe,we),Re=!0,Pe="hsv"):V(j.h)&&V(j.s)&&V(j.l)&&(pe=de(j.s),Se=de(j.l),ee=h(j.h,pe,Se),Re=!0,Pe="hsl"),j.hasOwnProperty("a")&&(te=j.a)),te=L(te),{ok:Re,format:j.format||Pe,r:t(255,r(ee.r,0)),g:t(255,r(ee.g,0)),b:t(255,r(ee.b,0)),a:te}}function n(j,ee,te){return{r:U(j,255)*255,g:U(ee,255)*255,b:U(te,255)*255}}function s(j,ee,te){j=U(j,255),ee=U(ee,255),te=U(te,255);var pe=r(j,ee,te),we=t(j,ee,te),Se,Re,Pe=(pe+we)/2;if(pe==we)Se=Re=0;else{var je=pe-we;switch(Re=Pe>.5?je/(2-pe-we):je/(pe+we),pe){case j:Se=(ee-te)/je+(ee1&&(tt-=1),tt<1/6?at+(nt-at)*6*tt:tt<1/2?nt:tt<2/3?at+(nt-at)*(2/3-tt)*6:at}if(ee===0)pe=we=Se=te;else{var Pe=te<.5?te*(1+ee):te+ee-te*ee,je=2*te-Pe;pe=Re(je,Pe,j+1/3),we=Re(je,Pe,j),Se=Re(je,Pe,j-1/3)}return{r:pe*255,g:we*255,b:Se*255}}function f(j,ee,te){j=U(j,255),ee=U(ee,255),te=U(te,255);var pe=r(j,ee,te),we=t(j,ee,te),Se,Re,Pe=pe,je=pe-we;if(Re=pe===0?0:je/pe,pe==we)Se=0;else{switch(pe){case j:Se=(ee-te)/je+(ee>1)+720)%360;--ee;)pe.h=(pe.h+we)%360,Se.push(a(pe));return Se}function z(j,ee){ee=ee||6;for(var te=a(j).toHsv(),pe=te.h,we=te.s,Se=te.v,Re=[],Pe=1/ee;ee--;)Re.push(a({h:pe,s:we,v:Se})),Se=(Se+Pe)%1;return Re}a.mix=function(j,ee,te){te=te===0?0:te||50;var pe=a(j).toRgb(),we=a(ee).toRgb(),Se=te/100,Re={r:(we.r-pe.r)*Se+pe.r,g:(we.g-pe.g)*Se+pe.g,b:(we.b-pe.b)*Se+pe.b,a:(we.a-pe.a)*Se+pe.a};return a(Re)},a.readability=function(j,ee){var te=a(j),pe=a(ee);return(v.max(te.getLuminance(),pe.getLuminance())+.05)/(v.min(te.getLuminance(),pe.getLuminance())+.05)},a.isReadable=function(j,ee,te){var pe=a.readability(j,ee),we,Se;switch(Se=!1,we=ae(te),we.level+we.size){case"AAsmall":case"AAAlarge":Se=pe>=4.5;break;case"AAlarge":Se=pe>=3;break;case"AAAsmall":Se=pe>=7;break}return Se},a.mostReadable=function(j,ee,te){var pe=null,we=0,Se,Re,Pe,je;te=te||{},Re=te.includeFallbackColors,Pe=te.level,je=te.size;for(var at=0;atwe&&(we=Se,pe=a(ee[at]));return a.isReadable(j,pe,{level:Pe,size:je})||!Re?pe:(te.includeFallbackColors=!1,a.mostReadable(j,["#fff","#000"],te))};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"},N=a.hexNames=O(F);function O(j){var ee={};for(var te in j)j.hasOwnProperty(te)&&(ee[j[te]]=te);return ee}function L(j){return j=parseFloat(j),(isNaN(j)||j<0||j>1)&&(j=1),j}function U(j,ee){$(j)&&(j="100%");var te=ue(j);return j=t(ee,r(0,parseFloat(j))),te&&(j=parseInt(j*ee,10)/100),v.abs(j-ee)<1e-6?1:j%ee/parseFloat(ee)}function B(j){return t(1,r(0,j))}function W(j){return parseInt(j,16)}function $(j){return typeof j=="string"&&j.indexOf(".")!=-1&&parseFloat(j)===1}function ue(j){return typeof j=="string"&&j.indexOf("%")!=-1}function ce(j){return j.length==1?"0"+j:""+j}function de(j){return j<=1&&(j=j*100+"%"),j}function Y(j){return v.round(parseFloat(j)*255).toString(16)}function X(j){return W(j)/255}var Q=function(){var j="[-\\+]?\\d+%?",ee="[-\\+]?\\d*\\.\\d+%?",te="(?:"+ee+")|(?:"+j+")",pe="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?",we="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?";return{CSS_UNIT:new RegExp(te),rgb:new RegExp("rgb"+pe),rgba:new RegExp("rgba"+we),hsl:new RegExp("hsl"+pe),hsla:new RegExp("hsla"+we),hsv:new RegExp("hsv"+pe),hsva:new RegExp("hsva"+we),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function V(j){return!!Q.CSS_UNIT.exec(j)}function le(j){j=j.replace(_,"").replace(S,"").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 te;return(te=Q.rgb.exec(j))?{r:te[1],g:te[2],b:te[3]}:(te=Q.rgba.exec(j))?{r:te[1],g:te[2],b:te[3],a:te[4]}:(te=Q.hsl.exec(j))?{h:te[1],s:te[2],l:te[3]}:(te=Q.hsla.exec(j))?{h:te[1],s:te[2],l:te[3],a:te[4]}:(te=Q.hsv.exec(j))?{h:te[1],s:te[2],v:te[3]}:(te=Q.hsva.exec(j))?{h:te[1],s:te[2],v:te[3],a:te[4]}:(te=Q.hex8.exec(j))?{r:W(te[1]),g:W(te[2]),b:W(te[3]),a:X(te[4]),format:ee?"name":"hex8"}:(te=Q.hex6.exec(j))?{r:W(te[1]),g:W(te[2]),b:W(te[3]),format:ee?"name":"hex"}:(te=Q.hex4.exec(j))?{r:W(te[1]+""+te[1]),g:W(te[2]+""+te[2]),b:W(te[3]+""+te[3]),a:X(te[4]+""+te[4]),format:ee?"name":"hex8"}:(te=Q.hex3.exec(j))?{r:W(te[1]+""+te[1]),g:W(te[2]+""+te[2]),b:W(te[3]+""+te[3]),format:ee?"name":"hex"}:!1}function ae(j){var ee,te;return j=j||{level:"AA",size:"small"},ee=(j.level||"AA").toUpperCase(),te=(j.size||"small").toLowerCase(),ee!=="AA"&&ee!=="AAA"&&(ee="AA"),te!=="small"&&te!=="large"&&(te="small"),{level:ee,size:te}}typeof q<"u"&&q.exports?q.exports=a:window.tinycolor=a})(Math)}}),rs=He({"src/lib/extend.js"(Z){"use strict";var q=Yv(),v=Array.isArray;function _(M,e){var t,r;for(t=0;t=0)))return a;if(f===3)s[f]>1&&(s[f]=1);else if(s[f]>=1)return a}var m=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return h?"rgba("+m+", "+s[3]+")":"rgb("+m+")"}}}),Km=He({"src/constants/interactions.js"(Z,q){"use strict";q.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=He({"src/lib/regex.js"(Z){"use strict";Z.counter=function(q,v,_,S){var M=(v||"")+(_?"":"$"),e=S===!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)}}}),h7=He({"src/lib/coerce.js"(Z){"use strict";var q=ns(),v=Ch(),_=rs().extendFlat,S=au(),M=W0(),e=$n(),t=Km().DESELECTDIM,r=b_(),o=Jy().counter,a=Yy().modHalf,i=hp().isArrayOrTypedArray,n=hp().isTypedArraySpec,s=hp().decodeTypedArraySpec;Z.valObjectMeta={data_array:{coerceFunction:function(f,m,c){m.set(i(f)?f:n(f)?s(f):c)}},enumerated:{coerceFunction:function(f,m,c,T){T.coerceNumber&&(f=+f),T.values.indexOf(f)===-1?m.set(c):m.set(f)},validateFunction:function(f,m){m.coerceNumber&&(f=+f);for(var c=m.values,T=0;Tx===!0||x===!1;l(f)||T.arrayOk&&Array.isArray(f)&&f.length>0&&f.every(l)?m.set(f):m.set(c)}},number:{coerceFunction:function(f,m,c,T){n(f)&&(f=s(f)),!q(f)||T.min!==void 0&&fT.max?m.set(c):m.set(+f)}},integer:{coerceFunction:function(f,m,c,T){if((T.extras||[]).indexOf(f)!==-1){m.set(f);return}n(f)&&(f=s(f)),f%1||!q(f)||T.min!==void 0&&fT.max?m.set(c):m.set(+f)}},string:{coerceFunction:function(f,m,c,T){if(typeof f!="string"){var l=typeof f=="number";T.strict===!0||!l?m.set(c):m.set(String(f))}else T.noBlank&&!f?m.set(c):m.set(f)}},color:{coerceFunction:function(f,m,c){n(f)&&(f=s(f)),v(f).isValid()?m.set(f):m.set(c)}},colorlist:{coerceFunction:function(f,m,c){function T(l){return v(l).isValid()}!Array.isArray(f)||!f.length?m.set(c):f.every(T)?m.set(f):m.set(c)}},colorscale:{coerceFunction:function(f,m,c){m.set(M.get(f,c))}},angle:{coerceFunction:function(f,m,c){n(f)&&(f=s(f)),f==="auto"?m.set("auto"):q(f)?m.set(a(+f,360)):m.set(c)}},subplotid:{coerceFunction:function(f,m,c,T){var l=T.regex||o(c);let x=w=>typeof w=="string"&&l.test(w);x(f)||T.arrayOk&&i(f)&&f.length>0&&f.every(x)?m.set(f):m.set(c)},validateFunction:function(f,m){var c=m.dflt;return f===c?!0:typeof f!="string"?!1:!!o(c).test(f)}},flaglist:{coerceFunction:function(f,m,c,T){if((T.extras||[]).indexOf(f)!==-1){m.set(f);return}if(typeof f!="string"){m.set(c);return}for(var l=f.split("+"),x=0;x/g),c=0;c1){var e=["LOG:"];for(M=0;M1){var t=[];for(M=0;M"),"long")}},S.warn=function(){var M;if(v.logging>0){var e=["WARN:"];for(M=0;M0){var t=[];for(M=0;M"),"stick")}},S.error=function(){var M;if(v.logging>0){var e=["ERROR:"];for(M=0;M0){var t=[];for(M=0;M"),"stick")}}}}),p2=He({"src/lib/noop.js"(Z,q){"use strict";q.exports=function(){}}}),$A=He({"src/lib/push_unique.js"(Z,q){"use strict";q.exports=function(_,S){if(S instanceof RegExp){for(var M=S.toString(),e=0;e<_.length;e++)if(_[e]instanceof RegExp&&_[e].toString()===M)return _;_.push(S)}else(S||S===0)&&_.indexOf(S)===-1&&_.push(S);return _}}}),p7=He({"node_modules/gl-mat4/create.js"(Z,q){q.exports=v;function v(){var _=new Float32Array(16);return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),d7=He({"node_modules/gl-mat4/clone.js"(Z,q){q.exports=v;function v(_){var S=new Float32Array(16);return S[0]=_[0],S[1]=_[1],S[2]=_[2],S[3]=_[3],S[4]=_[4],S[5]=_[5],S[6]=_[6],S[7]=_[7],S[8]=_[8],S[9]=_[9],S[10]=_[10],S[11]=_[11],S[12]=_[12],S[13]=_[13],S[14]=_[14],S[15]=_[15],S}}}),v7=He({"node_modules/gl-mat4/copy.js"(Z,q){q.exports=v;function v(_,S){return _[0]=S[0],_[1]=S[1],_[2]=S[2],_[3]=S[3],_[4]=S[4],_[5]=S[5],_[6]=S[6],_[7]=S[7],_[8]=S[8],_[9]=S[9],_[10]=S[10],_[11]=S[11],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15],_}}}),QA=He({"node_modules/gl-mat4/identity.js"(Z,q){q.exports=v;function v(_){return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),m7=He({"node_modules/gl-mat4/transpose.js"(Z,q){q.exports=v;function v(_,S){if(_===S){var M=S[1],e=S[2],t=S[3],r=S[6],o=S[7],a=S[11];_[1]=S[4],_[2]=S[8],_[3]=S[12],_[4]=M,_[6]=S[9],_[7]=S[13],_[8]=e,_[9]=r,_[11]=S[14],_[12]=t,_[13]=o,_[14]=a}else _[0]=S[0],_[1]=S[4],_[2]=S[8],_[3]=S[12],_[4]=S[1],_[5]=S[5],_[6]=S[9],_[7]=S[13],_[8]=S[2],_[9]=S[6],_[10]=S[10],_[11]=S[14],_[12]=S[3],_[13]=S[7],_[14]=S[11],_[15]=S[15];return _}}}),g7=He({"node_modules/gl-mat4/invert.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],h=S[9],f=S[10],m=S[11],c=S[12],T=S[13],l=S[14],x=S[15],w=M*a-e*o,A=M*i-t*o,E=M*n-r*o,p=e*i-t*a,b=e*n-r*a,d=t*n-r*i,u=s*T-h*c,g=s*l-f*c,y=s*x-m*c,D=h*l-f*T,P=h*x-m*T,z=f*x-m*l,F=w*z-A*P+E*D+p*y-b*g+d*u;return F?(F=1/F,_[0]=(a*z-i*P+n*D)*F,_[1]=(t*P-e*z-r*D)*F,_[2]=(T*d-l*b+x*p)*F,_[3]=(f*b-h*d-m*p)*F,_[4]=(i*y-o*z-n*g)*F,_[5]=(M*z-t*y+r*g)*F,_[6]=(l*E-c*d-x*A)*F,_[7]=(s*d-f*E+m*A)*F,_[8]=(o*P-a*y+n*u)*F,_[9]=(e*y-M*P-r*u)*F,_[10]=(c*b-T*E+x*w)*F,_[11]=(h*E-s*b-m*w)*F,_[12]=(a*g-o*D-i*u)*F,_[13]=(M*D-e*g+t*u)*F,_[14]=(T*A-c*p-l*w)*F,_[15]=(s*p-h*A+f*w)*F,_):null}}}),y7=He({"node_modules/gl-mat4/adjoint.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],h=S[9],f=S[10],m=S[11],c=S[12],T=S[13],l=S[14],x=S[15];return _[0]=a*(f*x-m*l)-h*(i*x-n*l)+T*(i*m-n*f),_[1]=-(e*(f*x-m*l)-h*(t*x-r*l)+T*(t*m-r*f)),_[2]=e*(i*x-n*l)-a*(t*x-r*l)+T*(t*n-r*i),_[3]=-(e*(i*m-n*f)-a*(t*m-r*f)+h*(t*n-r*i)),_[4]=-(o*(f*x-m*l)-s*(i*x-n*l)+c*(i*m-n*f)),_[5]=M*(f*x-m*l)-s*(t*x-r*l)+c*(t*m-r*f),_[6]=-(M*(i*x-n*l)-o*(t*x-r*l)+c*(t*n-r*i)),_[7]=M*(i*m-n*f)-o*(t*m-r*f)+s*(t*n-r*i),_[8]=o*(h*x-m*T)-s*(a*x-n*T)+c*(a*m-n*h),_[9]=-(M*(h*x-m*T)-s*(e*x-r*T)+c*(e*m-r*h)),_[10]=M*(a*x-n*T)-o*(e*x-r*T)+c*(e*n-r*a),_[11]=-(M*(a*m-n*h)-o*(e*m-r*h)+s*(e*n-r*a)),_[12]=-(o*(h*l-f*T)-s*(a*l-i*T)+c*(a*f-i*h)),_[13]=M*(h*l-f*T)-s*(e*l-t*T)+c*(e*f-t*h),_[14]=-(M*(a*l-i*T)-o*(e*l-t*T)+c*(e*i-t*a)),_[15]=M*(a*f-i*h)-o*(e*f-t*h)+s*(e*i-t*a),_}}}),_7=He({"node_modules/gl-mat4/determinant.js"(Z,q){q.exports=v;function v(_){var S=_[0],M=_[1],e=_[2],t=_[3],r=_[4],o=_[5],a=_[6],i=_[7],n=_[8],s=_[9],h=_[10],f=_[11],m=_[12],c=_[13],T=_[14],l=_[15],x=S*o-M*r,w=S*a-e*r,A=S*i-t*r,E=M*a-e*o,p=M*i-t*o,b=e*i-t*a,d=n*c-s*m,u=n*T-h*m,g=n*l-f*m,y=s*T-h*c,D=s*l-f*c,P=h*l-f*T;return x*P-w*D+A*y+E*g-p*u+b*d}}}),x7=He({"node_modules/gl-mat4/multiply.js"(Z,q){q.exports=v;function v(_,S,M){var e=S[0],t=S[1],r=S[2],o=S[3],a=S[4],i=S[5],n=S[6],s=S[7],h=S[8],f=S[9],m=S[10],c=S[11],T=S[12],l=S[13],x=S[14],w=S[15],A=M[0],E=M[1],p=M[2],b=M[3];return _[0]=A*e+E*a+p*h+b*T,_[1]=A*t+E*i+p*f+b*l,_[2]=A*r+E*n+p*m+b*x,_[3]=A*o+E*s+p*c+b*w,A=M[4],E=M[5],p=M[6],b=M[7],_[4]=A*e+E*a+p*h+b*T,_[5]=A*t+E*i+p*f+b*l,_[6]=A*r+E*n+p*m+b*x,_[7]=A*o+E*s+p*c+b*w,A=M[8],E=M[9],p=M[10],b=M[11],_[8]=A*e+E*a+p*h+b*T,_[9]=A*t+E*i+p*f+b*l,_[10]=A*r+E*n+p*m+b*x,_[11]=A*o+E*s+p*c+b*w,A=M[12],E=M[13],p=M[14],b=M[15],_[12]=A*e+E*a+p*h+b*T,_[13]=A*t+E*i+p*f+b*l,_[14]=A*r+E*n+p*m+b*x,_[15]=A*o+E*s+p*c+b*w,_}}}),b7=He({"node_modules/gl-mat4/translate.js"(Z,q){q.exports=v;function v(_,S,M){var e=M[0],t=M[1],r=M[2],o,a,i,n,s,h,f,m,c,T,l,x;return S===_?(_[12]=S[0]*e+S[4]*t+S[8]*r+S[12],_[13]=S[1]*e+S[5]*t+S[9]*r+S[13],_[14]=S[2]*e+S[6]*t+S[10]*r+S[14],_[15]=S[3]*e+S[7]*t+S[11]*r+S[15]):(o=S[0],a=S[1],i=S[2],n=S[3],s=S[4],h=S[5],f=S[6],m=S[7],c=S[8],T=S[9],l=S[10],x=S[11],_[0]=o,_[1]=a,_[2]=i,_[3]=n,_[4]=s,_[5]=h,_[6]=f,_[7]=m,_[8]=c,_[9]=T,_[10]=l,_[11]=x,_[12]=o*e+s*t+c*r+S[12],_[13]=a*e+h*t+T*r+S[13],_[14]=i*e+f*t+l*r+S[14],_[15]=n*e+m*t+x*r+S[15]),_}}}),w7=He({"node_modules/gl-mat4/scale.js"(Z,q){q.exports=v;function v(_,S,M){var e=M[0],t=M[1],r=M[2];return _[0]=S[0]*e,_[1]=S[1]*e,_[2]=S[2]*e,_[3]=S[3]*e,_[4]=S[4]*t,_[5]=S[5]*t,_[6]=S[6]*t,_[7]=S[7]*t,_[8]=S[8]*r,_[9]=S[9]*r,_[10]=S[10]*r,_[11]=S[11]*r,_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15],_}}}),T7=He({"node_modules/gl-mat4/rotate.js"(Z,q){q.exports=v;function v(_,S,M,e){var t=e[0],r=e[1],o=e[2],a=Math.sqrt(t*t+r*r+o*o),i,n,s,h,f,m,c,T,l,x,w,A,E,p,b,d,u,g,y,D,P,z,F,N;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,h=S[0],f=S[1],m=S[2],c=S[3],T=S[4],l=S[5],x=S[6],w=S[7],A=S[8],E=S[9],p=S[10],b=S[11],d=t*t*s+n,u=r*t*s+o*i,g=o*t*s-r*i,y=t*r*s-o*i,D=r*r*s+n,P=o*r*s+t*i,z=t*o*s+r*i,F=r*o*s-t*i,N=o*o*s+n,_[0]=h*d+T*u+A*g,_[1]=f*d+l*u+E*g,_[2]=m*d+x*u+p*g,_[3]=c*d+w*u+b*g,_[4]=h*y+T*D+A*P,_[5]=f*y+l*D+E*P,_[6]=m*y+x*D+p*P,_[7]=c*y+w*D+b*P,_[8]=h*z+T*F+A*N,_[9]=f*z+l*F+E*N,_[10]=m*z+x*F+p*N,_[11]=c*z+w*F+b*N,S!==_&&(_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_)}}}),A7=He({"node_modules/gl-mat4/rotateX.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[4],o=S[5],a=S[6],i=S[7],n=S[8],s=S[9],h=S[10],f=S[11];return S!==_&&(_[0]=S[0],_[1]=S[1],_[2]=S[2],_[3]=S[3],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[4]=r*t+n*e,_[5]=o*t+s*e,_[6]=a*t+h*e,_[7]=i*t+f*e,_[8]=n*t-r*e,_[9]=s*t-o*e,_[10]=h*t-a*e,_[11]=f*t-i*e,_}}}),S7=He({"node_modules/gl-mat4/rotateY.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[0],o=S[1],a=S[2],i=S[3],n=S[8],s=S[9],h=S[10],f=S[11];return S!==_&&(_[4]=S[4],_[5]=S[5],_[6]=S[6],_[7]=S[7],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[0]=r*t-n*e,_[1]=o*t-s*e,_[2]=a*t-h*e,_[3]=i*t-f*e,_[8]=r*e+n*t,_[9]=o*e+s*t,_[10]=a*e+h*t,_[11]=i*e+f*t,_}}}),M7=He({"node_modules/gl-mat4/rotateZ.js"(Z,q){q.exports=v;function v(_,S,M){var e=Math.sin(M),t=Math.cos(M),r=S[0],o=S[1],a=S[2],i=S[3],n=S[4],s=S[5],h=S[6],f=S[7];return S!==_&&(_[8]=S[8],_[9]=S[9],_[10]=S[10],_[11]=S[11],_[12]=S[12],_[13]=S[13],_[14]=S[14],_[15]=S[15]),_[0]=r*t+n*e,_[1]=o*t+s*e,_[2]=a*t+h*e,_[3]=i*t+f*e,_[4]=n*t-r*e,_[5]=s*t-o*e,_[6]=h*t-a*e,_[7]=f*t-i*e,_}}}),E7=He({"node_modules/gl-mat4/fromRotation.js"(Z,q){q.exports=v;function v(_,S,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(S),t=Math.cos(S),r=1-t,_[0]=o*o*r+t,_[1]=a*o*r+i*e,_[2]=i*o*r-a*e,_[3]=0,_[4]=o*a*r-i*e,_[5]=a*a*r+t,_[6]=i*a*r+o*e,_[7]=0,_[8]=o*i*r+a*e,_[9]=a*i*r-o*e,_[10]=i*i*r+t,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_)}}}),k7=He({"node_modules/gl-mat4/fromRotationTranslation.js"(Z,q){q.exports=v;function v(_,S,M){var e=S[0],t=S[1],r=S[2],o=S[3],a=e+e,i=t+t,n=r+r,s=e*a,h=e*i,f=e*n,m=t*i,c=t*n,T=r*n,l=o*a,x=o*i,w=o*n;return _[0]=1-(m+T),_[1]=h+w,_[2]=f-x,_[3]=0,_[4]=h-w,_[5]=1-(s+T),_[6]=c+l,_[7]=0,_[8]=f+x,_[9]=c-l,_[10]=1-(s+m),_[11]=0,_[12]=M[0],_[13]=M[1],_[14]=M[2],_[15]=1,_}}}),C7=He({"node_modules/gl-mat4/fromScaling.js"(Z,q){q.exports=v;function v(_,S){return _[0]=S[0],_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=S[1],_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=S[2],_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),L7=He({"node_modules/gl-mat4/fromTranslation.js"(Z,q){q.exports=v;function v(_,S){return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=S[0],_[13]=S[1],_[14]=S[2],_[15]=1,_}}}),P7=He({"node_modules/gl-mat4/fromXRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=1,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=e,_[6]=M,_[7]=0,_[8]=0,_[9]=-M,_[10]=e,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),I7=He({"node_modules/gl-mat4/fromYRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=e,_[1]=0,_[2]=-M,_[3]=0,_[4]=0,_[5]=1,_[6]=0,_[7]=0,_[8]=M,_[9]=0,_[10]=e,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),R7=He({"node_modules/gl-mat4/fromZRotation.js"(Z,q){q.exports=v;function v(_,S){var M=Math.sin(S),e=Math.cos(S);return _[0]=e,_[1]=M,_[2]=0,_[3]=0,_[4]=-M,_[5]=e,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=1,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),D7=He({"node_modules/gl-mat4/fromQuat.js"(Z,q){q.exports=v;function v(_,S){var M=S[0],e=S[1],t=S[2],r=S[3],o=M+M,a=e+e,i=t+t,n=M*o,s=e*o,h=e*a,f=t*o,m=t*a,c=t*i,T=r*o,l=r*a,x=r*i;return _[0]=1-h-c,_[1]=s+x,_[2]=f-l,_[3]=0,_[4]=s-x,_[5]=1-n-c,_[6]=m+T,_[7]=0,_[8]=f+l,_[9]=m-T,_[10]=1-n-h,_[11]=0,_[12]=0,_[13]=0,_[14]=0,_[15]=1,_}}}),z7=He({"node_modules/gl-mat4/frustum.js"(Z,q){q.exports=v;function v(_,S,M,e,t,r,o){var a=1/(M-S),i=1/(t-e),n=1/(r-o);return _[0]=r*2*a,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=r*2*i,_[6]=0,_[7]=0,_[8]=(M+S)*a,_[9]=(t+e)*i,_[10]=(o+r)*n,_[11]=-1,_[12]=0,_[13]=0,_[14]=o*r*2*n,_[15]=0,_}}}),F7=He({"node_modules/gl-mat4/perspective.js"(Z,q){q.exports=v;function v(_,S,M,e,t){var r=1/Math.tan(S/2),o=1/(e-t);return _[0]=r/M,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=r,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=(t+e)*o,_[11]=-1,_[12]=0,_[13]=0,_[14]=2*t*e*o,_[15]=0,_}}}),O7=He({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(Z,q){q.exports=v;function v(_,S,M,e){var t=Math.tan(S.upDegrees*Math.PI/180),r=Math.tan(S.downDegrees*Math.PI/180),o=Math.tan(S.leftDegrees*Math.PI/180),a=Math.tan(S.rightDegrees*Math.PI/180),i=2/(o+a),n=2/(t+r);return _[0]=i,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=n,_[6]=0,_[7]=0,_[8]=-((o-a)*i*.5),_[9]=(t-r)*n*.5,_[10]=e/(M-e),_[11]=-1,_[12]=0,_[13]=0,_[14]=e*M/(M-e),_[15]=0,_}}}),B7=He({"node_modules/gl-mat4/ortho.js"(Z,q){q.exports=v;function v(_,S,M,e,t,r,o){var a=1/(S-M),i=1/(e-t),n=1/(r-o);return _[0]=-2*a,_[1]=0,_[2]=0,_[3]=0,_[4]=0,_[5]=-2*i,_[6]=0,_[7]=0,_[8]=0,_[9]=0,_[10]=2*n,_[11]=0,_[12]=(S+M)*a,_[13]=(t+e)*i,_[14]=(o+r)*n,_[15]=1,_}}}),N7=He({"node_modules/gl-mat4/lookAt.js"(Z,q){var v=QA();q.exports=_;function _(S,M,e,t){var r,o,a,i,n,s,h,f,m,c,T=M[0],l=M[1],x=M[2],w=t[0],A=t[1],E=t[2],p=e[0],b=e[1],d=e[2];return Math.abs(T-p)<1e-6&&Math.abs(l-b)<1e-6&&Math.abs(x-d)<1e-6?v(S):(h=T-p,f=l-b,m=x-d,c=1/Math.sqrt(h*h+f*f+m*m),h*=c,f*=c,m*=c,r=A*m-E*f,o=E*h-w*m,a=w*f-A*h,c=Math.sqrt(r*r+o*o+a*a),c?(c=1/c,r*=c,o*=c,a*=c):(r=0,o=0,a=0),i=f*a-m*o,n=m*r-h*a,s=h*o-f*r,c=Math.sqrt(i*i+n*n+s*s),c?(c=1/c,i*=c,n*=c,s*=c):(i=0,n=0,s=0),S[0]=r,S[1]=i,S[2]=h,S[3]=0,S[4]=o,S[5]=n,S[6]=f,S[7]=0,S[8]=a,S[9]=s,S[10]=m,S[11]=0,S[12]=-(r*T+o*l+a*x),S[13]=-(i*T+n*l+s*x),S[14]=-(h*T+f*l+m*x),S[15]=1,S)}}}),U7=He({"node_modules/gl-mat4/str.js"(Z,q){q.exports=v;function v(_){return"mat4("+_[0]+", "+_[1]+", "+_[2]+", "+_[3]+", "+_[4]+", "+_[5]+", "+_[6]+", "+_[7]+", "+_[8]+", "+_[9]+", "+_[10]+", "+_[11]+", "+_[12]+", "+_[13]+", "+_[14]+", "+_[15]+")"}}}),e5=He({"node_modules/gl-mat4/index.js"(Z,q){q.exports={create:p7(),clone:d7(),copy:v7(),identity:QA(),transpose:m7(),invert:g7(),adjoint:y7(),determinant:_7(),multiply:x7(),translate:b7(),scale:w7(),rotate:T7(),rotateX:A7(),rotateY:S7(),rotateZ:M7(),fromRotation:E7(),fromRotationTranslation:k7(),fromScaling:C7(),fromTranslation:L7(),fromXRotation:P7(),fromYRotation:I7(),fromZRotation:R7(),fromQuat:D7(),frustum:z7(),perspective:F7(),perspectiveFromFieldOfView:O7(),ortho:B7(),lookAt:N7(),str:U7()}}}),d2=He({"src/lib/matrix.js"(Z){"use strict";var q=e5();Z.init2dArray=function(v,_){for(var S=new Array(v),M=0;MSo({valType:"string",dflt:"",editType:M},e!==!1?{arrayOk:!0}:{}),Z.texttemplateAttrs=({editType:M="calc",arrayOk:e}={},t={})=>So({valType:"string",dflt:"",editType:M},e!==!1?{arrayOk:!0}:{}),Z.shapeTexttemplateAttrs=({editType:M="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:M}),Z.templatefallbackAttrs=({editType:M="none"}={})=>({valType:"any",dflt:"-",editType:M})}}),v2=He({"src/components/shapes/label_texttemplate.js"(Z,q){"use strict";function v(A,E){return E?E.d2l(A):A}function _(A,E){return E?E.l2d(A):A}function S(A){return A.x0}function M(A){return A.x1}function e(A){return A.y0}function t(A){return A.y1}function r(A){return A.x0shift||0}function o(A){return A.x1shift||0}function a(A){return A.y0shift||0}function i(A){return A.y1shift||0}function n(A,E){return v(A.x1,E)+o(A)-v(A.x0,E)-r(A)}function s(A,E,p){return v(A.y1,p)+i(A)-v(A.y0,p)-a(A)}function h(A,E){return Math.abs(n(A,E))}function f(A,E,p){return Math.abs(s(A,E,p))}function m(A,E,p){return A.type!=="line"?void 0:Math.sqrt(Math.pow(n(A,E),2)+Math.pow(s(A,E,p),2))}function c(A,E){return _((v(A.x1,E)+o(A)+v(A.x0,E)+r(A))/2,E)}function T(A,E,p){return _((v(A.y1,p)+i(A)+v(A.y0,p)+a(A))/2,p)}function l(A,E,p){return A.type!=="line"?void 0:s(A,E,p)/n(A,E)}var x=["x0","x1","y0","y1","dy","height","ycenter"],w=["x0","x1","y0","y1","dx","width","xcenter"];q.exports={x0:S,x1:M,y0:e,y1:t,slope:l,dx:n,dy:s,width:h,height:f,length:m,xcenter:c,ycenter:T,simpleXVariables:x,simpleYVariables:w}}}),j7=He({"src/components/shapes/draw_newshape/attributes.js"(Z,q){"use strict";var v=pc().overrideAll,_=au(),S=tc(),M=Hh().dash,e=rs().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=v2();q.exports=v({newshape:{visible:e({},_.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},_.legend,{}),legendgroup:e({},_.legendgroup,{}),legendgrouptitle:{text:e({},_.legendgrouptitle.text,{}),font:S({})},legendrank:e({},_.legendrank,{}),legendwidth:e({},_.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({},_.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),q7=He({"src/components/selections/draw_newselection/attributes.js"(Z,q){"use strict";var v=Hh().dash,_=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:_({},v,{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"}}}}),m2=He({"src/plots/pad_attributes.js"(Z,q){"use strict";q.exports=function(v){var _=v.editType;return{t:{valType:"number",dflt:0,editType:_},r:{valType:"number",dflt:0,editType:_},b:{valType:"number",dflt:0,editType:_},l:{valType:"number",dflt:0,editType:_},editType:_}}}}),$y=He({"src/plots/layout_attributes.js"(Z,q){"use strict";var v=tc(),_=A_(),S=sh(),M=j7(),e=q7(),t=m2(),r=rs().extendFlat,o=v({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,q.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({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:S.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:S.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:S.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({},_.transition,{editType:"none"})}}}),V7=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var Z=document.createElement("style");Z.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",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)}})()}}),so=He({"src/registry.js"(Z){"use strict";var q=Jm(),v=p2(),_=$A(),S=Yv(),M=T_().addStyleRule,e=rs(),t=au(),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 A=0;A=l&&F<=x?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var B=c(N),W=F.charAt(0);B&&(W==="G"||W==="g")&&(F=F.slice(1),N="");var $=B&&N.slice(0,7)==="chinese",ue=F.match($?f:h);if(!ue)return e;var ce=ue[1],de=ue[3]||"1",Y=Number(ue[5]||1),X=Number(ue[7]||0),Q=Number(ue[9]||0),V=Number(ue[11]||0);if(B){if(ce.length===2)return e;ce=Number(ce);var le;try{var ae=n.getComponentMethod("calendars","getCal")(N);if($){var j=de.charAt(de.length-1)==="i";de=parseInt(de,10),le=ae.newDate(ce,ae.toMonthIndex(ce,de,j),Y)}else le=ae.newDate(ce,Number(de),Y)}catch{return e}return le?(le.toJD()-i)*t+X*r+Q*o+V*a:e}ce.length===2?ce=(Number(ce)+2e3-m)%100+m:ce=Number(ce),de-=1;var ee=new Date(Date.UTC(2e3,de,Y,X,Q));return ee.setUTCFullYear(ce),ee.getUTCMonth()!==de||ee.getUTCDate()!==Y?e:ee.getTime()+V*a},l=Z.MIN_MS=Z.dateTime2ms("-9999"),x=Z.MAX_MS=Z.dateTime2ms("9999-12-31 23:59:59.9999"),Z.isDateTime=function(F,N){return Z.dateTime2ms(F,N)!==e};function w(F,N){return String(F+Math.pow(10,N)).slice(1)}var A=90*t,E=3*r,p=5*o;Z.ms2DateTime=function(F,N,O){if(typeof F!="number"||!(F>=l&&F<=x))return e;N||(N=0);var L=Math.floor(S(F+.05,1)*10),U=Math.round(F-L/10),B,W,$,ue,ce,de;if(c(O)){var Y=Math.floor(U/t)+i,X=Math.floor(S(F,t));try{B=n.getComponentMethod("calendars","getCal")(O).fromJD(Y).formatDate("yyyy-mm-dd")}catch{B=s("G%Y-%m-%d")(new Date(U))}if(B.charAt(0)==="-")for(;B.length<11;)B="-0"+B.slice(1);else for(;B.length<10;)B="0"+B;W=N=l+t&&F<=x-t))return e;var N=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-N/10)),L=q("%Y-%m-%d")(O),U=O.getHours(),B=O.getMinutes(),W=O.getSeconds(),$=O.getUTCMilliseconds()*10+N;return b(L,U,B,W,$)};function b(F,N,O,L,U){if((N||O||L||U)&&(F+=" "+w(N,2)+":"+w(O,2),(L||U)&&(F+=":"+w(L,2),U))){for(var B=4;U%10===0;)B-=1,U/=10;F+="."+w(U,B)}return F}Z.cleanDate=function(F,N,O){if(F===e)return N;if(Z.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(c(O))return _.error("JS Dates and milliseconds are incompatible with world calendars",F),N;if(F=Z.ms2DateTimeLocal(+F),!F&&N!==void 0)return N}else if(!Z.isDateTime(F,O))return _.error("unrecognized date",F),N;return F};var d=/%\d?f/g,u=/%h/g,g={1:"1",2:"1",3:"2",4:"2"};function y(F,N,O,L){F=F.replace(d,function(B){var W=Math.min(+B.charAt(1)||6,6),$=(N/1e3%1+2).toFixed(W).slice(2).replace(/0+$/,"")||"0";return $});var U=new Date(Math.floor(N+.05));if(F=F.replace(u,function(){return g[O("%q")(U)]}),c(L))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,N,L)}catch{return"Invalid"}return O(F)(U)}var D=[59,59.9,59.99,59.999,59.9999];function P(F,N){var O=S(F+.05,t),L=w(Math.floor(O/r),2)+":"+w(S(Math.floor(O/o),60),2);if(N!=="M"){v(N)||(N=0);var U=Math.min(S(F/a,60),D[N]),B=(100+U).toFixed(N).slice(1);N>0&&(B=B.replace(/0+$/,"").replace(/[\.]$/,"")),L+=":"+B}return L}Z.formatDate=function(F,N,O,L,U,B){if(U=c(U)&&U,!N)if(O==="y")N=B.year;else if(O==="m")N=B.month;else if(O==="d")N=B.dayMonth+` `+B.year;else return P(F,O)+` -`+y(B.dayMonthYear,F,L,U);return y(N,F,L,U)};var z=3*t;Z.incrementMonth=function(F,N,O){O=c(O)&&O;var L=S(F,t);if(F=Math.round(F-L),O)try{var U=Math.round(F/t)+i,B=n.getComponentMethod("calendars","getCal")(O),W=B.fromJD(U);return N%12?B.add(W,N,"m"):B.add(W,N/12,"y"),(W.toJD()-i)*t+L}catch{_.error("invalid ms "+F+" in calendar "+O)}var $=new Date(F+z);return $.setUTCMonth($.getUTCMonth()+N)+L-z},Z.findExactDates=function(F,N){for(var O=0,L=0,U=0,B=0,W,$,ue=c(N)&&n.getComponentMethod("calendars","getCal")(N),ce=0;ce1?(i[h-1]-i[0])/(h-1):1,c,T;for(m>=0?T=n?e:t:T=n?o:r,a+=m*M*(n?-1:1)*(m>=0?1:-1);s90&&v.log("Long binary search..."),s-1};function e(a,i){return ai}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]===S;n--);for(var s=i[n]-i[0]||1,h=s/(n||1)/1e4,f=[],m,c=0;c<=n;c++){var T=i[c],l=T-m;m===void 0?(f.push(T),m=T):l>h&&(s=Math.min(s,l),f.push(T),m=T)}return{vals:f,minDiff:s}},Z.roundUp=function(a,i,n){for(var s=0,h=i.length-1,f,m=0,c=n?0:1,T=n?1:0,l=n?Math.ceil:Math.floor;s0&&(s=1),n&&s)return a.sort(i)}return s?a:a.reverse()},Z.findIndexOfMin=function(a,i){i=i||_;for(var n=1/0,s,h=0;hM.length)&&(e=M.length),q(S)||(S=!1),v(M[0])){for(r=new Array(e),t=0;t_.length-1)return _[_.length-1];var M=S%1;return M*_[Math.ceil(S)]+(1-M)*_[Math.floor(S)]}}}),W7=He({"src/lib/angles.js"(Z,q){"use strict";var v=Yy(),_=v.mod,S=v.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 S(l-T,e)}function i(T,l){return Math.abs(a(T,l))}function n(T,l){if(o(l))return!0;var x,w;l[0]w&&(w+=e);var A=_(T,e),E=A+e;return A>=x&&A<=w||E>=x&&E<=w}function s(T,l,x,w){if(!n(l,w))return!1;var A,E;return x[0]=A&&T<=E}function h(T,l,x,w,A,E,p){A=A||0,E=E||0;var b=o([x,w]),d,u,g,y,D;b?(d=0,u=M,g=e):x1/3&&v.x<2/3},Z.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},Z.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},Z.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},Z.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),Z7=He({"src/lib/geometry2d.js"(Z){"use strict";var q=Yy().mod;Z.segmentsIntersect=v;function v(t,r,o,a,i,n,s,h){var f=o-t,m=i-t,c=s-i,T=a-r,l=n-r,x=h-n,w=f*x-c*T;if(w===0)return null;var A=(m*x-c*l)/w,E=(m*T-f*l)/w;return E<0||E>1||A<0||A>1?null:{x:t+f*A,y:r+T*A}}Z.segmentDistance=function(r,o,a,i,n,s,h,f){if(v(r,o,a,i,n,s,h,f))return 0;var m=a-r,c=i-o,T=h-n,l=f-s,x=m*m+c*c,w=T*T+l*l,A=Math.min(_(m,c,x,n-r,s-o),_(m,c,x,h-r,f-o),_(T,l,w,r-n,o-s),_(T,l,w,a-n,i-s));return Math.sqrt(A)};function _(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,h=i-r;return s*s+h*h}else{var f=a*r-i*t;return f*f/o}}var S,M,e;Z.getTextLocation=function(r,o,a,i){if((r!==M||i!==e)&&(S={},M=r,e=i),S[a])return S[a];var n=r.getPointAtLength(q(a-i/2,o)),s=r.getPointAtLength(q(a+i/2,o)),h=Math.atan((s.y-n.y)/(s.x-n.x)),f=r.getPointAtLength(q(a,o)),m=(f.x*4+n.x+s.x)/6,c=(f.y*4+n.y+s.y)/6,T={x:m,y:c,theta:h};return S[a]=T,T},Z.clearLocationCache=function(){M=null},Z.getVisibleSegment=function(r,o,a){var i=o.left,n=o.right,s=o.top,h=o.bottom,f=0,m=r.getTotalLength(),c=m,T,l;function x(A){var E=r.getPointAtLength(A);A===0?T=E:A===m&&(l=E);var p=E.xn?E.x-n:0,b=E.yh?E.y-h:0;return Math.sqrt(p*p+b*b)}for(var w=x(f);w;){if(f+=w+a,f>c)return;w=x(f)}for(w=x(c);w;){if(c-=w+a,f>c)return;w=x(c)}return{min:f,max:c,len:c-f,total:m,isClosed:f===0&&c===m&&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,h=i.iterationLimit||30,f=r.getPointAtLength(0)[a]>r.getPointAtLength(n)[a]?-1:1,m=0,c=0,T=n,l,x,w;m0?T=l:c=l,m++}return x}}}),y2=He({"src/lib/throttle.js"(Z){"use strict";var q={};Z.throttle=function(S,M,e){var t=q[S],r=Date.now();if(!t){for(var o in q)q[o].tst.ts+M){a();return}t.timer=setTimeout(function(){a(),t.timer=null},M)},Z.done=function(_){var S=q[_];return!S||!S.timer?Promise.resolve():new Promise(function(M){var e=S.onDone;S.onDone=function(){e&&e(),M(),S.onDone=null}})},Z.clear=function(_){if(_)v(q[_]),delete q[_];else for(var S in q)Z.clear(S)};function v(_){_&&_.timer!==null&&(clearTimeout(_.timer),_.timer=null)}}}),Y7=He({"src/lib/clear_responsive.js"(Z,q){"use strict";q.exports=function(_){_._responsiveChartHandler&&(window.removeEventListener("resize",_._responsiveChartHandler),delete _._responsiveChartHandler)}}}),K7=He({"node_modules/is-mobile/index.js"(Z,q){"use strict";q.exports=M,q.exports.isMobile=M,q.exports.default=M;var v=/(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,_=/CrOS/,S=/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=v.test(t)&&!_.test(t)||!!e.tablet&&S.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}}}),J7=He({"src/lib/preserve_drawing_buffer.js"(Z,q){"use strict";var v=ns(),_=K7();q.exports=function(e){var t;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:t=S(),typeof t!="string")return!0;var r=_({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a-1;n--){var s=o[n];if(s.slice(0,8)==="Version/"){var h=s.slice(8).split(".")[0];if(v(h)&&(h=+h),h>=13)return!0}}}return r};function S(){var M;return typeof navigator<"u"&&(M=navigator.userAgent),M&&M.headers&&typeof M.headers["user-agent"]=="string"&&(M=M.headers["user-agent"]),M}}}),$7=He({"src/lib/make_trace_groups.js"(Z,q){"use strict";var v=Vn();q.exports=function(S,M,e){var t=S.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=S.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(o){o[0][r]=v.select(this)}),t}}}),Q7=He({"src/lib/localize.js"(Z,q){"use strict";var v=so();q.exports=function(S,M){for(var e=S._context.locale,t=0;t<2;t++){for(var r=S._context.locales,o=0;o<2;o++){var a=(r[e]||{}).dictionary;if(a){var i=a[M];if(i)return i}r=v.localeRegistry}var n=e.split("-")[0];if(n===e)break;e=n}return M}}}),r5=He({"src/lib/filter_unique.js"(Z,q){"use strict";q.exports=function(_){for(var S={},M=[],e=0,t=0;t<_.length;t++){var r=_[t];S[r]!==1&&(S[r]=1,M[e++]=r)}return M}}}),ez=He({"src/lib/filter_visible.js"(Z,q){"use strict";q.exports=function(e){for(var t=S(e)?_:v,r=[],o=0;o1?(M*_+M*S)/M:_+S,t=String(e).length;if(t>16){var r=String(S).length,o=String(_).length;if(t>=o+r){var a=parseFloat(e).toPrecision(12);a.indexOf("e+")===-1&&(e=+a)}}return e}}}),rz=He({"src/lib/clean_number.js"(Z,q){"use strict";var v=ns(),_=Gs().BADNUM,S=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;q.exports=function(e){return typeof e=="string"&&(e=e.replace(S,"")),v(e)?Number(e):_}}}),sa=He({"src/lib/index.js"(Z,q){"use strict";var v=Vn(),_=Zv().utcFormat,S=YA().format,M=ns(),e=Gs(),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(ae){var j=String(ae);i[j]||(i[j]=1,a.warn('encountered bad format: "'+j+'"'))},a.noFormat=function(ae){return String(ae)},a.numberFormat=function(ae){var j;try{j=S(a.adjustFormat(ae))}catch{return a.warnBadFormat(ae),a.noFormat}return j},a.nestedProperty=b_(),a.keyedContainer=u7(),a.relativeAttr=c7(),a.isPlainObject=Yv(),a.toLogRange=h2(),a.relinkPrivateKeys=f7();var n=hp();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 h=h7();a.valObjectMeta=h.valObjectMeta,a.coerce=h.coerce,a.coerce2=h.coerce2,a.coerceFont=h.coerceFont,a.coercePattern=h.coercePattern,a.coerceHoverinfo=h.coerceHoverinfo,a.coerceSelectionMarkerOpacity=h.coerceSelectionMarkerOpacity,a.validate=h.validate;var f=G7();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 m=g2();a.findBin=m.findBin,a.sorterAsc=m.sorterAsc,a.sorterDes=m.sorterDes,a.distinctVals=m.distinctVals,a.roundUp=m.roundUp,a.sort=m.sort,a.findIndexOfMin=m.findIndexOfMin,a.sortObjectKeys=$m();var c=H7();a.aggNums=c.aggNums,a.len=c.len,a.mean=c.mean,a.geometricMean=c.geometricMean,a.median=c.median,a.midRange=c.midRange,a.variance=c.variance,a.stdev=c.stdev,a.interp=c.interp;var T=d2();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=W7();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 x=X7();a.isLeftAnchor=x.isLeftAnchor,a.isCenterAnchor=x.isCenterAnchor,a.isRightAnchor=x.isRightAnchor,a.isTopAnchor=x.isTopAnchor,a.isMiddleAnchor=x.isMiddleAnchor,a.isBottomAnchor=x.isBottomAnchor;var w=Z7();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 A=rs();a.extendFlat=A.extendFlat,a.extendDeep=A.extendDeep,a.extendDeepAll=A.extendDeepAll,a.extendDeepNoArrays=A.extendDeepNoArrays;var E=Jm();a.log=E.log,a.warn=E.warn,a.error=E.error;var p=Jy();a.counterRegex=p.counter;var b=y2();a.throttle=b.throttle,a.throttleDone=b.done,a.clearThrottle=b.clear;var d=T_();a.getGraphDiv=d.getGraphDiv,a.isPlotDiv=d.isPlotDiv,a.removeElement=d.removeElement,a.addStyleRule=d.addStyleRule,a.addRelatedStyleRule=d.addRelatedStyleRule,a.deleteRelatedStyleRule=d.deleteRelatedStyleRule,a.setStyleOnHover=d.setStyleOnHover,a.getFullTransformMatrix=d.getFullTransformMatrix,a.getElementTransformMatrix=d.getElementTransformMatrix,a.getElementAndAncestors=d.getElementAndAncestors,a.equalDomRects=d.equalDomRects,a.clearResponsive=Y7(),a.preserveDrawingBuffer=J7(),a.makeTraceGroups=$7(),a._=Q7(),a.notifier=JA(),a.filterUnique=r5(),a.filterVisible=ez(),a.pushUnique=$A(),a.increment=tz(),a.cleanNumber=rz(),a.ensureNumber=function(j){return M(j)?(j=Number(j),j>t||j=j?!1:M(ae)&&ae>=0&&ae%1===0},a.noop=p2(),a.identity=S_(),a.repeat=function(ae,j){for(var ee=new Array(j),te=0;teee?Math.max(ee,Math.min(j,ae)):Math.max(j,Math.min(ee,ae))},a.bBoxIntersect=function(ae,j,ee){return ee=ee||0,ae.left<=j.right+ee&&j.left<=ae.right+ee&&ae.top<=j.bottom+ee&&j.top<=ae.bottom+ee},a.simpleMap=function(ae,j,ee,te,pe){for(var we=ae.length,Se=new Array(we),Re=0;Re=Math.pow(2,ee)?pe>10?(a.warn("randstr failed uniqueness"),Se):ae(j,ee,te,(pe||0)+1):Se},a.OptionControl=function(ae,j){ae||(ae={}),j||(j="opt");var ee={};return ee.optionList=[],ee._newoption=function(te){te[j]=ae,ee[te.name]=te,ee.optionList.push(te)},ee["_"+j]=ae,ee},a.smooth=function(ae,j){if(j=Math.round(j)||0,j<2)return ae;var ee=ae.length,te=2*ee,pe=2*j-1,we=new Array(pe),Se=new Array(ee),Re,Pe,je,at;for(Re=0;Re=te&&(je-=te*Math.floor(je/te)),je<0?je=-1-je:je>=ee&&(je=te-1-je),at+=ae[je]*we[Pe];Se[Re]=at}return Se},a.syncOrAsync=function(ae,j,ee){var te,pe;function we(){return a.syncOrAsync(ae,j,ee)}for(;ae.length;)if(pe=ae.splice(0,1)[0],te=pe(j),te&&te.then)return te.then(we);return ee&&ee(j)},a.stripTrailingSlash=function(ae){return ae.slice(-1)==="/"?ae.slice(0,-1):ae},a.noneOrAll=function(ae,j,ee){if(ae){var te=!1,pe=!0,we,Se;for(we=0;we0?pe:0})},a.fillArray=function(ae,j,ee,te){if(te=te||a.identity,a.isArrayOrTypedArray(ae))for(var pe=0;peP.test(window.navigator.userAgent);var z=/Firefox\/(\d+)\.\d+/;a.getFirefoxVersion=function(){var ae=z.exec(window.navigator.userAgent);if(ae&&ae.length===2){var j=parseInt(ae[1]);if(!isNaN(j))return j}return null},a.isD3Selection=function(ae){return ae instanceof v.selection},a.ensureSingle=function(ae,j,ee,te){var pe=ae.select(j+(ee?"."+ee:""));if(pe.size())return pe;var we=ae.append(j);return ee&&we.classed(ee,!0),te&&we.call(te),we},a.ensureSingleById=function(ae,j,ee,te){var pe=ae.select(j+"#"+ee);if(pe.size())return pe;var we=ae.append(j).attr("id",ee);return te&&we.call(te),we},a.objectFromPath=function(ae,j){for(var ee=ae.split("."),te,pe=te={},we=0;we1?pe+Se[1]:"";if(we&&(Se.length>1||Re.length>4||ee))for(;te.test(Re);)Re=Re.replace(te,"$1"+we+"$2");return Re+Pe},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var L=/^\w*$/;a.templateString=function(ae,j){var ee={};return ae.replace(a.TEMPLATE_STRING_REGEX,function(te,pe){var we;return L.test(pe)?we=j[pe]:(ee[pe]=ee[pe]||a.nestedProperty(j,pe).get,we=ee[pe](!0)),we!==void 0?we:""})};var U={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=ae=>de(vs(So({},ae),{opts:U}));var B={max:10,count:0,name:"texttemplate"};a.texttemplateString=ae=>de(vs(So({},ae),{opts:B}));var W=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(ae){var j=ae.match(W);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:ae,op:null,number:null}}var ue={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=ae=>de(vs(So({},ae),{opts:ue}));var ce=/^[:|\|]/;function de({data:ae=[],locale:j,fallback:ee,labels:te={},opts:pe,template:we}){return we.replace(a.TEMPLATE_STRING_REGEX,(Se,Re,Pe)=>{let je=["xother","yother"].includes(Re),at=["_xother","_yother"].includes(Re),nt=["_xother_","_yother_"].includes(Re),tt=["xother_","yother_"].includes(Re),Ve=je||at||tt||nt;(at||nt)&&(Re=Re.substring(1)),(tt||nt)&&(Re=Re.substring(0,Re.length-1));let he=null,se=null;if(pe.parseMultDiv){var ne=$(Re);Re=ne.key,he=ne.op,se=ne.number}let Ce;if(Ve){if(te[Re]===void 0)return"";Ce=te[Re]}else for(let St of ae)if(St){if(St.hasOwnProperty(Re)){Ce=St[Re];break}if(L.test(Re)||(Ce=a.nestedProperty(St,Re).get(!0)),Ce!==void 0)break}if(Ce===void 0){let{count:St,max:kt,name:Bt}=pe,Vt=ee===!1?Se:ee;return St=Y&&Se<=X,je=Re>=Y&&Re<=X;if(Pe&&(te=10*te+Se-Y),je&&(pe=10*pe+Re-Y),!Pe||!je){if(te!==pe)return te-pe;if(Se!==Re)return Se-Re}}return pe-te};var Q=2e9;a.seedPseudoRandom=function(){Q=2e9},a.pseudoRandom=function(){var ae=Q;return Q=(69069*Q+1)%4294967296,Math.abs(Q-ae)<429496729?a.pseudoRandom():Q/4294967296},a.fillText=function(ae,j,ee){var te=Array.isArray(ee)?function(Se){ee.push(Se)}:function(Se){ee.text=Se},pe=a.extractOption(ae,j,"htx","hovertext");if(a.isValidTextValue(pe))return te(pe);var we=a.extractOption(ae,j,"tx","text");if(a.isValidTextValue(we))return te(we)},a.isValidTextValue=function(ae){return ae||ae===0},a.formatPercent=function(ae,j){j=j||0;for(var ee=(Math.round(100*ae*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",te=0;te1&&(je=1):je=0,a.strTranslate(pe-je*(ee+Se),we-je*(te+Re))+a.strScale(je)+(Pe?"rotate("+Pe+(j?"":" "+ee+" "+te)+")":"")},a.setTransormAndDisplay=function(ae,j){ae.attr("transform",a.getTextTransform(j)),ae.style("display",j.scale?null:"none")},a.ensureUniformFontSize=function(ae,j){var ee=a.extendFlat({},j);return ee.size=Math.max(j.size,ae._fullLayout.uniformtext.minsize||0),ee},a.join2=function(ae,j,ee){var te=ae.length;return te>1?ae.slice(0,-1).join(j)+ee+ae[te-1]:ae.join(j)},a.bigFont=function(ae){return Math.round(1.2*ae)};var V=a.getFirefoxVersion(),le=V!==null&&V<86;a.getPositionFromD3Event=function(){return le?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),az=He({"build/plotcss.js"(){"use strict";var Z=sa(),q={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#fff;border-color:#e0e2e5;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#f3f3f3;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",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(_ in q)v=_.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(v,q[_]);var v,_}}),a5=He({"node_modules/is-browser/client.js"(Z,q){q.exports=!0}}),i5=He({"node_modules/has-hover/index.js"(Z,q){"use strict";var v=a5(),_;typeof window.matchMedia=="function"?_=!window.matchMedia("(hover: none)").matches:_=v,q.exports=_}}),Z0=He({"node_modules/events/events.js"(Z,q){"use strict";var v=typeof Reflect=="object"?Reflect:null,_=v&&typeof v.apply=="function"?v.apply:function(E,p,b){return Function.prototype.apply.call(E,p,b)},S;v&&typeof v.ownKeys=="function"?S=v.ownKeys:Object.getOwnPropertySymbols?S=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:S=function(E){return Object.getOwnPropertyNames(E)};function M(A){console&&console.warn&&console.warn(A)}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(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(A){if(typeof A!="number"||A<0||e(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");r=A}}),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(A){return A._maxListeners===void 0?t.defaultMaxListeners:A._maxListeners}t.prototype.getMaxListeners=function(){return a(this)},t.prototype.emit=function(E){for(var p=[],b=1;b0&&(g=p[0]),g instanceof Error)throw g;var y=new Error("Unhandled error."+(g?" ("+g.message+")":""));throw y.context=g,y}var D=u[E];if(D===void 0)return!1;if(typeof D=="function")_(D,this,p);else for(var P=D.length,z=m(D,P),b=0;b0&&g.length>d&&!g.warned){g.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+g.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=A,y.type=E,y.count=g.length,M(y)}return A}t.prototype.addListener=function(E,p){return i(this,E,p,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(E,p){return i(this,E,p,!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(A,E,p){var b={fired:!1,wrapFn:void 0,target:A,type:E,listener:p},d=n.bind(b);return d.listener=p,b.wrapFn=d,d}t.prototype.once=function(E,p){return o(p),this.on(E,s(this,E,p)),this},t.prototype.prependOnceListener=function(E,p){return o(p),this.prependListener(E,s(this,E,p)),this},t.prototype.removeListener=function(E,p){var b,d,u,g,y;if(o(p),d=this._events,d===void 0)return this;if(b=d[E],b===void 0)return this;if(b===p||b.listener===p)--this._eventsCount===0?this._events=Object.create(null):(delete d[E],d.removeListener&&this.emit("removeListener",E,b.listener||p));else if(typeof b!="function"){for(u=-1,g=b.length-1;g>=0;g--)if(b[g]===p||b[g].listener===p){y=b[g].listener,u=g;break}if(u<0)return this;u===0?b.shift():c(b,u),b.length===1&&(d[E]=b[0]),d.removeListener!==void 0&&this.emit("removeListener",E,y||p)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(E){var p,b,d;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),g;for(d=0;d=0;d--)this.removeListener(E,p[d]);return this};function h(A,E,p){var b=A._events;if(b===void 0)return[];var d=b[E];return d===void 0?[]:typeof d=="function"?p?[d.listener||d]:[d]:p?T(d):m(d,d.length)}t.prototype.listeners=function(E){return h(this,E,!0)},t.prototype.rawListeners=function(E){return h(this,E,!1)},t.listenerCount=function(A,E){return typeof A.listenerCount=="function"?A.listenerCount(E):f.call(A,E)},t.prototype.listenerCount=f;function f(A){var E=this._events;if(E!==void 0){var p=E[A];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?S(this._events):[]};function m(A,E){for(var p=new Array(E),b=0;b{},{passive:!0}),S},triggerHandler:function(S,M,e){var t,r=S._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_.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=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,o=0;o=L.length)return!1;if(P.dimensions===2){if(F++,z.length===F)return P;var U=z[F];if(!w(U))return!1;P=L[O][U]}else P=L[O]}else P=L}}return P}function w(P){return P===Math.round(P)&&P>=0}function A(P){var z,F;z=q.modules[P]._module,F=z.basePlotModule;var N={};N.type=null;var O=o({},_),L=o({},z.attributes);Z.crawl(L,function(W,$,ue,ce,de){n(O,de).set(void 0),W===void 0&&n(L,de).set(void 0)}),o(N,O),q.traceIs(P,"noOpacity")&&delete N.opacity,q.traceIs(P,"showLegend")||(delete N.showlegend,delete N.legendgroup),q.traceIs(P,"noHover")&&(delete N.hoverinfo,delete N.hoverlabel),z.selectPoints||delete N.selectedpoints,o(N,L),F.attributes&&o(N,F.attributes),N.type=P;var U={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:P,attributes:b(N)};if(z.layoutAttributes){var B={};o(B,z.layoutAttributes),U.layoutAttributes=b(B)}return z.animatable||Z.crawl(U,function(W){Z.isValObject(W)&&"anim"in W&&delete W.anim}),U}function E(){var P={},z,F;o(P,S);for(z in q.subplotsRegistry)if(F=q.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var N=0;N=a&&(o._input||{})._templateitemname;n&&(i=a);var s=r+"["+i+"]",h;function f(){h={},n&&(h[s]={},h[s][_]=n)}f();function m(x,w){h[x]=w}function c(x,w){n?q.nestedProperty(h[s],x).set(w):h[s+"."+x]=w}function T(){var x=h;return f(),x}function l(x,w){x&&c(x,w);var A=T();for(var E in A)q.nestedProperty(t,E).set(A[E])}return{modifyBase:m,modifyItem:c,getUpdateObj:T,applyUpdate:l}}}}),lh=He({"src/plots/cartesian/constants.js"(Z,q){"use strict";var v=Jy().counter;q.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("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"}}}),tf=He({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var q=so(),v=lh();Z.id2name=function(M){if(!(typeof M!="string"||!M.match(v.AX_ID_PATTERN))){var e=M.split(" ")[0].slice(1);return e==="1"&&(e=""),M.charAt(0)+"axis"+e}},Z.name2id=function(M){if(M.match(v.AX_NAME_PATTERN)){var e=M.slice(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(v.AX_ID_PATTERN))&&!(e&&M.charAt(0)!==e)&&!(r&&!t)){var o=M.split(" ")[0].slice(1).replace(/^0+/,"");return o==="1"&&(o=""),M.charAt(0)+o+(r&&t?" domain":"")}},Z.list=function(S,M,e){var t=S._fullLayout;if(!t)return[];var r=Z.listIds(S,M),o=new Array(r.length),a;for(a=0;at?1:-1:+(S.slice(1)||1)-+(M.slice(1)||1)},Z.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function _(S,M){if(M&&M.length){for(var e=0;e0?".":"")+n;v.isPlainObject(s)?t(s,o,h,i+1):o(h,n,s)}})}}}),bc=He({"src/plots/plots.js"(Z,q){"use strict";var v=Vn(),_=Zv().timeFormatLocale,S=YA().formatLocale,M=ns(),e=KA(),t=Gh().version,r=so(),o=e1(),a=zl(),i=sa(),n=$n(),s=Gs().BADNUM,h=tf(),f=Qm().clearOutline,m=_2(),c=A_(),T=n5(),l=Wh().getModuleCalcData,x=i.relinkPrivateKeys,w=i._,A=q.exports={};i.extendFlat(A,r),A.attributes=au(),A.attributes.type.values=A.allTypes,A.fontAttrs=tc(),A.layoutAttributes=$y();var E=nz();A.executeAPICommand=E.executeAPICommand,A.computeAPICommandBindings=E.computeAPICommandBindings,A.manageCommandObserver=E.manageCommandObserver,A.hasSimpleAPICommandBindings=E.hasSimpleAPICommandBindings,A.redrawText=function(X){return X=i.getGraphDiv(X),new Promise(function(Q){setTimeout(function(){X._fullLayout&&(r.getComponentMethod("annotations","draw")(X),r.getComponentMethod("legend","draw")(X),r.getComponentMethod("colorbar","draw")(X),Q(A.previousPromises(X)))},300)})},A.resize=function(X){X=i.getGraphDiv(X);var Q,V=new Promise(function(le,ae){(!X||i.isHidden(X))&&ae(new Error("Resize must be passed a displayed plot div element.")),X._redrawTimer&&clearTimeout(X._redrawTimer),X._resolveResize&&(Q=X._resolveResize),X._resolveResize=le,X._redrawTimer=setTimeout(function(){if(!X.layout||X.layout.width&&X.layout.height||i.isHidden(X)){le(X);return}delete X.layout.width,delete X.layout.height;var j=X.changed;X.autoplay=!0,r.call("relayout",X,{autosize:!0}).then(function(){X.changed=j,X._resolveResize===le&&(delete X._resolveResize,le(X))})},100)});return Q&&Q(V),V},A.previousPromises=function(X){if((X._promises||[]).length)return Promise.all(X._promises).then(function(){X._promises=[]})},A.addLinks=function(X){if(!(!X._context.showLink&&!X._context.showSources)){var Q=X._fullLayout,V=i.ensureSingle(Q._paper,"text","js-plot-link-container",function(pe){pe.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:n.defaultLine,"pointer-events":"all"}).each(function(){var we=v.select(this);we.append("tspan").classed("js-link-to-tool",!0),we.append("tspan").classed("js-link-spacer",!0),we.append("tspan").classed("js-sourcelinks",!0)})}),le=V.node(),ae={y:Q._paper.attr("height")-9};document.body.contains(le)&&le.getComputedTextLength()>=Q.width-20?(ae["text-anchor"]="start",ae.x=5):(ae["text-anchor"]="end",ae.x=Q._paper.attr("width")-7),V.attr(ae);var j=V.select(".js-link-to-tool"),ee=V.select(".js-link-spacer"),te=V.select(".js-sourcelinks");X._context.showSources&&X._context.showSources(X),X._context.showLink&&p(X,j),ee.text(j.text()&&te.text()?" - ":"")}};function p(X,Q){Q.text("");var V=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(X._context.linkText+" \xBB");if(X._context.sendData)V.on("click",function(){A.sendDataToCloud(X)});else{var le=window.location.pathname.split("/"),ae=window.location.search;V.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+le[2].split(".")[0]+"/"+le[1]+ae})}}A.sendDataToCloud=function(X,Q){X.emit("plotly_beforeexport");let V=new URL(Q).origin;var le=A.graphJson(X,!1,"keepdata","object");le.version=t;var ae=new URL(Q);ae.searchParams.set("origin",window.location.origin);var j=window.open(ae.href,"_blank");if(!j){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),X.emit("plotly_exportfail");return}var ee=function(te){te.origin===V&&te.data&&te.data.type==="CHART_AUTH_SUCCESS"&&(j.postMessage({type:"chart",chart:le},V),window.removeEventListener("message",ee),X.emit("plotly_afterexport"))};return window.addEventListener("message",ee),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],d=["year","month","dayMonth","dayMonthYear"];A.supplyDefaults=function(X,Q){var V=Q&&Q.skipUpdateCalc,le=X._fullLayout||{};if(le._skipDefaults){delete le._skipDefaults;return}var ae=X._fullLayout={},j=X.layout||{},ee=X._fullData||[],te=X._fullData=[],pe=X.data||[],we=X.calcdata||[],Se=X._context||{},Re;X._transitionData||A.createTransitionData(X),ae._dfltTitle={plot:w(X,"Click to enter Plot title"),subtitle:w(X,"Click to enter Plot subtitle"),x:w(X,"Click to enter X axis title"),y:w(X,"Click to enter Y axis title"),colorbar:w(X,"Click to enter Colorscale title"),annotation:w(X,"new text")},ae._traceWord=w(X,"trace");var Pe=y(X,b);if(ae._mapboxAccessToken=Se.mapboxAccessToken,le._initialAutoSizeIsDone){var je=le.width,at=le.height;A.supplyLayoutGlobalDefaults(j,ae,Pe),j.width||(ae.width=je),j.height||(ae.height=at),A.sanitizeMargins(ae)}else{A.supplyLayoutGlobalDefaults(j,ae,Pe);var nt=!j.width||!j.height,tt=ae.autosize,Ve=Se.autosizable,he=nt&&(tt||Ve);he?A.plotAutoSize(X,j,ae):nt&&A.sanitizeMargins(ae),!tt&&nt&&(j.width=ae.width,j.height=ae.height)}ae._d3locale=D(Pe,ae.separators),ae._extraFormat=y(X,d),ae._initialAutoSizeIsDone=!0,ae._dataLength=pe.length,ae._modules=[],ae._visibleModules=[],ae._basePlotModules=[];var se=ae._subplots=g(),ne=ae._splomAxes={x:{},y:{}},Ce=ae._splomSubplots={};ae._splomGridDflt={},ae._scatterStackOpts={},ae._firstScatter={},ae._alignmentOpts={},ae._colorAxes={},ae._requestRangeslider={},ae._traceUids=u(ee,pe),A.supplyDataDefaults(pe,te,j,ae);var Ze=Object.keys(ne.x),rt=Object.keys(ne.y);if(Ze.length>1&&rt.length>1){for(r.getComponentMethod("grid","sizeDefaults")(j,ae),Re=0;Re15&&rt.length>15&&ae.shapes.length===0&&ae.images.length===0,A.linkSubplots(te,ae,ee,le),A.cleanPlot(te,ae,ee,le);var Vt=!!(le._has&&le._has("cartesian")),Ar=!!(ae._has&&ae._has("cartesian")),vr=Vt,qr=Ar;vr&&!qr?le._bgLayer.remove():qr&&!vr&&(ae._shouldCreateBgLayer=!0),le._zoomlayer&&!X._dragging&&f({_fullLayout:le}),P(te,ae),x(ae,le),r.getComponentMethod("colorscale","crossTraceDefaults")(te,ae),ae._preGUI||(ae._preGUI={}),ae._tracePreGUI||(ae._tracePreGUI={});var kr=ae._tracePreGUI,Ur={},_t;for(_t in kr)Ur[_t]="old";for(Re=0;Re0){var Se=1-2*j;ee=Math.round(Se*ee),te=Math.round(Se*te)}}var Re=A.layoutAttributes.width.min,Pe=A.layoutAttributes.height.min;ee1,at=!V.height&&Math.abs(le.height-te)>1;(at||je)&&(je&&(le.width=ee),at&&(le.height=te)),Q._initialAutoSize||(Q._initialAutoSize={width:ee,height:te}),A.sanitizeMargins(le)},A.supplyLayoutModuleDefaults=function(X,Q,V,le){var ae=r.componentsRegistry,j=Q._basePlotModules,ee,te,pe,we=r.subplotsRegistry.cartesian;for(ee in ae)pe=ae[ee],pe.includeBasePlot&&pe.includeBasePlot(X,Q);j.length||j.push(we),Q._has("cartesian")&&(r.getComponentMethod("grid","contentDefaults")(X,Q),we.finalizeSubplots(X,Q));for(var Se in Q._subplots)Q._subplots[Se].sort(i.subplotSort);for(te=0;te1&&(V.l/=tt,V.r/=tt)}if(Pe){var Ve=(V.t+V.b)/Pe;Ve>1&&(V.t/=Ve,V.b/=Ve)}var he=V.xl!==void 0?V.xl:V.x,se=V.xr!==void 0?V.xr:V.x,ne=V.yt!==void 0?V.yt:V.y,Ce=V.yb!==void 0?V.yb:V.y;je[Q]={l:{val:he,size:V.l+nt},r:{val:se,size:V.r+nt},b:{val:Ce,size:V.b+nt},t:{val:ne,size:V.t+nt}},at[Q]=1}if(!le._replotting)return A.doAutoMargin(X)}};function U(X){if("_redrawFromAutoMarginCount"in X._fullLayout)return!1;var Q=h.list(X,"",!0);for(var V in Q)if(Q[V].autoshift||Q[V].shift)return!0;return!1}A.doAutoMargin=function(X){var Q=X._fullLayout,V=Q.width,le=Q.height;Q._size||(Q._size={}),N(Q);var ae=Q._size,j=Q.margin,ee={t:0,b:0,l:0,r:0},te=i.extendFlat({},ae),pe=j.l,we=j.r,Se=j.t,Re=j.b,Pe=Q._pushmargin,je=Q._pushmarginIds,at=Q.minreducedwidth,nt=Q.minreducedheight;if(j.autoexpand!==!1){for(var tt in Pe)je[tt]||delete Pe[tt];var Ve=X._fullLayout._reservedMargin;for(var he in Ve)for(var se in Ve[he]){var ne=Ve[he][se];ee[se]=Math.max(ee[se],ne)}Pe.base={l:{val:0,size:pe},r:{val:1,size:we},t:{val:1,size:Se},b:{val:0,size:Re}};for(var Ce in ee){var Ze=0;for(var rt in Pe)rt!=="base"&&M(Pe[rt][Ce].size)&&(Ze=Pe[rt][Ce].size>Ze?Pe[rt][Ce].size:Ze);var Je=Math.max(0,j[Ce]-Ze);ee[Ce]=Math.max(0,ee[Ce]-Je)}for(var St in Pe){var kt=Pe[St].l||{},Bt=Pe[St].b||{},Vt=kt.val,Ar=kt.size,vr=Bt.val,qr=Bt.size,kr=V-ee.r-ee.l,Ur=le-ee.t-ee.b;for(var _t in Pe){if(M(Ar)&&Pe[_t].r){var Fe=Pe[_t].r.val,Ye=Pe[_t].r.size;if(Fe>Vt){var Ae=(Ar*Fe+(Ye-kr)*Vt)/(Fe-Vt),Le=(Ye*(1-Vt)+(Ar-kr)*(1-Fe))/(Fe-Vt);Ae+Le>pe+we&&(pe=Ae,we=Le)}}if(M(qr)&&Pe[_t].t){var We=Pe[_t].t.val,Ke=Pe[_t].t.size;if(We>vr){var st=(qr*We+(Ke-Ur)*vr)/(We-vr),ot=(Ke*(1-vr)+(qr-Ur)*(1-We))/(We-vr);st+ot>Re+Se&&(Re=st,Se=ot)}}}}}var Ut=i.constrain(V-j.l-j.r,O,at),Ct=i.constrain(le-j.t-j.b,L,nt),Pt=Math.max(0,V-Ut),jt=Math.max(0,le-Ct);if(Pt){var cr=(pe+we)/Pt;cr>1&&(pe/=cr,we/=cr)}if(jt){var or=(Re+Se)/jt;or>1&&(Re/=or,Se/=or)}if(ae.l=Math.round(pe)+ee.l,ae.r=Math.round(we)+ee.r,ae.t=Math.round(Se)+ee.t,ae.b=Math.round(Re)+ee.b,ae.p=Math.round(j.pad),ae.w=Math.round(V)-ae.l-ae.r,ae.h=Math.round(le)-ae.t-ae.b,!Q._replotting&&(A.didMarginChange(te,ae)||U(X))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var nr=3*(1+Object.keys(je).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},A.graphJson=function(X,Q,V,le,ae,j){(ae&&Q&&!X._fullData||ae&&!Q&&!X._fullLayout)&&A.supplyDefaults(X);var ee=ae?X._fullData:X.data,te=ae?X._fullLayout:X.layout,pe=(X._transitionData||{})._frames;function we(Pe,je){if(typeof Pe=="function")return je?"_function_":null;if(i.isPlainObject(Pe)){var at={},nt;return Object.keys(Pe).sort().forEach(function(se){if(["_","["].indexOf(se.charAt(0))===-1){if(typeof Pe[se]=="function"){je&&(at[se]="_function");return}if(V==="keepdata"){if(se.slice(-3)==="src")return}else if(V==="keepstream"){if(nt=Pe[se+"src"],typeof nt=="string"&&nt.indexOf(":")>0&&!i.isPlainObject(Pe.stream))return}else if(V!=="keepall"&&(nt=Pe[se+"src"],typeof nt=="string"&&nt.indexOf(":")>0))return;at[se]=we(Pe[se],je)}}),at}var tt=Array.isArray(Pe),Ve=i.isTypedArray(Pe);if((tt||Ve)&&Pe.dtype&&Pe.shape){var he=Pe.bdata;return we({dtype:Pe.dtype,shape:Pe.shape,bdata:i.isArrayBuffer(he)?e.encode(he):he},je)}return tt?Pe.map(function(se){return we(se,je)}):Ve?i.simpleMap(Pe,i.identity):i.isJSDate(Pe)?i.ms2DateTimeLocal(+Pe):Pe}var Se={data:(ee||[]).map(function(Pe){var je=we(Pe);return Q&&delete je.fit,je})};if(!Q&&(Se.layout=we(te),ae)){var Re=te._size;Se.layout.computed={margin:{b:Re.b,l:Re.l,r:Re.r,t:Re.t}}}return pe&&(Se.frames=we(pe)),j&&(Se.config=we(X._context,!0)),le==="object"?Se:JSON.stringify(Se)},A.modifyFrames=function(X,Q){var V,le,ae,j=X._transitionData._frames,ee=X._transitionData._frameHash;for(V=0;V0&&(X._transitioningWithDuration=!0),X._transitionData._interruptCallbacks.push(function(){le=!0}),V.redraw&&X._transitionData._interruptCallbacks.push(function(){return r.call("redraw",X)}),X._transitionData._interruptCallbacks.push(function(){X.emit("plotly_transitioninterrupted",[])});var Pe=0,je=0;function at(){return Pe++,function(){je++,!le&&je===Pe&&te(Re)}}V.runFn(at),setTimeout(at())})}function te(Re){if(X._transitionData)return j(X._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(V.redraw)return r.call("redraw",X)}).then(function(){X._transitioning=!1,X._transitioningWithDuration=!1,X.emit("plotly_transitioned",[])}).then(Re)}function pe(){if(X._transitionData)return X._transitioning=!1,ae(X._transitionData._interruptCallbacks)}var we=[A.previousPromises,pe,V.prepareFn,A.rehover,A.reselect,ee],Se=i.syncOrAsync(we,X);return(!Se||!Se.then)&&(Se=Promise.resolve()),Se.then(function(){return X})}A.doCalcdata=function(X,Q){var V=h.list(X),le=X._fullData,ae=X._fullLayout,j,ee,te,pe,we=new Array(le.length),Se=(X.calcdata||[]).slice();for(X.calcdata=we,ae._numBoxes=0,ae._numViolins=0,ae._violinScaleGroupStats={},X._hmpixcount=0,X._hmlumcount=0,ae._piecolormap={},ae._sunburstcolormap={},ae._treemapcolormap={},ae._iciclecolormap={},ae._funnelareacolormap={},te=0;te=0;pe--)if(Ce[pe].enabled){j._indexToPoints=Ce[pe]._indexToPoints;break}ee&&ee.calc&&(ne=ee.calc(X,j))}(!Array.isArray(ne)||!ne[0])&&(ne=[{x:s,y:s}]),ne[0].t||(ne[0].t={}),ne[0].trace=j,we[he]=ne}}for(de(V,le,ae),te=0;teee||Pe>te)&&(ae.style("overflow","hidden"),Se=ae.node().getBoundingClientRect(),Re=Se.width,Pe=Se.height);var je=+O.attr("x"),at=+O.attr("y"),nt=Y||O.node().getBoundingClientRect().height,tt=-nt/4;if(ue[0]==="y")j.attr({transform:"rotate("+[-90,je,at]+")"+_(-Re/2,tt-Pe/2)});else if(ue[0]==="l")at=tt-Pe/2;else if(ue[0]==="a"&&ue.indexOf("atitle")!==0)je=0,at=tt;else{var Ve=O.attr("text-anchor");je=je-Re*(Ve==="middle"?.5:Ve==="end"?1:0),at=at+tt-Pe/2}ae.attr({x:je,y:at}),U&&U.call(O,j),de(j)})})):ce(),O};var t=/(<|<|<)/g,r=/(>|>|>)/g;function o(O){return O.replace(t,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function i(O,L,U){var B=parseInt((MathJax.version||"").split(".")[0]);if(B!==2&&B!==3){v.warn("No MathJax version:",MathJax.version);return}var W,$,ue,ce,de=function(){return $=v.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"})},Y=function(){$=v.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},X=function(){if(W=MathJax.Hub.config.menuSettings.renderer,W!=="SVG")return MathJax.Hub.setRenderer("SVG")},Q=function(){W=MathJax.config.startup.output,W!=="svg"&&(MathJax.config.startup.output="svg")},V=function(){var pe="math-output-"+v.randstr({},64);ce=q.select("body").append("div").attr({id:pe}).style({visibility:"hidden",position:"absolute","font-size":L.fontSize+"px"}).text(o(O));var we=ce.node();return B===2?MathJax.Hub.Typeset(we):MathJax.typeset([we])},le=function(){var pe=ce.select(B===2?".MathJax_SVG":".MathJax"),we=!pe.empty()&&ce.select("svg").node();if(!we)v.log("There was an error in the tex syntax.",O),U();else{var Se=we.getBoundingClientRect(),Re;B===2?Re=q.select("body").select("#MathJax_SVG_glyphs"):Re=pe.select("defs"),U(pe,Re,Se)}ce.remove()},ae=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($)},te=function(){MathJax.config=$};B===2?MathJax.Hub.Queue(de,X,V,le,ae,ee):B===3&&(Y(),Q(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){V(),le(),j(),te()}))}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"},h={sub:"-0.21em",sup:"0.42em"},f="\u200B",m=["http:","https:","mailto:","",void 0,":"],c=Z.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;Z.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,p=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function b(O,L){if(!O)return null;var U=O.match(L),B=U&&(U[3]||U[4]);return B&&y(B)}var d=/(^|;)\s*color:/;Z.plainText=function(O,L){L=L||{};for(var U=L.len!==void 0&&L.len!==-1?L.len:1/0,B=L.allowedTags!==void 0?L.allowedTags:["br"],W="...",$=W.length,ue=O.split(T),ce=[],de="",Y=0,X=0;X$?ce.push(Q.slice(0,Math.max(0,j-$))+W):ce.push(Q.slice(0,j));break}de=""}}return ce.join("")};var u={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},g=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function y(O){return O.replace(g,function(L,U){var B;return U.charAt(0)==="#"?B=D(U.charAt(1)==="x"?parseInt(U.slice(2),16):parseInt(U.slice(1),10)):B=u[U],B||L})}Z.convertEntities=y;function D(O){if(!(O>1114111)){var L=String.fromCodePoint;if(L)return L(O);var U=String.fromCharCode;return O<=65535?U(O):U((O>>10)+55232,O%1024+56320)}}function P(O,L){L=L.replace(c," ");var U=!1,B=[],W,$=-1;function ue(){$++;var Pe=document.createElementNS(S.svg,"tspan");q.select(Pe).attr({class:"line",dy:$*M+"em"}),O.appendChild(Pe),W=Pe;var je=B;if(B=[{node:Pe}],je.length>1)for(var at=1;at.",L);return}var je=B.pop();Pe!==je.type&&v.log("Start tag <"+je.type+"> doesnt match end tag <"+Pe+">. Pretending it did match.",L),W=B[B.length-1].node}var X=x.test(L);X?ue():(W=O,B=[{node:O}]);for(var Q=L.split(T),V=0;V=0;x--,w++){var A=c[x];l[w]=[1-A[0],A[1]]}return l}function h(c,T){T=T||{};for(var l=c.domain,x=c.range,w=x.length,A=new Array(w),E=0;Ec-f?f=c-(m-c):m-c=0?x=o.colorscale.sequential:x=o.colorscale.sequentialminus,s._sync("colorscale",x)}}}}),rc=He({"src/components/colorscale/index.js"(Z,q){"use strict";var v=W0(),_=wp();q.exports={moduleType:"component",name:"colorscale",attributes:ku(),layoutAttributes:o5(),supplyLayoutDefaults:oz(),handleDefaults:_h(),crossTraceDefaults:sz(),calc:Tp(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:_.hasColorscale,extractOpts:_.extractOpts,extractScale:_.extractScale,flipScale:_.flipScale,makeColorScaleFunc:_.makeColorScaleFunc,makeColorScaleFuncFromTrace:_.makeColorScaleFuncFromTrace}}}),Fu=He({"src/traces/scatter/subtypes.js"(Z,q){"use strict";var v=sa(),_=hp().isTypedArraySpec;q.exports={hasLines:function(S){return S.visible&&S.mode&&S.mode.indexOf("lines")!==-1},hasMarkers:function(S){return S.visible&&(S.mode&&S.mode.indexOf("markers")!==-1||S.type==="splom")},hasText:function(S){return S.visible&&S.mode&&S.mode.indexOf("text")!==-1},isBubble:function(S){var M=S.marker;return v.isPlainObject(M)&&(v.isArrayOrTypedArray(M.size)||_(M.size))}}}}),r1=He({"src/traces/scatter/make_bubble_size_func.js"(Z,q){"use strict";var v=ns();q.exports=function(S,M){M||(M=2);var e=S.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 v(i)&&i>0?Math.max(i,r):0}}}}),$p=He({"src/components/fx/helpers.js"(Z){"use strict";var q=sa();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=0&&o.index2&&(r.push([a].concat(i.splice(0,2))),n="l",a=a=="m"?"l":"L");;){if(i.length==v[n])return i.unshift(a),r.push(i);if(i.length0&&(se=100,he=he.replace("-open","")),he.indexOf("-dot")>0&&(se+=200,he=he.replace("-dot","")),he=l.symbolNames.indexOf(he),he>=0&&(he+=se)}return he%100>=d||he>=400?0:Math.floor(Math.max(he,0))};function g(he,se,ne,Ce){var Ze=he%100;return l.symbolFuncs[Ze](se,ne,Ce)+(he>=200?u:"")}var y=S("~f"),D={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(he,se,ne,Ce,Ze,rt){var Je=D[Ce];return P(he,se,ne,Je.type,Ze,rt,Je.start,Je.stop,!1,Je.reversed)};function P(he,se,ne,Ce,Ze,rt,Je,St,kt,Bt){var Vt=Ze.length,Ar;Ce==="linear"?Ar={node:"linearGradient",attrs:{x1:Je.x,y1:Je.y,x2:St.x,y2:St.y,gradientUnits:kt?"userSpaceOnUse":"objectBoundingBox"},reversed:Bt}:Ce==="radial"&&(Ar={node:"radialGradient",reversed:Bt});for(var vr=new Array(Vt),qr=0;qr=0&&he.i===void 0&&(he.i=rt.i),se.style("opacity",Ce.selectedOpacityFn?Ce.selectedOpacityFn(he):he.mo===void 0?Je.opacity:he.mo),Ce.ms2mrc){var kt;he.ms==="various"||Je.size==="various"?kt=3:kt=Ce.ms2mrc(he.ms),he.mrc=kt,Ce.selectedSizeFn&&(kt=he.mrc=Ce.selectedSizeFn(he));var Bt=l.symbolNumber(he.mx||Je.symbol)||0;he.om=Bt%200>=100;var Vt=Ve(he,ne),Ar=ee(he,ne);se.attr("d",g(Bt,kt,Vt,Ar))}var vr=!1,qr,kr,Ur;if(he.so)Ur=St.outlierwidth,kr=St.outliercolor,qr=Je.outliercolor;else{var _t=(St||{}).width;Ur=(he.mlw+1||_t+1||(he.trace?(he.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in he?kr=he.mlcc=Ce.lineScale(he.mlc):_.isArrayOrTypedArray(St.color)?kr=r.defaultLine:kr=St.color,_.isArrayOrTypedArray(Je.color)&&(qr=r.defaultLine,vr=!0),"mc"in he?qr=he.mcc=Ce.markerScale(he.mc):qr=Je.color||Je.colors||"rgba(0,0,0,0)",Ce.selectedColorFn&&(qr=Ce.selectedColorFn(he))}let Fe=he.mld||(St||{}).dash;if(Fe&&l.dashLine(se,Fe,Ur),he.om)se.call(r.stroke,qr).style({"stroke-width":(Ur||1)+"px",fill:"none"});else{se.style("stroke-width",(he.isBlank?0:Ur)+"px");var Ye=Je.gradient,Ae=he.mgt;Ae?vr=!0:Ae=Ye&&Ye.type,_.isArrayOrTypedArray(Ae)&&(Ae=Ae[0],D[Ae]||(Ae=0));var Le=Je.pattern,We=l.getPatternAttr,Ke=Le&&(We(Le.shape,he.i,"")||We(Le.path,he.i,""));if(Ae&&Ae!=="none"){var st=he.mgc;st?vr=!0:st=Ye.color;var ot=ne.uid;vr&&(ot+="-"+he.i),l.gradient(se,Ze,ot,Ae,[[0,st],[1,qr]],"fill")}else if(Ke){var Ut=!1,Ct=Le.fgcolor;!Ct&&rt&&rt.color&&(Ct=rt.color,Ut=!0);var Pt=We(Ct,he.i,rt&&rt.color||null),jt=We(Le.bgcolor,he.i,null),cr=Le.fgopacity,or=We(Le.size,he.i,8),nr=We(Le.solidity,he.i,.3);Ut=Ut||he.mcc||_.isArrayOrTypedArray(Le.shape)||_.isArrayOrTypedArray(Le.path)||_.isArrayOrTypedArray(Le.bgcolor)||_.isArrayOrTypedArray(Le.fgcolor)||_.isArrayOrTypedArray(Le.size)||_.isArrayOrTypedArray(Le.solidity);var Pr=ne.uid;Ut&&(Pr+="-"+he.i),l.pattern(se,"point",Ze,Pr,Ke,or,nr,he.mcc,Le.fillmode,jt,Pt,cr)}else _.isArrayOrTypedArray(qr)?r.fill(se,qr[he.i]):r.fill(se,qr);Ur&&r.stroke(se,kr)}},l.makePointStyleFns=function(he){var se={},ne=he.marker;return se.markerScale=l.tryColorscale(ne,""),se.lineScale=l.tryColorscale(ne,"line"),t.traceIs(he,"symbols")&&(se.ms2mrc=m.isBubble(he)?c(he):function(){return(ne.size||6)/2}),he.selectedpoints&&_.extendFlat(se,l.makeSelectedPointStyleFns(he)),se},l.makeSelectedPointStyleFns=function(he){var se={},ne=he.selected||{},Ce=he.unselected||{},Ze=he.marker||{},rt=ne.marker||{},Je=Ce.marker||{},St=Ze.opacity,kt=rt.opacity,Bt=Je.opacity,Vt=kt!==void 0,Ar=Bt!==void 0;(_.isArrayOrTypedArray(St)||Vt||Ar)&&(se.selectedOpacityFn=function(Le){var We=Le.mo===void 0?Ze.opacity:Le.mo;return Le.selected?Vt?kt:We:Ar?Bt:f*We});var vr=Ze.color,qr=rt.color,kr=Je.color;(qr||kr)&&(se.selectedColorFn=function(Le){var We=Le.mcc||vr;return Le.selected?qr||We:kr||We});var Ur=Ze.size,_t=rt.size,Fe=Je.size,Ye=_t!==void 0,Ae=Fe!==void 0;return t.traceIs(he,"symbols")&&(Ye||Ae)&&(se.selectedSizeFn=function(Le){var We=Le.mrc||Ur/2;return Le.selected?Ye?_t/2:We:Ae?Fe/2:We}),se},l.makeSelectedTextStyleFns=function(he){var se={},ne=he.selected||{},Ce=he.unselected||{},Ze=he.textfont||{},rt=ne.textfont||{},Je=Ce.textfont||{},St=Ze.color,kt=rt.color,Bt=Je.color;return se.selectedTextColorFn=function(Vt){var Ar=Vt.tc||St;return Vt.selected?kt||Ar:Bt||(kt?Ar:r.addOpacity(Ar,f))},se},l.selectedPointStyle=function(he,se){if(!(!he.size()||!se.selectedpoints)){var ne=l.makeSelectedPointStyleFns(se),Ce=se.marker||{},Ze=[];ne.selectedOpacityFn&&Ze.push(function(rt,Je){rt.style("opacity",ne.selectedOpacityFn(Je))}),ne.selectedColorFn&&Ze.push(function(rt,Je){r.fill(rt,ne.selectedColorFn(Je))}),ne.selectedSizeFn&&Ze.push(function(rt,Je){var St=Je.mx||Ce.symbol||0,kt=ne.selectedSizeFn(Je);rt.attr("d",g(l.symbolNumber(St),kt,Ve(Je,se),ee(Je,se))),Je.mrc2=kt}),Ze.length&&he.each(function(rt){for(var Je=v.select(this),St=0;St0?ne:0}l.textPointStyle=function(he,se,ne){if(he.size()){var Ce;if(se.selectedpoints){var Ze=l.makeSelectedTextStyleFns(se);Ce=Ze.selectedTextColorFn}var rt=se.texttemplate,Je=ne._fullLayout;he.each(function(St){var kt=v.select(this),Bt=rt?_.extractOption(St,se,"txt","texttemplate"):_.extractOption(St,se,"tx","text");if(!Bt&&Bt!==0){kt.remove();return}if(rt){var Vt=se._module.formatLabels,Ar=Vt?Vt(St,se,Je):{},vr={};T(vr,se,St.i),Bt=_.texttemplateString({data:[vr,St,se._meta],fallback:se.texttemplatefallback,labels:Ar,locale:Je._d3locale,template:Bt})}var qr=St.tp||se.textposition,kr=N(St,se),Ur=Ce?Ce(St):St.tc||se.textfont.color;kt.call(l.font,{family:St.tf||se.textfont.family,weight:St.tw||se.textfont.weight,style:St.ty||se.textfont.style,variant:St.tv||se.textfont.variant,textcase:St.tC||se.textfont.textcase,lineposition:St.tE||se.textfont.lineposition,shadow:St.tS||se.textfont.shadow,size:kr,color:Ur}).text(Bt).call(i.convertToTspans,ne).call(F,qr,kr,St.mrc)})}},l.selectedTextStyle=function(he,se){if(!(!he.size()||!se.selectedpoints)){var ne=l.makeSelectedTextStyleFns(se);he.each(function(Ce){var Ze=v.select(this),rt=ne.selectedTextColorFn(Ce),Je=Ce.tp||se.textposition,St=N(Ce,se);r.fill(Ze,rt);var kt=t.traceIs(se,"bar-like");F(Ze,Je,St,Ce.mrc2||Ce.mrc,kt)})}};var O=.5;l.smoothopen=function(he,se){if(he.length<3)return"M"+he.join("L");var ne="M"+he[0],Ce=[],Ze;for(Ze=1;Ze=kt||Le>=Vt&&Le<=kt)&&(We<=Ar&&We>=Bt||We>=Ar&&We<=Bt)&&(he=[Le,We])}return he}l.applyBackoff=Y,l.makeTester=function(){var he=_.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(ne){ne.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),se=_.ensureSingle(he,"path","js-reference-point",function(ne){ne.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=he,l.testref=se},l.savedBBoxes={};var X=0,Q=1e4;l.bBox=function(he,se,ne){ne||(ne=V(he));var Ce;if(ne){if(Ce=l.savedBBoxes[ne],Ce)return _.extendFlat({},Ce)}else if(he.childNodes.length===1){var Ze=he.childNodes[0];if(ne=V(Ze),ne){var rt=+Ze.getAttribute("x")||0,Je=+Ze.getAttribute("y")||0,St=Ze.getAttribute("transform");if(!St){var kt=l.bBox(Ze,!1,ne);return rt&&(kt.left+=rt,kt.right+=rt),Je&&(kt.top+=Je,kt.bottom+=Je),kt}if(ne+="~"+rt+"~"+Je+"~"+St,Ce=l.savedBBoxes[ne],Ce)return _.extendFlat({},Ce)}}var Bt,Vt;se?Bt=he:(Vt=l.tester.node(),Bt=he.cloneNode(!0),Vt.appendChild(Bt)),v.select(Bt).attr("transform",null).call(i.positionText,0,0);var Ar=Bt.getBoundingClientRect(),vr=l.testref.node().getBoundingClientRect();se||Vt.removeChild(Bt);var qr={height:Ar.height,width:Ar.width,left:Ar.left-vr.left,top:Ar.top-vr.top,right:Ar.right-vr.left,bottom:Ar.bottom-vr.top};return X>=Q&&(l.savedBBoxes={},X=0),ne&&(l.savedBBoxes[ne]=qr),X++,_.extendFlat({},qr)};function V(he){var se=he.getAttribute("data-unformatted");if(se!==null)return se+he.getAttribute("data-math")+he.getAttribute("text-anchor")+he.getAttribute("style")}l.setClipUrl=function(he,se,ne){he.attr("clip-path",le(se,ne))};function le(he,se){if(!he)return null;var ne=se._context,Ce=ne._exportedPlot?"":ne._baseUrl||"";return Ce?"url('"+Ce+"#"+he+"')":"url(#"+he+")"}l.getTranslate=function(he){var se=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ze=Ce.replace(se,function(rt,Je,St){return[Je,St].join(" ")}).split(" ");return{x:+Ze[0]||0,y:+Ze[1]||0}},l.setTranslate=function(he,se,ne){var Ce=/(\btranslate\(.*?\);?)/,Ze=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Je=he[Ze]("transform")||"";return se=se||0,ne=ne||0,Je=Je.replace(Ce,"").trim(),Je+=a(se,ne),Je=Je.trim(),he[rt]("transform",Je),Je},l.getScale=function(he){var se=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ze=Ce.replace(se,function(rt,Je,St){return[Je,St].join(" ")}).split(" ");return{x:+Ze[0]||1,y:+Ze[1]||1}},l.setScale=function(he,se,ne){var Ce=/(\bscale\(.*?\);?)/,Ze=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Je=he[Ze]("transform")||"";return se=se||1,ne=ne||1,Je=Je.replace(Ce,"").trim(),Je+="scale("+se+","+ne+")",Je=Je.trim(),he[rt]("transform",Je),Je};var ae=/\s*sc.*/;l.setPointGroupScale=function(he,se,ne){if(se=se||1,ne=ne||1,!!he){var Ce=se===1&&ne===1?"":"scale("+se+","+ne+")";he.each(function(){var Ze=(this.getAttribute("transform")||"").replace(ae,"");Ze+=Ce,Ze=Ze.trim(),this.setAttribute("transform",Ze)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(he,se,ne){he&&he.each(function(){var Ce,Ze=v.select(this),rt=Ze.select("text");if(rt.node()){var Je=parseFloat(rt.attr("x")||0),St=parseFloat(rt.attr("y")||0),kt=(Ze.attr("transform")||"").match(j);se===1&&ne===1?Ce=[]:Ce=[a(Je,St),"scale("+se+","+ne+")",a(-Je,-St)],kt&&Ce.push(kt),Ze.attr("transform",Ce.join(""))}})};function ee(he,se){var ne;return he&&(ne=he.mf),ne===void 0&&(ne=se.marker&&se.marker.standoff||0),!se._geo&&!se._xA?-ne:ne}l.getMarkerStandoff=ee;var te=Math.atan2,pe=Math.cos,we=Math.sin;function Se(he,se){var ne=se[0],Ce=se[1];return[ne*pe(he)-Ce*we(he),ne*we(he)+Ce*pe(he)]}var Re,Pe,je,at,nt,tt;function Ve(he,se){var ne=he.ma;ne===void 0&&(ne=se.marker.angle,(!ne||_.isArrayOrTypedArray(ne))&&(ne=0));var Ce,Ze,rt=se.marker.angleref;if(rt==="previous"||rt==="north"){if(se._geo){var Je=se._geo.project(he.lonlat);Ce=Je[0],Ze=Je[1]}else{var St=se._xA,kt=se._yA;if(St&&kt)Ce=St.c2p(he.x),Ze=kt.c2p(he.y);else return 90}if(se._geo){var Bt=he.lonlat[0],Vt=he.lonlat[1],Ar=se._geo.project([Bt,Vt+1e-5]),vr=se._geo.project([Bt+1e-5,Vt]),qr=te(vr[1]-Ze,vr[0]-Ce),kr=te(Ar[1]-Ze,Ar[0]-Ce),Ur;if(rt==="north")Ur=ne/180*Math.PI;else if(rt==="previous"){var _t=Bt/180*Math.PI,Fe=Vt/180*Math.PI,Ye=Re/180*Math.PI,Ae=Pe/180*Math.PI,Le=Ye-_t,We=pe(Ae)*we(Le),Ke=we(Ae)*pe(Fe)-pe(Ae)*we(Fe)*pe(Le);Ur=-te(We,Ke)-Math.PI,Re=Bt,Pe=Vt}var st=Se(qr,[pe(Ur),0]),ot=Se(kr,[we(Ur),0]);ne=te(st[1]+ot[1],st[0]+ot[0])/Math.PI*180,rt==="previous"&&!(tt===se.uid&&he.i===nt+1)&&(ne=null)}if(rt==="previous"&&!se._geo)if(tt===se.uid&&he.i===nt+1&&M(Ce)&&M(Ze)){var Ut=Ce-je,Ct=Ze-at,Pt=se.line&&se.line.shape||"",jt=Pt.slice(Pt.length-1);jt==="h"&&(Ct=0),jt==="v"&&(Ut=0),ne+=te(Ct,Ut)/Math.PI*180+90}else ne=null}return je=Ce,at=Ze,nt=he.i,tt=se.uid,ne}l.getMarkerAngle=Ve}}),K0=He({"src/components/titles/index.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=bc(),M=so(),e=sa(),t=e.strTranslate,r=as(),o=$n(),a=su(),i=Km(),n=uh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,h=1.6,f=1.6;function m(c,T,l){var x=c._fullLayout,w=l.propContainer,A=l.propName,E=l.placeholder,p=l.traceIndex,b=l.avoid||{},d=l.attributes,u=l.transform,g=l.containerGroup,y=1,D=w.title,P=(D&&D.text?D.text:"").trim(),z=!1,F=D&&D.font?D.font:{},N=F.family,O=F.size,L=F.color,U=F.weight,B=F.style,W=F.variant,$=F.textcase,ue=F.lineposition,ce=F.shadow,de=l.subtitlePropName,Y=!!de,X=l.subtitlePlaceholder,Q=(w.title||{}).subtitle||{text:"",font:{}},V=(Q.text||"").trim(),le=!1,ae=1,j=Q.font,ee=j.family,te=j.size,pe=j.color,we=j.weight,Se=j.style,Re=j.variant,Pe=j.textcase,je=j.lineposition,at=j.shadow,nt;A==="title.text"?nt="titleText":A.indexOf("axis")!==-1?nt="axisTitleText":A.indexOf("colorbar")!==-1&&(nt="colorbarTitleText");var tt=c._context.edits[nt];function Ve(vr,qr){return vr===void 0||qr===void 0?!1:vr.replace(s," % ")===qr.replace(s," % ")}P===""?y=0:Ve(P,E)&&(tt||(P=""),y=.2,z=!0),Y&&(V===""?ae=0:Ve(V,X)&&(tt||(V=""),ae=.2,le=!0)),l._meta?P=e.templateString(P,l._meta):x._meta&&(P=e.templateString(P,x._meta));var he=P||V||tt,se;g||(g=e.ensureSingle(x._infolayer,"g","g-"+T),se=x._hColorbarMoveTitle);var ne=g.selectAll("text."+T).data(he?[0]:[]);ne.enter().append("text"),ne.text(P).attr("class",T),ne.exit().remove();var Ce=null,Ze=T+"-subtitle",rt=V||tt;if(Y&&(Ce=g.selectAll("text."+Ze).data(rt?[0]:[]),Ce.enter().append("text"),Ce.text(V).attr("class",Ze),Ce.exit().remove()),!he)return g;function Je(vr,qr){e.syncOrAsync([St,kt],{title:vr,subtitle:qr})}function St(vr){var qr=vr.title,kr=vr.subtitle,Ur;!u&&se&&(u={}),u?(Ur="",u.rotate&&(Ur+="rotate("+[u.rotate,d.x,d.y]+")"),(u.offset||se)&&(Ur+=t(0,(u.offset||0)-(se||0)))):Ur=null,qr.attr("transform",Ur);function _t(Ke){if(Ke){var st=v.select(Ke.node().parentNode).select("."+Ze);if(!st.empty()){var ot=Ke.node().getBBox();if(ot.height){var Ut=ot.y+ot.height+h*te;st.attr("y",Ut)}}}}if(qr.style("opacity",y*o.opacity(L)).call(r.font,{color:o.rgb(L),size:v.round(O,2),family:N,weight:U,style:B,variant:W,textcase:$,shadow:ce,lineposition:ue}).attr(d).call(a.convertToTspans,c,_t),kr&&!kr.empty()){var Fe=g.select("."+T+"-math-group"),Ye=qr.node().getBBox(),Ae=Fe.node()?Fe.node().getBBox():void 0,Le=Ae?Ae.y+Ae.height+h*te:Ye.y+Ye.height+f*te,We=e.extendFlat({},d,{y:Le});kr.attr("transform",Ur),kr.style("opacity",ae*o.opacity(pe)).call(r.font,{color:o.rgb(pe),size:v.round(te,2),family:ee,weight:we,style:Se,variant:Re,textcase:Pe,shadow:at,lineposition:je}).attr(We).call(a.convertToTspans,c)}return S.previousPromises(c)}function kt(vr){var qr=vr.title,kr=v.select(qr.node().parentNode);if(b&&b.selection&&b.side&&P){kr.attr("transform",null);var Ur=n[b.side],_t=b.side==="left"||b.side==="top"?-1:1,Fe=_(b.pad)?b.pad:2,Ye=r.bBox(kr.node()),Ae={t:0,b:0,l:0,r:0},Le=c._fullLayout._reservedMargin;for(var We in Le)for(var Ke in Le[We]){var st=Le[We][Ke];Ae[Ke]=Math.max(Ae[Ke],st)}var ot={left:Ae.l,top:Ae.t,right:x.width-Ae.r,bottom:x.height-Ae.b},Ut=b.maxShift||_t*(ot[b.side]-Ye[b.side]),Ct=0;if(Ut<0)Ct=Ut;else{var Pt=b.offsetLeft||0,jt=b.offsetTop||0;Ye.left-=Pt,Ye.right-=Pt,Ye.top-=jt,Ye.bottom-=jt,b.selection.each(function(){var or=r.bBox(this);e.bBoxIntersect(Ye,or,Fe)&&(Ct=Math.max(Ct,_t*(or[b.side]-Ye[Ur])+Fe))}),Ct=Math.min(Ut,Ct),w._titleScoot=Math.abs(Ct)}if(Ct>0||Ut<0){var cr={left:[-Ct,0],right:[Ct,0],top:[0,-Ct],bottom:[0,Ct]}[b.side];kr.attr("transform",t(cr[0],cr[1]))}}}ne.call(Je,Ce);function Bt(vr,qr){vr.text(qr).on("mouseover.opacity",function(){v.select(this).transition().duration(i.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(i.HIDE_PLACEHOLDER).style("opacity",0)})}if(tt&&(P?ne.on(".opacity",null):(Bt(ne,E),z=!0),ne.call(a.makeEditable,{gd:c}).on("edit",function(vr){p!==void 0?M.call("_guiRestyle",c,A,vr,p):M.call("_guiRelayout",c,A,vr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Je)}).on("input",function(vr){this.text(vr||" ").call(a.positionText,d.x,d.y)}),Y)){if(Y&&!P){var Vt=ne.node().getBBox(),Ar=Vt.y+Vt.height+f*te;Ce.attr("y",Ar)}V?Ce.on(".opacity",null):(Bt(Ce,X),le=!0),Ce.call(a.makeEditable,{gd:c}).on("edit",function(vr){M.call("_guiRelayout",c,"title.subtitle.text",vr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Je)}).on("input",function(vr){this.text(vr||" ").call(a.positionText,Ce.attr("x"),Ce.attr("y"))})}return ne.classed("js-placeholder",z),Ce&&!Ce.empty()&&Ce.classed("js-placeholder",le),g}q.exports={draw:m,SUBTITLE_PADDING_EM:f,SUBTITLE_PADDING_MATHJAX_EM:h}}}),wv=He({"src/plots/cartesian/set_convert.js"(Z,q){"use strict";var v=Vn(),_=Zv().utcFormat,S=sa(),M=S.numberFormat,e=ns(),t=S.cleanNumber,r=S.ms2DateTime,o=S.dateTime2ms,a=S.ensureNumber,i=S.isArrayOrTypedArray,n=Gs(),s=n.FP_SAFE,h=n.BADNUM,f=n.LOG_CLIP,m=n.ONEWEEK,c=n.ONEDAY,T=n.ONEHOUR,l=n.ONEMIN,x=n.ONESEC,w=tf(),A=lh(),E=A.HOUR_PATTERN,p=A.WEEKDAY_PATTERN;function b(u){return Math.pow(10,u)}function d(u){return u!=null}q.exports=function(g,y){y=y||{};var D=g._id||"x",P=D.charAt(0);function z(V,le){if(V>0)return Math.log(V)/Math.LN10;if(V<=0&&le&&g.range&&g.range.length===2){var ae=g.range[0],j=g.range[1];return .5*(ae+j-2*f*Math.abs(ae-j))}else return h}function F(V,le,ae,j){if((j||{}).msUTC&&e(V))return+V;var ee=o(V,ae||g.calendar);if(ee===h)if(e(V)){V=+V;var te=Math.floor(S.mod(V+.05,1)*10),pe=Math.round(V-te/10);ee=o(new Date(pe))+te/10}else return h;return ee}function N(V,le,ae){return r(V,le,ae||g.calendar)}function O(V){return g._categories[Math.round(V)]}function L(V){if(d(V)){if(g._categoriesMap===void 0&&(g._categoriesMap={}),g._categoriesMap[V]!==void 0)return g._categoriesMap[V];g._categories.push(typeof V=="number"?String(V):V);var le=g._categories.length-1;return g._categoriesMap[V]=le,le}return h}function U(V,le){for(var ae=new Array(le),j=0;jg.range[1]&&(ae=!ae);for(var j=ae?-1:1,ee=j*V,te=0,pe=0;peSe)te=pe+1;else{te=ee<(we+Se)/2?pe:pe+1;break}}var Re=g._B[te]||0;return isFinite(Re)?ue(V,g._m2,Re):0},Y=function(V){var le=g._rangebreaks.length;if(!le)return ce(V,g._m,g._b);for(var ae=0,j=0;jg._rangebreaks[j].pmax&&(ae=j+1);return ce(V,g._m2,g._B[ae])}}g.c2l=g.type==="log"?z:a,g.l2c=g.type==="log"?b:a,g.l2p=de,g.p2l=Y,g.c2p=g.type==="log"?function(V,le){return de(z(V,le))}:de,g.p2c=g.type==="log"?function(V){return b(Y(V))}:Y,["linear","-"].indexOf(g.type)!==-1?(g.d2r=g.r2d=g.d2c=g.r2c=g.d2l=g.r2l=t,g.c2d=g.c2r=g.l2d=g.l2r=a,g.d2p=g.r2p=function(V){return g.l2p(t(V))},g.p2d=g.p2r=Y,g.cleanPos=a):g.type==="log"?(g.d2r=g.d2l=function(V,le){return z(t(V),le)},g.r2d=g.r2c=function(V){return b(t(V))},g.d2c=g.r2l=t,g.c2d=g.l2r=a,g.c2r=z,g.l2d=b,g.d2p=function(V,le){return g.l2p(g.d2r(V,le))},g.p2d=function(V){return b(Y(V))},g.r2p=function(V){return g.l2p(t(V))},g.p2r=Y,g.cleanPos=a):g.type==="date"?(g.d2r=g.r2d=S.identity,g.d2c=g.r2c=g.d2l=g.r2l=F,g.c2d=g.c2r=g.l2d=g.l2r=N,g.d2p=g.r2p=function(V,le,ae){return g.l2p(F(V,0,ae))},g.p2d=g.p2r=function(V,le,ae){return N(Y(V),le,ae)},g.cleanPos=function(V){return S.cleanDate(V,h,g.calendar)}):g.type==="category"?(g.d2c=g.d2l=L,g.r2d=g.c2d=g.l2d=O,g.d2r=g.d2l_noadd=W,g.r2c=function(V){var le=$(V);return le!==void 0?le:g.fraction2r(.5)},g.l2r=g.c2r=a,g.r2l=$,g.d2p=function(V){return g.l2p(g.r2c(V))},g.p2d=function(V){return O(Y(V))},g.r2p=g.d2p,g.p2r=Y,g.cleanPos=function(V){return typeof V=="string"&&V!==""?V:a(V)}):g.type==="multicategory"&&(g.r2d=g.c2d=g.l2d=O,g.d2r=g.d2l_noadd=W,g.r2c=function(V){var le=W(V);return le!==void 0?le:g.fraction2r(.5)},g.r2c_just_indices=B,g.l2r=g.c2r=a,g.r2l=W,g.d2p=function(V){return g.l2p(g.r2c(V))},g.p2d=function(V){return O(Y(V))},g.r2p=g.d2p,g.p2r=Y,g.cleanPos=function(V){return Array.isArray(V)||typeof V=="string"&&V!==""?V:a(V)},g.setupMultiCategory=function(V){var le=g._traceIndices,ae,j,ee=g._matchGroup;if(ee&&g._categories.length===0){for(var te in ee)if(te!==D){var pe=y[w.id2name(te)];le=le.concat(pe._traceIndices)}}var we=[[0,{}],[0,{}]],Se=[];for(ae=0;aepe[1]&&(j[te?0:1]=ae,ee[1]=pe[1]),ee[0]>=ee[1])if(le!==void 0){var we=pe[0]+1;ae!==void 0&&(we=Math.min(we,pe[1])),j[te?0:1]=g.l2r(we)}else ae!==void 0&&(j[te?1:0]=g.l2r(pe[1]-1))}},g.cleanRange=function(V,le){g._cleanRange(V,le),g.limitRange(V)},g._cleanRange=function(V,le){le||(le={}),V||(V="range");var ae=S.nestedProperty(g,V).get(),j,ee;if(g.type==="date"?ee=S.dfltRange(g.calendar):P==="y"?ee=A.DFLTRANGEY:g._name==="realaxis"?ee=[0,1]:ee=le.dfltRange||A.DFLTRANGEX,ee=ee.slice(),(g.rangemode==="tozero"||g.rangemode==="nonnegative")&&(ee[0]=0),!ae||ae.length!==2){S.nestedProperty(g,V).set(ee);return}var te=ae[0]===null,pe=ae[1]===null;for(g.type==="date"&&!g.autorange&&(ae[0]=S.cleanDate(ae[0],h,g.calendar),ae[1]=S.cleanDate(ae[1],h,g.calendar)),j=0;j<2;j++)if(g.type==="date"){if(!S.isDateTime(ae[j],g.calendar)){g[V]=ee;break}if(g.r2l(ae[0])===g.r2l(ae[1])){var we=S.constrain(g.r2l(ae[0]),S.MIN_MS+1e3,S.MAX_MS-1e3);ae[0]=g.l2r(we-1e3),ae[1]=g.l2r(we+1e3);break}}else{if(!e(ae[j]))if(!(te||pe)&&e(ae[1-j]))ae[j]=ae[1-j]*(j?10:.1);else{g[V]=ee;break}if(ae[j]<-s?ae[j]=-s:ae[j]>s&&(ae[j]=s),ae[0]===ae[1]){var Se=Math.max(1,Math.abs(ae[0]*1e-6));ae[0]-=Se,ae[1]+=Se}}},g.setScale=function(V){var le=y._size;if(g.overlaying){var ae=w.getFromId({_fullLayout:y},g.overlaying);g.domain=ae.domain}var j=V&&g._r?"_r":"range",ee=g.calendar;g.cleanRange(j);var te=g.r2l(g[j][0],ee),pe=g.r2l(g[j][1],ee),we=P==="y";if(we?(g._offset=le.t+(1-g.domain[1])*le.h,g._length=le.h*(g.domain[1]-g.domain[0]),g._m=g._length/(te-pe),g._b=-g._m*pe):(g._offset=le.l+g.domain[0]*le.w,g._length=le.w*(g.domain[1]-g.domain[0]),g._m=g._length/(pe-te),g._b=-g._m*te),g._rangebreaks=[],g._lBreaks=0,g._m2=0,g._B=[],g.rangebreaks){var Se,Re;if(g._rangebreaks=g.locateBreaks(Math.min(te,pe),Math.max(te,pe)),g._rangebreaks.length){for(Se=0;Sepe&&(Pe=!Pe),Pe&&g._rangebreaks.reverse();var je=Pe?-1:1;for(g._m2=je*g._length/(Math.abs(pe-te)-g._lBreaks),g._B.push(-g._m2*(we?pe:te)),Se=0;Seee&&(ee+=7,teee&&(ee+=24,te=j&&te=j&&V=Je.min&&(neJe.max&&(Je.max=Ce),Ze=!1)}Ze&&pe.push({min:ne,max:Ce})}};for(ae=0;aex*2}function n(f){return Math.max(1,(f-1)/1e3)}function s(f,m){for(var c=f.length,T=n(c),l=0,x=0,w={},A=0;Al*2}function h(f){return M(f[0])&&M(f[1])}}}),Yd=He({"src/plots/cartesian/autorange.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=sa(),M=Gs().FP_SAFE,e=so(),t=as(),r=tf(),o=r.getFromId,a=r.isLinked;q.exports={applyAutorangeOptions:g,getAutoRange:i,makePadFn:s,doAutoRange:c,findExtremes:T,concatExtremes:m};function i(y,D){var P,z,F=[],N=y._fullLayout,O=s(N,D,0),L=s(N,D,1),U=m(y,D),B=U.min,W=U.max;if(B.length===0||W.length===0)return S.simpleMap(D.range,D.r2l);var $=B[0].val,ue=W[0].val;for(P=1;P0&&(Se=le-O(ee)-L(te),Se>ae?Re/Se>j&&(pe=ee,we=te,j=Re/Se):Re/le>j&&(pe={val:ee.val,nopad:1},we={val:te.val,nopad:1},j=Re/le));function Pe(Ve,he){return Math.max(Ve,L(he))}if($===ue){var je=$-1,at=$+1;if(Q)if($===0)F=[0,1];else{var nt=($>0?W:B).reduce(Pe,0),tt=$/(1-Math.min(.5,nt/le));F=$>0?[0,tt]:[tt,0]}else V?F=[Math.max(0,je),Math.max(1,at)]:F=[je,at]}else Q?(pe.val>=0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:0,nopad:1})):V&&(pe.val-j*O(pe)<0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:1,nopad:1})),j=(we.val-pe.val-n(D,ee.val,te.val))/(le-O(pe)-L(we)),F=[pe.val-j*O(pe),we.val+j*L(we)];return F=g(F,D),D.limitRange&&D.limitRange(),de&&F.reverse(),S.simpleMap(F,D.l2r||Number)}function n(y,D,P){var z=0;if(y.rangebreaks)for(var F=y.locateBreaks(D,P),N=0;N0?P.ppadplus:P.ppadminus)||P.ppad||0),ee=ae((y._m>0?P.ppadminus:P.ppadplus)||P.ppad||0),te=ae(P.vpadplus||P.vpad),pe=ae(P.vpadminus||P.vpad);if(!B){if(V=1/0,le=-1/0,U)for($=0;$0&&(V=ue),ue>le&&ue-M&&(V=ue),ue>le&&ue=Re;$--)Se($);return{min:z,max:F,opts:P}}function l(y,D,P,z){w(y,D,P,z,E)}function x(y,D,P,z){w(y,D,P,z,p)}function w(y,D,P,z,F){for(var N=z.tozero,O=z.extrapad,L=!0,U=0;U=P&&(B.extrapad||!O)){L=!1;break}else F(D,B.val)&&B.pad<=P&&(O||!B.extrapad)&&(y.splice(U,1),U--)}if(L){var W=N&&D===0;y.push({val:D,pad:W?0:P,extrapad:W?!1:O})}}function A(y){return _(y)&&Math.abs(y)=D}function b(y,D){var P=D.autorangeoptions;return P&&P.minallowed!==void 0&&u(D,P.minallowed,P.maxallowed)?P.minallowed:P&&P.clipmin!==void 0&&u(D,P.clipmin,P.clipmax)?Math.max(y,D.d2l(P.clipmin)):y}function d(y,D){var P=D.autorangeoptions;return P&&P.maxallowed!==void 0&&u(D,P.minallowed,P.maxallowed)?P.maxallowed:P&&P.clipmax!==void 0&&u(D,P.clipmin,P.clipmax)?Math.min(y,D.d2l(P.clipmax)):y}function u(y,D,P){return D!==void 0&&P!==void 0?(D=y.d2l(D),P=y.d2l(P),D=U&&(N=U,P=U),O<=U&&(O=U,z=U)}}return P=b(P,D),z=d(z,D),[P,z]}}}),Wo=He({"src/plots/cartesian/axes.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=bc(),M=so(),e=sa(),t=e.strTranslate,r=su(),o=K0(),a=$n(),i=as(),n=Xh(),s=l5(),h=lh(),f=Gs(),m=f.ONEMAXYEAR,c=f.ONEAVGYEAR,T=f.ONEMINYEAR,l=f.ONEMAXQUARTER,x=f.ONEAVGQUARTER,w=f.ONEMINQUARTER,A=f.ONEMAXMONTH,E=f.ONEAVGMONTH,p=f.ONEMINMONTH,b=f.ONEWEEK,d=f.ONEDAY,u=d/2,g=f.ONEHOUR,y=f.ONEMIN,D=f.ONESEC,P=f.ONEMILLI,z=f.ONEMICROSEC,F=f.MINUS_SIGN,N=f.BADNUM,O={K:"zeroline"},L={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},W={K:"tick",L:"text"},$={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},ue=uh(),ce=ue.MID_SHIFT,de=ue.CAP_SHIFT,Y=ue.LINE_SPACING,X=ue.OPPOSITE_SIDE,Q=3,V=q.exports={};V.setConvert=wv();var le=a1(),ae=tf(),j=ae.idSort,ee=ae.isLinked;V.id2name=ae.id2name,V.name2id=ae.name2id,V.cleanId=ae.cleanId,V.list=ae.list,V.listIds=ae.listIds,V.getFromId=ae.getFromId,V.getFromTrace=ae.getFromTrace;var te=Yd();V.getAutoRange=te.getAutoRange,V.findExtremes=te.findExtremes;var pe=1e-4;function we(xt){var ut=(xt[1]-xt[0])*pe;return[xt[0]-ut,xt[1]+ut]}V.coerceRef=function(xt,ut,Or,Cr,wr,Rr){var Nr=Cr.charAt(Cr.length-1),Hr=Or._fullLayout._subplots[Nr+"axis"],gt=Cr+"ref",Kt={};return wr||(wr=Hr[0]||(typeof Rr=="string"?Rr:Rr[0])),Rr||(Rr=wr),Hr=Hr.concat(Hr.map(function(mr){return mr+" domain"})),Kt[gt]={valType:"enumerated",values:Hr.concat(Rr?typeof Rr=="string"?[Rr]:Rr:[]),dflt:wr},e.coerce(xt,ut,Kt,gt)},V.coerceRefArray=function(xt,ut,Or,Cr,wr,Rr,Nr){let Hr=Cr.charAt(Cr.length-1);var gt=Or._fullLayout._subplots[Hr+"axis"];let Kt=Cr+"ref";var mr=xt[Kt];wr||(wr=gt[0]||(typeof Rr=="string"?Rr:Rr[0])),gt=gt.concat(gt.map(va=>va+" domain")),gt=gt.concat(Rr||[]),mr.length>Nr?(e.warn("Array attribute "+Kt+" has more entries than expected, truncating to "+Nr),mr=mr.slice(0,Nr)):mr.length2e-6||((Or-xt._forceTick0)/xt._minDtick%1+1.000001)%1>2e-6)&&(xt._minDtick=0))},V.saveRangeInitial=function(xt,ut){for(var Or=V.list(xt,"",!0),Cr=!1,wr=0;wrIr*.3||Kt(Cr)||Kt(wr))){var va=Or.dtick/2;xt+=xt+vaNr){var Hr=Number(Or.slice(1));Rr.exactYears>Nr&&Hr%12===0?xt=V.tickIncrement(xt,"M6","reverse")+d*1.5:Rr.exactMonths>Nr?xt=V.tickIncrement(xt,"M1","reverse")+d*15.5:xt-=u;var gt=V.tickIncrement(xt,Or);if(gt<=Cr)return gt}return xt}V.prepMinorTicks=function(xt,ut,Or){var Cr,wr;if(!((Cr=ut.minor)!=null&&Cr.dtick)){delete xt.dtick;var Rr=ut.dtick&&_(ut._tmin),Nr;if(Rr){var Hr=V.tickIncrement(ut._tmin,ut.dtick,!0);Nr=[ut._tmin,Hr*.99+ut._tmin*.01]}else{var gt=e.simpleMap(ut.range,ut.r2l);Nr=[gt[0],.8*gt[0]+.2*gt[1]]}if(xt.range=e.simpleMap(Nr,ut.l2r),xt._isMinor=!0,V.prepTicks(xt,Or),Rr){var Kt=_(ut.dtick),mr=_(xt.dtick),Ir=Kt?ut.dtick:+ut.dtick.substring(1),va=mr?xt.dtick:+xt.dtick.substring(1);Kt&&mr?nt(Ir,va)?Ir===2*b&&va===2*d&&(xt.dtick=b):Ir===2*b&&va===3*d?xt.dtick=b:Ir===b&&!(ut._input.minor||{}).nticks?xt.dtick=d:tt(Ir/va,2.5)?xt.dtick=Ir/2:xt.dtick=Ir:String(ut.dtick).charAt(0)==="M"?mr?xt.dtick="M1":nt(Ir,va)?Ir>=12&&va===2&&(xt.dtick="M3"):xt.dtick=ut.dtick:String(xt.dtick).charAt(0)==="L"?String(ut.dtick).charAt(0)==="L"?nt(Ir,va)||(xt.dtick=tt(Ir/va,2.5)?ut.dtick/2:ut.dtick):xt.dtick="D1":xt.dtick==="D2"&&+ut.dtick>1&&(xt.dtick=1)}xt.range=ut.range}((wr=ut.minor)==null?void 0:wr._tick0Init)===void 0&&(xt.tick0=ut.tick0)};function nt(xt,ut){return Math.abs((xt/ut+.5)%1-.5)<.001}function tt(xt,ut){return Math.abs(xt/ut-1)<.001}V.prepTicks=function(xt,ut){var Or=e.simpleMap(xt.range,xt.r2l,void 0,void 0,ut);if(xt.tickmode==="auto"||!xt.dtick){var Cr=xt.nticks,wr;Cr||(xt.type==="category"||xt.type==="multicategory"?(wr=xt.tickfont?e.bigFont(xt.tickfont.size||12):15,Cr=xt._length/wr):(wr=xt._id.charAt(0)==="y"?40:80,Cr=e.constrain(xt._length/wr,4,9)+1),xt._name==="radialaxis"&&(Cr*=2)),xt.minor&&xt.minor.tickmode!=="array"||xt.tickmode==="array"&&(Cr*=100),xt._roughDTick=Math.abs(Or[1]-Or[0])/Cr,V.autoTicks(xt,xt._roughDTick),xt._minDtick>0&&xt.dtick0?(Rr=Cr-1,Nr=Cr):(Rr=Cr,Nr=Cr);var Hr=xt[Rr].value,gt=xt[Nr].value,Kt=Math.abs(gt-Hr),mr=Or||Kt,Ir=0;mr>=T?Kt>=T&&Kt<=m?Ir=Kt:Ir=c:Or===x&&mr>=w?Kt>=w&&Kt<=l?Ir=Kt:Ir=x:mr>=p?Kt>=p&&Kt<=A?Ir=Kt:Ir=E:Or===b&&mr>=b?Ir=b:mr>=d?Ir=d:Or===u&&mr>=u?Ir=u:Or===g&&mr>=g&&(Ir=g);var va;Ir>=Kt&&(Ir=Kt,va=!0);var Pa=wr+Ir;if(ut.rangebreaks&&Ir>0){for(var ga=84,la=0,ba=0;bab&&(Ir=Kt)}(Ir>0||Cr===0)&&(xt[Cr].periodX=wr+Ir/2)}}V.calcTicks=function(ut,Or){for(var Cr=ut.type,wr=ut.calendar,Rr=ut.ticklabelstep,Nr=ut.ticklabelmode==="period",Hr=ut.range[0]>ut.range[1],gt=!ut.ticklabelindex||e.isArrayOrTypedArray(ut.ticklabelindex)?ut.ticklabelindex:[ut.ticklabelindex],Kt=e.simpleMap(ut.range,ut.r2l,void 0,void 0,Or),mr=Kt[1]=(Mn?0:1);wn--){var On=!wn;wn?(ut._dtickInit=ut.dtick,ut._tick0Init=ut.tick0):Mn&&(ut.minor._dtickInit=ut.minor.dtick,ut.minor._tick0Init=ut.minor.tick0);var En=wn?ut:e.extendFlat({},ut,Mn?ut.minor:{minor:{}});if(On?V.prepMinorTicks(En,ut,Or):V.prepTicks(En,Or),En.tickmode==="array"){wn?(ba=[],ga=Ze(ut,!On)):(Ai=[],la=Ze(ut,!On));continue}if(En.tickmode==="sync"){ba=[],ga=Ce(ut);continue}var ao=we(Kt),Co=ao[0],bo=ao[1],zs=_(En.dtick),kn=Cr==="log"&&!(zs||En.dtick.charAt(0)==="L"),wo=V.tickFirst(En,Or);if(wn){if(ut._tmin=wo,wo=bo:go<=bo;go=V.tickIncrement(go,jo,mr,wr)){if(wn&&os++,En.rangebreaks&&!mr){if(go=va)break}if(ba.length>Pa||go===Zn)break;Zn=go;var Yn={value:go};wn?(kn&&go!==(go|0)&&(Yn.simpleLabel=!0),Rr>1&&os%Rr&&(Yn.skipLabel=!0),ba.push(Yn)):(Yn.minor=!0,Ai.push(Yn))}}if(!Ai||Ai.length<3)gt=!1;else{var Gn=(Ai[2].value-Ai[1].value)*(Hr?-1:1);cn(Gn,ut.tickformat)||(gt=!1,Ai=Ai.slice(1))}if(!gt)ki=ba;else{var Hn=ba.concat(Ai);Nr&&ba.length&&(Hn=Hn.slice(1)),Hn=Hn.sort(function(Ks,Ts){return Ks.value-Ts.value}).filter(function(Ks,Ts,Ls){return Ts===0||Ks.value!==Ls[Ts-1].value});var ss=Hn.map(function(Ks,Ts){return Ks.minor===void 0&&!Ks.skipLabel?Ts:null}).filter(function(Ks){return Ks!==null});ss.forEach(function(Ks){gt.map(function(Ts){var Ls=Ks+Ts;Ls>=0&&Ls-1;Zo--){if(ba[Zo].drop){ba.splice(Zo,1);continue}ba[Zo].value=ri(ba[Zo].value,ut);var yn=ut.c2p(ba[Zo].value);(ws?il>yn-Hs:ilva||Jova&&(Ls.periodX=va),Jowr&&vac)ut/=c,Cr=wr(10),xt.dtick="M"+12*vr(ut,Cr,rt);else if(Rr>E)ut/=E,xt.dtick="M"+vr(ut,1,Je);else if(Rr>d){if(xt.dtick=vr(ut,d,xt._hasDayOfWeekBreaks?[1,2,7,14]:kt),!Or){var Nr=V.getTickFormat(xt),Hr=xt.ticklabelmode==="period";Hr&&(xt._rawTick0=xt.tick0),/%[uVW]/.test(Nr)?xt.tick0=e.dateTick0(xt.calendar,2):xt.tick0=e.dateTick0(xt.calendar,1),Hr&&(xt._dowTick0=xt.tick0)}}else Rr>g?xt.dtick=vr(ut,g,Je):Rr>y?xt.dtick=vr(ut,y,St):Rr>D?xt.dtick=vr(ut,D,St):(Cr=wr(10),xt.dtick=vr(ut,Cr,rt))}else if(xt.type==="log"){xt.tick0=0;var gt=e.simpleMap(xt.range,xt.r2l);if(xt._isMinor&&(ut*=1.5),ut>.7)xt.dtick=Math.ceil(ut);else if(Math.abs(gt[1]-gt[0])<1){var Kt=1.5*Math.abs((gt[1]-gt[0])/ut);ut=Math.abs(Math.pow(10,gt[1])-Math.pow(10,gt[0]))/Kt,Cr=wr(10),xt.dtick="L"+vr(ut,Cr,rt)}else xt.dtick=ut>.3?"D2":"D1"}else xt.type==="category"||xt.type==="multicategory"?(xt.tick0=0,xt.dtick=Math.ceil(Math.max(ut,1))):Za(xt)?(xt.tick0=0,Cr=1,xt.dtick=vr(ut,Cr,Ar)):(xt.tick0=0,Cr=wr(10),xt.dtick=vr(ut,Cr,rt));if(xt.dtick===0&&(xt.dtick=1),!_(xt.dtick)&&typeof xt.dtick!="string"){var mr=xt.dtick;throw xt.dtick=1,"ax.dtick error: "+String(mr)}};function qr(xt){var ut=xt.dtick;if(xt._tickexponent=0,!_(ut)&&typeof ut!="string"&&(ut=1),(xt.type==="category"||xt.type==="multicategory")&&(xt._tickround=null),xt.type==="date"){var Or=xt.r2l(xt.tick0),Cr=xt.l2r(Or).replace(/(^-|i)/g,""),wr=Cr.length;if(String(ut).charAt(0)==="M")wr>10||Cr.slice(5)!=="01-01"?xt._tickround="d":xt._tickround=+ut.slice(1)%12===0?"y":"m";else if(ut>=d&&wr<=10||ut>=d*15)xt._tickround="d";else if(ut>=y&&wr<=16||ut>=g)xt._tickround="M";else if(ut>=D&&wr<=19||ut>=y)xt._tickround="S";else{var Rr=xt.l2r(Or+ut).replace(/^-/,"").length;xt._tickround=Math.max(wr,Rr)-20,xt._tickround<0&&(xt._tickround=4)}}else if(_(ut)||ut.charAt(0)==="L"){var Nr=xt.range.map(xt.r2d||Number);_(ut)||(ut=Number(ut.slice(1))),xt._tickround=2-Math.floor(Math.log(ut)/Math.LN10+.01);var Hr=Math.max(Math.abs(Nr[0]),Math.abs(Nr[1])),gt=Math.floor(Math.log(Hr)/Math.LN10+.01),Kt=xt.minexponent===void 0?3:xt.minexponent;Math.abs(gt)>Kt&&(ot(xt.exponentformat)&&xt.exponentformat!=="SI extended"&&!Ut(gt)||ot(xt.exponentformat)&&xt.exponentformat==="SI extended"&&!Ct(gt)?xt._tickexponent=3*Math.round((gt-1)/3):xt._tickexponent=gt)}else xt._tickround=null}V.tickIncrement=function(xt,ut,Or,Cr){var wr=Or?-1:1;if(_(ut))return e.increment(xt,wr*ut);var Rr=ut.charAt(0),Nr=wr*Number(ut.slice(1));if(Rr==="M")return e.incrementMonth(xt,Nr,Cr);if(Rr==="L")return Math.log(Math.pow(10,xt)+Nr)/Math.LN10;if(Rr==="D"){var Hr=ut==="D2"?Vt:Bt,gt=xt+wr*.01,Kt=e.roundUp(e.mod(gt,1),Hr,Or);return Math.floor(gt)+Math.log(v.round(Math.pow(10,Kt),1))/Math.LN10}throw"unrecognized dtick "+String(ut)},V.tickFirst=function(xt,ut){var Or=xt.r2l||Number,Cr=e.simpleMap(xt.range,Or,void 0,void 0,ut),wr=Cr[1]=0&&Ai<=xt._length?ba:null};if(Rr&&e.isArrayOrTypedArray(xt.ticktext)){var Ir=e.simpleMap(xt.range,xt.r2l),va=(Math.abs(Ir[1]-Ir[0])-(xt._lBreaks||0))/1e4;for(Kt=0;Kt"+Hr;else{var Kt=pi(xt),mr=xt._trueSide||xt.side;(!Kt&&mr==="top"||Kt&&mr==="bottom")&&(Nr+="
")}ut.text=Nr}function _t(xt,ut,Or,Cr,wr){var Rr=xt.dtick,Nr=ut.x,Hr=xt.tickformat,gt=typeof Rr=="string"&&Rr.charAt(0);if(wr==="never"&&(wr=""),Cr&>!=="L"&&(Rr="L3",gt="L"),Hr||gt==="L")ut.text=jt(Math.pow(10,Nr),xt,wr,Cr);else if(_(Rr)||gt==="D"&&(xt.minorloglabels==="complete"||e.mod(Nr+.01,1)<.1)){var Kt;xt.minorloglabels==="complete"&&!(e.mod(Nr+.01,1)<.1)&&(Kt=!0,ut.fontSize*=.75);var mr=Math.pow(10,Nr).toExponential(0),Ir=mr.split("e"),va=+Ir[1],Pa=Math.abs(va),ga=xt.exponentformat;ga==="power"||ot(ga)&&ga!=="SI extended"&&Ut(va)||ot(ga)&&ga==="SI extended"&&Ct(va)?(ut.text=Ir[0],Pa>0&&(ut.text+="x10"),ut.text==="1x10"&&(ut.text="10"),va!==0&&va!==1&&(ut.text+=""+(va>0?"":F)+Pa+""),ut.fontSize*=1.25):(ga==="e"||ga==="E")&&Pa>2?ut.text=Ir[0]+ga+(va>0?"+":F)+Pa:(ut.text=jt(Math.pow(10,Nr),xt,"","fakehover"),Rr==="D1"&&xt._id.charAt(0)==="y"&&(ut.dy-=ut.fontSize/6))}else if(gt==="D")ut.text=xt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Nr,1)))),ut.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(xt.dtick==="D1"){var la=String(ut.text).charAt(0);(la==="0"||la==="1")&&(xt._id.charAt(0)==="y"?ut.dx-=ut.fontSize/4:(ut.dy+=ut.fontSize/2,ut.dx+=(xt.range[1]>xt.range[0]?1:-1)*ut.fontSize*(Nr<0?.5:.25)))}}function Fe(xt,ut){var Or=xt._categories[Math.round(ut.x)];Or===void 0&&(Or=""),ut.text=String(Or)}function Ye(xt,ut,Or){var Cr=Math.round(ut.x),wr=xt._categories[Cr]||[],Rr=wr[1]===void 0?"":String(wr[1]),Nr=wr[0]===void 0?"":String(wr[0]);Or?ut.text=Nr+" - "+Rr:(ut.text=Rr,ut.text2=Nr)}function Ae(xt,ut,Or,Cr,wr){wr==="never"?wr="":xt.showexponent==="all"&&Math.abs(ut.x/xt.dtick)<1e-6&&(wr="hide"),ut.text=jt(ut.x,xt,wr,Cr)}function Le(xt,ut,Or,Cr,wr){if(xt.thetaunit==="radians"&&!Or){var Rr=ut.x/180;if(Rr===0)ut.text="0";else{var Nr=We(Rr);if(Nr[1]>=100)ut.text=jt(e.deg2rad(ut.x),xt,wr,Cr);else{var Hr=ut.x<0;Nr[1]===1?Nr[0]===1?ut.text="\u03C0":ut.text=Nr[0]+"\u03C0":ut.text=["",Nr[0],"","\u2044","",Nr[1],"","\u03C0"].join(""),Hr&&(ut.text=F+ut.text)}}}else ut.text=jt(ut.x,xt,wr,Cr)}function We(xt){function ut(Hr,gt){return Math.abs(Hr-gt)<=1e-6}function Or(Hr,gt){return ut(gt,0)?Hr:Or(gt,Hr%gt)}function Cr(Hr){for(var gt=1;!ut(Math.round(Hr*gt)/gt,Hr);)gt*=10;return gt}var wr=Cr(xt),Rr=xt*wr,Nr=Math.abs(Or(Rr,wr));return[Math.round(Rr/Nr),Math.round(wr/Nr)]}var Ke=["f","p","n","\u03BC","m","","k","M","G","T"],st=["q","r","y","z","a",...Ke,"P","E","Z","Y","R","Q"],ot=xt=>["SI","SI extended","B"].includes(xt);function Ut(xt){return xt>14||xt<-15}function Ct(xt){return xt>32||xt<-30}function Pt(xt,ut){return ot(ut)?!!(ut==="SI extended"&&Ct(xt)||ut!=="SI extended"&&Ut(xt)):!1}function jt(xt,ut,Or,Cr){var wr=xt<0,Rr=ut._tickround,Nr=Or||ut.exponentformat||"B",Hr=ut._tickexponent,gt=V.getTickFormat(ut),Kt=ut.separatethousands;if(Cr){var mr={exponentformat:Nr,minexponent:ut.minexponent,dtick:ut.showexponent==="none"?ut.dtick:_(xt)&&Math.abs(xt)||1,range:ut.showexponent==="none"?ut.range.map(ut.r2d):[0,xt||1]};qr(mr),Rr=(Number(mr._tickround)||0)+4,Hr=mr._tickexponent,ut.hoverformat&&(gt=ut.hoverformat)}if(gt)return ut._numFormat(gt)(xt).replace(/-/g,F);var Ir=Math.pow(10,-Rr)/2;if(Nr==="none"&&(Hr=0),xt=Math.abs(xt),xt"+ga+"":Nr==="B"&&Hr===9?xt+="B":ot(Nr)&&(xt+=Nr==="SI extended"?st[Hr/3+10]:Ke[Hr/3+5])}return wr?F+xt:xt}V.getTickFormat=function(xt){var ut;function Or(gt){return typeof gt!="string"?gt:Number(gt.replace("M",""))*E}function Cr(gt,Kt){var mr=["L","D"];if(typeof gt==typeof Kt){if(typeof gt=="number")return gt-Kt;var Ir=mr.indexOf(gt.charAt(0)),va=mr.indexOf(Kt.charAt(0));return Ir===va?Number(gt.replace(/(L|D)/g,""))-Number(Kt.replace(/(L|D)/g,"")):Ir-va}else return typeof gt=="number"?1:-1}function wr(gt,Kt,mr){var Ir=mr||function(ga){return ga},va=Kt[0],Pa=Kt[1];return(!va&&typeof va!="number"||Ir(va)<=Ir(gt))&&(!Pa&&typeof Pa!="number"||Ir(Pa)>=Ir(gt))}function Rr(gt,Kt){var mr=Kt[0]===null,Ir=Kt[1]===null,va=Cr(gt,Kt[0])>=0,Pa=Cr(gt,Kt[1])<=0;return(mr||va)&&(Ir||Pa)}var Nr,Hr;if(xt.tickformatstops&&xt.tickformatstops.length>0)switch(xt.type){case"date":case"linear":{for(ut=0;ut=0&&wr.unshift(wr.splice(mr,1).shift())}});var Hr={false:{left:0,right:0}};return e.syncOrAsync(wr.map(function(gt){return function(){if(gt){var Kt=V.getFromId(xt,gt);Or||(Or={}),Or.axShifts=Hr,Or.overlayingShiftedAx=Nr;var mr=V.drawOne(xt,Kt,Or);return Kt._shiftPusher&&rn(Kt,Kt._fullDepth||0,Hr,!0),Kt._r=Kt.range.slice(),Kt._rl=e.simpleMap(Kt._r,Kt.r2l),mr}}}))},V.drawOne=function(xt,ut,Or){Or=Or||{};var Cr=Or.axShifts||{},wr=Or.overlayingShiftedAx||[],Rr,Nr,Hr;ut.setScale();var gt=xt._fullLayout,Kt=ut._id,mr=Kt.charAt(0),Ir=V.counterLetter(Kt),va=gt._plots[ut._mainSubplot],Pa=ut.zerolinelayer==="above traces";if(!va)return;if(ut._shiftPusher=ut.autoshift||wr.indexOf(ut._id)!==-1||wr.indexOf(ut.overlaying)!==-1,ut._shiftPusher&ut.anchor==="free"){var ga=ut.linewidth/2||0;ut.ticks==="inside"&&(ga+=ut.ticklen),rn(ut,ga,Cr,!0),rn(ut,ut.shift||0,Cr,!1)}(Or.skipTitle!==!0||ut._shift===void 0)&&(ut._shift=tn(ut,Cr));var la=va[mr+"axislayer"],ba=ut._mainLinePosition,Ai=ba+=ut._shift,ki=ut._mainMirrorPosition,Ki=ut._vals=V.calcTicks(ut),Mn=[ut.mirror,Ai,ki].join("_");for(Rr=0;Rr0?Ls.bottom-Ks:0,Ts))));var lu=0,Tc=0;if(ut._shiftPusher&&(lu=Math.max(Ts,Ls.height>0?uo==="l"?Ks-Ls.left:Ls.right-Ks:0),ut.title.text!==gt._dfltTitle[mr]&&(Tc=(ut._titleStandoff||0)+(ut._titleScoot||0),uo==="l"&&(Tc+=Ca(ut))),ut._fullDepth=Math.max(lu,Tc)),ut.automargin){Jo={x:0,y:0,r:0,l:0,t:0,b:0};var du=[0,1],Sf=typeof ut._shift=="number"?ut._shift:0;if(mr==="x"){if(uo==="b"?Jo[uo]=ut._depth:(Jo[uo]=ut._depth=Math.max(Ls.width>0?Ks-Ls.top:0,Ts),du.reverse()),Ls.width>0){var Uc=Ls.right-(ut._offset+ut._length);Uc>0&&(Jo.xr=1,Jo.r=Uc);var Bs=ut._offset-Ls.left;Bs>0&&(Jo.xl=0,Jo.l=Bs)}}else if(uo==="l"?(ut._depth=Math.max(Ls.height>0?Ks-Ls.left:0,Ts),Jo[uo]=ut._depth-Sf):(ut._depth=Math.max(Ls.height>0?Ls.right-Ks:0,Ts),Jo[uo]=ut._depth+Sf,du.reverse()),Ls.height>0){var dc=Ls.bottom-(ut._offset+ut._length);dc>0&&(Jo.yb=0,Jo.b=dc);var Wc=ut._offset-Ls.top;Wc>0&&(Jo.yt=1,Jo.t=Wc)}Jo[Ir]=ut.anchor==="free"?ut.position:ut._anchorAxis.domain[du[0]],ut.title.text!==gt._dfltTitle[mr]&&(Jo[uo]+=Ca(ut)+(ut.title.standoff||0)),ut.mirror&&ut.anchor!=="free"&&(Es={x:0,y:0,r:0,l:0,t:0,b:0},Es[Nl]=ut.linewidth,ut.mirror&&ut.mirror!==!0&&(Es[Nl]+=Ts),ut.mirror===!0||ut.mirror==="ticks"?Es[Ir]=ut._anchorAxis.domain[du[1]]:(ut.mirror==="all"||ut.mirror==="allticks")&&(Es[Ir]=[ut._counterDomainMin,ut._counterDomainMax][du[1]]))}Ll&&(Ul=M.getComponentMethod("rangeslider","autoMarginOpts")(xt,ut)),typeof ut.automargin=="string"&&(cr(Jo,ut.automargin),cr(Es,ut.automargin)),S.autoMargin(xt,Jt(ut),Jo),S.autoMargin(xt,Fr(ut),Es),S.autoMargin(xt,ta(ut),Ul)}),e.syncOrAsync(To)}};function cr(xt,ut){if(xt){var Or=Object.keys($).reduce(function(Cr,wr){return ut.indexOf(wr)!==-1&&$[wr].forEach(function(Rr){Cr[Rr]=1}),Cr},{});Object.keys(xt).forEach(function(Cr){Or[Cr]||(Cr.length===1?xt[Cr]=0:delete xt[Cr])})}}function or(xt,ut){var Or=[],Cr,wr=function(Rr,Nr){var Hr=Rr.xbnd[Nr];Hr!==null&&Or.push(e.extendFlat({},Rr,{x:Hr}))};if(ut.length){for(Cr=0;Crxt.range[1],Hr=xt.ticklabelposition&&xt.ticklabelposition.indexOf("inside")!==-1,gt=!Hr;if(Or){var Kt=Nr?-1:1;Or=Or*Kt}if(Cr){var mr=xt.side,Ir=Hr&&(mr==="top"||mr==="left")||gt&&(mr==="bottom"||mr==="right")?1:-1;Cr=Cr*Ir}return xt._id.charAt(0)==="x"?function(va){return t(wr+xt._offset+xt.l2p(Fa(va))+Or,Rr+Cr)}:function(va){return t(Rr+Cr,wr+xt._offset+xt.l2p(Fa(va))+Or)}};function Fa(xt){return xt.periodX!==void 0?xt.periodX:xt.x}function Ra(xt){var ut=xt.ticklabelposition||"",Or=xt.tickson||"",Cr=function(ga){return ut.indexOf(ga)!==-1},wr=Cr("top"),Rr=Cr("left"),Nr=Cr("right"),Hr=Cr("bottom"),gt=Cr("inside"),Kt=Or!=="boundaries"&&(Hr||Rr||wr||Nr);if(!Kt&&!gt)return[0,0];var mr=xt.side,Ir=Kt?(xt.tickwidth||0)/2:0,va=Q,Pa=xt.tickfont?xt.tickfont.size:12;return(Hr||wr)&&(Ir+=Pa*de,va+=(xt.linewidth||0)/2),(Rr||Nr)&&(Ir+=(xt.linewidth||0)/2,va+=Q),gt&&mr==="top"&&(va-=Pa*(1-de)),(Rr||wr)&&(Ir=-Ir),(mr==="bottom"||mr==="right")&&(va=-va),[Kt?Ir:0,gt?va:0]}V.makeTickPath=function(xt,ut,Or,Cr){Cr||(Cr={});var wr=Cr.minor;if(wr&&!xt.minor)return"";var Rr=Cr.len!==void 0?Cr.len:wr?xt.minor.ticklen:xt.ticklen,Nr=xt._id.charAt(0),Hr=(xt.linewidth||1)/2;return Nr==="x"?"M0,"+(ut+Hr*Or)+"v"+Rr*Or:"M"+(ut+Hr*Or)+",0h"+Rr*Or},V.makeLabelFns=function(xt,ut,Or){var Cr=xt.ticklabelposition||"",wr=xt.tickson||"",Rr=function(wo){return Cr.indexOf(wo)!==-1},Nr=Rr("top"),Hr=Rr("left"),gt=Rr("right"),Kt=Rr("bottom"),mr=wr!=="boundaries"&&(Kt||Hr||Nr||gt),Ir=Rr("inside"),va=Cr==="inside"&&xt.ticks==="inside"||!Ir&&xt.ticks==="outside"&&wr!=="boundaries",Pa=0,ga=0,la=va?xt.ticklen:0;if(Ir?la*=-1:mr&&(la=0),va&&(Pa+=la,Or)){var ba=e.deg2rad(Or);Pa=la*Math.cos(ba)+1,ga=la*Math.sin(ba)}xt.showticklabels&&(va||xt.showline)&&(Pa+=.2*xt.tickfont.size),Pa+=(xt.linewidth||1)/2*(Ir?-1:1);var Ai={labelStandoff:Pa,labelShift:ga},ki,Ki,Mn,wn,On=0,En=xt.side,ao=xt._id.charAt(0),Co=xt.tickangle,bo;if(ao==="x")bo=!Ir&&En==="bottom"||Ir&&En==="top",wn=bo?1:-1,Ir&&(wn*=-1),ki=ga*wn,Ki=ut+Pa*wn,Mn=bo?1:-.2,Math.abs(Co)===90&&(Ir?Mn+=ce:Co===-90&&En==="bottom"?Mn=de:Co===90&&En==="top"?Mn=ce:Mn=.5,On=ce/2*(Co/90)),Ai.xFn=function(wo){return wo.dx+ki+On*wo.fontSize},Ai.yFn=function(wo){return wo.dy+Ki+wo.fontSize*Mn},Ai.anchorFn=function(wo,Zn){if(mr){if(Hr)return"end";if(gt)return"start"}return!_(Zn)||Zn===0||Zn===180?"middle":Zn*wn<0!==Ir?"end":"start"},Ai.heightFn=function(wo,Zn,go){return Zn<-60||Zn>60?-.5*go:xt.side==="top"!==Ir?-go:0};else if(ao==="y"){if(bo=!Ir&&En==="left"||Ir&&En==="right",wn=bo?1:-1,Ir&&(wn*=-1),ki=Pa,Ki=ga*wn,Mn=0,!Ir&&Math.abs(Co)===90&&(Co===-90&&En==="left"||Co===90&&En==="right"?Mn=de:Mn=.5),Ir){var zs=_(Co)?+Co:0;if(zs!==0){var kn=e.deg2rad(zs);On=Math.abs(Math.sin(kn))*de*wn,Mn=0}}Ai.xFn=function(wo){return wo.dx+ut-(ki+wo.fontSize*Mn)*wn+On*wo.fontSize},Ai.yFn=function(wo){return wo.dy+Ki+wo.fontSize*ce},Ai.anchorFn=function(wo,Zn){return _(Zn)&&Math.abs(Zn)===90?"middle":bo?"end":"start"},Ai.heightFn=function(wo,Zn,go){return xt.side==="right"&&(Zn*=-1),Zn<-30?-go:Zn<30?-.5*go:0}}return Ai};function qa(xt){return[xt.text,xt.x,xt.axInfo,xt.font,xt.fontSize,xt.fontColor].join("_")}V.drawTicks=function(xt,ut,Or){Or=Or||{};var Cr=ut._id+"tick",wr=[].concat(ut.minor&&ut.minor.ticks?Or.vals.filter(function(Nr){return Nr.minor&&!Nr.noTick}):[]).concat(ut.ticks?Or.vals.filter(function(Nr){return!Nr.minor&&!Nr.noTick}):[]),Rr=Or.layer.selectAll("path."+Cr).data(wr,qa);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("ticks",1).classed("crisp",Or.crisp!==!1).each(function(Nr){return a.stroke(v.select(this),Nr.minor?ut.minor.tickcolor:ut.tickcolor)}).style("stroke-width",function(Nr){return i.crispRound(xt,Nr.minor?ut.minor.tickwidth:ut.tickwidth,1)+"px"}).attr("d",Or.path).style("display",null),Ia(ut,[B]),Rr.attr("transform",Or.transFn)},V.drawGrid=function(xt,ut,Or){if(Or=Or||{},ut.tickmode!=="sync"){var Cr=ut._id+"grid",wr=ut.minor&&ut.minor.showgrid,Rr=wr?Or.vals.filter(function(Ai){return Ai.minor}):[],Nr=ut.showgrid?Or.vals.filter(function(Ai){return!Ai.minor}):[],Hr=Or.counterAxis;if(Hr&&V.shouldShowZeroLine(xt,ut,Hr))for(var gt=ut.tickmode==="array",Kt=0;Kt=0;ga--){var la=ga?va:Pa;if(la){var ba=la.selectAll("path."+Cr).data(ga?Nr:Rr,qa);ba.exit().remove(),ba.enter().append("path").classed(Cr,1).classed("crisp",Or.crisp!==!1),ba.attr("transform",Or.transFn).attr("d",Or.path).each(function(Ai){return a.stroke(v.select(this),Ai.minor?ut.minor.gridcolor:ut.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ai){return i.dashStyle(Ai.minor?ut.minor.griddash:ut.griddash,Ai.minor?ut.minor.gridwidth:ut.gridwidth)}).style("stroke-width",function(Ai){return(Ai.minor?Ir:ut._gw)+"px"}).style("display",null),typeof Or.path=="function"&&ba.attr("d",Or.path)}}Ia(ut,[L,U])}},V.drawZeroLine=function(xt,ut,Or){Or=Or||Or;var Cr=ut._id+"zl",wr=V.shouldShowZeroLine(xt,ut,Or.counterAxis),Rr=Or.layer.selectAll("path."+Cr).data(wr?[{x:0,id:ut._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("zl",1).classed("crisp",Or.crisp!==!1).each(function(){Or.layer.selectAll("path").sort(function(Nr,Hr){return j(Nr.id,Hr.id)})}),Rr.attr("transform",Or.transFn).attr("d",Or.path).call(a.stroke,ut.zerolinecolor||a.defaultLine).style("stroke-width",i.crispRound(xt,ut.zerolinewidth,ut._gw||1)+"px").style("display",null),Ia(ut,[O])},V.drawLabels=function(xt,ut,Or){Or=Or||{};var Cr=xt._fullLayout,wr=ut._id,Rr=ut.zerolinelayer==="above traces",Nr=Or.cls||wr+"tick",Hr=Or.vals.filter(function(Yn){return Yn.text}),gt=Or.labelFns,Kt=Or.secondary?0:ut.tickangle,mr=(ut._prevTickAngles||{})[Nr],Ir=Or.layer.selectAll("g."+Nr).data(ut.showticklabels?Hr:[],qa),va=[];Ir.enter().append("g").classed(Nr,1).append("text").attr("text-anchor","middle").each(function(Yn){var Gn=v.select(this),Hn=xt._promises.length;Gn.call(r.positionText,gt.xFn(Yn),gt.yFn(Yn)).call(i.font,{family:Yn.font,size:Yn.fontSize,color:Yn.fontColor,weight:Yn.fontWeight,style:Yn.fontStyle,variant:Yn.fontVariant,textcase:Yn.fontTextcase,lineposition:Yn.fontLineposition,shadow:Yn.fontShadow}).text(Yn.text).call(r.convertToTspans,xt),xt._promises[Hn]?va.push(xt._promises.pop().then(function(){Pa(Gn,Kt)})):Pa(Gn,Kt)}),Ia(ut,[W]),Ir.exit().remove(),Or.repositionOnUpdate&&Ir.each(function(Yn){v.select(this).select("text").call(r.positionText,gt.xFn(Yn),gt.yFn(Yn))});function Pa(Yn,Gn){Yn.each(function(Hn){var ss=v.select(this),_s=ss.select(".text-math-group"),ps=gt.anchorFn(Hn,Gn),Ko=Or.transFn.call(ss.node(),Hn)+(_(Gn)&&+Gn!=0?" rotate("+Gn+","+gt.xFn(Hn)+","+(gt.yFn(Hn)-Hn.fontSize/2)+")":""),Gi=r.lineCount(ss),Pn=Y*Hn.fontSize,qs=gt.heightFn(Hn,_(Gn)?+Gn:0,(Gi-1)*Pn);if(qs&&(Ko+=t(0,qs)),_s.empty()){var bs=ss.select("text");bs.attr({transform:Ko,"text-anchor":ps}),bs.style("display",null),ut._adjustTickLabelsOverflow&&ut._adjustTickLabelsOverflow()}else{var lo=i.bBox(_s.node()).width,Zo=lo*{end:-.5,start:.5}[ps];_s.attr("transform",Ko+t(Zo,0))}})}ut._adjustTickLabelsOverflow=function(){var Yn=ut.ticklabeloverflow;if(!(!Yn||Yn==="allow")){var Gn=Yn.indexOf("hide")!==-1,Hn=ut._id.charAt(0)==="x",ss=0,_s=Hn?xt._fullLayout.width:xt._fullLayout.height;if(Yn.indexOf("domain")!==-1){var ps=e.simpleMap(ut.range,ut.r2l);ss=ut.l2p(ps[0])+ut._offset,_s=ut.l2p(ps[1])+ut._offset}var Ko=Math.min(ss,_s),Gi=Math.max(ss,_s),Pn=ut.side,qs=1/0,bs=-1/0;Ir.each(function(Hs){var il=v.select(this),yn=il.select(".text-math-group");if(yn.empty()){var Po=i.bBox(il.node()),To=0;Hn?(Po.right>Gi||Po.leftGi||Po.top+(ut.tickangle?0:Hs.fontSize/4)ut["_visibleLabelMin_"+ps._id]?il.style("display","none"):Gi.K==="tick"&&!Ko&&il.node().style.display!=="none"&&il.style("display",null)})})})})},Pa(Ir,mr+1?mr:Kt);function ga(){return va.length&&Promise.all(va)}var la=null;function ba(){if(Pa(Ir,Kt),Hr.length&&ut.autotickangles&&(ut.type!=="log"||String(ut.dtick).charAt(0)!=="D")){la=ut.autotickangles[0];var Yn=0,Gn=[],Hn,ss=1;Ir.each(function(Jo){Yn=Math.max(Yn,Jo.fontSize);var Es=ut.l2p(Jo.x),Ul=Zt(this),lu=i.bBox(Ul.node());ss=Math.max(ss,r.lineCount(Ul)),Gn.push({top:0,bottom:10,height:10,left:Es-lu.width/2,right:Es+lu.width/2+2,width:lu.width+2})});var _s=(ut.tickson==="boundaries"||ut.showdividers)&&!Or.secondary,ps=Hr.length,Ko=Math.abs((Hr[ps-1].x-Hr[0].x)*ut._m)/(ps-1),Gi=_s?Ko/2:Ko,Pn=_s?ut.ticklen:Yn*1.25*ss,qs=Math.sqrt(Math.pow(Gi,2)+Math.pow(Pn,2)),bs=Gi/qs,lo=ut.autotickangles.map(function(Jo){return Jo*Math.PI/180}),Zo=lo.find(function(Jo){return Math.abs(Math.cos(Jo))<=bs});Zo===void 0&&(Zo=lo.reduce(function(Jo,Es){return Math.abs(Math.cos(Jo))os*go&&(kn=go,Co[ao]=bo[ao]=wo[ao])}var ys=Math.abs(kn-zs);ys-wn>0?(ys-=wn,wn*=1+wn/ys):wn=0,ut._id.charAt(0)!=="y"&&(wn=-wn),Co[En]=Ki.p2r(Ki.r2p(bo[En])+On*wn),Ki.autorange==="min"||Ki.autorange==="max reversed"?(Co[0]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0):(Ki.autorange==="max"||Ki.autorange==="min reversed")&&(Co[1]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0),Cr._insideTickLabelsUpdaterange[Ki._name+".range"]=Co}var jo=e.syncOrAsync(Ai);return jo&&jo.then&&xt._promises.push(jo),jo};function Wa(xt,ut,Or){var Cr=ut._id+"divider",wr=Or.vals,Rr=Or.layer.selectAll("path."+Cr).data(wr,qa);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(Cr,1).classed("crisp",1).call(a.stroke,ut.dividercolor).style("stroke-width",i.crispRound(xt,ut.dividerwidth,1)+"px"),Rr.attr("transform",Or.transFn).attr("d",Or.path)}V.getPxPosition=function(xt,ut){var Or=xt._fullLayout._size,Cr=ut._id.charAt(0),wr=ut.side,Rr;if(ut.anchor!=="free"?Rr=ut._anchorAxis:Cr==="x"?Rr={_offset:Or.t+(1-(ut.position||0))*Or.h,_length:0}:Cr==="y"&&(Rr={_offset:Or.l+(ut.position||0)*Or.w+ut._shift,_length:0}),wr==="top"||wr==="left")return Rr._offset;if(wr==="bottom"||wr==="right")return Rr._offset+Rr._length};function Ca(xt){var ut=xt.title.font.size,Or=(xt.title.text.match(r.BR_TAG_ALL)||[]).length;return xt.title.hasOwnProperty("standoff")?ut*(de+Or*Y):Or?ut*(Or+1)*Y:ut}function hi(xt,ut){var Or=xt._fullLayout,Cr=ut._id,wr=Cr.charAt(0),Rr=ut.title.font.size,Nr,Hr=(ut.title.text.match(r.BR_TAG_ALL)||[]).length;if(ut.title.hasOwnProperty("standoff"))ut.side==="bottom"||ut.side==="right"?Nr=ut._depth+ut.title.standoff+Rr*de:(ut.side==="top"||ut.side==="left")&&(Nr=ut._depth+ut.title.standoff+Rr*(ce+Hr*Y));else{var gt=pi(ut);if(ut.type==="multicategory")Nr=ut._depth;else{var Kt=1.5*Rr;gt&&(Kt=.5*Rr,ut.ticks==="outside"&&(Kt+=ut.ticklen)),Nr=10+Kt+(ut.linewidth?ut.linewidth-1:0)}gt||(wr==="x"?Nr+=ut.side==="top"?Rr*(ut.showticklabels?1:0):Rr*(ut.showticklabels?1.5:.5):Nr+=ut.side==="right"?Rr*(ut.showticklabels?1:.5):Rr*(ut.showticklabels?.5:0))}var mr=V.getPxPosition(xt,ut),Ir,va,Pa;wr==="x"?(va=ut._offset+ut._length/2,Pa=ut.side==="top"?mr-Nr:mr+Nr):(Pa=ut._offset+ut._length/2,va=ut.side==="right"?mr+Nr:mr-Nr,Ir={rotate:"-90",offset:0});var ga;if(ut.type!=="multicategory"){var la=ut._selections[ut._id+"tick"];if(ga={selection:la,side:ut.side},la&&la.node()&&la.node().parentNode){var ba=i.getTranslate(la.node().parentNode);ga.offsetLeft=ba.x,ga.offsetTop=ba.y}ut.title.hasOwnProperty("standoff")&&(ga.pad=0)}return ut._titleStandoff=Nr,o.draw(xt,Cr+"title",{propContainer:ut,propName:ut._name+".title.text",placeholder:Or._dfltTitle[wr],avoid:ga,transform:Ir,attributes:{x:va,y:Pa,"text-anchor":"middle"}})}V.shouldShowZeroLine=function(xt,ut,Or){var Cr=e.simpleMap(ut.range,ut.r2l);return Cr[0]*Cr[1]<=0&&ut.zeroline&&(ut.type==="linear"||ut.type==="-")&&!(ut.rangebreaks&&ut.maskBreaks(0)===N)&&(wi(ut,0)||!Yt(xt,ut,Or,Cr)||Rt(xt,ut))},V.clipEnds=function(xt,ut){return ut.filter(function(Or){return wi(xt,Or.x)})};function wi(xt,ut){var Or=xt.l2p(ut);return Or>1&&Or1)for(wr=1;wr=wr.min&&xt=z:/%L/.test(ut)?xt>=P:/%[SX]/.test(ut)?xt>=D:/%M/.test(ut)?xt>=y:/%[HI]/.test(ut)?xt>=g:/%p/.test(ut)?xt>=u:/%[Aadejuwx]/.test(ut)?xt>=d:/%[UVW]/.test(ut)?xt>=b:/%[Bbm]/.test(ut)?xt>=p:/%[q]/.test(ut)?xt>=w:/%[Yy]/.test(ut)?xt>=T:!0}}}),f5=He({"src/plots/cartesian/autorange_options_defaults.js"(Z,q){"use strict";q.exports=function(_,S,M){var e,t;if(M){var r=S==="reversed"||S==="min reversed"||S==="max reversed";e=M[r?1:0],t=M[r?0:1]}var o=_("autorangeoptions.minallowed",t===null?e:void 0),a=_("autorangeoptions.maxallowed",e===null?t:void 0);o===void 0&&_("autorangeoptions.clipmin"),a===void 0&&_("autorangeoptions.clipmax"),_("autorangeoptions.include")}}}),h5=He({"src/plots/cartesian/range_defaults.js"(Z,q){"use strict";var v=f5();q.exports=function(S,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),h;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,h=!0),h||(n=M.getAutorangeDflt(a,t),s=e("autorange",n)),s&&(v(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),M.cleanRange()}}}),uz=He({"node_modules/mouse-event-offset/index.js"(Z,q){var v={left:0,top:0};q.exports=_;function _(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=S(e);return t[0]=r-a.left,t[1]=o-a.top,t}function S(M){return M===window||M===document||M===document.body?v:M.getBoundingClientRect()}}}),b2=He({"node_modules/has-passive-events/index.js"(Z,q){"use strict";var v=a5();function _(){var S=!1;try{var M=Object.defineProperty({},"passive",{get:function(){S=!0}});window.addEventListener("test",null,M),window.removeEventListener("test",null,M)}catch{S=!1}return S}q.exports=v&&_()}}),cz=He({"src/components/dragelement/align.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){var r=(_-M)/(e-M),o=r+S/(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}}}),fz=He({"src/components/dragelement/cursor.js"(Z,q){"use strict";var v=sa(),_=[["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=v.constrain(Math.floor(M*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=v.constrain(Math.floor(e*3),0,2),_[e][M]}}}),hz=He({"src/components/dragelement/unhover.js"(Z,q){"use strict";var v=Qy(),_=y2(),S=T_().getGraphDiv,M=w_(),e=q.exports={};e.wrapped=function(t,r,o){t=S(t),t._fullLayout&&_.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&&v.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}))}}}),Ap=He({"src/components/dragelement/index.js"(Z,q){"use strict";var v=uz(),_=i5(),S=b2(),M=sa().removeElement,e=lh(),t=q.exports={};t.align=cz(),t.getCursor=fz();var r=hz();t.unhover=r.wrapped,t.unhoverRaw=r.raw,t.init=function(n){var s=n.gd,h=1,f=s._context.doubleClickDelay,m=n.element,c,T,l,x,w,A,E,p;s._mouseDownTime||(s._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=u,S?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=u,m.addEventListener("touchstart",u,{passive:!1})):m.ontouchstart=u;function b(D,P,z){return Math.abs(D)"u"&&typeof D.clientY>"u"&&(D.clientX=c,D.clientY=T),l=new Date().getTime(),l-s._mouseDownTimef&&(h=Math.max(h-1,1)),s._dragged)n.doneFn&&n.doneFn();else{var P;A.target===E?P=A:(P={target:E,srcElement:E,toElement:E},Object.keys(A).concat(Object.keys(A.__proto__)).forEach(z=>{var F=A[z];!P[z]&&typeof F!="function"&&(P[z]=F)})),n.clickFn&&n.clickFn(h,P),p||E.dispatchEvent(new MouseEvent("click",D))}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 v(i.changedTouches?i.changedTouches[0]:i,document.body)}}}),Kd=He({"src/lib/setcursor.js"(Z,q){"use strict";q.exports=function(_,S){(_.attr("class")||"").split(" ").forEach(function(M){M.indexOf("cursor-")===0&&_.classed(M,!1)}),S&&_.classed("cursor-"+S,!0)}}}),pz=He({"src/lib/override_cursor.js"(Z,q){"use strict";var v=Kd(),_="data-savedcursor",S="!!";q.exports=function(e,t){var r=e.attr(_);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;aX.legend.length)for(var le=X.legend.length;le(a==="legend"?1:0));if(z===!1&&(n[a]=void 0),!(z===!1&&!f.uirevision)&&(c("uirevision",n.uirevision),z!==!1)){c("borderwidth");var F=c("orientation"),N=c("yref"),O=c("xref"),L=F==="h",U=N==="paper",B=O==="paper",W,$,ue,ce="left";L?(W=0,v.getComponentMethod("rangeslider","isVisible")(i.xaxis)?U?($=1.1,ue="bottom"):($=1,ue="top"):U?($=-.1,ue="top"):($=0,ue="bottom")):($=1,ue="auto",B?W=1.02:(W=1,ce="right")),_.coerce(f,m,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:W}},"x"),_.coerce(f,m,{y:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"y"),c("traceorder",d),r.isGrouped(n[a])&&c("tracegroupgap"),c("entrywidth"),c("entrywidthmode"),c("indentation"),c("itemsizing"),c("itemwidth"),c("itemclick"),c("itemdoubleclick"),c("groupclick"),c("xanchor",ce),c("yanchor",ue),c("maxheight"),c("valign"),_.noneOrAll(f,m,["x","y"]);var de=c("title.text");if(de){c("title.side",L?"left":"top");var Y=_.extendFlat({},T,{size:_.bigFont(T.size)});_.coerceFont(c,"title.font",Y);let X=h>1;c("titleclick",X?"toggle":!1),c("titledoubleclick",X?"toggleothers":!1)}}}q.exports=function(i,n,s){var h,f=s.slice(),m=n.shapes;if(m)for(h=0;htt.showlegend||tt.legendgroup);var T=m.concat(c),l=n.trace;l._isShape&&(l=l._fullInput);var x=l.legendgroup,w,A,E,p,b,d,u={},g=[],y=[],D=[];function P(tt,Ve){var he=g.indexOf(tt),se=u.visible;return se||(se=u.visible=[]),g.indexOf(tt)===-1&&(g.push(tt),he=g.length-1),se[he]=Ve,he}var z=(i.shapes||[]).map(function(tt){return tt._input}),F=!1;function N(tt,Ve){z[tt].visible=Ve,F=!0}function O(tt,Ve){if(!(n.groupTitle&&!h)){var he=tt._fullInput||tt,se=he._isShape,ne=he.index;ne===void 0&&(ne=he._index);var Ce=he.visible===!1?!1:Ve;se?N(ne,Ce):P(ne,Ce)}}var L=l.legend,U=l._fullInput,B=U&&U._isShape;if(!B&&q.traceIs(l,"pie-like")){var W=n.label,$=f.indexOf(W);if(a==="toggle")$===-1?f.push(W):f.splice($,1);else if(a==="toggleothers"){var ue=$!==-1,ce=[];for(w=0;wE.showlegend||E.legendgroup),h=i.concat(s);function f(E){return(E.legend||"legend")===n}var m,c;if(o==="toggle")m=!h.some(function(p){return f(p)&&p.visible===!0}),c=!1;else{let E=h.some(function(p){return!f(p)&&p.visible===!0&&p.showlegend!==!1});m=!0,c=!E}let T={visible:[]},l=[],x=(a.shapes||[]).map(function(E){return E._input});for(var w=!1,A=0;AN&&(z=N)}D[T][0]._groupMinRank=z,D[T][0]._preGroupSort=T}var O=function(ue,ce){return ue[0]._groupMinRank-ce[0]._groupMinRank||ue[0]._preGroupSort-ce[0]._preGroupSort},L=function(ue,ce){var de=v(ue.trace.legendrank)?ue.trace.legendrank[ue.i]:ue.trace.legendrank,Y=v(ce.trace.legendrank)?ce.trace.legendrank[ce.i]:ce.trace.legendrank;return de-Y||ue._preSort-ce._preSort};for(D.forEach(function(ue,ce){ue[0]._preGroupSort=ce}),D.sort(O),T=0;T0)le=X.width;else return 0;return d?V:Math.min(le,Q)};A.each(function(Y){var X=v.select(this),Q=S.ensureSingle(X,"g","layers");Q.style("opacity",Y[0].trace.opacity);var V=p.indentation,le=p.valign,ae=Y[0].lineHeight,j=Y[0].height;if(le==="middle"&&V===0||!ae||!j)Q.attr("transform",null);else{var ee={top:1,bottom:-1}[le],te=ee*(.5*(ae-j+3))||0,pe=p.indentation;Q.attr("transform",M(pe,te))}var we=Q.selectAll("g.legendfill").data([Y]);we.enter().append("g").classed("legendfill",!0);var Se=Q.selectAll("g.legendlines").data([Y]);Se.enter().append("g").classed("legendlines",!0);var Re=Q.selectAll("g.legendsymbols").data([Y]);Re.enter().append("g").classed("legendsymbols",!0),Re.selectAll("g.legendpoints").data([Y]).enter().append("g").classed("legendpoints",!0)}).each(de).each(F).each(O).each(N).each(U).each(ue).each($).each(P).each(z).each(B).each(W);function P(Y){var X=l(Y),Q=X.showFill,V=X.showLine,le=X.showGradientLine,ae=X.showGradientFill,j=X.anyFill,ee=X.anyLine,te=Y[0],pe=te.trace,we,Se,Re=r(pe),Pe=Re.colorscale,je=Re.reversescale,at=function(Ce){if(Ce.size())if(Q)e.fillGroupStyle(Ce,E,!0);else{var Ze="legendfill-"+pe.uid;e.gradient(Ce,E,Ze,T(je),Pe,"fill")}},nt=function(Ce){if(Ce.size()){var Ze="legendline-"+pe.uid;e.lineGroupStyle(Ce),e.gradient(Ce,E,Ze,T(je),Pe,"stroke")}},tt=o.hasMarkers(pe)||!j?"M5,0":ee?"M5,-2":"M5,-3",Ve=v.select(this),he=Ve.select(".legendfill").selectAll("path").data(Q||ae?[Y]:[]);if(he.enter().append("path").classed("js-fill",!0),he.exit().remove(),he.attr("d",tt+"h"+u+"v6h-"+u+"z").call(at),V||le){var se=D(void 0,pe.line,m,h);Se=S.minExtend(pe,{line:{width:se}}),we=[S.minExtend(te,{trace:Se})]}var ne=Ve.select(".legendlines").selectAll("path").data(V||le?[we]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",tt+(le?"l"+u+",0.0001":"h"+u)).call(V?e.lineGroupStyle:nt)}function z(Y){var X=l(Y),Q=X.anyFill,V=X.anyLine,le=X.showLine,ae=X.showMarker,j=Y[0],ee=j.trace,te=!ae&&!V&&!Q&&o.hasText(ee),pe,we;function Se(he,se,ne,Ce){var Ze=S.nestedProperty(ee,he).get(),rt=S.isArrayOrTypedArray(Ze)&&se?se(Ze):Ze;if(d&&rt&&Ce!==void 0&&(rt=Ce),ne){if(rtne[1])return ne[1]}return rt}function Re(he){return j._distinct&&j.index&&he[j.index]?he[j.index]:he[0]}if(ae||te||le){var Pe={},je={};if(ae){Pe.mc=Se("marker.color",Re),Pe.mx=Se("marker.symbol",Re),Pe.mo=Se("marker.opacity",S.mean,[.2,1]),Pe.mlc=Se("marker.line.color",Re),Pe.mlw=Se("marker.line.width",S.mean,[0,5],f),Pe.mld=ee._isShape?"solid":Se("marker.line.dash",Re),je.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var at=Se("marker.size",S.mean,[2,16],s);Pe.ms=at,je.marker.size=at}le&&(je.line={width:Se("line.width",Re,[0,10],h)}),te&&(Pe.tx="Aa",Pe.tp=Se("textposition",Re),Pe.ts=10,Pe.tc=Se("textfont.color",Re),Pe.tf=Se("textfont.family",Re),Pe.tw=Se("textfont.weight",Re),Pe.ty=Se("textfont.style",Re),Pe.tv=Se("textfont.variant",Re),Pe.tC=Se("textfont.textcase",Re),Pe.tE=Se("textfont.lineposition",Re),Pe.tS=Se("textfont.shadow",Re)),pe=[S.minExtend(j,Pe)],we=S.minExtend(ee,je),we.selectedpoints=null,we.texttemplate=null}var nt=v.select(this).select("g.legendpoints"),tt=nt.selectAll("path.scatterpts").data(ae?pe:[]);tt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",y),tt.exit().remove(),tt.call(e.pointStyle,we,E),ae&&(pe[0].mrc=3);var Ve=nt.selectAll("g.pointtext").data(te?pe:[]);Ve.enter().append("g").classed("pointtext",!0).append("text").attr("transform",y),Ve.exit().remove(),Ve.selectAll("text").call(e.textPointStyle,we,E)}function F(Y){var X=Y[0].trace,Q=X.type==="waterfall";if(Y[0]._distinct&&Q){var V=Y[0].trace[Y[0].dir].marker;return Y[0].mc=V.color,Y[0].mlw=V.line.width,Y[0].mlc=V.line.color,L(Y,this,"waterfall")}var le=[];X.visible&&Q&&(le=Y[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 ae=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(le);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",y).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(j){var ee=v.select(this),te=X[j[0]].marker,pe=D(void 0,te.line,c,f);ee.attr("d",j[1]).style("stroke-width",pe+"px").call(t.fill,te.color),pe&&ee.call(t.stroke,te.line.color)})}function N(Y){L(Y,this)}function O(Y){L(Y,this,"funnel")}function L(Y,X,Q){var V=Y[0].trace,le=V.marker||{},ae=le.line||{},j=le.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=Q?V.visible&&V.type===Q:_.traceIs(V,"bar"),te=v.select(X).select("g.legendpoints").selectAll("path.legend"+Q).data(ee?[Y]:[]);te.enter().append("path").classed("legend"+Q,!0).attr("d",j).attr("transform",y),te.exit().remove(),te.each(function(pe){var we=v.select(this),Se=pe[0],Re=D(Se.mlw,le.line,c,f);we.style("stroke-width",Re+"px");var Pe=Se.mcc;if(!p._inHover&&"mc"in Se){var je=r(le),at=je.mid;at===void 0&&(at=(je.max+je.min)/2),Pe=e.tryColorscale(le,"")(at)}var nt=Pe||Se.mc||le.color,tt=le.pattern,Ve=e.getPatternAttr,he=tt&&(Ve(tt.shape,0,"")||Ve(tt.path,0,""));if(he){var se=Ve(tt.bgcolor,0,null),ne=Ve(tt.fgcolor,0,null),Ce=tt.fgopacity,Ze=x(tt.size,8,10),rt=x(tt.solidity,.5,1),Je="legend-"+V.uid;we.call(e.pattern,"legend",E,Je,he,Ze,rt,Pe,tt.fillmode,se,ne,Ce)}else we.call(t.fill,nt);Re&&t.stroke(we,Se.mlc||ae.color)})}function U(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&_.traceIs(X,"box-violin")?[Y]:[]);Q.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),Q.exit().remove(),Q.each(function(){var V=v.select(this);if((X.boxpoints==="all"||X.points==="all")&&t.opacity(X.fillcolor)===0&&t.opacity((X.line||{}).color)===0){var le=S.minExtend(X,{marker:{size:d?s:S.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});Q.call(e.pointStyle,le,E)}else{var ae=D(void 0,X.line,c,f);V.style("stroke-width",ae+"px").call(t.fill,X.fillcolor),ae&&t.stroke(V,X.line.color)}})}function B(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[Y,Y]:[]);Q.enter().append("path").classed("legendcandle",!0).attr("d",function(V,le){return le?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",y).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(V,le){var ae=v.select(this),j=X[le?"increasing":"decreasing"],ee=D(void 0,j.line,c,f);ae.style("stroke-width",ee+"px").call(t.fill,j.fillcolor),ee&&t.stroke(ae,j.line.color)})}function W(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[Y,Y]:[]);Q.enter().append("path").classed("legendohlc",!0).attr("d",function(V,le){return le?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",y).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(V,le){var ae=v.select(this),j=X[le?"increasing":"decreasing"],ee=D(void 0,j.line,c,f);ae.style("fill","none").call(e.dashLine,j.line.dash,ee),ee&&t.stroke(ae,j.line.color)})}function $(Y){ce(Y,this,"pie")}function ue(Y){ce(Y,this,"funnelarea")}function ce(Y,X,Q){var V=Y[0],le=V.trace,ae=Q?le.visible&&le.type===Q:_.traceIs(le,Q),j=v.select(X).select("g.legendpoints").selectAll("path.legend"+Q).data(ae?[Y]:[]);if(j.enter().append("path").classed("legend"+Q,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),j.exit().remove(),j.size()){var ee=le.marker||{},te=D(i(ee.line.width,V.pts),ee.line,c,f),pe="pieLike",we=S.minExtend(le,{marker:{line:{width:te}}},pe),Se=S.minExtend(V,{trace:we},pe);a(j,Se,we,E)}}function de(Y){var X=Y[0].trace,Q,V=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":V=[["M-15,-2V4H15V-2Z"]],Q=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":V=[["M-6,-6V6H6V-6Z"]],Q=!0;break;case"densitymapbox":case"densitymap":V=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],Q="radial";break;case"cone":V=[["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"]],Q=!1;break;case"streamtube":V=[["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"]],Q=!1;break;case"surface":V=[["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"]],Q=!0;break;case"mesh3d":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Q=!1;break;case"volume":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Q=!0;break;case"isosurface":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],Q=!1;break}var le=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);le.enter().append("path").classed("legend3dandfriends",!0).attr("transform",y).style("stroke-miterlimit",1),le.exit().remove(),le.each(function(ae,j){var ee=v.select(this),te=r(X),pe=te.colorscale,we=te.reversescale,Se=function(at){if(at.size()){var nt="legendfill-"+X.uid;e.gradient(at,E,nt,T(we,Q==="radial"),pe,"fill")}},Re;if(pe){if(!Q){var je=pe.length;Re=j===0?pe[we?je-1:0][1]:j===1?pe[we?0:je-1][1]:pe[Math.floor((je-1)/2)][1]}}else{var Pe=X.vertexcolor||X.facecolor||X.color;Re=S.isArrayOrTypedArray(Pe)?Pe[j]||Pe[0]:Pe}ee.attr("d",ae[0]),Re?ee.call(t.fill,Re):ee.call(Se)})}};function T(w,A){var E=A?"radial":"horizontal";return E+(w?"":"reversed")}function l(w){var A=w[0].trace,E=A.contours,p=o.hasLines(A),b=o.hasMarkers(A),d=A.visible&&A.fill&&A.fill!=="none",u=!1,g=!1;if(E){var y=E.coloring;y==="lines"?u=!0:p=y==="none"||y==="heatmap"||E.showlines,E.type==="constraint"?d=E._operation!=="=":(y==="fill"||y==="heatmap")&&(g=!0)}return{showMarker:b,showLine:p,showFill:d,showGradientLine:u,showGradientFill:g,anyLine:p||u,anyFill:d||g}}function x(w,A,E){return w&&S.isArrayOrTypedArray(w)?A:w>E?E:w}}}),y5=He({"src/components/legend/draw.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=bc(),M=so(),e=Qy(),t=Ap(),r=as(),o=$n(),a=su(),i=v5().handleItemClick,n=v5().handleTitleClick,s=m5(),h=uh(),f=h.LINE_SPACING,m=h.FROM_TL,c=h.FROM_BR,T=dz(),l=g5(),x=E_(),w=1,A=/^legend[0-9]*$/;q.exports=function(W,$){if($)p(W,$);else{var ue=W._fullLayout,ce=ue._legends,de=ue._infolayer.selectAll('[class^="legend"]');de.each(function(){var V=v.select(this),le=V.attr("class"),ae=le.split(" ")[0];ae.match(A)&&ce.indexOf(ae)===-1&&V.remove()});for(var Y=0;Y1)}var te=ue.hiddenlabels||[];if(!X&&(!ue.showlegend||!Q.length))return Y.selectAll("."+ce).remove(),ue._topdefs.select("#"+de).remove(),S.autoMargin(B,ce);var pe=_.ensureSingle(Y,"g",ce,function(Ve){X||Ve.attr("pointer-events","all")}),we=_.ensureSingleById(ue._topdefs,"clipPath",de,function(Ve){Ve.append("rect")}),Se=_.ensureSingle(pe,"rect","bg",function(Ve){Ve.attr("shape-rendering","crispEdges")});Se.call(o.stroke,$.bordercolor).call(o.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var Re=_.ensureSingle(pe,"g","scrollbox"),Pe=$.title;$._titleWidth=0,$._titleHeight=0;var je;Pe.text?(je=_.ensureSingle(Re,"text",ce+"titletext"),je.attr("text-anchor","start").call(r.font,Pe.font).text(Pe.text),P(je,Re,B,$,w),!X&&($.titleclick||$.titledoubleclick)&&D(Re,B,$,ce)):(Re.selectAll("."+ce+"titletext").remove(),Re.selectAll("."+ce+"titletoggle").remove());var at=_.ensureSingle(pe,"rect","scrollbar",function(Ve){Ve.attr(s.scrollBarEnterAttrs).call(o.fill,s.scrollBarColor)}),nt=Re.selectAll("g.groups").data(Q);nt.enter().append("g").attr("class","groups"),nt.exit().remove();var tt=nt.selectAll("g.traces").data(_.identity);tt.enter().append("g").attr("class","traces"),tt.exit().remove(),tt.style("opacity",function(Ve){let he=Ve[0],se=he.trace;if(he.groupTitle){let ne=se.legendgroup,Ce=(ue.shapes||[]).filter(function(rt){return rt.showlegend});return B._fullData.concat(Ce).some(function(rt){return rt.legendgroup===ne&&(rt.legend||"legend")===ce&&rt.visible===!0})?1:.5}return M.traceIs(se,"pie-like")?te.indexOf(Ve[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,B,$)}).call(l,B,$).each(function(Ve){X||Ve[0].groupTitle&&$.groupclick==="toggleitem"||v.select(this).call(y,B,ce)}),_.syncOrAsync([S.previousPromises,function(){return N(B,nt,tt,$,Re)},function(){var Ve=ue._size,he=$.borderwidth,se=$.xref==="paper",ne=$.yref==="paper";if(Pe.text){let Ct=(ue.shapes||[]).filter(function(jt){return jt.showlegend}),Pt=B._fullData.concat(Ct).some(function(jt){let cr=jt.legend||"legend";var or=Array.isArray(cr)?cr.includes(ce):cr===ce;return or&&jt.visible===!0});je.style("opacity",Pt?1:.5)}if(!X){var Ce,Ze;se?Ce=Ve.l+Ve.w*$.x-m[L($)]*$._width:Ce=ue.width*$.x-m[L($)]*$._width,ne?Ze=Ve.t+Ve.h*(1-$.y)-m[U($)]*$._effHeight:Ze=ue.height*(1-$.y)-m[U($)]*$._effHeight;var rt=O(B,ce,Ce,Ze);if(rt)return;if(ue.margin.autoexpand){var Je=Ce,St=Ze;Ce=se?_.constrain(Ce,0,ue.width-$._width):Je,Ze=ne?_.constrain(Ze,0,ue.height-$._effHeight):St,Ce!==Je&&_.log("Constrain "+ce+".x to make legend fit inside graph"),Ze!==St&&_.log("Constrain "+ce+".y to make legend fit inside graph")}r.setTranslate(pe,Ce,Ze)}if(at.on(".drag",null),pe.on("wheel",null),X||$._height<=$._maxHeight||B._context.staticPlot){var kt=$._effHeight;X&&(kt=$._height),Se.attr({width:$._width-he,height:kt-he,x:he/2,y:he/2}),r.setTranslate(Re,0,0),we.select("rect").attr({width:$._width-2*he,height:kt-2*he,x:he,y:he}),r.setClipUrl(Re,de,B),r.setRect(at,0,0,0,0),delete $._scrollY}else{var Bt=Math.max(s.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Vt=$._effHeight-Bt-2*s.scrollBarMargin,Ar=$._height-$._effHeight,vr=Vt/Ar,qr=Math.min($._scrollY||0,Ar);Se.attr({width:$._width-2*he+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-he,x:he/2,y:he/2}),we.select("rect").attr({width:$._width-2*he+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-2*he,x:he,y:he+qr}),r.setClipUrl(Re,de,B),We(qr,Bt,vr),pe.on("wheel",function(){qr=_.constrain($._scrollY+v.event.deltaY/Ar*Vt,0,Ar),We(qr,Bt,vr),qr!==0&&qr!==Ar&&v.event.preventDefault()});var kr,Ur,_t,Fe=function(Ct,Pt,jt){var cr=(jt-Pt)/vr+Ct;return _.constrain(cr,0,Ar)},Ye=function(Ct,Pt,jt){var cr=(Pt-jt)/vr+Ct;return _.constrain(cr,0,Ar)},Ae=v.behavior.drag().on("dragstart",function(){var Ct=v.event.sourceEvent;Ct.type==="touchstart"?kr=Ct.changedTouches[0].clientY:kr=Ct.clientY,_t=qr}).on("drag",function(){var Ct=v.event.sourceEvent;Ct.buttons===2||Ct.ctrlKey||(Ct.type==="touchmove"?Ur=Ct.changedTouches[0].clientY:Ur=Ct.clientY,qr=Fe(_t,kr,Ur),We(qr,Bt,vr))});at.call(Ae);var Le=v.behavior.drag().on("dragstart",function(){var Ct=v.event.sourceEvent;Ct.type==="touchstart"&&(kr=Ct.changedTouches[0].clientY,_t=qr)}).on("drag",function(){var Ct=v.event.sourceEvent;Ct.type==="touchmove"&&(Ur=Ct.changedTouches[0].clientY,qr=Ye(_t,kr,Ur),We(qr,Bt,vr))});Re.call(Le)}function We(Ct,Pt,jt){$._scrollY=B._fullLayout[ce]._scrollY=Ct,r.setTranslate(Re,0,-Ct),r.setRect(at,$._width,s.scrollBarMargin+Ct*jt,s.scrollBarWidth,Pt),we.select("rect").attr("y",he+Ct)}if(B._context.edits.legendPosition){var Ke,st,ot,Ut;pe.classed("cursor-move",!0),t.init({element:pe.node(),gd:B,prepFn:function(Ct){if(Ct.target!==at.node()){var Pt=r.getTranslate(pe);ot=Pt.x,Ut=Pt.y}},moveFn:function(Ct,Pt){if(ot!==void 0&&Ut!==void 0){var jt=ot+Ct,cr=Ut+Pt;r.setTranslate(pe,jt,cr),Ke=t.align(jt,$._width,Ve.l,Ve.l+Ve.w,$.xanchor),st=t.align(cr+$._height,-$._height,Ve.t+Ve.h,Ve.t,$.yanchor)}},doneFn:function(){if(Ke!==void 0&&st!==void 0){var Ct={};Ct[ce+".x"]=Ke,Ct[ce+".y"]=st,M.call("_guiRelayout",B,Ct)}},clickFn:function(Ct,Pt){var jt=Y.selectAll("g.traces").filter(function(){var cr=this.getBoundingClientRect();return Pt.clientX>=cr.left&&Pt.clientX<=cr.right&&Pt.clientY>=cr.top&&Pt.clientY<=cr.bottom});jt.size()>0&&d(B,$,jt,Ct,Pt)}})}}],B)}}function b(B,W,$){var ue=B[0],ce=ue.width,de=W.entrywidthmode,Y=ue.trace.legendwidth||W.entrywidth;return de==="fraction"?W._maxWidth*Y:$+(Y||ce)}function d(B,W,$,ue,ce){var de=B._fullLayout,Y=$.data()[0][0].trace,X=W.itemclick,Q=W.itemdoubleclick,V={event:ce,node:$.node(),curveNumber:Y.index,expandedIndex:Y.index,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:de};Y._group&&(V.group=Y._group),M.traceIs(Y,"pie-like")&&(V.label=$.datum()[0].label);var le=e.triggerHandler(B,"plotly_legendclick",V);if(ue===1){if(le===!1)return;W._clickTimeout=setTimeout(function(){B._fullLayout&&X&&i($,B,W,X)},B._context.doubleClickDelay)}else if(ue===2){W._clickTimeout&&clearTimeout(W._clickTimeout),B._legendMouseDownTime=0;var ae=e.triggerHandler(B,"plotly_legenddoubleclick",V);ae!==!1&&le!==!1&&Q&&i($,B,W,Q)}}function u(B,W,$){var ue=x.getId($),ce=B.data()[0][0],de=ce.trace,Y=M.traceIs(de,"pie-like"),X=!$._inHover&&W._context.edits.legendText&&!Y,Q=$._maxNameLength,V,le;ce.groupTitle?(V=ce.groupTitle.text,le=ce.groupTitle.font):(le=$.font,$.entries?V=ce.text:(V=Y?ce.label:de.name,de._meta&&(V=_.templateString(V,de._meta))));var ae=_.ensureSingle(B,"text",ue+"text");ae.attr("text-anchor","start").call(r.font,le).text(X?g(V,Q):V);var j=$.indentation+$.itemwidth+s.itemGap*2;a.positionText(ae,j,0),X?ae.call(a.makeEditable,{gd:W,text:V}).call(P,B,W,$).on("edit",function(ee){this.text(g(ee,Q)).call(P,B,W,$);var te=ce.trace._fullInput||{},pe={};return pe.name=ee,te._isShape?M.call("_guiRelayout",W,"shapes["+de.index+"].name",pe.name):M.call("_guiRestyle",W,pe,de.index)}):P(ae,B,W,$)}function g(B,W){var $=Math.max(4,W);if(B&&B.trim().length>=$/2)return B;B=B||"";for(var ue=$-B.length;ue>0;ue--)B+=" ";return B}function y(B,W,$){var ue=W._context.doubleClickDelay,ce,de=1,Y=_.ensureSingle(B,"rect",$+"toggle",function(X){W._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(o.fill,"rgba(0,0,0,0)")});W._context.staticPlot||(Y.on("mousedown",function(){ce=new Date().getTime(),ce-W._legendMouseDownTimeue&&(de=Math.max(de-1,1)),d(W,X,B,de,v.event)}}))}function D(B,W,$,ue){if(W._fullData.some(function(V){let le=V.legend||"legend";return(Array.isArray(le)?le.includes(ue):le===ue)&&M.traceIs(V,"pie-like")}))return;let de=W._context.doubleClickDelay;var Y,X=1;let Q=_.ensureSingle(B,"rect",ue+"titletoggle",function(V){W._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(o.fill,"rgba(0,0,0,0)")});W._context.staticPlot||(Q.on("mousedown",function(){Y=new Date().getTime(),Y-W._legendMouseDownTimede&&(X=Math.max(X-1,1));let V={event:v.event,legendId:ue,data:W.data,layout:W.layout,fullData:W._fullData,fullLayout:W._fullLayout};if(X===1&&$.titleclick){if(e.triggerHandler(W,"plotly_legendtitleclick",V)===!1)return;$._titleClickTimeout=setTimeout(function(){W._fullLayout&&n(W,$,$.titleclick)},de)}else X===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),W._legendMouseDownTime=0,e.triggerHandler(W,"plotly_legendtitledoubleclick",V)!==!1&&$.titledoubleclick&&n(W,$,$.titledoubleclick))}))}function P(B,W,$,ue,ce){ue._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,$,function(){z(W,$,ue,ce)})}function z(B,W,$,ue){var ce=B.data()[0][0],de=ce&&ce.trace.showlegend;if(Array.isArray(de)&&(de=de[ce.i]!==!1),!$._inHover&&ce&&!de){B.remove();return}var Y=B.select("g[class*=math-group]"),X=Y.node(),Q=x.getId($);$||($=W._fullLayout[Q]);var V=$.borderwidth,le;ue===w?le=$.title.font:ce.groupTitle?le=ce.groupTitle.font:le=$.font;var ae=le.size*f,j,ee;if(X){var te=r.bBox(X);j=te.height,ee=te.width,ue===w?r.setTranslate(Y,V,V+j*.75):r.setTranslate(Y,0,j*.25)}else{var pe="."+Q+(ue===w?"title":"")+"text",we=B.select(pe),Se=a.lineCount(we),Re=we.node();if(j=ae*Se,ee=Re?r.bBox(Re).width:0,ue===w)$.title.side==="left"&&(ee+=s.itemGap*2),a.positionText(we,V+s.titlePad,V+ae);else{var Pe=s.itemGap*2+$.indentation+$.itemwidth;ce.groupTitle&&(Pe=s.itemGap,ee-=$.indentation+$.itemwidth),a.positionText(we,Pe,-ae*((Se-1)/2-.3))}}ue===w?($._titleWidth=ee,$._titleHeight=j):(ce.lineHeight=ae,ce.height=Math.max(j,16)+3,ce.width=ee)}function F(B){var W=0,$=0,ue=B.title.side;return ue&&(ue.indexOf("left")!==-1&&(W=B._titleWidth),ue.indexOf("top")!==-1&&($=B._titleHeight)),[W,$]}function N(B,W,$,ue,ce){var de=B._fullLayout,Y=x.getId(ue);ue||(ue=de[Y]);var X=de._size,Q=x.isVertical(ue),V=x.isGrouped(ue),le=ue.entrywidthmode==="fraction",ae=ue.borderwidth,j=2*ae,ee=s.itemGap,te=ue.indentation+ue.itemwidth+ee*2,pe=2*(ae+ee),we=U(ue),Se=ue.y<0||ue.y===0&&we==="top",Re=ue.y>1||ue.y===1&&we==="bottom",Pe=ue.tracegroupgap,je={};let{orientation:at,yref:nt}=ue,{maxheight:tt}=ue,Ve=Se||Re||at!=="v"||nt!=="paper";tt||(tt=Ve?.5:1);let he=Ve?de.height:X.h;ue._maxHeight=Math.max(tt>1?tt:tt*he,30);var se=0;ue._width=0,ue._height=0;var ne=F(ue);if(Q)$.each(function(Ct){var Pt=Ct[0].height;r.setTranslate(this,ae+ne[0],ae+ne[1]+ue._height+Pt/2+ee),ue._height+=Pt,ue._width=Math.max(ue._width,Ct[0].width)}),se=te+ue._width,ue._width+=ee+te+j,ue._height+=pe,V&&(W.each(function(Ct,Pt){r.setTranslate(this,0,Pt*ue.tracegroupgap)}),ue._height+=(ue._lgroupsLength-1)*ue.tracegroupgap);else{var Ce=L(ue),Ze=ue.x<0||ue.x===0&&Ce==="right",rt=ue.x>1||ue.x===1&&Ce==="left",Je=Re||Se,St=de.width/2;ue._maxWidth=Math.max(Ze?Je&&Ce==="left"?X.l+X.w:St:rt?Je&&Ce==="right"?X.r+X.w:St:X.w,2*te);var kt=0,Bt=0;$.each(function(Ct){var Pt=b(Ct,ue,te);kt=Math.max(kt,Pt),Bt+=Pt}),se=null;var Vt=0;if(V){var Ar=0,vr=0,qr=0;W.each(function(){var Ct=0,Pt=0;v.select(this).selectAll("g.traces").each(function(cr){var or=b(cr,ue,te),nr=cr[0].height;r.setTranslate(this,ne[0],ne[1]+ae+ee+nr/2+Pt),Pt+=nr,Ct=Math.max(Ct,or),je[cr[0].trace.legendgroup]=Ct});var jt=Ct+ee;vr>0&&jt+ae+vr>ue._maxWidth?(Vt=Math.max(Vt,vr),vr=0,qr+=Ar+Pe,Ar=Pt):Ar=Math.max(Ar,Pt),r.setTranslate(this,vr,qr),vr+=jt}),ue._width=Math.max(Vt,vr)+ae,ue._height=qr+Ar+pe}else{var kr=$.size(),Ur=Bt+j+(kr-1)*ee=ue._maxWidth&&(Vt=Math.max(Vt,Ae),Fe=0,Ye+=_t,ue._height+=_t,_t=0),r.setTranslate(this,ne[0]+ae+Fe,ne[1]+ae+Ye+Pt/2+ee),Ae=Fe+jt+ee,Fe+=cr,_t=Math.max(_t,Pt)}),Ur?(ue._width=Fe+j,ue._height=_t+pe):(ue._width=Math.max(Vt,Ae)+j,ue._height+=_t+pe)}}ue._width=Math.ceil(Math.max(ue._width+ne[0],ue._titleWidth+2*(ae+s.titlePad))),ue._height=Math.ceil(Math.max(ue._height+ne[1],ue._titleHeight+2*(ae+s.itemGap))),ue._effHeight=Math.min(ue._height,ue._maxHeight);var Le=B._context.edits,We=Le.legendText||Le.legendPosition;$.each(function(Ct){var Pt=v.select(this).select("."+Y+"toggle"),jt=Ct[0].height,cr=Ct[0].trace.legendgroup,or=b(Ct,ue,te);V&&cr!==""&&(or=je[cr]);var nr=We?te:se||or;!Q&&!le&&(nr+=ee/2),r.setRect(Pt,0,-jt/2,nr,jt)});var Ke=ce.select("."+Y+"titletext");Ke.node()&&E(Ke,ue,ae);var st=ce.select("."+Y+"titletoggle");if(st.size()&&Ke.node()){var ot=Ke.attr("x")||0,Ut=s.titlePad;r.setRect(st,ot-Ut,ae,ue._titleWidth+2*Ut,ue._titleHeight+2*Ut)}}function O(B,W,$,ue){var ce=B._fullLayout,de=ce[W],Y=L(de),X=U(de),Q=de.xref==="paper",V=de.yref==="paper";B._fullLayout._reservedMargin[W]={};var le=de.y<.5?"b":"t",ae=de.x<.5?"l":"r",j={r:ce.width-$,l:$+de._width,b:ce.height-ue,t:ue+de._effHeight};if(Q&&V)return S.autoMargin(B,W,{x:de.x,y:de.y,l:de._width*m[Y],r:de._width*c[Y],b:de._effHeight*c[X],t:de._effHeight*m[X]});Q?B._fullLayout._reservedMargin[W][le]=j[le]:V||de.orientation==="v"?B._fullLayout._reservedMargin[W][ae]=j[ae]:B._fullLayout._reservedMargin[W][le]=j[le]}function L(B){return _.isRightAnchor(B)?"right":_.isCenterAnchor(B)?"center":"left"}function U(B){return _.isBottomAnchor(B)?"bottom":_.isMiddleAnchor(B)?"middle":"top"}}}),_5=He({"src/components/fx/hover.js"(Z){"use strict";var q=Vn(),v=ns(),_=Ch(),S=sa(),M=S.pushUnique,e=S.strTranslate,t=S.strRotate,r=Qy(),o=su(),a=pz(),i=as(),n=$n(),s=Ap(),h=Wo(),f=lh().zindexSeparator,m=so(),c=$p(),T=w_(),l=d5(),x=y5(),w=T.YANGLE,A=Math.PI*w/180,E=1/Math.sin(A),p=Math.cos(A),b=Math.sin(A),d=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,g={box:!0,ohlc:!0,violin:!0,candlestick:!0},y={scatter:!0,scattergl:!0,splom:!0};function D(j,ee){return j.distance-ee.distance}Z.hover=function(ee,te,pe,we){ee=S.getGraphDiv(ee);var Se=te.target;S.throttle(ee._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){P(ee,te,pe,we,Se)})},Z.loneHover=function(ee,te){var pe=!0;Array.isArray(ee)||(pe=!1,ee=[ee]);var we=te.gd,Se=V(we),Re=le(we),Pe=ee.map(function(Ce){var Ze=Ce._x0||Ce.x0||Ce.x||0,rt=Ce._x1||Ce.x1||Ce.x||0,Je=Ce._y0||Ce.y0||Ce.y||0,St=Ce._y1||Ce.y1||Ce.y||0,kt=Ce.eventData;if(kt){var Bt=Math.min(Ze,rt),Vt=Math.max(Ze,rt),Ar=Math.min(Je,St),vr=Math.max(Je,St),qr=Ce.trace;if(m.traceIs(qr,"gl3d")){var kr=we._fullLayout[qr.scene]._scene.container,Ur=kr.offsetLeft,_t=kr.offsetTop;Bt+=Ur,Vt+=Ur,Ar+=_t,vr+=_t}kt.bbox={x0:Bt+Re,x1:Vt+Re,y0:Ar+Se,y1:vr+Se},kt.xPixel=(Ze+rt)/2,kt.yPixel=(Je+St)/2,te.inOut_bbox&&te.inOut_bbox.push(kt.bbox)}else kt=!1;return{color:Ce.color||n.defaultLine,x0:Ce.x0||Ce.x||0,x1:Ce.x1||Ce.x||0,y0:Ce.y0||Ce.y||0,y1:Ce.y1||Ce.y||0,xLabel:Ce.xLabel,yLabel:Ce.yLabel,zLabel:Ce.zLabel,text:Ce.text,name:Ce.name,idealAlign:Ce.idealAlign,borderColor:Ce.borderColor,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontColor:Ce.fontColor,fontWeight:Ce.fontWeight,fontStyle:Ce.fontStyle,fontVariant:Ce.fontVariant,nameLength:Ce.nameLength,textAlign:Ce.textAlign,trace:Ce.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Ce.hovertemplate||!1,hovertemplateLabels:Ce.hovertemplateLabels||!1,eventData:kt}}),je=!1,at=N(Pe,{gd:we,hovermode:"closest",rotateLabels:je,bgColor:te.bgColor||n.background,container:q.select(te.container),outerContainer:te.outerContainer||te.container}),nt=at.hoverLabels,tt=5,Ve=0,he=0;nt.sort(function(Ce,Ze){return Ce.y0-Ze.y0}).each(function(Ce,Ze){var rt=Ce.y0-Ce.by/2;rt-ttVt[0]._length||Wa<0||Wa>Ar[0]._length)return s.unhoverRaw(j,ee)}if(ee.pointerX=qa+Vt[0]._offset,ee.pointerY=Wa+Ar[0]._offset,"xval"in ee?Ae=c.flat(Se,ee.xval):Ae=c.p2c(Vt,qa),"yval"in ee?Le=c.flat(Se,ee.yval):Le=c.p2c(Ar,Wa),!v(Ae[0])||!v(Le[0]))return S.warn("Fx.hover failed",ee,j),s.unhoverRaw(j,ee)}Pe.clickanywhere&&(j._hoverXVals=Ae,j._hoverYVals=Le,j._hoverXAxes=Vt,j._hoverYAxes=Ar);var wi=1/0;function Yt(kn,wo){for(Ke=0;Kenr&&(Fe.splice(0,nr),wi=Fe[0].distance),tt&&_t!==0&&Fe.length===0){or.distance=_t,or.index=!1;var jo=ot._module.hoverPoints(or,jt,cr,"closest",{hoverLayer:Pe._hoverlayer});if(jo&&(jo=jo.filter(function(ps){return ps.spikeDistance<=_t})),jo&&jo.length){var Yn,Gn=jo.filter(function(ps){return ps.xa.showspikes&&ps.xa.spikesnap!=="hovered data"});if(Gn.length){var Hn=Gn[0];v(Hn.x0)&&v(Hn.y0)&&(Yn=Zt(Hn),(!Pr.vLinePoint||Pr.vLinePoint.spikeDistance>Yn.spikeDistance)&&(Pr.vLinePoint=Yn))}var ss=jo.filter(function(ps){return ps.ya.showspikes&&ps.ya.spikesnap!=="hovered data"});if(ss.length){var _s=ss[0];v(_s.x0)&&v(_s.y0)&&(Yn=Zt(_s),(!Pr.hLinePoint||Pr.hLinePoint.spikeDistance>Yn.spikeDistance)&&(Pr.hLinePoint=Yn))}}}}}Yt();function Rt(kn,wo,Zn){for(var go=null,os=1/0,ys,jo=0;jokn.trace.index===tn.trace.index):Fe=[tn];var cn=Fe.length,xt=Q("x",tn,Pe),ut=Q("y",tn,Pe);Yt(xt,ut);var Or=[],Cr={},wr=0,Rr=function(kn){var wo=g[kn.trace.type]?z(kn):kn.trace.index;if(!Cr[wo])wr++,Cr[wo]=wr,Or.push(kn);else{var Zn=Cr[wo]-1,go=Or[Zn];Zn>0&&Math.abs(kn.distance)cn-1;Nr--)Rr(Fe[Nr]);Fe=Or,ra()}var Hr=j._hoverdata,gt=[],Kt=V(j),mr=le(j);for(let kn of Fe){var Ir=c.makeEventData(kn,kn.trace,kn.cd);if(kn.hovertemplate!==!1){var va=!1;kn.cd[kn.index]&&kn.cd[kn.index].ht&&(va=kn.cd[kn.index].ht),kn.hovertemplate=va||kn.trace.hovertemplate||!1}if(kn.xa&&kn.ya){var Pa=kn.x0+kn.xa._offset,ga=kn.x1+kn.xa._offset,la=kn.y0+kn.ya._offset,ba=kn.y1+kn.ya._offset,Ai=Math.min(Pa,ga),ki=Math.max(Pa,ga),Ki=Math.min(la,ba),Mn=Math.max(la,ba);Ir.bbox={x0:Ai+mr,x1:ki+mr,y0:Ki+Kt,y1:Mn+Kt},Ir.xPixel=(Pa+ga)/2,Ir.yPixel=(la+ba)/2}kn.eventData=[Ir],gt.push(Ir)}j._hoverdata=gt;var wn=Ve==="y"&&(Ye.length>1||Fe.length>1)||Ve==="closest"&&_a&&Fe.length>1,On=n.combine(Pe.plot_bgcolor||n.background,Pe.paper_bgcolor),En=N(Fe,{gd:j,hovermode:Ve,rotateLabels:wn,bgColor:On,container:Pe._hoverlayer,outerContainer:Pe._paper.node(),commonLabelOpts:Pe.hoverlabel,hoverdistance:Pe.hoverdistance}),ao=En.hoverLabels;if(c.isUnifiedHover(Ve)||(L(ao,wn,Pe,En.commonLabelBoundingBox),W(ao,wn,Pe._invScaleX,Pe._invScaleY)),we&&we.tagName){var Co=m.getComponentMethod("annotations","hasClickToShow")(j,gt);a(q.select(we),Co?"pointer":"")}var bo=ce(j,ee,Hr);if(!we||pe||!bo&&!Pe.hoveranywhere)return;Hr&&bo&&j.emit("plotly_unhover",{event:ee,points:Hr}),zs(j._hoverdata);function zs(kn){j.emit("plotly_hover",{event:ee,points:kn,xaxes:Vt,yaxes:Ar,xvals:Ae,yvals:Le})}}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=/([\s\S]*)<\/extra>/;function N(j,ee){var te=ee.gd,pe=te._fullLayout,we=ee.hovermode,Se=ee.rotateLabels,Re=ee.bgColor,Pe=ee.container,je=ee.outerContainer,at=ee.commonLabelOpts||{};if(j.length===0)return[[]];var nt=ee.fontFamily||T.HOVERFONT,tt=ee.fontSize||T.HOVERFONTSIZE,Ve=ee.fontWeight||pe.font.weight,he=ee.fontStyle||pe.font.style,se=ee.fontVariant||pe.font.variant,ne=ee.fontTextcase||pe.font.textcase,Ce=ee.fontLineposition||pe.font.lineposition,Ze=ee.fontShadow||pe.font.shadow,rt=j[0],Je=rt.xa,St=rt.ya,kt=we.charAt(0),Bt=kt+"Label",Vt=rt[Bt];if(Vt===void 0&&Je.type==="multicategory")for(var Ar=0;Arpe.width-gt&&(Kt=pe.width-gt),rn.attr("d","M"+(Rr-Kt)+",0L"+(Rr-Kt+d)+","+Hr+d+"H"+gt+"v"+Hr+(u*2+wr.height)+"H"+-gt+"V"+Hr+d+"H"+(Rr-Kt-d)+"Z"),Rr=Kt,Ke.minX=Rr-gt,Ke.maxX=Rr+gt,Je.side==="top"?(Ke.minY=Nr-(u*2+wr.height),Ke.maxY=Nr-u):(Ke.minY=Nr+u,Ke.maxY=Nr+(u*2+wr.height))}else{var mr,Ir,va;St.side==="right"?(mr="start",Ir=1,va="",Rr=Je._offset+Je._length):(mr="end",Ir=-1,va="-",Rr=Je._offset),Nr=St._offset+(rt.y0+rt.y1)/2,tn.attr("text-anchor",mr),rn.attr("d","M0,0L"+va+d+","+d+"V"+(u+wr.height/2)+"h"+va+(u*2+wr.width)+"V-"+(u+wr.height/2)+"H"+va+d+"V-"+d+"Z"),Ke.minY=Nr-(u+wr.height/2),Ke.maxY=Nr+(u+wr.height/2),St.side==="right"?(Ke.minX=Rr+d,Ke.maxX=Rr+d+(u*2+wr.width)):(Ke.minX=Rr-d-(u*2+wr.width),Ke.maxX=Rr-d);var Pa=wr.height/2,ga=qr-wr.top-Pa,la="clip"+pe._uid+"commonlabel"+St._id,ba;if(Rrrn.hoverinfo!=="none");if(Ia.length===0)return[];var st=pe.hoverlabel,ot=st.font,Ut=Ia[0],Ct=((we==="x unified"?Ut.xa:Ut.ya).unifiedhovertitle||{}).text,Pt=Ct?S.hovertemplateString({data:we==="x unified"?[{xa:Ut.xa,x:Ut.xVal}]:[{ya:Ut.ya,y:Ut.yVal}],fallback:Ut.trace.hovertemplatefallback,locale:pe._d3locale,template:Ct}):Vt,jt={showlegend:!0,legend:{title:{text:Pt,font:ot},font:ot,bgcolor:st.bgcolor,bordercolor:st.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:pe.legend?pe.legend.traceorder:void 0,orientation:"v"}},cr={font:ot};l(jt,cr,te._fullData);var or=cr.legend;or.entries=[];for(var nr=0;nr=0?Za=ra:ca+hi=0?Za=ca:Ba+hi=0?ri=Fr:ta+wi=0?ri=ta:$a+wi=0,(Ia.idealAlign==="top"||!Ki)&&Mn?(va-=ga/2,Ia.anchor="end"):Ki?(va+=ga/2,Ia.anchor="start"):Ia.anchor="middle",Ia.crossPos=va;else{if(Ia.pos=va,Ki=Ir+Pa/2+ki<=kr,Mn=Ir-Pa/2-ki>=0,(Ia.idealAlign==="left"||!Ki)&&Mn)Ir-=Pa/2,Ia.anchor="end";else if(Ki)Ir+=Pa/2,Ia.anchor="start";else{Ia.anchor="middle";var wn=ki/2,On=Ir+wn-kr,En=Ir-wn;On>0&&(Ir-=On),En<0&&(Ir+=-En)}Ia.crossPos=Ir}Nr.attr("text-anchor",Ia.anchor),gt&&Hr.attr("text-anchor",Ia.anchor),rn.attr("transform",e(Ir,va)+(Se?t(w):""))}),{hoverLabels:pi,commonLabelBoundingBox:Ke}}function O(j,ee,te,pe,we,Se){var Re,Pe,je="",at="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=S.templateString(j.name,j.trace._meta)),je=Y(j.name,j.nameLength));var nt=te.charAt(0),tt=nt==="x"?"y":"x";j.zLabel!==void 0?(j.xLabel!==void 0&&(at+="x: "+j.xLabel+"
"),j.yLabel!==void 0&&(at+="y: "+j.yLabel+"
"),j.trace.type!=="choropleth"&&j.trace.type!=="choroplethmapbox"&&j.trace.type!=="choroplethmap"&&(at+=(at?"z: ":"")+j.zLabel)):ee&&j[nt+"Label"]===we?at=j[tt+"Label"]||"":j.xLabel===void 0?j.yLabel!==void 0&&j.trace.type!=="scattercarpet"&&(at=j.yLabel):j.yLabel===void 0?at=j.xLabel:at="("+j.xLabel+", "+j.yLabel+")",(j.text||j.text===0)&&!Array.isArray(j.text)&&(at+=(at?"
":"")+j.text),j.extraText!==void 0&&(at+=(at?"
":"")+j.extraText),Se&&at===""&&!j.hovertemplate&&(je===""&&Se.remove(),at=je),(Pe=(Re=j.trace)==null?void 0:Re.hoverlabel)!=null&&Pe.split&&(j.hovertemplate="");let{hovertemplate:Ve=!1}=j;if(Ve){let he=j.hovertemplateLabels||j;j[nt+"Label"]!==we&&(he[nt+"other"]=he[nt+"Val"],he[nt+"otherLabel"]=he[nt+"Label"]),at=S.hovertemplateString({data:[j.eventData[0]||{},j.trace._meta],fallback:j.trace.hovertemplatefallback,labels:he,locale:pe._d3locale,template:Ve}),at=at.replace(F,(se,ne)=>(je=Y(ne,j.nameLength),""))}return[at,je]}function L(j,ee,te,pe){var we=ee?"xa":"ya",Se=ee?"ya":"xa",Re=0,Pe=1,je=j.size(),at=new Array(je),nt=0,tt=pe.minX,Ve=pe.maxX,he=pe.minY,se=pe.maxY,ne=function(Ae){return Ae*te._invScaleX},Ce=function(Ae){return Ae*te._invScaleY};j.each(function(Ae){var Le=Ae[we],We=Ae[Se],Ke=Le._id.charAt(0)==="x",st=Le.range;nt===0&&st&&st[0]>st[1]!==Ke&&(Pe=-1);var ot=0,Ut=Ke?te.width:te.height;if(te.hovermode==="x"||te.hovermode==="y"){var Ct=U(Ae,ee),Pt=Ae.anchor,jt=Pt==="end"?-1:1,cr,or;if(Pt==="middle")cr=Ae.crossPos+(Ke?Ce(Ct.y-Ae.by/2):ne(Ae.bx/2+Ae.tx2width/2)),or=cr+(Ke?Ce(Ae.by):ne(Ae.bx));else if(Ke)cr=Ae.crossPos+Ce(d+Ct.y)-Ce(Ae.by/2-d),or=cr+Ce(Ae.by);else{var nr=ne(jt*d+Ct.x),Pr=nr+ne(jt*Ae.bx);cr=Ae.crossPos+Math.min(nr,Pr),or=Ae.crossPos+Math.max(nr,Pr)}Ke?he!==void 0&&se!==void 0&&Math.min(or,se)-Math.max(cr,he)>1&&(We.side==="left"?(ot=We._mainLinePosition,Ut=te.width):Ut=We._mainLinePosition):tt!==void 0&&Ve!==void 0&&Math.min(or,Ve)-Math.max(cr,tt)>1&&(We.side==="top"?(ot=We._mainLinePosition,Ut=te.height):Ut=We._mainLinePosition)}at[nt++]=[{datum:Ae,traceIndex:Ae.trace.index,dp:0,pos:Ae.pos,posref:Ae.posref,size:Ae.by*(Ke?E:1)/2,pmin:ot,pmax:Ut}]}),at.sort(function(Ae,Le){return Ae[0].posref-Le[0].posref||Pe*(Le[0].traceIndex-Ae[0].traceIndex)});var Ze,rt,Je,St,kt,Bt,Vt;function Ar(Ae){var Le=Ae[0],We=Ae[Ae.length-1];if(rt=Le.pmin-Le.pos-Le.dp+Le.size,Je=We.pos+We.dp+We.size-Le.pmax,rt>.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp+=rt;Ze=!1}if(!(Je<.01)){if(rt<-.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp-=Je;Ze=!1}if(Ze){var Ke=0;for(St=0;StLe.pmax&&Ke++;for(St=Ae.length-1;St>=0&&!(Ke<=0);St--)Bt=Ae[St],Bt.pos>Le.pmax-1&&(Bt.del=!0,Ke--);for(St=0;St=0;kt--)Ae[kt].dp-=Je;for(St=Ae.length-1;St>=0&&!(Ke<=0);St--)Bt=Ae[St],Bt.pos+Bt.dp+Bt.size>Le.pmax&&(Bt.del=!0,Ke--)}}}for(;!Ze&&Re<=je;){for(Re++,Ze=!0,St=0;St.01){for(kt=qr.length-1;kt>=0;kt--)qr[kt].dp+=rt;for(vr.push.apply(vr,qr),at.splice(St+1,1),Vt=0,kt=vr.length-1;kt>=0;kt--)Vt+=vr[kt].dp;for(Je=Vt/vr.length,kt=vr.length-1;kt>=0;kt--)vr[kt].dp-=Je;Ze=!1}else St++}at.forEach(Ar)}for(St=at.length-1;St>=0;St--){var _t=at[St];for(kt=_t.length-1;kt>=0;kt--){var Fe=_t[kt],Ye=Fe.datum;Ye.offset=Fe.dp,Ye.del=Fe.del}}}function U(j,ee){var te=0,pe=j.offset;return ee&&(pe*=-b,te=j.offset*p),{x:te,y:pe}}function B(j){var ee={start:1,end:-1,middle:0}[j.anchor],te=ee*(d+u),pe=te+ee*(j.txwidth+u),we=j.anchor==="middle";return we&&(te-=j.tx2width/2,pe+=j.txwidth/2+u),{alignShift:ee,textShiftX:te,text2ShiftX:pe}}function W(j,ee,te,pe){var we=function(Re){return Re*te},Se=function(Re){return Re*pe};j.each(function(Re){var Pe=q.select(this);if(Re.del)return Pe.remove();var je=Pe.select("text.nums"),at=Re.anchor,nt=at==="end"?-1:1,tt=B(Re),Ve=U(Re,ee),he=Ve.x,se=Ve.y,ne=at==="middle",Ce="hoverlabel"in Re.trace?Re.trace.hoverlabel.showarrow:!0,Ze;ne?Ze="M-"+we(Re.bx/2+Re.tx2width/2)+","+Se(se-Re.by/2)+"h"+we(Re.bx)+"v"+Se(Re.by)+"h-"+we(Re.bx)+"Z":Ce?Ze="M0,0L"+we(nt*d+he)+","+Se(d+se)+"v"+Se(Re.by/2-d)+"h"+we(nt*Re.bx)+"v-"+Se(Re.by)+"H"+we(nt*d+he)+"V"+Se(se-d)+"Z":Ze="M"+we(nt*d+he)+","+Se(se-Re.by/2)+"h"+we(nt*Re.bx)+"v"+Se(Re.by)+"h"+we(-nt*Re.bx)+"Z",Pe.select("path").attr("d",Ze);var rt=he+tt.textShiftX,Je=se+Re.ty0-Re.by/2+u,St=Re.textAlign||"auto";St!=="auto"&&(St==="left"&&at!=="start"?(je.attr("text-anchor","start"),rt=ne?-Re.bx/2-Re.tx2width/2+u:-Re.bx-u):St==="right"&&at!=="end"&&(je.attr("text-anchor","end"),rt=ne?Re.bx/2-Re.tx2width/2-u:Re.bx+u)),je.call(o.positionText,we(rt),Se(Je)),Re.tx2width&&(Pe.select("text.name").call(o.positionText,we(tt.text2ShiftX+tt.alignShift*u+he),Se(se+Re.ty0-Re.by/2+u)),Pe.select("rect").call(i.setRect,we(tt.text2ShiftX+(tt.alignShift-1)*Re.tx2width/2+he),Se(se-Re.by/2-1),we(Re.tx2width),Se(Re.by+2)))})}function $(j,ee){var te=j.index,pe=j.trace||{},we=j.cd[0],Se=j.cd[te]||{};function Re(Ve){return Ve||v(Ve)&&Ve===0}var Pe=Array.isArray(te)?function(Ve,he){var se=S.castOption(we,te,Ve);return Re(se)?se:S.extractOption({},pe,"",he)}:function(Ve,he){return S.extractOption(Se,pe,Ve,he)};function je(Ve,he,se){var ne=Pe(he,se);Re(ne)&&(j[Ve]=ne)}if(je("hoverinfo","hi","hoverinfo"),je("bgcolor","hbg","hoverlabel.bgcolor"),je("borderColor","hbc","hoverlabel.bordercolor"),je("fontFamily","htf","hoverlabel.font.family"),je("fontSize","hts","hoverlabel.font.size"),je("fontColor","htc","hoverlabel.font.color"),je("fontWeight","htw","hoverlabel.font.weight"),je("fontStyle","hty","hoverlabel.font.style"),je("fontVariant","htv","hoverlabel.font.variant"),je("nameLength","hnl","hoverlabel.namelength"),je("textAlign","hta","hoverlabel.align"),j.posref=ee==="y"||ee==="closest"&&pe.orientation==="h"?j.xa._offset+(j.x0+j.x1)/2:j.ya._offset+(j.y0+j.y1)/2,j.x0=S.constrain(j.x0,0,j.xa._length),j.x1=S.constrain(j.x1,0,j.xa._length),j.y0=S.constrain(j.y0,0,j.ya._length),j.y1=S.constrain(j.y1,0,j.ya._length),j.xLabelVal!==void 0&&(j.xLabel="xLabel"in j?j.xLabel:h.hoverLabelText(j.xa,j.xLabelVal,pe.xhoverformat),j.xVal=j.xa.c2d(j.xLabelVal)),j.yLabelVal!==void 0&&(j.yLabel="yLabel"in j?j.yLabel:h.hoverLabelText(j.ya,j.yLabelVal,pe.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 at=h.tickText(j.xa,j.xa.c2l(j.xerr),"hover").text;j.xerrneg!==void 0?j.xLabel+=" +"+at+" / -"+h.tickText(j.xa,j.xa.c2l(j.xerrneg),"hover").text:j.xLabel+=" \xB1 "+at,ee==="x"&&(j.distance+=1)}if(!isNaN(j.yerr)&&!(j.ya.type==="log"&&j.yerr<=0)){var nt=h.tickText(j.ya,j.ya.c2l(j.yerr),"hover").text;j.yerrneg!==void 0?j.yLabel+=" +"+nt+" / -"+h.tickText(j.ya,j.ya.c2l(j.yerrneg),"hover").text:j.yLabel+=" \xB1 "+nt,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,te){var pe=te.container,we=te.fullLayout,Se=we._size,Re=te.event,Pe=!!ee.hLinePoint,je=!!ee.vLinePoint,at,nt;if(pe.selectAll(".spikeline").remove(),!!(je||Pe)){var tt=n.combine(we.plot_bgcolor,we.paper_bgcolor);if(Pe){var Ve=ee.hLinePoint,he,se;at=Ve&&Ve.xa,nt=Ve&&Ve.ya;var ne=nt.spikesnap;ne==="cursor"?(he=Re.pointerX,se=Re.pointerY):(he=at._offset+Ve.x,se=nt._offset+Ve.y);var Ce=_.readability(Ve.color,tt)<1.5?n.contrast(tt):Ve.color,Ze=nt.spikemode,rt=nt.spikethickness,Je=nt.spikecolor||Ce,St=h.getPxPosition(j,nt),kt,Bt;if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(kt=St,Bt=he),Ze.indexOf("across")!==-1){var Vt=nt._counterDomainMin,Ar=nt._counterDomainMax;nt.anchor==="free"&&(Vt=Math.min(Vt,nt.position),Ar=Math.max(Ar,nt.position)),kt=Se.l+Vt*Se.w,Bt=Se.l+Ar*Se.w}pe.insert("line",":first-child").attr({x1:kt,x2:Bt,y1:se,y2:se,"stroke-width":rt,stroke:Je,"stroke-dasharray":i.dashStyle(nt.spikedash,rt)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:kt,x2:Bt,y1:se,y2:se,"stroke-width":rt+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:St+(nt.side!=="right"?rt:-rt),cy:se,r:rt,fill:Je}).classed("spikeline",!0)}if(je){var vr=ee.vLinePoint,qr,kr;at=vr&&vr.xa,nt=vr&&vr.ya;var Ur=at.spikesnap;Ur==="cursor"?(qr=Re.pointerX,kr=Re.pointerY):(qr=at._offset+vr.x,kr=nt._offset+vr.y);var _t=_.readability(vr.color,tt)<1.5?n.contrast(tt):vr.color,Fe=at.spikemode,Ye=at.spikethickness,Ae=at.spikecolor||_t,Le=h.getPxPosition(j,at),We,Ke;if(Fe.indexOf("toaxis")!==-1||Fe.indexOf("across")!==-1){if(Fe.indexOf("toaxis")!==-1&&(We=Le,Ke=kr),Fe.indexOf("across")!==-1){var st=at._counterDomainMin,ot=at._counterDomainMax;at.anchor==="free"&&(st=Math.min(st,at.position),ot=Math.max(ot,at.position)),We=Se.t+(1-ot)*Se.h,Ke=Se.t+(1-st)*Se.h}pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:We,y2:Ke,"stroke-width":Ye,stroke:Ae,"stroke-dasharray":i.dashStyle(at.spikedash,Ye)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:We,y2:Ke,"stroke-width":Ye+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Fe.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:qr,cy:Le-(at.side!=="top"?Ye:-Ye),r:Ye,fill:Ae}).classed("spikeline",!0)}}}function ce(j,ee,te){if(!te||te.length!==j._hoverdata.length)return!0;for(var pe=te.length-1;pe>=0;pe--){var we=te[pe],Se=j._hoverdata[pe];if(we.curveNumber!==Se.curveNumber||String(we.pointNumber)!==String(Se.pointNumber)||String(we.pointNumbers)!==String(Se.pointNumbers)||we.binNumber!==Se.binNumber)return!0}return!1}function de(j,ee){return!ee||ee.vLinePoint!==j._spikepoints.vLinePoint||ee.hLinePoint!==j._spikepoints.hLinePoint}function Y(j,ee){return o.plainText(j||"",{len:ee,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function X(j,ee){for(var te=ee.charAt(0),pe=[],we=[],Se=[],Re=0;Rej.offsetTop+j.clientTop,le=j=>j.offsetLeft+j.clientLeft;function ae(j,ee){var te=j._fullLayout,pe=ee.getBoundingClientRect(),we=pe.left,Se=pe.top,Re=we+pe.width,Pe=Se+pe.height,je=S.apply3DTransform(te._invTransform)(we,Se),at=S.apply3DTransform(te._invTransform)(Re,Pe),nt=je[0],tt=je[1],Ve=at[0],he=at[1];return{x:nt,y:tt,width:Ve-nt,height:he-tt,top:Math.min(tt,he),left:Math.min(nt,Ve),right:Math.max(nt,Ve),bottom:Math.max(tt,he)}}}}),k_=He({"src/components/fx/hoverlabel_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=$p().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&&S(t.hovermode)&&(o.font||(o.font={}),i("size"),i("family"),i("color"),i("weight"),i("style"),i("variant"),a?(o.bgcolor||(o.bgcolor=_.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),v.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),mz=He({"src/components/fx/layout_global_defaults.js"(Z,q){"use strict";var v=sa(),_=k_(),S=Ym();q.exports=function(e,t){function r(o,a){return v.coerce(e,t,S,o,a)}_(e,t,r)}}}),gz=He({"src/components/fx/defaults.js"(Z,q){"use strict";var v=sa(),_=Ky(),S=k_();q.exports=function(e,t,r,o){function a(n,s){return v.coerce(e,t,_,n,s)}var i=v.extendFlat({},o.hoverlabel);t.hovertemplate&&(i.namelength=-1),S(e,t,a,i)}}}),x5=He({"src/components/fx/hovermode_defaults.js"(Z,q){"use strict";var v=sa(),_=Ym();q.exports=function(M,e){function t(r,o){return e[r]!==void 0?e[r]:v.coerce(M,e,_,r,o)}return t("clickmode"),t("hoversubplots"),t("hoveranywhere"),t("clickanywhere"),t("hovermode")}}}),yz=He({"src/components/fx/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=Ym(),S=x5(),M=k_();q.exports=function(t,r){function o(m,c){return v.coerce(t,r,_,m,c)}var a=S(t,r);a&&(o("hoverdistance"),o("spikedistance"),a.indexOf("unified")!==-1&&o("hoversort"));var i=o("dragmode");i==="select"&&o("selectdirection");var n=r._has("mapbox"),s=r._has("map"),h=r._has("geo"),f=r._basePlotModules.length;r.dragmode==="zoom"&&((n||s||h)&&f===1||(n||s)&&h&&f===2)&&(r.dragmode="pan"),M(t,r,o),v.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),_z=He({"src/components/fx/calc.js"(Z,q){"use strict";var v=sa(),_=so();q.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(h){return function(f){return v.coerceHoverinfo({hoverinfo:f},{_module:h._module},r)}}for(var a=0;a"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),T2=He({"src/components/shapes/draw_newshape/constants.js"(Z,q){"use strict";var v=32;q.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),A2=He({"src/components/selections/helpers.js"(Z,q){"use strict";var v=sa().strTranslate;function _(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 S(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 _(t,o[r])}}function e(t){return v(t.xaxis._offset,t.yaxis._offset)}q.exports={p2r:_,r2p:S,axValue:M,getTransform:e}}}),a0=He({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var q=M_(),v=T2(),_=v.CIRCLE_SIDES,S=v.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 h="",f=0;f0&&x{let s=n.charAt(0),h=a[s].drawn!==void 0;return i+(h?1:0)},0)},Z.getDataToPixel=function(e,t,r,o,a){var i=e._fullLayout._size,n;if(t)if(a==="domain")n=function(h){return t._length*(o?1-h:h)+t._offset};else{var s=Z.shapePositionToRange(t);n=function(h){var f=M(t,r);return t._offset+t.r2p(s(h,!0))+f},t.type==="date"&&(n=Z.decodeDate(n))}else o?n=function(h){return i.t+i.h*(1-h)}:n=function(h){return i.l+i.w*h};return n},Z.getPixelToData=function(e,t,r,o){var a=e._fullLayout._size,i;if(t)if(o==="domain")i=function(s){var h=(s-t._offset)/t._length;return r?1-h:h};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){let r=t.type,o=_.getRefType(t.xref),a=_.getRefType(t.yref),i=e._fullLayout._size;var n,s,h,f,m,c,T,l,x,w,A,E;function p(z,F,N,O){var L;if(z)if(F==="domain")O?L=function(U){return z._offset+z._length*(1-U)}:L=function(U){return z._offset+z._length*U};else{let U=Z.shapePositionToRange(z);L=function(B){return z._offset+z.r2p(U(B,!0))},N==="path"&&z.type==="date"&&(L=Z.decodeDate(L))}else O?L=function(U){return i.t+i.h*(1-U)}:L=function(U){return i.l+i.w*U};return L}if(o==="array"?(T=[],n=t.xref.map(function(z){return _.getFromId(e,z)}),T=t.xref.map(function(z,F){return p(n[F],_.getRefType(z),r,!1)})):(n=_.getFromId(e,t.xref),T=p(n,o,r,!1)),a==="array"?(l=[],s=t.yref.map(function(z){return _.getFromId(e,z)}),l=t.yref.map(function(z,F){return p(s[F],_.getRefType(z),r,!0)})):(s=_.getFromId(e,t.yref),l=p(s,a,r,!0)),r==="path")return S(t,T,l);if(o==="array")h=M(n[0],t.x0shift),f=M(n[1],t.x1shift),x=T[0](t.x0)+h,w=T[1](t.x1)+f;else if(h=M(n,t.x0shift),f=M(n,t.x1shift),t.xsizemode==="pixel"){let z=T(t.xanchor);x=z+t.x0+h,w=z+t.x1+f}else x=T(t.x0)+h,w=T(t.x1)+f;if(a==="array")m=M(s[0],t.y0shift),c=M(s[1],t.y1shift),A=l[0](t.y0)+m,E=l[1](t.y1)+c;else if(m=M(s,t.y0shift),c=M(s,t.y1shift),t.ysizemode==="pixel"){let z=l(t.yanchor);A=z-t.y0+m,E=z-t.y1+c}else A=l(t.y0)+m,E=l(t.y1)+c;if(r==="line")return"M"+x+","+A+"L"+w+","+E;if(r==="rect")return"M"+x+","+A+"H"+w+"V"+E+"H"+x+"Z";var b=(x+w)/2,d=(A+E)/2,u=Math.abs(b-x),g=Math.abs(d-A),y="A"+u+","+g,D=b+u+","+d,P=b+","+(d-g);return"M"+D+y+" 0 1,1 "+P+y+" 0 0,1 "+D+"Z"};function S(e,t,r){let o=e.path,a=e.xsizemode,i=e.ysizemode,n=e.xanchor,s=e.yanchor,h=Array.isArray(e.xref),f=Array.isArray(e.yref);var m=0,c=0;return o.replace(q.segmentRE,function(T){var l=0,x=T.charAt(0),w=q.paramIsX[x],A=q.paramIsY[x],E=q.numParams[x];let p=w.drawn!==void 0,b=A.drawn!==void 0,d=h?t[m]:t,u=f?r[c]:r;var g=T.slice(1).replace(q.paramRE,function(y){return w[l]?a==="pixel"?y=d(n)+Number(y):y=d(y):A[l]&&(i==="pixel"?y=u(s)-Number(y):y=u(y)),l++,l>E&&(y="X"),y});return l>E&&(g=g.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+T)),p&&m++,b&&c++,x+g})}Z.getPixelShift=M;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}}}),w5=He({"src/components/shapes/display_labels.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=su(),M=as(),e=a0().readPaths,t=i0(),r=t.getPathString,o=v2(),a=uh().FROM_TL;q.exports=function(h,f,m,c){if(c.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var T;if(m.label.texttemplate){var l={};if(m.type!=="path"){var x=_.getFromId(h,m.xref),w=_.getFromId(h,m.yref);let j=Array.isArray(m.xref),ee=Array.isArray(m.yref);for(var A in o){var E=typeof o[A]=="function",p=!j||o.simpleXVariables.includes(A),b=!ee||o.simpleYVariables.includes(A);if(E&&p&&b){var d=o[A](m,x,w);d!==void 0&&(l[A]=d)}}}T=v.texttemplateStringForShapes({data:[l],fallback:m.label.texttemplatefallback,locale:h._fullLayout._d3locale,template:m.label.texttemplate})}else T=m.label.text;var u={"data-index":f},g=m.label.font,y={"data-notex":1},D=c.append("g").attr(u).classed("shape-label",!0),P=D.append("text").attr(y).classed("shape-label-text",!0).text(T),z,F,N,O;if(m.path){var L=r(h,m),U=e(L,h);z=1/0,N=1/0,F=-1/0,O=-1/0;for(var B=0;Bt.getDataToPixel(h,se,he,!1,ne)(Ve),tt=(Ve,he,se,ne)=>t.getDataToPixel(h,se,he,!0,ne)(Ve);if(m.xsizemode==="pixel"){let Ve=nt(m.xanchor,void 0,te,Re),he=t.getPixelShift(te,m.x0shift),se=t.getPixelShift(te,m.x1shift);z=Ve+m.x0+he,F=Ve+m.x1+se}else z=nt(m.x0,m.x0shift,te,Re),F=nt(m.x1,m.x1shift,pe,Pe);if(m.ysizemode==="pixel"){let Ve=tt(m.yanchor,void 0,we,je),he=t.getPixelShift(we,m.y0shift),se=t.getPixelShift(we,m.y1shift);N=Ve-m.y0+he,O=Ve-m.y1+se}else N=tt(m.y0,m.y0shift,we,je),O=tt(m.y1,m.y1shift,Se,at)}var Y=m.label.textangle;Y==="auto"&&(m.type==="line"?Y=i(z,N,F,O):Y=0),P.call(function(j){return j.call(M.font,g).attr({}),S.convertToTspans(j,h),j});var X=M.bBox(P.node()),Q=n(z,N,F,O,m,Y,X),V=Q.textx,le=Q.texty,ae=Q.xanchor;P.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ae],y:le,x:V,transform:"rotate("+Y+","+V+","+le+")"}).call(S.positionText,V,le)}};function i(s,h,f,m){var c,T;return T=Math.abs(f-s),f>=s?c=h-m:c=m-h,-180/Math.PI*Math.atan2(c,T)}function n(s,h,f,m,c,T,l){var x=c.label.textposition,w=c.label.textangle,A=c.label.padding,E=c.type,p=Math.PI/180*T,b=Math.sin(p),d=Math.cos(p),u=c.label.xanchor,g=c.label.yanchor,y,D,P,z;if(E==="line"){x==="start"?(y=s,D=h):x==="end"?(y=f,D=m):(y=(s+f)/2,D=(h+m)/2),u==="auto"&&(x==="start"?w==="auto"?f>s?u="left":fs?u="right":fs?u="right":fs?u="left":f1&&!(tt.length===2&&tt[1][0]==="Z")&&(Y===0&&(tt[0][0]="M"),y[de]=tt,N(),O())}}function pe(tt,Ve){if(tt===2){de=+Ve.srcElement.getAttribute("data-i"),Y=+Ve.srcElement.getAttribute("data-j");var he=y[de];!T(he)&&!l(he)&&te()}}function we(tt){ue=[];for(var Ve=0;Ve{if(!P._dragging&&P._fullLayout.hoveranywhere){let U=O(L);U&&h.hover(P,U,F.id)}}),N.addEventListener("click",L=>{if(!P._dragged&&P._fullLayout.clickanywhere){let U=O(L);U&&h.click(P,U,F.id)}})}function p(P,z,F){let N=F.xref,O=F.yref;if(Array.isArray(N)||Array.isArray(O)){let L="clip"+z._fullLayout._uid+"shape"+F._index,U=b(z,N,O);S.ensureSingleById(z._fullLayout._clips,"clipPath",L,function(B){B.append("rect")}).select("rect").attr(U),i.setClipUrl(P,L,z)}else{let L=(N+O).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");i.setClipUrl(P,L?"clip"+z._fullLayout._uid+L:null,z)}}function b(P,z,F){let N=P._fullLayout._size;function O(B,W){let $=(Array.isArray(B)?B:[B]).map(de=>M.getFromId(P,de)).filter(Boolean);if(!$.length)return W?[N.t,N.t+N.h]:[N.l,N.l+N.w];let ue=$.map(function(de){return de._offset}),ce=$.map(function(de){return de._offset+de._length});return[Math.min(...ue),Math.max(...ce)]}let L=O(z,!1),U=O(F,!0);return{x:L[0],y:U[0],width:L[1]-L[0],height:U[1]-U[0]}}function d(P,z,F,N,O,L){var U=10,B=10,W=F.xsizemode==="pixel",$=F.ysizemode==="pixel",ue=F.type==="line",ce=F.type==="path",de=L.modifyItem,Y,X,Q,V,le,ae,j,ee,te,pe,we,Se,Re,Pe,je,at=v.select(z.node().parentNode),nt=M.getFromId(P,F.xref),tt=M.getRefType(F.xref),Ve=M.getFromId(P,F.yref),he=M.getRefType(F.yref),se=F.x0shift,ne=F.x1shift,Ce=F.y0shift,Ze=F.y1shift,rt=function(st,ot){var Ut=c.getDataToPixel(P,nt,ot,!1,tt);return Ut(st)},Je=function(st,ot){var Ut=c.getDataToPixel(P,Ve,ot,!0,he);return Ut(st)},St=c.getPixelToData(P,nt,!1,tt),kt=c.getPixelToData(P,Ve,!0,he),Bt=vr(),Vt={element:Bt.node(),gd:P,prepFn:Ur,doneFn:_t,clickFn:Fe},Ar;s.init(Vt),Bt.node().onmousemove=kr;function vr(){return ue?qr():z}function qr(){var st=10,ot=Math.max(F.line.width,st),Ut=O.append("g").attr("data-index",N).attr("drag-helper",!0);Ut.append("path").attr("d",z.attr("d")).style({cursor:"move","stroke-width":ot,"stroke-opacity":"0"});var Ct={"fill-opacity":"0"},Pt=Math.max(ot/2,st);return Ut.append("circle").attr({"data-line-point":"start-point",cx:W?rt(F.xanchor)+F.x0:rt(F.x0,se),cy:$?Je(F.yanchor)-F.y0:Je(F.y0,Ce),r:Pt}).style(Ct).classed("cursor-grab",!0),Ut.append("circle").attr({"data-line-point":"end-point",cx:W?rt(F.xanchor)+F.x1:rt(F.x1,ne),cy:$?Je(F.yanchor)-F.y1:Je(F.y1,Ze),r:Pt}).style(Ct).classed("cursor-grab",!0),Ut}function kr(st){if(x(P)){Ar=null;return}if(ue)st.target.tagName==="path"?Ar="move":Ar=st.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ot=Vt.element.getBoundingClientRect(),Ut=ot.right-ot.left,Ct=ot.bottom-ot.top,Pt=st.clientX-ot.left,jt=st.clientY-ot.top,cr=!ce&&Ut>U&&Ct>B&&!st.shiftKey?s.getCursor(Pt/Ut,1-jt/Ct):"move";f(z,cr),Ar=cr.split("-")[0]}}function Ur(st){x(P)||(W&&(le=rt(F.xanchor)),$&&(ae=Je(F.yanchor)),F.type==="path"?je=F.path:(Y=W?F.x0:rt(F.x0),X=$?F.y0:Je(F.y0),Q=W?F.x1:rt(F.x1),V=$?F.y1:Je(F.y1)),YV?(j=X,we="y0",ee=V,Se="y1"):(j=V,we="y1",ee=X,Se="y0"),kr(st),Le(O,F),Ke(z,F,P),Vt.moveFn=Ar==="move"?Ye:Ae,Vt.altKey=st.altKey)}function _t(){x(P)||(f(z),We(O),p(z,P,F),_.call("_guiRelayout",P,L.getUpdateObj()))}function Fe(){x(P)||We(O)}function Ye(st,ot){if(F.type==="path"){var Ut=function(jt){return jt},Ct=Ut,Pt=Ut;W?de("xanchor",F.xanchor=St(le+st)):(Ct=function(cr){return St(rt(cr)+st)},nt&&nt.type==="date"&&(Ct=c.encodeDate(Ct))),$?de("yanchor",F.yanchor=kt(ae+ot)):(Pt=function(cr){return kt(Je(cr)+ot)},Ve&&Ve.type==="date"&&(Pt=c.encodeDate(Pt))),de("path",F.path=u(je,Ct,Pt))}else W?de("xanchor",F.xanchor=St(le+st)):(de("x0",F.x0=St(Y+st)),de("x1",F.x1=St(Q+st))),$?de("yanchor",F.yanchor=kt(ae+ot)):(de("y0",F.y0=kt(X+ot)),de("y1",F.y1=kt(V+ot)));z.attr("d",T(P,F)),Le(O,F),r(P,N,F,at)}function Ae(st,ot){if(ce){var Ut=function(Yt){return Yt},Ct=Ut,Pt=Ut;W?de("xanchor",F.xanchor=St(le+st)):(Ct=function(Rt){return St(rt(Rt)+st)},nt&&nt.type==="date"&&(Ct=c.encodeDate(Ct))),$?de("yanchor",F.yanchor=kt(ae+ot)):(Pt=function(Rt){return kt(Je(Rt)+ot)},Ve&&Ve.type==="date"&&(Pt=c.encodeDate(Pt))),de("path",F.path=u(je,Ct,Pt))}else if(ue){if(Ar==="resize-over-start-point"){var jt=Y+st,cr=$?X-ot:X+ot;de("x0",F.x0=W?jt:St(jt)),de("y0",F.y0=$?cr:kt(cr))}else if(Ar==="resize-over-end-point"){var or=Q+st,nr=$?V-ot:V+ot;de("x1",F.x1=W?or:St(or)),de("y1",F.y1=$?nr:kt(nr))}}else{var Pr=function(Yt){return Ar.indexOf(Yt)!==-1},_a=Pr("n"),Fa=Pr("s"),Ra=Pr("w"),qa=Pr("e"),Wa=_a?j+ot:j,Ca=Fa?ee+ot:ee,hi=Ra?te+st:te,wi=qa?pe+st:pe;$&&(_a&&(Wa=j-ot),Fa&&(Ca=ee-ot)),(!$&&Ca-Wa>B||$&&Wa-Ca>B)&&(de(we,F[we]=$?Wa:kt(Wa)),de(Se,F[Se]=$?Ca:kt(Ca))),wi-hi>U&&(de(Re,F[Re]=W?hi:St(hi)),de(Pe,F[Pe]=W?wi:St(wi)))}z.attr("d",T(P,F)),Le(O,F),r(P,N,F,at)}function Le(st,ot){(W||$)&&Ut();function Ut(){var Ct=ot.type!=="path",Pt=st.selectAll(".visual-cue").data([0]),jt=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":jt}).classed("visual-cue",!0);var cr=rt(W?ot.xanchor:S.midRange(Ct?[ot.x0,ot.x1]:c.extractPathCoords(ot.path,m.paramIsX))),or=Je($?ot.yanchor:S.midRange(Ct?[ot.y0,ot.y1]:c.extractPathCoords(ot.path,m.paramIsY)));if(cr=c.roundPositionForSharpStrokeRendering(cr,jt),or=c.roundPositionForSharpStrokeRendering(or,jt),W&&$){var nr="M"+(cr-1-jt)+","+(or-1-jt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",nr)}else if(W){var Pr="M"+(cr-1-jt)+","+(or-9-jt)+"v18 h2 v-18 Z";Pt.attr("d",Pr)}else{var _a="M"+(cr-9-jt)+","+(or-1-jt)+"h18 v2 h-18 Z";Pt.attr("d",_a)}}}function We(st){st.selectAll(".visual-cue").remove()}function Ke(st,ot,Ut){var Ct=ot.xref,Pt=ot.yref,jt=M.getFromId(Ut,Ct),cr=M.getFromId(Ut,Pt),or="";Ct!=="paper"&&!jt.autorange&&(or+=Ct),Pt!=="paper"&&!cr.autorange&&(or+=Pt),i.setClipUrl(st,or?"clip"+Ut._fullLayout._uid+or:null,Ut)}}function u(P,z,F){return P.replace(m.segmentRE,function(N){var O=0,L=N.charAt(0),U=m.paramIsX[L],B=m.paramIsY[L],W=m.numParams[L],$=N.slice(1).replace(m.paramRE,function(ue){return O>=W||(U[O]?ue=z(ue):B[O]&&(ue=F(ue)),O++),ue});return L+$})}function g(P,z){if(w(P)){var F=z.node(),N=+F.getAttribute("data-index");if(N>=0){if(N===P._fullLayout._activeShapeIndex){y(P);return}P._fullLayout._activeShapeIndex=N,P._fullLayout._deactivateShape=y,l(P)}}}function y(P){if(w(P)){var z=P._fullLayout._activeShapeIndex;z>=0&&(o(P),delete P._fullLayout._activeShapeIndex,l(P))}}function D(P){if(w(P)){o(P);var z=P._fullLayout._activeShapeIndex,F=(P.layout||{}).shapes||[];if(z1?(ce=["toggleHover"],de=["resetViews"]):u?(ue=["zoomInGeo","zoomOutGeo"],ce=["hoverClosestGeo"],de=["resetGeo"]):d?(ce=["hoverClosest3d"],de=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(ue=["zoomInMapbox","zoomOutMapbox"],ce=["toggleHover"],de=["resetViewMapbox"]):z?(ue=["zoomInMap","zoomOutMap"],ce=["toggleHover"],de=["resetViewMap"]):g?ce=["hoverClosestPie"]:O?(ce=["hoverClosestCartesian","hoverCompareCartesian"],de=["resetViewSankey"]):ce=["toggleHover"],b&&ce.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||U)&&(ce=[]),b&&!L&&(ue=["zoomIn2d","zoomOut2d","autoScale2d"],de[0]!=="resetViews"&&(de=["resetScale2d"])),d?Y=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!L||D?Y=["zoom2d","pan2d"]:P||z||u?Y=["pan2d"]:F&&(Y=["zoom2d"]),n(T)&&Y.push("select2d","lasso2d");var X=[],Q=function(j){X.indexOf(j)===-1&&ce.indexOf(j)!==-1&&X.push(j)};if(Array.isArray(E)){for(var V=[],le=0;lew?T.slice(w):l.slice(x))+A}function h(m,c){for(var T=c._size,l=T.h/T.w,x={},w=Object.keys(m),A=0;At*D&&!N)){for(w=0;wY&&tece&&(ce=te);var we=(ce-ue)/(2*de);u/=we,ue=p.l2r(ue),ce=p.l2r(ce),p.range=p._input.range=B=O[1]||W[1]<=O[0])&&$[0]L[0])return!0}return!1}function A(O){var L=O._fullLayout,U=L._size,B=U.p,W=i.list(O,"",!0),$,ue,ce,de,Y,X;if(L._paperdiv.style({width:O._context.responsive&&L.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":L.width+"px",height:O._context.responsive&&L.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":L.height+"px"}).selectAll(".main-svg").call(r.setSize,L.width,L.height),O._context.setBackground(O,L.paper_bgcolor),Z.drawMainTitle(O),a.manage(O),!L._has("cartesian"))return _.previousPromises(O);function Q(Ae,Le,We){var Ke=Ae._lw/2;if(Ae._id.charAt(0)==="x"){if(Le){if(We==="top")return Le._offset-B-Ke}else return U.t+U.h*(1-(Ae.position||0))+Ke%1;return Le._offset+Le._length+B+Ke}if(Le){if(We==="right")return Le._offset+Le._length+B+Ke}else return U.l+U.w*(Ae.position||0)+Ke%1;return Le._offset-B-Ke}for($=0;$0){y(O,$,Y,de),ce.attr({x:ue,y:$,"text-anchor":B,dy:z(L.yanchor)}).call(M.positionText,ue,$);var X=(L.text.match(M.BR_TAG_ALL)||[]).length;if(X){var Q=n.LINE_SPACING*X+n.MID_SHIFT;L.y===0&&(Q=-Q),ce.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-Q+"em";this.setAttribute("dy",ee)})}var V=q.select(O).selectAll(".gtitle-subtitle");if(V.node()){var le=ce.node().getBBox(),ae=le.y+le.height,j=ae+o.SUBTITLE_PADDING_EM*L.subtitle.font.size;V.attr({x:ue,y:j,"text-anchor":B,dy:z(L.yanchor)}).call(M.positionText,ue,j)}}}};function d(O,L,U,B,W){var $=L.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,ue=S.isTopAnchor(L)?B:B-W,ce=U==="b"?$-ue:ue;return S.isTopAnchor(L)&&U==="t"||S.isBottomAnchor(L)&&U==="b"?!1:ce.5?"t":"b",ue=O._fullLayout.margin[$],ce=0;return L.yref==="paper"?ce=U+L.pad.t+L.pad.b:L.yref==="container"&&(ce=u($,B,W,O._fullLayout.height,U)+L.pad.t+L.pad.b),ce>ue?ce:0}function y(O,L,U,B){var W="title.automargin",$=O._fullLayout.title,ue=$.y>.5?"t":"b",ce={x:$.x,y:$.y,t:0,b:0},de={};$.yref==="paper"&&d(O,$,ue,L,B)?ce[ue]=U:$.yref==="container"&&(de[ue]=U,O._fullLayout._reservedMargin[W]=de),_.allowAutoMargin(O,W),_.autoMargin(O,W,ce)}function D(O,L){var U=O.title,B=O._size,W=0;switch(L===c?W=U.pad.l:L===l&&(W=-U.pad.r),U.xref){case"paper":return B.l+B.w*U.x+W;case"container":default:return O.width*U.x+W}}function P(O,L){var U=O.title,B=O._size,W=0;if(L==="0em"||!L?W=-U.pad.b:L===n.CAP_SHIFT+"em"&&(W=U.pad.t),U.y==="auto")return B.t/2;switch(U.yref){case"paper":return B.t+B.h-B.h*U.y+W;case"container":default:return O.height-O.height*U.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 L=O.title,U=T;return S.isRightAnchor(L)?U=l:S.isLeftAnchor(L)&&(U=c),U}function N(O){var L=O.title,U="0em";return S.isTopAnchor(L)?U=n.CAP_SHIFT+"em":S.isMiddleAnchor(L)&&(U=n.MID_SHIFT+"em"),U}Z.doTraceStyle=function(O){var L=O.calcdata,U=[],B;for(B=0;B=0;F--){var N=E.append("path").attr(b).style("opacity",F?.1:d).call(M.stroke,g).call(M.fill,u).call(e.dashLine,F?"solid":D,F?4+y:y);if(s(N,c,x),P){var O=t(c.layout,"selections",x);N.style({cursor:"move"});var L={element:N.node(),plotinfo:w,gd:c,editHelpers:O,isActiveSelection:!0},U=v(p,c);_(U,N,L)}else N.style("pointer-events",F?"all":"none");z[F]=N}var B=z[0],W=z[1];W.node().addEventListener("click",function(){return h(c,B)})}}function s(c,T,l){var x=l.xref+l.yref;e.setClipUrl(c,"clip"+T._fullLayout._uid+x,T)}function h(c,T){if(i(c)){var l=T.node(),x=+l.getAttribute("data-index");if(x>=0){if(x===c._fullLayout._activeSelectionIndex){m(c);return}c._fullLayout._activeSelectionIndex=x,c._fullLayout._deactivateSelection=m,a(c)}}}function f(c){if(i(c)){var T=c._fullLayout.selections.length-1;c._fullLayout._activeSelectionIndex=T,c._fullLayout._deactivateSelection=m,a(c)}}function m(c){if(i(c)){var T=c._fullLayout._activeSelectionIndex;T>=0&&(S(c),delete c._fullLayout._activeSelectionIndex,a(c))}}}}),Sz=He({"node_modules/polybooljs/lib/build-log.js"(Z,q){function v(){var _,S=0,M=!1;function e(t,r){return _.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),_}return _={list:[],segmentId:function(){return S++},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?_:(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")}},_}q.exports=v}}),Mz=He({"node_modules/polybooljs/lib/epsilon.js"(Z,q){function v(_){typeof _!="number"&&(_=1e-10);var S={epsilon:function(M){return typeof M=="number"&&(_=M),_},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)>=-_},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<_)return!1;var s=o*o+i*i;return!(n-s>-_)},pointsSameX:function(M,e){return Math.abs(M[0]-e[0])<_},pointsSameY:function(M,e){return Math.abs(M[1]-e[1])<_},pointsSame:function(M,e){return S.pointsSameX(M,e)&&S.pointsSameY(M,e)},pointsCompare:function(M,e){return S.pointsSameX(M,e)?S.pointsSameY(M,e)?0:M[1]_!=a-r>_&&(o-s)*(r-h)/(a-h)+s-t>_&&(i=!i),o=s,a=h}return i}};return S}q.exports=v}}),Ez=He({"node_modules/polybooljs/lib/linked-list.js"(Z,q){var v={create:function(){var _={root:{root:!0,next:null},exists:function(S){return!(S===null||S===_.root)},isEmpty:function(){return _.root.next===null},getHead:function(){return _.root.next},insertBefore:function(S,M){for(var e=_.root,t=_.root.next;t!==null;){if(M(t)){S.prev=t.prev,S.next=t,t.prev.next=S,t.prev=S;return}e=t,t=t.next}e.next=S,S.prev=e,S.next=null},findTransition:function(S){for(var M=_.root,e=_.root.next;e!==null&&!S(e);)M=e,e=e.next;return{before:M===_.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 _},node:function(_){return _.prev=null,_.next=null,_.remove=function(){_.prev.next=_.next,_.next&&(_.next.prev=_.prev),_.prev=null,_.next=null},_}};q.exports=v}}),kz=He({"node_modules/polybooljs/lib/intersecter.js"(Z,q){var v=Ez();function _(S,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,x){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var o=v.create();function a(T,l,x,w,A,E){var p=M.pointsCompare(l,A);return p!==0?p:M.pointsSame(x,E)?0:T!==w?T?1:-1:M.pointAboveOrOnLine(x,w?A:E,w?E:A)?1:-1}function i(T,l){o.insertBefore(T,function(x){var w=a(T.isStart,T.pt,l,x.isStart,x.pt,x.other.pt);return w<0})}function n(T,l){var x=v.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return i(x,T.end),x}function s(T,l,x){var w=v.node({isStart:!1,pt:l.end,seg:l,primary:x,other:T,status:null});T.other=w,i(w,T.pt)}function h(T,l){var x=n(T,l);return s(x,T,l),x}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 m(T,l){var x=r(l,T.seg.end,T.seg);return f(T,l),h(x,T.primary)}function c(T,l){var x=v.create();function w(O,L){var U=O.seg.start,B=O.seg.end,W=L.seg.start,$=L.seg.end;return M.pointsCollinear(U,W,$)?M.pointsCollinear(B,W,$)||M.pointAboveOrOnLine(B,W,$)?1:-1:M.pointAboveOrOnLine(U,W,$)?1:-1}function A(O){return x.findTransition(function(L){var U=w(O,L.ev);return U>0})}function E(O,L){var U=O.seg,B=L.seg,W=U.start,$=U.end,ue=B.start,ce=B.end;e&&e.checkIntersection(U,B);var de=M.linesIntersect(W,$,ue,ce);if(de===!1){if(!M.pointsCollinear(W,$,ue)||M.pointsSame(W,ce)||M.pointsSame($,ue))return!1;var Y=M.pointsSame(W,ue),X=M.pointsSame($,ce);if(Y&&X)return L;var Q=!Y&&M.pointBetween(W,ue,ce),V=!X&&M.pointBetween($,ue,ce);if(Y)return V?m(L,$):m(O,ce),L;Q&&(X||(V?m(L,$):m(O,ce)),m(L,W))}else de.alongA===0&&(de.alongB===-1?m(O,ue):de.alongB===0?m(O,de.pt):de.alongB===1&&m(O,ce)),de.alongB===0&&(de.alongA===-1?m(L,W):de.alongA===0?m(L,de.pt):de.alongA===1&&m(L,$));return!1}for(var p=[];!o.isEmpty();){var b=o.getHead();if(e&&e.vert(b.pt[0]),b.isStart){let O=function(){if(g){var L=E(b,g);if(L)return L}return y?E(b,y):!1};var d=O;e&&e.segmentNew(b.seg,b.primary);var u=A(b),g=u.before?u.before.ev:null,y=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,g?g.seg:!1,y?y.seg:!1);var D=O();if(D){if(S){var P;b.seg.myFill.below===null?P=!0:P=b.seg.myFill.above!==b.seg.myFill.below,P&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=b.seg.myFill;e&&e.segmentUpdate(D.seg),b.other.remove(),b.remove()}if(o.getHead()!==b){e&&e.rewind(b.seg);continue}if(S){var P;b.seg.myFill.below===null?P=!0:P=b.seg.myFill.above!==b.seg.myFill.below,y?b.seg.myFill.below=y.seg.myFill.above:b.seg.myFill.below=T,P?b.seg.myFill.above=!b.seg.myFill.below:b.seg.myFill.above=b.seg.myFill.below}else if(b.seg.otherFill===null){var z;y?b.primary===y.primary?z=y.seg.otherFill.above:z=y.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,g?g.seg:!1,y?y.seg:!1),b.other.status=u.insert(v.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(x.exists(F.prev)&&x.exists(F.next)&&E(F.prev.ev,F.next.ev),e&&e.statusRemove(F.ev.seg),F.remove(),!b.primary){var N=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=N}p.push(b.seg)}o.getHead().remove()}return e&&e.done(),p}return S?{addRegion:function(T){for(var l,x=T[T.length-1],w=0;wr!=m>r&&t<(f-s)*(r-h)/(m-h)+s;c&&(o=!o)}return o}}}),I_=He({"src/lib/polygon.js"(Z,q){"use strict";var v=d2().dot,_=Gs().BADNUM,S=q.exports={};S.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;no||A===_||Ai||x&&h(l))}function m(l,x){var w=l[0],A=l[1];if(w===_||wo||A===_||Ai)return!1;var E=t.length,p=t[0][0],b=t[0][1],d=0,u,g,y,D,P;for(u=1;uMath.max(g,p)||A>Math.max(y,b)))if(An||Math.abs(v(m,h))>o)return!0;return!1},S.filter=function(e,t){var r=[e[0]],o=0,a=0;function i(s){e.push(s);var h=r.length,f=o;r.splice(a+1);for(var m=f+1;m1){var n=e.pop();i(n)}return{addPt:i,raw:e,filtered:r}}}}),Dz=He({"src/components/selections/constants.js"(Z,q){"use strict";q.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),zz=He({"src/components/selections/select.js"(Z,q){"use strict";var v=Iz(),_=Rz(),S=so(),M=as().dashStyle,e=$n(),t=Hc(),r=$p().makeEventData,o=Jd(),a=o.freeMode,i=o.rectMode,n=o.drawMode,s=o.openMode,h=o.selectMode,f=i0(),m=L_(),c=M2(),T=Qm().clearOutline,l=a0(),x=l.handleEllipse,w=l.readPaths,A=S2().newShapes,E=b5(),p=k5().activateLastSelection,b=sa(),d=b.sorterAsc,u=I_(),g=y2(),y=tf().getFromId,D=C_(),P=P_().redrawReglTraces,z=Dz(),F=z.MINSELECT,N=u.filter,O=u.tester,L=A2(),U=L.p2r,B=L.axValue,W=L.getTransform;function $(Fe){return Fe.subplot!==void 0}function ue(Fe,Ye,Ae,Le,We){var Ke=!$(Le),st=a(We),ot=i(We),Ut=s(We),Ct=n(We),Pt=h(We),jt=We==="drawline",cr=We==="drawcircle",or=jt||cr,nr=Le.gd,Pr=nr._fullLayout,_a=Pt&&Pr.newselection.mode==="immediate"&&Ke,Fa=Pr._zoomlayer,Ra=Le.element.getBoundingClientRect(),qa=Le.plotinfo,Wa=W(qa),Ca=Ye-Ra.left,hi=Ae-Ra.top;Pr._calcInverseTransform(nr);var wi=b.apply3DTransform(Pr._invTransform)(Ca,hi);Ca=wi[0],hi=wi[1];var Yt=Pr._invScaleX,Rt=Pr._invScaleY,Zt=Ca,Jt=hi,Fr="M"+Ca+","+hi,ta=Le.xaxes[0],ra=Le.yaxes[0],ca=ta._length,Ba=ra._length,$a=Fe.altKey&&!(n(We)&&Ut),Za,ri,pi,Ia,rn,tn,cn;V(Fe,nr,Le),st&&(Za=N([[Ca,hi]],z.BENDPX));var xt=Fa.selectAll("path.select-outline-"+qa.id).data([1]),ut=Ct?Pr.newshape:Pr.newselection;Ct&&(Le.hasText=ut.label.text||ut.label.texttemplate);var Or=Ct&&!Ut?ut.fillcolor:"rgba(0,0,0,0)",Cr=ut.line.color||(Ke?e.contrast(nr._fullLayout.plot_bgcolor):"#7f7f7f");xt.enter().append("path").attr("class","select-outline select-outline-"+qa.id).style({opacity:Ct?ut.opacity/2:1,"stroke-dasharray":M(ut.line.dash,ut.line.width),"stroke-width":ut.line.width+"px","shape-rendering":"crispEdges"}).call(e.stroke,Cr).call(e.fill,Or).attr("fill-rule","evenodd").classed("cursor-move",!!Ct).attr("transform",Wa).attr("d",Fr+"Z");var wr=Fa.append("path").attr("class","zoombox-corners").style({fill:e.background,stroke:e.defaultLine,"stroke-width":1}).attr("transform",Wa).attr("d","M0,0Z");if(Ct&&Le.hasText){var Rr=Fa.select(".label-temp");Rr.empty()&&(Rr=Fa.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Nr=Pr._uid+z.SELECTID,Hr=[],gt=te(nr,Le.xaxes,Le.yaxes,Le.subplot);_a&&!Fe.shiftKey&&(Le._clearSubplotSelections=function(){if(Ke){var mr=ta._id,Ir=ra._id;rt(nr,mr,Ir,gt);for(var va=(nr.layout||{}).selections||[],Pa=[],ga=!1,la=0;la=0){nr._fullLayout._deactivateShape(nr);return}if(!Ct){var va=Pr.clickmode;g.done(Nr).then(function(){if(g.clear(Nr),mr===2){for(xt.remove(),rn=0;rn-1&&ce(Ir,nr,Le.xaxes,Le.yaxes,Le.subplot,Le,xt),va==="event"&&Ur(nr,void 0);t.click(nr,Ir,qa.id)}).catch(b.error)}},Le.doneFn=function(){wr.remove(),g.done(Nr).then(function(){g.clear(Nr),!_a&&Ia&&Le.selectionDefs&&(Ia.subtract=$a,Le.selectionDefs.push(Ia),Le.mergedPolygons.length=0,[].push.apply(Le.mergedPolygons,pi)),(_a||Ct)&&j(Le,_a),Le.doneFnCompleted&&Le.doneFnCompleted(Hr),Pt&&Ur(nr,cn)}).catch(b.error)}}function ce(Fe,Ye,Ae,Le,We,Ke,st){var ot=Ye._hoverdata,Ut=Ye._fullLayout,Ct=Ut.clickmode,Pt=Ct.indexOf("event")>-1,jt=[],cr,or,nr,Pr,_a,Fa,Ra,qa,Wa,Ca;if(we(ot)){V(Fe,Ye,Ke),cr=te(Ye,Ae,Le,We);var hi=Se(ot,cr),wi=hi.pointNumbers.length>0;if(wi?Pe(cr,hi):je(cr)&&(Ra=Re(hi))){for(st&&st.remove(),Ca=0;Ca=0}function ae(Fe){return Fe._fullLayout._activeSelectionIndex>=0}function j(Fe,Ye){var Ae=Fe.dragmode,Le=Fe.plotinfo,We=Fe.gd;le(We)&&We._fullLayout._deactivateShape(We),ae(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,st=Ke._zoomlayer,ot=n(Ae),Ut=h(Ae);if(ot||Ut){var Ct=st.selectAll(".select-outline-"+Le.id);if(Ct&&We._fullLayout._outlining){var Pt;ot&&(Pt=A(Ct,Fe)),Pt&&S.call("_guiRelayout",We,{shapes:Pt});var jt;Ut&&!$(Fe)&&(jt=E(Ct,Fe)),jt&&(We._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",We,{selections:jt}).then(function(){Ye&&p(We)})),We._fullLayout._outlining=!1}}Le.selection={},Le.selection.selectionDefs=Fe.selectionDefs=[],Le.selection.mergedPolygons=Fe.mergedPolygons=[]}function ee(Fe){return Fe._id}function te(Fe,Ye,Ae,Le){if(!Fe.calcdata)return[];var We=[],Ke=Ye.map(ee),st=Ae.map(ee),ot,Ut,Ct;for(Ct=0;Ct0,Ke=We?Le[0]:Ae;return Ye.selectedpoints?Ye.selectedpoints.indexOf(Ke)>-1:!1}function Pe(Fe,Ye){var Ae=[],Le,We,Ke,st;for(st=0;st0&&Ae.push(Le);if(Ae.length===1&&(Ke=Ae[0]===Ye.searchInfo,Ke&&(We=Ye.searchInfo.cd[0].trace,We.selectedpoints.length===Ye.pointNumbers.length))){for(st=0;st1||(Ye+=Le.selectedpoints.length,Ye>1)))return!1;return Ye===1}function at(Fe,Ye,Ae){var Le;for(Le=0;Le-1&&Ye;if(!st&&Ye){var mr=St(Fe,!0);if(mr.length){var Ir=mr[0].xref,va=mr[0].yref;if(Ir&&va){var Pa=Vt(mr),ga=vr([y(Fe,Ir,"x"),y(Fe,va,"y")]);ga(Hr,Pa)}}Fe._fullLayout._noEmitSelectedAtStart?Fe._fullLayout._noEmitSelectedAtStart=!1:Kt&&Ur(Fe,Hr),cr._reselect=!1}if(!st&&cr._deselect){var la=cr._deselect;ot=la.xref,Ut=la.yref,Ze(ot,Ut,Pt)||rt(Fe,ot,Ut,Le),Kt&&(Hr.points.length?Ur(Fe,Hr):_t(Fe)),cr._deselect=!1}return{eventData:Hr,selectionTesters:Ae}}function Ce(Fe){var Ye=Fe.calcdata;if(Ye)for(var Ae=0;Ae=0){Or._fullLayout._deactivateShape(Or);return}var Cr=Or._fullLayout.clickmode;if(X(Or),xt===2&&!he&&ri(),Ve)Cr.indexOf("select")>-1&&d(ut,Or,rt,Je,we.id,Pt),Cr.indexOf("event")>-1&&n.click(Or,ut,we.id);else if(xt===1&&he){var wr=at?ne:se,Rr=at==="s"||nt==="w"?0:1,Nr=wr._name+".range["+Rr+"]",Hr=L(wr,Rr),gt="left",Kt="middle";if(wr.fixedrange)return;at?(Kt=at==="n"?"top":"bottom",wr.side==="right"&&(gt="right")):nt==="e"&&(gt="right"),Or._context.showAxisRangeEntryBoxes&&v.select(Ct).call(o.makeEditable,{gd:Or,immediate:!0,background:Or._fullLayout.paper_bgcolor,text:String(Hr),fill:wr.tickfont?wr.tickfont.color:"#444",horizontalAlign:gt,verticalAlign:Kt}).on("edit",function(mr){var Ir=wr.d2r(mr);Ir!==void 0&&t.call("_guiRelayout",Or,Nr,Ir)})}}f.init(Pt);var or,nr,Pr,_a,Fa,Ra,qa,Wa,Ca,hi;function wi(xt,ut,Or){var Cr=Ct.getBoundingClientRect();or=ut-Cr.left,nr=Or-Cr.top,pe._fullLayout._calcInverseTransform(pe);var wr=_.apply3DTransform(pe._fullLayout._invTransform)(or,nr);or=wr[0],nr=wr[1],Pr={l:or,r:or,w:0,t:nr,b:nr,h:0},_a=pe._hmpixcount?pe._hmlumcount/pe._hmpixcount:M(pe._fullLayout.plot_bgcolor).getLuminance(),Fa="M0,0H"+Bt+"V"+Vt+"H0V0",Ra=!1,qa="xy",hi=!1,Wa=ue(tt,_a,St,kt,Fa),Ca=ce(tt,St,kt)}function Yt(xt,ut){if(pe._transitioningWithDuration)return!1;var Or=Math.max(0,Math.min(Bt,Ke*xt+or)),Cr=Math.max(0,Math.min(Vt,st*ut+nr)),wr=Math.abs(Or-or),Rr=Math.abs(Cr-nr);Pr.l=Math.min(or,Or),Pr.r=Math.max(or,Or),Pr.t=Math.min(nr,Cr),Pr.b=Math.max(nr,Cr);function Nr(){qa="",Pr.r=Pr.l,Pr.t=Pr.b,Ca.attr("d","M0,0Z")}if(Ar.isSubplotConstrained)wr>D||Rr>D?(qa="xy",wr/Bt>Rr/Vt?(Rr=wr*Vt/Bt,nr>Cr?Pr.t=nr-Rr:Pr.b=nr+Rr):(wr=Rr*Bt/Vt,or>Or?Pr.l=or-wr:Pr.r=or+wr),Ca.attr("d",ae(Pr))):Nr();else if(vr.isSubplotConstrained)if(wr>D||Rr>D){qa="xy";var Hr=Math.min(Pr.l/Bt,(Vt-Pr.b)/Vt),gt=Math.max(Pr.r/Bt,(Vt-Pr.t)/Vt);Pr.l=Hr*Bt,Pr.r=gt*Bt,Pr.b=(1-Hr)*Vt,Pr.t=(1-gt)*Vt,Ca.attr("d",ae(Pr))}else Nr();else!kr||Rr0){var mr;if(vr.isSubplotConstrained||!qr&&kr.length===1){for(mr=0;mr1&&(Nr.maxallowed!==void 0&&_t===(Nr.range[0]1&&(Hr.maxallowed!==void 0&&Fe===(Hr.range[0]=0?Math.min(pe,.9):1/(1/Math.max(pe,-.3)+3.222))}function $(pe,we,Se){return pe?pe==="nsew"?Se?"":we==="pan"?"move":"crosshair":pe.toLowerCase()+"-resize":"pointer"}function ue(pe,we,Se,Re,Pe){return pe.append("path").attr("class","zoombox").style({fill:we>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Se,Re)).attr("d",Pe+"Z")}function ce(pe,we,Se){return pe.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(we,Se)).attr("d","M0,0Z")}function de(pe,we,Se,Re,Pe,je){pe.attr("d",Re+"M"+Se.l+","+Se.t+"v"+Se.h+"h"+Se.w+"v-"+Se.h+"h-"+Se.w+"Z"),Y(pe,we,Pe,je)}function Y(pe,we,Se,Re){Se||(pe.transition().style("fill",Re>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),we.transition().style("opacity",1).duration(200))}function X(pe){v.select(pe).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Q(pe){P&&pe.data&&pe._context.showTips&&(_.notifier(_._(pe,"Double-click to zoom back out"),"long",pe),P=!1)}function V(pe,we){return"M"+(pe.l-.5)+","+(we-D-.5)+"h-3v"+(2*D+1)+"h3ZM"+(pe.r+.5)+","+(we-D-.5)+"h3v"+(2*D+1)+"h-3Z"}function le(pe,we){return"M"+(we-D-.5)+","+(pe.t-.5)+"v-3h"+(2*D+1)+"v3ZM"+(we-D-.5)+","+(pe.b+.5)+"v3h"+(2*D+1)+"v-3Z"}function ae(pe){var we=Math.floor(Math.min(pe.b-pe.t,pe.r-pe.l,D)/2);return"M"+(pe.l-3.5)+","+(pe.t-.5+we)+"h3v"+-we+"h"+we+"v-3h-"+(we+3)+"ZM"+(pe.r+3.5)+","+(pe.t-.5+we)+"h-3v"+-we+"h"+-we+"v-3h"+(we+3)+"ZM"+(pe.r+3.5)+","+(pe.b+.5-we)+"h-3v"+we+"h"+-we+"v3h"+(we+3)+"ZM"+(pe.l-3.5)+","+(pe.b+.5-we)+"h3v"+we+"h"+we+"v3h-"+(we+3)+"Z"}function j(pe,we,Se,Re,Pe){for(var je=!1,at={},nt={},tt,Ve,he,se,ne=(Pe||{}).xaHash,Ce=(Pe||{}).yaHash,Ze=0;Ze1&&_.warn("Full array edits are incompatible with other edits",h);var w=i[""][""];if(t(w))a.set(null);else if(Array.isArray(w))a.set(w);else return _.warn("Unrecognized full array edit value",h,w),!0;return T?!1:(f(l,x),m(o),!0)}var A=Object.keys(i).map(Number).sort(S),E=a.get(),p=E||[],b=s(x,h).get(),d=[],u=-1,g=p.length,y,D,P,z,F,N,O,L;for(y=0;yp.length-(O?0:1)){_.warn("index out of range",h,P);continue}if(N!==void 0)F.length>1&&_.warn("Insertion & removal are incompatible with edits to the same index.",h,P),t(N)?d.push(P):O?(N==="add"&&(N={}),p.splice(P,0,N),b&&b.splice(P,0,{})):_.warn("Unrecognized full object edit value",h,P,N),u===-1&&(u=P);else for(D=0;D=0;y--)p.splice(d[y],1),b&&b.splice(d[y],1);if(p.length?E||a.set(p):a.set(null),T)return!1;if(f(l,x),c!==v){var U;if(u===-1)U=A;else{for(g=Math.max(p.length,g),U=[],y=0;y=u));y++)U.push(P);for(y=u;y0&&_.log("Clearing previous rejected promises from queue."),l._promises=[]},Z.cleanLayout=function(l){var x,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 A=(S.subplotsRegistry.cartesian||{}).attrRegex,E=(S.subplotsRegistry.polar||{}).attrRegex,p=(S.subplotsRegistry.ternary||{}).attrRegex,b=(S.subplotsRegistry.gl3d||{}).attrRegex,d=Object.keys(l);for(x=0;x3?(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"),e.clean(l),l.template&&l.template.layout&&Z.cleanLayout(l.template.layout),l};function i(l,x,w=!1){var A=l[x],E=x.charAt(0);w&&Array.isArray(A)||A&&A!=="paper"&&(l[x]=t(A,E,!0))}Z.cleanData=function(l){for(var x=0;x0)return l.slice(0,x)}Z.hasParent=function(l,x){for(var w=c(x);w;){if(w in l)return!0;w=c(w)}return!1},Z.clearAxisTypes=function(l,x,w){for(var A=0;A{let w=(...A)=>A.every(E=>_.isPlainObject(E))||A.every(E=>Array.isArray(E));if([l,x].every(A=>Array.isArray(A))){if(l.length!==x.length)return!1;for(let A=0;A_.isPlainObject(A))){if(Object.keys(l).length!==Object.keys(x).length)return!1;for(let A in l){if(A.startsWith("_"))continue;let E=l[A],p=x[A];if(E!==p&&!(w(E,p)?T(E,p):!1))return!1}return!0}return!1};Z.collectionsAreEqual=T}}),k2=He({"src/plot_api/plot_api.js"(Z){"use strict";var q=Vn(),v=ns(),_=i5(),S=sa(),M=S.nestedProperty,e=Qy(),t=iz(),r=so(),o=e1(),a=bc(),i=Wo(),n=h5(),s=Xh(),h=as(),f=$n(),m=I5().initInteractions,c=vd(),T=Af().clearOutline,l=X0().dfltConfig,x=Nz(),w=Uz(),A=P_(),E=pc(),p=lh().AX_NAME_PATTERN,b=0,d=5;function u(Ae,Le,We,Ke){var st;if(Ae=S.getGraphDiv(Ae),e.init(Ae),S.isPlainObject(Le)){var ot=Le;Le=ot.data,We=ot.layout,Ke=ot.config,st=ot.frames}var Ut=e.triggerHandler(Ae,"plotly_beforeplot",[Le,We,Ke]);if(Ut===!1)return Promise.reject();!Le&&!We&&!S.isPlotDiv(Ae)&&S.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ae);function Ct(){if(st)return Z.addFrames(Ae,st)}z(Ae,Ke),We||(We={}),q.select(Ae).classed("js-plotly-plot",!0),h.makeTester(),Array.isArray(Ae._promises)||(Ae._promises=[]);var Pt=(Ae.data||[]).length===0&&Array.isArray(Le);Array.isArray(Le)&&(w.cleanData(Le),Pt?Ae.data=Le:Ae.data.push.apply(Ae.data,Le),Ae.empty=!1),(!Ae.layout||Pt)&&(Ae.layout=w.cleanLayout(We)),a.supplyDefaults(Ae);var jt=Ae._fullLayout,cr=jt._has("cartesian");jt._replotting=!0,(Pt||jt._shouldCreateBgLayer)&&(Ye(Ae),jt._shouldCreateBgLayer&&delete jt._shouldCreateBgLayer),h.initGradients(Ae),h.initPatterns(Ae),Pt&&i.saveShowSpikeInitial(Ae);var or=!Ae.calcdata||Ae.calcdata.length!==(Ae._fullData||[]).length;or&&a.doCalcdata(Ae);for(var nr=0;nr=Ae.data.length||st<-Ae.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Le.indexOf(st,Ke+1)>-1||st>=0&&Le.indexOf(-Ae.data.length+st)>-1||st<0&&Le.indexOf(Ae.data.length+st)>-1)throw new Error("each index in "+We+" must be unique.")}}function U(Ae,Le,We){if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array.");if(typeof Le>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Le)||(Le=[Le]),L(Ae,Le,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&L(Ae,We,"newIndices"),typeof We<"u"&&Le.length!==We.length)throw new Error("current and new indices must be of equal length.")}function B(Ae,Le,We){var Ke,st;if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array.");if(typeof Le>"u")throw new Error("traces must be defined.");for(Array.isArray(Le)||(Le=[Le]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");L(Ae,We,"indices");for(var ot in Le){if(!Array.isArray(Le[ot])||Le[ot].length!==We.length)throw new Error("attribute "+ot+" must be an array of length equal to indices array length");if(st&&(!(ot in Ke)||!Array.isArray(Ke[ot])||Ke[ot].length!==Le[ot].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 $(Ae,Le,We,Ke){var st=S.isPlainObject(Ke),ot=[],Ut,Ct,Pt,jt,cr;Array.isArray(We)||(We=[We]),We=O(We,Ae.data.length-1);for(var or in Le)for(var nr=0;nr=0&&cr=0&&cr"u")return jt=Z.redraw(Ae),t.add(Ae,st,Ut,ot,Ct),jt;Array.isArray(We)||(We=[We]);try{U(Ae,Ke,We)}catch(cr){throw Ae.data.splice(Ae.data.length-Le.length,Le.length),cr}return t.startSequence(Ae),t.add(Ae,st,Ut,ot,Ct),jt=Z.moveTraces(Ae,Ke,We),t.stopSequence(Ae),jt}function Q(Ae,Le){Ae=S.getGraphDiv(Ae);var We=[],Ke=Z.addTraces,st=Q,ot=[Ae,We,Le],Ut=[Ae,Le],Ct,Pt;if(typeof Le>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Le)||(Le=[Le]),L(Ae,Le,"indices"),Le=O(Le,Ae.data.length-1),Le.sort(S.sorterDes),Ct=0;Ct"u")for(We=[],jt=0;jt0&&typeof Zt.parts[ta]!="string";)ta--;var ra=Zt.parts[ta],ca=Zt.parts[ta-1]+"."+ra,Ba=Zt.parts.slice(0,ta).join("."),$a=M(Ae.layout,Ba).get(),Za=M(Ke,Ba).get(),ri=Zt.get();if(Jt!==void 0){qa[Rt]=Jt,Wa[Rt]=ra==="reverse"?Jt:ae(ri);var pi=o.getLayoutValObject(Ke,Zt.parts);if(pi&&pi.impliedEdits&&Jt!==null)for(var Ia in pi.impliedEdits)Ca(S.relativeAttr(Rt,Ia),pi.impliedEdits[Ia]);if(["width","height"].indexOf(Rt)!==-1)if(Jt){Ca("autosize",null);var rn=Rt==="height"?"width":"height";Ca(rn,Ke[rn])}else Ke[Rt]=Ae._initialAutoSize[Rt];else if(Rt==="autosize")Ca("width",Jt?null:Ke.width),Ca("height",Jt?null:Ke.height);else if(ca.match(Pe))Yt(ca),M(Ke,Ba+"._inputRange").set(null);else if(ca.match(je)){Yt(ca),M(Ke,Ba+"._inputRange").set(null);var tn=M(Ke,Ba).get();tn._inputDomain&&(tn._input.domain=tn._inputDomain.slice())}else ca.match(at)&&M(Ke,Ba+"._inputDomain").set(null);if(ra==="type"){wi=$a;var cn=Za.type==="linear"&&Jt==="log",xt=Za.type==="log"&&Jt==="linear";if(cn||xt){if(!wi||!wi.range)Ca(Ba+".autorange",!0);else if(Za.autorange)cn&&(wi.range=wi.range[1]>wi.range[0]?[1,2]:[2,1]);else{var ut=wi.range[0],Or=wi.range[1];cn?(ut<=0&&Or<=0&&Ca(Ba+".autorange",!0),ut<=0?ut=Or/1e6:Or<=0&&(Or=ut/1e6),Ca(Ba+".range[0]",Math.log(ut)/Math.LN10),Ca(Ba+".range[1]",Math.log(Or)/Math.LN10)):(Ca(Ba+".range[0]",Math.pow(10,ut)),Ca(Ba+".range[1]",Math.pow(10,Or)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Zt.parts[0]]&&Zt.parts[1]==="radialaxis"&&delete Ke[Zt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ae,Za,Jt,Ca),r.getComponentMethod("images","convertCoords")(Ae,Za,Jt,Ca)}else Ca(Ba+".autorange",!0),Ca(Ba+".range",null);M(Ke,Ba+"._inputRange").set(null)}else if(ra.match(p)){var Cr=M(Ke,Rt).get(),wr=(Jt||{}).type;(!wr||wr==="-")&&(wr="linear"),r.getComponentMethod("annotations","convertCoords")(Ae,Cr,wr,Ca),r.getComponentMethod("images","convertCoords")(Ae,Cr,wr,Ca)}var Rr=x.containerArrayMatch(Rt);if(Rr){cr=Rr.array,or=Rr.index;var Nr=Rr.property,Hr=pi||{editType:"calc"};or!==""&&Nr===""&&(x.isAddVal(Jt)?Wa[Rt]=null:x.isRemoveVal(Jt)?Wa[Rt]=(M(We,cr).get()||[])[or]:S.warn("unrecognized full object value",Le)),E.update(Ra,Hr),jt[cr]||(jt[cr]={});var gt=jt[cr][or];gt||(gt=jt[cr][or]={}),gt[Nr]=Jt,delete Le[Rt]}else ra==="reverse"?($a.range?$a.range.reverse():(Ca(Ba+".autorange",!0),$a.range=[1,0]),Za.autorange?Ra.calc=!0:Ra.plot=!0):(Rt==="dragmode"&&(Jt===!1&&ri!==!1||Jt!==!1&&ri===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&Rt==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(ri==="lasso"||ri==="select")?Ra.plot=!0:pi?E.update(Ra,pi):Ra.calc=!0,Zt.set(Jt))}}for(cr in jt){var Kt=x.applyContainerArrayChanges(Ae,ot(We,cr),jt[cr],Ra,ot);Kt||(Ra.plot=!0)}for(var mr in hi){wi=i.getFromId(Ae,mr);var Ir=wi&&wi._constraintGroup;if(Ir){Ra.calc=!0;for(var va in Ir)hi[va]||(i.getFromId(Ae,va)._constraintShrinkable=!0)}}(tt(Ae)||Le.height||Le.width)&&(Ra.plot=!0);var Pa=Ke.shapes;for(or=0;or1;)if(Ke.pop(),We=M(Le,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Le.uirevision}function rt(Ae,Le){for(var We=0;We[Ba,Ae._ev.listeners(Ba)]);ot=Z.newPlot(Ae,Le,We,Ke).then(()=>{for(let[Ba,$a]of ca)$a.forEach(Za=>Ae.on(Ba,Za));return Z.react(Ae,Le,We,Ke)})}else{Ae.data=Le||[],w.cleanData(Ae.data),Ae.layout=We||{},w.cleanLayout(Ae.layout),kt(Ae.data,Ae.layout,Ct,Pt),a.supplyDefaults(Ae,{skipUpdateCalc:!0});var or=Ae._fullData,nr=Ae._fullLayout,Pr=nr.datarevision===void 0,_a=nr.transition,Fa=Ar(Ae,Pt,nr,Pr,_a),Ra=Fa.newDataRevision,qa=Vt(Ae,Ct,or,Pr,_a,Ra);if(tt(Ae)&&(Fa.layoutReplot=!0),qa.calc||Fa.calc){Ae.calcdata=void 0;for(var Wa=Object.getOwnPropertyNames(nr),Ca=0;Ca(cr||Ae.emit("plotly_react",{config:Ke,data:Le,layout:We}),Ae))}function Vt(Ae,Le,We,Ke,st,ot){var Ut=Le.length===We.length;if(!st&&!Ut)return{fullReplot:!0,calc:!0};var Ct=E.traceFlags();Ct.arrays={},Ct.nChanges=0,Ct.nChangesAnim=0;var Pt,jt;function cr(Pr){var _a=o.getTraceValObject(jt,Pr);return!jt._module.animatable&&_a.anim&&(_a.anim=!1),_a}var or={getValObject:cr,flags:Ct,immutable:Ke,transition:st,newDataRevision:ot,gd:Ae},nr={};for(Pt=0;Pt=st.length?st[0]:st[jt]:st}function Ct(jt){return Array.isArray(ot)?jt>=ot.length?ot[0]:ot[jt]:ot}function Pt(jt,cr){var or=0;return function(){if(jt&&++or===cr)return jt()}}return new Promise(function(jt,cr){function or(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ra=Ke._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Ae.emit("plotly_animationinterrupted",[])}}function nr(ra){if(ra.length!==0){for(var ca=0;caKe._timeToNext&&_a()};ra()}var Ra=0;function qa(ra){return Array.isArray(st)?Ra>=st.length?ra.transitionOpts=st[Ra]:ra.transitionOpts=st[0]:ra.transitionOpts=st,Ra++,ra}var Wa,Ca,hi=[],wi=Le==null,Yt=Array.isArray(Le),Rt=!wi&&!Yt&&S.isPlainObject(Le);if(Rt)hi.push({type:"object",data:qa(S.extendFlat({},Le))});else if(wi||["string","number"].indexOf(typeof Le)!==-1)for(Wa=0;Wa0&&FrFr)&&ta.push(Ca);hi=ta}}hi.length>0?nr(hi):(Ae.emit("plotly_animated"),jt())})}function kr(Ae,Le,We){if(Ae=S.getGraphDiv(Ae),Le==null)return Promise.resolve();if(!S.isPlotDiv(Ae))throw new Error("This element is not a Plotly plot: "+Ae+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ke,st,ot,Ut,Ct=Ae._transitionData._frames,Pt=Ae._transitionData._frameHash;if(!Array.isArray(Le))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Le);var jt=Ct.length+Le.length*2,cr=[],or={};for(Ke=Le.length-1;Ke>=0;Ke--)if(S.isPlainObject(Le[Ke])){var nr=Le[Ke].name,Pr=(Pt[nr]||or[nr]||{}).name,_a=Le[Ke].name,Fa=Pt[Pr]||or[Pr];Pr&&_a&&typeof _a=="number"&&Fa&&bZt.index?-1:Rt.index=0;Ke--){if(st=cr[Ke].frame,typeof st.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!st.name)for(;Pt[st.name="frame "+Ae._transitionData._counter++];);if(Pt[st.name]){for(ot=0;ot=0;We--)Ke=Le[We],ot.push({type:"delete",index:Ke}),Ut.unshift({type:"insert",index:Ke,value:st[Ke]});var Ct=a.modifyFrames,Pt=a.modifyFrames,jt=[Ae,Ut],cr=[Ae,ot];return t&&t.add(Ae,Ct,jt,Pt,cr),a.modifyFrames(Ae,ot)}function _t(Ae){Ae=S.getGraphDiv(Ae);var Le=Ae._fullLayout||{},We=Ae._fullData||[];return a.cleanPlot([],{},We,Le),a.purge(Ae),e.purge(Ae),Le._container&&Le._container.remove(),delete Ae._context,Ae}function Fe(Ae){var Le=Ae._fullLayout,We=Ae.getBoundingClientRect();if(!S.equalDomRects(We,Le._lastBBox)){var Ke=Le._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Ae));Le._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Le._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Le._lastBBox=We}}function Ye(Ae){var Le=q.select(Ae),We=Ae._fullLayout;if(We._calcInverseTransform=Fe,We._calcInverseTransform(Ae),We._container=Le.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};q.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=S.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(c.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var st=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=st.append("g").classed("imagelayer",!0),We._shapeLowerLayer=st.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var ot=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=ot.append("g").classed("imagelayer",!0),We._shapeUpperLayer=ot.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ae.emit("plotly_framework")}Z.animate=qr,Z.addFrames=kr,Z.deleteFrames=Ur,Z.addTraces=X,Z.deleteTraces=Q,Z.extendTraces=de,Z.moveTraces=V,Z.prependTraces=Y,Z.newPlot=N,Z._doPlot=u,Z.purge=_t,Z.react=Bt,Z.redraw=F,Z.relayout=we,Z.restyle=le,Z.setPlotConfig=y,Z.update=Ve,Z._guiRelayout=he(we),Z._guiRestyle=he(le),Z._guiUpdate=he(Ve),Z._storeDirectGUIEdit=te}}),Kv=He({"src/snapshot/helpers.js"(Z){"use strict";var q=so();Z.getDelay=function(S){return S._has&&(S._has("gl3d")||S._has("mapbox")||S._has("map"))?500:0},Z.getRedrawFunc=function(S){return function(){q.getComponentMethod("colorbar","draw")(S)}},Z.encodeSVG=function(S){return"data:image/svg+xml,"+encodeURIComponent(S)},Z.encodeJSON=function(S){return"data:application/json,"+encodeURIComponent(S)};var v=window.URL||window.webkitURL;Z.createObjectURL=function(S){return v.createObjectURL(S)},Z.revokeObjectURL=function(S){return v.revokeObjectURL(S)},Z.createBlob=function(S,M){if(M==="svg")return new window.Blob([S],{type:"image/svg+xml;charset=utf-8"});if(M==="full-json")return new window.Blob([S],{type:"application/json;charset=utf-8"});var e=_(window.atob(S));return new window.Blob([e],{type:"image/"+M})},Z.octetStream=function(S){document.location.href="data:application/octet-stream"+S};function _(S){for(var M=S.length,e=new ArrayBuffer(M),t=new Uint8Array(e),r=0;r{let l=T.toLowerCase();return a.includes(l)?T:i.includes(l)?"<":n.includes(l)?">":T.includes("<")||T.includes(">")?"":m.html(T).text()});return m.remove(),c}function h(f){return f.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}q.exports=function(m,c,T){var l=m._fullLayout,x=l._paper,w=l._toppaper,A=l.width,E=l.height,p;x.insert("rect",":first-child").call(S.setRect,0,0,A,E).call(M.fill,l.paper_bgcolor);var b=l._basePlotModules||[];for(p=0;p1&&E.push(s("object","layout"))),_.supplyDefaults(p);for(var u=p._fullData,g=b.length,y=0;yD.length&&A.push(s("unused",E,g.concat(D.length)));var L=D.length,U=Array.isArray(O);U&&(L=Math.min(L,O.length));var B,W,$,ue,ce;if(P.dimensions===2)for(W=0;WD[W].length&&A.push(s("unused",E,g.concat(W,D[W].length)));var de=D[W].length;for(B=0;B<(U?Math.min(de,O[W].length):de);B++)$=U?O[W][B]:O,ue=y[W][B],ce=D[W][B],v.validate(ue,$)?ce!==ue&&ce!==+ue&&A.push(s("dynamic",E,g.concat(W,B),ue,ce)):A.push(s("value",E,g.concat(W,B),ue))}else A.push(s("array",E,g.concat(W),y[W]));else for(W=0;WF?A.push({code:"unused",traceType:y,templateCount:z,dataCount:F}):F>z&&A.push({code:"reused",traceType:y,templateCount:z,dataCount:F})}}function N(O,L){for(var U in O)if(U.charAt(0)!=="_"){var B=O[U],W=s(O,U,L);v(B)?(Array.isArray(O)&&B._template===!1&&B.templateitemname&&A.push({code:"missing",path:W,templateitemname:B.templateitemname}),N(B,W)):Array.isArray(B)&&h(B)&&N(B,W)}}if(N({data:p,layout:E},""),A.length)return A.map(f)};function h(m){for(var c=0;c=0;f--){var m=e[f];if(m.type==="scatter"&&m.xaxis===s.xaxis&&m.yaxis===s.yaxis){m.opacity=void 0;break}}}}}}}),Xz=He({"src/traces/scatter/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=_2();q.exports=function(S,M){function e(r,o){return v.coerce(S,M,_,r,o)}var t=M.barmode==="group";M.scattermode==="group"&&e("scattergap",t?M.bargap:.2)}}}),tv=He({"src/plots/cartesian/align_period.js"(Z,q){"use strict";var v=ns(),_=sa(),S=_.dateTime2ms,M=_.incrementMonth,e=Gs(),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 h=o[i+"period"],f;if(v(h)){if(h=+h,h<=0)return{vals:n}}else if(typeof h=="string"&&h.charAt(0)==="M"){var m=+h.substring(1);if(m>0&&Math.round(m)===m)f=m;else return{vals:n}}for(var c=a.calendar,T=s==="start",l=s==="end",x=o[i+"period0"],w=S(x,c)||0,A=[],E=[],p=[],b=n.length,d=0;du;)D=M(D,-f,c);for(;D<=u;)D=M(D,f,c);y=M(D,-f,c)}else{for(g=Math.round((u-w)/h),D=w+g*h;D>u;)D-=h;for(;D<=u;)D+=h;y=D-h}A[d]=T?y:l?D:(y+D)/2,E[d]=y,p[d]=D}return{vals:A,starts:E,ends:p}}}}),Fd=He({"src/traces/scatter/colorscale_calc.js"(Z,q){"use strict";var v=wp().hasColorscale,_=Tp(),S=Fu();q.exports=function(e,t){S.hasLines(t)&&v(t,"line")&&_(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),S.hasMarkers(t)&&(v(t,"marker")&&_(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),v(t,"marker.line")&&_(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=He({"src/traces/scatter/arrays_to_calcdata.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){for(var e=0;eN&&y[L].gap;)L--;for(B=y[L].s,O=y.length-1;O>L;O--)y[O].s=B;for(;Nue+W||!v($))}for(var de=0;deL(B))):L(F.text);let U=F.outsidetextfont.size*a*O+o;return{ppadplus:N.some(B=>B.s<0)?U:0,ppadminus:N.some(B=>B.s>=0)?U:0}}return{ppadplus:void 0,ppadminus:void 0}}function D(F,N,O,L){for(var U=z(L),B=0;Bz[c]&&c0?e:t)/(c._m*x*(c._m>0?e:t)))),jt*=1e3}if(cr===S){if(l&&(cr=c.c2p(Pt.y,!0)),cr===S)return!1;cr*=1e3}return[jt,cr]}function ee(Ct,Pt,jt,cr){var or=jt-Ct,nr=cr-Pt,Pr=.5-Ct,_a=.5-Pt,Fa=or*or+nr*nr,Ra=or*Pr+nr*_a;if(Ra>0&&Ra1||Math.abs(Pr.y-jt[0][1])>1)&&(Pr=[Pr.x,Pr.y],cr&&Se(Pr,Ct)je||Ct[1]nt)return[a(Ct[0],Pe,je),a(Ct[1],at,nt)]}function St(Ct,Pt){if(Ct[0]===Pt[0]&&(Ct[0]===Pe||Ct[0]===je)||Ct[1]===Pt[1]&&(Ct[1]===at||Ct[1]===nt))return!0}function kt(Ct,Pt){var jt=[],cr=Je(Ct),or=Je(Pt);return cr&&or&&St(cr,or)||(cr&&jt.push(cr),or&&jt.push(or)),jt}function Bt(Ct,Pt,jt){return function(cr,or){var nr=Je(cr),Pr=Je(or),_a=[];if(nr&&Pr&&St(nr,Pr))return _a;nr&&_a.push(nr),Pr&&_a.push(Pr);var Fa=2*r.constrain((cr[Ct]+or[Ct])/2,Pt,jt)-((nr||cr)[Ct]+(Pr||or)[Ct]);if(Fa){var Ra;nr&&Pr?Ra=Fa>0==nr[Ct]>Pr[Ct]?nr:Pr:Ra=nr||Pr,Ra[Ct]+=Fa}return _a}}var Vt;d==="linear"||d==="spline"?Vt=rt:d==="hv"||d==="vh"?Vt=kt:d==="hvh"?Vt=Bt(0,Pe,je):d==="vhv"&&(Vt=Bt(1,at,nt));function Ar(Ct,Pt){var jt=Pt[0]-Ct[0],cr=(Pt[1]-Ct[1])/jt,or=(Ct[1]*Pt[0]-Pt[1]*Ct[0])/jt;return or>0?[cr>0?Pe:je,nt]:[cr>0?je:Pe,at]}function vr(Ct){var Pt=Ct[0],jt=Ct[1],cr=Pt===z[F-1][0],or=jt===z[F-1][1];if(!(cr&&or))if(F>1){var nr=Pt===z[F-2][0],Pr=jt===z[F-2][1];cr&&(Pt===Pe||Pt===je)&&nr?Pr?F--:z[F-1]=Ct:or&&(jt===at||jt===nt)&&Pr?nr?F--:z[F-1]=Ct:z[F++]=Ct}else z[F++]=Ct}function qr(Ct){z[F-1][0]!==Ct[0]&&z[F-1][1]!==Ct[1]&&vr([se,ne]),vr(Ct),Ce=null,se=ne=0}var kr=r.isArrayOrTypedArray(E);function Ur(Ct){if(Ct&&A&&(Ct.i=N,Ct.d=s,Ct.trace=f,Ct.marker=kr?E[Ct.i]:E,Ct.backoff=A),te=Ct[0]/x,pe=Ct[1]/w,Ve=Ct[0]je?je:0,he=Ct[1]nt?nt:0,Ve||he){if(!F)z[F++]=[Ve||Ct[0],he||Ct[1]];else if(Ce){var Pt=Vt(Ce,Ct);Pt.length>1&&(qr(Pt[0]),z[F++]=Pt[1])}else Ze=Vt(z[F-1],Ct)[0],z[F++]=Ze;var jt=z[F-1];Ve&&he&&(jt[0]!==Ve||jt[1]!==he)?(Ce&&(se!==Ve&&ne!==he?vr(se&&ne?Ar(Ce,Ct):[se||Ve,ne||he]):se&&ne&&vr([se,ne])),vr([Ve,he])):se-Ve&&ne-he&&vr([Ve||se,he||ne]),Ce=Ct,se=Ve,ne=he}else Ce&&qr(Vt(Ce,Ct)[0]),z[F++]=Ct}for(N=0;Nwe(W,_t))break;L=W,Q=ce[0]*ue[0]+ce[1]*ue[1],Q>Y?(Y=Q,U=W,$=!1):Q=s.length||!W)break;Ur(W),O=W}}Ce&&vr([se||Ce[0],ne||Ce[1]]),y.push(z.slice(0,F))}var Fe=d.slice(d.length-1);if(A&&Fe!=="h"&&Fe!=="v"){for(var Ye=!1,Ae=-1,Le=[],We=0;We=0?i=m:(i=m=f,f++),i0,d=a(m,c,T);if(A=l.selectAll("g.trace").data(d,function(g){return g[0].trace.uid}),A.enter().append("g").attr("class",function(g){return"trace scatter trace"+g[0].trace.uid}).style("stroke-miterlimit",2),A.order(),n(m,A,c),b){w&&(E=w());var u=v.transition().duration(x.duration).ease(x.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()});u.each(function(){l.selectAll("g.trace").each(function(g,y){s(m,y,c,g,d,this,x)})})}else A.each(function(g,y){s(m,y,c,g,d,this,x)});p&&A.exit().remove(),l.selectAll("path:not([d])").remove()};function n(f,m,c){m.each(function(T){var l=M(v.select(this),"g","fills");t.setClipUrl(l,c.layerClipId,f);var x=T[0].trace;x._ownFill=null,x._nextFill=null;var w=[];x._ownfill&&w.push("_ownFill"),x._nexttrace&&w.push("_nextFill");var A=l.selectAll("g").data(w,e);A.enter().append("g"),A.exit().remove(),A.order().each(function(E){x[E]=M(v.select(this),"path","js-fill")})})}function s(f,m,c,T,l,x,w){var A=f._context.staticPlot,E;h(f,m,c,T,l);var p=!!w&&w.duration>0;function b(vr){return p?vr.transition():vr}var d=c.xaxis,u=c.yaxis,g=T[0].trace,y=g.line,D=v.select(x),P=M(D,"g","errorbars"),z=M(D,"g","lines"),F=M(D,"g","points"),N=M(D,"g","text");if(_.getComponentMethod("errorbars","plot")(f,P,c,w),g.visible!==!0)return;b(D).style("opacity",g.opacity);var O,L,U=g.fill.charAt(g.fill.length-1);U!=="x"&&U!=="y"&&(U="");var B,W;U==="y"?(B=1,W=u.c2p(0,!0)):U==="x"&&(B=0,W=d.c2p(0,!0)),T[0][c.isRangePlot?"nodeRangePlot3":"node3"]=D;var $="",ue=[],ce=g._prevtrace,de=null,Y=null;ce&&($=ce._prevRevpath||"",L=ce._nextFill,ue=ce._ownPolygons,de=ce._fillsegments,Y=ce._fillElement);var X,Q,V="",le="",ae,j,ee,te,pe,we,Se=[];g._polygons=[];var Re=[],Pe=[],je=S.noop;if(O=g._ownFill,r.hasLines(g)||g.fill!=="none"){L&&L.datum(T),["hv","vh","hvh","vhv"].indexOf(y.shape)!==-1?(ae=t.steps(y.shape),j=t.steps(y.shape.split("").reverse().join(""))):y.shape==="spline"?ae=j=function(vr){var qr=vr[vr.length-1];return vr.length>1&&vr[0][0]===qr[0]&&vr[0][1]===qr[1]?t.smoothclosed(vr.slice(1),y.smoothing):t.smoothopen(vr,y.smoothing)}:ae=j=function(vr){return"M"+vr.join("L")},ee=function(vr){return j(vr.reverse())},Pe=o(T,{xaxis:d,yaxis:u,trace:g,connectGaps:g.connectgaps,baseTolerance:Math.max(y.width||1,3)/4,shape:y.shape,backoff:y.backoff,simplify:y.simplify,fill:g.fill}),Re=new Array(Pe.length);var at=0;for(E=0;E=A[0]&&D.x<=A[1]&&D.y>=E[0]&&D.y<=E[1]}),u=Math.ceil(d.length/b),g=0;l.forEach(function(D,P){var z=D[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&P=Math.min(ce,de)&&c<=Math.max(ce,de)?0:1/0}var Y=Math.max(3,ue.mrc||0),X=1-1/Y,Q=Math.abs(f.c2p(ue.x)-c);return Q=Math.min(ce,de)&&T<=Math.max(ce,de)?0:1/0}var Y=Math.max(3,ue.mrc||0),X=1-1/Y,Q=Math.abs(m.c2p(ue.y)-T);return Qle!=Re>=le&&(pe=ee[j-1][0],we=ee[j][0],Re-Se&&(te=pe+(we-pe)*(le-Se)/(Re-Se),Y=Math.min(Y,te),X=Math.max(X,te)));return Y=Math.max(Y,0),X=Math.min(X,f._length),{x0:Y,x1:X,y0:le,y1:le}}if(x.indexOf("fills")!==-1&&h._fillElement){var B=L(h._fillElement)&&!L(h._fillExclusionElement);if(B){var W=U(h._polygons);W===null&&(W={x0:l[0],x1:l[0],y0:l[1],y1:l[1]});var $=e.defaultLine;return e.opacity(h.fillcolor)?$=h.fillcolor:e.opacity((h.line||{}).color)&&($=h.line.color),v.extendFlat(o,{distance:o.maxHoverDistance,x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1,color:$,hovertemplate:!1}),delete o.index,h.text&&!v.isArrayOrTypedArray(h.text)?o.text=String(h.text):o.text=h.name,[o]}}}}}),c1=He({"src/traces/scatter/select.js"(Z,q){"use strict";var v=Fu();q.exports=function(S,M){var e=S.cd,t=S.xaxis,r=S.yaxis,o=[],a=e[0].trace,i,n,s,h,f=!v.hasMarkers(a)&&!v.hasText(a);if(f)return[];if(M===!1)for(i=0;i0&&(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=v(r,"box-violin"),n=v(r._fullInput||{},"candlestick");return i&&!n&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=He({"src/plots/cartesian/category_order_defaults.js"(Z,q){"use strict";var v=hp().isTypedArraySpec;function _(S,M){var e=M.dataAttr||S._id.charAt(0),t={},r,o,a;if(M.axData)r=M.axData;else for(r=[],o=0;o0||v(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=_(e,r).sort(),n==="category ascending"?e._initialCategories=s:n==="category descending"&&(e._initialCategories=s.reverse()))}}}}),z_=He({"src/plots/cartesian/line_grid_defaults.js"(Z,q){"use strict";var v=Ch().mix,_=sh(),S=sa();q.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function i(y,D){return S.coerce2(e,t,o.attributes,y,D)}var n=i("linecolor",a),s=i("linewidth"),h=r("showline",o.showLine||!!n||!!s);h||(delete t.linecolor,delete t.linewidth);var f=v(a,o.bgColor,o.blend||_.lightFraction).toRgbString(),m=i("gridcolor",f),c=i("gridwidth"),T=i("griddash"),l=r("showgrid",o.showGrid||!!m||!!c||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var x=v(t.gridcolor,o.bgColor,67).toRgbString(),w=i("minor.gridcolor",x),A=i("minor.gridwidth",t.gridwidth||1),E=i("minor.griddash",t.griddash||"solid"),p=r("minor.showgrid",!!w||!!A||!!E);p||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var b=i("zerolinelayer"),d=i("zerolinecolor",a),u=i("zerolinewidth"),g=r("zeroline",o.showGrid||!!d||!!u);g||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),F_=He({"src/plots/cartesian/axis_defaults.js"(Z,q){"use strict";var v=ns(),_=so(),S=sa(),M=zl(),e=pp(),t=Xh(),r=Y0(),o=t1(),a=e0(),i=t0(),n=I2(),s=z_(),h=h5(),f=wv(),m=lh().WEEKDAY_PATTERN,c=lh().HOUR_PATTERN;q.exports=function(A,E,p,b,d){var u=b.letter,g=b.font||{},y=b.splomStash||{},D=p("visible",!b.visibleDflt),P=E._template||{},z=E.type||P.type||"-",F;if(z==="date"){var N=_.getComponentMethod("calendars","handleDefaults");N(A,E,"calendar",b.calendar),b.noTicklabelmode||(F=p("ticklabelmode"))}!b.noTicklabelindex&&(z==="date"||z==="linear")&&p("ticklabelindex");var O="";(!b.noTicklabelposition||z==="multicategory")&&(O=S.coerce(A,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||p("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":z==="category"||z==="multicategory"?"allow":"hide past div"),f(E,d),h(A,E,p,b),n(A,E,p,b),b.noHover||(z!=="category"&&p("hoverformat"),b.noUnifiedhovertitle||p("unifiedhovertitle.text"));var L=p("color"),U=L!==t.color.dflt?L:g.color,B=y.label||d._dfltTitle[u];if(i(A,E,p,z,b),!D)return E;p("title.text",B),S.coerceFont(p,"title.font",g,{overrideDflt:{size:S.bigFont(g.size),color:U}}),r(A,E,p,z);var W=b.hasMinor;if(W&&(M.newContainer(E,"minor"),r(A,E,p,z,{isMinor:!0})),a(A,E,p,z,b),o(A,E,p,b),W){var $=b.isMinor;b.isMinor=!0,o(A,E,p,b),b.isMinor=$}s(A,E,p,{dfltColor:L,bgColor:b.bgColor,showGrid:b.showGrid,hasMinor:W,attributes:t}),W&&E.ticklabelindex==null&&!E.minor.ticks&&!E.minor.showgrid&&delete E.minor,(E.showline||E.ticks)&&p("mirror");var ue=z==="multicategory";if(!b.noTickson&&(z==="category"||ue)&&(E.ticks||E.showgrid)&&(ue?(p("tickson","boundaries"),delete E.ticklabelposition):p("tickson")),ue){var ce=p("showdividers");ce&&(p("dividercolor"),p("dividerwidth"))}if(z==="date")if(e(A,E,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!E.rangebreaks.length)delete E.rangebreaks;else{for(var de=0;de=2){var u="",g,y;if(d.length===2){for(g=0;g<2;g++)if(y=x(d[g]),y){u=m;break}}var D=p("pattern",u);if(D===m)for(g=0;g<2;g++)y=x(d[g]),y&&(A.bounds[g]=d[g]=y-1);if(D)for(g=0;g<2;g++)switch(y=d[g],D){case m:if(!v(y)){A.enabled=!1;return}if(y=+y,y!==Math.floor(y)||y<0||y>=7){A.enabled=!1;return}A.bounds[g]=d[g]=y;break;case c:if(!v(y)){A.enabled=!1;return}if(y=+y,y<0||y>24){A.enabled=!1;return}A.bounds[g]=d[g]=y;break}if(E.autorange===!1){var P=E.range;if(P[0]P[1]){A.enabled=!1;return}}else if(d[0]>P[0]&&d[1]p[1]-1/4096&&(e.domain=f),_.noneOrAll(M.domain,e.domain,f),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Jz=He({"src/plots/cartesian/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=$p().isUnifiedHover,M=x5(),e=zl(),t=$y(),r=Xh(),o=B5(),a=F_(),i=J0(),n=R2(),s=tf(),h=s.id2name,f=s.name2id,m=lh().AX_ID_PATTERN,c=so(),T=c.traceIs,l=c.getComponentMethod;function x(w,A,E){Array.isArray(w[A])?w[A].push(E):w[A]=[E]}q.exports=function(A,E,p){var b=E.autotypenumbers,d={},u={},g={},y={},D={},P={},z={},F={},N={},O={},L,U;for(L=0;L rect").call(M.setTranslate,0,0).call(M.setScale,1,1),E.plot.call(M.setTranslate,p._offset,b._offset).call(M.setScale,1,1);var d=E.plot.selectAll(".scatterlayer .trace");d.selectAll(".point").call(M.setPointGroupScale,1,1),d.selectAll(".textpoint").call(M.setTextPointsScale,1,1),d.call(M.hideOutsideRangePoints,E)}function h(E,p){var b=E.plotinfo,d=b.xaxis,u=b.yaxis,g=d._length,y=u._length,D=!!E.xr1,P=!!E.yr1,z=[];if(D){var F=S.simpleMap(E.xr0,d.r2l),N=S.simpleMap(E.xr1,d.r2l),O=F[1]-F[0],L=N[1]-N[0];z[0]=(F[0]*(1-p)+p*N[0]-F[0])/(F[1]-F[0])*g,z[2]=g*(1-p+p*L/O),d.range[0]=d.l2r(F[0]*(1-p)+p*N[0]),d.range[1]=d.l2r(F[1]*(1-p)+p*N[1])}else z[0]=0,z[2]=g;if(P){var U=S.simpleMap(E.yr0,u.r2l),B=S.simpleMap(E.yr1,u.r2l),W=U[1]-U[0],$=B[1]-B[0];z[1]=(U[1]*(1-p)+p*B[1]-U[1])/(U[0]-U[1])*y,z[3]=y*(1-p+p*$/W),u.range[0]=d.l2r(U[0]*(1-p)+p*B[0]),u.range[1]=u.l2r(U[1]*(1-p)+p*B[1])}else z[1]=0,z[3]=y;e.drawOne(r,d,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[d._id,u._id]);var ue=D?g/z[2]:1,ce=P?y/z[3]:1,de=D?z[0]:0,Y=P?z[1]:0,X=D?z[0]/z[2]*g:0,Q=P?z[1]/z[3]*y:0,V=d._offset-X,le=u._offset-Q;b.clipRect.call(M.setTranslate,de,Y).call(M.setScale,1/ue,1/ce),b.plot.call(M.setTranslate,V,le).call(M.setScale,ue,ce),M.setPointGroupScale(b.zoomScalePts,1/ue,1/ce),M.setTextPointsScale(b.zoomScaleTxt,1/ue,1/ce)}var f;i&&(f=i());function m(){for(var E={},p=0;pa.duration?(m(),x=window.cancelAnimationFrame(A)):x=window.requestAnimationFrame(A)}return T=Date.now(),x=window.requestAnimationFrame(A),Promise.resolve()}}}),Kf=He({"src/plots/cartesian/index.js"(Z){"use strict";var q=Vn(),v=so(),_=sa(),S=bc(),M=as(),e=Wh().getModuleCalcData,t=tf(),r=lh(),o=vd(),a=_.ensureSingle;function i(T,l,x){return _.ensureSingle(T,l,x,function(w){w.datum(x)})}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=Kz(),Z.layoutAttributes=Xh(),Z.supplyLayoutDefaults=Jz(),Z.transitionAxes=$z(),Z.finalizeSubplots=function(T,l){var x=l._subplots,w=x.xaxis,A=x.yaxis,E=x.cartesian,p=E,b={},d={},u,g,y;for(u=0;u0){var P=D.id;if(P.indexOf(n)!==-1)continue;P+=n+(u+1),D=_.extendFlat({},D,{id:P,plot:A._cartesianlayer.selectAll(".subplot").select("."+P)})}for(var z=[],F,N=0;N1&&(W+=n+B),U.push(b+W),p=0;p1,y=l.mainplotinfo;if(!l.mainplot||g)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(!p){var D=a(w,"g","layer-subplot");l.shapelayer=a(D,"g","shapelayer"),l.imagelayer=a(D,"g","imagelayer"),y&&g?(l.minorGridlayer=y.minorGridlayer,l.gridlayer=y.gridlayer,l.zerolinelayer=y.zerolinelayer):(l.minorGridlayer=a(w,"g","minor-gridlayer"),l.gridlayer=a(w,"g","gridlayer"),l.zerolinelayer=a(w,"g","zerolinelayer"));var P=a(w,"g","layer-between");l.shapelayerBetween=a(P,"g","shapelayer"),l.imagelayerBetween=a(P,"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",A),y&&g?l.zerolinelayerAbove=y.zerolinelayerAbove:l.zerolinelayerAbove=a(w,"g","zerolinelayer-above"),p||(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-"+d),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+d))}else{var z=y.plotgroup,F=A+"-x",N=A+"-y";l.minorGridlayer=y.minorGridlayer,l.gridlayer=y.gridlayer,l.zerolinelayer=y.zerolinelayer,l.zerolinelayerAbove=y.zerolinelayerAbove,a(y.overlinesBelow,"path",F),a(y.overlinesBelow,"path",N),a(y.overaxesBelow,"g",F),a(y.overaxesBelow,"g",N),l.plot=a(y.overplot,"g",A),a(y.overlinesAbove,"path",F),a(y.overlinesAbove,"path",N),a(y.overaxesAbove,"g",F),a(y.overaxesAbove,"g",N),l.xlines=z.select(".overlines-"+b).select("."+F),l.ylines=z.select(".overlines-"+d).select("."+N),l.xaxislayer=z.select(".overaxes-"+b).select("."+F),l.yaxislayer=z.select(".overaxes-"+d).select("."+N)}p||(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 m(T,l){if(T){var x={};T.each(function(d){var u=d[0],g=q.select(this);g.remove(),c(u,l),x[u]=!0});for(var w in l._plots)for(var A=l._plots[w],E=A.overlays||[],p=0;p=0,l=i.indexOf("end")>=0,x=h.backoff*m+n.standoff,w=f.backoff*c+n.startstandoff,A,E,p,b;if(s.nodeName==="line"){A={x:+a.attr("x1"),y:+a.attr("y1")},E={x:+a.attr("x2"),y:+a.attr("y2")};var d=A.x-E.x,u=A.y-E.y;if(p=Math.atan2(u,d),b=p+Math.PI,x&&w&&x+w>Math.sqrt(d*d+u*u)){W();return}if(x){if(x*x>d*d+u*u){W();return}var g=x*Math.cos(p),y=x*Math.sin(p);E.x+=g,E.y+=y,a.attr({x2:E.x,y2:E.y})}if(w){if(w*w>d*d+u*u){W();return}var D=w*Math.cos(p),P=w*Math.sin(p);A.x-=D,A.y-=P,a.attr({x1:A.x,y1:A.y})}}else if(s.nodeName==="path"){var z=s.getTotalLength(),F="";if(z2/3?Ca="right":Ca="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ca]}for(var Ze=!1,rt=["x","y"],Je=0;Je1)&&(Bt===kt?(ot=Vt.r2fraction(w["a"+St]),(ot<0||ot>1)&&(Ze=!0)):Ze=!0),Ye=Vt._offset+Vt.r2p(w[St]),We=.5}else{var Ut=st==="domain";St==="x"?(Le=w[St],Ye=Ut?Vt._offset+Vt._length*Le:Ye=u.l+u.w*Le):(Le=1-w[St],Ye=Ut?Vt._offset+Vt._length*Le:Ye=u.t+u.h*Le),We=w.showarrow?.5:Le}if(w.showarrow){Fe.head=Ye;var Ct=w["a"+St];if(Ke=vr*Ce(.5,w.xanchor)-qr*Ce(.5,w.yanchor),Bt===kt){var Pt=t.getRefType(Bt);Pt==="domain"?(St==="y"&&(Ct=1-Ct),Fe.tail=Vt._offset+Vt._length*Ct):Pt==="paper"?St==="y"?(Ct=1-Ct,Fe.tail=u.t+u.h*Ct):Fe.tail=u.l+u.w*Ct:Fe.tail=Vt._offset+Vt.r2p(Ct),Ae=Ke}else Fe.tail=Ye+Ct,Ae=Ke+Ct;Fe.text=Fe.tail+Ke;var jt=d[St==="x"?"width":"height"];if(kt==="paper"&&(Fe.head=M.constrain(Fe.head,1,jt-1)),Bt==="pixel"){var cr=-Math.max(Fe.tail-3,Fe.text),or=Math.min(Fe.tail+3,Fe.text)-jt;cr>0?(Fe.tail+=cr,Fe.text+=cr):or>0&&(Fe.tail-=or,Fe.text-=or)}Fe.tail+=_t,Fe.head+=_t}else Ke=kr*Ce(We,Ur),Ae=Ke,Fe.text=Ye+Ke;Fe.text+=_t,Ke+=_t,Ae+=_t,w["_"+St+"padplus"]=kr/2+Ae,w["_"+St+"padminus"]=kr/2-Ae,w["_"+St+"size"]=kr,w["_"+St+"shift"]=Ke}if(Ze){de.remove();return}var nr=0,Pr=0;if(w.align!=="left"&&(nr=(Ve-nt)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Pr=(he-tt)*(w.valign==="middle"?.5:1)),je)Pe.select("svg").attr({x:Q+nr-1,y:Q+Pr}).call(o.setClipUrl,le?O:null,x);else{var _a=Q+Pr-at.top,Fa=Q+nr-at.left;te.call(i.positionText,Fa,_a).call(o.setClipUrl,le?O:null,x)}ae.select("rect").call(o.setRect,Q,Q,Ve,he),V.call(o.setRect,Y/2,Y/2,se-Y,ne-Y),de.call(o.setTranslate,Math.round(L.x.text-se/2),Math.round(L.y.text-ne/2)),W.attr({transform:"rotate("+U+","+L.x.text+","+L.y.text+")"});var Ra=function(Wa,Ca){B.selectAll(".annotation-arrow-g").remove();var hi=L.x.head,wi=L.y.head,Yt=L.x.tail+Wa,Rt=L.y.tail+Ca,Zt=L.x.text+Wa,Jt=L.y.text+Ca,Fr=M.rotationXYMatrix(U,Zt,Jt),ta=M.apply2DTransform(Fr),ra=M.apply2DTransform2(Fr),ca=+V.attr("width"),Ba=+V.attr("height"),$a=Zt-.5*ca,Za=$a+ca,ri=Jt-.5*Ba,pi=ri+Ba,Ia=[[$a,ri,$a,pi],[$a,pi,Za,pi],[Za,pi,Za,ri],[Za,ri,$a,ri]].map(ra);if(!Ia.reduce(function(gt,Kt){return gt^!!M.segmentsIntersect(hi,wi,hi+1e6,wi+1e6,Kt[0],Kt[1],Kt[2],Kt[3])},!1)){Ia.forEach(function(gt){var Kt=M.segmentsIntersect(Yt,Rt,hi,wi,gt[0],gt[1],gt[2],gt[3]);Kt&&(Yt=Kt.x,Rt=Kt.y)});var rn=w.arrowwidth,tn=w.arrowcolor,cn=w.arrowside,xt=B.append("g").style({opacity:r.opacity(tn)}).classed("annotation-arrow-g",!0),ut=xt.append("path").attr("d","M"+Yt+","+Rt+"L"+hi+","+wi).style("stroke-width",rn+"px").call(r.stroke,r.rgb(tn));if(f(ut,cn,w),g.annotationPosition&&ut.node().parentNode&&!E){var Or=hi,Cr=wi;if(w.standoff){var wr=Math.sqrt(Math.pow(hi-Yt,2)+Math.pow(wi-Rt,2));Or+=w.standoff*(Yt-hi)/wr,Cr+=w.standoff*(Rt-wi)/wr}var Rr=xt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Yt-Or)+","+(Rt-Cr),transform:e(Or,Cr)}).style("stroke-width",rn+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),Nr,Hr;s.init({element:Rr.node(),gd:x,prepFn:function(){var gt=o.getTranslate(de);Nr=gt.x,Hr=gt.y,p&&p.autorange&&z(p._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(gt,Kt){var mr=ta(Nr,Hr),Ir=mr[0]+gt,va=mr[1]+Kt;de.call(o.setTranslate,Ir,va),F("x",T(p,gt,"x",u,w)),F("y",T(b,Kt,"y",u,w)),w.axref===w.xref&&F("ax",T(p,gt,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,Kt,"ay",u,w)),xt.attr("transform",e(gt,Kt)),W.attr({transform:"rotate("+U+","+Ir+","+va+")"})},doneFn:function(){_.call("_guiRelayout",x,N());var gt=document.querySelector(".js-notes-box-panel");gt&>.redraw(gt.selectedObj)}})}}};if(w.showarrow&&Ra(0,0),$){var qa;s.init({element:de.node(),gd:x,prepFn:function(){qa=W.attr("transform")},moveFn:function(Wa,Ca){var hi="pointer";if(w.showarrow)w.axref===w.xref?F("ax",T(p,Wa,"ax",u,w)):F("ax",w.ax+Wa),w.ayref===w.yref?F("ay",T(b,Ca,"ay",u.w,w)):F("ay",w.ay+Ca),Ra(Wa,Ca);else{if(E)return;var wi,Yt;if(p)wi=T(p,Wa,"x",u,w);else{var Rt=w._xsize/u.w,Zt=w.x+(w._xshift-w.xshift)/u.w-Rt/2;wi=s.align(Zt+Wa/u.w,Rt,0,1,w.xanchor)}if(b)Yt=T(b,Ca,"y",u,w);else{var Jt=w._ysize/u.h,Fr=w.y-(w._yshift+w.yshift)/u.h-Jt/2;Yt=s.align(Fr-Ca/u.h,Jt,0,1,w.yanchor)}F("x",wi),F("y",Yt),(!p||!b)&&(hi=s.getCursor(p?.5:wi,b?.5:Yt,w.xanchor,w.yanchor))}W.attr({transform:e(Wa,Ca)+qa}),n(de,hi)},clickFn:function(Wa,Ca){w.captureevents&&x.emit("plotly_clickannotation",ce(Ca))},doneFn:function(){n(de),_.call("_guiRelayout",x,N());var Wa=document.querySelector(".js-notes-box-panel");Wa&&Wa.redraw(Wa.selectedObj)}})}}g.annotationText?te.call(i.makeEditable,{delegate:de,gd:x}).call(pe).on("edit",function(Se){w.text=Se,this.call(pe),F("text",Se),p&&p.autorange&&z(p._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),_.call("_guiRelayout",x,N())}):te.call(pe)}}}),t9=He({"src/components/annotations/click.js"(Z,q){"use strict";var v=sa(),_=so(),S=zl().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),h={},f=o._fullLayout.annotations,m,c;if(n.length||s.length){for(m=0;m1){n=!0;break}}n?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+a+'"]').remove():(i._pdata=_(e.glplot.cameraParams,[t.xaxis.r2l(i.x)*r[0],t.yaxis.r2l(i.y)*r[1],t.zaxis.r2l(i.z)*r[2]]),v(e.graphDiv,i,a,e.id,i._xa,i._ya))}}}}),u9=He({"src/components/annotations3d/index.js"(Z,q){"use strict";var v=so(),_=sa();q.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:z2()}}},layoutAttributes:z2(),handleDefaults:o9(),includeBasePlot:S,convert:s9(),draw:l9()};function S(M,e){var t=v.subplotsRegistry.gl3d;if(t)for(var r=t.attrRegex,o=Object.keys(M),a=0;a{var y=g+"anchor",D=g==="x"?x:w,P={_fullLayout:i},z,F,N,O;let L=g+"ref",U=o[L];if(Array.isArray(U)&&U.length>0){let B=e.countDefiningCoords(c,f,g);O=_.coerceRefArray(o,a,P,g,void 0,"paper",B),a["_"+g+"refArray"]=!0}else O=_.coerceRef(o,a,P,g,void 0,"paper");if(Array.isArray(O))O.forEach(function(B){_.getRefType(B)==="range"&&(z=_.getFromId(P,B),z&&z._shapeIndices.indexOf(a._index)===-1&&z._shapeIndices.push(a._index))}),T&&[0,1].forEach(function(B){let W=O[B];_.getRefType(W)==="range"?(z=_.getFromId(P,W),F=e.shapePositionToRange(z),N=e.rangeToShapePosition(z),(z.type==="category"||z.type==="multicategory")&&n(g+B+"shift")):F=N=v.identity;let ue=g+B,ce=o[ue];if(o[ue]=F(o[ue],!0),D==="pixel"?n(ue,E[B]):_.coercePosition(a,P,n,W,ue,A[B]),a[ue]=N(a[ue]),o[ue]=ce,B===0&&D==="pixel"){let de=o[y];o[y]=F(o[y],!0),_.coercePosition(a,P,n,W,y,.25),a[y]=N(a[y]),o[y]=de}});else{if(_.getRefType(O)==="range"?(z=_.getFromId(P,O),z._shapeIndices.push(a._index),N=e.rangeToShapePosition(z),F=e.shapePositionToRange(z),T&&(z.type==="category"||z.type==="multicategory")&&(n(g+"0shift"),n(g+"1shift"))):F=N=v.identity,T){let W=g+"0",$=g+"1",ue=o[W],ce=o[$];o[W]=F(o[W],!0),o[$]=F(o[$],!0),D==="pixel"?(n(W,E[0]),n($,E[1])):(_.coercePosition(a,P,n,O,W,A[0]),_.coercePosition(a,P,n,O,$,A[1])),a[W]=N(a[W]),a[$]=N(a[$]),o[W]=ue,o[$]=ce}if(D==="pixel"){let W=o[y];o[y]=F(o[y],!0),_.coercePosition(a,P,n,O,y,.25),a[y]=N(a[y]),o[y]=W}}}),T&&v.noneOrAll(o,a,["x0","x1","y0","y1"]);var p=c==="line",b,d;if(T&&(b=n("label.texttemplate"),n("label.texttemplatefallback")),b||(d=n("label.text")),d||b){n("label.textangle");var u=n("label.textposition",p?"middle":"middle center");n("label.xanchor"),n("label.yanchor",t(p,u)),n("label.padding"),v.coerceFont(n,"label.font",i.font)}}}}),f9=He({"src/components/shapes/draw_newshape/defaults.js"(Z,q){"use strict";var v=$n(),_=sa();function S(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"),_.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",v.contrast(a)),r("newshape.line.dash")}var i=e.dragmode==="drawline",n=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(r("newshape.label.texttemplatefallback"),n||s){r("newshape.label.textangle");var h=r("newshape.label.textposition",i?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",S(i,h)),r("newshape.label.padding"),_.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}}}),h9=He({"src/components/shapes/calc_autorange.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=L_(),M=i0();q.exports=function(n){var s=n._fullLayout,h=v.filterVisible(s.shapes);if(!(!h.length||!n._fullData.length))for(var f=0;f{c=_.getFromId(n,A),m._extremes[c._id]=_.findExtremes(c,E,t(m))})}else m.xref!=="paper"&&l!=="domain"&&(c=_.getFromId(n,m.xref),T=a(c,m,S.paramIsX),T&&(m._extremes[c._id]=_.findExtremes(c,T,t(m))));if(x==="array"){let w=e(n,m,"y");Object.entries(w).forEach(([A,E])=>{c=_.getFromId(n,A),m._extremes[c._id]=_.findExtremes(c,E,r(m))})}else m.yref!=="paper"&&x!=="domain"&&(c=_.getFromId(n,m.yref),T=a(c,m,S.paramIsY),T&&(m._extremes[c._id]=_.findExtremes(c,T,r(m))))}};function e(i,n,s){let h=n[s+"ref"],f=s==="x"?S.paramIsX:S.paramIsY;function m(A,E){A==="paper"||_.getRefType(A)==="domain"||(c[A]||(c[A]=[]),c[A].push(E))}let c={};if(n.type==="path"&&n.path){let A=n.path.match(S.segmentRE)||[];for(var T=0,l=0;lb&&(m(h[T],d[b]),T++)}}else m(h[0],n[s+"0"]),m(h[1],n[s+"1"]);let x={};for(let A in c){let E=_.getFromId(i,A);if(E){var w=E.type==="category"||E.type==="multicategory"?E.r2c:E.d2c;E.type==="date"&&(w=M.decodeDate(w)),x[E._id]=c[A].map(w)}}return x}function t(i){return o(i.line.width,i.xsizemode,i.x0,i.x1,i.path,!1)}function r(i){return o(i.line.width,i.ysizemode,i.y0,i.y1,i.path,!0)}function o(i,n,s,h,f,m){var c=i/2,T=m;if(n==="pixel"){var l=f?M.extractPathCoords(f,m?S.paramIsY:S.paramIsX):[s,h],x=v.aggNums(Math.max,null,l),w=v.aggNums(Math.min,null,l),A=w<0?Math.abs(w)+c:c,E=x>0?x+c:c;return{ppad:c,ppadplus:T?A:E,ppadminus:T?E:A}}else return{ppad:c}}function a(i,n,s){var h=i._id.charAt(0)==="x"?"x":"y",f=i.type==="category"||i.type==="multicategory",m,c,T=0,l=0,x=f?i.r2c:i.d2c,w=n[h+"sizemode"]==="scaled";if(w?(m=n[h+"0"],c=n[h+"1"],f&&(T=n[h+"0shift"],l=n[h+"1shift"])):(m=n[h+"anchor"],c=n[h+"anchor"]),m!==void 0)return[x(m)+T,x(c)+l];if(n.path){var A=1/0,E=-1/0,p=n.path.match(S.segmentRE),b,d,u,g,y;for(i.type==="date"&&(x=M.decodeDate(x)),b=0;bE&&(E=y)));if(E>=A)return[A,E]}}}}),p9=He({"src/components/shapes/index.js"(Z,q){"use strict";var v=E2();q.exports={moduleType:"component",name:"shapes",layoutAttributes:j5(),supplyLayoutDefaults:c9(),supplyDrawNewShapeDefaults:f9(),includeBasePlot:D_()("shapes"),calcAutorange:h9(),draw:v.draw,drawOne:v.drawOne}}}),q5=He({"src/components/images/attributes.js"(Z,q){"use strict";var v=lh(),_=zl().templatedArray,S=R_();q.exports=_("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",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),d9=He({"src/components/images/defaults.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=pp(),M=q5(),e="images";q.exports=function(o,a){var i={name:e,handleItemDefaults:t};S(o,a,i)};function t(r,o,a){function i(x,w){return v.coerce(r,o,M,x,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 h={_fullLayout:a},f=["x","y"],m=0;m<2;m++){var c=f[m],T=_.coerceRef(r,o,h,c,"paper",void 0);if(T!=="paper"){var l=_.getFromId(h,T);l._imgIndices.push(o._index)}_.coercePosition(o,h,i,T,c,0)}return o}}}),v9=He({"src/components/images/draw.js"(Z,q){"use strict";var v=Vn(),_=as(),S=Wo(),M=tf(),e=vd();q.exports=function(r){var o=r._fullLayout,a=[],i={},n=[],s,h;for(h=0;h0);f&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(a,i,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",n.font),s("bgcolor",n.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,i){function n(h,f){return v.coerce(a,i,t,h,f)}var s=n("visible",a.method==="skip"||Array.isArray(a.args));s&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}}}),_9=He({"src/components/updatemenus/scrollbox.js"(Z,q){"use strict";q.exports=e;var v=Vn(),_=$n(),S=as(),M=sa();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 h=this.position.l,f=this.position.w,m=this.position.t,c=this.position.h,T=this.position.direction,l=T==="down",x=T==="left",w=T==="right",A=T==="up",E=f,p=c,b,d,u,g;!l&&!x&&!w&&!A&&(this.position.direction="down",l=!0);var y=l||A;y?(b=h,d=b+E,l?(u=m,g=Math.min(u+p,s),p=g-u):(g=m+p,u=Math.max(g-p,0),p=g-u)):(u=m,g=u+p,x?(d=h+E,b=Math.max(d-E,0),E=d-b):(b=h,d=Math.min(b+E,n),E=d-b)),this._box={l:b,t:u,w:E,h:p};var D=f>E,P=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=h,N=m+c;N+z>s&&(N=s-z);var O=this.container.selectAll("rect.scrollbar-horizontal").data(D?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(_.fill,e.barColor),D?(this.hbar=O.attr({rx:e.barRadius,ry:e.barRadius,x:F,y:N,width:P,height:z}),this._hbarXMin=F+P/2,this._hbarTranslateMax=E-P):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=c>p,U=e.barWidth+2*e.barPad,B=e.barLength+2*e.barPad,W=h+f,$=m;W+U>n&&(W=n-U);var ue=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);ue.exit().on(".drag",null).remove(),ue.enter().append("rect").classed("scrollbar-vertical",!0).call(_.fill,e.barColor),L?(this.vbar=ue.attr({rx:e.barRadius,ry:e.barRadius,x:W,y:$,width:U,height:B}),this._vbarYMin=$+B/2,this._vbarTranslateMax=p-B):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ce=this.id,de=b-.5,Y=L?d+U+.5:d+.5,X=u-.5,Q=D?g+z+.5:g+.5,V=i._topdefs.selectAll("#"+ce).data(D||L?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",ce).append("rect"),D||L?(this._clipRect=V.select("rect").attr({x:Math.floor(de),y:Math.floor(X),width:Math.ceil(Y)-Math.floor(de),height:Math.ceil(Q)-Math.floor(X)}),this.container.call(S.setClipUrl,ce,this.gd),this.bg.attr({x:h,y:m,width:f,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S.setClipUrl,null),delete this._clipRect),D||L){var le=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(le);var ae=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));D&&this.hbar.on(".drag",null).call(ae),L&&this.vbar.on(".drag",null).call(ae)}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(S.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-=v.event.dx),this.vbar&&(o-=v.event.dy),this.setTranslate(r,o)},e.prototype._onBoxWheel=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r+=v.event.deltaY),this.vbar&&(o+=v.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(v.event.x,a,i),s=(n-a)/(i-a),h=this.position.w-this._box.w;r=s*h}if(this.vbar){var f=o+this._vbarYMin,m=f+this._vbarTranslateMax,c=M.constrain(v.event.y,f,m),T=(c-f)/(m-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(S.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(S.setTranslate,r+n*this._hbarTranslateMax,o)}if(this.vbar){var s=o/i;this.vbar.call(S.setTranslate,r,o+s*this._vbarTranslateMax)}}}}),x9=He({"src/components/updatemenus/draw.js"(Z,q){"use strict";var v=Vn(),_=bc(),S=$n(),M=as(),e=sa(),t=su(),r=zl().arrayEditor,o=uh().LINE_SPACING,a=F2(),i=_9();q.exports=function(P){var z=P._fullLayout,F=e.filterVisible(z[a.name]);function N(ce){_.autoMargin(P,u(ce))}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(){v.select(this).selectAll("g."+a.headerGroupClassName).each(N)}).remove(),F.length!==0){var L=O.selectAll("g."+a.headerGroupClassName).data(F,n);L.enter().append("g").classed(a.headerGroupClassName,!0);for(var U=e.ensureSingle(O,"g",a.dropdownButtonGroupClassName,function(ce){ce.style("pointer-events","all")}),B=0;B0?[0]:[]);W.enter().append("g").classed(a.containerClassName,!0).style("cursor",L?null:"ew-resize");function $(Y){Y._commandObserver&&(Y._commandObserver.remove(),delete Y._commandObserver),_.autoMargin(O,f(Y))}if(W.exit().each(function(){v.select(this).selectAll("g."+a.groupClassName).each($)}).remove(),B.length!==0){var ue=W.selectAll("g."+a.groupClassName).data(B,c);ue.enter().append("g").classed(a.groupClassName,!0),ue.exit().each($).remove();for(var ce=0;ce0&&(ue=ue.transition().duration(O.transition.duration).ease(O.transition.easing)),ue.attr("transform",t($-a.gripWidth*.5,O._dims.currentValueTotalHeight))}}function D(N,O){var L=N._dims;return L.inputAreaStart+a.stepInset+(L.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,O))}function P(N,O){var L=N._dims;return Math.min(1,Math.max(0,(O-a.stepInset-L.inputAreaStart)/(L.inputAreaLength-2*a.stepInset-2*L.inputAreaStart)))}function z(N,O,L){var U=L._dims,B=e.ensureSingle(N,"rect",a.railTouchRectClass,function(W){W.call(d,O,N,L).style("pointer-events","all")});B.attr({width:U.inputAreaLength,height:Math.max(U.inputAreaWidth,a.tickOffset+L.ticklen+U.labelHeight)}).call(S.fill,L.bgcolor).attr("opacity",0),M.setTranslate(B,0,U.currentValueTotalHeight)}function F(N,O){var L=O._dims,U=L.inputAreaLength-a.railInset*2,B=e.ensureSingle(N,"rect",a.railRectClass);B.attr({width:U,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(S.stroke,O.bordercolor).call(S.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px"),M.setTranslate(B,a.railInset,(L.inputAreaWidth-a.railWidth)*.5+L.currentValueTotalHeight)}}}),A9=He({"src/components/sliders/index.js"(Z,q){"use strict";var v=O_();q.exports={moduleType:"component",name:v.name,layoutAttributes:G5(),supplyLayoutDefaults:w9(),draw:T9()}}}),O2=He({"src/components/rangeslider/attributes.js"(Z,q){"use strict";var v=sh();q.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.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"}}}),H5=He({"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=He({"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}}}),S9=He({"src/components/rangeslider/helpers.js"(Z){"use strict";var q=tf(),v=su(),_=B2(),S=uh().LINE_SPACING,M=_.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=nt.max)je=pe[at+1];else if(Pe=nt.pmax)je=pe[at+1];else if(Pe0?d.touches[0].clientX:0}function m(d,u,g,y){if(u._context.staticPlot)return;var D=d.select("rect."+h.slideBoxClassName).node(),P=d.select("rect."+h.grabAreaMinClassName).node(),z=d.select("rect."+h.grabAreaMaxClassName).node();function F(){var N=v.event,O=N.target,L=f(N),U=L-d.node().getBoundingClientRect().left,B=y.d2p(g._rl[0]),W=y.d2p(g._rl[1]),$=n.coverSlip();this.addEventListener("touchmove",ue),this.addEventListener("touchend",ce),$.addEventListener("mousemove",ue),$.addEventListener("mouseup",ce);function ue(de){var Y=f(de),X=+Y-L,Q,V,le;switch(O){case D:if(le="ew-resize",B+X>g._length||W+X<0)return;Q=B+X,V=W+X;break;case P:if(le="col-resize",B+X>g._length)return;Q=B+X,V=W;break;case z:if(le="col-resize",W+X<0)return;Q=B,V=W+X;break;default:le="ew-resize",Q=U,V=U+X;break}if(V0);if(x){var w=o(n,s,h);T("x",w[0]),T("y",w[1]),v.noneOrAll(i,n,["x","y"]),T("xanchor"),T("yanchor"),v.coerceFont(T,"font",s.font);var A=T("bgcolor");T("activecolor",_.contrast(A,t.lightAmount,t.darkAmount)),T("bordercolor"),T("borderwidth")}};function r(a,i,n,s){var h=s.calendar;function f(T,l){return v.coerce(a,i,e.buttons,T,l)}var m=f("visible");if(m){var c=f("step");c!=="all"&&(h&&h!=="gregorian"&&(c==="month"||c==="year")?i.stepmode="backward":f("stepmode"),f("count")),f("label")}}function o(a,i,n){for(var s=n.filter(function(c){return i[c].anchor===a._id}),h=0,f=0;f1)){delete h.grid;return}if(!T&&!l&&!x){var g=b("pattern")==="independent";g&&(T=!0)}p._hasSubplotGrid=T;var y=b("roworder"),D=y==="top to bottom",P=T?.2:.1,z=T?.3:.1,F,N;w&&h._splomGridDflt&&(F=h._splomGridDflt.xside,N=h._splomGridDflt.yside),p._domains={x:a("x",b,P,F,u),y:a("y",b,z,N,d,D)}}function a(s,h,f,m,c,T){var l=h(s+"gap",f),x=h("domain."+s);h(s+"side",m);for(var w=new Array(c),A=x[0],E=(x[1]-A)/(c-l),p=E*(1-l),b=0;b0,m=r._context.staticPlot;o.each(function(c){var T=c[0].trace,l=T.error_x||{},x=T.error_y||{},w;T.ids&&(w=function(b){return b.id});var A=M.hasMarkers(T)&&T.marker.maxdisplayed>0;!x.visible&&!l.visible&&(c=[]);var E=v.select(this).selectAll("g.errorbar").data(c,w);if(E.exit().remove(),!!c.length){l.visible||E.selectAll("path.xerror").remove(),x.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var p=E.enter().append("g").classed("errorbar",!0);f&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),S.setClipUrl(E,a.layerClipId,r),E.each(function(b){var d=v.select(this),u=e(b,s,h);if(!(A&&!b.vis)){var g,y=d.select("path.yerror");if(x.visible&&_(u.x)&&_(u.yh)&&_(u.ys)){var D=x.width;g="M"+(u.x-D)+","+u.yh+"h"+2*D+"m-"+D+",0V"+u.ys,u.noYS||(g+="m-"+D+",0h"+2*D),n=!y.size(),n?y=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):f&&(y=y.transition().duration(i.duration).ease(i.easing)),y.attr("d",g)}else y.remove();var P=d.select("path.xerror");if(l.visible&&_(u.y)&&_(u.xh)&&_(u.xs)){var z=(l.copy_ystyle?x:l).width;g="M"+u.xh+","+(u.y-z)+"v"+2*z+"m0,-"+z+"H"+u.xs,u.noXS||(g+="m0,-"+z+"v"+2*z),n=!P.size(),n?P=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):f&&(P=P.transition().duration(i.duration).ease(i.easing)),P.attr("d",g)}else P.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),_(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),_(a.xs)||(a.noXS=!0,a.xs=r.c2p(t.xs,!0))),a}}}),O9=He({"src/components/errorbars/style.js"(Z,q){"use strict";var v=Vn(),_=$n();q.exports=function(M){M.each(function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=v.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(_.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(_.stroke,o.color)})}}}),B9=He({"src/components/errorbars/index.js"(Z,q){"use strict";var v=sa(),_=pc().overrideAll,S=Z5(),M={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S)};delete M.error_x.copy_zstyle,delete M.error_y.copy_zstyle,delete M.error_y.copy_ystyle;var e={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S),error_z:v.extendFlat({},S)};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:_(e,"calc","nested"),scattergl:_(M,"calc","nested")}},supplyDefaults:D9(),calc:z9(),makeComputeError:Y5(),plot:F9(),style:O9(),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))}}}),N9=He({"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"}}}}),U9=He({"src/components/colorbar/draw.js"(Z,q){"use strict";var v=Vn(),_=Ch(),S=bc(),M=so(),e=Wo(),t=Ap(),r=sa(),o=r.strTranslate,a=rs().extendFlat,i=Kd(),n=as(),s=$n(),h=K0(),f=su(),m=wp().flipScale,c=F_(),T=R2(),l=Xh(),x=uh(),w=x.LINE_SPACING,A=x.FROM_TL,E=x.FROM_BR,p=N9().cn;function b(P){var z=P._fullLayout,F=z._infolayer.selectAll("g."+p.colorbar).data(d(P),function(N){return N._id});F.enter().append("g").attr("class",function(N){return N._id}).classed(p.colorbar,!0),F.each(function(N){var O=v.select(this);r.ensureSingle(O,"rect",p.cbbg),r.ensureSingle(O,"g",p.cbfills),r.ensureSingle(O,"g",p.cblines),r.ensureSingle(O,"g",p.cbaxis,function(U){U.classed(p.crisp,!0)}),r.ensureSingle(O,"g",p.cbtitleunshift,function(U){U.append("g").classed(p.cbtitle,!0)}),r.ensureSingle(O,"rect",p.cboutline);var L=u(O,N,P);L&&L.then&&(P._promises||[]).push(L),P._context.edits.colorbarPosition&&g(O,N,P)}),F.exit().each(function(N){S.autoMargin(P,N._id)}).remove(),F.order()}function d(P){var z=P._fullLayout,F=P.calcdata,N=[],O,L,U,B;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 $(){typeof B.calc=="function"?B.calc(P,U,O):(O._fillgradient=L.reversescale?m(L.colorscale):L.colorscale,O._zrange=[L[B.min],L[B.max]])}for(var ue=0;ue1){var Fe=Math.pow(10,Math.floor(Math.log(_t)/Math.LN10));kr*=Fe*r.roundUp(_t/Fe,[2,5,10]),(Math.abs(at.start)/at.size+1e-6)%1<2e-6&&(vr.tick0=0)}vr.dtick=kr}vr.domain=N?[Vt+X/ee.h,Vt+Ce-X/ee.h]:[Vt+Y/ee.w,Vt+Ce-Y/ee.w],vr.setScale(),P.attr("transform",o(Math.round(ee.l),Math.round(ee.t)));var Ye=P.select("."+p.cbtitleunshift).attr("transform",o(-Math.round(ee.l),-Math.round(ee.t))),Ae=vr.ticklabelposition,Le=vr.title.font.size,We=P.select("."+p.cbaxis),Ke,st=0,ot=0;function Ut(or,nr){var Pr={propContainer:vr,propName:z._propPrefix+"title.text",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:P.select("."+p.cbtitle)},_a=or.charAt(0)==="h"?or.slice(1):"h"+or;P.selectAll("."+_a+",."+_a+"-math-group").remove(),h.draw(F,or,a(Pr,nr||{}))}function Ct(){if(N&&qr||!N&&!qr){var or,nr;Se==="top"&&(or=Y+ee.l+Ze*Q,nr=X+ee.t+rt*(1-Vt-Ce)+3+Le*.75),Se==="bottom"&&(or=Y+ee.l+Ze*Q,nr=X+ee.t+rt*(1-Vt)-3-Le*.25),Se==="right"&&(nr=X+ee.t+rt*V+3+Le*.75,or=Y+ee.l+Ze*Vt),Ut(vr._id+"title",{attributes:{x:or,y:nr,"text-anchor":N?"start":"middle"}})}}function Pt(){if(N&&!qr||!N&&qr){var or=vr.position||0,nr=vr._offset+vr._length/2,Pr,_a;if(Se==="right")_a=nr,Pr=ee.l+Ze*or+10+Le*(vr.showticklabels?1:.5);else if(Pr=nr,Se==="bottom"&&(_a=ee.t+rt*or+10+(Ae.indexOf("inside")===-1?vr.tickfont.size:0)+(vr.ticks!=="inside"&&z.ticklen||0)),Se==="top"){var Fa=we.text.split("
").length;_a=ee.t+rt*or+10-he-w*Le*Fa}Ut((N?"h":"v")+vr._id+"title",{avoid:{selection:v.select(F).selectAll("g."+vr._id+"tick"),side:Se,offsetTop:N?0:ee.t,offsetLeft:N?ee.l:0,maxShift:N?j.width:j.height},attributes:{x:Pr,y:_a,"text-anchor":"middle"},transform:{rotate:N?-90:0,offset:0}})}}function jt(){if(!N&&!qr||N&&qr){var or=P.select("."+p.cbtitle),nr=or.select("text"),Pr=[-W/2,W/2],_a=or.select(".h"+vr._id+"title-math-group").node(),Fa=15.6;nr.node()&&(Fa=parseInt(nr.node().style.fontSize,10)*w);var Ra;if(_a?(Ra=n.bBox(_a),ot=Ra.width,st=Ra.height,st>Fa&&(Pr[1]-=(st-Fa)/2)):nr.node()&&!nr.classed(p.jsPlaceholder)&&(Ra=n.bBox(nr.node()),ot=Ra.width,st=Ra.height),N){if(st){if(st+=5,Se==="top")vr.domain[1]-=st/ee.h,Pr[1]*=-1;else{vr.domain[0]+=st/ee.h;var qa=f.lineCount(nr);Pr[1]+=(1-qa)*Fa}or.attr("transform",o(Pr[0],Pr[1])),vr.setScale()}}else ot&&(Se==="right"&&(vr.domain[0]+=(ot+Le/2)/ee.w),or.attr("transform",o(Pr[0],Pr[1])),vr.setScale())}P.selectAll("."+p.cbfills+",."+p.cblines).attr("transform",N?o(0,Math.round(ee.h*(1-vr.domain[1]))):o(Math.round(ee.w*vr.domain[0]),0)),We.attr("transform",N?o(0,Math.round(-ee.t)):o(Math.round(-ee.l),0));var Wa=P.select("."+p.cbfills).selectAll("rect."+p.cbfill).attr("style","").data(tt);Wa.enter().append("rect").classed(p.cbfill,!0).attr("style",""),Wa.exit().remove();var Ca=Re.map(vr.c2p).map(Math.round).sort(function(Zt,Jt){return Zt-Jt});Wa.each(function(Zt,Jt){var Fr=[Jt===0?Re[0]:(tt[Jt]+tt[Jt-1])/2,Jt===tt.length-1?Re[1]:(tt[Jt]+tt[Jt+1])/2].map(vr.c2p).map(Math.round);N&&(Fr[1]=r.constrain(Fr[1]+(Fr[1]>Fr[0])?1:-1,Ca[0],Ca[1]));var ta=v.select(this).attr(N?"x":"y",Je).attr(N?"y":"x",v.min(Fr)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(v.max(Fr)-v.min(Fr),2));if(z._fillgradient)n.gradient(ta,F,z._id,N?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ra=je(Zt).replace("e-","");ta.attr("fill",_(ra).toHexString())}});var hi=P.select("."+p.cblines).selectAll("path."+p.cbline).data(pe.color&&pe.width?Ve:[]);hi.enter().append("path").classed(p.cbline,!0),hi.exit().remove(),hi.each(function(Zt){var Jt=Je,Fr=Math.round(vr.c2p(Zt))+pe.width/2%1;v.select(this).attr("d","M"+(N?Jt+","+Fr:Fr+","+Jt)+(N?"h":"v")+he).call(n.lineGroupStyle,pe.width,Pe(Zt),pe.dash)}),We.selectAll("g."+vr._id+"tick,path").remove();var wi=Je+he+(W||0)/2-(z.ticks==="outside"?1:0),Yt=e.calcTicks(vr),Rt=e.getTickSigns(vr)[2];return e.drawTicks(F,vr,{vals:vr.ticks==="inside"?e.clipEnds(vr,Yt):Yt,layer:We,path:e.makeTickPath(vr,wi,Rt),transFn:e.makeTransTickFn(vr)}),e.drawLabels(F,vr,{vals:Yt,layer:We,transFn:e.makeTransTickLabelFn(vr),labelFns:e.makeLabelFns(vr,wi)})}function cr(){var or,nr=he+W/2;Ae.indexOf("inside")===-1&&(or=n.bBox(We.node()),nr+=N?or.width:or.height),Ke=Ye.select("text");var Pr=0,_a=N&&Se==="top",Fa=!N&&Se==="right",Ra=0;if(Ke.node()&&!Ke.classed(p.jsPlaceholder)){var qa,Wa=Ye.select(".h"+vr._id+"title-math-group").node();Wa&&(N&&qr||!N&&!qr)?(or=n.bBox(Wa),Pr=or.width,qa=or.height):(or=n.bBox(Ye.node()),Pr=or.right-ee.l-(N?Je:Ar),qa=or.bottom-ee.t-(N?Ar:Je),!N&&Se==="top"&&(nr+=or.height,Ra=or.height)),Fa&&(Ke.attr("transform",o(Pr/2+Le/2,0)),Pr*=2),nr=Math.max(nr,N?Pr:qa)}var Ca=(N?Y:X)*2+nr+$+W/2,hi=0;!N&&we.text&&de==="bottom"&&V<=0&&(hi=Ca/2,Ca+=hi,Ra+=hi),j._hColorbarMoveTitle=hi,j._hColorbarMoveCBTitle=Ra;var wi=$+W,Yt=(N?Je:Ar)-wi/2-(N?Y:0),Rt=(N?Ar:Je)-(N?ne:X+Ra-hi);P.select("."+p.cbbg).attr("x",Yt).attr("y",Rt).attr(N?"width":"height",Math.max(Ca-hi,2)).attr(N?"height":"width",Math.max(ne+wi,2)).call(s.fill,ue).call(s.stroke,z.bordercolor).style("stroke-width",$);var Zt=Fa?Math.max(Pr-10,0):0;P.selectAll("."+p.cboutline).attr("x",(N?Je:Ar+Y)+Zt).attr("y",(N?Ar+X-ne:Je)+(_a?st:0)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(ne-(N?2*X+st:2*Y+Zt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":W});var Jt=N?St*Ca:0,Fr=N?0:(1-kt)*Ca-Ra;if(Jt=ae?ee.l-Jt:-Jt,Fr=le?ee.t-Fr:-Fr,P.attr("transform",o(Jt,Fr)),!N&&($||_(ue).getAlpha()&&!_.equals(j.paper_bgcolor,ue))){var ta=We.selectAll("text"),ra=ta[0].length,ca=P.select("."+p.cbbg).node(),Ba=n.bBox(ca),$a=n.getTranslate(P),Za=2;ta.each(function(Cr,wr){var Rr=0,Nr=ra-1;if(wr===Rr||wr===Nr){var Hr=n.bBox(this),gt=n.getTranslate(this),Kt;if(wr===Nr){var mr=Hr.right+gt.x,Ir=Ba.right+$a.x+Ar-$-Za+Q;Kt=Ir-mr,Kt>0&&(Kt=0)}else if(wr===Rr){var va=Hr.left+gt.x,Pa=Ba.left+$a.x+Ar+$+Za;Kt=Pa-va,Kt<0&&(Kt=0)}Kt&&(ra<3?this.setAttribute("transform","translate("+Kt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ri={},pi=A[ce],Ia=E[ce],rn=A[de],tn=E[de],cn=Ca-he;N?(L==="pixels"?(ri.y=V,ri.t=ne*rn,ri.b=ne*tn):(ri.t=ri.b=0,ri.yt=V+O*rn,ri.yb=V-O*tn),B==="pixels"?(ri.x=Q,ri.l=Ca*pi,ri.r=Ca*Ia):(ri.l=cn*pi,ri.r=cn*Ia,ri.xl=Q-U*pi,ri.xr=Q+U*Ia)):(L==="pixels"?(ri.x=Q,ri.l=ne*pi,ri.r=ne*Ia):(ri.l=ri.r=0,ri.xl=Q+O*pi,ri.xr=Q-O*Ia),B==="pixels"?(ri.y=1-V,ri.t=Ca*rn,ri.b=Ca*tn):(ri.t=cn*rn,ri.b=cn*tn,ri.yt=V-U*rn,ri.yb=V+U*tn));var xt=z.y<.5?"b":"t",ut=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Or={r:j.width-Yt-Jt,l:Yt+ri.r,b:j.height-Rt-Fr,t:Rt+ri.b};ae&&le?S.autoMargin(F,z._id,ri):ae?F._fullLayout._reservedMargin[z._id][xt]=Or[xt]:le||N?F._fullLayout._reservedMargin[z._id][ut]=Or[ut]:F._fullLayout._reservedMargin[z._id][xt]=Or[xt]}return r.syncOrAsync([S.previousPromises,Ct,jt,Pt,S.previousPromises,cr],F)}function g(P,z,F){var N=z.orientation==="v",O=F._fullLayout,L=O._size,U,B,W;t.init({element:P.node(),gd:F,prepFn:function(){U=P.attr("transform"),i(P)},moveFn:function($,ue){P.attr("transform",U+o($,ue)),B=t.align((N?z._uFrac:z._vFrac)+$/L.w,N?z._thickFrac:z._lenFrac,0,1,z.xanchor),W=t.align((N?z._vFrac:1-z._uFrac)-ue/L.h,N?z._lenFrac:z._thickFrac,0,1,z.yanchor);var ce=t.getCursor(B,W,z.xanchor,z.yanchor);i(P,ce)},doneFn:function(){if(i(P),B!==void 0&&W!==void 0){var $={};$[z._propPrefix+"x"]=B,$[z._propPrefix+"y"]=W,z._traceIndex!==void 0?M.call("_guiRestyle",F,$,z._traceIndex):M.call("_guiRelayout",F,$)}}})}function y(P,z,F){var N=z._levels,O=[],L=[],U,B,W=N.end+N.size/100,$=N.size,ue=1.001*F[0]-.001*F[1],ce=1.001*F[1]-.001*F[0];for(B=0;B<1e5&&(U=N.start+B*$,!($>0?U>=W:U<=W));B++)U>ue&&U0?U>=W:U<=W));B++)U>F[0]&&U-1}q.exports=function(o,a){var i,n=o.data,s=o.layout,h=M([],n),f=M({},s,e(a.tileClass)),m=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 c=Object.keys(f);for(i=0;i=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&v(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function f(m,c,T,l,x,w){w=w||{};var A=w.moduleHasSelected!==!1,E=w.moduleHasUnselected!==!1,p=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,d=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,g=!!w.hasPathbar,y=Array.isArray(x)||x==="auto",D=y||x==="inside",P=y||x==="outside";if(D||P){var z=i(l,"textfont",T.font),F=_.extendFlat({},z),N=m.textfont&&m.textfont.color,O=!N;if(O&&delete F.color,i(l,"insidetextfont",F),g){var L=_.extendFlat({},z);O&&delete L.color,i(l,"pathbar.textfont",L)}P&&i(l,"outsidetextfont",z),A&&l("selected.textfont.color"),E&&l("unselected.textfont.color"),p&&l("constraintext"),b&&l("cliponaxis"),d&&l("textangle"),l("texttemplate"),l("texttemplatefallback")}D&&u&&l("insidetextanchor")}q.exports={supplyDefaults:n,crossTraceDefaults:s,handleText:f,validateCornerradius:h}}}),J5=He({"src/traces/bar/layout_defaults.js"(Z,q){"use strict";var v=so(),_=Wo(),S=sa(),M=U2(),e=gd().validateCornerradius;q.exports=function(t,r,o){function a(A,E){return S.coerce(t,r,M,A,E)}for(var i=!1,n=!1,s=!1,h={},f=a("barmode"),m=f==="group",c=0;c0&&!h[l]&&(s=!0),h[l]=!0),T.visible&&T.type==="histogram"){var x=_.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);x.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)}}}),B_=He({"src/traces/bar/arrays_to_calcdata.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){for(var e=0;er;if(!o)return M}return e!==void 0?e:S.dflt},Z.coerceColor=function(S,M,e){return v(M).isValid()?M:e!==void 0?e:S.dflt},Z.coerceEnumerated=function(S,M,e){return S.coerceNumber&&(M=+M),S.values.indexOf(M)!==-1?M:e!==void 0?e:S.dflt},Z.getValue=function(S,M){var e;return _(S)?M1||g.bargap===0&&g.bargroupgap===0&&!y[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),d.selectAll("g.points").each(function(y){var D=v.select(this),P=y[0].trace;h(D,P,b)}),e.getComponentMethod("errorbars","style")(d)}function h(b,d,u){S.pointStyle(b.selectAll("path"),d,u),f(b,d,u)}function f(b,d,u){b.selectAll("text").each(function(g){var y=v.select(this),D=M.ensureUniformFontSize(u,l(y,g,d,u));S.font(y,D)})}function m(b,d,u){var g=d[0].trace;g.selectedpoints?c(u,g,b):(h(u,g,b),e.getComponentMethod("errorbars","style")(u))}function c(b,d,u){S.selectedPointStyle(b.selectAll("path"),d),T(b.selectAll("text"),d,u)}function T(b,d,u){b.each(function(g){var y=v.select(this),D;if(g.selected){D=M.ensureUniformFontSize(u,l(y,g,d,u));var P=d.selected.textfont&&d.selected.textfont.color;P&&(D.color=P),S.font(y,D)}else S.selectedTextStyle(y,d)})}function l(b,d,u,g){var y=g._fullLayout.font,D=u.textfont;if(b.classed("bartext-inside")){var P=p(d,u);D=w(u,d.i,y,P)}else b.classed("bartext-outside")&&(D=A(u,d.i,y));return D}function x(b,d,u){return E(o,b.textfont,d,u)}function w(b,d,u,g){var y=x(b,d,u),D=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[d]===void 0;return D&&(y={color:_.contrast(g),family:y.family,size:y.size,weight:y.weight,style:y.style,variant:y.variant,textcase:y.textcase,lineposition:y.lineposition,shadow:y.shadow}),E(a,b.insidetextfont,d,y)}function A(b,d,u){var g=x(b,d,u);return E(i,b.outsidetextfont,d,g)}function E(b,d,u,g){d=d||{};var y=n.getValue(d.family,u),D=n.getValue(d.size,u),P=n.getValue(d.color,u),z=n.getValue(d.weight,u),F=n.getValue(d.style,u),N=n.getValue(d.variant,u),O=n.getValue(d.textcase,u),L=n.getValue(d.lineposition,u),U=n.getValue(d.shadow,u);return{family:n.coerceString(b.family,y,g.family),size:n.coerceNumber(b.size,D,g.size),color:n.coerceColor(b.color,P,g.color),weight:n.coerceString(b.weight,z,g.weight),style:n.coerceString(b.style,F,g.style),variant:n.coerceString(b.variant,N,g.variant),textcase:n.coerceString(b.variant,O,g.textcase),lineposition:n.coerceString(b.variant,L,g.lineposition),shadow:n.coerceString(b.variant,U,g.shadow)}}function p(b,d){return d.type==="waterfall"?d[b.dir].marker.color:b.mcc||b.mc||d.marker.color}q.exports={style:s,styleTextPoints:f,styleOnSelect:m,getInsideTextFont:w,getOutsideTextFont:A,getBarColor:p,resizeText:t}}}),tg=He({"src/traces/bar/plot.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=sa(),M=su(),e=$n(),t=as(),r=so(),o=Wo().tickText,a=Sp(),i=a.recordMinTextSize,n=a.clearMinTextSize,s=Nd(),h=q2(),f=n0(),m=Sv(),c=m.text,T=m.textposition,l=$p().appendArrayPointValue,x=f.TEXTPAD;function w($){return $.id}function A($){if($.ids)return w}function E($){return($>0)-($<0)}function p($,ue){return $0}function g($,ue,ce,de,Y,X){var Q=ue.xaxis,V=ue.yaxis,le=$._fullLayout,ae=$._context.staticPlot;Y||(Y={mode:le.barmode,norm:le.barmode,gap:le.bargap,groupgap:le.bargroupgap},n("bar",le));var j=S.makeTraceGroups(de,ce,"trace bars").each(function(ee){var te=v.select(this),pe=ee[0].trace,we=ee[0].t,Se=pe.type==="waterfall",Re=pe.type==="funnel",Pe=pe.type==="histogram",je=pe.type==="bar",at=je||Re,nt=0;Se&&pe.connector.visible&&pe.connector.mode==="between"&&(nt=pe.connector.line.width/2);var tt=pe.orientation==="h",Ve=u(Y),he=S.ensureSingle(te,"g","points"),se=A(pe),ne=he.selectAll("g.point").data(S.identity,se);ne.enter().append("g").classed("point",!0),ne.exit().remove(),ne.each(function(Ze,rt){var Je=v.select(this),St=b(Ze,Q,V,tt),kt=St[0][0],Bt=St[0][1],Vt=St[1][0],Ar=St[1][1],vr=(tt?Bt-kt:Ar-Vt)===0;vr&&at&&h.getLineWidth(pe,Ze)&&(vr=!1),vr||(vr=!_(kt)||!_(Bt)||!_(Vt)||!_(Ar)),Ze.isBlank=vr,vr&&(tt?Bt=kt:Ar=Vt),nt&&!vr&&(tt?(kt-=p(kt,Bt)*nt,Bt+=p(kt,Bt)*nt):(Vt-=p(Vt,Ar)*nt,Ar+=p(Vt,Ar)*nt));var qr,kr;if(pe.type==="waterfall"){if(!vr){var Ur=pe[Ze.dir].marker;qr=Ur.line.width,kr=Ur.color}}else qr=h.getLineWidth(pe,Ze),kr=Ze.mc||pe.marker.color;function _t(wi){var Yt=v.round(qr/2%1,2);return Y.gap===0&&Y.groupgap===0?v.round(Math.round(wi)-Yt,2):wi}function Fe(wi,Yt,Rt){return Rt&&wi===Yt?wi:Math.abs(wi-Yt)>=2?_t(wi):wi>Yt?Math.ceil(wi):Math.floor(wi)}var Ye=e.opacity(kr),Ae=Ye<1||qr>.01?_t:Fe;$._context.staticPlot||(kt=Ae(kt,Bt,tt),Bt=Ae(Bt,kt,tt),Vt=Ae(Vt,Ar,!tt),Ar=Ae(Ar,Vt,!tt));var Le=tt?Q.c2p:V.c2p,We;Ze.s0>0?We=Ze._sMax:Ze.s0<0?We=Ze._sMin:We=Ze.s1>0?Ze._sMax:Ze._sMin;function Ke(wi,Yt){if(!wi)return 0;var Rt=Math.abs(tt?Ar-Vt:Bt-kt),Zt=Math.abs(tt?Bt-kt:Ar-Vt),Jt=Ae(Math.abs(Le(We,!0)-Le(0,!0))),Fr=Ze.hasB?Math.min(Rt/2,Zt/2):Math.min(Rt/2,Jt),ta;if(Yt==="%"){var ra=Math.min(50,wi);ta=Rt*(ra/100)}else ta=wi;return Ae(Math.max(Math.min(ta,Fr),0))}var st=je||Pe?Ke(we.cornerradiusvalue,we.cornerradiusform):0,ot,Ut,Ct="M"+kt+","+Vt+"V"+Ar+"H"+Bt+"V"+Vt+"Z",Pt=0;if(st&&Ze.s){var jt=E(Ze.s0)===0||E(Ze.s)===E(Ze.s0)?Ze.s1:Ze.s0;if(Pt=Ae(Ze.hasB?0:Math.abs(Le(We,!0)-Le(jt,!0))),Pt0?Math.sqrt(Pt*(2*st-Pt)):0,Fa=cr>0?Math.max:Math.min;ot="M"+kt+","+Vt+"V"+(Ar-Pr*or)+"H"+Fa(Bt-(st-Pt)*cr,kt)+"A "+st+","+st+" 0 0 "+nr+" "+Bt+","+(Ar-st*or-_a)+"V"+(Vt+st*or+_a)+"A "+st+","+st+" 0 0 "+nr+" "+Fa(Bt-(st-Pt)*cr,kt)+","+(Vt+Pr*or)+"Z"}else if(Ze.hasB)ot="M"+(kt+st*cr)+","+Vt+"A "+st+","+st+" 0 0 "+nr+" "+kt+","+(Vt+st*or)+"V"+(Ar-st*or)+"A "+st+","+st+" 0 0 "+nr+" "+(kt+st*cr)+","+Ar+"H"+(Bt-st*cr)+"A "+st+","+st+" 0 0 "+nr+" "+Bt+","+(Ar-st*or)+"V"+(Vt+st*or)+"A "+st+","+st+" 0 0 "+nr+" "+(Bt-st*cr)+","+Vt+"Z";else{Ut=Math.abs(Ar-Vt)+Pt;var Ra=Ut0?Math.sqrt(Pt*(2*st-Pt)):0,Wa=or>0?Math.max:Math.min;ot="M"+(kt+Ra*cr)+","+Vt+"V"+Wa(Ar-(st-Pt)*or,Vt)+"A "+st+","+st+" 0 0 "+nr+" "+(kt+st*cr-qa)+","+Ar+"H"+(Bt-st*cr+qa)+"A "+st+","+st+" 0 0 "+nr+" "+(Bt-Ra*cr)+","+Wa(Ar-(st-Pt)*or,Vt)+"V"+Vt+"Z"}}else ot=Ct}else ot=Ct;var Ca=d(S.ensureSingle(Je,"path"),le,Y,X);if(Ca.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((Bt-kt)*(Ar-Vt))||vr&&$._context.staticPlot?"M0,0Z":ot).call(t.setClipUrl,ue.layerClipId,$),!le.uniformtext.mode&&Ve){var hi=t.makePointStyleFns(pe);t.singlePointStyle(Ze,Ca,pe,hi,$)}y($,ue,Je,ee,rt,kt,Bt,Vt,Ar,st,Pt,Y,X),ue.layerClipId&&t.hideOutsideRangePoint(Ze,Je.select("text"),Q,V,pe.xcalendar,pe.ycalendar)});var Ce=pe.cliponaxis===!1;t.setClipUrl(te,Ce?null:ue.layerClipId,$)});r.getComponentMethod("errorbars","plot")($,j,ue,Y)}function y($,ue,ce,de,Y,X,Q,V,le,ae,j,ee,te){var pe=ue.xaxis,we=ue.yaxis,Se=$._fullLayout,Re;function Pe(Ut,Ct,Pt){var jt=S.ensureSingle(Ut,"text").text(Ct).attr({class:"bartext bartext-"+Re,"text-anchor":"middle","data-notex":1}).call(t.font,Pt).call(M.convertToTspans,$);return jt}var je=de[0].trace,at=je.orientation==="h",nt=L(Se,de,Y,pe,we);Re=U(je,Y);var tt=ee.mode==="stack"||ee.mode==="relative",Ve=de[Y],he=!tt||Ve._outmost,se=Ve.hasB,ne=ae&&ae-j>x;if(!nt||Re==="none"||(Ve.isBlank||X===Q||V===le)&&(Re==="auto"||Re==="inside")){ce.select("text").remove();return}var Ce=Se.font,Ze=s.getBarColor(de[Y],je),rt=s.getInsideTextFont(je,Y,Ce,Ze),Je=s.getOutsideTextFont(je,Y,Ce),St=je.insidetextanchor||"end",kt=ce.datum();at?pe.type==="log"&&kt.s0<=0&&(pe.range[0]0&&_t>0,Ae;ne?se?Ae=D(Ar-2*ae,vr,Ur,_t,at)||D(Ar,vr-2*ae,Ur,_t,at):at?Ae=D(Ar-(ae-j),vr,Ur,_t,at)||D(Ar,vr-2*(ae-j),Ur,_t,at):Ae=D(Ar,vr-(ae-j),Ur,_t,at)||D(Ar-2*(ae-j),vr,Ur,_t,at):Ae=D(Ar,vr,Ur,_t,at),Ye&&Ae?Re="inside":(Re="outside",qr.remove(),qr=null)}else Re="inside";if(!qr){Fe=S.ensureUniformFontSize($,Re==="outside"?Je:rt),qr=Pe(ce,nt,Fe);var Le=qr.attr("transform");if(qr.attr("transform",""),kr=t.bBox(qr.node()),Ur=kr.width,_t=kr.height,qr.attr("transform",Le),Ur<=0||_t<=0){qr.remove();return}}var We=je.textangle,Ke,st;Re==="outside"?(st=je.constraintext==="both"||je.constraintext==="outside",Ke=O(X,Q,V,le,kr,{isHorizontal:at,constrained:st,angle:We})):(st=je.constraintext==="both"||je.constraintext==="inside",Ke=F(X,Q,V,le,kr,{isHorizontal:at,constrained:st,angle:We,anchor:St,hasB:se,r:ae,overhead:j})),Ke.fontSize=Fe.size,i(je.type==="histogram"?"bar":je.type,Ke,Se),Ve.transform=Ke;var ot=d(qr,Se,ee,te);S.setTransormAndDisplay(ot,Ke)}function D($,ue,ce,de,Y){if($<0||ue<0)return!1;var X=ce<=$&&de<=ue,Q=ce<=ue&&de<=$,V=Y?$>=ce*(ue/de):ue>=de*($/ce);return X||Q||V}function P($){return $==="auto"?0:$}function z($,ue){var ce=Math.PI/180*ue,de=Math.abs(Math.sin(ce)),Y=Math.abs(Math.cos(ce));return{x:$.width*Y+$.height*de,y:$.width*de+$.height*Y}}function F($,ue,ce,de,Y,X){var Q=!!X.isHorizontal,V=!!X.constrained,le=X.angle||0,ae=X.anchor,j=ae==="end",ee=ae==="start",te=X.leftToRight||0,pe=(te+1)/2,we=1-pe,Se=X.hasB,Re=X.r,Pe=X.overhead,je=Y.width,at=Y.height,nt=Math.abs(ue-$),tt=Math.abs(de-ce),Ve=nt>2*x&&tt>2*x?x:0;nt-=2*Ve,tt-=2*Ve;var he=P(le);le==="auto"&&!(je<=nt&&at<=tt)&&(je>nt||at>tt)&&(!(je>tt||at>nt)||jex){var Ze=N($,ue,ce,de,se,Re,Pe,Q,Se);ne=Ze.scale,Ce=Ze.pad}else ne=1,V&&(ne=Math.min(1,nt/se.x,tt/se.y)),Ce=0;var rt=Y.left*we+Y.right*pe,Je=(Y.top+Y.bottom)/2,St=($+x)*we+(ue-x)*pe,kt=(ce+de)/2,Bt=0,Vt=0;if(ee||j){var Ar=(Q?se.x:se.y)/2;Re&&(j||Se)&&(Ve+=Ce);var vr=Q?p($,ue):p(ce,de);Q?ee?(St=$+vr*Ve,Bt=-vr*Ar):(St=ue-vr*Ve,Bt=vr*Ar):ee?(kt=ce+vr*Ve,Vt=-vr*Ar):(kt=de-vr*Ve,Vt=vr*Ar)}return{textX:rt,textY:Je,targetX:St,targetY:kt,anchorX:Bt,anchorY:Vt,scale:ne,rotate:he}}function N($,ue,ce,de,Y,X,Q,V,le){var ae=Math.max(0,Math.abs(ue-$)-2*x),j=Math.max(0,Math.abs(de-ce)-2*x),ee=X-x,te=Q?ee-Math.sqrt(ee*ee-(ee-Q)*(ee-Q)):ee,pe=le?ee*2:V?ee-Q:2*te,we=le?ee*2:V?2*te:ee-Q,Se,Re,Pe,je,at;return Y.y/Y.x>=j/(ae-pe)?je=j/Y.y:Y.y/Y.x<=(j-we)/ae?je=ae/Y.x:!le&&V?(Se=Y.x*Y.x+Y.y*Y.y/4,Re=-2*Y.x*(ae-ee)-Y.y*(j/2-ee),Pe=(ae-ee)*(ae-ee)+(j/2-ee)*(j/2-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)):le?(Se=(Y.x*Y.x+Y.y*Y.y)/4,Re=-Y.x*(ae/2-ee)-Y.y*(j/2-ee),Pe=(ae/2-ee)*(ae/2-ee)+(j/2-ee)*(j/2-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)):(Se=Y.x*Y.x/4+Y.y*Y.y,Re=-Y.x*(ae/2-ee)-2*Y.y*(j-ee),Pe=(ae/2-ee)*(ae/2-ee)+(j-ee)*(j-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)),je=Math.min(1,je),V?at=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(j-Y.y*je)/2)*(ee-(j-Y.y*je)/2)))-Q):at=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(ae-Y.x*je)/2)*(ee-(ae-Y.x*je)/2)))-Q),{scale:je,pad:at}}function O($,ue,ce,de,Y,X){var Q=!!X.isHorizontal,V=!!X.constrained,le=X.angle||0,ae=Y.width,j=Y.height,ee=Math.abs(ue-$),te=Math.abs(de-ce),pe;Q?pe=te>2*x?x:0:pe=ee>2*x?x:0;var we=1;V&&(we=Q?Math.min(1,te/j):Math.min(1,ee/ae));var Se=P(le),Re=z(Y,Se),Pe=(Q?Re.x:Re.y)/2,je=(Y.left+Y.right)/2,at=(Y.top+Y.bottom)/2,nt=($+ue)/2,tt=(ce+de)/2,Ve=0,he=0,se=Q?p(ue,$):p(ce,de);return Q?(nt=ue-se*pe,Ve=se*Pe):(tt=de+se*pe,he=-se*Pe),{textX:je,textY:at,targetX:nt,targetY:tt,anchorX:Ve,anchorY:he,scale:we,rotate:Se}}function L($,ue,ce,de,Y){var X=ue[0].trace,Q=X.texttemplate,V;return Q?V=B($,ue,ce,de,Y):X.textinfo?V=W(ue,ce,de,Y):V=h.getValue(X.text,ce),h.coerceString(c,V)}function U($,ue){var ce=h.getValue($.textposition,ue);return h.coerceEnumerated(T,ce)}function B($,ue,ce,de,Y){var X=ue[0].trace,Q=S.castOption(X,ce,"texttemplate");if(!Q)return"";var V=X.type==="histogram",le=X.type==="waterfall",ae=X.type==="funnel",j=X.orientation==="h",ee,te,pe,we;j?(ee="y",te=Y,pe="x",we=de):(ee="x",te=de,pe="y",we=Y);function Se(Ve){return o(te,te.c2l(Ve),!0).text}function Re(Ve){return o(we,we.c2l(Ve),!0).text}var Pe=ue[ce],je={};je.label=Pe.p,je.labelLabel=je[ee+"Label"]=Se(Pe.p);var at=S.castOption(X,Pe.i,"text");(at===0||at)&&(je.text=at),je.value=Pe.s,je.valueLabel=je[pe+"Label"]=Re(Pe.s);var nt={};l(nt,X,Pe.i),(V||nt.x===void 0)&&(nt.x=j?je.value:je.label),(V||nt.y===void 0)&&(nt.y=j?je.label:je.value),(V||nt.xLabel===void 0)&&(nt.xLabel=j?je.valueLabel:je.labelLabel),(V||nt.yLabel===void 0)&&(nt.yLabel=j?je.labelLabel:je.valueLabel),le&&(je.delta=+Pe.rawS||Pe.s,je.deltaLabel=Re(je.delta),je.final=Pe.v,je.finalLabel=Re(je.final),je.initial=je.final-je.delta,je.initialLabel=Re(je.initial)),ae&&(je.value=Pe.s,je.valueLabel=Re(je.value),je.percentInitial=Pe.begR,je.percentInitialLabel=S.formatPercent(Pe.begR),je.percentPrevious=Pe.difR,je.percentPreviousLabel=S.formatPercent(Pe.difR),je.percentTotal=Pe.sumR,je.percenTotalLabel=S.formatPercent(Pe.sumR));var tt=S.castOption(X,Pe.i,"customdata");return tt&&(je.customdata=tt),S.texttemplateString({data:[nt,je,X._meta],fallback:X.texttemplatefallback,labels:je,locale:$._d3locale,template:Q})}function W($,ue,ce,de){var Y=$[0].trace,X=Y.orientation==="h",Q=Y.type==="waterfall",V=Y.type==="funnel";function le(tt){var Ve=X?de:ce;return o(Ve,tt,!0).text}function ae(tt){var Ve=X?ce:de;return o(Ve,+tt,!0).text}var j=Y.textinfo,ee=$[ue],te=j.split("+"),pe=[],we,Se=function(tt){return te.indexOf(tt)!==-1};if(Se("label")&&pe.push(le($[ue].p)),Se("text")&&(we=S.castOption(Y,ee.i,"text"),(we===0||we)&&pe.push(we)),Q){var Re=+ee.rawS||ee.s,Pe=ee.v,je=Pe-Re;Se("initial")&&pe.push(ae(je)),Se("delta")&&pe.push(ae(Re)),Se("final")&&pe.push(ae(Pe))}if(V){Se("value")&&pe.push(ae(ee.s));var at=0;Se("percent initial")&&at++,Se("percent previous")&&at++,Se("percent total")&&at++;var nt=at>1;Se("percent initial")&&(we=S.formatPercent(ee.begR),nt&&(we+=" of initial"),pe.push(we)),Se("percent previous")&&(we=S.formatPercent(ee.difR),nt&&(we+=" of previous"),pe.push(we)),Se("percent total")&&(we=S.formatPercent(ee.sumR),nt&&(we+=" of total"),pe.push(we))}return pe.join("
")}q.exports={plot:g,toMoveInsideBar:F}}}),f1=He({"src/traces/bar/hover.js"(Z,q){"use strict";var v=Hc(),_=so(),S=$n(),M=sa().fillText,e=q2().getLineWidth,t=Wo().hoverLabelText,r=Gs().BADNUM;function o(n,s,h,f,m){var c=a(n,s,h,f,m);if(c){var T=c.cd,l=T[0].trace,x=T[c.index];return c.color=i(l,x),_.getComponentMethod("errorbars","hoverInfo")(x,l,c),[c]}}function a(n,s,h,f,m){var c=n.cd,T=c[0].trace,l=c[0].t,x=f==="closest",w=T.type==="waterfall",A=n.maxHoverDistance,E=n.maxSpikeDistance,p,b,d,u,g,y,D;T.orientation==="h"?(p=h,b=s,d="y",u="x",g=de,y=$):(p=s,b=h,d="x",u="y",y=de,g=$);var P=T[d+"period"],z=x||P;function F(we){return O(we,-1)}function N(we){return O(we,1)}function O(we,Se){var Re=we.w;return we[d]+Se*Re/2}function L(we){return we[d+"End"]-we[d+"Start"]}var U=x?F:P?function(we){return we.p-L(we)/2}:function(we){return Math.min(F(we),we.p-l.bardelta/2)},B=x?N:P?function(we){return we.p+L(we)/2}:function(we){return Math.max(N(we),we.p+l.bardelta/2)};function W(we,Se,Re){return m.finiteRange&&(Re=0),v.inbox(we-p,Se-p,Re+Math.min(1,Math.abs(Se-we)/D)-1)}function $(we){return W(U(we),B(we),A)}function ue(we){return W(F(we),N(we),E)}function ce(we){var Se=we[u];if(w){var Re=Math.abs(we.rawS)||0;b>0?Se+=Re:b<0&&(Se-=Re)}return Se}function de(we){var Se=b,Re=we.b,Pe=ce(we);return v.inbox(Re-Se,Pe-Se,A+(Pe-Se)/(Pe-Re)-1)}function Y(we){var Se=b,Re=we.b,Pe=ce(we);return v.inbox(Re-Se,Pe-Se,E+(Pe-Se)/(Pe-Re)-1)}var X=n[d+"a"],Q=n[u+"a"];D=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function V(we){return(g(we)+y(we))/2}var le=v.getDistanceFunction(f,g,y,V);if(v.getClosest(c,le,n),n.index!==!1&&c[n.index].p!==r){z||(U=function(we){return Math.min(F(we),we.p-l.bargroupwidth/2)},B=function(we){return Math.max(N(we),we.p+l.bargroupwidth/2)});var ae=n.index,j=c[ae],ee=T.base?j.b+j.s:j.s;n[u+"0"]=n[u+"1"]=Q.c2p(j[u],!0),n[u+"LabelVal"]=ee;var te=l.extents[l.extents.round(j.p)];n[d+"0"]=X.c2p(x?U(j):te[0],!0),n[d+"1"]=X.c2p(x?B(j):te[1],!0);var pe=j.orig_p!==void 0;return n[d+"LabelVal"]=pe?j.orig_p:j.p,n.labelLabel=t(X,n[d+"LabelVal"],T[d+"hoverformat"]),n.valueLabel=t(Q,n[u+"LabelVal"],T[u+"hoverformat"]),n.baseLabel=t(Q,j.b,T[u+"hoverformat"]),n.spikeDistance=(Y(j)+ue(j))/2,n[d+"Spike"]=X.c2p(j.p,!0),M(j,T,n),n.hovertemplate=T.hovertemplate,n}}function i(n,s){var h=s.mcc||n.marker.color,f=s.mlcc||n.marker.line.color,m=e(n,s);if(S.opacity(h))return h;if(S.opacity(f)&&m)return f}q.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:i}}}),K9=He({"src/traces/bar/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),M.orientation==="h"?(_.label=_.y,_.value=_.x):(_.label=_.x,_.value=_.y),_}}}),h1=He({"src/traces/bar/select.js"(Z,q){"use strict";q.exports=function(S,M){var e=S.cd,t=S.xaxis,r=S.yaxis,o=e[0].trace,a=o.type==="funnel",i=o.orientation==="h",n=[],s;if(M===!1)for(s=0;s0?(P="v",d>0?z=Math.min(g,u):z=Math.min(u)):d>0?(P="h",z=Math.min(g)):z=0;if(!z){h.visible=!1;return}h._length=z;var U=f("orientation",P);h._hasPreCompStats?U==="v"&&d===0?(f("x0",0),f("dx",1)):U==="h"&&b===0&&(f("y0",0),f("dy",1)):U==="v"&&d===0?f("x0"):U==="h"&&b===0&&f("y0");var B=_.getComponentMethod("calendars","handleTraceDefaults");B(s,h,["x","y"],m)}function i(s,h,f,m){var c=m.prefix,T=v.coerce2(s,h,r,"marker.outliercolor"),l=f("marker.line.outliercolor"),x="outliers";h._hasPreCompStats?x="all":(T||l)&&(x="suspectedoutliers");var w=f(c+"points",x);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",h.line.color),f("marker.line.color"),f("marker.line.width"),w==="suspectedoutliers"&&(f("marker.line.outliercolor",h.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 h.marker;var A=f("hoveron");(A==="all"||A.indexOf("points")!==-1)&&(f("hovertemplate"),f("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(h,f)}function n(s,h){var f,m;function c(w){return v.coerce(m._input,m,r,w)}for(var T=0;Tce.uf};if(E._hasPreCompStats){var ae=E[z],j=function(vr){return P.d2c((E[vr]||[])[y])},ee=1/0,te=-1/0;for(y=0;y=ce.q1&&ce.q3>=ce.med){var we=j("lowerfence");ce.lf=we!==e&&we<=ce.q1?we:m(ce,Y,X);var Se=j("upperfence");ce.uf=Se!==e&&Se>=ce.q3?Se:c(ce,Y,X);var Re=j("mean");ce.mean=Re!==e?Re:X?M.mean(Y,X):(ce.q1+ce.q3)/2;var Pe=j("sd");ce.sd=Re!==e&&Pe>=0?Pe:X?M.stdev(Y,X,ce.mean):ce.q3-ce.q1,ce.lo=T(ce),ce.uo=l(ce);var je=j("notchspan");je=je!==e&&je>0?je:x(ce,X),ce.ln=ce.med-je,ce.un=ce.med+je;var at=ce.lf,nt=ce.uf;E.boxpoints&&Y.length&&(at=Math.min(at,Y[0]),nt=Math.max(nt,Y[X-1])),E.notched&&(at=Math.min(at,ce.ln),nt=Math.max(nt,ce.un)),ce.min=at,ce.max=nt}else{M.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ce.q1,"median = "+ce.med,"q3 = "+ce.q3].join(` -`));var tt;ce.med!==e?tt=ce.med:ce.q1!==e?ce.q3!==e?tt=(ce.q1+ce.q3)/2:tt=ce.q1:ce.q3!==e?tt=ce.q3:tt=0,ce.med=tt,ce.q1=ce.q3=tt,ce.lf=ce.uf=tt,ce.mean=ce.sd=tt,ce.ln=ce.un=tt,ce.min=ce.max=tt}ee=Math.min(ee,ce.min),te=Math.max(te,ce.max),ce.pts2=de.filter(le),u.push(ce)}}E._extremes[P._id]=_.findExtremes(P,[ee,te],{padded:!0})}else{var Ve=P.makeCalcdata(E,z),he=o($,ue),se=$.length,ne=a(se);for(y=0;y=0&&Ce0){if(ce={},ce.pos=ce[N]=$[y],de=ce.pts=ne[y].sort(h),Y=ce[z]=de.map(f),X=Y.length,ce.min=Y[0],ce.max=Y[X-1],ce.mean=M.mean(Y,X),ce.sd=M.stdev(Y,X,ce.mean)*E.sdmultiple,ce.med=M.interp(Y,.5),X%2&&(St||kt)){var Bt,Vt;St?(Bt=Y.slice(0,X/2),Vt=Y.slice(X/2+1)):kt&&(Bt=Y.slice(0,X/2+1),Vt=Y.slice(X/2)),ce.q1=M.interp(Bt,.5),ce.q3=M.interp(Vt,.5)}else ce.q1=M.interp(Y,.25),ce.q3=M.interp(Y,.75);ce.lf=m(ce,Y,X),ce.uf=c(ce,Y,X),ce.lo=T(ce),ce.uo=l(ce);var Ar=x(ce,X);ce.ln=ce.med-Ar,ce.un=ce.med+Ar,Ze=Math.min(Ze,ce.ln),rt=Math.max(rt,ce.un),ce.pts2=de.filter(le),u.push(ce)}E.notched&&M.isTypedArray(Ve)&&(Ve=Array.from(Ve)),E._extremes[P._id]=_.findExtremes(P,E.notched?Ve.concat([Ze,rt]):Ve,{padded:!0})}return s(u,E),u.length>0?(u[0].t={num:p[g],dPos:ue,posLetter:N,valLetter:z,labels:{med:t(A,"median:"),min:t(A,"min:"),q1:t(A,"q1:"),q3:t(A,"q3:"),max:t(A,"max:"),mean:E.boxmean==="sd"||E.sizemode==="sd"?t(A,"mean \xB1 \u03C3:").replace("\u03C3",E.sdmultiple===1?"\u03C3":E.sdmultiple+"\u03C3"):t(A,"mean:"),lf:t(A,"lower fence:"),uf:t(A,"upper fence:")}},p[g]++,u):[{t:{empty:!0}}]};function r(w,A,E,p){var b=A in w,d=A+"0"in w,u="d"+A in w;if(b||d&&u){var g=E.makeCalcdata(w,A),y=S(w,E,A,g).vals;return[y,g]}var D;d?D=w[A+"0"]:"name"in w&&(E.type==="category"||v(w.name)&&["linear","log"].indexOf(E.type)!==-1||M.isDateTime(w.name)&&E.type==="date")?D=w.name:D=p;for(var P=E.type==="multicategory"?E.r2c_just_indices(D):E.d2c(D,0,w[A+"calendar"]),z=w._length,F=new Array(z),N=0;N1,d=1-s[r+"gap"],u=1-s[r+"groupgap"];for(m=0;m0;if(P==="positive"?(ce=z*(D?1:.5),X=Y,de=X=N):P==="negative"?(ce=X=N,de=z*(D?1:.5),Q=Y):(ce=de=z,X=Q=Y),te){var pe=g.pointpos,we=g.jitter,Se=g.marker.size/2,Re=0;pe+we>=0&&(Re=Y*(pe+we),Re>ce?(ee=!0,ae=Se,V=Re):Re>X&&(ae=Se,V=ce)),Re<=ce&&(V=ce);var Pe=0;pe-we<=0&&(Pe=-Y*(pe-we),Pe>de?(ee=!0,j=Se,le=Pe):Pe>Q&&(j=Se,le=de)),Pe<=de&&(le=de)}else V=ce,le=de;var je=new Array(T.length);for(c=0;cE.lo&&(U.so=!0)}return b});A.enter().append("path").classed("point",!0),A.exit().remove(),A.call(S.translatePoints,f,m)}function a(i,n,s,h){var f=n.val,m=n.pos,c=!!m.rangebreaks,T=h.bPos,l=h.bPosPxOffset||0,x=s.boxmean||(s.meanline||{}).visible,w,A;Array.isArray(h.bdPos)?(w=h.bdPos[0],A=h.bdPos[1]):(w=h.bdPos,A=h.bdPos);var E=i.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?_.identity:[]);E.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),E.exit().remove(),E.each(function(p){var b=m.c2l(p.pos+T,!0),d=m.l2p(b-w)+l,u=m.l2p(b+A)+l,g=c?(d+u)/2:m.l2p(b)+l,y=f.c2p(p.mean,!0),D=f.c2p(p.mean-p.sd,!0),P=f.c2p(p.mean+p.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+y+","+d+"V"+u+(x==="sd"?"m0,0L"+D+","+g+"L"+y+","+d+"L"+P+","+g+"Z":"")):v.select(this).attr("d","M"+d+","+y+"H"+u+(x==="sd"?"m0,0L"+g+","+D+"L"+d+","+y+"L"+g+","+P+"Z":""))})}q.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=He({"src/traces/box/style.js"(Z,q){"use strict";var v=Vn(),_=$n(),S=as();function M(t,r,o){var a=o||v.select(t).selectAll("g.trace.boxes");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var n=v.select(this),s=i[0].trace,h=s.line.width;function f(T,l,x,w){T.style("stroke-width",l+"px").call(_.stroke,x).call(_.fill,w)}var m=n.selectAll("path.box");if(s.type==="candlestick")m.each(function(T){if(!T.empty){var l=v.select(this),x=s[T.dir];f(l,x.line.width,x.line.color,x.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{f(m,h,s.line.color,s.fillcolor),n.selectAll("path.mean").style({"stroke-width":h,"stroke-dasharray":2*h+"px,"+h+"px"}).call(_.stroke,s.line.color);var c=n.selectAll("path.point");S.pointStyle(c,s,t)}})}function e(t,r,o){var a=r[0].trace,i=o.selectAll("path.point");a.selectedpoints?S.selectedPointStyle(i,a):S.pointStyle(i,a,t)}q.exports={style:M,styleOnSelect:e}}}),Q5=He({"src/traces/box/hover.js"(Z,q){"use strict";var v=Wo(),_=sa(),S=Hc(),M=$n(),e=_.fillText;function t(a,i,n,s){var h=a.cd,f=h[0].trace,m=f.hoveron,c=[],T;return m.indexOf("boxes")!==-1&&(c=c.concat(r(a,i,n,s))),m.indexOf("points")!==-1&&(T=o(a,i,n)),s==="closest"?T?[T]:c:(T&&c.push(T),c)}function r(a,i,n,s){var h=a.cd,f=a.xa,m=a.ya,c=h[0].trace,T=h[0].t,l=c.type==="violin",x,w,A,E,p,b,d,u,g,y,D,P=T.bdPos,z,F,N=T.wHover,O=function(Pe){return A.c2l(Pe.pos)+T.bPos-A.c2l(b)};l&&c.side!=="both"?(c.side==="positive"&&(g=function(Pe){var je=O(Pe);return S.inbox(je,je+N,y)},z=P,F=0),c.side==="negative"&&(g=function(Pe){var je=O(Pe);return S.inbox(je-N,je,y)},z=0,F=P)):(g=function(Pe){var je=O(Pe);return S.inbox(je-N,je+N,y)},z=F=P);var L;l?L=function(Pe){return S.inbox(Pe.span[0]-p,Pe.span[1]-p,y)}:L=function(Pe){return S.inbox(Pe.min-p,Pe.max-p,y)},c.orientation==="h"?(p=i,b=n,d=L,u=g,x="y",A=m,w="x",E=f):(p=n,b=i,d=g,u=L,x="x",A=f,w="y",E=m);var U=Math.min(1,P/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));y=a.maxHoverDistance-U,D=a.maxSpikeDistance-U;function B(Pe){return(d(Pe)+u(Pe))/2}var W=S.getDistanceFunction(s,d,u,B);if(S.getClosest(h,W,a),a.index===!1)return[];var $=h[a.index],ue=c.line.color,ce=(c.marker||{}).color;M.opacity(ue)&&c.line.width?a.color=ue:M.opacity(ce)&&c.boxpoints?a.color=ce:a.color=c.fillcolor,a[x+"0"]=A.c2p($.pos+T.bPos-F,!0),a[x+"1"]=A.c2p($.pos+T.bPos+z,!0),a[x+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var de=x+"Spike";a.spikeDistance=B($)*D/y,a[de]=A.c2p($.pos,!0);var Y=c.boxmean||c.sizemode==="sd"||(c.meanline||{}).visible,X=c.boxpoints||c.points,Q=X&&Y?["max","uf","q3","med","mean","q1","lf","min"]:X&&!Y?["max","uf","q3","med","q1","lf","min"]:!X&&Y?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],V=E.range[1]0&&(o=!0);for(var s=0;st){var r=t-M[_];return M[_]=t,r}}else return M[_]=t,t;return 0},max:function(_,S,M,e){var t=e[S];if(v(t))if(t=Number(t),v(M[_])){if(M[_]d&&dM){var y=u===_?1:6,D=u===_?"M12":"M1";return function(P,z){var F=T.c2d(P,_,l),N=F.indexOf("-",y);N>0&&(F=F.slice(0,N));var O=T.d2c(F,0,l);if(Or?h>M?h>_*1.1?_:h>S*1.1?S:M:h>e?e:h>t?t:r:Math.pow(10,Math.floor(Math.log(h)/Math.LN10))}function n(h,f,m,c,T,l){if(c&&h>M){var x=s(f,T,l),w=s(m,T,l),A=h===_?0:1;return x[A]!==w[A]}return Math.floor(m/h)-Math.floor(f/h)>.1}function s(h,f,m){var c=f.c2d(h,_,m).split("-");return c[0]===""&&(c.unshift(),c[0]="-"+c[0]),c}}}),oS=He({"src/traces/histogram/calc.js"(Z,q){"use strict";var v=ns(),_=sa(),S=so(),M=Wo(),{hasColorscale:e}=wp(),t=Tp(),r=B_(),o=rS(),a=aS(),i=iS(),n=nS();function s(T,l){var x=[],w=[],A=l.orientation==="h",E=M.getFromId(T,A?l.yaxis:l.xaxis),p=A?"y":"x",b={x:"y",y:"x"}[p],d=l[p+"calendar"],u=l.cumulative,g,y=h(T,l,E,p),D=y[0],P=y[1],z=typeof D.size=="string",F=[],N=z?F:D,O=[],L=[],U=[],B=0,W=l.histnorm,$=l.histfunc,ue=W.indexOf("density")!==-1,ce,de,Y;u.enabled&&ue&&(W=W.replace(/ ?density$/,""),ue=!1);var X=$==="max"||$==="min",Q=X?null:0,V=o.count,le=a[W],ae=!1,j=function(Ce){return E.r2c(Ce,0,d)},ee;for(_.isArrayOrTypedArray(l[b])&&$!=="count"&&(ee=l[b],ae=$==="avg",V=o[$]),g=j(D.start),de=j(D.end)+(g-M.tickIncrement(g,D.size,!1,d))/1e6;g=0&&Y=he;g--)if(w[g]){se=g;break}for(g=he;g<=se;g++)if(v(x[g])&&v(w[g])){var ne={p:x[g],s:w[g],b:0};u.enabled||(ne.pts=U[g],Se?ne.ph0=ne.ph1=U[g].length?P[U[g][0]]:x[g]:(l._computePh=!0,ne.ph0=nt(F[g]),ne.ph1=nt(F[g+1],!0))),Ve.push(ne)}return Ve.length===1&&(Ve[0].width1=M.tickIncrement(Ve[0].p,D.size,!1,d)-Ve[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(Ve,l),_.isArrayOrTypedArray(l.selectedpoints)&&_.tagSelected(Ve,l,je),Ve}function h(T,l,x,w,A){var E=w+"bins",p=T._fullLayout,b=l["_"+w+"bingroup"],d=p._histogramBinOpts[b],u=p.barmode==="overlay",g,y,D,P,z,F,N,O=function(at){return x.r2c(at,0,P)},L=function(at){return x.c2r(at,0,P)},U=x.type==="date"?function(at){return at||at===0?_.cleanDate(at,null,P):null}:function(at){return v(at)?Number(at):null};function B(at,nt,tt){nt[at+"Found"]?(nt[at]=U(nt[at]),nt[at]===null&&(nt[at]=tt[at])):(F[at]=nt[at]=tt[at],_.nestedProperty(y[0],E+"."+at).set(tt[at]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{y=d.traces;var W=[],$=!0,ue=!1,ce=!1;for(g=0;g"u"){if(A)return[Y,z,!0];Y=f(T,l,x,w,E)}N=D.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?Y.start=L(M.tickIncrement(O(Y.start),Y.size,!0,P)):Y.end=L(M.tickIncrement(O(Y.end),Y.size,!1,P))),d.size=Y.size,d.sizeFound||(F.size=Y.size,_.nestedProperty(y[0],E+".size").set(Y.size)),B("start",d,Y),B("end",d,Y)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var Q=l._input[E]||{},V=_.extendFlat({},d),le=d.start,ae=x.r2l(Q.start),j=ae!==void 0;if((d.startFound||j)&&ae!==x.r2l(le)){var ee=j?ae:_.aggNums(Math.min,null,z),te={type:x.type==="category"||x.type==="multicategory"?"linear":x.type,r2l:x.r2l,dtick:d.size,tick0:le,calendar:P,range:[ee,M.tickIncrement(ee,d.size,!1,P)].map(x.l2r)},pe=M.tickFirst(te);pe>x.r2l(ee)&&(pe=M.tickIncrement(pe,d.size,!0,P)),V.start=x.l2r(pe),j||_.nestedProperty(l,E+".start").set(V.start)}var we=d.end,Se=x.r2l(Q.end),Re=Se!==void 0;if((d.endFound||Re)&&Se!==x.r2l(we)){var Pe=Re?Se:_.aggNums(Math.max,null,z);V.end=x.l2r(Pe),Re||_.nestedProperty(l,E+".start").set(V.end)}var je="autobin"+w;return l._input[je]===!1&&(l._input[E]=_.extendFlat({},l[E]||{}),delete l._input[je],delete l[je]),[V,z]}function f(T,l,x,w,A){var E=T._fullLayout,p=m(T,l),b=!1,d=1/0,u=[l],g,y,D;for(g=0;g=0;w--)b(w);else if(l==="increasing"){for(w=1;w=0;w--)T[w]+=T[w+1];x==="exclude"&&(T.push(0),T.shift())}}q.exports={calc:s,calcAllAutoBins:h}}}),aF=He({"src/traces/histogram2d/calc.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=rS(),M=aS(),e=iS(),t=nS(),r=oS().calcAllAutoBins;q.exports=function(s,h){var f=_.getFromId(s,h.xaxis),m=_.getFromId(s,h.yaxis),c=h.xcalendar,T=h.ycalendar,l=function(Fe){return f.r2c(Fe,0,c)},x=function(Fe){return m.r2c(Fe,0,T)},w=function(Fe){return f.c2r(Fe,0,c)},A=function(Fe){return m.c2r(Fe,0,T)},E,p,b,d,u=r(s,h,f,"x"),g=u[0],y=u[1],D=r(s,h,m,"y"),P=D[0],z=D[1],F=h._length;y.length>F&&y.splice(F,y.length-F),z.length>F&&z.splice(F,z.length-F);var N=[],O=[],L=[],U=typeof g.size=="string",B=typeof P.size=="string",W=[],$=[],ue=U?W:g,ce=B?$:P,de=0,Y=[],X=[],Q=h.histnorm,V=h.histfunc,le=Q.indexOf("density")!==-1,ae=V==="max"||V==="min",j=ae?null:0,ee=S.count,te=M[Q],pe=!1,we=[],Se=[],Re="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";Re&&V!=="count"&&(pe=V==="avg",ee=S[V]);var Pe=g.size,je=l(g.start),at=l(g.end)+(je-_.tickIncrement(je,Pe,!1,c))/1e6;for(E=je;E=0&&b=0&&d_;i++)a=e(r,o,M(a));return a>_&&v.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,i,n,s,h,f,m,c,T,l,x,w,A,E;for(h=0;hA&&(a=Math.max(a,Math.abs(t[n][s]-w)/(E-A))))}return a}}}),J2=He({"src/traces/heatmap/find_empties.js"(Z,q){"use strict";var v=sa().maxRowLength;q.exports=function(S){var M=[],e={},t=[],r=S[0],o=[],a=[0,0,0],i=v(S),n,s,h,f,m,c,T,l;for(s=0;s=0;m--)f=t[m],s=f[0],h=f[1],c=((e[[s-1,h]]||a)[2]+(e[[s+1,h]]||a)[2]+(e[[s,h-1]]||a)[2]+(e[[s,h+1]]||a)[2])/20,c&&(T[f]=[s,h,c],t.splice(m,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(x,w){return w[2]-x[2]})}}}),sS=He({"src/traces/heatmap/make_bound_array.js"(Z,q){"use strict";var v=so(),_=sa().isArrayOrTypedArray;q.exports=function(M,e,t,r,o,a){var i=[],n=v.traceIs(M,"contour"),s=v.traceIs(M,"histogram"),h,f,m,c=_(e)&&e.length>1;if(c&&!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)],m=1;m1){var Q=(X[X.length-1]-X[0])/(X.length-1),V=Math.abs(Q/100);for(F=0;FV)return!1}return!0}T._islinear=!1,l.type==="log"||x.type==="log"?E==="fast"&&L("log axis found"):U(p)?U(g)?T._islinear=!0:E==="fast"&&L("y scale is not linear"):E==="fast"&&L("x scale is not linear");var B=_.maxRowLength(z),W=T.xtype==="scaled"?"":p,$=n(T,W,b,d,B,l),ue=T.ytype==="scaled"?"":g,ce=n(T,ue,y,D,z.length,x);T._extremes[l._id]=S.findExtremes(l,$),T._extremes[x._id]=S.findExtremes(x,ce);var de={x:$,y:ce,z,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&u&&(de.orig_x=u),T.yperiodalignment&&P&&(de.orig_y=P),W&&W.length===$.length-1&&(de.xCenter=W),ue&&ue.length===ce.length-1&&(de.yCenter=ue),A&&(de.xRanges=N.xRanges,de.yRanges=N.yRanges,de.pts=N.pts),w||t(c,T,{vals:z,cLetter:"z"}),w&&T.contours&&T.contours.coloring==="heatmap"){var Y={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};de.xfill=n(Y,W,b,d,B,l),de.yfill=n(Y,ue,y,D,z.length,x)}return[de]};function h(m){for(var c=[],T=m.length,l=0;l0;)le=g.c2p(U[te]),te--;for(le0;)ee=y.c2p(B[te]),te--;ee=g._length||le<=0||j>=y._length||ee<=0;if(at){var nt=P.selectAll("image").data([]);nt.exit().remove(),x(P);return}var tt,Ve;Se==="fast"?(tt=Y,Ve=de):(tt=Pe,Ve=je);var he=document.createElement("canvas");he.width=tt,he.height=Ve;var se=he.getContext("2d",{willReadFrequently:!0}),ne=n(F,{noNumericCheck:!0,returnArray:!0}),Ce,Ze;Se==="fast"?(Ce=X?function(ba){return Y-1-ba}:t.identity,Ze=Q?function(ba){return de-1-ba}:t.identity):(Ce=function(ba){return t.constrain(Math.round(g.c2p(U[ba])-V),0,Pe)},Ze=function(ba){return t.constrain(Math.round(y.c2p(B[ba])-j),0,je)});var rt=Ze(0),Je=[rt,rt],St=X?0:1,kt=Q?0:1,Bt=0,Vt=0,Ar=0,vr=0,qr,kr,Ur,_t,Fe;function Ye(ba,Ai){if(ba!==void 0){var ki=ne(ba);return ki[0]=Math.round(ki[0]),ki[1]=Math.round(ki[1]),ki[2]=Math.round(ki[2]),Bt+=Ai,Vt+=ki[0]*Ai,Ar+=ki[1]*Ai,vr+=ki[2]*Ai,ki}return[0,0,0,0]}function Ae(ba,Ai,ki,Ki){var Mn=ba[ki.bin0];if(Mn===void 0)return Ye(void 0,1);var wn=ba[ki.bin1],On=Ai[ki.bin0],En=Ai[ki.bin1],ao=wn-Mn||0,Co=On-Mn||0,bo;return wn===void 0?En===void 0?bo=0:On===void 0?bo=2*(En-Mn):bo=(2*En-On-Mn)*2/3:En===void 0?On===void 0?bo=0:bo=(2*Mn-wn-On)*2/3:On===void 0?bo=(2*En-wn-Mn)*2/3:bo=En+Mn-wn-On,Ye(Mn+ki.frac*ao+Ki.frac*(Co+ki.frac*bo))}if(Se!=="default"){var Le=0,We;try{We=new Uint8Array(tt*Ve*4)}catch{We=new Array(tt*Ve*4)}if(Se==="smooth"){var Ke=W||U,st=$||B,ot=new Array(Ke.length),Ut=new Array(st.length),Ct=new Array(Pe),Pt=W?A:w,jt=$?A:w,cr,or,nr;for(te=0;te$a||$a>y._length))for(pe=ta;peri||ri>g._length)){var pi=o({x:Za,y:Ba},F,p._fullLayout);pi.x=Za,pi.y=Ba;var Ia=z.z[te][pe];Ia===void 0?(pi.z="",pi.zLabel=""):(pi.z=Ia,pi.zLabel=e.tickText(Yt,Ia,"hover").text);var rn=z.text&&z.text[te]&&z.text[te][pe];(rn===void 0||rn===!1)&&(rn=""),pi.text=rn;var tn=t.texttemplateString({data:[pi,F._meta],fallback:F.texttemplatefallback,labels:pi,locale:p._fullLayout._d3locale,template:hi});if(tn){var cn=tn.split("
"),xt=cn.length,ut=0;for(we=0;we=x[0].length||D<0||D>x.length)return}else{if(v.inbox(o-T[0],o-T[T.length-1],0)>0||v.inbox(a-l[0],a-l[l.length-1],0)>0)return;if(s){var P;for(b=[2*T[0]-T[1]],P=1;P=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),V_=He({"src/traces/contour/attributes.js"(Z,q){"use strict";var v=p1(),_=af(),S=rf(),M=S.axisHoverFormat,e=S.descriptionOnlyNumbers,t=ku(),r=Hh().dash,o=tc(),a=rs().extendFlat,i=o3(),n=i.COMPARISON_OPS2,s=i.INTERVAL_OPS,h=_.line;q.exports=a({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:_.xperiod0,yperiod0:_.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:a({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:a({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:a({},v.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({},h.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:a({},h.smoothing,{}),editType:"plot"},zorder:_.zorder},t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),hS=He({"src/traces/histogram2dcontour/attributes.js"(Z,q){"use strict";var v=n3(),_=V_(),S=ku(),M=rf().axisHoverFormat,e=rs().extendFlat;q.exports=e({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:_.autocontour,ncontours:_.ncontours,contours:_.contours,line:{color:_.line.color,width:e({},_.line.width,{dflt:.5}),dash:_.line.dash,smoothing:_.line.smoothing,editType:"plot"},xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:_.texttemplate,texttemplatefallback:_.texttemplatefallback,textfont:_.textfont},S("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=He({"src/traces/contour/contours_defaults.js"(Z,q){"use strict";q.exports=function(_,S,M,e){var t=e("contours.start"),r=e("contours.end"),o=t===!1||r===!1,a=M("contours.size"),i;o?i=S.autocontour=!0:i=M("autocontour",!1),(i||!a)&&M("ncontours")}}}),pS=He({"src/traces/contour/label_defaults.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M,e,t){t||(t={});var r=S("contours.showlabels");if(r){var o=M.font;v.coerceFont(S,"contours.labelfont",o,{overrideDflt:{color:e}}),S("contours.labelformat")}t.hasHover!==!1&&S("zhoverformat")}}}),l3=He({"src/traces/contour/style_defaults.js"(Z,q){"use strict";var v=_h(),_=pS();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,v(M,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),_(t,r,n,o)}}}),vF=He({"src/traces/histogram2dcontour/defaults.js"(Z,q){"use strict";var v=sa(),_=fS(),S=s3(),M=l3(),e=q_(),t=hS();q.exports=function(o,a,i,n){function s(f,m){return v.coerce(o,a,t,f,m)}function h(f){return v.coerce2(o,a,t,f)}_(o,a,s,n),a.visible!==!1&&(S(o,a,s,h),M(o,a,s,n),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&e(s,n))}}}),dS=He({"src/traces/contour/set_contours.js"(Z,q){"use strict";var v=Wo(),_=sa();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=_.aggNums(Math.min,null,t)),(e.zauto||a===void 0)&&(a=_.aggNums(Math.max,null,t));var i=S(o,a,e.ncontours);r.size=i.dtick,r.start=v.tickFirst(i),i.range.reverse(),r.end=v.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={}),_.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,h=e._input.contours;if(n>s&&(r.start=h.start=s,s=r.end=h.end=n,n=r.start),!(r.size>0)){var f;n===s?f=1:f=S(n,s,e.ncontours).dtick,h.size=r.size=f}}};function S(M,e,t){var r={type:"linear",range:[M,e]};return v.autoTicks(r,(e-M)/(t||15)),r}}}),G_=He({"src/traces/contour/end_plus.js"(Z,q){"use strict";q.exports=function(_){return _.end+_.size/1e6}}}),vS=He({"src/traces/contour/calc.js"(Z,q){"use strict";var v=rc(),_=$2(),S=dS(),M=G_();q.exports=function(t,r){var o=_(t,r),a=o[0].z;S(r,a);var i=r.contours,n=v.extractOpts(r),s;if(i.coloring==="heatmap"&&n.auto&&r.autocontour===!1){var h=i.start,f=M(i),m=i.size||1,c=Math.floor((f-h)/m)+1;isFinite(m)||(m=1,c=1);var T=h-m/2,l=T+c*m;s=[T,l]}else s=a;return v.calc(t,r,{vals:s,cLetter:"z"}),o}}}),H_=He({"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}}}}),mS=He({"src/traces/contour/make_crossings.js"(Z,q){"use strict";var v=H_();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,h,f,m,c,T;for(i=0;iS?0:1)+(M[0][1]>S?0:2)+(M[1][1]>S?0:4)+(M[1][0]>S?0:8);if(e===5||e===10){var t=(M[0][0]+M[0][1]+M[1][0]+M[1][1])/4;return S>t?e===5?713:1114:e===5?104:208}return e===15?0:e}}}),gS=He({"src/traces/contour/find_all_paths.js"(Z,q){"use strict";var v=sa(),_=H_();q.exports=function(a,i,n){var s,h,f,m,c;for(i=i||.01,n=n||.01,f=0;f20?(f=_.CHOOSESADDLE[f][(m[0]||m[1])<0?0:1],o.crossings[h]=_.SADDLEREMAINDER[f]):delete o.crossings[h],m=_.NEWDELTA[f],!m){v.log("Found bad marching index:",f,a,o.level);break}c.push(r(o,a,m)),a[0]+=m[0],a[1]+=m[1],h=a.join(","),S(c[c.length-1],c[c.length-2],n,s)&&c.pop();var E=m[0]&&(a[0]<0||a[0]>l-2)||m[1]&&(a[1]<0||a[1]>T-2),p=a[0]===x[0]&&a[1]===x[1]&&m[0]===w[0]&&m[1]===w[1];if(p||i&&E)break;f=o.crossings[h]}A===1e4&&v.log("Infinite loop in contour?");var b=S(c[0],c[c.length-1],n,s),d=0,u=.2*o.smoothing,g=[],y=0,D,P,z,F,N,O,L,U,B,W,$;for(A=1;A=y;A--)if(D=g[A],D=y&&D+g[P]U&&B--,o.edgepaths[B]=$.concat(c,W));break}Y||(o.edgepaths[U]=c.concat(W))}for(U=0;U20&&a?o===208||o===1114?n=i[0]===0?1:-1:s=i[1]===0?1:-1:_.BOTTOMSTART.indexOf(o)!==-1?s=1:_.LEFTSTART.indexOf(o)!==-1?n=1:_.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),h=o.z[s][n],f=o.xaxis,m=o.yaxis;if(i[1]){var c=(o.level-h)/(o.z[s][n+1]-h),T=(c!==1?(1-c)*f.c2l(o.x[n]):0)+(c!==0?c*f.c2l(o.x[n+1]):0);return[f.c2p(f.l2c(T),!0),m.c2p(o.y[s],!0),n+c,s]}else{var l=(o.level-h)/(o.z[s+1][n]-h),x=(l!==1?(1-l)*m.c2l(o.y[s]):0)+(l!==0?l*m.c2l(o.y[s+1]):0);return[f.c2p(o.x[n],!0),m.c2p(m.l2c(x),!0),n,s+l]}}}}),mF=He({"src/traces/contour/constraint_mapping.js"(Z,q){"use strict";var v=o3(),_=ns();q.exports={"[]":M("[]"),"][":M("]["),">":e(">"),"<":e("<"),"=":e("=")};function S(t,r){var o=Array.isArray(r),a;function i(n){return _(n)?+n:null}return v.COMPARISON_OPS2.indexOf(t)!==-1?a=i(o?r[0]:r):v.INTERVAL_OPS.indexOf(t)!==-1?a=o?[i(r[0]),i(r[1])]:[i(r),i(r)]:v.SET_OPS.indexOf(t)!==-1&&(a=o?r.map(i):[i(r)]),a}function M(t){return function(r){r=S(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=S(t,r),{start:r,end:1/0,size:1/0}}}}}),yS=He({"src/traces/contour/empty_pathinfo.js"(Z,q){"use strict";var v=sa(),_=mF(),S=G_();q.exports=function(e,t,r){for(var o=e.type==="constraint"?_[e._operation](e.value):e,a=o.size,i=[],n=S(o),s=r.trace._carpetTrace,h=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;f1e3){v.warn("Too many contours, clipping at 1000",e);break}return i}}}),_S=He({"src/traces/contour/convert_to_constraints.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e,t,r,o=function(n){return n.reverse()},a=function(n){return n};switch(M){case"=":case"<":return S;case">":for(S.length!==1&&v.warn("Contour data invalid for the specified inequality operation."),t=S[0],e=0;er.level||r.starts.length&&t===r.level)}break;case"constraint":if(S.prefixBoundary=!1,S.edgepaths.length)return;var o=S.x.length,a=S.y.length,i=-1/0,n=1/0;for(e=0;e":s>i&&(S.prefixBoundary=!0);break;case"<":(si||S.starts.length&&f===n)&&(S.prefixBoundary=!0);break;case"][":h=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),hi&&(S.prefixBoundary=!0);break}break}}}}),u3=He({"src/traces/contour/plot.js"(Z){"use strict";var q=Vn(),v=sa(),_=as(),S=rc(),M=su(),e=Wo(),t=wv(),r=e3(),o=mS(),a=gS(),i=yS(),n=_S(),s=xS(),h=H_(),f=h.LABELOPTIMIZER;Z.plot=function(p,b,d,u){var g=b.xaxis,y=b.yaxis;v.makeTraceGroups(u,d,"contour").each(function(D){var P=q.select(this),z=D[0],F=z.trace,N=z.x,O=z.y,L=F.contours,U=i(L,b,z),B=v.ensureSingle(P,"g","heatmapcoloring"),W=[];L.coloring==="heatmap"&&(W=[D]),r(p,b,W,B),o(U),a(U);var $=g.c2p(N[0],!0),ue=g.c2p(N[N.length-1],!0),ce=y.c2p(O[0],!0),de=y.c2p(O[O.length-1],!0),Y=[[$,de],[ue,de],[ue,ce],[$,ce]],X=U;L.type==="constraint"&&(X=n(U,L._operation)),m(P,Y,L),c(P,X,Y,L),l(P,U,p,z,L),w(P,b,p,z,Y)})};function m(E,p,b){var d=v.ensureSingle(E,"g","contourbg"),u=d.selectAll("path").data(b.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+p.join("L")+"Z").style("stroke","none")}function c(E,p,b,d){var u=d.coloring==="fill"||d.type==="constraint"&&d._operation!=="=",g="M"+b.join("L")+"Z";u&&s(p,d);var y=v.ensureSingle(E,"g","contourfill"),D=y.selectAll("path").data(u?p:[]);D.enter().append("path"),D.exit().remove(),D.each(function(P){var z=(P.prefixBoundary?g:"")+T(P,b);z?q.select(this).attr("d",z).style("stroke","none"):q.select(this).remove()})}function T(E,p){var b="",d=0,u=E.edgepaths.map(function($,ue){return ue}),g=!0,y,D,P,z,F,N;function O($){return Math.abs($[1]-p[0][1])<.01}function L($){return Math.abs($[1]-p[2][1])<.01}function U($){return Math.abs($[0]-p[0][0])<.01}function B($){return Math.abs($[0]-p[2][0])<.01}for(;u.length;){for(N=_.smoothopen(E.edgepaths[d],E.smoothing),b+=g?N:N.replace(/^M/,"L"),u.splice(u.indexOf(d),1),y=E.edgepaths[d][E.edgepaths[d].length-1],z=-1,P=0;P<4;P++){if(!y){v.log("Missing end?",d,E);break}for(O(y)&&!B(y)?D=p[1]:U(y)?D=p[0]:L(y)?D=p[3]:B(y)&&(D=p[2]),F=0;F=0&&(D=W,z=F):Math.abs(y[1]-D[1])<.01?Math.abs(y[1]-W[1])<.01&&(W[0]-y[0])*(D[0]-W[0])>=0&&(D=W,z=F):v.log("endpt to newendpt is not vert. or horz.",y,D,W)}if(y=D,z>=0)break;b+="L"+D}if(z===E.edgepaths.length){v.log("unclosed perimeter path");break}d=z,g=u.indexOf(d)===-1,g&&(d=u[0],b+="Z")}for(d=0;df.MAXCOST*2)break;O&&(D/=2),y=z-D/2,P=y+D*1.5}if(N<=f.MAXCOST)return F};function x(E,p,b,d){var u=p.width/2,g=p.height/2,y=E.x,D=E.y,P=E.theta,z=Math.cos(P)*u,F=Math.sin(P)*u,N=(y>d.center?d.right-y:y-d.left)/(z+Math.abs(Math.sin(P)*g)),O=(D>d.middle?d.bottom-D:D-d.top)/(Math.abs(F)+Math.cos(P)*g);if(N<1||O<1)return 1/0;var L=f.EDGECOST*(1/(N-1)+1/(O-1));L+=f.ANGLECOST*P*P;for(var U=y-z,B=D-F,W=y+z,$=D+F,ue=0;ue=w)&&(r<=x&&(r=x),o>=w&&(o=w),i=Math.floor((o-r)/a)+1,n=0),l=0;lx&&(m.unshift(x),c.unshift(c[0])),m[m.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(h=parseFloat(s.value[0]),s.value=[h,h+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:v(s.value)&&(h=parseFloat(s.value),s.value=[h,h+1])):(n("contours.value",0),v(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),_F=He({"src/traces/contour/defaults.js"(Z,q){"use strict";var v=sa(),_=X2(),S=Qd(),M=TS(),e=s3(),t=l3(),r=q_(),o=V_();q.exports=function(i,n,s,h){function f(l,x){return v.coerce(i,n,o,l,x)}function m(l){return v.coerce2(i,n,o,l)}var c=_(i,n,f,h);if(!c){n.visible=!1;return}S(i,n,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var T=f("contours.type")==="constraint";f("connectgaps",v.isArray1D(n.z)),T?M(i,n,f,h,s):(e(i,n,f,m),t(i,n,f,h)),n.contours&&n.contours.coloring==="heatmap"&&r(f,h),f("zorder")}}}),xF=He({"src/traces/contour/index.js"(Z,q){"use strict";q.exports={attributes:V_(),supplyDefaults:_F(),calc:vS(),plot:u3().plot,style:c3(),colorbar:f3(),hoverPoints:wS(),moduleType:"trace",name:"contour",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),bF=He({"lib/contour.js"(Z,q){"use strict";q.exports=xF()}}),AS=He({"src/traces/scatterternary/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:_,templatefallbackAttrs:S}=$l(),M=$d(),e=af(),t=au(),r=ku(),o=Hh().dash,a=rs().extendFlat,i=e.marker,n=e.line,s=i.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:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:_({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:n.color,width:n.width,dash:o,backoff:n.backoff,shape:a({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:e.connectgaps,cliponaxis:e.cliponaxis,fill:a({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:M(),marker:a({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:i.angleref,standoff:i.standoff,maxdisplayed:i.maxdisplayed,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,line:a({width:s.width,dash:s.dash,editType:"calc"},r("marker.line")),gradient:i.gradient,editType:"calc"},r("marker")),textfont:e.textfont,textposition:e.textposition,selected:e.selected,unselected:e.unselected,hoverinfo:a({},t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:e.hoveron,hovertemplate:v(),hovertemplatefallback:S()}}}),wF=He({"src/traces/scatterternary/defaults.js"(Z,q){"use strict";var v=sa(),_=Tv(),S=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=AS();q.exports=function(n,s,h,f){function m(E,p){return v.coerce(n,s,a,E,p)}var c=m("a"),T=m("b"),l=m("c"),x;if(c?(x=c.length,T?(x=Math.min(x,T.length),l&&(x=Math.min(x,l.length))):l?x=Math.min(x,l.length):x=0):T&&l&&(x=Math.min(T.length,l.length)),!x){s.visible=!1;return}s._length=x,m("sum"),m("text"),m("hovertext"),s.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback"));var w=x<_.PTS_LINESONLY?"lines+markers":"lines";m("mode",w),S.hasMarkers(s)&&M(n,s,h,f,m,{gradient:!0}),S.hasLines(s)&&(e(n,s,h,f,m,{backoff:!0}),t(n,s,m),m("connectgaps")),S.hasText(s)&&(m("texttemplate"),m("texttemplatefallback"),r(n,s,f,m));var A=[];(S.hasMarkers(s)||S.hasText(s))&&(m("cliponaxis"),m("marker.maxdisplayed"),A.push("points")),m("fill"),s.fill!=="none"&&(o(n,s,h,m),S.hasLines(s)||t(n,s,m)),(s.fill==="tonext"||s.fill==="toself")&&A.push("fills"),m("hoveron",A.join("+")||"points"),v.coerceSelectionMarkerOpacity(s,m)}}}),TF=He({"src/traces/scatterternary/format_labels.js"(Z,q){"use strict";var v=Wo();q.exports=function(S,M,e){var t={},r=e[M.subplot]._subplot;return t.aLabel=v.tickText(r.aaxis,S.a,!0).text,t.bLabel=v.tickText(r.baxis,S.b,!0).text,t.cLabel=v.tickText(r.caxis,S.c,!0).text,t}}}),AF=He({"src/traces/scatterternary/calc.js"(Z,q){"use strict";var v=ns(),_=Fd(),S=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,h=i.sum||s,f={a:i.a,b:i.b,c:i.c},m=i.ids,c,T,l,x,w,A;for(c=0;c"),o.hovertemplate=f.hovertemplate,r}}}),EF=He({"src/traces/scatterternary/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){if(S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),e[t]){var r=e[t];_.a=r.a,_.b=r.b,_.c=r.c}else _.a=S.a,_.b=S.b,_.c=S.c;return _}}}),kF=He({"src/plots/ternary/ternary.js"(Z,q){"use strict";var v=Vn(),_=Ch(),S=so(),M=sa(),e=M.strTranslate,t=M._,r=$n(),o=as(),a=wv(),i=rs().extendFlat,n=bc(),s=Wo(),h=Ap(),f=Hc(),m=Jd(),c=m.freeMode,T=m.rectMode,l=K0(),x=Af().prepSelect,w=Af().selectOnClick,A=Af().clearOutline,E=Af().clearSelectionsCache,p=lh();function b(L,U){this.id=L.id,this.graphDiv=L.graphDiv,this.init(U),this.makeFramework(U),this.updateFx(U),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}q.exports=b;var d=b.prototype;d.init=function(L){this.container=L._ternarylayer,this.defs=L._defs,this.layoutId=L._uid,this.traceHash={},this.layers={}},d.plot=function(L,U){var B=this,W=U[B.id],$=U._size;B._hasClipOnAxisFalse=!1;for(var ue=0;ueu*X?(pe=X,te=pe*u):(te=Y,pe=te/u),we=ce*te/Y,Se=de*pe/X,j=U.l+U.w*$-te/2,ee=U.t+U.h*(1-ue)-pe/2,B.x0=j,B.y0=ee,B.w=te,B.h=pe,B.sum=Q,B.xaxis={type:"linear",range:[V+2*ae-Q,Q-V-2*le],domain:[$-we/2,$+we/2],_id:"x"},a(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(Ce){return Ce.a>=B.aaxis.range[0]&&Ce.a<=B.aaxis.range[1]&&Ce.b>=B.baxis.range[1]&&Ce.b<=B.baxis.range[0]&&Ce.c>=B.caxis.range[1]&&Ce.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[V,Q-le-ae],domain:[ue-Se/2,ue+Se/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var Re=B.yaxis.domain[0],Pe=B.aaxis=i({},L.aaxis,{range:[V,Q-le-ae],side:"left",tickangle:(+L.aaxis.tickangle||0)-30,domain:[Re,Re+Se*u],anchor:"free",position:0,_id:"y",_length:te});a(Pe,B.graphDiv._fullLayout),Pe.setScale();var je=B.baxis=i({},L.baxis,{range:[Q-V-ae,le],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:te});a(je,B.graphDiv._fullLayout),je.setScale();var at=B.caxis=i({},L.caxis,{range:[Q-V-le,ae],side:"right",tickangle:(+L.caxis.tickangle||0)+30,domain:[Re,Re+Se*u],anchor:"free",position:0,_id:"y",_length:te});a(at,B.graphDiv._fullLayout),at.setScale();var nt="M"+j+","+(ee+pe)+"h"+te+"l-"+te/2+",-"+pe+"Z";B.clipDef.select("path").attr("d",nt),B.layers.plotbg.select("path").attr("d",nt);var tt="M0,"+pe+"h"+te+"l-"+te/2+",-"+pe+"Z";B.clipDefRelative.select("path").attr("d",tt);var Ve=e(j,ee);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ve),B.clipDefRelative.select("path").attr("transform",null);var he=e(j-je._offset,ee+pe);B.layers.baxis.attr("transform",he),B.layers.bgrid.attr("transform",he);var se=e(j+te/2,ee)+"rotate(30)"+e(0,-Pe._offset);B.layers.aaxis.attr("transform",se),B.layers.agrid.attr("transform",se);var ne=e(j+te/2,ee)+"rotate(-30)"+e(0,-at._offset);B.layers.caxis.attr("transform",ne),B.layers.cgrid.attr("transform",ne),B.drawAxes(!0),B.layers.aline.select("path").attr("d",Pe.showline?"M"+j+","+(ee+pe)+"l"+te/2+",-"+pe:"M0,0").call(r.stroke,Pe.linecolor||"#000").style("stroke-width",(Pe.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",je.showline?"M"+j+","+(ee+pe)+"h"+te:"M0,0").call(r.stroke,je.linecolor||"#000").style("stroke-width",(je.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",at.showline?"M"+(j+te/2)+","+ee+"l"+te/2+","+pe:"M0,0").call(r.stroke,at.linecolor||"#000").style("stroke-width",(at.linewidth||0)+"px"),B.graphDiv._context.staticPlot||B.initInteractions(),o.setClipUrl(B.layers.frontplot,B._hasClipOnAxisFalse?null:B.clipId,B.graphDiv)},d.drawAxes=function(L){var U=this,B=U.graphDiv,W=U.id.slice(7)+"title",$=U.layers,ue=U.aaxis,ce=U.baxis,de=U.caxis;if(U.drawAx(ue),U.drawAx(ce),U.drawAx(de),L){var Y=Math.max(ue.showticklabels?ue.tickfont.size/2:0,(de.showticklabels?de.tickfont.size*.75:0)+(de.ticks==="outside"?de.ticklen*.87:0)),X=(ce.showticklabels?ce.tickfont.size:0)+(ce.ticks==="outside"?ce.ticklen:0)+3;$["a-title"]=l.draw(B,"a"+W,{propContainer:ue,propName:U.id+".aaxis.title.text",placeholder:t(B,"Click to enter Component A title"),attributes:{x:U.x0+U.w/2,y:U.y0-ue.title.font.size/3-Y,"text-anchor":"middle"}}),$["b-title"]=l.draw(B,"b"+W,{propContainer:ce,propName:U.id+".baxis.title.text",placeholder:t(B,"Click to enter Component B title"),attributes:{x:U.x0-X,y:U.y0+U.h+ce.title.font.size*.83+X,"text-anchor":"middle"}}),$["c-title"]=l.draw(B,"c"+W,{propContainer:de,propName:U.id+".caxis.title.text",placeholder:t(B,"Click to enter Component C title"),attributes:{x:U.x0+U.w+X,y:U.y0+U.h+de.title.font.size*.83+X,"text-anchor":"middle"}})}},d.drawAx=function(L){var U=this,B=U.graphDiv,W=L._name,$=W.charAt(0),ue=L._id,ce=U.layers[W],de=30,Y=$+"tickLayout",X=g(L);U[Y]!==X&&(ce.selectAll("."+ue+"tick").remove(),U[Y]=X),L.setScale();var Q=s.calcTicks(L),V=s.clipEnds(L,Q),le=s.makeTransTickFn(L),ae=s.getTickSigns(L)[2],j=M.deg2rad(de),ee=ae*(L.linewidth||1)/2,te=ae*L.ticklen,pe=U.w,we=U.h,Se=$==="b"?"M0,"+ee+"l"+Math.sin(j)*te+","+Math.cos(j)*te:"M"+ee+",0l"+Math.cos(j)*te+","+-Math.sin(j)*te,Re={a:"M0,0l"+we+",-"+pe/2,b:"M0,0l-"+pe/2+",-"+we,c:"M0,0l-"+we+","+pe/2}[$];s.drawTicks(B,L,{vals:L.ticks==="inside"?V:Q,layer:ce,path:Se,transFn:le,crisp:!1}),s.drawGrid(B,L,{vals:V,layer:U.layers[$+"grid"],path:Re,transFn:le,crisp:!1}),s.drawLabels(B,L,{vals:Q,layer:ce,transFn:le,labelFns:s.makeLabelFns(L,0,de)})};function g(L){return L.ticks+String(L.ticklen)+String(L.showticklabels)}var y=p.MINZOOM/2+.87,D="m-0.87,.5h"+y+"v3h-"+(y+5.2)+"l"+(y/2+2.6)+",-"+(y*.87+4.5)+"l2.6,1.5l-"+y/2+","+y*.87+"Z",P="m0.87,.5h-"+y+"v3h"+(y+5.2)+"l-"+(y/2+2.6)+",-"+(y*.87+4.5)+"l-2.6,1.5l"+y/2+","+y*.87+"Z",z="m0,1l"+y/2+","+y*.87+"l2.6,-1.5l-"+(y/2+2.6)+",-"+(y*.87+4.5)+"l-"+(y/2+2.6)+","+(y*.87+4.5)+"l2.6,1.5l"+y/2+",-"+y*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",N=!0;d.clearOutline=function(){E(this.dragOptions),A(this.dragOptions.gd)},d.initInteractions=function(){var L=this,U=L.layers.plotbg.select("path").node(),B=L.graphDiv,W=B._fullLayout._zoomlayer,$,ue;this.dragOptions={element:U,gd:B,plotinfo:{id:L.id,domain:B._fullLayout[L.id].domain,xaxis:L.xaxis,yaxis:L.yaxis},subplot:L.id,prepFn:function(he,se,ne){L.dragOptions.xaxes=[L.xaxis],L.dragOptions.yaxes=[L.yaxis],$=B._fullLayout._invScaleX,ue=B._fullLayout._invScaleY;var Ce=L.dragOptions.dragmode=B._fullLayout.dragmode;c(Ce)?L.dragOptions.minDrag=1:L.dragOptions.minDrag=void 0,Ce==="zoom"?(L.dragOptions.moveFn=je,L.dragOptions.clickFn=pe,L.dragOptions.doneFn=at,we(he,se,ne)):Ce==="pan"?(L.dragOptions.moveFn=tt,L.dragOptions.clickFn=pe,L.dragOptions.doneFn=Ve,nt(),L.clearOutline(B)):(T(Ce)||c(Ce))&&x(he,se,ne,L.dragOptions,Ce)}};var ce,de,Y,X,Q,V,le,ae,j,ee;function te(he){var se={};return se[L.id+".aaxis.min"]=he.a,se[L.id+".baxis.min"]=he.b,se[L.id+".caxis.min"]=he.c,se}function pe(he,se){var ne=B._fullLayout.clickmode;O(B),he===2&&(B.emit("plotly_doubleclick",null),S.call("_guiRelayout",B,te({a:0,b:0,c:0}))),ne.indexOf("select")>-1&&he===1&&w(se,B,[L.xaxis],[L.yaxis],L.id,L.dragOptions),ne.indexOf("event")>-1&&f.click(B,se,L.id)}function we(he,se,ne){var Ce=U.getBoundingClientRect();ce=se-Ce.left,de=ne-Ce.top,B._fullLayout._calcInverseTransform(B);var Ze=B._fullLayout._invTransform,rt=M.apply3DTransform(Ze)(ce,de);ce=rt[0],de=rt[1],Y={a:L.aaxis.range[0],b:L.baxis.range[1],c:L.caxis.range[1]},Q=Y,X=L.aaxis.range[1]-Y.a,V=_(L.graphDiv._fullLayout[L.id].bgcolor).getLuminance(),le="M0,"+L.h+"L"+L.w/2+", 0L"+L.w+","+L.h+"Z",ae=!1,j=W.append("path").attr("class","zoombox").attr("transform",e(L.x0,L.y0)).style({fill:V>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",le),ee=W.append("path").attr("class","zoombox-corners").attr("transform",e(L.x0,L.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),L.clearOutline(B)}function Se(he,se){return 1-se/L.h}function Re(he,se){return 1-(he+(L.h-se)/Math.sqrt(3))/L.w}function Pe(he,se){return(he-(L.h-se)/Math.sqrt(3))/L.w}function je(he,se){var ne=ce+he*$,Ce=de+se*ue,Ze=Math.max(0,Math.min(1,Se(ce,de),Se(ne,Ce))),rt=Math.max(0,Math.min(1,Re(ce,de),Re(ne,Ce))),Je=Math.max(0,Math.min(1,Pe(ce,de),Pe(ne,Ce))),St=(Ze/2+Je)*L.w,kt=(1-Ze/2-rt)*L.w,Bt=(St+kt)/2,Vt=kt-St,Ar=(1-Ze)*L.h,vr=Ar-Vt/u;Vt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ee.transition().style("opacity",1).duration(200),ae=!0),B.emit("plotly_relayouting",te(Q))}function at(){O(B),Q!==Y&&(S.call("_guiRelayout",B,te(Q)),N&&B.data&&B._context.showTips&&(M.notifier(t(B,"Double-click to zoom back out"),"long",B),N=!1))}function nt(){Y={a:L.aaxis.range[0],b:L.baxis.range[1],c:L.caxis.range[1]},Q=Y}function tt(he,se){var ne=he/L.xaxis._m,Ce=se/L.yaxis._m;Q={a:Y.a-Ce,b:Y.b+(ne+Ce)/2,c:Y.c-(ne-Ce)/2};var Ze=[Q.a,Q.b,Q.c].sort(M.sorterAsc),rt={a:Ze.indexOf(Q.a),b:Ze.indexOf(Q.b),c:Ze.indexOf(Q.c)};Ze[0]<0&&(Ze[1]+Ze[0]/2<0?(Ze[2]+=Ze[0]+Ze[1],Ze[0]=Ze[1]=0):(Ze[2]+=Ze[0]/2,Ze[1]+=Ze[0]/2,Ze[0]=0),Q={a:Ze[rt.a],b:Ze[rt.b],c:Ze[rt.c]},se=(Y.a-Q.a)*L.yaxis._m,he=(Y.c-Q.c-Y.b+Q.b)*L.xaxis._m);var Je=e(L.x0+he,L.y0+se);L.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Je);var St=e(-he,-se);L.clipDefRelative.select("path").attr("transform",St),L.aaxis.range=[Q.a,L.sum-Q.b-Q.c],L.baxis.range=[L.sum-Q.a-Q.c,Q.b],L.caxis.range=[L.sum-Q.a-Q.b,Q.c],L.drawAxes(!1),L._hasClipOnAxisFalse&&L.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,L),B.emit("plotly_relayouting",te(Q))}function Ve(){S.call("_guiRelayout",B,te(Q))}U.onmousemove=function(he){f.hover(B,he,L.id),B._fullLayout._lasthover=U,B._fullLayout._hoversubplot=L.id},U.onmouseout=function(he){B._dragging||h.unhover(B,he)},h.init(this.dragOptions)};function O(L){v.select(L).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),SS=He({"src/plots/ternary/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=wc().attributes,S=Xh(),M=pc().overrideAll,e=rs().extendFlat,t={title:{text:S.title.text,font:S.title.font},color:S.color,tickmode:S.minor.tickmode,nticks:e({},S.nticks,{dflt:6,min:1}),tick0:S.tick0,dtick:S.dtick,tickvals:S.tickvals,ticktext:S.ticktext,ticks:S.ticks,ticklen:S.ticklen,tickwidth:S.tickwidth,tickcolor:S.tickcolor,ticklabelstep:S.ticklabelstep,showticklabels:S.showticklabels,labelalias:S.labelalias,showtickprefix:S.showtickprefix,tickprefix:S.tickprefix,showticksuffix:S.showticksuffix,ticksuffix:S.ticksuffix,showexponent:S.showexponent,exponentformat:S.exponentformat,minexponent:S.minexponent,separatethousands:S.separatethousands,tickfont:S.tickfont,tickangle:S.tickangle,tickformat:S.tickformat,tickformatstops:S.tickformatstops,hoverformat:S.hoverformat,showline:e({},S.showline,{dflt:!0}),linecolor:S.linecolor,linewidth:S.linewidth,showgrid:e({},S.showgrid,{dflt:!0}),gridcolor:S.gridcolor,gridwidth:S.gridwidth,griddash:S.griddash,layer:S.layer,min:{valType:"number",dflt:0,min:0}},r=q.exports=M({domain:_({name:"ternary"}),bgcolor:{valType:"color",dflt:v.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"}}}),s0=He({"src/plots/subplot_defaults.js"(Z,q){"use strict";var v=sa(),_=zl(),S=wc().defaults;q.exports=function(e,t,r,o){var a=o.type,i=o.attributes,n=o.handleDefaults,s=o.partition||"x",h=t._subplots[a],f=h.length,m=f&&h[0].replace(/\d+$/,""),c,T;function l(E,p){return v.coerce(c,T,i,E,p)}for(var x=0;x=x&&(b.min=0,d.min=0,u.min=0,f.aaxis&&delete f.aaxis.min,f.baxis&&delete f.baxis.min,f.caxis&&delete f.caxis.min)}function h(f,m,c,T){var l=i[m._name];function x(g,y){return S.coerce(f,m,l,g,y)}x("uirevision",T.uirevision),m.type="linear";var w=x("color"),A=w!==l.color.dflt?w:c.font.color,E=m._name,p=E.charAt(0).toUpperCase(),b="Component "+p,d=x("title.text",b);m._hovertitle=d===b?d:p,S.coerceFont(x,"title.font",c.font,{overrideDflt:{size:S.bigFont(c.font.size),color:A}}),x("min"),o(f,m,x,"linear"),t(f,m,x,"linear"),e(f,m,x,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(f,m,x,{outerTicks:!0});var u=x("showticklabels");u&&(S.coerceFont(x,"tickfont",c.font,{overrideDflt:{color:A}}),x("tickangle"),x("tickformat")),a(f,m,x,{dfltColor:w,bgColor:c.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),x("hoverformat"),x("layer")}}}),LF=He({"src/plots/ternary/index.js"(Z){"use strict";var q=kF(),v=Wh().getSubplotCalcData,_=sa().counterRegex,S="ternary";Z.name=S;var M=Z.attr="subplot";Z.idRoot=S,Z.idRegex=Z.attrRegex=_(S);var e=Z.attributes={};e[M]={valType:"subplotid",dflt:"ternary",editType:"calc"},Z.layoutAttributes=SS(),Z.supplyLayoutDefaults=CF(),Z.plot=function(r){for(var o=r._fullLayout,a=r.calcdata,i=o._subplots[S],n=0;n0){var E=r.xa,p=r.ya,b,d,u,g,y;f.orientation==="h"?(y=o,b="y",u=p,d="x",g=E):(y=a,b="x",u=E,d="y",g=p);var D=h[r.index];if(y>=D.span[0]&&y<=D.span[1]){var P=_.extendFlat({},r),z=g.c2p(y,!0),F=e.getKdeValue(D,f,y),N=e.getPositionOnKdePath(D,f,z),O=u._offset,L=u._length;P[b+"0"]=N[0],P[b+"1"]=N[1],P[d+"0"]=P[d+"1"]=z,P[d+"Label"]=d+": "+S.hoverLabelText(g,y,f[d+"hoverformat"])+", "+h[0].t.labels.kde+" "+F.toFixed(3);for(var U=0,B=0;B path").each(function(c){if(!c.isBlank){var T=m.marker;v.select(this).call(S.fill,c.mc||T.color).call(S.stroke,c.mlc||T.line.color).call(_.dashLine,T.line.dash,c.mlw||T.line.width).style("opacity",m.selectedpoints&&!c.selected?M:1)}}),r(f,m,a),f.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(S.fill,m.connector.fillcolor)}),f.selectAll(".lines").each(function(){var c=m.connector.line;_.lineGroupStyle(v.select(this).selectAll("path"),c.width,c.color,c.dash)})})}q.exports={style:o}}}),YF=He({"src/traces/funnel/hover.js"(Z,q){"use strict";var v=$n().opacity,_=f1().hoverOnBars,S=sa().formatPercent;q.exports=function(t,r,o,a,i){var n=_(t,r,o,a,i);if(n){var s=n.cd,h=s[0].trace,f=h.orientation==="h",m=n.index,c=s[m],T=f?"x":"y";n[T+"LabelVal"]=c.s,n.percentInitial=c.begR,n.percentInitialLabel=S(c.begR,1),n.percentPrevious=c.difR,n.percentPreviousLabel=S(c.difR,1),n.percentTotal=c.sumR,n.percentTotalLabel=S(c.sumR,1);var l=c.hi||h.hoverinfo,x=[];if(l&&l!=="none"&&l!=="skip"){var w=l==="all",A=l.split("+"),E=function(p){return w||A.indexOf(p)!==-1};E("percent initial")&&x.push(n.percentInitialLabel+" of initial"),E("percent previous")&&x.push(n.percentPreviousLabel+" of previous"),E("percent total")&&x.push(n.percentTotalLabel+" of total")}return n.extraText=x.join("
"),n.color=M(h,c),[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(v(o))return o;if(v(a)&&i)return a}}}),KF=He({"src/traces/funnel/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,"percentInitial"in S&&(_.percentInitial=S.percentInitial),"percentPrevious"in S&&(_.percentPrevious=S.percentPrevious),"percentTotal"in S&&(_.percentTotal=S.percentTotal),S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),_}}}),JF=He({"src/traces/funnel/index.js"(Z,q){"use strict";q.exports={attributes:kS(),layoutAttributes:CS(),supplyDefaults:LS().supplyDefaults,crossTraceDefaults:LS().crossTraceDefaults,supplyLayoutDefaults:VF(),calc:HF(),crossTraceCalc:WF(),plot:XF(),style:ZF().style,hoverPoints:YF(),eventData:KF(),selectPoints:h1(),moduleType:"trace",name:"funnel",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),$F=He({"lib/funnel.js"(Z,q){"use strict";q.exports=JF()}}),QF=He({"src/traces/waterfall/constants.js"(Z,q){"use strict";q.exports={eventDataKeys:["initial","delta","final"]}}}),PS=He({"src/traces/waterfall/attributes.js"(Z,q){"use strict";var v=Sv(),_=af().line,S=au(),M=rf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=QF(),a=rs().extendFlat,i=$n();function n(s){return{marker:{color:a({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:a({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:a({},v.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:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:M("x"),yhoverformat:M("y"),hovertext:v.hovertext,hovertemplate:e({},{keys:o.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:a({},S.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:o.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:n("increasing"),decreasing:n("decreasing"),totals:n("intermediate sums and total"),connector:{line:{color:a({},_.color,{dflt:i.defaultLine}),width:a({},_.width,{editType:"plot"}),dash:_.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),IS=He({"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=He({"src/constants/delta.js"(Z,q){"use strict";q.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),RS=He({"src/traces/waterfall/defaults.js"(Z,q){"use strict";var v=sa(),_=Q0(),S=gd().handleText,M=n1(),e=Qd(),t=PS(),r=$n(),o=d1(),a=o.INCREASING.COLOR,i=o.DECREASING.COLOR,n="#4499FF";function s(m,c,T){m(c+".marker.color",T),m(c+".marker.line.color",r.defaultLine),m(c+".marker.line.width")}function h(m,c,T,l){function x(b,d){return v.coerce(m,c,t,b,d)}var w=M(m,c,l,x);if(!w){c.visible=!1;return}e(m,c,l,x),x("xhoverformat"),x("yhoverformat"),x("measure"),x("orientation",c.x&&!c.y?"h":"v"),x("base"),x("offset"),x("width"),x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback");var A=x("textposition");S(m,c,l,x,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c.textposition!=="none"&&(x("texttemplate"),x("texttemplatefallback"),c.texttemplate||x("textinfo")),s(x,"increasing",a),s(x,"decreasing",i),s(x,"totals",n);var E=x("connector.visible");if(E){x("connector.mode");var p=x("connector.line.width");p&&(x("connector.line.color"),x("connector.line.dash"))}x("zorder")}function f(m,c){var T,l;function x(A){return v.coerce(l._input,l,t,A)}if(c.waterfallmode==="group")for(var w=0;w0&&(x?y+="M"+u[0]+","+g[1]+"V"+g[0]:y+="M"+u[1]+","+g[0]+"H"+u[0]),w!=="between"&&(p.isSum||b path").each(function(c){if(!c.isBlank){var T=m[c.dir].marker;v.select(this).call(S.fill,T.color).call(S.stroke,T.line.color).call(_.dashLine,T.line.dash,T.line.width).style("opacity",m.selectedpoints&&!c.selected?M:1)}}),r(f,m,a),f.selectAll(".lines").each(function(){var c=m.connector.line;_.lineGroupStyle(v.select(this).selectAll("path"),c.width,c.color,c.dash)})})}q.exports={style:o}}}),nO=He({"src/traces/waterfall/hover.js"(Z,q){"use strict";var v=Wo().hoverLabelText,_=$n().opacity,S=f1().hoverOnBars,M=d1(),e={increasing:M.INCREASING.SYMBOL,decreasing:M.DECREASING.SYMBOL};q.exports=function(o,a,i,n,s){var h=S(o,a,i,n,s);if(!h)return;var f=h.cd,m=f[0].trace,c=m.orientation==="h",T=c?"x":"y",l=c?o.xa:o.ya;function x(D){return v(l,D,m[T+"hoverformat"])}var w=h.index,A=f[w],E=A.isSum?A.b+A.s:A.rawS;h.initial=A.b+A.s-E,h.delta=E,h.final=h.initial+h.delta;var p=x(Math.abs(h.delta));h.deltaLabel=E<0?"("+p+")":p,h.finalLabel=x(h.final),h.initialLabel=x(h.initial);var b=A.hi||m.hoverinfo,d=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",g=b.split("+"),y=function(D){return u||g.indexOf(D)!==-1};A.isSum||(y("final")&&(c?!y("x"):!y("y"))&&d.push(h.finalLabel),y("delta")&&(E<0?d.push(h.deltaLabel+" "+e.decreasing):d.push(h.deltaLabel+" "+e.increasing)),y("initial")&&d.push("Initial: "+h.initialLabel))}return d.length&&(h.extraText=d.join("
")),h.color=t(m,A),[h]};function t(r,o){var a=r[o.dir].marker,i=a.color,n=a.line.color,s=a.line.width;if(_(i))return i;if(_(n)&&s)return n}}}),oO=He({"src/traces/waterfall/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,"initial"in S&&(_.initial=S.initial),"delta"in S&&(_.delta=S.delta),"final"in S&&(_.final=S.final),S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),_}}}),sO=He({"src/traces/waterfall/index.js"(Z,q){"use strict";q.exports={attributes:PS(),layoutAttributes:IS(),supplyDefaults:RS().supplyDefaults,crossTraceDefaults:RS().crossTraceDefaults,supplyLayoutDefaults:eO(),calc:tO(),crossTraceCalc:rO(),plot:aO(),style:iO().style,hoverPoints:nO(),eventData:oO(),selectPoints:h1(),moduleType:"trace",name:"waterfall",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),lO=He({"lib/waterfall.js"(Z,q){"use strict";q.exports=sO()}}),v1=He({"src/traces/image/constants.js"(Z,q){"use strict";q.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.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(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var _=v.slice(0,3);return _[1]=_[1]+"%",_[2]=_[2]+"%",_},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var _=v.slice(0,4);return _[1]=_[1]+"%",_[2]=_[2]+"%",_},suffix:["\xB0","%","%",""]}}}}}),DS=He({"src/traces/image/attributes.js"(Z,q){"use strict";var v=au(),_=af().zorder,{hovertemplateAttrs:S,templatefallbackAttrs:M}=$l(),e=rs().extendFlat,t=v1().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],o=[],a=[];for(n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");var m=h.indexOf("=");m===-1&&(m=f);var c=m===f?0:4-m%4;return[m,c]}function r(h){var f=t(h),m=f[0],c=f[1];return(m+c)*3/4-c}function o(h,f,m){return(f+m)*3/4-m}function a(h){var f,m=t(h),c=m[0],T=m[1],l=new _(o(h,c,T)),x=0,w=T>0?c-4:c,A;for(A=0;A>16&255,l[x++]=f>>8&255,l[x++]=f&255;return T===2&&(f=v[h.charCodeAt(A)]<<2|v[h.charCodeAt(A+1)]>>4,l[x++]=f&255),T===1&&(f=v[h.charCodeAt(A)]<<10|v[h.charCodeAt(A+1)]<<4|v[h.charCodeAt(A+2)]>>2,l[x++]=f>>8&255,l[x++]=f&255),l}function i(h){return q[h>>18&63]+q[h>>12&63]+q[h>>6&63]+q[h&63]}function n(h,f,m){for(var c,T=[],l=f;lw?w:x+l));return c===1?(f=h[m-1],T.push(q[f>>2]+q[f<<4&63]+"==")):c===2&&(f=(h[m-2]<<8)+h[m-1],T.push(q[f>>10]+q[f>>4&63]+q[f<<2&63]+"=")),T.join("")}}}),fO=He({"node_modules/ieee754/index.js"(Z){Z.read=function(q,v,_,S,M){var e,t,r=M*8-S-1,o=(1<>1,i=-7,n=_?M-1:0,s=_?-1:1,h=q[v+n];for(n+=s,e=h&(1<<-i)-1,h>>=-i,i+=r;i>0;e=e*256+q[v+n],n+=s,i-=8);for(t=e&(1<<-i)-1,e>>=-i,i+=S;i>0;t=t*256+q[v+n],n+=s,i-=8);if(e===0)e=1-a;else{if(e===o)return t?NaN:(h?-1:1)*(1/0);t=t+Math.pow(2,S),e=e-a}return(h?-1:1)*t*Math.pow(2,e-S)},Z.write=function(q,v,_,S,M,e){var t,r,o,a=e*8-M-1,i=(1<>1,s=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=S?0:e-1,f=S?1:-1,m=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(r=isNaN(v)?1:0,t=i):(t=Math.floor(Math.log(v)/Math.LN2),v*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+n>=1?v+=s/o:v+=s*Math.pow(2,1-n),v*o>=2&&(t++,o/=2),t+n>=i?(r=0,t=i):t+n>=1?(r=(v*o-1)*Math.pow(2,M),t=t+n):(r=v*Math.pow(2,n-1)*Math.pow(2,M),t=0));M>=8;q[_+h]=r&255,h+=f,r/=256,M-=8);for(t=t<0;q[_+h]=t&255,h+=f,t/=256,a-=8);q[_+h-f]|=m*128}}}),rg=He({"node_modules/buffer/index.js"(Z){"use strict";var q=cO(),v=fO(),_=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 S=2147483647;Z.kMaxLength=S,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 he=new Uint8Array(1),se={foo:function(){return 42}};return Object.setPrototypeOf(se,Uint8Array.prototype),Object.setPrototypeOf(he,se),he.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(he){if(he>S)throw new RangeError('The value "'+he+'" is invalid for option "size"');let se=new Uint8Array(he);return Object.setPrototypeOf(se,t.prototype),se}function t(he,se,ne){if(typeof he=="number"){if(typeof se=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(he)}return r(he,se,ne)}t.poolSize=8192;function r(he,se,ne){if(typeof he=="string")return n(he,se);if(ArrayBuffer.isView(he))return h(he);if(he==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he);if(je(he,ArrayBuffer)||he&&je(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(je(he,SharedArrayBuffer)||he&&je(he.buffer,SharedArrayBuffer)))return f(he,se,ne);if(typeof he=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ce=he.valueOf&&he.valueOf();if(Ce!=null&&Ce!==he)return t.from(Ce,se,ne);let Ze=m(he);if(Ze)return Ze;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return t.from(he[Symbol.toPrimitive]("string"),se,ne);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he)}t.from=function(he,se,ne){return r(he,se,ne)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array);function o(he){if(typeof he!="number")throw new TypeError('"size" argument must be of type number');if(he<0)throw new RangeError('The value "'+he+'" is invalid for option "size"')}function a(he,se,ne){return o(he),he<=0?e(he):se!==void 0?typeof ne=="string"?e(he).fill(se,ne):e(he).fill(se):e(he)}t.alloc=function(he,se,ne){return a(he,se,ne)};function i(he){return o(he),e(he<0?0:c(he)|0)}t.allocUnsafe=function(he){return i(he)},t.allocUnsafeSlow=function(he){return i(he)};function n(he,se){if((typeof se!="string"||se==="")&&(se="utf8"),!t.isEncoding(se))throw new TypeError("Unknown encoding: "+se);let ne=l(he,se)|0,Ce=e(ne),Ze=Ce.write(he,se);return Ze!==ne&&(Ce=Ce.slice(0,Ze)),Ce}function s(he){let se=he.length<0?0:c(he.length)|0,ne=e(se);for(let Ce=0;Ce=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return he|0}function T(he){return+he!=he&&(he=0),t.alloc(+he)}t.isBuffer=function(se){return se!=null&&se._isBuffer===!0&&se!==t.prototype},t.compare=function(se,ne){if(je(se,Uint8Array)&&(se=t.from(se,se.offset,se.byteLength)),je(ne,Uint8Array)&&(ne=t.from(ne,ne.offset,ne.byteLength)),!t.isBuffer(se)||!t.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(se===ne)return 0;let Ce=se.length,Ze=ne.length;for(let rt=0,Je=Math.min(Ce,Ze);rtZe.length?(t.isBuffer(Je)||(Je=t.from(Je)),Je.copy(Ze,rt)):Uint8Array.prototype.set.call(Ze,Je,rt);else if(t.isBuffer(Je))Je.copy(Ze,rt);else throw new TypeError('"list" argument must be an Array of Buffers');rt+=Je.length}return Ze};function l(he,se){if(t.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||je(he,ArrayBuffer))return he.byteLength;if(typeof he!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof he);let ne=he.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&ne===0)return 0;let Ze=!1;for(;;)switch(se){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":return pe(he).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne*2;case"hex":return ne>>>1;case"base64":return Re(he).length;default:if(Ze)return Ce?-1:pe(he).length;se=(""+se).toLowerCase(),Ze=!0}}t.byteLength=l;function x(he,se,ne){let Ce=!1;if((se===void 0||se<0)&&(se=0),se>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,se>>>=0,ne<=se))return"";for(he||(he="utf8");;)switch(he){case"hex":return O(this,se,ne);case"utf8":case"utf-8":return D(this,se,ne);case"ascii":return F(this,se,ne);case"latin1":case"binary":return N(this,se,ne);case"base64":return y(this,se,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,se,ne);default:if(Ce)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),Ce=!0}}t.prototype._isBuffer=!0;function w(he,se,ne){let Ce=he[se];he[se]=he[ne],he[ne]=Ce}t.prototype.swap16=function(){let se=this.length;if(se%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;nene&&(se+=" ... "),""},_&&(t.prototype[_]=t.prototype.inspect),t.prototype.compare=function(se,ne,Ce,Ze,rt){if(je(se,Uint8Array)&&(se=t.from(se,se.offset,se.byteLength)),!t.isBuffer(se))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof se);if(ne===void 0&&(ne=0),Ce===void 0&&(Ce=se?se.length:0),Ze===void 0&&(Ze=0),rt===void 0&&(rt=this.length),ne<0||Ce>se.length||Ze<0||rt>this.length)throw new RangeError("out of range index");if(Ze>=rt&&ne>=Ce)return 0;if(Ze>=rt)return-1;if(ne>=Ce)return 1;if(ne>>>=0,Ce>>>=0,Ze>>>=0,rt>>>=0,this===se)return 0;let Je=rt-Ze,St=Ce-ne,kt=Math.min(Je,St),Bt=this.slice(Ze,rt),Vt=se.slice(ne,Ce);for(let Ar=0;Ar2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,at(ne)&&(ne=Ze?0:he.length-1),ne<0&&(ne=he.length+ne),ne>=he.length){if(Ze)return-1;ne=he.length-1}else if(ne<0)if(Ze)ne=0;else return-1;if(typeof se=="string"&&(se=t.from(se,Ce)),t.isBuffer(se))return se.length===0?-1:E(he,se,ne,Ce,Ze);if(typeof se=="number")return se=se&255,typeof Uint8Array.prototype.indexOf=="function"?Ze?Uint8Array.prototype.indexOf.call(he,se,ne):Uint8Array.prototype.lastIndexOf.call(he,se,ne):E(he,[se],ne,Ce,Ze);throw new TypeError("val must be string, number or Buffer")}function E(he,se,ne,Ce,Ze){let rt=1,Je=he.length,St=se.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(he.length<2||se.length<2)return-1;rt=2,Je/=2,St/=2,ne/=2}function kt(Vt,Ar){return rt===1?Vt[Ar]:Vt.readUInt16BE(Ar*rt)}let Bt;if(Ze){let Vt=-1;for(Bt=ne;BtJe&&(ne=Je-St),Bt=ne;Bt>=0;Bt--){let Vt=!0;for(let Ar=0;ArZe&&(Ce=Ze)):Ce=Ze;let rt=se.length;Ce>rt/2&&(Ce=rt/2);let Je;for(Je=0;Je>>0,isFinite(Ce)?(Ce=Ce>>>0,Ze===void 0&&(Ze="utf8")):(Ze=Ce,Ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let rt=this.length-ne;if((Ce===void 0||Ce>rt)&&(Ce=rt),se.length>0&&(Ce<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ze||(Ze="utf8");let Je=!1;for(;;)switch(Ze){case"hex":return p(this,se,ne,Ce);case"utf8":case"utf-8":return b(this,se,ne,Ce);case"ascii":case"latin1":case"binary":return d(this,se,ne,Ce);case"base64":return u(this,se,ne,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,se,ne,Ce);default:if(Je)throw new TypeError("Unknown encoding: "+Ze);Ze=(""+Ze).toLowerCase(),Je=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(he,se,ne){return se===0&&ne===he.length?q.fromByteArray(he):q.fromByteArray(he.slice(se,ne))}function D(he,se,ne){ne=Math.min(he.length,ne);let Ce=[],Ze=se;for(;Ze239?4:rt>223?3:rt>191?2:1;if(Ze+St<=ne){let kt,Bt,Vt,Ar;switch(St){case 1:rt<128&&(Je=rt);break;case 2:kt=he[Ze+1],(kt&192)===128&&(Ar=(rt&31)<<6|kt&63,Ar>127&&(Je=Ar));break;case 3:kt=he[Ze+1],Bt=he[Ze+2],(kt&192)===128&&(Bt&192)===128&&(Ar=(rt&15)<<12|(kt&63)<<6|Bt&63,Ar>2047&&(Ar<55296||Ar>57343)&&(Je=Ar));break;case 4:kt=he[Ze+1],Bt=he[Ze+2],Vt=he[Ze+3],(kt&192)===128&&(Bt&192)===128&&(Vt&192)===128&&(Ar=(rt&15)<<18|(kt&63)<<12|(Bt&63)<<6|Vt&63,Ar>65535&&Ar<1114112&&(Je=Ar))}}Je===null?(Je=65533,St=1):Je>65535&&(Je-=65536,Ce.push(Je>>>10&1023|55296),Je=56320|Je&1023),Ce.push(Je),Ze+=St}return z(Ce)}var P=4096;function z(he){let se=he.length;if(se<=P)return String.fromCharCode.apply(String,he);let ne="",Ce=0;for(;CeCe)&&(ne=Ce);let Ze="";for(let rt=se;rtCe&&(se=Ce),ne<0?(ne+=Ce,ne<0&&(ne=0)):ne>Ce&&(ne=Ce),nene)throw new RangeError("Trying to access beyond buffer length")}t.prototype.readUintLE=t.prototype.readUIntLE=function(se,ne,Ce){se=se>>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se],rt=1,Je=0;for(;++Je>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se+--ne],rt=1;for(;ne>0&&(rt*=256);)Ze+=this[se+--ne]*rt;return Ze},t.prototype.readUint8=t.prototype.readUInt8=function(se,ne){return se=se>>>0,ne||U(se,1,this.length),this[se]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(se,ne){return se=se>>>0,ne||U(se,2,this.length),this[se]|this[se+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(se,ne){return se=se>>>0,ne||U(se,2,this.length),this[se]<<8|this[se+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),(this[se]|this[se+1]<<8|this[se+2]<<16)+this[se+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]*16777216+(this[se+1]<<16|this[se+2]<<8|this[se+3])},t.prototype.readBigUInt64LE=tt(function(se){se=se>>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=ne+this[++se]*2**8+this[++se]*2**16+this[++se]*2**24,rt=this[++se]+this[++se]*2**8+this[++se]*2**16+Ce*2**24;return BigInt(Ze)+(BigInt(rt)<>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=ne*2**24+this[++se]*2**16+this[++se]*2**8+this[++se],rt=this[++se]*2**24+this[++se]*2**16+this[++se]*2**8+Ce;return(BigInt(Ze)<>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se],rt=1,Je=0;for(;++Je=rt&&(Ze-=Math.pow(2,8*ne)),Ze},t.prototype.readIntBE=function(se,ne,Ce){se=se>>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=ne,rt=1,Je=this[se+--Ze];for(;Ze>0&&(rt*=256);)Je+=this[se+--Ze]*rt;return rt*=128,Je>=rt&&(Je-=Math.pow(2,8*ne)),Je},t.prototype.readInt8=function(se,ne){return se=se>>>0,ne||U(se,1,this.length),this[se]&128?(255-this[se]+1)*-1:this[se]},t.prototype.readInt16LE=function(se,ne){se=se>>>0,ne||U(se,2,this.length);let Ce=this[se]|this[se+1]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt16BE=function(se,ne){se=se>>>0,ne||U(se,2,this.length);let Ce=this[se+1]|this[se]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt32LE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]|this[se+1]<<8|this[se+2]<<16|this[se+3]<<24},t.prototype.readInt32BE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]<<24|this[se+1]<<16|this[se+2]<<8|this[se+3]},t.prototype.readBigInt64LE=tt(function(se){se=se>>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=this[se+4]+this[se+5]*2**8+this[se+6]*2**16+(Ce<<24);return(BigInt(Ze)<>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=(ne<<24)+this[++se]*2**16+this[++se]*2**8+this[++se];return(BigInt(Ze)<>>0,ne||U(se,4,this.length),v.read(this,se,!0,23,4)},t.prototype.readFloatBE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),v.read(this,se,!1,23,4)},t.prototype.readDoubleLE=function(se,ne){return se=se>>>0,ne||U(se,8,this.length),v.read(this,se,!0,52,8)},t.prototype.readDoubleBE=function(se,ne){return se=se>>>0,ne||U(se,8,this.length),v.read(this,se,!1,52,8)};function B(he,se,ne,Ce,Ze,rt){if(!t.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(se>Ze||sehe.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,Ce=Ce>>>0,!Ze){let St=Math.pow(2,8*Ce)-1;B(this,se,ne,Ce,St,0)}let rt=1,Je=0;for(this[ne]=se&255;++Je>>0,Ce=Ce>>>0,!Ze){let St=Math.pow(2,8*Ce)-1;B(this,se,ne,Ce,St,0)}let rt=Ce-1,Je=1;for(this[ne+rt]=se&255;--rt>=0&&(Je*=256);)this[ne+rt]=se/Je&255;return ne+Ce},t.prototype.writeUint8=t.prototype.writeUInt8=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,1,255,0),this[ne]=se&255,ne+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,65535,0),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,65535,0),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,4294967295,0),this[ne+3]=se>>>24,this[ne+2]=se>>>16,this[ne+1]=se>>>8,this[ne]=se&255,ne+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,4294967295,0),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4};function W(he,se,ne,Ce,Ze){le(se,Ce,Ze,he,ne,7);let rt=Number(se&BigInt(4294967295));he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt;let Je=Number(se>>BigInt(32)&BigInt(4294967295));return he[ne++]=Je,Je=Je>>8,he[ne++]=Je,Je=Je>>8,he[ne++]=Je,Je=Je>>8,he[ne++]=Je,ne}function $(he,se,ne,Ce,Ze){le(se,Ce,Ze,he,ne,7);let rt=Number(se&BigInt(4294967295));he[ne+7]=rt,rt=rt>>8,he[ne+6]=rt,rt=rt>>8,he[ne+5]=rt,rt=rt>>8,he[ne+4]=rt;let Je=Number(se>>BigInt(32)&BigInt(4294967295));return he[ne+3]=Je,Je=Je>>8,he[ne+2]=Je,Je=Je>>8,he[ne+1]=Je,Je=Je>>8,he[ne]=Je,ne+8}t.prototype.writeBigUInt64LE=tt(function(se,ne=0){return W(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=tt(function(se,ne=0){return $(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,!Ze){let kt=Math.pow(2,8*Ce-1);B(this,se,ne,Ce,kt-1,-kt)}let rt=0,Je=1,St=0;for(this[ne]=se&255;++rt>0)-St&255;return ne+Ce},t.prototype.writeIntBE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,!Ze){let kt=Math.pow(2,8*Ce-1);B(this,se,ne,Ce,kt-1,-kt)}let rt=Ce-1,Je=1,St=0;for(this[ne+rt]=se&255;--rt>=0&&(Je*=256);)se<0&&St===0&&this[ne+rt+1]!==0&&(St=1),this[ne+rt]=(se/Je>>0)-St&255;return ne+Ce},t.prototype.writeInt8=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,1,127,-128),se<0&&(se=255+se+1),this[ne]=se&255,ne+1},t.prototype.writeInt16LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,32767,-32768),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},t.prototype.writeInt16BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,32767,-32768),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},t.prototype.writeInt32LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,2147483647,-2147483648),this[ne]=se&255,this[ne+1]=se>>>8,this[ne+2]=se>>>16,this[ne+3]=se>>>24,ne+4},t.prototype.writeInt32BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,2147483647,-2147483648),se<0&&(se=4294967295+se+1),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4},t.prototype.writeBigInt64LE=tt(function(se,ne=0){return W(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=tt(function(se,ne=0){return $(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ue(he,se,ne,Ce,Ze,rt){if(ne+Ce>he.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function ce(he,se,ne,Ce,Ze){return se=+se,ne=ne>>>0,Ze||ue(he,se,ne,4,34028234663852886e22,-34028234663852886e22),v.write(he,se,ne,Ce,23,4),ne+4}t.prototype.writeFloatLE=function(se,ne,Ce){return ce(this,se,ne,!0,Ce)},t.prototype.writeFloatBE=function(se,ne,Ce){return ce(this,se,ne,!1,Ce)};function de(he,se,ne,Ce,Ze){return se=+se,ne=ne>>>0,Ze||ue(he,se,ne,8,17976931348623157e292,-17976931348623157e292),v.write(he,se,ne,Ce,52,8),ne+8}t.prototype.writeDoubleLE=function(se,ne,Ce){return de(this,se,ne,!0,Ce)},t.prototype.writeDoubleBE=function(se,ne,Ce){return de(this,se,ne,!1,Ce)},t.prototype.copy=function(se,ne,Ce,Ze){if(!t.isBuffer(se))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),!Ze&&Ze!==0&&(Ze=this.length),ne>=se.length&&(ne=se.length),ne||(ne=0),Ze>0&&Ze=this.length)throw new RangeError("Index out of range");if(Ze<0)throw new RangeError("sourceEnd out of bounds");Ze>this.length&&(Ze=this.length),se.length-ne>>0,Ce=Ce===void 0?this.length:Ce>>>0,se||(se=0);let rt;if(typeof se=="number")for(rt=ne;rt2**32?Ze=Q(String(ne)):typeof ne=="bigint"&&(Ze=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(Ze=Q(Ze)),Ze+="n"),Ce+=` It must be ${se}. Received ${Ze}`,Ce},RangeError);function Q(he){let se="",ne=he.length,Ce=he[0]==="-"?1:0;for(;ne>=Ce+4;ne-=3)se=`_${he.slice(ne-3,ne)}${se}`;return`${he.slice(0,ne)}${se}`}function V(he,se,ne){ae(se,"offset"),(he[se]===void 0||he[se+ne]===void 0)&&j(se,he.length-(ne+1))}function le(he,se,ne,Ce,Ze,rt){if(he>ne||he3?se===0||se===BigInt(0)?St=`>= 0${Je} and < 2${Je} ** ${(rt+1)*8}${Je}`:St=`>= -(2${Je} ** ${(rt+1)*8-1}${Je}) and < 2 ** ${(rt+1)*8-1}${Je}`:St=`>= ${se}${Je} and <= ${ne}${Je}`,new Y.ERR_OUT_OF_RANGE("value",St,he)}V(Ce,Ze,rt)}function ae(he,se){if(typeof he!="number")throw new Y.ERR_INVALID_ARG_TYPE(se,"number",he)}function j(he,se,ne){throw Math.floor(he)!==he?(ae(he,ne),new Y.ERR_OUT_OF_RANGE(ne||"offset","an integer",he)):se<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${se}`,he)}var ee=/[^+/0-9A-Za-z-_]/g;function te(he){if(he=he.split("=")[0],he=he.trim().replace(ee,""),he.length<2)return"";for(;he.length%4!==0;)he=he+"=";return he}function pe(he,se){se=se||1/0;let ne,Ce=he.length,Ze=null,rt=[];for(let Je=0;Je55295&&ne<57344){if(!Ze){if(ne>56319){(se-=3)>-1&&rt.push(239,191,189);continue}else if(Je+1===Ce){(se-=3)>-1&&rt.push(239,191,189);continue}Ze=ne;continue}if(ne<56320){(se-=3)>-1&&rt.push(239,191,189),Ze=ne;continue}ne=(Ze-55296<<10|ne-56320)+65536}else Ze&&(se-=3)>-1&&rt.push(239,191,189);if(Ze=null,ne<128){if((se-=1)<0)break;rt.push(ne)}else if(ne<2048){if((se-=2)<0)break;rt.push(ne>>6|192,ne&63|128)}else if(ne<65536){if((se-=3)<0)break;rt.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if((se-=4)<0)break;rt.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,ne&63|128)}else throw new Error("Invalid code point")}return rt}function we(he){let se=[];for(let ne=0;ne>8,Ze=ne%256,rt.push(Ze),rt.push(Ce);return rt}function Re(he){return q.toByteArray(te(he))}function Pe(he,se,ne,Ce){let Ze;for(Ze=0;Ze=se.length||Ze>=he.length);++Ze)se[Ze+ne]=he[Ze];return Ze}function je(he,se){return he instanceof se||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===se.name}function at(he){return he!==he}var nt=function(){let he="0123456789abcdef",se=new Array(256);for(let ne=0;ne<16;++ne){let Ce=ne*16;for(let Ze=0;Ze<16;++Ze)se[Ce+Ze]=he[ne]+he[Ze]}return se}();function tt(he){return typeof BigInt>"u"?Ve:he}function Ve(){throw new Error("BigInt not supported")}}}),p3=He({"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 _={},S=Symbol("test"),M=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(M)!=="[object Symbol]")return!1;var e=42;_[S]=e;for(var t in _)return!1;if(typeof Object.keys=="function"&&Object.keys(_).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(_).length!==0)return!1;var r=Object.getOwnPropertySymbols(_);if(r.length!==1||r[0]!==S||!Object.prototype.propertyIsEnumerable.call(_,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(_,S);if(o.value!==e||o.enumerable!==!0)return!1}return!0}}}),W_=He({"node_modules/has-tostringtag/shams.js"(Z,q){"use strict";var v=p3();q.exports=function(){return v()&&!!Symbol.toStringTag}}}),FS=He({"node_modules/es-object-atoms/index.js"(Z,q){"use strict";q.exports=Object}}),hO=He({"node_modules/es-errors/index.js"(Z,q){"use strict";q.exports=Error}}),pO=He({"node_modules/es-errors/eval.js"(Z,q){"use strict";q.exports=EvalError}}),dO=He({"node_modules/es-errors/range.js"(Z,q){"use strict";q.exports=RangeError}}),vO=He({"node_modules/es-errors/ref.js"(Z,q){"use strict";q.exports=ReferenceError}}),OS=He({"node_modules/es-errors/syntax.js"(Z,q){"use strict";q.exports=SyntaxError}}),m1=He({"node_modules/es-errors/type.js"(Z,q){"use strict";q.exports=TypeError}}),mO=He({"node_modules/es-errors/uri.js"(Z,q){"use strict";q.exports=URIError}}),gO=He({"node_modules/math-intrinsics/abs.js"(Z,q){"use strict";q.exports=Math.abs}}),yO=He({"node_modules/math-intrinsics/floor.js"(Z,q){"use strict";q.exports=Math.floor}}),_O=He({"node_modules/math-intrinsics/max.js"(Z,q){"use strict";q.exports=Math.max}}),xO=He({"node_modules/math-intrinsics/min.js"(Z,q){"use strict";q.exports=Math.min}}),bO=He({"node_modules/math-intrinsics/pow.js"(Z,q){"use strict";q.exports=Math.pow}}),wO=He({"node_modules/math-intrinsics/round.js"(Z,q){"use strict";q.exports=Math.round}}),TO=He({"node_modules/math-intrinsics/isNaN.js"(Z,q){"use strict";q.exports=Number.isNaN||function(_){return _!==_}}}),AO=He({"node_modules/math-intrinsics/sign.js"(Z,q){"use strict";var v=TO();q.exports=function(S){return v(S)||S===0?S:S<0?-1:1}}}),SO=He({"node_modules/gopd/gOPD.js"(Z,q){"use strict";q.exports=Object.getOwnPropertyDescriptor}}),ag=He({"node_modules/gopd/index.js"(Z,q){"use strict";var v=SO();if(v)try{v([],"length")}catch{v=null}q.exports=v}}),X_=He({"node_modules/es-define-property/index.js"(Z,q){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}q.exports=v}}),MO=He({"node_modules/has-symbols/index.js"(Z,q){"use strict";var v=typeof Symbol<"u"&&Symbol,_=p3();q.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_()}}}),BS=He({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,q){"use strict";q.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),NS=He({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,q){"use strict";var v=FS();q.exports=v.getPrototypeOf||null}}),EO=He({"node_modules/function-bind/implementation.js"(Z,q){"use strict";var v="Function.prototype.bind called on incompatible ",_=Object.prototype.toString,S=Math.max,M="[object Function]",e=function(a,i){for(var n=[],s=0;s"u"||!b?v:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":p&&b?b([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S,"%eval%":eval,"%EvalError%":M,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&b?b(b([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p||!b?v:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":e,"%ReferenceError%":t,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p||!b?v:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&b?b(""[Symbol.iterator]()):v,"%Symbol%":p?Symbol:v,"%SyntaxError%":r,"%ThrowTypeError%":E,"%TypedArray%":P,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":y,"%Function.prototype.apply%":g,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":d,"%Math.abs%":i,"%Math.floor%":n,"%Math.max%":s,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":c,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(V){F=b(b(V)),z["%Error.prototype%"]=F}var F,N=function V(le){var ae;if(le==="%AsyncFunction%")ae=l("async function () {}");else if(le==="%GeneratorFunction%")ae=l("function* () {}");else if(le==="%AsyncGeneratorFunction%")ae=l("async function* () {}");else if(le==="%AsyncGenerator%"){var j=V("%AsyncGeneratorFunction%");j&&(ae=j.prototype)}else if(le==="%AsyncIteratorPrototype%"){var ee=V("%AsyncGenerator%");ee&&b&&(ae=b(ee.prototype))}return z[le]=ae,ae},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"]},L=g1(),U=RO(),B=L.call(y,Array.prototype.concat),W=L.call(g,Array.prototype.splice),$=L.call(y,String.prototype.replace),ue=L.call(y,String.prototype.slice),ce=L.call(y,RegExp.prototype.exec),de=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,X=function(le){var ae=ue(le,0,1),j=ue(le,-1);if(ae==="%"&&j!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&ae!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var ee=[];return $(le,de,function(te,pe,we,Se){ee[ee.length]=we?$(Se,Y,"$1"):pe||te}),ee},Q=function(le,ae){var j=le,ee;if(U(O,j)&&(ee=O[j],j="%"+ee[0]+"%"),U(z,j)){var te=z[j];if(te===D&&(te=N(j)),typeof te>"u"&&!ae)throw new o("intrinsic "+le+" exists, but is not available. Please file an issue!");return{alias:ee,name:j,value:te}}throw new r("intrinsic "+le+" does not exist!")};q.exports=function(le,ae){if(typeof le!="string"||le.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new o('"allowMissing" argument must be a boolean');if(ce(/^%?[^%]*%?$/,le)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=X(le),ee=j.length>0?j[0]:"",te=Q("%"+ee+"%",ae),pe=te.name,we=te.value,Se=!1,Re=te.alias;Re&&(ee=Re[0],W(j,B([0,1],Re)));for(var Pe=1,je=!0;Pe=j.length){var Ve=x(we,at);je=!!Ve,je&&"get"in Ve&&!("originalValue"in Ve.get)?we=Ve.get:we=we[at]}else je=U(we,at),we=we[at];je&&!Se&&(z[pe]=we)}}return we}}}),DO=He({"node_modules/define-data-property/index.js"(Z,q){"use strict";var v=X_(),_=OS(),S=m1(),M=ag();q.exports=function(t,r,o){if(!t||typeof t!="object"&&typeof t!="function")throw new S("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new S("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new S("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new S("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new S("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new S("`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,h=!!M&&M(t,r);if(v)v(t,r,{configurable:n===null&&h?h.configurable:!n,enumerable:a===null&&h?h.enumerable:!a,value:o,writable:i===null&&h?h.writable:!i});else if(s||!a&&!i&&!n)t[r]=o;else throw new _("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),jS=He({"node_modules/has-property-descriptors/index.js"(Z,q){"use strict";var v=X_(),_=function(){return!!v};_.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},q.exports=_}}),zO=He({"node_modules/set-function-length/index.js"(Z,q){"use strict";var v=v3(),_=DO(),S=jS()(),M=ag(),e=m1(),t=v("%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 h=M(o,"length");h&&!h.configurable&&(n=!1),h&&!h.writable&&(s=!1)}return(n||s||!i)&&(S?_(o,"length",a,!0,!0):_(o,"length",a)),o}}}),Z_=He({"node_modules/call-bind/index.js"(Z,q){"use strict";var v=g1(),_=v3(),S=zO(),M=m1(),e=_("%Function.prototype.apply%"),t=_("%Function.prototype.call%"),r=_("%Reflect.apply%",!0)||v.call(t,e),o=X_(),a=_("%Math.max%");q.exports=function(s){if(typeof s!="function")throw new M("a function is required");var h=r(v,t,arguments);return S(h,1+a(0,s.length-(arguments.length-1)),!0)};var i=function(){return r(v,e,arguments)};o?o(q.exports,"apply",{value:i}):q.exports.apply=i}}),y1=He({"node_modules/call-bind/callBound.js"(Z,q){"use strict";var v=v3(),_=Z_(),S=_(v("String.prototype.indexOf"));q.exports=function(e,t){var r=v(e,!!t);return typeof r=="function"&&S(e,".prototype.")>-1?_(r):r}}}),FO=He({"node_modules/is-arguments/index.js"(Z,q){"use strict";var v=W_()(),_=y1(),S=_("Object.prototype.toString"),M=function(o){return v&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:S(o)==="[object Arguments]"},e=function(o){return M(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&S(o)!=="[object Array]"&&S(o.callee)==="[object Function]"},t=function(){return M(arguments)}();M.isLegacyArguments=e,q.exports=t?M:e}}),OO=He({"node_modules/is-generator-function/index.js"(Z,q){"use strict";var v=Object.prototype.toString,_=Function.prototype.toString,S=/^\s*(?:function)?\*/,M=W_()(),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(S.test(_.call(a)))return!0;if(!M){var i=v.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}}}),BO=He({"node_modules/is-callable/index.js"(Z,q){"use strict";var v=Function.prototype.toString,_=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,M;if(typeof _=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw M}}),M={},_(function(){throw 42},null,S)}catch(x){x!==M&&(_=null)}else _=null;var e=/^\s*class\b/,t=function(w){try{var A=v.call(w);return e.test(A)}catch{return!1}},r=function(w){try{return t(w)?!1:(v.call(w),!0)}catch{return!1}},o=Object.prototype.toString,a="[object Object]",i="[object Function]",n="[object GeneratorFunction]",s="[object HTMLAllCollection]",h="[object HTML document.all class]",f="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,c=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(l=document.all,o.call(l)===o.call(document.all)&&(T=function(w){if((c||!w)&&(typeof w>"u"||typeof w=="object"))try{var A=o.call(w);return(A===s||A===h||A===f||A===a)&&w("")==null}catch{}return!1}));var l;q.exports=_?function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{_(w,null,S)}catch(A){if(A!==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(m)return r(w);if(t(w))return!1;var A=o.call(w);return A!==i&&A!==n&&!/^\[object HTML/.test(A)?!1:r(w)}}}),qS=He({"node_modules/for-each/index.js"(Z,q){"use strict";var v=BO(),_=Object.prototype.toString,S=Object.prototype.hasOwnProperty,M=function(a,i,n){for(var s=0,h=a.length;s=3&&(s=n),_.call(a)==="[object Array]"?M(a,i,s):typeof a=="string"?e(a,i,s):t(a,i,s)};q.exports=r}}),VS=He({"node_modules/available-typed-arrays/index.js"(Z,q){"use strict";var v=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],_=typeof globalThis>"u"?window:globalThis;q.exports=function(){for(var M=[],e=0;e"u"?window:globalThis,a=_(),i=M("String.prototype.slice"),n=Object.getPrototypeOf,s=M("Array.prototype.indexOf",!0)||function(T,l){for(var x=0;x-1?l:l!=="Object"?!1:m(T)}return e?f(T):null}}}),UO=He({"node_modules/is-typed-array/index.js"(Z,q){"use strict";var v=qS(),_=VS(),S=y1(),M=S("Object.prototype.toString"),e=W_()(),t=ag(),r=typeof globalThis>"u"?window:globalThis,o=_(),a=S("Array.prototype.indexOf",!0)||function(m,c){for(var T=0;T-1}return t?h(m):!1}}}),GS=He({"node_modules/util/support/types.js"(Z){"use strict";var q=FO(),v=OO(),_=NO(),S=UO();function M(Se){return Se.call.bind(Se)}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 h(Se,Re){if(typeof Se!="object")return!1;try{return Re(Se),!0}catch{return!1}}Z.isArgumentsObject=q,Z.isGeneratorFunction=v,Z.isTypedArray=S;function f(Se){return typeof Promise<"u"&&Se instanceof Promise||Se!==null&&typeof Se=="object"&&typeof Se.then=="function"&&typeof Se.catch=="function"}Z.isPromise=f;function m(Se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Se):S(Se)||W(Se)}Z.isArrayBufferView=m;function c(Se){return _(Se)==="Uint8Array"}Z.isUint8Array=c;function T(Se){return _(Se)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Se){return _(Se)==="Uint16Array"}Z.isUint16Array=l;function x(Se){return _(Se)==="Uint32Array"}Z.isUint32Array=x;function w(Se){return _(Se)==="Int8Array"}Z.isInt8Array=w;function A(Se){return _(Se)==="Int16Array"}Z.isInt16Array=A;function E(Se){return _(Se)==="Int32Array"}Z.isInt32Array=E;function p(Se){return _(Se)==="Float32Array"}Z.isFloat32Array=p;function b(Se){return _(Se)==="Float64Array"}Z.isFloat64Array=b;function d(Se){return _(Se)==="BigInt64Array"}Z.isBigInt64Array=d;function u(Se){return _(Se)==="BigUint64Array"}Z.isBigUint64Array=u;function g(Se){return r(Se)==="[object Map]"}g.working=typeof Map<"u"&&g(new Map);function y(Se){return typeof Map>"u"?!1:g.working?g(Se):Se instanceof Map}Z.isMap=y;function D(Se){return r(Se)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function P(Se){return typeof Set>"u"?!1:D.working?D(Se):Se instanceof Set}Z.isSet=P;function z(Se){return r(Se)==="[object WeakMap]"}z.working=typeof WeakMap<"u"&&z(new WeakMap);function F(Se){return typeof WeakMap>"u"?!1:z.working?z(Se):Se instanceof WeakMap}Z.isWeakMap=F;function N(Se){return r(Se)==="[object WeakSet]"}N.working=typeof WeakSet<"u"&&N(new WeakSet);function O(Se){return N(Se)}Z.isWeakSet=O;function L(Se){return r(Se)==="[object ArrayBuffer]"}L.working=typeof ArrayBuffer<"u"&&L(new ArrayBuffer);function U(Se){return typeof ArrayBuffer>"u"?!1:L.working?L(Se):Se instanceof ArrayBuffer}Z.isArrayBuffer=U;function B(Se){return r(Se)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function W(Se){return typeof DataView>"u"?!1:B.working?B(Se):Se instanceof DataView}Z.isDataView=W;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ue(Se){return r(Se)==="[object SharedArrayBuffer]"}function ce(Se){return typeof $>"u"?!1:(typeof ue.working>"u"&&(ue.working=ue(new $)),ue.working?ue(Se):Se instanceof $)}Z.isSharedArrayBuffer=ce;function de(Se){return r(Se)==="[object AsyncFunction]"}Z.isAsyncFunction=de;function Y(Se){return r(Se)==="[object Map Iterator]"}Z.isMapIterator=Y;function X(Se){return r(Se)==="[object Set Iterator]"}Z.isSetIterator=X;function Q(Se){return r(Se)==="[object Generator]"}Z.isGeneratorObject=Q;function V(Se){return r(Se)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=V;function le(Se){return h(Se,o)}Z.isNumberObject=le;function ae(Se){return h(Se,a)}Z.isStringObject=ae;function j(Se){return h(Se,i)}Z.isBooleanObject=j;function ee(Se){return e&&h(Se,n)}Z.isBigIntObject=ee;function te(Se){return t&&h(Se,s)}Z.isSymbolObject=te;function pe(Se){return le(Se)||ae(Se)||j(Se)||ee(Se)||te(Se)}Z.isBoxedPrimitive=pe;function we(Se){return typeof Uint8Array<"u"&&(U(Se)||ce(Se))}Z.isAnyArrayBuffer=we,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Se){Object.defineProperty(Z,Se,{enumerable:!1,value:function(){throw new Error(Se+" is not supported in userland")}})})}}),HS=He({"node_modules/util/support/isBufferBrowser.js"(Z,q){q.exports=function(_){return _&&typeof _=="object"&&typeof _.copy=="function"&&typeof _.fill=="function"&&typeof _.readUInt8=="function"}}}),WS=He({"(disabled):node_modules/util/util.js"(Z){var q=Object.getOwnPropertyDescriptors||function(W){for(var $=Object.keys(W),ue={},ce=0;ce<$.length;ce++)ue[$[ce]]=Object.getOwnPropertyDescriptor(W,$[ce]);return ue},v=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var W=[],$=0;$=ce)return X;switch(X){case"%s":return String(ue[$++]);case"%d":return Number(ue[$++]);case"%j":try{return JSON.stringify(ue[$++])}catch{return"[Circular]"}default:return X}}),Y=ue[$];$"u")return function(){return Z.deprecate(B,W).apply(this,arguments)};var $=!1;function ue(){if(!$){if(process.throwDeprecation)throw new Error(W);process.traceDeprecation?console.trace(W):console.error(W),$=!0}return B.apply(this,arguments)}return ue};var _={},S=/^$/;M="false",M=M.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+M+"$","i");var M;Z.debuglog=function(B){if(B=B.toUpperCase(),!_[B])if(S.test(B)){var W=process.pid;_[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,W,$)}}else _[B]=function(){};return _[B]};function e(B,W){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),c(W)?$.showHidden=W:W&&Z._extend($,W),E($.showHidden)&&($.showHidden=!1),E($.depth)&&($.depth=2),E($.colors)&&($.colors=!1),E($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=t),a($,B,$.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(B,W){var $=e.styles[W];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,W){return B}function o(B){var W={};return B.forEach(function($,ue){W[$]=!0}),W}function a(B,W,$){if(B.customInspect&&W&&g(W.inspect)&&W.inspect!==Z.inspect&&!(W.constructor&&W.constructor.prototype===W)){var ue=W.inspect($,B);return w(ue)||(ue=a(B,ue,$)),ue}var ce=i(B,W);if(ce)return ce;var de=Object.keys(W),Y=o(de);if(B.showHidden&&(de=Object.getOwnPropertyNames(W)),u(W)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return n(W);if(de.length===0){if(g(W)){var X=W.name?": "+W.name:"";return B.stylize("[Function"+X+"]","special")}if(p(W))return B.stylize(RegExp.prototype.toString.call(W),"regexp");if(d(W))return B.stylize(Date.prototype.toString.call(W),"date");if(u(W))return n(W)}var Q="",V=!1,le=["{","}"];if(m(W)&&(V=!0,le=["[","]"]),g(W)){var ae=W.name?": "+W.name:"";Q=" [Function"+ae+"]"}if(p(W)&&(Q=" "+RegExp.prototype.toString.call(W)),d(W)&&(Q=" "+Date.prototype.toUTCString.call(W)),u(W)&&(Q=" "+n(W)),de.length===0&&(!V||W.length==0))return le[0]+Q+le[1];if($<0)return p(W)?B.stylize(RegExp.prototype.toString.call(W),"regexp"):B.stylize("[Object]","special");B.seen.push(W);var j;return V?j=s(B,W,$,Y,de):j=de.map(function(ee){return h(B,W,$,Y,ee,V)}),B.seen.pop(),f(j,Q,le)}function i(B,W){if(E(W))return B.stylize("undefined","undefined");if(w(W)){var $="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(x(W))return B.stylize(""+W,"number");if(c(W))return B.stylize(""+W,"boolean");if(T(W))return B.stylize("null","null")}function n(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,W,$,ue,ce){for(var de=[],Y=0,X=W.length;Y1?(i[h-1]-i[0])/(h-1):1,c,T;for(m>=0?T=n?e:t:T=n?o:r,a+=m*M*(n?-1:1)*(m>=0?1:-1);s90&&v.log("Long binary search..."),s-1};function e(a,i){return ai}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]===S;n--);for(var s=i[n]-i[0]||1,h=s/(n||1)/1e4,f=[],m,c=0;c<=n;c++){var T=i[c],l=T-m;m===void 0?(f.push(T),m=T):l>h&&(s=Math.min(s,l),f.push(T),m=T)}return{vals:f,minDiff:s}},Z.roundUp=function(a,i,n){for(var s=0,h=i.length-1,f,m=0,c=n?0:1,T=n?1:0,l=n?Math.ceil:Math.floor;s0&&(s=1),n&&s)return a.sort(i)}return s?a:a.reverse()},Z.findIndexOfMin=function(a,i){i=i||_;for(var n=1/0,s,h=0;hM.length)&&(e=M.length),q(S)||(S=!1),v(M[0])){for(r=new Array(e),t=0;t_.length-1)return _[_.length-1];var M=S%1;return M*_[Math.ceil(S)]+(1-M)*_[Math.floor(S)]}}}),W7=He({"src/lib/angles.js"(Z,q){"use strict";var v=Yy(),_=v.mod,S=v.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 S(l-T,e)}function i(T,l){return Math.abs(a(T,l))}function n(T,l){if(o(l))return!0;var x,w;l[0]w&&(w+=e);var A=_(T,e),E=A+e;return A>=x&&A<=w||E>=x&&E<=w}function s(T,l,x,w){if(!n(l,w))return!1;var A,E;return x[0]=A&&T<=E}function h(T,l,x,w,A,E,p){A=A||0,E=E||0;var b=o([x,w]),d,u,g,y,D;b?(d=0,u=M,g=e):x1/3&&v.x<2/3},Z.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},Z.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},Z.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},Z.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),Z7=He({"src/lib/geometry2d.js"(Z){"use strict";var q=Yy().mod;Z.segmentsIntersect=v;function v(t,r,o,a,i,n,s,h){var f=o-t,m=i-t,c=s-i,T=a-r,l=n-r,x=h-n,w=f*x-c*T;if(w===0)return null;var A=(m*x-c*l)/w,E=(m*T-f*l)/w;return E<0||E>1||A<0||A>1?null:{x:t+f*A,y:r+T*A}}Z.segmentDistance=function(r,o,a,i,n,s,h,f){if(v(r,o,a,i,n,s,h,f))return 0;var m=a-r,c=i-o,T=h-n,l=f-s,x=m*m+c*c,w=T*T+l*l,A=Math.min(_(m,c,x,n-r,s-o),_(m,c,x,h-r,f-o),_(T,l,w,r-n,o-s),_(T,l,w,a-n,i-s));return Math.sqrt(A)};function _(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,h=i-r;return s*s+h*h}else{var f=a*r-i*t;return f*f/o}}var S,M,e;Z.getTextLocation=function(r,o,a,i){if((r!==M||i!==e)&&(S={},M=r,e=i),S[a])return S[a];var n=r.getPointAtLength(q(a-i/2,o)),s=r.getPointAtLength(q(a+i/2,o)),h=Math.atan((s.y-n.y)/(s.x-n.x)),f=r.getPointAtLength(q(a,o)),m=(f.x*4+n.x+s.x)/6,c=(f.y*4+n.y+s.y)/6,T={x:m,y:c,theta:h};return S[a]=T,T},Z.clearLocationCache=function(){M=null},Z.getVisibleSegment=function(r,o,a){var i=o.left,n=o.right,s=o.top,h=o.bottom,f=0,m=r.getTotalLength(),c=m,T,l;function x(A){var E=r.getPointAtLength(A);A===0?T=E:A===m&&(l=E);var p=E.xn?E.x-n:0,b=E.yh?E.y-h:0;return Math.sqrt(p*p+b*b)}for(var w=x(f);w;){if(f+=w+a,f>c)return;w=x(f)}for(w=x(c);w;){if(c-=w+a,f>c)return;w=x(c)}return{min:f,max:c,len:c-f,total:m,isClosed:f===0&&c===m&&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,h=i.iterationLimit||30,f=r.getPointAtLength(0)[a]>r.getPointAtLength(n)[a]?-1:1,m=0,c=0,T=n,l,x,w;m0?T=l:c=l,m++}return x}}}),y2=He({"src/lib/throttle.js"(Z){"use strict";var q={};Z.throttle=function(S,M,e){var t=q[S],r=Date.now();if(!t){for(var o in q)q[o].tst.ts+M){a();return}t.timer=setTimeout(function(){a(),t.timer=null},M)},Z.done=function(_){var S=q[_];return!S||!S.timer?Promise.resolve():new Promise(function(M){var e=S.onDone;S.onDone=function(){e&&e(),M(),S.onDone=null}})},Z.clear=function(_){if(_)v(q[_]),delete q[_];else for(var S in q)Z.clear(S)};function v(_){_&&_.timer!==null&&(clearTimeout(_.timer),_.timer=null)}}}),Y7=He({"src/lib/clear_responsive.js"(Z,q){"use strict";q.exports=function(_){_._responsiveChartHandler&&(window.removeEventListener("resize",_._responsiveChartHandler),delete _._responsiveChartHandler)}}}),K7=He({"node_modules/is-mobile/index.js"(Z,q){"use strict";q.exports=M,q.exports.isMobile=M,q.exports.default=M;var v=/(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,_=/CrOS/,S=/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=v.test(t)&&!_.test(t)||!!e.tablet&&S.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}}}),J7=He({"src/lib/preserve_drawing_buffer.js"(Z,q){"use strict";var v=ns(),_=K7();q.exports=function(e){var t;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:t=S(),typeof t!="string")return!0;var r=_({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a-1;n--){var s=o[n];if(s.slice(0,8)==="Version/"){var h=s.slice(8).split(".")[0];if(v(h)&&(h=+h),h>=13)return!0}}}return r};function S(){var M;return typeof navigator<"u"&&(M=navigator.userAgent),M&&M.headers&&typeof M.headers["user-agent"]=="string"&&(M=M.headers["user-agent"]),M}}}),$7=He({"src/lib/make_trace_groups.js"(Z,q){"use strict";var v=Vn();q.exports=function(S,M,e){var t=S.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=S.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(o){o[0][r]=v.select(this)}),t}}}),Q7=He({"src/lib/localize.js"(Z,q){"use strict";var v=so();q.exports=function(S,M){for(var e=S._context.locale,t=0;t<2;t++){for(var r=S._context.locales,o=0;o<2;o++){var a=(r[e]||{}).dictionary;if(a){var i=a[M];if(i)return i}r=v.localeRegistry}var n=e.split("-")[0];if(n===e)break;e=n}return M}}}),r5=He({"src/lib/filter_unique.js"(Z,q){"use strict";q.exports=function(_){for(var S={},M=[],e=0,t=0;t<_.length;t++){var r=_[t];S[r]!==1&&(S[r]=1,M[e++]=r)}return M}}}),ez=He({"src/lib/filter_visible.js"(Z,q){"use strict";q.exports=function(e){for(var t=S(e)?_:v,r=[],o=0;o1?(M*_+M*S)/M:_+S,t=String(e).length;if(t>16){var r=String(S).length,o=String(_).length;if(t>=o+r){var a=parseFloat(e).toPrecision(12);a.indexOf("e+")===-1&&(e=+a)}}return e}}}),rz=He({"src/lib/clean_number.js"(Z,q){"use strict";var v=ns(),_=Gs().BADNUM,S=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;q.exports=function(e){return typeof e=="string"&&(e=e.replace(S,"")),v(e)?Number(e):_}}}),sa=He({"src/lib/index.js"(Z,q){"use strict";var v=Vn(),_=Zv().utcFormat,S=YA().format,M=ns(),e=Gs(),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(ae){var j=String(ae);i[j]||(i[j]=1,a.warn('encountered bad format: "'+j+'"'))},a.noFormat=function(ae){return String(ae)},a.numberFormat=function(ae){var j;try{j=S(a.adjustFormat(ae))}catch{return a.warnBadFormat(ae),a.noFormat}return j},a.nestedProperty=b_(),a.keyedContainer=u7(),a.relativeAttr=c7(),a.isPlainObject=Yv(),a.toLogRange=h2(),a.relinkPrivateKeys=f7();var n=hp();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 h=h7();a.valObjectMeta=h.valObjectMeta,a.coerce=h.coerce,a.coerce2=h.coerce2,a.coerceFont=h.coerceFont,a.coercePattern=h.coercePattern,a.coerceHoverinfo=h.coerceHoverinfo,a.coerceSelectionMarkerOpacity=h.coerceSelectionMarkerOpacity,a.validate=h.validate;var f=G7();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 m=g2();a.findBin=m.findBin,a.sorterAsc=m.sorterAsc,a.sorterDes=m.sorterDes,a.distinctVals=m.distinctVals,a.roundUp=m.roundUp,a.sort=m.sort,a.findIndexOfMin=m.findIndexOfMin,a.sortObjectKeys=$m();var c=H7();a.aggNums=c.aggNums,a.len=c.len,a.mean=c.mean,a.geometricMean=c.geometricMean,a.median=c.median,a.midRange=c.midRange,a.variance=c.variance,a.stdev=c.stdev,a.interp=c.interp;var T=d2();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=W7();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 x=X7();a.isLeftAnchor=x.isLeftAnchor,a.isCenterAnchor=x.isCenterAnchor,a.isRightAnchor=x.isRightAnchor,a.isTopAnchor=x.isTopAnchor,a.isMiddleAnchor=x.isMiddleAnchor,a.isBottomAnchor=x.isBottomAnchor;var w=Z7();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 A=rs();a.extendFlat=A.extendFlat,a.extendDeep=A.extendDeep,a.extendDeepAll=A.extendDeepAll,a.extendDeepNoArrays=A.extendDeepNoArrays;var E=Jm();a.log=E.log,a.warn=E.warn,a.error=E.error;var p=Jy();a.counterRegex=p.counter;var b=y2();a.throttle=b.throttle,a.throttleDone=b.done,a.clearThrottle=b.clear;var d=T_();a.getGraphDiv=d.getGraphDiv,a.isPlotDiv=d.isPlotDiv,a.removeElement=d.removeElement,a.addStyleRule=d.addStyleRule,a.addRelatedStyleRule=d.addRelatedStyleRule,a.deleteRelatedStyleRule=d.deleteRelatedStyleRule,a.setStyleOnHover=d.setStyleOnHover,a.getFullTransformMatrix=d.getFullTransformMatrix,a.getElementTransformMatrix=d.getElementTransformMatrix,a.getElementAndAncestors=d.getElementAndAncestors,a.equalDomRects=d.equalDomRects,a.clearResponsive=Y7(),a.preserveDrawingBuffer=J7(),a.makeTraceGroups=$7(),a._=Q7(),a.notifier=JA(),a.filterUnique=r5(),a.filterVisible=ez(),a.pushUnique=$A(),a.increment=tz(),a.cleanNumber=rz(),a.ensureNumber=function(j){return M(j)?(j=Number(j),j>t||j=j?!1:M(ae)&&ae>=0&&ae%1===0},a.noop=p2(),a.identity=S_(),a.repeat=function(ae,j){for(var ee=new Array(j),te=0;teee?Math.max(ee,Math.min(j,ae)):Math.max(j,Math.min(ee,ae))},a.bBoxIntersect=function(ae,j,ee){return ee=ee||0,ae.left<=j.right+ee&&j.left<=ae.right+ee&&ae.top<=j.bottom+ee&&j.top<=ae.bottom+ee},a.simpleMap=function(ae,j,ee,te,pe){for(var we=ae.length,Se=new Array(we),Re=0;Re=Math.pow(2,ee)?pe>10?(a.warn("randstr failed uniqueness"),Se):ae(j,ee,te,(pe||0)+1):Se},a.OptionControl=function(ae,j){ae||(ae={}),j||(j="opt");var ee={};return ee.optionList=[],ee._newoption=function(te){te[j]=ae,ee[te.name]=te,ee.optionList.push(te)},ee["_"+j]=ae,ee},a.smooth=function(ae,j){if(j=Math.round(j)||0,j<2)return ae;var ee=ae.length,te=2*ee,pe=2*j-1,we=new Array(pe),Se=new Array(ee),Re,Pe,je,at;for(Re=0;Re=te&&(je-=te*Math.floor(je/te)),je<0?je=-1-je:je>=ee&&(je=te-1-je),at+=ae[je]*we[Pe];Se[Re]=at}return Se},a.syncOrAsync=function(ae,j,ee){var te,pe;function we(){return a.syncOrAsync(ae,j,ee)}for(;ae.length;)if(pe=ae.splice(0,1)[0],te=pe(j),te&&te.then)return te.then(we);return ee&&ee(j)},a.stripTrailingSlash=function(ae){return ae.slice(-1)==="/"?ae.slice(0,-1):ae},a.noneOrAll=function(ae,j,ee){if(ae){var te=!1,pe=!0,we,Se;for(we=0;we0?pe:0})},a.fillArray=function(ae,j,ee,te){if(te=te||a.identity,a.isArrayOrTypedArray(ae))for(var pe=0;peP.test(window.navigator.userAgent);var z=/Firefox\/(\d+)\.\d+/;a.getFirefoxVersion=function(){var ae=z.exec(window.navigator.userAgent);if(ae&&ae.length===2){var j=parseInt(ae[1]);if(!isNaN(j))return j}return null},a.isD3Selection=function(ae){return ae instanceof v.selection},a.ensureSingle=function(ae,j,ee,te){var pe=ae.select(j+(ee?"."+ee:""));if(pe.size())return pe;var we=ae.append(j);return ee&&we.classed(ee,!0),te&&we.call(te),we},a.ensureSingleById=function(ae,j,ee,te){var pe=ae.select(j+"#"+ee);if(pe.size())return pe;var we=ae.append(j).attr("id",ee);return te&&we.call(te),we},a.objectFromPath=function(ae,j){for(var ee=ae.split("."),te,pe=te={},we=0;we1?pe+Se[1]:"";if(we&&(Se.length>1||Re.length>4||ee))for(;te.test(Re);)Re=Re.replace(te,"$1"+we+"$2");return Re+Pe},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var L=/^\w*$/;a.templateString=function(ae,j){var ee={};return ae.replace(a.TEMPLATE_STRING_REGEX,function(te,pe){var we;return L.test(pe)?we=j[pe]:(ee[pe]=ee[pe]||a.nestedProperty(j,pe).get,we=ee[pe](!0)),we!==void 0?we:""})};var U={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=ae=>de(vs(So({},ae),{opts:U}));var B={max:10,count:0,name:"texttemplate"};a.texttemplateString=ae=>de(vs(So({},ae),{opts:B}));var W=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(ae){var j=ae.match(W);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:ae,op:null,number:null}}var ue={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=ae=>de(vs(So({},ae),{opts:ue}));var ce=/^[:|\|]/;function de({data:ae=[],locale:j,fallback:ee,labels:te={},opts:pe,template:we}){return we.replace(a.TEMPLATE_STRING_REGEX,(Se,Re,Pe)=>{let je=["xother","yother"].includes(Re),at=["_xother","_yother"].includes(Re),nt=["_xother_","_yother_"].includes(Re),tt=["xother_","yother_"].includes(Re),Ve=je||at||tt||nt;(at||nt)&&(Re=Re.substring(1)),(tt||nt)&&(Re=Re.substring(0,Re.length-1));let he=null,se=null;if(pe.parseMultDiv){var ne=$(Re);Re=ne.key,he=ne.op,se=ne.number}let Ce;if(Ve){if(te[Re]===void 0)return"";Ce=te[Re]}else for(let St of ae)if(St){if(St.hasOwnProperty(Re)){Ce=St[Re];break}if(L.test(Re)||(Ce=a.nestedProperty(St,Re).get(!0)),Ce!==void 0)break}if(Ce===void 0){let{count:St,max:kt,name:Bt}=pe,Vt=ee===!1?Se:ee;return St=Y&&Se<=X,je=Re>=Y&&Re<=X;if(Pe&&(te=10*te+Se-Y),je&&(pe=10*pe+Re-Y),!Pe||!je){if(te!==pe)return te-pe;if(Se!==Re)return Se-Re}}return pe-te};var Q=2e9;a.seedPseudoRandom=function(){Q=2e9},a.pseudoRandom=function(){var ae=Q;return Q=(69069*Q+1)%4294967296,Math.abs(Q-ae)<429496729?a.pseudoRandom():Q/4294967296},a.fillText=function(ae,j,ee){var te=Array.isArray(ee)?function(Se){ee.push(Se)}:function(Se){ee.text=Se},pe=a.extractOption(ae,j,"htx","hovertext");if(a.isValidTextValue(pe))return te(pe);var we=a.extractOption(ae,j,"tx","text");if(a.isValidTextValue(we))return te(we)},a.isValidTextValue=function(ae){return ae||ae===0},a.formatPercent=function(ae,j){j=j||0;for(var ee=(Math.round(100*ae*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",te=0;te1&&(je=1):je=0,a.strTranslate(pe-je*(ee+Se),we-je*(te+Re))+a.strScale(je)+(Pe?"rotate("+Pe+(j?"":" "+ee+" "+te)+")":"")},a.setTransormAndDisplay=function(ae,j){ae.attr("transform",a.getTextTransform(j)),ae.style("display",j.scale?null:"none")},a.ensureUniformFontSize=function(ae,j){var ee=a.extendFlat({},j);return ee.size=Math.max(j.size,ae._fullLayout.uniformtext.minsize||0),ee},a.join2=function(ae,j,ee){var te=ae.length;return te>1?ae.slice(0,-1).join(j)+ee+ae[te-1]:ae.join(j)},a.bigFont=function(ae){return Math.round(1.2*ae)};var V=a.getFirefoxVersion(),le=V!==null&&V<86;a.getPositionFromD3Event=function(){return le?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),az=He({"build/plotcss.js"(){"use strict";var Z=sa(),q={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#fff;border-color:#e0e2e5;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#f3f3f3;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",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(_ in q)v=_.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(v,q[_]);var v,_}}),a5=He({"node_modules/is-browser/client.js"(Z,q){q.exports=!0}}),i5=He({"node_modules/has-hover/index.js"(Z,q){"use strict";var v=a5(),_;typeof window.matchMedia=="function"?_=!window.matchMedia("(hover: none)").matches:_=v,q.exports=_}}),Z0=He({"node_modules/events/events.js"(Z,q){"use strict";var v=typeof Reflect=="object"?Reflect:null,_=v&&typeof v.apply=="function"?v.apply:function(E,p,b){return Function.prototype.apply.call(E,p,b)},S;v&&typeof v.ownKeys=="function"?S=v.ownKeys:Object.getOwnPropertySymbols?S=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:S=function(E){return Object.getOwnPropertyNames(E)};function M(A){console&&console.warn&&console.warn(A)}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(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(A){if(typeof A!="number"||A<0||e(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");r=A}}),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(A){return A._maxListeners===void 0?t.defaultMaxListeners:A._maxListeners}t.prototype.getMaxListeners=function(){return a(this)},t.prototype.emit=function(E){for(var p=[],b=1;b0&&(g=p[0]),g instanceof Error)throw g;var y=new Error("Unhandled error."+(g?" ("+g.message+")":""));throw y.context=g,y}var D=u[E];if(D===void 0)return!1;if(typeof D=="function")_(D,this,p);else for(var P=D.length,z=m(D,P),b=0;b0&&g.length>d&&!g.warned){g.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+g.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=A,y.type=E,y.count=g.length,M(y)}return A}t.prototype.addListener=function(E,p){return i(this,E,p,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(E,p){return i(this,E,p,!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(A,E,p){var b={fired:!1,wrapFn:void 0,target:A,type:E,listener:p},d=n.bind(b);return d.listener=p,b.wrapFn=d,d}t.prototype.once=function(E,p){return o(p),this.on(E,s(this,E,p)),this},t.prototype.prependOnceListener=function(E,p){return o(p),this.prependListener(E,s(this,E,p)),this},t.prototype.removeListener=function(E,p){var b,d,u,g,y;if(o(p),d=this._events,d===void 0)return this;if(b=d[E],b===void 0)return this;if(b===p||b.listener===p)--this._eventsCount===0?this._events=Object.create(null):(delete d[E],d.removeListener&&this.emit("removeListener",E,b.listener||p));else if(typeof b!="function"){for(u=-1,g=b.length-1;g>=0;g--)if(b[g]===p||b[g].listener===p){y=b[g].listener,u=g;break}if(u<0)return this;u===0?b.shift():c(b,u),b.length===1&&(d[E]=b[0]),d.removeListener!==void 0&&this.emit("removeListener",E,y||p)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(E){var p,b,d;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),g;for(d=0;d=0;d--)this.removeListener(E,p[d]);return this};function h(A,E,p){var b=A._events;if(b===void 0)return[];var d=b[E];return d===void 0?[]:typeof d=="function"?p?[d.listener||d]:[d]:p?T(d):m(d,d.length)}t.prototype.listeners=function(E){return h(this,E,!0)},t.prototype.rawListeners=function(E){return h(this,E,!1)},t.listenerCount=function(A,E){return typeof A.listenerCount=="function"?A.listenerCount(E):f.call(A,E)},t.prototype.listenerCount=f;function f(A){var E=this._events;if(E!==void 0){var p=E[A];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?S(this._events):[]};function m(A,E){for(var p=new Array(E),b=0;b{},{passive:!0}),S},triggerHandler:function(S,M,e){var t,r=S._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_.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=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,o=0;o=L.length)return!1;if(P.dimensions===2){if(F++,z.length===F)return P;var U=z[F];if(!w(U))return!1;P=L[O][U]}else P=L[O]}else P=L}}return P}function w(P){return P===Math.round(P)&&P>=0}function A(P){var z,F;z=q.modules[P]._module,F=z.basePlotModule;var N={};N.type=null;var O=o({},_),L=o({},z.attributes);Z.crawl(L,function(W,$,ue,ce,de){n(O,de).set(void 0),W===void 0&&n(L,de).set(void 0)}),o(N,O),q.traceIs(P,"noOpacity")&&delete N.opacity,q.traceIs(P,"showLegend")||(delete N.showlegend,delete N.legendgroup),q.traceIs(P,"noHover")&&(delete N.hoverinfo,delete N.hoverlabel),z.selectPoints||delete N.selectedpoints,o(N,L),F.attributes&&o(N,F.attributes),N.type=P;var U={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:P,attributes:b(N)};if(z.layoutAttributes){var B={};o(B,z.layoutAttributes),U.layoutAttributes=b(B)}return z.animatable||Z.crawl(U,function(W){Z.isValObject(W)&&"anim"in W&&delete W.anim}),U}function E(){var P={},z,F;o(P,S);for(z in q.subplotsRegistry)if(F=q.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var N=0;N=a&&(o._input||{})._templateitemname;n&&(i=a);var s=r+"["+i+"]",h;function f(){h={},n&&(h[s]={},h[s][_]=n)}f();function m(x,w){h[x]=w}function c(x,w){n?q.nestedProperty(h[s],x).set(w):h[s+"."+x]=w}function T(){var x=h;return f(),x}function l(x,w){x&&c(x,w);var A=T();for(var E in A)q.nestedProperty(t,E).set(A[E])}return{modifyBase:m,modifyItem:c,getUpdateObj:T,applyUpdate:l}}}}),lh=He({"src/plots/cartesian/constants.js"(Z,q){"use strict";var v=Jy().counter;q.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("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"}}}),tf=He({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var q=so(),v=lh();Z.id2name=function(M){if(!(typeof M!="string"||!M.match(v.AX_ID_PATTERN))){var e=M.split(" ")[0].slice(1);return e==="1"&&(e=""),M.charAt(0)+"axis"+e}},Z.name2id=function(M){if(M.match(v.AX_NAME_PATTERN)){var e=M.slice(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(v.AX_ID_PATTERN))&&!(e&&M.charAt(0)!==e)&&!(r&&!t)){var o=M.split(" ")[0].slice(1).replace(/^0+/,"");return o==="1"&&(o=""),M.charAt(0)+o+(r&&t?" domain":"")}},Z.list=function(S,M,e){var t=S._fullLayout;if(!t)return[];var r=Z.listIds(S,M),o=new Array(r.length),a;for(a=0;at?1:-1:+(S.slice(1)||1)-+(M.slice(1)||1)},Z.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function _(S,M){if(M&&M.length){for(var e=0;e0?".":"")+n;v.isPlainObject(s)?t(s,o,h,i+1):o(h,n,s)}})}}}),bc=He({"src/plots/plots.js"(Z,q){"use strict";var v=Vn(),_=Zv().timeFormatLocale,S=YA().formatLocale,M=ns(),e=KA(),t=Gh().version,r=so(),o=e1(),a=zl(),i=sa(),n=$n(),s=Gs().BADNUM,h=tf(),f=Qm().clearOutline,m=_2(),c=A_(),T=n5(),l=Wh().getModuleCalcData,x=i.relinkPrivateKeys,w=i._,A=q.exports={};i.extendFlat(A,r),A.attributes=au(),A.attributes.type.values=A.allTypes,A.fontAttrs=tc(),A.layoutAttributes=$y();var E=nz();A.executeAPICommand=E.executeAPICommand,A.computeAPICommandBindings=E.computeAPICommandBindings,A.manageCommandObserver=E.manageCommandObserver,A.hasSimpleAPICommandBindings=E.hasSimpleAPICommandBindings,A.redrawText=function(X){return X=i.getGraphDiv(X),new Promise(function(Q){setTimeout(function(){X._fullLayout&&(r.getComponentMethod("annotations","draw")(X),r.getComponentMethod("legend","draw")(X),r.getComponentMethod("colorbar","draw")(X),Q(A.previousPromises(X)))},300)})},A.resize=function(X){X=i.getGraphDiv(X);var Q,V=new Promise(function(le,ae){(!X||i.isHidden(X))&&ae(new Error("Resize must be passed a displayed plot div element.")),X._redrawTimer&&clearTimeout(X._redrawTimer),X._resolveResize&&(Q=X._resolveResize),X._resolveResize=le,X._redrawTimer=setTimeout(function(){if(!X.layout||X.layout.width&&X.layout.height||i.isHidden(X)){le(X);return}delete X.layout.width,delete X.layout.height;var j=X.changed;X.autoplay=!0,r.call("relayout",X,{autosize:!0}).then(function(){X.changed=j,X._resolveResize===le&&(delete X._resolveResize,le(X))})},100)});return Q&&Q(V),V},A.previousPromises=function(X){if((X._promises||[]).length)return Promise.all(X._promises).then(function(){X._promises=[]})},A.addLinks=function(X){if(!(!X._context.showLink&&!X._context.showSources)){var Q=X._fullLayout,V=i.ensureSingle(Q._paper,"text","js-plot-link-container",function(pe){pe.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:n.defaultLine,"pointer-events":"all"}).each(function(){var we=v.select(this);we.append("tspan").classed("js-link-to-tool",!0),we.append("tspan").classed("js-link-spacer",!0),we.append("tspan").classed("js-sourcelinks",!0)})}),le=V.node(),ae={y:Q._paper.attr("height")-9};document.body.contains(le)&&le.getComputedTextLength()>=Q.width-20?(ae["text-anchor"]="start",ae.x=5):(ae["text-anchor"]="end",ae.x=Q._paper.attr("width")-7),V.attr(ae);var j=V.select(".js-link-to-tool"),ee=V.select(".js-link-spacer"),te=V.select(".js-sourcelinks");X._context.showSources&&X._context.showSources(X),X._context.showLink&&p(X,j),ee.text(j.text()&&te.text()?" - ":"")}};function p(X,Q){Q.text("");var V=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(X._context.linkText+" \xBB");if(X._context.sendData)V.on("click",function(){A.sendDataToCloud(X)});else{var le=window.location.pathname.split("/"),ae=window.location.search;V.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+le[2].split(".")[0]+"/"+le[1]+ae})}}A.sendDataToCloud=function(X,Q){X.emit("plotly_beforeexport");let V=new URL(Q).origin;var le=A.graphJson(X,!1,"keepdata","object");le.version=t;var ae=new URL(Q);ae.searchParams.set("origin",window.location.origin);var j=window.open(ae.href,"_blank");if(!j){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),X.emit("plotly_exportfail");return}var ee=function(te){te.origin===V&&te.data&&te.data.type==="CHART_AUTH_SUCCESS"&&(j.postMessage({type:"chart",chart:le},V),window.removeEventListener("message",ee),X.emit("plotly_afterexport"))};return window.addEventListener("message",ee),!1};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],d=["year","month","dayMonth","dayMonthYear"];A.supplyDefaults=function(X,Q){var V=Q&&Q.skipUpdateCalc,le=X._fullLayout||{};if(le._skipDefaults){delete le._skipDefaults;return}var ae=X._fullLayout={},j=X.layout||{},ee=X._fullData||[],te=X._fullData=[],pe=X.data||[],we=X.calcdata||[],Se=X._context||{},Re;X._transitionData||A.createTransitionData(X),ae._dfltTitle={plot:w(X,"Click to enter Plot title"),subtitle:w(X,"Click to enter Plot subtitle"),x:w(X,"Click to enter X axis title"),y:w(X,"Click to enter Y axis title"),colorbar:w(X,"Click to enter Colorscale title"),annotation:w(X,"new text")},ae._traceWord=w(X,"trace");var Pe=y(X,b);if(ae._mapboxAccessToken=Se.mapboxAccessToken,le._initialAutoSizeIsDone){var je=le.width,at=le.height;A.supplyLayoutGlobalDefaults(j,ae,Pe),j.width||(ae.width=je),j.height||(ae.height=at),A.sanitizeMargins(ae)}else{A.supplyLayoutGlobalDefaults(j,ae,Pe);var nt=!j.width||!j.height,tt=ae.autosize,Ve=Se.autosizable,he=nt&&(tt||Ve);he?A.plotAutoSize(X,j,ae):nt&&A.sanitizeMargins(ae),!tt&&nt&&(j.width=ae.width,j.height=ae.height)}ae._d3locale=D(Pe,ae.separators),ae._extraFormat=y(X,d),ae._initialAutoSizeIsDone=!0,ae._dataLength=pe.length,ae._modules=[],ae._visibleModules=[],ae._basePlotModules=[];var se=ae._subplots=g(),ne=ae._splomAxes={x:{},y:{}},Ce=ae._splomSubplots={};ae._splomGridDflt={},ae._scatterStackOpts={},ae._firstScatter={},ae._alignmentOpts={},ae._colorAxes={},ae._requestRangeslider={},ae._traceUids=u(ee,pe),A.supplyDataDefaults(pe,te,j,ae);var Ze=Object.keys(ne.x),rt=Object.keys(ne.y);if(Ze.length>1&&rt.length>1){for(r.getComponentMethod("grid","sizeDefaults")(j,ae),Re=0;Re15&&rt.length>15&&ae.shapes.length===0&&ae.images.length===0,A.linkSubplots(te,ae,ee,le),A.cleanPlot(te,ae,ee,le);var Vt=!!(le._has&&le._has("cartesian")),Ar=!!(ae._has&&ae._has("cartesian")),vr=Vt,qr=Ar;vr&&!qr?le._bgLayer.remove():qr&&!vr&&(ae._shouldCreateBgLayer=!0),le._zoomlayer&&!X._dragging&&f({_fullLayout:le}),P(te,ae),x(ae,le),r.getComponentMethod("colorscale","crossTraceDefaults")(te,ae),ae._preGUI||(ae._preGUI={}),ae._tracePreGUI||(ae._tracePreGUI={});var kr=ae._tracePreGUI,Ur={},_t;for(_t in kr)Ur[_t]="old";for(Re=0;Re0){var Se=1-2*j;ee=Math.round(Se*ee),te=Math.round(Se*te)}}var Re=A.layoutAttributes.width.min,Pe=A.layoutAttributes.height.min;ee1,at=!V.height&&Math.abs(le.height-te)>1;(at||je)&&(je&&(le.width=ee),at&&(le.height=te)),Q._initialAutoSize||(Q._initialAutoSize={width:ee,height:te}),A.sanitizeMargins(le)},A.supplyLayoutModuleDefaults=function(X,Q,V,le){var ae=r.componentsRegistry,j=Q._basePlotModules,ee,te,pe,we=r.subplotsRegistry.cartesian;for(ee in ae)pe=ae[ee],pe.includeBasePlot&&pe.includeBasePlot(X,Q);j.length||j.push(we),Q._has("cartesian")&&(r.getComponentMethod("grid","contentDefaults")(X,Q),we.finalizeSubplots(X,Q));for(var Se in Q._subplots)Q._subplots[Se].sort(i.subplotSort);for(te=0;te1&&(V.l/=tt,V.r/=tt)}if(Pe){var Ve=(V.t+V.b)/Pe;Ve>1&&(V.t/=Ve,V.b/=Ve)}var he=V.xl!==void 0?V.xl:V.x,se=V.xr!==void 0?V.xr:V.x,ne=V.yt!==void 0?V.yt:V.y,Ce=V.yb!==void 0?V.yb:V.y;je[Q]={l:{val:he,size:V.l+nt},r:{val:se,size:V.r+nt},b:{val:Ce,size:V.b+nt},t:{val:ne,size:V.t+nt}},at[Q]=1}if(!le._replotting)return A.doAutoMargin(X)}};function U(X){if("_redrawFromAutoMarginCount"in X._fullLayout)return!1;var Q=h.list(X,"",!0);for(var V in Q)if(Q[V].autoshift||Q[V].shift)return!0;return!1}A.doAutoMargin=function(X){var Q=X._fullLayout,V=Q.width,le=Q.height;Q._size||(Q._size={}),N(Q);var ae=Q._size,j=Q.margin,ee={t:0,b:0,l:0,r:0},te=i.extendFlat({},ae),pe=j.l,we=j.r,Se=j.t,Re=j.b,Pe=Q._pushmargin,je=Q._pushmarginIds,at=Q.minreducedwidth,nt=Q.minreducedheight;if(j.autoexpand!==!1){for(var tt in Pe)je[tt]||delete Pe[tt];var Ve=X._fullLayout._reservedMargin;for(var he in Ve)for(var se in Ve[he]){var ne=Ve[he][se];ee[se]=Math.max(ee[se],ne)}Pe.base={l:{val:0,size:pe},r:{val:1,size:we},t:{val:1,size:Se},b:{val:0,size:Re}};for(var Ce in ee){var Ze=0;for(var rt in Pe)rt!=="base"&&M(Pe[rt][Ce].size)&&(Ze=Pe[rt][Ce].size>Ze?Pe[rt][Ce].size:Ze);var Je=Math.max(0,j[Ce]-Ze);ee[Ce]=Math.max(0,ee[Ce]-Je)}for(var St in Pe){var kt=Pe[St].l||{},Bt=Pe[St].b||{},Vt=kt.val,Ar=kt.size,vr=Bt.val,qr=Bt.size,kr=V-ee.r-ee.l,Ur=le-ee.t-ee.b;for(var _t in Pe){if(M(Ar)&&Pe[_t].r){var Fe=Pe[_t].r.val,Ye=Pe[_t].r.size;if(Fe>Vt){var Ae=(Ar*Fe+(Ye-kr)*Vt)/(Fe-Vt),Le=(Ye*(1-Vt)+(Ar-kr)*(1-Fe))/(Fe-Vt);Ae+Le>pe+we&&(pe=Ae,we=Le)}}if(M(qr)&&Pe[_t].t){var We=Pe[_t].t.val,Ke=Pe[_t].t.size;if(We>vr){var st=(qr*We+(Ke-Ur)*vr)/(We-vr),ot=(Ke*(1-vr)+(qr-Ur)*(1-We))/(We-vr);st+ot>Re+Se&&(Re=st,Se=ot)}}}}}var Ut=i.constrain(V-j.l-j.r,O,at),Ct=i.constrain(le-j.t-j.b,L,nt),Pt=Math.max(0,V-Ut),jt=Math.max(0,le-Ct);if(Pt){var cr=(pe+we)/Pt;cr>1&&(pe/=cr,we/=cr)}if(jt){var or=(Re+Se)/jt;or>1&&(Re/=or,Se/=or)}if(ae.l=Math.round(pe)+ee.l,ae.r=Math.round(we)+ee.r,ae.t=Math.round(Se)+ee.t,ae.b=Math.round(Re)+ee.b,ae.p=Math.round(j.pad),ae.w=Math.round(V)-ae.l-ae.r,ae.h=Math.round(le)-ae.t-ae.b,!Q._replotting&&(A.didMarginChange(te,ae)||U(X))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var nr=3*(1+Object.keys(je).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},A.graphJson=function(X,Q,V,le,ae,j){(ae&&Q&&!X._fullData||ae&&!Q&&!X._fullLayout)&&A.supplyDefaults(X);var ee=ae?X._fullData:X.data,te=ae?X._fullLayout:X.layout,pe=(X._transitionData||{})._frames;function we(Pe,je){if(typeof Pe=="function")return je?"_function_":null;if(i.isPlainObject(Pe)){var at={},nt;return Object.keys(Pe).sort().forEach(function(se){if(["_","["].indexOf(se.charAt(0))===-1){if(typeof Pe[se]=="function"){je&&(at[se]="_function");return}if(V==="keepdata"){if(se.slice(-3)==="src")return}else if(V==="keepstream"){if(nt=Pe[se+"src"],typeof nt=="string"&&nt.indexOf(":")>0&&!i.isPlainObject(Pe.stream))return}else if(V!=="keepall"&&(nt=Pe[se+"src"],typeof nt=="string"&&nt.indexOf(":")>0))return;at[se]=we(Pe[se],je)}}),at}var tt=Array.isArray(Pe),Ve=i.isTypedArray(Pe);if((tt||Ve)&&Pe.dtype&&Pe.shape){var he=Pe.bdata;return we({dtype:Pe.dtype,shape:Pe.shape,bdata:i.isArrayBuffer(he)?e.encode(he):he},je)}return tt?Pe.map(function(se){return we(se,je)}):Ve?i.simpleMap(Pe,i.identity):i.isJSDate(Pe)?i.ms2DateTimeLocal(+Pe):Pe}var Se={data:(ee||[]).map(function(Pe){var je=we(Pe);return Q&&delete je.fit,je})};if(!Q&&(Se.layout=we(te),ae)){var Re=te._size;Se.layout.computed={margin:{b:Re.b,l:Re.l,r:Re.r,t:Re.t}}}return pe&&(Se.frames=we(pe)),j&&(Se.config=we(X._context,!0)),le==="object"?Se:JSON.stringify(Se)},A.modifyFrames=function(X,Q){var V,le,ae,j=X._transitionData._frames,ee=X._transitionData._frameHash;for(V=0;V0&&(X._transitioningWithDuration=!0),X._transitionData._interruptCallbacks.push(function(){le=!0}),V.redraw&&X._transitionData._interruptCallbacks.push(function(){return r.call("redraw",X)}),X._transitionData._interruptCallbacks.push(function(){X.emit("plotly_transitioninterrupted",[])});var Pe=0,je=0;function at(){return Pe++,function(){je++,!le&&je===Pe&&te(Re)}}V.runFn(at),setTimeout(at())})}function te(Re){if(X._transitionData)return j(X._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(V.redraw)return r.call("redraw",X)}).then(function(){X._transitioning=!1,X._transitioningWithDuration=!1,X.emit("plotly_transitioned",[])}).then(Re)}function pe(){if(X._transitionData)return X._transitioning=!1,ae(X._transitionData._interruptCallbacks)}var we=[A.previousPromises,pe,V.prepareFn,A.rehover,A.reselect,ee],Se=i.syncOrAsync(we,X);return(!Se||!Se.then)&&(Se=Promise.resolve()),Se.then(function(){return X})}A.doCalcdata=function(X,Q){var V=h.list(X),le=X._fullData,ae=X._fullLayout,j,ee,te,pe,we=new Array(le.length),Se=(X.calcdata||[]).slice();for(X.calcdata=we,ae._numBoxes=0,ae._numViolins=0,ae._violinScaleGroupStats={},X._hmpixcount=0,X._hmlumcount=0,ae._piecolormap={},ae._sunburstcolormap={},ae._treemapcolormap={},ae._iciclecolormap={},ae._funnelareacolormap={},te=0;te=0;pe--)if(Ce[pe].enabled){j._indexToPoints=Ce[pe]._indexToPoints;break}ee&&ee.calc&&(ne=ee.calc(X,j))}(!Array.isArray(ne)||!ne[0])&&(ne=[{x:s,y:s}]),ne[0].t||(ne[0].t={}),ne[0].trace=j,we[he]=ne}}for(de(V,le,ae),te=0;teee||Pe>te)&&(ae.style("overflow","hidden"),Se=ae.node().getBoundingClientRect(),Re=Se.width,Pe=Se.height);var je=+O.attr("x"),at=+O.attr("y"),nt=Y||O.node().getBoundingClientRect().height,tt=-nt/4;if(ue[0]==="y")j.attr({transform:"rotate("+[-90,je,at]+")"+_(-Re/2,tt-Pe/2)});else if(ue[0]==="l")at=tt-Pe/2;else if(ue[0]==="a"&&ue.indexOf("atitle")!==0)je=0,at=tt;else{var Ve=O.attr("text-anchor");je=je-Re*(Ve==="middle"?.5:Ve==="end"?1:0),at=at+tt-Pe/2}ae.attr({x:je,y:at}),U&&U.call(O,j),de(j)})})):ce(),O};var t=/(<|<|<)/g,r=/(>|>|>)/g;function o(O){return O.replace(t,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function i(O,L,U){var B=parseInt((MathJax.version||"").split(".")[0]);if(B!==2&&B!==3){v.warn("No MathJax version:",MathJax.version);return}var W,$,ue,ce,de=function(){return $=v.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"})},Y=function(){$=v.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},X=function(){if(W=MathJax.Hub.config.menuSettings.renderer,W!=="SVG")return MathJax.Hub.setRenderer("SVG")},Q=function(){W=MathJax.config.startup.output,W!=="svg"&&(MathJax.config.startup.output="svg")},V=function(){var pe="math-output-"+v.randstr({},64);ce=q.select("body").append("div").attr({id:pe}).style({visibility:"hidden",position:"absolute","font-size":L.fontSize+"px"}).text(o(O));var we=ce.node();return B===2?MathJax.Hub.Typeset(we):MathJax.typeset([we])},le=function(){var pe=ce.select(B===2?".MathJax_SVG":".MathJax"),we=!pe.empty()&&ce.select("svg").node();if(!we)v.log("There was an error in the tex syntax.",O),U();else{var Se=we.getBoundingClientRect(),Re;B===2?Re=q.select("body").select("#MathJax_SVG_glyphs"):Re=pe.select("defs"),U(pe,Re,Se)}ce.remove()},ae=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($)},te=function(){MathJax.config=$};B===2?MathJax.Hub.Queue(de,X,V,le,ae,ee):B===3&&(Y(),Q(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){V(),le(),j(),te()}))}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"},h={sub:"-0.21em",sup:"0.42em"},f="\u200B",m=["http:","https:","mailto:","",void 0,":"],c=Z.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;Z.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,p=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function b(O,L){if(!O)return null;var U=O.match(L),B=U&&(U[3]||U[4]);return B&&y(B)}var d=/(^|;)\s*color:/;Z.plainText=function(O,L){L=L||{};for(var U=L.len!==void 0&&L.len!==-1?L.len:1/0,B=L.allowedTags!==void 0?L.allowedTags:["br"],W="...",$=W.length,ue=O.split(T),ce=[],de="",Y=0,X=0;X$?ce.push(Q.slice(0,Math.max(0,j-$))+W):ce.push(Q.slice(0,j));break}de=""}}return ce.join("")};var u={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},g=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function y(O){return O.replace(g,function(L,U){var B;return U.charAt(0)==="#"?B=D(U.charAt(1)==="x"?parseInt(U.slice(2),16):parseInt(U.slice(1),10)):B=u[U],B||L})}Z.convertEntities=y;function D(O){if(!(O>1114111)){var L=String.fromCodePoint;if(L)return L(O);var U=String.fromCharCode;return O<=65535?U(O):U((O>>10)+55232,O%1024+56320)}}function P(O,L){L=L.replace(c," ");var U=!1,B=[],W,$=-1;function ue(){$++;var Pe=document.createElementNS(S.svg,"tspan");q.select(Pe).attr({class:"line",dy:$*M+"em"}),O.appendChild(Pe),W=Pe;var je=B;if(B=[{node:Pe}],je.length>1)for(var at=1;at.",L);return}var je=B.pop();Pe!==je.type&&v.log("Start tag <"+je.type+"> doesnt match end tag <"+Pe+">. Pretending it did match.",L),W=B[B.length-1].node}var X=x.test(L);X?ue():(W=O,B=[{node:O}]);for(var Q=L.split(T),V=0;V=0;x--,w++){var A=c[x];l[w]=[1-A[0],A[1]]}return l}function h(c,T){T=T||{};for(var l=c.domain,x=c.range,w=x.length,A=new Array(w),E=0;Ec-f?f=c-(m-c):m-c=0?x=o.colorscale.sequential:x=o.colorscale.sequentialminus,s._sync("colorscale",x)}}}}),rc=He({"src/components/colorscale/index.js"(Z,q){"use strict";var v=W0(),_=wp();q.exports={moduleType:"component",name:"colorscale",attributes:ku(),layoutAttributes:o5(),supplyLayoutDefaults:oz(),handleDefaults:_h(),crossTraceDefaults:sz(),calc:Tp(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:_.hasColorscale,extractOpts:_.extractOpts,extractScale:_.extractScale,flipScale:_.flipScale,makeColorScaleFunc:_.makeColorScaleFunc,makeColorScaleFuncFromTrace:_.makeColorScaleFuncFromTrace}}}),Fu=He({"src/traces/scatter/subtypes.js"(Z,q){"use strict";var v=sa(),_=hp().isTypedArraySpec;q.exports={hasLines:function(S){return S.visible&&S.mode&&S.mode.indexOf("lines")!==-1},hasMarkers:function(S){return S.visible&&(S.mode&&S.mode.indexOf("markers")!==-1||S.type==="splom")},hasText:function(S){return S.visible&&S.mode&&S.mode.indexOf("text")!==-1},isBubble:function(S){var M=S.marker;return v.isPlainObject(M)&&(v.isArrayOrTypedArray(M.size)||_(M.size))}}}}),r1=He({"src/traces/scatter/make_bubble_size_func.js"(Z,q){"use strict";var v=ns();q.exports=function(S,M){M||(M=2);var e=S.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 v(i)&&i>0?Math.max(i,r):0}}}}),$p=He({"src/components/fx/helpers.js"(Z){"use strict";var q=sa();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=0&&o.index2&&(r.push([a].concat(i.splice(0,2))),n="l",a=a=="m"?"l":"L");;){if(i.length==v[n])return i.unshift(a),r.push(i);if(i.length0&&(se=100,he=he.replace("-open","")),he.indexOf("-dot")>0&&(se+=200,he=he.replace("-dot","")),he=l.symbolNames.indexOf(he),he>=0&&(he+=se)}return he%100>=d||he>=400?0:Math.floor(Math.max(he,0))};function g(he,se,ne,Ce){var Ze=he%100;return l.symbolFuncs[Ze](se,ne,Ce)+(he>=200?u:"")}var y=S("~f"),D={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(he,se,ne,Ce,Ze,rt){var Je=D[Ce];return P(he,se,ne,Je.type,Ze,rt,Je.start,Je.stop,!1,Je.reversed)};function P(he,se,ne,Ce,Ze,rt,Je,St,kt,Bt){var Vt=Ze.length,Ar;Ce==="linear"?Ar={node:"linearGradient",attrs:{x1:Je.x,y1:Je.y,x2:St.x,y2:St.y,gradientUnits:kt?"userSpaceOnUse":"objectBoundingBox"},reversed:Bt}:Ce==="radial"&&(Ar={node:"radialGradient",reversed:Bt});for(var vr=new Array(Vt),qr=0;qr=0&&he.i===void 0&&(he.i=rt.i),se.style("opacity",Ce.selectedOpacityFn?Ce.selectedOpacityFn(he):he.mo===void 0?Je.opacity:he.mo),Ce.ms2mrc){var kt;he.ms==="various"||Je.size==="various"?kt=3:kt=Ce.ms2mrc(he.ms),he.mrc=kt,Ce.selectedSizeFn&&(kt=he.mrc=Ce.selectedSizeFn(he));var Bt=l.symbolNumber(he.mx||Je.symbol)||0;he.om=Bt%200>=100;var Vt=Ve(he,ne),Ar=ee(he,ne);se.attr("d",g(Bt,kt,Vt,Ar))}var vr=!1,qr,kr,Ur;if(he.so)Ur=St.outlierwidth,kr=St.outliercolor,qr=Je.outliercolor;else{var _t=(St||{}).width;Ur=(he.mlw+1||_t+1||(he.trace?(he.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in he?kr=he.mlcc=Ce.lineScale(he.mlc):_.isArrayOrTypedArray(St.color)?kr=r.defaultLine:kr=St.color,_.isArrayOrTypedArray(Je.color)&&(qr=r.defaultLine,vr=!0),"mc"in he?qr=he.mcc=Ce.markerScale(he.mc):qr=Je.color||Je.colors||"rgba(0,0,0,0)",Ce.selectedColorFn&&(qr=Ce.selectedColorFn(he))}let Fe=he.mld||(St||{}).dash;if(Fe&&l.dashLine(se,Fe,Ur),he.om)se.call(r.stroke,qr).style({"stroke-width":(Ur||1)+"px",fill:"none"});else{se.style("stroke-width",(he.isBlank?0:Ur)+"px");var Ye=Je.gradient,Ae=he.mgt;Ae?vr=!0:Ae=Ye&&Ye.type,_.isArrayOrTypedArray(Ae)&&(Ae=Ae[0],D[Ae]||(Ae=0));var Le=Je.pattern,We=l.getPatternAttr,Ke=Le&&(We(Le.shape,he.i,"")||We(Le.path,he.i,""));if(Ae&&Ae!=="none"){var st=he.mgc;st?vr=!0:st=Ye.color;var ot=ne.uid;vr&&(ot+="-"+he.i),l.gradient(se,Ze,ot,Ae,[[0,st],[1,qr]],"fill")}else if(Ke){var Ut=!1,Ct=Le.fgcolor;!Ct&&rt&&rt.color&&(Ct=rt.color,Ut=!0);var Pt=We(Ct,he.i,rt&&rt.color||null),jt=We(Le.bgcolor,he.i,null),cr=Le.fgopacity,or=We(Le.size,he.i,8),nr=We(Le.solidity,he.i,.3);Ut=Ut||he.mcc||_.isArrayOrTypedArray(Le.shape)||_.isArrayOrTypedArray(Le.path)||_.isArrayOrTypedArray(Le.bgcolor)||_.isArrayOrTypedArray(Le.fgcolor)||_.isArrayOrTypedArray(Le.size)||_.isArrayOrTypedArray(Le.solidity);var Pr=ne.uid;Ut&&(Pr+="-"+he.i),l.pattern(se,"point",Ze,Pr,Ke,or,nr,he.mcc,Le.fillmode,jt,Pt,cr)}else _.isArrayOrTypedArray(qr)?r.fill(se,qr[he.i]):r.fill(se,qr);Ur&&r.stroke(se,kr)}},l.makePointStyleFns=function(he){var se={},ne=he.marker;return se.markerScale=l.tryColorscale(ne,""),se.lineScale=l.tryColorscale(ne,"line"),t.traceIs(he,"symbols")&&(se.ms2mrc=m.isBubble(he)?c(he):function(){return(ne.size||6)/2}),he.selectedpoints&&_.extendFlat(se,l.makeSelectedPointStyleFns(he)),se},l.makeSelectedPointStyleFns=function(he){var se={},ne=he.selected||{},Ce=he.unselected||{},Ze=he.marker||{},rt=ne.marker||{},Je=Ce.marker||{},St=Ze.opacity,kt=rt.opacity,Bt=Je.opacity,Vt=kt!==void 0,Ar=Bt!==void 0;(_.isArrayOrTypedArray(St)||Vt||Ar)&&(se.selectedOpacityFn=function(Le){var We=Le.mo===void 0?Ze.opacity:Le.mo;return Le.selected?Vt?kt:We:Ar?Bt:f*We});var vr=Ze.color,qr=rt.color,kr=Je.color;(qr||kr)&&(se.selectedColorFn=function(Le){var We=Le.mcc||vr;return Le.selected?qr||We:kr||We});var Ur=Ze.size,_t=rt.size,Fe=Je.size,Ye=_t!==void 0,Ae=Fe!==void 0;return t.traceIs(he,"symbols")&&(Ye||Ae)&&(se.selectedSizeFn=function(Le){var We=Le.mrc||Ur/2;return Le.selected?Ye?_t/2:We:Ae?Fe/2:We}),se},l.makeSelectedTextStyleFns=function(he){var se={},ne=he.selected||{},Ce=he.unselected||{},Ze=he.textfont||{},rt=ne.textfont||{},Je=Ce.textfont||{},St=Ze.color,kt=rt.color,Bt=Je.color;return se.selectedTextColorFn=function(Vt){var Ar=Vt.tc||St;return Vt.selected?kt||Ar:Bt||(kt?Ar:r.addOpacity(Ar,f))},se},l.selectedPointStyle=function(he,se){if(!(!he.size()||!se.selectedpoints)){var ne=l.makeSelectedPointStyleFns(se),Ce=se.marker||{},Ze=[];ne.selectedOpacityFn&&Ze.push(function(rt,Je){rt.style("opacity",ne.selectedOpacityFn(Je))}),ne.selectedColorFn&&Ze.push(function(rt,Je){r.fill(rt,ne.selectedColorFn(Je))}),ne.selectedSizeFn&&Ze.push(function(rt,Je){var St=Je.mx||Ce.symbol||0,kt=ne.selectedSizeFn(Je);rt.attr("d",g(l.symbolNumber(St),kt,Ve(Je,se),ee(Je,se))),Je.mrc2=kt}),Ze.length&&he.each(function(rt){for(var Je=v.select(this),St=0;St0?ne:0}l.textPointStyle=function(he,se,ne){if(he.size()){var Ce;if(se.selectedpoints){var Ze=l.makeSelectedTextStyleFns(se);Ce=Ze.selectedTextColorFn}var rt=se.texttemplate,Je=ne._fullLayout;he.each(function(St){var kt=v.select(this),Bt=rt?_.extractOption(St,se,"txt","texttemplate"):_.extractOption(St,se,"tx","text");if(!Bt&&Bt!==0){kt.remove();return}if(rt){var Vt=se._module.formatLabels,Ar=Vt?Vt(St,se,Je):{},vr={};T(vr,se,St.i),Bt=_.texttemplateString({data:[vr,St,se._meta],fallback:se.texttemplatefallback,labels:Ar,locale:Je._d3locale,template:Bt})}var qr=St.tp||se.textposition,kr=N(St,se),Ur=Ce?Ce(St):St.tc||se.textfont.color;kt.call(l.font,{family:St.tf||se.textfont.family,weight:St.tw||se.textfont.weight,style:St.ty||se.textfont.style,variant:St.tv||se.textfont.variant,textcase:St.tC||se.textfont.textcase,lineposition:St.tE||se.textfont.lineposition,shadow:St.tS||se.textfont.shadow,size:kr,color:Ur}).text(Bt).call(i.convertToTspans,ne).call(F,qr,kr,St.mrc)})}},l.selectedTextStyle=function(he,se){if(!(!he.size()||!se.selectedpoints)){var ne=l.makeSelectedTextStyleFns(se);he.each(function(Ce){var Ze=v.select(this),rt=ne.selectedTextColorFn(Ce),Je=Ce.tp||se.textposition,St=N(Ce,se);r.fill(Ze,rt);var kt=t.traceIs(se,"bar-like");F(Ze,Je,St,Ce.mrc2||Ce.mrc,kt)})}};var O=.5;l.smoothopen=function(he,se){if(he.length<3)return"M"+he.join("L");var ne="M"+he[0],Ce=[],Ze;for(Ze=1;Ze=kt||Le>=Vt&&Le<=kt)&&(We<=Ar&&We>=Bt||We>=Ar&&We<=Bt)&&(he=[Le,We])}return he}l.applyBackoff=Y,l.makeTester=function(){var he=_.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(ne){ne.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),se=_.ensureSingle(he,"path","js-reference-point",function(ne){ne.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=he,l.testref=se},l.savedBBoxes={};var X=0,Q=1e4;l.bBox=function(he,se,ne){ne||(ne=V(he));var Ce;if(ne){if(Ce=l.savedBBoxes[ne],Ce)return _.extendFlat({},Ce)}else if(he.childNodes.length===1){var Ze=he.childNodes[0];if(ne=V(Ze),ne){var rt=+Ze.getAttribute("x")||0,Je=+Ze.getAttribute("y")||0,St=Ze.getAttribute("transform");if(!St){var kt=l.bBox(Ze,!1,ne);return rt&&(kt.left+=rt,kt.right+=rt),Je&&(kt.top+=Je,kt.bottom+=Je),kt}if(ne+="~"+rt+"~"+Je+"~"+St,Ce=l.savedBBoxes[ne],Ce)return _.extendFlat({},Ce)}}var Bt,Vt;se?Bt=he:(Vt=l.tester.node(),Bt=he.cloneNode(!0),Vt.appendChild(Bt)),v.select(Bt).attr("transform",null).call(i.positionText,0,0);var Ar=Bt.getBoundingClientRect(),vr=l.testref.node().getBoundingClientRect();se||Vt.removeChild(Bt);var qr={height:Ar.height,width:Ar.width,left:Ar.left-vr.left,top:Ar.top-vr.top,right:Ar.right-vr.left,bottom:Ar.bottom-vr.top};return X>=Q&&(l.savedBBoxes={},X=0),ne&&(l.savedBBoxes[ne]=qr),X++,_.extendFlat({},qr)};function V(he){var se=he.getAttribute("data-unformatted");if(se!==null)return se+he.getAttribute("data-math")+he.getAttribute("text-anchor")+he.getAttribute("style")}l.setClipUrl=function(he,se,ne){he.attr("clip-path",le(se,ne))};function le(he,se){if(!he)return null;var ne=se._context,Ce=ne._exportedPlot?"":ne._baseUrl||"";return Ce?"url('"+Ce+"#"+he+"')":"url(#"+he+")"}l.getTranslate=function(he){var se=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ze=Ce.replace(se,function(rt,Je,St){return[Je,St].join(" ")}).split(" ");return{x:+Ze[0]||0,y:+Ze[1]||0}},l.setTranslate=function(he,se,ne){var Ce=/(\btranslate\(.*?\);?)/,Ze=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Je=he[Ze]("transform")||"";return se=se||0,ne=ne||0,Je=Je.replace(Ce,"").trim(),Je+=a(se,ne),Je=Je.trim(),he[rt]("transform",Je),Je},l.getScale=function(he){var se=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ne=he.attr?"attr":"getAttribute",Ce=he[ne]("transform")||"",Ze=Ce.replace(se,function(rt,Je,St){return[Je,St].join(" ")}).split(" ");return{x:+Ze[0]||1,y:+Ze[1]||1}},l.setScale=function(he,se,ne){var Ce=/(\bscale\(.*?\);?)/,Ze=he.attr?"attr":"getAttribute",rt=he.attr?"attr":"setAttribute",Je=he[Ze]("transform")||"";return se=se||1,ne=ne||1,Je=Je.replace(Ce,"").trim(),Je+="scale("+se+","+ne+")",Je=Je.trim(),he[rt]("transform",Je),Je};var ae=/\s*sc.*/;l.setPointGroupScale=function(he,se,ne){if(se=se||1,ne=ne||1,!!he){var Ce=se===1&&ne===1?"":"scale("+se+","+ne+")";he.each(function(){var Ze=(this.getAttribute("transform")||"").replace(ae,"");Ze+=Ce,Ze=Ze.trim(),this.setAttribute("transform",Ze)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(he,se,ne){he&&he.each(function(){var Ce,Ze=v.select(this),rt=Ze.select("text");if(rt.node()){var Je=parseFloat(rt.attr("x")||0),St=parseFloat(rt.attr("y")||0),kt=(Ze.attr("transform")||"").match(j);se===1&&ne===1?Ce=[]:Ce=[a(Je,St),"scale("+se+","+ne+")",a(-Je,-St)],kt&&Ce.push(kt),Ze.attr("transform",Ce.join(""))}})};function ee(he,se){var ne;return he&&(ne=he.mf),ne===void 0&&(ne=se.marker&&se.marker.standoff||0),!se._geo&&!se._xA?-ne:ne}l.getMarkerStandoff=ee;var te=Math.atan2,pe=Math.cos,we=Math.sin;function Se(he,se){var ne=se[0],Ce=se[1];return[ne*pe(he)-Ce*we(he),ne*we(he)+Ce*pe(he)]}var Re,Pe,je,at,nt,tt;function Ve(he,se){var ne=he.ma;ne===void 0&&(ne=se.marker.angle,(!ne||_.isArrayOrTypedArray(ne))&&(ne=0));var Ce,Ze,rt=se.marker.angleref;if(rt==="previous"||rt==="north"){if(se._geo){var Je=se._geo.project(he.lonlat);Ce=Je[0],Ze=Je[1]}else{var St=se._xA,kt=se._yA;if(St&&kt)Ce=St.c2p(he.x),Ze=kt.c2p(he.y);else return 90}if(se._geo){var Bt=he.lonlat[0],Vt=he.lonlat[1],Ar=se._geo.project([Bt,Vt+1e-5]),vr=se._geo.project([Bt+1e-5,Vt]),qr=te(vr[1]-Ze,vr[0]-Ce),kr=te(Ar[1]-Ze,Ar[0]-Ce),Ur;if(rt==="north")Ur=ne/180*Math.PI;else if(rt==="previous"){var _t=Bt/180*Math.PI,Fe=Vt/180*Math.PI,Ye=Re/180*Math.PI,Ae=Pe/180*Math.PI,Le=Ye-_t,We=pe(Ae)*we(Le),Ke=we(Ae)*pe(Fe)-pe(Ae)*we(Fe)*pe(Le);Ur=-te(We,Ke)-Math.PI,Re=Bt,Pe=Vt}var st=Se(qr,[pe(Ur),0]),ot=Se(kr,[we(Ur),0]);ne=te(st[1]+ot[1],st[0]+ot[0])/Math.PI*180,rt==="previous"&&!(tt===se.uid&&he.i===nt+1)&&(ne=null)}if(rt==="previous"&&!se._geo)if(tt===se.uid&&he.i===nt+1&&M(Ce)&&M(Ze)){var Ut=Ce-je,Ct=Ze-at,Pt=se.line&&se.line.shape||"",jt=Pt.slice(Pt.length-1);jt==="h"&&(Ct=0),jt==="v"&&(Ut=0),ne+=te(Ct,Ut)/Math.PI*180+90}else ne=null}return je=Ce,at=Ze,nt=he.i,tt=se.uid,ne}l.getMarkerAngle=Ve}}),K0=He({"src/components/titles/index.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=bc(),M=so(),e=sa(),t=e.strTranslate,r=as(),o=$n(),a=su(),i=Km(),n=uh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,h=1.6,f=1.6;function m(c,T,l){var x=c._fullLayout,w=l.propContainer,A=l.propName,E=l.placeholder,p=l.traceIndex,b=l.avoid||{},d=l.attributes,u=l.transform,g=l.containerGroup,y=1,D=w.title,P=(D&&D.text?D.text:"").trim(),z=!1,F=D&&D.font?D.font:{},N=F.family,O=F.size,L=F.color,U=F.weight,B=F.style,W=F.variant,$=F.textcase,ue=F.lineposition,ce=F.shadow,de=l.subtitlePropName,Y=!!de,X=l.subtitlePlaceholder,Q=(w.title||{}).subtitle||{text:"",font:{}},V=(Q.text||"").trim(),le=!1,ae=1,j=Q.font,ee=j.family,te=j.size,pe=j.color,we=j.weight,Se=j.style,Re=j.variant,Pe=j.textcase,je=j.lineposition,at=j.shadow,nt;A==="title.text"?nt="titleText":A.indexOf("axis")!==-1?nt="axisTitleText":A.indexOf("colorbar")!==-1&&(nt="colorbarTitleText");var tt=c._context.edits[nt];function Ve(vr,qr){return vr===void 0||qr===void 0?!1:vr.replace(s," % ")===qr.replace(s," % ")}P===""?y=0:Ve(P,E)&&(tt||(P=""),y=.2,z=!0),Y&&(V===""?ae=0:Ve(V,X)&&(tt||(V=""),ae=.2,le=!0)),l._meta?P=e.templateString(P,l._meta):x._meta&&(P=e.templateString(P,x._meta));var he=P||V||tt,se;g||(g=e.ensureSingle(x._infolayer,"g","g-"+T),se=x._hColorbarMoveTitle);var ne=g.selectAll("text."+T).data(he?[0]:[]);ne.enter().append("text"),ne.text(P).attr("class",T),ne.exit().remove();var Ce=null,Ze=T+"-subtitle",rt=V||tt;if(Y&&(Ce=g.selectAll("text."+Ze).data(rt?[0]:[]),Ce.enter().append("text"),Ce.text(V).attr("class",Ze),Ce.exit().remove()),!he)return g;function Je(vr,qr){e.syncOrAsync([St,kt],{title:vr,subtitle:qr})}function St(vr){var qr=vr.title,kr=vr.subtitle,Ur;!u&&se&&(u={}),u?(Ur="",u.rotate&&(Ur+="rotate("+[u.rotate,d.x,d.y]+")"),(u.offset||se)&&(Ur+=t(0,(u.offset||0)-(se||0)))):Ur=null,qr.attr("transform",Ur);function _t(Ke){if(Ke){var st=v.select(Ke.node().parentNode).select("."+Ze);if(!st.empty()){var ot=Ke.node().getBBox();if(ot.height){var Ut=ot.y+ot.height+h*te;st.attr("y",Ut)}}}}if(qr.style("opacity",y*o.opacity(L)).call(r.font,{color:o.rgb(L),size:v.round(O,2),family:N,weight:U,style:B,variant:W,textcase:$,shadow:ce,lineposition:ue}).attr(d).call(a.convertToTspans,c,_t),kr&&!kr.empty()){var Fe=g.select("."+T+"-math-group"),Ye=qr.node().getBBox(),Ae=Fe.node()?Fe.node().getBBox():void 0,Le=Ae?Ae.y+Ae.height+h*te:Ye.y+Ye.height+f*te,We=e.extendFlat({},d,{y:Le});kr.attr("transform",Ur),kr.style("opacity",ae*o.opacity(pe)).call(r.font,{color:o.rgb(pe),size:v.round(te,2),family:ee,weight:we,style:Se,variant:Re,textcase:Pe,shadow:at,lineposition:je}).attr(We).call(a.convertToTspans,c)}return S.previousPromises(c)}function kt(vr){var qr=vr.title,kr=v.select(qr.node().parentNode);if(b&&b.selection&&b.side&&P){kr.attr("transform",null);var Ur=n[b.side],_t=b.side==="left"||b.side==="top"?-1:1,Fe=_(b.pad)?b.pad:2,Ye=r.bBox(kr.node()),Ae={t:0,b:0,l:0,r:0},Le=c._fullLayout._reservedMargin;for(var We in Le)for(var Ke in Le[We]){var st=Le[We][Ke];Ae[Ke]=Math.max(Ae[Ke],st)}var ot={left:Ae.l,top:Ae.t,right:x.width-Ae.r,bottom:x.height-Ae.b},Ut=b.maxShift||_t*(ot[b.side]-Ye[b.side]),Ct=0;if(Ut<0)Ct=Ut;else{var Pt=b.offsetLeft||0,jt=b.offsetTop||0;Ye.left-=Pt,Ye.right-=Pt,Ye.top-=jt,Ye.bottom-=jt,b.selection.each(function(){var or=r.bBox(this);e.bBoxIntersect(Ye,or,Fe)&&(Ct=Math.max(Ct,_t*(or[b.side]-Ye[Ur])+Fe))}),Ct=Math.min(Ut,Ct),w._titleScoot=Math.abs(Ct)}if(Ct>0||Ut<0){var cr={left:[-Ct,0],right:[Ct,0],top:[0,-Ct],bottom:[0,Ct]}[b.side];kr.attr("transform",t(cr[0],cr[1]))}}}ne.call(Je,Ce);function Bt(vr,qr){vr.text(qr).on("mouseover.opacity",function(){v.select(this).transition().duration(i.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(i.HIDE_PLACEHOLDER).style("opacity",0)})}if(tt&&(P?ne.on(".opacity",null):(Bt(ne,E),z=!0),ne.call(a.makeEditable,{gd:c}).on("edit",function(vr){p!==void 0?M.call("_guiRestyle",c,A,vr,p):M.call("_guiRelayout",c,A,vr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Je)}).on("input",function(vr){this.text(vr||" ").call(a.positionText,d.x,d.y)}),Y)){if(Y&&!P){var Vt=ne.node().getBBox(),Ar=Vt.y+Vt.height+f*te;Ce.attr("y",Ar)}V?Ce.on(".opacity",null):(Bt(Ce,X),le=!0),Ce.call(a.makeEditable,{gd:c}).on("edit",function(vr){M.call("_guiRelayout",c,"title.subtitle.text",vr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Je)}).on("input",function(vr){this.text(vr||" ").call(a.positionText,Ce.attr("x"),Ce.attr("y"))})}return ne.classed("js-placeholder",z),Ce&&!Ce.empty()&&Ce.classed("js-placeholder",le),g}q.exports={draw:m,SUBTITLE_PADDING_EM:f,SUBTITLE_PADDING_MATHJAX_EM:h}}}),wv=He({"src/plots/cartesian/set_convert.js"(Z,q){"use strict";var v=Vn(),_=Zv().utcFormat,S=sa(),M=S.numberFormat,e=ns(),t=S.cleanNumber,r=S.ms2DateTime,o=S.dateTime2ms,a=S.ensureNumber,i=S.isArrayOrTypedArray,n=Gs(),s=n.FP_SAFE,h=n.BADNUM,f=n.LOG_CLIP,m=n.ONEWEEK,c=n.ONEDAY,T=n.ONEHOUR,l=n.ONEMIN,x=n.ONESEC,w=tf(),A=lh(),E=A.HOUR_PATTERN,p=A.WEEKDAY_PATTERN;function b(u){return Math.pow(10,u)}function d(u){return u!=null}q.exports=function(g,y){y=y||{};var D=g._id||"x",P=D.charAt(0);function z(V,le){if(V>0)return Math.log(V)/Math.LN10;if(V<=0&&le&&g.range&&g.range.length===2){var ae=g.range[0],j=g.range[1];return .5*(ae+j-2*f*Math.abs(ae-j))}else return h}function F(V,le,ae,j){if((j||{}).msUTC&&e(V))return+V;var ee=o(V,ae||g.calendar);if(ee===h)if(e(V)){V=+V;var te=Math.floor(S.mod(V+.05,1)*10),pe=Math.round(V-te/10);ee=o(new Date(pe))+te/10}else return h;return ee}function N(V,le,ae){return r(V,le,ae||g.calendar)}function O(V){return g._categories[Math.round(V)]}function L(V){if(d(V)){if(g._categoriesMap===void 0&&(g._categoriesMap={}),g._categoriesMap[V]!==void 0)return g._categoriesMap[V];g._categories.push(typeof V=="number"?String(V):V);var le=g._categories.length-1;return g._categoriesMap[V]=le,le}return h}function U(V,le){for(var ae=new Array(le),j=0;jg.range[1]&&(ae=!ae);for(var j=ae?-1:1,ee=j*V,te=0,pe=0;peSe)te=pe+1;else{te=ee<(we+Se)/2?pe:pe+1;break}}var Re=g._B[te]||0;return isFinite(Re)?ue(V,g._m2,Re):0},Y=function(V){var le=g._rangebreaks.length;if(!le)return ce(V,g._m,g._b);for(var ae=0,j=0;jg._rangebreaks[j].pmax&&(ae=j+1);return ce(V,g._m2,g._B[ae])}}g.c2l=g.type==="log"?z:a,g.l2c=g.type==="log"?b:a,g.l2p=de,g.p2l=Y,g.c2p=g.type==="log"?function(V,le){return de(z(V,le))}:de,g.p2c=g.type==="log"?function(V){return b(Y(V))}:Y,["linear","-"].indexOf(g.type)!==-1?(g.d2r=g.r2d=g.d2c=g.r2c=g.d2l=g.r2l=t,g.c2d=g.c2r=g.l2d=g.l2r=a,g.d2p=g.r2p=function(V){return g.l2p(t(V))},g.p2d=g.p2r=Y,g.cleanPos=a):g.type==="log"?(g.d2r=g.d2l=function(V,le){return z(t(V),le)},g.r2d=g.r2c=function(V){return b(t(V))},g.d2c=g.r2l=t,g.c2d=g.l2r=a,g.c2r=z,g.l2d=b,g.d2p=function(V,le){return g.l2p(g.d2r(V,le))},g.p2d=function(V){return b(Y(V))},g.r2p=function(V){return g.l2p(t(V))},g.p2r=Y,g.cleanPos=a):g.type==="date"?(g.d2r=g.r2d=S.identity,g.d2c=g.r2c=g.d2l=g.r2l=F,g.c2d=g.c2r=g.l2d=g.l2r=N,g.d2p=g.r2p=function(V,le,ae){return g.l2p(F(V,0,ae))},g.p2d=g.p2r=function(V,le,ae){return N(Y(V),le,ae)},g.cleanPos=function(V){return S.cleanDate(V,h,g.calendar)}):g.type==="category"?(g.d2c=g.d2l=L,g.r2d=g.c2d=g.l2d=O,g.d2r=g.d2l_noadd=W,g.r2c=function(V){var le=$(V);return le!==void 0?le:g.fraction2r(.5)},g.l2r=g.c2r=a,g.r2l=$,g.d2p=function(V){return g.l2p(g.r2c(V))},g.p2d=function(V){return O(Y(V))},g.r2p=g.d2p,g.p2r=Y,g.cleanPos=function(V){return typeof V=="string"&&V!==""?V:a(V)}):g.type==="multicategory"&&(g.r2d=g.c2d=g.l2d=O,g.d2r=g.d2l_noadd=W,g.r2c=function(V){var le=W(V);return le!==void 0?le:g.fraction2r(.5)},g.r2c_just_indices=B,g.l2r=g.c2r=a,g.r2l=W,g.d2p=function(V){return g.l2p(g.r2c(V))},g.p2d=function(V){return O(Y(V))},g.r2p=g.d2p,g.p2r=Y,g.cleanPos=function(V){return Array.isArray(V)||typeof V=="string"&&V!==""?V:a(V)},g.setupMultiCategory=function(V){var le=g._traceIndices,ae,j,ee=g._matchGroup;if(ee&&g._categories.length===0){for(var te in ee)if(te!==D){var pe=y[w.id2name(te)];le=le.concat(pe._traceIndices)}}var we=[[0,{}],[0,{}]],Se=[];for(ae=0;aepe[1]&&(j[te?0:1]=ae,ee[1]=pe[1]),ee[0]>=ee[1])if(le!==void 0){var we=pe[0]+1;ae!==void 0&&(we=Math.min(we,pe[1])),j[te?0:1]=g.l2r(we)}else ae!==void 0&&(j[te?1:0]=g.l2r(pe[1]-1))}},g.cleanRange=function(V,le){g._cleanRange(V,le),g.limitRange(V)},g._cleanRange=function(V,le){le||(le={}),V||(V="range");var ae=S.nestedProperty(g,V).get(),j,ee;if(g.type==="date"?ee=S.dfltRange(g.calendar):P==="y"?ee=A.DFLTRANGEY:g._name==="realaxis"?ee=[0,1]:ee=le.dfltRange||A.DFLTRANGEX,ee=ee.slice(),(g.rangemode==="tozero"||g.rangemode==="nonnegative")&&(ee[0]=0),!ae||ae.length!==2){S.nestedProperty(g,V).set(ee);return}var te=ae[0]===null,pe=ae[1]===null;for(g.type==="date"&&!g.autorange&&(ae[0]=S.cleanDate(ae[0],h,g.calendar),ae[1]=S.cleanDate(ae[1],h,g.calendar)),j=0;j<2;j++)if(g.type==="date"){if(!S.isDateTime(ae[j],g.calendar)){g[V]=ee;break}if(g.r2l(ae[0])===g.r2l(ae[1])){var we=S.constrain(g.r2l(ae[0]),S.MIN_MS+1e3,S.MAX_MS-1e3);ae[0]=g.l2r(we-1e3),ae[1]=g.l2r(we+1e3);break}}else{if(!e(ae[j]))if(!(te||pe)&&e(ae[1-j]))ae[j]=ae[1-j]*(j?10:.1);else{g[V]=ee;break}if(ae[j]<-s?ae[j]=-s:ae[j]>s&&(ae[j]=s),ae[0]===ae[1]){var Se=Math.max(1,Math.abs(ae[0]*1e-6));ae[0]-=Se,ae[1]+=Se}}},g.setScale=function(V){var le=y._size;if(g.overlaying){var ae=w.getFromId({_fullLayout:y},g.overlaying);g.domain=ae.domain}var j=V&&g._r?"_r":"range",ee=g.calendar;g.cleanRange(j);var te=g.r2l(g[j][0],ee),pe=g.r2l(g[j][1],ee),we=P==="y";if(we?(g._offset=le.t+(1-g.domain[1])*le.h,g._length=le.h*(g.domain[1]-g.domain[0]),g._m=g._length/(te-pe),g._b=-g._m*pe):(g._offset=le.l+g.domain[0]*le.w,g._length=le.w*(g.domain[1]-g.domain[0]),g._m=g._length/(pe-te),g._b=-g._m*te),g._rangebreaks=[],g._lBreaks=0,g._m2=0,g._B=[],g.rangebreaks){var Se,Re;if(g._rangebreaks=g.locateBreaks(Math.min(te,pe),Math.max(te,pe)),g._rangebreaks.length){for(Se=0;Sepe&&(Pe=!Pe),Pe&&g._rangebreaks.reverse();var je=Pe?-1:1;for(g._m2=je*g._length/(Math.abs(pe-te)-g._lBreaks),g._B.push(-g._m2*(we?pe:te)),Se=0;Seee&&(ee+=7,teee&&(ee+=24,te=j&&te=j&&V=Je.min&&(neJe.max&&(Je.max=Ce),Ze=!1)}Ze&&pe.push({min:ne,max:Ce})}};for(ae=0;aex*2}function n(f){return Math.max(1,(f-1)/1e3)}function s(f,m){for(var c=f.length,T=n(c),l=0,x=0,w={},A=0;Al*2}function h(f){return M(f[0])&&M(f[1])}}}),Yd=He({"src/plots/cartesian/autorange.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=sa(),M=Gs().FP_SAFE,e=so(),t=as(),r=tf(),o=r.getFromId,a=r.isLinked;q.exports={applyAutorangeOptions:g,getAutoRange:i,makePadFn:s,doAutoRange:c,findExtremes:T,concatExtremes:m};function i(y,D){var P,z,F=[],N=y._fullLayout,O=s(N,D,0),L=s(N,D,1),U=m(y,D),B=U.min,W=U.max;if(B.length===0||W.length===0)return S.simpleMap(D.range,D.r2l);var $=B[0].val,ue=W[0].val;for(P=1;P0&&(Se=le-O(ee)-L(te),Se>ae?Re/Se>j&&(pe=ee,we=te,j=Re/Se):Re/le>j&&(pe={val:ee.val,nopad:1},we={val:te.val,nopad:1},j=Re/le));function Pe(Ve,he){return Math.max(Ve,L(he))}if($===ue){var je=$-1,at=$+1;if(Q)if($===0)F=[0,1];else{var nt=($>0?W:B).reduce(Pe,0),tt=$/(1-Math.min(.5,nt/le));F=$>0?[0,tt]:[tt,0]}else V?F=[Math.max(0,je),Math.max(1,at)]:F=[je,at]}else Q?(pe.val>=0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:0,nopad:1})):V&&(pe.val-j*O(pe)<0&&(pe={val:0,nopad:1}),we.val<=0&&(we={val:1,nopad:1})),j=(we.val-pe.val-n(D,ee.val,te.val))/(le-O(pe)-L(we)),F=[pe.val-j*O(pe),we.val+j*L(we)];return F=g(F,D),D.limitRange&&D.limitRange(),de&&F.reverse(),S.simpleMap(F,D.l2r||Number)}function n(y,D,P){var z=0;if(y.rangebreaks)for(var F=y.locateBreaks(D,P),N=0;N0?P.ppadplus:P.ppadminus)||P.ppad||0),ee=ae((y._m>0?P.ppadminus:P.ppadplus)||P.ppad||0),te=ae(P.vpadplus||P.vpad),pe=ae(P.vpadminus||P.vpad);if(!B){if(V=1/0,le=-1/0,U)for($=0;$0&&(V=ue),ue>le&&ue-M&&(V=ue),ue>le&&ue=Re;$--)Se($);return{min:z,max:F,opts:P}}function l(y,D,P,z){w(y,D,P,z,E)}function x(y,D,P,z){w(y,D,P,z,p)}function w(y,D,P,z,F){for(var N=z.tozero,O=z.extrapad,L=!0,U=0;U=P&&(B.extrapad||!O)){L=!1;break}else F(D,B.val)&&B.pad<=P&&(O||!B.extrapad)&&(y.splice(U,1),U--)}if(L){var W=N&&D===0;y.push({val:D,pad:W?0:P,extrapad:W?!1:O})}}function A(y){return _(y)&&Math.abs(y)=D}function b(y,D){var P=D.autorangeoptions;return P&&P.minallowed!==void 0&&u(D,P.minallowed,P.maxallowed)?P.minallowed:P&&P.clipmin!==void 0&&u(D,P.clipmin,P.clipmax)?Math.max(y,D.d2l(P.clipmin)):y}function d(y,D){var P=D.autorangeoptions;return P&&P.maxallowed!==void 0&&u(D,P.minallowed,P.maxallowed)?P.maxallowed:P&&P.clipmax!==void 0&&u(D,P.clipmin,P.clipmax)?Math.min(y,D.d2l(P.clipmax)):y}function u(y,D,P){return D!==void 0&&P!==void 0?(D=y.d2l(D),P=y.d2l(P),D=U&&(N=U,P=U),O<=U&&(O=U,z=U)}}return P=b(P,D),z=d(z,D),[P,z]}}}),Wo=He({"src/plots/cartesian/axes.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=bc(),M=so(),e=sa(),t=e.strTranslate,r=su(),o=K0(),a=$n(),i=as(),n=Xh(),s=l5(),h=lh(),f=Gs(),m=f.ONEMAXYEAR,c=f.ONEAVGYEAR,T=f.ONEMINYEAR,l=f.ONEMAXQUARTER,x=f.ONEAVGQUARTER,w=f.ONEMINQUARTER,A=f.ONEMAXMONTH,E=f.ONEAVGMONTH,p=f.ONEMINMONTH,b=f.ONEWEEK,d=f.ONEDAY,u=d/2,g=f.ONEHOUR,y=f.ONEMIN,D=f.ONESEC,P=f.ONEMILLI,z=f.ONEMICROSEC,F=f.MINUS_SIGN,N=f.BADNUM,O={K:"zeroline"},L={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},W={K:"tick",L:"text"},$={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},ue=uh(),ce=ue.MID_SHIFT,de=ue.CAP_SHIFT,Y=ue.LINE_SPACING,X=ue.OPPOSITE_SIDE,Q=3,V=q.exports={};V.setConvert=wv();var le=a1(),ae=tf(),j=ae.idSort,ee=ae.isLinked;V.id2name=ae.id2name,V.name2id=ae.name2id,V.cleanId=ae.cleanId,V.list=ae.list,V.listIds=ae.listIds,V.getFromId=ae.getFromId,V.getFromTrace=ae.getFromTrace;var te=Yd();V.getAutoRange=te.getAutoRange,V.findExtremes=te.findExtremes;var pe=1e-4;function we(xt){var ut=(xt[1]-xt[0])*pe;return[xt[0]-ut,xt[1]+ut]}V.coerceRef=function(xt,ut,Or,Cr,wr,Rr){var Nr=Cr.charAt(Cr.length-1),Hr=Or._fullLayout._subplots[Nr+"axis"],gt=Cr+"ref",Kt={};return wr||(wr=Hr[0]||(typeof Rr=="string"?Rr:Rr[0])),Rr||(Rr=wr),Hr=Hr.concat(Hr.map(function(mr){return mr+" domain"})),Kt[gt]={valType:"enumerated",values:Hr.concat(Rr?typeof Rr=="string"?[Rr]:Rr:[]),dflt:wr},e.coerce(xt,ut,Kt,gt)},V.coerceRefArray=function(xt,ut,Or,Cr,wr,Rr,Nr){let Hr=Cr.charAt(Cr.length-1);var gt=Or._fullLayout._subplots[Hr+"axis"];let Kt=Cr+"ref";var mr=xt[Kt];wr||(wr=gt[0]||(typeof Rr=="string"?Rr:Rr[0])),gt=gt.concat(gt.map(va=>va+" domain")),gt=gt.concat(Rr||[]),mr.length>Nr?(e.warn("Array attribute "+Kt+" has more entries than expected, truncating to "+Nr),mr=mr.slice(0,Nr)):mr.length2e-6||((Or-xt._forceTick0)/xt._minDtick%1+1.000001)%1>2e-6)&&(xt._minDtick=0))},V.saveRangeInitial=function(xt,ut){for(var Or=V.list(xt,"",!0),Cr=!1,wr=0;wrIr*.3||Kt(Cr)||Kt(wr))){var va=Or.dtick/2;xt+=xt+vaNr){var Hr=Number(Or.slice(1));Rr.exactYears>Nr&&Hr%12===0?xt=V.tickIncrement(xt,"M6","reverse")+d*1.5:Rr.exactMonths>Nr?xt=V.tickIncrement(xt,"M1","reverse")+d*15.5:xt-=u;var gt=V.tickIncrement(xt,Or);if(gt<=Cr)return gt}return xt}V.prepMinorTicks=function(xt,ut,Or){var Cr,wr;if(!((Cr=ut.minor)!=null&&Cr.dtick)){delete xt.dtick;var Rr=ut.dtick&&_(ut._tmin),Nr;if(Rr){var Hr=V.tickIncrement(ut._tmin,ut.dtick,!0);Nr=[ut._tmin,Hr*.99+ut._tmin*.01]}else{var gt=e.simpleMap(ut.range,ut.r2l);Nr=[gt[0],.8*gt[0]+.2*gt[1]]}if(xt.range=e.simpleMap(Nr,ut.l2r),xt._isMinor=!0,V.prepTicks(xt,Or),Rr){var Kt=_(ut.dtick),mr=_(xt.dtick),Ir=Kt?ut.dtick:+ut.dtick.substring(1),va=mr?xt.dtick:+xt.dtick.substring(1);Kt&&mr?nt(Ir,va)?Ir===2*b&&va===2*d&&(xt.dtick=b):Ir===2*b&&va===3*d?xt.dtick=b:Ir===b&&!(ut._input.minor||{}).nticks?xt.dtick=d:tt(Ir/va,2.5)?xt.dtick=Ir/2:xt.dtick=Ir:String(ut.dtick).charAt(0)==="M"?mr?xt.dtick="M1":nt(Ir,va)?Ir>=12&&va===2&&(xt.dtick="M3"):xt.dtick=ut.dtick:String(xt.dtick).charAt(0)==="L"?String(ut.dtick).charAt(0)==="L"?nt(Ir,va)||(xt.dtick=tt(Ir/va,2.5)?ut.dtick/2:ut.dtick):xt.dtick="D1":xt.dtick==="D2"&&+ut.dtick>1&&(xt.dtick=1)}xt.range=ut.range}((wr=ut.minor)==null?void 0:wr._tick0Init)===void 0&&(xt.tick0=ut.tick0)};function nt(xt,ut){return Math.abs((xt/ut+.5)%1-.5)<.001}function tt(xt,ut){return Math.abs(xt/ut-1)<.001}V.prepTicks=function(xt,ut){var Or=e.simpleMap(xt.range,xt.r2l,void 0,void 0,ut);if(xt.tickmode==="auto"||!xt.dtick){var Cr=xt.nticks,wr;Cr||(xt.type==="category"||xt.type==="multicategory"?(wr=xt.tickfont?e.bigFont(xt.tickfont.size||12):15,Cr=xt._length/wr):(wr=xt._id.charAt(0)==="y"?40:80,Cr=e.constrain(xt._length/wr,4,9)+1),xt._name==="radialaxis"&&(Cr*=2)),xt.minor&&xt.minor.tickmode!=="array"||xt.tickmode==="array"&&(Cr*=100),xt._roughDTick=Math.abs(Or[1]-Or[0])/Cr,V.autoTicks(xt,xt._roughDTick),xt._minDtick>0&&xt.dtick0?(Rr=Cr-1,Nr=Cr):(Rr=Cr,Nr=Cr);var Hr=xt[Rr].value,gt=xt[Nr].value,Kt=Math.abs(gt-Hr),mr=Or||Kt,Ir=0;mr>=T?Kt>=T&&Kt<=m?Ir=Kt:Ir=c:Or===x&&mr>=w?Kt>=w&&Kt<=l?Ir=Kt:Ir=x:mr>=p?Kt>=p&&Kt<=A?Ir=Kt:Ir=E:Or===b&&mr>=b?Ir=b:mr>=d?Ir=d:Or===u&&mr>=u?Ir=u:Or===g&&mr>=g&&(Ir=g);var va;Ir>=Kt&&(Ir=Kt,va=!0);var Pa=wr+Ir;if(ut.rangebreaks&&Ir>0){for(var ga=84,la=0,ba=0;bab&&(Ir=Kt)}(Ir>0||Cr===0)&&(xt[Cr].periodX=wr+Ir/2)}}V.calcTicks=function(ut,Or){for(var Cr=ut.type,wr=ut.calendar,Rr=ut.ticklabelstep,Nr=ut.ticklabelmode==="period",Hr=ut.range[0]>ut.range[1],gt=!ut.ticklabelindex||e.isArrayOrTypedArray(ut.ticklabelindex)?ut.ticklabelindex:[ut.ticklabelindex],Kt=e.simpleMap(ut.range,ut.r2l,void 0,void 0,Or),mr=Kt[1]=(En?0:1);Tn--){var On=!Tn;Tn?(ut._dtickInit=ut.dtick,ut._tick0Init=ut.tick0):En&&(ut.minor._dtickInit=ut.minor.dtick,ut.minor._tick0Init=ut.minor.tick0);var kn=Tn?ut:e.extendFlat({},ut,En?ut.minor:{minor:{}});if(On?V.prepMinorTicks(kn,ut,Or):V.prepTicks(kn,Or),kn.tickmode==="array"){Tn?(ba=[],ga=Ze(ut,!On)):(Ai=[],la=Ze(ut,!On));continue}if(kn.tickmode==="sync"){ba=[],ga=Ce(ut);continue}var ao=we(Kt),Co=ao[0],bo=ao[1],zs=_(kn.dtick),Cn=Cr==="log"&&!(zs||kn.dtick.charAt(0)==="L"),wo=V.tickFirst(kn,Or);if(Tn){if(ut._tmin=wo,wo=bo:go<=bo;go=V.tickIncrement(go,jo,mr,wr)){if(Tn&&os++,kn.rangebreaks&&!mr){if(go=va)break}if(ba.length>Pa||go===Zn)break;Zn=go;var Yn={value:go};Tn?(Cn&&go!==(go|0)&&(Yn.simpleLabel=!0),Rr>1&&os%Rr&&(Yn.skipLabel=!0),ba.push(Yn)):(Yn.minor=!0,Ai.push(Yn))}}if(!Ai||Ai.length<3)gt=!1;else{var Gn=(Ai[2].value-Ai[1].value)*(Hr?-1:1);cn(Gn,ut.tickformat)||(gt=!1,Ai=Ai.slice(1))}if(!gt)ki=ba;else{var Hn=ba.concat(Ai);Nr&&ba.length&&(Hn=Hn.slice(1)),Hn=Hn.sort(function(Ks,Ts){return Ks.value-Ts.value}).filter(function(Ks,Ts,Ls){return Ts===0||Ks.value!==Ls[Ts-1].value});var ss=Hn.map(function(Ks,Ts){return Ks.minor===void 0&&!Ks.skipLabel?Ts:null}).filter(function(Ks){return Ks!==null});ss.forEach(function(Ks){gt.map(function(Ts){var Ls=Ks+Ts;Ls>=0&&Ls-1;Zo--){if(ba[Zo].drop){ba.splice(Zo,1);continue}ba[Zo].value=ri(ba[Zo].value,ut);var yn=ut.c2p(ba[Zo].value);(ws?il>yn-Hs:ilva||Jova&&(Ls.periodX=va),Jowr&&vac)ut/=c,Cr=wr(10),xt.dtick="M"+12*vr(ut,Cr,rt);else if(Rr>E)ut/=E,xt.dtick="M"+vr(ut,1,Je);else if(Rr>d){if(xt.dtick=vr(ut,d,xt._hasDayOfWeekBreaks?[1,2,7,14]:kt),!Or){var Nr=V.getTickFormat(xt),Hr=xt.ticklabelmode==="period";Hr&&(xt._rawTick0=xt.tick0),/%[uVW]/.test(Nr)?xt.tick0=e.dateTick0(xt.calendar,2):xt.tick0=e.dateTick0(xt.calendar,1),Hr&&(xt._dowTick0=xt.tick0)}}else Rr>g?xt.dtick=vr(ut,g,Je):Rr>y?xt.dtick=vr(ut,y,St):Rr>D?xt.dtick=vr(ut,D,St):(Cr=wr(10),xt.dtick=vr(ut,Cr,rt))}else if(xt.type==="log"){xt.tick0=0;var gt=e.simpleMap(xt.range,xt.r2l);if(xt._isMinor&&(ut*=1.5),ut>.7)xt.dtick=Math.ceil(ut);else if(Math.abs(gt[1]-gt[0])<1){var Kt=1.5*Math.abs((gt[1]-gt[0])/ut);ut=Math.abs(Math.pow(10,gt[1])-Math.pow(10,gt[0]))/Kt,Cr=wr(10),xt.dtick="L"+vr(ut,Cr,rt)}else xt.dtick=ut>.3?"D2":"D1"}else xt.type==="category"||xt.type==="multicategory"?(xt.tick0=0,xt.dtick=Math.ceil(Math.max(ut,1))):Za(xt)?(xt.tick0=0,Cr=1,xt.dtick=vr(ut,Cr,Ar)):(xt.tick0=0,Cr=wr(10),xt.dtick=vr(ut,Cr,rt));if(xt.dtick===0&&(xt.dtick=1),!_(xt.dtick)&&typeof xt.dtick!="string"){var mr=xt.dtick;throw xt.dtick=1,"ax.dtick error: "+String(mr)}};function qr(xt){var ut=xt.dtick;if(xt._tickexponent=0,!_(ut)&&typeof ut!="string"&&(ut=1),(xt.type==="category"||xt.type==="multicategory")&&(xt._tickround=null),xt.type==="date"){var Or=xt.r2l(xt.tick0),Cr=xt.l2r(Or).replace(/(^-|i)/g,""),wr=Cr.length;if(String(ut).charAt(0)==="M")wr>10||Cr.slice(5)!=="01-01"?xt._tickround="d":xt._tickround=+ut.slice(1)%12===0?"y":"m";else if(ut>=d&&wr<=10||ut>=d*15)xt._tickround="d";else if(ut>=y&&wr<=16||ut>=g)xt._tickround="M";else if(ut>=D&&wr<=19||ut>=y)xt._tickround="S";else{var Rr=xt.l2r(Or+ut).replace(/^-/,"").length;xt._tickround=Math.max(wr,Rr)-20,xt._tickround<0&&(xt._tickround=4)}}else if(_(ut)||ut.charAt(0)==="L"){var Nr=xt.range.map(xt.r2d||Number);_(ut)||(ut=Number(ut.slice(1))),xt._tickround=2-Math.floor(Math.log(ut)/Math.LN10+.01);var Hr=Math.max(Math.abs(Nr[0]),Math.abs(Nr[1])),gt=Math.floor(Math.log(Hr)/Math.LN10+.01),Kt=xt.minexponent===void 0?3:xt.minexponent;Math.abs(gt)>Kt&&(ot(xt.exponentformat)&&xt.exponentformat!=="SI extended"&&!Ut(gt)||ot(xt.exponentformat)&&xt.exponentformat==="SI extended"&&!Ct(gt)?xt._tickexponent=3*Math.round((gt-1)/3):xt._tickexponent=gt)}else xt._tickround=null}V.tickIncrement=function(xt,ut,Or,Cr){var wr=Or?-1:1;if(_(ut))return e.increment(xt,wr*ut);var Rr=ut.charAt(0),Nr=wr*Number(ut.slice(1));if(Rr==="M")return e.incrementMonth(xt,Nr,Cr);if(Rr==="L")return Math.log(Math.pow(10,xt)+Nr)/Math.LN10;if(Rr==="D"){var Hr=ut==="D2"?Vt:Bt,gt=xt+wr*.01,Kt=e.roundUp(e.mod(gt,1),Hr,Or);return Math.floor(gt)+Math.log(v.round(Math.pow(10,Kt),1))/Math.LN10}throw"unrecognized dtick "+String(ut)},V.tickFirst=function(xt,ut){var Or=xt.r2l||Number,Cr=e.simpleMap(xt.range,Or,void 0,void 0,ut),wr=Cr[1]=0&&Ai<=xt._length?ba:null};if(Rr&&e.isArrayOrTypedArray(xt.ticktext)){var Ir=e.simpleMap(xt.range,xt.r2l),va=(Math.abs(Ir[1]-Ir[0])-(xt._lBreaks||0))/1e4;for(Kt=0;Kt"+Hr;else{var Kt=pi(xt),mr=xt._trueSide||xt.side;(!Kt&&mr==="top"||Kt&&mr==="bottom")&&(Nr+="
")}ut.text=Nr}function _t(xt,ut,Or,Cr,wr){var Rr=xt.dtick,Nr=ut.x,Hr=xt.tickformat,gt=typeof Rr=="string"&&Rr.charAt(0);if(wr==="never"&&(wr=""),Cr&>!=="L"&&(Rr="L3",gt="L"),Hr||gt==="L")ut.text=jt(Math.pow(10,Nr),xt,wr,Cr);else if(_(Rr)||gt==="D"&&(xt.minorloglabels==="complete"||e.mod(Nr+.01,1)<.1)){var Kt;xt.minorloglabels==="complete"&&!(e.mod(Nr+.01,1)<.1)&&(Kt=!0,ut.fontSize*=.75);var mr=Math.pow(10,Nr).toExponential(0),Ir=mr.split("e"),va=+Ir[1],Pa=Math.abs(va),ga=xt.exponentformat;ga==="power"||ot(ga)&&ga!=="SI extended"&&Ut(va)||ot(ga)&&ga==="SI extended"&&Ct(va)?(ut.text=Ir[0],Pa>0&&(ut.text+="x10"),ut.text==="1x10"&&(ut.text="10"),va!==0&&va!==1&&(ut.text+=""+(va>0?"":F)+Pa+""),ut.fontSize*=1.25):(ga==="e"||ga==="E")&&Pa>2?ut.text=Ir[0]+ga+(va>0?"+":F)+Pa:(ut.text=jt(Math.pow(10,Nr),xt,"","fakehover"),Rr==="D1"&&xt._id.charAt(0)==="y"&&(ut.dy-=ut.fontSize/6))}else if(gt==="D")ut.text=xt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Nr,1)))),ut.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(xt.dtick==="D1"){var la=String(ut.text).charAt(0);(la==="0"||la==="1")&&(xt._id.charAt(0)==="y"?ut.dx-=ut.fontSize/4:(ut.dy+=ut.fontSize/2,ut.dx+=(xt.range[1]>xt.range[0]?1:-1)*ut.fontSize*(Nr<0?.5:.25)))}}function Fe(xt,ut){var Or=xt._categories[Math.round(ut.x)];Or===void 0&&(Or=""),ut.text=String(Or)}function Ye(xt,ut,Or){var Cr=Math.round(ut.x),wr=xt._categories[Cr]||[],Rr=wr[1]===void 0?"":String(wr[1]),Nr=wr[0]===void 0?"":String(wr[0]);Or?ut.text=Nr+" - "+Rr:(ut.text=Rr,ut.text2=Nr)}function Ae(xt,ut,Or,Cr,wr){wr==="never"?wr="":xt.showexponent==="all"&&Math.abs(ut.x/xt.dtick)<1e-6&&(wr="hide"),ut.text=jt(ut.x,xt,wr,Cr)}function Le(xt,ut,Or,Cr,wr){if(xt.thetaunit==="radians"&&!Or){var Rr=ut.x/180;if(Rr===0)ut.text="0";else{var Nr=We(Rr);if(Nr[1]>=100)ut.text=jt(e.deg2rad(ut.x),xt,wr,Cr);else{var Hr=ut.x<0;Nr[1]===1?Nr[0]===1?ut.text="\u03C0":ut.text=Nr[0]+"\u03C0":ut.text=["",Nr[0],"","\u2044","",Nr[1],"","\u03C0"].join(""),Hr&&(ut.text=F+ut.text)}}}else ut.text=jt(ut.x,xt,wr,Cr)}function We(xt){function ut(Hr,gt){return Math.abs(Hr-gt)<=1e-6}function Or(Hr,gt){return ut(gt,0)?Hr:Or(gt,Hr%gt)}function Cr(Hr){for(var gt=1;!ut(Math.round(Hr*gt)/gt,Hr);)gt*=10;return gt}var wr=Cr(xt),Rr=xt*wr,Nr=Math.abs(Or(Rr,wr));return[Math.round(Rr/Nr),Math.round(wr/Nr)]}var Ke=["f","p","n","\u03BC","m","","k","M","G","T"],st=["q","r","y","z","a",...Ke,"P","E","Z","Y","R","Q"],ot=xt=>["SI","SI extended","B"].includes(xt);function Ut(xt){return xt>14||xt<-15}function Ct(xt){return xt>32||xt<-30}function Pt(xt,ut){return ot(ut)?!!(ut==="SI extended"&&Ct(xt)||ut!=="SI extended"&&Ut(xt)):!1}function jt(xt,ut,Or,Cr){var wr=xt<0,Rr=ut._tickround,Nr=Or||ut.exponentformat||"B",Hr=ut._tickexponent,gt=V.getTickFormat(ut),Kt=ut.separatethousands;if(Cr){var mr={exponentformat:Nr,minexponent:ut.minexponent,dtick:ut.showexponent==="none"?ut.dtick:_(xt)&&Math.abs(xt)||1,range:ut.showexponent==="none"?ut.range.map(ut.r2d):[0,xt||1]};qr(mr),Rr=(Number(mr._tickround)||0)+4,Hr=mr._tickexponent,ut.hoverformat&&(gt=ut.hoverformat)}if(gt)return ut._numFormat(gt)(xt).replace(/-/g,F);var Ir=Math.pow(10,-Rr)/2;if(Nr==="none"&&(Hr=0),xt=Math.abs(xt),xt"+ga+"":Nr==="B"&&Hr===9?xt+="B":ot(Nr)&&(xt+=Nr==="SI extended"?st[Hr/3+10]:Ke[Hr/3+5])}return wr?F+xt:xt}V.getTickFormat=function(xt){var ut;function Or(gt){return typeof gt!="string"?gt:Number(gt.replace("M",""))*E}function Cr(gt,Kt){var mr=["L","D"];if(typeof gt==typeof Kt){if(typeof gt=="number")return gt-Kt;var Ir=mr.indexOf(gt.charAt(0)),va=mr.indexOf(Kt.charAt(0));return Ir===va?Number(gt.replace(/(L|D)/g,""))-Number(Kt.replace(/(L|D)/g,"")):Ir-va}else return typeof gt=="number"?1:-1}function wr(gt,Kt,mr){var Ir=mr||function(ga){return ga},va=Kt[0],Pa=Kt[1];return(!va&&typeof va!="number"||Ir(va)<=Ir(gt))&&(!Pa&&typeof Pa!="number"||Ir(Pa)>=Ir(gt))}function Rr(gt,Kt){var mr=Kt[0]===null,Ir=Kt[1]===null,va=Cr(gt,Kt[0])>=0,Pa=Cr(gt,Kt[1])<=0;return(mr||va)&&(Ir||Pa)}var Nr,Hr;if(xt.tickformatstops&&xt.tickformatstops.length>0)switch(xt.type){case"date":case"linear":{for(ut=0;ut=0&&wr.unshift(wr.splice(mr,1).shift())}});var Hr={false:{left:0,right:0}};return e.syncOrAsync(wr.map(function(gt){return function(){if(gt){var Kt=V.getFromId(xt,gt);Or||(Or={}),Or.axShifts=Hr,Or.overlayingShiftedAx=Nr;var mr=V.drawOne(xt,Kt,Or);return Kt._shiftPusher&&rn(Kt,Kt._fullDepth||0,Hr,!0),Kt._r=Kt.range.slice(),Kt._rl=e.simpleMap(Kt._r,Kt.r2l),mr}}}))},V.drawOne=function(xt,ut,Or){Or=Or||{};var Cr=Or.axShifts||{},wr=Or.overlayingShiftedAx||[],Rr,Nr,Hr;ut.setScale();var gt=xt._fullLayout,Kt=ut._id,mr=Kt.charAt(0),Ir=V.counterLetter(Kt),va=gt._plots[ut._mainSubplot],Pa=ut.zerolinelayer==="above traces";if(!va)return;if(ut._shiftPusher=ut.autoshift||wr.indexOf(ut._id)!==-1||wr.indexOf(ut.overlaying)!==-1,ut._shiftPusher&ut.anchor==="free"){var ga=ut.linewidth/2||0;ut.ticks==="inside"&&(ga+=ut.ticklen),rn(ut,ga,Cr,!0),rn(ut,ut.shift||0,Cr,!1)}(Or.skipTitle!==!0||ut._shift===void 0)&&(ut._shift=tn(ut,Cr));var la=va[mr+"axislayer"],ba=ut._mainLinePosition,Ai=ba+=ut._shift,ki=ut._mainMirrorPosition,Ki=ut._vals=V.calcTicks(ut),En=[ut.mirror,Ai,ki].join("_");for(Rr=0;Rr0?Ls.bottom-Ks:0,Ts))));var lu=0,Tc=0;if(ut._shiftPusher&&(lu=Math.max(Ts,Ls.height>0?uo==="l"?Ks-Ls.left:Ls.right-Ks:0),ut.title.text!==gt._dfltTitle[mr]&&(Tc=(ut._titleStandoff||0)+(ut._titleScoot||0),uo==="l"&&(Tc+=Ca(ut))),ut._fullDepth=Math.max(lu,Tc)),ut.automargin){Jo={x:0,y:0,r:0,l:0,t:0,b:0};var du=[0,1],Sf=typeof ut._shift=="number"?ut._shift:0;if(mr==="x"){if(uo==="b"?Jo[uo]=ut._depth:(Jo[uo]=ut._depth=Math.max(Ls.width>0?Ks-Ls.top:0,Ts),du.reverse()),Ls.width>0){var Uc=Ls.right-(ut._offset+ut._length);Uc>0&&(Jo.xr=1,Jo.r=Uc);var Bs=ut._offset-Ls.left;Bs>0&&(Jo.xl=0,Jo.l=Bs)}}else if(uo==="l"?(ut._depth=Math.max(Ls.height>0?Ks-Ls.left:0,Ts),Jo[uo]=ut._depth-Sf):(ut._depth=Math.max(Ls.height>0?Ls.right-Ks:0,Ts),Jo[uo]=ut._depth+Sf,du.reverse()),Ls.height>0){var dc=Ls.bottom-(ut._offset+ut._length);dc>0&&(Jo.yb=0,Jo.b=dc);var Wc=ut._offset-Ls.top;Wc>0&&(Jo.yt=1,Jo.t=Wc)}Jo[Ir]=ut.anchor==="free"?ut.position:ut._anchorAxis.domain[du[0]],ut.title.text!==gt._dfltTitle[mr]&&(Jo[uo]+=Ca(ut)+(ut.title.standoff||0)),ut.mirror&&ut.anchor!=="free"&&(Es={x:0,y:0,r:0,l:0,t:0,b:0},Es[Nl]=ut.linewidth,ut.mirror&&ut.mirror!==!0&&(Es[Nl]+=Ts),ut.mirror===!0||ut.mirror==="ticks"?Es[Ir]=ut._anchorAxis.domain[du[1]]:(ut.mirror==="all"||ut.mirror==="allticks")&&(Es[Ir]=[ut._counterDomainMin,ut._counterDomainMax][du[1]]))}Ll&&(Ul=M.getComponentMethod("rangeslider","autoMarginOpts")(xt,ut)),typeof ut.automargin=="string"&&(cr(Jo,ut.automargin),cr(Es,ut.automargin)),S.autoMargin(xt,Jt(ut),Jo),S.autoMargin(xt,Fr(ut),Es),S.autoMargin(xt,ta(ut),Ul)}),e.syncOrAsync(To)}};function cr(xt,ut){if(xt){var Or=Object.keys($).reduce(function(Cr,wr){return ut.indexOf(wr)!==-1&&$[wr].forEach(function(Rr){Cr[Rr]=1}),Cr},{});Object.keys(xt).forEach(function(Cr){Or[Cr]||(Cr.length===1?xt[Cr]=0:delete xt[Cr])})}}function or(xt,ut){var Or=[],Cr,wr=function(Rr,Nr){var Hr=Rr.xbnd[Nr];Hr!==null&&Or.push(e.extendFlat({},Rr,{x:Hr}))};if(ut.length){for(Cr=0;Crxt.range[1],Hr=xt.ticklabelposition&&xt.ticklabelposition.indexOf("inside")!==-1,gt=!Hr;if(Or){var Kt=Nr?-1:1;Or=Or*Kt}if(Cr){var mr=xt.side,Ir=Hr&&(mr==="top"||mr==="left")||gt&&(mr==="bottom"||mr==="right")?1:-1;Cr=Cr*Ir}return xt._id.charAt(0)==="x"?function(va){return t(wr+xt._offset+xt.l2p(Fa(va))+Or,Rr+Cr)}:function(va){return t(Rr+Cr,wr+xt._offset+xt.l2p(Fa(va))+Or)}};function Fa(xt){return xt.periodX!==void 0?xt.periodX:xt.x}function Ra(xt){var ut=xt.ticklabelposition||"",Or=xt.tickson||"",Cr=function(ga){return ut.indexOf(ga)!==-1},wr=Cr("top"),Rr=Cr("left"),Nr=Cr("right"),Hr=Cr("bottom"),gt=Cr("inside"),Kt=Or!=="boundaries"&&(Hr||Rr||wr||Nr);if(!Kt&&!gt)return[0,0];var mr=xt.side,Ir=Kt?(xt.tickwidth||0)/2:0,va=Q,Pa=xt.tickfont?xt.tickfont.size:12;return(Hr||wr)&&(Ir+=Pa*de,va+=(xt.linewidth||0)/2),(Rr||Nr)&&(Ir+=(xt.linewidth||0)/2,va+=Q),gt&&mr==="top"&&(va-=Pa*(1-de)),(Rr||wr)&&(Ir=-Ir),(mr==="bottom"||mr==="right")&&(va=-va),[Kt?Ir:0,gt?va:0]}V.makeTickPath=function(xt,ut,Or,Cr){Cr||(Cr={});var wr=Cr.minor;if(wr&&!xt.minor)return"";var Rr=Cr.len!==void 0?Cr.len:wr?xt.minor.ticklen:xt.ticklen,Nr=xt._id.charAt(0),Hr=(xt.linewidth||1)/2;return Nr==="x"?"M0,"+(ut+Hr*Or)+"v"+Rr*Or:"M"+(ut+Hr*Or)+",0h"+Rr*Or},V.makeLabelFns=function(xt,ut,Or){var Cr=xt.ticklabelposition||"",wr=xt.tickson||"",Rr=function(wo){return Cr.indexOf(wo)!==-1},Nr=Rr("top"),Hr=Rr("left"),gt=Rr("right"),Kt=Rr("bottom"),mr=wr!=="boundaries"&&(Kt||Hr||Nr||gt),Ir=Rr("inside"),va=Cr==="inside"&&xt.ticks==="inside"||!Ir&&xt.ticks==="outside"&&wr!=="boundaries",Pa=0,ga=0,la=va?xt.ticklen:0;if(Ir?la*=-1:mr&&(la=0),va&&(Pa+=la,Or)){var ba=e.deg2rad(Or);Pa=la*Math.cos(ba)+1,ga=la*Math.sin(ba)}xt.showticklabels&&(va||xt.showline)&&(Pa+=.2*xt.tickfont.size),Pa+=(xt.linewidth||1)/2*(Ir?-1:1);var Ai={labelStandoff:Pa,labelShift:ga},ki,Ki,En,Tn,On=0,kn=xt.side,ao=xt._id.charAt(0),Co=xt.tickangle,bo;if(ao==="x")bo=!Ir&&kn==="bottom"||Ir&&kn==="top",Tn=bo?1:-1,Ir&&(Tn*=-1),ki=ga*Tn,Ki=ut+Pa*Tn,En=bo?1:-.2,Math.abs(Co)===90&&(Ir?En+=ce:Co===-90&&kn==="bottom"?En=de:Co===90&&kn==="top"?En=ce:En=.5,On=ce/2*(Co/90)),Ai.xFn=function(wo){return wo.dx+ki+On*wo.fontSize},Ai.yFn=function(wo){return wo.dy+Ki+wo.fontSize*En},Ai.anchorFn=function(wo,Zn){if(mr){if(Hr)return"end";if(gt)return"start"}return!_(Zn)||Zn===0||Zn===180?"middle":Zn*Tn<0!==Ir?"end":"start"},Ai.heightFn=function(wo,Zn,go){return Zn<-60||Zn>60?-.5*go:xt.side==="top"!==Ir?-go:0};else if(ao==="y"){if(bo=!Ir&&kn==="left"||Ir&&kn==="right",Tn=bo?1:-1,Ir&&(Tn*=-1),ki=Pa,Ki=ga*Tn,En=0,!Ir&&Math.abs(Co)===90&&(Co===-90&&kn==="left"||Co===90&&kn==="right"?En=de:En=.5),Ir){var zs=_(Co)?+Co:0;if(zs!==0){var Cn=e.deg2rad(zs);On=Math.abs(Math.sin(Cn))*de*Tn,En=0}}Ai.xFn=function(wo){return wo.dx+ut-(ki+wo.fontSize*En)*Tn+On*wo.fontSize},Ai.yFn=function(wo){return wo.dy+Ki+wo.fontSize*ce},Ai.anchorFn=function(wo,Zn){return _(Zn)&&Math.abs(Zn)===90?"middle":bo?"end":"start"},Ai.heightFn=function(wo,Zn,go){return xt.side==="right"&&(Zn*=-1),Zn<-30?-go:Zn<30?-.5*go:0}}return Ai};function qa(xt){return[xt.text,xt.x,xt.axInfo,xt.font,xt.fontSize,xt.fontColor].join("_")}V.drawTicks=function(xt,ut,Or){Or=Or||{};var Cr=ut._id+"tick",wr=[].concat(ut.minor&&ut.minor.ticks?Or.vals.filter(function(Nr){return Nr.minor&&!Nr.noTick}):[]).concat(ut.ticks?Or.vals.filter(function(Nr){return!Nr.minor&&!Nr.noTick}):[]),Rr=Or.layer.selectAll("path."+Cr).data(wr,qa);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("ticks",1).classed("crisp",Or.crisp!==!1).each(function(Nr){return a.stroke(v.select(this),Nr.minor?ut.minor.tickcolor:ut.tickcolor)}).style("stroke-width",function(Nr){return i.crispRound(xt,Nr.minor?ut.minor.tickwidth:ut.tickwidth,1)+"px"}).attr("d",Or.path).style("display",null),Ia(ut,[B]),Rr.attr("transform",Or.transFn)},V.drawGrid=function(xt,ut,Or){if(Or=Or||{},ut.tickmode!=="sync"){var Cr=ut._id+"grid",wr=ut.minor&&ut.minor.showgrid,Rr=wr?Or.vals.filter(function(Ai){return Ai.minor}):[],Nr=ut.showgrid?Or.vals.filter(function(Ai){return!Ai.minor}):[],Hr=Or.counterAxis;if(Hr&&V.shouldShowZeroLine(xt,ut,Hr))for(var gt=ut.tickmode==="array",Kt=0;Kt=0;ga--){var la=ga?va:Pa;if(la){var ba=la.selectAll("path."+Cr).data(ga?Nr:Rr,qa);ba.exit().remove(),ba.enter().append("path").classed(Cr,1).classed("crisp",Or.crisp!==!1),ba.attr("transform",Or.transFn).attr("d",Or.path).each(function(Ai){return a.stroke(v.select(this),Ai.minor?ut.minor.gridcolor:ut.gridcolor||"#ddd")}).style("stroke-dasharray",function(Ai){return i.dashStyle(Ai.minor?ut.minor.griddash:ut.griddash,Ai.minor?ut.minor.gridwidth:ut.gridwidth)}).style("stroke-width",function(Ai){return(Ai.minor?Ir:ut._gw)+"px"}).style("display",null),typeof Or.path=="function"&&ba.attr("d",Or.path)}}Ia(ut,[L,U])}},V.drawZeroLine=function(xt,ut,Or){Or=Or||Or;var Cr=ut._id+"zl",wr=V.shouldShowZeroLine(xt,ut,Or.counterAxis),Rr=Or.layer.selectAll("path."+Cr).data(wr?[{x:0,id:ut._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(Cr,1).classed("zl",1).classed("crisp",Or.crisp!==!1).each(function(){Or.layer.selectAll("path").sort(function(Nr,Hr){return j(Nr.id,Hr.id)})}),Rr.attr("transform",Or.transFn).attr("d",Or.path).call(a.stroke,ut.zerolinecolor||a.defaultLine).style("stroke-width",i.crispRound(xt,ut.zerolinewidth,ut._gw||1)+"px").style("display",null),Ia(ut,[O])},V.drawLabels=function(xt,ut,Or){Or=Or||{};var Cr=xt._fullLayout,wr=ut._id,Rr=ut.zerolinelayer==="above traces",Nr=Or.cls||wr+"tick",Hr=Or.vals.filter(function(Yn){return Yn.text}),gt=Or.labelFns,Kt=Or.secondary?0:ut.tickangle,mr=(ut._prevTickAngles||{})[Nr],Ir=Or.layer.selectAll("g."+Nr).data(ut.showticklabels?Hr:[],qa),va=[];Ir.enter().append("g").classed(Nr,1).append("text").attr("text-anchor","middle").each(function(Yn){var Gn=v.select(this),Hn=xt._promises.length;Gn.call(r.positionText,gt.xFn(Yn),gt.yFn(Yn)).call(i.font,{family:Yn.font,size:Yn.fontSize,color:Yn.fontColor,weight:Yn.fontWeight,style:Yn.fontStyle,variant:Yn.fontVariant,textcase:Yn.fontTextcase,lineposition:Yn.fontLineposition,shadow:Yn.fontShadow}).text(Yn.text).call(r.convertToTspans,xt),xt._promises[Hn]?va.push(xt._promises.pop().then(function(){Pa(Gn,Kt)})):Pa(Gn,Kt)}),Ia(ut,[W]),Ir.exit().remove(),Or.repositionOnUpdate&&Ir.each(function(Yn){v.select(this).select("text").call(r.positionText,gt.xFn(Yn),gt.yFn(Yn))});function Pa(Yn,Gn){Yn.each(function(Hn){var ss=v.select(this),_s=ss.select(".text-math-group"),ps=gt.anchorFn(Hn,Gn),Ko=Or.transFn.call(ss.node(),Hn)+(_(Gn)&&+Gn!=0?" rotate("+Gn+","+gt.xFn(Hn)+","+(gt.yFn(Hn)-Hn.fontSize/2)+")":""),Gi=r.lineCount(ss),Pn=Y*Hn.fontSize,qs=gt.heightFn(Hn,_(Gn)?+Gn:0,(Gi-1)*Pn);if(qs&&(Ko+=t(0,qs)),_s.empty()){var bs=ss.select("text");bs.attr({transform:Ko,"text-anchor":ps}),bs.style("display",null),ut._adjustTickLabelsOverflow&&ut._adjustTickLabelsOverflow()}else{var lo=i.bBox(_s.node()).width,Zo=lo*{end:-.5,start:.5}[ps];_s.attr("transform",Ko+t(Zo,0))}})}ut._adjustTickLabelsOverflow=function(){var Yn=ut.ticklabeloverflow;if(!(!Yn||Yn==="allow")){var Gn=Yn.indexOf("hide")!==-1,Hn=ut._id.charAt(0)==="x",ss=0,_s=Hn?xt._fullLayout.width:xt._fullLayout.height;if(Yn.indexOf("domain")!==-1){var ps=e.simpleMap(ut.range,ut.r2l);ss=ut.l2p(ps[0])+ut._offset,_s=ut.l2p(ps[1])+ut._offset}var Ko=Math.min(ss,_s),Gi=Math.max(ss,_s),Pn=ut.side,qs=1/0,bs=-1/0;Ir.each(function(Hs){var il=v.select(this),yn=il.select(".text-math-group");if(yn.empty()){var Po=i.bBox(il.node()),To=0;Hn?(Po.right>Gi||Po.leftGi||Po.top+(ut.tickangle?0:Hs.fontSize/4)ut["_visibleLabelMin_"+ps._id]?il.style("display","none"):Gi.K==="tick"&&!Ko&&il.node().style.display!=="none"&&il.style("display",null)})})})})},Pa(Ir,mr+1?mr:Kt);function ga(){return va.length&&Promise.all(va)}var la=null;function ba(){if(Pa(Ir,Kt),Hr.length&&ut.autotickangles&&(ut.type!=="log"||String(ut.dtick).charAt(0)!=="D")){la=ut.autotickangles[0];var Yn=0,Gn=[],Hn,ss=1;Ir.each(function(Jo){Yn=Math.max(Yn,Jo.fontSize);var Es=ut.l2p(Jo.x),Ul=Zt(this),lu=i.bBox(Ul.node());ss=Math.max(ss,r.lineCount(Ul)),Gn.push({top:0,bottom:10,height:10,left:Es-lu.width/2,right:Es+lu.width/2+2,width:lu.width+2})});var _s=(ut.tickson==="boundaries"||ut.showdividers)&&!Or.secondary,ps=Hr.length,Ko=Math.abs((Hr[ps-1].x-Hr[0].x)*ut._m)/(ps-1),Gi=_s?Ko/2:Ko,Pn=_s?ut.ticklen:Yn*1.25*ss,qs=Math.sqrt(Math.pow(Gi,2)+Math.pow(Pn,2)),bs=Gi/qs,lo=ut.autotickangles.map(function(Jo){return Jo*Math.PI/180}),Zo=lo.find(function(Jo){return Math.abs(Math.cos(Jo))<=bs});Zo===void 0&&(Zo=lo.reduce(function(Jo,Es){return Math.abs(Math.cos(Jo))os*go&&(Cn=go,Co[ao]=bo[ao]=wo[ao])}var ys=Math.abs(Cn-zs);ys-Tn>0?(ys-=Tn,Tn*=1+Tn/ys):Tn=0,ut._id.charAt(0)!=="y"&&(Tn=-Tn),Co[kn]=Ki.p2r(Ki.r2p(bo[kn])+On*Tn),Ki.autorange==="min"||Ki.autorange==="max reversed"?(Co[0]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0):(Ki.autorange==="max"||Ki.autorange==="min reversed")&&(Co[1]=null,Ki._rangeInitial0=void 0,Ki._rangeInitial1=void 0),Cr._insideTickLabelsUpdaterange[Ki._name+".range"]=Co}var jo=e.syncOrAsync(Ai);return jo&&jo.then&&xt._promises.push(jo),jo};function Wa(xt,ut,Or){var Cr=ut._id+"divider",wr=Or.vals,Rr=Or.layer.selectAll("path."+Cr).data(wr,qa);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(Cr,1).classed("crisp",1).call(a.stroke,ut.dividercolor).style("stroke-width",i.crispRound(xt,ut.dividerwidth,1)+"px"),Rr.attr("transform",Or.transFn).attr("d",Or.path)}V.getPxPosition=function(xt,ut){var Or=xt._fullLayout._size,Cr=ut._id.charAt(0),wr=ut.side,Rr;if(ut.anchor!=="free"?Rr=ut._anchorAxis:Cr==="x"?Rr={_offset:Or.t+(1-(ut.position||0))*Or.h,_length:0}:Cr==="y"&&(Rr={_offset:Or.l+(ut.position||0)*Or.w+ut._shift,_length:0}),wr==="top"||wr==="left")return Rr._offset;if(wr==="bottom"||wr==="right")return Rr._offset+Rr._length};function Ca(xt){var ut=xt.title.font.size,Or=(xt.title.text.match(r.BR_TAG_ALL)||[]).length;return xt.title.hasOwnProperty("standoff")?ut*(de+Or*Y):Or?ut*(Or+1)*Y:ut}function hi(xt,ut){var Or=xt._fullLayout,Cr=ut._id,wr=Cr.charAt(0),Rr=ut.title.font.size,Nr,Hr=(ut.title.text.match(r.BR_TAG_ALL)||[]).length;if(ut.title.hasOwnProperty("standoff"))ut.side==="bottom"||ut.side==="right"?Nr=ut._depth+ut.title.standoff+Rr*de:(ut.side==="top"||ut.side==="left")&&(Nr=ut._depth+ut.title.standoff+Rr*(ce+Hr*Y));else{var gt=pi(ut);if(ut.type==="multicategory")Nr=ut._depth;else{var Kt=1.5*Rr;gt&&(Kt=.5*Rr,ut.ticks==="outside"&&(Kt+=ut.ticklen)),Nr=10+Kt+(ut.linewidth?ut.linewidth-1:0)}gt||(wr==="x"?Nr+=ut.side==="top"?Rr*(ut.showticklabels?1:0):Rr*(ut.showticklabels?1.5:.5):Nr+=ut.side==="right"?Rr*(ut.showticklabels?1:.5):Rr*(ut.showticklabels?.5:0))}var mr=V.getPxPosition(xt,ut),Ir,va,Pa;wr==="x"?(va=ut._offset+ut._length/2,Pa=ut.side==="top"?mr-Nr:mr+Nr):(Pa=ut._offset+ut._length/2,va=ut.side==="right"?mr+Nr:mr-Nr,Ir={rotate:"-90",offset:0});var ga;if(ut.type!=="multicategory"){var la=ut._selections[ut._id+"tick"];if(ga={selection:la,side:ut.side},la&&la.node()&&la.node().parentNode){var ba=i.getTranslate(la.node().parentNode);ga.offsetLeft=ba.x,ga.offsetTop=ba.y}ut.title.hasOwnProperty("standoff")&&(ga.pad=0)}return ut._titleStandoff=Nr,o.draw(xt,Cr+"title",{propContainer:ut,propName:ut._name+".title.text",placeholder:Or._dfltTitle[wr],avoid:ga,transform:Ir,attributes:{x:va,y:Pa,"text-anchor":"middle"}})}V.shouldShowZeroLine=function(xt,ut,Or){var Cr=e.simpleMap(ut.range,ut.r2l);return Cr[0]*Cr[1]<=0&&ut.zeroline&&(ut.type==="linear"||ut.type==="-")&&!(ut.rangebreaks&&ut.maskBreaks(0)===N)&&(wi(ut,0)||!Yt(xt,ut,Or,Cr)||Rt(xt,ut))},V.clipEnds=function(xt,ut){return ut.filter(function(Or){return wi(xt,Or.x)})};function wi(xt,ut){var Or=xt.l2p(ut);return Or>1&&Or1)for(wr=1;wr=wr.min&&xt=z:/%L/.test(ut)?xt>=P:/%[SX]/.test(ut)?xt>=D:/%M/.test(ut)?xt>=y:/%[HI]/.test(ut)?xt>=g:/%p/.test(ut)?xt>=u:/%[Aadejuwx]/.test(ut)?xt>=d:/%[UVW]/.test(ut)?xt>=b:/%[Bbm]/.test(ut)?xt>=p:/%[q]/.test(ut)?xt>=w:/%[Yy]/.test(ut)?xt>=T:!0}}}),f5=He({"src/plots/cartesian/autorange_options_defaults.js"(Z,q){"use strict";q.exports=function(_,S,M){var e,t;if(M){var r=S==="reversed"||S==="min reversed"||S==="max reversed";e=M[r?1:0],t=M[r?0:1]}var o=_("autorangeoptions.minallowed",t===null?e:void 0),a=_("autorangeoptions.maxallowed",e===null?t:void 0);o===void 0&&_("autorangeoptions.clipmin"),a===void 0&&_("autorangeoptions.clipmax"),_("autorangeoptions.include")}}}),h5=He({"src/plots/cartesian/range_defaults.js"(Z,q){"use strict";var v=f5();q.exports=function(S,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),h;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,h=!0),h||(n=M.getAutorangeDflt(a,t),s=e("autorange",n)),s&&(v(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),M.cleanRange()}}}),uz=He({"node_modules/mouse-event-offset/index.js"(Z,q){var v={left:0,top:0};q.exports=_;function _(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=S(e);return t[0]=r-a.left,t[1]=o-a.top,t}function S(M){return M===window||M===document||M===document.body?v:M.getBoundingClientRect()}}}),b2=He({"node_modules/has-passive-events/index.js"(Z,q){"use strict";var v=a5();function _(){var S=!1;try{var M=Object.defineProperty({},"passive",{get:function(){S=!0}});window.addEventListener("test",null,M),window.removeEventListener("test",null,M)}catch{S=!1}return S}q.exports=v&&_()}}),cz=He({"src/components/dragelement/align.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){var r=(_-M)/(e-M),o=r+S/(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}}}),fz=He({"src/components/dragelement/cursor.js"(Z,q){"use strict";var v=sa(),_=[["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=v.constrain(Math.floor(M*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=v.constrain(Math.floor(e*3),0,2),_[e][M]}}}),hz=He({"src/components/dragelement/unhover.js"(Z,q){"use strict";var v=Qy(),_=y2(),S=T_().getGraphDiv,M=w_(),e=q.exports={};e.wrapped=function(t,r,o){t=S(t),t._fullLayout&&_.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&&v.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}))}}}),Ap=He({"src/components/dragelement/index.js"(Z,q){"use strict";var v=uz(),_=i5(),S=b2(),M=sa().removeElement,e=lh(),t=q.exports={};t.align=cz(),t.getCursor=fz();var r=hz();t.unhover=r.wrapped,t.unhoverRaw=r.raw,t.init=function(n){var s=n.gd,h=1,f=s._context.doubleClickDelay,m=n.element,c,T,l,x,w,A,E,p;s._mouseDownTime||(s._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=u,S?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=u,m.addEventListener("touchstart",u,{passive:!1})):m.ontouchstart=u;function b(D,P,z){return Math.abs(D)"u"&&typeof D.clientY>"u"&&(D.clientX=c,D.clientY=T),l=new Date().getTime(),l-s._mouseDownTimef&&(h=Math.max(h-1,1)),s._dragged)n.doneFn&&n.doneFn();else{var P;A.target===E?P=A:(P={target:E,srcElement:E,toElement:E},Object.keys(A).concat(Object.keys(A.__proto__)).forEach(z=>{var F=A[z];!P[z]&&typeof F!="function"&&(P[z]=F)})),n.clickFn&&n.clickFn(h,P),p||E.dispatchEvent(new MouseEvent("click",D))}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 v(i.changedTouches?i.changedTouches[0]:i,document.body)}}}),Kd=He({"src/lib/setcursor.js"(Z,q){"use strict";q.exports=function(_,S){(_.attr("class")||"").split(" ").forEach(function(M){M.indexOf("cursor-")===0&&_.classed(M,!1)}),S&&_.classed("cursor-"+S,!0)}}}),pz=He({"src/lib/override_cursor.js"(Z,q){"use strict";var v=Kd(),_="data-savedcursor",S="!!";q.exports=function(e,t){var r=e.attr(_);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;aX.legend.length)for(var le=X.legend.length;le(a==="legend"?1:0));if(z===!1&&(n[a]=void 0),!(z===!1&&!f.uirevision)&&(c("uirevision",n.uirevision),z!==!1)){c("borderwidth");var F=c("orientation"),N=c("yref"),O=c("xref"),L=F==="h",U=N==="paper",B=O==="paper",W,$,ue,ce="left";L?(W=0,v.getComponentMethod("rangeslider","isVisible")(i.xaxis)?U?($=1.1,ue="bottom"):($=1,ue="top"):U?($=-.1,ue="top"):($=0,ue="bottom")):($=1,ue="auto",B?W=1.02:(W=1,ce="right")),_.coerce(f,m,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:W}},"x"),_.coerce(f,m,{y:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"y"),c("traceorder",d),r.isGrouped(n[a])&&c("tracegroupgap"),c("entrywidth"),c("entrywidthmode"),c("indentation"),c("itemsizing"),c("itemwidth"),c("itemclick"),c("itemdoubleclick"),c("groupclick"),c("xanchor",ce),c("yanchor",ue),c("maxheight"),c("valign"),_.noneOrAll(f,m,["x","y"]);var de=c("title.text");if(de){c("title.side",L?"left":"top");var Y=_.extendFlat({},T,{size:_.bigFont(T.size)});_.coerceFont(c,"title.font",Y);let X=h>1;c("titleclick",X?"toggle":!1),c("titledoubleclick",X?"toggleothers":!1)}}}q.exports=function(i,n,s){var h,f=s.slice(),m=n.shapes;if(m)for(h=0;htt.showlegend||tt.legendgroup);var T=m.concat(c),l=n.trace;l._isShape&&(l=l._fullInput);var x=l.legendgroup,w,A,E,p,b,d,u={},g=[],y=[],D=[];function P(tt,Ve){var he=g.indexOf(tt),se=u.visible;return se||(se=u.visible=[]),g.indexOf(tt)===-1&&(g.push(tt),he=g.length-1),se[he]=Ve,he}var z=(i.shapes||[]).map(function(tt){return tt._input}),F=!1;function N(tt,Ve){z[tt].visible=Ve,F=!0}function O(tt,Ve){if(!(n.groupTitle&&!h)){var he=tt._fullInput||tt,se=he._isShape,ne=he.index;ne===void 0&&(ne=he._index);var Ce=he.visible===!1?!1:Ve;se?N(ne,Ce):P(ne,Ce)}}var L=l.legend,U=l._fullInput,B=U&&U._isShape;if(!B&&q.traceIs(l,"pie-like")){var W=n.label,$=f.indexOf(W);if(a==="toggle")$===-1?f.push(W):f.splice($,1);else if(a==="toggleothers"){var ue=$!==-1,ce=[];for(w=0;wE.showlegend||E.legendgroup),h=i.concat(s);function f(E){return(E.legend||"legend")===n}var m,c;if(o==="toggle")m=!h.some(function(p){return f(p)&&p.visible===!0}),c=!1;else{let E=h.some(function(p){return!f(p)&&p.visible===!0&&p.showlegend!==!1});m=!0,c=!E}let T={visible:[]},l=[],x=(a.shapes||[]).map(function(E){return E._input});for(var w=!1,A=0;AN&&(z=N)}D[T][0]._groupMinRank=z,D[T][0]._preGroupSort=T}var O=function(ue,ce){return ue[0]._groupMinRank-ce[0]._groupMinRank||ue[0]._preGroupSort-ce[0]._preGroupSort},L=function(ue,ce){var de=v(ue.trace.legendrank)?ue.trace.legendrank[ue.i]:ue.trace.legendrank,Y=v(ce.trace.legendrank)?ce.trace.legendrank[ce.i]:ce.trace.legendrank;return de-Y||ue._preSort-ce._preSort};for(D.forEach(function(ue,ce){ue[0]._preGroupSort=ce}),D.sort(O),T=0;T0)le=X.width;else return 0;return d?V:Math.min(le,Q)};A.each(function(Y){var X=v.select(this),Q=S.ensureSingle(X,"g","layers");Q.style("opacity",Y[0].trace.opacity);var V=p.indentation,le=p.valign,ae=Y[0].lineHeight,j=Y[0].height;if(le==="middle"&&V===0||!ae||!j)Q.attr("transform",null);else{var ee={top:1,bottom:-1}[le],te=ee*(.5*(ae-j+3))||0,pe=p.indentation;Q.attr("transform",M(pe,te))}var we=Q.selectAll("g.legendfill").data([Y]);we.enter().append("g").classed("legendfill",!0);var Se=Q.selectAll("g.legendlines").data([Y]);Se.enter().append("g").classed("legendlines",!0);var Re=Q.selectAll("g.legendsymbols").data([Y]);Re.enter().append("g").classed("legendsymbols",!0),Re.selectAll("g.legendpoints").data([Y]).enter().append("g").classed("legendpoints",!0)}).each(de).each(F).each(O).each(N).each(U).each(ue).each($).each(P).each(z).each(B).each(W);function P(Y){var X=l(Y),Q=X.showFill,V=X.showLine,le=X.showGradientLine,ae=X.showGradientFill,j=X.anyFill,ee=X.anyLine,te=Y[0],pe=te.trace,we,Se,Re=r(pe),Pe=Re.colorscale,je=Re.reversescale,at=function(Ce){if(Ce.size())if(Q)e.fillGroupStyle(Ce,E,!0);else{var Ze="legendfill-"+pe.uid;e.gradient(Ce,E,Ze,T(je),Pe,"fill")}},nt=function(Ce){if(Ce.size()){var Ze="legendline-"+pe.uid;e.lineGroupStyle(Ce),e.gradient(Ce,E,Ze,T(je),Pe,"stroke")}},tt=o.hasMarkers(pe)||!j?"M5,0":ee?"M5,-2":"M5,-3",Ve=v.select(this),he=Ve.select(".legendfill").selectAll("path").data(Q||ae?[Y]:[]);if(he.enter().append("path").classed("js-fill",!0),he.exit().remove(),he.attr("d",tt+"h"+u+"v6h-"+u+"z").call(at),V||le){var se=D(void 0,pe.line,m,h);Se=S.minExtend(pe,{line:{width:se}}),we=[S.minExtend(te,{trace:Se})]}var ne=Ve.select(".legendlines").selectAll("path").data(V||le?[we]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",tt+(le?"l"+u+",0.0001":"h"+u)).call(V?e.lineGroupStyle:nt)}function z(Y){var X=l(Y),Q=X.anyFill,V=X.anyLine,le=X.showLine,ae=X.showMarker,j=Y[0],ee=j.trace,te=!ae&&!V&&!Q&&o.hasText(ee),pe,we;function Se(he,se,ne,Ce){var Ze=S.nestedProperty(ee,he).get(),rt=S.isArrayOrTypedArray(Ze)&&se?se(Ze):Ze;if(d&&rt&&Ce!==void 0&&(rt=Ce),ne){if(rtne[1])return ne[1]}return rt}function Re(he){return j._distinct&&j.index&&he[j.index]?he[j.index]:he[0]}if(ae||te||le){var Pe={},je={};if(ae){Pe.mc=Se("marker.color",Re),Pe.mx=Se("marker.symbol",Re),Pe.mo=Se("marker.opacity",S.mean,[.2,1]),Pe.mlc=Se("marker.line.color",Re),Pe.mlw=Se("marker.line.width",S.mean,[0,5],f),Pe.mld=ee._isShape?"solid":Se("marker.line.dash",Re),je.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var at=Se("marker.size",S.mean,[2,16],s);Pe.ms=at,je.marker.size=at}le&&(je.line={width:Se("line.width",Re,[0,10],h)}),te&&(Pe.tx="Aa",Pe.tp=Se("textposition",Re),Pe.ts=10,Pe.tc=Se("textfont.color",Re),Pe.tf=Se("textfont.family",Re),Pe.tw=Se("textfont.weight",Re),Pe.ty=Se("textfont.style",Re),Pe.tv=Se("textfont.variant",Re),Pe.tC=Se("textfont.textcase",Re),Pe.tE=Se("textfont.lineposition",Re),Pe.tS=Se("textfont.shadow",Re)),pe=[S.minExtend(j,Pe)],we=S.minExtend(ee,je),we.selectedpoints=null,we.texttemplate=null}var nt=v.select(this).select("g.legendpoints"),tt=nt.selectAll("path.scatterpts").data(ae?pe:[]);tt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",y),tt.exit().remove(),tt.call(e.pointStyle,we,E),ae&&(pe[0].mrc=3);var Ve=nt.selectAll("g.pointtext").data(te?pe:[]);Ve.enter().append("g").classed("pointtext",!0).append("text").attr("transform",y),Ve.exit().remove(),Ve.selectAll("text").call(e.textPointStyle,we,E)}function F(Y){var X=Y[0].trace,Q=X.type==="waterfall";if(Y[0]._distinct&&Q){var V=Y[0].trace[Y[0].dir].marker;return Y[0].mc=V.color,Y[0].mlw=V.line.width,Y[0].mlc=V.line.color,L(Y,this,"waterfall")}var le=[];X.visible&&Q&&(le=Y[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 ae=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(le);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",y).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(j){var ee=v.select(this),te=X[j[0]].marker,pe=D(void 0,te.line,c,f);ee.attr("d",j[1]).style("stroke-width",pe+"px").call(t.fill,te.color),pe&&ee.call(t.stroke,te.line.color)})}function N(Y){L(Y,this)}function O(Y){L(Y,this,"funnel")}function L(Y,X,Q){var V=Y[0].trace,le=V.marker||{},ae=le.line||{},j=le.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=Q?V.visible&&V.type===Q:_.traceIs(V,"bar"),te=v.select(X).select("g.legendpoints").selectAll("path.legend"+Q).data(ee?[Y]:[]);te.enter().append("path").classed("legend"+Q,!0).attr("d",j).attr("transform",y),te.exit().remove(),te.each(function(pe){var we=v.select(this),Se=pe[0],Re=D(Se.mlw,le.line,c,f);we.style("stroke-width",Re+"px");var Pe=Se.mcc;if(!p._inHover&&"mc"in Se){var je=r(le),at=je.mid;at===void 0&&(at=(je.max+je.min)/2),Pe=e.tryColorscale(le,"")(at)}var nt=Pe||Se.mc||le.color,tt=le.pattern,Ve=e.getPatternAttr,he=tt&&(Ve(tt.shape,0,"")||Ve(tt.path,0,""));if(he){var se=Ve(tt.bgcolor,0,null),ne=Ve(tt.fgcolor,0,null),Ce=tt.fgopacity,Ze=x(tt.size,8,10),rt=x(tt.solidity,.5,1),Je="legend-"+V.uid;we.call(e.pattern,"legend",E,Je,he,Ze,rt,Pe,tt.fillmode,se,ne,Ce)}else we.call(t.fill,nt);Re&&t.stroke(we,Se.mlc||ae.color)})}function U(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&_.traceIs(X,"box-violin")?[Y]:[]);Q.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),Q.exit().remove(),Q.each(function(){var V=v.select(this);if((X.boxpoints==="all"||X.points==="all")&&t.opacity(X.fillcolor)===0&&t.opacity((X.line||{}).color)===0){var le=S.minExtend(X,{marker:{size:d?s:S.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});Q.call(e.pointStyle,le,E)}else{var ae=D(void 0,X.line,c,f);V.style("stroke-width",ae+"px").call(t.fill,X.fillcolor),ae&&t.stroke(V,X.line.color)}})}function B(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[Y,Y]:[]);Q.enter().append("path").classed("legendcandle",!0).attr("d",function(V,le){return le?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",y).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(V,le){var ae=v.select(this),j=X[le?"increasing":"decreasing"],ee=D(void 0,j.line,c,f);ae.style("stroke-width",ee+"px").call(t.fill,j.fillcolor),ee&&t.stroke(ae,j.line.color)})}function W(Y){var X=Y[0].trace,Q=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[Y,Y]:[]);Q.enter().append("path").classed("legendohlc",!0).attr("d",function(V,le){return le?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",y).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(V,le){var ae=v.select(this),j=X[le?"increasing":"decreasing"],ee=D(void 0,j.line,c,f);ae.style("fill","none").call(e.dashLine,j.line.dash,ee),ee&&t.stroke(ae,j.line.color)})}function $(Y){ce(Y,this,"pie")}function ue(Y){ce(Y,this,"funnelarea")}function ce(Y,X,Q){var V=Y[0],le=V.trace,ae=Q?le.visible&&le.type===Q:_.traceIs(le,Q),j=v.select(X).select("g.legendpoints").selectAll("path.legend"+Q).data(ae?[Y]:[]);if(j.enter().append("path").classed("legend"+Q,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),j.exit().remove(),j.size()){var ee=le.marker||{},te=D(i(ee.line.width,V.pts),ee.line,c,f),pe="pieLike",we=S.minExtend(le,{marker:{line:{width:te}}},pe),Se=S.minExtend(V,{trace:we},pe);a(j,Se,we,E)}}function de(Y){var X=Y[0].trace,Q,V=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":V=[["M-15,-2V4H15V-2Z"]],Q=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":V=[["M-6,-6V6H6V-6Z"]],Q=!0;break;case"densitymapbox":case"densitymap":V=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],Q="radial";break;case"cone":V=[["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"]],Q=!1;break;case"streamtube":V=[["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"]],Q=!1;break;case"surface":V=[["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"]],Q=!0;break;case"mesh3d":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Q=!1;break;case"volume":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],Q=!0;break;case"isosurface":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],Q=!1;break}var le=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);le.enter().append("path").classed("legend3dandfriends",!0).attr("transform",y).style("stroke-miterlimit",1),le.exit().remove(),le.each(function(ae,j){var ee=v.select(this),te=r(X),pe=te.colorscale,we=te.reversescale,Se=function(at){if(at.size()){var nt="legendfill-"+X.uid;e.gradient(at,E,nt,T(we,Q==="radial"),pe,"fill")}},Re;if(pe){if(!Q){var je=pe.length;Re=j===0?pe[we?je-1:0][1]:j===1?pe[we?0:je-1][1]:pe[Math.floor((je-1)/2)][1]}}else{var Pe=X.vertexcolor||X.facecolor||X.color;Re=S.isArrayOrTypedArray(Pe)?Pe[j]||Pe[0]:Pe}ee.attr("d",ae[0]),Re?ee.call(t.fill,Re):ee.call(Se)})}};function T(w,A){var E=A?"radial":"horizontal";return E+(w?"":"reversed")}function l(w){var A=w[0].trace,E=A.contours,p=o.hasLines(A),b=o.hasMarkers(A),d=A.visible&&A.fill&&A.fill!=="none",u=!1,g=!1;if(E){var y=E.coloring;y==="lines"?u=!0:p=y==="none"||y==="heatmap"||E.showlines,E.type==="constraint"?d=E._operation!=="=":(y==="fill"||y==="heatmap")&&(g=!0)}return{showMarker:b,showLine:p,showFill:d,showGradientLine:u,showGradientFill:g,anyLine:p||u,anyFill:d||g}}function x(w,A,E){return w&&S.isArrayOrTypedArray(w)?A:w>E?E:w}}}),y5=He({"src/components/legend/draw.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=bc(),M=so(),e=Qy(),t=Ap(),r=as(),o=$n(),a=su(),i=v5().handleItemClick,n=v5().handleTitleClick,s=m5(),h=uh(),f=h.LINE_SPACING,m=h.FROM_TL,c=h.FROM_BR,T=dz(),l=g5(),x=E_(),w=1,A=/^legend[0-9]*$/;q.exports=function(W,$){if($)p(W,$);else{var ue=W._fullLayout,ce=ue._legends,de=ue._infolayer.selectAll('[class^="legend"]');de.each(function(){var V=v.select(this),le=V.attr("class"),ae=le.split(" ")[0];ae.match(A)&&ce.indexOf(ae)===-1&&V.remove()});for(var Y=0;Y1)}var te=ue.hiddenlabels||[];if(!X&&(!ue.showlegend||!Q.length))return Y.selectAll("."+ce).remove(),ue._topdefs.select("#"+de).remove(),S.autoMargin(B,ce);var pe=_.ensureSingle(Y,"g",ce,function(Ve){X||Ve.attr("pointer-events","all")}),we=_.ensureSingleById(ue._topdefs,"clipPath",de,function(Ve){Ve.append("rect")}),Se=_.ensureSingle(pe,"rect","bg",function(Ve){Ve.attr("shape-rendering","crispEdges")});Se.call(o.stroke,$.bordercolor).call(o.fill,$.bgcolor).style("stroke-width",$.borderwidth+"px");var Re=_.ensureSingle(pe,"g","scrollbox"),Pe=$.title;$._titleWidth=0,$._titleHeight=0;var je;Pe.text?(je=_.ensureSingle(Re,"text",ce+"titletext"),je.attr("text-anchor","start").call(r.font,Pe.font).text(Pe.text),P(je,Re,B,$,w),!X&&($.titleclick||$.titledoubleclick)&&D(Re,B,$,ce)):(Re.selectAll("."+ce+"titletext").remove(),Re.selectAll("."+ce+"titletoggle").remove());var at=_.ensureSingle(pe,"rect","scrollbar",function(Ve){Ve.attr(s.scrollBarEnterAttrs).call(o.fill,s.scrollBarColor)}),nt=Re.selectAll("g.groups").data(Q);nt.enter().append("g").attr("class","groups"),nt.exit().remove();var tt=nt.selectAll("g.traces").data(_.identity);tt.enter().append("g").attr("class","traces"),tt.exit().remove(),tt.style("opacity",function(Ve){let he=Ve[0],se=he.trace;if(he.groupTitle){let ne=se.legendgroup,Ce=(ue.shapes||[]).filter(function(rt){return rt.showlegend});return B._fullData.concat(Ce).some(function(rt){return rt.legendgroup===ne&&(rt.legend||"legend")===ce&&rt.visible===!0})?1:.5}return M.traceIs(se,"pie-like")?te.indexOf(Ve[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,B,$)}).call(l,B,$).each(function(Ve){X||Ve[0].groupTitle&&$.groupclick==="toggleitem"||v.select(this).call(y,B,ce)}),_.syncOrAsync([S.previousPromises,function(){return N(B,nt,tt,$,Re)},function(){var Ve=ue._size,he=$.borderwidth,se=$.xref==="paper",ne=$.yref==="paper";if(Pe.text){let Ct=(ue.shapes||[]).filter(function(jt){return jt.showlegend}),Pt=B._fullData.concat(Ct).some(function(jt){let cr=jt.legend||"legend";var or=Array.isArray(cr)?cr.includes(ce):cr===ce;return or&&jt.visible===!0});je.style("opacity",Pt?1:.5)}if(!X){var Ce,Ze;se?Ce=Ve.l+Ve.w*$.x-m[L($)]*$._width:Ce=ue.width*$.x-m[L($)]*$._width,ne?Ze=Ve.t+Ve.h*(1-$.y)-m[U($)]*$._effHeight:Ze=ue.height*(1-$.y)-m[U($)]*$._effHeight;var rt=O(B,ce,Ce,Ze);if(rt)return;if(ue.margin.autoexpand){var Je=Ce,St=Ze;Ce=se?_.constrain(Ce,0,ue.width-$._width):Je,Ze=ne?_.constrain(Ze,0,ue.height-$._effHeight):St,Ce!==Je&&_.log("Constrain "+ce+".x to make legend fit inside graph"),Ze!==St&&_.log("Constrain "+ce+".y to make legend fit inside graph")}r.setTranslate(pe,Ce,Ze)}if(at.on(".drag",null),pe.on("wheel",null),X||$._height<=$._maxHeight||B._context.staticPlot){var kt=$._effHeight;X&&(kt=$._height),Se.attr({width:$._width-he,height:kt-he,x:he/2,y:he/2}),r.setTranslate(Re,0,0),we.select("rect").attr({width:$._width-2*he,height:kt-2*he,x:he,y:he}),r.setClipUrl(Re,de,B),r.setRect(at,0,0,0,0),delete $._scrollY}else{var Bt=Math.max(s.scrollBarMinHeight,$._effHeight*$._effHeight/$._height),Vt=$._effHeight-Bt-2*s.scrollBarMargin,Ar=$._height-$._effHeight,vr=Vt/Ar,qr=Math.min($._scrollY||0,Ar);Se.attr({width:$._width-2*he+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-he,x:he/2,y:he/2}),we.select("rect").attr({width:$._width-2*he+s.scrollBarWidth+s.scrollBarMargin,height:$._effHeight-2*he,x:he,y:he+qr}),r.setClipUrl(Re,de,B),We(qr,Bt,vr),pe.on("wheel",function(){qr=_.constrain($._scrollY+v.event.deltaY/Ar*Vt,0,Ar),We(qr,Bt,vr),qr!==0&&qr!==Ar&&v.event.preventDefault()});var kr,Ur,_t,Fe=function(Ct,Pt,jt){var cr=(jt-Pt)/vr+Ct;return _.constrain(cr,0,Ar)},Ye=function(Ct,Pt,jt){var cr=(Pt-jt)/vr+Ct;return _.constrain(cr,0,Ar)},Ae=v.behavior.drag().on("dragstart",function(){var Ct=v.event.sourceEvent;Ct.type==="touchstart"?kr=Ct.changedTouches[0].clientY:kr=Ct.clientY,_t=qr}).on("drag",function(){var Ct=v.event.sourceEvent;Ct.buttons===2||Ct.ctrlKey||(Ct.type==="touchmove"?Ur=Ct.changedTouches[0].clientY:Ur=Ct.clientY,qr=Fe(_t,kr,Ur),We(qr,Bt,vr))});at.call(Ae);var Le=v.behavior.drag().on("dragstart",function(){var Ct=v.event.sourceEvent;Ct.type==="touchstart"&&(kr=Ct.changedTouches[0].clientY,_t=qr)}).on("drag",function(){var Ct=v.event.sourceEvent;Ct.type==="touchmove"&&(Ur=Ct.changedTouches[0].clientY,qr=Ye(_t,kr,Ur),We(qr,Bt,vr))});Re.call(Le)}function We(Ct,Pt,jt){$._scrollY=B._fullLayout[ce]._scrollY=Ct,r.setTranslate(Re,0,-Ct),r.setRect(at,$._width,s.scrollBarMargin+Ct*jt,s.scrollBarWidth,Pt),we.select("rect").attr("y",he+Ct)}if(B._context.edits.legendPosition){var Ke,st,ot,Ut;pe.classed("cursor-move",!0),t.init({element:pe.node(),gd:B,prepFn:function(Ct){if(Ct.target!==at.node()){var Pt=r.getTranslate(pe);ot=Pt.x,Ut=Pt.y}},moveFn:function(Ct,Pt){if(ot!==void 0&&Ut!==void 0){var jt=ot+Ct,cr=Ut+Pt;r.setTranslate(pe,jt,cr),Ke=t.align(jt,$._width,Ve.l,Ve.l+Ve.w,$.xanchor),st=t.align(cr+$._height,-$._height,Ve.t+Ve.h,Ve.t,$.yanchor)}},doneFn:function(){if(Ke!==void 0&&st!==void 0){var Ct={};Ct[ce+".x"]=Ke,Ct[ce+".y"]=st,M.call("_guiRelayout",B,Ct)}},clickFn:function(Ct,Pt){var jt=Y.selectAll("g.traces").filter(function(){var cr=this.getBoundingClientRect();return Pt.clientX>=cr.left&&Pt.clientX<=cr.right&&Pt.clientY>=cr.top&&Pt.clientY<=cr.bottom});jt.size()>0&&d(B,$,jt,Ct,Pt)}})}}],B)}}function b(B,W,$){var ue=B[0],ce=ue.width,de=W.entrywidthmode,Y=ue.trace.legendwidth||W.entrywidth;return de==="fraction"?W._maxWidth*Y:$+(Y||ce)}function d(B,W,$,ue,ce){var de=B._fullLayout,Y=$.data()[0][0].trace,X=W.itemclick,Q=W.itemdoubleclick,V={event:ce,node:$.node(),curveNumber:Y.index,expandedIndex:Y.index,data:B.data,layout:B.layout,frames:B._transitionData._frames,config:B._context,fullData:B._fullData,fullLayout:de};Y._group&&(V.group=Y._group),M.traceIs(Y,"pie-like")&&(V.label=$.datum()[0].label);var le=e.triggerHandler(B,"plotly_legendclick",V);if(ue===1){if(le===!1)return;W._clickTimeout=setTimeout(function(){B._fullLayout&&X&&i($,B,W,X)},B._context.doubleClickDelay)}else if(ue===2){W._clickTimeout&&clearTimeout(W._clickTimeout),B._legendMouseDownTime=0;var ae=e.triggerHandler(B,"plotly_legenddoubleclick",V);ae!==!1&&le!==!1&&Q&&i($,B,W,Q)}}function u(B,W,$){var ue=x.getId($),ce=B.data()[0][0],de=ce.trace,Y=M.traceIs(de,"pie-like"),X=!$._inHover&&W._context.edits.legendText&&!Y,Q=$._maxNameLength,V,le;ce.groupTitle?(V=ce.groupTitle.text,le=ce.groupTitle.font):(le=$.font,$.entries?V=ce.text:(V=Y?ce.label:de.name,de._meta&&(V=_.templateString(V,de._meta))));var ae=_.ensureSingle(B,"text",ue+"text");ae.attr("text-anchor","start").call(r.font,le).text(X?g(V,Q):V);var j=$.indentation+$.itemwidth+s.itemGap*2;a.positionText(ae,j,0),X?ae.call(a.makeEditable,{gd:W,text:V}).call(P,B,W,$).on("edit",function(ee){this.text(g(ee,Q)).call(P,B,W,$);var te=ce.trace._fullInput||{},pe={};return pe.name=ee,te._isShape?M.call("_guiRelayout",W,"shapes["+de.index+"].name",pe.name):M.call("_guiRestyle",W,pe,de.index)}):P(ae,B,W,$)}function g(B,W){var $=Math.max(4,W);if(B&&B.trim().length>=$/2)return B;B=B||"";for(var ue=$-B.length;ue>0;ue--)B+=" ";return B}function y(B,W,$){var ue=W._context.doubleClickDelay,ce,de=1,Y=_.ensureSingle(B,"rect",$+"toggle",function(X){W._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(o.fill,"rgba(0,0,0,0)")});W._context.staticPlot||(Y.on("mousedown",function(){ce=new Date().getTime(),ce-W._legendMouseDownTimeue&&(de=Math.max(de-1,1)),d(W,X,B,de,v.event)}}))}function D(B,W,$,ue){if(W._fullData.some(function(V){let le=V.legend||"legend";return(Array.isArray(le)?le.includes(ue):le===ue)&&M.traceIs(V,"pie-like")}))return;let de=W._context.doubleClickDelay;var Y,X=1;let Q=_.ensureSingle(B,"rect",ue+"titletoggle",function(V){W._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(o.fill,"rgba(0,0,0,0)")});W._context.staticPlot||(Q.on("mousedown",function(){Y=new Date().getTime(),Y-W._legendMouseDownTimede&&(X=Math.max(X-1,1));let V={event:v.event,legendId:ue,data:W.data,layout:W.layout,fullData:W._fullData,fullLayout:W._fullLayout};if(X===1&&$.titleclick){if(e.triggerHandler(W,"plotly_legendtitleclick",V)===!1)return;$._titleClickTimeout=setTimeout(function(){W._fullLayout&&n(W,$,$.titleclick)},de)}else X===2&&($._titleClickTimeout&&clearTimeout($._titleClickTimeout),W._legendMouseDownTime=0,e.triggerHandler(W,"plotly_legendtitledoubleclick",V)!==!1&&$.titledoubleclick&&n(W,$,$.titledoubleclick))}))}function P(B,W,$,ue,ce){ue._inHover&&B.attr("data-notex",!0),a.convertToTspans(B,$,function(){z(W,$,ue,ce)})}function z(B,W,$,ue){var ce=B.data()[0][0],de=ce&&ce.trace.showlegend;if(Array.isArray(de)&&(de=de[ce.i]!==!1),!$._inHover&&ce&&!de){B.remove();return}var Y=B.select("g[class*=math-group]"),X=Y.node(),Q=x.getId($);$||($=W._fullLayout[Q]);var V=$.borderwidth,le;ue===w?le=$.title.font:ce.groupTitle?le=ce.groupTitle.font:le=$.font;var ae=le.size*f,j,ee;if(X){var te=r.bBox(X);j=te.height,ee=te.width,ue===w?r.setTranslate(Y,V,V+j*.75):r.setTranslate(Y,0,j*.25)}else{var pe="."+Q+(ue===w?"title":"")+"text",we=B.select(pe),Se=a.lineCount(we),Re=we.node();if(j=ae*Se,ee=Re?r.bBox(Re).width:0,ue===w)$.title.side==="left"&&(ee+=s.itemGap*2),a.positionText(we,V+s.titlePad,V+ae);else{var Pe=s.itemGap*2+$.indentation+$.itemwidth;ce.groupTitle&&(Pe=s.itemGap,ee-=$.indentation+$.itemwidth),a.positionText(we,Pe,-ae*((Se-1)/2-.3))}}ue===w?($._titleWidth=ee,$._titleHeight=j):(ce.lineHeight=ae,ce.height=Math.max(j,16)+3,ce.width=ee)}function F(B){var W=0,$=0,ue=B.title.side;return ue&&(ue.indexOf("left")!==-1&&(W=B._titleWidth),ue.indexOf("top")!==-1&&($=B._titleHeight)),[W,$]}function N(B,W,$,ue,ce){var de=B._fullLayout,Y=x.getId(ue);ue||(ue=de[Y]);var X=de._size,Q=x.isVertical(ue),V=x.isGrouped(ue),le=ue.entrywidthmode==="fraction",ae=ue.borderwidth,j=2*ae,ee=s.itemGap,te=ue.indentation+ue.itemwidth+ee*2,pe=2*(ae+ee),we=U(ue),Se=ue.y<0||ue.y===0&&we==="top",Re=ue.y>1||ue.y===1&&we==="bottom",Pe=ue.tracegroupgap,je={};let{orientation:at,yref:nt}=ue,{maxheight:tt}=ue,Ve=Se||Re||at!=="v"||nt!=="paper";tt||(tt=Ve?.5:1);let he=Ve?de.height:X.h;ue._maxHeight=Math.max(tt>1?tt:tt*he,30);var se=0;ue._width=0,ue._height=0;var ne=F(ue);if(Q)$.each(function(Ct){var Pt=Ct[0].height;r.setTranslate(this,ae+ne[0],ae+ne[1]+ue._height+Pt/2+ee),ue._height+=Pt,ue._width=Math.max(ue._width,Ct[0].width)}),se=te+ue._width,ue._width+=ee+te+j,ue._height+=pe,V&&(W.each(function(Ct,Pt){r.setTranslate(this,0,Pt*ue.tracegroupgap)}),ue._height+=(ue._lgroupsLength-1)*ue.tracegroupgap);else{var Ce=L(ue),Ze=ue.x<0||ue.x===0&&Ce==="right",rt=ue.x>1||ue.x===1&&Ce==="left",Je=Re||Se,St=de.width/2;ue._maxWidth=Math.max(Ze?Je&&Ce==="left"?X.l+X.w:St:rt?Je&&Ce==="right"?X.r+X.w:St:X.w,2*te);var kt=0,Bt=0;$.each(function(Ct){var Pt=b(Ct,ue,te);kt=Math.max(kt,Pt),Bt+=Pt}),se=null;var Vt=0;if(V){var Ar=0,vr=0,qr=0;W.each(function(){var Ct=0,Pt=0;v.select(this).selectAll("g.traces").each(function(cr){var or=b(cr,ue,te),nr=cr[0].height;r.setTranslate(this,ne[0],ne[1]+ae+ee+nr/2+Pt),Pt+=nr,Ct=Math.max(Ct,or),je[cr[0].trace.legendgroup]=Ct});var jt=Ct+ee;vr>0&&jt+ae+vr>ue._maxWidth?(Vt=Math.max(Vt,vr),vr=0,qr+=Ar+Pe,Ar=Pt):Ar=Math.max(Ar,Pt),r.setTranslate(this,vr,qr),vr+=jt}),ue._width=Math.max(Vt,vr)+ae,ue._height=qr+Ar+pe}else{var kr=$.size(),Ur=Bt+j+(kr-1)*ee=ue._maxWidth&&(Vt=Math.max(Vt,Ae),Fe=0,Ye+=_t,ue._height+=_t,_t=0),r.setTranslate(this,ne[0]+ae+Fe,ne[1]+ae+Ye+Pt/2+ee),Ae=Fe+jt+ee,Fe+=cr,_t=Math.max(_t,Pt)}),Ur?(ue._width=Fe+j,ue._height=_t+pe):(ue._width=Math.max(Vt,Ae)+j,ue._height+=_t+pe)}}ue._width=Math.ceil(Math.max(ue._width+ne[0],ue._titleWidth+2*(ae+s.titlePad))),ue._height=Math.ceil(Math.max(ue._height+ne[1],ue._titleHeight+2*(ae+s.itemGap))),ue._effHeight=Math.min(ue._height,ue._maxHeight);var Le=B._context.edits,We=Le.legendText||Le.legendPosition;$.each(function(Ct){var Pt=v.select(this).select("."+Y+"toggle"),jt=Ct[0].height,cr=Ct[0].trace.legendgroup,or=b(Ct,ue,te);V&&cr!==""&&(or=je[cr]);var nr=We?te:se||or;!Q&&!le&&(nr+=ee/2),r.setRect(Pt,0,-jt/2,nr,jt)});var Ke=ce.select("."+Y+"titletext");Ke.node()&&E(Ke,ue,ae);var st=ce.select("."+Y+"titletoggle");if(st.size()&&Ke.node()){var ot=Ke.attr("x")||0,Ut=s.titlePad;r.setRect(st,ot-Ut,ae,ue._titleWidth+2*Ut,ue._titleHeight+2*Ut)}}function O(B,W,$,ue){var ce=B._fullLayout,de=ce[W],Y=L(de),X=U(de),Q=de.xref==="paper",V=de.yref==="paper";B._fullLayout._reservedMargin[W]={};var le=de.y<.5?"b":"t",ae=de.x<.5?"l":"r",j={r:ce.width-$,l:$+de._width,b:ce.height-ue,t:ue+de._effHeight};if(Q&&V)return S.autoMargin(B,W,{x:de.x,y:de.y,l:de._width*m[Y],r:de._width*c[Y],b:de._effHeight*c[X],t:de._effHeight*m[X]});Q?B._fullLayout._reservedMargin[W][le]=j[le]:V||de.orientation==="v"?B._fullLayout._reservedMargin[W][ae]=j[ae]:B._fullLayout._reservedMargin[W][le]=j[le]}function L(B){return _.isRightAnchor(B)?"right":_.isCenterAnchor(B)?"center":"left"}function U(B){return _.isBottomAnchor(B)?"bottom":_.isMiddleAnchor(B)?"middle":"top"}}}),_5=He({"src/components/fx/hover.js"(Z){"use strict";var q=Vn(),v=ns(),_=Ch(),S=sa(),M=S.pushUnique,e=S.strTranslate,t=S.strRotate,r=Qy(),o=su(),a=pz(),i=as(),n=$n(),s=Ap(),h=Wo(),f=lh().zindexSeparator,m=so(),c=$p(),T=w_(),l=d5(),x=y5(),w=T.YANGLE,A=Math.PI*w/180,E=1/Math.sin(A),p=Math.cos(A),b=Math.sin(A),d=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,g={box:!0,ohlc:!0,violin:!0,candlestick:!0},y={scatter:!0,scattergl:!0,splom:!0};function D(j,ee){return j.distance-ee.distance}Z.hover=function(ee,te,pe,we){ee=S.getGraphDiv(ee);var Se=te.target;S.throttle(ee._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){P(ee,te,pe,we,Se)})},Z.loneHover=function(ee,te){var pe=!0;Array.isArray(ee)||(pe=!1,ee=[ee]);var we=te.gd,Se=V(we),Re=le(we),Pe=ee.map(function(Ce){var Ze=Ce._x0||Ce.x0||Ce.x||0,rt=Ce._x1||Ce.x1||Ce.x||0,Je=Ce._y0||Ce.y0||Ce.y||0,St=Ce._y1||Ce.y1||Ce.y||0,kt=Ce.eventData;if(kt){var Bt=Math.min(Ze,rt),Vt=Math.max(Ze,rt),Ar=Math.min(Je,St),vr=Math.max(Je,St),qr=Ce.trace;if(m.traceIs(qr,"gl3d")){var kr=we._fullLayout[qr.scene]._scene.container,Ur=kr.offsetLeft,_t=kr.offsetTop;Bt+=Ur,Vt+=Ur,Ar+=_t,vr+=_t}kt.bbox={x0:Bt+Re,x1:Vt+Re,y0:Ar+Se,y1:vr+Se},kt.xPixel=(Ze+rt)/2,kt.yPixel=(Je+St)/2,te.inOut_bbox&&te.inOut_bbox.push(kt.bbox)}else kt=!1;return{color:Ce.color||n.defaultLine,x0:Ce.x0||Ce.x||0,x1:Ce.x1||Ce.x||0,y0:Ce.y0||Ce.y||0,y1:Ce.y1||Ce.y||0,xLabel:Ce.xLabel,yLabel:Ce.yLabel,zLabel:Ce.zLabel,text:Ce.text,name:Ce.name,idealAlign:Ce.idealAlign,borderColor:Ce.borderColor,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontColor:Ce.fontColor,fontWeight:Ce.fontWeight,fontStyle:Ce.fontStyle,fontVariant:Ce.fontVariant,nameLength:Ce.nameLength,textAlign:Ce.textAlign,trace:Ce.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Ce.hovertemplate||!1,hovertemplateLabels:Ce.hovertemplateLabels||!1,eventData:kt}}),je=!1,at=N(Pe,{gd:we,hovermode:"closest",rotateLabels:je,bgColor:te.bgColor||n.background,container:q.select(te.container),outerContainer:te.outerContainer||te.container}),nt=at.hoverLabels,tt=5,Ve=0,he=0;nt.sort(function(Ce,Ze){return Ce.y0-Ze.y0}).each(function(Ce,Ze){var rt=Ce.y0-Ce.by/2;rt-ttVt[0]._length||Wa<0||Wa>Ar[0]._length)return s.unhoverRaw(j,ee)}if(ee.pointerX=qa+Vt[0]._offset,ee.pointerY=Wa+Ar[0]._offset,"xval"in ee?Ae=c.flat(Se,ee.xval):Ae=c.p2c(Vt,qa),"yval"in ee?Le=c.flat(Se,ee.yval):Le=c.p2c(Ar,Wa),!v(Ae[0])||!v(Le[0]))return S.warn("Fx.hover failed",ee,j),s.unhoverRaw(j,ee)}Pe.clickanywhere&&(j._hoverXVals=Ae,j._hoverYVals=Le,j._hoverXAxes=Vt,j._hoverYAxes=Ar);var wi=1/0;function Yt(Cn,wo){for(Ke=0;Kenr&&(Fe.splice(0,nr),wi=Fe[0].distance),tt&&_t!==0&&Fe.length===0){or.distance=_t,or.index=!1;var jo=ot._module.hoverPoints(or,jt,cr,"closest",{hoverLayer:Pe._hoverlayer});if(jo&&(jo=jo.filter(function(ps){return ps.spikeDistance<=_t})),jo&&jo.length){var Yn,Gn=jo.filter(function(ps){return ps.xa.showspikes&&ps.xa.spikesnap!=="hovered data"});if(Gn.length){var Hn=Gn[0];v(Hn.x0)&&v(Hn.y0)&&(Yn=Zt(Hn),(!Pr.vLinePoint||Pr.vLinePoint.spikeDistance>Yn.spikeDistance)&&(Pr.vLinePoint=Yn))}var ss=jo.filter(function(ps){return ps.ya.showspikes&&ps.ya.spikesnap!=="hovered data"});if(ss.length){var _s=ss[0];v(_s.x0)&&v(_s.y0)&&(Yn=Zt(_s),(!Pr.hLinePoint||Pr.hLinePoint.spikeDistance>Yn.spikeDistance)&&(Pr.hLinePoint=Yn))}}}}}Yt();function Rt(Cn,wo,Zn){for(var go=null,os=1/0,ys,jo=0;joCn.trace.index===tn.trace.index):Fe=[tn];var cn=Fe.length,xt=Q("x",tn,Pe),ut=Q("y",tn,Pe);Yt(xt,ut);var Or=[],Cr={},wr=0,Rr=function(Cn){var wo=g[Cn.trace.type]?z(Cn):Cn.trace.index;if(!Cr[wo])wr++,Cr[wo]=wr,Or.push(Cn);else{var Zn=Cr[wo]-1,go=Or[Zn];Zn>0&&Math.abs(Cn.distance)cn-1;Nr--)Rr(Fe[Nr]);Fe=Or,ra()}var Hr=j._hoverdata,gt=[],Kt=V(j),mr=le(j);for(let Cn of Fe){var Ir=c.makeEventData(Cn,Cn.trace,Cn.cd);if(Cn.hovertemplate!==!1){var va=!1;Cn.cd[Cn.index]&&Cn.cd[Cn.index].ht&&(va=Cn.cd[Cn.index].ht),Cn.hovertemplate=va||Cn.trace.hovertemplate||!1}if(Cn.xa&&Cn.ya){var Pa=Cn.x0+Cn.xa._offset,ga=Cn.x1+Cn.xa._offset,la=Cn.y0+Cn.ya._offset,ba=Cn.y1+Cn.ya._offset,Ai=Math.min(Pa,ga),ki=Math.max(Pa,ga),Ki=Math.min(la,ba),En=Math.max(la,ba);Ir.bbox={x0:Ai+mr,x1:ki+mr,y0:Ki+Kt,y1:En+Kt},Ir.xPixel=(Pa+ga)/2,Ir.yPixel=(la+ba)/2}Cn.eventData=[Ir],gt.push(Ir)}j._hoverdata=gt;var Tn=Ve==="y"&&(Ye.length>1||Fe.length>1)||Ve==="closest"&&_a&&Fe.length>1,On=n.combine(Pe.plot_bgcolor||n.background,Pe.paper_bgcolor),kn=N(Fe,{gd:j,hovermode:Ve,rotateLabels:Tn,bgColor:On,container:Pe._hoverlayer,outerContainer:Pe._paper.node(),commonLabelOpts:Pe.hoverlabel,hoverdistance:Pe.hoverdistance}),ao=kn.hoverLabels;if(c.isUnifiedHover(Ve)||(L(ao,Tn,Pe,kn.commonLabelBoundingBox),W(ao,Tn,Pe._invScaleX,Pe._invScaleY)),we&&we.tagName){var Co=m.getComponentMethod("annotations","hasClickToShow")(j,gt);a(q.select(we),Co?"pointer":"")}var bo=ce(j,ee,Hr);if(!we||pe||!bo&&!Pe.hoveranywhere)return;Hr&&bo&&j.emit("plotly_unhover",{event:ee,points:Hr}),zs(j._hoverdata);function zs(Cn){j.emit("plotly_hover",{event:ee,points:Cn,xaxes:Vt,yaxes:Ar,xvals:Ae,yvals:Le})}}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=/([\s\S]*)<\/extra>/;function N(j,ee){var te=ee.gd,pe=te._fullLayout,we=ee.hovermode,Se=ee.rotateLabels,Re=ee.bgColor,Pe=ee.container,je=ee.outerContainer,at=ee.commonLabelOpts||{};if(j.length===0)return[[]];var nt=ee.fontFamily||T.HOVERFONT,tt=ee.fontSize||T.HOVERFONTSIZE,Ve=ee.fontWeight||pe.font.weight,he=ee.fontStyle||pe.font.style,se=ee.fontVariant||pe.font.variant,ne=ee.fontTextcase||pe.font.textcase,Ce=ee.fontLineposition||pe.font.lineposition,Ze=ee.fontShadow||pe.font.shadow,rt=j[0],Je=rt.xa,St=rt.ya,kt=we.charAt(0),Bt=kt+"Label",Vt=rt[Bt];if(Vt===void 0&&Je.type==="multicategory")for(var Ar=0;Arpe.width-gt&&(Kt=pe.width-gt),rn.attr("d","M"+(Rr-Kt)+",0L"+(Rr-Kt+d)+","+Hr+d+"H"+gt+"v"+Hr+(u*2+wr.height)+"H"+-gt+"V"+Hr+d+"H"+(Rr-Kt-d)+"Z"),Rr=Kt,Ke.minX=Rr-gt,Ke.maxX=Rr+gt,Je.side==="top"?(Ke.minY=Nr-(u*2+wr.height),Ke.maxY=Nr-u):(Ke.minY=Nr+u,Ke.maxY=Nr+(u*2+wr.height))}else{var mr,Ir,va;St.side==="right"?(mr="start",Ir=1,va="",Rr=Je._offset+Je._length):(mr="end",Ir=-1,va="-",Rr=Je._offset),Nr=St._offset+(rt.y0+rt.y1)/2,tn.attr("text-anchor",mr),rn.attr("d","M0,0L"+va+d+","+d+"V"+(u+wr.height/2)+"h"+va+(u*2+wr.width)+"V-"+(u+wr.height/2)+"H"+va+d+"V-"+d+"Z"),Ke.minY=Nr-(u+wr.height/2),Ke.maxY=Nr+(u+wr.height/2),St.side==="right"?(Ke.minX=Rr+d,Ke.maxX=Rr+d+(u*2+wr.width)):(Ke.minX=Rr-d-(u*2+wr.width),Ke.maxX=Rr-d);var Pa=wr.height/2,ga=qr-wr.top-Pa,la="clip"+pe._uid+"commonlabel"+St._id,ba;if(Rrrn.hoverinfo!=="none");if(Ia.length===0)return[];var st=pe.hoverlabel,ot=st.font,Ut=Ia[0],Ct=((we==="x unified"?Ut.xa:Ut.ya).unifiedhovertitle||{}).text,Pt=Ct?S.hovertemplateString({data:we==="x unified"?[{xa:Ut.xa,x:Ut.xVal}]:[{ya:Ut.ya,y:Ut.yVal}],fallback:Ut.trace.hovertemplatefallback,locale:pe._d3locale,template:Ct}):Vt,jt={showlegend:!0,legend:{title:{text:Pt,font:ot},font:ot,bgcolor:st.bgcolor,bordercolor:st.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:pe.legend?pe.legend.traceorder:void 0,orientation:"v"}},cr={font:ot};l(jt,cr,te._fullData);var or=cr.legend;or.entries=[];for(var nr=0;nr=0?Za=ra:ca+hi=0?Za=ca:Ba+hi=0?ri=Fr:ta+wi=0?ri=ta:$a+wi=0,(Ia.idealAlign==="top"||!Ki)&&En?(va-=ga/2,Ia.anchor="end"):Ki?(va+=ga/2,Ia.anchor="start"):Ia.anchor="middle",Ia.crossPos=va;else{if(Ia.pos=va,Ki=Ir+Pa/2+ki<=kr,En=Ir-Pa/2-ki>=0,(Ia.idealAlign==="left"||!Ki)&&En)Ir-=Pa/2,Ia.anchor="end";else if(Ki)Ir+=Pa/2,Ia.anchor="start";else{Ia.anchor="middle";var Tn=ki/2,On=Ir+Tn-kr,kn=Ir-Tn;On>0&&(Ir-=On),kn<0&&(Ir+=-kn)}Ia.crossPos=Ir}Nr.attr("text-anchor",Ia.anchor),gt&&Hr.attr("text-anchor",Ia.anchor),rn.attr("transform",e(Ir,va)+(Se?t(w):""))}),{hoverLabels:pi,commonLabelBoundingBox:Ke}}function O(j,ee,te,pe,we,Se){var Re,Pe,je="",at="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=S.templateString(j.name,j.trace._meta)),je=Y(j.name,j.nameLength));var nt=te.charAt(0),tt=nt==="x"?"y":"x";j.zLabel!==void 0?(j.xLabel!==void 0&&(at+="x: "+j.xLabel+"
"),j.yLabel!==void 0&&(at+="y: "+j.yLabel+"
"),j.trace.type!=="choropleth"&&j.trace.type!=="choroplethmapbox"&&j.trace.type!=="choroplethmap"&&(at+=(at?"z: ":"")+j.zLabel)):ee&&j[nt+"Label"]===we?at=j[tt+"Label"]||"":j.xLabel===void 0?j.yLabel!==void 0&&j.trace.type!=="scattercarpet"&&(at=j.yLabel):j.yLabel===void 0?at=j.xLabel:at="("+j.xLabel+", "+j.yLabel+")",(j.text||j.text===0)&&!Array.isArray(j.text)&&(at+=(at?"
":"")+j.text),j.extraText!==void 0&&(at+=(at?"
":"")+j.extraText),Se&&at===""&&!j.hovertemplate&&(je===""&&Se.remove(),at=je),(Pe=(Re=j.trace)==null?void 0:Re.hoverlabel)!=null&&Pe.split&&(j.hovertemplate="");let{hovertemplate:Ve=!1}=j;if(Ve){let he=j.hovertemplateLabels||j;j[nt+"Label"]!==we&&(he[nt+"other"]=he[nt+"Val"],he[nt+"otherLabel"]=he[nt+"Label"]),at=S.hovertemplateString({data:[j.eventData[0]||{},j.trace._meta],fallback:j.trace.hovertemplatefallback,labels:he,locale:pe._d3locale,template:Ve}),at=at.replace(F,(se,ne)=>(je=Y(ne,j.nameLength),""))}return[at,je]}function L(j,ee,te,pe){var we=ee?"xa":"ya",Se=ee?"ya":"xa",Re=0,Pe=1,je=j.size(),at=new Array(je),nt=0,tt=pe.minX,Ve=pe.maxX,he=pe.minY,se=pe.maxY,ne=function(Ae){return Ae*te._invScaleX},Ce=function(Ae){return Ae*te._invScaleY};j.each(function(Ae){var Le=Ae[we],We=Ae[Se],Ke=Le._id.charAt(0)==="x",st=Le.range;nt===0&&st&&st[0]>st[1]!==Ke&&(Pe=-1);var ot=0,Ut=Ke?te.width:te.height;if(te.hovermode==="x"||te.hovermode==="y"){var Ct=U(Ae,ee),Pt=Ae.anchor,jt=Pt==="end"?-1:1,cr,or;if(Pt==="middle")cr=Ae.crossPos+(Ke?Ce(Ct.y-Ae.by/2):ne(Ae.bx/2+Ae.tx2width/2)),or=cr+(Ke?Ce(Ae.by):ne(Ae.bx));else if(Ke)cr=Ae.crossPos+Ce(d+Ct.y)-Ce(Ae.by/2-d),or=cr+Ce(Ae.by);else{var nr=ne(jt*d+Ct.x),Pr=nr+ne(jt*Ae.bx);cr=Ae.crossPos+Math.min(nr,Pr),or=Ae.crossPos+Math.max(nr,Pr)}Ke?he!==void 0&&se!==void 0&&Math.min(or,se)-Math.max(cr,he)>1&&(We.side==="left"?(ot=We._mainLinePosition,Ut=te.width):Ut=We._mainLinePosition):tt!==void 0&&Ve!==void 0&&Math.min(or,Ve)-Math.max(cr,tt)>1&&(We.side==="top"?(ot=We._mainLinePosition,Ut=te.height):Ut=We._mainLinePosition)}at[nt++]=[{datum:Ae,traceIndex:Ae.trace.index,dp:0,pos:Ae.pos,posref:Ae.posref,size:Ae.by*(Ke?E:1)/2,pmin:ot,pmax:Ut}]}),at.sort(function(Ae,Le){return Ae[0].posref-Le[0].posref||Pe*(Le[0].traceIndex-Ae[0].traceIndex)});var Ze,rt,Je,St,kt,Bt,Vt;function Ar(Ae){var Le=Ae[0],We=Ae[Ae.length-1];if(rt=Le.pmin-Le.pos-Le.dp+Le.size,Je=We.pos+We.dp+We.size-Le.pmax,rt>.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp+=rt;Ze=!1}if(!(Je<.01)){if(rt<-.01){for(kt=Ae.length-1;kt>=0;kt--)Ae[kt].dp-=Je;Ze=!1}if(Ze){var Ke=0;for(St=0;StLe.pmax&&Ke++;for(St=Ae.length-1;St>=0&&!(Ke<=0);St--)Bt=Ae[St],Bt.pos>Le.pmax-1&&(Bt.del=!0,Ke--);for(St=0;St=0;kt--)Ae[kt].dp-=Je;for(St=Ae.length-1;St>=0&&!(Ke<=0);St--)Bt=Ae[St],Bt.pos+Bt.dp+Bt.size>Le.pmax&&(Bt.del=!0,Ke--)}}}for(;!Ze&&Re<=je;){for(Re++,Ze=!0,St=0;St.01){for(kt=qr.length-1;kt>=0;kt--)qr[kt].dp+=rt;for(vr.push.apply(vr,qr),at.splice(St+1,1),Vt=0,kt=vr.length-1;kt>=0;kt--)Vt+=vr[kt].dp;for(Je=Vt/vr.length,kt=vr.length-1;kt>=0;kt--)vr[kt].dp-=Je;Ze=!1}else St++}at.forEach(Ar)}for(St=at.length-1;St>=0;St--){var _t=at[St];for(kt=_t.length-1;kt>=0;kt--){var Fe=_t[kt],Ye=Fe.datum;Ye.offset=Fe.dp,Ye.del=Fe.del}}}function U(j,ee){var te=0,pe=j.offset;return ee&&(pe*=-b,te=j.offset*p),{x:te,y:pe}}function B(j){var ee={start:1,end:-1,middle:0}[j.anchor],te=ee*(d+u),pe=te+ee*(j.txwidth+u),we=j.anchor==="middle";return we&&(te-=j.tx2width/2,pe+=j.txwidth/2+u),{alignShift:ee,textShiftX:te,text2ShiftX:pe}}function W(j,ee,te,pe){var we=function(Re){return Re*te},Se=function(Re){return Re*pe};j.each(function(Re){var Pe=q.select(this);if(Re.del)return Pe.remove();var je=Pe.select("text.nums"),at=Re.anchor,nt=at==="end"?-1:1,tt=B(Re),Ve=U(Re,ee),he=Ve.x,se=Ve.y,ne=at==="middle",Ce="hoverlabel"in Re.trace?Re.trace.hoverlabel.showarrow:!0,Ze;ne?Ze="M-"+we(Re.bx/2+Re.tx2width/2)+","+Se(se-Re.by/2)+"h"+we(Re.bx)+"v"+Se(Re.by)+"h-"+we(Re.bx)+"Z":Ce?Ze="M0,0L"+we(nt*d+he)+","+Se(d+se)+"v"+Se(Re.by/2-d)+"h"+we(nt*Re.bx)+"v-"+Se(Re.by)+"H"+we(nt*d+he)+"V"+Se(se-d)+"Z":Ze="M"+we(nt*d+he)+","+Se(se-Re.by/2)+"h"+we(nt*Re.bx)+"v"+Se(Re.by)+"h"+we(-nt*Re.bx)+"Z",Pe.select("path").attr("d",Ze);var rt=he+tt.textShiftX,Je=se+Re.ty0-Re.by/2+u,St=Re.textAlign||"auto";St!=="auto"&&(St==="left"&&at!=="start"?(je.attr("text-anchor","start"),rt=ne?-Re.bx/2-Re.tx2width/2+u:-Re.bx-u):St==="right"&&at!=="end"&&(je.attr("text-anchor","end"),rt=ne?Re.bx/2-Re.tx2width/2-u:Re.bx+u)),je.call(o.positionText,we(rt),Se(Je)),Re.tx2width&&(Pe.select("text.name").call(o.positionText,we(tt.text2ShiftX+tt.alignShift*u+he),Se(se+Re.ty0-Re.by/2+u)),Pe.select("rect").call(i.setRect,we(tt.text2ShiftX+(tt.alignShift-1)*Re.tx2width/2+he),Se(se-Re.by/2-1),we(Re.tx2width),Se(Re.by+2)))})}function $(j,ee){var te=j.index,pe=j.trace||{},we=j.cd[0],Se=j.cd[te]||{};function Re(Ve){return Ve||v(Ve)&&Ve===0}var Pe=Array.isArray(te)?function(Ve,he){var se=S.castOption(we,te,Ve);return Re(se)?se:S.extractOption({},pe,"",he)}:function(Ve,he){return S.extractOption(Se,pe,Ve,he)};function je(Ve,he,se){var ne=Pe(he,se);Re(ne)&&(j[Ve]=ne)}if(je("hoverinfo","hi","hoverinfo"),je("bgcolor","hbg","hoverlabel.bgcolor"),je("borderColor","hbc","hoverlabel.bordercolor"),je("fontFamily","htf","hoverlabel.font.family"),je("fontSize","hts","hoverlabel.font.size"),je("fontColor","htc","hoverlabel.font.color"),je("fontWeight","htw","hoverlabel.font.weight"),je("fontStyle","hty","hoverlabel.font.style"),je("fontVariant","htv","hoverlabel.font.variant"),je("nameLength","hnl","hoverlabel.namelength"),je("textAlign","hta","hoverlabel.align"),j.posref=ee==="y"||ee==="closest"&&pe.orientation==="h"?j.xa._offset+(j.x0+j.x1)/2:j.ya._offset+(j.y0+j.y1)/2,j.x0=S.constrain(j.x0,0,j.xa._length),j.x1=S.constrain(j.x1,0,j.xa._length),j.y0=S.constrain(j.y0,0,j.ya._length),j.y1=S.constrain(j.y1,0,j.ya._length),j.xLabelVal!==void 0&&(j.xLabel="xLabel"in j?j.xLabel:h.hoverLabelText(j.xa,j.xLabelVal,pe.xhoverformat),j.xVal=j.xa.c2d(j.xLabelVal)),j.yLabelVal!==void 0&&(j.yLabel="yLabel"in j?j.yLabel:h.hoverLabelText(j.ya,j.yLabelVal,pe.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 at=h.tickText(j.xa,j.xa.c2l(j.xerr),"hover").text;j.xerrneg!==void 0?j.xLabel+=" +"+at+" / -"+h.tickText(j.xa,j.xa.c2l(j.xerrneg),"hover").text:j.xLabel+=" \xB1 "+at,ee==="x"&&(j.distance+=1)}if(!isNaN(j.yerr)&&!(j.ya.type==="log"&&j.yerr<=0)){var nt=h.tickText(j.ya,j.ya.c2l(j.yerr),"hover").text;j.yerrneg!==void 0?j.yLabel+=" +"+nt+" / -"+h.tickText(j.ya,j.ya.c2l(j.yerrneg),"hover").text:j.yLabel+=" \xB1 "+nt,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,te){var pe=te.container,we=te.fullLayout,Se=we._size,Re=te.event,Pe=!!ee.hLinePoint,je=!!ee.vLinePoint,at,nt;if(pe.selectAll(".spikeline").remove(),!!(je||Pe)){var tt=n.combine(we.plot_bgcolor,we.paper_bgcolor);if(Pe){var Ve=ee.hLinePoint,he,se;at=Ve&&Ve.xa,nt=Ve&&Ve.ya;var ne=nt.spikesnap;ne==="cursor"?(he=Re.pointerX,se=Re.pointerY):(he=at._offset+Ve.x,se=nt._offset+Ve.y);var Ce=_.readability(Ve.color,tt)<1.5?n.contrast(tt):Ve.color,Ze=nt.spikemode,rt=nt.spikethickness,Je=nt.spikecolor||Ce,St=h.getPxPosition(j,nt),kt,Bt;if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(kt=St,Bt=he),Ze.indexOf("across")!==-1){var Vt=nt._counterDomainMin,Ar=nt._counterDomainMax;nt.anchor==="free"&&(Vt=Math.min(Vt,nt.position),Ar=Math.max(Ar,nt.position)),kt=Se.l+Vt*Se.w,Bt=Se.l+Ar*Se.w}pe.insert("line",":first-child").attr({x1:kt,x2:Bt,y1:se,y2:se,"stroke-width":rt,stroke:Je,"stroke-dasharray":i.dashStyle(nt.spikedash,rt)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:kt,x2:Bt,y1:se,y2:se,"stroke-width":rt+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:St+(nt.side!=="right"?rt:-rt),cy:se,r:rt,fill:Je}).classed("spikeline",!0)}if(je){var vr=ee.vLinePoint,qr,kr;at=vr&&vr.xa,nt=vr&&vr.ya;var Ur=at.spikesnap;Ur==="cursor"?(qr=Re.pointerX,kr=Re.pointerY):(qr=at._offset+vr.x,kr=nt._offset+vr.y);var _t=_.readability(vr.color,tt)<1.5?n.contrast(tt):vr.color,Fe=at.spikemode,Ye=at.spikethickness,Ae=at.spikecolor||_t,Le=h.getPxPosition(j,at),We,Ke;if(Fe.indexOf("toaxis")!==-1||Fe.indexOf("across")!==-1){if(Fe.indexOf("toaxis")!==-1&&(We=Le,Ke=kr),Fe.indexOf("across")!==-1){var st=at._counterDomainMin,ot=at._counterDomainMax;at.anchor==="free"&&(st=Math.min(st,at.position),ot=Math.max(ot,at.position)),We=Se.t+(1-ot)*Se.h,Ke=Se.t+(1-st)*Se.h}pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:We,y2:Ke,"stroke-width":Ye,stroke:Ae,"stroke-dasharray":i.dashStyle(at.spikedash,Ye)}).classed("spikeline",!0).classed("crisp",!0),pe.insert("line",":first-child").attr({x1:qr,x2:qr,y1:We,y2:Ke,"stroke-width":Ye+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Fe.indexOf("marker")!==-1&&pe.insert("circle",":first-child").attr({cx:qr,cy:Le-(at.side!=="top"?Ye:-Ye),r:Ye,fill:Ae}).classed("spikeline",!0)}}}function ce(j,ee,te){if(!te||te.length!==j._hoverdata.length)return!0;for(var pe=te.length-1;pe>=0;pe--){var we=te[pe],Se=j._hoverdata[pe];if(we.curveNumber!==Se.curveNumber||String(we.pointNumber)!==String(Se.pointNumber)||String(we.pointNumbers)!==String(Se.pointNumbers)||we.binNumber!==Se.binNumber)return!0}return!1}function de(j,ee){return!ee||ee.vLinePoint!==j._spikepoints.vLinePoint||ee.hLinePoint!==j._spikepoints.hLinePoint}function Y(j,ee){return o.plainText(j||"",{len:ee,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function X(j,ee){for(var te=ee.charAt(0),pe=[],we=[],Se=[],Re=0;Rej.offsetTop+j.clientTop,le=j=>j.offsetLeft+j.clientLeft;function ae(j,ee){var te=j._fullLayout,pe=ee.getBoundingClientRect(),we=pe.left,Se=pe.top,Re=we+pe.width,Pe=Se+pe.height,je=S.apply3DTransform(te._invTransform)(we,Se),at=S.apply3DTransform(te._invTransform)(Re,Pe),nt=je[0],tt=je[1],Ve=at[0],he=at[1];return{x:nt,y:tt,width:Ve-nt,height:he-tt,top:Math.min(tt,he),left:Math.min(nt,Ve),right:Math.max(nt,Ve),bottom:Math.max(tt,he)}}}}),k_=He({"src/components/fx/hoverlabel_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=$p().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&&S(t.hovermode)&&(o.font||(o.font={}),i("size"),i("family"),i("color"),i("weight"),i("style"),i("variant"),a?(o.bgcolor||(o.bgcolor=_.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),v.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),mz=He({"src/components/fx/layout_global_defaults.js"(Z,q){"use strict";var v=sa(),_=k_(),S=Ym();q.exports=function(e,t){function r(o,a){return v.coerce(e,t,S,o,a)}_(e,t,r)}}}),gz=He({"src/components/fx/defaults.js"(Z,q){"use strict";var v=sa(),_=Ky(),S=k_();q.exports=function(e,t,r,o){function a(n,s){return v.coerce(e,t,_,n,s)}var i=v.extendFlat({},o.hoverlabel);t.hovertemplate&&(i.namelength=-1),S(e,t,a,i)}}}),x5=He({"src/components/fx/hovermode_defaults.js"(Z,q){"use strict";var v=sa(),_=Ym();q.exports=function(M,e){function t(r,o){return e[r]!==void 0?e[r]:v.coerce(M,e,_,r,o)}return t("clickmode"),t("hoversubplots"),t("hoveranywhere"),t("clickanywhere"),t("hovermode")}}}),yz=He({"src/components/fx/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=Ym(),S=x5(),M=k_();q.exports=function(t,r){function o(m,c){return v.coerce(t,r,_,m,c)}var a=S(t,r);a&&(o("hoverdistance"),o("spikedistance"),a.indexOf("unified")!==-1&&o("hoversort"));var i=o("dragmode");i==="select"&&o("selectdirection");var n=r._has("mapbox"),s=r._has("map"),h=r._has("geo"),f=r._basePlotModules.length;r.dragmode==="zoom"&&((n||s||h)&&f===1||(n||s)&&h&&f===2)&&(r.dragmode="pan"),M(t,r,o),v.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),_z=He({"src/components/fx/calc.js"(Z,q){"use strict";var v=sa(),_=so();q.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(h){return function(f){return v.coerceHoverinfo({hoverinfo:f},{_module:h._module},r)}}for(var a=0;a"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),T2=He({"src/components/shapes/draw_newshape/constants.js"(Z,q){"use strict";var v=32;q.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),A2=He({"src/components/selections/helpers.js"(Z,q){"use strict";var v=sa().strTranslate;function _(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 S(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 _(t,o[r])}}function e(t){return v(t.xaxis._offset,t.yaxis._offset)}q.exports={p2r:_,r2p:S,axValue:M,getTransform:e}}}),a0=He({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var q=M_(),v=T2(),_=v.CIRCLE_SIDES,S=v.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 h="",f=0;f0&&x{let s=n.charAt(0),h=a[s].drawn!==void 0;return i+(h?1:0)},0)},Z.getDataToPixel=function(e,t,r,o,a){var i=e._fullLayout._size,n;if(t)if(a==="domain")n=function(h){return t._length*(o?1-h:h)+t._offset};else{var s=Z.shapePositionToRange(t);n=function(h){var f=M(t,r);return t._offset+t.r2p(s(h,!0))+f},t.type==="date"&&(n=Z.decodeDate(n))}else o?n=function(h){return i.t+i.h*(1-h)}:n=function(h){return i.l+i.w*h};return n},Z.getPixelToData=function(e,t,r,o){var a=e._fullLayout._size,i;if(t)if(o==="domain")i=function(s){var h=(s-t._offset)/t._length;return r?1-h:h};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){let r=t.type,o=_.getRefType(t.xref),a=_.getRefType(t.yref),i=e._fullLayout._size;var n,s,h,f,m,c,T,l,x,w,A,E;function p(z,F,N,O){var L;if(z)if(F==="domain")O?L=function(U){return z._offset+z._length*(1-U)}:L=function(U){return z._offset+z._length*U};else{let U=Z.shapePositionToRange(z);L=function(B){return z._offset+z.r2p(U(B,!0))},N==="path"&&z.type==="date"&&(L=Z.decodeDate(L))}else O?L=function(U){return i.t+i.h*(1-U)}:L=function(U){return i.l+i.w*U};return L}if(o==="array"?(T=[],n=t.xref.map(function(z){return _.getFromId(e,z)}),T=t.xref.map(function(z,F){return p(n[F],_.getRefType(z),r,!1)})):(n=_.getFromId(e,t.xref),T=p(n,o,r,!1)),a==="array"?(l=[],s=t.yref.map(function(z){return _.getFromId(e,z)}),l=t.yref.map(function(z,F){return p(s[F],_.getRefType(z),r,!0)})):(s=_.getFromId(e,t.yref),l=p(s,a,r,!0)),r==="path")return S(t,T,l);if(o==="array")h=M(n[0],t.x0shift),f=M(n[1],t.x1shift),x=T[0](t.x0)+h,w=T[1](t.x1)+f;else if(h=M(n,t.x0shift),f=M(n,t.x1shift),t.xsizemode==="pixel"){let z=T(t.xanchor);x=z+t.x0+h,w=z+t.x1+f}else x=T(t.x0)+h,w=T(t.x1)+f;if(a==="array")m=M(s[0],t.y0shift),c=M(s[1],t.y1shift),A=l[0](t.y0)+m,E=l[1](t.y1)+c;else if(m=M(s,t.y0shift),c=M(s,t.y1shift),t.ysizemode==="pixel"){let z=l(t.yanchor);A=z-t.y0+m,E=z-t.y1+c}else A=l(t.y0)+m,E=l(t.y1)+c;if(r==="line")return"M"+x+","+A+"L"+w+","+E;if(r==="rect")return"M"+x+","+A+"H"+w+"V"+E+"H"+x+"Z";var b=(x+w)/2,d=(A+E)/2,u=Math.abs(b-x),g=Math.abs(d-A),y="A"+u+","+g,D=b+u+","+d,P=b+","+(d-g);return"M"+D+y+" 0 1,1 "+P+y+" 0 0,1 "+D+"Z"};function S(e,t,r){let o=e.path,a=e.xsizemode,i=e.ysizemode,n=e.xanchor,s=e.yanchor,h=Array.isArray(e.xref),f=Array.isArray(e.yref);var m=0,c=0;return o.replace(q.segmentRE,function(T){var l=0,x=T.charAt(0),w=q.paramIsX[x],A=q.paramIsY[x],E=q.numParams[x];let p=w.drawn!==void 0,b=A.drawn!==void 0,d=h?t[m]:t,u=f?r[c]:r;var g=T.slice(1).replace(q.paramRE,function(y){return w[l]?a==="pixel"?y=d(n)+Number(y):y=d(y):A[l]&&(i==="pixel"?y=u(s)-Number(y):y=u(y)),l++,l>E&&(y="X"),y});return l>E&&(g=g.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+T)),p&&m++,b&&c++,x+g})}Z.getPixelShift=M;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}}}),w5=He({"src/components/shapes/display_labels.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=su(),M=as(),e=a0().readPaths,t=i0(),r=t.getPathString,o=v2(),a=uh().FROM_TL;q.exports=function(h,f,m,c){if(c.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var T;if(m.label.texttemplate){var l={};if(m.type!=="path"){var x=_.getFromId(h,m.xref),w=_.getFromId(h,m.yref);let j=Array.isArray(m.xref),ee=Array.isArray(m.yref);for(var A in o){var E=typeof o[A]=="function",p=!j||o.simpleXVariables.includes(A),b=!ee||o.simpleYVariables.includes(A);if(E&&p&&b){var d=o[A](m,x,w);d!==void 0&&(l[A]=d)}}}T=v.texttemplateStringForShapes({data:[l],fallback:m.label.texttemplatefallback,locale:h._fullLayout._d3locale,template:m.label.texttemplate})}else T=m.label.text;var u={"data-index":f},g=m.label.font,y={"data-notex":1},D=c.append("g").attr(u).classed("shape-label",!0),P=D.append("text").attr(y).classed("shape-label-text",!0).text(T),z,F,N,O;if(m.path){var L=r(h,m),U=e(L,h);z=1/0,N=1/0,F=-1/0,O=-1/0;for(var B=0;Bt.getDataToPixel(h,se,he,!1,ne)(Ve),tt=(Ve,he,se,ne)=>t.getDataToPixel(h,se,he,!0,ne)(Ve);if(m.xsizemode==="pixel"){let Ve=nt(m.xanchor,void 0,te,Re),he=t.getPixelShift(te,m.x0shift),se=t.getPixelShift(te,m.x1shift);z=Ve+m.x0+he,F=Ve+m.x1+se}else z=nt(m.x0,m.x0shift,te,Re),F=nt(m.x1,m.x1shift,pe,Pe);if(m.ysizemode==="pixel"){let Ve=tt(m.yanchor,void 0,we,je),he=t.getPixelShift(we,m.y0shift),se=t.getPixelShift(we,m.y1shift);N=Ve-m.y0+he,O=Ve-m.y1+se}else N=tt(m.y0,m.y0shift,we,je),O=tt(m.y1,m.y1shift,Se,at)}var Y=m.label.textangle;Y==="auto"&&(m.type==="line"?Y=i(z,N,F,O):Y=0),P.call(function(j){return j.call(M.font,g).attr({}),S.convertToTspans(j,h),j});var X=M.bBox(P.node()),Q=n(z,N,F,O,m,Y,X),V=Q.textx,le=Q.texty,ae=Q.xanchor;P.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ae],y:le,x:V,transform:"rotate("+Y+","+V+","+le+")"}).call(S.positionText,V,le)}};function i(s,h,f,m){var c,T;return T=Math.abs(f-s),f>=s?c=h-m:c=m-h,-180/Math.PI*Math.atan2(c,T)}function n(s,h,f,m,c,T,l){var x=c.label.textposition,w=c.label.textangle,A=c.label.padding,E=c.type,p=Math.PI/180*T,b=Math.sin(p),d=Math.cos(p),u=c.label.xanchor,g=c.label.yanchor,y,D,P,z;if(E==="line"){x==="start"?(y=s,D=h):x==="end"?(y=f,D=m):(y=(s+f)/2,D=(h+m)/2),u==="auto"&&(x==="start"?w==="auto"?f>s?u="left":fs?u="right":fs?u="right":fs?u="left":f1&&!(tt.length===2&&tt[1][0]==="Z")&&(Y===0&&(tt[0][0]="M"),y[de]=tt,N(),O())}}function pe(tt,Ve){if(tt===2){de=+Ve.srcElement.getAttribute("data-i"),Y=+Ve.srcElement.getAttribute("data-j");var he=y[de];!T(he)&&!l(he)&&te()}}function we(tt){ue=[];for(var Ve=0;Ve{if(!P._dragging&&P._fullLayout.hoveranywhere){let U=O(L);U&&h.hover(P,U,F.id)}}),N.addEventListener("click",L=>{if(!P._dragged&&P._fullLayout.clickanywhere){let U=O(L);U&&h.click(P,U,F.id)}})}function p(P,z,F){let N=F.xref,O=F.yref;if(Array.isArray(N)||Array.isArray(O)){let L="clip"+z._fullLayout._uid+"shape"+F._index,U=b(z,N,O);S.ensureSingleById(z._fullLayout._clips,"clipPath",L,function(B){B.append("rect")}).select("rect").attr(U),i.setClipUrl(P,L,z)}else{let L=(N+O).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");i.setClipUrl(P,L?"clip"+z._fullLayout._uid+L:null,z)}}function b(P,z,F){let N=P._fullLayout._size;function O(B,W){let $=(Array.isArray(B)?B:[B]).map(de=>M.getFromId(P,de)).filter(Boolean);if(!$.length)return W?[N.t,N.t+N.h]:[N.l,N.l+N.w];let ue=$.map(function(de){return de._offset}),ce=$.map(function(de){return de._offset+de._length});return[Math.min(...ue),Math.max(...ce)]}let L=O(z,!1),U=O(F,!0);return{x:L[0],y:U[0],width:L[1]-L[0],height:U[1]-U[0]}}function d(P,z,F,N,O,L){var U=10,B=10,W=F.xsizemode==="pixel",$=F.ysizemode==="pixel",ue=F.type==="line",ce=F.type==="path",de=L.modifyItem,Y,X,Q,V,le,ae,j,ee,te,pe,we,Se,Re,Pe,je,at=v.select(z.node().parentNode),nt=M.getFromId(P,F.xref),tt=M.getRefType(F.xref),Ve=M.getFromId(P,F.yref),he=M.getRefType(F.yref),se=F.x0shift,ne=F.x1shift,Ce=F.y0shift,Ze=F.y1shift,rt=function(st,ot){var Ut=c.getDataToPixel(P,nt,ot,!1,tt);return Ut(st)},Je=function(st,ot){var Ut=c.getDataToPixel(P,Ve,ot,!0,he);return Ut(st)},St=c.getPixelToData(P,nt,!1,tt),kt=c.getPixelToData(P,Ve,!0,he),Bt=vr(),Vt={element:Bt.node(),gd:P,prepFn:Ur,doneFn:_t,clickFn:Fe},Ar;s.init(Vt),Bt.node().onmousemove=kr;function vr(){return ue?qr():z}function qr(){var st=10,ot=Math.max(F.line.width,st),Ut=O.append("g").attr("data-index",N).attr("drag-helper",!0);Ut.append("path").attr("d",z.attr("d")).style({cursor:"move","stroke-width":ot,"stroke-opacity":"0"});var Ct={"fill-opacity":"0"},Pt=Math.max(ot/2,st);return Ut.append("circle").attr({"data-line-point":"start-point",cx:W?rt(F.xanchor)+F.x0:rt(F.x0,se),cy:$?Je(F.yanchor)-F.y0:Je(F.y0,Ce),r:Pt}).style(Ct).classed("cursor-grab",!0),Ut.append("circle").attr({"data-line-point":"end-point",cx:W?rt(F.xanchor)+F.x1:rt(F.x1,ne),cy:$?Je(F.yanchor)-F.y1:Je(F.y1,Ze),r:Pt}).style(Ct).classed("cursor-grab",!0),Ut}function kr(st){if(x(P)){Ar=null;return}if(ue)st.target.tagName==="path"?Ar="move":Ar=st.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ot=Vt.element.getBoundingClientRect(),Ut=ot.right-ot.left,Ct=ot.bottom-ot.top,Pt=st.clientX-ot.left,jt=st.clientY-ot.top,cr=!ce&&Ut>U&&Ct>B&&!st.shiftKey?s.getCursor(Pt/Ut,1-jt/Ct):"move";f(z,cr),Ar=cr.split("-")[0]}}function Ur(st){x(P)||(W&&(le=rt(F.xanchor)),$&&(ae=Je(F.yanchor)),F.type==="path"?je=F.path:(Y=W?F.x0:rt(F.x0),X=$?F.y0:Je(F.y0),Q=W?F.x1:rt(F.x1),V=$?F.y1:Je(F.y1)),YV?(j=X,we="y0",ee=V,Se="y1"):(j=V,we="y1",ee=X,Se="y0"),kr(st),Le(O,F),Ke(z,F,P),Vt.moveFn=Ar==="move"?Ye:Ae,Vt.altKey=st.altKey)}function _t(){x(P)||(f(z),We(O),p(z,P,F),_.call("_guiRelayout",P,L.getUpdateObj()))}function Fe(){x(P)||We(O)}function Ye(st,ot){if(F.type==="path"){var Ut=function(jt){return jt},Ct=Ut,Pt=Ut;W?de("xanchor",F.xanchor=St(le+st)):(Ct=function(cr){return St(rt(cr)+st)},nt&&nt.type==="date"&&(Ct=c.encodeDate(Ct))),$?de("yanchor",F.yanchor=kt(ae+ot)):(Pt=function(cr){return kt(Je(cr)+ot)},Ve&&Ve.type==="date"&&(Pt=c.encodeDate(Pt))),de("path",F.path=u(je,Ct,Pt))}else W?de("xanchor",F.xanchor=St(le+st)):(de("x0",F.x0=St(Y+st)),de("x1",F.x1=St(Q+st))),$?de("yanchor",F.yanchor=kt(ae+ot)):(de("y0",F.y0=kt(X+ot)),de("y1",F.y1=kt(V+ot)));z.attr("d",T(P,F)),Le(O,F),r(P,N,F,at)}function Ae(st,ot){if(ce){var Ut=function(Yt){return Yt},Ct=Ut,Pt=Ut;W?de("xanchor",F.xanchor=St(le+st)):(Ct=function(Rt){return St(rt(Rt)+st)},nt&&nt.type==="date"&&(Ct=c.encodeDate(Ct))),$?de("yanchor",F.yanchor=kt(ae+ot)):(Pt=function(Rt){return kt(Je(Rt)+ot)},Ve&&Ve.type==="date"&&(Pt=c.encodeDate(Pt))),de("path",F.path=u(je,Ct,Pt))}else if(ue){if(Ar==="resize-over-start-point"){var jt=Y+st,cr=$?X-ot:X+ot;de("x0",F.x0=W?jt:St(jt)),de("y0",F.y0=$?cr:kt(cr))}else if(Ar==="resize-over-end-point"){var or=Q+st,nr=$?V-ot:V+ot;de("x1",F.x1=W?or:St(or)),de("y1",F.y1=$?nr:kt(nr))}}else{var Pr=function(Yt){return Ar.indexOf(Yt)!==-1},_a=Pr("n"),Fa=Pr("s"),Ra=Pr("w"),qa=Pr("e"),Wa=_a?j+ot:j,Ca=Fa?ee+ot:ee,hi=Ra?te+st:te,wi=qa?pe+st:pe;$&&(_a&&(Wa=j-ot),Fa&&(Ca=ee-ot)),(!$&&Ca-Wa>B||$&&Wa-Ca>B)&&(de(we,F[we]=$?Wa:kt(Wa)),de(Se,F[Se]=$?Ca:kt(Ca))),wi-hi>U&&(de(Re,F[Re]=W?hi:St(hi)),de(Pe,F[Pe]=W?wi:St(wi)))}z.attr("d",T(P,F)),Le(O,F),r(P,N,F,at)}function Le(st,ot){(W||$)&&Ut();function Ut(){var Ct=ot.type!=="path",Pt=st.selectAll(".visual-cue").data([0]),jt=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":jt}).classed("visual-cue",!0);var cr=rt(W?ot.xanchor:S.midRange(Ct?[ot.x0,ot.x1]:c.extractPathCoords(ot.path,m.paramIsX))),or=Je($?ot.yanchor:S.midRange(Ct?[ot.y0,ot.y1]:c.extractPathCoords(ot.path,m.paramIsY)));if(cr=c.roundPositionForSharpStrokeRendering(cr,jt),or=c.roundPositionForSharpStrokeRendering(or,jt),W&&$){var nr="M"+(cr-1-jt)+","+(or-1-jt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",nr)}else if(W){var Pr="M"+(cr-1-jt)+","+(or-9-jt)+"v18 h2 v-18 Z";Pt.attr("d",Pr)}else{var _a="M"+(cr-9-jt)+","+(or-1-jt)+"h18 v2 h-18 Z";Pt.attr("d",_a)}}}function We(st){st.selectAll(".visual-cue").remove()}function Ke(st,ot,Ut){var Ct=ot.xref,Pt=ot.yref,jt=M.getFromId(Ut,Ct),cr=M.getFromId(Ut,Pt),or="";Ct!=="paper"&&!jt.autorange&&(or+=Ct),Pt!=="paper"&&!cr.autorange&&(or+=Pt),i.setClipUrl(st,or?"clip"+Ut._fullLayout._uid+or:null,Ut)}}function u(P,z,F){return P.replace(m.segmentRE,function(N){var O=0,L=N.charAt(0),U=m.paramIsX[L],B=m.paramIsY[L],W=m.numParams[L],$=N.slice(1).replace(m.paramRE,function(ue){return O>=W||(U[O]?ue=z(ue):B[O]&&(ue=F(ue)),O++),ue});return L+$})}function g(P,z){if(w(P)){var F=z.node(),N=+F.getAttribute("data-index");if(N>=0){if(N===P._fullLayout._activeShapeIndex){y(P);return}P._fullLayout._activeShapeIndex=N,P._fullLayout._deactivateShape=y,l(P)}}}function y(P){if(w(P)){var z=P._fullLayout._activeShapeIndex;z>=0&&(o(P),delete P._fullLayout._activeShapeIndex,l(P))}}function D(P){if(w(P)){o(P);var z=P._fullLayout._activeShapeIndex,F=(P.layout||{}).shapes||[];if(z1?(ce=["toggleHover"],de=["resetViews"]):u?(ue=["zoomInGeo","zoomOutGeo"],ce=["hoverClosestGeo"],de=["resetGeo"]):d?(ce=["hoverClosest3d"],de=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(ue=["zoomInMapbox","zoomOutMapbox"],ce=["toggleHover"],de=["resetViewMapbox"]):z?(ue=["zoomInMap","zoomOutMap"],ce=["toggleHover"],de=["resetViewMap"]):g?ce=["hoverClosestPie"]:O?(ce=["hoverClosestCartesian","hoverCompareCartesian"],de=["resetViewSankey"]):ce=["toggleHover"],b&&ce.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||U)&&(ce=[]),b&&!L&&(ue=["zoomIn2d","zoomOut2d","autoScale2d"],de[0]!=="resetViews"&&(de=["resetScale2d"])),d?Y=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!L||D?Y=["zoom2d","pan2d"]:P||z||u?Y=["pan2d"]:F&&(Y=["zoom2d"]),n(T)&&Y.push("select2d","lasso2d");var X=[],Q=function(j){X.indexOf(j)===-1&&ce.indexOf(j)!==-1&&X.push(j)};if(Array.isArray(E)){for(var V=[],le=0;lew?T.slice(w):l.slice(x))+A}function h(m,c){for(var T=c._size,l=T.h/T.w,x={},w=Object.keys(m),A=0;At*D&&!N)){for(w=0;wY&&tece&&(ce=te);var we=(ce-ue)/(2*de);u/=we,ue=p.l2r(ue),ce=p.l2r(ce),p.range=p._input.range=B=O[1]||W[1]<=O[0])&&$[0]L[0])return!0}return!1}function A(O){var L=O._fullLayout,U=L._size,B=U.p,W=i.list(O,"",!0),$,ue,ce,de,Y,X;if(L._paperdiv.style({width:O._context.responsive&&L.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":L.width+"px",height:O._context.responsive&&L.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":L.height+"px"}).selectAll(".main-svg").call(r.setSize,L.width,L.height),O._context.setBackground(O,L.paper_bgcolor),Z.drawMainTitle(O),a.manage(O),!L._has("cartesian"))return _.previousPromises(O);function Q(Ae,Le,We){var Ke=Ae._lw/2;if(Ae._id.charAt(0)==="x"){if(Le){if(We==="top")return Le._offset-B-Ke}else return U.t+U.h*(1-(Ae.position||0))+Ke%1;return Le._offset+Le._length+B+Ke}if(Le){if(We==="right")return Le._offset+Le._length+B+Ke}else return U.l+U.w*(Ae.position||0)+Ke%1;return Le._offset-B-Ke}for($=0;$0){y(O,$,Y,de),ce.attr({x:ue,y:$,"text-anchor":B,dy:z(L.yanchor)}).call(M.positionText,ue,$);var X=(L.text.match(M.BR_TAG_ALL)||[]).length;if(X){var Q=n.LINE_SPACING*X+n.MID_SHIFT;L.y===0&&(Q=-Q),ce.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-Q+"em";this.setAttribute("dy",ee)})}var V=q.select(O).selectAll(".gtitle-subtitle");if(V.node()){var le=ce.node().getBBox(),ae=le.y+le.height,j=ae+o.SUBTITLE_PADDING_EM*L.subtitle.font.size;V.attr({x:ue,y:j,"text-anchor":B,dy:z(L.yanchor)}).call(M.positionText,ue,j)}}}};function d(O,L,U,B,W){var $=L.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,ue=S.isTopAnchor(L)?B:B-W,ce=U==="b"?$-ue:ue;return S.isTopAnchor(L)&&U==="t"||S.isBottomAnchor(L)&&U==="b"?!1:ce.5?"t":"b",ue=O._fullLayout.margin[$],ce=0;return L.yref==="paper"?ce=U+L.pad.t+L.pad.b:L.yref==="container"&&(ce=u($,B,W,O._fullLayout.height,U)+L.pad.t+L.pad.b),ce>ue?ce:0}function y(O,L,U,B){var W="title.automargin",$=O._fullLayout.title,ue=$.y>.5?"t":"b",ce={x:$.x,y:$.y,t:0,b:0},de={};$.yref==="paper"&&d(O,$,ue,L,B)?ce[ue]=U:$.yref==="container"&&(de[ue]=U,O._fullLayout._reservedMargin[W]=de),_.allowAutoMargin(O,W),_.autoMargin(O,W,ce)}function D(O,L){var U=O.title,B=O._size,W=0;switch(L===c?W=U.pad.l:L===l&&(W=-U.pad.r),U.xref){case"paper":return B.l+B.w*U.x+W;case"container":default:return O.width*U.x+W}}function P(O,L){var U=O.title,B=O._size,W=0;if(L==="0em"||!L?W=-U.pad.b:L===n.CAP_SHIFT+"em"&&(W=U.pad.t),U.y==="auto")return B.t/2;switch(U.yref){case"paper":return B.t+B.h-B.h*U.y+W;case"container":default:return O.height-O.height*U.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 L=O.title,U=T;return S.isRightAnchor(L)?U=l:S.isLeftAnchor(L)&&(U=c),U}function N(O){var L=O.title,U="0em";return S.isTopAnchor(L)?U=n.CAP_SHIFT+"em":S.isMiddleAnchor(L)&&(U=n.MID_SHIFT+"em"),U}Z.doTraceStyle=function(O){var L=O.calcdata,U=[],B;for(B=0;B=0;F--){var N=E.append("path").attr(b).style("opacity",F?.1:d).call(M.stroke,g).call(M.fill,u).call(e.dashLine,F?"solid":D,F?4+y:y);if(s(N,c,x),P){var O=t(c.layout,"selections",x);N.style({cursor:"move"});var L={element:N.node(),plotinfo:w,gd:c,editHelpers:O,isActiveSelection:!0},U=v(p,c);_(U,N,L)}else N.style("pointer-events",F?"all":"none");z[F]=N}var B=z[0],W=z[1];W.node().addEventListener("click",function(){return h(c,B)})}}function s(c,T,l){var x=l.xref+l.yref;e.setClipUrl(c,"clip"+T._fullLayout._uid+x,T)}function h(c,T){if(i(c)){var l=T.node(),x=+l.getAttribute("data-index");if(x>=0){if(x===c._fullLayout._activeSelectionIndex){m(c);return}c._fullLayout._activeSelectionIndex=x,c._fullLayout._deactivateSelection=m,a(c)}}}function f(c){if(i(c)){var T=c._fullLayout.selections.length-1;c._fullLayout._activeSelectionIndex=T,c._fullLayout._deactivateSelection=m,a(c)}}function m(c){if(i(c)){var T=c._fullLayout._activeSelectionIndex;T>=0&&(S(c),delete c._fullLayout._activeSelectionIndex,a(c))}}}}),Sz=He({"node_modules/polybooljs/lib/build-log.js"(Z,q){function v(){var _,S=0,M=!1;function e(t,r){return _.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),_}return _={list:[],segmentId:function(){return S++},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?_:(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")}},_}q.exports=v}}),Mz=He({"node_modules/polybooljs/lib/epsilon.js"(Z,q){function v(_){typeof _!="number"&&(_=1e-10);var S={epsilon:function(M){return typeof M=="number"&&(_=M),_},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)>=-_},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<_)return!1;var s=o*o+i*i;return!(n-s>-_)},pointsSameX:function(M,e){return Math.abs(M[0]-e[0])<_},pointsSameY:function(M,e){return Math.abs(M[1]-e[1])<_},pointsSame:function(M,e){return S.pointsSameX(M,e)&&S.pointsSameY(M,e)},pointsCompare:function(M,e){return S.pointsSameX(M,e)?S.pointsSameY(M,e)?0:M[1]_!=a-r>_&&(o-s)*(r-h)/(a-h)+s-t>_&&(i=!i),o=s,a=h}return i}};return S}q.exports=v}}),Ez=He({"node_modules/polybooljs/lib/linked-list.js"(Z,q){var v={create:function(){var _={root:{root:!0,next:null},exists:function(S){return!(S===null||S===_.root)},isEmpty:function(){return _.root.next===null},getHead:function(){return _.root.next},insertBefore:function(S,M){for(var e=_.root,t=_.root.next;t!==null;){if(M(t)){S.prev=t.prev,S.next=t,t.prev.next=S,t.prev=S;return}e=t,t=t.next}e.next=S,S.prev=e,S.next=null},findTransition:function(S){for(var M=_.root,e=_.root.next;e!==null&&!S(e);)M=e,e=e.next;return{before:M===_.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 _},node:function(_){return _.prev=null,_.next=null,_.remove=function(){_.prev.next=_.next,_.next&&(_.next.prev=_.prev),_.prev=null,_.next=null},_}};q.exports=v}}),kz=He({"node_modules/polybooljs/lib/intersecter.js"(Z,q){var v=Ez();function _(S,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,x){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var o=v.create();function a(T,l,x,w,A,E){var p=M.pointsCompare(l,A);return p!==0?p:M.pointsSame(x,E)?0:T!==w?T?1:-1:M.pointAboveOrOnLine(x,w?A:E,w?E:A)?1:-1}function i(T,l){o.insertBefore(T,function(x){var w=a(T.isStart,T.pt,l,x.isStart,x.pt,x.other.pt);return w<0})}function n(T,l){var x=v.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return i(x,T.end),x}function s(T,l,x){var w=v.node({isStart:!1,pt:l.end,seg:l,primary:x,other:T,status:null});T.other=w,i(w,T.pt)}function h(T,l){var x=n(T,l);return s(x,T,l),x}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 m(T,l){var x=r(l,T.seg.end,T.seg);return f(T,l),h(x,T.primary)}function c(T,l){var x=v.create();function w(O,L){var U=O.seg.start,B=O.seg.end,W=L.seg.start,$=L.seg.end;return M.pointsCollinear(U,W,$)?M.pointsCollinear(B,W,$)||M.pointAboveOrOnLine(B,W,$)?1:-1:M.pointAboveOrOnLine(U,W,$)?1:-1}function A(O){return x.findTransition(function(L){var U=w(O,L.ev);return U>0})}function E(O,L){var U=O.seg,B=L.seg,W=U.start,$=U.end,ue=B.start,ce=B.end;e&&e.checkIntersection(U,B);var de=M.linesIntersect(W,$,ue,ce);if(de===!1){if(!M.pointsCollinear(W,$,ue)||M.pointsSame(W,ce)||M.pointsSame($,ue))return!1;var Y=M.pointsSame(W,ue),X=M.pointsSame($,ce);if(Y&&X)return L;var Q=!Y&&M.pointBetween(W,ue,ce),V=!X&&M.pointBetween($,ue,ce);if(Y)return V?m(L,$):m(O,ce),L;Q&&(X||(V?m(L,$):m(O,ce)),m(L,W))}else de.alongA===0&&(de.alongB===-1?m(O,ue):de.alongB===0?m(O,de.pt):de.alongB===1&&m(O,ce)),de.alongB===0&&(de.alongA===-1?m(L,W):de.alongA===0?m(L,de.pt):de.alongA===1&&m(L,$));return!1}for(var p=[];!o.isEmpty();){var b=o.getHead();if(e&&e.vert(b.pt[0]),b.isStart){let O=function(){if(g){var L=E(b,g);if(L)return L}return y?E(b,y):!1};var d=O;e&&e.segmentNew(b.seg,b.primary);var u=A(b),g=u.before?u.before.ev:null,y=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,g?g.seg:!1,y?y.seg:!1);var D=O();if(D){if(S){var P;b.seg.myFill.below===null?P=!0:P=b.seg.myFill.above!==b.seg.myFill.below,P&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=b.seg.myFill;e&&e.segmentUpdate(D.seg),b.other.remove(),b.remove()}if(o.getHead()!==b){e&&e.rewind(b.seg);continue}if(S){var P;b.seg.myFill.below===null?P=!0:P=b.seg.myFill.above!==b.seg.myFill.below,y?b.seg.myFill.below=y.seg.myFill.above:b.seg.myFill.below=T,P?b.seg.myFill.above=!b.seg.myFill.below:b.seg.myFill.above=b.seg.myFill.below}else if(b.seg.otherFill===null){var z;y?b.primary===y.primary?z=y.seg.otherFill.above:z=y.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,g?g.seg:!1,y?y.seg:!1),b.other.status=u.insert(v.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(x.exists(F.prev)&&x.exists(F.next)&&E(F.prev.ev,F.next.ev),e&&e.statusRemove(F.ev.seg),F.remove(),!b.primary){var N=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=N}p.push(b.seg)}o.getHead().remove()}return e&&e.done(),p}return S?{addRegion:function(T){for(var l,x=T[T.length-1],w=0;wr!=m>r&&t<(f-s)*(r-h)/(m-h)+s;c&&(o=!o)}return o}}}),I_=He({"src/lib/polygon.js"(Z,q){"use strict";var v=d2().dot,_=Gs().BADNUM,S=q.exports={};S.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;no||A===_||Ai||x&&h(l))}function m(l,x){var w=l[0],A=l[1];if(w===_||wo||A===_||Ai)return!1;var E=t.length,p=t[0][0],b=t[0][1],d=0,u,g,y,D,P;for(u=1;uMath.max(g,p)||A>Math.max(y,b)))if(An||Math.abs(v(m,h))>o)return!0;return!1},S.filter=function(e,t){var r=[e[0]],o=0,a=0;function i(s){e.push(s);var h=r.length,f=o;r.splice(a+1);for(var m=f+1;m1){var n=e.pop();i(n)}return{addPt:i,raw:e,filtered:r}}}}),Dz=He({"src/components/selections/constants.js"(Z,q){"use strict";q.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),zz=He({"src/components/selections/select.js"(Z,q){"use strict";var v=Iz(),_=Rz(),S=so(),M=as().dashStyle,e=$n(),t=Hc(),r=$p().makeEventData,o=Jd(),a=o.freeMode,i=o.rectMode,n=o.drawMode,s=o.openMode,h=o.selectMode,f=i0(),m=L_(),c=M2(),T=Qm().clearOutline,l=a0(),x=l.handleEllipse,w=l.readPaths,A=S2().newShapes,E=b5(),p=k5().activateLastSelection,b=sa(),d=b.sorterAsc,u=I_(),g=y2(),y=tf().getFromId,D=C_(),P=P_().redrawReglTraces,z=Dz(),F=z.MINSELECT,N=u.filter,O=u.tester,L=A2(),U=L.p2r,B=L.axValue,W=L.getTransform;function $(Fe){return Fe.subplot!==void 0}function ue(Fe,Ye,Ae,Le,We){var Ke=!$(Le),st=a(We),ot=i(We),Ut=s(We),Ct=n(We),Pt=h(We),jt=We==="drawline",cr=We==="drawcircle",or=jt||cr,nr=Le.gd,Pr=nr._fullLayout,_a=Pt&&Pr.newselection.mode==="immediate"&&Ke,Fa=Pr._zoomlayer,Ra=Le.element.getBoundingClientRect(),qa=Le.plotinfo,Wa=W(qa),Ca=Ye-Ra.left,hi=Ae-Ra.top;Pr._calcInverseTransform(nr);var wi=b.apply3DTransform(Pr._invTransform)(Ca,hi);Ca=wi[0],hi=wi[1];var Yt=Pr._invScaleX,Rt=Pr._invScaleY,Zt=Ca,Jt=hi,Fr="M"+Ca+","+hi,ta=Le.xaxes[0],ra=Le.yaxes[0],ca=ta._length,Ba=ra._length,$a=Fe.altKey&&!(n(We)&&Ut),Za,ri,pi,Ia,rn,tn,cn;V(Fe,nr,Le),st&&(Za=N([[Ca,hi]],z.BENDPX));var xt=Fa.selectAll("path.select-outline-"+qa.id).data([1]),ut=Ct?Pr.newshape:Pr.newselection;Ct&&(Le.hasText=ut.label.text||ut.label.texttemplate);var Or=Ct&&!Ut?ut.fillcolor:"rgba(0,0,0,0)",Cr=ut.line.color||(Ke?e.contrast(nr._fullLayout.plot_bgcolor):"#7f7f7f");xt.enter().append("path").attr("class","select-outline select-outline-"+qa.id).style({opacity:Ct?ut.opacity/2:1,"stroke-dasharray":M(ut.line.dash,ut.line.width),"stroke-width":ut.line.width+"px","shape-rendering":"crispEdges"}).call(e.stroke,Cr).call(e.fill,Or).attr("fill-rule","evenodd").classed("cursor-move",!!Ct).attr("transform",Wa).attr("d",Fr+"Z");var wr=Fa.append("path").attr("class","zoombox-corners").style({fill:e.background,stroke:e.defaultLine,"stroke-width":1}).attr("transform",Wa).attr("d","M0,0Z");if(Ct&&Le.hasText){var Rr=Fa.select(".label-temp");Rr.empty()&&(Rr=Fa.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Nr=Pr._uid+z.SELECTID,Hr=[],gt=te(nr,Le.xaxes,Le.yaxes,Le.subplot);_a&&!Fe.shiftKey&&(Le._clearSubplotSelections=function(){if(Ke){var mr=ta._id,Ir=ra._id;rt(nr,mr,Ir,gt);for(var va=(nr.layout||{}).selections||[],Pa=[],ga=!1,la=0;la=0){nr._fullLayout._deactivateShape(nr);return}if(!Ct){var va=Pr.clickmode;g.done(Nr).then(function(){if(g.clear(Nr),mr===2){for(xt.remove(),rn=0;rn-1&&ce(Ir,nr,Le.xaxes,Le.yaxes,Le.subplot,Le,xt),va==="event"&&Ur(nr,void 0);t.click(nr,Ir,qa.id)}).catch(b.error)}},Le.doneFn=function(){wr.remove(),g.done(Nr).then(function(){g.clear(Nr),!_a&&Ia&&Le.selectionDefs&&(Ia.subtract=$a,Le.selectionDefs.push(Ia),Le.mergedPolygons.length=0,[].push.apply(Le.mergedPolygons,pi)),(_a||Ct)&&j(Le,_a),Le.doneFnCompleted&&Le.doneFnCompleted(Hr),Pt&&Ur(nr,cn)}).catch(b.error)}}function ce(Fe,Ye,Ae,Le,We,Ke,st){var ot=Ye._hoverdata,Ut=Ye._fullLayout,Ct=Ut.clickmode,Pt=Ct.indexOf("event")>-1,jt=[],cr,or,nr,Pr,_a,Fa,Ra,qa,Wa,Ca;if(we(ot)){V(Fe,Ye,Ke),cr=te(Ye,Ae,Le,We);var hi=Se(ot,cr),wi=hi.pointNumbers.length>0;if(wi?Pe(cr,hi):je(cr)&&(Ra=Re(hi))){for(st&&st.remove(),Ca=0;Ca=0}function ae(Fe){return Fe._fullLayout._activeSelectionIndex>=0}function j(Fe,Ye){var Ae=Fe.dragmode,Le=Fe.plotinfo,We=Fe.gd;le(We)&&We._fullLayout._deactivateShape(We),ae(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,st=Ke._zoomlayer,ot=n(Ae),Ut=h(Ae);if(ot||Ut){var Ct=st.selectAll(".select-outline-"+Le.id);if(Ct&&We._fullLayout._outlining){var Pt;ot&&(Pt=A(Ct,Fe)),Pt&&S.call("_guiRelayout",We,{shapes:Pt});var jt;Ut&&!$(Fe)&&(jt=E(Ct,Fe)),jt&&(We._fullLayout._noEmitSelectedAtStart=!0,S.call("_guiRelayout",We,{selections:jt}).then(function(){Ye&&p(We)})),We._fullLayout._outlining=!1}}Le.selection={},Le.selection.selectionDefs=Fe.selectionDefs=[],Le.selection.mergedPolygons=Fe.mergedPolygons=[]}function ee(Fe){return Fe._id}function te(Fe,Ye,Ae,Le){if(!Fe.calcdata)return[];var We=[],Ke=Ye.map(ee),st=Ae.map(ee),ot,Ut,Ct;for(Ct=0;Ct0,Ke=We?Le[0]:Ae;return Ye.selectedpoints?Ye.selectedpoints.indexOf(Ke)>-1:!1}function Pe(Fe,Ye){var Ae=[],Le,We,Ke,st;for(st=0;st0&&Ae.push(Le);if(Ae.length===1&&(Ke=Ae[0]===Ye.searchInfo,Ke&&(We=Ye.searchInfo.cd[0].trace,We.selectedpoints.length===Ye.pointNumbers.length))){for(st=0;st1||(Ye+=Le.selectedpoints.length,Ye>1)))return!1;return Ye===1}function at(Fe,Ye,Ae){var Le;for(Le=0;Le-1&&Ye;if(!st&&Ye){var mr=St(Fe,!0);if(mr.length){var Ir=mr[0].xref,va=mr[0].yref;if(Ir&&va){var Pa=Vt(mr),ga=vr([y(Fe,Ir,"x"),y(Fe,va,"y")]);ga(Hr,Pa)}}Fe._fullLayout._noEmitSelectedAtStart?Fe._fullLayout._noEmitSelectedAtStart=!1:Kt&&Ur(Fe,Hr),cr._reselect=!1}if(!st&&cr._deselect){var la=cr._deselect;ot=la.xref,Ut=la.yref,Ze(ot,Ut,Pt)||rt(Fe,ot,Ut,Le),Kt&&(Hr.points.length?Ur(Fe,Hr):_t(Fe)),cr._deselect=!1}return{eventData:Hr,selectionTesters:Ae}}function Ce(Fe){var Ye=Fe.calcdata;if(Ye)for(var Ae=0;Ae=0){Or._fullLayout._deactivateShape(Or);return}var Cr=Or._fullLayout.clickmode;if(X(Or),xt===2&&!he&&ri(),Ve)Cr.indexOf("select")>-1&&d(ut,Or,rt,Je,we.id,Pt),Cr.indexOf("event")>-1&&n.click(Or,ut,we.id);else if(xt===1&&he){var wr=at?ne:se,Rr=at==="s"||nt==="w"?0:1,Nr=wr._name+".range["+Rr+"]",Hr=L(wr,Rr),gt="left",Kt="middle";if(wr.fixedrange)return;at?(Kt=at==="n"?"top":"bottom",wr.side==="right"&&(gt="right")):nt==="e"&&(gt="right"),Or._context.showAxisRangeEntryBoxes&&v.select(Ct).call(o.makeEditable,{gd:Or,immediate:!0,background:Or._fullLayout.paper_bgcolor,text:String(Hr),fill:wr.tickfont?wr.tickfont.color:"#444",horizontalAlign:gt,verticalAlign:Kt}).on("edit",function(mr){var Ir=wr.d2r(mr);Ir!==void 0&&t.call("_guiRelayout",Or,Nr,Ir)})}}f.init(Pt);var or,nr,Pr,_a,Fa,Ra,qa,Wa,Ca,hi;function wi(xt,ut,Or){var Cr=Ct.getBoundingClientRect();or=ut-Cr.left,nr=Or-Cr.top,pe._fullLayout._calcInverseTransform(pe);var wr=_.apply3DTransform(pe._fullLayout._invTransform)(or,nr);or=wr[0],nr=wr[1],Pr={l:or,r:or,w:0,t:nr,b:nr,h:0},_a=pe._hmpixcount?pe._hmlumcount/pe._hmpixcount:M(pe._fullLayout.plot_bgcolor).getLuminance(),Fa="M0,0H"+Bt+"V"+Vt+"H0V0",Ra=!1,qa="xy",hi=!1,Wa=ue(tt,_a,St,kt,Fa),Ca=ce(tt,St,kt)}function Yt(xt,ut){if(pe._transitioningWithDuration)return!1;var Or=Math.max(0,Math.min(Bt,Ke*xt+or)),Cr=Math.max(0,Math.min(Vt,st*ut+nr)),wr=Math.abs(Or-or),Rr=Math.abs(Cr-nr);Pr.l=Math.min(or,Or),Pr.r=Math.max(or,Or),Pr.t=Math.min(nr,Cr),Pr.b=Math.max(nr,Cr);function Nr(){qa="",Pr.r=Pr.l,Pr.t=Pr.b,Ca.attr("d","M0,0Z")}if(Ar.isSubplotConstrained)wr>D||Rr>D?(qa="xy",wr/Bt>Rr/Vt?(Rr=wr*Vt/Bt,nr>Cr?Pr.t=nr-Rr:Pr.b=nr+Rr):(wr=Rr*Bt/Vt,or>Or?Pr.l=or-wr:Pr.r=or+wr),Ca.attr("d",ae(Pr))):Nr();else if(vr.isSubplotConstrained)if(wr>D||Rr>D){qa="xy";var Hr=Math.min(Pr.l/Bt,(Vt-Pr.b)/Vt),gt=Math.max(Pr.r/Bt,(Vt-Pr.t)/Vt);Pr.l=Hr*Bt,Pr.r=gt*Bt,Pr.b=(1-Hr)*Vt,Pr.t=(1-gt)*Vt,Ca.attr("d",ae(Pr))}else Nr();else!kr||Rr0){var mr;if(vr.isSubplotConstrained||!qr&&kr.length===1){for(mr=0;mr1&&(Nr.maxallowed!==void 0&&_t===(Nr.range[0]1&&(Hr.maxallowed!==void 0&&Fe===(Hr.range[0]=0?Math.min(pe,.9):1/(1/Math.max(pe,-.3)+3.222))}function $(pe,we,Se){return pe?pe==="nsew"?Se?"":we==="pan"?"move":"crosshair":pe.toLowerCase()+"-resize":"pointer"}function ue(pe,we,Se,Re,Pe){return pe.append("path").attr("class","zoombox").style({fill:we>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Se,Re)).attr("d",Pe+"Z")}function ce(pe,we,Se){return pe.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(we,Se)).attr("d","M0,0Z")}function de(pe,we,Se,Re,Pe,je){pe.attr("d",Re+"M"+Se.l+","+Se.t+"v"+Se.h+"h"+Se.w+"v-"+Se.h+"h-"+Se.w+"Z"),Y(pe,we,Pe,je)}function Y(pe,we,Se,Re){Se||(pe.transition().style("fill",Re>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),we.transition().style("opacity",1).duration(200))}function X(pe){v.select(pe).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Q(pe){P&&pe.data&&pe._context.showTips&&(_.notifier(_._(pe,"Double-click to zoom back out"),"long",pe),P=!1)}function V(pe,we){return"M"+(pe.l-.5)+","+(we-D-.5)+"h-3v"+(2*D+1)+"h3ZM"+(pe.r+.5)+","+(we-D-.5)+"h3v"+(2*D+1)+"h-3Z"}function le(pe,we){return"M"+(we-D-.5)+","+(pe.t-.5)+"v-3h"+(2*D+1)+"v3ZM"+(we-D-.5)+","+(pe.b+.5)+"v3h"+(2*D+1)+"v-3Z"}function ae(pe){var we=Math.floor(Math.min(pe.b-pe.t,pe.r-pe.l,D)/2);return"M"+(pe.l-3.5)+","+(pe.t-.5+we)+"h3v"+-we+"h"+we+"v-3h-"+(we+3)+"ZM"+(pe.r+3.5)+","+(pe.t-.5+we)+"h-3v"+-we+"h"+-we+"v-3h"+(we+3)+"ZM"+(pe.r+3.5)+","+(pe.b+.5-we)+"h-3v"+we+"h"+-we+"v3h"+(we+3)+"ZM"+(pe.l-3.5)+","+(pe.b+.5-we)+"h3v"+we+"h"+we+"v3h-"+(we+3)+"Z"}function j(pe,we,Se,Re,Pe){for(var je=!1,at={},nt={},tt,Ve,he,se,ne=(Pe||{}).xaHash,Ce=(Pe||{}).yaHash,Ze=0;Ze1&&_.warn("Full array edits are incompatible with other edits",h);var w=i[""][""];if(t(w))a.set(null);else if(Array.isArray(w))a.set(w);else return _.warn("Unrecognized full array edit value",h,w),!0;return T?!1:(f(l,x),m(o),!0)}var A=Object.keys(i).map(Number).sort(S),E=a.get(),p=E||[],b=s(x,h).get(),d=[],u=-1,g=p.length,y,D,P,z,F,N,O,L;for(y=0;yp.length-(O?0:1)){_.warn("index out of range",h,P);continue}if(N!==void 0)F.length>1&&_.warn("Insertion & removal are incompatible with edits to the same index.",h,P),t(N)?d.push(P):O?(N==="add"&&(N={}),p.splice(P,0,N),b&&b.splice(P,0,{})):_.warn("Unrecognized full object edit value",h,P,N),u===-1&&(u=P);else for(D=0;D=0;y--)p.splice(d[y],1),b&&b.splice(d[y],1);if(p.length?E||a.set(p):a.set(null),T)return!1;if(f(l,x),c!==v){var U;if(u===-1)U=A;else{for(g=Math.max(p.length,g),U=[],y=0;y=u));y++)U.push(P);for(y=u;y0&&_.log("Clearing previous rejected promises from queue."),l._promises=[]},Z.cleanLayout=function(l){var x,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 A=(S.subplotsRegistry.cartesian||{}).attrRegex,E=(S.subplotsRegistry.polar||{}).attrRegex,p=(S.subplotsRegistry.ternary||{}).attrRegex,b=(S.subplotsRegistry.gl3d||{}).attrRegex,d=Object.keys(l);for(x=0;x3?(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"),e.clean(l),l.template&&l.template.layout&&Z.cleanLayout(l.template.layout),l};function i(l,x,w=!1){var A=l[x],E=x.charAt(0);w&&Array.isArray(A)||A&&A!=="paper"&&(l[x]=t(A,E,!0))}Z.cleanData=function(l){for(var x=0;x0)return l.slice(0,x)}Z.hasParent=function(l,x){for(var w=c(x);w;){if(w in l)return!0;w=c(w)}return!1},Z.clearAxisTypes=function(l,x,w){for(var A=0;A{let w=(...A)=>A.every(E=>_.isPlainObject(E))||A.every(E=>Array.isArray(E));if([l,x].every(A=>Array.isArray(A))){if(l.length!==x.length)return!1;for(let A=0;A_.isPlainObject(A))){if(Object.keys(l).length!==Object.keys(x).length)return!1;for(let A in l){if(A.startsWith("_"))continue;let E=l[A],p=x[A];if(E!==p&&!(w(E,p)?T(E,p):!1))return!1}return!0}return!1};Z.collectionsAreEqual=T}}),k2=He({"src/plot_api/plot_api.js"(Z){"use strict";var q=Vn(),v=ns(),_=i5(),S=sa(),M=S.nestedProperty,e=Qy(),t=iz(),r=so(),o=e1(),a=bc(),i=Wo(),n=h5(),s=Xh(),h=as(),f=$n(),m=I5().initInteractions,c=vd(),T=Af().clearOutline,l=X0().dfltConfig,x=Nz(),w=Uz(),A=P_(),E=pc(),p=lh().AX_NAME_PATTERN,b=0,d=5;function u(Ae,Le,We,Ke){var st;if(Ae=S.getGraphDiv(Ae),e.init(Ae),S.isPlainObject(Le)){var ot=Le;Le=ot.data,We=ot.layout,Ke=ot.config,st=ot.frames}var Ut=e.triggerHandler(Ae,"plotly_beforeplot",[Le,We,Ke]);if(Ut===!1)return Promise.reject();!Le&&!We&&!S.isPlotDiv(Ae)&&S.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ae);function Ct(){if(st)return Z.addFrames(Ae,st)}z(Ae,Ke),We||(We={}),q.select(Ae).classed("js-plotly-plot",!0),h.makeTester(),Array.isArray(Ae._promises)||(Ae._promises=[]);var Pt=(Ae.data||[]).length===0&&Array.isArray(Le);Array.isArray(Le)&&(w.cleanData(Le),Pt?Ae.data=Le:Ae.data.push.apply(Ae.data,Le),Ae.empty=!1),(!Ae.layout||Pt)&&(Ae.layout=w.cleanLayout(We)),a.supplyDefaults(Ae);var jt=Ae._fullLayout,cr=jt._has("cartesian");jt._replotting=!0,(Pt||jt._shouldCreateBgLayer)&&(Ye(Ae),jt._shouldCreateBgLayer&&delete jt._shouldCreateBgLayer),h.initGradients(Ae),h.initPatterns(Ae),Pt&&i.saveShowSpikeInitial(Ae);var or=!Ae.calcdata||Ae.calcdata.length!==(Ae._fullData||[]).length;or&&a.doCalcdata(Ae);for(var nr=0;nr=Ae.data.length||st<-Ae.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Le.indexOf(st,Ke+1)>-1||st>=0&&Le.indexOf(-Ae.data.length+st)>-1||st<0&&Le.indexOf(Ae.data.length+st)>-1)throw new Error("each index in "+We+" must be unique.")}}function U(Ae,Le,We){if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array.");if(typeof Le>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Le)||(Le=[Le]),L(Ae,Le,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&L(Ae,We,"newIndices"),typeof We<"u"&&Le.length!==We.length)throw new Error("current and new indices must be of equal length.")}function B(Ae,Le,We){var Ke,st;if(!Array.isArray(Ae.data))throw new Error("gd.data must be an array.");if(typeof Le>"u")throw new Error("traces must be defined.");for(Array.isArray(Le)||(Le=[Le]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");L(Ae,We,"indices");for(var ot in Le){if(!Array.isArray(Le[ot])||Le[ot].length!==We.length)throw new Error("attribute "+ot+" must be an array of length equal to indices array length");if(st&&(!(ot in Ke)||!Array.isArray(Ke[ot])||Ke[ot].length!==Le[ot].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 $(Ae,Le,We,Ke){var st=S.isPlainObject(Ke),ot=[],Ut,Ct,Pt,jt,cr;Array.isArray(We)||(We=[We]),We=O(We,Ae.data.length-1);for(var or in Le)for(var nr=0;nr=0&&cr=0&&cr"u")return jt=Z.redraw(Ae),t.add(Ae,st,Ut,ot,Ct),jt;Array.isArray(We)||(We=[We]);try{U(Ae,Ke,We)}catch(cr){throw Ae.data.splice(Ae.data.length-Le.length,Le.length),cr}return t.startSequence(Ae),t.add(Ae,st,Ut,ot,Ct),jt=Z.moveTraces(Ae,Ke,We),t.stopSequence(Ae),jt}function Q(Ae,Le){Ae=S.getGraphDiv(Ae);var We=[],Ke=Z.addTraces,st=Q,ot=[Ae,We,Le],Ut=[Ae,Le],Ct,Pt;if(typeof Le>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Le)||(Le=[Le]),L(Ae,Le,"indices"),Le=O(Le,Ae.data.length-1),Le.sort(S.sorterDes),Ct=0;Ct"u")for(We=[],jt=0;jt0&&typeof Zt.parts[ta]!="string";)ta--;var ra=Zt.parts[ta],ca=Zt.parts[ta-1]+"."+ra,Ba=Zt.parts.slice(0,ta).join("."),$a=M(Ae.layout,Ba).get(),Za=M(Ke,Ba).get(),ri=Zt.get();if(Jt!==void 0){qa[Rt]=Jt,Wa[Rt]=ra==="reverse"?Jt:ae(ri);var pi=o.getLayoutValObject(Ke,Zt.parts);if(pi&&pi.impliedEdits&&Jt!==null)for(var Ia in pi.impliedEdits)Ca(S.relativeAttr(Rt,Ia),pi.impliedEdits[Ia]);if(["width","height"].indexOf(Rt)!==-1)if(Jt){Ca("autosize",null);var rn=Rt==="height"?"width":"height";Ca(rn,Ke[rn])}else Ke[Rt]=Ae._initialAutoSize[Rt];else if(Rt==="autosize")Ca("width",Jt?null:Ke.width),Ca("height",Jt?null:Ke.height);else if(ca.match(Pe))Yt(ca),M(Ke,Ba+"._inputRange").set(null);else if(ca.match(je)){Yt(ca),M(Ke,Ba+"._inputRange").set(null);var tn=M(Ke,Ba).get();tn._inputDomain&&(tn._input.domain=tn._inputDomain.slice())}else ca.match(at)&&M(Ke,Ba+"._inputDomain").set(null);if(ra==="type"){wi=$a;var cn=Za.type==="linear"&&Jt==="log",xt=Za.type==="log"&&Jt==="linear";if(cn||xt){if(!wi||!wi.range)Ca(Ba+".autorange",!0);else if(Za.autorange)cn&&(wi.range=wi.range[1]>wi.range[0]?[1,2]:[2,1]);else{var ut=wi.range[0],Or=wi.range[1];cn?(ut<=0&&Or<=0&&Ca(Ba+".autorange",!0),ut<=0?ut=Or/1e6:Or<=0&&(Or=ut/1e6),Ca(Ba+".range[0]",Math.log(ut)/Math.LN10),Ca(Ba+".range[1]",Math.log(Or)/Math.LN10)):(Ca(Ba+".range[0]",Math.pow(10,ut)),Ca(Ba+".range[1]",Math.pow(10,Or)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Zt.parts[0]]&&Zt.parts[1]==="radialaxis"&&delete Ke[Zt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ae,Za,Jt,Ca),r.getComponentMethod("images","convertCoords")(Ae,Za,Jt,Ca)}else Ca(Ba+".autorange",!0),Ca(Ba+".range",null);M(Ke,Ba+"._inputRange").set(null)}else if(ra.match(p)){var Cr=M(Ke,Rt).get(),wr=(Jt||{}).type;(!wr||wr==="-")&&(wr="linear"),r.getComponentMethod("annotations","convertCoords")(Ae,Cr,wr,Ca),r.getComponentMethod("images","convertCoords")(Ae,Cr,wr,Ca)}var Rr=x.containerArrayMatch(Rt);if(Rr){cr=Rr.array,or=Rr.index;var Nr=Rr.property,Hr=pi||{editType:"calc"};or!==""&&Nr===""&&(x.isAddVal(Jt)?Wa[Rt]=null:x.isRemoveVal(Jt)?Wa[Rt]=(M(We,cr).get()||[])[or]:S.warn("unrecognized full object value",Le)),E.update(Ra,Hr),jt[cr]||(jt[cr]={});var gt=jt[cr][or];gt||(gt=jt[cr][or]={}),gt[Nr]=Jt,delete Le[Rt]}else ra==="reverse"?($a.range?$a.range.reverse():(Ca(Ba+".autorange",!0),$a.range=[1,0]),Za.autorange?Ra.calc=!0:Ra.plot=!0):(Rt==="dragmode"&&(Jt===!1&&ri!==!1||Jt!==!1&&ri===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&Rt==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(ri==="lasso"||ri==="select")?Ra.plot=!0:pi?E.update(Ra,pi):Ra.calc=!0,Zt.set(Jt))}}for(cr in jt){var Kt=x.applyContainerArrayChanges(Ae,ot(We,cr),jt[cr],Ra,ot);Kt||(Ra.plot=!0)}for(var mr in hi){wi=i.getFromId(Ae,mr);var Ir=wi&&wi._constraintGroup;if(Ir){Ra.calc=!0;for(var va in Ir)hi[va]||(i.getFromId(Ae,va)._constraintShrinkable=!0)}}(tt(Ae)||Le.height||Le.width)&&(Ra.plot=!0);var Pa=Ke.shapes;for(or=0;or1;)if(Ke.pop(),We=M(Le,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Le.uirevision}function rt(Ae,Le){for(var We=0;We[Ba,Ae._ev.listeners(Ba)]);ot=Z.newPlot(Ae,Le,We,Ke).then(()=>{for(let[Ba,$a]of ca)$a.forEach(Za=>Ae.on(Ba,Za));return Z.react(Ae,Le,We,Ke)})}else{Ae.data=Le||[],w.cleanData(Ae.data),Ae.layout=We||{},w.cleanLayout(Ae.layout),kt(Ae.data,Ae.layout,Ct,Pt),a.supplyDefaults(Ae,{skipUpdateCalc:!0});var or=Ae._fullData,nr=Ae._fullLayout,Pr=nr.datarevision===void 0,_a=nr.transition,Fa=Ar(Ae,Pt,nr,Pr,_a),Ra=Fa.newDataRevision,qa=Vt(Ae,Ct,or,Pr,_a,Ra);if(tt(Ae)&&(Fa.layoutReplot=!0),qa.calc||Fa.calc){Ae.calcdata=void 0;for(var Wa=Object.getOwnPropertyNames(nr),Ca=0;Ca(cr||Ae.emit("plotly_react",{config:Ke,data:Le,layout:We}),Ae))}function Vt(Ae,Le,We,Ke,st,ot){var Ut=Le.length===We.length;if(!st&&!Ut)return{fullReplot:!0,calc:!0};var Ct=E.traceFlags();Ct.arrays={},Ct.nChanges=0,Ct.nChangesAnim=0;var Pt,jt;function cr(Pr){var _a=o.getTraceValObject(jt,Pr);return!jt._module.animatable&&_a.anim&&(_a.anim=!1),_a}var or={getValObject:cr,flags:Ct,immutable:Ke,transition:st,newDataRevision:ot,gd:Ae},nr={};for(Pt=0;Pt=st.length?st[0]:st[jt]:st}function Ct(jt){return Array.isArray(ot)?jt>=ot.length?ot[0]:ot[jt]:ot}function Pt(jt,cr){var or=0;return function(){if(jt&&++or===cr)return jt()}}return new Promise(function(jt,cr){function or(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ra=Ke._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Ae.emit("plotly_animationinterrupted",[])}}function nr(ra){if(ra.length!==0){for(var ca=0;caKe._timeToNext&&_a()};ra()}var Ra=0;function qa(ra){return Array.isArray(st)?Ra>=st.length?ra.transitionOpts=st[Ra]:ra.transitionOpts=st[0]:ra.transitionOpts=st,Ra++,ra}var Wa,Ca,hi=[],wi=Le==null,Yt=Array.isArray(Le),Rt=!wi&&!Yt&&S.isPlainObject(Le);if(Rt)hi.push({type:"object",data:qa(S.extendFlat({},Le))});else if(wi||["string","number"].indexOf(typeof Le)!==-1)for(Wa=0;Wa0&&FrFr)&&ta.push(Ca);hi=ta}}hi.length>0?nr(hi):(Ae.emit("plotly_animated"),jt())})}function kr(Ae,Le,We){if(Ae=S.getGraphDiv(Ae),Le==null)return Promise.resolve();if(!S.isPlotDiv(Ae))throw new Error("This element is not a Plotly plot: "+Ae+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ke,st,ot,Ut,Ct=Ae._transitionData._frames,Pt=Ae._transitionData._frameHash;if(!Array.isArray(Le))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Le);var jt=Ct.length+Le.length*2,cr=[],or={};for(Ke=Le.length-1;Ke>=0;Ke--)if(S.isPlainObject(Le[Ke])){var nr=Le[Ke].name,Pr=(Pt[nr]||or[nr]||{}).name,_a=Le[Ke].name,Fa=Pt[Pr]||or[Pr];Pr&&_a&&typeof _a=="number"&&Fa&&bZt.index?-1:Rt.index=0;Ke--){if(st=cr[Ke].frame,typeof st.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!st.name)for(;Pt[st.name="frame "+Ae._transitionData._counter++];);if(Pt[st.name]){for(ot=0;ot=0;We--)Ke=Le[We],ot.push({type:"delete",index:Ke}),Ut.unshift({type:"insert",index:Ke,value:st[Ke]});var Ct=a.modifyFrames,Pt=a.modifyFrames,jt=[Ae,Ut],cr=[Ae,ot];return t&&t.add(Ae,Ct,jt,Pt,cr),a.modifyFrames(Ae,ot)}function _t(Ae){Ae=S.getGraphDiv(Ae);var Le=Ae._fullLayout||{},We=Ae._fullData||[];return a.cleanPlot([],{},We,Le),a.purge(Ae),e.purge(Ae),Le._container&&Le._container.remove(),delete Ae._context,Ae}function Fe(Ae){var Le=Ae._fullLayout,We=Ae.getBoundingClientRect();if(!S.equalDomRects(We,Le._lastBBox)){var Ke=Le._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Ae));Le._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Le._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Le._lastBBox=We}}function Ye(Ae){var Le=q.select(Ae),We=Ae._fullLayout;if(We._calcInverseTransform=Fe,We._calcInverseTransform(Ae),We._container=Le.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};q.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=S.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(c.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var st=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=st.append("g").classed("imagelayer",!0),We._shapeLowerLayer=st.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var ot=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=ot.append("g").classed("imagelayer",!0),We._shapeUpperLayer=ot.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ae.emit("plotly_framework")}Z.animate=qr,Z.addFrames=kr,Z.deleteFrames=Ur,Z.addTraces=X,Z.deleteTraces=Q,Z.extendTraces=de,Z.moveTraces=V,Z.prependTraces=Y,Z.newPlot=N,Z._doPlot=u,Z.purge=_t,Z.react=Bt,Z.redraw=F,Z.relayout=we,Z.restyle=le,Z.setPlotConfig=y,Z.update=Ve,Z._guiRelayout=he(we),Z._guiRestyle=he(le),Z._guiUpdate=he(Ve),Z._storeDirectGUIEdit=te}}),Kv=He({"src/snapshot/helpers.js"(Z){"use strict";var q=so();Z.getDelay=function(S){return S._has&&(S._has("gl3d")||S._has("mapbox")||S._has("map"))?500:0},Z.getRedrawFunc=function(S){return function(){q.getComponentMethod("colorbar","draw")(S)}},Z.encodeSVG=function(S){return"data:image/svg+xml,"+encodeURIComponent(S)},Z.encodeJSON=function(S){return"data:application/json,"+encodeURIComponent(S)};var v=window.URL||window.webkitURL;Z.createObjectURL=function(S){return v.createObjectURL(S)},Z.revokeObjectURL=function(S){return v.revokeObjectURL(S)},Z.createBlob=function(S,M){if(M==="svg")return new window.Blob([S],{type:"image/svg+xml;charset=utf-8"});if(M==="full-json")return new window.Blob([S],{type:"application/json;charset=utf-8"});var e=_(window.atob(S));return new window.Blob([e],{type:"image/"+M})},Z.octetStream=function(S){document.location.href="data:application/octet-stream"+S};function _(S){for(var M=S.length,e=new ArrayBuffer(M),t=new Uint8Array(e),r=0;r{let l=T.toLowerCase();return a.includes(l)?T:i.includes(l)?"<":n.includes(l)?">":T.includes("<")||T.includes(">")?"":m.html(T).text()});return m.remove(),c}function h(f){return f.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}q.exports=function(m,c,T){var l=m._fullLayout,x=l._paper,w=l._toppaper,A=l.width,E=l.height,p;x.insert("rect",":first-child").call(S.setRect,0,0,A,E).call(M.fill,l.paper_bgcolor);var b=l._basePlotModules||[];for(p=0;p1&&E.push(s("object","layout"))),_.supplyDefaults(p);for(var u=p._fullData,g=b.length,y=0;yD.length&&A.push(s("unused",E,g.concat(D.length)));var L=D.length,U=Array.isArray(O);U&&(L=Math.min(L,O.length));var B,W,$,ue,ce;if(P.dimensions===2)for(W=0;WD[W].length&&A.push(s("unused",E,g.concat(W,D[W].length)));var de=D[W].length;for(B=0;B<(U?Math.min(de,O[W].length):de);B++)$=U?O[W][B]:O,ue=y[W][B],ce=D[W][B],v.validate(ue,$)?ce!==ue&&ce!==+ue&&A.push(s("dynamic",E,g.concat(W,B),ue,ce)):A.push(s("value",E,g.concat(W,B),ue))}else A.push(s("array",E,g.concat(W),y[W]));else for(W=0;WF?A.push({code:"unused",traceType:y,templateCount:z,dataCount:F}):F>z&&A.push({code:"reused",traceType:y,templateCount:z,dataCount:F})}}function N(O,L){for(var U in O)if(U.charAt(0)!=="_"){var B=O[U],W=s(O,U,L);v(B)?(Array.isArray(O)&&B._template===!1&&B.templateitemname&&A.push({code:"missing",path:W,templateitemname:B.templateitemname}),N(B,W)):Array.isArray(B)&&h(B)&&N(B,W)}}if(N({data:p,layout:E},""),A.length)return A.map(f)};function h(m){for(var c=0;c=0;f--){var m=e[f];if(m.type==="scatter"&&m.xaxis===s.xaxis&&m.yaxis===s.yaxis){m.opacity=void 0;break}}}}}}}),Xz=He({"src/traces/scatter/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=_2();q.exports=function(S,M){function e(r,o){return v.coerce(S,M,_,r,o)}var t=M.barmode==="group";M.scattermode==="group"&&e("scattergap",t?M.bargap:.2)}}}),tv=He({"src/plots/cartesian/align_period.js"(Z,q){"use strict";var v=ns(),_=sa(),S=_.dateTime2ms,M=_.incrementMonth,e=Gs(),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 h=o[i+"period"],f;if(v(h)){if(h=+h,h<=0)return{vals:n}}else if(typeof h=="string"&&h.charAt(0)==="M"){var m=+h.substring(1);if(m>0&&Math.round(m)===m)f=m;else return{vals:n}}for(var c=a.calendar,T=s==="start",l=s==="end",x=o[i+"period0"],w=S(x,c)||0,A=[],E=[],p=[],b=n.length,d=0;du;)D=M(D,-f,c);for(;D<=u;)D=M(D,f,c);y=M(D,-f,c)}else{for(g=Math.round((u-w)/h),D=w+g*h;D>u;)D-=h;for(;D<=u;)D+=h;y=D-h}A[d]=T?y:l?D:(y+D)/2,E[d]=y,p[d]=D}return{vals:A,starts:E,ends:p}}}}),Fd=He({"src/traces/scatter/colorscale_calc.js"(Z,q){"use strict";var v=wp().hasColorscale,_=Tp(),S=Fu();q.exports=function(e,t){S.hasLines(t)&&v(t,"line")&&_(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),S.hasMarkers(t)&&(v(t,"marker")&&_(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),v(t,"marker.line")&&_(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=He({"src/traces/scatter/arrays_to_calcdata.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){for(var e=0;eN&&y[L].gap;)L--;for(B=y[L].s,O=y.length-1;O>L;O--)y[O].s=B;for(;Nue+W||!v($))}for(var de=0;deL(B))):L(F.text);let U=F.outsidetextfont.size*a*O+o;return{ppadplus:N.some(B=>B.s<0)?U:0,ppadminus:N.some(B=>B.s>=0)?U:0}}return{ppadplus:void 0,ppadminus:void 0}}function D(F,N,O,L){for(var U=z(L),B=0;Bz[c]&&c0?e:t)/(c._m*x*(c._m>0?e:t)))),jt*=1e3}if(cr===S){if(l&&(cr=c.c2p(Pt.y,!0)),cr===S)return!1;cr*=1e3}return[jt,cr]}function ee(Ct,Pt,jt,cr){var or=jt-Ct,nr=cr-Pt,Pr=.5-Ct,_a=.5-Pt,Fa=or*or+nr*nr,Ra=or*Pr+nr*_a;if(Ra>0&&Ra1||Math.abs(Pr.y-jt[0][1])>1)&&(Pr=[Pr.x,Pr.y],cr&&Se(Pr,Ct)je||Ct[1]nt)return[a(Ct[0],Pe,je),a(Ct[1],at,nt)]}function St(Ct,Pt){if(Ct[0]===Pt[0]&&(Ct[0]===Pe||Ct[0]===je)||Ct[1]===Pt[1]&&(Ct[1]===at||Ct[1]===nt))return!0}function kt(Ct,Pt){var jt=[],cr=Je(Ct),or=Je(Pt);return cr&&or&&St(cr,or)||(cr&&jt.push(cr),or&&jt.push(or)),jt}function Bt(Ct,Pt,jt){return function(cr,or){var nr=Je(cr),Pr=Je(or),_a=[];if(nr&&Pr&&St(nr,Pr))return _a;nr&&_a.push(nr),Pr&&_a.push(Pr);var Fa=2*r.constrain((cr[Ct]+or[Ct])/2,Pt,jt)-((nr||cr)[Ct]+(Pr||or)[Ct]);if(Fa){var Ra;nr&&Pr?Ra=Fa>0==nr[Ct]>Pr[Ct]?nr:Pr:Ra=nr||Pr,Ra[Ct]+=Fa}return _a}}var Vt;d==="linear"||d==="spline"?Vt=rt:d==="hv"||d==="vh"?Vt=kt:d==="hvh"?Vt=Bt(0,Pe,je):d==="vhv"&&(Vt=Bt(1,at,nt));function Ar(Ct,Pt){var jt=Pt[0]-Ct[0],cr=(Pt[1]-Ct[1])/jt,or=(Ct[1]*Pt[0]-Pt[1]*Ct[0])/jt;return or>0?[cr>0?Pe:je,nt]:[cr>0?je:Pe,at]}function vr(Ct){var Pt=Ct[0],jt=Ct[1],cr=Pt===z[F-1][0],or=jt===z[F-1][1];if(!(cr&&or))if(F>1){var nr=Pt===z[F-2][0],Pr=jt===z[F-2][1];cr&&(Pt===Pe||Pt===je)&&nr?Pr?F--:z[F-1]=Ct:or&&(jt===at||jt===nt)&&Pr?nr?F--:z[F-1]=Ct:z[F++]=Ct}else z[F++]=Ct}function qr(Ct){z[F-1][0]!==Ct[0]&&z[F-1][1]!==Ct[1]&&vr([se,ne]),vr(Ct),Ce=null,se=ne=0}var kr=r.isArrayOrTypedArray(E);function Ur(Ct){if(Ct&&A&&(Ct.i=N,Ct.d=s,Ct.trace=f,Ct.marker=kr?E[Ct.i]:E,Ct.backoff=A),te=Ct[0]/x,pe=Ct[1]/w,Ve=Ct[0]je?je:0,he=Ct[1]nt?nt:0,Ve||he){if(!F)z[F++]=[Ve||Ct[0],he||Ct[1]];else if(Ce){var Pt=Vt(Ce,Ct);Pt.length>1&&(qr(Pt[0]),z[F++]=Pt[1])}else Ze=Vt(z[F-1],Ct)[0],z[F++]=Ze;var jt=z[F-1];Ve&&he&&(jt[0]!==Ve||jt[1]!==he)?(Ce&&(se!==Ve&&ne!==he?vr(se&&ne?Ar(Ce,Ct):[se||Ve,ne||he]):se&&ne&&vr([se,ne])),vr([Ve,he])):se-Ve&&ne-he&&vr([Ve||se,he||ne]),Ce=Ct,se=Ve,ne=he}else Ce&&qr(Vt(Ce,Ct)[0]),z[F++]=Ct}for(N=0;Nwe(W,_t))break;L=W,Q=ce[0]*ue[0]+ce[1]*ue[1],Q>Y?(Y=Q,U=W,$=!1):Q=s.length||!W)break;Ur(W),O=W}}Ce&&vr([se||Ce[0],ne||Ce[1]]),y.push(z.slice(0,F))}var Fe=d.slice(d.length-1);if(A&&Fe!=="h"&&Fe!=="v"){for(var Ye=!1,Ae=-1,Le=[],We=0;We=0?i=m:(i=m=f,f++),i0,d=a(m,c,T);if(A=l.selectAll("g.trace").data(d,function(g){return g[0].trace.uid}),A.enter().append("g").attr("class",function(g){return"trace scatter trace"+g[0].trace.uid}).style("stroke-miterlimit",2),A.order(),n(m,A,c),b){w&&(E=w());var u=v.transition().duration(x.duration).ease(x.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()});u.each(function(){l.selectAll("g.trace").each(function(g,y){s(m,y,c,g,d,this,x)})})}else A.each(function(g,y){s(m,y,c,g,d,this,x)});p&&A.exit().remove(),l.selectAll("path:not([d])").remove()};function n(f,m,c){m.each(function(T){var l=M(v.select(this),"g","fills");t.setClipUrl(l,c.layerClipId,f);var x=T[0].trace;x._ownFill=null,x._nextFill=null;var w=[];x._ownfill&&w.push("_ownFill"),x._nexttrace&&w.push("_nextFill");var A=l.selectAll("g").data(w,e);A.enter().append("g"),A.exit().remove(),A.order().each(function(E){x[E]=M(v.select(this),"path","js-fill")})})}function s(f,m,c,T,l,x,w){var A=f._context.staticPlot,E;h(f,m,c,T,l);var p=!!w&&w.duration>0;function b(vr){return p?vr.transition():vr}var d=c.xaxis,u=c.yaxis,g=T[0].trace,y=g.line,D=v.select(x),P=M(D,"g","errorbars"),z=M(D,"g","lines"),F=M(D,"g","points"),N=M(D,"g","text");if(_.getComponentMethod("errorbars","plot")(f,P,c,w),g.visible!==!0)return;b(D).style("opacity",g.opacity);var O,L,U=g.fill.charAt(g.fill.length-1);U!=="x"&&U!=="y"&&(U="");var B,W;U==="y"?(B=1,W=u.c2p(0,!0)):U==="x"&&(B=0,W=d.c2p(0,!0)),T[0][c.isRangePlot?"nodeRangePlot3":"node3"]=D;var $="",ue=[],ce=g._prevtrace,de=null,Y=null;ce&&($=ce._prevRevpath||"",L=ce._nextFill,ue=ce._ownPolygons,de=ce._fillsegments,Y=ce._fillElement);var X,Q,V="",le="",ae,j,ee,te,pe,we,Se=[];g._polygons=[];var Re=[],Pe=[],je=S.noop;if(O=g._ownFill,r.hasLines(g)||g.fill!=="none"){L&&L.datum(T),["hv","vh","hvh","vhv"].indexOf(y.shape)!==-1?(ae=t.steps(y.shape),j=t.steps(y.shape.split("").reverse().join(""))):y.shape==="spline"?ae=j=function(vr){var qr=vr[vr.length-1];return vr.length>1&&vr[0][0]===qr[0]&&vr[0][1]===qr[1]?t.smoothclosed(vr.slice(1),y.smoothing):t.smoothopen(vr,y.smoothing)}:ae=j=function(vr){return"M"+vr.join("L")},ee=function(vr){return j(vr.reverse())},Pe=o(T,{xaxis:d,yaxis:u,trace:g,connectGaps:g.connectgaps,baseTolerance:Math.max(y.width||1,3)/4,shape:y.shape,backoff:y.backoff,simplify:y.simplify,fill:g.fill}),Re=new Array(Pe.length);var at=0;for(E=0;E=A[0]&&D.x<=A[1]&&D.y>=E[0]&&D.y<=E[1]}),u=Math.ceil(d.length/b),g=0;l.forEach(function(D,P){var z=D[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&P=Math.min(ce,de)&&c<=Math.max(ce,de)?0:1/0}var Y=Math.max(3,ue.mrc||0),X=1-1/Y,Q=Math.abs(f.c2p(ue.x)-c);return Q=Math.min(ce,de)&&T<=Math.max(ce,de)?0:1/0}var Y=Math.max(3,ue.mrc||0),X=1-1/Y,Q=Math.abs(m.c2p(ue.y)-T);return Qle!=Re>=le&&(pe=ee[j-1][0],we=ee[j][0],Re-Se&&(te=pe+(we-pe)*(le-Se)/(Re-Se),Y=Math.min(Y,te),X=Math.max(X,te)));return Y=Math.max(Y,0),X=Math.min(X,f._length),{x0:Y,x1:X,y0:le,y1:le}}if(x.indexOf("fills")!==-1&&h._fillElement){var B=L(h._fillElement)&&!L(h._fillExclusionElement);if(B){var W=U(h._polygons);W===null&&(W={x0:l[0],x1:l[0],y0:l[1],y1:l[1]});var $=e.defaultLine;return e.opacity(h.fillcolor)?$=h.fillcolor:e.opacity((h.line||{}).color)&&($=h.line.color),v.extendFlat(o,{distance:o.maxHoverDistance,x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1,color:$,hovertemplate:!1}),delete o.index,h.text&&!v.isArrayOrTypedArray(h.text)?o.text=String(h.text):o.text=h.name,[o]}}}}}),c1=He({"src/traces/scatter/select.js"(Z,q){"use strict";var v=Fu();q.exports=function(S,M){var e=S.cd,t=S.xaxis,r=S.yaxis,o=[],a=e[0].trace,i,n,s,h,f=!v.hasMarkers(a)&&!v.hasText(a);if(f)return[];if(M===!1)for(i=0;i0&&(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=v(r,"box-violin"),n=v(r._fullInput||{},"candlestick");return i&&!n&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=He({"src/plots/cartesian/category_order_defaults.js"(Z,q){"use strict";var v=hp().isTypedArraySpec;function _(S,M){var e=M.dataAttr||S._id.charAt(0),t={},r,o,a;if(M.axData)r=M.axData;else for(r=[],o=0;o0||v(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=_(e,r).sort(),n==="category ascending"?e._initialCategories=s:n==="category descending"&&(e._initialCategories=s.reverse()))}}}}),z_=He({"src/plots/cartesian/line_grid_defaults.js"(Z,q){"use strict";var v=Ch().mix,_=sh(),S=sa();q.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function i(y,D){return S.coerce2(e,t,o.attributes,y,D)}var n=i("linecolor",a),s=i("linewidth"),h=r("showline",o.showLine||!!n||!!s);h||(delete t.linecolor,delete t.linewidth);var f=v(a,o.bgColor,o.blend||_.lightFraction).toRgbString(),m=i("gridcolor",f),c=i("gridwidth"),T=i("griddash"),l=r("showgrid",o.showGrid||!!m||!!c||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var x=v(t.gridcolor,o.bgColor,67).toRgbString(),w=i("minor.gridcolor",x),A=i("minor.gridwidth",t.gridwidth||1),E=i("minor.griddash",t.griddash||"solid"),p=r("minor.showgrid",!!w||!!A||!!E);p||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var b=i("zerolinelayer"),d=i("zerolinecolor",a),u=i("zerolinewidth"),g=r("zeroline",o.showGrid||!!d||!!u);g||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),F_=He({"src/plots/cartesian/axis_defaults.js"(Z,q){"use strict";var v=ns(),_=so(),S=sa(),M=zl(),e=pp(),t=Xh(),r=Y0(),o=t1(),a=e0(),i=t0(),n=I2(),s=z_(),h=h5(),f=wv(),m=lh().WEEKDAY_PATTERN,c=lh().HOUR_PATTERN;q.exports=function(A,E,p,b,d){var u=b.letter,g=b.font||{},y=b.splomStash||{},D=p("visible",!b.visibleDflt),P=E._template||{},z=E.type||P.type||"-",F;if(z==="date"){var N=_.getComponentMethod("calendars","handleDefaults");N(A,E,"calendar",b.calendar),b.noTicklabelmode||(F=p("ticklabelmode"))}!b.noTicklabelindex&&(z==="date"||z==="linear")&&p("ticklabelindex");var O="";(!b.noTicklabelposition||z==="multicategory")&&(O=S.coerce(A,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||p("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":z==="category"||z==="multicategory"?"allow":"hide past div"),f(E,d),h(A,E,p,b),n(A,E,p,b),b.noHover||(z!=="category"&&p("hoverformat"),b.noUnifiedhovertitle||p("unifiedhovertitle.text"));var L=p("color"),U=L!==t.color.dflt?L:g.color,B=y.label||d._dfltTitle[u];if(i(A,E,p,z,b),!D)return E;p("title.text",B),S.coerceFont(p,"title.font",g,{overrideDflt:{size:S.bigFont(g.size),color:U}}),r(A,E,p,z);var W=b.hasMinor;if(W&&(M.newContainer(E,"minor"),r(A,E,p,z,{isMinor:!0})),a(A,E,p,z,b),o(A,E,p,b),W){var $=b.isMinor;b.isMinor=!0,o(A,E,p,b),b.isMinor=$}s(A,E,p,{dfltColor:L,bgColor:b.bgColor,showGrid:b.showGrid,hasMinor:W,attributes:t}),W&&E.ticklabelindex==null&&!E.minor.ticks&&!E.minor.showgrid&&delete E.minor,(E.showline||E.ticks)&&p("mirror");var ue=z==="multicategory";if(!b.noTickson&&(z==="category"||ue)&&(E.ticks||E.showgrid)&&(ue?(p("tickson","boundaries"),delete E.ticklabelposition):p("tickson")),ue){var ce=p("showdividers");ce&&(p("dividercolor"),p("dividerwidth"))}if(z==="date")if(e(A,E,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!E.rangebreaks.length)delete E.rangebreaks;else{for(var de=0;de=2){var u="",g,y;if(d.length===2){for(g=0;g<2;g++)if(y=x(d[g]),y){u=m;break}}var D=p("pattern",u);if(D===m)for(g=0;g<2;g++)y=x(d[g]),y&&(A.bounds[g]=d[g]=y-1);if(D)for(g=0;g<2;g++)switch(y=d[g],D){case m:if(!v(y)){A.enabled=!1;return}if(y=+y,y!==Math.floor(y)||y<0||y>=7){A.enabled=!1;return}A.bounds[g]=d[g]=y;break;case c:if(!v(y)){A.enabled=!1;return}if(y=+y,y<0||y>24){A.enabled=!1;return}A.bounds[g]=d[g]=y;break}if(E.autorange===!1){var P=E.range;if(P[0]P[1]){A.enabled=!1;return}}else if(d[0]>P[0]&&d[1]p[1]-1/4096&&(e.domain=f),_.noneOrAll(M.domain,e.domain,f),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Jz=He({"src/plots/cartesian/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=$p().isUnifiedHover,M=x5(),e=zl(),t=$y(),r=Xh(),o=B5(),a=F_(),i=J0(),n=R2(),s=tf(),h=s.id2name,f=s.name2id,m=lh().AX_ID_PATTERN,c=so(),T=c.traceIs,l=c.getComponentMethod;function x(w,A,E){Array.isArray(w[A])?w[A].push(E):w[A]=[E]}q.exports=function(A,E,p){var b=E.autotypenumbers,d={},u={},g={},y={},D={},P={},z={},F={},N={},O={},L,U;for(L=0;L rect").call(M.setTranslate,0,0).call(M.setScale,1,1),E.plot.call(M.setTranslate,p._offset,b._offset).call(M.setScale,1,1);var d=E.plot.selectAll(".scatterlayer .trace");d.selectAll(".point").call(M.setPointGroupScale,1,1),d.selectAll(".textpoint").call(M.setTextPointsScale,1,1),d.call(M.hideOutsideRangePoints,E)}function h(E,p){var b=E.plotinfo,d=b.xaxis,u=b.yaxis,g=d._length,y=u._length,D=!!E.xr1,P=!!E.yr1,z=[];if(D){var F=S.simpleMap(E.xr0,d.r2l),N=S.simpleMap(E.xr1,d.r2l),O=F[1]-F[0],L=N[1]-N[0];z[0]=(F[0]*(1-p)+p*N[0]-F[0])/(F[1]-F[0])*g,z[2]=g*(1-p+p*L/O),d.range[0]=d.l2r(F[0]*(1-p)+p*N[0]),d.range[1]=d.l2r(F[1]*(1-p)+p*N[1])}else z[0]=0,z[2]=g;if(P){var U=S.simpleMap(E.yr0,u.r2l),B=S.simpleMap(E.yr1,u.r2l),W=U[1]-U[0],$=B[1]-B[0];z[1]=(U[1]*(1-p)+p*B[1]-U[1])/(U[0]-U[1])*y,z[3]=y*(1-p+p*$/W),u.range[0]=d.l2r(U[0]*(1-p)+p*B[0]),u.range[1]=u.l2r(U[1]*(1-p)+p*B[1])}else z[1]=0,z[3]=y;e.drawOne(r,d,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[d._id,u._id]);var ue=D?g/z[2]:1,ce=P?y/z[3]:1,de=D?z[0]:0,Y=P?z[1]:0,X=D?z[0]/z[2]*g:0,Q=P?z[1]/z[3]*y:0,V=d._offset-X,le=u._offset-Q;b.clipRect.call(M.setTranslate,de,Y).call(M.setScale,1/ue,1/ce),b.plot.call(M.setTranslate,V,le).call(M.setScale,ue,ce),M.setPointGroupScale(b.zoomScalePts,1/ue,1/ce),M.setTextPointsScale(b.zoomScaleTxt,1/ue,1/ce)}var f;i&&(f=i());function m(){for(var E={},p=0;pa.duration?(m(),x=window.cancelAnimationFrame(A)):x=window.requestAnimationFrame(A)}return T=Date.now(),x=window.requestAnimationFrame(A),Promise.resolve()}}}),Kf=He({"src/plots/cartesian/index.js"(Z){"use strict";var q=Vn(),v=so(),_=sa(),S=bc(),M=as(),e=Wh().getModuleCalcData,t=tf(),r=lh(),o=vd(),a=_.ensureSingle;function i(T,l,x){return _.ensureSingle(T,l,x,function(w){w.datum(x)})}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=Kz(),Z.layoutAttributes=Xh(),Z.supplyLayoutDefaults=Jz(),Z.transitionAxes=$z(),Z.finalizeSubplots=function(T,l){var x=l._subplots,w=x.xaxis,A=x.yaxis,E=x.cartesian,p=E,b={},d={},u,g,y;for(u=0;u0){var P=D.id;if(P.indexOf(n)!==-1)continue;P+=n+(u+1),D=_.extendFlat({},D,{id:P,plot:A._cartesianlayer.selectAll(".subplot").select("."+P)})}for(var z=[],F,N=0;N1&&(W+=n+B),U.push(b+W),p=0;p1,y=l.mainplotinfo;if(!l.mainplot||g)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(!p){var D=a(w,"g","layer-subplot");l.shapelayer=a(D,"g","shapelayer"),l.imagelayer=a(D,"g","imagelayer"),y&&g?(l.minorGridlayer=y.minorGridlayer,l.gridlayer=y.gridlayer,l.zerolinelayer=y.zerolinelayer):(l.minorGridlayer=a(w,"g","minor-gridlayer"),l.gridlayer=a(w,"g","gridlayer"),l.zerolinelayer=a(w,"g","zerolinelayer"));var P=a(w,"g","layer-between");l.shapelayerBetween=a(P,"g","shapelayer"),l.imagelayerBetween=a(P,"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",A),y&&g?l.zerolinelayerAbove=y.zerolinelayerAbove:l.zerolinelayerAbove=a(w,"g","zerolinelayer-above"),p||(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-"+d),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+d))}else{var z=y.plotgroup,F=A+"-x",N=A+"-y";l.minorGridlayer=y.minorGridlayer,l.gridlayer=y.gridlayer,l.zerolinelayer=y.zerolinelayer,l.zerolinelayerAbove=y.zerolinelayerAbove,a(y.overlinesBelow,"path",F),a(y.overlinesBelow,"path",N),a(y.overaxesBelow,"g",F),a(y.overaxesBelow,"g",N),l.plot=a(y.overplot,"g",A),a(y.overlinesAbove,"path",F),a(y.overlinesAbove,"path",N),a(y.overaxesAbove,"g",F),a(y.overaxesAbove,"g",N),l.xlines=z.select(".overlines-"+b).select("."+F),l.ylines=z.select(".overlines-"+d).select("."+N),l.xaxislayer=z.select(".overaxes-"+b).select("."+F),l.yaxislayer=z.select(".overaxes-"+d).select("."+N)}p||(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 m(T,l){if(T){var x={};T.each(function(d){var u=d[0],g=q.select(this);g.remove(),c(u,l),x[u]=!0});for(var w in l._plots)for(var A=l._plots[w],E=A.overlays||[],p=0;p=0,l=i.indexOf("end")>=0,x=h.backoff*m+n.standoff,w=f.backoff*c+n.startstandoff,A,E,p,b;if(s.nodeName==="line"){A={x:+a.attr("x1"),y:+a.attr("y1")},E={x:+a.attr("x2"),y:+a.attr("y2")};var d=A.x-E.x,u=A.y-E.y;if(p=Math.atan2(u,d),b=p+Math.PI,x&&w&&x+w>Math.sqrt(d*d+u*u)){W();return}if(x){if(x*x>d*d+u*u){W();return}var g=x*Math.cos(p),y=x*Math.sin(p);E.x+=g,E.y+=y,a.attr({x2:E.x,y2:E.y})}if(w){if(w*w>d*d+u*u){W();return}var D=w*Math.cos(p),P=w*Math.sin(p);A.x-=D,A.y-=P,a.attr({x1:A.x,y1:A.y})}}else if(s.nodeName==="path"){var z=s.getTotalLength(),F="";if(z2/3?Ca="right":Ca="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ca]}for(var Ze=!1,rt=["x","y"],Je=0;Je1)&&(Bt===kt?(ot=Vt.r2fraction(w["a"+St]),(ot<0||ot>1)&&(Ze=!0)):Ze=!0),Ye=Vt._offset+Vt.r2p(w[St]),We=.5}else{var Ut=st==="domain";St==="x"?(Le=w[St],Ye=Ut?Vt._offset+Vt._length*Le:Ye=u.l+u.w*Le):(Le=1-w[St],Ye=Ut?Vt._offset+Vt._length*Le:Ye=u.t+u.h*Le),We=w.showarrow?.5:Le}if(w.showarrow){Fe.head=Ye;var Ct=w["a"+St];if(Ke=vr*Ce(.5,w.xanchor)-qr*Ce(.5,w.yanchor),Bt===kt){var Pt=t.getRefType(Bt);Pt==="domain"?(St==="y"&&(Ct=1-Ct),Fe.tail=Vt._offset+Vt._length*Ct):Pt==="paper"?St==="y"?(Ct=1-Ct,Fe.tail=u.t+u.h*Ct):Fe.tail=u.l+u.w*Ct:Fe.tail=Vt._offset+Vt.r2p(Ct),Ae=Ke}else Fe.tail=Ye+Ct,Ae=Ke+Ct;Fe.text=Fe.tail+Ke;var jt=d[St==="x"?"width":"height"];if(kt==="paper"&&(Fe.head=M.constrain(Fe.head,1,jt-1)),Bt==="pixel"){var cr=-Math.max(Fe.tail-3,Fe.text),or=Math.min(Fe.tail+3,Fe.text)-jt;cr>0?(Fe.tail+=cr,Fe.text+=cr):or>0&&(Fe.tail-=or,Fe.text-=or)}Fe.tail+=_t,Fe.head+=_t}else Ke=kr*Ce(We,Ur),Ae=Ke,Fe.text=Ye+Ke;Fe.text+=_t,Ke+=_t,Ae+=_t,w["_"+St+"padplus"]=kr/2+Ae,w["_"+St+"padminus"]=kr/2-Ae,w["_"+St+"size"]=kr,w["_"+St+"shift"]=Ke}if(Ze){de.remove();return}var nr=0,Pr=0;if(w.align!=="left"&&(nr=(Ve-nt)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Pr=(he-tt)*(w.valign==="middle"?.5:1)),je)Pe.select("svg").attr({x:Q+nr-1,y:Q+Pr}).call(o.setClipUrl,le?O:null,x);else{var _a=Q+Pr-at.top,Fa=Q+nr-at.left;te.call(i.positionText,Fa,_a).call(o.setClipUrl,le?O:null,x)}ae.select("rect").call(o.setRect,Q,Q,Ve,he),V.call(o.setRect,Y/2,Y/2,se-Y,ne-Y),de.call(o.setTranslate,Math.round(L.x.text-se/2),Math.round(L.y.text-ne/2)),W.attr({transform:"rotate("+U+","+L.x.text+","+L.y.text+")"});var Ra=function(Wa,Ca){B.selectAll(".annotation-arrow-g").remove();var hi=L.x.head,wi=L.y.head,Yt=L.x.tail+Wa,Rt=L.y.tail+Ca,Zt=L.x.text+Wa,Jt=L.y.text+Ca,Fr=M.rotationXYMatrix(U,Zt,Jt),ta=M.apply2DTransform(Fr),ra=M.apply2DTransform2(Fr),ca=+V.attr("width"),Ba=+V.attr("height"),$a=Zt-.5*ca,Za=$a+ca,ri=Jt-.5*Ba,pi=ri+Ba,Ia=[[$a,ri,$a,pi],[$a,pi,Za,pi],[Za,pi,Za,ri],[Za,ri,$a,ri]].map(ra);if(!Ia.reduce(function(gt,Kt){return gt^!!M.segmentsIntersect(hi,wi,hi+1e6,wi+1e6,Kt[0],Kt[1],Kt[2],Kt[3])},!1)){Ia.forEach(function(gt){var Kt=M.segmentsIntersect(Yt,Rt,hi,wi,gt[0],gt[1],gt[2],gt[3]);Kt&&(Yt=Kt.x,Rt=Kt.y)});var rn=w.arrowwidth,tn=w.arrowcolor,cn=w.arrowside,xt=B.append("g").style({opacity:r.opacity(tn)}).classed("annotation-arrow-g",!0),ut=xt.append("path").attr("d","M"+Yt+","+Rt+"L"+hi+","+wi).style("stroke-width",rn+"px").call(r.stroke,r.rgb(tn));if(f(ut,cn,w),g.annotationPosition&&ut.node().parentNode&&!E){var Or=hi,Cr=wi;if(w.standoff){var wr=Math.sqrt(Math.pow(hi-Yt,2)+Math.pow(wi-Rt,2));Or+=w.standoff*(Yt-hi)/wr,Cr+=w.standoff*(Rt-wi)/wr}var Rr=xt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Yt-Or)+","+(Rt-Cr),transform:e(Or,Cr)}).style("stroke-width",rn+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),Nr,Hr;s.init({element:Rr.node(),gd:x,prepFn:function(){var gt=o.getTranslate(de);Nr=gt.x,Hr=gt.y,p&&p.autorange&&z(p._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(gt,Kt){var mr=ta(Nr,Hr),Ir=mr[0]+gt,va=mr[1]+Kt;de.call(o.setTranslate,Ir,va),F("x",T(p,gt,"x",u,w)),F("y",T(b,Kt,"y",u,w)),w.axref===w.xref&&F("ax",T(p,gt,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,Kt,"ay",u,w)),xt.attr("transform",e(gt,Kt)),W.attr({transform:"rotate("+U+","+Ir+","+va+")"})},doneFn:function(){_.call("_guiRelayout",x,N());var gt=document.querySelector(".js-notes-box-panel");gt&>.redraw(gt.selectedObj)}})}}};if(w.showarrow&&Ra(0,0),$){var qa;s.init({element:de.node(),gd:x,prepFn:function(){qa=W.attr("transform")},moveFn:function(Wa,Ca){var hi="pointer";if(w.showarrow)w.axref===w.xref?F("ax",T(p,Wa,"ax",u,w)):F("ax",w.ax+Wa),w.ayref===w.yref?F("ay",T(b,Ca,"ay",u.w,w)):F("ay",w.ay+Ca),Ra(Wa,Ca);else{if(E)return;var wi,Yt;if(p)wi=T(p,Wa,"x",u,w);else{var Rt=w._xsize/u.w,Zt=w.x+(w._xshift-w.xshift)/u.w-Rt/2;wi=s.align(Zt+Wa/u.w,Rt,0,1,w.xanchor)}if(b)Yt=T(b,Ca,"y",u,w);else{var Jt=w._ysize/u.h,Fr=w.y-(w._yshift+w.yshift)/u.h-Jt/2;Yt=s.align(Fr-Ca/u.h,Jt,0,1,w.yanchor)}F("x",wi),F("y",Yt),(!p||!b)&&(hi=s.getCursor(p?.5:wi,b?.5:Yt,w.xanchor,w.yanchor))}W.attr({transform:e(Wa,Ca)+qa}),n(de,hi)},clickFn:function(Wa,Ca){w.captureevents&&x.emit("plotly_clickannotation",ce(Ca))},doneFn:function(){n(de),_.call("_guiRelayout",x,N());var Wa=document.querySelector(".js-notes-box-panel");Wa&&Wa.redraw(Wa.selectedObj)}})}}g.annotationText?te.call(i.makeEditable,{delegate:de,gd:x}).call(pe).on("edit",function(Se){w.text=Se,this.call(pe),F("text",Se),p&&p.autorange&&z(p._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),_.call("_guiRelayout",x,N())}):te.call(pe)}}}),t9=He({"src/components/annotations/click.js"(Z,q){"use strict";var v=sa(),_=so(),S=zl().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),h={},f=o._fullLayout.annotations,m,c;if(n.length||s.length){for(m=0;m1){n=!0;break}}n?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+a+'"]').remove():(i._pdata=_(e.glplot.cameraParams,[t.xaxis.r2l(i.x)*r[0],t.yaxis.r2l(i.y)*r[1],t.zaxis.r2l(i.z)*r[2]]),v(e.graphDiv,i,a,e.id,i._xa,i._ya))}}}}),u9=He({"src/components/annotations3d/index.js"(Z,q){"use strict";var v=so(),_=sa();q.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:z2()}}},layoutAttributes:z2(),handleDefaults:o9(),includeBasePlot:S,convert:s9(),draw:l9()};function S(M,e){var t=v.subplotsRegistry.gl3d;if(t)for(var r=t.attrRegex,o=Object.keys(M),a=0;a{var y=g+"anchor",D=g==="x"?x:w,P={_fullLayout:i},z,F,N,O;let L=g+"ref",U=o[L];if(Array.isArray(U)&&U.length>0){let B=e.countDefiningCoords(c,f,g);O=_.coerceRefArray(o,a,P,g,void 0,"paper",B),a["_"+g+"refArray"]=!0}else O=_.coerceRef(o,a,P,g,void 0,"paper");if(Array.isArray(O))O.forEach(function(B){_.getRefType(B)==="range"&&(z=_.getFromId(P,B),z&&z._shapeIndices.indexOf(a._index)===-1&&z._shapeIndices.push(a._index))}),T&&[0,1].forEach(function(B){let W=O[B];_.getRefType(W)==="range"?(z=_.getFromId(P,W),F=e.shapePositionToRange(z),N=e.rangeToShapePosition(z),(z.type==="category"||z.type==="multicategory")&&n(g+B+"shift")):F=N=v.identity;let ue=g+B,ce=o[ue];if(o[ue]=F(o[ue],!0),D==="pixel"?n(ue,E[B]):_.coercePosition(a,P,n,W,ue,A[B]),a[ue]=N(a[ue]),o[ue]=ce,B===0&&D==="pixel"){let de=o[y];o[y]=F(o[y],!0),_.coercePosition(a,P,n,W,y,.25),a[y]=N(a[y]),o[y]=de}});else{if(_.getRefType(O)==="range"?(z=_.getFromId(P,O),z._shapeIndices.push(a._index),N=e.rangeToShapePosition(z),F=e.shapePositionToRange(z),T&&(z.type==="category"||z.type==="multicategory")&&(n(g+"0shift"),n(g+"1shift"))):F=N=v.identity,T){let W=g+"0",$=g+"1",ue=o[W],ce=o[$];o[W]=F(o[W],!0),o[$]=F(o[$],!0),D==="pixel"?(n(W,E[0]),n($,E[1])):(_.coercePosition(a,P,n,O,W,A[0]),_.coercePosition(a,P,n,O,$,A[1])),a[W]=N(a[W]),a[$]=N(a[$]),o[W]=ue,o[$]=ce}if(D==="pixel"){let W=o[y];o[y]=F(o[y],!0),_.coercePosition(a,P,n,O,y,.25),a[y]=N(a[y]),o[y]=W}}}),T&&v.noneOrAll(o,a,["x0","x1","y0","y1"]);var p=c==="line",b,d;if(T&&(b=n("label.texttemplate"),n("label.texttemplatefallback")),b||(d=n("label.text")),d||b){n("label.textangle");var u=n("label.textposition",p?"middle":"middle center");n("label.xanchor"),n("label.yanchor",t(p,u)),n("label.padding"),v.coerceFont(n,"label.font",i.font)}}}}),f9=He({"src/components/shapes/draw_newshape/defaults.js"(Z,q){"use strict";var v=$n(),_=sa();function S(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"),_.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",v.contrast(a)),r("newshape.line.dash")}var i=e.dragmode==="drawline",n=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(r("newshape.label.texttemplatefallback"),n||s){r("newshape.label.textangle");var h=r("newshape.label.textposition",i?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",S(i,h)),r("newshape.label.padding"),_.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}}}),h9=He({"src/components/shapes/calc_autorange.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=L_(),M=i0();q.exports=function(n){var s=n._fullLayout,h=v.filterVisible(s.shapes);if(!(!h.length||!n._fullData.length))for(var f=0;f{c=_.getFromId(n,A),m._extremes[c._id]=_.findExtremes(c,E,t(m))})}else m.xref!=="paper"&&l!=="domain"&&(c=_.getFromId(n,m.xref),T=a(c,m,S.paramIsX),T&&(m._extremes[c._id]=_.findExtremes(c,T,t(m))));if(x==="array"){let w=e(n,m,"y");Object.entries(w).forEach(([A,E])=>{c=_.getFromId(n,A),m._extremes[c._id]=_.findExtremes(c,E,r(m))})}else m.yref!=="paper"&&x!=="domain"&&(c=_.getFromId(n,m.yref),T=a(c,m,S.paramIsY),T&&(m._extremes[c._id]=_.findExtremes(c,T,r(m))))}};function e(i,n,s){let h=n[s+"ref"],f=s==="x"?S.paramIsX:S.paramIsY;function m(A,E){A==="paper"||_.getRefType(A)==="domain"||(c[A]||(c[A]=[]),c[A].push(E))}let c={};if(n.type==="path"&&n.path){let A=n.path.match(S.segmentRE)||[];for(var T=0,l=0;lb&&(m(h[T],d[b]),T++)}}else m(h[0],n[s+"0"]),m(h[1],n[s+"1"]);let x={};for(let A in c){let E=_.getFromId(i,A);if(E){var w=E.type==="category"||E.type==="multicategory"?E.r2c:E.d2c;E.type==="date"&&(w=M.decodeDate(w)),x[E._id]=c[A].map(w)}}return x}function t(i){return o(i.line.width,i.xsizemode,i.x0,i.x1,i.path,!1)}function r(i){return o(i.line.width,i.ysizemode,i.y0,i.y1,i.path,!0)}function o(i,n,s,h,f,m){var c=i/2,T=m;if(n==="pixel"){var l=f?M.extractPathCoords(f,m?S.paramIsY:S.paramIsX):[s,h],x=v.aggNums(Math.max,null,l),w=v.aggNums(Math.min,null,l),A=w<0?Math.abs(w)+c:c,E=x>0?x+c:c;return{ppad:c,ppadplus:T?A:E,ppadminus:T?E:A}}else return{ppad:c}}function a(i,n,s){var h=i._id.charAt(0)==="x"?"x":"y",f=i.type==="category"||i.type==="multicategory",m,c,T=0,l=0,x=f?i.r2c:i.d2c,w=n[h+"sizemode"]==="scaled";if(w?(m=n[h+"0"],c=n[h+"1"],f&&(T=n[h+"0shift"],l=n[h+"1shift"])):(m=n[h+"anchor"],c=n[h+"anchor"]),m!==void 0)return[x(m)+T,x(c)+l];if(n.path){var A=1/0,E=-1/0,p=n.path.match(S.segmentRE),b,d,u,g,y;for(i.type==="date"&&(x=M.decodeDate(x)),b=0;bE&&(E=y)));if(E>=A)return[A,E]}}}}),p9=He({"src/components/shapes/index.js"(Z,q){"use strict";var v=E2();q.exports={moduleType:"component",name:"shapes",layoutAttributes:j5(),supplyLayoutDefaults:c9(),supplyDrawNewShapeDefaults:f9(),includeBasePlot:D_()("shapes"),calcAutorange:h9(),draw:v.draw,drawOne:v.drawOne}}}),q5=He({"src/components/images/attributes.js"(Z,q){"use strict";var v=lh(),_=zl().templatedArray,S=R_();q.exports=_("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",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),d9=He({"src/components/images/defaults.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=pp(),M=q5(),e="images";q.exports=function(o,a){var i={name:e,handleItemDefaults:t};S(o,a,i)};function t(r,o,a){function i(x,w){return v.coerce(r,o,M,x,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 h={_fullLayout:a},f=["x","y"],m=0;m<2;m++){var c=f[m],T=_.coerceRef(r,o,h,c,"paper",void 0);if(T!=="paper"){var l=_.getFromId(h,T);l._imgIndices.push(o._index)}_.coercePosition(o,h,i,T,c,0)}return o}}}),v9=He({"src/components/images/draw.js"(Z,q){"use strict";var v=Vn(),_=as(),S=Wo(),M=tf(),e=vd();q.exports=function(r){var o=r._fullLayout,a=[],i={},n=[],s,h;for(h=0;h0);f&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(a,i,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",n.font),s("bgcolor",n.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,i){function n(h,f){return v.coerce(a,i,t,h,f)}var s=n("visible",a.method==="skip"||Array.isArray(a.args));s&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}}}),_9=He({"src/components/updatemenus/scrollbox.js"(Z,q){"use strict";q.exports=e;var v=Vn(),_=$n(),S=as(),M=sa();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 h=this.position.l,f=this.position.w,m=this.position.t,c=this.position.h,T=this.position.direction,l=T==="down",x=T==="left",w=T==="right",A=T==="up",E=f,p=c,b,d,u,g;!l&&!x&&!w&&!A&&(this.position.direction="down",l=!0);var y=l||A;y?(b=h,d=b+E,l?(u=m,g=Math.min(u+p,s),p=g-u):(g=m+p,u=Math.max(g-p,0),p=g-u)):(u=m,g=u+p,x?(d=h+E,b=Math.max(d-E,0),E=d-b):(b=h,d=Math.min(b+E,n),E=d-b)),this._box={l:b,t:u,w:E,h:p};var D=f>E,P=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=h,N=m+c;N+z>s&&(N=s-z);var O=this.container.selectAll("rect.scrollbar-horizontal").data(D?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(_.fill,e.barColor),D?(this.hbar=O.attr({rx:e.barRadius,ry:e.barRadius,x:F,y:N,width:P,height:z}),this._hbarXMin=F+P/2,this._hbarTranslateMax=E-P):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=c>p,U=e.barWidth+2*e.barPad,B=e.barLength+2*e.barPad,W=h+f,$=m;W+U>n&&(W=n-U);var ue=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);ue.exit().on(".drag",null).remove(),ue.enter().append("rect").classed("scrollbar-vertical",!0).call(_.fill,e.barColor),L?(this.vbar=ue.attr({rx:e.barRadius,ry:e.barRadius,x:W,y:$,width:U,height:B}),this._vbarYMin=$+B/2,this._vbarTranslateMax=p-B):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ce=this.id,de=b-.5,Y=L?d+U+.5:d+.5,X=u-.5,Q=D?g+z+.5:g+.5,V=i._topdefs.selectAll("#"+ce).data(D||L?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",ce).append("rect"),D||L?(this._clipRect=V.select("rect").attr({x:Math.floor(de),y:Math.floor(X),width:Math.ceil(Y)-Math.floor(de),height:Math.ceil(Q)-Math.floor(X)}),this.container.call(S.setClipUrl,ce,this.gd),this.bg.attr({x:h,y:m,width:f,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S.setClipUrl,null),delete this._clipRect),D||L){var le=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(le);var ae=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));D&&this.hbar.on(".drag",null).call(ae),L&&this.vbar.on(".drag",null).call(ae)}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(S.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-=v.event.dx),this.vbar&&(o-=v.event.dy),this.setTranslate(r,o)},e.prototype._onBoxWheel=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r+=v.event.deltaY),this.vbar&&(o+=v.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(v.event.x,a,i),s=(n-a)/(i-a),h=this.position.w-this._box.w;r=s*h}if(this.vbar){var f=o+this._vbarYMin,m=f+this._vbarTranslateMax,c=M.constrain(v.event.y,f,m),T=(c-f)/(m-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(S.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(S.setTranslate,r+n*this._hbarTranslateMax,o)}if(this.vbar){var s=o/i;this.vbar.call(S.setTranslate,r,o+s*this._vbarTranslateMax)}}}}),x9=He({"src/components/updatemenus/draw.js"(Z,q){"use strict";var v=Vn(),_=bc(),S=$n(),M=as(),e=sa(),t=su(),r=zl().arrayEditor,o=uh().LINE_SPACING,a=F2(),i=_9();q.exports=function(P){var z=P._fullLayout,F=e.filterVisible(z[a.name]);function N(ce){_.autoMargin(P,u(ce))}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(){v.select(this).selectAll("g."+a.headerGroupClassName).each(N)}).remove(),F.length!==0){var L=O.selectAll("g."+a.headerGroupClassName).data(F,n);L.enter().append("g").classed(a.headerGroupClassName,!0);for(var U=e.ensureSingle(O,"g",a.dropdownButtonGroupClassName,function(ce){ce.style("pointer-events","all")}),B=0;B0?[0]:[]);W.enter().append("g").classed(a.containerClassName,!0).style("cursor",L?null:"ew-resize");function $(Y){Y._commandObserver&&(Y._commandObserver.remove(),delete Y._commandObserver),_.autoMargin(O,f(Y))}if(W.exit().each(function(){v.select(this).selectAll("g."+a.groupClassName).each($)}).remove(),B.length!==0){var ue=W.selectAll("g."+a.groupClassName).data(B,c);ue.enter().append("g").classed(a.groupClassName,!0),ue.exit().each($).remove();for(var ce=0;ce0&&(ue=ue.transition().duration(O.transition.duration).ease(O.transition.easing)),ue.attr("transform",t($-a.gripWidth*.5,O._dims.currentValueTotalHeight))}}function D(N,O){var L=N._dims;return L.inputAreaStart+a.stepInset+(L.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,O))}function P(N,O){var L=N._dims;return Math.min(1,Math.max(0,(O-a.stepInset-L.inputAreaStart)/(L.inputAreaLength-2*a.stepInset-2*L.inputAreaStart)))}function z(N,O,L){var U=L._dims,B=e.ensureSingle(N,"rect",a.railTouchRectClass,function(W){W.call(d,O,N,L).style("pointer-events","all")});B.attr({width:U.inputAreaLength,height:Math.max(U.inputAreaWidth,a.tickOffset+L.ticklen+U.labelHeight)}).call(S.fill,L.bgcolor).attr("opacity",0),M.setTranslate(B,0,U.currentValueTotalHeight)}function F(N,O){var L=O._dims,U=L.inputAreaLength-a.railInset*2,B=e.ensureSingle(N,"rect",a.railRectClass);B.attr({width:U,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(S.stroke,O.bordercolor).call(S.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px"),M.setTranslate(B,a.railInset,(L.inputAreaWidth-a.railWidth)*.5+L.currentValueTotalHeight)}}}),A9=He({"src/components/sliders/index.js"(Z,q){"use strict";var v=O_();q.exports={moduleType:"component",name:v.name,layoutAttributes:G5(),supplyLayoutDefaults:w9(),draw:T9()}}}),O2=He({"src/components/rangeslider/attributes.js"(Z,q){"use strict";var v=sh();q.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.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"}}}),H5=He({"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=He({"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}}}),S9=He({"src/components/rangeslider/helpers.js"(Z){"use strict";var q=tf(),v=su(),_=B2(),S=uh().LINE_SPACING,M=_.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=nt.max)je=pe[at+1];else if(Pe=nt.pmax)je=pe[at+1];else if(Pe0?d.touches[0].clientX:0}function m(d,u,g,y){if(u._context.staticPlot)return;var D=d.select("rect."+h.slideBoxClassName).node(),P=d.select("rect."+h.grabAreaMinClassName).node(),z=d.select("rect."+h.grabAreaMaxClassName).node();function F(){var N=v.event,O=N.target,L=f(N),U=L-d.node().getBoundingClientRect().left,B=y.d2p(g._rl[0]),W=y.d2p(g._rl[1]),$=n.coverSlip();this.addEventListener("touchmove",ue),this.addEventListener("touchend",ce),$.addEventListener("mousemove",ue),$.addEventListener("mouseup",ce);function ue(de){var Y=f(de),X=+Y-L,Q,V,le;switch(O){case D:if(le="ew-resize",B+X>g._length||W+X<0)return;Q=B+X,V=W+X;break;case P:if(le="col-resize",B+X>g._length)return;Q=B+X,V=W;break;case z:if(le="col-resize",W+X<0)return;Q=B,V=W+X;break;default:le="ew-resize",Q=U,V=U+X;break}if(V0);if(x){var w=o(n,s,h);T("x",w[0]),T("y",w[1]),v.noneOrAll(i,n,["x","y"]),T("xanchor"),T("yanchor"),v.coerceFont(T,"font",s.font);var A=T("bgcolor");T("activecolor",_.contrast(A,t.lightAmount,t.darkAmount)),T("bordercolor"),T("borderwidth")}};function r(a,i,n,s){var h=s.calendar;function f(T,l){return v.coerce(a,i,e.buttons,T,l)}var m=f("visible");if(m){var c=f("step");c!=="all"&&(h&&h!=="gregorian"&&(c==="month"||c==="year")?i.stepmode="backward":f("stepmode"),f("count")),f("label")}}function o(a,i,n){for(var s=n.filter(function(c){return i[c].anchor===a._id}),h=0,f=0;f1)){delete h.grid;return}if(!T&&!l&&!x){var g=b("pattern")==="independent";g&&(T=!0)}p._hasSubplotGrid=T;var y=b("roworder"),D=y==="top to bottom",P=T?.2:.1,z=T?.3:.1,F,N;w&&h._splomGridDflt&&(F=h._splomGridDflt.xside,N=h._splomGridDflt.yside),p._domains={x:a("x",b,P,F,u),y:a("y",b,z,N,d,D)}}function a(s,h,f,m,c,T){var l=h(s+"gap",f),x=h("domain."+s);h(s+"side",m);for(var w=new Array(c),A=x[0],E=(x[1]-A)/(c-l),p=E*(1-l),b=0;b0,m=r._context.staticPlot;o.each(function(c){var T=c[0].trace,l=T.error_x||{},x=T.error_y||{},w;T.ids&&(w=function(b){return b.id});var A=M.hasMarkers(T)&&T.marker.maxdisplayed>0;!x.visible&&!l.visible&&(c=[]);var E=v.select(this).selectAll("g.errorbar").data(c,w);if(E.exit().remove(),!!c.length){l.visible||E.selectAll("path.xerror").remove(),x.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var p=E.enter().append("g").classed("errorbar",!0);f&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),S.setClipUrl(E,a.layerClipId,r),E.each(function(b){var d=v.select(this),u=e(b,s,h);if(!(A&&!b.vis)){var g,y=d.select("path.yerror");if(x.visible&&_(u.x)&&_(u.yh)&&_(u.ys)){var D=x.width;g="M"+(u.x-D)+","+u.yh+"h"+2*D+"m-"+D+",0V"+u.ys,u.noYS||(g+="m-"+D+",0h"+2*D),n=!y.size(),n?y=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):f&&(y=y.transition().duration(i.duration).ease(i.easing)),y.attr("d",g)}else y.remove();var P=d.select("path.xerror");if(l.visible&&_(u.y)&&_(u.xh)&&_(u.xs)){var z=(l.copy_ystyle?x:l).width;g="M"+u.xh+","+(u.y-z)+"v"+2*z+"m0,-"+z+"H"+u.xs,u.noXS||(g+="m0,-"+z+"v"+2*z),n=!P.size(),n?P=d.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):f&&(P=P.transition().duration(i.duration).ease(i.easing)),P.attr("d",g)}else P.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),_(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),_(a.xs)||(a.noXS=!0,a.xs=r.c2p(t.xs,!0))),a}}}),O9=He({"src/components/errorbars/style.js"(Z,q){"use strict";var v=Vn(),_=$n();q.exports=function(M){M.each(function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=v.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(_.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(_.stroke,o.color)})}}}),B9=He({"src/components/errorbars/index.js"(Z,q){"use strict";var v=sa(),_=pc().overrideAll,S=Z5(),M={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S)};delete M.error_x.copy_zstyle,delete M.error_y.copy_zstyle,delete M.error_y.copy_ystyle;var e={error_x:v.extendFlat({},S),error_y:v.extendFlat({},S),error_z:v.extendFlat({},S)};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:_(e,"calc","nested"),scattergl:_(M,"calc","nested")}},supplyDefaults:D9(),calc:z9(),makeComputeError:Y5(),plot:F9(),style:O9(),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))}}}),N9=He({"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"}}}}),U9=He({"src/components/colorbar/draw.js"(Z,q){"use strict";var v=Vn(),_=Ch(),S=bc(),M=so(),e=Wo(),t=Ap(),r=sa(),o=r.strTranslate,a=rs().extendFlat,i=Kd(),n=as(),s=$n(),h=K0(),f=su(),m=wp().flipScale,c=F_(),T=R2(),l=Xh(),x=uh(),w=x.LINE_SPACING,A=x.FROM_TL,E=x.FROM_BR,p=N9().cn;function b(P){var z=P._fullLayout,F=z._infolayer.selectAll("g."+p.colorbar).data(d(P),function(N){return N._id});F.enter().append("g").attr("class",function(N){return N._id}).classed(p.colorbar,!0),F.each(function(N){var O=v.select(this);r.ensureSingle(O,"rect",p.cbbg),r.ensureSingle(O,"g",p.cbfills),r.ensureSingle(O,"g",p.cblines),r.ensureSingle(O,"g",p.cbaxis,function(U){U.classed(p.crisp,!0)}),r.ensureSingle(O,"g",p.cbtitleunshift,function(U){U.append("g").classed(p.cbtitle,!0)}),r.ensureSingle(O,"rect",p.cboutline);var L=u(O,N,P);L&&L.then&&(P._promises||[]).push(L),P._context.edits.colorbarPosition&&g(O,N,P)}),F.exit().each(function(N){S.autoMargin(P,N._id)}).remove(),F.order()}function d(P){var z=P._fullLayout,F=P.calcdata,N=[],O,L,U,B;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 $(){typeof B.calc=="function"?B.calc(P,U,O):(O._fillgradient=L.reversescale?m(L.colorscale):L.colorscale,O._zrange=[L[B.min],L[B.max]])}for(var ue=0;ue1){var Fe=Math.pow(10,Math.floor(Math.log(_t)/Math.LN10));kr*=Fe*r.roundUp(_t/Fe,[2,5,10]),(Math.abs(at.start)/at.size+1e-6)%1<2e-6&&(vr.tick0=0)}vr.dtick=kr}vr.domain=N?[Vt+X/ee.h,Vt+Ce-X/ee.h]:[Vt+Y/ee.w,Vt+Ce-Y/ee.w],vr.setScale(),P.attr("transform",o(Math.round(ee.l),Math.round(ee.t)));var Ye=P.select("."+p.cbtitleunshift).attr("transform",o(-Math.round(ee.l),-Math.round(ee.t))),Ae=vr.ticklabelposition,Le=vr.title.font.size,We=P.select("."+p.cbaxis),Ke,st=0,ot=0;function Ut(or,nr){var Pr={propContainer:vr,propName:z._propPrefix+"title.text",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:P.select("."+p.cbtitle)},_a=or.charAt(0)==="h"?or.slice(1):"h"+or;P.selectAll("."+_a+",."+_a+"-math-group").remove(),h.draw(F,or,a(Pr,nr||{}))}function Ct(){if(N&&qr||!N&&!qr){var or,nr;Se==="top"&&(or=Y+ee.l+Ze*Q,nr=X+ee.t+rt*(1-Vt-Ce)+3+Le*.75),Se==="bottom"&&(or=Y+ee.l+Ze*Q,nr=X+ee.t+rt*(1-Vt)-3-Le*.25),Se==="right"&&(nr=X+ee.t+rt*V+3+Le*.75,or=Y+ee.l+Ze*Vt),Ut(vr._id+"title",{attributes:{x:or,y:nr,"text-anchor":N?"start":"middle"}})}}function Pt(){if(N&&!qr||!N&&qr){var or=vr.position||0,nr=vr._offset+vr._length/2,Pr,_a;if(Se==="right")_a=nr,Pr=ee.l+Ze*or+10+Le*(vr.showticklabels?1:.5);else if(Pr=nr,Se==="bottom"&&(_a=ee.t+rt*or+10+(Ae.indexOf("inside")===-1?vr.tickfont.size:0)+(vr.ticks!=="inside"&&z.ticklen||0)),Se==="top"){var Fa=we.text.split("
").length;_a=ee.t+rt*or+10-he-w*Le*Fa}Ut((N?"h":"v")+vr._id+"title",{avoid:{selection:v.select(F).selectAll("g."+vr._id+"tick"),side:Se,offsetTop:N?0:ee.t,offsetLeft:N?ee.l:0,maxShift:N?j.width:j.height},attributes:{x:Pr,y:_a,"text-anchor":"middle"},transform:{rotate:N?-90:0,offset:0}})}}function jt(){if(!N&&!qr||N&&qr){var or=P.select("."+p.cbtitle),nr=or.select("text"),Pr=[-W/2,W/2],_a=or.select(".h"+vr._id+"title-math-group").node(),Fa=15.6;nr.node()&&(Fa=parseInt(nr.node().style.fontSize,10)*w);var Ra;if(_a?(Ra=n.bBox(_a),ot=Ra.width,st=Ra.height,st>Fa&&(Pr[1]-=(st-Fa)/2)):nr.node()&&!nr.classed(p.jsPlaceholder)&&(Ra=n.bBox(nr.node()),ot=Ra.width,st=Ra.height),N){if(st){if(st+=5,Se==="top")vr.domain[1]-=st/ee.h,Pr[1]*=-1;else{vr.domain[0]+=st/ee.h;var qa=f.lineCount(nr);Pr[1]+=(1-qa)*Fa}or.attr("transform",o(Pr[0],Pr[1])),vr.setScale()}}else ot&&(Se==="right"&&(vr.domain[0]+=(ot+Le/2)/ee.w),or.attr("transform",o(Pr[0],Pr[1])),vr.setScale())}P.selectAll("."+p.cbfills+",."+p.cblines).attr("transform",N?o(0,Math.round(ee.h*(1-vr.domain[1]))):o(Math.round(ee.w*vr.domain[0]),0)),We.attr("transform",N?o(0,Math.round(-ee.t)):o(Math.round(-ee.l),0));var Wa=P.select("."+p.cbfills).selectAll("rect."+p.cbfill).attr("style","").data(tt);Wa.enter().append("rect").classed(p.cbfill,!0).attr("style",""),Wa.exit().remove();var Ca=Re.map(vr.c2p).map(Math.round).sort(function(Zt,Jt){return Zt-Jt});Wa.each(function(Zt,Jt){var Fr=[Jt===0?Re[0]:(tt[Jt]+tt[Jt-1])/2,Jt===tt.length-1?Re[1]:(tt[Jt]+tt[Jt+1])/2].map(vr.c2p).map(Math.round);N&&(Fr[1]=r.constrain(Fr[1]+(Fr[1]>Fr[0])?1:-1,Ca[0],Ca[1]));var ta=v.select(this).attr(N?"x":"y",Je).attr(N?"y":"x",v.min(Fr)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(v.max(Fr)-v.min(Fr),2));if(z._fillgradient)n.gradient(ta,F,z._id,N?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ra=je(Zt).replace("e-","");ta.attr("fill",_(ra).toHexString())}});var hi=P.select("."+p.cblines).selectAll("path."+p.cbline).data(pe.color&&pe.width?Ve:[]);hi.enter().append("path").classed(p.cbline,!0),hi.exit().remove(),hi.each(function(Zt){var Jt=Je,Fr=Math.round(vr.c2p(Zt))+pe.width/2%1;v.select(this).attr("d","M"+(N?Jt+","+Fr:Fr+","+Jt)+(N?"h":"v")+he).call(n.lineGroupStyle,pe.width,Pe(Zt),pe.dash)}),We.selectAll("g."+vr._id+"tick,path").remove();var wi=Je+he+(W||0)/2-(z.ticks==="outside"?1:0),Yt=e.calcTicks(vr),Rt=e.getTickSigns(vr)[2];return e.drawTicks(F,vr,{vals:vr.ticks==="inside"?e.clipEnds(vr,Yt):Yt,layer:We,path:e.makeTickPath(vr,wi,Rt),transFn:e.makeTransTickFn(vr)}),e.drawLabels(F,vr,{vals:Yt,layer:We,transFn:e.makeTransTickLabelFn(vr),labelFns:e.makeLabelFns(vr,wi)})}function cr(){var or,nr=he+W/2;Ae.indexOf("inside")===-1&&(or=n.bBox(We.node()),nr+=N?or.width:or.height),Ke=Ye.select("text");var Pr=0,_a=N&&Se==="top",Fa=!N&&Se==="right",Ra=0;if(Ke.node()&&!Ke.classed(p.jsPlaceholder)){var qa,Wa=Ye.select(".h"+vr._id+"title-math-group").node();Wa&&(N&&qr||!N&&!qr)?(or=n.bBox(Wa),Pr=or.width,qa=or.height):(or=n.bBox(Ye.node()),Pr=or.right-ee.l-(N?Je:Ar),qa=or.bottom-ee.t-(N?Ar:Je),!N&&Se==="top"&&(nr+=or.height,Ra=or.height)),Fa&&(Ke.attr("transform",o(Pr/2+Le/2,0)),Pr*=2),nr=Math.max(nr,N?Pr:qa)}var Ca=(N?Y:X)*2+nr+$+W/2,hi=0;!N&&we.text&&de==="bottom"&&V<=0&&(hi=Ca/2,Ca+=hi,Ra+=hi),j._hColorbarMoveTitle=hi,j._hColorbarMoveCBTitle=Ra;var wi=$+W,Yt=(N?Je:Ar)-wi/2-(N?Y:0),Rt=(N?Ar:Je)-(N?ne:X+Ra-hi);P.select("."+p.cbbg).attr("x",Yt).attr("y",Rt).attr(N?"width":"height",Math.max(Ca-hi,2)).attr(N?"height":"width",Math.max(ne+wi,2)).call(s.fill,ue).call(s.stroke,z.bordercolor).style("stroke-width",$);var Zt=Fa?Math.max(Pr-10,0):0;P.selectAll("."+p.cboutline).attr("x",(N?Je:Ar+Y)+Zt).attr("y",(N?Ar+X-ne:Je)+(_a?st:0)).attr(N?"width":"height",Math.max(he,2)).attr(N?"height":"width",Math.max(ne-(N?2*X+st:2*Y+Zt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":W});var Jt=N?St*Ca:0,Fr=N?0:(1-kt)*Ca-Ra;if(Jt=ae?ee.l-Jt:-Jt,Fr=le?ee.t-Fr:-Fr,P.attr("transform",o(Jt,Fr)),!N&&($||_(ue).getAlpha()&&!_.equals(j.paper_bgcolor,ue))){var ta=We.selectAll("text"),ra=ta[0].length,ca=P.select("."+p.cbbg).node(),Ba=n.bBox(ca),$a=n.getTranslate(P),Za=2;ta.each(function(Cr,wr){var Rr=0,Nr=ra-1;if(wr===Rr||wr===Nr){var Hr=n.bBox(this),gt=n.getTranslate(this),Kt;if(wr===Nr){var mr=Hr.right+gt.x,Ir=Ba.right+$a.x+Ar-$-Za+Q;Kt=Ir-mr,Kt>0&&(Kt=0)}else if(wr===Rr){var va=Hr.left+gt.x,Pa=Ba.left+$a.x+Ar+$+Za;Kt=Pa-va,Kt<0&&(Kt=0)}Kt&&(ra<3?this.setAttribute("transform","translate("+Kt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ri={},pi=A[ce],Ia=E[ce],rn=A[de],tn=E[de],cn=Ca-he;N?(L==="pixels"?(ri.y=V,ri.t=ne*rn,ri.b=ne*tn):(ri.t=ri.b=0,ri.yt=V+O*rn,ri.yb=V-O*tn),B==="pixels"?(ri.x=Q,ri.l=Ca*pi,ri.r=Ca*Ia):(ri.l=cn*pi,ri.r=cn*Ia,ri.xl=Q-U*pi,ri.xr=Q+U*Ia)):(L==="pixels"?(ri.x=Q,ri.l=ne*pi,ri.r=ne*Ia):(ri.l=ri.r=0,ri.xl=Q+O*pi,ri.xr=Q-O*Ia),B==="pixels"?(ri.y=1-V,ri.t=Ca*rn,ri.b=Ca*tn):(ri.t=cn*rn,ri.b=cn*tn,ri.yt=V-U*rn,ri.yb=V+U*tn));var xt=z.y<.5?"b":"t",ut=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Or={r:j.width-Yt-Jt,l:Yt+ri.r,b:j.height-Rt-Fr,t:Rt+ri.b};ae&&le?S.autoMargin(F,z._id,ri):ae?F._fullLayout._reservedMargin[z._id][xt]=Or[xt]:le||N?F._fullLayout._reservedMargin[z._id][ut]=Or[ut]:F._fullLayout._reservedMargin[z._id][xt]=Or[xt]}return r.syncOrAsync([S.previousPromises,Ct,jt,Pt,S.previousPromises,cr],F)}function g(P,z,F){var N=z.orientation==="v",O=F._fullLayout,L=O._size,U,B,W;t.init({element:P.node(),gd:F,prepFn:function(){U=P.attr("transform"),i(P)},moveFn:function($,ue){P.attr("transform",U+o($,ue)),B=t.align((N?z._uFrac:z._vFrac)+$/L.w,N?z._thickFrac:z._lenFrac,0,1,z.xanchor),W=t.align((N?z._vFrac:1-z._uFrac)-ue/L.h,N?z._lenFrac:z._thickFrac,0,1,z.yanchor);var ce=t.getCursor(B,W,z.xanchor,z.yanchor);i(P,ce)},doneFn:function(){if(i(P),B!==void 0&&W!==void 0){var $={};$[z._propPrefix+"x"]=B,$[z._propPrefix+"y"]=W,z._traceIndex!==void 0?M.call("_guiRestyle",F,$,z._traceIndex):M.call("_guiRelayout",F,$)}}})}function y(P,z,F){var N=z._levels,O=[],L=[],U,B,W=N.end+N.size/100,$=N.size,ue=1.001*F[0]-.001*F[1],ce=1.001*F[1]-.001*F[0];for(B=0;B<1e5&&(U=N.start+B*$,!($>0?U>=W:U<=W));B++)U>ue&&U0?U>=W:U<=W));B++)U>F[0]&&U-1}q.exports=function(o,a){var i,n=o.data,s=o.layout,h=M([],n),f=M({},s,e(a.tileClass)),m=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 c=Object.keys(f);for(i=0;i=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&v(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function f(m,c,T,l,x,w){w=w||{};var A=w.moduleHasSelected!==!1,E=w.moduleHasUnselected!==!1,p=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,d=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,g=!!w.hasPathbar,y=Array.isArray(x)||x==="auto",D=y||x==="inside",P=y||x==="outside";if(D||P){var z=i(l,"textfont",T.font),F=_.extendFlat({},z),N=m.textfont&&m.textfont.color,O=!N;if(O&&delete F.color,i(l,"insidetextfont",F),g){var L=_.extendFlat({},z);O&&delete L.color,i(l,"pathbar.textfont",L)}P&&i(l,"outsidetextfont",z),A&&l("selected.textfont.color"),E&&l("unselected.textfont.color"),p&&l("constraintext"),b&&l("cliponaxis"),d&&l("textangle"),l("texttemplate"),l("texttemplatefallback")}D&&u&&l("insidetextanchor")}q.exports={supplyDefaults:n,crossTraceDefaults:s,handleText:f,validateCornerradius:h}}}),J5=He({"src/traces/bar/layout_defaults.js"(Z,q){"use strict";var v=so(),_=Wo(),S=sa(),M=U2(),e=gd().validateCornerradius;q.exports=function(t,r,o){function a(A,E){return S.coerce(t,r,M,A,E)}for(var i=!1,n=!1,s=!1,h={},f=a("barmode"),m=f==="group",c=0;c0&&!h[l]&&(s=!0),h[l]=!0),T.visible&&T.type==="histogram"){var x=_.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);x.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)}}}),B_=He({"src/traces/bar/arrays_to_calcdata.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){for(var e=0;er;if(!o)return M}return e!==void 0?e:S.dflt},Z.coerceColor=function(S,M,e){return v(M).isValid()?M:e!==void 0?e:S.dflt},Z.coerceEnumerated=function(S,M,e){return S.coerceNumber&&(M=+M),S.values.indexOf(M)!==-1?M:e!==void 0?e:S.dflt},Z.getValue=function(S,M){var e;return _(S)?M1||g.bargap===0&&g.bargroupgap===0&&!y[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),d.selectAll("g.points").each(function(y){var D=v.select(this),P=y[0].trace;h(D,P,b)}),e.getComponentMethod("errorbars","style")(d)}function h(b,d,u){S.pointStyle(b.selectAll("path"),d,u),f(b,d,u)}function f(b,d,u){b.selectAll("text").each(function(g){var y=v.select(this),D=M.ensureUniformFontSize(u,l(y,g,d,u));S.font(y,D)})}function m(b,d,u){var g=d[0].trace;g.selectedpoints?c(u,g,b):(h(u,g,b),e.getComponentMethod("errorbars","style")(u))}function c(b,d,u){S.selectedPointStyle(b.selectAll("path"),d),T(b.selectAll("text"),d,u)}function T(b,d,u){b.each(function(g){var y=v.select(this),D;if(g.selected){D=M.ensureUniformFontSize(u,l(y,g,d,u));var P=d.selected.textfont&&d.selected.textfont.color;P&&(D.color=P),S.font(y,D)}else S.selectedTextStyle(y,d)})}function l(b,d,u,g){var y=g._fullLayout.font,D=u.textfont;if(b.classed("bartext-inside")){var P=p(d,u);D=w(u,d.i,y,P)}else b.classed("bartext-outside")&&(D=A(u,d.i,y));return D}function x(b,d,u){return E(o,b.textfont,d,u)}function w(b,d,u,g){var y=x(b,d,u),D=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[d]===void 0;return D&&(y={color:_.contrast(g),family:y.family,size:y.size,weight:y.weight,style:y.style,variant:y.variant,textcase:y.textcase,lineposition:y.lineposition,shadow:y.shadow}),E(a,b.insidetextfont,d,y)}function A(b,d,u){var g=x(b,d,u);return E(i,b.outsidetextfont,d,g)}function E(b,d,u,g){d=d||{};var y=n.getValue(d.family,u),D=n.getValue(d.size,u),P=n.getValue(d.color,u),z=n.getValue(d.weight,u),F=n.getValue(d.style,u),N=n.getValue(d.variant,u),O=n.getValue(d.textcase,u),L=n.getValue(d.lineposition,u),U=n.getValue(d.shadow,u);return{family:n.coerceString(b.family,y,g.family),size:n.coerceNumber(b.size,D,g.size),color:n.coerceColor(b.color,P,g.color),weight:n.coerceString(b.weight,z,g.weight),style:n.coerceString(b.style,F,g.style),variant:n.coerceString(b.variant,N,g.variant),textcase:n.coerceString(b.variant,O,g.textcase),lineposition:n.coerceString(b.variant,L,g.lineposition),shadow:n.coerceString(b.variant,U,g.shadow)}}function p(b,d){return d.type==="waterfall"?d[b.dir].marker.color:b.mcc||b.mc||d.marker.color}q.exports={style:s,styleTextPoints:f,styleOnSelect:m,getInsideTextFont:w,getOutsideTextFont:A,getBarColor:p,resizeText:t}}}),tg=He({"src/traces/bar/plot.js"(Z,q){"use strict";var v=Vn(),_=ns(),S=sa(),M=su(),e=$n(),t=as(),r=so(),o=Wo().tickText,a=Sp(),i=a.recordMinTextSize,n=a.clearMinTextSize,s=Nd(),h=q2(),f=n0(),m=Sv(),c=m.text,T=m.textposition,l=$p().appendArrayPointValue,x=f.TEXTPAD;function w($){return $.id}function A($){if($.ids)return w}function E($){return($>0)-($<0)}function p($,ue){return $0}function g($,ue,ce,de,Y,X){var Q=ue.xaxis,V=ue.yaxis,le=$._fullLayout,ae=$._context.staticPlot;Y||(Y={mode:le.barmode,norm:le.barmode,gap:le.bargap,groupgap:le.bargroupgap},n("bar",le));var j=S.makeTraceGroups(de,ce,"trace bars").each(function(ee){var te=v.select(this),pe=ee[0].trace,we=ee[0].t,Se=pe.type==="waterfall",Re=pe.type==="funnel",Pe=pe.type==="histogram",je=pe.type==="bar",at=je||Re,nt=0;Se&&pe.connector.visible&&pe.connector.mode==="between"&&(nt=pe.connector.line.width/2);var tt=pe.orientation==="h",Ve=u(Y),he=S.ensureSingle(te,"g","points"),se=A(pe),ne=he.selectAll("g.point").data(S.identity,se);ne.enter().append("g").classed("point",!0),ne.exit().remove(),ne.each(function(Ze,rt){var Je=v.select(this),St=b(Ze,Q,V,tt),kt=St[0][0],Bt=St[0][1],Vt=St[1][0],Ar=St[1][1],vr=(tt?Bt-kt:Ar-Vt)===0;vr&&at&&h.getLineWidth(pe,Ze)&&(vr=!1),vr||(vr=!_(kt)||!_(Bt)||!_(Vt)||!_(Ar)),Ze.isBlank=vr,vr&&(tt?Bt=kt:Ar=Vt),nt&&!vr&&(tt?(kt-=p(kt,Bt)*nt,Bt+=p(kt,Bt)*nt):(Vt-=p(Vt,Ar)*nt,Ar+=p(Vt,Ar)*nt));var qr,kr;if(pe.type==="waterfall"){if(!vr){var Ur=pe[Ze.dir].marker;qr=Ur.line.width,kr=Ur.color}}else qr=h.getLineWidth(pe,Ze),kr=Ze.mc||pe.marker.color;function _t(wi){var Yt=v.round(qr/2%1,2);return Y.gap===0&&Y.groupgap===0?v.round(Math.round(wi)-Yt,2):wi}function Fe(wi,Yt,Rt){return Rt&&wi===Yt?wi:Math.abs(wi-Yt)>=2?_t(wi):wi>Yt?Math.ceil(wi):Math.floor(wi)}var Ye=e.opacity(kr),Ae=Ye<1||qr>.01?_t:Fe;$._context.staticPlot||(kt=Ae(kt,Bt,tt),Bt=Ae(Bt,kt,tt),Vt=Ae(Vt,Ar,!tt),Ar=Ae(Ar,Vt,!tt));var Le=tt?Q.c2p:V.c2p,We;Ze.s0>0?We=Ze._sMax:Ze.s0<0?We=Ze._sMin:We=Ze.s1>0?Ze._sMax:Ze._sMin;function Ke(wi,Yt){if(!wi)return 0;var Rt=Math.abs(tt?Ar-Vt:Bt-kt),Zt=Math.abs(tt?Bt-kt:Ar-Vt),Jt=Ae(Math.abs(Le(We,!0)-Le(0,!0))),Fr=Ze.hasB?Math.min(Rt/2,Zt/2):Math.min(Rt/2,Jt),ta;if(Yt==="%"){var ra=Math.min(50,wi);ta=Rt*(ra/100)}else ta=wi;return Ae(Math.max(Math.min(ta,Fr),0))}var st=je||Pe?Ke(we.cornerradiusvalue,we.cornerradiusform):0,ot,Ut,Ct="M"+kt+","+Vt+"V"+Ar+"H"+Bt+"V"+Vt+"Z",Pt=0;if(st&&Ze.s){var jt=E(Ze.s0)===0||E(Ze.s)===E(Ze.s0)?Ze.s1:Ze.s0;if(Pt=Ae(Ze.hasB?0:Math.abs(Le(We,!0)-Le(jt,!0))),Pt0?Math.sqrt(Pt*(2*st-Pt)):0,Fa=cr>0?Math.max:Math.min;ot="M"+kt+","+Vt+"V"+(Ar-Pr*or)+"H"+Fa(Bt-(st-Pt)*cr,kt)+"A "+st+","+st+" 0 0 "+nr+" "+Bt+","+(Ar-st*or-_a)+"V"+(Vt+st*or+_a)+"A "+st+","+st+" 0 0 "+nr+" "+Fa(Bt-(st-Pt)*cr,kt)+","+(Vt+Pr*or)+"Z"}else if(Ze.hasB)ot="M"+(kt+st*cr)+","+Vt+"A "+st+","+st+" 0 0 "+nr+" "+kt+","+(Vt+st*or)+"V"+(Ar-st*or)+"A "+st+","+st+" 0 0 "+nr+" "+(kt+st*cr)+","+Ar+"H"+(Bt-st*cr)+"A "+st+","+st+" 0 0 "+nr+" "+Bt+","+(Ar-st*or)+"V"+(Vt+st*or)+"A "+st+","+st+" 0 0 "+nr+" "+(Bt-st*cr)+","+Vt+"Z";else{Ut=Math.abs(Ar-Vt)+Pt;var Ra=Ut0?Math.sqrt(Pt*(2*st-Pt)):0,Wa=or>0?Math.max:Math.min;ot="M"+(kt+Ra*cr)+","+Vt+"V"+Wa(Ar-(st-Pt)*or,Vt)+"A "+st+","+st+" 0 0 "+nr+" "+(kt+st*cr-qa)+","+Ar+"H"+(Bt-st*cr+qa)+"A "+st+","+st+" 0 0 "+nr+" "+(Bt-Ra*cr)+","+Wa(Ar-(st-Pt)*or,Vt)+"V"+Vt+"Z"}}else ot=Ct}else ot=Ct;var Ca=d(S.ensureSingle(Je,"path"),le,Y,X);if(Ca.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((Bt-kt)*(Ar-Vt))||vr&&$._context.staticPlot?"M0,0Z":ot).call(t.setClipUrl,ue.layerClipId,$),!le.uniformtext.mode&&Ve){var hi=t.makePointStyleFns(pe);t.singlePointStyle(Ze,Ca,pe,hi,$)}y($,ue,Je,ee,rt,kt,Bt,Vt,Ar,st,Pt,Y,X),ue.layerClipId&&t.hideOutsideRangePoint(Ze,Je.select("text"),Q,V,pe.xcalendar,pe.ycalendar)});var Ce=pe.cliponaxis===!1;t.setClipUrl(te,Ce?null:ue.layerClipId,$)});r.getComponentMethod("errorbars","plot")($,j,ue,Y)}function y($,ue,ce,de,Y,X,Q,V,le,ae,j,ee,te){var pe=ue.xaxis,we=ue.yaxis,Se=$._fullLayout,Re;function Pe(Ut,Ct,Pt){var jt=S.ensureSingle(Ut,"text").text(Ct).attr({class:"bartext bartext-"+Re,"text-anchor":"middle","data-notex":1}).call(t.font,Pt).call(M.convertToTspans,$);return jt}var je=de[0].trace,at=je.orientation==="h",nt=L(Se,de,Y,pe,we);Re=U(je,Y);var tt=ee.mode==="stack"||ee.mode==="relative",Ve=de[Y],he=!tt||Ve._outmost,se=Ve.hasB,ne=ae&&ae-j>x;if(!nt||Re==="none"||(Ve.isBlank||X===Q||V===le)&&(Re==="auto"||Re==="inside")){ce.select("text").remove();return}var Ce=Se.font,Ze=s.getBarColor(de[Y],je),rt=s.getInsideTextFont(je,Y,Ce,Ze),Je=s.getOutsideTextFont(je,Y,Ce),St=je.insidetextanchor||"end",kt=ce.datum();at?pe.type==="log"&&kt.s0<=0&&(pe.range[0]0&&_t>0,Ae;ne?se?Ae=D(Ar-2*ae,vr,Ur,_t,at)||D(Ar,vr-2*ae,Ur,_t,at):at?Ae=D(Ar-(ae-j),vr,Ur,_t,at)||D(Ar,vr-2*(ae-j),Ur,_t,at):Ae=D(Ar,vr-(ae-j),Ur,_t,at)||D(Ar-2*(ae-j),vr,Ur,_t,at):Ae=D(Ar,vr,Ur,_t,at),Ye&&Ae?Re="inside":(Re="outside",qr.remove(),qr=null)}else Re="inside";if(!qr){Fe=S.ensureUniformFontSize($,Re==="outside"?Je:rt),qr=Pe(ce,nt,Fe);var Le=qr.attr("transform");if(qr.attr("transform",""),kr=t.bBox(qr.node()),Ur=kr.width,_t=kr.height,qr.attr("transform",Le),Ur<=0||_t<=0){qr.remove();return}}var We=je.textangle,Ke,st;Re==="outside"?(st=je.constraintext==="both"||je.constraintext==="outside",Ke=O(X,Q,V,le,kr,{isHorizontal:at,constrained:st,angle:We})):(st=je.constraintext==="both"||je.constraintext==="inside",Ke=F(X,Q,V,le,kr,{isHorizontal:at,constrained:st,angle:We,anchor:St,hasB:se,r:ae,overhead:j})),Ke.fontSize=Fe.size,i(je.type==="histogram"?"bar":je.type,Ke,Se),Ve.transform=Ke;var ot=d(qr,Se,ee,te);S.setTransormAndDisplay(ot,Ke)}function D($,ue,ce,de,Y){if($<0||ue<0)return!1;var X=ce<=$&&de<=ue,Q=ce<=ue&&de<=$,V=Y?$>=ce*(ue/de):ue>=de*($/ce);return X||Q||V}function P($){return $==="auto"?0:$}function z($,ue){var ce=Math.PI/180*ue,de=Math.abs(Math.sin(ce)),Y=Math.abs(Math.cos(ce));return{x:$.width*Y+$.height*de,y:$.width*de+$.height*Y}}function F($,ue,ce,de,Y,X){var Q=!!X.isHorizontal,V=!!X.constrained,le=X.angle||0,ae=X.anchor,j=ae==="end",ee=ae==="start",te=X.leftToRight||0,pe=(te+1)/2,we=1-pe,Se=X.hasB,Re=X.r,Pe=X.overhead,je=Y.width,at=Y.height,nt=Math.abs(ue-$),tt=Math.abs(de-ce),Ve=nt>2*x&&tt>2*x?x:0;nt-=2*Ve,tt-=2*Ve;var he=P(le);le==="auto"&&!(je<=nt&&at<=tt)&&(je>nt||at>tt)&&(!(je>tt||at>nt)||jex){var Ze=N($,ue,ce,de,se,Re,Pe,Q,Se);ne=Ze.scale,Ce=Ze.pad}else ne=1,V&&(ne=Math.min(1,nt/se.x,tt/se.y)),Ce=0;var rt=Y.left*we+Y.right*pe,Je=(Y.top+Y.bottom)/2,St=($+x)*we+(ue-x)*pe,kt=(ce+de)/2,Bt=0,Vt=0;if(ee||j){var Ar=(Q?se.x:se.y)/2;Re&&(j||Se)&&(Ve+=Ce);var vr=Q?p($,ue):p(ce,de);Q?ee?(St=$+vr*Ve,Bt=-vr*Ar):(St=ue-vr*Ve,Bt=vr*Ar):ee?(kt=ce+vr*Ve,Vt=-vr*Ar):(kt=de-vr*Ve,Vt=vr*Ar)}return{textX:rt,textY:Je,targetX:St,targetY:kt,anchorX:Bt,anchorY:Vt,scale:ne,rotate:he}}function N($,ue,ce,de,Y,X,Q,V,le){var ae=Math.max(0,Math.abs(ue-$)-2*x),j=Math.max(0,Math.abs(de-ce)-2*x),ee=X-x,te=Q?ee-Math.sqrt(ee*ee-(ee-Q)*(ee-Q)):ee,pe=le?ee*2:V?ee-Q:2*te,we=le?ee*2:V?2*te:ee-Q,Se,Re,Pe,je,at;return Y.y/Y.x>=j/(ae-pe)?je=j/Y.y:Y.y/Y.x<=(j-we)/ae?je=ae/Y.x:!le&&V?(Se=Y.x*Y.x+Y.y*Y.y/4,Re=-2*Y.x*(ae-ee)-Y.y*(j/2-ee),Pe=(ae-ee)*(ae-ee)+(j/2-ee)*(j/2-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)):le?(Se=(Y.x*Y.x+Y.y*Y.y)/4,Re=-Y.x*(ae/2-ee)-Y.y*(j/2-ee),Pe=(ae/2-ee)*(ae/2-ee)+(j/2-ee)*(j/2-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)):(Se=Y.x*Y.x/4+Y.y*Y.y,Re=-Y.x*(ae/2-ee)-2*Y.y*(j-ee),Pe=(ae/2-ee)*(ae/2-ee)+(j-ee)*(j-ee)-ee*ee,je=(-Re+Math.sqrt(Re*Re-4*Se*Pe))/(2*Se)),je=Math.min(1,je),V?at=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(j-Y.y*je)/2)*(ee-(j-Y.y*je)/2)))-Q):at=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(ae-Y.x*je)/2)*(ee-(ae-Y.x*je)/2)))-Q),{scale:je,pad:at}}function O($,ue,ce,de,Y,X){var Q=!!X.isHorizontal,V=!!X.constrained,le=X.angle||0,ae=Y.width,j=Y.height,ee=Math.abs(ue-$),te=Math.abs(de-ce),pe;Q?pe=te>2*x?x:0:pe=ee>2*x?x:0;var we=1;V&&(we=Q?Math.min(1,te/j):Math.min(1,ee/ae));var Se=P(le),Re=z(Y,Se),Pe=(Q?Re.x:Re.y)/2,je=(Y.left+Y.right)/2,at=(Y.top+Y.bottom)/2,nt=($+ue)/2,tt=(ce+de)/2,Ve=0,he=0,se=Q?p(ue,$):p(ce,de);return Q?(nt=ue-se*pe,Ve=se*Pe):(tt=de+se*pe,he=-se*Pe),{textX:je,textY:at,targetX:nt,targetY:tt,anchorX:Ve,anchorY:he,scale:we,rotate:Se}}function L($,ue,ce,de,Y){var X=ue[0].trace,Q=X.texttemplate,V;return Q?V=B($,ue,ce,de,Y):X.textinfo?V=W(ue,ce,de,Y):V=h.getValue(X.text,ce),h.coerceString(c,V)}function U($,ue){var ce=h.getValue($.textposition,ue);return h.coerceEnumerated(T,ce)}function B($,ue,ce,de,Y){var X=ue[0].trace,Q=S.castOption(X,ce,"texttemplate");if(!Q)return"";var V=X.type==="histogram",le=X.type==="waterfall",ae=X.type==="funnel",j=X.orientation==="h",ee,te,pe,we;j?(ee="y",te=Y,pe="x",we=de):(ee="x",te=de,pe="y",we=Y);function Se(Ve){return o(te,te.c2l(Ve),!0).text}function Re(Ve){return o(we,we.c2l(Ve),!0).text}var Pe=ue[ce],je={};je.label=Pe.p,je.labelLabel=je[ee+"Label"]=Se(Pe.p);var at=S.castOption(X,Pe.i,"text");(at===0||at)&&(je.text=at),je.value=Pe.s,je.valueLabel=je[pe+"Label"]=Re(Pe.s);var nt={};l(nt,X,Pe.i),(V||nt.x===void 0)&&(nt.x=j?je.value:je.label),(V||nt.y===void 0)&&(nt.y=j?je.label:je.value),(V||nt.xLabel===void 0)&&(nt.xLabel=j?je.valueLabel:je.labelLabel),(V||nt.yLabel===void 0)&&(nt.yLabel=j?je.labelLabel:je.valueLabel),le&&(je.delta=+Pe.rawS||Pe.s,je.deltaLabel=Re(je.delta),je.final=Pe.v,je.finalLabel=Re(je.final),je.initial=je.final-je.delta,je.initialLabel=Re(je.initial)),ae&&(je.value=Pe.s,je.valueLabel=Re(je.value),je.percentInitial=Pe.begR,je.percentInitialLabel=S.formatPercent(Pe.begR),je.percentPrevious=Pe.difR,je.percentPreviousLabel=S.formatPercent(Pe.difR),je.percentTotal=Pe.sumR,je.percenTotalLabel=S.formatPercent(Pe.sumR));var tt=S.castOption(X,Pe.i,"customdata");return tt&&(je.customdata=tt),S.texttemplateString({data:[nt,je,X._meta],fallback:X.texttemplatefallback,labels:je,locale:$._d3locale,template:Q})}function W($,ue,ce,de){var Y=$[0].trace,X=Y.orientation==="h",Q=Y.type==="waterfall",V=Y.type==="funnel";function le(tt){var Ve=X?de:ce;return o(Ve,tt,!0).text}function ae(tt){var Ve=X?ce:de;return o(Ve,+tt,!0).text}var j=Y.textinfo,ee=$[ue],te=j.split("+"),pe=[],we,Se=function(tt){return te.indexOf(tt)!==-1};if(Se("label")&&pe.push(le($[ue].p)),Se("text")&&(we=S.castOption(Y,ee.i,"text"),(we===0||we)&&pe.push(we)),Q){var Re=+ee.rawS||ee.s,Pe=ee.v,je=Pe-Re;Se("initial")&&pe.push(ae(je)),Se("delta")&&pe.push(ae(Re)),Se("final")&&pe.push(ae(Pe))}if(V){Se("value")&&pe.push(ae(ee.s));var at=0;Se("percent initial")&&at++,Se("percent previous")&&at++,Se("percent total")&&at++;var nt=at>1;Se("percent initial")&&(we=S.formatPercent(ee.begR),nt&&(we+=" of initial"),pe.push(we)),Se("percent previous")&&(we=S.formatPercent(ee.difR),nt&&(we+=" of previous"),pe.push(we)),Se("percent total")&&(we=S.formatPercent(ee.sumR),nt&&(we+=" of total"),pe.push(we))}return pe.join("
")}q.exports={plot:g,toMoveInsideBar:F}}}),f1=He({"src/traces/bar/hover.js"(Z,q){"use strict";var v=Hc(),_=so(),S=$n(),M=sa().fillText,e=q2().getLineWidth,t=Wo().hoverLabelText,r=Gs().BADNUM;function o(n,s,h,f,m){var c=a(n,s,h,f,m);if(c){var T=c.cd,l=T[0].trace,x=T[c.index];return c.color=i(l,x),_.getComponentMethod("errorbars","hoverInfo")(x,l,c),[c]}}function a(n,s,h,f,m){var c=n.cd,T=c[0].trace,l=c[0].t,x=f==="closest",w=T.type==="waterfall",A=n.maxHoverDistance,E=n.maxSpikeDistance,p,b,d,u,g,y,D;T.orientation==="h"?(p=h,b=s,d="y",u="x",g=de,y=$):(p=s,b=h,d="x",u="y",y=de,g=$);var P=T[d+"period"],z=x||P;function F(we){return O(we,-1)}function N(we){return O(we,1)}function O(we,Se){var Re=we.w;return we[d]+Se*Re/2}function L(we){return we[d+"End"]-we[d+"Start"]}var U=x?F:P?function(we){return we.p-L(we)/2}:function(we){return Math.min(F(we),we.p-l.bardelta/2)},B=x?N:P?function(we){return we.p+L(we)/2}:function(we){return Math.max(N(we),we.p+l.bardelta/2)};function W(we,Se,Re){return m.finiteRange&&(Re=0),v.inbox(we-p,Se-p,Re+Math.min(1,Math.abs(Se-we)/D)-1)}function $(we){return W(U(we),B(we),A)}function ue(we){return W(F(we),N(we),E)}function ce(we){var Se=we[u];if(w){var Re=Math.abs(we.rawS)||0;b>0?Se+=Re:b<0&&(Se-=Re)}return Se}function de(we){var Se=b,Re=we.b,Pe=ce(we);return v.inbox(Re-Se,Pe-Se,A+(Pe-Se)/(Pe-Re)-1)}function Y(we){var Se=b,Re=we.b,Pe=ce(we);return v.inbox(Re-Se,Pe-Se,E+(Pe-Se)/(Pe-Re)-1)}var X=n[d+"a"],Q=n[u+"a"];D=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function V(we){return(g(we)+y(we))/2}var le=v.getDistanceFunction(f,g,y,V);if(v.getClosest(c,le,n),n.index!==!1&&c[n.index].p!==r){z||(U=function(we){return Math.min(F(we),we.p-l.bargroupwidth/2)},B=function(we){return Math.max(N(we),we.p+l.bargroupwidth/2)});var ae=n.index,j=c[ae],ee=T.base?j.b+j.s:j.s;n[u+"0"]=n[u+"1"]=Q.c2p(j[u],!0),n[u+"LabelVal"]=ee;var te=l.extents[l.extents.round(j.p)];n[d+"0"]=X.c2p(x?U(j):te[0],!0),n[d+"1"]=X.c2p(x?B(j):te[1],!0);var pe=j.orig_p!==void 0;return n[d+"LabelVal"]=pe?j.orig_p:j.p,n.labelLabel=t(X,n[d+"LabelVal"],T[d+"hoverformat"]),n.valueLabel=t(Q,n[u+"LabelVal"],T[u+"hoverformat"]),n.baseLabel=t(Q,j.b,T[u+"hoverformat"]),n.spikeDistance=(Y(j)+ue(j))/2,n[d+"Spike"]=X.c2p(j.p,!0),M(j,T,n),n.hovertemplate=T.hovertemplate,n}}function i(n,s){var h=s.mcc||n.marker.color,f=s.mlcc||n.marker.line.color,m=e(n,s);if(S.opacity(h))return h;if(S.opacity(f)&&m)return f}q.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:i}}}),K9=He({"src/traces/bar/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),M.orientation==="h"?(_.label=_.y,_.value=_.x):(_.label=_.x,_.value=_.y),_}}}),h1=He({"src/traces/bar/select.js"(Z,q){"use strict";q.exports=function(S,M){var e=S.cd,t=S.xaxis,r=S.yaxis,o=e[0].trace,a=o.type==="funnel",i=o.orientation==="h",n=[],s;if(M===!1)for(s=0;s0?(P="v",d>0?z=Math.min(g,u):z=Math.min(u)):d>0?(P="h",z=Math.min(g)):z=0;if(!z){h.visible=!1;return}h._length=z;var U=f("orientation",P);h._hasPreCompStats?U==="v"&&d===0?(f("x0",0),f("dx",1)):U==="h"&&b===0&&(f("y0",0),f("dy",1)):U==="v"&&d===0?f("x0"):U==="h"&&b===0&&f("y0");var B=_.getComponentMethod("calendars","handleTraceDefaults");B(s,h,["x","y"],m)}function i(s,h,f,m){var c=m.prefix,T=v.coerce2(s,h,r,"marker.outliercolor"),l=f("marker.line.outliercolor"),x="outliers";h._hasPreCompStats?x="all":(T||l)&&(x="suspectedoutliers");var w=f(c+"points",x);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",h.line.color),f("marker.line.color"),f("marker.line.width"),w==="suspectedoutliers"&&(f("marker.line.outliercolor",h.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 h.marker;var A=f("hoveron");(A==="all"||A.indexOf("points")!==-1)&&(f("hovertemplate"),f("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(h,f)}function n(s,h){var f,m;function c(w){return v.coerce(m._input,m,r,w)}for(var T=0;Tce.uf};if(E._hasPreCompStats){var ae=E[z],j=function(vr){return P.d2c((E[vr]||[])[y])},ee=1/0,te=-1/0;for(y=0;y=ce.q1&&ce.q3>=ce.med){var we=j("lowerfence");ce.lf=we!==e&&we<=ce.q1?we:m(ce,Y,X);var Se=j("upperfence");ce.uf=Se!==e&&Se>=ce.q3?Se:c(ce,Y,X);var Re=j("mean");ce.mean=Re!==e?Re:X?M.mean(Y,X):(ce.q1+ce.q3)/2;var Pe=j("sd");ce.sd=Re!==e&&Pe>=0?Pe:X?M.stdev(Y,X,ce.mean):ce.q3-ce.q1,ce.lo=T(ce),ce.uo=l(ce);var je=j("notchspan");je=je!==e&&je>0?je:x(ce,X),ce.ln=ce.med-je,ce.un=ce.med+je;var at=ce.lf,nt=ce.uf;E.boxpoints&&Y.length&&(at=Math.min(at,Y[0]),nt=Math.max(nt,Y[X-1])),E.notched&&(at=Math.min(at,ce.ln),nt=Math.max(nt,ce.un)),ce.min=at,ce.max=nt}else{M.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ce.q1,"median = "+ce.med,"q3 = "+ce.q3].join(` +`));var tt;ce.med!==e?tt=ce.med:ce.q1!==e?ce.q3!==e?tt=(ce.q1+ce.q3)/2:tt=ce.q1:ce.q3!==e?tt=ce.q3:tt=0,ce.med=tt,ce.q1=ce.q3=tt,ce.lf=ce.uf=tt,ce.mean=ce.sd=tt,ce.ln=ce.un=tt,ce.min=ce.max=tt}ee=Math.min(ee,ce.min),te=Math.max(te,ce.max),ce.pts2=de.filter(le),u.push(ce)}}E._extremes[P._id]=_.findExtremes(P,[ee,te],{padded:!0})}else{var Ve=P.makeCalcdata(E,z),he=o($,ue),se=$.length,ne=a(se);for(y=0;y=0&&Ce0){if(ce={},ce.pos=ce[N]=$[y],de=ce.pts=ne[y].sort(h),Y=ce[z]=de.map(f),X=Y.length,ce.min=Y[0],ce.max=Y[X-1],ce.mean=M.mean(Y,X),ce.sd=M.stdev(Y,X,ce.mean)*E.sdmultiple,ce.med=M.interp(Y,.5),X%2&&(St||kt)){var Bt,Vt;St?(Bt=Y.slice(0,X/2),Vt=Y.slice(X/2+1)):kt&&(Bt=Y.slice(0,X/2+1),Vt=Y.slice(X/2)),ce.q1=M.interp(Bt,.5),ce.q3=M.interp(Vt,.5)}else ce.q1=M.interp(Y,.25),ce.q3=M.interp(Y,.75);ce.lf=m(ce,Y,X),ce.uf=c(ce,Y,X),ce.lo=T(ce),ce.uo=l(ce);var Ar=x(ce,X);ce.ln=ce.med-Ar,ce.un=ce.med+Ar,Ze=Math.min(Ze,ce.ln),rt=Math.max(rt,ce.un),ce.pts2=de.filter(le),u.push(ce)}E.notched&&M.isTypedArray(Ve)&&(Ve=Array.from(Ve)),E._extremes[P._id]=_.findExtremes(P,E.notched?Ve.concat([Ze,rt]):Ve,{padded:!0})}return s(u,E),u.length>0?(u[0].t={num:p[g],dPos:ue,posLetter:N,valLetter:z,labels:{med:t(A,"median:"),min:t(A,"min:"),q1:t(A,"q1:"),q3:t(A,"q3:"),max:t(A,"max:"),mean:E.boxmean==="sd"||E.sizemode==="sd"?t(A,"mean \xB1 \u03C3:").replace("\u03C3",E.sdmultiple===1?"\u03C3":E.sdmultiple+"\u03C3"):t(A,"mean:"),lf:t(A,"lower fence:"),uf:t(A,"upper fence:")}},p[g]++,u):[{t:{empty:!0}}]};function r(w,A,E,p){var b=A in w,d=A+"0"in w,u="d"+A in w;if(b||d&&u){var g=E.makeCalcdata(w,A),y=S(w,E,A,g).vals;return[y,g]}var D;d?D=w[A+"0"]:"name"in w&&(E.type==="category"||v(w.name)&&["linear","log"].indexOf(E.type)!==-1||M.isDateTime(w.name)&&E.type==="date")?D=w.name:D=p;for(var P=E.type==="multicategory"?E.r2c_just_indices(D):E.d2c(D,0,w[A+"calendar"]),z=w._length,F=new Array(z),N=0;N1,d=1-s[r+"gap"],u=1-s[r+"groupgap"];for(m=0;m0;if(P==="positive"?(ce=z*(D?1:.5),X=Y,de=X=N):P==="negative"?(ce=X=N,de=z*(D?1:.5),Q=Y):(ce=de=z,X=Q=Y),te){var pe=g.pointpos,we=g.jitter,Se=g.marker.size/2,Re=0;pe+we>=0&&(Re=Y*(pe+we),Re>ce?(ee=!0,ae=Se,V=Re):Re>X&&(ae=Se,V=ce)),Re<=ce&&(V=ce);var Pe=0;pe-we<=0&&(Pe=-Y*(pe-we),Pe>de?(ee=!0,j=Se,le=Pe):Pe>Q&&(j=Se,le=de)),Pe<=de&&(le=de)}else V=ce,le=de;var je=new Array(T.length);for(c=0;cE.lo&&(U.so=!0)}return b});A.enter().append("path").classed("point",!0),A.exit().remove(),A.call(S.translatePoints,f,m)}function a(i,n,s,h){var f=n.val,m=n.pos,c=!!m.rangebreaks,T=h.bPos,l=h.bPosPxOffset||0,x=s.boxmean||(s.meanline||{}).visible,w,A;Array.isArray(h.bdPos)?(w=h.bdPos[0],A=h.bdPos[1]):(w=h.bdPos,A=h.bdPos);var E=i.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?_.identity:[]);E.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),E.exit().remove(),E.each(function(p){var b=m.c2l(p.pos+T,!0),d=m.l2p(b-w)+l,u=m.l2p(b+A)+l,g=c?(d+u)/2:m.l2p(b)+l,y=f.c2p(p.mean,!0),D=f.c2p(p.mean-p.sd,!0),P=f.c2p(p.mean+p.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+y+","+d+"V"+u+(x==="sd"?"m0,0L"+D+","+g+"L"+y+","+d+"L"+P+","+g+"Z":"")):v.select(this).attr("d","M"+d+","+y+"H"+u+(x==="sd"?"m0,0L"+g+","+D+"L"+d+","+y+"L"+g+","+P+"Z":""))})}q.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=He({"src/traces/box/style.js"(Z,q){"use strict";var v=Vn(),_=$n(),S=as();function M(t,r,o){var a=o||v.select(t).selectAll("g.trace.boxes");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var n=v.select(this),s=i[0].trace,h=s.line.width;function f(T,l,x,w){T.style("stroke-width",l+"px").call(_.stroke,x).call(_.fill,w)}var m=n.selectAll("path.box");if(s.type==="candlestick")m.each(function(T){if(!T.empty){var l=v.select(this),x=s[T.dir];f(l,x.line.width,x.line.color,x.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{f(m,h,s.line.color,s.fillcolor),n.selectAll("path.mean").style({"stroke-width":h,"stroke-dasharray":2*h+"px,"+h+"px"}).call(_.stroke,s.line.color);var c=n.selectAll("path.point");S.pointStyle(c,s,t)}})}function e(t,r,o){var a=r[0].trace,i=o.selectAll("path.point");a.selectedpoints?S.selectedPointStyle(i,a):S.pointStyle(i,a,t)}q.exports={style:M,styleOnSelect:e}}}),Q5=He({"src/traces/box/hover.js"(Z,q){"use strict";var v=Wo(),_=sa(),S=Hc(),M=$n(),e=_.fillText;function t(a,i,n,s){var h=a.cd,f=h[0].trace,m=f.hoveron,c=[],T;return m.indexOf("boxes")!==-1&&(c=c.concat(r(a,i,n,s))),m.indexOf("points")!==-1&&(T=o(a,i,n)),s==="closest"?T?[T]:c:(T&&c.push(T),c)}function r(a,i,n,s){var h=a.cd,f=a.xa,m=a.ya,c=h[0].trace,T=h[0].t,l=c.type==="violin",x,w,A,E,p,b,d,u,g,y,D,P=T.bdPos,z,F,N=T.wHover,O=function(Pe){return A.c2l(Pe.pos)+T.bPos-A.c2l(b)};l&&c.side!=="both"?(c.side==="positive"&&(g=function(Pe){var je=O(Pe);return S.inbox(je,je+N,y)},z=P,F=0),c.side==="negative"&&(g=function(Pe){var je=O(Pe);return S.inbox(je-N,je,y)},z=0,F=P)):(g=function(Pe){var je=O(Pe);return S.inbox(je-N,je+N,y)},z=F=P);var L;l?L=function(Pe){return S.inbox(Pe.span[0]-p,Pe.span[1]-p,y)}:L=function(Pe){return S.inbox(Pe.min-p,Pe.max-p,y)},c.orientation==="h"?(p=i,b=n,d=L,u=g,x="y",A=m,w="x",E=f):(p=n,b=i,d=g,u=L,x="x",A=f,w="y",E=m);var U=Math.min(1,P/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));y=a.maxHoverDistance-U,D=a.maxSpikeDistance-U;function B(Pe){return(d(Pe)+u(Pe))/2}var W=S.getDistanceFunction(s,d,u,B);if(S.getClosest(h,W,a),a.index===!1)return[];var $=h[a.index],ue=c.line.color,ce=(c.marker||{}).color;M.opacity(ue)&&c.line.width?a.color=ue:M.opacity(ce)&&c.boxpoints?a.color=ce:a.color=c.fillcolor,a[x+"0"]=A.c2p($.pos+T.bPos-F,!0),a[x+"1"]=A.c2p($.pos+T.bPos+z,!0),a[x+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var de=x+"Spike";a.spikeDistance=B($)*D/y,a[de]=A.c2p($.pos,!0);var Y=c.boxmean||c.sizemode==="sd"||(c.meanline||{}).visible,X=c.boxpoints||c.points,Q=X&&Y?["max","uf","q3","med","mean","q1","lf","min"]:X&&!Y?["max","uf","q3","med","q1","lf","min"]:!X&&Y?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],V=E.range[1]0&&(o=!0);for(var s=0;st){var r=t-M[_];return M[_]=t,r}}else return M[_]=t,t;return 0},max:function(_,S,M,e){var t=e[S];if(v(t))if(t=Number(t),v(M[_])){if(M[_]d&&dM){var y=u===_?1:6,D=u===_?"M12":"M1";return function(P,z){var F=T.c2d(P,_,l),N=F.indexOf("-",y);N>0&&(F=F.slice(0,N));var O=T.d2c(F,0,l);if(Or?h>M?h>_*1.1?_:h>S*1.1?S:M:h>e?e:h>t?t:r:Math.pow(10,Math.floor(Math.log(h)/Math.LN10))}function n(h,f,m,c,T,l){if(c&&h>M){var x=s(f,T,l),w=s(m,T,l),A=h===_?0:1;return x[A]!==w[A]}return Math.floor(m/h)-Math.floor(f/h)>.1}function s(h,f,m){var c=f.c2d(h,_,m).split("-");return c[0]===""&&(c.unshift(),c[0]="-"+c[0]),c}}}),oS=He({"src/traces/histogram/calc.js"(Z,q){"use strict";var v=ns(),_=sa(),S=so(),M=Wo(),{hasColorscale:e}=wp(),t=Tp(),r=B_(),o=rS(),a=aS(),i=iS(),n=nS();function s(T,l){var x=[],w=[],A=l.orientation==="h",E=M.getFromId(T,A?l.yaxis:l.xaxis),p=A?"y":"x",b={x:"y",y:"x"}[p],d=l[p+"calendar"],u=l.cumulative,g,y=h(T,l,E,p),D=y[0],P=y[1],z=typeof D.size=="string",F=[],N=z?F:D,O=[],L=[],U=[],B=0,W=l.histnorm,$=l.histfunc,ue=W.indexOf("density")!==-1,ce,de,Y;u.enabled&&ue&&(W=W.replace(/ ?density$/,""),ue=!1);var X=$==="max"||$==="min",Q=X?null:0,V=o.count,le=a[W],ae=!1,j=function(Ce){return E.r2c(Ce,0,d)},ee;for(_.isArrayOrTypedArray(l[b])&&$!=="count"&&(ee=l[b],ae=$==="avg",V=o[$]),g=j(D.start),de=j(D.end)+(g-M.tickIncrement(g,D.size,!1,d))/1e6;g=0&&Y=he;g--)if(w[g]){se=g;break}for(g=he;g<=se;g++)if(v(x[g])&&v(w[g])){var ne={p:x[g],s:w[g],b:0};u.enabled||(ne.pts=U[g],Se?ne.ph0=ne.ph1=U[g].length?P[U[g][0]]:x[g]:(l._computePh=!0,ne.ph0=nt(F[g]),ne.ph1=nt(F[g+1],!0))),Ve.push(ne)}return Ve.length===1&&(Ve[0].width1=M.tickIncrement(Ve[0].p,D.size,!1,d)-Ve[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(Ve,l),_.isArrayOrTypedArray(l.selectedpoints)&&_.tagSelected(Ve,l,je),Ve}function h(T,l,x,w,A){var E=w+"bins",p=T._fullLayout,b=l["_"+w+"bingroup"],d=p._histogramBinOpts[b],u=p.barmode==="overlay",g,y,D,P,z,F,N,O=function(at){return x.r2c(at,0,P)},L=function(at){return x.c2r(at,0,P)},U=x.type==="date"?function(at){return at||at===0?_.cleanDate(at,null,P):null}:function(at){return v(at)?Number(at):null};function B(at,nt,tt){nt[at+"Found"]?(nt[at]=U(nt[at]),nt[at]===null&&(nt[at]=tt[at])):(F[at]=nt[at]=tt[at],_.nestedProperty(y[0],E+"."+at).set(tt[at]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{y=d.traces;var W=[],$=!0,ue=!1,ce=!1;for(g=0;g"u"){if(A)return[Y,z,!0];Y=f(T,l,x,w,E)}N=D.cumulative||{},N.enabled&&N.currentbin!=="include"&&(N.direction==="decreasing"?Y.start=L(M.tickIncrement(O(Y.start),Y.size,!0,P)):Y.end=L(M.tickIncrement(O(Y.end),Y.size,!1,P))),d.size=Y.size,d.sizeFound||(F.size=Y.size,_.nestedProperty(y[0],E+".size").set(Y.size)),B("start",d,Y),B("end",d,Y)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var Q=l._input[E]||{},V=_.extendFlat({},d),le=d.start,ae=x.r2l(Q.start),j=ae!==void 0;if((d.startFound||j)&&ae!==x.r2l(le)){var ee=j?ae:_.aggNums(Math.min,null,z),te={type:x.type==="category"||x.type==="multicategory"?"linear":x.type,r2l:x.r2l,dtick:d.size,tick0:le,calendar:P,range:[ee,M.tickIncrement(ee,d.size,!1,P)].map(x.l2r)},pe=M.tickFirst(te);pe>x.r2l(ee)&&(pe=M.tickIncrement(pe,d.size,!0,P)),V.start=x.l2r(pe),j||_.nestedProperty(l,E+".start").set(V.start)}var we=d.end,Se=x.r2l(Q.end),Re=Se!==void 0;if((d.endFound||Re)&&Se!==x.r2l(we)){var Pe=Re?Se:_.aggNums(Math.max,null,z);V.end=x.l2r(Pe),Re||_.nestedProperty(l,E+".start").set(V.end)}var je="autobin"+w;return l._input[je]===!1&&(l._input[E]=_.extendFlat({},l[E]||{}),delete l._input[je],delete l[je]),[V,z]}function f(T,l,x,w,A){var E=T._fullLayout,p=m(T,l),b=!1,d=1/0,u=[l],g,y,D;for(g=0;g=0;w--)b(w);else if(l==="increasing"){for(w=1;w=0;w--)T[w]+=T[w+1];x==="exclude"&&(T.push(0),T.shift())}}q.exports={calc:s,calcAllAutoBins:h}}}),aF=He({"src/traces/histogram2d/calc.js"(Z,q){"use strict";var v=sa(),_=Wo(),S=rS(),M=aS(),e=iS(),t=nS(),r=oS().calcAllAutoBins;q.exports=function(s,h){var f=_.getFromId(s,h.xaxis),m=_.getFromId(s,h.yaxis),c=h.xcalendar,T=h.ycalendar,l=function(Fe){return f.r2c(Fe,0,c)},x=function(Fe){return m.r2c(Fe,0,T)},w=function(Fe){return f.c2r(Fe,0,c)},A=function(Fe){return m.c2r(Fe,0,T)},E,p,b,d,u=r(s,h,f,"x"),g=u[0],y=u[1],D=r(s,h,m,"y"),P=D[0],z=D[1],F=h._length;y.length>F&&y.splice(F,y.length-F),z.length>F&&z.splice(F,z.length-F);var N=[],O=[],L=[],U=typeof g.size=="string",B=typeof P.size=="string",W=[],$=[],ue=U?W:g,ce=B?$:P,de=0,Y=[],X=[],Q=h.histnorm,V=h.histfunc,le=Q.indexOf("density")!==-1,ae=V==="max"||V==="min",j=ae?null:0,ee=S.count,te=M[Q],pe=!1,we=[],Se=[],Re="z"in h?h.z:"marker"in h&&Array.isArray(h.marker.color)?h.marker.color:"";Re&&V!=="count"&&(pe=V==="avg",ee=S[V]);var Pe=g.size,je=l(g.start),at=l(g.end)+(je-_.tickIncrement(je,Pe,!1,c))/1e6;for(E=je;E=0&&b=0&&d_;i++)a=e(r,o,M(a));return a>_&&v.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,i,n,s,h,f,m,c,T,l,x,w,A,E;for(h=0;hA&&(a=Math.max(a,Math.abs(t[n][s]-w)/(E-A))))}return a}}}),J2=He({"src/traces/heatmap/find_empties.js"(Z,q){"use strict";var v=sa().maxRowLength;q.exports=function(S){var M=[],e={},t=[],r=S[0],o=[],a=[0,0,0],i=v(S),n,s,h,f,m,c,T,l;for(s=0;s=0;m--)f=t[m],s=f[0],h=f[1],c=((e[[s-1,h]]||a)[2]+(e[[s+1,h]]||a)[2]+(e[[s,h-1]]||a)[2]+(e[[s,h+1]]||a)[2])/20,c&&(T[f]=[s,h,c],t.splice(m,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(x,w){return w[2]-x[2]})}}}),sS=He({"src/traces/heatmap/make_bound_array.js"(Z,q){"use strict";var v=so(),_=sa().isArrayOrTypedArray;q.exports=function(M,e,t,r,o,a){var i=[],n=v.traceIs(M,"contour"),s=v.traceIs(M,"histogram"),h,f,m,c=_(e)&&e.length>1;if(c&&!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)],m=1;m1){var Q=(X[X.length-1]-X[0])/(X.length-1),V=Math.abs(Q/100);for(F=0;FV)return!1}return!0}T._islinear=!1,l.type==="log"||x.type==="log"?E==="fast"&&L("log axis found"):U(p)?U(g)?T._islinear=!0:E==="fast"&&L("y scale is not linear"):E==="fast"&&L("x scale is not linear");var B=_.maxRowLength(z),W=T.xtype==="scaled"?"":p,$=n(T,W,b,d,B,l),ue=T.ytype==="scaled"?"":g,ce=n(T,ue,y,D,z.length,x);T._extremes[l._id]=S.findExtremes(l,$),T._extremes[x._id]=S.findExtremes(x,ce);var de={x:$,y:ce,z,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&u&&(de.orig_x=u),T.yperiodalignment&&P&&(de.orig_y=P),W&&W.length===$.length-1&&(de.xCenter=W),ue&&ue.length===ce.length-1&&(de.yCenter=ue),A&&(de.xRanges=N.xRanges,de.yRanges=N.yRanges,de.pts=N.pts),w||t(c,T,{vals:z,cLetter:"z"}),w&&T.contours&&T.contours.coloring==="heatmap"){var Y={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};de.xfill=n(Y,W,b,d,B,l),de.yfill=n(Y,ue,y,D,z.length,x)}return[de]};function h(m){for(var c=[],T=m.length,l=0;l0;)le=g.c2p(U[te]),te--;for(le0;)ee=y.c2p(B[te]),te--;ee=g._length||le<=0||j>=y._length||ee<=0;if(at){var nt=P.selectAll("image").data([]);nt.exit().remove(),x(P);return}var tt,Ve;Se==="fast"?(tt=Y,Ve=de):(tt=Pe,Ve=je);var he=document.createElement("canvas");he.width=tt,he.height=Ve;var se=he.getContext("2d",{willReadFrequently:!0}),ne=n(F,{noNumericCheck:!0,returnArray:!0}),Ce,Ze;Se==="fast"?(Ce=X?function(ba){return Y-1-ba}:t.identity,Ze=Q?function(ba){return de-1-ba}:t.identity):(Ce=function(ba){return t.constrain(Math.round(g.c2p(U[ba])-V),0,Pe)},Ze=function(ba){return t.constrain(Math.round(y.c2p(B[ba])-j),0,je)});var rt=Ze(0),Je=[rt,rt],St=X?0:1,kt=Q?0:1,Bt=0,Vt=0,Ar=0,vr=0,qr,kr,Ur,_t,Fe;function Ye(ba,Ai){if(ba!==void 0){var ki=ne(ba);return ki[0]=Math.round(ki[0]),ki[1]=Math.round(ki[1]),ki[2]=Math.round(ki[2]),Bt+=Ai,Vt+=ki[0]*Ai,Ar+=ki[1]*Ai,vr+=ki[2]*Ai,ki}return[0,0,0,0]}function Ae(ba,Ai,ki,Ki){var En=ba[ki.bin0];if(En===void 0)return Ye(void 0,1);var Tn=ba[ki.bin1],On=Ai[ki.bin0],kn=Ai[ki.bin1],ao=Tn-En||0,Co=On-En||0,bo;return Tn===void 0?kn===void 0?bo=0:On===void 0?bo=2*(kn-En):bo=(2*kn-On-En)*2/3:kn===void 0?On===void 0?bo=0:bo=(2*En-Tn-On)*2/3:On===void 0?bo=(2*kn-Tn-En)*2/3:bo=kn+En-Tn-On,Ye(En+ki.frac*ao+Ki.frac*(Co+ki.frac*bo))}if(Se!=="default"){var Le=0,We;try{We=new Uint8Array(tt*Ve*4)}catch{We=new Array(tt*Ve*4)}if(Se==="smooth"){var Ke=W||U,st=$||B,ot=new Array(Ke.length),Ut=new Array(st.length),Ct=new Array(Pe),Pt=W?A:w,jt=$?A:w,cr,or,nr;for(te=0;te$a||$a>y._length))for(pe=ta;peri||ri>g._length)){var pi=o({x:Za,y:Ba},F,p._fullLayout);pi.x=Za,pi.y=Ba;var Ia=z.z[te][pe];Ia===void 0?(pi.z="",pi.zLabel=""):(pi.z=Ia,pi.zLabel=e.tickText(Yt,Ia,"hover").text);var rn=z.text&&z.text[te]&&z.text[te][pe];(rn===void 0||rn===!1)&&(rn=""),pi.text=rn;var tn=t.texttemplateString({data:[pi,F._meta],fallback:F.texttemplatefallback,labels:pi,locale:p._fullLayout._d3locale,template:hi});if(tn){var cn=tn.split("
"),xt=cn.length,ut=0;for(we=0;we=x[0].length||D<0||D>x.length)return}else{if(v.inbox(o-T[0],o-T[T.length-1],0)>0||v.inbox(a-l[0],a-l[l.length-1],0)>0)return;if(s){var P;for(b=[2*T[0]-T[1]],P=1;P=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),V_=He({"src/traces/contour/attributes.js"(Z,q){"use strict";var v=p1(),_=af(),S=rf(),M=S.axisHoverFormat,e=S.descriptionOnlyNumbers,t=ku(),r=Hh().dash,o=tc(),a=rs().extendFlat,i=o3(),n=i.COMPARISON_OPS2,s=i.INTERVAL_OPS,h=_.line;q.exports=a({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:_.xperiod0,yperiod0:_.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:a({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:a({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:a({},v.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({},h.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:a({},h.smoothing,{}),editType:"plot"},zorder:_.zorder},t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),hS=He({"src/traces/histogram2dcontour/attributes.js"(Z,q){"use strict";var v=n3(),_=V_(),S=ku(),M=rf().axisHoverFormat,e=rs().extendFlat;q.exports=e({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:_.autocontour,ncontours:_.ncontours,contours:_.contours,line:{color:_.line.color,width:e({},_.line.width,{dflt:.5}),dash:_.line.dash,smoothing:_.line.smoothing,editType:"plot"},xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:_.texttemplate,texttemplatefallback:_.texttemplatefallback,textfont:_.textfont},S("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=He({"src/traces/contour/contours_defaults.js"(Z,q){"use strict";q.exports=function(_,S,M,e){var t=e("contours.start"),r=e("contours.end"),o=t===!1||r===!1,a=M("contours.size"),i;o?i=S.autocontour=!0:i=M("autocontour",!1),(i||!a)&&M("ncontours")}}}),pS=He({"src/traces/contour/label_defaults.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M,e,t){t||(t={});var r=S("contours.showlabels");if(r){var o=M.font;v.coerceFont(S,"contours.labelfont",o,{overrideDflt:{color:e}}),S("contours.labelformat")}t.hasHover!==!1&&S("zhoverformat")}}}),l3=He({"src/traces/contour/style_defaults.js"(Z,q){"use strict";var v=_h(),_=pS();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,v(M,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),_(t,r,n,o)}}}),vF=He({"src/traces/histogram2dcontour/defaults.js"(Z,q){"use strict";var v=sa(),_=fS(),S=s3(),M=l3(),e=q_(),t=hS();q.exports=function(o,a,i,n){function s(f,m){return v.coerce(o,a,t,f,m)}function h(f){return v.coerce2(o,a,t,f)}_(o,a,s,n),a.visible!==!1&&(S(o,a,s,h),M(o,a,s,n),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&e(s,n))}}}),dS=He({"src/traces/contour/set_contours.js"(Z,q){"use strict";var v=Wo(),_=sa();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=_.aggNums(Math.min,null,t)),(e.zauto||a===void 0)&&(a=_.aggNums(Math.max,null,t));var i=S(o,a,e.ncontours);r.size=i.dtick,r.start=v.tickFirst(i),i.range.reverse(),r.end=v.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={}),_.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,h=e._input.contours;if(n>s&&(r.start=h.start=s,s=r.end=h.end=n,n=r.start),!(r.size>0)){var f;n===s?f=1:f=S(n,s,e.ncontours).dtick,h.size=r.size=f}}};function S(M,e,t){var r={type:"linear",range:[M,e]};return v.autoTicks(r,(e-M)/(t||15)),r}}}),G_=He({"src/traces/contour/end_plus.js"(Z,q){"use strict";q.exports=function(_){return _.end+_.size/1e6}}}),vS=He({"src/traces/contour/calc.js"(Z,q){"use strict";var v=rc(),_=$2(),S=dS(),M=G_();q.exports=function(t,r){var o=_(t,r),a=o[0].z;S(r,a);var i=r.contours,n=v.extractOpts(r),s;if(i.coloring==="heatmap"&&n.auto&&r.autocontour===!1){var h=i.start,f=M(i),m=i.size||1,c=Math.floor((f-h)/m)+1;isFinite(m)||(m=1,c=1);var T=h-m/2,l=T+c*m;s=[T,l]}else s=a;return v.calc(t,r,{vals:s,cLetter:"z"}),o}}}),H_=He({"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}}}}),mS=He({"src/traces/contour/make_crossings.js"(Z,q){"use strict";var v=H_();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,h,f,m,c,T;for(i=0;iS?0:1)+(M[0][1]>S?0:2)+(M[1][1]>S?0:4)+(M[1][0]>S?0:8);if(e===5||e===10){var t=(M[0][0]+M[0][1]+M[1][0]+M[1][1])/4;return S>t?e===5?713:1114:e===5?104:208}return e===15?0:e}}}),gS=He({"src/traces/contour/find_all_paths.js"(Z,q){"use strict";var v=sa(),_=H_();q.exports=function(a,i,n){var s,h,f,m,c;for(i=i||.01,n=n||.01,f=0;f20?(f=_.CHOOSESADDLE[f][(m[0]||m[1])<0?0:1],o.crossings[h]=_.SADDLEREMAINDER[f]):delete o.crossings[h],m=_.NEWDELTA[f],!m){v.log("Found bad marching index:",f,a,o.level);break}c.push(r(o,a,m)),a[0]+=m[0],a[1]+=m[1],h=a.join(","),S(c[c.length-1],c[c.length-2],n,s)&&c.pop();var E=m[0]&&(a[0]<0||a[0]>l-2)||m[1]&&(a[1]<0||a[1]>T-2),p=a[0]===x[0]&&a[1]===x[1]&&m[0]===w[0]&&m[1]===w[1];if(p||i&&E)break;f=o.crossings[h]}A===1e4&&v.log("Infinite loop in contour?");var b=S(c[0],c[c.length-1],n,s),d=0,u=.2*o.smoothing,g=[],y=0,D,P,z,F,N,O,L,U,B,W,$;for(A=1;A=y;A--)if(D=g[A],D=y&&D+g[P]U&&B--,o.edgepaths[B]=$.concat(c,W));break}Y||(o.edgepaths[U]=c.concat(W))}for(U=0;U20&&a?o===208||o===1114?n=i[0]===0?1:-1:s=i[1]===0?1:-1:_.BOTTOMSTART.indexOf(o)!==-1?s=1:_.LEFTSTART.indexOf(o)!==-1?n=1:_.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),h=o.z[s][n],f=o.xaxis,m=o.yaxis;if(i[1]){var c=(o.level-h)/(o.z[s][n+1]-h),T=(c!==1?(1-c)*f.c2l(o.x[n]):0)+(c!==0?c*f.c2l(o.x[n+1]):0);return[f.c2p(f.l2c(T),!0),m.c2p(o.y[s],!0),n+c,s]}else{var l=(o.level-h)/(o.z[s+1][n]-h),x=(l!==1?(1-l)*m.c2l(o.y[s]):0)+(l!==0?l*m.c2l(o.y[s+1]):0);return[f.c2p(o.x[n],!0),m.c2p(m.l2c(x),!0),n,s+l]}}}}),mF=He({"src/traces/contour/constraint_mapping.js"(Z,q){"use strict";var v=o3(),_=ns();q.exports={"[]":M("[]"),"][":M("]["),">":e(">"),"<":e("<"),"=":e("=")};function S(t,r){var o=Array.isArray(r),a;function i(n){return _(n)?+n:null}return v.COMPARISON_OPS2.indexOf(t)!==-1?a=i(o?r[0]:r):v.INTERVAL_OPS.indexOf(t)!==-1?a=o?[i(r[0]),i(r[1])]:[i(r),i(r)]:v.SET_OPS.indexOf(t)!==-1&&(a=o?r.map(i):[i(r)]),a}function M(t){return function(r){r=S(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=S(t,r),{start:r,end:1/0,size:1/0}}}}}),yS=He({"src/traces/contour/empty_pathinfo.js"(Z,q){"use strict";var v=sa(),_=mF(),S=G_();q.exports=function(e,t,r){for(var o=e.type==="constraint"?_[e._operation](e.value):e,a=o.size,i=[],n=S(o),s=r.trace._carpetTrace,h=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;f1e3){v.warn("Too many contours, clipping at 1000",e);break}return i}}}),_S=He({"src/traces/contour/convert_to_constraints.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e,t,r,o=function(n){return n.reverse()},a=function(n){return n};switch(M){case"=":case"<":return S;case">":for(S.length!==1&&v.warn("Contour data invalid for the specified inequality operation."),t=S[0],e=0;er.level||r.starts.length&&t===r.level)}break;case"constraint":if(S.prefixBoundary=!1,S.edgepaths.length)return;var o=S.x.length,a=S.y.length,i=-1/0,n=1/0;for(e=0;e":s>i&&(S.prefixBoundary=!0);break;case"<":(si||S.starts.length&&f===n)&&(S.prefixBoundary=!0);break;case"][":h=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),hi&&(S.prefixBoundary=!0);break}break}}}}),u3=He({"src/traces/contour/plot.js"(Z){"use strict";var q=Vn(),v=sa(),_=as(),S=rc(),M=su(),e=Wo(),t=wv(),r=e3(),o=mS(),a=gS(),i=yS(),n=_S(),s=xS(),h=H_(),f=h.LABELOPTIMIZER;Z.plot=function(p,b,d,u){var g=b.xaxis,y=b.yaxis;v.makeTraceGroups(u,d,"contour").each(function(D){var P=q.select(this),z=D[0],F=z.trace,N=z.x,O=z.y,L=F.contours,U=i(L,b,z),B=v.ensureSingle(P,"g","heatmapcoloring"),W=[];L.coloring==="heatmap"&&(W=[D]),r(p,b,W,B),o(U),a(U);var $=g.c2p(N[0],!0),ue=g.c2p(N[N.length-1],!0),ce=y.c2p(O[0],!0),de=y.c2p(O[O.length-1],!0),Y=[[$,de],[ue,de],[ue,ce],[$,ce]],X=U;L.type==="constraint"&&(X=n(U,L._operation)),m(P,Y,L),c(P,X,Y,L),l(P,U,p,z,L),w(P,b,p,z,Y)})};function m(E,p,b){var d=v.ensureSingle(E,"g","contourbg"),u=d.selectAll("path").data(b.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+p.join("L")+"Z").style("stroke","none")}function c(E,p,b,d){var u=d.coloring==="fill"||d.type==="constraint"&&d._operation!=="=",g="M"+b.join("L")+"Z";u&&s(p,d);var y=v.ensureSingle(E,"g","contourfill"),D=y.selectAll("path").data(u?p:[]);D.enter().append("path"),D.exit().remove(),D.each(function(P){var z=(P.prefixBoundary?g:"")+T(P,b);z?q.select(this).attr("d",z).style("stroke","none"):q.select(this).remove()})}function T(E,p){var b="",d=0,u=E.edgepaths.map(function($,ue){return ue}),g=!0,y,D,P,z,F,N;function O($){return Math.abs($[1]-p[0][1])<.01}function L($){return Math.abs($[1]-p[2][1])<.01}function U($){return Math.abs($[0]-p[0][0])<.01}function B($){return Math.abs($[0]-p[2][0])<.01}for(;u.length;){for(N=_.smoothopen(E.edgepaths[d],E.smoothing),b+=g?N:N.replace(/^M/,"L"),u.splice(u.indexOf(d),1),y=E.edgepaths[d][E.edgepaths[d].length-1],z=-1,P=0;P<4;P++){if(!y){v.log("Missing end?",d,E);break}for(O(y)&&!B(y)?D=p[1]:U(y)?D=p[0]:L(y)?D=p[3]:B(y)&&(D=p[2]),F=0;F=0&&(D=W,z=F):Math.abs(y[1]-D[1])<.01?Math.abs(y[1]-W[1])<.01&&(W[0]-y[0])*(D[0]-W[0])>=0&&(D=W,z=F):v.log("endpt to newendpt is not vert. or horz.",y,D,W)}if(y=D,z>=0)break;b+="L"+D}if(z===E.edgepaths.length){v.log("unclosed perimeter path");break}d=z,g=u.indexOf(d)===-1,g&&(d=u[0],b+="Z")}for(d=0;df.MAXCOST*2)break;O&&(D/=2),y=z-D/2,P=y+D*1.5}if(N<=f.MAXCOST)return F};function x(E,p,b,d){var u=p.width/2,g=p.height/2,y=E.x,D=E.y,P=E.theta,z=Math.cos(P)*u,F=Math.sin(P)*u,N=(y>d.center?d.right-y:y-d.left)/(z+Math.abs(Math.sin(P)*g)),O=(D>d.middle?d.bottom-D:D-d.top)/(Math.abs(F)+Math.cos(P)*g);if(N<1||O<1)return 1/0;var L=f.EDGECOST*(1/(N-1)+1/(O-1));L+=f.ANGLECOST*P*P;for(var U=y-z,B=D-F,W=y+z,$=D+F,ue=0;ue=w)&&(r<=x&&(r=x),o>=w&&(o=w),i=Math.floor((o-r)/a)+1,n=0),l=0;lx&&(m.unshift(x),c.unshift(c[0])),m[m.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(h=parseFloat(s.value[0]),s.value=[h,h+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:v(s.value)&&(h=parseFloat(s.value),s.value=[h,h+1])):(n("contours.value",0),v(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),_F=He({"src/traces/contour/defaults.js"(Z,q){"use strict";var v=sa(),_=X2(),S=Qd(),M=TS(),e=s3(),t=l3(),r=q_(),o=V_();q.exports=function(i,n,s,h){function f(l,x){return v.coerce(i,n,o,l,x)}function m(l){return v.coerce2(i,n,o,l)}var c=_(i,n,f,h);if(!c){n.visible=!1;return}S(i,n,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var T=f("contours.type")==="constraint";f("connectgaps",v.isArray1D(n.z)),T?M(i,n,f,h,s):(e(i,n,f,m),t(i,n,f,h)),n.contours&&n.contours.coloring==="heatmap"&&r(f,h),f("zorder")}}}),xF=He({"src/traces/contour/index.js"(Z,q){"use strict";q.exports={attributes:V_(),supplyDefaults:_F(),calc:vS(),plot:u3().plot,style:c3(),colorbar:f3(),hoverPoints:wS(),moduleType:"trace",name:"contour",basePlotModule:Kf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),bF=He({"lib/contour.js"(Z,q){"use strict";q.exports=xF()}}),AS=He({"src/traces/scatterternary/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:_,templatefallbackAttrs:S}=$l(),M=$d(),e=af(),t=au(),r=ku(),o=Hh().dash,a=rs().extendFlat,i=e.marker,n=e.line,s=i.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:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:_({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:n.color,width:n.width,dash:o,backoff:n.backoff,shape:a({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:e.connectgaps,cliponaxis:e.cliponaxis,fill:a({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:M(),marker:a({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:i.angleref,standoff:i.standoff,maxdisplayed:i.maxdisplayed,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,line:a({width:s.width,dash:s.dash,editType:"calc"},r("marker.line")),gradient:i.gradient,editType:"calc"},r("marker")),textfont:e.textfont,textposition:e.textposition,selected:e.selected,unselected:e.unselected,hoverinfo:a({},t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:e.hoveron,hovertemplate:v(),hovertemplatefallback:S()}}}),wF=He({"src/traces/scatterternary/defaults.js"(Z,q){"use strict";var v=sa(),_=Tv(),S=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=AS();q.exports=function(n,s,h,f){function m(E,p){return v.coerce(n,s,a,E,p)}var c=m("a"),T=m("b"),l=m("c"),x;if(c?(x=c.length,T?(x=Math.min(x,T.length),l&&(x=Math.min(x,l.length))):l?x=Math.min(x,l.length):x=0):T&&l&&(x=Math.min(T.length,l.length)),!x){s.visible=!1;return}s._length=x,m("sum"),m("text"),m("hovertext"),s.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback"));var w=x<_.PTS_LINESONLY?"lines+markers":"lines";m("mode",w),S.hasMarkers(s)&&M(n,s,h,f,m,{gradient:!0}),S.hasLines(s)&&(e(n,s,h,f,m,{backoff:!0}),t(n,s,m),m("connectgaps")),S.hasText(s)&&(m("texttemplate"),m("texttemplatefallback"),r(n,s,f,m));var A=[];(S.hasMarkers(s)||S.hasText(s))&&(m("cliponaxis"),m("marker.maxdisplayed"),A.push("points")),m("fill"),s.fill!=="none"&&(o(n,s,h,m),S.hasLines(s)||t(n,s,m)),(s.fill==="tonext"||s.fill==="toself")&&A.push("fills"),m("hoveron",A.join("+")||"points"),v.coerceSelectionMarkerOpacity(s,m)}}}),TF=He({"src/traces/scatterternary/format_labels.js"(Z,q){"use strict";var v=Wo();q.exports=function(S,M,e){var t={},r=e[M.subplot]._subplot;return t.aLabel=v.tickText(r.aaxis,S.a,!0).text,t.bLabel=v.tickText(r.baxis,S.b,!0).text,t.cLabel=v.tickText(r.caxis,S.c,!0).text,t}}}),AF=He({"src/traces/scatterternary/calc.js"(Z,q){"use strict";var v=ns(),_=Fd(),S=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,h=i.sum||s,f={a:i.a,b:i.b,c:i.c},m=i.ids,c,T,l,x,w,A;for(c=0;c"),o.hovertemplate=f.hovertemplate,r}}}),EF=He({"src/traces/scatterternary/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){if(S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),e[t]){var r=e[t];_.a=r.a,_.b=r.b,_.c=r.c}else _.a=S.a,_.b=S.b,_.c=S.c;return _}}}),kF=He({"src/plots/ternary/ternary.js"(Z,q){"use strict";var v=Vn(),_=Ch(),S=so(),M=sa(),e=M.strTranslate,t=M._,r=$n(),o=as(),a=wv(),i=rs().extendFlat,n=bc(),s=Wo(),h=Ap(),f=Hc(),m=Jd(),c=m.freeMode,T=m.rectMode,l=K0(),x=Af().prepSelect,w=Af().selectOnClick,A=Af().clearOutline,E=Af().clearSelectionsCache,p=lh();function b(L,U){this.id=L.id,this.graphDiv=L.graphDiv,this.init(U),this.makeFramework(U),this.updateFx(U),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}q.exports=b;var d=b.prototype;d.init=function(L){this.container=L._ternarylayer,this.defs=L._defs,this.layoutId=L._uid,this.traceHash={},this.layers={}},d.plot=function(L,U){var B=this,W=U[B.id],$=U._size;B._hasClipOnAxisFalse=!1;for(var ue=0;ueu*X?(pe=X,te=pe*u):(te=Y,pe=te/u),we=ce*te/Y,Se=de*pe/X,j=U.l+U.w*$-te/2,ee=U.t+U.h*(1-ue)-pe/2,B.x0=j,B.y0=ee,B.w=te,B.h=pe,B.sum=Q,B.xaxis={type:"linear",range:[V+2*ae-Q,Q-V-2*le],domain:[$-we/2,$+we/2],_id:"x"},a(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(Ce){return Ce.a>=B.aaxis.range[0]&&Ce.a<=B.aaxis.range[1]&&Ce.b>=B.baxis.range[1]&&Ce.b<=B.baxis.range[0]&&Ce.c>=B.caxis.range[1]&&Ce.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[V,Q-le-ae],domain:[ue-Se/2,ue+Se/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var Re=B.yaxis.domain[0],Pe=B.aaxis=i({},L.aaxis,{range:[V,Q-le-ae],side:"left",tickangle:(+L.aaxis.tickangle||0)-30,domain:[Re,Re+Se*u],anchor:"free",position:0,_id:"y",_length:te});a(Pe,B.graphDiv._fullLayout),Pe.setScale();var je=B.baxis=i({},L.baxis,{range:[Q-V-ae,le],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:te});a(je,B.graphDiv._fullLayout),je.setScale();var at=B.caxis=i({},L.caxis,{range:[Q-V-le,ae],side:"right",tickangle:(+L.caxis.tickangle||0)+30,domain:[Re,Re+Se*u],anchor:"free",position:0,_id:"y",_length:te});a(at,B.graphDiv._fullLayout),at.setScale();var nt="M"+j+","+(ee+pe)+"h"+te+"l-"+te/2+",-"+pe+"Z";B.clipDef.select("path").attr("d",nt),B.layers.plotbg.select("path").attr("d",nt);var tt="M0,"+pe+"h"+te+"l-"+te/2+",-"+pe+"Z";B.clipDefRelative.select("path").attr("d",tt);var Ve=e(j,ee);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ve),B.clipDefRelative.select("path").attr("transform",null);var he=e(j-je._offset,ee+pe);B.layers.baxis.attr("transform",he),B.layers.bgrid.attr("transform",he);var se=e(j+te/2,ee)+"rotate(30)"+e(0,-Pe._offset);B.layers.aaxis.attr("transform",se),B.layers.agrid.attr("transform",se);var ne=e(j+te/2,ee)+"rotate(-30)"+e(0,-at._offset);B.layers.caxis.attr("transform",ne),B.layers.cgrid.attr("transform",ne),B.drawAxes(!0),B.layers.aline.select("path").attr("d",Pe.showline?"M"+j+","+(ee+pe)+"l"+te/2+",-"+pe:"M0,0").call(r.stroke,Pe.linecolor||"#000").style("stroke-width",(Pe.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",je.showline?"M"+j+","+(ee+pe)+"h"+te:"M0,0").call(r.stroke,je.linecolor||"#000").style("stroke-width",(je.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",at.showline?"M"+(j+te/2)+","+ee+"l"+te/2+","+pe:"M0,0").call(r.stroke,at.linecolor||"#000").style("stroke-width",(at.linewidth||0)+"px"),B.graphDiv._context.staticPlot||B.initInteractions(),o.setClipUrl(B.layers.frontplot,B._hasClipOnAxisFalse?null:B.clipId,B.graphDiv)},d.drawAxes=function(L){var U=this,B=U.graphDiv,W=U.id.slice(7)+"title",$=U.layers,ue=U.aaxis,ce=U.baxis,de=U.caxis;if(U.drawAx(ue),U.drawAx(ce),U.drawAx(de),L){var Y=Math.max(ue.showticklabels?ue.tickfont.size/2:0,(de.showticklabels?de.tickfont.size*.75:0)+(de.ticks==="outside"?de.ticklen*.87:0)),X=(ce.showticklabels?ce.tickfont.size:0)+(ce.ticks==="outside"?ce.ticklen:0)+3;$["a-title"]=l.draw(B,"a"+W,{propContainer:ue,propName:U.id+".aaxis.title.text",placeholder:t(B,"Click to enter Component A title"),attributes:{x:U.x0+U.w/2,y:U.y0-ue.title.font.size/3-Y,"text-anchor":"middle"}}),$["b-title"]=l.draw(B,"b"+W,{propContainer:ce,propName:U.id+".baxis.title.text",placeholder:t(B,"Click to enter Component B title"),attributes:{x:U.x0-X,y:U.y0+U.h+ce.title.font.size*.83+X,"text-anchor":"middle"}}),$["c-title"]=l.draw(B,"c"+W,{propContainer:de,propName:U.id+".caxis.title.text",placeholder:t(B,"Click to enter Component C title"),attributes:{x:U.x0+U.w+X,y:U.y0+U.h+de.title.font.size*.83+X,"text-anchor":"middle"}})}},d.drawAx=function(L){var U=this,B=U.graphDiv,W=L._name,$=W.charAt(0),ue=L._id,ce=U.layers[W],de=30,Y=$+"tickLayout",X=g(L);U[Y]!==X&&(ce.selectAll("."+ue+"tick").remove(),U[Y]=X),L.setScale();var Q=s.calcTicks(L),V=s.clipEnds(L,Q),le=s.makeTransTickFn(L),ae=s.getTickSigns(L)[2],j=M.deg2rad(de),ee=ae*(L.linewidth||1)/2,te=ae*L.ticklen,pe=U.w,we=U.h,Se=$==="b"?"M0,"+ee+"l"+Math.sin(j)*te+","+Math.cos(j)*te:"M"+ee+",0l"+Math.cos(j)*te+","+-Math.sin(j)*te,Re={a:"M0,0l"+we+",-"+pe/2,b:"M0,0l-"+pe/2+",-"+we,c:"M0,0l-"+we+","+pe/2}[$];s.drawTicks(B,L,{vals:L.ticks==="inside"?V:Q,layer:ce,path:Se,transFn:le,crisp:!1}),s.drawGrid(B,L,{vals:V,layer:U.layers[$+"grid"],path:Re,transFn:le,crisp:!1}),s.drawLabels(B,L,{vals:Q,layer:ce,transFn:le,labelFns:s.makeLabelFns(L,0,de)})};function g(L){return L.ticks+String(L.ticklen)+String(L.showticklabels)}var y=p.MINZOOM/2+.87,D="m-0.87,.5h"+y+"v3h-"+(y+5.2)+"l"+(y/2+2.6)+",-"+(y*.87+4.5)+"l2.6,1.5l-"+y/2+","+y*.87+"Z",P="m0.87,.5h-"+y+"v3h"+(y+5.2)+"l-"+(y/2+2.6)+",-"+(y*.87+4.5)+"l-2.6,1.5l"+y/2+","+y*.87+"Z",z="m0,1l"+y/2+","+y*.87+"l2.6,-1.5l-"+(y/2+2.6)+",-"+(y*.87+4.5)+"l-"+(y/2+2.6)+","+(y*.87+4.5)+"l2.6,1.5l"+y/2+",-"+y*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",N=!0;d.clearOutline=function(){E(this.dragOptions),A(this.dragOptions.gd)},d.initInteractions=function(){var L=this,U=L.layers.plotbg.select("path").node(),B=L.graphDiv,W=B._fullLayout._zoomlayer,$,ue;this.dragOptions={element:U,gd:B,plotinfo:{id:L.id,domain:B._fullLayout[L.id].domain,xaxis:L.xaxis,yaxis:L.yaxis},subplot:L.id,prepFn:function(he,se,ne){L.dragOptions.xaxes=[L.xaxis],L.dragOptions.yaxes=[L.yaxis],$=B._fullLayout._invScaleX,ue=B._fullLayout._invScaleY;var Ce=L.dragOptions.dragmode=B._fullLayout.dragmode;c(Ce)?L.dragOptions.minDrag=1:L.dragOptions.minDrag=void 0,Ce==="zoom"?(L.dragOptions.moveFn=je,L.dragOptions.clickFn=pe,L.dragOptions.doneFn=at,we(he,se,ne)):Ce==="pan"?(L.dragOptions.moveFn=tt,L.dragOptions.clickFn=pe,L.dragOptions.doneFn=Ve,nt(),L.clearOutline(B)):(T(Ce)||c(Ce))&&x(he,se,ne,L.dragOptions,Ce)}};var ce,de,Y,X,Q,V,le,ae,j,ee;function te(he){var se={};return se[L.id+".aaxis.min"]=he.a,se[L.id+".baxis.min"]=he.b,se[L.id+".caxis.min"]=he.c,se}function pe(he,se){var ne=B._fullLayout.clickmode;O(B),he===2&&(B.emit("plotly_doubleclick",null),S.call("_guiRelayout",B,te({a:0,b:0,c:0}))),ne.indexOf("select")>-1&&he===1&&w(se,B,[L.xaxis],[L.yaxis],L.id,L.dragOptions),ne.indexOf("event")>-1&&f.click(B,se,L.id)}function we(he,se,ne){var Ce=U.getBoundingClientRect();ce=se-Ce.left,de=ne-Ce.top,B._fullLayout._calcInverseTransform(B);var Ze=B._fullLayout._invTransform,rt=M.apply3DTransform(Ze)(ce,de);ce=rt[0],de=rt[1],Y={a:L.aaxis.range[0],b:L.baxis.range[1],c:L.caxis.range[1]},Q=Y,X=L.aaxis.range[1]-Y.a,V=_(L.graphDiv._fullLayout[L.id].bgcolor).getLuminance(),le="M0,"+L.h+"L"+L.w/2+", 0L"+L.w+","+L.h+"Z",ae=!1,j=W.append("path").attr("class","zoombox").attr("transform",e(L.x0,L.y0)).style({fill:V>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",le),ee=W.append("path").attr("class","zoombox-corners").attr("transform",e(L.x0,L.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),L.clearOutline(B)}function Se(he,se){return 1-se/L.h}function Re(he,se){return 1-(he+(L.h-se)/Math.sqrt(3))/L.w}function Pe(he,se){return(he-(L.h-se)/Math.sqrt(3))/L.w}function je(he,se){var ne=ce+he*$,Ce=de+se*ue,Ze=Math.max(0,Math.min(1,Se(ce,de),Se(ne,Ce))),rt=Math.max(0,Math.min(1,Re(ce,de),Re(ne,Ce))),Je=Math.max(0,Math.min(1,Pe(ce,de),Pe(ne,Ce))),St=(Ze/2+Je)*L.w,kt=(1-Ze/2-rt)*L.w,Bt=(St+kt)/2,Vt=kt-St,Ar=(1-Ze)*L.h,vr=Ar-Vt/u;Vt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ee.transition().style("opacity",1).duration(200),ae=!0),B.emit("plotly_relayouting",te(Q))}function at(){O(B),Q!==Y&&(S.call("_guiRelayout",B,te(Q)),N&&B.data&&B._context.showTips&&(M.notifier(t(B,"Double-click to zoom back out"),"long",B),N=!1))}function nt(){Y={a:L.aaxis.range[0],b:L.baxis.range[1],c:L.caxis.range[1]},Q=Y}function tt(he,se){var ne=he/L.xaxis._m,Ce=se/L.yaxis._m;Q={a:Y.a-Ce,b:Y.b+(ne+Ce)/2,c:Y.c-(ne-Ce)/2};var Ze=[Q.a,Q.b,Q.c].sort(M.sorterAsc),rt={a:Ze.indexOf(Q.a),b:Ze.indexOf(Q.b),c:Ze.indexOf(Q.c)};Ze[0]<0&&(Ze[1]+Ze[0]/2<0?(Ze[2]+=Ze[0]+Ze[1],Ze[0]=Ze[1]=0):(Ze[2]+=Ze[0]/2,Ze[1]+=Ze[0]/2,Ze[0]=0),Q={a:Ze[rt.a],b:Ze[rt.b],c:Ze[rt.c]},se=(Y.a-Q.a)*L.yaxis._m,he=(Y.c-Q.c-Y.b+Q.b)*L.xaxis._m);var Je=e(L.x0+he,L.y0+se);L.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Je);var St=e(-he,-se);L.clipDefRelative.select("path").attr("transform",St),L.aaxis.range=[Q.a,L.sum-Q.b-Q.c],L.baxis.range=[L.sum-Q.a-Q.c,Q.b],L.caxis.range=[L.sum-Q.a-Q.b,Q.c],L.drawAxes(!1),L._hasClipOnAxisFalse&&L.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,L),B.emit("plotly_relayouting",te(Q))}function Ve(){S.call("_guiRelayout",B,te(Q))}U.onmousemove=function(he){f.hover(B,he,L.id),B._fullLayout._lasthover=U,B._fullLayout._hoversubplot=L.id},U.onmouseout=function(he){B._dragging||h.unhover(B,he)},h.init(this.dragOptions)};function O(L){v.select(L).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),SS=He({"src/plots/ternary/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=wc().attributes,S=Xh(),M=pc().overrideAll,e=rs().extendFlat,t={title:{text:S.title.text,font:S.title.font},color:S.color,tickmode:S.minor.tickmode,nticks:e({},S.nticks,{dflt:6,min:1}),tick0:S.tick0,dtick:S.dtick,tickvals:S.tickvals,ticktext:S.ticktext,ticks:S.ticks,ticklen:S.ticklen,tickwidth:S.tickwidth,tickcolor:S.tickcolor,ticklabelstep:S.ticklabelstep,showticklabels:S.showticklabels,labelalias:S.labelalias,showtickprefix:S.showtickprefix,tickprefix:S.tickprefix,showticksuffix:S.showticksuffix,ticksuffix:S.ticksuffix,showexponent:S.showexponent,exponentformat:S.exponentformat,minexponent:S.minexponent,separatethousands:S.separatethousands,tickfont:S.tickfont,tickangle:S.tickangle,tickformat:S.tickformat,tickformatstops:S.tickformatstops,hoverformat:S.hoverformat,showline:e({},S.showline,{dflt:!0}),linecolor:S.linecolor,linewidth:S.linewidth,showgrid:e({},S.showgrid,{dflt:!0}),gridcolor:S.gridcolor,gridwidth:S.gridwidth,griddash:S.griddash,layer:S.layer,min:{valType:"number",dflt:0,min:0}},r=q.exports=M({domain:_({name:"ternary"}),bgcolor:{valType:"color",dflt:v.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"}}}),s0=He({"src/plots/subplot_defaults.js"(Z,q){"use strict";var v=sa(),_=zl(),S=wc().defaults;q.exports=function(e,t,r,o){var a=o.type,i=o.attributes,n=o.handleDefaults,s=o.partition||"x",h=t._subplots[a],f=h.length,m=f&&h[0].replace(/\d+$/,""),c,T;function l(E,p){return v.coerce(c,T,i,E,p)}for(var x=0;x=x&&(b.min=0,d.min=0,u.min=0,f.aaxis&&delete f.aaxis.min,f.baxis&&delete f.baxis.min,f.caxis&&delete f.caxis.min)}function h(f,m,c,T){var l=i[m._name];function x(g,y){return S.coerce(f,m,l,g,y)}x("uirevision",T.uirevision),m.type="linear";var w=x("color"),A=w!==l.color.dflt?w:c.font.color,E=m._name,p=E.charAt(0).toUpperCase(),b="Component "+p,d=x("title.text",b);m._hovertitle=d===b?d:p,S.coerceFont(x,"title.font",c.font,{overrideDflt:{size:S.bigFont(c.font.size),color:A}}),x("min"),o(f,m,x,"linear"),t(f,m,x,"linear"),e(f,m,x,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(f,m,x,{outerTicks:!0});var u=x("showticklabels");u&&(S.coerceFont(x,"tickfont",c.font,{overrideDflt:{color:A}}),x("tickangle"),x("tickformat")),a(f,m,x,{dfltColor:w,bgColor:c.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),x("hoverformat"),x("layer")}}}),LF=He({"src/plots/ternary/index.js"(Z){"use strict";var q=kF(),v=Wh().getSubplotCalcData,_=sa().counterRegex,S="ternary";Z.name=S;var M=Z.attr="subplot";Z.idRoot=S,Z.idRegex=Z.attrRegex=_(S);var e=Z.attributes={};e[M]={valType:"subplotid",dflt:"ternary",editType:"calc"},Z.layoutAttributes=SS(),Z.supplyLayoutDefaults=CF(),Z.plot=function(r){for(var o=r._fullLayout,a=r.calcdata,i=o._subplots[S],n=0;n0){var E=r.xa,p=r.ya,b,d,u,g,y;f.orientation==="h"?(y=o,b="y",u=p,d="x",g=E):(y=a,b="x",u=E,d="y",g=p);var D=h[r.index];if(y>=D.span[0]&&y<=D.span[1]){var P=_.extendFlat({},r),z=g.c2p(y,!0),F=e.getKdeValue(D,f,y),N=e.getPositionOnKdePath(D,f,z),O=u._offset,L=u._length;P[b+"0"]=N[0],P[b+"1"]=N[1],P[d+"0"]=P[d+"1"]=z,P[d+"Label"]=d+": "+S.hoverLabelText(g,y,f[d+"hoverformat"])+", "+h[0].t.labels.kde+" "+F.toFixed(3);for(var U=0,B=0;B path").each(function(c){if(!c.isBlank){var T=m.marker;v.select(this).call(S.fill,c.mc||T.color).call(S.stroke,c.mlc||T.line.color).call(_.dashLine,T.line.dash,c.mlw||T.line.width).style("opacity",m.selectedpoints&&!c.selected?M:1)}}),r(f,m,a),f.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(S.fill,m.connector.fillcolor)}),f.selectAll(".lines").each(function(){var c=m.connector.line;_.lineGroupStyle(v.select(this).selectAll("path"),c.width,c.color,c.dash)})})}q.exports={style:o}}}),YF=He({"src/traces/funnel/hover.js"(Z,q){"use strict";var v=$n().opacity,_=f1().hoverOnBars,S=sa().formatPercent;q.exports=function(t,r,o,a,i){var n=_(t,r,o,a,i);if(n){var s=n.cd,h=s[0].trace,f=h.orientation==="h",m=n.index,c=s[m],T=f?"x":"y";n[T+"LabelVal"]=c.s,n.percentInitial=c.begR,n.percentInitialLabel=S(c.begR,1),n.percentPrevious=c.difR,n.percentPreviousLabel=S(c.difR,1),n.percentTotal=c.sumR,n.percentTotalLabel=S(c.sumR,1);var l=c.hi||h.hoverinfo,x=[];if(l&&l!=="none"&&l!=="skip"){var w=l==="all",A=l.split("+"),E=function(p){return w||A.indexOf(p)!==-1};E("percent initial")&&x.push(n.percentInitialLabel+" of initial"),E("percent previous")&&x.push(n.percentPreviousLabel+" of previous"),E("percent total")&&x.push(n.percentTotalLabel+" of total")}return n.extraText=x.join("
"),n.color=M(h,c),[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(v(o))return o;if(v(a)&&i)return a}}}),KF=He({"src/traces/funnel/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,"percentInitial"in S&&(_.percentInitial=S.percentInitial),"percentPrevious"in S&&(_.percentPrevious=S.percentPrevious),"percentTotal"in S&&(_.percentTotal=S.percentTotal),S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),_}}}),JF=He({"src/traces/funnel/index.js"(Z,q){"use strict";q.exports={attributes:kS(),layoutAttributes:CS(),supplyDefaults:LS().supplyDefaults,crossTraceDefaults:LS().crossTraceDefaults,supplyLayoutDefaults:VF(),calc:HF(),crossTraceCalc:WF(),plot:XF(),style:ZF().style,hoverPoints:YF(),eventData:KF(),selectPoints:h1(),moduleType:"trace",name:"funnel",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),$F=He({"lib/funnel.js"(Z,q){"use strict";q.exports=JF()}}),QF=He({"src/traces/waterfall/constants.js"(Z,q){"use strict";q.exports={eventDataKeys:["initial","delta","final"]}}}),PS=He({"src/traces/waterfall/attributes.js"(Z,q){"use strict";var v=Sv(),_=af().line,S=au(),M=rf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=QF(),a=rs().extendFlat,i=$n();function n(s){return{marker:{color:a({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:a({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:a({},v.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:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:M("x"),yhoverformat:M("y"),hovertext:v.hovertext,hovertemplate:e({},{keys:o.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:a({},S.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:o.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:n("increasing"),decreasing:n("decreasing"),totals:n("intermediate sums and total"),connector:{line:{color:a({},_.color,{dflt:i.defaultLine}),width:a({},_.width,{editType:"plot"}),dash:_.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),IS=He({"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=He({"src/constants/delta.js"(Z,q){"use strict";q.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),RS=He({"src/traces/waterfall/defaults.js"(Z,q){"use strict";var v=sa(),_=Q0(),S=gd().handleText,M=n1(),e=Qd(),t=PS(),r=$n(),o=d1(),a=o.INCREASING.COLOR,i=o.DECREASING.COLOR,n="#4499FF";function s(m,c,T){m(c+".marker.color",T),m(c+".marker.line.color",r.defaultLine),m(c+".marker.line.width")}function h(m,c,T,l){function x(b,d){return v.coerce(m,c,t,b,d)}var w=M(m,c,l,x);if(!w){c.visible=!1;return}e(m,c,l,x),x("xhoverformat"),x("yhoverformat"),x("measure"),x("orientation",c.x&&!c.y?"h":"v"),x("base"),x("offset"),x("width"),x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback");var A=x("textposition");S(m,c,l,x,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c.textposition!=="none"&&(x("texttemplate"),x("texttemplatefallback"),c.texttemplate||x("textinfo")),s(x,"increasing",a),s(x,"decreasing",i),s(x,"totals",n);var E=x("connector.visible");if(E){x("connector.mode");var p=x("connector.line.width");p&&(x("connector.line.color"),x("connector.line.dash"))}x("zorder")}function f(m,c){var T,l;function x(A){return v.coerce(l._input,l,t,A)}if(c.waterfallmode==="group")for(var w=0;w0&&(x?y+="M"+u[0]+","+g[1]+"V"+g[0]:y+="M"+u[1]+","+g[0]+"H"+u[0]),w!=="between"&&(p.isSum||b path").each(function(c){if(!c.isBlank){var T=m[c.dir].marker;v.select(this).call(S.fill,T.color).call(S.stroke,T.line.color).call(_.dashLine,T.line.dash,T.line.width).style("opacity",m.selectedpoints&&!c.selected?M:1)}}),r(f,m,a),f.selectAll(".lines").each(function(){var c=m.connector.line;_.lineGroupStyle(v.select(this).selectAll("path"),c.width,c.color,c.dash)})})}q.exports={style:o}}}),nO=He({"src/traces/waterfall/hover.js"(Z,q){"use strict";var v=Wo().hoverLabelText,_=$n().opacity,S=f1().hoverOnBars,M=d1(),e={increasing:M.INCREASING.SYMBOL,decreasing:M.DECREASING.SYMBOL};q.exports=function(o,a,i,n,s){var h=S(o,a,i,n,s);if(!h)return;var f=h.cd,m=f[0].trace,c=m.orientation==="h",T=c?"x":"y",l=c?o.xa:o.ya;function x(D){return v(l,D,m[T+"hoverformat"])}var w=h.index,A=f[w],E=A.isSum?A.b+A.s:A.rawS;h.initial=A.b+A.s-E,h.delta=E,h.final=h.initial+h.delta;var p=x(Math.abs(h.delta));h.deltaLabel=E<0?"("+p+")":p,h.finalLabel=x(h.final),h.initialLabel=x(h.initial);var b=A.hi||m.hoverinfo,d=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",g=b.split("+"),y=function(D){return u||g.indexOf(D)!==-1};A.isSum||(y("final")&&(c?!y("x"):!y("y"))&&d.push(h.finalLabel),y("delta")&&(E<0?d.push(h.deltaLabel+" "+e.decreasing):d.push(h.deltaLabel+" "+e.increasing)),y("initial")&&d.push("Initial: "+h.initialLabel))}return d.length&&(h.extraText=d.join("
")),h.color=t(m,A),[h]};function t(r,o){var a=r[o.dir].marker,i=a.color,n=a.line.color,s=a.line.width;if(_(i))return i;if(_(n)&&s)return n}}}),oO=He({"src/traces/waterfall/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.x="xVal"in S?S.xVal:S.x,_.y="yVal"in S?S.yVal:S.y,"initial"in S&&(_.initial=S.initial),"delta"in S&&(_.delta=S.delta),"final"in S&&(_.final=S.final),S.xa&&(_.xaxis=S.xa),S.ya&&(_.yaxis=S.ya),_}}}),sO=He({"src/traces/waterfall/index.js"(Z,q){"use strict";q.exports={attributes:PS(),layoutAttributes:IS(),supplyDefaults:RS().supplyDefaults,crossTraceDefaults:RS().crossTraceDefaults,supplyLayoutDefaults:eO(),calc:tO(),crossTraceCalc:rO(),plot:aO(),style:iO().style,hoverPoints:nO(),eventData:oO(),selectPoints:h1(),moduleType:"trace",name:"waterfall",basePlotModule:Kf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),lO=He({"lib/waterfall.js"(Z,q){"use strict";q.exports=sO()}}),v1=He({"src/traces/image/constants.js"(Z,q){"use strict";q.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.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(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var _=v.slice(0,3);return _[1]=_[1]+"%",_[2]=_[2]+"%",_},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var _=v.slice(0,4);return _[1]=_[1]+"%",_[2]=_[2]+"%",_},suffix:["\xB0","%","%",""]}}}}}),DS=He({"src/traces/image/attributes.js"(Z,q){"use strict";var v=au(),_=af().zorder,{hovertemplateAttrs:S,templatefallbackAttrs:M}=$l(),e=rs().extendFlat,t=v1().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],o=[],a=[];for(n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");var m=h.indexOf("=");m===-1&&(m=f);var c=m===f?0:4-m%4;return[m,c]}function r(h){var f=t(h),m=f[0],c=f[1];return(m+c)*3/4-c}function o(h,f,m){return(f+m)*3/4-m}function a(h){var f,m=t(h),c=m[0],T=m[1],l=new _(o(h,c,T)),x=0,w=T>0?c-4:c,A;for(A=0;A>16&255,l[x++]=f>>8&255,l[x++]=f&255;return T===2&&(f=v[h.charCodeAt(A)]<<2|v[h.charCodeAt(A+1)]>>4,l[x++]=f&255),T===1&&(f=v[h.charCodeAt(A)]<<10|v[h.charCodeAt(A+1)]<<4|v[h.charCodeAt(A+2)]>>2,l[x++]=f>>8&255,l[x++]=f&255),l}function i(h){return q[h>>18&63]+q[h>>12&63]+q[h>>6&63]+q[h&63]}function n(h,f,m){for(var c,T=[],l=f;lw?w:x+l));return c===1?(f=h[m-1],T.push(q[f>>2]+q[f<<4&63]+"==")):c===2&&(f=(h[m-2]<<8)+h[m-1],T.push(q[f>>10]+q[f>>4&63]+q[f<<2&63]+"=")),T.join("")}}}),fO=He({"node_modules/ieee754/index.js"(Z){Z.read=function(q,v,_,S,M){var e,t,r=M*8-S-1,o=(1<>1,i=-7,n=_?M-1:0,s=_?-1:1,h=q[v+n];for(n+=s,e=h&(1<<-i)-1,h>>=-i,i+=r;i>0;e=e*256+q[v+n],n+=s,i-=8);for(t=e&(1<<-i)-1,e>>=-i,i+=S;i>0;t=t*256+q[v+n],n+=s,i-=8);if(e===0)e=1-a;else{if(e===o)return t?NaN:(h?-1:1)*(1/0);t=t+Math.pow(2,S),e=e-a}return(h?-1:1)*t*Math.pow(2,e-S)},Z.write=function(q,v,_,S,M,e){var t,r,o,a=e*8-M-1,i=(1<>1,s=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=S?0:e-1,f=S?1:-1,m=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(r=isNaN(v)?1:0,t=i):(t=Math.floor(Math.log(v)/Math.LN2),v*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+n>=1?v+=s/o:v+=s*Math.pow(2,1-n),v*o>=2&&(t++,o/=2),t+n>=i?(r=0,t=i):t+n>=1?(r=(v*o-1)*Math.pow(2,M),t=t+n):(r=v*Math.pow(2,n-1)*Math.pow(2,M),t=0));M>=8;q[_+h]=r&255,h+=f,r/=256,M-=8);for(t=t<0;q[_+h]=t&255,h+=f,t/=256,a-=8);q[_+h-f]|=m*128}}}),rg=He({"node_modules/buffer/index.js"(Z){"use strict";var q=cO(),v=fO(),_=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 S=2147483647;Z.kMaxLength=S,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 he=new Uint8Array(1),se={foo:function(){return 42}};return Object.setPrototypeOf(se,Uint8Array.prototype),Object.setPrototypeOf(he,se),he.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(he){if(he>S)throw new RangeError('The value "'+he+'" is invalid for option "size"');let se=new Uint8Array(he);return Object.setPrototypeOf(se,t.prototype),se}function t(he,se,ne){if(typeof he=="number"){if(typeof se=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(he)}return r(he,se,ne)}t.poolSize=8192;function r(he,se,ne){if(typeof he=="string")return n(he,se);if(ArrayBuffer.isView(he))return h(he);if(he==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he);if(je(he,ArrayBuffer)||he&&je(he.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(je(he,SharedArrayBuffer)||he&&je(he.buffer,SharedArrayBuffer)))return f(he,se,ne);if(typeof he=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ce=he.valueOf&&he.valueOf();if(Ce!=null&&Ce!==he)return t.from(Ce,se,ne);let Ze=m(he);if(Ze)return Ze;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof he[Symbol.toPrimitive]=="function")return t.from(he[Symbol.toPrimitive]("string"),se,ne);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof he)}t.from=function(he,se,ne){return r(he,se,ne)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array);function o(he){if(typeof he!="number")throw new TypeError('"size" argument must be of type number');if(he<0)throw new RangeError('The value "'+he+'" is invalid for option "size"')}function a(he,se,ne){return o(he),he<=0?e(he):se!==void 0?typeof ne=="string"?e(he).fill(se,ne):e(he).fill(se):e(he)}t.alloc=function(he,se,ne){return a(he,se,ne)};function i(he){return o(he),e(he<0?0:c(he)|0)}t.allocUnsafe=function(he){return i(he)},t.allocUnsafeSlow=function(he){return i(he)};function n(he,se){if((typeof se!="string"||se==="")&&(se="utf8"),!t.isEncoding(se))throw new TypeError("Unknown encoding: "+se);let ne=l(he,se)|0,Ce=e(ne),Ze=Ce.write(he,se);return Ze!==ne&&(Ce=Ce.slice(0,Ze)),Ce}function s(he){let se=he.length<0?0:c(he.length)|0,ne=e(se);for(let Ce=0;Ce=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return he|0}function T(he){return+he!=he&&(he=0),t.alloc(+he)}t.isBuffer=function(se){return se!=null&&se._isBuffer===!0&&se!==t.prototype},t.compare=function(se,ne){if(je(se,Uint8Array)&&(se=t.from(se,se.offset,se.byteLength)),je(ne,Uint8Array)&&(ne=t.from(ne,ne.offset,ne.byteLength)),!t.isBuffer(se)||!t.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(se===ne)return 0;let Ce=se.length,Ze=ne.length;for(let rt=0,Je=Math.min(Ce,Ze);rtZe.length?(t.isBuffer(Je)||(Je=t.from(Je)),Je.copy(Ze,rt)):Uint8Array.prototype.set.call(Ze,Je,rt);else if(t.isBuffer(Je))Je.copy(Ze,rt);else throw new TypeError('"list" argument must be an Array of Buffers');rt+=Je.length}return Ze};function l(he,se){if(t.isBuffer(he))return he.length;if(ArrayBuffer.isView(he)||je(he,ArrayBuffer))return he.byteLength;if(typeof he!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof he);let ne=he.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&ne===0)return 0;let Ze=!1;for(;;)switch(se){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":return pe(he).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne*2;case"hex":return ne>>>1;case"base64":return Re(he).length;default:if(Ze)return Ce?-1:pe(he).length;se=(""+se).toLowerCase(),Ze=!0}}t.byteLength=l;function x(he,se,ne){let Ce=!1;if((se===void 0||se<0)&&(se=0),se>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,se>>>=0,ne<=se))return"";for(he||(he="utf8");;)switch(he){case"hex":return O(this,se,ne);case"utf8":case"utf-8":return D(this,se,ne);case"ascii":return F(this,se,ne);case"latin1":case"binary":return N(this,se,ne);case"base64":return y(this,se,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,se,ne);default:if(Ce)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),Ce=!0}}t.prototype._isBuffer=!0;function w(he,se,ne){let Ce=he[se];he[se]=he[ne],he[ne]=Ce}t.prototype.swap16=function(){let se=this.length;if(se%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;nene&&(se+=" ... "),""},_&&(t.prototype[_]=t.prototype.inspect),t.prototype.compare=function(se,ne,Ce,Ze,rt){if(je(se,Uint8Array)&&(se=t.from(se,se.offset,se.byteLength)),!t.isBuffer(se))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof se);if(ne===void 0&&(ne=0),Ce===void 0&&(Ce=se?se.length:0),Ze===void 0&&(Ze=0),rt===void 0&&(rt=this.length),ne<0||Ce>se.length||Ze<0||rt>this.length)throw new RangeError("out of range index");if(Ze>=rt&&ne>=Ce)return 0;if(Ze>=rt)return-1;if(ne>=Ce)return 1;if(ne>>>=0,Ce>>>=0,Ze>>>=0,rt>>>=0,this===se)return 0;let Je=rt-Ze,St=Ce-ne,kt=Math.min(Je,St),Bt=this.slice(Ze,rt),Vt=se.slice(ne,Ce);for(let Ar=0;Ar2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,at(ne)&&(ne=Ze?0:he.length-1),ne<0&&(ne=he.length+ne),ne>=he.length){if(Ze)return-1;ne=he.length-1}else if(ne<0)if(Ze)ne=0;else return-1;if(typeof se=="string"&&(se=t.from(se,Ce)),t.isBuffer(se))return se.length===0?-1:E(he,se,ne,Ce,Ze);if(typeof se=="number")return se=se&255,typeof Uint8Array.prototype.indexOf=="function"?Ze?Uint8Array.prototype.indexOf.call(he,se,ne):Uint8Array.prototype.lastIndexOf.call(he,se,ne):E(he,[se],ne,Ce,Ze);throw new TypeError("val must be string, number or Buffer")}function E(he,se,ne,Ce,Ze){let rt=1,Je=he.length,St=se.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(he.length<2||se.length<2)return-1;rt=2,Je/=2,St/=2,ne/=2}function kt(Vt,Ar){return rt===1?Vt[Ar]:Vt.readUInt16BE(Ar*rt)}let Bt;if(Ze){let Vt=-1;for(Bt=ne;BtJe&&(ne=Je-St),Bt=ne;Bt>=0;Bt--){let Vt=!0;for(let Ar=0;ArZe&&(Ce=Ze)):Ce=Ze;let rt=se.length;Ce>rt/2&&(Ce=rt/2);let Je;for(Je=0;Je>>0,isFinite(Ce)?(Ce=Ce>>>0,Ze===void 0&&(Ze="utf8")):(Ze=Ce,Ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let rt=this.length-ne;if((Ce===void 0||Ce>rt)&&(Ce=rt),se.length>0&&(Ce<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ze||(Ze="utf8");let Je=!1;for(;;)switch(Ze){case"hex":return p(this,se,ne,Ce);case"utf8":case"utf-8":return b(this,se,ne,Ce);case"ascii":case"latin1":case"binary":return d(this,se,ne,Ce);case"base64":return u(this,se,ne,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,se,ne,Ce);default:if(Je)throw new TypeError("Unknown encoding: "+Ze);Ze=(""+Ze).toLowerCase(),Je=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(he,se,ne){return se===0&&ne===he.length?q.fromByteArray(he):q.fromByteArray(he.slice(se,ne))}function D(he,se,ne){ne=Math.min(he.length,ne);let Ce=[],Ze=se;for(;Ze239?4:rt>223?3:rt>191?2:1;if(Ze+St<=ne){let kt,Bt,Vt,Ar;switch(St){case 1:rt<128&&(Je=rt);break;case 2:kt=he[Ze+1],(kt&192)===128&&(Ar=(rt&31)<<6|kt&63,Ar>127&&(Je=Ar));break;case 3:kt=he[Ze+1],Bt=he[Ze+2],(kt&192)===128&&(Bt&192)===128&&(Ar=(rt&15)<<12|(kt&63)<<6|Bt&63,Ar>2047&&(Ar<55296||Ar>57343)&&(Je=Ar));break;case 4:kt=he[Ze+1],Bt=he[Ze+2],Vt=he[Ze+3],(kt&192)===128&&(Bt&192)===128&&(Vt&192)===128&&(Ar=(rt&15)<<18|(kt&63)<<12|(Bt&63)<<6|Vt&63,Ar>65535&&Ar<1114112&&(Je=Ar))}}Je===null?(Je=65533,St=1):Je>65535&&(Je-=65536,Ce.push(Je>>>10&1023|55296),Je=56320|Je&1023),Ce.push(Je),Ze+=St}return z(Ce)}var P=4096;function z(he){let se=he.length;if(se<=P)return String.fromCharCode.apply(String,he);let ne="",Ce=0;for(;CeCe)&&(ne=Ce);let Ze="";for(let rt=se;rtCe&&(se=Ce),ne<0?(ne+=Ce,ne<0&&(ne=0)):ne>Ce&&(ne=Ce),nene)throw new RangeError("Trying to access beyond buffer length")}t.prototype.readUintLE=t.prototype.readUIntLE=function(se,ne,Ce){se=se>>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se],rt=1,Je=0;for(;++Je>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se+--ne],rt=1;for(;ne>0&&(rt*=256);)Ze+=this[se+--ne]*rt;return Ze},t.prototype.readUint8=t.prototype.readUInt8=function(se,ne){return se=se>>>0,ne||U(se,1,this.length),this[se]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(se,ne){return se=se>>>0,ne||U(se,2,this.length),this[se]|this[se+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(se,ne){return se=se>>>0,ne||U(se,2,this.length),this[se]<<8|this[se+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),(this[se]|this[se+1]<<8|this[se+2]<<16)+this[se+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]*16777216+(this[se+1]<<16|this[se+2]<<8|this[se+3])},t.prototype.readBigUInt64LE=tt(function(se){se=se>>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=ne+this[++se]*2**8+this[++se]*2**16+this[++se]*2**24,rt=this[++se]+this[++se]*2**8+this[++se]*2**16+Ce*2**24;return BigInt(Ze)+(BigInt(rt)<>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=ne*2**24+this[++se]*2**16+this[++se]*2**8+this[++se],rt=this[++se]*2**24+this[++se]*2**16+this[++se]*2**8+Ce;return(BigInt(Ze)<>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=this[se],rt=1,Je=0;for(;++Je=rt&&(Ze-=Math.pow(2,8*ne)),Ze},t.prototype.readIntBE=function(se,ne,Ce){se=se>>>0,ne=ne>>>0,Ce||U(se,ne,this.length);let Ze=ne,rt=1,Je=this[se+--Ze];for(;Ze>0&&(rt*=256);)Je+=this[se+--Ze]*rt;return rt*=128,Je>=rt&&(Je-=Math.pow(2,8*ne)),Je},t.prototype.readInt8=function(se,ne){return se=se>>>0,ne||U(se,1,this.length),this[se]&128?(255-this[se]+1)*-1:this[se]},t.prototype.readInt16LE=function(se,ne){se=se>>>0,ne||U(se,2,this.length);let Ce=this[se]|this[se+1]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt16BE=function(se,ne){se=se>>>0,ne||U(se,2,this.length);let Ce=this[se+1]|this[se]<<8;return Ce&32768?Ce|4294901760:Ce},t.prototype.readInt32LE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]|this[se+1]<<8|this[se+2]<<16|this[se+3]<<24},t.prototype.readInt32BE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),this[se]<<24|this[se+1]<<16|this[se+2]<<8|this[se+3]},t.prototype.readBigInt64LE=tt(function(se){se=se>>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=this[se+4]+this[se+5]*2**8+this[se+6]*2**16+(Ce<<24);return(BigInt(Ze)<>>0,ae(se,"offset");let ne=this[se],Ce=this[se+7];(ne===void 0||Ce===void 0)&&j(se,this.length-8);let Ze=(ne<<24)+this[++se]*2**16+this[++se]*2**8+this[++se];return(BigInt(Ze)<>>0,ne||U(se,4,this.length),v.read(this,se,!0,23,4)},t.prototype.readFloatBE=function(se,ne){return se=se>>>0,ne||U(se,4,this.length),v.read(this,se,!1,23,4)},t.prototype.readDoubleLE=function(se,ne){return se=se>>>0,ne||U(se,8,this.length),v.read(this,se,!0,52,8)},t.prototype.readDoubleBE=function(se,ne){return se=se>>>0,ne||U(se,8,this.length),v.read(this,se,!1,52,8)};function B(he,se,ne,Ce,Ze,rt){if(!t.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(se>Ze||sehe.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,Ce=Ce>>>0,!Ze){let St=Math.pow(2,8*Ce)-1;B(this,se,ne,Ce,St,0)}let rt=1,Je=0;for(this[ne]=se&255;++Je>>0,Ce=Ce>>>0,!Ze){let St=Math.pow(2,8*Ce)-1;B(this,se,ne,Ce,St,0)}let rt=Ce-1,Je=1;for(this[ne+rt]=se&255;--rt>=0&&(Je*=256);)this[ne+rt]=se/Je&255;return ne+Ce},t.prototype.writeUint8=t.prototype.writeUInt8=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,1,255,0),this[ne]=se&255,ne+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,65535,0),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,65535,0),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,4294967295,0),this[ne+3]=se>>>24,this[ne+2]=se>>>16,this[ne+1]=se>>>8,this[ne]=se&255,ne+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,4294967295,0),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4};function W(he,se,ne,Ce,Ze){le(se,Ce,Ze,he,ne,7);let rt=Number(se&BigInt(4294967295));he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt,rt=rt>>8,he[ne++]=rt;let Je=Number(se>>BigInt(32)&BigInt(4294967295));return he[ne++]=Je,Je=Je>>8,he[ne++]=Je,Je=Je>>8,he[ne++]=Je,Je=Je>>8,he[ne++]=Je,ne}function $(he,se,ne,Ce,Ze){le(se,Ce,Ze,he,ne,7);let rt=Number(se&BigInt(4294967295));he[ne+7]=rt,rt=rt>>8,he[ne+6]=rt,rt=rt>>8,he[ne+5]=rt,rt=rt>>8,he[ne+4]=rt;let Je=Number(se>>BigInt(32)&BigInt(4294967295));return he[ne+3]=Je,Je=Je>>8,he[ne+2]=Je,Je=Je>>8,he[ne+1]=Je,Je=Je>>8,he[ne]=Je,ne+8}t.prototype.writeBigUInt64LE=tt(function(se,ne=0){return W(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=tt(function(se,ne=0){return $(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,!Ze){let kt=Math.pow(2,8*Ce-1);B(this,se,ne,Ce,kt-1,-kt)}let rt=0,Je=1,St=0;for(this[ne]=se&255;++rt>0)-St&255;return ne+Ce},t.prototype.writeIntBE=function(se,ne,Ce,Ze){if(se=+se,ne=ne>>>0,!Ze){let kt=Math.pow(2,8*Ce-1);B(this,se,ne,Ce,kt-1,-kt)}let rt=Ce-1,Je=1,St=0;for(this[ne+rt]=se&255;--rt>=0&&(Je*=256);)se<0&&St===0&&this[ne+rt+1]!==0&&(St=1),this[ne+rt]=(se/Je>>0)-St&255;return ne+Ce},t.prototype.writeInt8=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,1,127,-128),se<0&&(se=255+se+1),this[ne]=se&255,ne+1},t.prototype.writeInt16LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,32767,-32768),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},t.prototype.writeInt16BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,2,32767,-32768),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},t.prototype.writeInt32LE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,2147483647,-2147483648),this[ne]=se&255,this[ne+1]=se>>>8,this[ne+2]=se>>>16,this[ne+3]=se>>>24,ne+4},t.prototype.writeInt32BE=function(se,ne,Ce){return se=+se,ne=ne>>>0,Ce||B(this,se,ne,4,2147483647,-2147483648),se<0&&(se=4294967295+se+1),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4},t.prototype.writeBigInt64LE=tt(function(se,ne=0){return W(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=tt(function(se,ne=0){return $(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ue(he,se,ne,Ce,Ze,rt){if(ne+Ce>he.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function ce(he,se,ne,Ce,Ze){return se=+se,ne=ne>>>0,Ze||ue(he,se,ne,4,34028234663852886e22,-34028234663852886e22),v.write(he,se,ne,Ce,23,4),ne+4}t.prototype.writeFloatLE=function(se,ne,Ce){return ce(this,se,ne,!0,Ce)},t.prototype.writeFloatBE=function(se,ne,Ce){return ce(this,se,ne,!1,Ce)};function de(he,se,ne,Ce,Ze){return se=+se,ne=ne>>>0,Ze||ue(he,se,ne,8,17976931348623157e292,-17976931348623157e292),v.write(he,se,ne,Ce,52,8),ne+8}t.prototype.writeDoubleLE=function(se,ne,Ce){return de(this,se,ne,!0,Ce)},t.prototype.writeDoubleBE=function(se,ne,Ce){return de(this,se,ne,!1,Ce)},t.prototype.copy=function(se,ne,Ce,Ze){if(!t.isBuffer(se))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),!Ze&&Ze!==0&&(Ze=this.length),ne>=se.length&&(ne=se.length),ne||(ne=0),Ze>0&&Ze=this.length)throw new RangeError("Index out of range");if(Ze<0)throw new RangeError("sourceEnd out of bounds");Ze>this.length&&(Ze=this.length),se.length-ne>>0,Ce=Ce===void 0?this.length:Ce>>>0,se||(se=0);let rt;if(typeof se=="number")for(rt=ne;rt2**32?Ze=Q(String(ne)):typeof ne=="bigint"&&(Ze=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(Ze=Q(Ze)),Ze+="n"),Ce+=` It must be ${se}. Received ${Ze}`,Ce},RangeError);function Q(he){let se="",ne=he.length,Ce=he[0]==="-"?1:0;for(;ne>=Ce+4;ne-=3)se=`_${he.slice(ne-3,ne)}${se}`;return`${he.slice(0,ne)}${se}`}function V(he,se,ne){ae(se,"offset"),(he[se]===void 0||he[se+ne]===void 0)&&j(se,he.length-(ne+1))}function le(he,se,ne,Ce,Ze,rt){if(he>ne||he3?se===0||se===BigInt(0)?St=`>= 0${Je} and < 2${Je} ** ${(rt+1)*8}${Je}`:St=`>= -(2${Je} ** ${(rt+1)*8-1}${Je}) and < 2 ** ${(rt+1)*8-1}${Je}`:St=`>= ${se}${Je} and <= ${ne}${Je}`,new Y.ERR_OUT_OF_RANGE("value",St,he)}V(Ce,Ze,rt)}function ae(he,se){if(typeof he!="number")throw new Y.ERR_INVALID_ARG_TYPE(se,"number",he)}function j(he,se,ne){throw Math.floor(he)!==he?(ae(he,ne),new Y.ERR_OUT_OF_RANGE(ne||"offset","an integer",he)):se<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${se}`,he)}var ee=/[^+/0-9A-Za-z-_]/g;function te(he){if(he=he.split("=")[0],he=he.trim().replace(ee,""),he.length<2)return"";for(;he.length%4!==0;)he=he+"=";return he}function pe(he,se){se=se||1/0;let ne,Ce=he.length,Ze=null,rt=[];for(let Je=0;Je55295&&ne<57344){if(!Ze){if(ne>56319){(se-=3)>-1&&rt.push(239,191,189);continue}else if(Je+1===Ce){(se-=3)>-1&&rt.push(239,191,189);continue}Ze=ne;continue}if(ne<56320){(se-=3)>-1&&rt.push(239,191,189),Ze=ne;continue}ne=(Ze-55296<<10|ne-56320)+65536}else Ze&&(se-=3)>-1&&rt.push(239,191,189);if(Ze=null,ne<128){if((se-=1)<0)break;rt.push(ne)}else if(ne<2048){if((se-=2)<0)break;rt.push(ne>>6|192,ne&63|128)}else if(ne<65536){if((se-=3)<0)break;rt.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if((se-=4)<0)break;rt.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,ne&63|128)}else throw new Error("Invalid code point")}return rt}function we(he){let se=[];for(let ne=0;ne>8,Ze=ne%256,rt.push(Ze),rt.push(Ce);return rt}function Re(he){return q.toByteArray(te(he))}function Pe(he,se,ne,Ce){let Ze;for(Ze=0;Ze=se.length||Ze>=he.length);++Ze)se[Ze+ne]=he[Ze];return Ze}function je(he,se){return he instanceof se||he!=null&&he.constructor!=null&&he.constructor.name!=null&&he.constructor.name===se.name}function at(he){return he!==he}var nt=function(){let he="0123456789abcdef",se=new Array(256);for(let ne=0;ne<16;++ne){let Ce=ne*16;for(let Ze=0;Ze<16;++Ze)se[Ce+Ze]=he[ne]+he[Ze]}return se}();function tt(he){return typeof BigInt>"u"?Ve:he}function Ve(){throw new Error("BigInt not supported")}}}),p3=He({"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 _={},S=Symbol("test"),M=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(M)!=="[object Symbol]")return!1;var e=42;_[S]=e;for(var t in _)return!1;if(typeof Object.keys=="function"&&Object.keys(_).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(_).length!==0)return!1;var r=Object.getOwnPropertySymbols(_);if(r.length!==1||r[0]!==S||!Object.prototype.propertyIsEnumerable.call(_,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(_,S);if(o.value!==e||o.enumerable!==!0)return!1}return!0}}}),W_=He({"node_modules/has-tostringtag/shams.js"(Z,q){"use strict";var v=p3();q.exports=function(){return v()&&!!Symbol.toStringTag}}}),FS=He({"node_modules/es-object-atoms/index.js"(Z,q){"use strict";q.exports=Object}}),hO=He({"node_modules/es-errors/index.js"(Z,q){"use strict";q.exports=Error}}),pO=He({"node_modules/es-errors/eval.js"(Z,q){"use strict";q.exports=EvalError}}),dO=He({"node_modules/es-errors/range.js"(Z,q){"use strict";q.exports=RangeError}}),vO=He({"node_modules/es-errors/ref.js"(Z,q){"use strict";q.exports=ReferenceError}}),OS=He({"node_modules/es-errors/syntax.js"(Z,q){"use strict";q.exports=SyntaxError}}),m1=He({"node_modules/es-errors/type.js"(Z,q){"use strict";q.exports=TypeError}}),mO=He({"node_modules/es-errors/uri.js"(Z,q){"use strict";q.exports=URIError}}),gO=He({"node_modules/math-intrinsics/abs.js"(Z,q){"use strict";q.exports=Math.abs}}),yO=He({"node_modules/math-intrinsics/floor.js"(Z,q){"use strict";q.exports=Math.floor}}),_O=He({"node_modules/math-intrinsics/max.js"(Z,q){"use strict";q.exports=Math.max}}),xO=He({"node_modules/math-intrinsics/min.js"(Z,q){"use strict";q.exports=Math.min}}),bO=He({"node_modules/math-intrinsics/pow.js"(Z,q){"use strict";q.exports=Math.pow}}),wO=He({"node_modules/math-intrinsics/round.js"(Z,q){"use strict";q.exports=Math.round}}),TO=He({"node_modules/math-intrinsics/isNaN.js"(Z,q){"use strict";q.exports=Number.isNaN||function(_){return _!==_}}}),AO=He({"node_modules/math-intrinsics/sign.js"(Z,q){"use strict";var v=TO();q.exports=function(S){return v(S)||S===0?S:S<0?-1:1}}}),SO=He({"node_modules/gopd/gOPD.js"(Z,q){"use strict";q.exports=Object.getOwnPropertyDescriptor}}),ag=He({"node_modules/gopd/index.js"(Z,q){"use strict";var v=SO();if(v)try{v([],"length")}catch{v=null}q.exports=v}}),X_=He({"node_modules/es-define-property/index.js"(Z,q){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}q.exports=v}}),MO=He({"node_modules/has-symbols/index.js"(Z,q){"use strict";var v=typeof Symbol<"u"&&Symbol,_=p3();q.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_()}}}),BS=He({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,q){"use strict";q.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),NS=He({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,q){"use strict";var v=FS();q.exports=v.getPrototypeOf||null}}),EO=He({"node_modules/function-bind/implementation.js"(Z,q){"use strict";var v="Function.prototype.bind called on incompatible ",_=Object.prototype.toString,S=Math.max,M="[object Function]",e=function(a,i){for(var n=[],s=0;s"u"||!b?v:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":p&&b?b([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S,"%eval%":eval,"%EvalError%":M,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&b?b(b([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p||!b?v:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":e,"%ReferenceError%":t,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p||!b?v:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&b?b(""[Symbol.iterator]()):v,"%Symbol%":p?Symbol:v,"%SyntaxError%":r,"%ThrowTypeError%":E,"%TypedArray%":P,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":y,"%Function.prototype.apply%":g,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":d,"%Math.abs%":i,"%Math.floor%":n,"%Math.max%":s,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":m,"%Math.sign%":c,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(V){F=b(b(V)),z["%Error.prototype%"]=F}var F,N=function V(le){var ae;if(le==="%AsyncFunction%")ae=l("async function () {}");else if(le==="%GeneratorFunction%")ae=l("function* () {}");else if(le==="%AsyncGeneratorFunction%")ae=l("async function* () {}");else if(le==="%AsyncGenerator%"){var j=V("%AsyncGeneratorFunction%");j&&(ae=j.prototype)}else if(le==="%AsyncIteratorPrototype%"){var ee=V("%AsyncGenerator%");ee&&b&&(ae=b(ee.prototype))}return z[le]=ae,ae},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"]},L=g1(),U=RO(),B=L.call(y,Array.prototype.concat),W=L.call(g,Array.prototype.splice),$=L.call(y,String.prototype.replace),ue=L.call(y,String.prototype.slice),ce=L.call(y,RegExp.prototype.exec),de=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,X=function(le){var ae=ue(le,0,1),j=ue(le,-1);if(ae==="%"&&j!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&ae!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var ee=[];return $(le,de,function(te,pe,we,Se){ee[ee.length]=we?$(Se,Y,"$1"):pe||te}),ee},Q=function(le,ae){var j=le,ee;if(U(O,j)&&(ee=O[j],j="%"+ee[0]+"%"),U(z,j)){var te=z[j];if(te===D&&(te=N(j)),typeof te>"u"&&!ae)throw new o("intrinsic "+le+" exists, but is not available. Please file an issue!");return{alias:ee,name:j,value:te}}throw new r("intrinsic "+le+" does not exist!")};q.exports=function(le,ae){if(typeof le!="string"||le.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ae!="boolean")throw new o('"allowMissing" argument must be a boolean');if(ce(/^%?[^%]*%?$/,le)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=X(le),ee=j.length>0?j[0]:"",te=Q("%"+ee+"%",ae),pe=te.name,we=te.value,Se=!1,Re=te.alias;Re&&(ee=Re[0],W(j,B([0,1],Re)));for(var Pe=1,je=!0;Pe=j.length){var Ve=x(we,at);je=!!Ve,je&&"get"in Ve&&!("originalValue"in Ve.get)?we=Ve.get:we=we[at]}else je=U(we,at),we=we[at];je&&!Se&&(z[pe]=we)}}return we}}}),DO=He({"node_modules/define-data-property/index.js"(Z,q){"use strict";var v=X_(),_=OS(),S=m1(),M=ag();q.exports=function(t,r,o){if(!t||typeof t!="object"&&typeof t!="function")throw new S("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new S("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new S("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new S("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new S("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new S("`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,h=!!M&&M(t,r);if(v)v(t,r,{configurable:n===null&&h?h.configurable:!n,enumerable:a===null&&h?h.enumerable:!a,value:o,writable:i===null&&h?h.writable:!i});else if(s||!a&&!i&&!n)t[r]=o;else throw new _("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),jS=He({"node_modules/has-property-descriptors/index.js"(Z,q){"use strict";var v=X_(),_=function(){return!!v};_.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},q.exports=_}}),zO=He({"node_modules/set-function-length/index.js"(Z,q){"use strict";var v=v3(),_=DO(),S=jS()(),M=ag(),e=m1(),t=v("%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 h=M(o,"length");h&&!h.configurable&&(n=!1),h&&!h.writable&&(s=!1)}return(n||s||!i)&&(S?_(o,"length",a,!0,!0):_(o,"length",a)),o}}}),Z_=He({"node_modules/call-bind/index.js"(Z,q){"use strict";var v=g1(),_=v3(),S=zO(),M=m1(),e=_("%Function.prototype.apply%"),t=_("%Function.prototype.call%"),r=_("%Reflect.apply%",!0)||v.call(t,e),o=X_(),a=_("%Math.max%");q.exports=function(s){if(typeof s!="function")throw new M("a function is required");var h=r(v,t,arguments);return S(h,1+a(0,s.length-(arguments.length-1)),!0)};var i=function(){return r(v,e,arguments)};o?o(q.exports,"apply",{value:i}):q.exports.apply=i}}),y1=He({"node_modules/call-bind/callBound.js"(Z,q){"use strict";var v=v3(),_=Z_(),S=_(v("String.prototype.indexOf"));q.exports=function(e,t){var r=v(e,!!t);return typeof r=="function"&&S(e,".prototype.")>-1?_(r):r}}}),FO=He({"node_modules/is-arguments/index.js"(Z,q){"use strict";var v=W_()(),_=y1(),S=_("Object.prototype.toString"),M=function(o){return v&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:S(o)==="[object Arguments]"},e=function(o){return M(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&S(o)!=="[object Array]"&&S(o.callee)==="[object Function]"},t=function(){return M(arguments)}();M.isLegacyArguments=e,q.exports=t?M:e}}),OO=He({"node_modules/is-generator-function/index.js"(Z,q){"use strict";var v=Object.prototype.toString,_=Function.prototype.toString,S=/^\s*(?:function)?\*/,M=W_()(),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(S.test(_.call(a)))return!0;if(!M){var i=v.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}}}),BO=He({"node_modules/is-callable/index.js"(Z,q){"use strict";var v=Function.prototype.toString,_=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,M;if(typeof _=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw M}}),M={},_(function(){throw 42},null,S)}catch(x){x!==M&&(_=null)}else _=null;var e=/^\s*class\b/,t=function(w){try{var A=v.call(w);return e.test(A)}catch{return!1}},r=function(w){try{return t(w)?!1:(v.call(w),!0)}catch{return!1}},o=Object.prototype.toString,a="[object Object]",i="[object Function]",n="[object GeneratorFunction]",s="[object HTMLAllCollection]",h="[object HTML document.all class]",f="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,c=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(l=document.all,o.call(l)===o.call(document.all)&&(T=function(w){if((c||!w)&&(typeof w>"u"||typeof w=="object"))try{var A=o.call(w);return(A===s||A===h||A===f||A===a)&&w("")==null}catch{}return!1}));var l;q.exports=_?function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{_(w,null,S)}catch(A){if(A!==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(m)return r(w);if(t(w))return!1;var A=o.call(w);return A!==i&&A!==n&&!/^\[object HTML/.test(A)?!1:r(w)}}}),qS=He({"node_modules/for-each/index.js"(Z,q){"use strict";var v=BO(),_=Object.prototype.toString,S=Object.prototype.hasOwnProperty,M=function(a,i,n){for(var s=0,h=a.length;s=3&&(s=n),_.call(a)==="[object Array]"?M(a,i,s):typeof a=="string"?e(a,i,s):t(a,i,s)};q.exports=r}}),VS=He({"node_modules/available-typed-arrays/index.js"(Z,q){"use strict";var v=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],_=typeof globalThis>"u"?window:globalThis;q.exports=function(){for(var M=[],e=0;e"u"?window:globalThis,a=_(),i=M("String.prototype.slice"),n=Object.getPrototypeOf,s=M("Array.prototype.indexOf",!0)||function(T,l){for(var x=0;x-1?l:l!=="Object"?!1:m(T)}return e?f(T):null}}}),UO=He({"node_modules/is-typed-array/index.js"(Z,q){"use strict";var v=qS(),_=VS(),S=y1(),M=S("Object.prototype.toString"),e=W_()(),t=ag(),r=typeof globalThis>"u"?window:globalThis,o=_(),a=S("Array.prototype.indexOf",!0)||function(m,c){for(var T=0;T-1}return t?h(m):!1}}}),GS=He({"node_modules/util/support/types.js"(Z){"use strict";var q=FO(),v=OO(),_=NO(),S=UO();function M(Se){return Se.call.bind(Se)}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 h(Se,Re){if(typeof Se!="object")return!1;try{return Re(Se),!0}catch{return!1}}Z.isArgumentsObject=q,Z.isGeneratorFunction=v,Z.isTypedArray=S;function f(Se){return typeof Promise<"u"&&Se instanceof Promise||Se!==null&&typeof Se=="object"&&typeof Se.then=="function"&&typeof Se.catch=="function"}Z.isPromise=f;function m(Se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Se):S(Se)||W(Se)}Z.isArrayBufferView=m;function c(Se){return _(Se)==="Uint8Array"}Z.isUint8Array=c;function T(Se){return _(Se)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Se){return _(Se)==="Uint16Array"}Z.isUint16Array=l;function x(Se){return _(Se)==="Uint32Array"}Z.isUint32Array=x;function w(Se){return _(Se)==="Int8Array"}Z.isInt8Array=w;function A(Se){return _(Se)==="Int16Array"}Z.isInt16Array=A;function E(Se){return _(Se)==="Int32Array"}Z.isInt32Array=E;function p(Se){return _(Se)==="Float32Array"}Z.isFloat32Array=p;function b(Se){return _(Se)==="Float64Array"}Z.isFloat64Array=b;function d(Se){return _(Se)==="BigInt64Array"}Z.isBigInt64Array=d;function u(Se){return _(Se)==="BigUint64Array"}Z.isBigUint64Array=u;function g(Se){return r(Se)==="[object Map]"}g.working=typeof Map<"u"&&g(new Map);function y(Se){return typeof Map>"u"?!1:g.working?g(Se):Se instanceof Map}Z.isMap=y;function D(Se){return r(Se)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function P(Se){return typeof Set>"u"?!1:D.working?D(Se):Se instanceof Set}Z.isSet=P;function z(Se){return r(Se)==="[object WeakMap]"}z.working=typeof WeakMap<"u"&&z(new WeakMap);function F(Se){return typeof WeakMap>"u"?!1:z.working?z(Se):Se instanceof WeakMap}Z.isWeakMap=F;function N(Se){return r(Se)==="[object WeakSet]"}N.working=typeof WeakSet<"u"&&N(new WeakSet);function O(Se){return N(Se)}Z.isWeakSet=O;function L(Se){return r(Se)==="[object ArrayBuffer]"}L.working=typeof ArrayBuffer<"u"&&L(new ArrayBuffer);function U(Se){return typeof ArrayBuffer>"u"?!1:L.working?L(Se):Se instanceof ArrayBuffer}Z.isArrayBuffer=U;function B(Se){return r(Se)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function W(Se){return typeof DataView>"u"?!1:B.working?B(Se):Se instanceof DataView}Z.isDataView=W;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ue(Se){return r(Se)==="[object SharedArrayBuffer]"}function ce(Se){return typeof $>"u"?!1:(typeof ue.working>"u"&&(ue.working=ue(new $)),ue.working?ue(Se):Se instanceof $)}Z.isSharedArrayBuffer=ce;function de(Se){return r(Se)==="[object AsyncFunction]"}Z.isAsyncFunction=de;function Y(Se){return r(Se)==="[object Map Iterator]"}Z.isMapIterator=Y;function X(Se){return r(Se)==="[object Set Iterator]"}Z.isSetIterator=X;function Q(Se){return r(Se)==="[object Generator]"}Z.isGeneratorObject=Q;function V(Se){return r(Se)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=V;function le(Se){return h(Se,o)}Z.isNumberObject=le;function ae(Se){return h(Se,a)}Z.isStringObject=ae;function j(Se){return h(Se,i)}Z.isBooleanObject=j;function ee(Se){return e&&h(Se,n)}Z.isBigIntObject=ee;function te(Se){return t&&h(Se,s)}Z.isSymbolObject=te;function pe(Se){return le(Se)||ae(Se)||j(Se)||ee(Se)||te(Se)}Z.isBoxedPrimitive=pe;function we(Se){return typeof Uint8Array<"u"&&(U(Se)||ce(Se))}Z.isAnyArrayBuffer=we,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Se){Object.defineProperty(Z,Se,{enumerable:!1,value:function(){throw new Error(Se+" is not supported in userland")}})})}}),HS=He({"node_modules/util/support/isBufferBrowser.js"(Z,q){q.exports=function(_){return _&&typeof _=="object"&&typeof _.copy=="function"&&typeof _.fill=="function"&&typeof _.readUInt8=="function"}}}),WS=He({"(disabled):node_modules/util/util.js"(Z){var q=Object.getOwnPropertyDescriptors||function(W){for(var $=Object.keys(W),ue={},ce=0;ce<$.length;ce++)ue[$[ce]]=Object.getOwnPropertyDescriptor(W,$[ce]);return ue},v=/%[sdj%]/g;Z.format=function(B){if(!w(B)){for(var W=[],$=0;$=ce)return X;switch(X){case"%s":return String(ue[$++]);case"%d":return Number(ue[$++]);case"%j":try{return JSON.stringify(ue[$++])}catch{return"[Circular]"}default:return X}}),Y=ue[$];$"u")return function(){return Z.deprecate(B,W).apply(this,arguments)};var $=!1;function ue(){if(!$){if(process.throwDeprecation)throw new Error(W);process.traceDeprecation?console.trace(W):console.error(W),$=!0}return B.apply(this,arguments)}return ue};var _={},S=/^$/;M="false",M=M.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+M+"$","i");var M;Z.debuglog=function(B){if(B=B.toUpperCase(),!_[B])if(S.test(B)){var W=process.pid;_[B]=function(){var $=Z.format.apply(Z,arguments);console.error("%s %d: %s",B,W,$)}}else _[B]=function(){};return _[B]};function e(B,W){var $={seen:[],stylize:r};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),c(W)?$.showHidden=W:W&&Z._extend($,W),E($.showHidden)&&($.showHidden=!1),E($.depth)&&($.depth=2),E($.colors)&&($.colors=!1),E($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=t),a($,B,$.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(B,W){var $=e.styles[W];return $?"\x1B["+e.colors[$][0]+"m"+B+"\x1B["+e.colors[$][1]+"m":B}function r(B,W){return B}function o(B){var W={};return B.forEach(function($,ue){W[$]=!0}),W}function a(B,W,$){if(B.customInspect&&W&&g(W.inspect)&&W.inspect!==Z.inspect&&!(W.constructor&&W.constructor.prototype===W)){var ue=W.inspect($,B);return w(ue)||(ue=a(B,ue,$)),ue}var ce=i(B,W);if(ce)return ce;var de=Object.keys(W),Y=o(de);if(B.showHidden&&(de=Object.getOwnPropertyNames(W)),u(W)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return n(W);if(de.length===0){if(g(W)){var X=W.name?": "+W.name:"";return B.stylize("[Function"+X+"]","special")}if(p(W))return B.stylize(RegExp.prototype.toString.call(W),"regexp");if(d(W))return B.stylize(Date.prototype.toString.call(W),"date");if(u(W))return n(W)}var Q="",V=!1,le=["{","}"];if(m(W)&&(V=!0,le=["[","]"]),g(W)){var ae=W.name?": "+W.name:"";Q=" [Function"+ae+"]"}if(p(W)&&(Q=" "+RegExp.prototype.toString.call(W)),d(W)&&(Q=" "+Date.prototype.toUTCString.call(W)),u(W)&&(Q=" "+n(W)),de.length===0&&(!V||W.length==0))return le[0]+Q+le[1];if($<0)return p(W)?B.stylize(RegExp.prototype.toString.call(W),"regexp"):B.stylize("[Object]","special");B.seen.push(W);var j;return V?j=s(B,W,$,Y,de):j=de.map(function(ee){return h(B,W,$,Y,ee,V)}),B.seen.pop(),f(j,Q,le)}function i(B,W){if(E(W))return B.stylize("undefined","undefined");if(w(W)){var $="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize($,"string")}if(x(W))return B.stylize(""+W,"number");if(c(W))return B.stylize(""+W,"boolean");if(T(W))return B.stylize("null","null")}function n(B){return"["+Error.prototype.toString.call(B)+"]"}function s(B,W,$,ue,ce){for(var de=[],Y=0,X=W.length;Y-1&&(de?X=X.split(` `).map(function(V){return" "+V}).join(` `).slice(2):X=` @@ -1991,7 +1991,7 @@ void main() { `)&&O!=="\\"?(ee(L.join("")),F=h,P):(L.push(N),O=N,P+1)}function Pe(){return Re()}function je(){return N==="/"&&O==="*"?(L.push(N),ee(L.join("")),F=h,P+1):(L.push(N),O=N,P+1)}function at(){if(O==="."&&/\d/.test(N))return F=w,P;if(O==="/"&&N==="*")return F=m,P;if(O==="/"&&N==="/")return F=c,P;if(N==="."&&L.length){for(;nt(L););return F=w,P}if(N===";"||N===")"||N==="("){if(L.length)for(;nt(L););return ee(N),F=h,P+1}var ne=L.length===2&&N!=="=";if(/[\w_\d\s]/.test(N)||ne){for(;nt(L););return F=h,P}return L.push(N),O=N,P+1}function nt(ne){var Ce=0,Ze,rt;do{if(Ze=a.indexOf(ne.slice(0,ne.length+Ce).join("")),rt=a[Ze],Ze===-1){if(Ce--+ne.length>0)continue;rt=ne.slice(0,1).join("")}return ee(rt),ce+=rt.length,L=L.slice(rt.length),L.length}while(!0)}function tt(){return/[^a-fA-F0-9]/.test(N)?(ee(L.join("")),F=h,P):(L.push(N),O=N,P+1)}function Ve(){return N==="."||/[eE]/.test(N)?(L.push(N),F=w,O=N,P+1):N==="x"&&L.length===1&&L[0]==="0"?(F=u,L.push(N),O=N,P+1):/[^\d]/.test(N)?(ee(L.join("")),F=h,P):(L.push(N),O=N,P+1)}function he(){return N==="f"&&(L.push(N),O=N,P+=1),/[eE]/.test(N)||(N==="-"||N==="+")&&/[eE]/.test(O)?(L.push(N),O=N,P+1):/[^\d]/.test(N)?(ee(L.join("")),F=h,P):(L.push(N),O=N,P+1)}function se(){if(/[^\d\w_]/.test(N)){var ne=L.join("");return j[ne]?F=p:ae[ne]?F=E:F=A,ee(L.join("")),F=h,P}return L.push(N),O=N,P+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),h=[];return h=h.concat(s(i)),h=h.concat(s(null)),h}},3236:function(e){e.exports=function(t){typeof t=="string"&&(t=[t]);for(var r=[].slice.call(arguments,1),o=[],a=0;a>1,T=-7,l=a?n-1:0,x=a?-1:1,w=r[o+l];for(l+=x,s=w&(1<<-T)-1,w>>=-T,T+=f;T>0;s=s*256+r[o+l],l+=x,T-=8);for(h=s&(1<<-T)-1,s>>=-T,T+=i;T>0;h=h*256+r[o+l],l+=x,T-=8);if(s===0)s=1-c;else{if(s===m)return h?NaN:(w?-1:1)*(1/0);h=h+Math.pow(2,i),s=s-c}return(w?-1:1)*h*Math.pow(2,s-i)},t.write=function(r,o,a,i,n,s){var h,f,m,c=s*8-n-1,T=(1<>1,x=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=i?0:s-1,A=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,h=T):(h=Math.floor(Math.log(o)/Math.LN2),o*(m=Math.pow(2,-h))<1&&(h--,m*=2),h+l>=1?o+=x/m:o+=x*Math.pow(2,1-l),o*m>=2&&(h++,m/=2),h+l>=T?(f=0,h=T):h+l>=1?(f=(o*m-1)*Math.pow(2,n),h=h+l):(f=o*Math.pow(2,l-1)*Math.pow(2,n),h=0));n>=8;r[a+w]=f&255,w+=A,f/=256,n-=8);for(h=h<0;r[a+w]=h&255,w+=A,h/=256,c-=8);r[a+w-A]|=E*128}},8954:function(e,t,r){"use strict";e.exports=l;var o=r(3250),a=r(6803).Fw;function i(x,w,A){this.vertices=x,this.adjacent=w,this.boundary=A,this.lastVisited=-1}i.prototype.flip=function(){var x=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=x;var w=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=w};function n(x,w,A){this.vertices=x,this.cell=w,this.index=A}function s(x,w){return a(x.vertices,w.vertices)}function h(x){return function(){var w=this.tuple;return x.apply(this,w)}}function f(x){var w=o[x+1];return w||(w=o),h(w)}var m=[];function c(x,w,A){this.dimension=x,this.vertices=w,this.simplices=A,this.interior=A.filter(function(b){return!b.boundary}),this.tuple=new Array(x+1);for(var E=0;E<=x;++E)this.tuple[E]=this.vertices[E];var p=m[x];p||(p=m[x]=f(x)),this.orient=p}var T=c.prototype;T.handleBoundaryDegeneracy=function(x,w){var A=this.dimension,E=this.vertices.length-1,p=this.tuple,b=this.vertices,d=[x];for(x.lastVisited=-E;d.length>0;){x=d.pop();for(var u=x.adjacent,g=0;g<=A;++g){var y=u[g];if(!(!y.boundary||y.lastVisited<=-E)){for(var D=y.vertices,P=0;P<=A;++P){var z=D[P];z<0?p[P]=w:p[P]=b[z]}var F=this.orient();if(F>0)return y;y.lastVisited=-E,F===0&&d.push(y)}}}return null},T.walk=function(x,w){var A=this.vertices.length-1,E=this.dimension,p=this.vertices,b=this.tuple,d=w?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[d];e:for(;!u.boundary;){for(var g=u.vertices,y=u.adjacent,D=0;D<=E;++D)b[D]=p[g[D]];u.lastVisited=A;for(var D=0;D<=E;++D){var P=y[D];if(!(P.lastVisited>=A)){var z=b[D];b[D]=x;var F=this.orient();if(b[D]=z,F<0){u=P;continue e}else P.boundary?P.lastVisited=-A:P.lastVisited=A}}return}return u},T.addPeaks=function(x,w){var A=this.vertices.length-1,E=this.dimension,p=this.vertices,b=this.tuple,d=this.interior,u=this.simplices,g=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,d.push(w);for(var y=[];g.length>0;){var w=g.pop(),D=w.vertices,P=w.adjacent,z=D.indexOf(A);if(!(z<0)){for(var F=0;F<=E;++F)if(F!==z){var N=P[F];if(!(!N.boundary||N.lastVisited>=A)){var O=N.vertices;if(N.lastVisited!==-A){for(var L=0,U=0;U<=E;++U)O[U]<0?(L=U,b[U]=x):b[U]=p[O[U]];var B=this.orient();if(B>0){O[L]=A,N.boundary=!1,d.push(N),g.push(N),N.lastVisited=A;continue}else N.lastVisited=-A}var W=N.adjacent,$=D.slice(),ue=P.slice(),ce=new i($,ue,!0);u.push(ce);var de=W.indexOf(w);if(!(de<0)){W[de]=ce,ue[z]=N,$[F]=-1,ue[F]=w,P[F]=ce,ce.flip();for(var U=0;U<=E;++U){var Y=$[U];if(!(Y<0||Y===A)){for(var X=new Array(E-1),Q=0,V=0;V<=E;++V){var le=$[V];le<0||V===U||(X[Q++]=le)}y.push(new n(X,ce,U))}}}}}}}y.sort(s);for(var F=0;F+1=0?d[g++]=u[D]:y=D&1;if(y===(x&1)){var P=d[0];d[0]=d[1],d[1]=P}w.push(d)}}return w};function l(x,w){var A=x.length;if(A===0)throw new Error("Must have at least d+1 points");var E=x[0].length;if(A<=E)throw new Error("Must input at least d+1 points");var p=x.slice(0,E+1),b=o.apply(void 0,p);if(b===0)throw new Error("Input not in general position");for(var d=new Array(E+1),u=0;u<=E;++u)d[u]=u;b<0&&(d[0]=1,d[1]=0);for(var g=new i(d,new Array(E+1),!1),y=g.adjacent,D=new Array(E+2),u=0;u<=E;++u){for(var P=d.slice(),z=0;z<=E;++z)z===u&&(P[z]=-1);var F=P[0];P[0]=P[1],P[1]=F;var N=new i(P,new Array(E+1),!0);y[u]=N,D[u]=N}D[E+1]=g;for(var u=0;u<=E;++u)for(var P=y[u].vertices,O=y[u].adjacent,z=0;z<=E;++z){var L=P[z];if(L<0){O[z]=g;continue}for(var U=0;U<=E;++U)y[U].vertices.indexOf(L)<0&&(O[z]=y[U])}for(var B=new c(E,p,D),W=!!w,u=E+1;u3*(D+1)?c(this,y):this.left.insert(y):this.left=b([y]);else if(y[0]>this.mid)this.right?4*(this.right.count+1)>3*(D+1)?c(this,y):this.right.insert(y):this.right=b([y]);else{var P=o.ge(this.leftPoints,y,E),z=o.ge(this.rightPoints,y,p);this.leftPoints.splice(P,0,y),this.rightPoints.splice(z,0,y)}},h.remove=function(y){var D=this.count-this.leftPoints;if(y[1]3*(D-1))return T(this,y);var z=this.left.remove(y);return z===n?(this.left=null,this.count-=1,i):(z===i&&(this.count-=1),z)}else if(y[0]>this.mid){if(!this.right)return a;var F=this.left?this.left.count:0;if(4*F>3*(D-1))return T(this,y);var z=this.right.remove(y);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]===y?n:a;if(this.leftPoints.length===1&&this.leftPoints[0]===y){if(this.left&&this.right){for(var N=this,O=this.left;O.right;)N=O,O=O.right;if(N===this)O.right=this.right;else{var L=this.left,z=this.right;N.count-=O.count,N.right=O.left,O.left=L,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 L=o.ge(this.leftPoints,y,E);L=0&&y[z][1]>=D;--z){var F=P(y[z]);if(F)return F}}function w(y,D){for(var P=0;Pthis.mid){if(this.right){var P=this.right.queryPoint(y,D);if(P)return P}return x(this.rightPoints,y,D)}else return w(this.leftPoints,D)},h.queryInterval=function(y,D,P){if(ythis.mid&&this.right){var z=this.right.queryInterval(y,D,P);if(z)return z}return Dthis.mid?x(this.rightPoints,y,P):w(this.leftPoints,P)};function A(y,D){return y-D}function E(y,D){var P=y[0]-D[0];return P||y[1]-D[1]}function p(y,D){var P=y[1]-D[1];return P||y[0]-D[0]}function b(y){if(y.length===0)return null;for(var D=[],P=0;P>1],F=[],N=[],O=[],P=0;P13)&&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),h=r(5665),f={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},m=a(),c=a(),T=[0,0,0,0],l=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];e.exports=function(b,d,u,g,y,D){if(d||(d=[0,0,0]),u||(u=[0,0,0]),g||(g=[0,0,0]),y||(y=[0,0,0,1]),D||(D=[0,0,0,1]),!o(m,b)||(i(c,m),c[3]=0,c[7]=0,c[11]=0,c[15]=1,Math.abs(n(c)<1e-8)))return!1;var P=m[3],z=m[7],F=m[11],N=m[12],O=m[13],L=m[14],U=m[15];if(P!==0||z!==0||F!==0){T[0]=P,T[1]=z,T[2]=F,T[3]=U;var B=s(c,c);if(!B)return!1;h(c,c),w(y,T,c)}else y[0]=y[1]=y[2]=0,y[3]=1;if(d[0]=N,d[1]=O,d[2]=L,A(l,m),u[0]=f.length(l[0]),f.normalize(l[0],l[0]),g[0]=f.dot(l[0],l[1]),E(l[1],l[1],l[0],1,-g[0]),u[1]=f.length(l[1]),f.normalize(l[1],l[1]),g[0]/=u[1],g[1]=f.dot(l[0],l[2]),E(l[2],l[2],l[0],1,-g[1]),g[2]=f.dot(l[1],l[2]),E(l[2],l[2],l[1],1,-g[2]),u[2]=f.length(l[2]),f.normalize(l[2],l[2]),g[1]/=u[2],g[2]/=u[2],f.cross(x,l[1],l[2]),f.dot(l[0],x)<0)for(var W=0;W<3;W++)u[W]*=-1,l[W][0]*=-1,l[W][1]*=-1,l[W][2]*=-1;return D[0]=.5*Math.sqrt(Math.max(1+l[0][0]-l[1][1]-l[2][2],0)),D[1]=.5*Math.sqrt(Math.max(1-l[0][0]+l[1][1]-l[2][2],0)),D[2]=.5*Math.sqrt(Math.max(1-l[0][0]-l[1][1]+l[2][2],0)),D[3]=.5*Math.sqrt(Math.max(1+l[0][0]+l[1][1]+l[2][2],0)),l[2][1]>l[1][2]&&(D[0]=-D[0]),l[0][2]>l[2][0]&&(D[1]=-D[1]),l[1][0]>l[0][1]&&(D[2]=-D[2]),!0};function w(p,b,d){var u=b[0],g=b[1],y=b[2],D=b[3];return p[0]=d[0]*u+d[4]*g+d[8]*y+d[12]*D,p[1]=d[1]*u+d[5]*g+d[9]*y+d[13]*D,p[2]=d[2]*u+d[6]*g+d[10]*y+d[14]*D,p[3]=d[3]*u+d[7]*g+d[11]*y+d[15]*D,p}function A(p,b){p[0][0]=b[0],p[0][1]=b[1],p[0][2]=b[2],p[1][0]=b[4],p[1][1]=b[5],p[1][2]=b[6],p[2][0]=b[8],p[2][1]=b[9],p[2][2]=b[10]}function E(p,b,d,u,g){p[0]=b[0]*u+d[0]*g,p[1]=b[1]*u+d[1]*g,p[2]=b[2]*u+d[2]*g}},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),h=T(),f=T(),m=T();e.exports=c;function c(w,A,E,p){if(n(A)===0||n(E)===0)return!1;var b=i(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),d=i(E,f.translate,f.scale,f.skew,f.perspective,f.quaternion);return!b||!d?!1:(o(m.translate,h.translate,f.translate,p),o(m.skew,h.skew,f.skew,p),o(m.scale,h.scale,f.scale,p),o(m.perspective,h.perspective,f.perspective,p),s(m.quaternion,h.quaternion,f.quaternion,p),a(w,m.translate,m.scale,m.skew,m.perspective,m.quaternion),!0)}function T(){return{translate:l(),scale:l(1),skew:l(),perspective:x(),quaternion:x()}}function l(w){return[w||0,w||0,w||0]}function x(){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,h,f,m,c,T){return o.identity(s),o.fromRotationTranslation(s,T,h),s[3]=c[0],s[7]=c[1],s[11]=c[2],s[15]=c[3],o.identity(i),m[2]!==0&&(i[9]=m[2],o.multiply(s,s,i)),m[1]!==0&&(i[9]=0,i[8]=m[1],o.multiply(s,s,i)),m[0]!==0&&(i[8]=0,i[4]=m[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),h=r(7089),f=r(6582),m=r(7656),c=r(2504),T=r(3536),l=[0,0,0];e.exports=E;function x(p){this._components=p.slice(),this._time=[0],this.prevMatrix=p.slice(),this.nextMatrix=p.slice(),this.computedMatrix=p.slice(),this.computedInverse=p.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=x.prototype;w.recalcMatrix=function(p){var b=this._time,d=o.le(b,p),u=this.computedMatrix;if(!(d<0)){var g=this._components;if(d===b.length-1)for(var y=16*d,D=0;D<16;++D)u[D]=g[y++];else{for(var P=b[d+1]-b[d],y=16*d,z=this.prevMatrix,F=!0,D=0;D<16;++D)z[D]=g[y++];for(var N=this.nextMatrix,D=0;D<16;++D)N[D]=g[y++],F=F&&z[D]===N[D];if(P<1e-6||F)for(var D=0;D<16;++D)u[D]=z[D];else a(u,z,N,(p-b[d])/P)}var O=this.computedUp;O[0]=u[1],O[1]=u[5],O[2]=u[9],T(O,O);var L=this.computedInverse;i(L,u);var U=this.computedEye,B=L[15];U[0]=L[12]/B,U[1]=L[13]/B,U[2]=L[14]/B;for(var W=this.computedCenter,$=Math.exp(this.computedRadius[0]),D=0;D<3;++D)W[D]=U[D]-u[2+4*D]*$}},w.idle=function(p){if(!(p1&&o(i[f[l-2]],i[f[l-1]],T)<=0;)l-=1,f.pop();for(f.push(c),l=m.length;l>1&&o(i[m[l-2]],i[m[l-1]],T)>=0;)l-=1,m.pop();m.push(c)}for(var x=new Array(m.length+f.length-2),w=0,s=0,A=f.length;s0;--E)x[w++]=m[E];return x}},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,h=0,f=0,m={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function T(y){var D=!1;return"altKey"in y&&(D=D||y.altKey!==m.alt,m.alt=!!y.altKey),"shiftKey"in y&&(D=D||y.shiftKey!==m.shift,m.shift=!!y.shiftKey),"ctrlKey"in y&&(D=D||y.ctrlKey!==m.control,m.control=!!y.ctrlKey),"metaKey"in y&&(D=D||y.metaKey!==m.meta,m.meta=!!y.metaKey),D}function l(y,D){var P=o.x(D),z=o.y(D);"buttons"in D&&(y=D.buttons|0),(y!==s||P!==h||z!==f||T(D))&&(s=y|0,h=P||0,f=z||0,n&&n(s,h,f,m))}function x(y){l(0,y)}function w(){(s||h||f||m.shift||m.alt||m.meta||m.control)&&(h=f=0,s=0,m.shift=m.alt=m.control=m.meta=!1,n&&n(0,0,0,m))}function A(y){T(y)&&n&&n(s,h,f,m)}function E(y){o.buttons(y)===0?l(0,y):l(s,y)}function p(y){l(s|o.buttons(y),y)}function b(y){l(s&~o.buttons(y),y)}function d(){c||(c=!0,i.addEventListener("mousemove",E),i.addEventListener("mousedown",p),i.addEventListener("mouseup",b),i.addEventListener("mouseleave",x),i.addEventListener("mouseenter",x),i.addEventListener("mouseout",x),i.addEventListener("mouseover",x),i.addEventListener("blur",w),i.addEventListener("keyup",A),i.addEventListener("keydown",A),i.addEventListener("keypress",A),i!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function u(){c&&(c=!1,i.removeEventListener("mousemove",E),i.removeEventListener("mousedown",p),i.removeEventListener("mouseup",b),i.removeEventListener("mouseleave",x),i.removeEventListener("mouseenter",x),i.removeEventListener("mouseout",x),i.removeEventListener("mouseover",x),i.removeEventListener("blur",w),i.removeEventListener("keyup",A),i.removeEventListener("keydown",A),i.removeEventListener("keypress",A),i!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}d();var g={element:i};return Object.defineProperties(g,{enabled:{get:function(){return c},set:function(y){y?d():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return f},enumerable:!0},mods:{get:function(){return m},enumerable:!0}}),g}},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,h=a.clientY||0,f=o(i);return n[0]=s-f.left,n[1]=h-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<=0)return 1<0){if(ue=1,Y[Q++]=m(d[D],w,A,E),D+=B,p>0)for($=1,P=d[D],V=Y[Q]=m(P,w,A,E),j=Y[Q+le],pe=Y[Q+ee],Re=Y[Q+we],(V!==j||V!==pe||V!==Re)&&(F=d[D+z],O=d[D+N],U=d[D+L],h($,ue,P,F,O,U,V,j,pe,Re,w,A,E),Pe=X[Q]=ce++),Q+=1,D+=B,$=2;$0)for($=1,P=d[D],V=Y[Q]=m(P,w,A,E),j=Y[Q+le],pe=Y[Q+ee],Re=Y[Q+we],(V!==j||V!==pe||V!==Re)&&(F=d[D+z],O=d[D+N],U=d[D+L],h($,ue,P,F,O,U,V,j,pe,Re,w,A,E),Pe=X[Q]=ce++,Re!==pe&&f(X[Q+ee],Pe,O,U,pe,Re,w,A,E)),Q+=1,D+=B,$=2;$0){if($=1,Y[Q++]=m(d[D],w,A,E),D+=B,b>0)for(ue=1,P=d[D],V=Y[Q]=m(P,w,A,E),pe=Y[Q+ee],j=Y[Q+le],Re=Y[Q+we],(V!==pe||V!==j||V!==Re)&&(F=d[D+z],O=d[D+N],U=d[D+L],h($,ue,P,F,O,U,V,pe,j,Re,w,A,E),Pe=X[Q]=ce++),Q+=1,D+=B,ue=2;ue0)for(ue=1,P=d[D],V=Y[Q]=m(P,w,A,E),pe=Y[Q+ee],j=Y[Q+le],Re=Y[Q+we],(V!==pe||V!==j||V!==Re)&&(F=d[D+z],O=d[D+N],U=d[D+L],h($,ue,P,F,O,U,V,pe,j,Re,w,A,E),Pe=X[Q]=ce++,Re!==pe&&f(X[Q+ee],Pe,U,F,Re,pe,w,A,E)),Q+=1,D+=B,ue=2;ue 0"),typeof s.vertex!="function"&&h("Must specify vertex creation function"),typeof s.cell!="function"&&h("Must specify cell creation function"),typeof s.phase!="function"&&h("Must specify phase function");for(var T=s.getters||[],l=new Array(m),x=0;x=0?l[x]=!0:l[x]=!1;return i(s.vertex,s.cell,s.phase,c,f,l)}},6199:function(e,t,r){"use strict";var o=r(1338),a={zero:function(E,p,b,d){var u=E[0],g=b[0];d|=0;var y=0,D=g;for(y=0;y2&&y[1]>2&&d(g.pick(-1,-1).lo(1,1).hi(y[0]-2,y[1]-2),u.pick(-1,-1,0).lo(1,1).hi(y[0]-2,y[1]-2),u.pick(-1,-1,1).lo(1,1).hi(y[0]-2,y[1]-2)),y[1]>2&&(b(g.pick(0,-1).lo(1).hi(y[1]-2),u.pick(0,-1,1).lo(1).hi(y[1]-2)),p(u.pick(0,-1,0).lo(1).hi(y[1]-2))),y[1]>2&&(b(g.pick(y[0]-1,-1).lo(1).hi(y[1]-2),u.pick(y[0]-1,-1,1).lo(1).hi(y[1]-2)),p(u.pick(y[0]-1,-1,0).lo(1).hi(y[1]-2))),y[0]>2&&(b(g.pick(-1,0).lo(1).hi(y[0]-2),u.pick(-1,0,0).lo(1).hi(y[0]-2)),p(u.pick(-1,0,1).lo(1).hi(y[0]-2))),y[0]>2&&(b(g.pick(-1,y[1]-1).lo(1).hi(y[0]-2),u.pick(-1,y[1]-1,0).lo(1).hi(y[0]-2)),p(u.pick(-1,y[1]-1,1).lo(1).hi(y[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(y[0]-1,0,0,0),u.set(y[0]-1,0,1,0),u.set(0,y[1]-1,0,0),u.set(0,y[1]-1,1,0),u.set(y[0]-1,y[1]-1,0,0),u.set(y[0]-1,y[1]-1,1,0),u}}function A(E){var p=E.join(),y=m[p];if(y)return y;for(var b=E.length,d=[T,l],u=1;u<=b;++u)d.push(x(u));var g=w,y=g.apply(void 0,d);return m[p]=y,y}e.exports=function(p,b,d){if(Array.isArray(d)||(typeof d=="string"?d=o(b.dimension,d):d=o(b.dimension,"clamp")),b.size===0)return p;if(b.dimension===0)return p.set(0),p;var u=A(d);return u(p,b)}},4317:function(e){"use strict";function t(n,s){var h=Math.floor(s),f=s-h,m=0<=h&&h0;){O<64?(p=O,O=0):(p=64,O-=64);for(var L=m[1]|0;L>0;){L<64?(b=L,L=0):(b=64,L-=64),l=F+O*u+L*g,A=N+O*D+L*P;var U=0,B=0,W=0,$=y,ue=u-d*y,ce=g-p*u,de=z,Y=D-d*z,X=P-p*D;for(W=0;W0;){P<64?(p=P,P=0):(p=64,P-=64);for(var z=m[0]|0;z>0;){z<64?(E=z,z=0):(E=64,z-=64),l=y+P*d+z*b,A=D+P*g+z*u;var F=0,N=0,O=d,L=b-p*d,U=g,B=u-p*g;for(N=0;N0;){N<64?(b=N,N=0):(b=64,N-=64);for(var O=m[0]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64);for(var L=m[1]|0;L>0;){L<64?(p=L,L=0):(p=64,L-=64),l=z+N*g+O*d+L*u,A=F+N*P+O*y+L*D;var U=0,B=0,W=0,$=g,ue=d-b*g,ce=u-E*d,de=P,Y=y-b*P,X=D-E*y;for(W=0;Wx;){U=0,B=F-p;t:for(O=0;O$)break t;B+=y,U+=D}for(U=F,B=F-p,O=0;O>1,L=O-z,U=O+z,B=F,W=L,$=O,ue=U,ce=N,de=w+1,Y=A-1,X=!0,Q,V,le,ae,j,ee,te,pe,we,Se=0,Re=0,Pe=0,je,at,nt,tt,Ve,he,se,ne,Ce,Ze,rt,Je,St,kt,Bt,Vt,Ar=g,vr=T(Ar),qr=T(Ar);at=b*B,nt=b*W,Vt=p;e:for(je=0;je0){V=B,B=W,W=V;break e}if(Pe<0)break e;Vt+=D}at=b*ue,nt=b*ce,Vt=p;e:for(je=0;je0){V=ue,ue=ce,ce=V;break e}if(Pe<0)break e;Vt+=D}at=b*B,nt=b*$,Vt=p;e:for(je=0;je0){V=B,B=$,$=V;break e}if(Pe<0)break e;Vt+=D}at=b*W,nt=b*$,Vt=p;e:for(je=0;je0){V=W,W=$,$=V;break e}if(Pe<0)break e;Vt+=D}at=b*B,nt=b*ue,Vt=p;e:for(je=0;je0){V=B,B=ue,ue=V;break e}if(Pe<0)break e;Vt+=D}at=b*$,nt=b*ue,Vt=p;e:for(je=0;je0){V=$,$=ue,ue=V;break e}if(Pe<0)break e;Vt+=D}at=b*W,nt=b*ce,Vt=p;e:for(je=0;je0){V=W,W=ce,ce=V;break e}if(Pe<0)break e;Vt+=D}at=b*W,nt=b*$,Vt=p;e:for(je=0;je0){V=W,W=$,$=V;break e}if(Pe<0)break e;Vt+=D}at=b*ue,nt=b*ce,Vt=p;e:for(je=0;je0){V=ue,ue=ce,ce=V;break e}if(Pe<0)break e;Vt+=D}for(at=b*B,nt=b*W,tt=b*$,Ve=b*ue,he=b*ce,se=b*F,ne=b*O,Ce=b*N,Bt=0,Vt=p,je=0;je0)Y--;else if(Pe<0){for(at=b*ee,nt=b*de,tt=b*Y,Vt=p,je=0;je0)for(;;){te=p+Y*b,Bt=0;e:for(je=0;je0){if(--YN){e:for(;;){for(te=p+de*b,Bt=0,Vt=p,je=0;je1&&x?A(l,x[0],x[1]):A(l)}var f={"uint32,1,0":function(c,T){return function(l){var x=l.data,w=l.offset|0,A=l.shape,E=l.stride,p=E[0]|0,b=A[0]|0,d=E[1]|0,u=A[1]|0,g=d,y=d,D=1;b<=32?c(0,b-1,x,w,p,d,b,u,g,y,D):T(0,b-1,x,w,p,d,b,u,g,y,D)}}};function m(c,T){var l=[T,c].join(","),x=f[l],w=n(c,T),A=h(c,T,w);return x(w,A)}e.exports=m},446:function(e,t,r){"use strict";var o=r(7640),a={};function i(n){var s=n.order,h=n.dtype,f=[s,h],m=f.join(":"),c=a[m];return c||(a[m]=c=o(s,h)),c(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),x;for(x=0;x=0&&(d=p|0,b+=g*d,u-=d),new w(this.data,u,g,b)},A.step=function(p){var b=this.shape[0],d=this.stride[0],u=this.offset,g=0,y=Math.ceil;return typeof p=="number"&&(g=p|0,g<0?(u+=d*(b-1),b=y(-b/g)):b=y(b/g),d*=g),new w(this.data,b,d,u)},A.transpose=function(p){p=p===void 0?0:p|0;var b=this.shape,d=this.stride;return new w(this.data,b[p],d[p],this.offset)},A.pick=function(p){var b=[],d=[],u=this.offset;typeof p=="number"&&p>=0?u=u+this.stride[0]*p|0:(b.push(this.shape[0]),d.push(this.stride[0]));var g=l[b.length+1];return g(this.data,b,d,u)},function(p,b,d,u){return new w(p,b[0],d[0],u)}},2:function(T,l,x){function w(E,p,b,d,u,g){this.data=E,this.shape=[p,b],this.stride=[d,u],this.offset=g|0}var A=w.prototype;return A.dtype=T,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(p,b,d){return T==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*b,d):this.data[this.offset+this.stride[0]*p+this.stride[1]*b]=d},A.get=function(p,b){return T==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*b):this.data[this.offset+this.stride[0]*p+this.stride[1]*b]},A.index=function(p,b){return this.offset+this.stride[0]*p+this.stride[1]*b},A.hi=function(p,b){return new w(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof b!="number"||b<0?this.shape[1]:b|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(p,b){var d=this.offset,u=0,g=this.shape[0],y=this.shape[1],D=this.stride[0],P=this.stride[1];return typeof p=="number"&&p>=0&&(u=p|0,d+=D*u,g-=u),typeof b=="number"&&b>=0&&(u=b|0,d+=P*u,y-=u),new w(this.data,g,y,D,P,d)},A.step=function(p,b){var d=this.shape[0],u=this.shape[1],g=this.stride[0],y=this.stride[1],D=this.offset,P=0,z=Math.ceil;return typeof p=="number"&&(P=p|0,P<0?(D+=g*(d-1),d=z(-d/P)):d=z(d/P),g*=P),typeof b=="number"&&(P=b|0,P<0?(D+=y*(u-1),u=z(-u/P)):u=z(u/P),y*=P),new w(this.data,d,u,g,y,D)},A.transpose=function(p,b){p=p===void 0?0:p|0,b=b===void 0?1:b|0;var d=this.shape,u=this.stride;return new w(this.data,d[p],d[b],u[p],u[b],this.offset)},A.pick=function(p,b){var d=[],u=[],g=this.offset;typeof p=="number"&&p>=0?g=g+this.stride[0]*p|0:(d.push(this.shape[0]),u.push(this.stride[0])),typeof b=="number"&&b>=0?g=g+this.stride[1]*b|0:(d.push(this.shape[1]),u.push(this.stride[1]));var y=l[d.length+1];return y(this.data,d,u,g)},function(p,b,d,u){return new w(p,b[0],b[1],d[0],d[1],u)}},3:function(T,l,x){function w(E,p,b,d,u,g,y,D){this.data=E,this.shape=[p,b,d],this.stride=[u,g,y],this.offset=D|0}var A=w.prototype;return A.dtype=T,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var p=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),d=Math.abs(this.stride[2]);return p>b?b>d?[2,1,0]:p>d?[1,2,0]:[1,0,2]:p>d?[2,0,1]:d>b?[0,1,2]:[0,2,1]}}),A.set=function(p,b,d,u){return T==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d,u):this.data[this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d]=u},A.get=function(p,b,d){return T==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d):this.data[this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d]},A.index=function(p,b,d){return this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d},A.hi=function(p,b,d){return new w(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof d!="number"||d<0?this.shape[2]:d|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(p,b,d){var u=this.offset,g=0,y=this.shape[0],D=this.shape[1],P=this.shape[2],z=this.stride[0],F=this.stride[1],N=this.stride[2];return typeof p=="number"&&p>=0&&(g=p|0,u+=z*g,y-=g),typeof b=="number"&&b>=0&&(g=b|0,u+=F*g,D-=g),typeof d=="number"&&d>=0&&(g=d|0,u+=N*g,P-=g),new w(this.data,y,D,P,z,F,N,u)},A.step=function(p,b,d){var u=this.shape[0],g=this.shape[1],y=this.shape[2],D=this.stride[0],P=this.stride[1],z=this.stride[2],F=this.offset,N=0,O=Math.ceil;return typeof p=="number"&&(N=p|0,N<0?(F+=D*(u-1),u=O(-u/N)):u=O(u/N),D*=N),typeof b=="number"&&(N=b|0,N<0?(F+=P*(g-1),g=O(-g/N)):g=O(g/N),P*=N),typeof d=="number"&&(N=d|0,N<0?(F+=z*(y-1),y=O(-y/N)):y=O(y/N),z*=N),new w(this.data,u,g,y,D,P,z,F)},A.transpose=function(p,b,d){p=p===void 0?0:p|0,b=b===void 0?1:b|0,d=d===void 0?2:d|0;var u=this.shape,g=this.stride;return new w(this.data,u[p],u[b],u[d],g[p],g[b],g[d],this.offset)},A.pick=function(p,b,d){var u=[],g=[],y=this.offset;typeof p=="number"&&p>=0?y=y+this.stride[0]*p|0:(u.push(this.shape[0]),g.push(this.stride[0])),typeof b=="number"&&b>=0?y=y+this.stride[1]*b|0:(u.push(this.shape[1]),g.push(this.stride[1])),typeof d=="number"&&d>=0?y=y+this.stride[2]*d|0:(u.push(this.shape[2]),g.push(this.stride[2]));var D=l[u.length+1];return D(this.data,u,g,y)},function(p,b,d,u){return new w(p,b[0],b[1],b[2],d[0],d[1],d[2],u)}},4:function(T,l,x){function w(E,p,b,d,u,g,y,D,P,z){this.data=E,this.shape=[p,b,d,u],this.stride=[g,y,D,P],this.offset=z|0}var A=w.prototype;return A.dtype=T,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:x}),A.set=function(p,b,d,u,g){return T==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u,g):this.data[this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u]=g},A.get=function(p,b,d,u){return T==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u):this.data[this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u]},A.index=function(p,b,d,u){return this.offset+this.stride[0]*p+this.stride[1]*b+this.stride[2]*d+this.stride[3]*u},A.hi=function(p,b,d,u){return new w(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof d!="number"||d<0?this.shape[2]:d|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)},A.lo=function(p,b,d,u){var g=this.offset,y=0,D=this.shape[0],P=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.stride[0],O=this.stride[1],L=this.stride[2],U=this.stride[3];return typeof p=="number"&&p>=0&&(y=p|0,g+=N*y,D-=y),typeof b=="number"&&b>=0&&(y=b|0,g+=O*y,P-=y),typeof d=="number"&&d>=0&&(y=d|0,g+=L*y,z-=y),typeof u=="number"&&u>=0&&(y=u|0,g+=U*y,F-=y),new w(this.data,D,P,z,F,N,O,L,U,g)},A.step=function(p,b,d,u){var g=this.shape[0],y=this.shape[1],D=this.shape[2],P=this.shape[3],z=this.stride[0],F=this.stride[1],N=this.stride[2],O=this.stride[3],L=this.offset,U=0,B=Math.ceil;return typeof p=="number"&&(U=p|0,U<0?(L+=z*(g-1),g=B(-g/U)):g=B(g/U),z*=U),typeof b=="number"&&(U=b|0,U<0?(L+=F*(y-1),y=B(-y/U)):y=B(y/U),F*=U),typeof d=="number"&&(U=d|0,U<0?(L+=N*(D-1),D=B(-D/U)):D=B(D/U),N*=U),typeof u=="number"&&(U=u|0,U<0?(L+=O*(P-1),P=B(-P/U)):P=B(P/U),O*=U),new w(this.data,g,y,D,P,z,F,N,O,L)},A.transpose=function(p,b,d,u){p=p===void 0?0:p|0,b=b===void 0?1:b|0,d=d===void 0?2:d|0,u=u===void 0?3:u|0;var g=this.shape,y=this.stride;return new w(this.data,g[p],g[b],g[d],g[u],y[p],y[b],y[d],y[u],this.offset)},A.pick=function(p,b,d,u){var g=[],y=[],D=this.offset;typeof p=="number"&&p>=0?D=D+this.stride[0]*p|0:(g.push(this.shape[0]),y.push(this.stride[0])),typeof b=="number"&&b>=0?D=D+this.stride[1]*b|0:(g.push(this.shape[1]),y.push(this.stride[1])),typeof d=="number"&&d>=0?D=D+this.stride[2]*d|0:(g.push(this.shape[2]),y.push(this.stride[2])),typeof u=="number"&&u>=0?D=D+this.stride[3]*u|0:(g.push(this.shape[3]),y.push(this.stride[3]));var P=l[g.length+1];return P(this.data,g,y,D)},function(p,b,d,u){return new w(p,b[0],b[1],b[2],b[3],d[0],d[1],d[2],d[3],u)}},5:function(l,x,w){function A(p,b,d,u,g,y,D,P,z,F,N,O){this.data=p,this.shape=[b,d,u,g,y],this.stride=[D,P,z,F,N],this.offset=O|0}var E=A.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,d,u,g,y,D){return l==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y,D):this.data[this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y]=D},E.get=function(b,d,u,g,y){return l==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y):this.data[this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y]},E.index=function(b,d,u,g,y){return this.offset+this.stride[0]*b+this.stride[1]*d+this.stride[2]*u+this.stride[3]*g+this.stride[4]*y},E.hi=function(b,d,u,g,y){return new A(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof d!="number"||d<0?this.shape[1]:d|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof g!="number"||g<0?this.shape[3]:g|0,typeof y!="number"||y<0?this.shape[4]:y|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},E.lo=function(b,d,u,g,y){var D=this.offset,P=0,z=this.shape[0],F=this.shape[1],N=this.shape[2],O=this.shape[3],L=this.shape[4],U=this.stride[0],B=this.stride[1],W=this.stride[2],$=this.stride[3],ue=this.stride[4];return typeof b=="number"&&b>=0&&(P=b|0,D+=U*P,z-=P),typeof d=="number"&&d>=0&&(P=d|0,D+=B*P,F-=P),typeof u=="number"&&u>=0&&(P=u|0,D+=W*P,N-=P),typeof g=="number"&&g>=0&&(P=g|0,D+=$*P,O-=P),typeof y=="number"&&y>=0&&(P=y|0,D+=ue*P,L-=P),new A(this.data,z,F,N,O,L,U,B,W,$,ue,D)},E.step=function(b,d,u,g,y){var D=this.shape[0],P=this.shape[1],z=this.shape[2],F=this.shape[3],N=this.shape[4],O=this.stride[0],L=this.stride[1],U=this.stride[2],B=this.stride[3],W=this.stride[4],$=this.offset,ue=0,ce=Math.ceil;return typeof b=="number"&&(ue=b|0,ue<0?($+=O*(D-1),D=ce(-D/ue)):D=ce(D/ue),O*=ue),typeof d=="number"&&(ue=d|0,ue<0?($+=L*(P-1),P=ce(-P/ue)):P=ce(P/ue),L*=ue),typeof u=="number"&&(ue=u|0,ue<0?($+=U*(z-1),z=ce(-z/ue)):z=ce(z/ue),U*=ue),typeof g=="number"&&(ue=g|0,ue<0?($+=B*(F-1),F=ce(-F/ue)):F=ce(F/ue),B*=ue),typeof y=="number"&&(ue=y|0,ue<0?($+=W*(N-1),N=ce(-N/ue)):N=ce(N/ue),W*=ue),new A(this.data,D,P,z,F,N,O,L,U,B,W,$)},E.transpose=function(b,d,u,g,y){b=b===void 0?0:b|0,d=d===void 0?1:d|0,u=u===void 0?2:u|0,g=g===void 0?3:g|0,y=y===void 0?4:y|0;var D=this.shape,P=this.stride;return new A(this.data,D[b],D[d],D[u],D[g],D[y],P[b],P[d],P[u],P[g],P[y],this.offset)},E.pick=function(b,d,u,g,y){var D=[],P=[],z=this.offset;typeof b=="number"&&b>=0?z=z+this.stride[0]*b|0:(D.push(this.shape[0]),P.push(this.stride[0])),typeof d=="number"&&d>=0?z=z+this.stride[1]*d|0:(D.push(this.shape[1]),P.push(this.stride[1])),typeof u=="number"&&u>=0?z=z+this.stride[2]*u|0:(D.push(this.shape[2]),P.push(this.stride[2])),typeof g=="number"&&g>=0?z=z+this.stride[3]*g|0:(D.push(this.shape[3]),P.push(this.stride[3])),typeof y=="number"&&y>=0?z=z+this.stride[4]*y|0:(D.push(this.shape[4]),P.push(this.stride[4]));var F=x[D.length+1];return F(this.data,D,P,z)},function(b,d,u,g){return new A(b,d[0],d[1],d[2],d[3],d[4],u[0],u[1],u[2],u[3],u[4],g)}}};function h(T,l){var x=l===-1?"T":String(l),w=s[x];return l===-1?w(T):l===0?w(T,m[T][0]):w(T,m[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 m={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function c(T,l,x,w){if(T===void 0){var u=m.array[0];return u([])}else typeof T=="number"&&(T=[T]);l===void 0&&(l=[T.length]);var A=l.length;if(x===void 0){x=new Array(A);for(var E=A-1,p=1;E>=0;--E)x[E]=p,p*=l[E]}if(w===void 0){w=0;for(var E=0;E>>0;e.exports=n;function n(s,h){if(isNaN(s)||isNaN(h))return NaN;if(s===h)return s;if(s===0)return h<0?-a:a;var f=o.hi(s),m=o.lo(s);return h>s==s>0?m===i?(f+=1,m=0):m+=1:m===0?(m=i,f-=1):m-=1,o.pack(m,f)}},8406:function(e,t){var r=1e-6,o=1e-6;t.vertexNormals=function(a,i,n){for(var s=i.length,h=new Array(s),f=n===void 0?r:n,m=0;mf)for(var D=h[l],P=1/Math.sqrt(d*g),y=0;y<3;++y){var z=(y+1)%3,F=(y+2)%3;D[y]+=P*(u[z]*b[F]-u[F]*b[z])}}for(var m=0;mf)for(var P=1/Math.sqrt(N),y=0;y<3;++y)D[y]*=P;else for(var y=0;y<3;++y)D[y]=0}return h},t.faceNormals=function(a,i,n){for(var s=a.length,h=new Array(s),f=n===void 0?o:n,m=0;mf?E=1/Math.sqrt(E):E=0;for(var l=0;l<3;++l)A[l]*=E;h[m]=A}return h}},4081:function(e){"use strict";e.exports=t;function t(r,o,a,i,n,s,h,f,m,c){var T=o+s+c;if(l>0){var l=Math.sqrt(T+1);r[0]=.5*(h-m)/l,r[1]=.5*(f-i)/l,r[2]=.5*(a-s)/l,r[3]=.5*l}else{var x=Math.max(o,s,c),l=Math.sqrt(2*x-T+1);o>=x?(r[0]=.5*l,r[1]=.5*(n+a)/l,r[2]=.5*(f+i)/l,r[3]=.5*(h-m)/l):s>=x?(r[0]=.5*(a+n)/l,r[1]=.5*l,r[2]=.5*(m+h)/l,r[3]=.5*(f-i)/l):(r[0]=.5*(i+f)/l,r[1]=.5*(h+m)/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 h(x,w,A){return Math.sqrt(Math.pow(x,2)+Math.pow(w,2)+Math.pow(A,2))}function f(x,w,A,E){return Math.sqrt(Math.pow(x,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(E,2))}function m(x,w){var A=w[0],E=w[1],p=w[2],b=w[3],d=f(A,E,p,b);d>1e-6?(x[0]=A/d,x[1]=E/d,x[2]=p/d,x[3]=b/d):(x[0]=x[1]=x[2]=0,x[3]=1)}function c(x,w,A){this.radius=o([A]),this.center=o(w),this.rotation=o(x),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=c.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(x){this.radius.curve(x),this.center.curve(x),this.rotation.curve(x);var w=this.computedRotation;m(w,w);var A=this.computedMatrix;i(A,w);var E=this.computedCenter,p=this.computedEye,b=this.computedUp,d=Math.exp(this.computedRadius[0]);p[0]=E[0]+d*A[2],p[1]=E[1]+d*A[6],p[2]=E[2]+d*A[10],b[0]=A[1],b[1]=A[5],b[2]=A[9];for(var u=0;u<3;++u){for(var g=0,y=0;y<3;++y)g+=A[u+4*y]*p[y];A[12+u]=-g}},T.getMatrix=function(x,w){this.recalcMatrix(x);var A=this.computedMatrix;if(w){for(var E=0;E<16;++E)w[E]=A[E];return w}return A},T.idle=function(x){this.center.idle(x),this.radius.idle(x),this.rotation.idle(x)},T.flush=function(x){this.center.flush(x),this.radius.flush(x),this.rotation.flush(x)},T.pan=function(x,w,A,E){w=w||0,A=A||0,E=E||0,this.recalcMatrix(x);var p=this.computedMatrix,b=p[1],d=p[5],u=p[9],g=h(b,d,u);b/=g,d/=g,u/=g;var y=p[0],D=p[4],P=p[8],z=y*b+D*d+P*u;y-=b*z,D-=d*z,P-=u*z;var F=h(y,D,P);y/=F,D/=F,P/=F;var N=p[2],O=p[6],L=p[10],U=N*b+O*d+L*u,B=N*y+O*D+L*P;N-=U*b+B*y,O-=U*d+B*D,L-=U*u+B*P;var W=h(N,O,L);N/=W,O/=W,L/=W;var $=y*w+b*A,ue=D*w+d*A,ce=P*w+u*A;this.center.move(x,$,ue,ce);var de=Math.exp(this.computedRadius[0]);de=Math.max(1e-4,de+E),this.radius.set(x,Math.log(de))},T.rotate=function(x,w,A,E){this.recalcMatrix(x),w=w||0,A=A||0;var p=this.computedMatrix,b=p[0],d=p[4],u=p[8],g=p[1],y=p[5],D=p[9],P=p[2],z=p[6],F=p[10],N=w*b+A*g,O=w*d+A*y,L=w*u+A*D,U=-(z*L-F*O),B=-(F*N-P*L),W=-(P*O-z*N),$=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(B,2)-Math.pow(W,2))),ue=f(U,B,W,$);ue>1e-6?(U/=ue,B/=ue,W/=ue,$/=ue):(U=B=W=0,$=1);var ce=this.computedRotation,de=ce[0],Y=ce[1],X=ce[2],Q=ce[3],V=de*$+Q*U+Y*W-X*B,le=Y*$+Q*B+X*U-de*W,ae=X*$+Q*W+de*B-Y*U,j=Q*$-de*U-Y*B-X*W;if(E){U=P,B=z,W=F;var ee=Math.sin(E)/h(U,B,W);U*=ee,B*=ee,W*=ee,$=Math.cos(w),V=V*$+j*U+le*W-ae*B,le=le*$+j*B+ae*U-V*W,ae=ae*$+j*W+V*B-le*U,j=j*$-V*U-le*B-ae*W}var te=f(V,le,ae,j);te>1e-6?(V/=te,le/=te,ae/=te,j/=te):(V=le=ae=0,j=1),this.rotation.set(x,V,le,ae,j)},T.lookAt=function(x,w,A,E){this.recalcMatrix(x),A=A||this.computedCenter,w=w||this.computedEye,E=E||this.computedUp;var p=this.computedMatrix;a(p,w,A,E);var b=this.computedRotation;s(b,p[0],p[1],p[2],p[4],p[5],p[6],p[8],p[9],p[10]),m(b,b),this.rotation.set(x,b[0],b[1],b[2],b[3]);for(var d=0,u=0;u<3;++u)d+=Math.pow(A[u]-w[u],2);this.radius.set(x,.5*Math.log(Math.max(d,1e-6))),this.center.set(x,A[0],A[1],A[2])},T.translate=function(x,w,A,E){this.center.move(x,w||0,A||0,E||0)},T.setMatrix=function(x,w){var A=this.computedRotation;s(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),m(A,A),this.rotation.set(x,A[0],A[1],A[2],A[3]);var E=this.computedMatrix;n(E,w);var p=E[15];if(Math.abs(p)>1e-6){var b=E[12]/p,d=E[13]/p,u=E[14]/p;this.recalcMatrix(x);var g=Math.exp(this.computedRadius[0]);this.center.set(x,b-E[2]*g,d-E[6]*g,u-E[10]*g),this.radius.idle(x)}else this.center.idle(x),this.radius.idle(x)},T.setDistance=function(x,w){w>0&&this.radius.set(x,Math.log(w))},T.setDistanceLimits=function(x,w){x>0?x=Math.log(x):x=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=w},T.getDistanceLimits=function(x){var w=this.radius.bounds;return x?(x[0]=Math.exp(w[0][0]),x[1]=Math.exp(w[1][0]),x):[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(x){var w=this.lastT(),A=x.center;A&&this.center.set(w,A[0],A[1],A[2]);var E=x.rotation;E&&this.rotation.set(w,E[0],E[1],E[2],E[3]);var p=x.distance;p&&p>0&&this.radius.set(w,Math.log(p)),this.setDistanceLimits(x.zoomMin,x.zoomMax)};function l(x){x=x||{};var w=x.center||[0,0,0],A=x.rotation||[0,0,0,1],E=x.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),m(A,A);var p=new c(A,w,Math.log(E));return p.setDistanceLimits(x.zoomMin,x.zoomMax),("eye"in x||"up"in x)&&p.lookAt(0,x.eye,x.center,x.up),p}},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,h=i.length,f=[new Array(s),new Array(s)],m=0;m0){D=f[F][g][0],z=F;break}P=D[z^1];for(var N=0;N<2;++N)for(var O=f[N][g],L=0;L0&&(D=U,P=B,z=N)}return y||D&&l(D,z),P}function w(u,g){var y=f[g][u][0],D=[u];l(y,g);for(var P=y[g^1],z=g;;){for(;P!==u;)D.push(P),P=x(D[D.length-2],P,!1);if(f[0][u].length+f[1][u].length===0)break;var F=D[D.length-1],N=u,O=D[1],L=x(F,N,!0);if(o(n[F],n[N],n[O],n[L])<0)break;D.push(u),P=x(F,N)}return D}function A(u,g){return g[1]===g[g.length-1]}for(var m=0;m0;){var b=f[0][m].length,d=w(m,E);A(p,d)?p.push.apply(p,d):(p.length>0&&T.push(p),p=d)}p.length>0&&T.push(p)}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),h=new Array(n.length),f=new Array(n.length),m=[],c=0;c0;){var l=m.pop();h[l]=!1;for(var x=s[l],c=0;c0}b=b.filter(d);for(var u=b.length,g=new Array(u),y=new Array(u),p=0;p0;){var te=ae.pop(),pe=ue[te];h(pe,function(je,at){return je-at});var we=pe.length,Se=j[te],Re;if(Se===0){var O=b[te];Re=[O]}for(var p=0;p=0)&&(j[Pe]=Se^1,ae.push(Pe),Se===0)){var O=b[Pe];le(O)||(O.reverse(),Re.push(O))}}Se===0&&ee.push(Re)}return ee}},5085:function(e,t,r){e.exports=x;var o=r(3250)[3],a=r(4209),i=r(3352),n=r(2478);function s(){return!0}function h(w){return function(A,E){var p=w[A];return p?!!p.queryPoint(E,s):!1}}function f(w){for(var A={},E=0;E0&&A[p]===E[0])b=w[p-1];else return 1;for(var d=1;b;){var u=b.key,g=o(E,u[0],u[1]);if(u[0][0]0)d=-1,b=b.right;else return 0;else if(g>0)b=b.left;else if(g<0)d=1,b=b.right;else return 0}return d}}function c(w){return 1}function T(w){return function(E){return w(E[0],E[1])?0:1}}function l(w,A){return function(p){return w(p[0],p[1])?0:A(p)}}function x(w){for(var A=w.length,E=[],p=[],b=0,d=0;d=c?(u=1,y=c+2*x+A):(u=-x/c,y=x*u+A)):(u=0,w>=0?(g=0,y=A):-w>=l?(g=1,y=l+2*w+A):(g=-w/l,y=w*g+A));else if(g<0)g=0,x>=0?(u=0,y=A):-x>=c?(u=1,y=c+2*x+A):(u=-x/c,y=x*u+A);else{var D=1/d;u*=D,g*=D,y=u*(c*u+T*g+2*x)+g*(T*u+l*g+2*w)+A}else{var P,z,F,N;u<0?(P=T+x,z=l+w,z>P?(F=z-P,N=c-2*T+l,F>=N?(u=1,g=0,y=c+2*x+A):(u=F/N,g=1-u,y=u*(c*u+T*g+2*x)+g*(T*u+l*g+2*w)+A)):(u=0,z<=0?(g=1,y=l+2*w+A):w>=0?(g=0,y=A):(g=-w/l,y=w*g+A))):g<0?(P=T+w,z=c+x,z>P?(F=z-P,N=c-2*T+l,F>=N?(g=1,u=0,y=l+2*w+A):(g=F/N,u=1-g,y=u*(c*u+T*g+2*x)+g*(T*u+l*g+2*w)+A)):(g=0,z<=0?(u=1,y=c+2*x+A):x>=0?(u=0,y=A):(u=-x/c,y=x*u+A))):(F=l+w-T-x,F<=0?(u=0,g=1,y=l+2*w+A):(N=c-2*T+l,F>=N?(u=1,g=0,y=c+2*x+A):(u=F/N,g=1-u,y=u*(c*u+T*g+2*x)+g*(T*u+l*g+2*w)+A)))}for(var O=1-u-g,m=0;m0){var l=s[f-1];if(o(c,l)===0&&i(l)!==T){f-=1;continue}}s[f++]=c}}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,h=r[n];a=s+h;var f=a-s,m=h-f;m&&(r[--i]=a,a=m)}for(var c=0,n=i;n0){if(z<=0)return F;N=P+z}else if(P<0){if(z>=0)return F;N=-(P+z)}else return F;var O=f*N;return F>=O||F<=-O?F:w(g,y,D)},function(g,y,D,P){var z=g[0]-P[0],F=y[0]-P[0],N=D[0]-P[0],O=g[1]-P[1],L=y[1]-P[1],U=D[1]-P[1],B=g[2]-P[2],W=y[2]-P[2],$=D[2]-P[2],ue=F*U,ce=N*L,de=N*O,Y=z*U,X=z*L,Q=F*O,V=B*(ue-ce)+W*(de-Y)+$*(X-Q),le=(Math.abs(ue)+Math.abs(ce))*Math.abs(B)+(Math.abs(de)+Math.abs(Y))*Math.abs(W)+(Math.abs(X)+Math.abs(Q))*Math.abs($),ae=m*le;return V>ae||-V>ae?V:A(g,y,D,P)}];function p(u){var g=E[u.length];return g||(g=E[u.length]=x(u.length)),g.apply(void 0,u)}function b(u,g,y,D,P,z,F){return function(O,L,U,B,W){switch(arguments.length){case 0:case 1:return 0;case 2:return D(O,L);case 3:return P(O,L,U);case 4:return z(O,L,U,B);case 5:return F(O,L,U,B,W)}for(var $=new Array(arguments.length),ue=0;ue0&&c>0||m<0&&c<0)return!1;var T=o(h,n,s),l=o(f,n,s);return T>0&&l>0||T<0&&l<0?!1:m===0&&c===0&&T===0&&l===0?a(n,s,h,f):!0}},8545:function(e){"use strict";e.exports=r;function t(o,a){var i=o+a,n=i-o,s=i-n,h=a-n,f=o-s,m=f+h;return m?[m,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,h=new Array(s),f=0,m=0,c=0,T=Math.abs,l=o[m],x=T(l),w=-a[c],A=T(w),E,p;x=n?(E=l,m+=1,m=n?(E=l,m+=1,m"u"&&(E=s(x));var p=x.length;if(p===0||E<1)return{cells:[],vertexIds:[],vertexWeights:[]};var b=h(w,+A),d=f(x,E),u=m(d,w,b,+A),g=c(d,w.length|0),y=n(E)(x,d.data,g,b),D=T(d),P=[].slice.call(u.data,0,u.shape[0]);return a.free(b),a.free(d.data),a.free(u.data),a.free(g),{cells:y,vertexIds:D,vertexWeights:P}}},1570:function(e){"use strict";e.exports=r;var t=[function(){function a(n,s,h,f){for(var m=Math.min(h,f)|0,c=Math.max(h,f)|0,T=n[2*m],l=n[2*m+1];T>1,w=s[2*x+1];if(w===c)return x;c>1,w=s[2*x+1];if(w===c)return x;c>1,w=s[2*x+1];if(w===c)return x;c>1,w=s[2*x+1];if(w===c)return x;c>1,N=f(g[F],y);N<=0?(N===0&&(z=F),D=F+1):N>0&&(P=F-1)}return z}o=l;function x(g,y){for(var D=new Array(g.length),P=0,z=D.length;P=g.length||f(g[ue],F)!==0););}return D}o=x;function w(g,y){if(!y)return x(T(E(g,0)),g,0);for(var D=new Array(y),P=0;P>>U&1&&L.push(z[U]);y.push(L)}return c(y)}o=A;function E(g,y){if(y<0)return[];for(var D=[],P=(1<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)&-(i65535)<<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,h=n,f=7;for(s>>>=1;s;s>>>=1)h<<=1,h|=s&1,--f;i[n]=h<>>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 g=0,y=Math.max,D=0,P=u.length;D>1,F=h(u[z],g);F<=0?(F===0&&(P=z),y=z+1):F>0&&(D=z-1)}return P}t.findCell=T;function l(u,g){for(var y=new Array(u.length),D=0,P=y.length;D=u.length||h(u[$],z)!==0););}return y}t.incidence=l;function x(u,g){if(!g)return l(c(A(u,0)),u,0);for(var y=new Array(g),D=0;D>>L&1&&O.push(P[L]);g.push(O)}return m(g)}t.explode=w;function A(u,g){if(g<0)return[];for(var y=[],D=(1<>1:(Y>>1)-1}function D(Y){for(var X=g(Y);;){var Q=X,V=2*Y+1,le=2*(Y+1),ae=Y;if(V0;){var Q=y(Y);if(Q>=0){var V=g(Q);if(X0){var Y=O[0];return u(0,B-1),B-=1,D(0),Y}return-1}function F(Y,X){var Q=O[Y];return x[Q]===X?Y:(x[Q]=-1/0,P(Y),z(),x[Q]=X,B+=1,P(B-1))}function N(Y){if(!w[Y]){w[Y]=!0;var X=T[Y],Q=l[Y];T[Q]>=0&&(T[Q]=X),l[X]>=0&&(l[X]=Q),L[X]>=0&&F(L[X],d(X)),L[Q]>=0&&F(L[Q],d(Q))}}for(var O=[],L=new Array(m),A=0;A>1;A>=0;--A)D(A);for(;;){var W=z();if(W<0||x[W]>f)break;N(W)}for(var $=[],A=0;A=0&&Q>=0&&X!==Q){var V=L[X],le=L[Q];V!==le&&de.push([V,le])}}),a.unique(a.normalize(de)),{positions:$,edges:de}}},1303:function(e,t,r){"use strict";e.exports=i;var o=r(3250);function a(n,s){var h,f;if(s[0][0]s[1][0])h=s[1],f=s[0];else{var m=Math.min(n[0][1],n[1][1]),c=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 cl?m-l:c-l}var x,w;n[0][1]s[1][0])h=s[1],f=s[0];else return a(s,n);var m,c;if(n[0][0]n[1][0])m=n[1],c=n[0];else return-a(n,s);var T=o(h,f,c),l=o(h,f,m);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(c,m,f),l=o(c,m,h),T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;return f[0]-c[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(x,w,A){this.slabs=x,this.coordinates=w,this.horizontal=A}var h=s.prototype;function f(x,w){return x.y-w}function m(x,w){for(var A=null;x;){var E=x.key,p,b;E[0][0]0)if(w[0]!==E[1][0])A=x,x=x.right;else{var u=m(x.right,w);if(u)return u;x=x.left}else{if(w[0]!==E[1][0])return x;var u=m(x.right,w);if(u)return u;x=x.left}}return A}h.castUp=function(x){var w=o.le(this.coordinates,x[0]);if(w<0)return-1;var A=this.slabs[w],E=m(this.slabs[w],x),p=-1;if(E&&(p=E.value),this.coordinates[w]===x[0]){var b=null;if(E&&(b=E.key),w>0){var d=m(this.slabs[w-1],x);d&&(b?n(d.key,b)>0&&(b=d.key,p=d.value):(p=d.value,b=d.key))}var u=this.horizontal[w];if(u.length>0){var g=o.ge(u,x[1],f);if(g=u.length)return p;y=u[g]}}if(y.start)if(b){var D=i(b[0],b[1],[x[0],y.y]);b[0][0]>b[1][0]&&(D=-D),D>0&&(p=y.index)}else p=y.index;else y.y!==x[1]&&(p=y.index)}}}return p};function c(x,w,A,E){this.y=x,this.index=w,this.start=A,this.closed=E}function T(x,w,A,E){this.x=x,this.segment=w,this.create=A,this.index=E}function l(x){for(var w=x.length,A=2*w,E=new Array(A),p=0;p1&&(w=1);for(var A=1-w,E=m.length,p=new Array(E),b=0;b0||x>0&&p<0){var b=n(w,p,A,x);T.push(b),l.push(b.slice())}p<0?l.push(A.slice()):p>0?T.push(A.slice()):(T.push(A.slice()),l.push(A.slice())),x=p}return{positive:T,negative:l}}function h(m,c){for(var T=[],l=i(m[m.length-1],c),x=m[m.length-1],w=m[0],A=0;A0||l>0&&E<0)&&T.push(n(x,E,w,l)),E>=0&&T.push(w.slice()),l=E}return T}function f(m,c){for(var T=[],l=i(m[m.length-1],c),x=m[m.length-1],w=m[0],A=0;A0||l>0&&E<0)&&T.push(n(x,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(m){return s(f(m),arguments)}function n(m,c){return i.apply(null,[m].concat(c||[]))}function s(m,c){var T=1,l=m.length,x,w="",A,E,p,b,d,u,g,y;for(A=0;A=0),p.type){case"b":x=parseInt(x,10).toString(2);break;case"c":x=String.fromCharCode(parseInt(x,10));break;case"d":case"i":x=parseInt(x,10);break;case"j":x=JSON.stringify(x,null,p.width?parseInt(p.width):0);break;case"e":x=p.precision?parseFloat(x).toExponential(p.precision):parseFloat(x).toExponential();break;case"f":x=p.precision?parseFloat(x).toFixed(p.precision):parseFloat(x);break;case"g":x=p.precision?String(Number(x.toPrecision(p.precision))):parseFloat(x);break;case"o":x=(parseInt(x,10)>>>0).toString(8);break;case"s":x=String(x),x=p.precision?x.substring(0,p.precision):x;break;case"t":x=String(!!x),x=p.precision?x.substring(0,p.precision):x;break;case"T":x=Object.prototype.toString.call(x).slice(8,-1).toLowerCase(),x=p.precision?x.substring(0,p.precision):x;break;case"u":x=parseInt(x,10)>>>0;break;case"v":x=x.valueOf(),x=p.precision?x.substring(0,p.precision):x;break;case"x":x=(parseInt(x,10)>>>0).toString(16);break;case"X":x=(parseInt(x,10)>>>0).toString(16).toUpperCase();break}a.json.test(p.type)?w+=x:(a.number.test(p.type)&&(!g||p.sign)?(y=g?"+":"-",x=x.toString().replace(a.sign,"")):y="",d=p.pad_char?p.pad_char==="0"?"0":p.pad_char.charAt(1):" ",u=p.width-(y+x).length,b=p.width&&u>0?d.repeat(u):"",w+=p.align?y+x+b:d==="0"?y+b+x:b+y+x)}return w}var h=Object.create(null);function f(m){if(h[m])return h[m];for(var c=m,T,l=[],x=0;c;){if((T=a.text.exec(c))!==null)l.push(T[0]);else if((T=a.modulo.exec(c))!==null)l.push("%");else if((T=a.placeholder.exec(c))!==null){if(T[2]){x|=1;var w=[],A=T[2],E=[];if((E=a.key.exec(A))!==null)for(w.push(E[1]);(A=A.substring(E[0].length))!=="";)if((E=a.key_access.exec(A))!==null)w.push(E[1]);else if((E=a.index_access.exec(A))!==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 x|=2;if(x===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");c=c.substring(T[0].length)}return h[m]=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(m,c,T){var l=m({order:c,scalarArguments:3,getters:T==="generic"?[0]:void 0,phase:function(w,A,E,p){return w>p|0},vertex:function(w,A,E,p,b,d,u,g,y,D,P,z,F){var N=(u<<0)+(g<<1)+(y<<2)+(D<<3)|0;if(!(N===0||N===15))switch(N){case 0:P.push([w-.5,A-.5]);break;case 1:P.push([w-.25-.25*(p+E-2*F)/(E-p),A-.25-.25*(b+E-2*F)/(E-b)]);break;case 2:P.push([w-.75-.25*(-p-E+2*F)/(p-E),A-.25-.25*(d+p-2*F)/(p-d)]);break;case 3:P.push([w-.5,A-.5-.5*(b+E+d+p-4*F)/(E-b+p-d)]);break;case 4:P.push([w-.25-.25*(d+b-2*F)/(b-d),A-.75-.25*(-b-E+2*F)/(b-E)]);break;case 5:P.push([w-.5-.5*(p+E+d+b-4*F)/(E-p+b-d),A-.5]);break;case 6:P.push([w-.5-.25*(-p-E+d+b)/(p-E+b-d),A-.5-.25*(-b-E+d+p)/(b-E+p-d)]);break;case 7:P.push([w-.75-.25*(d+b-2*F)/(b-d),A-.75-.25*(d+p-2*F)/(p-d)]);break;case 8:P.push([w-.75-.25*(-d-b+2*F)/(d-b),A-.75-.25*(-d-p+2*F)/(d-p)]);break;case 9:P.push([w-.5-.25*(p+E+-d-b)/(E-p+d-b),A-.5-.25*(b+E+-d-p)/(E-b+d-p)]);break;case 10:P.push([w-.5-.5*(-p-E+-d-b+4*F)/(p-E+d-b),A-.5]);break;case 11:P.push([w-.25-.25*(-d-b+2*F)/(d-b),A-.75-.25*(b+E-2*F)/(E-b)]);break;case 12:P.push([w-.5,A-.5-.5*(-b-E+-d-p+4*F)/(b-E+d-p)]);break;case 13:P.push([w-.75-.25*(p+E-2*F)/(E-p),A-.25-.25*(-d-p+2*F)/(d-p)]);break;case 14:P.push([w-.25-.25*(-p-E+2*F)/(p-E),A-.25-.25*(-b-E+2*F)/(b-E)]);break;case 15:P.push([w-.5,A-.5]);break}},cell:function(w,A,E,p,b,d,u,g,y){b?g.push([w,A]):g.push([A,w])}});return function(x,w){var A=[],E=[];return l(x,A,E,w),{positions:A,cells:E}}}};function n(m,c){var T=m.length+"d",l=i[T];if(l)return l(o,m,c)}function s(m,c){for(var T=a(m,c),l=T.length,x=new Array(l),w=new Array(l),A=0;AMath.max(p,b)?d[2]=1:p>Math.max(E,b)?d[0]=1:d[1]=1;for(var u=0,g=0,y=0;y<3;++y)u+=A[y]*A[y],g+=d[y]*A[y];for(var y=0;y<3;++y)d[y]-=g/u*A[y];return s(d,d),d}function T(A,E,p,b,d,u,g,y){this.center=o(p),this.up=o(b),this.right=o(d),this.radius=o([u]),this.angle=o([g,y]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,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 D=0;D<16;++D)this.computedMatrix[D]=.5;this.recalcMatrix(0)}var l=T.prototype;l.setDistanceLimits=function(A,E){A>0?A=Math.log(A):A=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=E},l.getDistanceLimits=function(A){var E=this.radius.bounds[0];return A?(A[0]=Math.exp(E[0][0]),A[1]=Math.exp(E[1][0]),A):[Math.exp(E[0][0]),Math.exp(E[1][0])]},l.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var E=this.computedUp,p=this.computedRight,b=0,d=0,u=0;u<3;++u)d+=E[u]*p[u],b+=E[u]*E[u];for(var g=Math.sqrt(b),y=0,u=0;u<3;++u)p[u]-=E[u]*d/b,y+=p[u]*p[u],E[u]/=g;for(var D=Math.sqrt(y),u=0;u<3;++u)p[u]/=D;var P=this.computedToward;n(P,E,p),s(P,P);for(var z=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],N=this.computedAngle[1],O=Math.cos(F),L=Math.sin(F),U=Math.cos(N),B=Math.sin(N),W=this.computedCenter,$=O*U,ue=L*U,ce=B,de=-O*B,Y=-L*B,X=U,Q=this.computedEye,V=this.computedMatrix,u=0;u<3;++u){var le=$*p[u]+ue*P[u]+ce*E[u];V[4*u+1]=de*p[u]+Y*P[u]+X*E[u],V[4*u+2]=le,V[4*u+3]=0}var ae=V[1],j=V[5],ee=V[9],te=V[2],pe=V[6],we=V[10],Se=j*we-ee*pe,Re=ee*te-ae*we,Pe=ae*pe-j*te,je=f(Se,Re,Pe);Se/=je,Re/=je,Pe/=je,V[0]=Se,V[4]=Re,V[8]=Pe;for(var u=0;u<3;++u)Q[u]=W[u]+V[2+4*u]*z;for(var u=0;u<3;++u){for(var y=0,at=0;at<3;++at)y+=V[u+4*at]*Q[at];V[12+u]=-y}V[15]=1},l.getMatrix=function(A,E){this.recalcMatrix(A);var p=this.computedMatrix;if(E){for(var b=0;b<16;++b)E[b]=p[b];return E}return p};var x=[0,0,0];l.rotate=function(A,E,p,b){if(this.angle.move(A,E,p),b){this.recalcMatrix(A);var d=this.computedMatrix;x[0]=d[2],x[1]=d[6],x[2]=d[10];for(var u=this.computedUp,g=this.computedRight,y=this.computedToward,D=0;D<3;++D)d[4*D]=u[D],d[4*D+1]=g[D],d[4*D+2]=y[D];i(d,d,b,x);for(var D=0;D<3;++D)u[D]=d[4*D],g[D]=d[4*D+1];this.up.set(A,u[0],u[1],u[2]),this.right.set(A,g[0],g[1],g[2])}},l.pan=function(A,E,p,b){E=E||0,p=p||0,b=b||0,this.recalcMatrix(A);var d=this.computedMatrix,u=Math.exp(this.computedRadius[0]),g=d[1],y=d[5],D=d[9],P=f(g,y,D);g/=P,y/=P,D/=P;var z=d[0],F=d[4],N=d[8],O=z*g+F*y+N*D;z-=g*O,F-=y*O,N-=D*O;var L=f(z,F,N);z/=L,F/=L,N/=L;var U=z*E+g*p,B=F*E+y*p,W=N*E+D*p;this.center.move(A,U,B,W);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+b),this.radius.set(A,Math.log($))},l.translate=function(A,E,p,b){this.center.move(A,E||0,p||0,b||0)},l.setMatrix=function(A,E,p,b){var d=1;typeof p=="number"&&(d=p|0),(d<0||d>3)&&(d=1);var u=(d+2)%3,g=(d+1)%3;E||(this.recalcMatrix(A),E=this.computedMatrix);var y=E[d],D=E[d+4],P=E[d+8];if(b){var F=Math.abs(y),N=Math.abs(D),O=Math.abs(P),L=Math.max(F,N,O);F===L?(y=y<0?-1:1,D=P=0):O===L?(P=P<0?-1:1,y=D=0):(D=D<0?-1:1,y=P=0)}else{var z=f(y,D,P);y/=z,D/=z,P/=z}var U=E[u],B=E[u+4],W=E[u+8],$=U*y+B*D+W*P;U-=y*$,B-=D*$,W-=P*$;var ue=f(U,B,W);U/=ue,B/=ue,W/=ue;var ce=D*W-P*B,de=P*U-y*W,Y=y*B-D*U,X=f(ce,de,Y);ce/=X,de/=X,Y/=X,this.center.jump(A,se,ne,Ce),this.radius.idle(A),this.up.jump(A,y,D,P),this.right.jump(A,U,B,W);var Q,V;if(d===2){var le=E[1],ae=E[5],j=E[9],ee=le*U+ae*B+j*W,te=le*ce+ae*de+j*Y;Re<0?Q=-Math.PI/2:Q=Math.PI/2,V=Math.atan2(te,ee)}else{var pe=E[2],we=E[6],Se=E[10],Re=pe*y+we*D+Se*P,Pe=pe*U+we*B+Se*W,je=pe*ce+we*de+Se*Y;Q=Math.asin(m(Re)),V=Math.atan2(je,Pe)}this.angle.jump(A,V,Q),this.recalcMatrix(A);var at=E[2],nt=E[6],tt=E[10],Ve=this.computedMatrix;a(Ve,E);var he=Ve[15],se=Ve[12]/he,ne=Ve[13]/he,Ce=Ve[14]/he,Ze=Math.exp(this.computedRadius[0]);this.center.jump(A,se-at*Ze,ne-nt*Ze,Ce-tt*Ze)},l.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},l.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},l.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},l.setDistance=function(A,E){E>0&&this.radius.set(A,Math.log(E))},l.lookAt=function(A,E,p,b){this.recalcMatrix(A),E=E||this.computedEye,p=p||this.computedCenter,b=b||this.computedUp;var d=b[0],u=b[1],g=b[2],y=f(d,u,g);if(!(y<1e-6)){d/=y,u/=y,g/=y;var D=E[0]-p[0],P=E[1]-p[1],z=E[2]-p[2],F=f(D,P,z);if(!(F<1e-6)){D/=F,P/=F,z/=F;var N=this.computedRight,O=N[0],L=N[1],U=N[2],B=d*O+u*L+g*U;O-=B*d,L-=B*u,U-=B*g;var W=f(O,L,U);if(!(W<.01&&(O=u*z-g*P,L=g*D-d*z,U=d*P-u*D,W=f(O,L,U),W<1e-6))){O/=W,L/=W,U/=W,this.up.set(A,d,u,g),this.right.set(A,O,L,U),this.center.set(A,p[0],p[1],p[2]),this.radius.set(A,Math.log(F));var $=u*U-g*L,ue=g*O-d*U,ce=d*L-u*O,de=f($,ue,ce);$/=de,ue/=de,ce/=de;var Y=d*D+u*P+g*z,X=O*D+L*P+U*z,Q=$*D+ue*P+ce*z,V=Math.asin(m(Y)),le=Math.atan2(Q,X),ae=this.angle._state,j=ae[ae.length-1],ee=ae[ae.length-2];j=j%(2*Math.PI);var te=Math.abs(j+2*Math.PI-le),pe=Math.abs(j-le),we=Math.abs(j-2*Math.PI-le);te0?U.pop():new ArrayBuffer(O)}t.mallocArrayBuffer=x;function w(N){return new Uint8Array(x(N),0,N)}t.mallocUint8=w;function A(N){return new Uint16Array(x(2*N),0,N)}t.mallocUint16=A;function E(N){return new Uint32Array(x(4*N),0,N)}t.mallocUint32=E;function p(N){return new Int8Array(x(N),0,N)}t.mallocInt8=p;function b(N){return new Int16Array(x(2*N),0,N)}t.mallocInt16=b;function d(N){return new Int32Array(x(4*N),0,N)}t.mallocInt32=d;function u(N){return new Float32Array(x(4*N),0,N)}t.mallocFloat32=t.mallocFloat=u;function g(N){return new Float64Array(x(8*N),0,N)}t.mallocFloat64=t.mallocDouble=g;function y(N){return n?new Uint8ClampedArray(x(N),0,N):w(N)}t.mallocUint8Clamped=y;function D(N){return s?new BigUint64Array(x(8*N),0,N):null}t.mallocBigUint64=D;function P(N){return h?new BigInt64Array(x(8*N),0,N):null}t.mallocBigInt64=P;function z(N){return new DataView(x(N),0,N)}t.mallocDataView=z;function F(N){N=o.nextPow2(N);var O=o.log2(N),L=c[O];return L.length>0?L.pop():new i(N)}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,m[O].length=0,c[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",U="",B=L.length,W=U.length,$=F[0]===x||F[0]===E,ue=0,ce=-W;ue>-1&&(ue=N.indexOf(L,ue),!(ue===-1||(ce=N.indexOf(U,ue+B),ce===-1)||ce<=ue));){for(var de=ue;de=ce)O[de]=null,N=N.substr(0,de)+" "+N.substr(de+1);else if(O[de]!==null){var Y=O[de].indexOf(F[0]);Y===-1?O[de]+=F:$&&(O[de]=O[de].substr(0,Y+1)+(1+parseInt(O[de][Y+1]))+O[de].substr(Y+2))}var X=ue+B,Q=N.substr(X,ce-X),V=Q.indexOf(L);V!==-1?ue=V:ue=ce+W}return O}function d(z,F,N){for(var O=F.textAlign||"start",L=F.textBaseline||"alphabetic",U=[1<<30,1<<30],B=[0,0],W=z.length,$=0;$/g,` `):N=N.replace(/\/g," ");var B="",W=[];for(j=0;j-1?parseInt(ne[1+rt]):0,kt=Je>-1?parseInt(Ce[1+Je]):0;St!==kt&&(Ze=Ze.replace(Pe(),"?px "),pe*=Math.pow(.75,kt-St),Ze=Ze.replace("?px ",Pe())),te+=.25*Y*(kt-St)}if(U.superscripts===!0){var Bt=ne.indexOf(x),Vt=Ce.indexOf(x),Ar=Bt>-1?parseInt(ne[1+Bt]):0,vr=Vt>-1?parseInt(Ce[1+Vt]):0;Ar!==vr&&(Ze=Ze.replace(Pe(),"?px "),pe*=Math.pow(.75,vr-Ar),Ze=Ze.replace("?px ",Pe())),te-=.25*Y*(vr-Ar)}if(U.bolds===!0){var qr=ne.indexOf(m)>-1,kr=Ce.indexOf(m)>-1;!qr&&kr&&(Ur?Ze=Ze.replace("italic ","italic bold "):Ze="bold "+Ze),qr&&!kr&&(Ze=Ze.replace("bold ",""))}if(U.italics===!0){var Ur=ne.indexOf(T)>-1,_t=Ce.indexOf(T)>-1;!Ur&&_t&&(Ze="italic "+Ze),Ur&&!_t&&(Ze=Ze.replace("italic ",""))}F.font=Ze}for(ae=0;ae0&&(L=O.size),O.lineSpacing&&O.lineSpacing>0&&(U=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(B.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(B.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(B.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(B.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(B.superscripts=!!O.styletags.superscripts)),N.font=[O.fontStyle,O.fontVariant,O.fontWeight,L+"px",O.font].filter(function($){return $}).join(" "),N.textAlign="start",N.textBaseline="alphabetic",N.direction="ltr";var W=u(F,N,z,L,U,B);return D(W,O,L)}},1538:function(e){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(y){y.permitHostObjects___&&y.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,h=Object.getOwnPropertyNames,f=Object.defineProperty,m=Object.isExtensible,c="weakmap:",T=c+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var l=new ArrayBuffer(25),x=new Uint8Array(l);crypto.getRandomValues(x),T=c+"rand:"+Array.prototype.map.call(x,function(y){return(y%36).toString(36)}).join("")+"___"}function w(y){return!(y.substr(0,c.length)==c&&y.substr(y.length-3)==="___")}if(f(Object,"getOwnPropertyNames",{value:function(D){return h(D).filter(w)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;f(Object,"getPropertyNames",{value:function(D){return A(D).filter(w)}})}function E(y){if(y!==Object(y))throw new TypeError("Not an object: "+y);var D=y[T];if(D&&D.key===y)return D;if(m(y)){D={key:y};try{return f(y,T,{value:D,writable:!1,enumerable:!1,configurable:!1}),D}catch{return}}}(function(){var y=Object.freeze;f(Object,"freeze",{value:function(F){return E(F),y(F)}});var D=Object.seal;f(Object,"seal",{value:function(F){return E(F),D(F)}});var P=Object.preventExtensions;f(Object,"preventExtensions",{value:function(F){return E(F),P(F)}})})();function p(y){return y.prototype=null,Object.freeze(y)}var b=!1;function d(){!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,g=function(){this instanceof g||d();var y=[],D=[],P=u++;function z(L,U){var B,W=E(L);return W?P in W?W[P]:U:(B=y.indexOf(L),B>=0?D[B]:U)}function F(L){var U=E(L);return U?P in U:y.indexOf(L)>=0}function N(L,U){var B,W=E(L);return W?W[P]=U:(B=y.indexOf(L),B>=0?D[B]=U:(B=y.length,D[B]=U,y[B]=L)),this}function O(L){var U=E(L),B,W;return U?P in U&&delete U[P]:(B=y.indexOf(L),B<0?!1:(W=y.length-1,y[B]=void 0,D[B]=D[W],y[B]=y[W],y.length=W,D.length=W,!0))}return Object.create(g.prototype,{get___:{value:p(z)},has___:{value:p(F)},set___:{value:p(N)},delete___:{value:p(O)}})};g.prototype=Object.create(Object.prototype,{get:{value:function(D,P){return this.get___(D,P)},writable:!0,configurable:!0},has:{value:function(D){return this.has___(D)},writable:!0,configurable:!0},set:{value:function(D,P){return this.set___(D,P)},writable:!0,configurable:!0},delete:{value:function(D){return this.delete___(D)},writable:!0,configurable:!0}}),typeof a=="function"?function(){o&&typeof Proxy<"u"&&(Proxy=void 0);function y(){this instanceof g||d();var D=new a,P=void 0,z=!1;function F(U,B){return P?D.has(U)?D.get(U):P.get___(U,B):D.get(U,B)}function N(U){return D.has(U)||(P?P.has___(U):!1)}var O;o?O=function(U,B){return D.set(U,B),D.has(U)||(P||(P=new g),P.set(U,B)),this}:O=function(U,B){if(z)try{D.set(U,B)}catch{P||(P=new g),P.set___(U,B)}else D.set(U,B);return this};function L(U){var B=!!D.delete(U);return P&&P.delete___(U)||B}return Object.create(g.prototype,{get___:{value:p(F)},has___:{value:p(N)},set___:{value:p(O)},delete___:{value:p(L)},permitHostObjects___:{value:p(function(U){if(U===r)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}y.prototype=g.prototype,e.exports=y,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=g)})()},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 h=i(n);return h.hasOwnProperty("value")?h.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,h,f,m,c,T){var l=s[0],x=f[0],w=[0],A=x;m|=0;var E=0,p=x;for(E=0;E=0!=d>=0&&c.push(w[0]+.5+.5*(b+d)/(b-d))}m+=p,++w[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(m,c,T){var l=m.dtype,x=m.order,w=[l,x.join()].join(),A=h[w];return A||(h[w]=A=s([l,x])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,c,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(){}},_={};function S(e){var t=_[e];if(t!==void 0)return t.exports;var r=_[e]={id:e,loaded:!1,exports:{}};return v[e].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}(function(){S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){S.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}();var M=S(1964);q.exports=M})()}}),xE=He({"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]}}}),HN=He({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,q){"use strict";var v=xE();q.exports=S;var _={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function S(M){var e,t=[],r=1,o;if(typeof M=="string")if(M=M.toLowerCase(),v[M])t=v[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],h=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(c,T){if(/%$/.test(c))return T===i?parseFloat(c)/100:a==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(a[T]==="h"){if(/deg$/.test(c))return parseFloat(c);if(_[c]!==void 0)return _[c]}return parseFloat(c)}),s===a&&t.push(1),r=h||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}}}}),WN=He({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,q){"use strict";var v=HN();q.exports=function(M){Array.isArray(M)&&M.raw&&(M=String.raw.apply(null,arguments));var e,t,r,o=v(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=_(e)),e.push(Math.min(Math.max(o.alpha,0),1)),e};function _(S){var M=S[0]/360,e=S[1]/100,t=S[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}}}),mx=He({"node_modules/clamp/index.js"(Z,q){q.exports=v;function v(_,S,M){return SM?M:_:_S?S:_}}}),Q3=He({"node_modules/dtype/index.js"(Z,q){q.exports=function(v){switch(v){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}}}}),v0=He({"node_modules/color-normalize/index.js"(Z,q){"use strict";var v=WN(),_=mx(),S=Q3();q.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var o=S(r),a=new o(4),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=v(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]=_(Math.floor(t[0]*255),0,255),a[1]=_(Math.floor(t[1]*255),0,255),a[2]=_(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:_(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))}}}),tm=He({"src/lib/str2rgbarray.js"(Z,q){"use strict";var v=v0();function _(S){return S?v(S):[0,0,0,1]}q.exports=_}}),rm=He({"src/lib/gl_format_color.js"(Z,q){"use strict";var v=ns(),_=Ch(),S=v0(),M=rc(),e=sh().defaultLine,t=hp().isArrayOrTypedArray,r=S(e),o=1;function a(f,m){var c=f;return c[3]*=m,c}function i(f){if(v(f))return r;var m=S(f);return m.length?m:r}function n(f){return v(f)?f:o}function s(f,m,c){var T=f.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),x=t(m),w=M.extractOpts(f),A=[],E,p,b,d,u;if(w.colorscale!==void 0?E=M.makeColorScaleFuncFromTrace(f):E=i,l?p=function(y,D){return y[D]===void 0?r:S(E(y[D]))}:p=i,x?b=function(y,D){return y[D]===void 0?o:n(y[D])}:b=n,l||x)for(var g=0;g0){var c=o.c2l(f);o._lowerLogErrorBound||(o._lowerLogErrorBound=c),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,c)}}else i[n]=[-s[0]*r,s[1]*r]}return i}function S(e){for(var t=0;t-1?-1:D.indexOf("right")>-1?1:0}function w(D){return D==null?0:D.indexOf("top")>-1?-1:D.indexOf("bottom")>-1?1:0}function A(D){var P=0,z=0,F=[P,z];if(Array.isArray(D))for(var N=0;N=0){var W=T(U.position,U.delaunayColor,U.delaunayAxis);W.opacity=D.opacity,this.delaunayMesh?this.delaunayMesh.update(W):(W.gl=P,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)},c.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 y(D,P){var z=new m(D,P.uid);return z.update(P),z}q.exports=y}}),wE=He({"src/traces/scatter3d/attributes.js"(Z,q){"use strict";var v=af(),_=tc(),S=ku(),M=rf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=au(),a=bE(),i=eT(),n=rs().extendFlat,s=pc().overrideAll,h=$m(),f=v.line,m=v.marker,c=m.line,T=n({width:f.width,dash:{valType:"enumerated",values:h(a),dflt:"solid"}},S("line"));function l(w){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 x=q.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:n({},v.text,{}),texttemplate:t(),texttemplatefallback:r({editType:"calc"}),hovertext:n({},v.hovertext,{}),hovertemplate:e(),hovertemplatefallback:r(),xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z"),mode:n({},v.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:l("x"),y:l("y"),z:l("z")},connectgaps:v.connectgaps,line:T,marker:n({symbol:{valType:"enumerated",values:h(i),dflt:"circle",arrayOk:!0},size:n({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:n({},m.opacity,{arrayOk:!1}),colorbar:m.colorbar,line:n({width:n({},c.width,{arrayOk:!1})},S("marker.line"))},S("marker")),textposition:n({},v.textposition,{dflt:"top center"}),textfont:_({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:o.opacity,hoverinfo:n({},o.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"}}),YN=He({"src/traces/scatter3d/defaults.js"(Z,q){"use strict";var v=so(),_=sa(),S=Fu(),M=md(),e=Dd(),t=zd(),r=wE();q.exports=function(i,n,s,h){function f(E,p){return _.coerce(i,n,r,E,p)}var m=o(i,n,f,h);if(!m){n.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),S.hasMarkers(n)&&M(i,n,s,h,f,{noAngle:!0,noLineDash:!0,noSelect:!0}),S.hasLines(n)&&(f("connectgaps"),e(i,n,s,h,f)),S.hasText(n)&&(f("texttemplate"),f("texttemplatefallback"),t(i,n,h,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(n.line||{}).color,T=(n.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",c||T);for(var l=["x","y","z"],x=0;x<3;++x){var w="projection."+l[x];f(w+".show")&&(f(w+".opacity"),f(w+".scale"))}var A=v.getComponentMethod("errorbars","supplyDefaults");A(i,n,c||T||s,{axis:"z"}),A(i,n,c||T||s,{axis:"y",inherit:"z"}),A(i,n,c||T||s,{axis:"x",inherit:"z"})};function o(a,i,n,s){var h=0,f=n("x"),m=n("y"),c=n("z"),T=v.getComponentMethod("calendars","handleTraceDefaults");return T(a,i,["x","y","z"],s),f&&m&&c&&(h=Math.min(f.length,m.length,c.length),i._length=i._xlength=i._ylength=i._zlength=h),h}}}),KN=He({"src/traces/scatter3d/calc.js"(Z,q){"use strict";var v=Av(),_=Fd();q.exports=function(M,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return v(t,e),_(M,e),t}}}),JN=He({"node_modules/get-canvas-context/index.js"(Z,q){q.exports=v;function v(_,S){if(typeof _!="string")throw new TypeError("must specify type string");if(S=S||{},typeof document>"u"&&!S.canvas)return null;var M=S.canvas||document.createElement("canvas");typeof S.width=="number"&&(M.width=S.width),typeof S.height=="number"&&(M.height=S.height);var e=S,t;try{var r=[_];_.indexOf("webgl")===0&&r.push("experimental-"+_);for(var o=0;o/g," "));n[s]=c,h.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)}}}),rU=He({"src/plots/gl3d/scene.js"(Z,q){"use strict";var v=Kh().gl_plot3d,_=v.createCamera,S=v.createScene,M=$N(),e=b2(),t=so(),r=sa(),o=r.preserveDrawingBuffer(),a=Wo(),i=Hc(),n=tm(),s=TE(),h=U5(),f=QN(),m=eU(),c=tU(),T=Yd().applyAutorangeOptions,l,x,w=!1;function A(z,F){var N=document.createElement("div"),O=z.container;this.graphDiv=z.graphDiv;var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.style.position="absolute",L.style.top=L.style.left="0px",L.style.width=L.style.height="100%",L.style["z-index"]=20,L.style["pointer-events"]="none",N.appendChild(L),this.svgContainer=L,N.id=z.id,N.style.position="absolute",N.style.top=N.style.left="0px",N.style.width=N.style.height="100%",O.appendChild(N),this.fullLayout=F,this.id=z.id||"scene",this.fullSceneLayout=F[this.id],this.plotArgs=[[],{},{}],this.axesOptions=f(F,F[this.id]),this.spikeOptions=m(F[this.id]),this.container=N,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=A.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(!x&&(l=document.createElement("canvas"),x=M({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!x))throw new Error("error creating static canvas/context for image server");F.gl=x,F.canvas=l}return F};var p=!0;E.tryCreatePlot=function(){var z=this,F=z.prepareOptions(),N=!0;try{z.glplot=S(F)}catch{if(z.staticMode||!p||o)N=!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=S(F)}catch{o=F.glOptions.preserveDrawingBuffer=!1,N=!1}}}return p=!1,N},E.initializeGLCamera=function(){var z=this,F=z.fullSceneLayout.camera,N=F.projection.type==="orthographic";z.camera=_(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:N,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 N=z.graphDiv,O=N.layout,L=function(){var B={};return z.isCameraChanged(O)&&(B[z.id+".camera"]=z.getCamera()),z.isAspectChanged(O)&&(B[z.id+".aspectratio"]=z.glplot.getAspectratio(),O[z.id].aspectmode!=="manual"&&(z.fullSceneLayout.aspectmode=O[z.id].aspectmode=B[z.id+".aspectmode"]="manual")),B},U=function(B){if(B.fullSceneLayout.dragmode!==!1){var W=L();B.saveLayout(O),B.graphDiv.emit("plotly_relayout",W)}};return z.glplot.canvas&&(z.glplot.canvas.addEventListener("mouseup",function(){U(z)}),z.glplot.canvas.addEventListener("touchstart",function(){w=!0}),z.glplot.canvas.addEventListener("wheel",function(B){if(N._context._scrollZoom.gl3d){if(z.camera._ortho){var W=B.deltaX>B.deltaY?1.1:.9090909090909091,$=z.glplot.getAspectratio();z.glplot.setAspectratio({x:W*$.x,y:W*$.y,z:W*$.z})}U(z)}},e?{passive:!1}:!1),z.glplot.canvas.addEventListener("mousemove",function(){if(z.fullSceneLayout.dragmode!==!1&&z.camera.mouseListener.buttons!==0){var B=L();z.graphDiv.emit("plotly_relayouting",B)}}),z.staticMode||z.glplot.canvas.addEventListener("webglcontextlost",function(B){N&&N.emit&&N.emit("plotly_webglcontextlost",{event:B,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,N,O=z.svgContainer,L=z.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var U=F._fullLayout._invScaleX,B=F._fullLayout._invScaleY,W=L.width*U,$=L.height*B;O.setAttributeNS(null,"viewBox","0 0 "+W+" "+$),O.setAttributeNS(null,"width",W),O.setAttributeNS(null,"height",$),c(z),z.glplot.axes.update(z.axesOptions);for(var ue=Object.keys(z.traces),ce=null,de=z.glplot.selection,Y=0;Y")):N.type==="isosurface"||N.type==="volume"?(ae.valueLabel=a.hoverLabelText(z._mockAxis,z._mockAxis.d2l(de.traceCoordinate[3]),N.valuehoverformat),we.push("value: "+ae.valueLabel),de.textLabel&&we.push(de.textLabel),pe=we.join("
")):pe=de.textLabel;var Se={x:de.traceCoordinate[0],y:de.traceCoordinate[1],z:de.traceCoordinate[2],data:V._input,fullData:V,curveNumber:V.index,pointNumber:le};i.appendArrayPointValue(Se,V,le),N._module.eventData&&(Se=V._module.eventData(Se,de,V,{},le));var Re={points:[Se]};if(z.fullSceneLayout.hovermode){var Pe=[];i.loneHover({trace:V,x:(.5+.5*Q[0]/Q[3])*W,y:(.5-.5*Q[1]/Q[3])*$,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:pe,name:ce.name,color:i.castHoverOption(V,le,"bgcolor")||ce.color,borderColor:i.castHoverOption(V,le,"bordercolor"),fontFamily:i.castHoverOption(V,le,"font.family"),fontSize:i.castHoverOption(V,le,"font.size"),fontColor:i.castHoverOption(V,le,"font.color"),nameLength:i.castHoverOption(V,le,"namelength"),textAlign:i.castHoverOption(V,le,"align"),hovertemplate:r.castOption(V,le,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Se,ae),eventData:[Se]},{container:O,gd:F,inOut_bbox:Pe}),Se.bbox=Pe[0]}de.distance<5&&(de.buttons||w)?F.emit("plotly_click",Re):F.emit("plotly_hover",Re),this.oldEventData=Re}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 d(z,F,N){for(var O=z.fullSceneLayout,L=0;L<3;L++){var U=b[L],B=U.charAt(0),W=O[U],$=F[B],ue=F[B+"calendar"],ce=F["_"+B+"length"];if(!r.isArrayOrTypedArray($))N[0][L]=Math.min(N[0][L],0),N[1][L]=Math.max(N[1][L],ce-1);else for(var de,Y=0;Y<(ce||$.length);Y++)if(r.isArrayOrTypedArray($[Y]))for(var X=0;X<$[Y].length;++X)de=W.d2l($[Y][X],0,ue),!isNaN(de)&&isFinite(de)&&(N[0][L]=Math.min(N[0][L],de),N[1][L]=Math.max(N[1][L],de));else de=W.d2l($[Y],0,ue),!isNaN(de)&&isFinite(de)&&(N[0][L]=Math.min(N[0][L],de),N[1][L]=Math.max(N[1][L],de))}}function u(z,F){for(var N=z.fullSceneLayout,O=N.annotations||[],L=0;L<3;L++)for(var U=b[L],B=U.charAt(0),W=N[U],$=0;$V[1][B])V[0][B]=-1,V[1][B]=1;else{var at=V[1][B]-V[0][B];V[0][B]-=at/32,V[1][B]+=at/32}if(j=[V[0][B],V[1][B]],j=T(j,$),V[0][B]=j[0],V[1][B]=j[1],$.isReversed()){var nt=V[0][B];V[0][B]=V[1][B],V[1][B]=nt}}else j=$.range,V[0][B]=$.r2l(j[0]),V[1][B]=$.r2l(j[1]);V[0][B]===V[1][B]&&(V[0][B]-=1,V[1][B]+=1),le[B]=V[1][B]-V[0][B],$.range=[V[0][B],V[1][B]],$.limitRange(),O.glplot.setBounds(B,{min:$.range[0]*X[B],max:$.range[1]*X[B]})}var tt,Ve=ce.aspectmode;if(Ve==="cube")tt=[1,1,1];else if(Ve==="manual"){var he=ce.aspectratio;tt=[he.x,he.y,he.z]}else if(Ve==="auto"||Ve==="data"){var se=[1,1,1];for(B=0;B<3;++B){$=ce[b[B]],ue=$.type;var ne=ae[ue];se[B]=Math.pow(ne.acc,1/ne.count)/X[B]}Ve==="data"||Math.max.apply(null,se)/Math.min.apply(null,se)<=4?tt=se:tt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ce.aspectratio.x=de.aspectratio.x=tt[0],ce.aspectratio.y=de.aspectratio.y=tt[1],ce.aspectratio.z=de.aspectratio.z=tt[2],O.glplot.setAspectratio(ce.aspectratio),O.viewInitial.aspectratio||(O.viewInitial.aspectratio={x:ce.aspectratio.x,y:ce.aspectratio.y,z:ce.aspectratio.z}),O.viewInitial.aspectmode||(O.viewInitial.aspectmode=ce.aspectmode);var Ce=ce.domain||null,Ze=F._size||null;if(Ce&&Ze){var rt=O.container.style;rt.position="absolute",rt.left=Ze.l+Ce.x[0]*Ze.w+"px",rt.top=Ze.t+(1-Ce.y[1])*Ze.h+"px",rt.width=Ze.w*(Ce.x[1]-Ce.x[0])+"px",rt.height=Ze.h*(Ce.y[1]-Ce.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 g(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 y(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()),y(z.camera)},E.setViewport=function(z){var F=this,N=z.camera;F.camera.lookAt.apply(this,g(N)),F.glplot.setAspectratio(z.aspectratio);var O=N.projection.type==="orthographic",L=F.camera._ortho;O!==L&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},E.isCameraChanged=function(z){var F=this,N=F.getCamera(),O=r.nestedProperty(z,F.id+".camera"),L=O.get();function U(ue,ce,de,Y){var X=["up","center","eye"],Q=["x","y","z"];return ce[X[de]]&&ue[X[de]][Q[Y]]===ce[X[de]][Q[Y]]}var B=!1;if(L===void 0)B=!0;else{for(var W=0;W<3;W++)for(var $=0;$<3;$++)if(!U(N,L,W,$)){B=!0;break}(!L.projection||N.projection&&N.projection.type!==L.projection.type)&&(B=!0)}return B},E.isAspectChanged=function(z){var F=this,N=F.glplot.getAspectratio(),O=r.nestedProperty(z,F.id+".aspectratio"),L=O.get();return L===void 0||L.x!==N.x||L.y!==N.y||L.z!==N.z},E.saveLayout=function(z){var F=this,N=F.fullLayout,O,L,U,B,W,$,ue=F.isCameraChanged(z),ce=F.isAspectChanged(z),de=ue||ce;if(de){var Y={};if(ue&&(O=F.getCamera(),L=r.nestedProperty(z,F.id+".camera"),U=L.get(),Y[F.id+".camera"]=U),ce&&(B=F.glplot.getAspectratio(),W=r.nestedProperty(z,F.id+".aspectratio"),$=W.get(),Y[F.id+".aspectratio"]=$),t.call("_storeDirectGUIEdit",z,N._preGUI,Y),ue){L.set(O);var X=r.nestedProperty(N,F.id+".camera");X.set(O)}if(ce){W.set(B);var Q=r.nestedProperty(N,F.id+".aspectratio");Q.set(B),F.glplot.redraw()}}return de},E.updateFx=function(z,F){var N=this,O=N.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 L=N.graphDiv,U=L._fullLayout,B=N.fullSceneLayout.camera,W=B.up.x,$=B.up.y,ue=B.up.z;if(ue/Math.sqrt(W*W+$*$+ue*ue)<.999){var ce=N.id+".camera.up",de={x:0,y:0,z:1},Y={};Y[ce]=de;var X=L.layout;t.call("_storeDirectGUIEdit",X,U._preGUI,Y),B.up=de,r.nestedProperty(X,ce).set(de)}}else O.keyBindingMode=z;N.fullSceneLayout.hovermode=F};function D(z,F,N){for(var O=0,L=N-1;O0)for(var W=255/B,$=0;$<3;++$)z[U+$]=Math.min(W*z[U+$],255)}}E.toImage=function(z){var F=this;z||(z="png"),F.staticMode&&F.container.appendChild(l),F.glplot.redraw();var N=F.glplot.gl,O=N.drawingBufferWidth,L=N.drawingBufferHeight;N.bindFramebuffer(N.FRAMEBUFFER,null);var U=new Uint8Array(O*L*4);N.readPixels(0,0,O,L,N.RGBA,N.UNSIGNED_BYTE,U),D(U,O,L),P(U,O,L);var B=document.createElement("canvas");B.width=O,B.height=L;var W=B.getContext("2d",{willReadFrequently:!0}),$=W.createImageData(O,L);$.data.set(U),W.putImageData($,0,0);var ue;switch(z){case"jpeg":ue=B.toDataURL("image/jpeg");break;case"webp":ue=B.toDataURL("image/webp");break;default:ue=B.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),ue},E.setConvert=function(){for(var z=this,F=0;F<3;F++){var N=z.fullSceneLayout[b[F]];a.setConvert(N,z.fullLayout),N.setScale=r.noop}},E.make4thDimension=function(){var z=this,F=z.graphDiv,N=F._fullLayout;z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(z._mockAxis,N)},q.exports=A}}),aU=He({"src/plots/gl3d/layout/attributes.js"(Z,q){"use strict";q.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),AE=He({"src/plots/gl3d/layout/axis_attributes.js"(Z,q){"use strict";var v=$n(),_=Xh(),S=rs().extendFlat,M=pc().overrideAll;q.exports=M({visible:_.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:_.color,categoryorder:_.categoryorder,categoryarray:_.categoryarray,title:{text:_.title.text,font:_.title.font},type:S({},_.type,{values:["-","linear","log","date","category"]}),autotypenumbers:_.autotypenumbers,autorange:_.autorange,autorangeoptions:{minallowed:_.autorangeoptions.minallowed,maxallowed:_.autorangeoptions.maxallowed,clipmin:_.autorangeoptions.clipmin,clipmax:_.autorangeoptions.clipmax,include:_.autorangeoptions.include,editType:"plot"},rangemode:_.rangemode,minallowed:_.minallowed,maxallowed:_.maxallowed,range:S({},_.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:_.minor.tickmode,nticks:_.nticks,tick0:_.tick0,dtick:_.dtick,tickvals:_.tickvals,ticktext:_.ticktext,ticks:_.ticks,mirror:_.mirror,ticklen:_.ticklen,tickwidth:_.tickwidth,tickcolor:_.tickcolor,showticklabels:_.showticklabels,labelalias:_.labelalias,tickfont:_.tickfont,tickangle:_.tickangle,tickprefix:_.tickprefix,showtickprefix:_.showtickprefix,ticksuffix:_.ticksuffix,showticksuffix:_.showticksuffix,showexponent:_.showexponent,exponentformat:_.exponentformat,minexponent:_.minexponent,separatethousands:_.separatethousands,tickformat:_.tickformat,tickformatstops:_.tickformatstops,hoverformat:_.hoverformat,showline:_.showline,linecolor:_.linecolor,linewidth:_.linewidth,showgrid:_.showgrid,gridcolor:S({},_.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:_.gridwidth,zeroline:_.zeroline,zerolinecolor:_.zerolinecolor,zerolinewidth:_.zerolinewidth},"plot","from-root")}}),SE=He({"src/plots/gl3d/layout/layout_attributes.js"(Z,q){"use strict";var v=AE(),_=wc().attributes,S=rs().extendFlat,M=sa().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:S(e(0,0,1),{}),center:S(e(0,0,0),{}),eye:S(e(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:_({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:v,yaxis:v,zaxis:v,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"}}}),iU=He({"src/plots/gl3d/layout/axis_defaults.js"(Z,q){"use strict";var v=Ch().mix,_=sa(),S=zl(),M=AE(),e=B5(),t=F_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;q.exports=function(i,n,s){var h,f;function m(l,x){return _.coerce(h,f,M,l,x)}for(var c=0;c1;function m(c){if(!f){var T=v.validate(n[c],t[c]);if(T)return n[c]}}M(n,s,h,{type:o,attributes:t,handleDefaults:a,fullLayout:s,font:s.font,fullData:h,getDfltFromLayout:m,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function a(i,n,s,h){for(var f=s("bgcolor"),m=_.combine(f,h.paper_bgcolor),c=["up","center","eye"],T=0;T.999)&&(E="turntable")}else E="turntable";s("dragmode",E),s("hovermode",h.getDfltFromLayout("hovermode"))}}}),m0=He({"src/plots/gl3d/index.js"(Z){"use strict";var q=pc().overrideAll,v=Ym(),_=rU(),S=Wh().getSubplotData,M=sa(),e=vd(),t="gl3d",r="scene";Z.name=t,Z.attr=r,Z.idRoot=r,Z.idRegex=Z.attrRegex=M.counterRegex("scene"),Z.attributes=aU(),Z.layoutAttributes=SE(),Z.baseLayoutAttrOverrides=q({hoverlabel:v.hoverlabel},"plot","nested"),Z.supplyLayoutDefaults=nU(),Z.plot=function(a){for(var i=a._fullLayout,n=a._fullData,s=i._subplots[t],h=0;h0){D=h[P];break}return D}function T(g,y){if(!(g<1||y<1)){for(var D=m(g),P=m(y),z=1,F=0;FA;)P--,P/=c(P),P++,P1?z:1};function E(g,y,D){var P=D[8]+D[2]*y[0]+D[5]*y[1];return g[0]=(D[6]+D[0]*y[0]+D[3]*y[1])/P,g[1]=(D[7]+D[1]*y[0]+D[4]*y[1])/P,g}function p(g,y,D){return b(g,y,E,D),g}function b(g,y,D,P){for(var z=[0,0],F=g.shape[0],N=g.shape[1],O=0;O0&&this.contourStart[P]!==null&&this.contourEnd[P]!==null&&this.contourEnd[P]>this.contourStart[P]))for(y[P]=!0,z=this.contourStart[P];z$&&(this.minValues[U]=$),this.maxValues[U]<$&&(this.maxValues[U]=$));for(U=0;U<3;U++)this.objectOffset[U]=.5*(this.minValues[U]+this.maxValues[U]);for(U=0;U<3;U++)for(B=0;Bh&&(o.isomin=null,o.isomax=null);var f=n("x"),m=n("y"),c=n("z"),T=n("value");if(!f||!f.length||!m||!m.length||!c||!c.length||!T||!T.length){o.visible=!1;return}var l=_.getComponentMethod("calendars","handleTraceDefaults");l(r,o,["x","y","z"],i),n("valuehoverformat"),["x","y","z"].forEach(function(E){n(E+"hoverformat");var p="caps."+E,b=n(p+".show");b&&n(p+".fill");var d="slices."+E,u=n(d+".show");u&&(n(d+".fill"),n(d+".locations"))});var x=n("spaceframe.show");x&&n("spaceframe.fill");var w=n("surface.show");w&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var A=n("contour.show");A&&(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=He({"src/traces/streamtube/calc.js"(Z,q){"use strict";var v=sa(),_=Tp();function S(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,h;o.starts&&(n=t(o.starts.x||[]),s=t(o.starts.y||[]),h=t(o.starts.z||[]),i=Math.min(n.length,s.length,h.length)),o._startsX=n||[],o._startsY=s||[],o._startsZ=h||[];var f=0,m=1/0,c;for(c=0;c1&&(u=o[n-1],y=a[n-1],P=i[n-1]),s=0;su?"-":"+")+"x"),A=A.replace("y",(g>y?"-":"+")+"y"),A=A.replace("z",(D>P?"-":"+")+"z");var O=function(){n=0,z=[],F=[],N=[]};(!n||n0;m--){var c=Math.min(f[m],f[m-1]),T=Math.max(f[m],f[m-1]);if(T>c&&c-1}function ee(_t,Fe){return _t===null?Fe:_t}function te(_t,Fe,Ye){ue();var Ae=[Fe],Le=[Ye];if(V>=1)Ae=[Fe],Le=[Ye];else if(V>0){var We=ae(Fe,Ye);Ae=We.xyzv,Le=We.abc}for(var Ke=0;Ke-1?Ye[ot]:$(Ut,Ct,Pt);cr>-1?st[ot]=cr:st[ot]=de(Ut,Ct,Pt,ee(_t,jt))}Y(st[0],st[1],st[2])}}function pe(_t,Fe,Ye){var Ae=function(Le,We,Ke){te(_t,[Fe[Le],Fe[We],Fe[Ke]],[Ye[Le],Ye[We],Ye[Ke]])};Ae(0,1,2),Ae(2,3,0)}function we(_t,Fe,Ye){var Ae=function(Le,We,Ke){te(_t,[Fe[Le],Fe[We],Fe[Ke]],[Ye[Le],Ye[We],Ye[Ke]])};Ae(0,1,2),Ae(3,0,1),Ae(2,3,0),Ae(1,2,3)}function Se(_t,Fe,Ye,Ae){var Le=_t[3];LeAe&&(Le=Ae);for(var We=(_t[3]-Le)/(_t[3]-Fe[3]+1e-9),Ke=[],st=0;st<4;st++)Ke[st]=(1-We)*_t[st]+We*Fe[st];return Ke}function Re(_t,Fe,Ye){return _t>=Fe&&_t<=Ye}function Pe(_t){var Fe=.001*(O-N);return _t>=N-Fe&&_t<=O+Fe}function je(_t){for(var Fe=[],Ye=0;Ye<4;Ye++){var Ae=_t[Ye];Fe.push([h._x[Ae],h._y[Ae],h._z[Ae],h._value[Ae]])}return Fe}var at=3;function nt(_t,Fe,Ye,Ae,Le,We){We||(We=1),Ye=[-1,-1,-1];var Ke=!1,st=[Re(Fe[0][3],Ae,Le),Re(Fe[1][3],Ae,Le),Re(Fe[2][3],Ae,Le)];if(!st[0]&&!st[1]&&!st[2])return!1;var ot=function(Ct,Pt,jt){return Pe(Pt[0][3])&&Pe(Pt[1][3])&&Pe(Pt[2][3])?(te(Ct,Pt,jt),!0):West?[z,We]:[We,F];Bt(Fe,ot[0],ot[1])}}var Ut=[[Math.min(N,F),Math.max(N,F)],[Math.min(z,O),Math.max(z,O)]];["x","y","z"].forEach(function(Ct){for(var Pt=[],jt=0;jt0&&(Fa.push(Wa.id),Ct==="x"?Ra.push([Wa.distRatio,0,0]):Ct==="y"?Ra.push([0,Wa.distRatio,0]):Ra.push([0,0,Wa.distRatio]))}else Ct==="x"?_a=qr(1,u-1):Ct==="y"?_a=qr(1,g-1):_a=qr(1,y-1);Fa.length>0&&(Ct==="x"?Pt[cr]=Vt(_t,Fa,or,nr,Ra,Pt[cr]):Ct==="y"?Pt[cr]=Ar(_t,Fa,or,nr,Ra,Pt[cr]):Pt[cr]=vr(_t,Fa,or,nr,Ra,Pt[cr]),cr++),_a.length>0&&(Ct==="x"?Pt[cr]=Ze(_t,_a,or,nr,Pt[cr]):Ct==="y"?Pt[cr]=rt(_t,_a,or,nr,Pt[cr]):Pt[cr]=Je(_t,_a,or,nr,Pt[cr]),cr++)}var Ca=h.caps[Ct];Ca.show&&Ca.fill&&(le(Ca.fill),Ct==="x"?Pt[cr]=Ze(_t,[0,u-1],or,nr,Pt[cr]):Ct==="y"?Pt[cr]=rt(_t,[0,g-1],or,nr,Pt[cr]):Pt[cr]=Je(_t,[0,y-1],or,nr,Pt[cr]),cr++)}}),w===0&&ce(),h._meshX=L,h._meshY=U,h._meshZ=B,h._meshIntensity=W,h._Xs=p,h._Ys=b,h._Zs=d}return Ur(),h}function s(h,f){var m=h.glplot.gl,c=v({gl:m}),T=new o(h,c,f.uid);return c._trace=T,T.update(f),h.glplot.add(c),T}q.exports={findNearestOnAxis:r,generateIsoMeshes:n,createIsosurfaceTrace:s}}}),hU=He({"src/traces/isosurface/index.js"(Z,q){"use strict";q.exports={attributes:tT(),supplyDefaults:EE().supplyDefaults,calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:aT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),pU=He({"lib/isosurface.js"(Z,q){"use strict";q.exports=hU()}}),CE=He({"src/traces/volume/attributes.js"(Z,q){"use strict";var v=ku(),_=tT(),S=gx(),M=au(),e=rs().extendFlat,t=pc().overrideAll,r=q.exports=t(e({x:_.x,y:_.y,z:_.z,value:_.value,isomin:_.isomin,isomax:_.isomax,surface:_.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:_.slices,caps:_.caps,text:_.text,hovertext:_.hovertext,xhoverformat:_.xhoverformat,yhoverformat:_.yhoverformat,zhoverformat:_.zhoverformat,valuehoverformat:_.valuehoverformat,hovertemplate:_.hovertemplate,hovertemplatefallback:_.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:_.colorbar,opacity:_.opacity,opacityscale:S.opacityscale,lightposition:_.lightposition,lighting:_.lighting,flatshading:_.flatshading,contour:_.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"}}),dU=He({"src/traces/volume/defaults.js"(Z,q){"use strict";var v=sa(),_=CE(),S=EE().supplyIsoDefaults,M=ME().opacityscaleDefaults;q.exports=function(t,r,o,a){function i(n,s){return v.coerce(t,r,_,n,s)}S(t,r,o,a,i),M(t,r,a,i)}}}),vU=He({"src/traces/volume/convert.js"(Z,q){"use strict";var v=Kh().gl_mesh3d,_=rm().parseColorScale,S=sa().isArrayOrTypedArray,M=tm(),e=rc().extractOpts,t=E1(),r=aT().findNearestOnAxis,o=aT().generateIsoMeshes;function a(s,h,f){this.scene=s,this.uid=f,this.mesh=h,this.name="",this.data=null,this.showContour=!1}var i=a.prototype;i.handlePick=function(s){if(s.object===this.mesh){var h=s.data.index,f=this.data._meshX[h],m=this.data._meshY[h],c=this.data._meshZ[h],T=this.data._Ys.length,l=this.data._Zs.length,x=r(f,this.data._Xs).id,w=r(m,this.data._Ys).id,A=r(c,this.data._Zs).id,E=s.index=A+l*w+l*T*x;s.traceCoordinate=[this.data._meshX[E],this.data._meshY[E],this.data._meshZ[E],this.data._value[E]];var p=this.data.hovertext||this.data.text;return S(p)&&p[E]!==void 0?s.textLabel=p[E]:p&&(s.textLabel=p),!0}},i.update=function(s){var h=this.scene,f=h.fullSceneLayout;this.data=o(s);function m(w,A,E,p){return A.map(function(b){return w.d2l(b,0,p)*E})}var c=t(m(f.xaxis,s._meshX,h.dataScale[0],s.xcalendar),m(f.yaxis,s._meshY,h.dataScale[1],s.ycalendar),m(f.zaxis,s._meshZ,h.dataScale[2],s.zcalendar)),T=t(s._meshI,s._meshJ,s._meshK),l={positions:c,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},x=e(s);l.vertexIntensity=s._meshIntensity,l.vertexIntensityBounds=[x.min,x.max],l.colormap=_(s),this.mesh.update(l)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function n(s,h){var f=s.glplot.gl,m=v({gl:f}),c=new a(s,m,h.uid);return m._trace=c,c.update(h),s.glplot.add(m),c}q.exports=n}}),mU=He({"src/traces/volume/index.js"(Z,q){"use strict";q.exports={attributes:CE(),supplyDefaults:dU(),calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:vU(),moduleType:"trace",name:"volume",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),gU=He({"lib/volume.js"(Z,q){"use strict";q.exports=mU()}}),yU=He({"src/traces/mesh3d/defaults.js"(Z,q){"use strict";var v=so(),_=sa(),S=_h(),M=M1();q.exports=function(t,r,o,a){function i(m,c){return _.coerce(t,r,M,m,c)}function n(m){var c=m.map(function(T){var l=i(T);return l&&_.isArrayOrTypedArray(l)?l:null});return c.every(function(T){return T&&T.length===c[0].length})&&c}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 h=v.getComponentMethod("calendars","handleTraceDefaults");h(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(m){i(m)});var f=i("contour.show");f&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),S(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("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),_U=He({"src/traces/mesh3d/calc.js"(Z,q){"use strict";var v=Tp();q.exports=function(S,M){M.intensity&&v(S,M,{vals:M.intensity,containerStr:"",cLetter:"c"})}}}),xU=He({"src/traces/mesh3d/convert.js"(Z,q){"use strict";var v=Kh().gl_mesh3d,_=Kh().delaunay_triangulate,S=Kh().alpha_shape,M=Kh().convex_hull,e=rm().parseColorScale,t=sa().isArrayOrTypedArray,r=tm(),o=rc().extractOpts,a=E1();function i(l,x,w){this.scene=l,this.uid=w,this.mesh=x,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 x=l.index=l.data.index;l.data._cellCenter?l.traceCoordinate=l.data.dataCoordinate:l.traceCoordinate=[this.data.x[x],this.data.y[x],this.data.z[x]];var w=this.data.hovertext||this.data.text;return t(w)&&w[x]!==void 0?l.textLabel=w[x]:w&&(l.textLabel=w),!0}};function s(l){for(var x=[],w=l.length,A=0;A=x-.5)return!1;return!0}n.update=function(l){var x=this.scene,w=x.fullSceneLayout;this.data=l;var A=l.x.length,E=a(h(w.xaxis,l.x,x.dataScale[0],l.xcalendar),h(w.yaxis,l.y,x.dataScale[1],l.ycalendar),h(w.zaxis,l.z,x.dataScale[2],l.zcalendar)),p;if(l.i&&l.j&&l.k){if(l.i.length!==l.j.length||l.j.length!==l.k.length||!c(l.i,A)||!c(l.j,A)||!c(l.k,A))return;p=a(f(l.i),f(l.j),f(l.k))}else l.alphahull===0?p=M(E):l.alphahull>0?p=S(l.alphahull,E):p=m(l.delaunayaxis,E);var b={positions:E,cells:p,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 d=o(l);this.color="#fff";var u=l.intensitymode;b[u+"Intensity"]=l.intensity,b[u+"IntensityBounds"]=[d.min,d.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,x){var w=l.glplot.gl,A=v({gl:w}),E=new i(l,A,x.uid);return A._trace=E,E.update(x),l.glplot.add(A),E}q.exports=T}}),bU=He({"src/traces/mesh3d/index.js"(Z,q){"use strict";q.exports={attributes:M1(),supplyDefaults:yU(),calc:_U(),colorbar:{min:"cmin",max:"cmax"},plot:xU(),moduleType:"trace",name:"mesh3d",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),wU=He({"lib/mesh3d.js"(Z,q){"use strict";q.exports=bU()}}),LE=He({"src/traces/cone/attributes.js"(Z,q){"use strict";var v=ku(),_=rf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:M}=$l(),e=M1(),t=au(),r=rs().extendFlat,o={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:S({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:M({editType:"calc"}),uhoverformat:_("u",1),vhoverformat:_("v",1),whoverformat:_("w",1),xhoverformat:_("x"),yhoverformat:_("y"),zhoverformat:_("z"),showlegend:r({},t.showlegend,{dflt:!1})};r(o,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var a=["opacity","lightposition","lighting"];a.forEach(function(i){o[i]=e[i]}),o.hoverinfo=r({},t.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),q.exports=o}}),TU=He({"src/traces/cone/defaults.js"(Z,q){"use strict";var v=sa(),_=_h(),S=LE();q.exports=function(e,t,r,o){function a(T,l){return v.coerce(e,t,S,T,l)}var i=a("u"),n=a("v"),s=a("w"),h=a("x"),f=a("y"),m=a("z");if(!i||!i.length||!n||!n.length||!s||!s.length||!h||!h.length||!f||!f.length||!m||!m.length){t.visible=!1;return}var c=a("sizemode");a("sizeref",c==="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"),_(e,t,o,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),AU=He({"src/traces/cone/calc.js"(Z,q){"use strict";var v=Tp();q.exports=function(S,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;n2?c=f.slice(1,m-1):m===2?c=[(f[0]+f[1])/2]:c=f,c}function n(f){var m=f.length;return m===1?[.5,.5]:[f[1]-f[0],f[m-1]-f[m-2]]}function s(f,m){var c=f.fullSceneLayout,T=f.dataScale,l=m._len,x={};function w(de,Y){var X=c[Y],Q=T[r[Y]];return S.simpleMap(de,function(V){return X.d2l(V)*Q})}if(x.vectors=t(w(m._u,"xaxis"),w(m._v,"yaxis"),w(m._w,"zaxis"),l),!l)return{positions:[],cells:[]};var A=w(m._Xs,"xaxis"),E=w(m._Ys,"yaxis"),p=w(m._Zs,"zaxis");x.meshgrid=[A,E,p],x.gridFill=m._gridFill;var b=m._slen;if(b)x.startingPositions=t(w(m._startsX,"xaxis"),w(m._startsY,"yaxis"),w(m._startsZ,"zaxis"));else{for(var d=E[0],u=i(A),g=i(p),y=new Array(u.length*g.length),D=0,P=0;Pd&&(d=D[0]),D[1]u&&(u=D[1])}function y(D){switch(D.type){case"GeometryCollection":D.geometries.forEach(y);break;case"Point":g(D.coordinates);break;case"MultiPoint":D.coordinates.forEach(g);break}}w.arcs.forEach(function(D){for(var P=-1,z=D.length,F;++Pd&&(d=F[0]),F[1]u&&(u=F[1])});for(E in w.objects)y(w.objects[E]);return[p,b,d,u]}function e(w,A){for(var E,p=w.length,b=p-A;b<--p;)E=w[b],w[b++]=w[p],w[p]=E}function t(w,A){return typeof A=="string"&&(A=w.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(E){return r(w,E)})}:r(w,A)}function r(w,A){var E=A.id,p=A.bbox,b=A.properties==null?{}:A.properties,d=o(w,A);return E==null&&p==null?{type:"Feature",properties:b,geometry:d}:p==null?{type:"Feature",id:E,properties:b,geometry:d}:{type:"Feature",id:E,bbox:p,properties:b,geometry:d}}function o(w,A){var E=S(w.transform),p=w.arcs;function b(P,z){z.length&&z.pop();for(var F=p[P<0?~P:P],N=0,O=F.length;N1)p=s(w,A,E);else for(b=0,p=new Array(d=w.arcs.length);b1)for(var z=1,F=g(D[0]),N,O;zF&&(O=D[0],D[0]=D[z],D[z]=O,F=N);return D}).filter(function(y){return y.length>0})}}function c(w,A){for(var E=0,p=w.length;E>>1;w[b]=2))throw new Error("n must be \u22652");y=w.bbox||M(w);var E=y[0],p=y[1],b=y[2],d=y[3],u;A={scale:[b-E?(b-E)/(u-1):1,d-p?(d-p)/(u-1):1],translate:[E,p]}}else y=w.bbox;var g=l(A),y,D,P=w.objects,z={};function F(L){return g(L)}function N(L){var U;switch(L.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:L.geometries.map(N)};break;case"Point":U={type:"Point",coordinates:F(L.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:L.coordinates.map(F)};break;default:return L}return L.id!=null&&(U.id=L.id),L.bbox!=null&&(U.bbox=L.bbox),L.properties!=null&&(U.properties=L.properties),U}function O(L){var U=0,B=1,W=L.length,$,ue=new Array(W);for(ue[0]=g(L[0],0);++U0&&(M.push(e),e=[])}return e.length>0&&M.push(e),M},Z.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},Z.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var _=new Array(v.length),S=0;Se(N,z)),F)}function r(P,z,F={}){for(let O of P){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 L=0;Lr(N,z)),F)}function a(P,z,F={}){if(P.length<2)throw new Error("coordinates must be an array of two or more positions");return S({type:"LineString",coordinates:P},z,F)}function i(P,z,F={}){return n(P.map(N=>a(N,z)),F)}function n(P,z={}){let F={type:"FeatureCollection"};return z.id&&(F.id=z.id),z.bbox&&(F.bbox=z.bbox),F.features=P,F}function s(P,z,F={}){return S({type:"MultiLineString",coordinates:P},z,F)}function h(P,z,F={}){return S({type:"MultiPoint",coordinates:P},z,F)}function f(P,z,F={}){return S({type:"MultiPolygon",coordinates:P},z,F)}function m(P,z,F={}){return S({type:"GeometryCollection",geometries:P},z,F)}function c(P,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(P*F)/F}function T(P,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return P*F}function l(P,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return P/F}function x(P,z){return E(l(P,z))}function w(P){let z=P%360;return z<0&&(z+=360),z}function A(P){return P=P%360,P>180?P-360:P<-180?P+360:P}function E(P){return P%(2*Math.PI)*180/Math.PI}function p(P){return P%360*Math.PI/180}function b(P,z="kilometers",F="kilometers"){if(!(P>=0))throw new Error("length must be a positive number");return T(l(P,z),F)}function d(P,z="meters",F="kilometers"){if(!(P>=0))throw new Error("area must be a positive number");let N=_[z];if(!N)throw new Error("invalid original units");let O=_[F];if(!O)throw new Error("invalid final units");return P/N*O}function u(P){return!isNaN(P)&&P!==null&&!Array.isArray(P)}function g(P){return P!==null&&typeof P=="object"&&!Array.isArray(P)}function y(P){if(!P)throw new Error("bbox is required");if(!Array.isArray(P))throw new Error("bbox must be an Array");if(P.length!==4&&P.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");P.forEach(z=>{if(!u(z))throw new Error("bbox must only contain numbers")})}function D(P){if(!P)throw new Error("id is required");if(["string","number"].indexOf(typeof P)===-1)throw new Error("id must be a number or a string")}Z.areaFactors=_,Z.azimuthToBearing=A,Z.bearingToAzimuth=w,Z.convertArea=d,Z.convertLength=b,Z.degreesToRadians=p,Z.earthRadius=q,Z.factors=v,Z.feature=S,Z.featureCollection=n,Z.geometry=M,Z.geometryCollection=m,Z.isNumber=u,Z.isObject=g,Z.lengthToDegrees=x,Z.lengthToRadians=l,Z.lineString=a,Z.lineStrings=i,Z.multiLineString=s,Z.multiPoint=h,Z.multiPolygon=f,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=E,Z.radiansToLength=T,Z.round=c,Z.validateBBox=y,Z.validateId=D}}),sT=He({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT();function v(l,x,w){if(l!==null)for(var A,E,p,b,d,u,g,y=0,D=0,P,z=l.type,F=z==="FeatureCollection",N=z==="Feature",O=F?l.features.length:1,L=0;Lu||F>g||N>y){d=D,u=A,g=F,y=N,p=0;return}var O=q.lineString.call(void 0,[d,D],w.properties);if(x(O,A,E,N,p)===!1)return!1;p++,d=D})===!1)return!1}}})}function h(l,x,w){var A=w,E=!1;return s(l,function(p,b,d,u,g){E===!1&&w===void 0?A=p:A=x(A,p,b,d,u,g),E=!0}),A}function f(l,x){if(!l)throw new Error("geojson is required");i(l,function(w,A,E){if(w.geometry!==null){var p=w.geometry.type,b=w.geometry.coordinates;switch(p){case"LineString":if(x(w,A,E,0,0)===!1)return!1;break;case"Polygon":for(var d=0;di+S(n),0)}function S(a){let i=0,n;switch(a.type){case"Polygon":return M(a.coordinates);case"MultiPolygon":for(n=0;n0){i+=Math.abs(r(a[0]));for(let n=1;n=i?(s+2)%i:s+2],c=h[0]*t,T=f[1]*t,l=m[0]*t;n+=(l-c)*Math.sin(T),s++}return n*e}var o=_;Z.area=_,Z.default=o}}),FU=He({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT(),v=sT();function _(M,e={}){let t=0,r=0,o=0;return v.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 S=_;Z.centroid=_,Z.default=S}}),OU=He({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=sT();function v(S,M={}){if(S.bbox!=null&&M.recompute!==!0)return S.bbox;let e=[1/0,1/0,-1/0,-1/0];return q.coordEach.call(void 0,S,t=>{e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]0&&y[D+1][0]<0)return D;return null}function w(y){var D=y.geometry,P=D.coordinates,z=y.id,F=[],N,O,L,U;switch(z==="RUS"||z==="FJI"?N=function(B){var W;if(x(B)===null)W=B;else for(W=new Array(B.length),U=0;UW?$[ue++]=[B[U][0]+l,B[U][1]]:U===W?($[ue++]=B[U],$[ue++]=[B[U][0],-90]):$[ue++]=B[U];var ce=i.tester($);ce.pts.pop(),F.push(ce)}:N=function(B){F.push(i.tester(B))},D.type){case"MultiPolygon":for(O=0;O0?de.properties.ct=p(de):de.properties.ct=[NaN,NaN],ue.fIn=W,ue.fOut=de,F.push(de)}else r.log(["Location",ue.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete z[$]}switch(P.type){case"FeatureCollection":var U=P.features;for(N=0;NF&&(F=L,P=O)}else P=D;return M(P).geometry.coordinates}function b(y){var D=window.PlotlyGeoAssets||{},P=[];function z(U){return new Promise(function(B,W){v.json(U,function($,ue){if($){delete D[U];var ce=$.status===404?'GeoJSON at URL "'+U+'" does not exist.':"Unexpected error while fetching from "+U;return W(new Error(ce))}return D[U]=ue,B(ue)})})}function F(U){return new Promise(function(B,W){var $=0,ue=setInterval(function(){if(D[U]&&D[U]!=="pending")return clearInterval(ue),B(D[U]);if($>100)return clearInterval(ue),W("Unexpected error while fetching from "+U);$++},50)})}for(var N=0;NL-U);if(D.length<2)return null;let P=D.length,z=D[P-1]-D[0];if(z>=360)return null;let F=-1/0,N=-1;for(let L=0;LF&&(F=U,N=L)}let O=360-z;return F<=O?null:[D[N+1],D[N]+l]}function g([y,D]){return[y,y>0&&D<0?D+l:D]}q.exports={locationToFeature:T,feature2polygons:w,getTraceGeojson:A,extractTraceFeature:E,fetchTraceGeoData:b,computeBbox:d,doesCrossAntiMeridian:x,getFitboundsLonRange:u,unwrapLonRange:g,ANTIMERIDIAN_LON_SHIFT:l}}}),RE=He({"src/traces/scattergeo/style.js"(Z,q){"use strict";var v=Vn(),_=as(),S=$n(),M=Qp(),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 h=v.select(this),f=s.trace,m=f.line||{};h.call(S.stroke,m.color).call(_.dashLine,m.dash||"",m.width||0),f.fill!=="none"&&h.call(S.fill,f.fillcolor)})}}}),DE=He({"src/traces/scattergeo/plot.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=nT().getTopojsonFeatures,M=g0(),e=Ev(),t=Yd().findExtremes,r=Gs().BADNUM,o=Bd().calcMarkerSize,a=Fu(),i=RE();function n(h,f,m){var c=f.layers.frontplot.select(".scatterlayer"),T=_.makeTraceGroups(c,m,"trace scattergeo");function l(x,w){x.lonlat[0]===r&&v.select(w).remove()}T.selectAll("*").remove(),T.each(function(x){var w=v.select(this),A=x[0].trace;if(a.hasLines(A)||A.fill!=="none"){var E=M.calcTraceToLineCoords(x),p=A.fill!=="none"?M.makePolygon(E):M.makeLine(E);w.selectAll("path.js-line").data([{geojson:p,trace:A}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}a.hasMarkers(A)&&w.selectAll("path.point").data(_.identity).enter().append("path").classed("point",!0).each(function(b){l(b,this)}),a.hasText(A)&&w.selectAll("g").data(_.identity).enter().append("g").append("text").each(function(b){l(b,this)}),i(h,x)})}function s(h,f){var m=h[0].trace,c=f[m.geo],T=c._subplot,l=m._length,x,w;if(_.isArrayOrTypedArray(m.locations)){var A=m.locationmode,E=A==="geojson-id"?e.extractTraceFeature(h):S(m,T.topojson);for(x=0;x")}}}),UU=He({"src/traces/scattergeo/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){_.lon=S.lon,_.lat=S.lat,_.location=S.loc?S.loc:null;var r=e[t];return r.fIn&&r.fIn.properties&&(_.properties=r.fIn.properties),_}}}),jU=He({"src/traces/scattergeo/select.js"(Z,q){"use strict";var v=Fu(),_=Gs().BADNUM;q.exports=function(M,e){var t=M.cd,r=M.xaxis,o=M.yaxis,a=[],i=t[0].trace,n,s,h,f,m,c=!v.hasMarkers(i)&&!v.hasText(i);if(c)return[];if(e===!1)for(m=0;mV?1:Q>=V?0:NaN}function S(Q){return Q.length===1&&(Q=M(Q)),{left:function(V,le,ae,j){for(ae==null&&(ae=0),j==null&&(j=V.length);ae>>1;Q(V[ee],le)<0?ae=ee+1:j=ee}return ae},right:function(V,le,ae,j){for(ae==null&&(ae=0),j==null&&(j=V.length);ae>>1;Q(V[ee],le)>0?j=ee:ae=ee+1}return ae}}}function M(Q){return function(V,le){return _(Q(V),le)}}var e=S(_),t=e.right,r=e.left;function o(Q,V){V==null&&(V=a);for(var le=0,ae=Q.length-1,j=Q[0],ee=new Array(ae<0?0:ae);leQ?1:V>=Q?0:NaN}function s(Q){return Q===null?NaN:+Q}function h(Q,V){var le=Q.length,ae=0,j=-1,ee=0,te,pe,we=0;if(V==null)for(;++j1)return we/(ae-1)}function f(Q,V){var le=h(Q,V);return le&&Math.sqrt(le)}function m(Q,V){var le=Q.length,ae=-1,j,ee,te;if(V==null){for(;++ae=j)for(ee=te=j;++aej&&(ee=j),te=j)for(ee=te=j;++aej&&(ee=j),te0)return[Q];if((ae=V0)for(Q=Math.ceil(Q/pe),V=Math.floor(V/pe),te=new Array(ee=Math.ceil(V-Q+1));++j=0?(ee>=E?10:ee>=p?5:ee>=b?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(ee>=E?10:ee>=p?5:ee>=b?2:1)}function g(Q,V,le){var ae=Math.abs(V-Q)/Math.max(0,le),j=Math.pow(10,Math.floor(Math.log(ae)/Math.LN10)),ee=ae/j;return ee>=E?j*=10:ee>=p?j*=5:ee>=b&&(j*=2),VPe;)je.pop(),--at;var nt=new Array(at+1),tt;for(ee=0;ee<=at;++ee)tt=nt[ee]=[],tt.x0=ee>0?je[ee-1]:Re,tt.x1=ee=1)return+le(Q[ae-1],ae-1,Q);var ae,j=(ae-1)*V,ee=Math.floor(j),te=+le(Q[ee],ee,Q),pe=+le(Q[ee+1],ee+1,Q);return te+(pe-te)*(j-ee)}}function z(Q,V,le){return Q=l.call(Q,s).sort(_),Math.ceil((le-V)/(2*(P(Q,.75)-P(Q,.25))*Math.pow(Q.length,-1/3)))}function F(Q,V,le){return Math.ceil((le-V)/(3.5*f(Q)*Math.pow(Q.length,-1/3)))}function N(Q,V){var le=Q.length,ae=-1,j,ee;if(V==null){for(;++ae=j)for(ee=j;++aeee&&(ee=j)}else for(;++ae=j)for(ee=j;++aeee&&(ee=j);return ee}function O(Q,V){var le=Q.length,ae=le,j=-1,ee,te=0;if(V==null)for(;++j=0;)for(te=Q[V],le=te.length;--le>=0;)ee[--j]=te[le];return ee}function B(Q,V){var le=Q.length,ae=-1,j,ee;if(V==null){for(;++ae=j)for(ee=j;++aej&&(ee=j)}else for(;++ae=j)for(ee=j;++aej&&(ee=j);return ee}function W(Q,V){for(var le=V.length,ae=new Array(le);le--;)ae[le]=Q[V[le]];return ae}function $(Q,V){if(le=Q.length){var le,ae=0,j=0,ee,te=Q[j];for(V==null&&(V=_);++ae0?1:Qt<0?-1:0},d=Math.sqrt,u=Math.tan;function g(Qt){return Qt>1?0:Qt<-1?a:Math.acos(Qt)}function y(Qt){return Qt>1?i:Qt<-1?-i:Math.asin(Qt)}function D(Qt){return(Qt=p(Qt/2))*Qt}function P(){}function z(Qt,xr){Qt&&N.hasOwnProperty(Qt.type)&&N[Qt.type](Qt,xr)}var F={Feature:function(Qt,xr){z(Qt.geometry,xr)},FeatureCollection:function(Qt,xr){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r=0?1:-1,ka=$r*aa,li=l(xr),Ci=p(xr),Hi=Y*Ci,Qi=de*li+Hi*l(ka),pn=Hi*$r*p(ka);B.add(T(pn,Qi)),ce=Qt,de=li,Y=Ci}function j(Qt){return W.reset(),U(Qt,X),W*2}function ee(Qt){return[T(Qt[1],Qt[0]),y(Qt[2])]}function te(Qt){var xr=Qt[0],aa=Qt[1],$r=l(aa);return[$r*l(xr),$r*p(xr),p(aa)]}function pe(Qt,xr){return Qt[0]*xr[0]+Qt[1]*xr[1]+Qt[2]*xr[2]}function we(Qt,xr){return[Qt[1]*xr[2]-Qt[2]*xr[1],Qt[2]*xr[0]-Qt[0]*xr[2],Qt[0]*xr[1]-Qt[1]*xr[0]]}function Se(Qt,xr){Qt[0]+=xr[0],Qt[1]+=xr[1],Qt[2]+=xr[2]}function Re(Qt,xr){return[Qt[0]*xr,Qt[1]*xr,Qt[2]*xr]}function Pe(Qt){var xr=d(Qt[0]*Qt[0]+Qt[1]*Qt[1]+Qt[2]*Qt[2]);Qt[0]/=xr,Qt[1]/=xr,Qt[2]/=xr}var je,at,nt,tt,Ve,he,se,ne,Ce=S(),Ze,rt,Je={point:St,lineStart:Bt,lineEnd:Vt,polygonStart:function(){Je.point=Ar,Je.lineStart=vr,Je.lineEnd=qr,Ce.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Je.point=St,Je.lineStart=Bt,Je.lineEnd=Vt,B<0?(je=-(nt=180),at=-(tt=90)):Ce>r?tt=90:Ce<-r&&(at=-90),rt[0]=je,rt[1]=nt},sphere:function(){je=-(nt=180),at=-(tt=90)}};function St(Qt,xr){Ze.push(rt=[je=Qt,nt=Qt]),xrtt&&(tt=xr)}function kt(Qt,xr){var aa=te([Qt*f,xr*f]);if(ne){var $r=we(ne,aa),ka=[$r[1],-$r[0],0],li=we(ka,$r);Pe(li),li=ee(li);var Ci=Qt-Ve,Hi=Ci>0?1:-1,Qi=li[0]*h*Hi,pn,Pi=m(Ci)>180;Pi^(Hi*Vett&&(tt=pn)):(Qi=(Qi+360)%360-180,Pi^(Hi*Vett&&(tt=xr))),Pi?Qtkr(je,nt)&&(nt=Qt):kr(Qt,nt)>kr(je,nt)&&(je=Qt):nt>=je?(Qtnt&&(nt=Qt)):Qt>Ve?kr(je,Qt)>kr(je,nt)&&(nt=Qt):kr(Qt,nt)>kr(je,nt)&&(je=Qt)}else Ze.push(rt=[je=Qt,nt=Qt]);xrtt&&(tt=xr),ne=aa,Ve=Qt}function Bt(){Je.point=kt}function Vt(){rt[0]=je,rt[1]=nt,Je.point=St,ne=null}function Ar(Qt,xr){if(ne){var aa=Qt-Ve;Ce.add(m(aa)>180?aa+(aa>0?360:-360):aa)}else he=Qt,se=xr;X.point(Qt,xr),kt(Qt,xr)}function vr(){X.lineStart()}function qr(){Ar(he,se),X.lineEnd(),m(Ce)>r&&(je=-(nt=180)),rt[0]=je,rt[1]=nt,ne=null}function kr(Qt,xr){return(xr-=Qt)<0?xr+360:xr}function Ur(Qt,xr){return Qt[0]-xr[0]}function _t(Qt,xr){return Qt[0]<=Qt[1]?Qt[0]<=xr&&xr<=Qt[1]:xrkr($r[0],$r[1])&&($r[1]=ka[1]),kr(ka[0],$r[1])>kr($r[0],$r[1])&&($r[0]=ka[0])):li.push($r=ka);for(Ci=-1/0,aa=li.length-1,xr=0,$r=li[aa];xr<=aa;$r=ka,++xr)ka=li[xr],(Hi=kr($r[1],ka[0]))>Ci&&(Ci=Hi,je=ka[0],nt=$r[1])}return Ze=rt=null,je===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[je,at],[nt,tt]]}var Ye,Ae,Le,We,Ke,st,ot,Ut,Ct,Pt,jt,cr,or,nr,Pr,_a,Fa={sphere:P,point:Ra,lineStart:Wa,lineEnd:wi,polygonStart:function(){Fa.lineStart=Yt,Fa.lineEnd=Rt},polygonEnd:function(){Fa.lineStart=Wa,Fa.lineEnd=wi}};function Ra(Qt,xr){Qt*=f,xr*=f;var aa=l(xr);qa(aa*l(Qt),aa*p(Qt),p(xr))}function qa(Qt,xr,aa){++Ye,Le+=(Qt-Le)/Ye,We+=(xr-We)/Ye,Ke+=(aa-Ke)/Ye}function Wa(){Fa.point=Ca}function Ca(Qt,xr){Qt*=f,xr*=f;var aa=l(xr);nr=aa*l(Qt),Pr=aa*p(Qt),_a=p(xr),Fa.point=hi,qa(nr,Pr,_a)}function hi(Qt,xr){Qt*=f,xr*=f;var aa=l(xr),$r=aa*l(Qt),ka=aa*p(Qt),li=p(xr),Ci=T(d((Ci=Pr*li-_a*ka)*Ci+(Ci=_a*$r-nr*li)*Ci+(Ci=nr*ka-Pr*$r)*Ci),nr*$r+Pr*ka+_a*li);Ae+=Ci,st+=Ci*(nr+(nr=$r)),ot+=Ci*(Pr+(Pr=ka)),Ut+=Ci*(_a+(_a=li)),qa(nr,Pr,_a)}function wi(){Fa.point=Ra}function Yt(){Fa.point=Zt}function Rt(){Jt(cr,or),Fa.point=Ra}function Zt(Qt,xr){cr=Qt,or=xr,Qt*=f,xr*=f,Fa.point=Jt;var aa=l(xr);nr=aa*l(Qt),Pr=aa*p(Qt),_a=p(xr),qa(nr,Pr,_a)}function Jt(Qt,xr){Qt*=f,xr*=f;var aa=l(xr),$r=aa*l(Qt),ka=aa*p(Qt),li=p(xr),Ci=Pr*li-_a*ka,Hi=_a*$r-nr*li,Qi=nr*ka-Pr*$r,pn=d(Ci*Ci+Hi*Hi+Qi*Qi),Pi=y(pn),Di=pn&&-Pi/pn;Ct+=Di*Ci,Pt+=Di*Hi,jt+=Di*Qi,Ae+=Pi,st+=Pi*(nr+(nr=$r)),ot+=Pi*(Pr+(Pr=ka)),Ut+=Pi*(_a+(_a=li)),qa(nr,Pr,_a)}function Fr(Qt){Ye=Ae=Le=We=Ke=st=ot=Ut=Ct=Pt=jt=0,U(Qt,Fa);var xr=Ct,aa=Pt,$r=jt,ka=xr*xr+aa*aa+$r*$r;return kaa?Qt+Math.round(-Qt/s)*s:Qt,xr]}ca.invert=ca;function Ba(Qt,xr,aa){return(Qt%=s)?xr||aa?ra(Za(Qt),ri(xr,aa)):Za(Qt):xr||aa?ri(xr,aa):ca}function $a(Qt){return function(xr,aa){return xr+=Qt,[xr>a?xr-s:xr<-a?xr+s:xr,aa]}}function Za(Qt){var xr=$a(Qt);return xr.invert=$a(-Qt),xr}function ri(Qt,xr){var aa=l(Qt),$r=p(Qt),ka=l(xr),li=p(xr);function Ci(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=p(Hi)*pn,Ni=p(Qi),mi=Ni*aa+Pi*$r;return[T(Di*ka-mi*li,Pi*aa-Ni*$r),y(mi*ka+Di*li)]}return Ci.invert=function(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=p(Hi)*pn,Ni=p(Qi),mi=Ni*ka-Di*li;return[T(Di*ka+Ni*li,Pi*aa+mi*$r),y(mi*aa-Pi*$r)]},Ci}function pi(Qt){Qt=Ba(Qt[0]*f,Qt[1]*f,Qt.length>2?Qt[2]*f:0);function xr(aa){return aa=Qt(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa}return xr.invert=function(aa){return aa=Qt.invert(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa},xr}function Ia(Qt,xr,aa,$r,ka,li){if(aa){var Ci=l(xr),Hi=p(xr),Qi=$r*aa;ka==null?(ka=xr+$r*s,li=xr-Qi/2):(ka=rn(Ci,ka),li=rn(Ci,li),($r>0?kali)&&(ka+=$r*s));for(var pn,Pi=ka;$r>0?Pi>li:Pi1&&Qt.push(Qt.pop().concat(Qt.shift()))},result:function(){var aa=Qt;return Qt=[],xr=null,aa}}}function xt(Qt,xr){return m(Qt[0]-xr[0])=0;--Hi)ka.point((Di=Pi[Hi])[0],Di[1]);else $r(Ni.x,Ni.p.x,-1,ka);Ni=Ni.p}Ni=Ni.o,Pi=Ni.z,mi=!mi}while(!Ni.v);ka.lineEnd()}}}function Cr(Qt){if(xr=Qt.length){for(var xr,aa=0,$r=Qt[0],ka;++aa=0?1:-1,Ns=rl*ks,el=Ns>a,Ss=Qn*yo;if(wr.add(T(Ss*rl*p(Ns),io*Qo+Ss*l(Ns))),Ci+=el?ks+rl*s:ks,el^mi>=aa^Tn>=aa){var Fl=we(te(Ni),te(co));Pe(Fl);var yl=we(li,Fl);Pe(yl);var ll=(el^ks>=0?-1:1)*y(yl[2]);($r>ll||$r===ll&&(Fl[0]||Fl[1]))&&(Hi+=el^ks>=0?1:-1)}}return(Ci<-r||Ci0){for(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),Qo=0;Qo1&&un&2&&yo.push(yo.pop().concat(yo.shift())),Pi.push(yo.filter(gt))}}return Ni}}function gt(Qt){return Qt.length>1}function Kt(Qt,xr){return((Qt=Qt.x)[0]<0?Qt[1]-i-r:i-Qt[1])-((xr=xr.x)[0]<0?xr[1]-i-r:i-xr[1])}var mr=Hr(function(){return!0},Ir,Pa,[-a,-i]);function Ir(Qt){var xr=NaN,aa=NaN,$r=NaN,ka;return{lineStart:function(){Qt.lineStart(),ka=1},point:function(li,Ci){var Hi=li>0?a:-a,Qi=m(li-xr);m(Qi-a)0?i:-i),Qt.point($r,aa),Qt.lineEnd(),Qt.lineStart(),Qt.point(Hi,aa),Qt.point(li,aa),ka=0):$r!==Hi&&Qi>=a&&(m(xr-$r)r?c((p(xr)*(li=l($r))*p(aa)-p($r)*(ka=l(xr))*p(Qt))/(ka*li*Ci)):(xr+$r)/2}function Pa(Qt,xr,aa,$r){var ka;if(Qt==null)ka=aa*i,$r.point(-a,ka),$r.point(0,ka),$r.point(a,ka),$r.point(a,0),$r.point(a,-ka),$r.point(0,-ka),$r.point(-a,-ka),$r.point(-a,0),$r.point(-a,ka);else if(m(Qt[0]-xr[0])>r){var li=Qt[0]0,ka=m(xr)>r;function li(Pi,Di,Ni,mi){Ia(mi,Qt,aa,Ni,Pi,Di)}function Ci(Pi,Di){return l(Pi)*l(Di)>xr}function Hi(Pi){var Di,Ni,mi,Sn,Qn;return{lineStart:function(){Sn=mi=!1,Qn=1},point:function(io,eo){var co=[io,eo],Tn,un=Ci(io,eo),yo=$r?un?0:pn(io,eo):un?pn(io+(io<0?a:-a),eo):0;if(!Di&&(Sn=mi=un)&&Pi.lineStart(),un!==mi&&(Tn=Qi(Di,co),(!Tn||xt(Di,Tn)||xt(co,Tn))&&(co[2]=1)),un!==mi)Qn=0,un?(Pi.lineStart(),Tn=Qi(co,Di),Pi.point(Tn[0],Tn[1])):(Tn=Qi(Di,co),Pi.point(Tn[0],Tn[1],2),Pi.lineEnd()),Di=Tn;else if(ka&&Di&&$r^un){var Qo;!(yo&Ni)&&(Qo=Qi(co,Di,!0))&&(Qn=0,$r?(Pi.lineStart(),Pi.point(Qo[0][0],Qo[0][1]),Pi.point(Qo[1][0],Qo[1][1]),Pi.lineEnd()):(Pi.point(Qo[1][0],Qo[1][1]),Pi.lineEnd(),Pi.lineStart(),Pi.point(Qo[0][0],Qo[0][1],3)))}un&&(!Di||!xt(Di,co))&&Pi.point(co[0],co[1]),Di=co,mi=un,Ni=yo},lineEnd:function(){mi&&Pi.lineEnd(),Di=null},clean:function(){return Qn|(Sn&&mi)<<1}}}function Qi(Pi,Di,Ni){var mi=te(Pi),Sn=te(Di),Qn=[1,0,0],io=we(mi,Sn),eo=pe(io,io),co=io[0],Tn=eo-co*co;if(!Tn)return!Ni&Πvar un=xr*eo/Tn,yo=-xr*co/Tn,Qo=we(Qn,io),ks=Re(Qn,un),rl=Re(io,yo);Se(ks,rl);var Ns=Qo,el=pe(ks,Ns),Ss=pe(Ns,Ns),Fl=el*el-Ss*(pe(ks,ks)-1);if(!(Fl<0)){var yl=d(Fl),ll=Re(Ns,(-el-yl)/Ss);if(Se(ll,ks),ll=ee(ll),!Ni)return ll;var Un=Pi[0],Ro=Di[0],Js=Pi[1],Fs=Di[1],cu;Ro0^ll[1]<(m(ll[0]-Un)a^(Un<=ll[0]&&ll[0]<=Ro)){var bu=Re(Ns,(-el+yl)/Ss);return Se(bu,ks),[ll,ee(bu)]}}}function pn(Pi,Di){var Ni=$r?Qt:a-Qt,mi=0;return Pi<-Ni?mi|=1:Pi>Ni&&(mi|=2),Di<-Ni?mi|=4:Di>Ni&&(mi|=8),mi}return Hr(Ci,Hi,li,$r?[0,-Qt]:[-a,Qt-a])}function la(Qt,xr,aa,$r,ka,li){var Ci=Qt[0],Hi=Qt[1],Qi=xr[0],pn=xr[1],Pi=0,Di=1,Ni=Qi-Ci,mi=pn-Hi,Sn;if(Sn=aa-Ci,!(!Ni&&Sn>0)){if(Sn/=Ni,Ni<0){if(Sn0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}if(Sn=ka-Ci,!(!Ni&&Sn<0)){if(Sn/=Ni,Ni<0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}else if(Ni>0){if(Sn0)){if(Sn/=mi,mi<0){if(Sn0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}if(Sn=li-Hi,!(!mi&&Sn<0)){if(Sn/=mi,mi<0){if(Sn>Di)return;Sn>Pi&&(Pi=Sn)}else if(mi>0){if(Sn0&&(Qt[0]=Ci+Pi*Ni,Qt[1]=Hi+Pi*mi),Di<1&&(xr[0]=Ci+Di*Ni,xr[1]=Hi+Di*mi),!0}}}}}var ba=1e9,Ai=-ba;function ki(Qt,xr,aa,$r){function ka(pn,Pi){return Qt<=pn&&pn<=aa&&xr<=Pi&&Pi<=$r}function li(pn,Pi,Di,Ni){var mi=0,Sn=0;if(pn==null||(mi=Ci(pn,Di))!==(Sn=Ci(Pi,Di))||Qi(pn,Pi)<0^Di>0)do Ni.point(mi===0||mi===3?Qt:aa,mi>1?$r:xr);while((mi=(mi+Di+4)%4)!==Sn);else Ni.point(Pi[0],Pi[1])}function Ci(pn,Pi){return m(pn[0]-Qt)0?0:3:m(pn[0]-aa)0?2:1:m(pn[1]-xr)0?1:0:Pi>0?3:2}function Hi(pn,Pi){return Qi(pn.x,Pi.x)}function Qi(pn,Pi){var Di=Ci(pn,1),Ni=Ci(Pi,1);return Di!==Ni?Di-Ni:Di===0?Pi[1]-pn[1]:Di===1?pn[0]-Pi[0]:Di===2?pn[1]-Pi[1]:Pi[0]-pn[0]}return function(pn){var Pi=pn,Di=cn(),Ni,mi,Sn,Qn,io,eo,co,Tn,un,yo,Qo,ks={point:rl,lineStart:Fl,lineEnd:yl,polygonStart:el,polygonEnd:Ss};function rl(Un,Ro){ka(Un,Ro)&&Pi.point(Un,Ro)}function Ns(){for(var Un=0,Ro=0,Js=mi.length;Ro$r&&(Rc-Ic)*($r-bu)>(Au-bu)*(Qt-Ic)&&++Un:Au<=$r&&(Rc-Ic)*($r-bu)<(Au-bu)*(Qt-Ic)&&--Un;return Un}function el(){Pi=Di,Ni=[],mi=[],Qo=!0}function Ss(){var Un=Ns(),Ro=Qo&&Un,Js=(Ni=_.merge(Ni)).length;(Ro||Js)&&(pn.polygonStart(),Ro&&(pn.lineStart(),li(null,null,1,pn),pn.lineEnd()),Js&&Or(Ni,Hi,Un,li,pn),pn.polygonEnd()),Pi=pn,Ni=mi=Sn=null}function Fl(){ks.point=ll,mi&&mi.push(Sn=[]),yo=!0,un=!1,co=Tn=NaN}function yl(){Ni&&(ll(Qn,io),eo&&un&&Di.rejoin(),Ni.push(Di.result())),ks.point=rl,un&&Pi.lineEnd()}function ll(Un,Ro){var Js=ka(Un,Ro);if(mi&&Sn.push([Un,Ro]),yo)Qn=Un,io=Ro,eo=Js,yo=!1,Js&&(Pi.lineStart(),Pi.point(Un,Ro));else if(Js&&un)Pi.point(Un,Ro);else{var Fs=[co=Math.max(Ai,Math.min(ba,co)),Tn=Math.max(Ai,Math.min(ba,Tn))],cu=[Un=Math.max(Ai,Math.min(ba,Un)),Ro=Math.max(Ai,Math.min(ba,Ro))];la(Fs,cu,Qt,xr,aa,$r)?(un||(Pi.lineStart(),Pi.point(Fs[0],Fs[1])),Pi.point(cu[0],cu[1]),Js||Pi.lineEnd(),Qo=!1):Js&&(Pi.lineStart(),Pi.point(Un,Ro),Qo=!1)}co=Un,Tn=Ro,un=Js}return ks}}function Ki(){var Qt=0,xr=0,aa=960,$r=500,ka,li,Ci;return Ci={stream:function(Hi){return ka&&li===Hi?ka:ka=ki(Qt,xr,aa,$r)(li=Hi)},extent:function(Hi){return arguments.length?(Qt=+Hi[0][0],xr=+Hi[0][1],aa=+Hi[1][0],$r=+Hi[1][1],ka=li=null,Ci):[[Qt,xr],[aa,$r]]}}}var Mn=S(),wn,On,En,ao={sphere:P,point:P,lineStart:Co,lineEnd:P,polygonStart:P,polygonEnd:P};function Co(){ao.point=zs,ao.lineEnd=bo}function bo(){ao.point=ao.lineEnd=P}function zs(Qt,xr){Qt*=f,xr*=f,wn=Qt,On=p(xr),En=l(xr),ao.point=kn}function kn(Qt,xr){Qt*=f,xr*=f;var aa=p(xr),$r=l(xr),ka=m(Qt-wn),li=l(ka),Ci=p(ka),Hi=$r*Ci,Qi=En*aa-On*$r*li,pn=On*aa+En*$r*li;Mn.add(T(d(Hi*Hi+Qi*Qi),pn)),wn=Qt,On=aa,En=$r}function wo(Qt){return Mn.reset(),U(Qt,ao),+Mn}var Zn=[null,null],go={type:"LineString",coordinates:Zn};function os(Qt,xr){return Zn[0]=Qt,Zn[1]=xr,wo(go)}var ys={Feature:function(Qt,xr){return Yn(Qt.geometry,xr)},FeatureCollection:function(Qt,xr){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r0&&(ka=os(Qt[li],Qt[li-1]),ka>0&&aa<=ka&&$r<=ka&&(aa+$r-ka)*(1-Math.pow((aa-$r)/ka,2))r}).map(Ni)).concat(_.range(x(li/pn)*pn,ka,pn).filter(function(Tn){return m(Tn%Di)>r}).map(mi))}return eo.lines=function(){return co().map(function(Tn){return{type:"LineString",coordinates:Tn}})},eo.outline=function(){return{type:"Polygon",coordinates:[Sn($r).concat(Qn(Ci).slice(1),Sn(aa).reverse().slice(1),Qn(Hi).reverse().slice(1))]}},eo.extent=function(Tn){return arguments.length?eo.extentMajor(Tn).extentMinor(Tn):eo.extentMinor()},eo.extentMajor=function(Tn){return arguments.length?($r=+Tn[0][0],aa=+Tn[1][0],Hi=+Tn[0][1],Ci=+Tn[1][1],$r>aa&&(Tn=$r,$r=aa,aa=Tn),Hi>Ci&&(Tn=Hi,Hi=Ci,Ci=Tn),eo.precision(io)):[[$r,Hi],[aa,Ci]]},eo.extentMinor=function(Tn){return arguments.length?(xr=+Tn[0][0],Qt=+Tn[1][0],li=+Tn[0][1],ka=+Tn[1][1],xr>Qt&&(Tn=xr,xr=Qt,Qt=Tn),li>ka&&(Tn=li,li=ka,ka=Tn),eo.precision(io)):[[xr,li],[Qt,ka]]},eo.step=function(Tn){return arguments.length?eo.stepMajor(Tn).stepMinor(Tn):eo.stepMinor()},eo.stepMajor=function(Tn){return arguments.length?(Pi=+Tn[0],Di=+Tn[1],eo):[Pi,Di]},eo.stepMinor=function(Tn){return arguments.length?(Qi=+Tn[0],pn=+Tn[1],eo):[Qi,pn]},eo.precision=function(Tn){return arguments.length?(io=+Tn,Ni=Gi(li,ka,90),mi=Pn(xr,Qt,io),Sn=Gi(Hi,Ci,90),Qn=Pn($r,aa,io),eo):io},eo.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function bs(){return qs()()}function lo(Qt,xr){var aa=Qt[0]*f,$r=Qt[1]*f,ka=xr[0]*f,li=xr[1]*f,Ci=l($r),Hi=p($r),Qi=l(li),pn=p(li),Pi=Ci*l(aa),Di=Ci*p(aa),Ni=Qi*l(ka),mi=Qi*p(ka),Sn=2*y(d(D(li-$r)+Ci*Qi*D(ka-aa))),Qn=p(Sn),io=Sn?function(eo){var co=p(eo*=Sn)/Qn,Tn=p(Sn-eo)/Qn,un=Tn*Pi+co*Ni,yo=Tn*Di+co*mi,Qo=Tn*Hi+co*pn;return[T(yo,un)*h,T(Qo,d(un*un+yo*yo))*h]}:function(){return[aa*h,$r*h]};return io.distance=Sn,io}function Zo(Qt){return Qt}var ws=S(),Hs=S(),il,yn,Po,To,Ws={point:P,lineStart:P,lineEnd:P,polygonStart:function(){Ws.lineStart=Ll,Ws.lineEnd=Ks},polygonEnd:function(){Ws.lineStart=Ws.lineEnd=Ws.point=P,ws.add(m(Hs)),Hs.reset()},result:function(){var Qt=ws/2;return ws.reset(),Qt}};function Ll(){Ws.point=uo}function uo(Qt,xr){Ws.point=Nl,il=Po=Qt,yn=To=xr}function Nl(Qt,xr){Hs.add(To*Qt-Po*xr),Po=Qt,To=xr}function Ks(){Nl(il,yn)}var Ts=1/0,Ls=Ts,Jo=-Ts,Es=Jo,Ul={point:lu,lineStart:P,lineEnd:P,polygonStart:P,polygonEnd:P,result:function(){var Qt=[[Ts,Ls],[Jo,Es]];return Jo=Es=-(Ls=Ts=1/0),Qt}};function lu(Qt,xr){QtJo&&(Jo=Qt),xrEs&&(Es=xr)}var Tc=0,du=0,Sf=0,Uc=0,Bs=0,dc=0,Wc=0,uu=0,Pl=0,ic,Ou,nl,vl,As={point:Xs,lineStart:nc,lineEnd:fl,polygonStart:function(){As.lineStart=xh,As.lineEnd=us},polygonEnd:function(){As.point=Xs,As.lineStart=nc,As.lineEnd=fl},result:function(){var Qt=Pl?[Wc/Pl,uu/Pl]:dc?[Uc/dc,Bs/dc]:Sf?[Tc/Sf,du/Sf]:[NaN,NaN];return Tc=du=Sf=Uc=Bs=dc=Wc=uu=Pl=0,Qt}};function Xs(Qt,xr){Tc+=Qt,du+=xr,++Sf}function nc(){As.point=jl}function jl(Qt,xr){As.point=qu,Xs(nl=Qt,vl=xr)}function qu(Qt,xr){var aa=Qt-nl,$r=xr-vl,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(vl+xr)/2,dc+=ka,Xs(nl=Qt,vl=xr)}function fl(){As.point=Xs}function xh(){As.point=bh}function us(){Ps(ic,Ou)}function bh(Qt,xr){As.point=Ps,Xs(ic=nl=Qt,Ou=vl=xr)}function Ps(Qt,xr){var aa=Qt-nl,$r=xr-vl,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(vl+xr)/2,dc+=ka,ka=vl*Qt-nl*xr,Wc+=ka*(nl+Qt),uu+=ka*(vl+xr),Pl+=ka*3,Xs(nl=Qt,vl=xr)}function to(Qt){this._context=Qt}to.prototype={_radius:4.5,pointRadius:function(Qt){return this._radius=Qt,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(Qt,xr){switch(this._point){case 0:{this._context.moveTo(Qt,xr),this._point=1;break}case 1:{this._context.lineTo(Qt,xr);break}default:{this._context.moveTo(Qt+this._radius,xr),this._context.arc(Qt,xr,this._radius,0,s);break}}},result:P};var Xc=S(),Vu,ql,Mf,Ac,nf,Ql={point:P,lineStart:function(){Ql.point=Jf},lineEnd:function(){Vu&&Of(ql,Mf),Ql.point=P},polygonStart:function(){Vu=!0},polygonEnd:function(){Vu=null},result:function(){var Qt=+Xc;return Xc.reset(),Qt}};function Jf(Qt,xr){Ql.point=Of,ql=Ac=Qt,Mf=nf=xr}function Of(Qt,xr){Ac-=Qt,nf-=xr,Xc.add(d(Ac*Ac+nf*nf)),Ac=Qt,nf=xr}function of(){this._string=[]}of.prototype={_radius:4.5,_circle:jc(4.5),pointRadius:function(Qt){return(Qt=+Qt)!==this._radius&&(this._radius=Qt,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(Qt,xr){switch(this._point){case 0:{this._string.push("M",Qt,",",xr),this._point=1;break}case 1:{this._string.push("L",Qt,",",xr);break}default:{this._circle==null&&(this._circle=jc(this._radius)),this._string.push("M",Qt,",",xr,this._circle);break}}},result:function(){if(this._string.length){var Qt=this._string.join("");return this._string=[],Qt}else return null}};function jc(Qt){return"m0,"+Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+-2*Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+2*Qt+"z"}function Bf(Qt,xr){var aa=4.5,$r,ka;function li(Ci){return Ci&&(typeof aa=="function"&&ka.pointRadius(+aa.apply(this,arguments)),U(Ci,$r(ka))),ka.result()}return li.area=function(Ci){return U(Ci,$r(Ws)),Ws.result()},li.measure=function(Ci){return U(Ci,$r(Ql)),Ql.result()},li.bounds=function(Ci){return U(Ci,$r(Ul)),Ul.result()},li.centroid=function(Ci){return U(Ci,$r(As)),As.result()},li.projection=function(Ci){return arguments.length?($r=Ci==null?(Qt=null,Zo):(Qt=Ci).stream,li):Qt},li.context=function(Ci){return arguments.length?(ka=Ci==null?(xr=null,new of):new to(xr=Ci),typeof aa!="function"&&ka.pointRadius(aa),li):xr},li.pointRadius=function(Ci){return arguments.length?(aa=typeof Ci=="function"?Ci:(ka.pointRadius(+Ci),+Ci),li):aa},li.projection(Qt).context(xr)}function Nf(Qt){return{stream:Gu(Qt)}}function Gu(Qt){return function(xr){var aa=new Ef;for(var $r in Qt)aa[$r]=Qt[$r];return aa.stream=xr,aa}}function Ef(){}Ef.prototype={constructor:Ef,point:function(Qt,xr){this.stream.point(Qt,xr)},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(Qt,xr,aa){var $r=Qt.clipExtent&&Qt.clipExtent();return Qt.scale(150).translate([0,0]),$r!=null&&Qt.clipExtent(null),U(aa,Qt.stream(Ul)),xr(Ul.result()),$r!=null&&Qt.clipExtent($r),Qt}function Zc(Qt,xr,aa){return oc(Qt,function($r){var ka=xr[1][0]-xr[0][0],li=xr[1][1]-xr[0][1],Ci=Math.min(ka/($r[1][0]-$r[0][0]),li/($r[1][1]-$r[0][1])),Hi=+xr[0][0]+(ka-Ci*($r[1][0]+$r[0][0]))/2,Qi=+xr[0][1]+(li-Ci*($r[1][1]+$r[0][1]))/2;Qt.scale(150*Ci).translate([Hi,Qi])},aa)}function eu(Qt,xr,aa){return Zc(Qt,[[0,0],xr],aa)}function qc(Qt,xr,aa){return oc(Qt,function($r){var ka=+xr,li=ka/($r[1][0]-$r[0][0]),Ci=(ka-li*($r[1][0]+$r[0][0]))/2,Hi=-li*$r[0][1];Qt.scale(150*li).translate([Ci,Hi])},aa)}function Sc(Qt,xr,aa){return oc(Qt,function($r){var ka=+xr,li=ka/($r[1][1]-$r[0][1]),Ci=-li*$r[0][0],Hi=(ka-li*($r[1][1]+$r[0][1]))/2;Qt.scale(150*li).translate([Ci,Hi])},aa)}var Zs=16,kf=l(30*f);function fh(Qt,xr){return+xr?Yc(Qt,xr):Uf(Qt)}function Uf(Qt){return Gu({point:function(xr,aa){xr=Qt(xr,aa),this.stream.point(xr[0],xr[1])}})}function Yc(Qt,xr){function aa($r,ka,li,Ci,Hi,Qi,pn,Pi,Di,Ni,mi,Sn,Qn,io){var eo=pn-$r,co=Pi-ka,Tn=eo*eo+co*co;if(Tn>4*xr&&Qn--){var un=Ci+Ni,yo=Hi+mi,Qo=Qi+Sn,ks=d(un*un+yo*yo+Qo*Qo),rl=y(Qo/=ks),Ns=m(m(Qo)-1)xr||m((eo*yl+co*ll)/Tn-.5)>.3||Ci*Ni+Hi*mi+Qi*Sn2?Un[2]%360*f:0,yl()):[Hi*h,Qi*h,pn*h]},Ss.angle=function(Un){return arguments.length?(Di=Un%360*f,yl()):Di*h},Ss.reflectX=function(Un){return arguments.length?(Ni=Un?-1:1,yl()):Ni<0},Ss.reflectY=function(Un){return arguments.length?(mi=Un?-1:1,yl()):mi<0},Ss.precision=function(Un){return arguments.length?(Qo=fh(ks,yo=Un*Un),ll()):d(yo)},Ss.fitExtent=function(Un,Ro){return Zc(Ss,Un,Ro)},Ss.fitSize=function(Un,Ro){return eu(Ss,Un,Ro)},Ss.fitWidth=function(Un,Ro){return qc(Ss,Un,Ro)},Ss.fitHeight=function(Un,Ro){return Sc(Ss,Un,Ro)};function yl(){var Un=ml(aa,0,0,Ni,mi,Di).apply(null,xr(li,Ci)),Ro=(Di?ml:jf)(aa,$r-Un[0],ka-Un[1],Ni,mi,Di);return Pi=Ba(Hi,Qi,pn),ks=ra(xr,Ro),rl=ra(Pi,ks),Qo=fh(ks,yo),ll()}function ll(){return Ns=el=null,Ss}return function(){return xr=Qt.apply(this,arguments),Ss.invert=xr.invert&&Fl,yl()}}function ol(Qt){var xr=0,aa=a/3,$r=Mc(Qt),ka=$r(xr,aa);return ka.parallels=function(li){return arguments.length?$r(xr=li[0]*f,aa=li[1]*f):[xr*h,aa*h]},ka}function vc(Qt){var xr=l(Qt);function aa($r,ka){return[$r*xr,p(ka)/xr]}return aa.invert=function($r,ka){return[$r/xr,y(ka*xr)]},aa}function yu(Qt,xr){var aa=p(Qt),$r=(aa+p(xr))/2;if(m($r)=.12&&io<.234&&Qn>=-.425&&Qn<-.214?ka:io>=.166&&io<.234&&Qn>=-.214&&Qn<-.115?Ci:aa).invert(Ni)},Pi.stream=function(Ni){return Qt&&xr===Ni?Qt:Qt=qf([aa.stream(xr=Ni),ka.stream(Ni),Ci.stream(Ni)])},Pi.precision=function(Ni){return arguments.length?(aa.precision(Ni),ka.precision(Ni),Ci.precision(Ni),Di()):aa.precision()},Pi.scale=function(Ni){return arguments.length?(aa.scale(Ni),ka.scale(Ni*.35),Ci.scale(Ni),Pi.translate(aa.translate())):aa.scale()},Pi.translate=function(Ni){if(!arguments.length)return aa.translate();var mi=aa.scale(),Sn=+Ni[0],Qn=+Ni[1];return $r=aa.translate(Ni).clipExtent([[Sn-.455*mi,Qn-.238*mi],[Sn+.455*mi,Qn+.238*mi]]).stream(pn),li=ka.translate([Sn-.307*mi,Qn+.201*mi]).clipExtent([[Sn-.425*mi+r,Qn+.12*mi+r],[Sn-.214*mi-r,Qn+.234*mi-r]]).stream(pn),Hi=Ci.translate([Sn-.205*mi,Qn+.212*mi]).clipExtent([[Sn-.214*mi+r,Qn+.166*mi+r],[Sn-.115*mi-r,Qn+.234*mi-r]]).stream(pn),Di()},Pi.fitExtent=function(Ni,mi){return Zc(Pi,Ni,mi)},Pi.fitSize=function(Ni,mi){return eu(Pi,Ni,mi)},Pi.fitWidth=function(Ni,mi){return qc(Pi,Ni,mi)},Pi.fitHeight=function(Ni,mi){return Sc(Pi,Ni,mi)};function Di(){return Qt=xr=null,Pi}return Pi.scale(1070)}function Bu(Qt){return function(xr,aa){var $r=l(xr),ka=l(aa),li=Qt($r*ka);return[li*ka*p(xr),li*p(aa)]}}function Ec(Qt){return function(xr,aa){var $r=d(xr*xr+aa*aa),ka=Qt($r),li=p(ka),Ci=l(ka);return[T(xr*li,$r*Ci),y($r&&aa*li/$r)]}}var mc=Bu(function(Qt){return d(2/(1+Qt))});mc.invert=Ec(function(Qt){return 2*y(Qt/2)});function Lh(){return Lu(mc).scale(124.75).clipAngle(180-.001)}var sf=Bu(function(Qt){return(Qt=g(Qt))&&Qt/p(Qt)});sf.invert=Ec(function(Qt){return Qt});function vf(){return Lu(sf).scale(79.4188).clipAngle(180-.001)}function Nu(Qt,xr){return[Qt,A(u((i+xr)/2))]}Nu.invert=function(Qt,xr){return[Qt,2*c(w(xr))-i]};function lf(){return iu(Nu).scale(961/s)}function iu(Qt){var xr=Lu(Qt),aa=xr.center,$r=xr.scale,ka=xr.translate,li=xr.clipExtent,Ci=null,Hi,Qi,pn;xr.scale=function(Di){return arguments.length?($r(Di),Pi()):$r()},xr.translate=function(Di){return arguments.length?(ka(Di),Pi()):ka()},xr.center=function(Di){return arguments.length?(aa(Di),Pi()):aa()},xr.clipExtent=function(Di){return arguments.length?(Di==null?Ci=Hi=Qi=pn=null:(Ci=+Di[0][0],Hi=+Di[0][1],Qi=+Di[1][0],pn=+Di[1][1]),Pi()):Ci==null?null:[[Ci,Hi],[Qi,pn]]};function Pi(){var Di=a*$r(),Ni=xr(pi(xr.rotate()).invert([0,0]));return li(Ci==null?[[Ni[0]-Di,Ni[1]-Di],[Ni[0]+Di,Ni[1]+Di]]:Qt===Nu?[[Math.max(Ni[0]-Di,Ci),Hi],[Math.min(Ni[0]+Di,Qi),pn]]:[[Ci,Math.max(Ni[1]-Di,Hi)],[Qi,Math.min(Ni[1]+Di,pn)]])}return Pi()}function Kc(Qt){return u((i+Qt)/2)}function hh(Qt,xr){var aa=l(Qt),$r=Qt===xr?p(Qt):A(aa/l(xr))/A(Kc(xr)/Kc(Qt)),ka=aa*E(Kc(Qt),$r)/$r;if(!$r)return Nu;function li(Ci,Hi){ka>0?Hi<-i+r&&(Hi=-i+r):Hi>i-r&&(Hi=i-r);var Qi=ka/E(Kc(Hi),$r);return[Qi*p($r*Ci),ka-Qi*l($r*Ci)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,pn=b($r)*d(Ci*Ci+Qi*Qi),Pi=T(Ci,m(Qi))*b(Qi);return Qi*$r<0&&(Pi-=a*b(Ci)*b(Qi)),[Pi/$r,2*c(E(ka/pn,1/$r))-i]},li}function mf(){return ol(hh).scale(109.5).parallels([30,30])}function sl(Qt,xr){return[Qt,xr]}sl.invert=sl;function _u(){return Lu(sl).scale(152.63)}function Pu(Qt,xr){var aa=l(Qt),$r=Qt===xr?p(Qt):(aa-l(xr))/(xr-Qt),ka=aa/$r+Qt;if(m($r)r&&--$r>0);return[Qt/(.8707+(li=aa*aa)*(-.131979+li*(-.013791+li*li*li*(.003971-.001529*li)))),aa]};function gc(){return Lu(Cc).scale(175.295)}function Vl(Qt,xr){return[l(xr)*p(Qt),p(xr)]}Vl.invert=Ec(y);function xu(){return Lu(Vl).scale(249.5).clipAngle(90+r)}function Lc(Qt,xr){var aa=l(xr),$r=1+l(Qt)*aa;return[aa*p(Qt)/$r,p(xr)/$r]}Lc.invert=Ec(function(Qt){return 2*c(Qt)});function $c(){return Lu(Lc).scale(250).clipAngle(142)}function sc(Qt,xr){return[A(u((i+xr)/2)),-Qt]}sc.invert=function(Qt,xr){return[-xr,2*c(w(Qt))-i]};function Pc(){var Qt=iu(sc),xr=Qt.center,aa=Qt.rotate;return Qt.center=function($r){return arguments.length?xr([-$r[1],$r[0]]):($r=xr(),[$r[1],-$r[0]])},Qt.rotate=function($r){return arguments.length?aa([$r[0],$r[1],$r.length>2?$r[2]+90:90]):($r=aa(),[$r[0],$r[1],$r[2]-90])},aa([0,0,90]).scale(159.155)}v.geoAlbers=Ml,v.geoAlbersUsa=Qf,v.geoArea=j,v.geoAzimuthalEqualArea=Lh,v.geoAzimuthalEqualAreaRaw=mc,v.geoAzimuthalEquidistant=vf,v.geoAzimuthalEquidistantRaw=sf,v.geoBounds=Fe,v.geoCentroid=Fr,v.geoCircle=tn,v.geoClipAntimeridian=mr,v.geoClipCircle=ga,v.geoClipExtent=Ki,v.geoClipRectangle=ki,v.geoConicConformal=mf,v.geoConicConformalRaw=hh,v.geoConicEqualArea=Tu,v.geoConicEqualAreaRaw=yu,v.geoConicEquidistant=Cf,v.geoConicEquidistantRaw=Pu,v.geoContains=Ko,v.geoDistance=os,v.geoEqualEarth=Lf,v.geoEqualEarthRaw=Jc,v.geoEquirectangular=_u,v.geoEquirectangularRaw=sl,v.geoGnomonic=Vf,v.geoGnomonicRaw=nu,v.geoGraticule=qs,v.geoGraticule10=bs,v.geoIdentity=Xu,v.geoInterpolate=lo,v.geoLength=wo,v.geoMercator=lf,v.geoMercatorRaw=Nu,v.geoNaturalEarth1=gc,v.geoNaturalEarth1Raw=Cc,v.geoOrthographic=xu,v.geoOrthographicRaw=Vl,v.geoPath=Bf,v.geoProjection=Lu,v.geoProjectionMutator=Mc,v.geoRotation=pi,v.geoStereographic=$c,v.geoStereographicRaw=Lc,v.geoStream=U,v.geoTransform=Nf,v.geoTransverseMercator=Pc,v.geoTransverseMercatorRaw=sc,Object.defineProperty(v,"__esModule",{value:!0})})}}),qU=He({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,zE(),_x()):_(v.d3=v.d3||{},v.d3,v.d3)})(Z,function(v,_,S){"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,h=Math.pow,f=Math.round,m=Math.sign||function(qe){return qe>0?1:qe<0?-1:0},c=Math.sin,T=Math.tan,l=1e-6,x=1e-12,w=Math.PI,A=w/2,E=w/4,p=Math.SQRT1_2,b=F(2),d=F(w),u=w*2,g=180/w,y=w/180;function D(qe){return qe?qe/Math.sin(qe):1}function P(qe){return qe>1?A:qe<-1?-A:Math.asin(qe)}function z(qe){return qe>1?0:qe<-1?w:Math.acos(qe)}function F(qe){return qe>0?Math.sqrt(qe):0}function N(qe){return qe=o(2*qe),(qe-1)/(qe+1)}function O(qe){return(o(qe)-o(-qe))/2}function L(qe){return(o(qe)+o(-qe))/2}function U(qe){return i(qe+F(qe*qe+1))}function B(qe){return i(qe+F(qe*qe-1))}function W(qe){var $e=T(qe/2),lt=2*i(r(qe/2))/($e*$e);function pt(Et,bt){var Dt=r(Et),ur=r(bt),yr=c(bt),Er=ur*Dt,jr=-((1-Er?i((1+Er)/2)/(1-Er):-.5)+lt/(1+Er));return[jr*ur*c(Et),jr*yr]}return pt.invert=function(Et,bt){var Dt=F(Et*Et+bt*bt),ur=-qe/2,yr=50,Er;if(!Dt)return[0,0];do{var jr=ur/2,Qr=r(jr),ha=c(jr),Aa=ha/Qr,Da=-i(M(Qr));ur-=Er=(2/Aa*Da-lt*Aa-Dt)/(-Da/(ha*ha)+1-lt/(2*Qr*Qr))*(Qr<0?.7:1)}while(M(Er)>l&&--yr>0);var ci=c(ur);return[t(Et*ci,Dt*r(ur)),P(bt*ci/Dt)]},pt}function $(){var qe=A,$e=_.geoProjectionMutator(W),lt=$e(qe);return lt.radius=function(pt){return arguments.length?$e(qe=pt*y):qe*g},lt.scale(179.976).clipAngle(147)}function ue(qe,$e){var lt=r($e),pt=D(z(lt*r(qe/=2)));return[2*lt*c(qe)*pt,c($e)*pt]}ue.invert=function(qe,$e){if(!(qe*qe+4*$e*$e>w*w+l)){var lt=qe,pt=$e,Et=25;do{var bt=c(lt),Dt=c(lt/2),ur=r(lt/2),yr=c(pt),Er=r(pt),jr=c(2*pt),Qr=yr*yr,ha=Er*Er,Aa=Dt*Dt,Da=1-ha*ur*ur,ci=Da?z(Er*ur)*F(Vi=1/Da):Vi=0,Vi,ji=2*ci*Er*Dt-qe,on=ci*yr-$e,An=Vi*(ha*Aa+ci*Er*ur*Qr),Kn=Vi*(.5*bt*jr-ci*2*yr*Dt),Bn=Vi*.25*(jr*Dt-ci*yr*ha*bt),Ao=Vi*(Qr*ur+ci*Aa*Er),ls=Kn*Bn-Ao*An;if(!ls)break;var Mo=(on*Kn-ji*Ao)/ls,Yo=(ji*Bn-on*An)/ls;lt-=Mo,pt-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Et>0);return[lt,pt]}};function ce(){return _.geoProjection(ue).scale(152.63)}function de(qe){var $e=c(qe),lt=r(qe),pt=qe>=0?1:-1,Et=T(pt*qe),bt=(1+$e-lt)/2;function Dt(ur,yr){var Er=r(yr),jr=r(ur/=2);return[(1+Er)*c(ur),(pt*yr>-t(jr,Et)-.001?0:-pt*10)+bt+c(yr)*lt-(1+Er)*$e*jr]}return Dt.invert=function(ur,yr){var Er=0,jr=0,Qr=50;do{var ha=r(Er),Aa=c(Er),Da=r(jr),ci=c(jr),Vi=1+Da,ji=Vi*Aa-ur,on=bt+ci*lt-Vi*$e*ha-yr,An=Vi*ha/2,Kn=-Aa*ci,Bn=$e*Vi*Aa/2,Ao=lt*Da+$e*ha*ci,ls=Kn*Bn-Ao*An,Mo=(on*Kn-ji*Ao)/ls/2,Yo=(ji*Bn-on*An)/ls;M(Yo)>2&&(Yo/=2),Er-=Mo,jr-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Qr>0);return pt*jr>-t(r(Er),Et)-.001?[Er*2,jr]:null},Dt}function Y(){var qe=20*y,$e=qe>=0?1:-1,lt=T($e*qe),pt=_.geoProjectionMutator(de),Et=pt(qe),bt=Et.stream;return Et.parallel=function(Dt){return arguments.length?(lt=T(($e=(qe=Dt*y)>=0?1:-1)*qe),pt(qe)):qe*g},Et.stream=function(Dt){var ur=Et.rotate(),yr=bt(Dt),Er=(Et.rotate([0,0]),bt(Dt)),jr=Et.precision();return Et.rotate(ur),yr.sphere=function(){Er.polygonStart(),Er.lineStart();for(var Qr=$e*-180;$e*Qr<180;Qr+=$e*90)Er.point(Qr,$e*90);if(qe)for(;$e*(Qr-=3*$e*jr)>=-180;)Er.point(Qr,$e*-t(r(Qr*y/2),lt)*g);Er.lineEnd(),Er.polygonEnd()},yr},Et.scale(218.695).center([0,28.0974])}function X(qe,$e){var lt=T($e/2),pt=F(1-lt*lt),Et=1+pt*r(qe/=2),bt=c(qe)*pt/Et,Dt=lt/Et,ur=bt*bt,yr=Dt*Dt;return[4/3*bt*(3+ur-3*yr),4/3*Dt*(3+3*ur-yr)]}X.invert=function(qe,$e){if(qe*=3/8,$e*=3/8,!qe&&M($e)>1)return null;var lt=qe*qe,pt=$e*$e,Et=1+lt+pt,bt=F((Et-F(Et*Et-4*$e*$e))/2),Dt=P(bt)/3,ur=bt?B(M($e/bt))/3:U(M(qe))/3,yr=r(Dt),Er=L(ur),jr=Er*Er-yr*yr;return[m(qe)*2*t(O(ur)*yr,.25-jr),m($e)*2*t(Er*c(Dt),.25+jr)]};function Q(){return _.geoProjection(X).scale(66.1603)}var V=F(8),le=i(1+b);function ae(qe,$e){var lt=M($e);return ltx&&--pt>0);return[qe/(r(lt)*(V-1/c(lt))),m($e)*lt]};function j(){return _.geoProjection(ae).scale(112.314)}function ee(qe){var $e=2*w/qe;function lt(pt,Et){var bt=_.geoAzimuthalEquidistantRaw(pt,Et);if(M(pt)>A){var Dt=t(bt[1],bt[0]),ur=F(bt[0]*bt[0]+bt[1]*bt[1]),yr=$e*f((Dt-A)/$e)+A,Er=t(c(Dt-=yr),2-r(Dt));Dt=yr+P(w/ur*c(Er))-Er,bt[0]=ur*r(Dt),bt[1]=ur*c(Dt)}return bt}return lt.invert=function(pt,Et){var bt=F(pt*pt+Et*Et);if(bt>A){var Dt=t(Et,pt),ur=$e*f((Dt-A)/$e)+A,yr=Dt>ur?-1:1,Er=bt*r(ur-Dt),jr=1/T(yr*z((Er-w)/F(w*(w-2*Er)+bt*bt)));Dt=ur+2*e((jr+yr*F(jr*jr-3))/3),pt=bt*r(Dt),Et=bt*c(Dt)}return _.geoAzimuthalEquidistantRaw.invert(pt,Et)},lt}function te(){var qe=5,$e=_.geoProjectionMutator(ee),lt=$e(qe),pt=lt.stream,Et=.01,bt=-r(Et*y),Dt=c(Et*y);return lt.lobes=function(ur){return arguments.length?$e(qe=+ur):qe},lt.stream=function(ur){var yr=lt.rotate(),Er=pt(ur),jr=(lt.rotate([0,0]),pt(ur));return lt.rotate(yr),Er.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Qr=0,ha=360/qe,Aa=2*w/qe,Da=90-180/qe,ci=A;Qr0&&M(Et)>l);return pt<0?NaN:lt}function Pe(qe,$e,lt){return $e===void 0&&($e=40),lt===void 0&&(lt=x),function(pt,Et,bt,Dt){var ur,yr,Er;bt=bt===void 0?0:+bt,Dt=Dt===void 0?0:+Dt;for(var jr=0;jr<$e;jr++){var Qr=qe(bt,Dt),ha=Qr[0]-pt,Aa=Qr[1]-Et;if(M(ha)ur){bt-=yr/=2,Dt-=Er/=2;continue}ur=Da;var ci=(bt>0?-1:1)*lt,Vi=(Dt>0?-1:1)*lt,ji=qe(bt+ci,Dt),on=qe(bt,Dt+Vi),An=(ji[0]-Qr[0])/ci,Kn=(ji[1]-Qr[1])/ci,Bn=(on[0]-Qr[0])/Vi,Ao=(on[1]-Qr[1])/Vi,ls=Ao*An-Kn*Bn,Mo=(M(ls)<.5?.5:1)/ls;if(yr=(Aa*Bn-ha*Ao)*Mo,Er=(ha*Kn-Aa*An)*Mo,bt+=yr,Dt+=Er,M(yr)0&&(ur[1]*=1+yr/1.5*ur[0]*ur[0]),ur}return pt.invert=Pe(pt),pt}function at(){return _.geoProjection(je()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(qe,$e){var lt=qe*c($e),pt=30,Et;do $e-=Et=($e+c($e)-lt)/(1+r($e));while(M(Et)>l&&--pt>0);return $e/2}function tt(qe,$e,lt){function pt(Et,bt){return[qe*Et*r(bt=nt(lt,bt)),$e*c(bt)]}return pt.invert=function(Et,bt){return bt=P(bt/$e),[Et/(qe*r(bt)),P((2*bt+c(2*bt))/lt)]},pt}var Ve=tt(b/A,b,w);function he(){return _.geoProjection(Ve).scale(169.529)}var se=2.00276,ne=1.11072;function Ce(qe,$e){var lt=nt(w,$e);return[se*qe/(1/r($e)+ne/r(lt)),($e+b*c(lt))/se]}Ce.invert=function(qe,$e){var lt=se*$e,pt=$e<0?-E:E,Et=25,bt,Dt;do Dt=lt-b*c(pt),pt-=bt=(c(2*pt)+2*pt-w*c(Dt))/(2*r(2*pt)+2+w*r(Dt)*b*r(pt));while(M(bt)>l&&--Et>0);return Dt=lt-b*c(pt),[qe*(1/r(Dt)+ne/r(pt))/se,Dt]};function Ze(){return _.geoProjection(Ce).scale(160.857)}function rt(qe){var $e=0,lt=_.geoProjectionMutator(qe),pt=lt($e);return pt.parallel=function(Et){return arguments.length?lt($e=Et*y):$e*g},pt}function Je(qe,$e){return[qe*r($e),$e]}Je.invert=function(qe,$e){return[qe/r($e),$e]};function St(){return _.geoProjection(Je).scale(152.63)}function kt(qe){if(!qe)return Je;var $e=1/T(qe);function lt(pt,Et){var bt=$e+qe-Et,Dt=bt&&pt*r(Et)/bt;return[bt*c(Dt),$e-bt*r(Dt)]}return lt.invert=function(pt,Et){var bt=F(pt*pt+(Et=$e-Et)*Et),Dt=$e+qe-bt;return[bt/r(Dt)*t(pt,Et),Dt]},lt}function Bt(){return rt(kt).scale(123.082).center([0,26.1441]).parallel(45)}function Vt(qe){function $e(lt,pt){var Et=A-pt,bt=Et&<*qe*c(Et)/Et;return[Et*c(bt)/qe,A-Et*r(bt)]}return $e.invert=function(lt,pt){var Et=lt*qe,bt=A-pt,Dt=F(Et*Et+bt*bt),ur=t(Et,bt);return[(Dt?Dt/c(Dt):1)*ur/qe,A-Dt]},$e}function Ar(){var qe=.5,$e=_.geoProjectionMutator(Vt),lt=$e(qe);return lt.fraction=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(158.837)}var vr=tt(1,4/w,w);function qr(){return _.geoProjection(vr).scale(152.63)}function kr(qe,$e,lt,pt,Et,bt){var Dt=r(bt),ur;if(M(qe)>1||M(bt)>1)ur=z(lt*Et+$e*pt*Dt);else{var yr=c(qe/2),Er=c(bt/2);ur=2*P(F(yr*yr+$e*pt*Er*Er))}return M(ur)>l?[ur,t(pt*c(bt),$e*Et-lt*pt*Dt)]:[0,0]}function Ur(qe,$e,lt){return z((qe*qe+$e*$e-lt*lt)/(2*qe*$e))}function _t(qe){return qe-2*w*a((qe+w)/(2*w))}function Fe(qe,$e,lt){for(var pt=[[qe[0],qe[1],c(qe[1]),r(qe[1])],[$e[0],$e[1],c($e[1]),r($e[1])],[lt[0],lt[1],c(lt[1]),r(lt[1])]],Et=pt[2],bt,Dt=0;Dt<3;++Dt,Et=bt)bt=pt[Dt],Et.v=kr(bt[1]-Et[1],Et[3],Et[2],bt[3],bt[2],bt[0]-Et[0]),Et.point=[0,0];var ur=Ur(pt[0].v[0],pt[2].v[0],pt[1].v[0]),yr=Ur(pt[0].v[0],pt[1].v[0],pt[2].v[0]),Er=w-ur;pt[2].point[1]=0,pt[0].point[0]=-(pt[1].point[0]=pt[0].v[0]/2);var jr=[pt[2].point[0]=pt[0].point[0]+pt[2].v[0]*r(ur),2*(pt[0].point[1]=pt[1].point[1]=pt[2].v[0]*c(ur))];function Qr(ha,Aa){var Da=c(Aa),ci=r(Aa),Vi=new Array(3),ji;for(ji=0;ji<3;++ji){var on=pt[ji];if(Vi[ji]=kr(Aa-on[1],on[3],on[2],ci,Da,ha-on[0]),!Vi[ji][0])return on.point;Vi[ji][1]=_t(Vi[ji][1]-on.v[1])}var An=jr.slice();for(ji=0;ji<3;++ji){var Kn=ji==2?0:ji+1,Bn=Ur(pt[ji].v[0],Vi[ji][0],Vi[Kn][0]);Vi[ji][1]<0&&(Bn=-Bn),ji?ji==1?(Bn=yr-Bn,An[0]-=Vi[ji][0]*r(Bn),An[1]-=Vi[ji][0]*c(Bn)):(Bn=Er-Bn,An[0]+=Vi[ji][0]*r(Bn),An[1]+=Vi[ji][0]*c(Bn)):(An[0]+=Vi[ji][0]*r(Bn),An[1]-=Vi[ji][0]*c(Bn))}return An[0]/=3,An[1]/=3,An}return Qr}function Ye(qe){return qe[0]*=y,qe[1]*=y,qe}function Ae(){return Le([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Le(qe,$e,lt){var pt=_.geoCentroid({type:"MultiPoint",coordinates:[qe,$e,lt]}),Et=[-pt[0],-pt[1]],bt=_.geoRotation(Et),Dt=Fe(Ye(bt(qe)),Ye(bt($e)),Ye(bt(lt)));Dt.invert=Pe(Dt);var ur=_.geoProjection(Dt).rotate(Et),yr=ur.center;return delete ur.rotate,ur.center=function(Er){return arguments.length?yr(bt(Er)):bt.invert(yr())},ur.clipAngle(90)}function We(qe,$e){var lt=F(1-c($e));return[2/d*qe*lt,d*(1-lt)]}We.invert=function(qe,$e){var lt=(lt=$e/d-1)*lt;return[lt>0?qe*F(w/lt)/2:0,P(1-lt)]};function Ke(){return _.geoProjection(We).scale(95.6464).center([0,30])}function st(qe){var $e=T(qe);function lt(pt,Et){return[pt,(pt?pt/c(pt):1)*(c(Et)*r(pt)-$e*r(Et))]}return lt.invert=$e?function(pt,Et){pt&&(Et*=c(pt)/pt);var bt=r(pt);return[pt,2*t(F(bt*bt+$e*$e-Et*Et)-bt,$e-Et)]}:function(pt,Et){return[pt,P(pt?Et*T(pt)/pt:Et)]},lt}function ot(){return rt(st).scale(249.828).clipAngle(90)}var Ut=F(3);function Ct(qe,$e){return[Ut*qe*(2*r(2*$e/3)-1)/d,Ut*d*c($e/3)]}Ct.invert=function(qe,$e){var lt=3*P($e/(Ut*d));return[d*qe/(Ut*(2*r(2*lt/3)-1)),lt]};function Pt(){return _.geoProjection(Ct).scale(156.19)}function jt(qe){var $e=r(qe);function lt(pt,Et){return[pt*$e,c(Et)/$e]}return lt.invert=function(pt,Et){return[pt/$e,P(Et*$e)]},lt}function cr(){return rt(jt).parallel(38.58).scale(195.044)}function or(qe){var $e=r(qe);function lt(pt,Et){return[pt*$e,(1+$e)*T(Et/2)]}return lt.invert=function(pt,Et){return[pt/$e,e(Et/(1+$e))*2]},lt}function nr(){return rt(or).scale(124.75)}function Pr(qe,$e){var lt=F(8/(3*w));return[lt*qe*(1-M($e)/w),lt*$e]}Pr.invert=function(qe,$e){var lt=F(8/(3*w)),pt=$e/lt;return[qe/(lt*(1-M(pt)/w)),pt]};function _a(){return _.geoProjection(Pr).scale(165.664)}function Fa(qe,$e){var lt=F(4-3*c(M($e)));return[2/F(6*w)*qe*lt,m($e)*F(2*w/3)*(2-lt)]}Fa.invert=function(qe,$e){var lt=2-M($e)/F(2*w/3);return[qe*F(6*w)/(2*lt),m($e)*P((4-lt*lt)/3)]};function Ra(){return _.geoProjection(Fa).scale(165.664)}function qa(qe,$e){var lt=F(w*(4+w));return[2/lt*qe*(1+F(1-4*$e*$e/(w*w))),4/lt*$e]}qa.invert=function(qe,$e){var lt=F(w*(4+w))/2;return[qe*lt/(1+F(1-$e*$e*(4+w)/(4*w))),$e*lt/2]};function Wa(){return _.geoProjection(qa).scale(180.739)}function Ca(qe,$e){var lt=(2+A)*c($e);$e/=2;for(var pt=0,Et=1/0;pt<10&&M(Et)>l;pt++){var bt=r($e);$e-=Et=($e+c($e)*(bt+2)-lt)/(2*bt*(1+bt))}return[2/F(w*(4+w))*qe*(1+r($e)),2*F(w/(4+w))*c($e)]}Ca.invert=function(qe,$e){var lt=$e*F((4+w)/w)/2,pt=P(lt),Et=r(pt);return[qe/(2/F(w*(4+w))*(1+Et)),P((pt+lt*(Et+2))/(2+A))]};function hi(){return _.geoProjection(Ca).scale(180.739)}function wi(qe,$e){return[qe*(1+r($e))/F(2+w),2*$e/F(2+w)]}wi.invert=function(qe,$e){var lt=F(2+w),pt=$e*lt/2;return[lt*qe/(1+r(pt)),pt]};function Yt(){return _.geoProjection(wi).scale(173.044)}function Rt(qe,$e){for(var lt=(1+A)*c($e),pt=0,Et=1/0;pt<10&&M(Et)>l;pt++)$e-=Et=($e+c($e)-lt)/(1+r($e));return lt=F(2+w),[qe*(1+r($e))/lt,2*$e/lt]}Rt.invert=function(qe,$e){var lt=1+A,pt=F(lt/2);return[qe*2*pt/(1+r($e*=pt)),P(($e+c($e))/lt)]};function Zt(){return _.geoProjection(Rt).scale(173.044)}var Jt=3+2*b;function Fr(qe,$e){var lt=c(qe/=2),pt=r(qe),Et=F(r($e)),bt=r($e/=2),Dt=c($e)/(bt+b*pt*Et),ur=F(2/(1+Dt*Dt)),yr=F((b*bt+(pt+lt)*Et)/(b*bt+(pt-lt)*Et));return[Jt*(ur*(yr-1/yr)-2*i(yr)),Jt*(ur*Dt*(yr+1/yr)-2*e(Dt))]}Fr.invert=function(qe,$e){if(!(bt=X.invert(qe/1.2,$e*1.065)))return null;var lt=bt[0],pt=bt[1],Et=20,bt;qe/=Jt,$e/=Jt;do{var Dt=lt/2,ur=pt/2,yr=c(Dt),Er=r(Dt),jr=c(ur),Qr=r(ur),ha=r(pt),Aa=F(ha),Da=jr/(Qr+b*Er*Aa),ci=Da*Da,Vi=F(2/(1+ci)),ji=b*Qr+(Er+yr)*Aa,on=b*Qr+(Er-yr)*Aa,An=ji/on,Kn=F(An),Bn=Kn-1/Kn,Ao=Kn+1/Kn,ls=Vi*Bn-2*i(Kn)-qe,Mo=Vi*Da*Ao-2*e(Da)-$e,Yo=jr&&p*Aa*yr*ci/jr,ds=(b*Er*Qr+Aa)/(2*(Qr+b*Er*Aa)*(Qr+b*Er*Aa)*Aa),ul=-.5*Da*Vi*Vi*Vi,tl=ul*Yo,es=ul*ds,ts=(ts=2*Qr+b*Aa*(Er-yr))*ts*Kn,Il=(b*Er*Qr*Aa+ha)/ts,tu=-(b*yr*jr)/(Aa*ts),Ru=Bn*tl-2*Il/Kn+Vi*(Il+Il/An),vu=Bn*es-2*tu/Kn+Vi*(tu+tu/An),wl=Da*Ao*tl-2*Yo/(1+ci)+Vi*Ao*Yo+Vi*Da*(Il-Il/An),fu=Da*Ao*es-2*ds/(1+ci)+Vi*Ao*ds+Vi*Da*(tu-tu/An),uc=vu*wl-fu*Ru;if(!uc)break;var Gl=(Mo*vu-ls*fu)/uc,Hl=(ls*wl-Mo*Ru)/uc;lt-=Gl,pt=n(-A,s(A,pt-Hl))}while((M(Gl)>l||M(Hl)>l)&&--Et>0);return M(M(pt)-A)pt){var Qr=F(jr),ha=t(Er,yr),Aa=lt*f(ha/lt),Da=ha-Aa,ci=qe*r(Da),Vi=(qe*c(Da)-Da*c(ci))/(A-ci),ji=xt(Da,Vi),on=(w-qe)/ut(ji,ci,w);yr=Qr;var An=50,Kn;do yr-=Kn=(qe+ut(ji,ci,yr)*on-Qr)/(ji(yr)*on);while(M(Kn)>l&&--An>0);Er=Da*c(yr),yrpt){var yr=F(ur),Er=t(Dt,bt),jr=lt*f(Er/lt),Qr=Er-jr;bt=yr*r(Qr),Dt=yr*c(Qr);for(var ha=bt-A,Aa=c(bt),Da=Dt/Aa,ci=btl||M(Da)>l)&&--ci>0);return[Qr,ha]},yr}var wr=Cr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Rr(){return _.geoProjection(wr).scale(149.995)}var Nr=Cr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Hr(){return _.geoProjection(Nr).scale(153.93)}var gt=Cr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Kt(){return _.geoProjection(gt).scale(130.945)}function mr(qe,$e){var lt=qe*qe,pt=$e*$e;return[qe*(1-.162388*pt)*(.87-952426e-9*lt*lt),$e*(1+pt/12)]}mr.invert=function(qe,$e){var lt=qe,pt=$e,Et=50,bt;do{var Dt=pt*pt;pt-=bt=(pt*(1+Dt/12)-$e)/(1+Dt/4)}while(M(bt)>l&&--Et>0);Et=50,qe/=1-.162388*Dt;do{var ur=(ur=lt*lt)*ur;lt-=bt=(lt*(.87-952426e-9*ur)-qe)/(.87-.00476213*ur)}while(M(bt)>l&&--Et>0);return[lt,pt]};function Ir(){return _.geoProjection(mr).scale(131.747)}var va=Cr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Pa(){return _.geoProjection(va).scale(131.087)}function ga(qe){var $e=qe(A,0)[0]-qe(-A,0)[0];function lt(pt,Et){var bt=pt>0?-.5:.5,Dt=qe(pt+bt*w,Et);return Dt[0]-=bt*$e,Dt}return qe.invert&&(lt.invert=function(pt,Et){var bt=pt>0?-.5:.5,Dt=qe.invert(pt+bt*$e,Et),ur=Dt[0]-bt*w;return ur<-w?ur+=2*w:ur>w&&(ur-=2*w),Dt[0]=ur,Dt}),lt}function la(qe,$e){var lt=m(qe),pt=m($e),Et=r($e),bt=r(qe)*Et,Dt=c(qe)*Et,ur=c(pt*$e);qe=M(t(Dt,ur)),$e=P(bt),M(qe-A)>l&&(qe%=A);var yr=ba(qe>w/4?A-qe:qe,$e);return qe>w/4&&(ur=yr[0],yr[0]=-yr[1],yr[1]=-ur),yr[0]*=lt,yr[1]*=-pt,yr}la.invert=function(qe,$e){M(qe)>1&&(qe=m(qe)*2-qe),M($e)>1&&($e=m($e)*2-$e);var lt=m(qe),pt=m($e),Et=-lt*qe,bt=-pt*$e,Dt=bt/Et<1,ur=Ai(Dt?bt:Et,Dt?Et:bt),yr=ur[0],Er=ur[1],jr=r(Er);return Dt&&(yr=-A-yr),[lt*(t(c(yr)*jr,-c(Er))+w),pt*P(r(yr)*jr)]};function ba(qe,$e){if($e===A)return[0,0];var lt=c($e),pt=lt*lt,Et=pt*pt,bt=1+Et,Dt=1+3*Et,ur=1-Et,yr=P(1/F(bt)),Er=ur+pt*bt*yr,jr=(1-lt)/Er,Qr=F(jr),ha=jr*bt,Aa=F(ha),Da=Qr*ur,ci,Vi;if(qe===0)return[0,-(Da+pt*Aa)];var ji=r($e),on=1/ji,An=2*lt*ji,Kn=(-3*pt+yr*Dt)*An,Bn=(-Er*ji-(1-lt)*Kn)/(Er*Er),Ao=.5*Bn/Qr,ls=ur*Ao-2*pt*Qr*An,Mo=pt*bt*Bn+jr*Dt*An,Yo=-on*An,ds=-on*Mo,ul=-2*on*ls,tl=4*qe/w,es;if(qe>.222*w||$e.175*w){if(ci=(Da+pt*F(ha*(1+Et)-Da*Da))/(1+Et),qe>w/4)return[ci,ci];var ts=ci,Il=.5*ci;ci=.5*(Il+ts),Vi=50;do{var tu=F(ha-ci*ci),Ru=ci*(ul+Yo*tu)+ds*P(ci/Aa)-tl;if(!Ru)break;Ru<0?Il=ci:ts=ci,ci=.5*(Il+ts)}while(M(ts-Il)>l&&--Vi>0)}else{ci=l,Vi=25;do{var vu=ci*ci,wl=F(ha-vu),fu=ul+Yo*wl,uc=ci*fu+ds*P(ci/Aa)-tl,Gl=fu+(ds-Yo*vu)/wl;ci-=es=wl?uc/Gl:0}while(M(es)>l&&--Vi>0)}return[ci,-Da-pt*F(ha-ci*ci)]}function Ai(qe,$e){for(var lt=0,pt=1,Et=.5,bt=50;;){var Dt=Et*Et,ur=F(Et),yr=P(1/F(1+Dt)),Er=1-Dt+Et*(1+Dt)*yr,jr=(1-ur)/Er,Qr=F(jr),ha=jr*(1+Dt),Aa=Qr*(1-Dt),Da=ha-qe*qe,ci=F(Da),Vi=$e+Aa+Et*ci;if(M(pt-lt)0?lt=Et:pt=Et,Et=.5*(lt+pt)}if(!bt)return null;var ji=P(ur),on=r(ji),An=1/on,Kn=2*ur*on,Bn=(-3*Et+yr*(1+3*Dt))*Kn,Ao=(-Er*on-(1-ur)*Bn)/(Er*Er),ls=.5*Ao/Qr,Mo=(1-Dt)*ls-2*Et*Qr*Kn,Yo=-2*An*Mo,ds=-An*Kn,ul=-An*(Et*(1+Dt)*Ao+jr*(1+3*Dt)*Kn);return[w/4*(qe*(Yo+ds*ci)+ul*P(qe/F(ha))),ji]}function ki(){return _.geoProjection(ga(la)).scale(239.75)}function Ki(qe,$e,lt){var pt,Et,bt;return qe?(pt=Mn(qe,lt),$e?(Et=Mn($e,1-lt),bt=Et[1]*Et[1]+lt*pt[0]*pt[0]*Et[0]*Et[0],[[pt[0]*Et[2]/bt,pt[1]*pt[2]*Et[0]*Et[1]/bt],[pt[1]*Et[1]/bt,-pt[0]*pt[2]*Et[0]*Et[2]/bt],[pt[2]*Et[1]*Et[2]/bt,-lt*pt[0]*pt[1]*Et[0]/bt]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):(Et=Mn($e,1-lt),[[0,Et[0]/Et[1]],[1/Et[1],0],[Et[2]/Et[1],0]])}function Mn(qe,$e){var lt,pt,Et,bt,Dt;if($e=1-l)return lt=(1-$e)/4,pt=L(qe),bt=N(qe),Et=1/pt,Dt=pt*O(qe),[bt+lt*(Dt-qe)/(pt*pt),Et-lt*bt*Et*(Dt-qe),Et+lt*bt*Et*(Dt+qe),2*e(o(qe))-A+lt*(Dt-qe)/pt];var ur=[1,0,0,0,0,0,0,0,0],yr=[F($e),0,0,0,0,0,0,0,0],Er=0;for(pt=F(1-$e),Dt=1;M(yr[Er]/ur[Er])>l&&Er<8;)lt=ur[Er++],yr[Er]=(lt-pt)/2,ur[Er]=(lt+pt)/2,pt=F(lt*pt),Dt*=2;Et=Dt*ur[Er]*qe;do bt=yr[Er]*c(pt=Et)/ur[Er],Et=(P(bt)+Et)/2;while(--Er);return[c(Et),bt=r(Et),bt/r(Et-pt),Et]}function wn(qe,$e,lt){var pt=M(qe),Et=M($e),bt=O(Et);if(pt){var Dt=1/c(pt),ur=1/(T(pt)*T(pt)),yr=-(ur+lt*(bt*bt*Dt*Dt)-1+lt),Er=(lt-1)*ur,jr=(-yr+F(yr*yr-4*Er))/2;return[On(e(1/F(jr)),lt)*m(qe),On(e(F((jr/ur-1)/lt)),1-lt)*m($e)]}return[0,On(e(bt),1-lt)*m($e)]}function On(qe,$e){if(!$e)return qe;if($e===1)return i(T(qe/2+E));for(var lt=1,pt=F(1-$e),Et=F($e),bt=0;M(Et)>l;bt++){if(qe%w){var Dt=e(pt*T(qe)/lt);Dt<0&&(Dt+=w),qe+=Dt+~~(qe/w)*w}else qe+=qe;Et=(lt+pt)/2,pt=F(lt*pt),Et=((lt=Et)-pt)/2}return qe/(h(2,bt)*lt)}function En(qe,$e){var lt=(b-1)/(b+1),pt=F(1-lt*lt),Et=On(A,pt*pt),bt=-1,Dt=i(T(w/4+M($e)/2)),ur=o(bt*Dt)/F(lt),yr=ao(ur*r(bt*qe),ur*c(bt*qe)),Er=wn(yr[0],yr[1],pt*pt);return[-Er[1],($e>=0?1:-1)*(.5*Et-Er[0])]}function ao(qe,$e){var lt=qe*qe,pt=$e+1,Et=1-lt-$e*$e;return[.5*((qe>=0?A:-A)-t(Et,2*qe)),-.25*i(Et*Et+4*lt)+.5*i(pt*pt+lt)]}function Co(qe,$e){var lt=$e[0]*$e[0]+$e[1]*$e[1];return[(qe[0]*$e[0]+qe[1]*$e[1])/lt,(qe[1]*$e[0]-qe[0]*$e[1])/lt]}En.invert=function(qe,$e){var lt=(b-1)/(b+1),pt=F(1-lt*lt),Et=On(A,pt*pt),bt=-1,Dt=Ki(.5*Et-$e,-qe,pt*pt),ur=Co(Dt[0],Dt[1]),yr=t(ur[1],ur[0])/bt;return[yr,2*e(o(.5/bt*i(lt*ur[0]*ur[0]+lt*ur[1]*ur[1])))-A]};function bo(){return _.geoProjection(ga(En)).scale(151.496)}function zs(qe){var $e=c(qe),lt=r(qe),pt=kn(qe);pt.invert=kn(-qe);function Et(bt,Dt){var ur=pt(bt,Dt);bt=ur[0],Dt=ur[1];var yr=c(Dt),Er=r(Dt),jr=r(bt),Qr=z($e*yr+lt*Er*jr),ha=c(Qr),Aa=M(ha)>l?Qr/ha:1;return[Aa*lt*c(bt),(M(bt)>A?Aa:-Aa)*($e*Er-lt*yr*jr)]}return Et.invert=function(bt,Dt){var ur=F(bt*bt+Dt*Dt),yr=-c(ur),Er=r(ur),jr=ur*Er,Qr=-Dt*yr,ha=ur*$e,Aa=F(jr*jr+Qr*Qr-ha*ha),Da=t(jr*ha+Qr*Aa,Qr*ha-jr*Aa),ci=(ur>A?-1:1)*t(bt*yr,ur*r(Da)*Er+Dt*c(Da)*yr);return pt.invert(ci,Da)},Et}function kn(qe){var $e=c(qe),lt=r(qe);return function(pt,Et){var bt=r(Et),Dt=r(pt)*bt,ur=c(pt)*bt,yr=c(Et);return[t(ur,Dt*lt-yr*$e),P(yr*lt+Dt*$e)]}}function wo(){var qe=0,$e=_.geoProjectionMutator(zs),lt=$e(qe),pt=lt.rotate,Et=lt.stream,bt=_.geoCircle();return lt.parallel=function(Dt){if(!arguments.length)return qe*g;var ur=lt.rotate();return $e(qe=Dt*y).rotate(ur)},lt.rotate=function(Dt){return arguments.length?(pt.call(lt,[Dt[0],Dt[1]-qe*g]),bt.center([-Dt[0],-Dt[1]]),lt):(Dt=pt.call(lt),Dt[1]+=qe*g,Dt)},lt.stream=function(Dt){return Dt=Et(Dt),Dt.sphere=function(){Dt.polygonStart();var ur=.01,yr=bt.radius(90-ur)().coordinates[0],Er=yr.length-1,jr=-1,Qr;for(Dt.lineStart();++jr=0;)Dt.point((Qr=yr[jr])[0],Qr[1]);Dt.lineEnd(),Dt.polygonEnd()},Dt},lt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Zn=3,go=P(1-1/Zn)*g,os=jt(0);function ys(qe){var $e=go*y,lt=We(w,$e)[0]-We(-w,$e)[0],pt=os(0,$e)[1],Et=We(0,$e)[1],bt=d-Et,Dt=u/qe,ur=4/u,yr=pt+bt*bt*4/u;function Er(jr,Qr){var ha,Aa=M(Qr);if(Aa>$e){var Da=s(qe-1,n(0,a((jr+w)/Dt)));jr+=w*(qe-1)/qe-Da*Dt,ha=We(jr,Aa),ha[0]=ha[0]*u/lt-u*(qe-1)/(2*qe)+Da*u/qe,ha[1]=pt+(ha[1]-Et)*4*bt/u,Qr<0&&(ha[1]=-ha[1])}else ha=os(jr,Qr);return ha[0]*=ur,ha[1]/=yr,ha}return Er.invert=function(jr,Qr){jr/=ur,Qr*=yr;var ha=M(Qr);if(ha>pt){var Aa=s(qe-1,n(0,a((jr+w)/Dt)));jr=(jr+w*(qe-1)/qe-Aa*Dt)*lt/u;var Da=We.invert(jr,.25*(ha-pt)*u/bt+Et);return Da[0]-=w*(qe-1)/qe-Aa*Dt,Qr<0&&(Da[1]=-Da[1]),Da}return os.invert(jr,Qr)},Er}function jo(qe,$e){return[qe,$e&1?90-l:go]}function Yn(qe,$e){return[qe,$e&1?-90+l:-go]}function Gn(qe){return[qe[0]*(1-l),qe[1]]}function Hn(qe){var $e=[].concat(S.range(-180,180+qe/2,qe).map(jo),S.range(180,-180-qe/2,-qe).map(Yn));return{type:"Polygon",coordinates:[qe===180?$e.map(Gn):$e]}}function ss(){var qe=4,$e=_.geoProjectionMutator(ys),lt=$e(qe),pt=lt.stream;return lt.lobes=function(Et){return arguments.length?$e(qe=+Et):qe},lt.stream=function(Et){var bt=lt.rotate(),Dt=pt(Et),ur=(lt.rotate([0,0]),pt(Et));return lt.rotate(bt),Dt.sphere=function(){_.geoStream(Hn(180/qe),ur)},Dt},lt.scale(239.75)}function _s(qe){var $e=1+qe,lt=c(1/$e),pt=P(lt),Et=2*F(w/(bt=w+4*pt*$e)),bt,Dt=.5*Et*($e+F(qe*(2+qe))),ur=qe*qe,yr=$e*$e;function Er(jr,Qr){var ha=1-c(Qr),Aa,Da;if(ha&&ha<2){var ci=A-Qr,Vi=25,ji;do{var on=c(ci),An=r(ci),Kn=pt+t(on,$e-An),Bn=1+yr-2*$e*An;ci-=ji=(ci-ur*pt-$e*on+Bn*Kn-.5*ha*bt)/(2*$e*on*Kn)}while(M(ji)>x&&--Vi>0);Aa=Et*F(Bn),Da=jr*Kn/w}else Aa=Et*(qe+ha),Da=jr*pt/w;return[Aa*c(Da),Dt-Aa*r(Da)]}return Er.invert=function(jr,Qr){var ha=jr*jr+(Qr-=Dt)*Qr,Aa=(1+yr-ha/(Et*Et))/(2*$e),Da=z(Aa),ci=c(Da),Vi=pt+t(ci,$e-Aa);return[P(jr/F(ha))*w/Vi,P(1-2*(Da-ur*pt-$e*ci+(1+yr-2*$e*Aa)*Vi)/bt)]},Er}function ps(){var qe=1,$e=_.geoProjectionMutator(_s),lt=$e(qe);return lt.ratio=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(167.774).center([0,18.67])}var Ko=.7109889596207567,Gi=.0528035274542;function Pn(qe,$e){return $e>-Ko?(qe=Ve(qe,$e),qe[1]+=Gi,qe):Je(qe,$e)}Pn.invert=function(qe,$e){return $e>-Ko?Ve.invert(qe,$e-Gi):Je.invert(qe,$e)};function qs(){return _.geoProjection(Pn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function bs(qe,$e){return M($e)>Ko?(qe=Ve(qe,$e),qe[1]-=$e>0?Gi:-Gi,qe):Je(qe,$e)}bs.invert=function(qe,$e){return M($e)>Ko?Ve.invert(qe,$e+($e>0?Gi:-Gi)):Je.invert(qe,$e)};function lo(){return _.geoProjection(bs).scale(152.63)}function Zo(qe,$e,lt,pt){var Et=F(4*w/(2*lt+(1+qe-$e/2)*c(2*lt)+(qe+$e)/2*c(4*lt)+$e/2*c(6*lt))),bt=F(pt*c(lt)*F((1+qe*r(2*lt)+$e*r(4*lt))/(1+qe+$e))),Dt=lt*yr(1);function ur(Qr){return F(1+qe*r(2*Qr)+$e*r(4*Qr))}function yr(Qr){var ha=Qr*lt;return(2*ha+(1+qe-$e/2)*c(2*ha)+(qe+$e)/2*c(4*ha)+$e/2*c(6*ha))/lt}function Er(Qr){return ur(Qr)*c(Qr)}var jr=function(Qr,ha){var Aa=lt*Re(yr,Dt*c(ha)/lt,ha/w);isNaN(Aa)&&(Aa=lt*m(ha));var Da=Et*ur(Aa);return[Da*bt*Qr/w*r(Aa),Da/bt*c(Aa)]};return jr.invert=function(Qr,ha){var Aa=Re(Er,ha*bt/Et);return[Qr*w/(r(Aa)*Et*bt*ur(Aa)),P(lt*yr(Aa/lt)/Dt)]},lt===0&&(Et=F(pt/w),jr=function(Qr,ha){return[Qr*Et,c(ha)/Et]},jr.invert=function(Qr,ha){return[Qr/Et,P(ha*Et)]}),jr}function ws(){var qe=1,$e=0,lt=45*y,pt=2,Et=_.geoProjectionMutator(Zo),bt=Et(qe,$e,lt,pt);return bt.a=function(Dt){return arguments.length?Et(qe=+Dt,$e,lt,pt):qe},bt.b=function(Dt){return arguments.length?Et(qe,$e=+Dt,lt,pt):$e},bt.psiMax=function(Dt){return arguments.length?Et(qe,$e,lt=+Dt*y,pt):lt*g},bt.ratio=function(Dt){return arguments.length?Et(qe,$e,lt,pt=+Dt):pt},bt.scale(180.739)}function Hs(qe,$e,lt,pt,Et,bt,Dt,ur,yr,Er,jr){if(jr.nanEncountered)return NaN;var Qr,ha,Aa,Da,ci,Vi,ji,on,An,Kn;if(Qr=lt-$e,ha=qe($e+Qr*.25),Aa=qe(lt-Qr*.25),isNaN(ha)){jr.nanEncountered=!0;return}if(isNaN(Aa)){jr.nanEncountered=!0;return}return Da=Qr*(pt+4*ha+Et)/12,ci=Qr*(Et+4*Aa+bt)/12,Vi=Da+ci,Kn=(Vi-Dt)/15,Er>yr?(jr.maxDepthCount++,Vi+Kn):Math.abs(Kn)>1;do yr[Vi]>Aa?ci=Vi:Da=Vi,Vi=Da+ci>>1;while(Vi>Da);var ji=yr[Vi+1]-yr[Vi];return ji&&(ji=(Aa-yr[Vi+1])/ji),(Vi+1+ji)/Dt}var Qr=2*jr(1)/w*bt/lt,ha=function(Aa,Da){var ci=jr(M(c(Da))),Vi=pt(ci)*Aa;return ci/=Qr,[Vi,Da>=0?ci:-ci]};return ha.invert=function(Aa,Da){var ci;return Da*=Qr,M(Da)<1&&(ci=m(Da)*P(Et(M(Da))*bt)),[Aa/pt(M(Da)),ci]},ha}function Po(){var qe=0,$e=2.5,lt=1.183136,pt=_.geoProjectionMutator(yn),Et=pt(qe,$e,lt);return Et.alpha=function(bt){return arguments.length?pt(qe=+bt,$e,lt):qe},Et.k=function(bt){return arguments.length?pt(qe,$e=+bt,lt):$e},Et.gamma=function(bt){return arguments.length?pt(qe,$e,lt=+bt):lt},Et.scale(152.63)}function To(qe,$e){return M(qe[0]-$e[0])=0;--yr)lt=qe[1][yr],pt=lt[0][0],Et=lt[0][1],bt=lt[1][1],Dt=lt[2][0],ur=lt[2][1],$e.push(Ws([[Dt-l,ur-l],[Dt-l,bt+l],[pt+l,bt+l],[pt+l,Et-l]],30));return{type:"Polygon",coordinates:[S.merge($e)]}}function uo(qe,$e,lt){var pt,Et;function bt(yr,Er){for(var jr=Er<0?-1:1,Qr=$e[+(Er<0)],ha=0,Aa=Qr.length-1;haQr[ha][2][0];++ha);var Da=qe(yr-Qr[ha][1][0],Er);return Da[0]+=qe(Qr[ha][1][0],jr*Er>jr*Qr[ha][0][1]?Qr[ha][0][1]:Er)[0],Da}lt?bt.invert=lt(bt):qe.invert&&(bt.invert=function(yr,Er){for(var jr=Et[+(Er<0)],Qr=$e[+(Er<0)],ha=0,Aa=jr.length;haDa&&(ci=Aa,Aa=Da,Da=ci),[[Qr,Aa],[ha,Da]]})}),Dt):$e.map(function(Er){return Er.map(function(jr){return[[jr[0][0]*g,jr[0][1]*g],[jr[1][0]*g,jr[1][1]*g],[jr[2][0]*g,jr[2][1]*g]]})})},$e!=null&&Dt.lobes($e),Dt}var Nl=[[[[-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 Ks(){return uo(Ce,Nl).scale(160.857)}var Ts=[[[[-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 Ls(){return uo(bs,Ts).scale(152.63)}var Jo=[[[[-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 Es(){return uo(Ve,Jo).scale(169.529)}var Ul=[[[[-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 lu(){return uo(Ve,Ul).scale(169.529).rotate([20,0])}var Tc=[[[[-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 du(){return uo(Pn,Tc,Pe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Sf=[[[[-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 Uc(){return uo(Je,Sf).scale(152.63).rotate([-20,0])}function Bs(qe,$e){return[3/u*qe*F(w*w/3-$e*$e),$e]}Bs.invert=function(qe,$e){return[u/3*qe/F(w*w/3-$e*$e),$e]};function dc(){return _.geoProjection(Bs).scale(158.837)}function Wc(qe){function $e(lt,pt){if(M(M(pt)-A)2)return null;lt/=2,pt/=2;var bt=lt*lt,Dt=pt*pt,ur=2*pt/(1+bt+Dt);return ur=h((1+ur)/(1-ur),1/qe),[t(2*lt,1-bt-Dt)/qe,P((ur-1)/(ur+1))]},$e}function uu(){var qe=.5,$e=_.geoProjectionMutator(Wc),lt=$e(qe);return lt.spacing=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(124.75)}var Pl=w/b;function ic(qe,$e){return[qe*(1+F(r($e)))/2,$e/(r($e/2)*r(qe/6))]}ic.invert=function(qe,$e){var lt=M(qe),pt=M($e),Et=l,bt=A;ptl||M(Vi)>l)&&--Et>0);return Et&&[lt,pt]};function vl(){return _.geoProjection(nl).scale(139.98)}function As(qe,$e){return[c(qe)/r($e),T($e)*r(qe)]}As.invert=function(qe,$e){var lt=qe*qe,pt=$e*$e,Et=pt+1,bt=lt+Et,Dt=qe?p*F((bt-F(bt*bt-4*lt))/lt):1/F(Et);return[P(qe*Dt),m($e)*z(Dt)]};function Xs(){return _.geoProjection(As).scale(144.049).clipAngle(90-.001)}function nc(qe){var $e=r(qe),lt=T(E+qe/2);function pt(Et,bt){var Dt=bt-qe,ur=M(Dt)=0;)jr=qe[Er],Qr=jr[0]+ur*(Aa=Qr)-yr*ha,ha=jr[1]+ur*ha+yr*Aa;return Qr=ur*(Aa=Qr)-yr*ha,ha=ur*ha+yr*Aa,[Qr,ha]}return lt.invert=function(pt,Et){var bt=20,Dt=pt,ur=Et;do{for(var yr=$e,Er=qe[yr],jr=Er[0],Qr=Er[1],ha=0,Aa=0,Da;--yr>=0;)Er=qe[yr],ha=jr+Dt*(Da=ha)-ur*Aa,Aa=Qr+Dt*Aa+ur*Da,jr=Er[0]+Dt*(Da=jr)-ur*Qr,Qr=Er[1]+Dt*Qr+ur*Da;ha=jr+Dt*(Da=ha)-ur*Aa,Aa=Qr+Dt*Aa+ur*Da,jr=Dt*(Da=jr)-ur*Qr-pt,Qr=Dt*Qr+ur*Da-Et;var ci=ha*ha+Aa*Aa,Vi,ji;Dt-=Vi=(jr*ha+Qr*Aa)/ci,ur-=ji=(Qr*ha-jr*Aa)/ci}while(M(Vi)+M(ji)>l*l&&--bt>0);if(bt){var on=F(Dt*Dt+ur*ur),An=2*e(on*.5),Kn=c(An);return[t(Dt*Kn,on*r(An)),on?P(ur*Kn/on):0]}},lt}var us=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ps=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],to=[[.9245,0],[0,0],[.01943,0]],Xc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vu(){return Ql(us,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function ql(){return Ql(bh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mf(){return Ql(Ps,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ac(){return Ql(to,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function nf(){return Ql(Xc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ql(qe,$e){var lt=_.geoProjection(xh(qe)).rotate($e).clipAngle(90),pt=_.geoRotation($e),Et=lt.center;return delete lt.rotate,lt.center=function(bt){return arguments.length?Et(pt(bt)):pt.invert(Et())},lt}var Jf=F(6),Of=F(7);function of(qe,$e){var lt=P(7*c($e)/(3*Jf));return[Jf*qe*(2*r(2*lt/3)-1)/Of,9*c(lt/3)/Of]}of.invert=function(qe,$e){var lt=3*P($e*Of/9);return[qe*Of/(Jf*(2*r(2*lt/3)-1)),P(c(lt)*3*Jf/7)]};function jc(){return _.geoProjection(of).scale(164.859)}function Bf(qe,$e){for(var lt=(1+p)*c($e),pt=$e,Et=0,bt;Et<25&&(pt-=bt=(c(pt/2)+c(pt)-lt)/(.5*r(pt/2)+r(pt)),!(M(bt)x&&--pt>0);return bt=lt*lt,Dt=bt*bt,ur=bt*Dt,[qe/(.84719-.13063*bt+ur*ur*(-.04515+.05494*bt-.02326*Dt+.00331*ur)),lt]};function Zc(){return _.geoProjection(oc).scale(175.295)}function eu(qe,$e){return[qe*(1+r($e))/2,2*($e-T($e/2))]}eu.invert=function(qe,$e){for(var lt=$e/2,pt=0,Et=1/0;pt<10&&M(Et)>l;++pt){var bt=r($e/2);$e-=Et=($e-T($e/2)-lt)/(1-.5/(bt*bt))}return[2*qe/(1+r($e)),$e]};function qc(){return _.geoProjection(eu).scale(152.63)}var Sc=[[[[-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 Zs(){return uo(pe(1/0),Sc).rotate([20,0]).scale(152.63)}function kf(qe,$e){var lt=c($e),pt=r($e),Et=m(qe);if(qe===0||M($e)===A)return[0,$e];if($e===0)return[qe,0];if(M(qe)===A)return[qe*pt,A*lt];var bt=w/(2*qe)-2*qe/w,Dt=2*$e/w,ur=(1-Dt*Dt)/(lt-Dt),yr=bt*bt,Er=ur*ur,jr=1+yr/Er,Qr=1+Er/yr,ha=(bt*lt/ur-bt/2)/jr,Aa=(Er*lt/yr+ur/2)/Qr,Da=ha*ha+pt*pt/jr,ci=Aa*Aa-(Er*lt*lt/yr+ur*lt-1)/Qr;return[A*(ha+F(Da)*Et),A*(Aa+F(ci<0?0:ci)*m(-$e*bt)*Et)]}kf.invert=function(qe,$e){qe/=A,$e/=A;var lt=qe*qe,pt=$e*$e,Et=lt+pt,bt=w*w;return[qe?(Et-1+F((1-Et)*(1-Et)+4*lt))/(2*qe)*A:0,Re(function(Dt){return Et*(w*c(Dt)-2*Dt)*w+4*Dt*Dt*($e-c(Dt))+2*w*Dt-bt*$e},0)]};function fh(){return _.geoProjection(kf).scale(127.267)}var Uf=1.0148,Yc=.23185,$f=-.14499,Cu=.02406,jf=Uf,ml=5*Yc,Lu=7*$f,Mc=9*Cu,ol=1.790857183;function vc(qe,$e){var lt=$e*$e;return[qe,$e*(Uf+lt*lt*(Yc+lt*($f+Cu*lt)))]}vc.invert=function(qe,$e){$e>ol?$e=ol:$e<-ol&&($e=-ol);var lt=$e,pt;do{var Et=lt*lt;lt-=pt=(lt*(Uf+Et*Et*(Yc+Et*($f+Cu*Et)))-$e)/(jf+Et*Et*(ml+Et*(Lu+Mc*Et)))}while(M(pt)>l);return[qe,lt]};function yu(){return _.geoProjection(vc).scale(139.319)}function Tu(qe,$e){if(M($e)l&&--Et>0);return Dt=T(pt),[(M($e)=0;)if(pt=$e[ur],lt[0]===pt[0]&<[1]===pt[1]){if(bt)return[bt,lt];bt=lt}}}function iu(qe){for(var $e=qe.length,lt=[],pt=qe[$e-1],Et=0;Et<$e;++Et)lt.push([pt,pt=qe[Et]]);return lt}function Kc(qe){return qe.project.invert||qe.children&&qe.children.some(Kc)}var hh=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],mf=[[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(qe){return qe.map(function($e){return hh[$e]})});function sl(qe){qe=qe||function(lt){var pt=_.geoCentroid({type:"MultiPoint",coordinates:lt});return _.geoGnomonic().scale(1).translate([0,0]).rotate([-pt[0],-pt[1]])};var $e=mf.map(function(lt){return{face:lt,project:qe(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,pt){var Et=$e[lt];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(lt,pt){return $e[lt<-w/2?pt<0?6:4:lt<0?pt<0?2:0:lt0?[-pt[0],0]:[180-pt[0],180])};var $e=mf.map(function(lt){return{face:lt,project:qe(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,pt){var Et=$e[lt];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(lt,pt){return $e[lt<-w/2?pt<0?6:4:lt<0?pt<0?2:0:ltpt^Aa>pt&<<(ha-Er)*(pt-jr)/(Aa-jr)+Er&&(Et=!Et)}return Et}function nu(qe,$e){var lt=$e.stream,pt;if(!lt)throw new Error("invalid projection");switch(qe&&qe.type){case"Feature":pt=Xu;break;case"FeatureCollection":pt=Vf;break;default:pt=gc;break}return pt(qe,lt)}function Vf(qe,$e){return{type:"FeatureCollection",features:qe.features.map(function(lt){return Xu(lt,$e)})}}function Xu(qe,$e){return{type:"Feature",id:qe.id,properties:qe.properties,geometry:gc(qe.geometry,$e)}}function Cc(qe,$e){return{type:"GeometryCollection",geometries:qe.geometries.map(function(lt){return gc(lt,$e)})}}function gc(qe,$e){if(!qe)return null;if(qe.type==="GeometryCollection")return Cc(qe,$e);var lt;switch(qe.type){case"Point":lt=Lc;break;case"MultiPoint":lt=Lc;break;case"LineString":lt=$c;break;case"MultiLineString":lt=$c;break;case"Polygon":lt=sc;break;case"MultiPolygon":lt=sc;break;case"Sphere":lt=sc;break;default:return null}return _.geoStream(qe,$e(lt)),lt.result()}var Vl=[],xu=[],Lc={point:function(qe,$e){Vl.push([qe,$e])},result:function(){var qe=Vl.length?Vl.length<2?{type:"Point",coordinates:Vl[0]}:{type:"MultiPoint",coordinates:Vl}:null;return Vl=[],qe}},$c={lineStart:Wu,point:function(qe,$e){Vl.push([qe,$e])},lineEnd:function(){Vl.length&&(xu.push(Vl),Vl=[])},result:function(){var qe=xu.length?xu.length<2?{type:"LineString",coordinates:xu[0]}:{type:"MultiLineString",coordinates:xu}:null;return xu=[],qe}},sc={polygonStart:Wu,lineStart:Wu,point:function(qe,$e){Vl.push([qe,$e])},lineEnd:function(){var qe=Vl.length;if(qe){do Vl.push(Vl[0].slice());while(++qe<4);xu.push(Vl),Vl=[]}},polygonEnd:Wu,result:function(){if(!xu.length)return null;var qe=[],$e=[];return xu.forEach(function(lt){Jc(lt)?qe.push([lt]):$e.push(lt)}),$e.forEach(function(lt){var pt=lt[0];qe.some(function(Et){if(Lf(Et[0],pt))return Et.push(lt),!0})||qe.push([lt])}),xu=[],qe.length?qe.length>1?{type:"MultiPolygon",coordinates:qe}:{type:"Polygon",coordinates:qe[0]}:null}};function Pc(qe){var $e=qe(A,0)[0]-qe(-A,0)[0];function lt(pt,Et){var bt=M(pt)0?pt-w:pt+w,Et),ur=(Dt[0]-Dt[1])*p,yr=(Dt[0]+Dt[1])*p;if(bt)return[ur,yr];var Er=$e*p,jr=ur>0^yr>0?-1:1;return[jr*ur-m(yr)*Er,jr*yr-m(ur)*Er]}return qe.invert&&(lt.invert=function(pt,Et){var bt=(pt+Et)*p,Dt=(Et-pt)*p,ur=M(bt)<.5*$e&&M(Dt)<.5*$e;if(!ur){var yr=$e*p,Er=bt>0^Dt>0?-1:1,jr=-Er*pt+(Dt>0?1:-1)*yr,Qr=-Er*Et+(bt>0?1:-1)*yr;bt=(-jr-Qr)*p,Dt=(jr-Qr)*p}var ha=qe.invert(bt,Dt);return ur||(ha[0]+=bt>0?w:-w),ha}),_.geoProjection(lt).rotate([-90,-90,45]).clipAngle(180-.001)}function Qt(){return Pc(la).scale(176.423)}function xr(){return Pc(En).scale(111.48)}function aa(qe,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function lt(Er){var jr=Er.length,Qr=2,ha=new Array(jr);for(ha[0]=+Er[0].toFixed($e),ha[1]=+Er[1].toFixed($e);Qr2||Aa[0]!=jr[0]||Aa[1]!=jr[1])&&(Qr.push(Aa),jr=Aa)}return Qr.length===1&&Er.length>1&&Qr.push(lt(Er[Er.length-1])),Qr}function bt(Er){return Er.map(Et)}function Dt(Er){if(Er==null)return Er;var jr;switch(Er.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:Er.geometries.map(Dt)};break;case"Point":jr={type:"Point",coordinates:lt(Er.coordinates)};break;case"MultiPoint":jr={type:Er.type,coordinates:pt(Er.coordinates)};break;case"LineString":jr={type:Er.type,coordinates:Et(Er.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:Er.type,coordinates:bt(Er.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:Er.coordinates.map(bt)};break;default:return Er}return Er.bbox!=null&&(jr.bbox=Er.bbox),jr}function ur(Er){var jr={type:"Feature",properties:Er.properties,geometry:Dt(Er.geometry)};return Er.id!=null&&(jr.id=Er.id),Er.bbox!=null&&(jr.bbox=Er.bbox),jr}if(qe!=null)switch(qe.type){case"Feature":return ur(qe);case"FeatureCollection":{var yr={type:"FeatureCollection",features:qe.features.map(ur)};return qe.bbox!=null&&(yr.bbox=qe.bbox),yr}default:return Dt(qe)}return qe}function $r(qe){var $e=c(qe);function lt(pt,Et){var bt=$e?T(pt*$e/2)/$e:pt/2;if(!Et)return[2*bt,-qe];var Dt=2*e(bt*c(Et)),ur=1/T(Et);return[c(Dt)*ur,Et+(1-r(Dt))*ur-qe]}return lt.invert=function(pt,Et){if(M(Et+=qe)l&&--ur>0);var ha=pt*(Er=T(Dt)),Aa=T(M(Et)0?A:-A)*(yr+Et*(jr-Dt)/2+Et*Et*(jr-2*yr+Dt)/2)]}Ci.invert=function(qe,$e){var lt=$e/A,pt=lt*90,Et=s(18,M(pt/5)),bt=n(0,a(Et));do{var Dt=li[bt][1],ur=li[bt+1][1],yr=li[s(19,bt+2)][1],Er=yr-Dt,jr=yr-2*ur+Dt,Qr=2*(M(lt)-ur)/Er,ha=jr/Er,Aa=Qr*(1-ha*Qr*(1-2*ha*Qr));if(Aa>=0||bt===1){pt=($e>=0?5:-5)*(Aa+Et);var Da=50,ci;do Et=s(18,M(pt)/5),bt=a(Et),Aa=Et-bt,Dt=li[bt][1],ur=li[bt+1][1],yr=li[s(19,bt+2)][1],pt-=(ci=($e>=0?A:-A)*(ur+Aa*(yr-Dt)/2+Aa*Aa*(yr-2*ur+Dt)/2)-$e)*g;while(M(ci)>x&&--Da>0);break}}while(--bt>=0);var Vi=li[bt][0],ji=li[bt+1][0],on=li[s(19,bt+2)][0];return[qe/(ji+Aa*(on-Vi)/2+Aa*Aa*(on-2*ji+Vi)/2),pt*y]};function Hi(){return _.geoProjection(Ci).scale(152.63)}function Qi(qe){function $e(lt,pt){var Et=r(pt),bt=(qe-1)/(qe-Et*r(lt));return[bt*Et*c(lt),bt*c(pt)]}return $e.invert=function(lt,pt){var Et=lt*lt+pt*pt,bt=F(Et),Dt=(qe-F(1-Et*(qe+1)/(qe-1)))/((qe-1)/bt+bt/(qe-1));return[t(lt*Dt,bt*F(1-Dt*Dt)),bt?P(pt*Dt/bt):0]},$e}function pn(qe,$e){var lt=Qi(qe);if(!$e)return lt;var pt=r($e),Et=c($e);function bt(Dt,ur){var yr=lt(Dt,ur),Er=yr[1],jr=Er*Et/(qe-1)+pt;return[yr[0]*pt/jr,Er/jr]}return bt.invert=function(Dt,ur){var yr=(qe-1)/(qe-1-ur*Et);return lt.invert(yr*Dt,yr*ur*pt)},bt}function Pi(){var qe=2,$e=0,lt=_.geoProjectionMutator(pn),pt=lt(qe,$e);return pt.distance=function(Et){return arguments.length?lt(qe=+Et,$e):qe},pt.tilt=function(Et){return arguments.length?lt(qe,$e=Et*y):$e*g},pt.scale(432.147).clipAngle(z(1/qe)*g-1e-6)}var Di=1e-4,Ni=1e4,mi=-180,Sn=mi+Di,Qn=180,io=Qn-Di,eo=-90,co=eo+Di,Tn=90,un=Tn-Di;function yo(qe){return qe.length>0}function Qo(qe){return Math.floor(qe*Ni)/Ni}function ks(qe){return qe===eo||qe===Tn?[0,qe]:[mi,Qo(qe)]}function rl(qe){var $e=qe[0],lt=qe[1],pt=!1;return $e<=Sn?($e=mi,pt=!0):$e>=io&&($e=Qn,pt=!0),lt<=co?(lt=eo,pt=!0):lt>=un&&(lt=Tn,pt=!0),pt?[$e,lt]:qe}function Ns(qe){return qe.map(rl)}function el(qe,$e,lt){for(var pt=0,Et=qe.length;pt=io||jr<=co||jr>=un){bt[Dt]=rl(yr);for(var Qr=Dt+1;QrSn&&Aaco&&Da=ur)break;lt.push({index:-1,polygon:$e,ring:bt=bt.slice(Qr-1)}),bt[0]=ks(bt[0][1]),Dt=-1,ur=bt.length}}}}function Ss(qe){var $e,lt=qe.length,pt={},Et={},bt,Dt,ur,yr,Er;for($e=0;$e0?w-ur:ur)*g],Er=_.geoProjection(qe(Dt)).rotate(yr),jr=_.geoRotation(yr),Qr=Er.center;return delete Er.rotate,Er.center=function(ha){return arguments.length?Qr(jr(ha)):jr.invert(Qr())},Er.clipAngle(90)}function Fs(qe){var $e=r(qe);function lt(pt,Et){var bt=_.geoGnomonicRaw(pt,Et);return bt[0]*=$e,bt}return lt.invert=function(pt,Et){return _.geoGnomonicRaw.invert(pt/$e,Et)},lt}function cu(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(qe,$e){return Js(Fs,qe,$e)}function Zu(qe){if(!(qe*=2))return _.geoAzimuthalEquidistantRaw;var $e=-qe/2,lt=-$e,pt=qe*qe,Et=T(lt),bt=.5/c(lt);function Dt(ur,yr){var Er=z(r(yr)*r(ur-$e)),jr=z(r(yr)*r(ur-lt)),Qr=yr<0?-1:1;return Er*=Er,jr*=jr,[(Er-jr)/(2*qe),Qr*F(4*pt*jr-(pt-Er+jr)*(pt-Er+jr))/(2*qe)]}return Dt.invert=function(ur,yr){var Er=yr*yr,jr=r(F(Er+(ha=ur+$e)*ha)),Qr=r(F(Er+(ha=ur+lt)*ha)),ha,Aa;return[t(Aa=jr-Qr,ha=(jr+Qr)*Et),(yr<0?-1:1)*z(F(ha*ha+Aa*Aa)*bt)]},Dt}function Ic(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(qe,$e){return Js(Zu,qe,$e)}function Rc(qe,$e){if(M($e)l&&--ur>0);return[m(qe)*(F(Et*Et+4)+Et)*w/4,A*Dt]};function Yu(){return _.geoProjection(lc).scale(127.16)}function Oe(qe,$e,lt,pt,Et){function bt(Dt,ur){var yr=lt*c(pt*ur),Er=F(1-yr*yr),jr=F(2/(1+Er*r(Dt*=Et)));return[qe*Er*jr*c(Dt),$e*yr*jr]}return bt.invert=function(Dt,ur){var yr=Dt/qe,Er=ur/$e,jr=F(yr*yr+Er*Er),Qr=2*P(jr/2);return[t(Dt*T(Qr),qe*jr)/Et,jr&&P(ur*c(Qr)/($e*lt*jr))/pt]},bt}function I(qe,$e,lt,pt){var Et=w/3;qe=n(qe,l),$e=n($e,l),qe=s(qe,A),$e=s($e,w-l),lt=n(lt,0),lt=s(lt,100-l),pt=n(pt,l);var bt=lt/100+1,Dt=pt/100,ur=z(bt*r(Et))/Et,yr=c(qe)/c(ur*A),Er=$e/w,jr=F(Dt*c(qe/2)/c($e/2)),Qr=jr/F(Er*yr*ur),ha=1/(jr*F(Er*yr*ur));return Oe(Qr,ha,yr,ur,Er)}function ie(){var qe=65*y,$e=60*y,lt=20,pt=200,Et=_.geoProjectionMutator(I),bt=Et(qe,$e,lt,pt);return bt.poleline=function(Dt){return arguments.length?Et(qe=+Dt*y,$e,lt,pt):qe*g},bt.parallels=function(Dt){return arguments.length?Et(qe,$e=+Dt*y,lt,pt):$e*g},bt.inflation=function(Dt){return arguments.length?Et(qe,$e,lt=+Dt,pt):lt},bt.ratio=function(Dt){return arguments.length?Et(qe,$e,lt,pt=+Dt):pt},bt.scale(163.775)}function Te(){return ie().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Me=4*w+3*F(3),ze=2*F(2*w*F(3)/Me),ht=tt(ze*F(3)/w,ze,Me/6);function wt(){return _.geoProjection(ht).scale(176.84)}function Ot(qe,$e){return[qe*F(1-3*$e*$e/(w*w)),$e]}Ot.invert=function(qe,$e){return[qe/F(1-3*$e*$e/(w*w)),$e]};function $t(){return _.geoProjection(Ot).scale(152.63)}function Tr(qe,$e){var lt=r($e),pt=r(qe)*lt,Et=1-pt,bt=r(qe=t(c(qe)*lt,-c($e))),Dt=c(qe);return lt=F(1-pt*pt),[Dt*lt-bt*Et,-bt*lt-Dt*Et]}Tr.invert=function(qe,$e){var lt=(qe*qe+$e*$e)/-2,pt=F(-lt*(2+lt)),Et=$e*lt+qe*pt,bt=qe*lt-$e*pt,Dt=F(bt*bt+Et*Et);return[t(pt*Et,Dt*(1+lt)),Dt?-P(pt*bt/Dt):0]};function Sr(){return _.geoProjection(Tr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Kr(qe,$e){var lt=ue(qe,$e);return[(lt[0]+qe/A)/2,(lt[1]+$e)/2]}Kr.invert=function(qe,$e){var lt=qe,pt=$e,Et=25;do{var bt=r(pt),Dt=c(pt),ur=c(2*pt),yr=Dt*Dt,Er=bt*bt,jr=c(lt),Qr=r(lt/2),ha=c(lt/2),Aa=ha*ha,Da=1-Er*Qr*Qr,ci=Da?z(bt*Qr)*F(Vi=1/Da):Vi=0,Vi,ji=.5*(2*ci*bt*ha+lt/A)-qe,on=.5*(ci*Dt+pt)-$e,An=.5*Vi*(Er*Aa+ci*bt*Qr*yr)+.5/A,Kn=Vi*(jr*ur/4-ci*Dt*ha),Bn=.125*Vi*(ur*ha-ci*Dt*Er*jr),Ao=.5*Vi*(yr*Qr+ci*Aa*bt)+.5,ls=Kn*Bn-Ao*An,Mo=(on*Kn-ji*Ao)/ls,Yo=(ji*Bn-on*An)/ls;lt-=Mo,pt-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Et>0);return[lt,pt]};function na(){return _.geoProjection(Kr).scale(158.837)}v.geoNaturalEarth=_.geoNaturalEarth1,v.geoNaturalEarthRaw=_.geoNaturalEarth1Raw,v.geoAiry=$,v.geoAiryRaw=W,v.geoAitoff=ce,v.geoAitoffRaw=ue,v.geoArmadillo=Y,v.geoArmadilloRaw=de,v.geoAugust=Q,v.geoAugustRaw=X,v.geoBaker=j,v.geoBakerRaw=ae,v.geoBerghaus=te,v.geoBerghausRaw=ee,v.geoBertin1953=at,v.geoBertin1953Raw=je,v.geoBoggs=Ze,v.geoBoggsRaw=Ce,v.geoBonne=Bt,v.geoBonneRaw=kt,v.geoBottomley=Ar,v.geoBottomleyRaw=Vt,v.geoBromley=qr,v.geoBromleyRaw=vr,v.geoChamberlin=Le,v.geoChamberlinRaw=Fe,v.geoChamberlinAfrica=Ae,v.geoCollignon=Ke,v.geoCollignonRaw=We,v.geoCraig=ot,v.geoCraigRaw=st,v.geoCraster=Pt,v.geoCrasterRaw=Ct,v.geoCylindricalEqualArea=cr,v.geoCylindricalEqualAreaRaw=jt,v.geoCylindricalStereographic=nr,v.geoCylindricalStereographicRaw=or,v.geoEckert1=_a,v.geoEckert1Raw=Pr,v.geoEckert2=Ra,v.geoEckert2Raw=Fa,v.geoEckert3=Wa,v.geoEckert3Raw=qa,v.geoEckert4=hi,v.geoEckert4Raw=Ca,v.geoEckert5=Yt,v.geoEckert5Raw=wi,v.geoEckert6=Zt,v.geoEckert6Raw=Rt,v.geoEisenlohr=ta,v.geoEisenlohrRaw=Fr,v.geoFahey=Ba,v.geoFaheyRaw=ca,v.geoFoucaut=Za,v.geoFoucautRaw=$a,v.geoFoucautSinusoidal=pi,v.geoFoucautSinusoidalRaw=ri,v.geoGilbert=tn,v.geoGingery=Or,v.geoGingeryRaw=cn,v.geoGinzburg4=Rr,v.geoGinzburg4Raw=wr,v.geoGinzburg5=Hr,v.geoGinzburg5Raw=Nr,v.geoGinzburg6=Kt,v.geoGinzburg6Raw=gt,v.geoGinzburg8=Ir,v.geoGinzburg8Raw=mr,v.geoGinzburg9=Pa,v.geoGinzburg9Raw=va,v.geoGringorten=ki,v.geoGringortenRaw=la,v.geoGuyou=bo,v.geoGuyouRaw=En,v.geoHammer=Se,v.geoHammerRaw=pe,v.geoHammerRetroazimuthal=wo,v.geoHammerRetroazimuthalRaw=zs,v.geoHealpix=ss,v.geoHealpixRaw=ys,v.geoHill=ps,v.geoHillRaw=_s,v.geoHomolosine=lo,v.geoHomolosineRaw=bs,v.geoHufnagel=ws,v.geoHufnagelRaw=Zo,v.geoHyperelliptical=Po,v.geoHyperellipticalRaw=yn,v.geoInterrupt=uo,v.geoInterruptedBoggs=Ks,v.geoInterruptedHomolosine=Ls,v.geoInterruptedMollweide=Es,v.geoInterruptedMollweideHemispheres=lu,v.geoInterruptedSinuMollweide=du,v.geoInterruptedSinusoidal=Uc,v.geoKavrayskiy7=dc,v.geoKavrayskiy7Raw=Bs,v.geoLagrange=uu,v.geoLagrangeRaw=Wc,v.geoLarrivee=Ou,v.geoLarriveeRaw=ic,v.geoLaskowski=vl,v.geoLaskowskiRaw=nl,v.geoLittrow=Xs,v.geoLittrowRaw=As,v.geoLoximuthal=jl,v.geoLoximuthalRaw=nc,v.geoMiller=fl,v.geoMillerRaw=qu,v.geoModifiedStereographic=Ql,v.geoModifiedStereographicRaw=xh,v.geoModifiedStereographicAlaska=Vu,v.geoModifiedStereographicGs48=ql,v.geoModifiedStereographicGs50=Mf,v.geoModifiedStereographicMiller=Ac,v.geoModifiedStereographicLee=nf,v.geoMollweide=he,v.geoMollweideRaw=Ve,v.geoMtFlatPolarParabolic=jc,v.geoMtFlatPolarParabolicRaw=of,v.geoMtFlatPolarQuartic=Nf,v.geoMtFlatPolarQuarticRaw=Bf,v.geoMtFlatPolarSinusoidal=Ef,v.geoMtFlatPolarSinusoidalRaw=Gu,v.geoNaturalEarth2=Zc,v.geoNaturalEarth2Raw=oc,v.geoNellHammer=qc,v.geoNellHammerRaw=eu,v.geoInterruptedQuarticAuthalic=Zs,v.geoNicolosi=fh,v.geoNicolosiRaw=kf,v.geoPatterson=yu,v.geoPattersonRaw=vc,v.geoPolyconic=Ml,v.geoPolyconicRaw=Tu,v.geoPolyhedral=sf,v.geoPolyhedralButterfly=sl,v.geoPolyhedralCollignon=Cf,v.geoPolyhedralWaterman=hl,v.geoProject=nu,v.geoGringortenQuincuncial=Qt,v.geoPeirceQuincuncial=xr,v.geoPierceQuincuncial=xr,v.geoQuantize=aa,v.geoQuincuncial=Pc,v.geoRectangularPolyconic=ka,v.geoRectangularPolyconicRaw=$r,v.geoRobinson=Hi,v.geoRobinsonRaw=Ci,v.geoSatellite=Pi,v.geoSatelliteRaw=pn,v.geoSinuMollweide=qs,v.geoSinuMollweideRaw=Pn,v.geoSinusoidal=St,v.geoSinusoidalRaw=Je,v.geoStitch=ll,v.geoTimes=Ro,v.geoTimesRaw=Un,v.geoTwoPointAzimuthal=Iu,v.geoTwoPointAzimuthalRaw=Fs,v.geoTwoPointAzimuthalUsa=cu,v.geoTwoPointEquidistant=bu,v.geoTwoPointEquidistantRaw=Zu,v.geoTwoPointEquidistantUsa=Ic,v.geoVanDerGrinten=Au,v.geoVanDerGrintenRaw=Rc,v.geoVanDerGrinten2=fo,v.geoVanDerGrinten2Raw=yc,v.geoVanDerGrinten3=Dc,v.geoVanDerGrinten3Raw=Fo,v.geoVanDerGrinten4=Yu,v.geoVanDerGrinten4Raw=lc,v.geoWagner=ie,v.geoWagner7=Te,v.geoWagnerRaw=I,v.geoWagner4=wt,v.geoWagner4Raw=ht,v.geoWagner6=$t,v.geoWagner6Raw=Ot,v.geoWiechel=Sr,v.geoWiechelRaw=Tr,v.geoWinkel3=na,v.geoWinkel3Raw=Kr,Object.defineProperty(v,"__esModule",{value:!0})})}}),VU=He({"src/plots/geo/zoom.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=so(),M=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(g,y){var D=g.projection,P;return y._isScoped?P=n:y._isClipped?P=h:P=s,P(g,D)}q.exports=o;function a(g,y){return v.behavior.zoom().translate(y.translate()).scale(y.scale())}function i(g,y,D){var P=g.id,z=g.graphDiv,F=z.layout,N=F[P],O=z._fullLayout,L=O[P],U={},B={};function W($,ue){U[P+"."+$]=_.nestedProperty(N,$).get(),S.call("_storeDirectGUIEdit",F,O._preGUI,U);var ce=_.nestedProperty(L,$);ce.get()!==ue&&(ce.set(ue),_.nestedProperty(N,$).set(ue),B[P+"."+$]=ue)}D(W),W("projection.scale",y.scale()/g.fitScale),W("fitbounds",!1),z.emit("plotly_relayout",B)}function n(g,y){var D=a(g,y);function P(){v.select(this).style(t)}function z(){y.scale(v.event.scale).translate(v.event.translate),g.render(!0);var O=y.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var L=y.invert(g.midPt);O("center.lon",L[0]),O("center.lat",L[1])}function N(){v.select(this).style(r),i(g,y,F)}return D.on("zoomstart",P).on("zoom",z).on("zoomend",N),D}function s(g,y){var D=a(g,y),P=2,z,F,N,O,L,U,B,W,$;function ue(V){return y.invert(V)}function ce(V){var le=ue(V);if(!le)return!0;var ae=y(le);return Math.abs(ae[0]-V[0])>P||Math.abs(ae[1]-V[1])>P}function de(){v.select(this).style(t),z=v.mouse(this),F=y.rotate(),N=y.translate(),O=F,L=ue(z)}function Y(){if(U=v.mouse(this),ce(z)){D.scale(y.scale()),D.translate(y.translate());return}y.scale(v.event.scale),y.translate([N[0],v.event.translate[1]]),L?ue(U)&&(W=ue(U),B=[O[0]+(W[0]-L[0]),F[1],F[2]],y.rotate(B),O=B):(z=U,L=ue(z)),$=!0,g.render(!0);var V=y.rotate(),le=y.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.center.lon":le[0],"geo.center.lat":le[1],"geo.projection.rotation.lon":-V[0]})}function X(){v.select(this).style(r),$&&i(g,y,Q)}function Q(V){var le=y.rotate(),ae=y.invert(g.midPt);V("projection.rotation.lon",-le[0]),V("center.lon",ae[0]),V("center.lat",ae[1])}return D.on("zoomstart",de).on("zoom",Y).on("zoomend",X),D}function h(g,y){var D={r:y.rotate(),k:y.scale()},P=a(g,y),z=u(P,"zoomstart","zoom","zoomend"),F=0,N=P.on,O;P.on("zoomstart",function(){v.select(this).style(t);var $=v.mouse(this),ue=y.rotate(),ce=ue,de=y.translate(),Y=m(ue);O=f(y,$),N.call(P,"zoom",function(){var X=v.mouse(this);if(y.scale(D.k=v.event.scale),!O)$=X,O=f(y,$);else if(f(y,X)){y.rotate(ue).translate(de);var Q=f(y,X),V=T(O,Q),le=E(c(Y,V)),ae=D.r=l(le,O,ce);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=ce),y.rotate(ae),ce=ae}U(z.of(this,arguments))}),L(z.of(this,arguments))}).on("zoomend",function(){v.select(this).style(r),N.call(P,"zoom",null),B(z.of(this,arguments)),i(g,y,W)}).on("zoom.redraw",function(){g.render(!0);var $=y.rotate();g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function L($){F++||$({type:"zoomstart"})}function U($){$({type:"zoom"})}function B($){--F||$({type:"zoomend"})}function W($){var ue=y.rotate();$("projection.rotation.lon",-ue[0]),$("projection.rotation.lat",-ue[1])}return v.rebind(P,z,"on")}function f(g,y){var D=g.invert(y);return D&&isFinite(D[0])&&isFinite(D[1])&&p(D)}function m(g){var y=.5*g[0]*M,D=.5*g[1]*M,P=.5*g[2]*M,z=Math.sin(y),F=Math.cos(y),N=Math.sin(D),O=Math.cos(D),L=Math.sin(P),U=Math.cos(P);return[F*O*U+z*N*L,z*O*U-F*N*L,F*N*U+z*O*L,F*O*L-z*N*U]}function c(g,y){var D=g[0],P=g[1],z=g[2],F=g[3],N=y[0],O=y[1],L=y[2],U=y[3];return[D*N-P*O-z*L-F*U,D*O+P*N+z*U-F*L,D*L-P*U+z*N+F*O,D*U+P*L-z*O+F*N]}function T(g,y){if(!(!g||!y)){var D=d(g,y),P=Math.sqrt(b(D,D)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(g,y)))),F=Math.sin(z)/P;return P&&[Math.cos(z),D[2]*F,-D[1]*F,D[0]*F]}}function l(g,y,D){var P=A(y,2,g[0]);P=A(P,1,g[1]),P=A(P,0,g[2]-D[2]);var z=y[0],F=y[1],N=y[2],O=P[0],L=P[1],U=P[2],B=Math.atan2(F,z)*e,W=Math.sqrt(z*z+F*F),$,ue;Math.abs(L)>W?(ue=(L>0?90:-90)-B,$=0):(ue=Math.asin(L/W)*e-B,$=Math.sqrt(W*W-L*L));var ce=180-ue-2*B,de=(Math.atan2(U,O)-Math.atan2(N,$))*e,Y=(Math.atan2(U,O)-Math.atan2(N,-$))*e,X=x(D[0],D[1],ue,de),Q=x(D[0],D[1],ce,Y);return X<=Q?[ue,de,D[2]]:[ce,Y,D[2]]}function x(g,y,D,P){var z=w(D-g),F=w(P-y);return Math.sqrt(z*z+F*F)}function w(g){return(g%360+540)%360-180}function A(g,y,D){var P=D*M,z=g.slice(),F=y===0?1:0,N=y===2?1:2,O=Math.cos(P),L=Math.sin(P);return z[F]=g[F]*O-g[N]*L,z[N]=g[N]*O+g[F]*L,z}function E(g){return[Math.atan2(2*(g[0]*g[1]+g[2]*g[3]),1-2*(g[1]*g[1]+g[2]*g[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(g[0]*g[2]-g[3]*g[1]))))*e,Math.atan2(2*(g[0]*g[3]+g[1]*g[2]),1-2*(g[2]*g[2]+g[3]*g[3]))*e]}function p(g){var y=g[0]*M,D=g[1]*M,P=Math.cos(D);return[P*Math.cos(y),P*Math.sin(y),Math.sin(D)]}function b(g,y){for(var D=0,P=0,z=g.length;P0&&B._module.calcGeoJSON(U,F)}if(!N){var W=this.updateProjection(z,F);if(W)return;(!this.viewInitial||this.scope!==O.scope)&&this.saveViewInitial(O)}this.scope=O.scope,this.updateBaseLayers(F,O),this.updateDims(F,O),this.updateFx(F,O),s.generalUpdatePerTraceModule(this.graphDiv,this,z,O);var $=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=$.selectAll(".point"),this.dataPoints.text=$.selectAll("text"),this.dataPaths.line=$.selectAll(".js-line");var ue=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ue.selectAll("path"),this._render()},g.updateProjection=function(z,F){var N,O=this.graphDiv,L=F[this.id],U=F._size,B=L.domain,W=L.projection,$=L.lonaxis,ue=L.lataxis,ce=$._ax,de=ue._ax,Y=this.projection=y(L),X=[[U.l+U.w*B.x[0],U.t+U.h*(1-B.y[1])],[U.l+U.w*B.x[1],U.t+U.h*(1-B.y[0])]],Q=L.center||{},V=W.rotation||{},le=$.range||[],ae=ue.range||[];if(L.fitbounds){if(ce._length=X[1][0]-X[0][0],de._length=X[1][1]-X[0][1],ce.range=f(O,ce),de.range=f(O,de),!this.hasChoropleth&&L.fitbounds==="locations"){for(var j=[],ee=!1,te=0;te0?(ce.range[1]-ce.range[0]-je)/2*(Pe[1]-Pe[0])/je:0;ce.range=[Pe[0]-at,Pe[1]+at]}}}var nt=(ce.range[0]+ce.range[1])/2,tt=(de.range[0]+de.range[1])/2;if(L._isScoped)Q={lon:nt,lat:tt};else if(L._isClipped){Q={lon:nt,lat:tt},V={lon:nt,lat:tt,roll:V.roll};var Ve=W.type,he=w.lonaxisSpan[Ve]/2||180,se=w.lataxisSpan[Ve]/2||90;le=[nt-he,nt+he],ae=[tt-se,tt+se]}else Q={lon:nt,lat:tt},V={lon:nt,lat:V.lat,roll:V.roll}}Y.center([Q.lon-V.lon,Q.lat-V.lat]).rotate([-V.lon,-V.lat,V.roll]).parallels(W.parallels);var ne=P(le,ae);Y.fitExtent(X,ne);var Ce=this.bounds=Y.getBounds(ne),Ze=this.fitScale=Y.scale(),rt=Y.translate();if(L.fitbounds){var Je=Y.getBounds(P(ce.range,de.range)),St=Math.min((Ce[1][0]-Ce[0][0])/(Je[1][0]-Je[0][0]),(Ce[1][1]-Ce[0][1])/(Je[1][1]-Je[0][1]));isFinite(St)?Y.scale(St*Ze):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Y.scale(W.scale*Ze);var kt=this.midPt=[(Ce[0][0]+Ce[1][0])/2,(Ce[0][1]+Ce[1][1])/2];if(Y.translate([rt[0]+(kt[0]-rt[0]),rt[1]+(kt[1]-rt[1])]).clipExtent(Ce),L._isAlbersUsa){var Bt=Y([Q.lon,Q.lat]),Vt=Y.translate();Y.translate([Vt[0]-(Bt[0]-Vt[0]),Vt[1]-(Bt[1]-Vt[1])])}},g.updateBaseLayers=function(z,F){var N=this,O=N.topojson,L=N.layers,U=N.basePaths;function B(Y){return Y==="lonaxis"||Y==="lataxis"}function W(Y){return!!w.lineLayers[Y]}function $(Y){return!!w.fillLayers[Y]}var ue=this.hasChoropleth?w.layersForChoropleth:w.layers,ce=ue.filter(function(Y){return W(Y)||$(Y)?F["show"+Y]:B(Y)?F[Y].showgrid:!0}),de=N.framework.selectAll(".layer").data(ce,String);de.exit().each(function(Y){delete L[Y],delete U[Y],v.select(this).remove()}),de.enter().append("g").attr("class",function(Y){return"layer "+Y}).each(function(Y){var X=L[Y]=v.select(this);Y==="bg"?N.bgRect=X.append("rect").style("pointer-events","all"):B(Y)?U[Y]=X.append("path").style("fill","none"):Y==="backplot"?X.append("g").classed("choroplethlayer",!0):Y==="frontplot"?X.append("g").classed("scatterlayer",!0):W(Y)?U[Y]=X.append("path").style("fill","none").style("stroke-miterlimit",2):$(Y)&&(U[Y]=X.append("path").style("stroke","none"))}),de.order(),de.each(function(Y){var X=U[Y],Q=w.layerNameToAdjective[Y];Y==="frame"?X.datum(w.sphereSVG):W(Y)||$(Y)?X.datum(d(O,O.objects[Y])):B(Y)&&X.datum(D(Y,F,z)).call(a.stroke,F[Y].gridcolor).call(i.dashLine,F[Y].griddash,F[Y].gridwidth),W(Y)?X.call(a.stroke,F[Q+"color"]).call(i.dashLine,"",F[Q+"width"]):$(Y)&&X.call(a.fill,F[Q+"color"])})},g.updateDims=function(z,F){var N=this.bounds,O=(F.framewidth||0)/2,L=N[0][0]-O,U=N[0][1]-O,B=N[1][0]-L+O,W=N[1][1]-U+O;i.setRect(this.clipRect,L,U,B,W),this.bgRect.call(i.setRect,L,U,B,W).call(a.fill,F.bgcolor),this.xaxis._offset=L,this.xaxis._length=B,this.yaxis._offset=U,this.yaxis._length=W},g.updateFx=function(z,F){var N=this,O=N.graphDiv,L=N.bgRect,U=z.dragmode,B=z.clickmode;if(N.isStatic)return;function W(){var de=N.viewInitial,Y={};for(var X in de)Y[N.id+"."+X]=de[X];t.call("_guiRelayout",O,Y),O.emit("plotly_doubleclick",null)}function $(de){return N.projection.invert([de[0]+N.xaxis._offset,de[1]+N.yaxis._offset])}var ue=function(de,Y){if(Y.isRect){var X=de.range={};X[N.id]=[$([Y.xmin,Y.ymin]),$([Y.xmax,Y.ymax])]}else{var Q=de.lassoPoints={};Q[N.id]=Y.map($)}},ce={element:N.bgRect.node(),gd:O,plotinfo:{id:N.id,xaxis:N.xaxis,yaxis:N.yaxis,fillRangeItems:ue},xaxes:[N.xaxis],yaxes:[N.yaxis],subplot:N.id,clickFn:function(de){de===2&&T(O)}};U==="pan"?(L.node().onmousedown=null,L.call(x(N,F)),L.on("dblclick.zoom",W),O._context._scrollZoom.geo||L.on("wheel.zoom",null)):(U==="select"||U==="lasso")&&(L.on(".zoom",null),ce.prepFn=function(de,Y,X){c(de,Y,X,ce,U)},m.init(ce)),L.on("mousemove",function(){var de=N.projection.invert(r.getPositionFromD3Event());if(!de)return m.unhover(O,v.event);N.xaxis.p2c=function(){return de[0]},N.yaxis.p2c=function(){return de[1]},n.hover(O,v.event,N.id)}),L.on("mouseout",function(){O._dragging||m.unhover(O,v.event)}),L.on("click",function(){U!=="select"&&U!=="lasso"&&(B.indexOf("select")>-1&&l(v.event,O,[N.xaxis],[N.yaxis],N.id,ce),B.indexOf("event")>-1&&n.click(O,v.event))})},g.makeFramework=function(){var z=this,F=z.graphDiv,N=F._fullLayout,O="clip"+N._uid+z.id;z.clipDef=N._clips.append("clipPath").attr("id",O),z.clipRect=z.clipDef.append("rect"),z.framework=v.select(z.container).append("g").attr("class","geo "+z.id).call(i.setClipUrl,O,F),z.project=function(L){var U=z.projection(L);return U?[U[0]-z.xaxis._offset,U[1]-z.yaxis._offset]:[null,null]},z.xaxis={_id:"x",c2p:function(L){return z.project(L)[0]}},z.yaxis={_id:"y",c2p:function(L){return z.project(L)[1]}},z.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(z.mockAxis,N)},g.saveViewInitial=function(z){var F=z.center||{},N=z.projection,O=N.rotation||{};this.viewInitial={fitbounds:z.fitbounds,"projection.scale":N.scale};var L;z._isScoped?L={"center.lon":F.lon,"center.lat":F.lat}:z._isClipped?L={"projection.rotation.lon":O.lon,"projection.rotation.lat":O.lat}:L={"center.lon":F.lon,"center.lat":F.lat,"projection.rotation.lon":O.lon},r.extendFlat(this.viewInitial,L)},g.render=function(z){this._hasMarkerAngles&&z?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},g._render=function(){var z=this.projection,F=z.getPath(),N;function O(U){var B=z(U.lonlat);return B?o(B[0],B[1]):null}function L(U){return z.isLonLatOverEdges(U.lonlat)?"none":null}for(N in this.basePaths)this.basePaths[N].attr("d",F);for(N in this.dataPaths)this.dataPaths[N].attr("d",function(U){return F(U.geojson)});for(N in this.dataPoints)this.dataPoints[N].attr("display",L).attr("transform",O)};function y(z){var F=z.projection,N=F.type,O=w.projNames[N];O="geo"+r.titleCase(O);for(var L=_[O]||e[O],U=L(),B=z._isSatellite?Math.acos(1/F.distance)*180/Math.PI:z._isClipped?w.lonaxisSpan[N]/2:null,W=["center","rotate","parallels","clipExtent"],$=function(de){return de?U:[]},ue=0;ueQ}else return!1},U.getPath=function(){return S().projection(U)},U.getBounds=function(de){return U.getPath().bounds(de)},U.precision(w.precision),z._isSatellite&&U.tilt(F.tilt).distance(F.distance),B&&U.clipAngle(B-w.clipPad),U}function D(z,F,N){var O=1e-6,L=2.5,U=F[z],B=w.scopeDefaults[F.scope],W,$,ue;z==="lonaxis"?(W=B.lonaxisRange,$=B.lataxisRange,ue=function(j,ee){return[j,ee]}):z==="lataxis"&&(W=B.lataxisRange,$=B.lonaxisRange,ue=function(j,ee){return[ee,j]});var ce={type:"linear",range:[W[0],W[1]-O],tick0:U.tick0,dtick:U.dtick};h.setConvert(ce,N);var de=h.calcTicks(ce);!F.isScoped&&z==="lonaxis"&&de.pop();for(var Y=de.length,X=new Array(Y),Q=0;Q")}}}}),fT=He({"src/traces/choropleth/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){_.location=S.location,_.z=S.z;var r=e[t];return r.fIn&&r.fIn.properties&&(_.properties=r.fIn.properties),_.ct=r.ct,_}}}),hT=He({"src/traces/choropleth/select.js"(Z,q){"use strict";q.exports=function(_,S){var M=_.cd,e=_.xaxis,t=_.yaxis,r=[],o,a,i,n,s;if(S===!1)for(o=0;o=Math.min(B,W)&&T<=Math.max(B,W)?0:1/0}if(P=Math.min($,ue)&&l<=Math.max($,ue)?0:1/0}N=Math.sqrt(P*P+z*z),u=w[D]}}}else for(D=w.length-1;D>-1;D--)d=w[D],g=m[d],y=c[d],P=h.c2p(g)-T,z=f.c2p(y)-l,F=Math.sqrt(P*P+z*z),F100},Z.isDotSymbol=function(v){return typeof v=="string"?q.DOT_RE.test(v):v>200}}}),JU=He({"src/traces/scattergl/defaults.js"(Z,q){"use strict";var v=sa(),_=so(),S=dT(),M=xx(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),i=Dd(),n=ev(),s=zd();q.exports=function(f,m,c,T){function l(u,g){return v.coerce(f,m,M,u,g)}var x=f.marker?S.isOpenSymbol(f.marker.symbol):!1,w=t.isBubble(f),A=r(f,m,T,l);if(!A){m.visible=!1;return}o(f,m,T,l),l("xhoverformat"),l("yhoverformat");var E=A>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m>=0?(s=h,n=h-1):i=h+1}return s}function _(r,o,a,i,n){for(var s=n+1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m>0?(s=h,n=h-1):i=h+1}return s}function S(r,o,a,i,n){for(var s=i-1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m<0?(s=h,i=h+1):n=h-1}return s}function M(r,o,a,i,n){for(var s=i-1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m<=0?(s=h,i=h+1):n=h-1}return s}function e(r,o,a,i,n){for(;i<=n;){var s=i+n>>>1,h=r[s],f=a!==void 0?a(h,o):h-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,v)},gt:function(r,o,a,i,n){return t(r,o,a,i,n,_)},lt:function(r,o,a,i,n){return t(r,o,a,i,n,S)},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)}}}}),kv=He({"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=_(e)),Array.isArray(e)){var i={};for(a=0;a1&&(S=arguments),typeof S=="string"?S=S.split(/\s/).map(parseFloat):typeof S=="number"&&(S=[S]),S.length&&typeof S[0]=="number"?S.length===1?M={width:S[0],height:S[0],x:0,y:0}:S.length===2?M={width:S[0],height:S[1],x:0,y:0}:M={x:S[0],y:S[1],width:S[2]-S[0]||0,height:S[3]-S[1]||0}:S&&(S=v(S,{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:S.left||0,y:S.top||0},S.width==null?S.right?M.width=S.right-M.x:M.width=0:M.width=S.width,S.height==null?S.bottom?M.height=S.bottom-M.y:M.height=0:M.height=S.height),M}}}),mg=He({"node_modules/array-bounds/index.js"(Z,q){"use strict";q.exports=v;function v(_,S){if(!_||_.length==null)throw Error("Argument should be an array");S==null?S=1:S=Math.floor(S);for(var M=Array(S*2),e=0;et&&(t=_[o]),_[o]>>1,w;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?w=new(a(m.dtype))(x):m.dtype&&(w=m.dtype,Array.isArray(w)&&(w.length=x));for(let P=0;Pc||L>n){for(let le=0;lete||W>pe||$=ce||j===ee)return;let we=A[ae];ee===void 0&&(ee=we.length);for(let he=j;he=N&&ne<=L&&Ce>=O&&Ce<=U&&de.push(se)}let Se=E[ae],Re=Se[j*4+0],Pe=Se[j*4+1],je=Se[j*4+2],at=Se[j*4+3],nt=X(Se,j+1),tt=le*.5,Ve=ae+1;Y(Q,V,tt,Ve,Re,Pe||je||at||nt),Y(Q,V+tt,tt,Ve,Pe,je||at||nt),Y(Q+tt,V,tt,Ve,je,at||nt),Y(Q+tt,V+tt,tt,Ve,at,nt)}function X(Q,V){let le=null,ae=0;for(;le===null;)if(le=Q[V*4+ae],ae++,ae>Q.length)return null;return le}return de}function y(P,z,F,N,O){let L=[];for(let U=0;U1&&(f=1),f<-1&&(f=-1),h*Math.acos(f)},t=function(a,i,n,s,h,f,m,c,T,l,x,w){var A=Math.pow(h,2),E=Math.pow(f,2),p=Math.pow(x,2),b=Math.pow(w,2),d=A*E-A*b-E*p;d<0&&(d=0),d/=A*b+E*p,d=Math.sqrt(d)*(m===c?-1:1);var u=d*h/f*w,g=d*-f/h*x,y=l*u-T*g+(a+n)/2,D=T*u+l*g+(i+s)/2,P=(x-u)/h,z=(w-g)/f,F=(-x-u)/h,N=(-w-g)/f,O=e(1,0,P,z),L=e(P,z,F,N);return c===0&&L>0&&(L-=_),c===1&&L<0&&(L+=_),[y,D,O,L]},r=function(a){var i=a.px,n=a.py,s=a.cx,h=a.cy,f=a.rx,m=a.ry,c=a.xAxisRotation,T=c===void 0?0:c,l=a.largeArcFlag,x=l===void 0?0:l,w=a.sweepFlag,A=w===void 0?0:w,E=[];if(f===0||m===0)return[];var p=Math.sin(T*_/360),b=Math.cos(T*_/360),d=b*(i-s)/2+p*(n-h)/2,u=-p*(i-s)/2+b*(n-h)/2;if(d===0&&u===0)return[];f=Math.abs(f),m=Math.abs(m);var g=Math.pow(d,2)/Math.pow(f,2)+Math.pow(u,2)/Math.pow(m,2);g>1&&(f*=Math.sqrt(g),m*=Math.sqrt(g));var y=t(i,n,s,h,f,m,x,A,p,b,d,u),D=v(y,4),P=D[0],z=D[1],F=D[2],N=D[3],O=Math.abs(N)/(_/4);Math.abs(1-O)<1e-7&&(O=1);var L=Math.max(Math.ceil(O),1);N/=L;for(var U=0;U4?(o=l[l.length-4],a=l[l.length-3]):(o=f,a=m),r.push(l)}return r}function S(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]}}}),UE=He({"node_modules/is-svg-path/index.js"(Z,q){"use strict";q.exports=function(_){return typeof _!="string"?!1:(_=_.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(_)&&/[\dz]$/i.test(_)&&_.length>4))}}}),oj=He({"node_modules/svg-path-bounds/index.js"(Z,q){"use strict";var v=M_(),_=NE(),S=nj(),M=UE(),e=K_();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=v(r)),e(Array.isArray(r),"Argument should be a string or an array of path segments."),r=_(r),r=S(r),!r.length)return[0,0,0,0];for(var o=[1/0,1/0,-1/0,-1/0],a=0,i=r.length;ao[2]&&(o[2]=n[s+0]),n[s+1]>o[3]&&(o[3]=n[s+1]);return o}}}),sj=He({"node_modules/normalize-svg-path/index.js"(Z,q){var v=Math.PI,_=o(120);q.exports=S;function S(a){for(var i,n=[],s=0,h=0,f=0,m=0,c=null,T=null,l=0,x=0,w=0,A=a.length;w7&&(n.push(E.splice(0,7)),E.unshift("C"));break;case"S":var b=l,d=x;(i=="C"||i=="S")&&(b+=b-s,d+=d-h),E=["C",b,d,E[1],E[2],E[3],E[4]];break;case"T":i=="Q"||i=="T"?(c=l*2-c,T=x*2-T):(c=l,T=x),E=e(l,x,c,T,E[1],E[2]);break;case"Q":c=E[1],T=E[2],E=e(l,x,E[1],E[2],E[3],E[4]);break;case"L":E=M(l,x,E[1],E[2]);break;case"H":E=M(l,x,E[1],x);break;case"V":E=M(l,x,l,E[1]);break;case"Z":E=M(l,x,f,m);break}i=p,l=E[E.length-2],x=E[E.length-1],E.length>4?(s=E[E.length-4],h=E[E.length-3]):(s=l,h=x),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,h,f){return["C",a/3+2/3*n,i/3+2/3*s,h/3+2/3*n,f/3+2/3*s,h,f]}function t(a,i,n,s,h,f,m,c,T,l){if(l)y=l[0],D=l[1],u=l[2],g=l[3];else{var x=r(a,i,-h);a=x.x,i=x.y,x=r(c,T,-h),c=x.x,T=x.y;var w=(a-c)/2,A=(i-T)/2,E=w*w/(n*n)+A*A/(s*s);E>1&&(E=Math.sqrt(E),n=E*n,s=E*s);var p=n*n,b=s*s,d=(f==m?-1:1)*Math.sqrt(Math.abs((p*b-p*A*A-b*w*w)/(p*A*A+b*w*w)));d==1/0&&(d=1);var u=d*n*A/s+(a+c)/2,g=d*-s*w/n+(i+T)/2,y=Math.asin(((i-g)/s).toFixed(9)),D=Math.asin(((T-g)/s).toFixed(9));y=aD&&(y=y-v*2),!m&&D>y&&(D=D-v*2)}if(Math.abs(D-y)>_){var P=D,z=c,F=T;D=y+_*(m&&D>y?1:-1),c=u+n*Math.cos(D),T=g+s*Math.sin(D);var N=t(c,T,n,s,h,0,m,z,F,[D,P,u,g])}var O=Math.tan((D-y)/4),L=4/3*n*O,U=4/3*s*O,B=[2*a-(a+L*Math.sin(y)),2*i-(i-U*Math.cos(y)),c+L*Math.sin(D),T-U*Math.cos(D),c,T];if(l)return B;N&&(B=B.concat(N));for(var W=0;W0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(c)),r.translate(h*.5,f*.5),r.scale(x,x),i()){var w=new Path2D(n);r.fill(w),c&&r.stroke(w)}else{var A=_(n);S(r,A),r.fill(),c&&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:m*.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 h=n.getImageData(0,0,1,1);return a=h&&h.data&&h.data[3]===255}}}),yg=He({"src/traces/scattergl/convert.js"(Z,q){"use strict";var v=ns(),_=cj(),S=v0(),M=so(),e=sa(),t=e.isArrayOrTypedArray,r=as(),o=tf(),a=rm().formatColor,i=Fu(),n=r1(),s=dT(),h=y0(),f=Km().DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},c=$p().appendArrayPointValue;function T(N,O){var L,U={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},B=N._context.plotGlPixelRatio;if(O.visible!==!0)return U;if(i.hasText(O)&&(U.text=l(N,O),U.textSel=E(N,O,O.selected),U.textUnsel=E(N,O,O.unselected)),i.hasMarkers(O)&&(U.marker=w(N,O),U.markerSel=A(N,O,O.selected),U.markerUnsel=A(N,O,O.unselected),!O.unselected&&t(O.marker.opacity))){var W=O.marker.opacity;for(U.markerUnsel.opacity=new Array(W.length),L=0;L500?"bold":"normal":N}function w(N,O){var L=O._length,U=O.marker,B={},W,$=t(U.symbol),ue=t(U.angle),ce=t(U.color),de=t(U.line.color),Y=t(U.opacity),X=t(U.size),Q=t(U.line.width),V;if($||(V=s.isOpenSymbol(U.symbol)),$||ce||de||Y||ue){B.symbols=new Array(L),B.angles=new Array(L),B.colors=new Array(L),B.borderColors=new Array(L);var le=U.symbol,ae=U.angle,j=a(U,U.opacity,L),ee=a(U.line,U.opacity,L);if(!t(ee[0])){var te=ee;for(ee=Array(L),W=0;Wh.TOO_MANY_POINTS||i.hasMarkers(O)?"rect":"round";if(de&&O.connectgaps){var X=W[0],Q=W[1];for($=0;$1?ce[$]:ce[0]:ce,V=t(de)?de.length>1?de[$]:de[0]:de,le=m[Q],ae=m[V],j=Y?Y/.8+1:0,ee=-ae*j-ae*.5;W.offset[$]=[le*j/X,ee/X]}}return W}q.exports={style:T,markerStyle:w,markerSelection:A,linePositions:P,errorBarPositions:z,textPosition:F}}}),jE=He({"src/traces/scattergl/scene_update.js"(Z,q){"use strict";var v=sa();q.exports=function(S,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(){v.extendFlat(e,r,t)},e.init(),e.update=function(a){var i=v.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=f,u=b*2,g={},y,D=A.makeCalcdata(x,"x"),P=E.makeCalcdata(x,"y"),z=e(x,A,"x",D),F=e(x,E,"y",P),N=z.vals,O=F.vals;x._x=N,x._y=O,x.xperiodalignment&&(x._origX=D,x._xStarts=z.starts,x._xEnds=z.ends),x.yperiodalignment&&(x._origY=P,x._yStarts=F.starts,x._yEnds=F.ends);var L=new Array(u),U=new Array(b);for(y=0;y1&&_.extendFlat(p.line,n.linePositions(T,x,w)),p.errorX||p.errorY){var b=n.errorBarPositions(T,x,w,A,E);p.errorX&&_.extendFlat(p.errorX,b.x),p.errorY&&_.extendFlat(p.errorY,b.y)}return p.text&&(_.extendFlat(p.text,{positions:w},n.textPosition(T,x,p.text,p.marker)),_.extendFlat(p.textSel,{positions:w},n.textPosition(T,x,p.text,p.markerSel)),_.extendFlat(p.textUnsel,{positions:w},n.textPosition(T,x,p.text,p.markerUnsel))),p}}}),qE=He({"src/traces/scattergl/edit_style.js"(Z,q){"use strict";var v=sa(),_=$n(),S=Km().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],h=a.textOptions[i],f=a.textSelectedOptions[i]||{},m=a.textUnselectedOptions[i]||{},c=v.extendFlat({},h),T,l;if(n.length||s.length){var x=f.color,w=m.color,A=h.color,E=v.isArrayOrTypedArray(A);for(c.color=new Array(r._length),T=0;T>>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]}}}),ch=He({"node_modules/object-assign/index.js"(Z,q){"use strict";var v=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,S=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;ng.length)&&(y=g.length);for(var D=0,P=new Array(y);D0&&(L=O.size),O.lineSpacing&&O.lineSpacing>0&&(U=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(B.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(B.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(B.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(B.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(B.superscripts=!!O.styletags.superscripts)),N.font=[O.fontStyle,O.fontVariant,O.fontWeight,L+"px",O.font].filter(function($){return $}).join(" "),N.textAlign="start",N.textBaseline="alphabetic",N.direction="ltr";var W=u(F,N,z,L,U,B);return D(W,O,L)}},1538:function(e){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(y){y.permitHostObjects___&&y.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,h=Object.getOwnPropertyNames,f=Object.defineProperty,m=Object.isExtensible,c="weakmap:",T=c+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var l=new ArrayBuffer(25),x=new Uint8Array(l);crypto.getRandomValues(x),T=c+"rand:"+Array.prototype.map.call(x,function(y){return(y%36).toString(36)}).join("")+"___"}function w(y){return!(y.substr(0,c.length)==c&&y.substr(y.length-3)==="___")}if(f(Object,"getOwnPropertyNames",{value:function(D){return h(D).filter(w)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;f(Object,"getPropertyNames",{value:function(D){return A(D).filter(w)}})}function E(y){if(y!==Object(y))throw new TypeError("Not an object: "+y);var D=y[T];if(D&&D.key===y)return D;if(m(y)){D={key:y};try{return f(y,T,{value:D,writable:!1,enumerable:!1,configurable:!1}),D}catch{return}}}(function(){var y=Object.freeze;f(Object,"freeze",{value:function(F){return E(F),y(F)}});var D=Object.seal;f(Object,"seal",{value:function(F){return E(F),D(F)}});var P=Object.preventExtensions;f(Object,"preventExtensions",{value:function(F){return E(F),P(F)}})})();function p(y){return y.prototype=null,Object.freeze(y)}var b=!1;function d(){!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,g=function(){this instanceof g||d();var y=[],D=[],P=u++;function z(L,U){var B,W=E(L);return W?P in W?W[P]:U:(B=y.indexOf(L),B>=0?D[B]:U)}function F(L){var U=E(L);return U?P in U:y.indexOf(L)>=0}function N(L,U){var B,W=E(L);return W?W[P]=U:(B=y.indexOf(L),B>=0?D[B]=U:(B=y.length,D[B]=U,y[B]=L)),this}function O(L){var U=E(L),B,W;return U?P in U&&delete U[P]:(B=y.indexOf(L),B<0?!1:(W=y.length-1,y[B]=void 0,D[B]=D[W],y[B]=y[W],y.length=W,D.length=W,!0))}return Object.create(g.prototype,{get___:{value:p(z)},has___:{value:p(F)},set___:{value:p(N)},delete___:{value:p(O)}})};g.prototype=Object.create(Object.prototype,{get:{value:function(D,P){return this.get___(D,P)},writable:!0,configurable:!0},has:{value:function(D){return this.has___(D)},writable:!0,configurable:!0},set:{value:function(D,P){return this.set___(D,P)},writable:!0,configurable:!0},delete:{value:function(D){return this.delete___(D)},writable:!0,configurable:!0}}),typeof a=="function"?function(){o&&typeof Proxy<"u"&&(Proxy=void 0);function y(){this instanceof g||d();var D=new a,P=void 0,z=!1;function F(U,B){return P?D.has(U)?D.get(U):P.get___(U,B):D.get(U,B)}function N(U){return D.has(U)||(P?P.has___(U):!1)}var O;o?O=function(U,B){return D.set(U,B),D.has(U)||(P||(P=new g),P.set(U,B)),this}:O=function(U,B){if(z)try{D.set(U,B)}catch{P||(P=new g),P.set___(U,B)}else D.set(U,B);return this};function L(U){var B=!!D.delete(U);return P&&P.delete___(U)||B}return Object.create(g.prototype,{get___:{value:p(F)},has___:{value:p(N)},set___:{value:p(O)},delete___:{value:p(L)},permitHostObjects___:{value:p(function(U){if(U===r)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}y.prototype=g.prototype,e.exports=y,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=g)})()},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 h=i(n);return h.hasOwnProperty("value")?h.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,h,f,m,c,T){var l=s[0],x=f[0],w=[0],A=x;m|=0;var E=0,p=x;for(E=0;E=0!=d>=0&&c.push(w[0]+.5+.5*(b+d)/(b-d))}m+=p,++w[0]}}}function r(){return t()}var o=r;function a(s){var h={};return function(m,c,T){var l=m.dtype,x=m.order,w=[l,x.join()].join(),A=h[w];return A||(h[w]=A=s([l,x])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,c,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(){}},_={};function S(e){var t=_[e];if(t!==void 0)return t.exports;var r=_[e]={id:e,loaded:!1,exports:{}};return v[e].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}(function(){S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){S.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}();var M=S(1964);q.exports=M})()}}),xE=He({"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]}}}),HN=He({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,q){"use strict";var v=xE();q.exports=S;var _={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function S(M){var e,t=[],r=1,o;if(typeof M=="string")if(M=M.toLowerCase(),v[M])t=v[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],h=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(c,T){if(/%$/.test(c))return T===i?parseFloat(c)/100:a==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(a[T]==="h"){if(/deg$/.test(c))return parseFloat(c);if(_[c]!==void 0)return _[c]}return parseFloat(c)}),s===a&&t.push(1),r=h||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}}}}),WN=He({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,q){"use strict";var v=HN();q.exports=function(M){Array.isArray(M)&&M.raw&&(M=String.raw.apply(null,arguments));var e,t,r,o=v(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=_(e)),e.push(Math.min(Math.max(o.alpha,0),1)),e};function _(S){var M=S[0]/360,e=S[1]/100,t=S[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}}}),mx=He({"node_modules/clamp/index.js"(Z,q){q.exports=v;function v(_,S,M){return SM?M:_:_S?S:_}}}),Q3=He({"node_modules/dtype/index.js"(Z,q){q.exports=function(v){switch(v){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}}}}),v0=He({"node_modules/color-normalize/index.js"(Z,q){"use strict";var v=WN(),_=mx(),S=Q3();q.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var o=S(r),a=new o(4),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=v(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]=_(Math.floor(t[0]*255),0,255),a[1]=_(Math.floor(t[1]*255),0,255),a[2]=_(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:_(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))}}}),tm=He({"src/lib/str2rgbarray.js"(Z,q){"use strict";var v=v0();function _(S){return S?v(S):[0,0,0,1]}q.exports=_}}),rm=He({"src/lib/gl_format_color.js"(Z,q){"use strict";var v=ns(),_=Ch(),S=v0(),M=rc(),e=sh().defaultLine,t=hp().isArrayOrTypedArray,r=S(e),o=1;function a(f,m){var c=f;return c[3]*=m,c}function i(f){if(v(f))return r;var m=S(f);return m.length?m:r}function n(f){return v(f)?f:o}function s(f,m,c){var T=f.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),x=t(m),w=M.extractOpts(f),A=[],E,p,b,d,u;if(w.colorscale!==void 0?E=M.makeColorScaleFuncFromTrace(f):E=i,l?p=function(y,D){return y[D]===void 0?r:S(E(y[D]))}:p=i,x?b=function(y,D){return y[D]===void 0?o:n(y[D])}:b=n,l||x)for(var g=0;g0){var c=o.c2l(f);o._lowerLogErrorBound||(o._lowerLogErrorBound=c),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,c)}}else i[n]=[-s[0]*r,s[1]*r]}return i}function S(e){for(var t=0;t-1?-1:D.indexOf("right")>-1?1:0}function w(D){return D==null?0:D.indexOf("top")>-1?-1:D.indexOf("bottom")>-1?1:0}function A(D){var P=0,z=0,F=[P,z];if(Array.isArray(D))for(var N=0;N=0){var W=T(U.position,U.delaunayColor,U.delaunayAxis);W.opacity=D.opacity,this.delaunayMesh?this.delaunayMesh.update(W):(W.gl=P,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)},c.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 y(D,P){var z=new m(D,P.uid);return z.update(P),z}q.exports=y}}),wE=He({"src/traces/scatter3d/attributes.js"(Z,q){"use strict";var v=af(),_=tc(),S=ku(),M=rf().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:t,templatefallbackAttrs:r}=$l(),o=au(),a=bE(),i=eT(),n=rs().extendFlat,s=pc().overrideAll,h=$m(),f=v.line,m=v.marker,c=m.line,T=n({width:f.width,dash:{valType:"enumerated",values:h(a),dflt:"solid"}},S("line"));function l(w){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 x=q.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:n({},v.text,{}),texttemplate:t(),texttemplatefallback:r({editType:"calc"}),hovertext:n({},v.hovertext,{}),hovertemplate:e(),hovertemplatefallback:r(),xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z"),mode:n({},v.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:l("x"),y:l("y"),z:l("z")},connectgaps:v.connectgaps,line:T,marker:n({symbol:{valType:"enumerated",values:h(i),dflt:"circle",arrayOk:!0},size:n({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:n({},m.opacity,{arrayOk:!1}),colorbar:m.colorbar,line:n({width:n({},c.width,{arrayOk:!1})},S("marker.line"))},S("marker")),textposition:n({},v.textposition,{dflt:"top center"}),textfont:_({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:o.opacity,hoverinfo:n({},o.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"}}),YN=He({"src/traces/scatter3d/defaults.js"(Z,q){"use strict";var v=so(),_=sa(),S=Fu(),M=md(),e=Dd(),t=zd(),r=wE();q.exports=function(i,n,s,h){function f(E,p){return _.coerce(i,n,r,E,p)}var m=o(i,n,f,h);if(!m){n.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),S.hasMarkers(n)&&M(i,n,s,h,f,{noAngle:!0,noLineDash:!0,noSelect:!0}),S.hasLines(n)&&(f("connectgaps"),e(i,n,s,h,f)),S.hasText(n)&&(f("texttemplate"),f("texttemplatefallback"),t(i,n,h,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(n.line||{}).color,T=(n.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",c||T);for(var l=["x","y","z"],x=0;x<3;++x){var w="projection."+l[x];f(w+".show")&&(f(w+".opacity"),f(w+".scale"))}var A=v.getComponentMethod("errorbars","supplyDefaults");A(i,n,c||T||s,{axis:"z"}),A(i,n,c||T||s,{axis:"y",inherit:"z"}),A(i,n,c||T||s,{axis:"x",inherit:"z"})};function o(a,i,n,s){var h=0,f=n("x"),m=n("y"),c=n("z"),T=v.getComponentMethod("calendars","handleTraceDefaults");return T(a,i,["x","y","z"],s),f&&m&&c&&(h=Math.min(f.length,m.length,c.length),i._length=i._xlength=i._ylength=i._zlength=h),h}}}),KN=He({"src/traces/scatter3d/calc.js"(Z,q){"use strict";var v=Av(),_=Fd();q.exports=function(M,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return v(t,e),_(M,e),t}}}),JN=He({"node_modules/get-canvas-context/index.js"(Z,q){q.exports=v;function v(_,S){if(typeof _!="string")throw new TypeError("must specify type string");if(S=S||{},typeof document>"u"&&!S.canvas)return null;var M=S.canvas||document.createElement("canvas");typeof S.width=="number"&&(M.width=S.width),typeof S.height=="number"&&(M.height=S.height);var e=S,t;try{var r=[_];_.indexOf("webgl")===0&&r.push("experimental-"+_);for(var o=0;o/g," "));n[s]=c,h.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)}}}),rU=He({"src/plots/gl3d/scene.js"(Z,q){"use strict";var v=Kh().gl_plot3d,_=v.createCamera,S=v.createScene,M=$N(),e=b2(),t=so(),r=sa(),o=r.preserveDrawingBuffer(),a=Wo(),i=Hc(),n=tm(),s=TE(),h=U5(),f=QN(),m=eU(),c=tU(),T=Yd().applyAutorangeOptions,l,x,w=!1;function A(z,F){var N=document.createElement("div"),O=z.container;this.graphDiv=z.graphDiv;var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.style.position="absolute",L.style.top=L.style.left="0px",L.style.width=L.style.height="100%",L.style["z-index"]=20,L.style["pointer-events"]="none",N.appendChild(L),this.svgContainer=L,N.id=z.id,N.style.position="absolute",N.style.top=N.style.left="0px",N.style.width=N.style.height="100%",O.appendChild(N),this.fullLayout=F,this.id=z.id||"scene",this.fullSceneLayout=F[this.id],this.plotArgs=[[],{},{}],this.axesOptions=f(F,F[this.id]),this.spikeOptions=m(F[this.id]),this.container=N,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=A.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(!x&&(l=document.createElement("canvas"),x=M({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!x))throw new Error("error creating static canvas/context for image server");F.gl=x,F.canvas=l}return F};var p=!0;E.tryCreatePlot=function(){var z=this,F=z.prepareOptions(),N=!0;try{z.glplot=S(F)}catch{if(z.staticMode||!p||o)N=!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=S(F)}catch{o=F.glOptions.preserveDrawingBuffer=!1,N=!1}}}return p=!1,N},E.initializeGLCamera=function(){var z=this,F=z.fullSceneLayout.camera,N=F.projection.type==="orthographic";z.camera=_(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:N,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 N=z.graphDiv,O=N.layout,L=function(){var B={};return z.isCameraChanged(O)&&(B[z.id+".camera"]=z.getCamera()),z.isAspectChanged(O)&&(B[z.id+".aspectratio"]=z.glplot.getAspectratio(),O[z.id].aspectmode!=="manual"&&(z.fullSceneLayout.aspectmode=O[z.id].aspectmode=B[z.id+".aspectmode"]="manual")),B},U=function(B){if(B.fullSceneLayout.dragmode!==!1){var W=L();B.saveLayout(O),B.graphDiv.emit("plotly_relayout",W)}};return z.glplot.canvas&&(z.glplot.canvas.addEventListener("mouseup",function(){U(z)}),z.glplot.canvas.addEventListener("touchstart",function(){w=!0}),z.glplot.canvas.addEventListener("wheel",function(B){if(N._context._scrollZoom.gl3d){if(z.camera._ortho){var W=B.deltaX>B.deltaY?1.1:.9090909090909091,$=z.glplot.getAspectratio();z.glplot.setAspectratio({x:W*$.x,y:W*$.y,z:W*$.z})}U(z)}},e?{passive:!1}:!1),z.glplot.canvas.addEventListener("mousemove",function(){if(z.fullSceneLayout.dragmode!==!1&&z.camera.mouseListener.buttons!==0){var B=L();z.graphDiv.emit("plotly_relayouting",B)}}),z.staticMode||z.glplot.canvas.addEventListener("webglcontextlost",function(B){N&&N.emit&&N.emit("plotly_webglcontextlost",{event:B,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,N,O=z.svgContainer,L=z.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var U=F._fullLayout._invScaleX,B=F._fullLayout._invScaleY,W=L.width*U,$=L.height*B;O.setAttributeNS(null,"viewBox","0 0 "+W+" "+$),O.setAttributeNS(null,"width",W),O.setAttributeNS(null,"height",$),c(z),z.glplot.axes.update(z.axesOptions);for(var ue=Object.keys(z.traces),ce=null,de=z.glplot.selection,Y=0;Y")):N.type==="isosurface"||N.type==="volume"?(ae.valueLabel=a.hoverLabelText(z._mockAxis,z._mockAxis.d2l(de.traceCoordinate[3]),N.valuehoverformat),we.push("value: "+ae.valueLabel),de.textLabel&&we.push(de.textLabel),pe=we.join("
")):pe=de.textLabel;var Se={x:de.traceCoordinate[0],y:de.traceCoordinate[1],z:de.traceCoordinate[2],data:V._input,fullData:V,curveNumber:V.index,pointNumber:le};i.appendArrayPointValue(Se,V,le),N._module.eventData&&(Se=V._module.eventData(Se,de,V,{},le));var Re={points:[Se]};if(z.fullSceneLayout.hovermode){var Pe=[];i.loneHover({trace:V,x:(.5+.5*Q[0]/Q[3])*W,y:(.5-.5*Q[1]/Q[3])*$,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:pe,name:ce.name,color:i.castHoverOption(V,le,"bgcolor")||ce.color,borderColor:i.castHoverOption(V,le,"bordercolor"),fontFamily:i.castHoverOption(V,le,"font.family"),fontSize:i.castHoverOption(V,le,"font.size"),fontColor:i.castHoverOption(V,le,"font.color"),nameLength:i.castHoverOption(V,le,"namelength"),textAlign:i.castHoverOption(V,le,"align"),hovertemplate:r.castOption(V,le,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Se,ae),eventData:[Se]},{container:O,gd:F,inOut_bbox:Pe}),Se.bbox=Pe[0]}de.distance<5&&(de.buttons||w)?F.emit("plotly_click",Re):F.emit("plotly_hover",Re),this.oldEventData=Re}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 d(z,F,N){for(var O=z.fullSceneLayout,L=0;L<3;L++){var U=b[L],B=U.charAt(0),W=O[U],$=F[B],ue=F[B+"calendar"],ce=F["_"+B+"length"];if(!r.isArrayOrTypedArray($))N[0][L]=Math.min(N[0][L],0),N[1][L]=Math.max(N[1][L],ce-1);else for(var de,Y=0;Y<(ce||$.length);Y++)if(r.isArrayOrTypedArray($[Y]))for(var X=0;X<$[Y].length;++X)de=W.d2l($[Y][X],0,ue),!isNaN(de)&&isFinite(de)&&(N[0][L]=Math.min(N[0][L],de),N[1][L]=Math.max(N[1][L],de));else de=W.d2l($[Y],0,ue),!isNaN(de)&&isFinite(de)&&(N[0][L]=Math.min(N[0][L],de),N[1][L]=Math.max(N[1][L],de))}}function u(z,F){for(var N=z.fullSceneLayout,O=N.annotations||[],L=0;L<3;L++)for(var U=b[L],B=U.charAt(0),W=N[U],$=0;$V[1][B])V[0][B]=-1,V[1][B]=1;else{var at=V[1][B]-V[0][B];V[0][B]-=at/32,V[1][B]+=at/32}if(j=[V[0][B],V[1][B]],j=T(j,$),V[0][B]=j[0],V[1][B]=j[1],$.isReversed()){var nt=V[0][B];V[0][B]=V[1][B],V[1][B]=nt}}else j=$.range,V[0][B]=$.r2l(j[0]),V[1][B]=$.r2l(j[1]);V[0][B]===V[1][B]&&(V[0][B]-=1,V[1][B]+=1),le[B]=V[1][B]-V[0][B],$.range=[V[0][B],V[1][B]],$.limitRange(),O.glplot.setBounds(B,{min:$.range[0]*X[B],max:$.range[1]*X[B]})}var tt,Ve=ce.aspectmode;if(Ve==="cube")tt=[1,1,1];else if(Ve==="manual"){var he=ce.aspectratio;tt=[he.x,he.y,he.z]}else if(Ve==="auto"||Ve==="data"){var se=[1,1,1];for(B=0;B<3;++B){$=ce[b[B]],ue=$.type;var ne=ae[ue];se[B]=Math.pow(ne.acc,1/ne.count)/X[B]}Ve==="data"||Math.max.apply(null,se)/Math.min.apply(null,se)<=4?tt=se:tt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ce.aspectratio.x=de.aspectratio.x=tt[0],ce.aspectratio.y=de.aspectratio.y=tt[1],ce.aspectratio.z=de.aspectratio.z=tt[2],O.glplot.setAspectratio(ce.aspectratio),O.viewInitial.aspectratio||(O.viewInitial.aspectratio={x:ce.aspectratio.x,y:ce.aspectratio.y,z:ce.aspectratio.z}),O.viewInitial.aspectmode||(O.viewInitial.aspectmode=ce.aspectmode);var Ce=ce.domain||null,Ze=F._size||null;if(Ce&&Ze){var rt=O.container.style;rt.position="absolute",rt.left=Ze.l+Ce.x[0]*Ze.w+"px",rt.top=Ze.t+(1-Ce.y[1])*Ze.h+"px",rt.width=Ze.w*(Ce.x[1]-Ce.x[0])+"px",rt.height=Ze.h*(Ce.y[1]-Ce.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 g(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 y(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()),y(z.camera)},E.setViewport=function(z){var F=this,N=z.camera;F.camera.lookAt.apply(this,g(N)),F.glplot.setAspectratio(z.aspectratio);var O=N.projection.type==="orthographic",L=F.camera._ortho;O!==L&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},E.isCameraChanged=function(z){var F=this,N=F.getCamera(),O=r.nestedProperty(z,F.id+".camera"),L=O.get();function U(ue,ce,de,Y){var X=["up","center","eye"],Q=["x","y","z"];return ce[X[de]]&&ue[X[de]][Q[Y]]===ce[X[de]][Q[Y]]}var B=!1;if(L===void 0)B=!0;else{for(var W=0;W<3;W++)for(var $=0;$<3;$++)if(!U(N,L,W,$)){B=!0;break}(!L.projection||N.projection&&N.projection.type!==L.projection.type)&&(B=!0)}return B},E.isAspectChanged=function(z){var F=this,N=F.glplot.getAspectratio(),O=r.nestedProperty(z,F.id+".aspectratio"),L=O.get();return L===void 0||L.x!==N.x||L.y!==N.y||L.z!==N.z},E.saveLayout=function(z){var F=this,N=F.fullLayout,O,L,U,B,W,$,ue=F.isCameraChanged(z),ce=F.isAspectChanged(z),de=ue||ce;if(de){var Y={};if(ue&&(O=F.getCamera(),L=r.nestedProperty(z,F.id+".camera"),U=L.get(),Y[F.id+".camera"]=U),ce&&(B=F.glplot.getAspectratio(),W=r.nestedProperty(z,F.id+".aspectratio"),$=W.get(),Y[F.id+".aspectratio"]=$),t.call("_storeDirectGUIEdit",z,N._preGUI,Y),ue){L.set(O);var X=r.nestedProperty(N,F.id+".camera");X.set(O)}if(ce){W.set(B);var Q=r.nestedProperty(N,F.id+".aspectratio");Q.set(B),F.glplot.redraw()}}return de},E.updateFx=function(z,F){var N=this,O=N.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 L=N.graphDiv,U=L._fullLayout,B=N.fullSceneLayout.camera,W=B.up.x,$=B.up.y,ue=B.up.z;if(ue/Math.sqrt(W*W+$*$+ue*ue)<.999){var ce=N.id+".camera.up",de={x:0,y:0,z:1},Y={};Y[ce]=de;var X=L.layout;t.call("_storeDirectGUIEdit",X,U._preGUI,Y),B.up=de,r.nestedProperty(X,ce).set(de)}}else O.keyBindingMode=z;N.fullSceneLayout.hovermode=F};function D(z,F,N){for(var O=0,L=N-1;O0)for(var W=255/B,$=0;$<3;++$)z[U+$]=Math.min(W*z[U+$],255)}}E.toImage=function(z){var F=this;z||(z="png"),F.staticMode&&F.container.appendChild(l),F.glplot.redraw();var N=F.glplot.gl,O=N.drawingBufferWidth,L=N.drawingBufferHeight;N.bindFramebuffer(N.FRAMEBUFFER,null);var U=new Uint8Array(O*L*4);N.readPixels(0,0,O,L,N.RGBA,N.UNSIGNED_BYTE,U),D(U,O,L),P(U,O,L);var B=document.createElement("canvas");B.width=O,B.height=L;var W=B.getContext("2d",{willReadFrequently:!0}),$=W.createImageData(O,L);$.data.set(U),W.putImageData($,0,0);var ue;switch(z){case"jpeg":ue=B.toDataURL("image/jpeg");break;case"webp":ue=B.toDataURL("image/webp");break;default:ue=B.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),ue},E.setConvert=function(){for(var z=this,F=0;F<3;F++){var N=z.fullSceneLayout[b[F]];a.setConvert(N,z.fullLayout),N.setScale=r.noop}},E.make4thDimension=function(){var z=this,F=z.graphDiv,N=F._fullLayout;z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(z._mockAxis,N)},q.exports=A}}),aU=He({"src/plots/gl3d/layout/attributes.js"(Z,q){"use strict";q.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),AE=He({"src/plots/gl3d/layout/axis_attributes.js"(Z,q){"use strict";var v=$n(),_=Xh(),S=rs().extendFlat,M=pc().overrideAll;q.exports=M({visible:_.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:_.color,categoryorder:_.categoryorder,categoryarray:_.categoryarray,title:{text:_.title.text,font:_.title.font},type:S({},_.type,{values:["-","linear","log","date","category"]}),autotypenumbers:_.autotypenumbers,autorange:_.autorange,autorangeoptions:{minallowed:_.autorangeoptions.minallowed,maxallowed:_.autorangeoptions.maxallowed,clipmin:_.autorangeoptions.clipmin,clipmax:_.autorangeoptions.clipmax,include:_.autorangeoptions.include,editType:"plot"},rangemode:_.rangemode,minallowed:_.minallowed,maxallowed:_.maxallowed,range:S({},_.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:_.minor.tickmode,nticks:_.nticks,tick0:_.tick0,dtick:_.dtick,tickvals:_.tickvals,ticktext:_.ticktext,ticks:_.ticks,mirror:_.mirror,ticklen:_.ticklen,tickwidth:_.tickwidth,tickcolor:_.tickcolor,showticklabels:_.showticklabels,labelalias:_.labelalias,tickfont:_.tickfont,tickangle:_.tickangle,tickprefix:_.tickprefix,showtickprefix:_.showtickprefix,ticksuffix:_.ticksuffix,showticksuffix:_.showticksuffix,showexponent:_.showexponent,exponentformat:_.exponentformat,minexponent:_.minexponent,separatethousands:_.separatethousands,tickformat:_.tickformat,tickformatstops:_.tickformatstops,hoverformat:_.hoverformat,showline:_.showline,linecolor:_.linecolor,linewidth:_.linewidth,showgrid:_.showgrid,gridcolor:S({},_.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:_.gridwidth,zeroline:_.zeroline,zerolinecolor:_.zerolinecolor,zerolinewidth:_.zerolinewidth},"plot","from-root")}}),SE=He({"src/plots/gl3d/layout/layout_attributes.js"(Z,q){"use strict";var v=AE(),_=wc().attributes,S=rs().extendFlat,M=sa().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:S(e(0,0,1),{}),center:S(e(0,0,0),{}),eye:S(e(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:_({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:v,yaxis:v,zaxis:v,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"}}}),iU=He({"src/plots/gl3d/layout/axis_defaults.js"(Z,q){"use strict";var v=Ch().mix,_=sa(),S=zl(),M=AE(),e=B5(),t=F_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;q.exports=function(i,n,s){var h,f;function m(l,x){return _.coerce(h,f,M,l,x)}for(var c=0;c1;function m(c){if(!f){var T=v.validate(n[c],t[c]);if(T)return n[c]}}M(n,s,h,{type:o,attributes:t,handleDefaults:a,fullLayout:s,font:s.font,fullData:h,getDfltFromLayout:m,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function a(i,n,s,h){for(var f=s("bgcolor"),m=_.combine(f,h.paper_bgcolor),c=["up","center","eye"],T=0;T.999)&&(E="turntable")}else E="turntable";s("dragmode",E),s("hovermode",h.getDfltFromLayout("hovermode"))}}}),m0=He({"src/plots/gl3d/index.js"(Z){"use strict";var q=pc().overrideAll,v=Ym(),_=rU(),S=Wh().getSubplotData,M=sa(),e=vd(),t="gl3d",r="scene";Z.name=t,Z.attr=r,Z.idRoot=r,Z.idRegex=Z.attrRegex=M.counterRegex("scene"),Z.attributes=aU(),Z.layoutAttributes=SE(),Z.baseLayoutAttrOverrides=q({hoverlabel:v.hoverlabel},"plot","nested"),Z.supplyLayoutDefaults=nU(),Z.plot=function(a){for(var i=a._fullLayout,n=a._fullData,s=i._subplots[t],h=0;h0){D=h[P];break}return D}function T(g,y){if(!(g<1||y<1)){for(var D=m(g),P=m(y),z=1,F=0;FA;)P--,P/=c(P),P++,P1?z:1};function E(g,y,D){var P=D[8]+D[2]*y[0]+D[5]*y[1];return g[0]=(D[6]+D[0]*y[0]+D[3]*y[1])/P,g[1]=(D[7]+D[1]*y[0]+D[4]*y[1])/P,g}function p(g,y,D){return b(g,y,E,D),g}function b(g,y,D,P){for(var z=[0,0],F=g.shape[0],N=g.shape[1],O=0;O0&&this.contourStart[P]!==null&&this.contourEnd[P]!==null&&this.contourEnd[P]>this.contourStart[P]))for(y[P]=!0,z=this.contourStart[P];z$&&(this.minValues[U]=$),this.maxValues[U]<$&&(this.maxValues[U]=$));for(U=0;U<3;U++)this.objectOffset[U]=.5*(this.minValues[U]+this.maxValues[U]);for(U=0;U<3;U++)for(B=0;Bh&&(o.isomin=null,o.isomax=null);var f=n("x"),m=n("y"),c=n("z"),T=n("value");if(!f||!f.length||!m||!m.length||!c||!c.length||!T||!T.length){o.visible=!1;return}var l=_.getComponentMethod("calendars","handleTraceDefaults");l(r,o,["x","y","z"],i),n("valuehoverformat"),["x","y","z"].forEach(function(E){n(E+"hoverformat");var p="caps."+E,b=n(p+".show");b&&n(p+".fill");var d="slices."+E,u=n(d+".show");u&&(n(d+".fill"),n(d+".locations"))});var x=n("spaceframe.show");x&&n("spaceframe.fill");var w=n("surface.show");w&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var A=n("contour.show");A&&(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=He({"src/traces/streamtube/calc.js"(Z,q){"use strict";var v=sa(),_=Tp();function S(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,h;o.starts&&(n=t(o.starts.x||[]),s=t(o.starts.y||[]),h=t(o.starts.z||[]),i=Math.min(n.length,s.length,h.length)),o._startsX=n||[],o._startsY=s||[],o._startsZ=h||[];var f=0,m=1/0,c;for(c=0;c1&&(u=o[n-1],y=a[n-1],P=i[n-1]),s=0;su?"-":"+")+"x"),A=A.replace("y",(g>y?"-":"+")+"y"),A=A.replace("z",(D>P?"-":"+")+"z");var O=function(){n=0,z=[],F=[],N=[]};(!n||n0;m--){var c=Math.min(f[m],f[m-1]),T=Math.max(f[m],f[m-1]);if(T>c&&c-1}function ee(_t,Fe){return _t===null?Fe:_t}function te(_t,Fe,Ye){ue();var Ae=[Fe],Le=[Ye];if(V>=1)Ae=[Fe],Le=[Ye];else if(V>0){var We=ae(Fe,Ye);Ae=We.xyzv,Le=We.abc}for(var Ke=0;Ke-1?Ye[ot]:$(Ut,Ct,Pt);cr>-1?st[ot]=cr:st[ot]=de(Ut,Ct,Pt,ee(_t,jt))}Y(st[0],st[1],st[2])}}function pe(_t,Fe,Ye){var Ae=function(Le,We,Ke){te(_t,[Fe[Le],Fe[We],Fe[Ke]],[Ye[Le],Ye[We],Ye[Ke]])};Ae(0,1,2),Ae(2,3,0)}function we(_t,Fe,Ye){var Ae=function(Le,We,Ke){te(_t,[Fe[Le],Fe[We],Fe[Ke]],[Ye[Le],Ye[We],Ye[Ke]])};Ae(0,1,2),Ae(3,0,1),Ae(2,3,0),Ae(1,2,3)}function Se(_t,Fe,Ye,Ae){var Le=_t[3];LeAe&&(Le=Ae);for(var We=(_t[3]-Le)/(_t[3]-Fe[3]+1e-9),Ke=[],st=0;st<4;st++)Ke[st]=(1-We)*_t[st]+We*Fe[st];return Ke}function Re(_t,Fe,Ye){return _t>=Fe&&_t<=Ye}function Pe(_t){var Fe=.001*(O-N);return _t>=N-Fe&&_t<=O+Fe}function je(_t){for(var Fe=[],Ye=0;Ye<4;Ye++){var Ae=_t[Ye];Fe.push([h._x[Ae],h._y[Ae],h._z[Ae],h._value[Ae]])}return Fe}var at=3;function nt(_t,Fe,Ye,Ae,Le,We){We||(We=1),Ye=[-1,-1,-1];var Ke=!1,st=[Re(Fe[0][3],Ae,Le),Re(Fe[1][3],Ae,Le),Re(Fe[2][3],Ae,Le)];if(!st[0]&&!st[1]&&!st[2])return!1;var ot=function(Ct,Pt,jt){return Pe(Pt[0][3])&&Pe(Pt[1][3])&&Pe(Pt[2][3])?(te(Ct,Pt,jt),!0):West?[z,We]:[We,F];Bt(Fe,ot[0],ot[1])}}var Ut=[[Math.min(N,F),Math.max(N,F)],[Math.min(z,O),Math.max(z,O)]];["x","y","z"].forEach(function(Ct){for(var Pt=[],jt=0;jt0&&(Fa.push(Wa.id),Ct==="x"?Ra.push([Wa.distRatio,0,0]):Ct==="y"?Ra.push([0,Wa.distRatio,0]):Ra.push([0,0,Wa.distRatio]))}else Ct==="x"?_a=qr(1,u-1):Ct==="y"?_a=qr(1,g-1):_a=qr(1,y-1);Fa.length>0&&(Ct==="x"?Pt[cr]=Vt(_t,Fa,or,nr,Ra,Pt[cr]):Ct==="y"?Pt[cr]=Ar(_t,Fa,or,nr,Ra,Pt[cr]):Pt[cr]=vr(_t,Fa,or,nr,Ra,Pt[cr]),cr++),_a.length>0&&(Ct==="x"?Pt[cr]=Ze(_t,_a,or,nr,Pt[cr]):Ct==="y"?Pt[cr]=rt(_t,_a,or,nr,Pt[cr]):Pt[cr]=Je(_t,_a,or,nr,Pt[cr]),cr++)}var Ca=h.caps[Ct];Ca.show&&Ca.fill&&(le(Ca.fill),Ct==="x"?Pt[cr]=Ze(_t,[0,u-1],or,nr,Pt[cr]):Ct==="y"?Pt[cr]=rt(_t,[0,g-1],or,nr,Pt[cr]):Pt[cr]=Je(_t,[0,y-1],or,nr,Pt[cr]),cr++)}}),w===0&&ce(),h._meshX=L,h._meshY=U,h._meshZ=B,h._meshIntensity=W,h._Xs=p,h._Ys=b,h._Zs=d}return Ur(),h}function s(h,f){var m=h.glplot.gl,c=v({gl:m}),T=new o(h,c,f.uid);return c._trace=T,T.update(f),h.glplot.add(c),T}q.exports={findNearestOnAxis:r,generateIsoMeshes:n,createIsosurfaceTrace:s}}}),hU=He({"src/traces/isosurface/index.js"(Z,q){"use strict";q.exports={attributes:tT(),supplyDefaults:EE().supplyDefaults,calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:aT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),pU=He({"lib/isosurface.js"(Z,q){"use strict";q.exports=hU()}}),CE=He({"src/traces/volume/attributes.js"(Z,q){"use strict";var v=ku(),_=tT(),S=gx(),M=au(),e=rs().extendFlat,t=pc().overrideAll,r=q.exports=t(e({x:_.x,y:_.y,z:_.z,value:_.value,isomin:_.isomin,isomax:_.isomax,surface:_.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:_.slices,caps:_.caps,text:_.text,hovertext:_.hovertext,xhoverformat:_.xhoverformat,yhoverformat:_.yhoverformat,zhoverformat:_.zhoverformat,valuehoverformat:_.valuehoverformat,hovertemplate:_.hovertemplate,hovertemplatefallback:_.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:_.colorbar,opacity:_.opacity,opacityscale:S.opacityscale,lightposition:_.lightposition,lighting:_.lighting,flatshading:_.flatshading,contour:_.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"}}),dU=He({"src/traces/volume/defaults.js"(Z,q){"use strict";var v=sa(),_=CE(),S=EE().supplyIsoDefaults,M=ME().opacityscaleDefaults;q.exports=function(t,r,o,a){function i(n,s){return v.coerce(t,r,_,n,s)}S(t,r,o,a,i),M(t,r,a,i)}}}),vU=He({"src/traces/volume/convert.js"(Z,q){"use strict";var v=Kh().gl_mesh3d,_=rm().parseColorScale,S=sa().isArrayOrTypedArray,M=tm(),e=rc().extractOpts,t=E1(),r=aT().findNearestOnAxis,o=aT().generateIsoMeshes;function a(s,h,f){this.scene=s,this.uid=f,this.mesh=h,this.name="",this.data=null,this.showContour=!1}var i=a.prototype;i.handlePick=function(s){if(s.object===this.mesh){var h=s.data.index,f=this.data._meshX[h],m=this.data._meshY[h],c=this.data._meshZ[h],T=this.data._Ys.length,l=this.data._Zs.length,x=r(f,this.data._Xs).id,w=r(m,this.data._Ys).id,A=r(c,this.data._Zs).id,E=s.index=A+l*w+l*T*x;s.traceCoordinate=[this.data._meshX[E],this.data._meshY[E],this.data._meshZ[E],this.data._value[E]];var p=this.data.hovertext||this.data.text;return S(p)&&p[E]!==void 0?s.textLabel=p[E]:p&&(s.textLabel=p),!0}},i.update=function(s){var h=this.scene,f=h.fullSceneLayout;this.data=o(s);function m(w,A,E,p){return A.map(function(b){return w.d2l(b,0,p)*E})}var c=t(m(f.xaxis,s._meshX,h.dataScale[0],s.xcalendar),m(f.yaxis,s._meshY,h.dataScale[1],s.ycalendar),m(f.zaxis,s._meshZ,h.dataScale[2],s.zcalendar)),T=t(s._meshI,s._meshJ,s._meshK),l={positions:c,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},x=e(s);l.vertexIntensity=s._meshIntensity,l.vertexIntensityBounds=[x.min,x.max],l.colormap=_(s),this.mesh.update(l)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function n(s,h){var f=s.glplot.gl,m=v({gl:f}),c=new a(s,m,h.uid);return m._trace=c,c.update(h),s.glplot.add(m),c}q.exports=n}}),mU=He({"src/traces/volume/index.js"(Z,q){"use strict";q.exports={attributes:CE(),supplyDefaults:dU(),calc:kE(),colorbar:{min:"cmin",max:"cmax"},plot:vU(),moduleType:"trace",name:"volume",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),gU=He({"lib/volume.js"(Z,q){"use strict";q.exports=mU()}}),yU=He({"src/traces/mesh3d/defaults.js"(Z,q){"use strict";var v=so(),_=sa(),S=_h(),M=M1();q.exports=function(t,r,o,a){function i(m,c){return _.coerce(t,r,M,m,c)}function n(m){var c=m.map(function(T){var l=i(T);return l&&_.isArrayOrTypedArray(l)?l:null});return c.every(function(T){return T&&T.length===c[0].length})&&c}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 h=v.getComponentMethod("calendars","handleTraceDefaults");h(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(m){i(m)});var f=i("contour.show");f&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),S(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("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),_U=He({"src/traces/mesh3d/calc.js"(Z,q){"use strict";var v=Tp();q.exports=function(S,M){M.intensity&&v(S,M,{vals:M.intensity,containerStr:"",cLetter:"c"})}}}),xU=He({"src/traces/mesh3d/convert.js"(Z,q){"use strict";var v=Kh().gl_mesh3d,_=Kh().delaunay_triangulate,S=Kh().alpha_shape,M=Kh().convex_hull,e=rm().parseColorScale,t=sa().isArrayOrTypedArray,r=tm(),o=rc().extractOpts,a=E1();function i(l,x,w){this.scene=l,this.uid=w,this.mesh=x,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 x=l.index=l.data.index;l.data._cellCenter?l.traceCoordinate=l.data.dataCoordinate:l.traceCoordinate=[this.data.x[x],this.data.y[x],this.data.z[x]];var w=this.data.hovertext||this.data.text;return t(w)&&w[x]!==void 0?l.textLabel=w[x]:w&&(l.textLabel=w),!0}};function s(l){for(var x=[],w=l.length,A=0;A=x-.5)return!1;return!0}n.update=function(l){var x=this.scene,w=x.fullSceneLayout;this.data=l;var A=l.x.length,E=a(h(w.xaxis,l.x,x.dataScale[0],l.xcalendar),h(w.yaxis,l.y,x.dataScale[1],l.ycalendar),h(w.zaxis,l.z,x.dataScale[2],l.zcalendar)),p;if(l.i&&l.j&&l.k){if(l.i.length!==l.j.length||l.j.length!==l.k.length||!c(l.i,A)||!c(l.j,A)||!c(l.k,A))return;p=a(f(l.i),f(l.j),f(l.k))}else l.alphahull===0?p=M(E):l.alphahull>0?p=S(l.alphahull,E):p=m(l.delaunayaxis,E);var b={positions:E,cells:p,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 d=o(l);this.color="#fff";var u=l.intensitymode;b[u+"Intensity"]=l.intensity,b[u+"IntensityBounds"]=[d.min,d.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,x){var w=l.glplot.gl,A=v({gl:w}),E=new i(l,A,x.uid);return A._trace=E,E.update(x),l.glplot.add(A),E}q.exports=T}}),bU=He({"src/traces/mesh3d/index.js"(Z,q){"use strict";q.exports={attributes:M1(),supplyDefaults:yU(),calc:_U(),colorbar:{min:"cmin",max:"cmax"},plot:xU(),moduleType:"trace",name:"mesh3d",basePlotModule:m0(),categories:["gl3d","showLegend"],meta:{}}}}),wU=He({"lib/mesh3d.js"(Z,q){"use strict";q.exports=bU()}}),LE=He({"src/traces/cone/attributes.js"(Z,q){"use strict";var v=ku(),_=rf().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:M}=$l(),e=M1(),t=au(),r=rs().extendFlat,o={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:S({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:M({editType:"calc"}),uhoverformat:_("u",1),vhoverformat:_("v",1),whoverformat:_("w",1),xhoverformat:_("x"),yhoverformat:_("y"),zhoverformat:_("z"),showlegend:r({},t.showlegend,{dflt:!1})};r(o,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var a=["opacity","lightposition","lighting"];a.forEach(function(i){o[i]=e[i]}),o.hoverinfo=r({},t.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),q.exports=o}}),TU=He({"src/traces/cone/defaults.js"(Z,q){"use strict";var v=sa(),_=_h(),S=LE();q.exports=function(e,t,r,o){function a(T,l){return v.coerce(e,t,S,T,l)}var i=a("u"),n=a("v"),s=a("w"),h=a("x"),f=a("y"),m=a("z");if(!i||!i.length||!n||!n.length||!s||!s.length||!h||!h.length||!f||!f.length||!m||!m.length){t.visible=!1;return}var c=a("sizemode");a("sizeref",c==="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"),_(e,t,o,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),AU=He({"src/traces/cone/calc.js"(Z,q){"use strict";var v=Tp();q.exports=function(S,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;n2?c=f.slice(1,m-1):m===2?c=[(f[0]+f[1])/2]:c=f,c}function n(f){var m=f.length;return m===1?[.5,.5]:[f[1]-f[0],f[m-1]-f[m-2]]}function s(f,m){var c=f.fullSceneLayout,T=f.dataScale,l=m._len,x={};function w(de,Y){var X=c[Y],Q=T[r[Y]];return S.simpleMap(de,function(V){return X.d2l(V)*Q})}if(x.vectors=t(w(m._u,"xaxis"),w(m._v,"yaxis"),w(m._w,"zaxis"),l),!l)return{positions:[],cells:[]};var A=w(m._Xs,"xaxis"),E=w(m._Ys,"yaxis"),p=w(m._Zs,"zaxis");x.meshgrid=[A,E,p],x.gridFill=m._gridFill;var b=m._slen;if(b)x.startingPositions=t(w(m._startsX,"xaxis"),w(m._startsY,"yaxis"),w(m._startsZ,"zaxis"));else{for(var d=E[0],u=i(A),g=i(p),y=new Array(u.length*g.length),D=0,P=0;Pd&&(d=D[0]),D[1]u&&(u=D[1])}function y(D){switch(D.type){case"GeometryCollection":D.geometries.forEach(y);break;case"Point":g(D.coordinates);break;case"MultiPoint":D.coordinates.forEach(g);break}}w.arcs.forEach(function(D){for(var P=-1,z=D.length,F;++Pd&&(d=F[0]),F[1]u&&(u=F[1])});for(E in w.objects)y(w.objects[E]);return[p,b,d,u]}function e(w,A){for(var E,p=w.length,b=p-A;b<--p;)E=w[b],w[b++]=w[p],w[p]=E}function t(w,A){return typeof A=="string"&&(A=w.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(E){return r(w,E)})}:r(w,A)}function r(w,A){var E=A.id,p=A.bbox,b=A.properties==null?{}:A.properties,d=o(w,A);return E==null&&p==null?{type:"Feature",properties:b,geometry:d}:p==null?{type:"Feature",id:E,properties:b,geometry:d}:{type:"Feature",id:E,bbox:p,properties:b,geometry:d}}function o(w,A){var E=S(w.transform),p=w.arcs;function b(P,z){z.length&&z.pop();for(var F=p[P<0?~P:P],N=0,O=F.length;N1)p=s(w,A,E);else for(b=0,p=new Array(d=w.arcs.length);b1)for(var z=1,F=g(D[0]),N,O;zF&&(O=D[0],D[0]=D[z],D[z]=O,F=N);return D}).filter(function(y){return y.length>0})}}function c(w,A){for(var E=0,p=w.length;E>>1;w[b]=2))throw new Error("n must be \u22652");y=w.bbox||M(w);var E=y[0],p=y[1],b=y[2],d=y[3],u;A={scale:[b-E?(b-E)/(u-1):1,d-p?(d-p)/(u-1):1],translate:[E,p]}}else y=w.bbox;var g=l(A),y,D,P=w.objects,z={};function F(L){return g(L)}function N(L){var U;switch(L.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:L.geometries.map(N)};break;case"Point":U={type:"Point",coordinates:F(L.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:L.coordinates.map(F)};break;default:return L}return L.id!=null&&(U.id=L.id),L.bbox!=null&&(U.bbox=L.bbox),L.properties!=null&&(U.properties=L.properties),U}function O(L){var U=0,B=1,W=L.length,$,ue=new Array(W);for(ue[0]=g(L[0],0);++U0&&(M.push(e),e=[])}return e.length>0&&M.push(e),M},Z.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},Z.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var _=new Array(v.length),S=0;Se(N,z)),F)}function r(P,z,F={}){for(let O of P){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 L=0;Lr(N,z)),F)}function a(P,z,F={}){if(P.length<2)throw new Error("coordinates must be an array of two or more positions");return S({type:"LineString",coordinates:P},z,F)}function i(P,z,F={}){return n(P.map(N=>a(N,z)),F)}function n(P,z={}){let F={type:"FeatureCollection"};return z.id&&(F.id=z.id),z.bbox&&(F.bbox=z.bbox),F.features=P,F}function s(P,z,F={}){return S({type:"MultiLineString",coordinates:P},z,F)}function h(P,z,F={}){return S({type:"MultiPoint",coordinates:P},z,F)}function f(P,z,F={}){return S({type:"MultiPolygon",coordinates:P},z,F)}function m(P,z,F={}){return S({type:"GeometryCollection",geometries:P},z,F)}function c(P,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(P*F)/F}function T(P,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return P*F}function l(P,z="kilometers"){let F=v[z];if(!F)throw new Error(z+" units is invalid");return P/F}function x(P,z){return E(l(P,z))}function w(P){let z=P%360;return z<0&&(z+=360),z}function A(P){return P=P%360,P>180?P-360:P<-180?P+360:P}function E(P){return P%(2*Math.PI)*180/Math.PI}function p(P){return P%360*Math.PI/180}function b(P,z="kilometers",F="kilometers"){if(!(P>=0))throw new Error("length must be a positive number");return T(l(P,z),F)}function d(P,z="meters",F="kilometers"){if(!(P>=0))throw new Error("area must be a positive number");let N=_[z];if(!N)throw new Error("invalid original units");let O=_[F];if(!O)throw new Error("invalid final units");return P/N*O}function u(P){return!isNaN(P)&&P!==null&&!Array.isArray(P)}function g(P){return P!==null&&typeof P=="object"&&!Array.isArray(P)}function y(P){if(!P)throw new Error("bbox is required");if(!Array.isArray(P))throw new Error("bbox must be an Array");if(P.length!==4&&P.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");P.forEach(z=>{if(!u(z))throw new Error("bbox must only contain numbers")})}function D(P){if(!P)throw new Error("id is required");if(["string","number"].indexOf(typeof P)===-1)throw new Error("id must be a number or a string")}Z.areaFactors=_,Z.azimuthToBearing=A,Z.bearingToAzimuth=w,Z.convertArea=d,Z.convertLength=b,Z.degreesToRadians=p,Z.earthRadius=q,Z.factors=v,Z.feature=S,Z.featureCollection=n,Z.geometry=M,Z.geometryCollection=m,Z.isNumber=u,Z.isObject=g,Z.lengthToDegrees=x,Z.lengthToRadians=l,Z.lineString=a,Z.lineStrings=i,Z.multiLineString=s,Z.multiPoint=h,Z.multiPolygon=f,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=E,Z.radiansToLength=T,Z.round=c,Z.validateBBox=y,Z.validateId=D}}),sT=He({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT();function v(l,x,w){if(l!==null)for(var A,E,p,b,d,u,g,y=0,D=0,P,z=l.type,F=z==="FeatureCollection",N=z==="Feature",O=F?l.features.length:1,L=0;Lu||F>g||N>y){d=D,u=A,g=F,y=N,p=0;return}var O=q.lineString.call(void 0,[d,D],w.properties);if(x(O,A,E,N,p)===!1)return!1;p++,d=D})===!1)return!1}}})}function h(l,x,w){var A=w,E=!1;return s(l,function(p,b,d,u,g){E===!1&&w===void 0?A=p:A=x(A,p,b,d,u,g),E=!0}),A}function f(l,x){if(!l)throw new Error("geojson is required");i(l,function(w,A,E){if(w.geometry!==null){var p=w.geometry.type,b=w.geometry.coordinates;switch(p){case"LineString":if(x(w,A,E,0,0)===!1)return!1;break;case"Polygon":for(var d=0;di+S(n),0)}function S(a){let i=0,n;switch(a.type){case"Polygon":return M(a.coordinates);case"MultiPolygon":for(n=0;n0){i+=Math.abs(r(a[0]));for(let n=1;n=i?(s+2)%i:s+2],c=h[0]*t,T=f[1]*t,l=m[0]*t;n+=(l-c)*Math.sin(T),s++}return n*e}var o=_;Z.area=_,Z.default=o}}),FU=He({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT(),v=sT();function _(M,e={}){let t=0,r=0,o=0;return v.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 S=_;Z.centroid=_,Z.default=S}}),OU=He({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=sT();function v(S,M={}){if(S.bbox!=null&&M.recompute!==!0)return S.bbox;let e=[1/0,1/0,-1/0,-1/0];return q.coordEach.call(void 0,S,t=>{e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]0&&y[D+1][0]<0)return D;return null}function w(y){var D=y.geometry,P=D.coordinates,z=y.id,F=[],N,O,L,U;switch(z==="RUS"||z==="FJI"?N=function(B){var W;if(x(B)===null)W=B;else for(W=new Array(B.length),U=0;UW?$[ue++]=[B[U][0]+l,B[U][1]]:U===W?($[ue++]=B[U],$[ue++]=[B[U][0],-90]):$[ue++]=B[U];var ce=i.tester($);ce.pts.pop(),F.push(ce)}:N=function(B){F.push(i.tester(B))},D.type){case"MultiPolygon":for(O=0;O0?de.properties.ct=p(de):de.properties.ct=[NaN,NaN],ue.fIn=W,ue.fOut=de,F.push(de)}else r.log(["Location",ue.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete z[$]}switch(P.type){case"FeatureCollection":var U=P.features;for(N=0;NF&&(F=L,P=O)}else P=D;return M(P).geometry.coordinates}function b(y){var D=window.PlotlyGeoAssets||{},P=[];function z(U){return new Promise(function(B,W){v.json(U,function($,ue){if($){delete D[U];var ce=$.status===404?'GeoJSON at URL "'+U+'" does not exist.':"Unexpected error while fetching from "+U;return W(new Error(ce))}return D[U]=ue,B(ue)})})}function F(U){return new Promise(function(B,W){var $=0,ue=setInterval(function(){if(D[U]&&D[U]!=="pending")return clearInterval(ue),B(D[U]);if($>100)return clearInterval(ue),W("Unexpected error while fetching from "+U);$++},50)})}for(var N=0;NL-U);if(D.length<2)return null;let P=D.length,z=D[P-1]-D[0];if(z>=360)return null;let F=-1/0,N=-1;for(let L=0;LF&&(F=U,N=L)}let O=360-z;return F<=O?null:[D[N+1],D[N]+l]}function g([y,D]){return[y,y>0&&D<0?D+l:D]}q.exports={locationToFeature:T,feature2polygons:w,getTraceGeojson:A,extractTraceFeature:E,fetchTraceGeoData:b,computeBbox:d,doesCrossAntiMeridian:x,getFitboundsLonRange:u,unwrapLonRange:g,ANTIMERIDIAN_LON_SHIFT:l}}}),RE=He({"src/traces/scattergeo/style.js"(Z,q){"use strict";var v=Vn(),_=as(),S=$n(),M=Qp(),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 h=v.select(this),f=s.trace,m=f.line||{};h.call(S.stroke,m.color).call(_.dashLine,m.dash||"",m.width||0),f.fill!=="none"&&h.call(S.fill,f.fillcolor)})}}}),DE=He({"src/traces/scattergeo/plot.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=nT().getTopojsonFeatures,M=g0(),e=Ev(),t=Yd().findExtremes,r=Gs().BADNUM,o=Bd().calcMarkerSize,a=Fu(),i=RE();function n(h,f,m){var c=f.layers.frontplot.select(".scatterlayer"),T=_.makeTraceGroups(c,m,"trace scattergeo");function l(x,w){x.lonlat[0]===r&&v.select(w).remove()}T.selectAll("*").remove(),T.each(function(x){var w=v.select(this),A=x[0].trace;if(a.hasLines(A)||A.fill!=="none"){var E=M.calcTraceToLineCoords(x),p=A.fill!=="none"?M.makePolygon(E):M.makeLine(E);w.selectAll("path.js-line").data([{geojson:p,trace:A}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}a.hasMarkers(A)&&w.selectAll("path.point").data(_.identity).enter().append("path").classed("point",!0).each(function(b){l(b,this)}),a.hasText(A)&&w.selectAll("g").data(_.identity).enter().append("g").append("text").each(function(b){l(b,this)}),i(h,x)})}function s(h,f){var m=h[0].trace,c=f[m.geo],T=c._subplot,l=m._length,x,w;if(_.isArrayOrTypedArray(m.locations)){var A=m.locationmode,E=A==="geojson-id"?e.extractTraceFeature(h):S(m,T.topojson);for(x=0;x")}}}),UU=He({"src/traces/scattergeo/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){_.lon=S.lon,_.lat=S.lat,_.location=S.loc?S.loc:null;var r=e[t];return r.fIn&&r.fIn.properties&&(_.properties=r.fIn.properties),_}}}),jU=He({"src/traces/scattergeo/select.js"(Z,q){"use strict";var v=Fu(),_=Gs().BADNUM;q.exports=function(M,e){var t=M.cd,r=M.xaxis,o=M.yaxis,a=[],i=t[0].trace,n,s,h,f,m,c=!v.hasMarkers(i)&&!v.hasText(i);if(c)return[];if(e===!1)for(m=0;mV?1:Q>=V?0:NaN}function S(Q){return Q.length===1&&(Q=M(Q)),{left:function(V,le,ae,j){for(ae==null&&(ae=0),j==null&&(j=V.length);ae>>1;Q(V[ee],le)<0?ae=ee+1:j=ee}return ae},right:function(V,le,ae,j){for(ae==null&&(ae=0),j==null&&(j=V.length);ae>>1;Q(V[ee],le)>0?j=ee:ae=ee+1}return ae}}}function M(Q){return function(V,le){return _(Q(V),le)}}var e=S(_),t=e.right,r=e.left;function o(Q,V){V==null&&(V=a);for(var le=0,ae=Q.length-1,j=Q[0],ee=new Array(ae<0?0:ae);leQ?1:V>=Q?0:NaN}function s(Q){return Q===null?NaN:+Q}function h(Q,V){var le=Q.length,ae=0,j=-1,ee=0,te,pe,we=0;if(V==null)for(;++j1)return we/(ae-1)}function f(Q,V){var le=h(Q,V);return le&&Math.sqrt(le)}function m(Q,V){var le=Q.length,ae=-1,j,ee,te;if(V==null){for(;++ae=j)for(ee=te=j;++aej&&(ee=j),te=j)for(ee=te=j;++aej&&(ee=j),te0)return[Q];if((ae=V0)for(Q=Math.ceil(Q/pe),V=Math.floor(V/pe),te=new Array(ee=Math.ceil(V-Q+1));++j=0?(ee>=E?10:ee>=p?5:ee>=b?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(ee>=E?10:ee>=p?5:ee>=b?2:1)}function g(Q,V,le){var ae=Math.abs(V-Q)/Math.max(0,le),j=Math.pow(10,Math.floor(Math.log(ae)/Math.LN10)),ee=ae/j;return ee>=E?j*=10:ee>=p?j*=5:ee>=b&&(j*=2),VPe;)je.pop(),--at;var nt=new Array(at+1),tt;for(ee=0;ee<=at;++ee)tt=nt[ee]=[],tt.x0=ee>0?je[ee-1]:Re,tt.x1=ee=1)return+le(Q[ae-1],ae-1,Q);var ae,j=(ae-1)*V,ee=Math.floor(j),te=+le(Q[ee],ee,Q),pe=+le(Q[ee+1],ee+1,Q);return te+(pe-te)*(j-ee)}}function z(Q,V,le){return Q=l.call(Q,s).sort(_),Math.ceil((le-V)/(2*(P(Q,.75)-P(Q,.25))*Math.pow(Q.length,-1/3)))}function F(Q,V,le){return Math.ceil((le-V)/(3.5*f(Q)*Math.pow(Q.length,-1/3)))}function N(Q,V){var le=Q.length,ae=-1,j,ee;if(V==null){for(;++ae=j)for(ee=j;++aeee&&(ee=j)}else for(;++ae=j)for(ee=j;++aeee&&(ee=j);return ee}function O(Q,V){var le=Q.length,ae=le,j=-1,ee,te=0;if(V==null)for(;++j=0;)for(te=Q[V],le=te.length;--le>=0;)ee[--j]=te[le];return ee}function B(Q,V){var le=Q.length,ae=-1,j,ee;if(V==null){for(;++ae=j)for(ee=j;++aej&&(ee=j)}else for(;++ae=j)for(ee=j;++aej&&(ee=j);return ee}function W(Q,V){for(var le=V.length,ae=new Array(le);le--;)ae[le]=Q[V[le]];return ae}function $(Q,V){if(le=Q.length){var le,ae=0,j=0,ee,te=Q[j];for(V==null&&(V=_);++ae0?1:Qt<0?-1:0},d=Math.sqrt,u=Math.tan;function g(Qt){return Qt>1?0:Qt<-1?a:Math.acos(Qt)}function y(Qt){return Qt>1?i:Qt<-1?-i:Math.asin(Qt)}function D(Qt){return(Qt=p(Qt/2))*Qt}function P(){}function z(Qt,xr){Qt&&N.hasOwnProperty(Qt.type)&&N[Qt.type](Qt,xr)}var F={Feature:function(Qt,xr){z(Qt.geometry,xr)},FeatureCollection:function(Qt,xr){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r=0?1:-1,ka=$r*aa,li=l(xr),Ci=p(xr),Hi=Y*Ci,Qi=de*li+Hi*l(ka),pn=Hi*$r*p(ka);B.add(T(pn,Qi)),ce=Qt,de=li,Y=Ci}function j(Qt){return W.reset(),U(Qt,X),W*2}function ee(Qt){return[T(Qt[1],Qt[0]),y(Qt[2])]}function te(Qt){var xr=Qt[0],aa=Qt[1],$r=l(aa);return[$r*l(xr),$r*p(xr),p(aa)]}function pe(Qt,xr){return Qt[0]*xr[0]+Qt[1]*xr[1]+Qt[2]*xr[2]}function we(Qt,xr){return[Qt[1]*xr[2]-Qt[2]*xr[1],Qt[2]*xr[0]-Qt[0]*xr[2],Qt[0]*xr[1]-Qt[1]*xr[0]]}function Se(Qt,xr){Qt[0]+=xr[0],Qt[1]+=xr[1],Qt[2]+=xr[2]}function Re(Qt,xr){return[Qt[0]*xr,Qt[1]*xr,Qt[2]*xr]}function Pe(Qt){var xr=d(Qt[0]*Qt[0]+Qt[1]*Qt[1]+Qt[2]*Qt[2]);Qt[0]/=xr,Qt[1]/=xr,Qt[2]/=xr}var je,at,nt,tt,Ve,he,se,ne,Ce=S(),Ze,rt,Je={point:St,lineStart:Bt,lineEnd:Vt,polygonStart:function(){Je.point=Ar,Je.lineStart=vr,Je.lineEnd=qr,Ce.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Je.point=St,Je.lineStart=Bt,Je.lineEnd=Vt,B<0?(je=-(nt=180),at=-(tt=90)):Ce>r?tt=90:Ce<-r&&(at=-90),rt[0]=je,rt[1]=nt},sphere:function(){je=-(nt=180),at=-(tt=90)}};function St(Qt,xr){Ze.push(rt=[je=Qt,nt=Qt]),xrtt&&(tt=xr)}function kt(Qt,xr){var aa=te([Qt*f,xr*f]);if(ne){var $r=we(ne,aa),ka=[$r[1],-$r[0],0],li=we(ka,$r);Pe(li),li=ee(li);var Ci=Qt-Ve,Hi=Ci>0?1:-1,Qi=li[0]*h*Hi,pn,Pi=m(Ci)>180;Pi^(Hi*Vett&&(tt=pn)):(Qi=(Qi+360)%360-180,Pi^(Hi*Vett&&(tt=xr))),Pi?Qtkr(je,nt)&&(nt=Qt):kr(Qt,nt)>kr(je,nt)&&(je=Qt):nt>=je?(Qtnt&&(nt=Qt)):Qt>Ve?kr(je,Qt)>kr(je,nt)&&(nt=Qt):kr(Qt,nt)>kr(je,nt)&&(je=Qt)}else Ze.push(rt=[je=Qt,nt=Qt]);xrtt&&(tt=xr),ne=aa,Ve=Qt}function Bt(){Je.point=kt}function Vt(){rt[0]=je,rt[1]=nt,Je.point=St,ne=null}function Ar(Qt,xr){if(ne){var aa=Qt-Ve;Ce.add(m(aa)>180?aa+(aa>0?360:-360):aa)}else he=Qt,se=xr;X.point(Qt,xr),kt(Qt,xr)}function vr(){X.lineStart()}function qr(){Ar(he,se),X.lineEnd(),m(Ce)>r&&(je=-(nt=180)),rt[0]=je,rt[1]=nt,ne=null}function kr(Qt,xr){return(xr-=Qt)<0?xr+360:xr}function Ur(Qt,xr){return Qt[0]-xr[0]}function _t(Qt,xr){return Qt[0]<=Qt[1]?Qt[0]<=xr&&xr<=Qt[1]:xrkr($r[0],$r[1])&&($r[1]=ka[1]),kr(ka[0],$r[1])>kr($r[0],$r[1])&&($r[0]=ka[0])):li.push($r=ka);for(Ci=-1/0,aa=li.length-1,xr=0,$r=li[aa];xr<=aa;$r=ka,++xr)ka=li[xr],(Hi=kr($r[1],ka[0]))>Ci&&(Ci=Hi,je=ka[0],nt=$r[1])}return Ze=rt=null,je===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[je,at],[nt,tt]]}var Ye,Ae,Le,We,Ke,st,ot,Ut,Ct,Pt,jt,cr,or,nr,Pr,_a,Fa={sphere:P,point:Ra,lineStart:Wa,lineEnd:wi,polygonStart:function(){Fa.lineStart=Yt,Fa.lineEnd=Rt},polygonEnd:function(){Fa.lineStart=Wa,Fa.lineEnd=wi}};function Ra(Qt,xr){Qt*=f,xr*=f;var aa=l(xr);qa(aa*l(Qt),aa*p(Qt),p(xr))}function qa(Qt,xr,aa){++Ye,Le+=(Qt-Le)/Ye,We+=(xr-We)/Ye,Ke+=(aa-Ke)/Ye}function Wa(){Fa.point=Ca}function Ca(Qt,xr){Qt*=f,xr*=f;var aa=l(xr);nr=aa*l(Qt),Pr=aa*p(Qt),_a=p(xr),Fa.point=hi,qa(nr,Pr,_a)}function hi(Qt,xr){Qt*=f,xr*=f;var aa=l(xr),$r=aa*l(Qt),ka=aa*p(Qt),li=p(xr),Ci=T(d((Ci=Pr*li-_a*ka)*Ci+(Ci=_a*$r-nr*li)*Ci+(Ci=nr*ka-Pr*$r)*Ci),nr*$r+Pr*ka+_a*li);Ae+=Ci,st+=Ci*(nr+(nr=$r)),ot+=Ci*(Pr+(Pr=ka)),Ut+=Ci*(_a+(_a=li)),qa(nr,Pr,_a)}function wi(){Fa.point=Ra}function Yt(){Fa.point=Zt}function Rt(){Jt(cr,or),Fa.point=Ra}function Zt(Qt,xr){cr=Qt,or=xr,Qt*=f,xr*=f,Fa.point=Jt;var aa=l(xr);nr=aa*l(Qt),Pr=aa*p(Qt),_a=p(xr),qa(nr,Pr,_a)}function Jt(Qt,xr){Qt*=f,xr*=f;var aa=l(xr),$r=aa*l(Qt),ka=aa*p(Qt),li=p(xr),Ci=Pr*li-_a*ka,Hi=_a*$r-nr*li,Qi=nr*ka-Pr*$r,pn=d(Ci*Ci+Hi*Hi+Qi*Qi),Pi=y(pn),Di=pn&&-Pi/pn;Ct+=Di*Ci,Pt+=Di*Hi,jt+=Di*Qi,Ae+=Pi,st+=Pi*(nr+(nr=$r)),ot+=Pi*(Pr+(Pr=ka)),Ut+=Pi*(_a+(_a=li)),qa(nr,Pr,_a)}function Fr(Qt){Ye=Ae=Le=We=Ke=st=ot=Ut=Ct=Pt=jt=0,U(Qt,Fa);var xr=Ct,aa=Pt,$r=jt,ka=xr*xr+aa*aa+$r*$r;return kaa?Qt+Math.round(-Qt/s)*s:Qt,xr]}ca.invert=ca;function Ba(Qt,xr,aa){return(Qt%=s)?xr||aa?ra(Za(Qt),ri(xr,aa)):Za(Qt):xr||aa?ri(xr,aa):ca}function $a(Qt){return function(xr,aa){return xr+=Qt,[xr>a?xr-s:xr<-a?xr+s:xr,aa]}}function Za(Qt){var xr=$a(Qt);return xr.invert=$a(-Qt),xr}function ri(Qt,xr){var aa=l(Qt),$r=p(Qt),ka=l(xr),li=p(xr);function Ci(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=p(Hi)*pn,Ni=p(Qi),mi=Ni*aa+Pi*$r;return[T(Di*ka-mi*li,Pi*aa-Ni*$r),y(mi*ka+Di*li)]}return Ci.invert=function(Hi,Qi){var pn=l(Qi),Pi=l(Hi)*pn,Di=p(Hi)*pn,Ni=p(Qi),mi=Ni*ka-Di*li;return[T(Di*ka+Ni*li,Pi*aa+mi*$r),y(mi*aa-Pi*$r)]},Ci}function pi(Qt){Qt=Ba(Qt[0]*f,Qt[1]*f,Qt.length>2?Qt[2]*f:0);function xr(aa){return aa=Qt(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa}return xr.invert=function(aa){return aa=Qt.invert(aa[0]*f,aa[1]*f),aa[0]*=h,aa[1]*=h,aa},xr}function Ia(Qt,xr,aa,$r,ka,li){if(aa){var Ci=l(xr),Hi=p(xr),Qi=$r*aa;ka==null?(ka=xr+$r*s,li=xr-Qi/2):(ka=rn(Ci,ka),li=rn(Ci,li),($r>0?kali)&&(ka+=$r*s));for(var pn,Pi=ka;$r>0?Pi>li:Pi1&&Qt.push(Qt.pop().concat(Qt.shift()))},result:function(){var aa=Qt;return Qt=[],xr=null,aa}}}function xt(Qt,xr){return m(Qt[0]-xr[0])=0;--Hi)ka.point((Di=Pi[Hi])[0],Di[1]);else $r(Ni.x,Ni.p.x,-1,ka);Ni=Ni.p}Ni=Ni.o,Pi=Ni.z,mi=!mi}while(!Ni.v);ka.lineEnd()}}}function Cr(Qt){if(xr=Qt.length){for(var xr,aa=0,$r=Qt[0],ka;++aa=0?1:-1,Ns=rl*ks,el=Ns>a,Ss=Qn*yo;if(wr.add(T(Ss*rl*p(Ns),io*Qo+Ss*l(Ns))),Ci+=el?ks+rl*s:ks,el^mi>=aa^An>=aa){var Fl=we(te(Ni),te(co));Pe(Fl);var yl=we(li,Fl);Pe(yl);var ll=(el^ks>=0?-1:1)*y(yl[2]);($r>ll||$r===ll&&(Fl[0]||Fl[1]))&&(Hi+=el^ks>=0?1:-1)}}return(Ci<-r||Ci0){for(Qi||(ka.polygonStart(),Qi=!0),ka.lineStart(),Qo=0;Qo1&&un&2&&yo.push(yo.pop().concat(yo.shift())),Pi.push(yo.filter(gt))}}return Ni}}function gt(Qt){return Qt.length>1}function Kt(Qt,xr){return((Qt=Qt.x)[0]<0?Qt[1]-i-r:i-Qt[1])-((xr=xr.x)[0]<0?xr[1]-i-r:i-xr[1])}var mr=Hr(function(){return!0},Ir,Pa,[-a,-i]);function Ir(Qt){var xr=NaN,aa=NaN,$r=NaN,ka;return{lineStart:function(){Qt.lineStart(),ka=1},point:function(li,Ci){var Hi=li>0?a:-a,Qi=m(li-xr);m(Qi-a)0?i:-i),Qt.point($r,aa),Qt.lineEnd(),Qt.lineStart(),Qt.point(Hi,aa),Qt.point(li,aa),ka=0):$r!==Hi&&Qi>=a&&(m(xr-$r)r?c((p(xr)*(li=l($r))*p(aa)-p($r)*(ka=l(xr))*p(Qt))/(ka*li*Ci)):(xr+$r)/2}function Pa(Qt,xr,aa,$r){var ka;if(Qt==null)ka=aa*i,$r.point(-a,ka),$r.point(0,ka),$r.point(a,ka),$r.point(a,0),$r.point(a,-ka),$r.point(0,-ka),$r.point(-a,-ka),$r.point(-a,0),$r.point(-a,ka);else if(m(Qt[0]-xr[0])>r){var li=Qt[0]0,ka=m(xr)>r;function li(Pi,Di,Ni,mi){Ia(mi,Qt,aa,Ni,Pi,Di)}function Ci(Pi,Di){return l(Pi)*l(Di)>xr}function Hi(Pi){var Di,Ni,mi,Mn,Qn;return{lineStart:function(){Mn=mi=!1,Qn=1},point:function(io,eo){var co=[io,eo],An,un=Ci(io,eo),yo=$r?un?0:pn(io,eo):un?pn(io+(io<0?a:-a),eo):0;if(!Di&&(Mn=mi=un)&&Pi.lineStart(),un!==mi&&(An=Qi(Di,co),(!An||xt(Di,An)||xt(co,An))&&(co[2]=1)),un!==mi)Qn=0,un?(Pi.lineStart(),An=Qi(co,Di),Pi.point(An[0],An[1])):(An=Qi(Di,co),Pi.point(An[0],An[1],2),Pi.lineEnd()),Di=An;else if(ka&&Di&&$r^un){var Qo;!(yo&Ni)&&(Qo=Qi(co,Di,!0))&&(Qn=0,$r?(Pi.lineStart(),Pi.point(Qo[0][0],Qo[0][1]),Pi.point(Qo[1][0],Qo[1][1]),Pi.lineEnd()):(Pi.point(Qo[1][0],Qo[1][1]),Pi.lineEnd(),Pi.lineStart(),Pi.point(Qo[0][0],Qo[0][1],3)))}un&&(!Di||!xt(Di,co))&&Pi.point(co[0],co[1]),Di=co,mi=un,Ni=yo},lineEnd:function(){mi&&Pi.lineEnd(),Di=null},clean:function(){return Qn|(Mn&&mi)<<1}}}function Qi(Pi,Di,Ni){var mi=te(Pi),Mn=te(Di),Qn=[1,0,0],io=we(mi,Mn),eo=pe(io,io),co=io[0],An=eo-co*co;if(!An)return!Ni&Πvar un=xr*eo/An,yo=-xr*co/An,Qo=we(Qn,io),ks=Re(Qn,un),rl=Re(io,yo);Se(ks,rl);var Ns=Qo,el=pe(ks,Ns),Ss=pe(Ns,Ns),Fl=el*el-Ss*(pe(ks,ks)-1);if(!(Fl<0)){var yl=d(Fl),ll=Re(Ns,(-el-yl)/Ss);if(Se(ll,ks),ll=ee(ll),!Ni)return ll;var Un=Pi[0],Ro=Di[0],Js=Pi[1],Fs=Di[1],cu;Ro0^ll[1]<(m(ll[0]-Un)a^(Un<=ll[0]&&ll[0]<=Ro)){var bu=Re(Ns,(-el+yl)/Ss);return Se(bu,ks),[ll,ee(bu)]}}}function pn(Pi,Di){var Ni=$r?Qt:a-Qt,mi=0;return Pi<-Ni?mi|=1:Pi>Ni&&(mi|=2),Di<-Ni?mi|=4:Di>Ni&&(mi|=8),mi}return Hr(Ci,Hi,li,$r?[0,-Qt]:[-a,Qt-a])}function la(Qt,xr,aa,$r,ka,li){var Ci=Qt[0],Hi=Qt[1],Qi=xr[0],pn=xr[1],Pi=0,Di=1,Ni=Qi-Ci,mi=pn-Hi,Mn;if(Mn=aa-Ci,!(!Ni&&Mn>0)){if(Mn/=Ni,Ni<0){if(Mn0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}if(Mn=ka-Ci,!(!Ni&&Mn<0)){if(Mn/=Ni,Ni<0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}else if(Ni>0){if(Mn0)){if(Mn/=mi,mi<0){if(Mn0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}if(Mn=li-Hi,!(!mi&&Mn<0)){if(Mn/=mi,mi<0){if(Mn>Di)return;Mn>Pi&&(Pi=Mn)}else if(mi>0){if(Mn0&&(Qt[0]=Ci+Pi*Ni,Qt[1]=Hi+Pi*mi),Di<1&&(xr[0]=Ci+Di*Ni,xr[1]=Hi+Di*mi),!0}}}}}var ba=1e9,Ai=-ba;function ki(Qt,xr,aa,$r){function ka(pn,Pi){return Qt<=pn&&pn<=aa&&xr<=Pi&&Pi<=$r}function li(pn,Pi,Di,Ni){var mi=0,Mn=0;if(pn==null||(mi=Ci(pn,Di))!==(Mn=Ci(Pi,Di))||Qi(pn,Pi)<0^Di>0)do Ni.point(mi===0||mi===3?Qt:aa,mi>1?$r:xr);while((mi=(mi+Di+4)%4)!==Mn);else Ni.point(Pi[0],Pi[1])}function Ci(pn,Pi){return m(pn[0]-Qt)0?0:3:m(pn[0]-aa)0?2:1:m(pn[1]-xr)0?1:0:Pi>0?3:2}function Hi(pn,Pi){return Qi(pn.x,Pi.x)}function Qi(pn,Pi){var Di=Ci(pn,1),Ni=Ci(Pi,1);return Di!==Ni?Di-Ni:Di===0?Pi[1]-pn[1]:Di===1?pn[0]-Pi[0]:Di===2?pn[1]-Pi[1]:Pi[0]-pn[0]}return function(pn){var Pi=pn,Di=cn(),Ni,mi,Mn,Qn,io,eo,co,An,un,yo,Qo,ks={point:rl,lineStart:Fl,lineEnd:yl,polygonStart:el,polygonEnd:Ss};function rl(Un,Ro){ka(Un,Ro)&&Pi.point(Un,Ro)}function Ns(){for(var Un=0,Ro=0,Js=mi.length;Ro$r&&(Rc-Ic)*($r-bu)>(Au-bu)*(Qt-Ic)&&++Un:Au<=$r&&(Rc-Ic)*($r-bu)<(Au-bu)*(Qt-Ic)&&--Un;return Un}function el(){Pi=Di,Ni=[],mi=[],Qo=!0}function Ss(){var Un=Ns(),Ro=Qo&&Un,Js=(Ni=_.merge(Ni)).length;(Ro||Js)&&(pn.polygonStart(),Ro&&(pn.lineStart(),li(null,null,1,pn),pn.lineEnd()),Js&&Or(Ni,Hi,Un,li,pn),pn.polygonEnd()),Pi=pn,Ni=mi=Mn=null}function Fl(){ks.point=ll,mi&&mi.push(Mn=[]),yo=!0,un=!1,co=An=NaN}function yl(){Ni&&(ll(Qn,io),eo&&un&&Di.rejoin(),Ni.push(Di.result())),ks.point=rl,un&&Pi.lineEnd()}function ll(Un,Ro){var Js=ka(Un,Ro);if(mi&&Mn.push([Un,Ro]),yo)Qn=Un,io=Ro,eo=Js,yo=!1,Js&&(Pi.lineStart(),Pi.point(Un,Ro));else if(Js&&un)Pi.point(Un,Ro);else{var Fs=[co=Math.max(Ai,Math.min(ba,co)),An=Math.max(Ai,Math.min(ba,An))],cu=[Un=Math.max(Ai,Math.min(ba,Un)),Ro=Math.max(Ai,Math.min(ba,Ro))];la(Fs,cu,Qt,xr,aa,$r)?(un||(Pi.lineStart(),Pi.point(Fs[0],Fs[1])),Pi.point(cu[0],cu[1]),Js||Pi.lineEnd(),Qo=!1):Js&&(Pi.lineStart(),Pi.point(Un,Ro),Qo=!1)}co=Un,An=Ro,un=Js}return ks}}function Ki(){var Qt=0,xr=0,aa=960,$r=500,ka,li,Ci;return Ci={stream:function(Hi){return ka&&li===Hi?ka:ka=ki(Qt,xr,aa,$r)(li=Hi)},extent:function(Hi){return arguments.length?(Qt=+Hi[0][0],xr=+Hi[0][1],aa=+Hi[1][0],$r=+Hi[1][1],ka=li=null,Ci):[[Qt,xr],[aa,$r]]}}}var En=S(),Tn,On,kn,ao={sphere:P,point:P,lineStart:Co,lineEnd:P,polygonStart:P,polygonEnd:P};function Co(){ao.point=zs,ao.lineEnd=bo}function bo(){ao.point=ao.lineEnd=P}function zs(Qt,xr){Qt*=f,xr*=f,Tn=Qt,On=p(xr),kn=l(xr),ao.point=Cn}function Cn(Qt,xr){Qt*=f,xr*=f;var aa=p(xr),$r=l(xr),ka=m(Qt-Tn),li=l(ka),Ci=p(ka),Hi=$r*Ci,Qi=kn*aa-On*$r*li,pn=On*aa+kn*$r*li;En.add(T(d(Hi*Hi+Qi*Qi),pn)),Tn=Qt,On=aa,kn=$r}function wo(Qt){return En.reset(),U(Qt,ao),+En}var Zn=[null,null],go={type:"LineString",coordinates:Zn};function os(Qt,xr){return Zn[0]=Qt,Zn[1]=xr,wo(go)}var ys={Feature:function(Qt,xr){return Yn(Qt.geometry,xr)},FeatureCollection:function(Qt,xr){for(var aa=Qt.features,$r=-1,ka=aa.length;++$r0&&(ka=os(Qt[li],Qt[li-1]),ka>0&&aa<=ka&&$r<=ka&&(aa+$r-ka)*(1-Math.pow((aa-$r)/ka,2))r}).map(Ni)).concat(_.range(x(li/pn)*pn,ka,pn).filter(function(An){return m(An%Di)>r}).map(mi))}return eo.lines=function(){return co().map(function(An){return{type:"LineString",coordinates:An}})},eo.outline=function(){return{type:"Polygon",coordinates:[Mn($r).concat(Qn(Ci).slice(1),Mn(aa).reverse().slice(1),Qn(Hi).reverse().slice(1))]}},eo.extent=function(An){return arguments.length?eo.extentMajor(An).extentMinor(An):eo.extentMinor()},eo.extentMajor=function(An){return arguments.length?($r=+An[0][0],aa=+An[1][0],Hi=+An[0][1],Ci=+An[1][1],$r>aa&&(An=$r,$r=aa,aa=An),Hi>Ci&&(An=Hi,Hi=Ci,Ci=An),eo.precision(io)):[[$r,Hi],[aa,Ci]]},eo.extentMinor=function(An){return arguments.length?(xr=+An[0][0],Qt=+An[1][0],li=+An[0][1],ka=+An[1][1],xr>Qt&&(An=xr,xr=Qt,Qt=An),li>ka&&(An=li,li=ka,ka=An),eo.precision(io)):[[xr,li],[Qt,ka]]},eo.step=function(An){return arguments.length?eo.stepMajor(An).stepMinor(An):eo.stepMinor()},eo.stepMajor=function(An){return arguments.length?(Pi=+An[0],Di=+An[1],eo):[Pi,Di]},eo.stepMinor=function(An){return arguments.length?(Qi=+An[0],pn=+An[1],eo):[Qi,pn]},eo.precision=function(An){return arguments.length?(io=+An,Ni=Gi(li,ka,90),mi=Pn(xr,Qt,io),Mn=Gi(Hi,Ci,90),Qn=Pn($r,aa,io),eo):io},eo.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function bs(){return qs()()}function lo(Qt,xr){var aa=Qt[0]*f,$r=Qt[1]*f,ka=xr[0]*f,li=xr[1]*f,Ci=l($r),Hi=p($r),Qi=l(li),pn=p(li),Pi=Ci*l(aa),Di=Ci*p(aa),Ni=Qi*l(ka),mi=Qi*p(ka),Mn=2*y(d(D(li-$r)+Ci*Qi*D(ka-aa))),Qn=p(Mn),io=Mn?function(eo){var co=p(eo*=Mn)/Qn,An=p(Mn-eo)/Qn,un=An*Pi+co*Ni,yo=An*Di+co*mi,Qo=An*Hi+co*pn;return[T(yo,un)*h,T(Qo,d(un*un+yo*yo))*h]}:function(){return[aa*h,$r*h]};return io.distance=Mn,io}function Zo(Qt){return Qt}var ws=S(),Hs=S(),il,yn,Po,To,Ws={point:P,lineStart:P,lineEnd:P,polygonStart:function(){Ws.lineStart=Ll,Ws.lineEnd=Ks},polygonEnd:function(){Ws.lineStart=Ws.lineEnd=Ws.point=P,ws.add(m(Hs)),Hs.reset()},result:function(){var Qt=ws/2;return ws.reset(),Qt}};function Ll(){Ws.point=uo}function uo(Qt,xr){Ws.point=Nl,il=Po=Qt,yn=To=xr}function Nl(Qt,xr){Hs.add(To*Qt-Po*xr),Po=Qt,To=xr}function Ks(){Nl(il,yn)}var Ts=1/0,Ls=Ts,Jo=-Ts,Es=Jo,Ul={point:lu,lineStart:P,lineEnd:P,polygonStart:P,polygonEnd:P,result:function(){var Qt=[[Ts,Ls],[Jo,Es]];return Jo=Es=-(Ls=Ts=1/0),Qt}};function lu(Qt,xr){QtJo&&(Jo=Qt),xrEs&&(Es=xr)}var Tc=0,du=0,Sf=0,Uc=0,Bs=0,dc=0,Wc=0,uu=0,Pl=0,ic,Ou,nl,vl,As={point:Xs,lineStart:nc,lineEnd:fl,polygonStart:function(){As.lineStart=xh,As.lineEnd=us},polygonEnd:function(){As.point=Xs,As.lineStart=nc,As.lineEnd=fl},result:function(){var Qt=Pl?[Wc/Pl,uu/Pl]:dc?[Uc/dc,Bs/dc]:Sf?[Tc/Sf,du/Sf]:[NaN,NaN];return Tc=du=Sf=Uc=Bs=dc=Wc=uu=Pl=0,Qt}};function Xs(Qt,xr){Tc+=Qt,du+=xr,++Sf}function nc(){As.point=jl}function jl(Qt,xr){As.point=qu,Xs(nl=Qt,vl=xr)}function qu(Qt,xr){var aa=Qt-nl,$r=xr-vl,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(vl+xr)/2,dc+=ka,Xs(nl=Qt,vl=xr)}function fl(){As.point=Xs}function xh(){As.point=bh}function us(){Ps(ic,Ou)}function bh(Qt,xr){As.point=Ps,Xs(ic=nl=Qt,Ou=vl=xr)}function Ps(Qt,xr){var aa=Qt-nl,$r=xr-vl,ka=d(aa*aa+$r*$r);Uc+=ka*(nl+Qt)/2,Bs+=ka*(vl+xr)/2,dc+=ka,ka=vl*Qt-nl*xr,Wc+=ka*(nl+Qt),uu+=ka*(vl+xr),Pl+=ka*3,Xs(nl=Qt,vl=xr)}function to(Qt){this._context=Qt}to.prototype={_radius:4.5,pointRadius:function(Qt){return this._radius=Qt,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(Qt,xr){switch(this._point){case 0:{this._context.moveTo(Qt,xr),this._point=1;break}case 1:{this._context.lineTo(Qt,xr);break}default:{this._context.moveTo(Qt+this._radius,xr),this._context.arc(Qt,xr,this._radius,0,s);break}}},result:P};var Xc=S(),Vu,ql,Mf,Ac,nf,Ql={point:P,lineStart:function(){Ql.point=Jf},lineEnd:function(){Vu&&Of(ql,Mf),Ql.point=P},polygonStart:function(){Vu=!0},polygonEnd:function(){Vu=null},result:function(){var Qt=+Xc;return Xc.reset(),Qt}};function Jf(Qt,xr){Ql.point=Of,ql=Ac=Qt,Mf=nf=xr}function Of(Qt,xr){Ac-=Qt,nf-=xr,Xc.add(d(Ac*Ac+nf*nf)),Ac=Qt,nf=xr}function of(){this._string=[]}of.prototype={_radius:4.5,_circle:jc(4.5),pointRadius:function(Qt){return(Qt=+Qt)!==this._radius&&(this._radius=Qt,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(Qt,xr){switch(this._point){case 0:{this._string.push("M",Qt,",",xr),this._point=1;break}case 1:{this._string.push("L",Qt,",",xr);break}default:{this._circle==null&&(this._circle=jc(this._radius)),this._string.push("M",Qt,",",xr,this._circle);break}}},result:function(){if(this._string.length){var Qt=this._string.join("");return this._string=[],Qt}else return null}};function jc(Qt){return"m0,"+Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+-2*Qt+"a"+Qt+","+Qt+" 0 1,1 0,"+2*Qt+"z"}function Bf(Qt,xr){var aa=4.5,$r,ka;function li(Ci){return Ci&&(typeof aa=="function"&&ka.pointRadius(+aa.apply(this,arguments)),U(Ci,$r(ka))),ka.result()}return li.area=function(Ci){return U(Ci,$r(Ws)),Ws.result()},li.measure=function(Ci){return U(Ci,$r(Ql)),Ql.result()},li.bounds=function(Ci){return U(Ci,$r(Ul)),Ul.result()},li.centroid=function(Ci){return U(Ci,$r(As)),As.result()},li.projection=function(Ci){return arguments.length?($r=Ci==null?(Qt=null,Zo):(Qt=Ci).stream,li):Qt},li.context=function(Ci){return arguments.length?(ka=Ci==null?(xr=null,new of):new to(xr=Ci),typeof aa!="function"&&ka.pointRadius(aa),li):xr},li.pointRadius=function(Ci){return arguments.length?(aa=typeof Ci=="function"?Ci:(ka.pointRadius(+Ci),+Ci),li):aa},li.projection(Qt).context(xr)}function Nf(Qt){return{stream:Gu(Qt)}}function Gu(Qt){return function(xr){var aa=new Ef;for(var $r in Qt)aa[$r]=Qt[$r];return aa.stream=xr,aa}}function Ef(){}Ef.prototype={constructor:Ef,point:function(Qt,xr){this.stream.point(Qt,xr)},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(Qt,xr,aa){var $r=Qt.clipExtent&&Qt.clipExtent();return Qt.scale(150).translate([0,0]),$r!=null&&Qt.clipExtent(null),U(aa,Qt.stream(Ul)),xr(Ul.result()),$r!=null&&Qt.clipExtent($r),Qt}function Zc(Qt,xr,aa){return oc(Qt,function($r){var ka=xr[1][0]-xr[0][0],li=xr[1][1]-xr[0][1],Ci=Math.min(ka/($r[1][0]-$r[0][0]),li/($r[1][1]-$r[0][1])),Hi=+xr[0][0]+(ka-Ci*($r[1][0]+$r[0][0]))/2,Qi=+xr[0][1]+(li-Ci*($r[1][1]+$r[0][1]))/2;Qt.scale(150*Ci).translate([Hi,Qi])},aa)}function eu(Qt,xr,aa){return Zc(Qt,[[0,0],xr],aa)}function qc(Qt,xr,aa){return oc(Qt,function($r){var ka=+xr,li=ka/($r[1][0]-$r[0][0]),Ci=(ka-li*($r[1][0]+$r[0][0]))/2,Hi=-li*$r[0][1];Qt.scale(150*li).translate([Ci,Hi])},aa)}function Sc(Qt,xr,aa){return oc(Qt,function($r){var ka=+xr,li=ka/($r[1][1]-$r[0][1]),Ci=-li*$r[0][0],Hi=(ka-li*($r[1][1]+$r[0][1]))/2;Qt.scale(150*li).translate([Ci,Hi])},aa)}var Zs=16,kf=l(30*f);function fh(Qt,xr){return+xr?Yc(Qt,xr):Uf(Qt)}function Uf(Qt){return Gu({point:function(xr,aa){xr=Qt(xr,aa),this.stream.point(xr[0],xr[1])}})}function Yc(Qt,xr){function aa($r,ka,li,Ci,Hi,Qi,pn,Pi,Di,Ni,mi,Mn,Qn,io){var eo=pn-$r,co=Pi-ka,An=eo*eo+co*co;if(An>4*xr&&Qn--){var un=Ci+Ni,yo=Hi+mi,Qo=Qi+Mn,ks=d(un*un+yo*yo+Qo*Qo),rl=y(Qo/=ks),Ns=m(m(Qo)-1)xr||m((eo*yl+co*ll)/An-.5)>.3||Ci*Ni+Hi*mi+Qi*Mn2?Un[2]%360*f:0,yl()):[Hi*h,Qi*h,pn*h]},Ss.angle=function(Un){return arguments.length?(Di=Un%360*f,yl()):Di*h},Ss.reflectX=function(Un){return arguments.length?(Ni=Un?-1:1,yl()):Ni<0},Ss.reflectY=function(Un){return arguments.length?(mi=Un?-1:1,yl()):mi<0},Ss.precision=function(Un){return arguments.length?(Qo=fh(ks,yo=Un*Un),ll()):d(yo)},Ss.fitExtent=function(Un,Ro){return Zc(Ss,Un,Ro)},Ss.fitSize=function(Un,Ro){return eu(Ss,Un,Ro)},Ss.fitWidth=function(Un,Ro){return qc(Ss,Un,Ro)},Ss.fitHeight=function(Un,Ro){return Sc(Ss,Un,Ro)};function yl(){var Un=ml(aa,0,0,Ni,mi,Di).apply(null,xr(li,Ci)),Ro=(Di?ml:jf)(aa,$r-Un[0],ka-Un[1],Ni,mi,Di);return Pi=Ba(Hi,Qi,pn),ks=ra(xr,Ro),rl=ra(Pi,ks),Qo=fh(ks,yo),ll()}function ll(){return Ns=el=null,Ss}return function(){return xr=Qt.apply(this,arguments),Ss.invert=xr.invert&&Fl,yl()}}function ol(Qt){var xr=0,aa=a/3,$r=Mc(Qt),ka=$r(xr,aa);return ka.parallels=function(li){return arguments.length?$r(xr=li[0]*f,aa=li[1]*f):[xr*h,aa*h]},ka}function vc(Qt){var xr=l(Qt);function aa($r,ka){return[$r*xr,p(ka)/xr]}return aa.invert=function($r,ka){return[$r/xr,y(ka*xr)]},aa}function yu(Qt,xr){var aa=p(Qt),$r=(aa+p(xr))/2;if(m($r)=.12&&io<.234&&Qn>=-.425&&Qn<-.214?ka:io>=.166&&io<.234&&Qn>=-.214&&Qn<-.115?Ci:aa).invert(Ni)},Pi.stream=function(Ni){return Qt&&xr===Ni?Qt:Qt=qf([aa.stream(xr=Ni),ka.stream(Ni),Ci.stream(Ni)])},Pi.precision=function(Ni){return arguments.length?(aa.precision(Ni),ka.precision(Ni),Ci.precision(Ni),Di()):aa.precision()},Pi.scale=function(Ni){return arguments.length?(aa.scale(Ni),ka.scale(Ni*.35),Ci.scale(Ni),Pi.translate(aa.translate())):aa.scale()},Pi.translate=function(Ni){if(!arguments.length)return aa.translate();var mi=aa.scale(),Mn=+Ni[0],Qn=+Ni[1];return $r=aa.translate(Ni).clipExtent([[Mn-.455*mi,Qn-.238*mi],[Mn+.455*mi,Qn+.238*mi]]).stream(pn),li=ka.translate([Mn-.307*mi,Qn+.201*mi]).clipExtent([[Mn-.425*mi+r,Qn+.12*mi+r],[Mn-.214*mi-r,Qn+.234*mi-r]]).stream(pn),Hi=Ci.translate([Mn-.205*mi,Qn+.212*mi]).clipExtent([[Mn-.214*mi+r,Qn+.166*mi+r],[Mn-.115*mi-r,Qn+.234*mi-r]]).stream(pn),Di()},Pi.fitExtent=function(Ni,mi){return Zc(Pi,Ni,mi)},Pi.fitSize=function(Ni,mi){return eu(Pi,Ni,mi)},Pi.fitWidth=function(Ni,mi){return qc(Pi,Ni,mi)},Pi.fitHeight=function(Ni,mi){return Sc(Pi,Ni,mi)};function Di(){return Qt=xr=null,Pi}return Pi.scale(1070)}function Bu(Qt){return function(xr,aa){var $r=l(xr),ka=l(aa),li=Qt($r*ka);return[li*ka*p(xr),li*p(aa)]}}function Ec(Qt){return function(xr,aa){var $r=d(xr*xr+aa*aa),ka=Qt($r),li=p(ka),Ci=l(ka);return[T(xr*li,$r*Ci),y($r&&aa*li/$r)]}}var mc=Bu(function(Qt){return d(2/(1+Qt))});mc.invert=Ec(function(Qt){return 2*y(Qt/2)});function Lh(){return Lu(mc).scale(124.75).clipAngle(180-.001)}var sf=Bu(function(Qt){return(Qt=g(Qt))&&Qt/p(Qt)});sf.invert=Ec(function(Qt){return Qt});function vf(){return Lu(sf).scale(79.4188).clipAngle(180-.001)}function Nu(Qt,xr){return[Qt,A(u((i+xr)/2))]}Nu.invert=function(Qt,xr){return[Qt,2*c(w(xr))-i]};function lf(){return iu(Nu).scale(961/s)}function iu(Qt){var xr=Lu(Qt),aa=xr.center,$r=xr.scale,ka=xr.translate,li=xr.clipExtent,Ci=null,Hi,Qi,pn;xr.scale=function(Di){return arguments.length?($r(Di),Pi()):$r()},xr.translate=function(Di){return arguments.length?(ka(Di),Pi()):ka()},xr.center=function(Di){return arguments.length?(aa(Di),Pi()):aa()},xr.clipExtent=function(Di){return arguments.length?(Di==null?Ci=Hi=Qi=pn=null:(Ci=+Di[0][0],Hi=+Di[0][1],Qi=+Di[1][0],pn=+Di[1][1]),Pi()):Ci==null?null:[[Ci,Hi],[Qi,pn]]};function Pi(){var Di=a*$r(),Ni=xr(pi(xr.rotate()).invert([0,0]));return li(Ci==null?[[Ni[0]-Di,Ni[1]-Di],[Ni[0]+Di,Ni[1]+Di]]:Qt===Nu?[[Math.max(Ni[0]-Di,Ci),Hi],[Math.min(Ni[0]+Di,Qi),pn]]:[[Ci,Math.max(Ni[1]-Di,Hi)],[Qi,Math.min(Ni[1]+Di,pn)]])}return Pi()}function Kc(Qt){return u((i+Qt)/2)}function hh(Qt,xr){var aa=l(Qt),$r=Qt===xr?p(Qt):A(aa/l(xr))/A(Kc(xr)/Kc(Qt)),ka=aa*E(Kc(Qt),$r)/$r;if(!$r)return Nu;function li(Ci,Hi){ka>0?Hi<-i+r&&(Hi=-i+r):Hi>i-r&&(Hi=i-r);var Qi=ka/E(Kc(Hi),$r);return[Qi*p($r*Ci),ka-Qi*l($r*Ci)]}return li.invert=function(Ci,Hi){var Qi=ka-Hi,pn=b($r)*d(Ci*Ci+Qi*Qi),Pi=T(Ci,m(Qi))*b(Qi);return Qi*$r<0&&(Pi-=a*b(Ci)*b(Qi)),[Pi/$r,2*c(E(ka/pn,1/$r))-i]},li}function mf(){return ol(hh).scale(109.5).parallels([30,30])}function sl(Qt,xr){return[Qt,xr]}sl.invert=sl;function _u(){return Lu(sl).scale(152.63)}function Pu(Qt,xr){var aa=l(Qt),$r=Qt===xr?p(Qt):(aa-l(xr))/(xr-Qt),ka=aa/$r+Qt;if(m($r)r&&--$r>0);return[Qt/(.8707+(li=aa*aa)*(-.131979+li*(-.013791+li*li*li*(.003971-.001529*li)))),aa]};function gc(){return Lu(Cc).scale(175.295)}function Vl(Qt,xr){return[l(xr)*p(Qt),p(xr)]}Vl.invert=Ec(y);function xu(){return Lu(Vl).scale(249.5).clipAngle(90+r)}function Lc(Qt,xr){var aa=l(xr),$r=1+l(Qt)*aa;return[aa*p(Qt)/$r,p(xr)/$r]}Lc.invert=Ec(function(Qt){return 2*c(Qt)});function $c(){return Lu(Lc).scale(250).clipAngle(142)}function sc(Qt,xr){return[A(u((i+xr)/2)),-Qt]}sc.invert=function(Qt,xr){return[-xr,2*c(w(Qt))-i]};function Pc(){var Qt=iu(sc),xr=Qt.center,aa=Qt.rotate;return Qt.center=function($r){return arguments.length?xr([-$r[1],$r[0]]):($r=xr(),[$r[1],-$r[0]])},Qt.rotate=function($r){return arguments.length?aa([$r[0],$r[1],$r.length>2?$r[2]+90:90]):($r=aa(),[$r[0],$r[1],$r[2]-90])},aa([0,0,90]).scale(159.155)}v.geoAlbers=Ml,v.geoAlbersUsa=Qf,v.geoArea=j,v.geoAzimuthalEqualArea=Lh,v.geoAzimuthalEqualAreaRaw=mc,v.geoAzimuthalEquidistant=vf,v.geoAzimuthalEquidistantRaw=sf,v.geoBounds=Fe,v.geoCentroid=Fr,v.geoCircle=tn,v.geoClipAntimeridian=mr,v.geoClipCircle=ga,v.geoClipExtent=Ki,v.geoClipRectangle=ki,v.geoConicConformal=mf,v.geoConicConformalRaw=hh,v.geoConicEqualArea=Tu,v.geoConicEqualAreaRaw=yu,v.geoConicEquidistant=Cf,v.geoConicEquidistantRaw=Pu,v.geoContains=Ko,v.geoDistance=os,v.geoEqualEarth=Lf,v.geoEqualEarthRaw=Jc,v.geoEquirectangular=_u,v.geoEquirectangularRaw=sl,v.geoGnomonic=Vf,v.geoGnomonicRaw=nu,v.geoGraticule=qs,v.geoGraticule10=bs,v.geoIdentity=Xu,v.geoInterpolate=lo,v.geoLength=wo,v.geoMercator=lf,v.geoMercatorRaw=Nu,v.geoNaturalEarth1=gc,v.geoNaturalEarth1Raw=Cc,v.geoOrthographic=xu,v.geoOrthographicRaw=Vl,v.geoPath=Bf,v.geoProjection=Lu,v.geoProjectionMutator=Mc,v.geoRotation=pi,v.geoStereographic=$c,v.geoStereographicRaw=Lc,v.geoStream=U,v.geoTransform=Nf,v.geoTransverseMercator=Pc,v.geoTransverseMercatorRaw=sc,Object.defineProperty(v,"__esModule",{value:!0})})}}),qU=He({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,zE(),_x()):_(v.d3=v.d3||{},v.d3,v.d3)})(Z,function(v,_,S){"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,h=Math.pow,f=Math.round,m=Math.sign||function(qe){return qe>0?1:qe<0?-1:0},c=Math.sin,T=Math.tan,l=1e-6,x=1e-12,w=Math.PI,A=w/2,E=w/4,p=Math.SQRT1_2,b=F(2),d=F(w),u=w*2,g=180/w,y=w/180;function D(qe){return qe?qe/Math.sin(qe):1}function P(qe){return qe>1?A:qe<-1?-A:Math.asin(qe)}function z(qe){return qe>1?0:qe<-1?w:Math.acos(qe)}function F(qe){return qe>0?Math.sqrt(qe):0}function N(qe){return qe=o(2*qe),(qe-1)/(qe+1)}function O(qe){return(o(qe)-o(-qe))/2}function L(qe){return(o(qe)+o(-qe))/2}function U(qe){return i(qe+F(qe*qe+1))}function B(qe){return i(qe+F(qe*qe-1))}function W(qe){var $e=T(qe/2),lt=2*i(r(qe/2))/($e*$e);function pt(Et,bt){var Dt=r(Et),ur=r(bt),yr=c(bt),Er=ur*Dt,jr=-((1-Er?i((1+Er)/2)/(1-Er):-.5)+lt/(1+Er));return[jr*ur*c(Et),jr*yr]}return pt.invert=function(Et,bt){var Dt=F(Et*Et+bt*bt),ur=-qe/2,yr=50,Er;if(!Dt)return[0,0];do{var jr=ur/2,Qr=r(jr),ha=c(jr),Aa=ha/Qr,Da=-i(M(Qr));ur-=Er=(2/Aa*Da-lt*Aa-Dt)/(-Da/(ha*ha)+1-lt/(2*Qr*Qr))*(Qr<0?.7:1)}while(M(Er)>l&&--yr>0);var ci=c(ur);return[t(Et*ci,Dt*r(ur)),P(bt*ci/Dt)]},pt}function $(){var qe=A,$e=_.geoProjectionMutator(W),lt=$e(qe);return lt.radius=function(pt){return arguments.length?$e(qe=pt*y):qe*g},lt.scale(179.976).clipAngle(147)}function ue(qe,$e){var lt=r($e),pt=D(z(lt*r(qe/=2)));return[2*lt*c(qe)*pt,c($e)*pt]}ue.invert=function(qe,$e){if(!(qe*qe+4*$e*$e>w*w+l)){var lt=qe,pt=$e,Et=25;do{var bt=c(lt),Dt=c(lt/2),ur=r(lt/2),yr=c(pt),Er=r(pt),jr=c(2*pt),Qr=yr*yr,ha=Er*Er,Aa=Dt*Dt,Da=1-ha*ur*ur,ci=Da?z(Er*ur)*F(Vi=1/Da):Vi=0,Vi,ji=2*ci*Er*Dt-qe,on=ci*yr-$e,Sn=Vi*(ha*Aa+ci*Er*ur*Qr),Kn=Vi*(.5*bt*jr-ci*2*yr*Dt),Bn=Vi*.25*(jr*Dt-ci*yr*ha*bt),Ao=Vi*(Qr*ur+ci*Aa*Er),ls=Kn*Bn-Ao*Sn;if(!ls)break;var Mo=(on*Kn-ji*Ao)/ls,Yo=(ji*Bn-on*Sn)/ls;lt-=Mo,pt-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Et>0);return[lt,pt]}};function ce(){return _.geoProjection(ue).scale(152.63)}function de(qe){var $e=c(qe),lt=r(qe),pt=qe>=0?1:-1,Et=T(pt*qe),bt=(1+$e-lt)/2;function Dt(ur,yr){var Er=r(yr),jr=r(ur/=2);return[(1+Er)*c(ur),(pt*yr>-t(jr,Et)-.001?0:-pt*10)+bt+c(yr)*lt-(1+Er)*$e*jr]}return Dt.invert=function(ur,yr){var Er=0,jr=0,Qr=50;do{var ha=r(Er),Aa=c(Er),Da=r(jr),ci=c(jr),Vi=1+Da,ji=Vi*Aa-ur,on=bt+ci*lt-Vi*$e*ha-yr,Sn=Vi*ha/2,Kn=-Aa*ci,Bn=$e*Vi*Aa/2,Ao=lt*Da+$e*ha*ci,ls=Kn*Bn-Ao*Sn,Mo=(on*Kn-ji*Ao)/ls/2,Yo=(ji*Bn-on*Sn)/ls;M(Yo)>2&&(Yo/=2),Er-=Mo,jr-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Qr>0);return pt*jr>-t(r(Er),Et)-.001?[Er*2,jr]:null},Dt}function Y(){var qe=20*y,$e=qe>=0?1:-1,lt=T($e*qe),pt=_.geoProjectionMutator(de),Et=pt(qe),bt=Et.stream;return Et.parallel=function(Dt){return arguments.length?(lt=T(($e=(qe=Dt*y)>=0?1:-1)*qe),pt(qe)):qe*g},Et.stream=function(Dt){var ur=Et.rotate(),yr=bt(Dt),Er=(Et.rotate([0,0]),bt(Dt)),jr=Et.precision();return Et.rotate(ur),yr.sphere=function(){Er.polygonStart(),Er.lineStart();for(var Qr=$e*-180;$e*Qr<180;Qr+=$e*90)Er.point(Qr,$e*90);if(qe)for(;$e*(Qr-=3*$e*jr)>=-180;)Er.point(Qr,$e*-t(r(Qr*y/2),lt)*g);Er.lineEnd(),Er.polygonEnd()},yr},Et.scale(218.695).center([0,28.0974])}function X(qe,$e){var lt=T($e/2),pt=F(1-lt*lt),Et=1+pt*r(qe/=2),bt=c(qe)*pt/Et,Dt=lt/Et,ur=bt*bt,yr=Dt*Dt;return[4/3*bt*(3+ur-3*yr),4/3*Dt*(3+3*ur-yr)]}X.invert=function(qe,$e){if(qe*=3/8,$e*=3/8,!qe&&M($e)>1)return null;var lt=qe*qe,pt=$e*$e,Et=1+lt+pt,bt=F((Et-F(Et*Et-4*$e*$e))/2),Dt=P(bt)/3,ur=bt?B(M($e/bt))/3:U(M(qe))/3,yr=r(Dt),Er=L(ur),jr=Er*Er-yr*yr;return[m(qe)*2*t(O(ur)*yr,.25-jr),m($e)*2*t(Er*c(Dt),.25+jr)]};function Q(){return _.geoProjection(X).scale(66.1603)}var V=F(8),le=i(1+b);function ae(qe,$e){var lt=M($e);return ltx&&--pt>0);return[qe/(r(lt)*(V-1/c(lt))),m($e)*lt]};function j(){return _.geoProjection(ae).scale(112.314)}function ee(qe){var $e=2*w/qe;function lt(pt,Et){var bt=_.geoAzimuthalEquidistantRaw(pt,Et);if(M(pt)>A){var Dt=t(bt[1],bt[0]),ur=F(bt[0]*bt[0]+bt[1]*bt[1]),yr=$e*f((Dt-A)/$e)+A,Er=t(c(Dt-=yr),2-r(Dt));Dt=yr+P(w/ur*c(Er))-Er,bt[0]=ur*r(Dt),bt[1]=ur*c(Dt)}return bt}return lt.invert=function(pt,Et){var bt=F(pt*pt+Et*Et);if(bt>A){var Dt=t(Et,pt),ur=$e*f((Dt-A)/$e)+A,yr=Dt>ur?-1:1,Er=bt*r(ur-Dt),jr=1/T(yr*z((Er-w)/F(w*(w-2*Er)+bt*bt)));Dt=ur+2*e((jr+yr*F(jr*jr-3))/3),pt=bt*r(Dt),Et=bt*c(Dt)}return _.geoAzimuthalEquidistantRaw.invert(pt,Et)},lt}function te(){var qe=5,$e=_.geoProjectionMutator(ee),lt=$e(qe),pt=lt.stream,Et=.01,bt=-r(Et*y),Dt=c(Et*y);return lt.lobes=function(ur){return arguments.length?$e(qe=+ur):qe},lt.stream=function(ur){var yr=lt.rotate(),Er=pt(ur),jr=(lt.rotate([0,0]),pt(ur));return lt.rotate(yr),Er.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Qr=0,ha=360/qe,Aa=2*w/qe,Da=90-180/qe,ci=A;Qr0&&M(Et)>l);return pt<0?NaN:lt}function Pe(qe,$e,lt){return $e===void 0&&($e=40),lt===void 0&&(lt=x),function(pt,Et,bt,Dt){var ur,yr,Er;bt=bt===void 0?0:+bt,Dt=Dt===void 0?0:+Dt;for(var jr=0;jr<$e;jr++){var Qr=qe(bt,Dt),ha=Qr[0]-pt,Aa=Qr[1]-Et;if(M(ha)ur){bt-=yr/=2,Dt-=Er/=2;continue}ur=Da;var ci=(bt>0?-1:1)*lt,Vi=(Dt>0?-1:1)*lt,ji=qe(bt+ci,Dt),on=qe(bt,Dt+Vi),Sn=(ji[0]-Qr[0])/ci,Kn=(ji[1]-Qr[1])/ci,Bn=(on[0]-Qr[0])/Vi,Ao=(on[1]-Qr[1])/Vi,ls=Ao*Sn-Kn*Bn,Mo=(M(ls)<.5?.5:1)/ls;if(yr=(Aa*Bn-ha*Ao)*Mo,Er=(ha*Kn-Aa*Sn)*Mo,bt+=yr,Dt+=Er,M(yr)0&&(ur[1]*=1+yr/1.5*ur[0]*ur[0]),ur}return pt.invert=Pe(pt),pt}function at(){return _.geoProjection(je()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(qe,$e){var lt=qe*c($e),pt=30,Et;do $e-=Et=($e+c($e)-lt)/(1+r($e));while(M(Et)>l&&--pt>0);return $e/2}function tt(qe,$e,lt){function pt(Et,bt){return[qe*Et*r(bt=nt(lt,bt)),$e*c(bt)]}return pt.invert=function(Et,bt){return bt=P(bt/$e),[Et/(qe*r(bt)),P((2*bt+c(2*bt))/lt)]},pt}var Ve=tt(b/A,b,w);function he(){return _.geoProjection(Ve).scale(169.529)}var se=2.00276,ne=1.11072;function Ce(qe,$e){var lt=nt(w,$e);return[se*qe/(1/r($e)+ne/r(lt)),($e+b*c(lt))/se]}Ce.invert=function(qe,$e){var lt=se*$e,pt=$e<0?-E:E,Et=25,bt,Dt;do Dt=lt-b*c(pt),pt-=bt=(c(2*pt)+2*pt-w*c(Dt))/(2*r(2*pt)+2+w*r(Dt)*b*r(pt));while(M(bt)>l&&--Et>0);return Dt=lt-b*c(pt),[qe*(1/r(Dt)+ne/r(pt))/se,Dt]};function Ze(){return _.geoProjection(Ce).scale(160.857)}function rt(qe){var $e=0,lt=_.geoProjectionMutator(qe),pt=lt($e);return pt.parallel=function(Et){return arguments.length?lt($e=Et*y):$e*g},pt}function Je(qe,$e){return[qe*r($e),$e]}Je.invert=function(qe,$e){return[qe/r($e),$e]};function St(){return _.geoProjection(Je).scale(152.63)}function kt(qe){if(!qe)return Je;var $e=1/T(qe);function lt(pt,Et){var bt=$e+qe-Et,Dt=bt&&pt*r(Et)/bt;return[bt*c(Dt),$e-bt*r(Dt)]}return lt.invert=function(pt,Et){var bt=F(pt*pt+(Et=$e-Et)*Et),Dt=$e+qe-bt;return[bt/r(Dt)*t(pt,Et),Dt]},lt}function Bt(){return rt(kt).scale(123.082).center([0,26.1441]).parallel(45)}function Vt(qe){function $e(lt,pt){var Et=A-pt,bt=Et&<*qe*c(Et)/Et;return[Et*c(bt)/qe,A-Et*r(bt)]}return $e.invert=function(lt,pt){var Et=lt*qe,bt=A-pt,Dt=F(Et*Et+bt*bt),ur=t(Et,bt);return[(Dt?Dt/c(Dt):1)*ur/qe,A-Dt]},$e}function Ar(){var qe=.5,$e=_.geoProjectionMutator(Vt),lt=$e(qe);return lt.fraction=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(158.837)}var vr=tt(1,4/w,w);function qr(){return _.geoProjection(vr).scale(152.63)}function kr(qe,$e,lt,pt,Et,bt){var Dt=r(bt),ur;if(M(qe)>1||M(bt)>1)ur=z(lt*Et+$e*pt*Dt);else{var yr=c(qe/2),Er=c(bt/2);ur=2*P(F(yr*yr+$e*pt*Er*Er))}return M(ur)>l?[ur,t(pt*c(bt),$e*Et-lt*pt*Dt)]:[0,0]}function Ur(qe,$e,lt){return z((qe*qe+$e*$e-lt*lt)/(2*qe*$e))}function _t(qe){return qe-2*w*a((qe+w)/(2*w))}function Fe(qe,$e,lt){for(var pt=[[qe[0],qe[1],c(qe[1]),r(qe[1])],[$e[0],$e[1],c($e[1]),r($e[1])],[lt[0],lt[1],c(lt[1]),r(lt[1])]],Et=pt[2],bt,Dt=0;Dt<3;++Dt,Et=bt)bt=pt[Dt],Et.v=kr(bt[1]-Et[1],Et[3],Et[2],bt[3],bt[2],bt[0]-Et[0]),Et.point=[0,0];var ur=Ur(pt[0].v[0],pt[2].v[0],pt[1].v[0]),yr=Ur(pt[0].v[0],pt[1].v[0],pt[2].v[0]),Er=w-ur;pt[2].point[1]=0,pt[0].point[0]=-(pt[1].point[0]=pt[0].v[0]/2);var jr=[pt[2].point[0]=pt[0].point[0]+pt[2].v[0]*r(ur),2*(pt[0].point[1]=pt[1].point[1]=pt[2].v[0]*c(ur))];function Qr(ha,Aa){var Da=c(Aa),ci=r(Aa),Vi=new Array(3),ji;for(ji=0;ji<3;++ji){var on=pt[ji];if(Vi[ji]=kr(Aa-on[1],on[3],on[2],ci,Da,ha-on[0]),!Vi[ji][0])return on.point;Vi[ji][1]=_t(Vi[ji][1]-on.v[1])}var Sn=jr.slice();for(ji=0;ji<3;++ji){var Kn=ji==2?0:ji+1,Bn=Ur(pt[ji].v[0],Vi[ji][0],Vi[Kn][0]);Vi[ji][1]<0&&(Bn=-Bn),ji?ji==1?(Bn=yr-Bn,Sn[0]-=Vi[ji][0]*r(Bn),Sn[1]-=Vi[ji][0]*c(Bn)):(Bn=Er-Bn,Sn[0]+=Vi[ji][0]*r(Bn),Sn[1]+=Vi[ji][0]*c(Bn)):(Sn[0]+=Vi[ji][0]*r(Bn),Sn[1]-=Vi[ji][0]*c(Bn))}return Sn[0]/=3,Sn[1]/=3,Sn}return Qr}function Ye(qe){return qe[0]*=y,qe[1]*=y,qe}function Ae(){return Le([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Le(qe,$e,lt){var pt=_.geoCentroid({type:"MultiPoint",coordinates:[qe,$e,lt]}),Et=[-pt[0],-pt[1]],bt=_.geoRotation(Et),Dt=Fe(Ye(bt(qe)),Ye(bt($e)),Ye(bt(lt)));Dt.invert=Pe(Dt);var ur=_.geoProjection(Dt).rotate(Et),yr=ur.center;return delete ur.rotate,ur.center=function(Er){return arguments.length?yr(bt(Er)):bt.invert(yr())},ur.clipAngle(90)}function We(qe,$e){var lt=F(1-c($e));return[2/d*qe*lt,d*(1-lt)]}We.invert=function(qe,$e){var lt=(lt=$e/d-1)*lt;return[lt>0?qe*F(w/lt)/2:0,P(1-lt)]};function Ke(){return _.geoProjection(We).scale(95.6464).center([0,30])}function st(qe){var $e=T(qe);function lt(pt,Et){return[pt,(pt?pt/c(pt):1)*(c(Et)*r(pt)-$e*r(Et))]}return lt.invert=$e?function(pt,Et){pt&&(Et*=c(pt)/pt);var bt=r(pt);return[pt,2*t(F(bt*bt+$e*$e-Et*Et)-bt,$e-Et)]}:function(pt,Et){return[pt,P(pt?Et*T(pt)/pt:Et)]},lt}function ot(){return rt(st).scale(249.828).clipAngle(90)}var Ut=F(3);function Ct(qe,$e){return[Ut*qe*(2*r(2*$e/3)-1)/d,Ut*d*c($e/3)]}Ct.invert=function(qe,$e){var lt=3*P($e/(Ut*d));return[d*qe/(Ut*(2*r(2*lt/3)-1)),lt]};function Pt(){return _.geoProjection(Ct).scale(156.19)}function jt(qe){var $e=r(qe);function lt(pt,Et){return[pt*$e,c(Et)/$e]}return lt.invert=function(pt,Et){return[pt/$e,P(Et*$e)]},lt}function cr(){return rt(jt).parallel(38.58).scale(195.044)}function or(qe){var $e=r(qe);function lt(pt,Et){return[pt*$e,(1+$e)*T(Et/2)]}return lt.invert=function(pt,Et){return[pt/$e,e(Et/(1+$e))*2]},lt}function nr(){return rt(or).scale(124.75)}function Pr(qe,$e){var lt=F(8/(3*w));return[lt*qe*(1-M($e)/w),lt*$e]}Pr.invert=function(qe,$e){var lt=F(8/(3*w)),pt=$e/lt;return[qe/(lt*(1-M(pt)/w)),pt]};function _a(){return _.geoProjection(Pr).scale(165.664)}function Fa(qe,$e){var lt=F(4-3*c(M($e)));return[2/F(6*w)*qe*lt,m($e)*F(2*w/3)*(2-lt)]}Fa.invert=function(qe,$e){var lt=2-M($e)/F(2*w/3);return[qe*F(6*w)/(2*lt),m($e)*P((4-lt*lt)/3)]};function Ra(){return _.geoProjection(Fa).scale(165.664)}function qa(qe,$e){var lt=F(w*(4+w));return[2/lt*qe*(1+F(1-4*$e*$e/(w*w))),4/lt*$e]}qa.invert=function(qe,$e){var lt=F(w*(4+w))/2;return[qe*lt/(1+F(1-$e*$e*(4+w)/(4*w))),$e*lt/2]};function Wa(){return _.geoProjection(qa).scale(180.739)}function Ca(qe,$e){var lt=(2+A)*c($e);$e/=2;for(var pt=0,Et=1/0;pt<10&&M(Et)>l;pt++){var bt=r($e);$e-=Et=($e+c($e)*(bt+2)-lt)/(2*bt*(1+bt))}return[2/F(w*(4+w))*qe*(1+r($e)),2*F(w/(4+w))*c($e)]}Ca.invert=function(qe,$e){var lt=$e*F((4+w)/w)/2,pt=P(lt),Et=r(pt);return[qe/(2/F(w*(4+w))*(1+Et)),P((pt+lt*(Et+2))/(2+A))]};function hi(){return _.geoProjection(Ca).scale(180.739)}function wi(qe,$e){return[qe*(1+r($e))/F(2+w),2*$e/F(2+w)]}wi.invert=function(qe,$e){var lt=F(2+w),pt=$e*lt/2;return[lt*qe/(1+r(pt)),pt]};function Yt(){return _.geoProjection(wi).scale(173.044)}function Rt(qe,$e){for(var lt=(1+A)*c($e),pt=0,Et=1/0;pt<10&&M(Et)>l;pt++)$e-=Et=($e+c($e)-lt)/(1+r($e));return lt=F(2+w),[qe*(1+r($e))/lt,2*$e/lt]}Rt.invert=function(qe,$e){var lt=1+A,pt=F(lt/2);return[qe*2*pt/(1+r($e*=pt)),P(($e+c($e))/lt)]};function Zt(){return _.geoProjection(Rt).scale(173.044)}var Jt=3+2*b;function Fr(qe,$e){var lt=c(qe/=2),pt=r(qe),Et=F(r($e)),bt=r($e/=2),Dt=c($e)/(bt+b*pt*Et),ur=F(2/(1+Dt*Dt)),yr=F((b*bt+(pt+lt)*Et)/(b*bt+(pt-lt)*Et));return[Jt*(ur*(yr-1/yr)-2*i(yr)),Jt*(ur*Dt*(yr+1/yr)-2*e(Dt))]}Fr.invert=function(qe,$e){if(!(bt=X.invert(qe/1.2,$e*1.065)))return null;var lt=bt[0],pt=bt[1],Et=20,bt;qe/=Jt,$e/=Jt;do{var Dt=lt/2,ur=pt/2,yr=c(Dt),Er=r(Dt),jr=c(ur),Qr=r(ur),ha=r(pt),Aa=F(ha),Da=jr/(Qr+b*Er*Aa),ci=Da*Da,Vi=F(2/(1+ci)),ji=b*Qr+(Er+yr)*Aa,on=b*Qr+(Er-yr)*Aa,Sn=ji/on,Kn=F(Sn),Bn=Kn-1/Kn,Ao=Kn+1/Kn,ls=Vi*Bn-2*i(Kn)-qe,Mo=Vi*Da*Ao-2*e(Da)-$e,Yo=jr&&p*Aa*yr*ci/jr,ds=(b*Er*Qr+Aa)/(2*(Qr+b*Er*Aa)*(Qr+b*Er*Aa)*Aa),ul=-.5*Da*Vi*Vi*Vi,tl=ul*Yo,es=ul*ds,ts=(ts=2*Qr+b*Aa*(Er-yr))*ts*Kn,Il=(b*Er*Qr*Aa+ha)/ts,tu=-(b*yr*jr)/(Aa*ts),Ru=Bn*tl-2*Il/Kn+Vi*(Il+Il/Sn),vu=Bn*es-2*tu/Kn+Vi*(tu+tu/Sn),wl=Da*Ao*tl-2*Yo/(1+ci)+Vi*Ao*Yo+Vi*Da*(Il-Il/Sn),fu=Da*Ao*es-2*ds/(1+ci)+Vi*Ao*ds+Vi*Da*(tu-tu/Sn),uc=vu*wl-fu*Ru;if(!uc)break;var Gl=(Mo*vu-ls*fu)/uc,Hl=(ls*wl-Mo*Ru)/uc;lt-=Gl,pt=n(-A,s(A,pt-Hl))}while((M(Gl)>l||M(Hl)>l)&&--Et>0);return M(M(pt)-A)pt){var Qr=F(jr),ha=t(Er,yr),Aa=lt*f(ha/lt),Da=ha-Aa,ci=qe*r(Da),Vi=(qe*c(Da)-Da*c(ci))/(A-ci),ji=xt(Da,Vi),on=(w-qe)/ut(ji,ci,w);yr=Qr;var Sn=50,Kn;do yr-=Kn=(qe+ut(ji,ci,yr)*on-Qr)/(ji(yr)*on);while(M(Kn)>l&&--Sn>0);Er=Da*c(yr),yrpt){var yr=F(ur),Er=t(Dt,bt),jr=lt*f(Er/lt),Qr=Er-jr;bt=yr*r(Qr),Dt=yr*c(Qr);for(var ha=bt-A,Aa=c(bt),Da=Dt/Aa,ci=btl||M(Da)>l)&&--ci>0);return[Qr,ha]},yr}var wr=Cr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Rr(){return _.geoProjection(wr).scale(149.995)}var Nr=Cr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Hr(){return _.geoProjection(Nr).scale(153.93)}var gt=Cr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Kt(){return _.geoProjection(gt).scale(130.945)}function mr(qe,$e){var lt=qe*qe,pt=$e*$e;return[qe*(1-.162388*pt)*(.87-952426e-9*lt*lt),$e*(1+pt/12)]}mr.invert=function(qe,$e){var lt=qe,pt=$e,Et=50,bt;do{var Dt=pt*pt;pt-=bt=(pt*(1+Dt/12)-$e)/(1+Dt/4)}while(M(bt)>l&&--Et>0);Et=50,qe/=1-.162388*Dt;do{var ur=(ur=lt*lt)*ur;lt-=bt=(lt*(.87-952426e-9*ur)-qe)/(.87-.00476213*ur)}while(M(bt)>l&&--Et>0);return[lt,pt]};function Ir(){return _.geoProjection(mr).scale(131.747)}var va=Cr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Pa(){return _.geoProjection(va).scale(131.087)}function ga(qe){var $e=qe(A,0)[0]-qe(-A,0)[0];function lt(pt,Et){var bt=pt>0?-.5:.5,Dt=qe(pt+bt*w,Et);return Dt[0]-=bt*$e,Dt}return qe.invert&&(lt.invert=function(pt,Et){var bt=pt>0?-.5:.5,Dt=qe.invert(pt+bt*$e,Et),ur=Dt[0]-bt*w;return ur<-w?ur+=2*w:ur>w&&(ur-=2*w),Dt[0]=ur,Dt}),lt}function la(qe,$e){var lt=m(qe),pt=m($e),Et=r($e),bt=r(qe)*Et,Dt=c(qe)*Et,ur=c(pt*$e);qe=M(t(Dt,ur)),$e=P(bt),M(qe-A)>l&&(qe%=A);var yr=ba(qe>w/4?A-qe:qe,$e);return qe>w/4&&(ur=yr[0],yr[0]=-yr[1],yr[1]=-ur),yr[0]*=lt,yr[1]*=-pt,yr}la.invert=function(qe,$e){M(qe)>1&&(qe=m(qe)*2-qe),M($e)>1&&($e=m($e)*2-$e);var lt=m(qe),pt=m($e),Et=-lt*qe,bt=-pt*$e,Dt=bt/Et<1,ur=Ai(Dt?bt:Et,Dt?Et:bt),yr=ur[0],Er=ur[1],jr=r(Er);return Dt&&(yr=-A-yr),[lt*(t(c(yr)*jr,-c(Er))+w),pt*P(r(yr)*jr)]};function ba(qe,$e){if($e===A)return[0,0];var lt=c($e),pt=lt*lt,Et=pt*pt,bt=1+Et,Dt=1+3*Et,ur=1-Et,yr=P(1/F(bt)),Er=ur+pt*bt*yr,jr=(1-lt)/Er,Qr=F(jr),ha=jr*bt,Aa=F(ha),Da=Qr*ur,ci,Vi;if(qe===0)return[0,-(Da+pt*Aa)];var ji=r($e),on=1/ji,Sn=2*lt*ji,Kn=(-3*pt+yr*Dt)*Sn,Bn=(-Er*ji-(1-lt)*Kn)/(Er*Er),Ao=.5*Bn/Qr,ls=ur*Ao-2*pt*Qr*Sn,Mo=pt*bt*Bn+jr*Dt*Sn,Yo=-on*Sn,ds=-on*Mo,ul=-2*on*ls,tl=4*qe/w,es;if(qe>.222*w||$e.175*w){if(ci=(Da+pt*F(ha*(1+Et)-Da*Da))/(1+Et),qe>w/4)return[ci,ci];var ts=ci,Il=.5*ci;ci=.5*(Il+ts),Vi=50;do{var tu=F(ha-ci*ci),Ru=ci*(ul+Yo*tu)+ds*P(ci/Aa)-tl;if(!Ru)break;Ru<0?Il=ci:ts=ci,ci=.5*(Il+ts)}while(M(ts-Il)>l&&--Vi>0)}else{ci=l,Vi=25;do{var vu=ci*ci,wl=F(ha-vu),fu=ul+Yo*wl,uc=ci*fu+ds*P(ci/Aa)-tl,Gl=fu+(ds-Yo*vu)/wl;ci-=es=wl?uc/Gl:0}while(M(es)>l&&--Vi>0)}return[ci,-Da-pt*F(ha-ci*ci)]}function Ai(qe,$e){for(var lt=0,pt=1,Et=.5,bt=50;;){var Dt=Et*Et,ur=F(Et),yr=P(1/F(1+Dt)),Er=1-Dt+Et*(1+Dt)*yr,jr=(1-ur)/Er,Qr=F(jr),ha=jr*(1+Dt),Aa=Qr*(1-Dt),Da=ha-qe*qe,ci=F(Da),Vi=$e+Aa+Et*ci;if(M(pt-lt)0?lt=Et:pt=Et,Et=.5*(lt+pt)}if(!bt)return null;var ji=P(ur),on=r(ji),Sn=1/on,Kn=2*ur*on,Bn=(-3*Et+yr*(1+3*Dt))*Kn,Ao=(-Er*on-(1-ur)*Bn)/(Er*Er),ls=.5*Ao/Qr,Mo=(1-Dt)*ls-2*Et*Qr*Kn,Yo=-2*Sn*Mo,ds=-Sn*Kn,ul=-Sn*(Et*(1+Dt)*Ao+jr*(1+3*Dt)*Kn);return[w/4*(qe*(Yo+ds*ci)+ul*P(qe/F(ha))),ji]}function ki(){return _.geoProjection(ga(la)).scale(239.75)}function Ki(qe,$e,lt){var pt,Et,bt;return qe?(pt=En(qe,lt),$e?(Et=En($e,1-lt),bt=Et[1]*Et[1]+lt*pt[0]*pt[0]*Et[0]*Et[0],[[pt[0]*Et[2]/bt,pt[1]*pt[2]*Et[0]*Et[1]/bt],[pt[1]*Et[1]/bt,-pt[0]*pt[2]*Et[0]*Et[2]/bt],[pt[2]*Et[1]*Et[2]/bt,-lt*pt[0]*pt[1]*Et[0]/bt]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):(Et=En($e,1-lt),[[0,Et[0]/Et[1]],[1/Et[1],0],[Et[2]/Et[1],0]])}function En(qe,$e){var lt,pt,Et,bt,Dt;if($e=1-l)return lt=(1-$e)/4,pt=L(qe),bt=N(qe),Et=1/pt,Dt=pt*O(qe),[bt+lt*(Dt-qe)/(pt*pt),Et-lt*bt*Et*(Dt-qe),Et+lt*bt*Et*(Dt+qe),2*e(o(qe))-A+lt*(Dt-qe)/pt];var ur=[1,0,0,0,0,0,0,0,0],yr=[F($e),0,0,0,0,0,0,0,0],Er=0;for(pt=F(1-$e),Dt=1;M(yr[Er]/ur[Er])>l&&Er<8;)lt=ur[Er++],yr[Er]=(lt-pt)/2,ur[Er]=(lt+pt)/2,pt=F(lt*pt),Dt*=2;Et=Dt*ur[Er]*qe;do bt=yr[Er]*c(pt=Et)/ur[Er],Et=(P(bt)+Et)/2;while(--Er);return[c(Et),bt=r(Et),bt/r(Et-pt),Et]}function Tn(qe,$e,lt){var pt=M(qe),Et=M($e),bt=O(Et);if(pt){var Dt=1/c(pt),ur=1/(T(pt)*T(pt)),yr=-(ur+lt*(bt*bt*Dt*Dt)-1+lt),Er=(lt-1)*ur,jr=(-yr+F(yr*yr-4*Er))/2;return[On(e(1/F(jr)),lt)*m(qe),On(e(F((jr/ur-1)/lt)),1-lt)*m($e)]}return[0,On(e(bt),1-lt)*m($e)]}function On(qe,$e){if(!$e)return qe;if($e===1)return i(T(qe/2+E));for(var lt=1,pt=F(1-$e),Et=F($e),bt=0;M(Et)>l;bt++){if(qe%w){var Dt=e(pt*T(qe)/lt);Dt<0&&(Dt+=w),qe+=Dt+~~(qe/w)*w}else qe+=qe;Et=(lt+pt)/2,pt=F(lt*pt),Et=((lt=Et)-pt)/2}return qe/(h(2,bt)*lt)}function kn(qe,$e){var lt=(b-1)/(b+1),pt=F(1-lt*lt),Et=On(A,pt*pt),bt=-1,Dt=i(T(w/4+M($e)/2)),ur=o(bt*Dt)/F(lt),yr=ao(ur*r(bt*qe),ur*c(bt*qe)),Er=Tn(yr[0],yr[1],pt*pt);return[-Er[1],($e>=0?1:-1)*(.5*Et-Er[0])]}function ao(qe,$e){var lt=qe*qe,pt=$e+1,Et=1-lt-$e*$e;return[.5*((qe>=0?A:-A)-t(Et,2*qe)),-.25*i(Et*Et+4*lt)+.5*i(pt*pt+lt)]}function Co(qe,$e){var lt=$e[0]*$e[0]+$e[1]*$e[1];return[(qe[0]*$e[0]+qe[1]*$e[1])/lt,(qe[1]*$e[0]-qe[0]*$e[1])/lt]}kn.invert=function(qe,$e){var lt=(b-1)/(b+1),pt=F(1-lt*lt),Et=On(A,pt*pt),bt=-1,Dt=Ki(.5*Et-$e,-qe,pt*pt),ur=Co(Dt[0],Dt[1]),yr=t(ur[1],ur[0])/bt;return[yr,2*e(o(.5/bt*i(lt*ur[0]*ur[0]+lt*ur[1]*ur[1])))-A]};function bo(){return _.geoProjection(ga(kn)).scale(151.496)}function zs(qe){var $e=c(qe),lt=r(qe),pt=Cn(qe);pt.invert=Cn(-qe);function Et(bt,Dt){var ur=pt(bt,Dt);bt=ur[0],Dt=ur[1];var yr=c(Dt),Er=r(Dt),jr=r(bt),Qr=z($e*yr+lt*Er*jr),ha=c(Qr),Aa=M(ha)>l?Qr/ha:1;return[Aa*lt*c(bt),(M(bt)>A?Aa:-Aa)*($e*Er-lt*yr*jr)]}return Et.invert=function(bt,Dt){var ur=F(bt*bt+Dt*Dt),yr=-c(ur),Er=r(ur),jr=ur*Er,Qr=-Dt*yr,ha=ur*$e,Aa=F(jr*jr+Qr*Qr-ha*ha),Da=t(jr*ha+Qr*Aa,Qr*ha-jr*Aa),ci=(ur>A?-1:1)*t(bt*yr,ur*r(Da)*Er+Dt*c(Da)*yr);return pt.invert(ci,Da)},Et}function Cn(qe){var $e=c(qe),lt=r(qe);return function(pt,Et){var bt=r(Et),Dt=r(pt)*bt,ur=c(pt)*bt,yr=c(Et);return[t(ur,Dt*lt-yr*$e),P(yr*lt+Dt*$e)]}}function wo(){var qe=0,$e=_.geoProjectionMutator(zs),lt=$e(qe),pt=lt.rotate,Et=lt.stream,bt=_.geoCircle();return lt.parallel=function(Dt){if(!arguments.length)return qe*g;var ur=lt.rotate();return $e(qe=Dt*y).rotate(ur)},lt.rotate=function(Dt){return arguments.length?(pt.call(lt,[Dt[0],Dt[1]-qe*g]),bt.center([-Dt[0],-Dt[1]]),lt):(Dt=pt.call(lt),Dt[1]+=qe*g,Dt)},lt.stream=function(Dt){return Dt=Et(Dt),Dt.sphere=function(){Dt.polygonStart();var ur=.01,yr=bt.radius(90-ur)().coordinates[0],Er=yr.length-1,jr=-1,Qr;for(Dt.lineStart();++jr=0;)Dt.point((Qr=yr[jr])[0],Qr[1]);Dt.lineEnd(),Dt.polygonEnd()},Dt},lt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Zn=3,go=P(1-1/Zn)*g,os=jt(0);function ys(qe){var $e=go*y,lt=We(w,$e)[0]-We(-w,$e)[0],pt=os(0,$e)[1],Et=We(0,$e)[1],bt=d-Et,Dt=u/qe,ur=4/u,yr=pt+bt*bt*4/u;function Er(jr,Qr){var ha,Aa=M(Qr);if(Aa>$e){var Da=s(qe-1,n(0,a((jr+w)/Dt)));jr+=w*(qe-1)/qe-Da*Dt,ha=We(jr,Aa),ha[0]=ha[0]*u/lt-u*(qe-1)/(2*qe)+Da*u/qe,ha[1]=pt+(ha[1]-Et)*4*bt/u,Qr<0&&(ha[1]=-ha[1])}else ha=os(jr,Qr);return ha[0]*=ur,ha[1]/=yr,ha}return Er.invert=function(jr,Qr){jr/=ur,Qr*=yr;var ha=M(Qr);if(ha>pt){var Aa=s(qe-1,n(0,a((jr+w)/Dt)));jr=(jr+w*(qe-1)/qe-Aa*Dt)*lt/u;var Da=We.invert(jr,.25*(ha-pt)*u/bt+Et);return Da[0]-=w*(qe-1)/qe-Aa*Dt,Qr<0&&(Da[1]=-Da[1]),Da}return os.invert(jr,Qr)},Er}function jo(qe,$e){return[qe,$e&1?90-l:go]}function Yn(qe,$e){return[qe,$e&1?-90+l:-go]}function Gn(qe){return[qe[0]*(1-l),qe[1]]}function Hn(qe){var $e=[].concat(S.range(-180,180+qe/2,qe).map(jo),S.range(180,-180-qe/2,-qe).map(Yn));return{type:"Polygon",coordinates:[qe===180?$e.map(Gn):$e]}}function ss(){var qe=4,$e=_.geoProjectionMutator(ys),lt=$e(qe),pt=lt.stream;return lt.lobes=function(Et){return arguments.length?$e(qe=+Et):qe},lt.stream=function(Et){var bt=lt.rotate(),Dt=pt(Et),ur=(lt.rotate([0,0]),pt(Et));return lt.rotate(bt),Dt.sphere=function(){_.geoStream(Hn(180/qe),ur)},Dt},lt.scale(239.75)}function _s(qe){var $e=1+qe,lt=c(1/$e),pt=P(lt),Et=2*F(w/(bt=w+4*pt*$e)),bt,Dt=.5*Et*($e+F(qe*(2+qe))),ur=qe*qe,yr=$e*$e;function Er(jr,Qr){var ha=1-c(Qr),Aa,Da;if(ha&&ha<2){var ci=A-Qr,Vi=25,ji;do{var on=c(ci),Sn=r(ci),Kn=pt+t(on,$e-Sn),Bn=1+yr-2*$e*Sn;ci-=ji=(ci-ur*pt-$e*on+Bn*Kn-.5*ha*bt)/(2*$e*on*Kn)}while(M(ji)>x&&--Vi>0);Aa=Et*F(Bn),Da=jr*Kn/w}else Aa=Et*(qe+ha),Da=jr*pt/w;return[Aa*c(Da),Dt-Aa*r(Da)]}return Er.invert=function(jr,Qr){var ha=jr*jr+(Qr-=Dt)*Qr,Aa=(1+yr-ha/(Et*Et))/(2*$e),Da=z(Aa),ci=c(Da),Vi=pt+t(ci,$e-Aa);return[P(jr/F(ha))*w/Vi,P(1-2*(Da-ur*pt-$e*ci+(1+yr-2*$e*Aa)*Vi)/bt)]},Er}function ps(){var qe=1,$e=_.geoProjectionMutator(_s),lt=$e(qe);return lt.ratio=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(167.774).center([0,18.67])}var Ko=.7109889596207567,Gi=.0528035274542;function Pn(qe,$e){return $e>-Ko?(qe=Ve(qe,$e),qe[1]+=Gi,qe):Je(qe,$e)}Pn.invert=function(qe,$e){return $e>-Ko?Ve.invert(qe,$e-Gi):Je.invert(qe,$e)};function qs(){return _.geoProjection(Pn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function bs(qe,$e){return M($e)>Ko?(qe=Ve(qe,$e),qe[1]-=$e>0?Gi:-Gi,qe):Je(qe,$e)}bs.invert=function(qe,$e){return M($e)>Ko?Ve.invert(qe,$e+($e>0?Gi:-Gi)):Je.invert(qe,$e)};function lo(){return _.geoProjection(bs).scale(152.63)}function Zo(qe,$e,lt,pt){var Et=F(4*w/(2*lt+(1+qe-$e/2)*c(2*lt)+(qe+$e)/2*c(4*lt)+$e/2*c(6*lt))),bt=F(pt*c(lt)*F((1+qe*r(2*lt)+$e*r(4*lt))/(1+qe+$e))),Dt=lt*yr(1);function ur(Qr){return F(1+qe*r(2*Qr)+$e*r(4*Qr))}function yr(Qr){var ha=Qr*lt;return(2*ha+(1+qe-$e/2)*c(2*ha)+(qe+$e)/2*c(4*ha)+$e/2*c(6*ha))/lt}function Er(Qr){return ur(Qr)*c(Qr)}var jr=function(Qr,ha){var Aa=lt*Re(yr,Dt*c(ha)/lt,ha/w);isNaN(Aa)&&(Aa=lt*m(ha));var Da=Et*ur(Aa);return[Da*bt*Qr/w*r(Aa),Da/bt*c(Aa)]};return jr.invert=function(Qr,ha){var Aa=Re(Er,ha*bt/Et);return[Qr*w/(r(Aa)*Et*bt*ur(Aa)),P(lt*yr(Aa/lt)/Dt)]},lt===0&&(Et=F(pt/w),jr=function(Qr,ha){return[Qr*Et,c(ha)/Et]},jr.invert=function(Qr,ha){return[Qr/Et,P(ha*Et)]}),jr}function ws(){var qe=1,$e=0,lt=45*y,pt=2,Et=_.geoProjectionMutator(Zo),bt=Et(qe,$e,lt,pt);return bt.a=function(Dt){return arguments.length?Et(qe=+Dt,$e,lt,pt):qe},bt.b=function(Dt){return arguments.length?Et(qe,$e=+Dt,lt,pt):$e},bt.psiMax=function(Dt){return arguments.length?Et(qe,$e,lt=+Dt*y,pt):lt*g},bt.ratio=function(Dt){return arguments.length?Et(qe,$e,lt,pt=+Dt):pt},bt.scale(180.739)}function Hs(qe,$e,lt,pt,Et,bt,Dt,ur,yr,Er,jr){if(jr.nanEncountered)return NaN;var Qr,ha,Aa,Da,ci,Vi,ji,on,Sn,Kn;if(Qr=lt-$e,ha=qe($e+Qr*.25),Aa=qe(lt-Qr*.25),isNaN(ha)){jr.nanEncountered=!0;return}if(isNaN(Aa)){jr.nanEncountered=!0;return}return Da=Qr*(pt+4*ha+Et)/12,ci=Qr*(Et+4*Aa+bt)/12,Vi=Da+ci,Kn=(Vi-Dt)/15,Er>yr?(jr.maxDepthCount++,Vi+Kn):Math.abs(Kn)>1;do yr[Vi]>Aa?ci=Vi:Da=Vi,Vi=Da+ci>>1;while(Vi>Da);var ji=yr[Vi+1]-yr[Vi];return ji&&(ji=(Aa-yr[Vi+1])/ji),(Vi+1+ji)/Dt}var Qr=2*jr(1)/w*bt/lt,ha=function(Aa,Da){var ci=jr(M(c(Da))),Vi=pt(ci)*Aa;return ci/=Qr,[Vi,Da>=0?ci:-ci]};return ha.invert=function(Aa,Da){var ci;return Da*=Qr,M(Da)<1&&(ci=m(Da)*P(Et(M(Da))*bt)),[Aa/pt(M(Da)),ci]},ha}function Po(){var qe=0,$e=2.5,lt=1.183136,pt=_.geoProjectionMutator(yn),Et=pt(qe,$e,lt);return Et.alpha=function(bt){return arguments.length?pt(qe=+bt,$e,lt):qe},Et.k=function(bt){return arguments.length?pt(qe,$e=+bt,lt):$e},Et.gamma=function(bt){return arguments.length?pt(qe,$e,lt=+bt):lt},Et.scale(152.63)}function To(qe,$e){return M(qe[0]-$e[0])=0;--yr)lt=qe[1][yr],pt=lt[0][0],Et=lt[0][1],bt=lt[1][1],Dt=lt[2][0],ur=lt[2][1],$e.push(Ws([[Dt-l,ur-l],[Dt-l,bt+l],[pt+l,bt+l],[pt+l,Et-l]],30));return{type:"Polygon",coordinates:[S.merge($e)]}}function uo(qe,$e,lt){var pt,Et;function bt(yr,Er){for(var jr=Er<0?-1:1,Qr=$e[+(Er<0)],ha=0,Aa=Qr.length-1;haQr[ha][2][0];++ha);var Da=qe(yr-Qr[ha][1][0],Er);return Da[0]+=qe(Qr[ha][1][0],jr*Er>jr*Qr[ha][0][1]?Qr[ha][0][1]:Er)[0],Da}lt?bt.invert=lt(bt):qe.invert&&(bt.invert=function(yr,Er){for(var jr=Et[+(Er<0)],Qr=$e[+(Er<0)],ha=0,Aa=jr.length;haDa&&(ci=Aa,Aa=Da,Da=ci),[[Qr,Aa],[ha,Da]]})}),Dt):$e.map(function(Er){return Er.map(function(jr){return[[jr[0][0]*g,jr[0][1]*g],[jr[1][0]*g,jr[1][1]*g],[jr[2][0]*g,jr[2][1]*g]]})})},$e!=null&&Dt.lobes($e),Dt}var Nl=[[[[-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 Ks(){return uo(Ce,Nl).scale(160.857)}var Ts=[[[[-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 Ls(){return uo(bs,Ts).scale(152.63)}var Jo=[[[[-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 Es(){return uo(Ve,Jo).scale(169.529)}var Ul=[[[[-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 lu(){return uo(Ve,Ul).scale(169.529).rotate([20,0])}var Tc=[[[[-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 du(){return uo(Pn,Tc,Pe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Sf=[[[[-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 Uc(){return uo(Je,Sf).scale(152.63).rotate([-20,0])}function Bs(qe,$e){return[3/u*qe*F(w*w/3-$e*$e),$e]}Bs.invert=function(qe,$e){return[u/3*qe/F(w*w/3-$e*$e),$e]};function dc(){return _.geoProjection(Bs).scale(158.837)}function Wc(qe){function $e(lt,pt){if(M(M(pt)-A)2)return null;lt/=2,pt/=2;var bt=lt*lt,Dt=pt*pt,ur=2*pt/(1+bt+Dt);return ur=h((1+ur)/(1-ur),1/qe),[t(2*lt,1-bt-Dt)/qe,P((ur-1)/(ur+1))]},$e}function uu(){var qe=.5,$e=_.geoProjectionMutator(Wc),lt=$e(qe);return lt.spacing=function(pt){return arguments.length?$e(qe=+pt):qe},lt.scale(124.75)}var Pl=w/b;function ic(qe,$e){return[qe*(1+F(r($e)))/2,$e/(r($e/2)*r(qe/6))]}ic.invert=function(qe,$e){var lt=M(qe),pt=M($e),Et=l,bt=A;ptl||M(Vi)>l)&&--Et>0);return Et&&[lt,pt]};function vl(){return _.geoProjection(nl).scale(139.98)}function As(qe,$e){return[c(qe)/r($e),T($e)*r(qe)]}As.invert=function(qe,$e){var lt=qe*qe,pt=$e*$e,Et=pt+1,bt=lt+Et,Dt=qe?p*F((bt-F(bt*bt-4*lt))/lt):1/F(Et);return[P(qe*Dt),m($e)*z(Dt)]};function Xs(){return _.geoProjection(As).scale(144.049).clipAngle(90-.001)}function nc(qe){var $e=r(qe),lt=T(E+qe/2);function pt(Et,bt){var Dt=bt-qe,ur=M(Dt)=0;)jr=qe[Er],Qr=jr[0]+ur*(Aa=Qr)-yr*ha,ha=jr[1]+ur*ha+yr*Aa;return Qr=ur*(Aa=Qr)-yr*ha,ha=ur*ha+yr*Aa,[Qr,ha]}return lt.invert=function(pt,Et){var bt=20,Dt=pt,ur=Et;do{for(var yr=$e,Er=qe[yr],jr=Er[0],Qr=Er[1],ha=0,Aa=0,Da;--yr>=0;)Er=qe[yr],ha=jr+Dt*(Da=ha)-ur*Aa,Aa=Qr+Dt*Aa+ur*Da,jr=Er[0]+Dt*(Da=jr)-ur*Qr,Qr=Er[1]+Dt*Qr+ur*Da;ha=jr+Dt*(Da=ha)-ur*Aa,Aa=Qr+Dt*Aa+ur*Da,jr=Dt*(Da=jr)-ur*Qr-pt,Qr=Dt*Qr+ur*Da-Et;var ci=ha*ha+Aa*Aa,Vi,ji;Dt-=Vi=(jr*ha+Qr*Aa)/ci,ur-=ji=(Qr*ha-jr*Aa)/ci}while(M(Vi)+M(ji)>l*l&&--bt>0);if(bt){var on=F(Dt*Dt+ur*ur),Sn=2*e(on*.5),Kn=c(Sn);return[t(Dt*Kn,on*r(Sn)),on?P(ur*Kn/on):0]}},lt}var us=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],bh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ps=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],to=[[.9245,0],[0,0],[.01943,0]],Xc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vu(){return Ql(us,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function ql(){return Ql(bh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mf(){return Ql(Ps,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ac(){return Ql(to,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function nf(){return Ql(Xc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ql(qe,$e){var lt=_.geoProjection(xh(qe)).rotate($e).clipAngle(90),pt=_.geoRotation($e),Et=lt.center;return delete lt.rotate,lt.center=function(bt){return arguments.length?Et(pt(bt)):pt.invert(Et())},lt}var Jf=F(6),Of=F(7);function of(qe,$e){var lt=P(7*c($e)/(3*Jf));return[Jf*qe*(2*r(2*lt/3)-1)/Of,9*c(lt/3)/Of]}of.invert=function(qe,$e){var lt=3*P($e*Of/9);return[qe*Of/(Jf*(2*r(2*lt/3)-1)),P(c(lt)*3*Jf/7)]};function jc(){return _.geoProjection(of).scale(164.859)}function Bf(qe,$e){for(var lt=(1+p)*c($e),pt=$e,Et=0,bt;Et<25&&(pt-=bt=(c(pt/2)+c(pt)-lt)/(.5*r(pt/2)+r(pt)),!(M(bt)x&&--pt>0);return bt=lt*lt,Dt=bt*bt,ur=bt*Dt,[qe/(.84719-.13063*bt+ur*ur*(-.04515+.05494*bt-.02326*Dt+.00331*ur)),lt]};function Zc(){return _.geoProjection(oc).scale(175.295)}function eu(qe,$e){return[qe*(1+r($e))/2,2*($e-T($e/2))]}eu.invert=function(qe,$e){for(var lt=$e/2,pt=0,Et=1/0;pt<10&&M(Et)>l;++pt){var bt=r($e/2);$e-=Et=($e-T($e/2)-lt)/(1-.5/(bt*bt))}return[2*qe/(1+r($e)),$e]};function qc(){return _.geoProjection(eu).scale(152.63)}var Sc=[[[[-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 Zs(){return uo(pe(1/0),Sc).rotate([20,0]).scale(152.63)}function kf(qe,$e){var lt=c($e),pt=r($e),Et=m(qe);if(qe===0||M($e)===A)return[0,$e];if($e===0)return[qe,0];if(M(qe)===A)return[qe*pt,A*lt];var bt=w/(2*qe)-2*qe/w,Dt=2*$e/w,ur=(1-Dt*Dt)/(lt-Dt),yr=bt*bt,Er=ur*ur,jr=1+yr/Er,Qr=1+Er/yr,ha=(bt*lt/ur-bt/2)/jr,Aa=(Er*lt/yr+ur/2)/Qr,Da=ha*ha+pt*pt/jr,ci=Aa*Aa-(Er*lt*lt/yr+ur*lt-1)/Qr;return[A*(ha+F(Da)*Et),A*(Aa+F(ci<0?0:ci)*m(-$e*bt)*Et)]}kf.invert=function(qe,$e){qe/=A,$e/=A;var lt=qe*qe,pt=$e*$e,Et=lt+pt,bt=w*w;return[qe?(Et-1+F((1-Et)*(1-Et)+4*lt))/(2*qe)*A:0,Re(function(Dt){return Et*(w*c(Dt)-2*Dt)*w+4*Dt*Dt*($e-c(Dt))+2*w*Dt-bt*$e},0)]};function fh(){return _.geoProjection(kf).scale(127.267)}var Uf=1.0148,Yc=.23185,$f=-.14499,Cu=.02406,jf=Uf,ml=5*Yc,Lu=7*$f,Mc=9*Cu,ol=1.790857183;function vc(qe,$e){var lt=$e*$e;return[qe,$e*(Uf+lt*lt*(Yc+lt*($f+Cu*lt)))]}vc.invert=function(qe,$e){$e>ol?$e=ol:$e<-ol&&($e=-ol);var lt=$e,pt;do{var Et=lt*lt;lt-=pt=(lt*(Uf+Et*Et*(Yc+Et*($f+Cu*Et)))-$e)/(jf+Et*Et*(ml+Et*(Lu+Mc*Et)))}while(M(pt)>l);return[qe,lt]};function yu(){return _.geoProjection(vc).scale(139.319)}function Tu(qe,$e){if(M($e)l&&--Et>0);return Dt=T(pt),[(M($e)=0;)if(pt=$e[ur],lt[0]===pt[0]&<[1]===pt[1]){if(bt)return[bt,lt];bt=lt}}}function iu(qe){for(var $e=qe.length,lt=[],pt=qe[$e-1],Et=0;Et<$e;++Et)lt.push([pt,pt=qe[Et]]);return lt}function Kc(qe){return qe.project.invert||qe.children&&qe.children.some(Kc)}var hh=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],mf=[[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(qe){return qe.map(function($e){return hh[$e]})});function sl(qe){qe=qe||function(lt){var pt=_.geoCentroid({type:"MultiPoint",coordinates:lt});return _.geoGnomonic().scale(1).translate([0,0]).rotate([-pt[0],-pt[1]])};var $e=mf.map(function(lt){return{face:lt,project:qe(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,pt){var Et=$e[lt];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(lt,pt){return $e[lt<-w/2?pt<0?6:4:lt<0?pt<0?2:0:lt0?[-pt[0],0]:[180-pt[0],180])};var $e=mf.map(function(lt){return{face:lt,project:qe(lt)}});return[-1,0,0,1,0,1,4,5].forEach(function(lt,pt){var Et=$e[lt];Et&&(Et.children||(Et.children=[])).push($e[pt])}),sf($e[0],function(lt,pt){return $e[lt<-w/2?pt<0?6:4:lt<0?pt<0?2:0:ltpt^Aa>pt&<<(ha-Er)*(pt-jr)/(Aa-jr)+Er&&(Et=!Et)}return Et}function nu(qe,$e){var lt=$e.stream,pt;if(!lt)throw new Error("invalid projection");switch(qe&&qe.type){case"Feature":pt=Xu;break;case"FeatureCollection":pt=Vf;break;default:pt=gc;break}return pt(qe,lt)}function Vf(qe,$e){return{type:"FeatureCollection",features:qe.features.map(function(lt){return Xu(lt,$e)})}}function Xu(qe,$e){return{type:"Feature",id:qe.id,properties:qe.properties,geometry:gc(qe.geometry,$e)}}function Cc(qe,$e){return{type:"GeometryCollection",geometries:qe.geometries.map(function(lt){return gc(lt,$e)})}}function gc(qe,$e){if(!qe)return null;if(qe.type==="GeometryCollection")return Cc(qe,$e);var lt;switch(qe.type){case"Point":lt=Lc;break;case"MultiPoint":lt=Lc;break;case"LineString":lt=$c;break;case"MultiLineString":lt=$c;break;case"Polygon":lt=sc;break;case"MultiPolygon":lt=sc;break;case"Sphere":lt=sc;break;default:return null}return _.geoStream(qe,$e(lt)),lt.result()}var Vl=[],xu=[],Lc={point:function(qe,$e){Vl.push([qe,$e])},result:function(){var qe=Vl.length?Vl.length<2?{type:"Point",coordinates:Vl[0]}:{type:"MultiPoint",coordinates:Vl}:null;return Vl=[],qe}},$c={lineStart:Wu,point:function(qe,$e){Vl.push([qe,$e])},lineEnd:function(){Vl.length&&(xu.push(Vl),Vl=[])},result:function(){var qe=xu.length?xu.length<2?{type:"LineString",coordinates:xu[0]}:{type:"MultiLineString",coordinates:xu}:null;return xu=[],qe}},sc={polygonStart:Wu,lineStart:Wu,point:function(qe,$e){Vl.push([qe,$e])},lineEnd:function(){var qe=Vl.length;if(qe){do Vl.push(Vl[0].slice());while(++qe<4);xu.push(Vl),Vl=[]}},polygonEnd:Wu,result:function(){if(!xu.length)return null;var qe=[],$e=[];return xu.forEach(function(lt){Jc(lt)?qe.push([lt]):$e.push(lt)}),$e.forEach(function(lt){var pt=lt[0];qe.some(function(Et){if(Lf(Et[0],pt))return Et.push(lt),!0})||qe.push([lt])}),xu=[],qe.length?qe.length>1?{type:"MultiPolygon",coordinates:qe}:{type:"Polygon",coordinates:qe[0]}:null}};function Pc(qe){var $e=qe(A,0)[0]-qe(-A,0)[0];function lt(pt,Et){var bt=M(pt)0?pt-w:pt+w,Et),ur=(Dt[0]-Dt[1])*p,yr=(Dt[0]+Dt[1])*p;if(bt)return[ur,yr];var Er=$e*p,jr=ur>0^yr>0?-1:1;return[jr*ur-m(yr)*Er,jr*yr-m(ur)*Er]}return qe.invert&&(lt.invert=function(pt,Et){var bt=(pt+Et)*p,Dt=(Et-pt)*p,ur=M(bt)<.5*$e&&M(Dt)<.5*$e;if(!ur){var yr=$e*p,Er=bt>0^Dt>0?-1:1,jr=-Er*pt+(Dt>0?1:-1)*yr,Qr=-Er*Et+(bt>0?1:-1)*yr;bt=(-jr-Qr)*p,Dt=(jr-Qr)*p}var ha=qe.invert(bt,Dt);return ur||(ha[0]+=bt>0?w:-w),ha}),_.geoProjection(lt).rotate([-90,-90,45]).clipAngle(180-.001)}function Qt(){return Pc(la).scale(176.423)}function xr(){return Pc(kn).scale(111.48)}function aa(qe,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function lt(Er){var jr=Er.length,Qr=2,ha=new Array(jr);for(ha[0]=+Er[0].toFixed($e),ha[1]=+Er[1].toFixed($e);Qr2||Aa[0]!=jr[0]||Aa[1]!=jr[1])&&(Qr.push(Aa),jr=Aa)}return Qr.length===1&&Er.length>1&&Qr.push(lt(Er[Er.length-1])),Qr}function bt(Er){return Er.map(Et)}function Dt(Er){if(Er==null)return Er;var jr;switch(Er.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:Er.geometries.map(Dt)};break;case"Point":jr={type:"Point",coordinates:lt(Er.coordinates)};break;case"MultiPoint":jr={type:Er.type,coordinates:pt(Er.coordinates)};break;case"LineString":jr={type:Er.type,coordinates:Et(Er.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:Er.type,coordinates:bt(Er.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:Er.coordinates.map(bt)};break;default:return Er}return Er.bbox!=null&&(jr.bbox=Er.bbox),jr}function ur(Er){var jr={type:"Feature",properties:Er.properties,geometry:Dt(Er.geometry)};return Er.id!=null&&(jr.id=Er.id),Er.bbox!=null&&(jr.bbox=Er.bbox),jr}if(qe!=null)switch(qe.type){case"Feature":return ur(qe);case"FeatureCollection":{var yr={type:"FeatureCollection",features:qe.features.map(ur)};return qe.bbox!=null&&(yr.bbox=qe.bbox),yr}default:return Dt(qe)}return qe}function $r(qe){var $e=c(qe);function lt(pt,Et){var bt=$e?T(pt*$e/2)/$e:pt/2;if(!Et)return[2*bt,-qe];var Dt=2*e(bt*c(Et)),ur=1/T(Et);return[c(Dt)*ur,Et+(1-r(Dt))*ur-qe]}return lt.invert=function(pt,Et){if(M(Et+=qe)l&&--ur>0);var ha=pt*(Er=T(Dt)),Aa=T(M(Et)0?A:-A)*(yr+Et*(jr-Dt)/2+Et*Et*(jr-2*yr+Dt)/2)]}Ci.invert=function(qe,$e){var lt=$e/A,pt=lt*90,Et=s(18,M(pt/5)),bt=n(0,a(Et));do{var Dt=li[bt][1],ur=li[bt+1][1],yr=li[s(19,bt+2)][1],Er=yr-Dt,jr=yr-2*ur+Dt,Qr=2*(M(lt)-ur)/Er,ha=jr/Er,Aa=Qr*(1-ha*Qr*(1-2*ha*Qr));if(Aa>=0||bt===1){pt=($e>=0?5:-5)*(Aa+Et);var Da=50,ci;do Et=s(18,M(pt)/5),bt=a(Et),Aa=Et-bt,Dt=li[bt][1],ur=li[bt+1][1],yr=li[s(19,bt+2)][1],pt-=(ci=($e>=0?A:-A)*(ur+Aa*(yr-Dt)/2+Aa*Aa*(yr-2*ur+Dt)/2)-$e)*g;while(M(ci)>x&&--Da>0);break}}while(--bt>=0);var Vi=li[bt][0],ji=li[bt+1][0],on=li[s(19,bt+2)][0];return[qe/(ji+Aa*(on-Vi)/2+Aa*Aa*(on-2*ji+Vi)/2),pt*y]};function Hi(){return _.geoProjection(Ci).scale(152.63)}function Qi(qe){function $e(lt,pt){var Et=r(pt),bt=(qe-1)/(qe-Et*r(lt));return[bt*Et*c(lt),bt*c(pt)]}return $e.invert=function(lt,pt){var Et=lt*lt+pt*pt,bt=F(Et),Dt=(qe-F(1-Et*(qe+1)/(qe-1)))/((qe-1)/bt+bt/(qe-1));return[t(lt*Dt,bt*F(1-Dt*Dt)),bt?P(pt*Dt/bt):0]},$e}function pn(qe,$e){var lt=Qi(qe);if(!$e)return lt;var pt=r($e),Et=c($e);function bt(Dt,ur){var yr=lt(Dt,ur),Er=yr[1],jr=Er*Et/(qe-1)+pt;return[yr[0]*pt/jr,Er/jr]}return bt.invert=function(Dt,ur){var yr=(qe-1)/(qe-1-ur*Et);return lt.invert(yr*Dt,yr*ur*pt)},bt}function Pi(){var qe=2,$e=0,lt=_.geoProjectionMutator(pn),pt=lt(qe,$e);return pt.distance=function(Et){return arguments.length?lt(qe=+Et,$e):qe},pt.tilt=function(Et){return arguments.length?lt(qe,$e=Et*y):$e*g},pt.scale(432.147).clipAngle(z(1/qe)*g-1e-6)}var Di=1e-4,Ni=1e4,mi=-180,Mn=mi+Di,Qn=180,io=Qn-Di,eo=-90,co=eo+Di,An=90,un=An-Di;function yo(qe){return qe.length>0}function Qo(qe){return Math.floor(qe*Ni)/Ni}function ks(qe){return qe===eo||qe===An?[0,qe]:[mi,Qo(qe)]}function rl(qe){var $e=qe[0],lt=qe[1],pt=!1;return $e<=Mn?($e=mi,pt=!0):$e>=io&&($e=Qn,pt=!0),lt<=co?(lt=eo,pt=!0):lt>=un&&(lt=An,pt=!0),pt?[$e,lt]:qe}function Ns(qe){return qe.map(rl)}function el(qe,$e,lt){for(var pt=0,Et=qe.length;pt=io||jr<=co||jr>=un){bt[Dt]=rl(yr);for(var Qr=Dt+1;QrMn&&Aaco&&Da=ur)break;lt.push({index:-1,polygon:$e,ring:bt=bt.slice(Qr-1)}),bt[0]=ks(bt[0][1]),Dt=-1,ur=bt.length}}}}function Ss(qe){var $e,lt=qe.length,pt={},Et={},bt,Dt,ur,yr,Er;for($e=0;$e0?w-ur:ur)*g],Er=_.geoProjection(qe(Dt)).rotate(yr),jr=_.geoRotation(yr),Qr=Er.center;return delete Er.rotate,Er.center=function(ha){return arguments.length?Qr(jr(ha)):jr.invert(Qr())},Er.clipAngle(90)}function Fs(qe){var $e=r(qe);function lt(pt,Et){var bt=_.geoGnomonicRaw(pt,Et);return bt[0]*=$e,bt}return lt.invert=function(pt,Et){return _.geoGnomonicRaw.invert(pt/$e,Et)},lt}function cu(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(qe,$e){return Js(Fs,qe,$e)}function Zu(qe){if(!(qe*=2))return _.geoAzimuthalEquidistantRaw;var $e=-qe/2,lt=-$e,pt=qe*qe,Et=T(lt),bt=.5/c(lt);function Dt(ur,yr){var Er=z(r(yr)*r(ur-$e)),jr=z(r(yr)*r(ur-lt)),Qr=yr<0?-1:1;return Er*=Er,jr*=jr,[(Er-jr)/(2*qe),Qr*F(4*pt*jr-(pt-Er+jr)*(pt-Er+jr))/(2*qe)]}return Dt.invert=function(ur,yr){var Er=yr*yr,jr=r(F(Er+(ha=ur+$e)*ha)),Qr=r(F(Er+(ha=ur+lt)*ha)),ha,Aa;return[t(Aa=jr-Qr,ha=(jr+Qr)*Et),(yr<0?-1:1)*z(F(ha*ha+Aa*Aa)*bt)]},Dt}function Ic(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(qe,$e){return Js(Zu,qe,$e)}function Rc(qe,$e){if(M($e)l&&--ur>0);return[m(qe)*(F(Et*Et+4)+Et)*w/4,A*Dt]};function Yu(){return _.geoProjection(lc).scale(127.16)}function Oe(qe,$e,lt,pt,Et){function bt(Dt,ur){var yr=lt*c(pt*ur),Er=F(1-yr*yr),jr=F(2/(1+Er*r(Dt*=Et)));return[qe*Er*jr*c(Dt),$e*yr*jr]}return bt.invert=function(Dt,ur){var yr=Dt/qe,Er=ur/$e,jr=F(yr*yr+Er*Er),Qr=2*P(jr/2);return[t(Dt*T(Qr),qe*jr)/Et,jr&&P(ur*c(Qr)/($e*lt*jr))/pt]},bt}function I(qe,$e,lt,pt){var Et=w/3;qe=n(qe,l),$e=n($e,l),qe=s(qe,A),$e=s($e,w-l),lt=n(lt,0),lt=s(lt,100-l),pt=n(pt,l);var bt=lt/100+1,Dt=pt/100,ur=z(bt*r(Et))/Et,yr=c(qe)/c(ur*A),Er=$e/w,jr=F(Dt*c(qe/2)/c($e/2)),Qr=jr/F(Er*yr*ur),ha=1/(jr*F(Er*yr*ur));return Oe(Qr,ha,yr,ur,Er)}function ie(){var qe=65*y,$e=60*y,lt=20,pt=200,Et=_.geoProjectionMutator(I),bt=Et(qe,$e,lt,pt);return bt.poleline=function(Dt){return arguments.length?Et(qe=+Dt*y,$e,lt,pt):qe*g},bt.parallels=function(Dt){return arguments.length?Et(qe,$e=+Dt*y,lt,pt):$e*g},bt.inflation=function(Dt){return arguments.length?Et(qe,$e,lt=+Dt,pt):lt},bt.ratio=function(Dt){return arguments.length?Et(qe,$e,lt,pt=+Dt):pt},bt.scale(163.775)}function Te(){return ie().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Me=4*w+3*F(3),ze=2*F(2*w*F(3)/Me),ht=tt(ze*F(3)/w,ze,Me/6);function wt(){return _.geoProjection(ht).scale(176.84)}function Ot(qe,$e){return[qe*F(1-3*$e*$e/(w*w)),$e]}Ot.invert=function(qe,$e){return[qe/F(1-3*$e*$e/(w*w)),$e]};function $t(){return _.geoProjection(Ot).scale(152.63)}function Tr(qe,$e){var lt=r($e),pt=r(qe)*lt,Et=1-pt,bt=r(qe=t(c(qe)*lt,-c($e))),Dt=c(qe);return lt=F(1-pt*pt),[Dt*lt-bt*Et,-bt*lt-Dt*Et]}Tr.invert=function(qe,$e){var lt=(qe*qe+$e*$e)/-2,pt=F(-lt*(2+lt)),Et=$e*lt+qe*pt,bt=qe*lt-$e*pt,Dt=F(bt*bt+Et*Et);return[t(pt*Et,Dt*(1+lt)),Dt?-P(pt*bt/Dt):0]};function Sr(){return _.geoProjection(Tr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Kr(qe,$e){var lt=ue(qe,$e);return[(lt[0]+qe/A)/2,(lt[1]+$e)/2]}Kr.invert=function(qe,$e){var lt=qe,pt=$e,Et=25;do{var bt=r(pt),Dt=c(pt),ur=c(2*pt),yr=Dt*Dt,Er=bt*bt,jr=c(lt),Qr=r(lt/2),ha=c(lt/2),Aa=ha*ha,Da=1-Er*Qr*Qr,ci=Da?z(bt*Qr)*F(Vi=1/Da):Vi=0,Vi,ji=.5*(2*ci*bt*ha+lt/A)-qe,on=.5*(ci*Dt+pt)-$e,Sn=.5*Vi*(Er*Aa+ci*bt*Qr*yr)+.5/A,Kn=Vi*(jr*ur/4-ci*Dt*ha),Bn=.125*Vi*(ur*ha-ci*Dt*Er*jr),Ao=.5*Vi*(yr*Qr+ci*Aa*bt)+.5,ls=Kn*Bn-Ao*Sn,Mo=(on*Kn-ji*Ao)/ls,Yo=(ji*Bn-on*Sn)/ls;lt-=Mo,pt-=Yo}while((M(Mo)>l||M(Yo)>l)&&--Et>0);return[lt,pt]};function na(){return _.geoProjection(Kr).scale(158.837)}v.geoNaturalEarth=_.geoNaturalEarth1,v.geoNaturalEarthRaw=_.geoNaturalEarth1Raw,v.geoAiry=$,v.geoAiryRaw=W,v.geoAitoff=ce,v.geoAitoffRaw=ue,v.geoArmadillo=Y,v.geoArmadilloRaw=de,v.geoAugust=Q,v.geoAugustRaw=X,v.geoBaker=j,v.geoBakerRaw=ae,v.geoBerghaus=te,v.geoBerghausRaw=ee,v.geoBertin1953=at,v.geoBertin1953Raw=je,v.geoBoggs=Ze,v.geoBoggsRaw=Ce,v.geoBonne=Bt,v.geoBonneRaw=kt,v.geoBottomley=Ar,v.geoBottomleyRaw=Vt,v.geoBromley=qr,v.geoBromleyRaw=vr,v.geoChamberlin=Le,v.geoChamberlinRaw=Fe,v.geoChamberlinAfrica=Ae,v.geoCollignon=Ke,v.geoCollignonRaw=We,v.geoCraig=ot,v.geoCraigRaw=st,v.geoCraster=Pt,v.geoCrasterRaw=Ct,v.geoCylindricalEqualArea=cr,v.geoCylindricalEqualAreaRaw=jt,v.geoCylindricalStereographic=nr,v.geoCylindricalStereographicRaw=or,v.geoEckert1=_a,v.geoEckert1Raw=Pr,v.geoEckert2=Ra,v.geoEckert2Raw=Fa,v.geoEckert3=Wa,v.geoEckert3Raw=qa,v.geoEckert4=hi,v.geoEckert4Raw=Ca,v.geoEckert5=Yt,v.geoEckert5Raw=wi,v.geoEckert6=Zt,v.geoEckert6Raw=Rt,v.geoEisenlohr=ta,v.geoEisenlohrRaw=Fr,v.geoFahey=Ba,v.geoFaheyRaw=ca,v.geoFoucaut=Za,v.geoFoucautRaw=$a,v.geoFoucautSinusoidal=pi,v.geoFoucautSinusoidalRaw=ri,v.geoGilbert=tn,v.geoGingery=Or,v.geoGingeryRaw=cn,v.geoGinzburg4=Rr,v.geoGinzburg4Raw=wr,v.geoGinzburg5=Hr,v.geoGinzburg5Raw=Nr,v.geoGinzburg6=Kt,v.geoGinzburg6Raw=gt,v.geoGinzburg8=Ir,v.geoGinzburg8Raw=mr,v.geoGinzburg9=Pa,v.geoGinzburg9Raw=va,v.geoGringorten=ki,v.geoGringortenRaw=la,v.geoGuyou=bo,v.geoGuyouRaw=kn,v.geoHammer=Se,v.geoHammerRaw=pe,v.geoHammerRetroazimuthal=wo,v.geoHammerRetroazimuthalRaw=zs,v.geoHealpix=ss,v.geoHealpixRaw=ys,v.geoHill=ps,v.geoHillRaw=_s,v.geoHomolosine=lo,v.geoHomolosineRaw=bs,v.geoHufnagel=ws,v.geoHufnagelRaw=Zo,v.geoHyperelliptical=Po,v.geoHyperellipticalRaw=yn,v.geoInterrupt=uo,v.geoInterruptedBoggs=Ks,v.geoInterruptedHomolosine=Ls,v.geoInterruptedMollweide=Es,v.geoInterruptedMollweideHemispheres=lu,v.geoInterruptedSinuMollweide=du,v.geoInterruptedSinusoidal=Uc,v.geoKavrayskiy7=dc,v.geoKavrayskiy7Raw=Bs,v.geoLagrange=uu,v.geoLagrangeRaw=Wc,v.geoLarrivee=Ou,v.geoLarriveeRaw=ic,v.geoLaskowski=vl,v.geoLaskowskiRaw=nl,v.geoLittrow=Xs,v.geoLittrowRaw=As,v.geoLoximuthal=jl,v.geoLoximuthalRaw=nc,v.geoMiller=fl,v.geoMillerRaw=qu,v.geoModifiedStereographic=Ql,v.geoModifiedStereographicRaw=xh,v.geoModifiedStereographicAlaska=Vu,v.geoModifiedStereographicGs48=ql,v.geoModifiedStereographicGs50=Mf,v.geoModifiedStereographicMiller=Ac,v.geoModifiedStereographicLee=nf,v.geoMollweide=he,v.geoMollweideRaw=Ve,v.geoMtFlatPolarParabolic=jc,v.geoMtFlatPolarParabolicRaw=of,v.geoMtFlatPolarQuartic=Nf,v.geoMtFlatPolarQuarticRaw=Bf,v.geoMtFlatPolarSinusoidal=Ef,v.geoMtFlatPolarSinusoidalRaw=Gu,v.geoNaturalEarth2=Zc,v.geoNaturalEarth2Raw=oc,v.geoNellHammer=qc,v.geoNellHammerRaw=eu,v.geoInterruptedQuarticAuthalic=Zs,v.geoNicolosi=fh,v.geoNicolosiRaw=kf,v.geoPatterson=yu,v.geoPattersonRaw=vc,v.geoPolyconic=Ml,v.geoPolyconicRaw=Tu,v.geoPolyhedral=sf,v.geoPolyhedralButterfly=sl,v.geoPolyhedralCollignon=Cf,v.geoPolyhedralWaterman=hl,v.geoProject=nu,v.geoGringortenQuincuncial=Qt,v.geoPeirceQuincuncial=xr,v.geoPierceQuincuncial=xr,v.geoQuantize=aa,v.geoQuincuncial=Pc,v.geoRectangularPolyconic=ka,v.geoRectangularPolyconicRaw=$r,v.geoRobinson=Hi,v.geoRobinsonRaw=Ci,v.geoSatellite=Pi,v.geoSatelliteRaw=pn,v.geoSinuMollweide=qs,v.geoSinuMollweideRaw=Pn,v.geoSinusoidal=St,v.geoSinusoidalRaw=Je,v.geoStitch=ll,v.geoTimes=Ro,v.geoTimesRaw=Un,v.geoTwoPointAzimuthal=Iu,v.geoTwoPointAzimuthalRaw=Fs,v.geoTwoPointAzimuthalUsa=cu,v.geoTwoPointEquidistant=bu,v.geoTwoPointEquidistantRaw=Zu,v.geoTwoPointEquidistantUsa=Ic,v.geoVanDerGrinten=Au,v.geoVanDerGrintenRaw=Rc,v.geoVanDerGrinten2=fo,v.geoVanDerGrinten2Raw=yc,v.geoVanDerGrinten3=Dc,v.geoVanDerGrinten3Raw=Fo,v.geoVanDerGrinten4=Yu,v.geoVanDerGrinten4Raw=lc,v.geoWagner=ie,v.geoWagner7=Te,v.geoWagnerRaw=I,v.geoWagner4=wt,v.geoWagner4Raw=ht,v.geoWagner6=$t,v.geoWagner6Raw=Ot,v.geoWiechel=Sr,v.geoWiechelRaw=Tr,v.geoWinkel3=na,v.geoWinkel3Raw=Kr,Object.defineProperty(v,"__esModule",{value:!0})})}}),VU=He({"src/plots/geo/zoom.js"(Z,q){"use strict";var v=Vn(),_=sa(),S=so(),M=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(g,y){var D=g.projection,P;return y._isScoped?P=n:y._isClipped?P=h:P=s,P(g,D)}q.exports=o;function a(g,y){return v.behavior.zoom().translate(y.translate()).scale(y.scale())}function i(g,y,D){var P=g.id,z=g.graphDiv,F=z.layout,N=F[P],O=z._fullLayout,L=O[P],U={},B={};function W($,ue){U[P+"."+$]=_.nestedProperty(N,$).get(),S.call("_storeDirectGUIEdit",F,O._preGUI,U);var ce=_.nestedProperty(L,$);ce.get()!==ue&&(ce.set(ue),_.nestedProperty(N,$).set(ue),B[P+"."+$]=ue)}D(W),W("projection.scale",y.scale()/g.fitScale),W("fitbounds",!1),z.emit("plotly_relayout",B)}function n(g,y){var D=a(g,y);function P(){v.select(this).style(t)}function z(){y.scale(v.event.scale).translate(v.event.translate),g.render(!0);var O=y.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var L=y.invert(g.midPt);O("center.lon",L[0]),O("center.lat",L[1])}function N(){v.select(this).style(r),i(g,y,F)}return D.on("zoomstart",P).on("zoom",z).on("zoomend",N),D}function s(g,y){var D=a(g,y),P=2,z,F,N,O,L,U,B,W,$;function ue(V){return y.invert(V)}function ce(V){var le=ue(V);if(!le)return!0;var ae=y(le);return Math.abs(ae[0]-V[0])>P||Math.abs(ae[1]-V[1])>P}function de(){v.select(this).style(t),z=v.mouse(this),F=y.rotate(),N=y.translate(),O=F,L=ue(z)}function Y(){if(U=v.mouse(this),ce(z)){D.scale(y.scale()),D.translate(y.translate());return}y.scale(v.event.scale),y.translate([N[0],v.event.translate[1]]),L?ue(U)&&(W=ue(U),B=[O[0]+(W[0]-L[0]),F[1],F[2]],y.rotate(B),O=B):(z=U,L=ue(z)),$=!0,g.render(!0);var V=y.rotate(),le=y.invert(g.midPt);g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.center.lon":le[0],"geo.center.lat":le[1],"geo.projection.rotation.lon":-V[0]})}function X(){v.select(this).style(r),$&&i(g,y,Q)}function Q(V){var le=y.rotate(),ae=y.invert(g.midPt);V("projection.rotation.lon",-le[0]),V("center.lon",ae[0]),V("center.lat",ae[1])}return D.on("zoomstart",de).on("zoom",Y).on("zoomend",X),D}function h(g,y){var D={r:y.rotate(),k:y.scale()},P=a(g,y),z=u(P,"zoomstart","zoom","zoomend"),F=0,N=P.on,O;P.on("zoomstart",function(){v.select(this).style(t);var $=v.mouse(this),ue=y.rotate(),ce=ue,de=y.translate(),Y=m(ue);O=f(y,$),N.call(P,"zoom",function(){var X=v.mouse(this);if(y.scale(D.k=v.event.scale),!O)$=X,O=f(y,$);else if(f(y,X)){y.rotate(ue).translate(de);var Q=f(y,X),V=T(O,Q),le=E(c(Y,V)),ae=D.r=l(le,O,ce);(!isFinite(ae[0])||!isFinite(ae[1])||!isFinite(ae[2]))&&(ae=ce),y.rotate(ae),ce=ae}U(z.of(this,arguments))}),L(z.of(this,arguments))}).on("zoomend",function(){v.select(this).style(r),N.call(P,"zoom",null),B(z.of(this,arguments)),i(g,y,W)}).on("zoom.redraw",function(){g.render(!0);var $=y.rotate();g.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":y.scale()/g.fitScale,"geo.projection.rotation.lon":-$[0],"geo.projection.rotation.lat":-$[1]})});function L($){F++||$({type:"zoomstart"})}function U($){$({type:"zoom"})}function B($){--F||$({type:"zoomend"})}function W($){var ue=y.rotate();$("projection.rotation.lon",-ue[0]),$("projection.rotation.lat",-ue[1])}return v.rebind(P,z,"on")}function f(g,y){var D=g.invert(y);return D&&isFinite(D[0])&&isFinite(D[1])&&p(D)}function m(g){var y=.5*g[0]*M,D=.5*g[1]*M,P=.5*g[2]*M,z=Math.sin(y),F=Math.cos(y),N=Math.sin(D),O=Math.cos(D),L=Math.sin(P),U=Math.cos(P);return[F*O*U+z*N*L,z*O*U-F*N*L,F*N*U+z*O*L,F*O*L-z*N*U]}function c(g,y){var D=g[0],P=g[1],z=g[2],F=g[3],N=y[0],O=y[1],L=y[2],U=y[3];return[D*N-P*O-z*L-F*U,D*O+P*N+z*U-F*L,D*L-P*U+z*N+F*O,D*U+P*L-z*O+F*N]}function T(g,y){if(!(!g||!y)){var D=d(g,y),P=Math.sqrt(b(D,D)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(g,y)))),F=Math.sin(z)/P;return P&&[Math.cos(z),D[2]*F,-D[1]*F,D[0]*F]}}function l(g,y,D){var P=A(y,2,g[0]);P=A(P,1,g[1]),P=A(P,0,g[2]-D[2]);var z=y[0],F=y[1],N=y[2],O=P[0],L=P[1],U=P[2],B=Math.atan2(F,z)*e,W=Math.sqrt(z*z+F*F),$,ue;Math.abs(L)>W?(ue=(L>0?90:-90)-B,$=0):(ue=Math.asin(L/W)*e-B,$=Math.sqrt(W*W-L*L));var ce=180-ue-2*B,de=(Math.atan2(U,O)-Math.atan2(N,$))*e,Y=(Math.atan2(U,O)-Math.atan2(N,-$))*e,X=x(D[0],D[1],ue,de),Q=x(D[0],D[1],ce,Y);return X<=Q?[ue,de,D[2]]:[ce,Y,D[2]]}function x(g,y,D,P){var z=w(D-g),F=w(P-y);return Math.sqrt(z*z+F*F)}function w(g){return(g%360+540)%360-180}function A(g,y,D){var P=D*M,z=g.slice(),F=y===0?1:0,N=y===2?1:2,O=Math.cos(P),L=Math.sin(P);return z[F]=g[F]*O-g[N]*L,z[N]=g[N]*O+g[F]*L,z}function E(g){return[Math.atan2(2*(g[0]*g[1]+g[2]*g[3]),1-2*(g[1]*g[1]+g[2]*g[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(g[0]*g[2]-g[3]*g[1]))))*e,Math.atan2(2*(g[0]*g[3]+g[1]*g[2]),1-2*(g[2]*g[2]+g[3]*g[3]))*e]}function p(g){var y=g[0]*M,D=g[1]*M,P=Math.cos(D);return[P*Math.cos(y),P*Math.sin(y),Math.sin(D)]}function b(g,y){for(var D=0,P=0,z=g.length;P0&&B._module.calcGeoJSON(U,F)}if(!N){var W=this.updateProjection(z,F);if(W)return;(!this.viewInitial||this.scope!==O.scope)&&this.saveViewInitial(O)}this.scope=O.scope,this.updateBaseLayers(F,O),this.updateDims(F,O),this.updateFx(F,O),s.generalUpdatePerTraceModule(this.graphDiv,this,z,O);var $=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=$.selectAll(".point"),this.dataPoints.text=$.selectAll("text"),this.dataPaths.line=$.selectAll(".js-line");var ue=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ue.selectAll("path"),this._render()},g.updateProjection=function(z,F){var N,O=this.graphDiv,L=F[this.id],U=F._size,B=L.domain,W=L.projection,$=L.lonaxis,ue=L.lataxis,ce=$._ax,de=ue._ax,Y=this.projection=y(L),X=[[U.l+U.w*B.x[0],U.t+U.h*(1-B.y[1])],[U.l+U.w*B.x[1],U.t+U.h*(1-B.y[0])]],Q=L.center||{},V=W.rotation||{},le=$.range||[],ae=ue.range||[];if(L.fitbounds){if(ce._length=X[1][0]-X[0][0],de._length=X[1][1]-X[0][1],ce.range=f(O,ce),de.range=f(O,de),!this.hasChoropleth&&L.fitbounds==="locations"){for(var j=[],ee=!1,te=0;te0?(ce.range[1]-ce.range[0]-je)/2*(Pe[1]-Pe[0])/je:0;ce.range=[Pe[0]-at,Pe[1]+at]}}}var nt=(ce.range[0]+ce.range[1])/2,tt=(de.range[0]+de.range[1])/2;if(L._isScoped)Q={lon:nt,lat:tt};else if(L._isClipped){Q={lon:nt,lat:tt},V={lon:nt,lat:tt,roll:V.roll};var Ve=W.type,he=w.lonaxisSpan[Ve]/2||180,se=w.lataxisSpan[Ve]/2||90;le=[nt-he,nt+he],ae=[tt-se,tt+se]}else Q={lon:nt,lat:tt},V={lon:nt,lat:V.lat,roll:V.roll}}Y.center([Q.lon-V.lon,Q.lat-V.lat]).rotate([-V.lon,-V.lat,V.roll]).parallels(W.parallels);var ne=P(le,ae);Y.fitExtent(X,ne);var Ce=this.bounds=Y.getBounds(ne),Ze=this.fitScale=Y.scale(),rt=Y.translate();if(L.fitbounds){var Je=Y.getBounds(P(ce.range,de.range)),St=Math.min((Ce[1][0]-Ce[0][0])/(Je[1][0]-Je[0][0]),(Ce[1][1]-Ce[0][1])/(Je[1][1]-Je[0][1]));isFinite(St)?Y.scale(St*Ze):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Y.scale(W.scale*Ze);var kt=this.midPt=[(Ce[0][0]+Ce[1][0])/2,(Ce[0][1]+Ce[1][1])/2];if(Y.translate([rt[0]+(kt[0]-rt[0]),rt[1]+(kt[1]-rt[1])]).clipExtent(Ce),L._isAlbersUsa){var Bt=Y([Q.lon,Q.lat]),Vt=Y.translate();Y.translate([Vt[0]-(Bt[0]-Vt[0]),Vt[1]-(Bt[1]-Vt[1])])}},g.updateBaseLayers=function(z,F){var N=this,O=N.topojson,L=N.layers,U=N.basePaths;function B(Y){return Y==="lonaxis"||Y==="lataxis"}function W(Y){return!!w.lineLayers[Y]}function $(Y){return!!w.fillLayers[Y]}var ue=this.hasChoropleth?w.layersForChoropleth:w.layers,ce=ue.filter(function(Y){return W(Y)||$(Y)?F["show"+Y]:B(Y)?F[Y].showgrid:!0}),de=N.framework.selectAll(".layer").data(ce,String);de.exit().each(function(Y){delete L[Y],delete U[Y],v.select(this).remove()}),de.enter().append("g").attr("class",function(Y){return"layer "+Y}).each(function(Y){var X=L[Y]=v.select(this);Y==="bg"?N.bgRect=X.append("rect").style("pointer-events","all"):B(Y)?U[Y]=X.append("path").style("fill","none"):Y==="backplot"?X.append("g").classed("choroplethlayer",!0):Y==="frontplot"?X.append("g").classed("scatterlayer",!0):W(Y)?U[Y]=X.append("path").style("fill","none").style("stroke-miterlimit",2):$(Y)&&(U[Y]=X.append("path").style("stroke","none"))}),de.order(),de.each(function(Y){var X=U[Y],Q=w.layerNameToAdjective[Y];Y==="frame"?X.datum(w.sphereSVG):W(Y)||$(Y)?X.datum(d(O,O.objects[Y])):B(Y)&&X.datum(D(Y,F,z)).call(a.stroke,F[Y].gridcolor).call(i.dashLine,F[Y].griddash,F[Y].gridwidth),W(Y)?X.call(a.stroke,F[Q+"color"]).call(i.dashLine,"",F[Q+"width"]):$(Y)&&X.call(a.fill,F[Q+"color"])})},g.updateDims=function(z,F){var N=this.bounds,O=(F.framewidth||0)/2,L=N[0][0]-O,U=N[0][1]-O,B=N[1][0]-L+O,W=N[1][1]-U+O;i.setRect(this.clipRect,L,U,B,W),this.bgRect.call(i.setRect,L,U,B,W).call(a.fill,F.bgcolor),this.xaxis._offset=L,this.xaxis._length=B,this.yaxis._offset=U,this.yaxis._length=W},g.updateFx=function(z,F){var N=this,O=N.graphDiv,L=N.bgRect,U=z.dragmode,B=z.clickmode;if(N.isStatic)return;function W(){var de=N.viewInitial,Y={};for(var X in de)Y[N.id+"."+X]=de[X];t.call("_guiRelayout",O,Y),O.emit("plotly_doubleclick",null)}function $(de){return N.projection.invert([de[0]+N.xaxis._offset,de[1]+N.yaxis._offset])}var ue=function(de,Y){if(Y.isRect){var X=de.range={};X[N.id]=[$([Y.xmin,Y.ymin]),$([Y.xmax,Y.ymax])]}else{var Q=de.lassoPoints={};Q[N.id]=Y.map($)}},ce={element:N.bgRect.node(),gd:O,plotinfo:{id:N.id,xaxis:N.xaxis,yaxis:N.yaxis,fillRangeItems:ue},xaxes:[N.xaxis],yaxes:[N.yaxis],subplot:N.id,clickFn:function(de){de===2&&T(O)}};U==="pan"?(L.node().onmousedown=null,L.call(x(N,F)),L.on("dblclick.zoom",W),O._context._scrollZoom.geo||L.on("wheel.zoom",null)):(U==="select"||U==="lasso")&&(L.on(".zoom",null),ce.prepFn=function(de,Y,X){c(de,Y,X,ce,U)},m.init(ce)),L.on("mousemove",function(){var de=N.projection.invert(r.getPositionFromD3Event());if(!de)return m.unhover(O,v.event);N.xaxis.p2c=function(){return de[0]},N.yaxis.p2c=function(){return de[1]},n.hover(O,v.event,N.id)}),L.on("mouseout",function(){O._dragging||m.unhover(O,v.event)}),L.on("click",function(){U!=="select"&&U!=="lasso"&&(B.indexOf("select")>-1&&l(v.event,O,[N.xaxis],[N.yaxis],N.id,ce),B.indexOf("event")>-1&&n.click(O,v.event))})},g.makeFramework=function(){var z=this,F=z.graphDiv,N=F._fullLayout,O="clip"+N._uid+z.id;z.clipDef=N._clips.append("clipPath").attr("id",O),z.clipRect=z.clipDef.append("rect"),z.framework=v.select(z.container).append("g").attr("class","geo "+z.id).call(i.setClipUrl,O,F),z.project=function(L){var U=z.projection(L);return U?[U[0]-z.xaxis._offset,U[1]-z.yaxis._offset]:[null,null]},z.xaxis={_id:"x",c2p:function(L){return z.project(L)[0]}},z.yaxis={_id:"y",c2p:function(L){return z.project(L)[1]}},z.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(z.mockAxis,N)},g.saveViewInitial=function(z){var F=z.center||{},N=z.projection,O=N.rotation||{};this.viewInitial={fitbounds:z.fitbounds,"projection.scale":N.scale};var L;z._isScoped?L={"center.lon":F.lon,"center.lat":F.lat}:z._isClipped?L={"projection.rotation.lon":O.lon,"projection.rotation.lat":O.lat}:L={"center.lon":F.lon,"center.lat":F.lat,"projection.rotation.lon":O.lon},r.extendFlat(this.viewInitial,L)},g.render=function(z){this._hasMarkerAngles&&z?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},g._render=function(){var z=this.projection,F=z.getPath(),N;function O(U){var B=z(U.lonlat);return B?o(B[0],B[1]):null}function L(U){return z.isLonLatOverEdges(U.lonlat)?"none":null}for(N in this.basePaths)this.basePaths[N].attr("d",F);for(N in this.dataPaths)this.dataPaths[N].attr("d",function(U){return F(U.geojson)});for(N in this.dataPoints)this.dataPoints[N].attr("display",L).attr("transform",O)};function y(z){var F=z.projection,N=F.type,O=w.projNames[N];O="geo"+r.titleCase(O);for(var L=_[O]||e[O],U=L(),B=z._isSatellite?Math.acos(1/F.distance)*180/Math.PI:z._isClipped?w.lonaxisSpan[N]/2:null,W=["center","rotate","parallels","clipExtent"],$=function(de){return de?U:[]},ue=0;ueQ}else return!1},U.getPath=function(){return S().projection(U)},U.getBounds=function(de){return U.getPath().bounds(de)},U.precision(w.precision),z._isSatellite&&U.tilt(F.tilt).distance(F.distance),B&&U.clipAngle(B-w.clipPad),U}function D(z,F,N){var O=1e-6,L=2.5,U=F[z],B=w.scopeDefaults[F.scope],W,$,ue;z==="lonaxis"?(W=B.lonaxisRange,$=B.lataxisRange,ue=function(j,ee){return[j,ee]}):z==="lataxis"&&(W=B.lataxisRange,$=B.lonaxisRange,ue=function(j,ee){return[ee,j]});var ce={type:"linear",range:[W[0],W[1]-O],tick0:U.tick0,dtick:U.dtick};h.setConvert(ce,N);var de=h.calcTicks(ce);!F.isScoped&&z==="lonaxis"&&de.pop();for(var Y=de.length,X=new Array(Y),Q=0;Q")}}}}),fT=He({"src/traces/choropleth/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){_.location=S.location,_.z=S.z;var r=e[t];return r.fIn&&r.fIn.properties&&(_.properties=r.fIn.properties),_.ct=r.ct,_}}}),hT=He({"src/traces/choropleth/select.js"(Z,q){"use strict";q.exports=function(_,S){var M=_.cd,e=_.xaxis,t=_.yaxis,r=[],o,a,i,n,s;if(S===!1)for(o=0;o=Math.min(B,W)&&T<=Math.max(B,W)?0:1/0}if(P=Math.min($,ue)&&l<=Math.max($,ue)?0:1/0}N=Math.sqrt(P*P+z*z),u=w[D]}}}else for(D=w.length-1;D>-1;D--)d=w[D],g=m[d],y=c[d],P=h.c2p(g)-T,z=f.c2p(y)-l,F=Math.sqrt(P*P+z*z),F100},Z.isDotSymbol=function(v){return typeof v=="string"?q.DOT_RE.test(v):v>200}}}),JU=He({"src/traces/scattergl/defaults.js"(Z,q){"use strict";var v=sa(),_=so(),S=dT(),M=xx(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),i=Dd(),n=ev(),s=zd();q.exports=function(f,m,c,T){function l(u,g){return v.coerce(f,m,M,u,g)}var x=f.marker?S.isOpenSymbol(f.marker.symbol):!1,w=t.isBubble(f),A=r(f,m,T,l);if(!A){m.visible=!1;return}o(f,m,T,l),l("xhoverformat"),l("yhoverformat");var E=A>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m>=0?(s=h,n=h-1):i=h+1}return s}function _(r,o,a,i,n){for(var s=n+1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m>0?(s=h,n=h-1):i=h+1}return s}function S(r,o,a,i,n){for(var s=i-1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m<0?(s=h,i=h+1):n=h-1}return s}function M(r,o,a,i,n){for(var s=i-1;i<=n;){var h=i+n>>>1,f=r[h],m=a!==void 0?a(f,o):f-o;m<=0?(s=h,i=h+1):n=h-1}return s}function e(r,o,a,i,n){for(;i<=n;){var s=i+n>>>1,h=r[s],f=a!==void 0?a(h,o):h-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,v)},gt:function(r,o,a,i,n){return t(r,o,a,i,n,_)},lt:function(r,o,a,i,n){return t(r,o,a,i,n,S)},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)}}}}),kv=He({"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=_(e)),Array.isArray(e)){var i={};for(a=0;a1&&(S=arguments),typeof S=="string"?S=S.split(/\s/).map(parseFloat):typeof S=="number"&&(S=[S]),S.length&&typeof S[0]=="number"?S.length===1?M={width:S[0],height:S[0],x:0,y:0}:S.length===2?M={width:S[0],height:S[1],x:0,y:0}:M={x:S[0],y:S[1],width:S[2]-S[0]||0,height:S[3]-S[1]||0}:S&&(S=v(S,{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:S.left||0,y:S.top||0},S.width==null?S.right?M.width=S.right-M.x:M.width=0:M.width=S.width,S.height==null?S.bottom?M.height=S.bottom-M.y:M.height=0:M.height=S.height),M}}}),mg=He({"node_modules/array-bounds/index.js"(Z,q){"use strict";q.exports=v;function v(_,S){if(!_||_.length==null)throw Error("Argument should be an array");S==null?S=1:S=Math.floor(S);for(var M=Array(S*2),e=0;et&&(t=_[o]),_[o]>>1,w;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?w=new(a(m.dtype))(x):m.dtype&&(w=m.dtype,Array.isArray(w)&&(w.length=x));for(let P=0;Pc||L>n){for(let le=0;lete||W>pe||$=ce||j===ee)return;let we=A[ae];ee===void 0&&(ee=we.length);for(let he=j;he=N&&ne<=L&&Ce>=O&&Ce<=U&&de.push(se)}let Se=E[ae],Re=Se[j*4+0],Pe=Se[j*4+1],je=Se[j*4+2],at=Se[j*4+3],nt=X(Se,j+1),tt=le*.5,Ve=ae+1;Y(Q,V,tt,Ve,Re,Pe||je||at||nt),Y(Q,V+tt,tt,Ve,Pe,je||at||nt),Y(Q+tt,V,tt,Ve,je,at||nt),Y(Q+tt,V+tt,tt,Ve,at,nt)}function X(Q,V){let le=null,ae=0;for(;le===null;)if(le=Q[V*4+ae],ae++,ae>Q.length)return null;return le}return de}function y(P,z,F,N,O){let L=[];for(let U=0;U1&&(f=1),f<-1&&(f=-1),h*Math.acos(f)},t=function(a,i,n,s,h,f,m,c,T,l,x,w){var A=Math.pow(h,2),E=Math.pow(f,2),p=Math.pow(x,2),b=Math.pow(w,2),d=A*E-A*b-E*p;d<0&&(d=0),d/=A*b+E*p,d=Math.sqrt(d)*(m===c?-1:1);var u=d*h/f*w,g=d*-f/h*x,y=l*u-T*g+(a+n)/2,D=T*u+l*g+(i+s)/2,P=(x-u)/h,z=(w-g)/f,F=(-x-u)/h,N=(-w-g)/f,O=e(1,0,P,z),L=e(P,z,F,N);return c===0&&L>0&&(L-=_),c===1&&L<0&&(L+=_),[y,D,O,L]},r=function(a){var i=a.px,n=a.py,s=a.cx,h=a.cy,f=a.rx,m=a.ry,c=a.xAxisRotation,T=c===void 0?0:c,l=a.largeArcFlag,x=l===void 0?0:l,w=a.sweepFlag,A=w===void 0?0:w,E=[];if(f===0||m===0)return[];var p=Math.sin(T*_/360),b=Math.cos(T*_/360),d=b*(i-s)/2+p*(n-h)/2,u=-p*(i-s)/2+b*(n-h)/2;if(d===0&&u===0)return[];f=Math.abs(f),m=Math.abs(m);var g=Math.pow(d,2)/Math.pow(f,2)+Math.pow(u,2)/Math.pow(m,2);g>1&&(f*=Math.sqrt(g),m*=Math.sqrt(g));var y=t(i,n,s,h,f,m,x,A,p,b,d,u),D=v(y,4),P=D[0],z=D[1],F=D[2],N=D[3],O=Math.abs(N)/(_/4);Math.abs(1-O)<1e-7&&(O=1);var L=Math.max(Math.ceil(O),1);N/=L;for(var U=0;U4?(o=l[l.length-4],a=l[l.length-3]):(o=f,a=m),r.push(l)}return r}function S(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]}}}),UE=He({"node_modules/is-svg-path/index.js"(Z,q){"use strict";q.exports=function(_){return typeof _!="string"?!1:(_=_.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(_)&&/[\dz]$/i.test(_)&&_.length>4))}}}),oj=He({"node_modules/svg-path-bounds/index.js"(Z,q){"use strict";var v=M_(),_=NE(),S=nj(),M=UE(),e=K_();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=v(r)),e(Array.isArray(r),"Argument should be a string or an array of path segments."),r=_(r),r=S(r),!r.length)return[0,0,0,0];for(var o=[1/0,1/0,-1/0,-1/0],a=0,i=r.length;ao[2]&&(o[2]=n[s+0]),n[s+1]>o[3]&&(o[3]=n[s+1]);return o}}}),sj=He({"node_modules/normalize-svg-path/index.js"(Z,q){var v=Math.PI,_=o(120);q.exports=S;function S(a){for(var i,n=[],s=0,h=0,f=0,m=0,c=null,T=null,l=0,x=0,w=0,A=a.length;w7&&(n.push(E.splice(0,7)),E.unshift("C"));break;case"S":var b=l,d=x;(i=="C"||i=="S")&&(b+=b-s,d+=d-h),E=["C",b,d,E[1],E[2],E[3],E[4]];break;case"T":i=="Q"||i=="T"?(c=l*2-c,T=x*2-T):(c=l,T=x),E=e(l,x,c,T,E[1],E[2]);break;case"Q":c=E[1],T=E[2],E=e(l,x,E[1],E[2],E[3],E[4]);break;case"L":E=M(l,x,E[1],E[2]);break;case"H":E=M(l,x,E[1],x);break;case"V":E=M(l,x,l,E[1]);break;case"Z":E=M(l,x,f,m);break}i=p,l=E[E.length-2],x=E[E.length-1],E.length>4?(s=E[E.length-4],h=E[E.length-3]):(s=l,h=x),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,h,f){return["C",a/3+2/3*n,i/3+2/3*s,h/3+2/3*n,f/3+2/3*s,h,f]}function t(a,i,n,s,h,f,m,c,T,l){if(l)y=l[0],D=l[1],u=l[2],g=l[3];else{var x=r(a,i,-h);a=x.x,i=x.y,x=r(c,T,-h),c=x.x,T=x.y;var w=(a-c)/2,A=(i-T)/2,E=w*w/(n*n)+A*A/(s*s);E>1&&(E=Math.sqrt(E),n=E*n,s=E*s);var p=n*n,b=s*s,d=(f==m?-1:1)*Math.sqrt(Math.abs((p*b-p*A*A-b*w*w)/(p*A*A+b*w*w)));d==1/0&&(d=1);var u=d*n*A/s+(a+c)/2,g=d*-s*w/n+(i+T)/2,y=Math.asin(((i-g)/s).toFixed(9)),D=Math.asin(((T-g)/s).toFixed(9));y=aD&&(y=y-v*2),!m&&D>y&&(D=D-v*2)}if(Math.abs(D-y)>_){var P=D,z=c,F=T;D=y+_*(m&&D>y?1:-1),c=u+n*Math.cos(D),T=g+s*Math.sin(D);var N=t(c,T,n,s,h,0,m,z,F,[D,P,u,g])}var O=Math.tan((D-y)/4),L=4/3*n*O,U=4/3*s*O,B=[2*a-(a+L*Math.sin(y)),2*i-(i-U*Math.cos(y)),c+L*Math.sin(D),T-U*Math.cos(D),c,T];if(l)return B;N&&(B=B.concat(N));for(var W=0;W0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(c)),r.translate(h*.5,f*.5),r.scale(x,x),i()){var w=new Path2D(n);r.fill(w),c&&r.stroke(w)}else{var A=_(n);S(r,A),r.fill(),c&&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:m*.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 h=n.getImageData(0,0,1,1);return a=h&&h.data&&h.data[3]===255}}}),yg=He({"src/traces/scattergl/convert.js"(Z,q){"use strict";var v=ns(),_=cj(),S=v0(),M=so(),e=sa(),t=e.isArrayOrTypedArray,r=as(),o=tf(),a=rm().formatColor,i=Fu(),n=r1(),s=dT(),h=y0(),f=Km().DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},c=$p().appendArrayPointValue;function T(N,O){var L,U={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},B=N._context.plotGlPixelRatio;if(O.visible!==!0)return U;if(i.hasText(O)&&(U.text=l(N,O),U.textSel=E(N,O,O.selected),U.textUnsel=E(N,O,O.unselected)),i.hasMarkers(O)&&(U.marker=w(N,O),U.markerSel=A(N,O,O.selected),U.markerUnsel=A(N,O,O.unselected),!O.unselected&&t(O.marker.opacity))){var W=O.marker.opacity;for(U.markerUnsel.opacity=new Array(W.length),L=0;L500?"bold":"normal":N}function w(N,O){var L=O._length,U=O.marker,B={},W,$=t(U.symbol),ue=t(U.angle),ce=t(U.color),de=t(U.line.color),Y=t(U.opacity),X=t(U.size),Q=t(U.line.width),V;if($||(V=s.isOpenSymbol(U.symbol)),$||ce||de||Y||ue){B.symbols=new Array(L),B.angles=new Array(L),B.colors=new Array(L),B.borderColors=new Array(L);var le=U.symbol,ae=U.angle,j=a(U,U.opacity,L),ee=a(U.line,U.opacity,L);if(!t(ee[0])){var te=ee;for(ee=Array(L),W=0;Wh.TOO_MANY_POINTS||i.hasMarkers(O)?"rect":"round";if(de&&O.connectgaps){var X=W[0],Q=W[1];for($=0;$1?ce[$]:ce[0]:ce,V=t(de)?de.length>1?de[$]:de[0]:de,le=m[Q],ae=m[V],j=Y?Y/.8+1:0,ee=-ae*j-ae*.5;W.offset[$]=[le*j/X,ee/X]}}return W}q.exports={style:T,markerStyle:w,markerSelection:A,linePositions:P,errorBarPositions:z,textPosition:F}}}),jE=He({"src/traces/scattergl/scene_update.js"(Z,q){"use strict";var v=sa();q.exports=function(S,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(){v.extendFlat(e,r,t)},e.init(),e.update=function(a){var i=v.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=f,u=b*2,g={},y,D=A.makeCalcdata(x,"x"),P=E.makeCalcdata(x,"y"),z=e(x,A,"x",D),F=e(x,E,"y",P),N=z.vals,O=F.vals;x._x=N,x._y=O,x.xperiodalignment&&(x._origX=D,x._xStarts=z.starts,x._xEnds=z.ends),x.yperiodalignment&&(x._origY=P,x._yStarts=F.starts,x._yEnds=F.ends);var L=new Array(u),U=new Array(b);for(y=0;y1&&_.extendFlat(p.line,n.linePositions(T,x,w)),p.errorX||p.errorY){var b=n.errorBarPositions(T,x,w,A,E);p.errorX&&_.extendFlat(p.errorX,b.x),p.errorY&&_.extendFlat(p.errorY,b.y)}return p.text&&(_.extendFlat(p.text,{positions:w},n.textPosition(T,x,p.text,p.marker)),_.extendFlat(p.textSel,{positions:w},n.textPosition(T,x,p.text,p.markerSel)),_.extendFlat(p.textUnsel,{positions:w},n.textPosition(T,x,p.text,p.markerUnsel))),p}}}),qE=He({"src/traces/scattergl/edit_style.js"(Z,q){"use strict";var v=sa(),_=$n(),S=Km().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],h=a.textOptions[i],f=a.textSelectedOptions[i]||{},m=a.textUnselectedOptions[i]||{},c=v.extendFlat({},h),T,l;if(n.length||s.length){var x=f.color,w=m.color,A=h.color,E=v.isArrayOrTypedArray(A);for(c.color=new Array(r._length),T=0;T>>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]}}}),ch=He({"node_modules/object-assign/index.js"(Z,q){"use strict";var v=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,S=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;ng.length)&&(y=g.length);for(var D=0,P=new Array(y);D[y.viewport.x,y.viewport.y,g.viewportWidth,g.viewportHeight]},attributes:{color:{buffer:T,offset:(g,y)=>y.offset*4,divisor:1},position:{buffer:m,offset:(g,y)=>y.offset*8,divisor:1},positionFract:{buffer:c,offset:(g,y)=>y.offset*8,divisor:1},error:{buffer:l,offset:(g,y)=>y.offset*16,divisor:1},direction:{buffer:x,stride:24,offset:0},lineOffset:{buffer:x,stride:24,offset:8},capOffset:{buffer:x,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:d,draw:p,destroy:u,regl:n,gl:h,canvas:h.canvas,groups:A}),E;function E(g){g?d(g):g===null&&u(),p()}function p(g){if(typeof g=="number")return b(g);g&&!Array.isArray(g)&&(g=[g]),n._refresh(),A.forEach((y,D)=>{if(y){if(g&&(g[D]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}b(D)}})}function b(g){typeof g=="number"&&(g=A[g]),g!=null&&g&&g.count&&g.color&&g.opacity&&g.positions&&g.positions.length>1&&(g.scaleRatio=[g.scale[0]*g.viewport.width,g.scale[1]*g.viewport.height],f(g),g.after&&g.after(g))}function d(g){if(!g)return;g.length!=null?typeof g[0]=="number"&&(g=[{positions:g}]):Array.isArray(g)||(g=[g]);let y=0,D=0;if(E.groups=A=g.map((F,N)=>{let O=A[N];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||(A[N]=O={id:N,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},F=e({},w,F)),S(O,F,[{lineWidth:L=>+L*.5,capSize:L=>+L*.5,opacity:parseFloat,errors:L=>(L=t(L),D+=L.length,L),positions:(L,U)=>(L=t(L,"float64"),U.count=Math.floor(L.length/2),U.bounds=v(L,2),U.offset=y,y+=U.count,L)},{color:(L,U)=>{let B=U.count;if(L||(L="transparent"),!Array.isArray(L)||typeof L[0]=="number"){let $=L;L=Array(B);for(let ue=0;ue{let W=U.bounds;return L||(L=W),U.scale=[1/(L[2]-L[0]),1/(L[3]-L[1])],U.translate=[-L[0],-L[1]],U.scaleFract=o(U.scale),U.translateFract=o(U.translate),L},viewport:L=>{let U;return Array.isArray(L)?U={x:L[0],y:L[1],width:L[2]-L[0],height:L[3]-L[1]}:L?(U={x:L.x||L.left||0,y:L.y||L.top||0},L.right?U.width=L.right-U.x:U.width=L.w||L.width||0,L.bottom?U.height=L.bottom-U.y:U.height=L.h||L.height||0):U={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},U}}]),O}),y||D){let F=A.reduce((U,B,W)=>U+(B?B.count:0),0),N=new Float64Array(F*2),O=new Uint8Array(F*4),L=new Float32Array(F*4);A.forEach((U,B)=>{if(!U)return;let{positions:W,count:$,offset:ue,color:ce,errors:de}=U;$&&(O.set(ce,ue*4),L.set(de,ue*4),N.set(W,ue*2))});var P=r(N);m(P);var z=o(N,P);c(z),T(O),l(L)}}function u(){m.destroy(),c.destroy(),T.destroy(),l.destroy(),x.destroy()}}}}),vq=He({"node_modules/unquote/index.js"(Z,q){var v=/[\'\"]/;q.exports=function(S){return S?(v.test(S.charAt(0))&&(S=S.substr(1)),v.test(S.charAt(S.length-1))&&(S=S.substr(0,S.length-1)),S):""}}}),i6=He({"node_modules/css-global-keywords/index.json"(Z,q){q.exports=["inherit","initial","unset"]}}),n6=He({"node_modules/css-system-font-keywords/index.json"(Z,q){q.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),o6=He({"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"]}}),s6=He({"node_modules/css-font-style-keywords/index.json"(Z,q){q.exports=["normal","italic","oblique"]}}),l6=He({"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"]}}),mq=He({"node_modules/parenthesis/index.js"(Z,q){"use strict";function v(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 h=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),f=[];function m(c,T,l){var x=t.push(c.slice(s[0].length,-s[1].length))-1;return f.push(x),o+x+o}t.forEach(function(c,T){for(var l,x=0;c!=l;)if(l=c,c=c.replace(h,m),x++>1e4)throw Error("References have circular dependency. Please, check them.");t[T]=c}),f=f.reverse(),t=t.map(function(c){return f.forEach(function(T){c=c.replace(new RegExp("(\\"+o+T+"\\"+o+")","g"),s[0]+"$1"+s[1])}),c})});var i=new RegExp("\\"+o+"([0-9]+)\\"+o);function n(s,h,f){for(var m=[],c,T=0;c=i.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");m.push(s.slice(0,c.index)),m.push(n(h[c[1]],h)),s=s.slice(c.index+c[0].length)}return m.push(s),m}return a?t:n(t[0],t)}function _(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(h,f){return Array.isArray(f)&&(f=f.reduce(s,"")),h+f},"");function n(s,h){if(M[h]==null)throw Error("Reference "+h+"is undefined");return M[h]}}function S(M,e){return Array.isArray(M)?_(M,e):v(M,e)}S.parse=v,S.stringify=_,q.exports=S}}),gq=He({"node_modules/string-split-by/index.js"(Z,q){"use strict";var v=mq();q.exports=function(S,M,e){if(S==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(h){return h.length===1&&(h=h+h),h}));var t=v.parse(S,{flat:!0,brackets:e.ignore}),r=t[0],o=r.split(M);if(e.escape){for(var a=[],i=0;i1&&Xt===fr&&(Xt==='"'||Xt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var Ta=it.split(".");if(Ta.length===1)return['"'+r(it)+'"'];for(var ma=[],xa=0;xa"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Xt=="string"?fr=document.querySelector(Xt):typeof Xt=="object"&&(x(Xt)?fr=Xt:w(Xt)?(ma=Xt,Ta=ma.canvas):("gl"in Xt?ma=Xt.gl:"canvas"in Xt?Ta=E(Xt.canvas):"container"in Xt&&(oa=E(Xt.container)),"attributes"in Xt&&(xa=Xt.attributes),"extensions"in Xt&&(Ya=A(Xt.extensions)),"optionalExtensions"in Xt&&(bi=A(Xt.optionalExtensions)),"onDone"in Xt&&(zi=Xt.onDone),"profile"in Xt&&(si=!!Xt.profile),"pixelRatio"in Xt&&(yi=+Xt.pixelRatio),"cachedCode"in Xt&&(gn=Xt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Ta=fr:oa=fr),!ma){if(!Ta){var Na=T(oa||document.body,zi,yi);if(!Na)return null;Ta=Na.canvas,Ei=Na.onDestroy}xa.premultipliedAlpha===void 0&&(xa.premultipliedAlpha=!0),ma=l(Ta,xa)}return ma?{gl:ma,canvas:Ta,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:gn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Xt){var fr={};function oa(xa){var Ya=xa.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var Ta=0;Ta65535)<<4,it>>>=Xt,fr=(it>255)<<3,it>>>=fr,Xt|=fr,fr=(it>15)<<2,it>>>=fr,Xt|=fr,fr=(it>3)<<1,it>>>=fr,Xt|=fr,Xt|it>>1}function L(){var it=d(8,function(){return[]});function Xt(ma){var xa=N(ma),Ya=it[O(xa)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(xa)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,xa){var Ya=null;switch(ma){case u:Ya=new Int8Array(Xt(xa),0,xa);break;case g:Ya=new Uint8Array(Xt(xa),0,xa);break;case y:Ya=new Int16Array(Xt(2*xa),0,xa);break;case D:Ya=new Uint16Array(Xt(2*xa),0,xa);break;case P:Ya=new Int32Array(Xt(4*xa),0,xa);break;case z:Ya=new Uint32Array(Xt(4*xa),0,xa);break;case F:Ya=new Float32Array(Xt(4*xa),0,xa);break;default:return null}return Ya.length!==xa?Ya.subarray(0,xa):Ya}function Ta(ma){fr(ma.buffer)}return{alloc:Xt,free:fr,allocType:oa,freeType:Ta}}var U=L();U.zero=L();var B=3408,W=3410,$=3411,ue=3412,ce=3413,de=3414,Y=3415,X=33901,Q=33902,V=3379,le=3386,ae=34921,j=36347,ee=36348,te=35661,pe=35660,we=34930,Se=36349,Re=34076,Pe=34024,je=7936,at=7937,nt=7938,tt=35724,Ve=34047,he=36063,se=34852,ne=3553,Ce=34067,Ze=34069,rt=33984,Je=6408,St=5126,kt=5121,Bt=36160,Vt=36053,Ar=36064,vr=16384,qr=function(it,Xt){var fr=1;Xt.ext_texture_filter_anisotropic&&(fr=it.getParameter(Ve));var oa=1,Ta=1;Xt.webgl_draw_buffers&&(oa=it.getParameter(se),Ta=it.getParameter(he));var ma=!!Xt.oes_texture_float;if(ma){var xa=it.createTexture();it.bindTexture(ne,xa),it.texImage2D(ne,0,Je,1,1,0,Je,St,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Bt,Ya),it.framebufferTexture2D(Bt,Ar,ne,xa,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Bt)!==Vt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(vr);var bi=U.allocType(St,4);it.readPixels(0,0,1,1,Je,St,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(xa),ma=bi[0]===1),U.freeType(bi)}}var yi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),si=!0;if(!yi){var gn=it.createTexture(),zi=U.allocType(kt,36);it.activeTexture(rt),it.bindTexture(Ce,gn),it.texImage2D(Ze,0,Je,3,3,0,Je,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(W),it.getParameter($),it.getParameter(ue),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(Y),subpixelBits:it.getParameter(B),extensions:Object.keys(Xt).filter(function(Ei){return!!Xt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:Ta,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(Q),maxViewportDims:it.getParameter(le),maxCombinedTextureUnits:it.getParameter(te),maxCubeMapSize:it.getParameter(Re),maxRenderbufferSize:it.getParameter(Pe),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(V),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(je),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},kr=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function Ur(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||kr(it.data))}var _t=function(it){return Object.keys(it).map(function(Xt){return it[Xt]})},Fe={shape:st,flatten:Ke};function Ye(it,Xt,fr){for(var oa=0;oa0){var hn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua0){if(typeof Ha[0]=="number"){var Ti=U.allocType(Va.dtype,Ha.length);Fr(Ti,Ha),Li(Ti,Yi),U.freeType(Ti)}else if(Array.isArray(Ha[0])||kr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ur(Ha)){Ri=Ha.shape;var Xi=Ha.stride,vn=0,Rn=0,Ii=0,nn=0;Ri.length===1?(vn=Ri[0],Rn=1,Ii=Xi[0],nn=0):Ri.length===2&&(vn=Ri[0],Rn=Ri[1],Ii=Xi[0],nn=Xi[1]);var Cn=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(Cn,vn*Rn);ta(Dn,Ha.data,vn,Rn,Ii,nn,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=hn,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Xt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof xa?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ia={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rn=0,tn=1,cn=4,xt=5120,ut=5121,Or=5122,Cr=5123,wr=5124,Rr=5125,Nr=34963,Hr=35040,gt=35044;function Kt(it,Xt,fr,oa){var Ta={},ma=0,xa={uint8:ut,uint16:Cr};Xt.oes_element_index_uint&&(xa.uint32=Rr);function Ya(Na){this.id=ma++,Ta[this.id]=this,this.buffer=Na,this.primType=cn,this.vertCount=0,this.type=0}Ya.prototype.bind=function(){this.buffer.bind()};var bi=[];function yi(Na){var ea=bi.pop();return ea||(ea=new Ya(fr.create(null,Nr,!0,!1)._buffer)),gn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function gn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var hn=Bi;!Bi&&(!kr(ea)||Ur(ea)&&!kr(ea.data))&&(hn=Xt.oes_element_index_uint?Rr:Cr),fr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Nr,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case xt:Li=ut;break;case Cr:case Or:Li=Cr;break;case Rr:case wr:Li=Rr;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Rr&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=cn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=rn),Yi===2&&(Ua=tn),Yi===3&&(Ua=cn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete Ta[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Nr,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=cn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=cn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||kr(Va)||Ur(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ia[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=xa[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Or?Ua*=2:(Yi===Rr||Yi===wr)&&(Ua*=4))),gn(Qa,Bi,Li,hn,Ha,Ua,Yi)}return di}return di(Na),di._reglType="elements",di._elements=Qa,di.subdata=function(Va,Bi){return Ma.subdata(Va,Bi),di},di.destroy=function(){zi(Qa)},di}return{create:Ei,createStream:yi,destroyStream:si,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof Ya?Na._elements:null},clear:function(){_t(Ta).forEach(zi)}}}var mr=new Float32Array(1),Ir=new Uint32Array(mr.buffer),va=5123;function Pa(it){for(var Xt=U.allocType(va,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,xa=oa>>13&1023;if(ma<-24)Xt[fr]=Ta;else if(ma<-14){var Ya=-14-ma;Xt[fr]=Ta+(xa+1024>>Ya)}else ma>15?Xt[fr]=Ta+31744:Xt[fr]=Ta+(ma+15<<10)+xa}return Xt}function ga(it){return Array.isArray(it)||kr(it)}var la=34467,ba=3553,Ai=34067,ki=34069,Ki=6408,Mn=6406,wn=6407,On=6409,En=6410,ao=32854,Co=32855,bo=36194,zs=32819,kn=32820,wo=33635,Zn=34042,go=6402,os=34041,ys=35904,jo=35906,Yn=36193,Gn=33776,Hn=33777,ss=33778,_s=33779,ps=35986,Ko=35987,Gi=34798,Pn=35840,qs=35841,bs=35842,lo=35843,Zo=36196,ws=5121,Hs=5123,il=5125,yn=5126,Po=10242,To=10243,Ws=10497,Ll=33071,uo=33648,Nl=10240,Ks=10241,Ts=9728,Ls=9729,Jo=9984,Es=9985,Ul=9986,lu=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Wc=37440,uu=37441,Pl=37443,ic=37444,Ou=33984,nl=[Jo,Ul,Es,lu],vl=[0,On,En,wn,Ki],As={};As[On]=As[Mn]=As[go]=1,As[os]=As[En]=2,As[wn]=As[ys]=3,As[Ki]=As[jo]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),jl=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),us=Xs("HTMLVideoElement"),bh=Object.keys(ot).concat([nc,jl,qu,fl,xh,us]),Ps=[];Ps[ws]=1,Ps[yn]=4,Ps[Yn]=2,Ps[Hs]=2,Ps[il]=4;var to=[];to[ao]=2,to[Co]=2,to[bo]=2,to[os]=4,to[Gn]=.5,to[Hn]=.5,to[ss]=1,to[_s]=1,to[ps]=.5,to[Ko]=1,to[Gi]=1,to[Pn]=.5,to[qs]=.25,to[bs]=.5,to[lo]=.25,to[Zo]=.5;function Xc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Xt=it.length;return!(Xt===0||!ga(it[0]))}function ql(it){return Object.prototype.toString.call(it)}function Mf(it){return ql(it)===nc}function Ac(it){return ql(it)===jl}function nf(it){return ql(it)===qu}function Ql(it){return ql(it)===fl}function Jf(it){return ql(it)===xh}function Of(it){return ql(it)===us}function of(it){if(!it)return!1;var Xt=ql(it);return bh.indexOf(Xt)>=0?!0:Xc(it)||Vu(it)||Ur(it)}function jc(it){return ot[Object.prototype.toString.call(it)]|0}function Bf(it,Xt){var fr=Xt.length;switch(it.type){case ws:case Hs:case il:case yn:var oa=U.allocType(it.type,fr);oa.set(Xt),it.data=oa;break;case Yn:it.data=Pa(Xt);break;default:}}function Nf(it,Xt){return U.allocType(it.type===Yn?yn:it.type,Xt)}function Gu(it,Xt){it.type===Yn?(it.data=Pa(Xt),U.freeType(Xt)):it.data=Xt}function Ef(it,Xt,fr,oa,Ta,ma){for(var xa=it.width,Ya=it.height,bi=it.channels,yi=xa*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=xa*bi*bi,bi/=2;return Ya}else return xa*fr*oa}function Zc(it,Xt,fr,oa,Ta,ma,xa){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Ws,clamp:Ll,mirror:uo},yi={nearest:Ts,linear:Ls},si=v({mipmap:lu,"nearest mipmap nearest":Jo,"linear mipmap nearest":Es,"nearest mipmap linear":Ul,"linear mipmap linear":lu},yi),gn={none:0,browser:ic},zi={uint8:ws,rgba4:zs,rgb565:wo,"rgb5 a1":kn},Ei={alpha:Mn,luminance:On,"luminance alpha":En,rgb:wn,rgba:Ki,rgba4:ao,"rgb5 a1":Co,rgb565:bo},Na={};Xt.ext_srgb&&(Ei.srgb=ys,Ei.srgba=jo),Xt.oes_texture_float&&(zi.float32=zi.float=yn),Xt.oes_texture_half_float&&(zi.float16=zi["half float"]=Yn),Xt.webgl_depth_texture&&(v(Ei,{depth:go,"depth stencil":os}),v(zi,{uint16:Hs,uint32:il,"depth stencil":Zn})),Xt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":Hn,"rgba s3tc dxt3":ss,"rgba s3tc dxt5":_s}),Xt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":ps,"rgba atc explicit alpha":Ko,"rgba atc interpolated alpha":Gi}),Xt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":bs,"rgba pvrtc 2bppv1":lo}),Xt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Zo);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(ke){var Qe=Na[ke];ea.indexOf(Qe)>=0&&(Ei[ke]=Qe)});var Ma=Object.keys(Ei);fr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(ke){var Qe=Ei[ke];Qa[Qe]=ke});var di=[];Object.keys(zi).forEach(function(ke){var Qe=zi[ke];di[Qe]=ke});var Va=[];Object.keys(yi).forEach(function(ke){var Qe=yi[ke];Va[Qe]=ke});var Bi=[];Object.keys(si).forEach(function(ke){var Qe=si[ke];Bi[Qe]=ke});var Li=[];Object.keys(bi).forEach(function(ke){var Qe=bi[ke];Li[Qe]=ke});var hn=Ma.reduce(function(ke,Qe){var vt=Ei[Qe];return vt===On||vt===Mn||vt===On||vt===En||vt===go||vt===os||Xt.ext_srgb&&(vt===ys||vt===jo)?ke[vt]=vt:vt===Co||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=wn,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ws,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 Ua(ke,Qe){ke.internalformat=Qe.internalformat,ke.format=Qe.format,ke.type=Qe.type,ke.compressed=Qe.compressed,ke.premultiplyAlpha=Qe.premultiplyAlpha,ke.flipY=Qe.flipY,ke.unpackAlignment=Qe.unpackAlignment,ke.colorSpace=Qe.colorSpace,ke.width=Qe.width,ke.height=Qe.height,ke.channels=Qe.channels}function Yi(ke,Qe){if(!(typeof Qe!="object"||!Qe)){if("premultiplyAlpha"in Qe&&(ke.premultiplyAlpha=Qe.premultiplyAlpha),"flipY"in Qe&&(ke.flipY=Qe.flipY),"alignment"in Qe&&(ke.unpackAlignment=Qe.alignment),"colorSpace"in Qe&&(ke.colorSpace=gn[Qe.colorSpace]),"type"in Qe){var vt=Qe.type;ke.type=zi[vt]}var qt=ke.width,br=ke.height,Br=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],br=Qe.shape[1],Qe.shape.length===3&&(Br=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=br=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(br=Qe.height),"channels"in Qe&&(Br=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=br|0,ke.channels=Br|0;var mt=!1;if("format"in Qe){var Mt=Qe.format,Ft=ke.internalformat=Ei[Mt];ke.format=hn[Ft],Mt in zi&&("type"in Qe||(ke.type=zi[Mt])),Mt in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=As[ke.format]:pr&&!mt&&ke.channels!==vl[ke.format]&&(ke.format=ke.internalformat=vl[ke.channels])}}function Ri(ke){it.pixelStorei(Wc,ke.flipY),it.pixelStorei(uu,ke.premultiplyAlpha),it.pixelStorei(Pl,ke.colorSpace),it.pixelStorei(dc,ke.unpackAlignment)}function Ti(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xi(ke,Qe){var vt=null;if(of(Qe)?vt=Qe:Qe&&(Yi(ke,Qe),"x"in Qe&&(ke.xOffset=Qe.x|0),"y"in Qe&&(ke.yOffset=Qe.y|0),of(Qe.data)&&(vt=Qe.data)),Qe.copy){var qt=Ta.viewportWidth,br=Ta.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||br-ke.yOffset,ke.needsCopy=!0}else if(!vt)ke.width=ke.width||1,ke.height=ke.height||1,ke.channels=ke.channels||4;else if(kr(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ws&&(ke.type=jc(vt));else if(Xc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ur(vt)){var Br=vt.data;!Array.isArray(Br)&&ke.type===ws&&(ke.type=jc(Br));var pr=vt.shape,mt=vt.stride,Mt,Ft,rr,hr,sr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),Mt=pr[0],Ft=pr[1],hr=mt[0],sr=mt[1],ke.alignment=1,ke.width=Mt,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=vl[rr],ke.needsFree=!0,Ef(ke,Br,hr,sr,dr,vt.offset)}else if(Mf(vt)||Ac(vt)||nf(vt))Mf(vt)||Ac(vt)?ke.element=vt:ke.element=vt.canvas,ke.width=ke.element.width,ke.height=ke.element.height,ke.channels=4;else if(Ql(vt))ke.element=vt,ke.width=vt.width,ke.height=vt.height,ke.channels=4;else if(Jf(vt))ke.element=vt,ke.width=vt.naturalWidth,ke.height=vt.naturalHeight,ke.channels=4;else if(Of(vt))ke.element=vt,ke.width=vt.videoWidth,ke.height=vt.videoHeight,ke.channels=4;else if(Vu(vt)){var lr=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ga(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Gt=Fe.shape(vt),Dr=1,Jr=0;Jr>=br,vt.height>>=br,xi(vt,qt[br]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var br=ke.wrapS,Br=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?br=Br=bi[pr]:Array.isArray(pr)&&(br=bi[pr[0]],Br=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;br=bi[mt]}if("wrapT"in Qe){var Mt=Qe.wrapT;Br=bi[Mt]}}if(ke.wrapS=br,ke.wrapT=Br,"anisotropic"in Qe){var Ft=Qe.anisotropic;ke.anisotropic=Qe.anisotropic}if("mipmap"in Qe){var rr=!1;switch(typeof Qe.mipmap){case"string":ke.mipmapHint=Ya[Qe.mipmap],ke.genMipmaps=!0,rr=!0;break;case"boolean":rr=ke.genMipmaps=Qe.mipmap;break;case"object":ke.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Qe)&&(ke.minFilter=Jo)}}function El(ke,Qe){it.texParameteri(Qe,Ks,ke.minFilter),it.texParameteri(Qe,Nl,ke.magFilter),it.texParameteri(Qe,Po,ke.wrapS),it.texParameteri(Qe,To,ke.wrapT),Xt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var ru=0,js={},pl=fr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Xn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=ru++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,xa.profile&&(this.stats={size:0})}function kl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Io(){var ke=bl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(ba,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),bl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete js[ke.id],ma.textureCount--}v(Xn.prototype,{bind:function(){var ke=this;ke.bindCount+=1;var Qe=ke.unit;if(Qe<0){for(var vt=0;vt0)continue;qt.unit=-1}bl[vt]=ke,Qe=vt;break}Qe>=pl,xa.profile&&ma.maxTextureUnits>sr)-rr,dr.height=dr.height||(vt.height>>sr)-hr,kl(vt),vn(dr,ba,rr,hr,sr),Io(),nn(dr),qt}function Br(pr,mt){var Mt=pr|0,Ft=mt|0||Mt;if(Mt===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=Mt,qt.height=vt.height=Ft,kl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=Mt>>rr,sr=Ft>>rr;if(!hr||!sr)break;it.texImage2D(ba,rr,vt.format,hr,sr,0,vt.format,vt.type,null)}return Io(),xa.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Mt,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=br,qt.resize=Br,qt._reglType="texture2d",qt._texture=vt,xa.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,br,Br){var pr=new Xn(Ai);js[pr.id]=pr,ma.cubeCount++;var mt=new Array(6);function Mt(hr,sr,dr,lr,Wt,ir){var Gt,Dr=pr.texInfo;for(hs.call(Dr),Gt=0;Gt<6;++Gt)mt[Gt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Gt=0;Gt<6;++Gt)Dn(mt[Gt],Jr,Jr)}else if(typeof hr=="object")if(sr)Wn(mt[0],hr),Wn(mt[1],sr),Wn(mt[2],dr),Wn(mt[3],lr),Wn(mt[4],Wt),Wn(mt[5],ir);else if(Al(Dr,hr),Yi(pr,hr),"faces"in hr){var ya=hr.faces;for(Gt=0;Gt<6;++Gt)Ua(mt[Gt],pr),Wn(mt[Gt],ya[Gt])}else for(Gt=0;Gt<6;++Gt)Wn(mt[Gt],hr);for(Ua(pr,mt[0]),Dr.genMipmaps?pr.mipmask=(mt[0].width<<1)-1:pr.mipmask=mt[0].mipmask,pr.internalformat=mt[0].internalformat,Mt.width=mt[0].width,Mt.height=mt[0].height,kl(pr),Gt=0;Gt<6;++Gt)Os(mt[Gt],ki+Gt);for(El(Dr,Ai),Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,Dr.genMipmaps,!0)),Mt.format=Qa[pr.internalformat],Mt.type=di[pr.type],Mt.mag=Va[Dr.magFilter],Mt.min=Bi[Dr.minFilter],Mt.wrapS=Li[Dr.wrapS],Mt.wrapT=Li[Dr.wrapT],Gt=0;Gt<6;++Gt)Xl(mt[Gt]);return Mt}function Ft(hr,sr,dr,lr,Wt){var ir=dr|0,Gt=lr|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,sr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Gt,kl(pr),vn(Jr,ki+hr,ir,Gt,Dr),Io(),nn(Jr),Mt}function rr(hr){var sr=hr|0;if(sr!==pr.width){Mt.width=pr.width=sr,Mt.height=pr.height=sr,kl(pr);for(var dr=0;dr<6;++dr)for(var lr=0;pr.mipmask>>lr;++lr)it.texImage2D(ki+dr,lr,pr.format,sr>>lr,sr>>lr,0,pr.format,pr.type,null);return Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(ke,Qe,vt,qt,br,Br),Mt.subimage=Ft,Mt.resize=rr,Mt._reglType="textureCube",Mt._texture=pr,xa.profile&&(Mt.stats=pr.stats),Mt.destroy=function(){pr.decRef()},Mt}function re(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var br=0;br<6;++br)it.texImage2D(ki+br,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);El(vt.texInfo,vt.target)})}function Ue(){for(var ke=0;ke=0?Xl=!0:bi.indexOf(hs)>=0&&(Xl=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(bl=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Os=Xn.depth:(ru=Xn.depth,xl=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?xl=Xn.stencil:(js=Xn.stencil,Os=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Os=xl=Xn.depthStencil:(pl=Xn.depthStencil,Os=!1,xl=!1))}var Io=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Io=ho.map(Na);else if(ho)Io=[Na(ho)];else for(Io=new Array(El),Cn=0;Cn0&&(nn.depth=xi[0].depth,nn.stencil=xi[0].stencil,nn.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](nn):xi[Ii]=Ua(nn)}return v(Xi,{width:Cn,height:Cn,color:hs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var Cn=Xi.color;for(Ii=0;Ii=Cn.byteLength?Dn.subdata(Cn):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=Ta.create(Ii,mf,!1,!0)),nn.buffer=Ta.getBuffer(Dn),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,Xi[Rn]=1}else Ta.getBuffer(Ii)?(nn.buffer=Ta.getBuffer(Ii),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):Ta.getBuffer(Ii.buffer)?(nn.buffer=Ta.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=_a[Ii.type]:nn.type=nn.buffer.dtype,nn.offset=(Ii.offset||0)|0,nn.stride=(Ii.stride||0)|0,nn.divisor=(Ii.divisor||0)|0,nn.state=1):"x"in Ii&&(nn.x=+Ii.x||0,nn.y=+Ii.y||0,nn.z=+Ii.z||0,nn.w=+Ii.w||0,nn.state=2)}for(var Wn=0;Wn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){Ta={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),Ta=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,Ta[ma]=fr[ma]^1549556828;var xa=Pi(oa.concat(Pc(Xt)),512+Xt.length*8);return Qt(Pi(Ta.concat(xa),768))}function xu(it){for(var Xt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,Ta=0;Ta>>4&15)+Xt.charAt(oa&15);return fr}function Lc(it){for(var Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,Ta=0;Tait.length*8?fr+=Xu:fr+=Xt.charAt(ma>>>6*(3-xa)&63);return fr}function $c(it,Xt){var fr=Xt.length,oa=Array(),Ta,ma,xa,Ya,bi=Array(Math.ceil(it.length/2));for(Ta=0;Ta0;){for(Ya=Array(),xa=0,Ta=0;Ta0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=xa,bi=Ya}var yi="";for(Ta=oa.length-1;Ta>=0;Ta--)yi+=Xt.charAt(oa[Ta]);var si=Math.ceil(it.length*8/(Math.log(Xt.length)/Math.log(2)));for(Ta=yi.length;Ta>>6&31,128|oa&63):oa<=65535?Xt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Xt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Xt}function Pc(it){for(var Xt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Xt}function Qt(it){for(var Xt="",fr=0;fr>5]>>>24-fr%32&255);return Xt}function xr(it,Xt){return it>>>Xt|it<<32-Xt}function aa(it,Xt){return it>>>Xt}function $r(it,Xt,fr){return it&Xt^~it&fr}function ka(it,Xt,fr){return it&Xt^it&fr^Xt&fr}function li(it){return xr(it,2)^xr(it,13)^xr(it,22)}function Ci(it){return xr(it,6)^xr(it,11)^xr(it,25)}function Hi(it){return xr(it,7)^xr(it,18)^aa(it,3)}function Qi(it){return xr(it,17)^xr(it,19)^aa(it,10)}var pn=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 Pi(it,Xt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Xt>>5]|=128<<24-Xt%32,it[(Xt+64>>9<<4)+15]=Xt,zi=0;zi>16)+(Xt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Sn(it){var Xt=it&&it.cache,fr=0,oa=[],Ta=[],ma=[];function xa(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return v(ea,{def:Qa,toString:function(){return mi([Ma.length>0?"var "+Ma.join(",")+";":"",mi(Na)])}})}function bi(){var Na=Ya(),ea=Ya(),Ma=Na.toString,Qa=ea.toString;function di(Va,Bi){ea(Va,Bi,"=",Na.def(Va,Bi),";")}return v(function(){Na.apply(Na,Ni(arguments))},{def:Na.def,entry:Na,exit:ea,save:di,set:function(Va,Bi,Li){di(Va,Bi),Na(Va,Bi,"=",Li,";")},toString:function(){return Ma()+Qa()}})}function yi(){var Na=mi(arguments),ea=bi(),Ma=bi(),Qa=ea.toString,di=Ma.toString;return v(ea,{then:function(){return ea.apply(ea,Ni(arguments)),this},else:function(){return Ma.apply(Ma,Ni(arguments)),this},toString:function(){var Va=di();return Va&&(Va="else{"+Va+"}"),mi(["if(",Na,"){",Qa(),"}",Va])}})}var si=Ya(),gn={};function zi(Na,ea){var Ma=[];function Qa(){var hn="a"+Ma.length;return Ma.push(hn),hn}ea=ea||0;for(var di=0;di[y.viewport.x,y.viewport.y,g.viewportWidth,g.viewportHeight]},attributes:{color:{buffer:T,offset:(g,y)=>y.offset*4,divisor:1},position:{buffer:m,offset:(g,y)=>y.offset*8,divisor:1},positionFract:{buffer:c,offset:(g,y)=>y.offset*8,divisor:1},error:{buffer:l,offset:(g,y)=>y.offset*16,divisor:1},direction:{buffer:x,stride:24,offset:0},lineOffset:{buffer:x,stride:24,offset:8},capOffset:{buffer:x,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:d,draw:p,destroy:u,regl:n,gl:h,canvas:h.canvas,groups:A}),E;function E(g){g?d(g):g===null&&u(),p()}function p(g){if(typeof g=="number")return b(g);g&&!Array.isArray(g)&&(g=[g]),n._refresh(),A.forEach((y,D)=>{if(y){if(g&&(g[D]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}b(D)}})}function b(g){typeof g=="number"&&(g=A[g]),g!=null&&g&&g.count&&g.color&&g.opacity&&g.positions&&g.positions.length>1&&(g.scaleRatio=[g.scale[0]*g.viewport.width,g.scale[1]*g.viewport.height],f(g),g.after&&g.after(g))}function d(g){if(!g)return;g.length!=null?typeof g[0]=="number"&&(g=[{positions:g}]):Array.isArray(g)||(g=[g]);let y=0,D=0;if(E.groups=A=g.map((F,N)=>{let O=A[N];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||(A[N]=O={id:N,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},F=e({},w,F)),S(O,F,[{lineWidth:L=>+L*.5,capSize:L=>+L*.5,opacity:parseFloat,errors:L=>(L=t(L),D+=L.length,L),positions:(L,U)=>(L=t(L,"float64"),U.count=Math.floor(L.length/2),U.bounds=v(L,2),U.offset=y,y+=U.count,L)},{color:(L,U)=>{let B=U.count;if(L||(L="transparent"),!Array.isArray(L)||typeof L[0]=="number"){let $=L;L=Array(B);for(let ue=0;ue{let W=U.bounds;return L||(L=W),U.scale=[1/(L[2]-L[0]),1/(L[3]-L[1])],U.translate=[-L[0],-L[1]],U.scaleFract=o(U.scale),U.translateFract=o(U.translate),L},viewport:L=>{let U;return Array.isArray(L)?U={x:L[0],y:L[1],width:L[2]-L[0],height:L[3]-L[1]}:L?(U={x:L.x||L.left||0,y:L.y||L.top||0},L.right?U.width=L.right-U.x:U.width=L.w||L.width||0,L.bottom?U.height=L.bottom-U.y:U.height=L.h||L.height||0):U={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},U}}]),O}),y||D){let F=A.reduce((U,B,W)=>U+(B?B.count:0),0),N=new Float64Array(F*2),O=new Uint8Array(F*4),L=new Float32Array(F*4);A.forEach((U,B)=>{if(!U)return;let{positions:W,count:$,offset:ue,color:ce,errors:de}=U;$&&(O.set(ce,ue*4),L.set(de,ue*4),N.set(W,ue*2))});var P=r(N);m(P);var z=o(N,P);c(z),T(O),l(L)}}function u(){m.destroy(),c.destroy(),T.destroy(),l.destroy(),x.destroy()}}}}),vq=He({"node_modules/unquote/index.js"(Z,q){var v=/[\'\"]/;q.exports=function(S){return S?(v.test(S.charAt(0))&&(S=S.substr(1)),v.test(S.charAt(S.length-1))&&(S=S.substr(0,S.length-1)),S):""}}}),i6=He({"node_modules/css-global-keywords/index.json"(Z,q){q.exports=["inherit","initial","unset"]}}),n6=He({"node_modules/css-system-font-keywords/index.json"(Z,q){q.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),o6=He({"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"]}}),s6=He({"node_modules/css-font-style-keywords/index.json"(Z,q){q.exports=["normal","italic","oblique"]}}),l6=He({"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"]}}),mq=He({"node_modules/parenthesis/index.js"(Z,q){"use strict";function v(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 h=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),f=[];function m(c,T,l){var x=t.push(c.slice(s[0].length,-s[1].length))-1;return f.push(x),o+x+o}t.forEach(function(c,T){for(var l,x=0;c!=l;)if(l=c,c=c.replace(h,m),x++>1e4)throw Error("References have circular dependency. Please, check them.");t[T]=c}),f=f.reverse(),t=t.map(function(c){return f.forEach(function(T){c=c.replace(new RegExp("(\\"+o+T+"\\"+o+")","g"),s[0]+"$1"+s[1])}),c})});var i=new RegExp("\\"+o+"([0-9]+)\\"+o);function n(s,h,f){for(var m=[],c,T=0;c=i.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");m.push(s.slice(0,c.index)),m.push(n(h[c[1]],h)),s=s.slice(c.index+c[0].length)}return m.push(s),m}return a?t:n(t[0],t)}function _(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(h,f){return Array.isArray(f)&&(f=f.reduce(s,"")),h+f},"");function n(s,h){if(M[h]==null)throw Error("Reference "+h+"is undefined");return M[h]}}function S(M,e){return Array.isArray(M)?_(M,e):v(M,e)}S.parse=v,S.stringify=_,q.exports=S}}),gq=He({"node_modules/string-split-by/index.js"(Z,q){"use strict";var v=mq();q.exports=function(S,M,e){if(S==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(h){return h.length===1&&(h=h+h),h}));var t=v.parse(S,{flat:!0,brackets:e.ignore}),r=t[0],o=r.split(M);if(e.escape){for(var a=[],i=0;i1&&Xt===fr&&(Xt==='"'||Xt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var Ta=it.split(".");if(Ta.length===1)return['"'+r(it)+'"'];for(var ma=[],xa=0;xa"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Xt=="string"?fr=document.querySelector(Xt):typeof Xt=="object"&&(x(Xt)?fr=Xt:w(Xt)?(ma=Xt,Ta=ma.canvas):("gl"in Xt?ma=Xt.gl:"canvas"in Xt?Ta=E(Xt.canvas):"container"in Xt&&(oa=E(Xt.container)),"attributes"in Xt&&(xa=Xt.attributes),"extensions"in Xt&&(Ya=A(Xt.extensions)),"optionalExtensions"in Xt&&(bi=A(Xt.optionalExtensions)),"onDone"in Xt&&(zi=Xt.onDone),"profile"in Xt&&(si=!!Xt.profile),"pixelRatio"in Xt&&(yi=+Xt.pixelRatio),"cachedCode"in Xt&&(gn=Xt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Ta=fr:oa=fr),!ma){if(!Ta){var Na=T(oa||document.body,zi,yi);if(!Na)return null;Ta=Na.canvas,Ei=Na.onDestroy}xa.premultipliedAlpha===void 0&&(xa.premultipliedAlpha=!0),ma=l(Ta,xa)}return ma?{gl:ma,canvas:Ta,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:gn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Xt){var fr={};function oa(xa){var Ya=xa.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var Ta=0;Ta65535)<<4,it>>>=Xt,fr=(it>255)<<3,it>>>=fr,Xt|=fr,fr=(it>15)<<2,it>>>=fr,Xt|=fr,fr=(it>3)<<1,it>>>=fr,Xt|=fr,Xt|it>>1}function L(){var it=d(8,function(){return[]});function Xt(ma){var xa=N(ma),Ya=it[O(xa)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(xa)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,xa){var Ya=null;switch(ma){case u:Ya=new Int8Array(Xt(xa),0,xa);break;case g:Ya=new Uint8Array(Xt(xa),0,xa);break;case y:Ya=new Int16Array(Xt(2*xa),0,xa);break;case D:Ya=new Uint16Array(Xt(2*xa),0,xa);break;case P:Ya=new Int32Array(Xt(4*xa),0,xa);break;case z:Ya=new Uint32Array(Xt(4*xa),0,xa);break;case F:Ya=new Float32Array(Xt(4*xa),0,xa);break;default:return null}return Ya.length!==xa?Ya.subarray(0,xa):Ya}function Ta(ma){fr(ma.buffer)}return{alloc:Xt,free:fr,allocType:oa,freeType:Ta}}var U=L();U.zero=L();var B=3408,W=3410,$=3411,ue=3412,ce=3413,de=3414,Y=3415,X=33901,Q=33902,V=3379,le=3386,ae=34921,j=36347,ee=36348,te=35661,pe=35660,we=34930,Se=36349,Re=34076,Pe=34024,je=7936,at=7937,nt=7938,tt=35724,Ve=34047,he=36063,se=34852,ne=3553,Ce=34067,Ze=34069,rt=33984,Je=6408,St=5126,kt=5121,Bt=36160,Vt=36053,Ar=36064,vr=16384,qr=function(it,Xt){var fr=1;Xt.ext_texture_filter_anisotropic&&(fr=it.getParameter(Ve));var oa=1,Ta=1;Xt.webgl_draw_buffers&&(oa=it.getParameter(se),Ta=it.getParameter(he));var ma=!!Xt.oes_texture_float;if(ma){var xa=it.createTexture();it.bindTexture(ne,xa),it.texImage2D(ne,0,Je,1,1,0,Je,St,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Bt,Ya),it.framebufferTexture2D(Bt,Ar,ne,xa,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Bt)!==Vt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(vr);var bi=U.allocType(St,4);it.readPixels(0,0,1,1,Je,St,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(xa),ma=bi[0]===1),U.freeType(bi)}}var yi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),si=!0;if(!yi){var gn=it.createTexture(),zi=U.allocType(kt,36);it.activeTexture(rt),it.bindTexture(Ce,gn),it.texImage2D(Ze,0,Je,3,3,0,Je,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(W),it.getParameter($),it.getParameter(ue),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(Y),subpixelBits:it.getParameter(B),extensions:Object.keys(Xt).filter(function(Ei){return!!Xt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:Ta,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(Q),maxViewportDims:it.getParameter(le),maxCombinedTextureUnits:it.getParameter(te),maxCubeMapSize:it.getParameter(Re),maxRenderbufferSize:it.getParameter(Pe),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(V),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(je),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},kr=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function Ur(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||kr(it.data))}var _t=function(it){return Object.keys(it).map(function(Xt){return it[Xt]})},Fe={shape:st,flatten:Ke};function Ye(it,Xt,fr){for(var oa=0;oa0){var hn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua0){if(typeof Ha[0]=="number"){var Ti=U.allocType(Va.dtype,Ha.length);Fr(Ti,Ha),Li(Ti,Yi),U.freeType(Ti)}else if(Array.isArray(Ha[0])||kr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ur(Ha)){Ri=Ha.shape;var Xi=Ha.stride,vn=0,Rn=0,Ii=0,nn=0;Ri.length===1?(vn=Ri[0],Rn=1,Ii=Xi[0],nn=0):Ri.length===2&&(vn=Ri[0],Rn=Ri[1],Ii=Xi[0],nn=Xi[1]);var Ln=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(Ln,vn*Rn);ta(Dn,Ha.data,vn,Rn,Ii,nn,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=hn,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Xt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof xa?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ia={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rn=0,tn=1,cn=4,xt=5120,ut=5121,Or=5122,Cr=5123,wr=5124,Rr=5125,Nr=34963,Hr=35040,gt=35044;function Kt(it,Xt,fr,oa){var Ta={},ma=0,xa={uint8:ut,uint16:Cr};Xt.oes_element_index_uint&&(xa.uint32=Rr);function Ya(Na){this.id=ma++,Ta[this.id]=this,this.buffer=Na,this.primType=cn,this.vertCount=0,this.type=0}Ya.prototype.bind=function(){this.buffer.bind()};var bi=[];function yi(Na){var ea=bi.pop();return ea||(ea=new Ya(fr.create(null,Nr,!0,!1)._buffer)),gn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function gn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var hn=Bi;!Bi&&(!kr(ea)||Ur(ea)&&!kr(ea.data))&&(hn=Xt.oes_element_index_uint?Rr:Cr),fr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Nr,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case xt:Li=ut;break;case Cr:case Or:Li=Cr;break;case Rr:case wr:Li=Rr;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Rr&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=cn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=rn),Yi===2&&(Ua=tn),Yi===3&&(Ua=cn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete Ta[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Nr,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=cn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=cn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||kr(Va)||Ur(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ia[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=xa[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Or?Ua*=2:(Yi===Rr||Yi===wr)&&(Ua*=4))),gn(Qa,Bi,Li,hn,Ha,Ua,Yi)}return di}return di(Na),di._reglType="elements",di._elements=Qa,di.subdata=function(Va,Bi){return Ma.subdata(Va,Bi),di},di.destroy=function(){zi(Qa)},di}return{create:Ei,createStream:yi,destroyStream:si,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof Ya?Na._elements:null},clear:function(){_t(Ta).forEach(zi)}}}var mr=new Float32Array(1),Ir=new Uint32Array(mr.buffer),va=5123;function Pa(it){for(var Xt=U.allocType(va,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,xa=oa>>13&1023;if(ma<-24)Xt[fr]=Ta;else if(ma<-14){var Ya=-14-ma;Xt[fr]=Ta+(xa+1024>>Ya)}else ma>15?Xt[fr]=Ta+31744:Xt[fr]=Ta+(ma+15<<10)+xa}return Xt}function ga(it){return Array.isArray(it)||kr(it)}var la=34467,ba=3553,Ai=34067,ki=34069,Ki=6408,En=6406,Tn=6407,On=6409,kn=6410,ao=32854,Co=32855,bo=36194,zs=32819,Cn=32820,wo=33635,Zn=34042,go=6402,os=34041,ys=35904,jo=35906,Yn=36193,Gn=33776,Hn=33777,ss=33778,_s=33779,ps=35986,Ko=35987,Gi=34798,Pn=35840,qs=35841,bs=35842,lo=35843,Zo=36196,ws=5121,Hs=5123,il=5125,yn=5126,Po=10242,To=10243,Ws=10497,Ll=33071,uo=33648,Nl=10240,Ks=10241,Ts=9728,Ls=9729,Jo=9984,Es=9985,Ul=9986,lu=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Wc=37440,uu=37441,Pl=37443,ic=37444,Ou=33984,nl=[Jo,Ul,Es,lu],vl=[0,On,kn,Tn,Ki],As={};As[On]=As[En]=As[go]=1,As[os]=As[kn]=2,As[Tn]=As[ys]=3,As[Ki]=As[jo]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),jl=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),us=Xs("HTMLVideoElement"),bh=Object.keys(ot).concat([nc,jl,qu,fl,xh,us]),Ps=[];Ps[ws]=1,Ps[yn]=4,Ps[Yn]=2,Ps[Hs]=2,Ps[il]=4;var to=[];to[ao]=2,to[Co]=2,to[bo]=2,to[os]=4,to[Gn]=.5,to[Hn]=.5,to[ss]=1,to[_s]=1,to[ps]=.5,to[Ko]=1,to[Gi]=1,to[Pn]=.5,to[qs]=.25,to[bs]=.5,to[lo]=.25,to[Zo]=.5;function Xc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Xt=it.length;return!(Xt===0||!ga(it[0]))}function ql(it){return Object.prototype.toString.call(it)}function Mf(it){return ql(it)===nc}function Ac(it){return ql(it)===jl}function nf(it){return ql(it)===qu}function Ql(it){return ql(it)===fl}function Jf(it){return ql(it)===xh}function Of(it){return ql(it)===us}function of(it){if(!it)return!1;var Xt=ql(it);return bh.indexOf(Xt)>=0?!0:Xc(it)||Vu(it)||Ur(it)}function jc(it){return ot[Object.prototype.toString.call(it)]|0}function Bf(it,Xt){var fr=Xt.length;switch(it.type){case ws:case Hs:case il:case yn:var oa=U.allocType(it.type,fr);oa.set(Xt),it.data=oa;break;case Yn:it.data=Pa(Xt);break;default:}}function Nf(it,Xt){return U.allocType(it.type===Yn?yn:it.type,Xt)}function Gu(it,Xt){it.type===Yn?(it.data=Pa(Xt),U.freeType(Xt)):it.data=Xt}function Ef(it,Xt,fr,oa,Ta,ma){for(var xa=it.width,Ya=it.height,bi=it.channels,yi=xa*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=xa*bi*bi,bi/=2;return Ya}else return xa*fr*oa}function Zc(it,Xt,fr,oa,Ta,ma,xa){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Ws,clamp:Ll,mirror:uo},yi={nearest:Ts,linear:Ls},si=v({mipmap:lu,"nearest mipmap nearest":Jo,"linear mipmap nearest":Es,"nearest mipmap linear":Ul,"linear mipmap linear":lu},yi),gn={none:0,browser:ic},zi={uint8:ws,rgba4:zs,rgb565:wo,"rgb5 a1":Cn},Ei={alpha:En,luminance:On,"luminance alpha":kn,rgb:Tn,rgba:Ki,rgba4:ao,"rgb5 a1":Co,rgb565:bo},Na={};Xt.ext_srgb&&(Ei.srgb=ys,Ei.srgba=jo),Xt.oes_texture_float&&(zi.float32=zi.float=yn),Xt.oes_texture_half_float&&(zi.float16=zi["half float"]=Yn),Xt.webgl_depth_texture&&(v(Ei,{depth:go,"depth stencil":os}),v(zi,{uint16:Hs,uint32:il,"depth stencil":Zn})),Xt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":Hn,"rgba s3tc dxt3":ss,"rgba s3tc dxt5":_s}),Xt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":ps,"rgba atc explicit alpha":Ko,"rgba atc interpolated alpha":Gi}),Xt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":bs,"rgba pvrtc 2bppv1":lo}),Xt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Zo);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(ke){var Qe=Na[ke];ea.indexOf(Qe)>=0&&(Ei[ke]=Qe)});var Ma=Object.keys(Ei);fr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(ke){var Qe=Ei[ke];Qa[Qe]=ke});var di=[];Object.keys(zi).forEach(function(ke){var Qe=zi[ke];di[Qe]=ke});var Va=[];Object.keys(yi).forEach(function(ke){var Qe=yi[ke];Va[Qe]=ke});var Bi=[];Object.keys(si).forEach(function(ke){var Qe=si[ke];Bi[Qe]=ke});var Li=[];Object.keys(bi).forEach(function(ke){var Qe=bi[ke];Li[Qe]=ke});var hn=Ma.reduce(function(ke,Qe){var vt=Ei[Qe];return vt===On||vt===En||vt===On||vt===kn||vt===go||vt===os||Xt.ext_srgb&&(vt===ys||vt===jo)?ke[vt]=vt:vt===Co||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=Tn,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ws,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 Ua(ke,Qe){ke.internalformat=Qe.internalformat,ke.format=Qe.format,ke.type=Qe.type,ke.compressed=Qe.compressed,ke.premultiplyAlpha=Qe.premultiplyAlpha,ke.flipY=Qe.flipY,ke.unpackAlignment=Qe.unpackAlignment,ke.colorSpace=Qe.colorSpace,ke.width=Qe.width,ke.height=Qe.height,ke.channels=Qe.channels}function Yi(ke,Qe){if(!(typeof Qe!="object"||!Qe)){if("premultiplyAlpha"in Qe&&(ke.premultiplyAlpha=Qe.premultiplyAlpha),"flipY"in Qe&&(ke.flipY=Qe.flipY),"alignment"in Qe&&(ke.unpackAlignment=Qe.alignment),"colorSpace"in Qe&&(ke.colorSpace=gn[Qe.colorSpace]),"type"in Qe){var vt=Qe.type;ke.type=zi[vt]}var qt=ke.width,br=ke.height,Br=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],br=Qe.shape[1],Qe.shape.length===3&&(Br=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=br=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(br=Qe.height),"channels"in Qe&&(Br=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=br|0,ke.channels=Br|0;var mt=!1;if("format"in Qe){var Mt=Qe.format,Ft=ke.internalformat=Ei[Mt];ke.format=hn[Ft],Mt in zi&&("type"in Qe||(ke.type=zi[Mt])),Mt in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=As[ke.format]:pr&&!mt&&ke.channels!==vl[ke.format]&&(ke.format=ke.internalformat=vl[ke.channels])}}function Ri(ke){it.pixelStorei(Wc,ke.flipY),it.pixelStorei(uu,ke.premultiplyAlpha),it.pixelStorei(Pl,ke.colorSpace),it.pixelStorei(dc,ke.unpackAlignment)}function Ti(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xi(ke,Qe){var vt=null;if(of(Qe)?vt=Qe:Qe&&(Yi(ke,Qe),"x"in Qe&&(ke.xOffset=Qe.x|0),"y"in Qe&&(ke.yOffset=Qe.y|0),of(Qe.data)&&(vt=Qe.data)),Qe.copy){var qt=Ta.viewportWidth,br=Ta.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||br-ke.yOffset,ke.needsCopy=!0}else if(!vt)ke.width=ke.width||1,ke.height=ke.height||1,ke.channels=ke.channels||4;else if(kr(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ws&&(ke.type=jc(vt));else if(Xc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ur(vt)){var Br=vt.data;!Array.isArray(Br)&&ke.type===ws&&(ke.type=jc(Br));var pr=vt.shape,mt=vt.stride,Mt,Ft,rr,hr,sr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),Mt=pr[0],Ft=pr[1],hr=mt[0],sr=mt[1],ke.alignment=1,ke.width=Mt,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=vl[rr],ke.needsFree=!0,Ef(ke,Br,hr,sr,dr,vt.offset)}else if(Mf(vt)||Ac(vt)||nf(vt))Mf(vt)||Ac(vt)?ke.element=vt:ke.element=vt.canvas,ke.width=ke.element.width,ke.height=ke.element.height,ke.channels=4;else if(Ql(vt))ke.element=vt,ke.width=vt.width,ke.height=vt.height,ke.channels=4;else if(Jf(vt))ke.element=vt,ke.width=vt.naturalWidth,ke.height=vt.naturalHeight,ke.channels=4;else if(Of(vt))ke.element=vt,ke.width=vt.videoWidth,ke.height=vt.videoHeight,ke.channels=4;else if(Vu(vt)){var lr=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ga(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Gt=Fe.shape(vt),Dr=1,Jr=0;Jr>=br,vt.height>>=br,xi(vt,qt[br]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var br=ke.wrapS,Br=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?br=Br=bi[pr]:Array.isArray(pr)&&(br=bi[pr[0]],Br=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;br=bi[mt]}if("wrapT"in Qe){var Mt=Qe.wrapT;Br=bi[Mt]}}if(ke.wrapS=br,ke.wrapT=Br,"anisotropic"in Qe){var Ft=Qe.anisotropic;ke.anisotropic=Qe.anisotropic}if("mipmap"in Qe){var rr=!1;switch(typeof Qe.mipmap){case"string":ke.mipmapHint=Ya[Qe.mipmap],ke.genMipmaps=!0,rr=!0;break;case"boolean":rr=ke.genMipmaps=Qe.mipmap;break;case"object":ke.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Qe)&&(ke.minFilter=Jo)}}function El(ke,Qe){it.texParameteri(Qe,Ks,ke.minFilter),it.texParameteri(Qe,Nl,ke.magFilter),it.texParameteri(Qe,Po,ke.wrapS),it.texParameteri(Qe,To,ke.wrapT),Xt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var ru=0,js={},pl=fr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Xn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=ru++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,xa.profile&&(this.stats={size:0})}function kl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Io(){var ke=bl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(ba,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),bl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete js[ke.id],ma.textureCount--}v(Xn.prototype,{bind:function(){var ke=this;ke.bindCount+=1;var Qe=ke.unit;if(Qe<0){for(var vt=0;vt0)continue;qt.unit=-1}bl[vt]=ke,Qe=vt;break}Qe>=pl,xa.profile&&ma.maxTextureUnits>sr)-rr,dr.height=dr.height||(vt.height>>sr)-hr,kl(vt),vn(dr,ba,rr,hr,sr),Io(),nn(dr),qt}function Br(pr,mt){var Mt=pr|0,Ft=mt|0||Mt;if(Mt===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=Mt,qt.height=vt.height=Ft,kl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=Mt>>rr,sr=Ft>>rr;if(!hr||!sr)break;it.texImage2D(ba,rr,vt.format,hr,sr,0,vt.format,vt.type,null)}return Io(),xa.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Mt,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=br,qt.resize=Br,qt._reglType="texture2d",qt._texture=vt,xa.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,br,Br){var pr=new Xn(Ai);js[pr.id]=pr,ma.cubeCount++;var mt=new Array(6);function Mt(hr,sr,dr,lr,Wt,ir){var Gt,Dr=pr.texInfo;for(hs.call(Dr),Gt=0;Gt<6;++Gt)mt[Gt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Gt=0;Gt<6;++Gt)Dn(mt[Gt],Jr,Jr)}else if(typeof hr=="object")if(sr)Wn(mt[0],hr),Wn(mt[1],sr),Wn(mt[2],dr),Wn(mt[3],lr),Wn(mt[4],Wt),Wn(mt[5],ir);else if(Al(Dr,hr),Yi(pr,hr),"faces"in hr){var ya=hr.faces;for(Gt=0;Gt<6;++Gt)Ua(mt[Gt],pr),Wn(mt[Gt],ya[Gt])}else for(Gt=0;Gt<6;++Gt)Wn(mt[Gt],hr);for(Ua(pr,mt[0]),Dr.genMipmaps?pr.mipmask=(mt[0].width<<1)-1:pr.mipmask=mt[0].mipmask,pr.internalformat=mt[0].internalformat,Mt.width=mt[0].width,Mt.height=mt[0].height,kl(pr),Gt=0;Gt<6;++Gt)Os(mt[Gt],ki+Gt);for(El(Dr,Ai),Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,Dr.genMipmaps,!0)),Mt.format=Qa[pr.internalformat],Mt.type=di[pr.type],Mt.mag=Va[Dr.magFilter],Mt.min=Bi[Dr.minFilter],Mt.wrapS=Li[Dr.wrapS],Mt.wrapT=Li[Dr.wrapT],Gt=0;Gt<6;++Gt)Xl(mt[Gt]);return Mt}function Ft(hr,sr,dr,lr,Wt){var ir=dr|0,Gt=lr|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,sr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Gt,kl(pr),vn(Jr,ki+hr,ir,Gt,Dr),Io(),nn(Jr),Mt}function rr(hr){var sr=hr|0;if(sr!==pr.width){Mt.width=pr.width=sr,Mt.height=pr.height=sr,kl(pr);for(var dr=0;dr<6;++dr)for(var lr=0;pr.mipmask>>lr;++lr)it.texImage2D(ki+dr,lr,pr.format,sr>>lr,sr>>lr,0,pr.format,pr.type,null);return Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(ke,Qe,vt,qt,br,Br),Mt.subimage=Ft,Mt.resize=rr,Mt._reglType="textureCube",Mt._texture=pr,xa.profile&&(Mt.stats=pr.stats),Mt.destroy=function(){pr.decRef()},Mt}function re(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var br=0;br<6;++br)it.texImage2D(ki+br,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);El(vt.texInfo,vt.target)})}function Ue(){for(var ke=0;ke=0?Xl=!0:bi.indexOf(hs)>=0&&(Xl=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(bl=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Os=Xn.depth:(ru=Xn.depth,xl=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?xl=Xn.stencil:(js=Xn.stencil,Os=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Os=xl=Xn.depthStencil:(pl=Xn.depthStencil,Os=!1,xl=!1))}var Io=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Io=ho.map(Na);else if(ho)Io=[Na(ho)];else for(Io=new Array(El),Ln=0;Ln0&&(nn.depth=xi[0].depth,nn.stencil=xi[0].stencil,nn.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](nn):xi[Ii]=Ua(nn)}return v(Xi,{width:Ln,height:Ln,color:hs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var Ln=Xi.color;for(Ii=0;Ii=Ln.byteLength?Dn.subdata(Ln):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=Ta.create(Ii,mf,!1,!0)),nn.buffer=Ta.getBuffer(Dn),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,Xi[Rn]=1}else Ta.getBuffer(Ii)?(nn.buffer=Ta.getBuffer(Ii),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):Ta.getBuffer(Ii.buffer)?(nn.buffer=Ta.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=_a[Ii.type]:nn.type=nn.buffer.dtype,nn.offset=(Ii.offset||0)|0,nn.stride=(Ii.stride||0)|0,nn.divisor=(Ii.divisor||0)|0,nn.state=1):"x"in Ii&&(nn.x=+Ii.x||0,nn.y=+Ii.y||0,nn.z=+Ii.z||0,nn.w=+Ii.w||0,nn.state=2)}for(var Wn=0;Wn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){Ta={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),Ta=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,Ta[ma]=fr[ma]^1549556828;var xa=Pi(oa.concat(Pc(Xt)),512+Xt.length*8);return Qt(Pi(Ta.concat(xa),768))}function xu(it){for(var Xt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,Ta=0;Ta>>4&15)+Xt.charAt(oa&15);return fr}function Lc(it){for(var Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,Ta=0;Tait.length*8?fr+=Xu:fr+=Xt.charAt(ma>>>6*(3-xa)&63);return fr}function $c(it,Xt){var fr=Xt.length,oa=Array(),Ta,ma,xa,Ya,bi=Array(Math.ceil(it.length/2));for(Ta=0;Ta0;){for(Ya=Array(),xa=0,Ta=0;Ta0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=xa,bi=Ya}var yi="";for(Ta=oa.length-1;Ta>=0;Ta--)yi+=Xt.charAt(oa[Ta]);var si=Math.ceil(it.length*8/(Math.log(Xt.length)/Math.log(2)));for(Ta=yi.length;Ta>>6&31,128|oa&63):oa<=65535?Xt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Xt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Xt}function Pc(it){for(var Xt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Xt}function Qt(it){for(var Xt="",fr=0;fr>5]>>>24-fr%32&255);return Xt}function xr(it,Xt){return it>>>Xt|it<<32-Xt}function aa(it,Xt){return it>>>Xt}function $r(it,Xt,fr){return it&Xt^~it&fr}function ka(it,Xt,fr){return it&Xt^it&fr^Xt&fr}function li(it){return xr(it,2)^xr(it,13)^xr(it,22)}function Ci(it){return xr(it,6)^xr(it,11)^xr(it,25)}function Hi(it){return xr(it,7)^xr(it,18)^aa(it,3)}function Qi(it){return xr(it,17)^xr(it,19)^aa(it,10)}var pn=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 Pi(it,Xt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Xt>>5]|=128<<24-Xt%32,it[(Xt+64>>9<<4)+15]=Xt,zi=0;zi>16)+(Xt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Mn(it){var Xt=it&&it.cache,fr=0,oa=[],Ta=[],ma=[];function xa(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return v(ea,{def:Qa,toString:function(){return mi([Ma.length>0?"var "+Ma.join(",")+";":"",mi(Na)])}})}function bi(){var Na=Ya(),ea=Ya(),Ma=Na.toString,Qa=ea.toString;function di(Va,Bi){ea(Va,Bi,"=",Na.def(Va,Bi),";")}return v(function(){Na.apply(Na,Ni(arguments))},{def:Na.def,entry:Na,exit:ea,save:di,set:function(Va,Bi,Li){di(Va,Bi),Na(Va,Bi,"=",Li,";")},toString:function(){return Ma()+Qa()}})}function yi(){var Na=mi(arguments),ea=bi(),Ma=bi(),Qa=ea.toString,di=Ma.toString;return v(ea,{then:function(){return ea.apply(ea,Ni(arguments)),this},else:function(){return Ma.apply(Ma,Ni(arguments)),this},toString:function(){var Va=di();return Va&&(Va="else{"+Va+"}"),mi(["if(",Na,"){",Qa(),"}",Va])}})}var si=Ya(),gn={};function zi(Na,ea){var Ma=[];function Qa(){var hn="a"+Ma.length;return Ma.push(hn),hn}ea=ea||0;for(var di=0;di":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},za={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:dt};function fi(it){return Array.isArray(it)||kr(it)||Ur(it)}function ni(it){return it.sort(function(Xt,fr){return Xt===Me?-1:fr===Me?1:Xt=1,oa>=2,Xt)}else if(fr===ks){var Ta=it.data;return new La(Ta.thisDep,Ta.contextDep,Ta.propDep,Xt)}else{if(fr===rl)return new La(!1,!1,!1,Xt);if(fr===Ns){for(var ma=!1,xa=!1,Ya=!1,bi=0;bi=1&&(xa=!0),si>=2&&(Ya=!0)}else yi.type===ks&&(ma=ma||yi.data.thisDep,xa=xa||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,xa,Ya,Xt)}else return new La(fr===Qo,fr===yo,fr===un,Xt)}}var In=new La(!1,!1,!1,function(){});function Jn(it,Xt,fr,oa,Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=Mt}function xi(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),Array.isArray(Ft)?(Li[rr]=Ft.slice(),hn[rr]=Ft.slice()):Li[rr]=hn[rr]=Ft,Yi[rr]=Mt}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(Ss,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(yl,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Ro,"depthFunc",wa),xi(Js,"depthRange",[0,1]),xi(Fs,"depthMask",!0),xi(cu,cu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,An),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(fo,Bn),xi(Fo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Oe,"stencilOpSeparate",[me,zt,zt,zt]),xi(I,"stencilOpSeparate",[De,zt,zt,zt]),Ti(ie,on),xi(Te,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Me,Me,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var vn={gl:it,context:zi,strings:Xt,next:hn,current:Li,draw:gn,elements:ma,buffer:Ta,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ia,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:_a,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=d(oa.maxDrawbuffers,function(mt){return mt===0?[0]:d(mt,function(Mt){return Ja+Mt})}));var Ii=0;function nn(){var mt=Sn({cache:Na}),Mt=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=Mt(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var sr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(sr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var lr=mt.constants={};Object.keys(Rn).forEach(function(ir){lr[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Gt){switch(Gt.type){case Tn:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(Mt(Gt.data),".call(",Dr.slice(0,Math.max(Gt.data.length+1,4)),")");case un:return ir.def(hr.props,Gt.data);case yo:return ir.def(hr.context,Gt.data);case Qo:return ir.def("this",Gt.data);case ks:return Gt.data.append(mt,ir),Gt.data.ref;case rl:return Gt.data.toString();case Ns:return Gt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Gt=Xt.id(ir);if(Gt in Wt)return Wt[Gt];var Dr=yi.scope[Gt];Dr||(Dr=yi.scope[Gt]=new Ma);var Jr=Wt[Gt]=Mt(Dr);return Jr},mt}function Cn(mt){var Mt=mt.static,Ft=mt.dynamic,rr;if(ze in Mt){var hr=!!Mt[ze];rr=an(function(dr,lr){return hr}),rr.enable=hr}else if(ze in Ft){var sr=Ft[ze];rr=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}return rr}function Dn(mt,Mt){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),an(function(dr,lr){var Wt=dr.link(hr),ir=dr.shared;lr.set(ir.framebuffer,".next",Wt);var Gt=ir.context;return lr.set(Gt,"."+pt,Wt+".width"),lr.set(Gt,"."+Et,Wt+".height"),Wt})):an(function(dr,lr){var Wt=dr.shared;lr.set(Wt.framebuffer,".next","null");var ir=Wt.context;return lr.set(ir,"."+pt,ir+"."+yr),lr.set(ir,"."+Et,ir+"."+Er),"null"})}else if(ht in rr){var sr=rr[ht];return dn(sr,function(dr,lr){var Wt=dr.invoke(lr,sr),ir=dr.shared,Gt=ir.framebuffer,Dr=lr.def(Gt,".getFramebuffer(",Wt,")");lr.set(Gt,".next",Dr);var Jr=ir.context;return lr.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),lr.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Wn(mt,Mt,Ft){var rr=mt.static,hr=mt.dynamic;function sr(Wt){if(Wt in rr){var ir=rr[Wt],Gt=!0,Dr=ir.x|0,Jr=ir.y|0,ya,vi;return"width"in ir?ya=ir.width|0:Gt=!1,"height"in ir?vi=ir.height|0:Gt=!1,new La(!Gt&&Mt&&Mt.thisDep,!Gt&&Mt&&Mt.contextDep,!Gt&&Mt&&Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ya;"width"in ir||(_i=Fi.def(ui,".",pt,"-",Dr));var Si=vi;return"height"in ir||(Si=Fi.def(ui,".",Et,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Wt in hr){var Ga=hr[Wt],ai=dn(Ga,function(Zi,Fi){var ui=Zi.invoke(Fi,Ga),_i=Zi.shared.context,Si=Fi.def(ui,".x|0"),Ui=Fi.def(ui,".y|0"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,fn,_o]});return Mt&&(ai.thisDep=ai.thisDep||Mt.thisDep,ai.contextDep=ai.contextDep||Mt.contextDep,ai.propDep=ai.propDep||Mt.propDep),ai}else return Mt?new La(Mt.thisDep,Mt.contextDep,Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=sr(Me);if(dr){var lr=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Gt=lr.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Gt[2]),ir.set(Dr,"."+Dt,Gt[3]),Gt})}return{viewport:dr,scissor_box:sr(Te)}}function Os(mt,Mt){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(Mt.dynamic).length>0)return null;var hr=Mt.static,sr=Object.keys(hr);if(sr.length>0&&typeof hr[sr[0]]=="number"){for(var dr=[],lr=0;lr"+Si+"?"+Gt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ya,"(",Gt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Gt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Gt,".buffer);","}",Fi,'="type" in ',Gt,"?",Jr.glTypes,"[",Gt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Gt,".normalized;");function ui(_i){ir(Ga[_i],"=",Gt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[sr]=dn(dr,lr)}),hr}function El(mt){var Mt=mt.static,Ft=mt.dynamic,rr={};return Object.keys(Mt).forEach(function(hr){var sr=Mt[hr];rr[hr]=an(function(dr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:dr.link(sr)})}),Object.keys(Ft).forEach(function(hr){var sr=Ft[hr];rr[hr]=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}),rr}function ru(mt,Mt,Ft,rr,hr){var sr=mt.static,dr=mt.dynamic,lr=Os(mt,Mt),Wt=Dn(mt,hr),ir=Wn(mt,Wt,hr),Gt=ho(mt,hr),Dr=Xl(mt,hr),Jr=xl(mt,hr,lr);function ya(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ya(Me),ya(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Gt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Cn(mt,hr),Ga.uniforms=hs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Gt.vao,!Ga.drawVAO&&Jr.program&&!lr&&fr.angle_instanced_arrays&&Gt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=Mt.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Gt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return lr?Ga.useVAO=!0:Ga.attributes=Al(Mt,hr),Ga.context=El(rr,hr),Ga}function js(mt,Mt,Ft){var rr=mt.shared,hr=rr.context,sr=mt.scope();Object.keys(Ft).forEach(function(dr){Mt.save(hr,"."+dr);var lr=Ft[dr],Wt=lr.append(mt,Mt);Array.isArray(Wt)?sr(hr,".",dr,"=[",Wt.join(),"];"):sr(hr,".",dr,"=",Wt,";")}),Mt(sr)}function pl(mt,Mt,Ft,rr){var hr=mt.shared,sr=hr.gl,dr=hr.framebuffer,lr;Va&&(lr=Mt.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Gt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,Mt):Dr=Mt.def(dr,".next"),rr||Mt("if(",Dr,"!==",dr,".cur){"),Mt("if(",Dr,"){",sr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&Mt(lr,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),Mt("}else{",sr,".bindFramebuffer(",pa,",null);"),Va&&Mt(lr,".drawBuffersWEBGL(",Gt,");"),Mt("}",dr,".cur=",Dr,";"),rr||Mt("}")}function bl(mt,Mt,Ft){var rr=mt.shared,hr=rr.gl,sr=mt.current,dr=mt.next,lr=rr.current,Wt=rr.next,ir=mt.cond(lr,".dirty");Ha.forEach(function(Gt){var Dr=Ri(Gt);if(!(Dr in Ft.state)){var Jr,ya;if(Dr in dr){Jr=dr[Dr],ya=sr[Dr];var vi=d(Li[Dr].length,function(ai){return ir.def(Jr,"[",ai,"]")});ir(mt.cond(vi.map(function(ai,Zi){return ai+"!=="+ya+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ya+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",lr,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),lr,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(lr,".dirty=false;"),Mt(ir)}function Xn(mt,Mt,Ft,rr){var hr=mt.shared,sr=mt.current,dr=hr.current,lr=hr.gl,Wt;ni(Object.keys(Ft)).forEach(function(ir){var Gt=Ft[ir];if(!(rr&&!rr(Gt))){var Dr=Gt.append(mt,Mt);if(Ua[ir]){var Jr=Ua[ir];sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(mt.cond(Wt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Wt,";")):(Mt(mt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Dr,";"))}else if(ga(Dr)){var ya=sr[ir];Mt(lr,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ya+"["+Ga+"]="+vi}).join(";"),";")}else sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(lr,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):Mt(lr,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function kl(mt,Mt){di&&(mt.instancing=Mt.def(mt.shared.extensions,".angle_instanced_arrays"))}function Io(mt,Mt,Ft,rr,hr){var sr=mt.shared,dr=mt.stats,lr=sr.current,Wt=sr.timer,ir=Ft.profile;function Gt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ya(ui){Dr=Mt.def(),ui(Dr,"=",Gt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=Mt.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Gt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=Mt.def(lr,".profile");Mt(lr,".profile=",ui,";"),Mt.exit(lr,".profile=",_i,";")}var ai;if(ir){if(sn(ir)){ir.enable?(ya(Mt),vi(Mt.exit),Ga("true")):Ga("false");return}ai=ir.append(mt,Mt),Ga(ai)}else ai=Mt.def(lr,".profile");var Zi=mt.block();ya(Zi),Mt("if(",ai,"){",Zi,"}");var Fi=mt.block();vi(Fi),Mt.exit("if(",ai,"){",Fi,"}")}function ge(mt,Mt,Ft,rr,hr){var sr=mt.shared;function dr(Wt){switch(Wt){case ls:case ul:case Il:return 2;case Mo:case tl:case tu:return 3;case Yo:case es:case Ru:return 4;default:return 1}}function lr(Wt,ir,Gt){var Dr=sr.gl,Jr=Mt.def(Wt,".location"),ya=Mt.def(sr.attributes,"[",Jr,"]"),vi=Gt.state,Ga=Gt.buffer,ai=[Gt.x,Gt.y,Gt.z,Gt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){Mt("if(!",ya,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Gt.type,Si;if(Gt.size?Si=Mt.def(Gt.size,"||",ir):Si=ir,Mt("if(",ya,".type!==",_i,"||",ya,".size!==",Si,"||",Zi.map(function(fn){return ya+"."+fn+"!=="+Gt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Gt.normalized,Gt.stride,Gt.offset],");",ya,".type=",_i,";",ya,".size=",Si,";",Zi.map(function(fn){return ya+"."+fn+"="+Gt[fn]+";"}).join(""),"}"),di){var Ui=Gt.divisor;Mt("if(",ya,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ya,".divisor=",Ui,";}")}}function ui(){Mt("if(",ya,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ya,".buffer=null;","}if(",Qn.map(function(_i,Si){return ya+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",Qn.map(function(_i,Si){return ya+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===co?ui():(Mt("if(",vi,"===",eo,"){"),Fi(),Mt("}else{"),ui(),Mt("}"))}rr.forEach(function(Wt){var ir=Wt.name,Gt=Ft.attributes[ir],Dr;if(Gt){if(!hr(Gt))return;Dr=Gt.append(mt,Mt)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ya){Dr[ya]=Mt.def(Jr,".",ya)})}lr(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,Mt,Ft,rr,hr,sr){for(var dr=mt.shared,lr=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Ds=[],Oo=0;Oo>1)",Ga],");")}function Ui(){Ft(ai,".drawArraysInstancedANGLE(",[Jr,ya,vi,Ga],");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(sr+".drawElements("+[Jr,vi,Zi,ya+"<<(("+Zi+"-"+io+")>>1)"]+");")}function Ui(){Ft(sr+".drawArrays("+[Jr,ya,vi]+");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Ft("if(",Ga,">0){"),ui(),Ft("}else if(",Ga,"<0){"),_i(),Ft("}")):ui():_i()}function re(mt,Mt,Ft,rr,hr){var sr=nn(),dr=sr.proc("body",hr);return di&&(sr.instancing=dr.def(sr.shared.extensions,".angle_instanced_arrays")),mt(sr,dr,Ft,rr),sr.compile().body}function ye(mt,Mt,Ft,rr){kl(mt,Mt),Ft.useVAO?Ft.drawVAO?Mt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Mt),");"):Mt(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(Mt(mt.shared.vao,".setVAO(null);"),ge(mt,Mt,Ft,rr.attributes,function(){return!0})),K(mt,Mt,Ft,rr.uniforms,function(){return!0},!1),xe(mt,Mt,Mt,Ft)}function Ue(mt,Mt){var Ft=mt.proc("draw",1);kl(mt,Ft),js(mt,Ft,Mt.context),pl(mt,Ft,Mt.framebuffer),bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state),Io(mt,Ft,Mt,!1,!0);var rr=Mt.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),Mt.shader.program)ye(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),sr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",sr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",sr,"]=",mt.link(function(lr){return re(ye,mt,Mt,lr,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,Mt,Ft,rr){mt.batchId="a1",kl(mt,Mt);function hr(){return!0}ge(mt,Mt,Ft,rr.attributes,hr),K(mt,Mt,Ft,rr.uniforms,hr,!1),xe(mt,Mt,Mt,Ft)}function Qe(mt,Mt,Ft,rr){kl(mt,Mt);var hr=Ft.contextDep,sr=Mt.def(),dr="a0",lr="a1",Wt=Mt.def();mt.shared.props=Wt,mt.batchId=sr;var ir=mt.scope(),Gt=mt.scope();Mt(ir.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Wt,"=",dr,"[",sr,"];",Gt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&js(mt,Gt,Ft.context),Ft.needsFramebuffer&&pl(mt,Gt,Ft.framebuffer),Xn(mt,Gt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Io(mt,Gt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Gt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Gt),");"):ir(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,ir),");"):ir(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(ir(mt.shared.vao,".setVAO(null);"),ge(mt,ir,Ft,rr.attributes,Jr),ge(mt,Gt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Gt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Gt,Ft);else{var ya=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Gt),Ga=Gt.def(vi,".id"),ai=Gt.def(ya,"[",Ga,"]");Gt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ya,"[",Ga,"]=",mt.link(function(Zi){return re(ke,mt,Ft,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",sr,"],",sr,");")}}function vt(mt,Mt){var Ft=mt.proc("batch",2);mt.batchId="0",kl(mt,Ft);var rr=!1,hr=!0;Object.keys(Mt.context).forEach(function(ya){rr=rr||Mt.context[ya].propDep}),rr||(js(mt,Ft,Mt.context),hr=!1);var sr=Mt.framebuffer,dr=!1;sr?(sr.propDep?rr=dr=!0:sr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,sr)):pl(mt,Ft,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(rr=!0);function lr(ya){return ya.contextDep&&rr||ya.propDep}bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state,function(ya){return!lr(ya)}),(!Mt.profile||!lr(Mt.profile))&&Io(mt,Ft,Mt,!1,"a1"),Mt.contextDep=rr,Mt.needsContext=hr,Mt.needsFramebuffer=dr;var Wt=Mt.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,Mt,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),Mt.shader.program)Qe(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Gt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Gt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Gt,"[",Dr,"]=",mt.link(function(ya){return re(Qe,mt,Mt,ya,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,Mt){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(js(mt,Ft,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(mt,Ft),ni(Object.keys(Mt.state)).forEach(function(lr){var Wt=Mt.state[lr],ir=Wt.append(mt,Ft);ga(ir)?ir.forEach(function(Gt,Dr){Xi(Gt)?Ft.set(mt.next[lr],"["+Dr+"]",Gt):Ft.set(mt.next[lr],"["+Dr+"]",mt.link(Gt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+lr,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+lr,ir)}),Io(mt,Ft,Mt,!0,!0),[$t,Kr,Sr,na,Tr].forEach(function(lr){var Wt=Mt.draw[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+lr,ir):Ft.set(rr.draw,"."+lr,mt.link(ir),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function(lr){var Wt=Mt.uniforms[lr].append(mt,Ft);Array.isArray(Wt)&&(Wt="["+Wt.map(function(ir){return Xi(ir)?ir:mt.link(ir,{stable:!0})})+"]"),Ft.set(rr.uniforms,"["+mt.link(Xt.id(lr),{stable:!0})+"]",Wt)}),Object.keys(Mt.attributes).forEach(function(lr){var Wt=Mt.attributes[lr].append(mt,Ft),ir=mt.scopeAttrib(lr);Object.keys(new Ma).forEach(function(Gt){Ft.set(ir,"."+Gt,Wt[Gt])})}),Mt.scopeVAO){var sr=Mt.scopeVAO.append(mt,Ft);Xi(sr)?Ft.set(rr.vao,".targetVAO",sr):Ft.set(rr.vao,".targetVAO",mt.link(sr,{stable:!0}))}function dr(lr){var Wt=Mt.shader[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+lr,ir):Ft.set(rr.shader,"."+lr,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(Mt.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function br(mt){if(!(typeof mt!="object"||ga(mt))){for(var Mt=Object.keys(mt),Ft=0;Ft=0;--re){var ye=vn[re];ye&&ye(Na,null,0)}fr.flush(),si&&si.update()}function Wn(){!Cn&&vn.length>0&&(Cn=f.next(Dn))}function Os(){Cn&&(f.cancel(Dn),Cn=null)}function xl(re){re.preventDefault(),Ta=!0,Os(),Rn.forEach(function(ye){ye()})}function ho(re){fr.getError(),Ta=!1,ma.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Wn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(fs,xl,!1),Xi.addEventListener(ms,ho,!1));function Xl(){vn.length=0,Os(),Xi&&(Xi.removeEventListener(fs,xl),Xi.removeEventListener(ms,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(re){re()})}function hs(re){function ye(sr){var dr=v({},sr);delete dr.uniforms,delete dr.attributes,delete dr.context,delete dr.vao,"stencil"in dr&&dr.stencil.op&&(dr.stencil.opBack=dr.stencil.opFront=dr.stencil.op,delete dr.stencil.op);function lr(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Gt){dr[Wt+"."+Gt]=ir[Gt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(dr.vao=sr.vao),dr}function Ue(sr,dr){var lr={},Wt={};return Object.keys(sr).forEach(function(ir){var Gt=sr[ir];if(h.isDynamic(Gt)){Wt[ir]=h.unbox(Gt,ir);return}else if(dr&&Array.isArray(Gt)){for(var Dr=0;Dr0)return mt.call(this,rr(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return mt.call(this,sr,sr.length)}else return pr.call(this,sr)}return v(hr,{stats:br,destroy:function(){Br.destroy()}})}var Al=Yi.setFBO=hs({framebuffer:h.define.call(null,Tl,"framebuffer")});function El(re,ye){var Ue=0;Ri.procs.poll();var ke=ye.color;ke&&(fr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),Ue|=al),"depth"in ye&&(fr.clearDepth(+ye.depth),Ue|=_l),"stencil"in ye&&(fr.clearStencil(ye.stencil|0),Ue|=mn),fr.clear(Ue)}function ru(re){if("framebuffer"in re)if(re.framebuffer&&re.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Al(v({framebuffer:re.framebuffer.faces[ye]},re),El);else Al(re,El);else El(null,re)}function js(re){vn.push(re);function ye(){var Ue=Rl(vn,re);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Os()}vn[Ue]=ke}return Wn(),{cancel:ye}}function pl(){var re=xi.viewport,ye=xi.scissor_box;re[0]=re[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=re[2]=ye[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=re[3]=ye[3]=fr.drawingBufferHeight}function bl(){Na.tick+=1,Na.time=kl(),pl(),Ri.procs.poll()}function Xn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function kl(){return(m()-gn)/1e3}Xn();function Io(re,ye){var Ue;switch(re){case"frame":return js(ye);case"lost":Ue=Rn;break;case"restore":Ue=Ii;break;case"destroy":Ue=nn;break;default:}return Ue.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Xl,_gl:fr,_refresh:Xn,poll:function(){bl(),si&&si.update()},now:kl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Xt.onDone(null,xe),xe}return _c})}}),wq=He({"node_modules/gl-util/context.js"(Z,q){"use strict";var v=kv();q.exports=function(o){if(o?typeof o=="string"&&(o={container:o}):o={},S(o)?o={container:o}:M(o)?o={container:o}:e(o)?o={gl:o}:o=v(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}S(o.container)?(o.canvas=o.container,o.container=o.canvas.parentNode):o.canvas||(o.canvas=t(),o.container.appendChild(o.canvas),_(o))}else if(!o.canvas)if(typeof document<"u")o.container=document.body||document.documentElement,o.canvas=t(),o.container.appendChild(o.canvas),_(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 _(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 S(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}}}),Tq=He({"node_modules/font-atlas/index.js"(Z,q){"use strict";var v=c6(),_=[32,126];q.exports=S;function S(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||_;if(r&&typeof r!="string"&&(r=v(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 h=t.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,t.width,t.height),h.font=r,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var f=o[0]/2,m=o[1]/2,n=0;ne[0]-o[0]/2&&(f=o[0]/2,m+=o[1]);return t}}}),f6=He({"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<0)-(S<0)},Z.abs=function(S){var M=S>>q-1;return(S^M)-M},Z.min=function(S,M){return M^(S^M)&-(S65535)<<4,S>>>=M,e=(S>255)<<3,S>>>=e,M|=e,e=(S>15)<<2,S>>>=e,M|=e,e=(S>3)<<1,S>>>=e,M|=e,M|S>>1},Z.log10=function(S){return S>=1e9?9:S>=1e8?8:S>=1e7?7:S>=1e6?6:S>=1e5?5:S>=1e4?4:S>=1e3?3:S>=100?2:S>=10?1:0},Z.popCount=function(S){return S=S-(S>>>1&1431655765),S=(S&858993459)+(S>>>2&858993459),(S+(S>>>4)&252645135)*16843009>>>24};function v(S){var M=32;return S&=-S,S&&M--,S&65535&&(M-=16),S&16711935&&(M-=8),S&252645135&&(M-=4),S&858993459&&(M-=2),S&1431655765&&(M-=1),M}Z.countTrailingZeros=v,Z.nextPow2=function(S){return S+=S===0,--S,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S+1},Z.prevPow2=function(S){return S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S-(S>>>1)},Z.parity=function(S){return S^=S>>>16,S^=S>>>8,S^=S>>>4,S&=15,27030>>>S&1};var _=new Array(256);(function(S){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;S[M]=t<>>8&255]<<16|_[S>>>16&255]<<8|_[S>>>24&255]},Z.interleave2=function(S,M){return S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,M&=65535,M=(M|M<<8)&16711935,M=(M|M<<4)&252645135,M=(M|M<<2)&858993459,M=(M|M<<1)&1431655765,S|M<<1},Z.deinterleave2=function(S,M){return S=S>>>M&1431655765,S=(S|S>>>1)&858993459,S=(S|S>>>2)&252645135,S=(S|S>>>4)&16711935,S=(S|S>>>16)&65535,S<<16>>16},Z.interleave3=function(S,M,e){return S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,M&=1023,M=(M|M<<16)&4278190335,M=(M|M<<8)&251719695,M=(M|M<<4)&3272356035,M=(M|M<<2)&1227133513,S|=M<<1,e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,S|e<<2},Z.deinterleave3=function(S,M){return S=S>>>M&1227133513,S=(S|S>>>2)&3272356035,S=(S|S>>>4)&251719695,S=(S|S>>>8)&4278190335,S=(S|S>>>16)&1023,S<<22>>22},Z.nextCombination=function(S){var M=S|S-1;return M+1|(~M&-~M)-1>>>v(S)+1}}}),Aq=He({"node_modules/dup/dup.js"(Z,q){"use strict";function v(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"u"&&(e=0),typeof M){case"number":if(M>0)return _(M|0,e);break;case"object":if(typeof M.length=="number")return v(M,e,0);break}return[]}q.exports=S}}),Sq=He({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var q=f6(),v=Aq(),_=rg().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var S=typeof Uint8ClampedArray<"u",M=typeof BigUint64Array<"u",e=typeof BigInt64Array<"u",t=window.__TYPEDARRAY_POOL;t.UINT8C||(t.UINT8C=v([32,0])),t.BIGUINT64||(t.BIGUINT64=v([32,0])),t.BIGINT64||(t.BIGINT64=v([32,0])),t.BUFFER||(t.BUFFER=v([32,0]));var r=t.DATA,o=t.BUFFER;Z.free=function(u){if(_.isBuffer(u))o[q.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var g=u.length||u.byteLength,y=q.log2(g)|0;r[y].push(u)}};function a(d){if(d){var u=d.length||d.byteLength,g=q.log2(u);r[g].push(d)}}function i(d){a(d.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,g){if(g===void 0||g==="arraybuffer")return n(u);switch(g){case"uint8":return s(u);case"uint16":return h(u);case"uint32":return f(u);case"int8":return m(u);case"int16":return c(u);case"int32":return T(u);case"float":case"float32":return l(u);case"double":case"float64":return x(u);case"uint8_clamped":return w(u);case"bigint64":return E(u);case"biguint64":return A(u);case"buffer":return b(u);case"data":case"dataview":return p(u);default:return null}return null};function n(u){var u=q.nextPow2(u),g=q.log2(u),y=r[g];return y.length>0?y.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=n;function s(d){return new Uint8Array(n(d),0,d)}Z.mallocUint8=s;function h(d){return new Uint16Array(n(2*d),0,d)}Z.mallocUint16=h;function f(d){return new Uint32Array(n(4*d),0,d)}Z.mallocUint32=f;function m(d){return new Int8Array(n(d),0,d)}Z.mallocInt8=m;function c(d){return new Int16Array(n(2*d),0,d)}Z.mallocInt16=c;function T(d){return new Int32Array(n(4*d),0,d)}Z.mallocInt32=T;function l(d){return new Float32Array(n(4*d),0,d)}Z.mallocFloat32=Z.mallocFloat=l;function x(d){return new Float64Array(n(8*d),0,d)}Z.mallocFloat64=Z.mallocDouble=x;function w(d){return S?new Uint8ClampedArray(n(d),0,d):s(d)}Z.mallocUint8Clamped=w;function A(d){return M?new BigUint64Array(n(8*d),0,d):null}Z.mallocBigUint64=A;function E(d){return e?new BigInt64Array(n(8*d),0,d):null}Z.mallocBigInt64=E;function p(d){return new DataView(n(d),0,d)}Z.mallocDataView=p;function b(d){d=q.nextPow2(d);var u=q.log2(d),g=o[u];return g.length>0?g.pop():new _(d)}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}}}),Mq=He({"node_modules/is-plain-obj/index.js"(Z,q){"use strict";var v=Object.prototype.toString;q.exports=function(_){var S;return v.call(_)==="[object Object]"&&(S=Object.getPrototypeOf(_),S===null||S===Object.getPrototypeOf({}))}}}),h6=He({"node_modules/parse-unit/index.js"(Z,q){q.exports=function(_,S){S||(S=[0,""]),_=String(_);var M=parseFloat(_,10);return S[0]=M,S[1]=_.match(/[\d.\-\+]*\s*(.*)/)[1]||"",S}}}),Eq=He({"node_modules/to-px/topx.js"(Z,q){"use strict";var v=h6();q.exports=e;var _=96;function S(t,r){var o=v(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=S(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 S(r,"font-size");case"rem":return S(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 _;case"cm":return _/2.54;case"mm":return _/25.4;case"pt":return _/72;case"pc":return _/6}return 1}}}),kq=He({"node_modules/detect-kerning/index.js"(Z,q){"use strict";q.exports=M;var v=M.canvas=document.createElement("canvas"),_=v.getContext("2d"),S=e([32,126]);M.createPairs=e,M.ascii=S;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=S),_.font=i+"px "+t;for(var s=0;si*n){var c=(m-f)/i;o[h]=c*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];i0;o-=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}}}),Lq=He({"node_modules/gl-text/dist.js"(Z,q){"use strict";var v=xq(),_=kv(),S=bq(),M=wq(),e=r6(),t=v0(),r=Tq(),o=Sq(),a=C1(),i=Mq(),n=h6(),s=Eq(),h=kq(),f=ch(),m=Cq(),c=gg(),T=f6(),l=T.nextPow2,x=new e,w=!1;document.body&&(A=document.body.appendChild(document.createElement("div")),A.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(A).fontStretch&&(w=!0),document.body.removeChild(A));var A,E=function(d){p(d)?(d={regl:d},this.gl=d.regl._gl):this.gl=M(d),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=d.regl||S({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(),x.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(d)?d:{})};E.prototype.createShader=function(){var d=this.regl,u=d({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:d.prop("count"),offset:d.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:d.this("sizeBuffer")},width:{offset:0,stride:8,buffer:d.this("sizeBuffer")},char:d.this("charBuffer"),position:d.this("position")},uniforms:{atlasSize:function(y,D){return[D.atlas.width,D.atlas.height]},atlasDim:function(y,D){return[D.atlas.cols,D.atlas.rows]},atlas:function(y,D){return D.atlas.texture},charStep:function(y,D){return D.atlas.step},em:function(y,D){return D.atlas.em},color:d.prop("color"),opacity:d.prop("opacity"),viewport:d.this("viewportArray"),scale:d.this("scale"),align:d.prop("align"),baseline:d.prop("baseline"),translate:d.this("translate"),positionOffset:d.prop("positionOffset")},primitive:"points",viewport:d.this("viewport"),vert:` +`),Ma;if(Xt&&(Ma=Cc(ea),Xt[Ma]))return Xt[Ma].apply(null,Ta);var Qa=Function.apply(null,oa.concat(ea));return Xt&&(Xt[Ma]=Qa),Qa.apply(null,Ta)}return{global:si,link:xa,block:Ya,proc:zi,scope:bi,cond:yi,compile:Ei}}var Qn="xyzw".split(""),io=5121,eo=1,co=2,An=0,un=1,yo=2,Qo=3,ks=4,rl=5,Ns=6,el="dither",Ss="blend.enable",Fl="blend.color",yl="blend.equation",ll="blend.func",Un="depth.enable",Ro="depth.func",Js="depth.range",Fs="depth.mask",cu="colorMask",Iu="cull.enable",Zu="cull.face",Ic="frontFace",bu="lineWidth",Rc="polygonOffset.enable",Au="polygonOffset.offset",yc="sample.alpha",fo="sample.enable",Fo="sample.coverage",Dc="stencil.enable",lc="stencil.mask",Yu="stencil.func",Oe="stencil.opFront",I="stencil.opBack",ie="scissor.enable",Te="scissor.box",Me="viewport",ze="profile",ht="framebuffer",wt="vert",Ot="frag",$t="elements",Tr="primitive",Sr="count",Kr="offset",na="instances",qe="vao",$e="Width",lt="Height",pt=ht+$e,Et=ht+lt,bt=Me+$e,Dt=Me+lt,ur="drawingBuffer",yr=ur+$e,Er=ur+lt,jr=[ll,yl,Yu,Oe,I,Fo,Me,Te,Au],Qr=34962,ha=34963,Aa=2884,Da=3042,ci=3024,Vi=2960,ji=2929,on=3089,Sn=32823,Kn=32926,Bn=32928,Ao=5126,ls=35664,Mo=35665,Yo=35666,ds=5124,ul=35667,tl=35668,es=35669,ts=35670,Il=35671,tu=35672,Ru=35673,vu=35674,wl=35675,fu=35676,uc=35678,Gl=35680,Hl=4,me=1028,De=1029,et=2304,dt=2305,yt=32775,Tt=32776,tr=519,zt=7680,_r=0,Gr=1,Xr=32774,wa=513,pa=36160,Ja=36064,ti={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sa={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},za={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:dt};function fi(it){return Array.isArray(it)||kr(it)||Ur(it)}function oi(it){return it.sort(function(Xt,fr){return Xt===Me?-1:fr===Me?1:Xt=1,oa>=2,Xt)}else if(fr===ks){var Ta=it.data;return new La(Ta.thisDep,Ta.contextDep,Ta.propDep,Xt)}else{if(fr===rl)return new La(!1,!1,!1,Xt);if(fr===Ns){for(var ma=!1,xa=!1,Ya=!1,bi=0;bi=1&&(xa=!0),si>=2&&(Ya=!0)}else yi.type===ks&&(ma=ma||yi.data.thisDep,xa=xa||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,xa,Ya,Xt)}else return new La(fr===Qo,fr===yo,fr===un,Xt)}}var In=new La(!1,!1,!1,function(){});function Jn(it,Xt,fr,oa,Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=Mt}function xi(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),Array.isArray(Ft)?(Li[rr]=Ft.slice(),hn[rr]=Ft.slice()):Li[rr]=hn[rr]=Ft,Yi[rr]=Mt}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(Ss,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(yl,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Ro,"depthFunc",wa),xi(Js,"depthRange",[0,1]),xi(Fs,"depthMask",!0),xi(cu,cu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,Sn),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(fo,Bn),xi(Fo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Oe,"stencilOpSeparate",[me,zt,zt,zt]),xi(I,"stencilOpSeparate",[De,zt,zt,zt]),Ti(ie,on),xi(Te,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Me,Me,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var vn={gl:it,context:zi,strings:Xt,next:hn,current:Li,draw:gn,elements:ma,buffer:Ta,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ia,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:_a,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=d(oa.maxDrawbuffers,function(mt){return mt===0?[0]:d(mt,function(Mt){return Ja+Mt})}));var Ii=0;function nn(){var mt=Mn({cache:Na}),Mt=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=Mt(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var sr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(sr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var lr=mt.constants={};Object.keys(Rn).forEach(function(ir){lr[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Gt){switch(Gt.type){case An:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(Mt(Gt.data),".call(",Dr.slice(0,Math.max(Gt.data.length+1,4)),")");case un:return ir.def(hr.props,Gt.data);case yo:return ir.def(hr.context,Gt.data);case Qo:return ir.def("this",Gt.data);case ks:return Gt.data.append(mt,ir),Gt.data.ref;case rl:return Gt.data.toString();case Ns:return Gt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Gt=Xt.id(ir);if(Gt in Wt)return Wt[Gt];var Dr=yi.scope[Gt];Dr||(Dr=yi.scope[Gt]=new Ma);var Jr=Wt[Gt]=Mt(Dr);return Jr},mt}function Ln(mt){var Mt=mt.static,Ft=mt.dynamic,rr;if(ze in Mt){var hr=!!Mt[ze];rr=an(function(dr,lr){return hr}),rr.enable=hr}else if(ze in Ft){var sr=Ft[ze];rr=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}return rr}function Dn(mt,Mt){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),an(function(dr,lr){var Wt=dr.link(hr),ir=dr.shared;lr.set(ir.framebuffer,".next",Wt);var Gt=ir.context;return lr.set(Gt,"."+pt,Wt+".width"),lr.set(Gt,"."+Et,Wt+".height"),Wt})):an(function(dr,lr){var Wt=dr.shared;lr.set(Wt.framebuffer,".next","null");var ir=Wt.context;return lr.set(ir,"."+pt,ir+"."+yr),lr.set(ir,"."+Et,ir+"."+Er),"null"})}else if(ht in rr){var sr=rr[ht];return dn(sr,function(dr,lr){var Wt=dr.invoke(lr,sr),ir=dr.shared,Gt=ir.framebuffer,Dr=lr.def(Gt,".getFramebuffer(",Wt,")");lr.set(Gt,".next",Dr);var Jr=ir.context;return lr.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),lr.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Wn(mt,Mt,Ft){var rr=mt.static,hr=mt.dynamic;function sr(Wt){if(Wt in rr){var ir=rr[Wt],Gt=!0,Dr=ir.x|0,Jr=ir.y|0,ya,vi;return"width"in ir?ya=ir.width|0:Gt=!1,"height"in ir?vi=ir.height|0:Gt=!1,new La(!Gt&&Mt&&Mt.thisDep,!Gt&&Mt&&Mt.contextDep,!Gt&&Mt&&Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ya;"width"in ir||(_i=Fi.def(ui,".",pt,"-",Dr));var Si=vi;return"height"in ir||(Si=Fi.def(ui,".",Et,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Wt in hr){var Ga=hr[Wt],ii=dn(Ga,function(Zi,Fi){var ui=Zi.invoke(Fi,Ga),_i=Zi.shared.context,Si=Fi.def(ui,".x|0"),Ui=Fi.def(ui,".y|0"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,fn,_o]});return Mt&&(ii.thisDep=ii.thisDep||Mt.thisDep,ii.contextDep=ii.contextDep||Mt.contextDep,ii.propDep=ii.propDep||Mt.propDep),ii}else return Mt?new La(Mt.thisDep,Mt.contextDep,Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=sr(Me);if(dr){var lr=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Gt=lr.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Gt[2]),ir.set(Dr,"."+Dt,Gt[3]),Gt})}return{viewport:dr,scissor_box:sr(Te)}}function Os(mt,Mt){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(Mt.dynamic).length>0)return null;var hr=Mt.static,sr=Object.keys(hr);if(sr.length>0&&typeof hr[sr[0]]=="number"){for(var dr=[],lr=0;lr"+Si+"?"+Gt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ya,"(",Gt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Gt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Gt,".buffer);","}",Fi,'="type" in ',Gt,"?",Jr.glTypes,"[",Gt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Gt,".normalized;");function ui(_i){ir(Ga[_i],"=",Gt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[sr]=dn(dr,lr)}),hr}function El(mt){var Mt=mt.static,Ft=mt.dynamic,rr={};return Object.keys(Mt).forEach(function(hr){var sr=Mt[hr];rr[hr]=an(function(dr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:dr.link(sr)})}),Object.keys(Ft).forEach(function(hr){var sr=Ft[hr];rr[hr]=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}),rr}function ru(mt,Mt,Ft,rr,hr){var sr=mt.static,dr=mt.dynamic,lr=Os(mt,Mt),Wt=Dn(mt,hr),ir=Wn(mt,Wt,hr),Gt=ho(mt,hr),Dr=Xl(mt,hr),Jr=xl(mt,hr,lr);function ya(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ya(Me),ya(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Gt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Ln(mt,hr),Ga.uniforms=hs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Gt.vao,!Ga.drawVAO&&Jr.program&&!lr&&fr.angle_instanced_arrays&&Gt.static.elements){var ii=!0,Zi=Jr.program.attributes.map(function(ui){var _i=Mt.static[ui];return ii=ii&&!!_i,_i});if(ii&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Gt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return lr?Ga.useVAO=!0:Ga.attributes=Al(Mt,hr),Ga.context=El(rr,hr),Ga}function js(mt,Mt,Ft){var rr=mt.shared,hr=rr.context,sr=mt.scope();Object.keys(Ft).forEach(function(dr){Mt.save(hr,"."+dr);var lr=Ft[dr],Wt=lr.append(mt,Mt);Array.isArray(Wt)?sr(hr,".",dr,"=[",Wt.join(),"];"):sr(hr,".",dr,"=",Wt,";")}),Mt(sr)}function pl(mt,Mt,Ft,rr){var hr=mt.shared,sr=hr.gl,dr=hr.framebuffer,lr;Va&&(lr=Mt.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Gt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,Mt):Dr=Mt.def(dr,".next"),rr||Mt("if(",Dr,"!==",dr,".cur){"),Mt("if(",Dr,"){",sr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&Mt(lr,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),Mt("}else{",sr,".bindFramebuffer(",pa,",null);"),Va&&Mt(lr,".drawBuffersWEBGL(",Gt,");"),Mt("}",dr,".cur=",Dr,";"),rr||Mt("}")}function bl(mt,Mt,Ft){var rr=mt.shared,hr=rr.gl,sr=mt.current,dr=mt.next,lr=rr.current,Wt=rr.next,ir=mt.cond(lr,".dirty");Ha.forEach(function(Gt){var Dr=Ri(Gt);if(!(Dr in Ft.state)){var Jr,ya;if(Dr in dr){Jr=dr[Dr],ya=sr[Dr];var vi=d(Li[Dr].length,function(ii){return ir.def(Jr,"[",ii,"]")});ir(mt.cond(vi.map(function(ii,Zi){return ii+"!=="+ya+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ii,Zi){return ya+"["+Zi+"]="+ii}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",lr,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),lr,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(lr,".dirty=false;"),Mt(ir)}function Xn(mt,Mt,Ft,rr){var hr=mt.shared,sr=mt.current,dr=hr.current,lr=hr.gl,Wt;oi(Object.keys(Ft)).forEach(function(ir){var Gt=Ft[ir];if(!(rr&&!rr(Gt))){var Dr=Gt.append(mt,Mt);if(Ua[ir]){var Jr=Ua[ir];sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(mt.cond(Wt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Wt,";")):(Mt(mt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Dr,";"))}else if(ga(Dr)){var ya=sr[ir];Mt(lr,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ya+"["+Ga+"]="+vi}).join(";"),";")}else sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(lr,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):Mt(lr,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function kl(mt,Mt){di&&(mt.instancing=Mt.def(mt.shared.extensions,".angle_instanced_arrays"))}function Io(mt,Mt,Ft,rr,hr){var sr=mt.shared,dr=mt.stats,lr=sr.current,Wt=sr.timer,ir=Ft.profile;function Gt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ya(ui){Dr=Mt.def(),ui(Dr,"=",Gt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=Mt.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Gt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=Mt.def(lr,".profile");Mt(lr,".profile=",ui,";"),Mt.exit(lr,".profile=",_i,";")}var ii;if(ir){if(sn(ir)){ir.enable?(ya(Mt),vi(Mt.exit),Ga("true")):Ga("false");return}ii=ir.append(mt,Mt),Ga(ii)}else ii=Mt.def(lr,".profile");var Zi=mt.block();ya(Zi),Mt("if(",ii,"){",Zi,"}");var Fi=mt.block();vi(Fi),Mt.exit("if(",ii,"){",Fi,"}")}function ge(mt,Mt,Ft,rr,hr){var sr=mt.shared;function dr(Wt){switch(Wt){case ls:case ul:case Il:return 2;case Mo:case tl:case tu:return 3;case Yo:case es:case Ru:return 4;default:return 1}}function lr(Wt,ir,Gt){var Dr=sr.gl,Jr=Mt.def(Wt,".location"),ya=Mt.def(sr.attributes,"[",Jr,"]"),vi=Gt.state,Ga=Gt.buffer,ii=[Gt.x,Gt.y,Gt.z,Gt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){Mt("if(!",ya,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Gt.type,Si;if(Gt.size?Si=Mt.def(Gt.size,"||",ir):Si=ir,Mt("if(",ya,".type!==",_i,"||",ya,".size!==",Si,"||",Zi.map(function(fn){return ya+"."+fn+"!=="+Gt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Gt.normalized,Gt.stride,Gt.offset],");",ya,".type=",_i,";",ya,".size=",Si,";",Zi.map(function(fn){return ya+"."+fn+"="+Gt[fn]+";"}).join(""),"}"),di){var Ui=Gt.divisor;Mt("if(",ya,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ya,".divisor=",Ui,";}")}}function ui(){Mt("if(",ya,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ya,".buffer=null;","}if(",Qn.map(function(_i,Si){return ya+"."+_i+"!=="+ii[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ii,");",Qn.map(function(_i,Si){return ya+"."+_i+"="+ii[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===co?ui():(Mt("if(",vi,"===",eo,"){"),Fi(),Mt("}else{"),ui(),Mt("}"))}rr.forEach(function(Wt){var ir=Wt.name,Gt=Ft.attributes[ir],Dr;if(Gt){if(!hr(Gt))return;Dr=Gt.append(mt,Mt)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ya){Dr[ya]=Mt.def(Jr,".",ya)})}lr(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,Mt,Ft,rr,hr,sr){for(var dr=mt.shared,lr=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Ds=[],Oo=0;Oo>1)",Ga],");")}function Ui(){Ft(ii,".drawArraysInstancedANGLE(",[Jr,ya,vi,Ga],");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(sr+".drawElements("+[Jr,vi,Zi,ya+"<<(("+Zi+"-"+io+")>>1)"]+");")}function Ui(){Ft(sr+".drawArrays("+[Jr,ya,vi]+");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Ft("if(",Ga,">0){"),ui(),Ft("}else if(",Ga,"<0){"),_i(),Ft("}")):ui():_i()}function re(mt,Mt,Ft,rr,hr){var sr=nn(),dr=sr.proc("body",hr);return di&&(sr.instancing=dr.def(sr.shared.extensions,".angle_instanced_arrays")),mt(sr,dr,Ft,rr),sr.compile().body}function ye(mt,Mt,Ft,rr){kl(mt,Mt),Ft.useVAO?Ft.drawVAO?Mt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Mt),");"):Mt(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(Mt(mt.shared.vao,".setVAO(null);"),ge(mt,Mt,Ft,rr.attributes,function(){return!0})),K(mt,Mt,Ft,rr.uniforms,function(){return!0},!1),xe(mt,Mt,Mt,Ft)}function Ue(mt,Mt){var Ft=mt.proc("draw",1);kl(mt,Ft),js(mt,Ft,Mt.context),pl(mt,Ft,Mt.framebuffer),bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state),Io(mt,Ft,Mt,!1,!0);var rr=Mt.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),Mt.shader.program)ye(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),sr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",sr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",sr,"]=",mt.link(function(lr){return re(ye,mt,Mt,lr,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,Mt,Ft,rr){mt.batchId="a1",kl(mt,Mt);function hr(){return!0}ge(mt,Mt,Ft,rr.attributes,hr),K(mt,Mt,Ft,rr.uniforms,hr,!1),xe(mt,Mt,Mt,Ft)}function Qe(mt,Mt,Ft,rr){kl(mt,Mt);var hr=Ft.contextDep,sr=Mt.def(),dr="a0",lr="a1",Wt=Mt.def();mt.shared.props=Wt,mt.batchId=sr;var ir=mt.scope(),Gt=mt.scope();Mt(ir.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Wt,"=",dr,"[",sr,"];",Gt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&js(mt,Gt,Ft.context),Ft.needsFramebuffer&&pl(mt,Gt,Ft.framebuffer),Xn(mt,Gt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Io(mt,Gt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Gt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Gt),");"):ir(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,ir),");"):ir(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(ir(mt.shared.vao,".setVAO(null);"),ge(mt,ir,Ft,rr.attributes,Jr),ge(mt,Gt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Gt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Gt,Ft);else{var ya=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Gt),Ga=Gt.def(vi,".id"),ii=Gt.def(ya,"[",Ga,"]");Gt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ii,"){",ii,"=",ya,"[",Ga,"]=",mt.link(function(Zi){return re(ke,mt,Ft,Zi,2)}),"(",vi,");}",ii,".call(this,a0[",sr,"],",sr,");")}}function vt(mt,Mt){var Ft=mt.proc("batch",2);mt.batchId="0",kl(mt,Ft);var rr=!1,hr=!0;Object.keys(Mt.context).forEach(function(ya){rr=rr||Mt.context[ya].propDep}),rr||(js(mt,Ft,Mt.context),hr=!1);var sr=Mt.framebuffer,dr=!1;sr?(sr.propDep?rr=dr=!0:sr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,sr)):pl(mt,Ft,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(rr=!0);function lr(ya){return ya.contextDep&&rr||ya.propDep}bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state,function(ya){return!lr(ya)}),(!Mt.profile||!lr(Mt.profile))&&Io(mt,Ft,Mt,!1,"a1"),Mt.contextDep=rr,Mt.needsContext=hr,Mt.needsFramebuffer=dr;var Wt=Mt.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,Mt,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),Mt.shader.program)Qe(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Gt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Gt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Gt,"[",Dr,"]=",mt.link(function(ya){return re(Qe,mt,Mt,ya,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,Mt){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(js(mt,Ft,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(mt,Ft),oi(Object.keys(Mt.state)).forEach(function(lr){var Wt=Mt.state[lr],ir=Wt.append(mt,Ft);ga(ir)?ir.forEach(function(Gt,Dr){Xi(Gt)?Ft.set(mt.next[lr],"["+Dr+"]",Gt):Ft.set(mt.next[lr],"["+Dr+"]",mt.link(Gt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+lr,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+lr,ir)}),Io(mt,Ft,Mt,!0,!0),[$t,Kr,Sr,na,Tr].forEach(function(lr){var Wt=Mt.draw[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+lr,ir):Ft.set(rr.draw,"."+lr,mt.link(ir),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function(lr){var Wt=Mt.uniforms[lr].append(mt,Ft);Array.isArray(Wt)&&(Wt="["+Wt.map(function(ir){return Xi(ir)?ir:mt.link(ir,{stable:!0})})+"]"),Ft.set(rr.uniforms,"["+mt.link(Xt.id(lr),{stable:!0})+"]",Wt)}),Object.keys(Mt.attributes).forEach(function(lr){var Wt=Mt.attributes[lr].append(mt,Ft),ir=mt.scopeAttrib(lr);Object.keys(new Ma).forEach(function(Gt){Ft.set(ir,"."+Gt,Wt[Gt])})}),Mt.scopeVAO){var sr=Mt.scopeVAO.append(mt,Ft);Xi(sr)?Ft.set(rr.vao,".targetVAO",sr):Ft.set(rr.vao,".targetVAO",mt.link(sr,{stable:!0}))}function dr(lr){var Wt=Mt.shader[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+lr,ir):Ft.set(rr.shader,"."+lr,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(Mt.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function br(mt){if(!(typeof mt!="object"||ga(mt))){for(var Mt=Object.keys(mt),Ft=0;Ft=0;--re){var ye=vn[re];ye&&ye(Na,null,0)}fr.flush(),si&&si.update()}function Wn(){!Ln&&vn.length>0&&(Ln=f.next(Dn))}function Os(){Ln&&(f.cancel(Dn),Ln=null)}function xl(re){re.preventDefault(),Ta=!0,Os(),Rn.forEach(function(ye){ye()})}function ho(re){fr.getError(),Ta=!1,ma.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Wn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(fs,xl,!1),Xi.addEventListener(ms,ho,!1));function Xl(){vn.length=0,Os(),Xi&&(Xi.removeEventListener(fs,xl),Xi.removeEventListener(ms,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(re){re()})}function hs(re){function ye(sr){var dr=v({},sr);delete dr.uniforms,delete dr.attributes,delete dr.context,delete dr.vao,"stencil"in dr&&dr.stencil.op&&(dr.stencil.opBack=dr.stencil.opFront=dr.stencil.op,delete dr.stencil.op);function lr(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Gt){dr[Wt+"."+Gt]=ir[Gt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(dr.vao=sr.vao),dr}function Ue(sr,dr){var lr={},Wt={};return Object.keys(sr).forEach(function(ir){var Gt=sr[ir];if(h.isDynamic(Gt)){Wt[ir]=h.unbox(Gt,ir);return}else if(dr&&Array.isArray(Gt)){for(var Dr=0;Dr0)return mt.call(this,rr(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return mt.call(this,sr,sr.length)}else return pr.call(this,sr)}return v(hr,{stats:br,destroy:function(){Br.destroy()}})}var Al=Yi.setFBO=hs({framebuffer:h.define.call(null,Tl,"framebuffer")});function El(re,ye){var Ue=0;Ri.procs.poll();var ke=ye.color;ke&&(fr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),Ue|=al),"depth"in ye&&(fr.clearDepth(+ye.depth),Ue|=_l),"stencil"in ye&&(fr.clearStencil(ye.stencil|0),Ue|=mn),fr.clear(Ue)}function ru(re){if("framebuffer"in re)if(re.framebuffer&&re.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Al(v({framebuffer:re.framebuffer.faces[ye]},re),El);else Al(re,El);else El(null,re)}function js(re){vn.push(re);function ye(){var Ue=Rl(vn,re);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Os()}vn[Ue]=ke}return Wn(),{cancel:ye}}function pl(){var re=xi.viewport,ye=xi.scissor_box;re[0]=re[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=re[2]=ye[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=re[3]=ye[3]=fr.drawingBufferHeight}function bl(){Na.tick+=1,Na.time=kl(),pl(),Ri.procs.poll()}function Xn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function kl(){return(m()-gn)/1e3}Xn();function Io(re,ye){var Ue;switch(re){case"frame":return js(ye);case"lost":Ue=Rn;break;case"restore":Ue=Ii;break;case"destroy":Ue=nn;break;default:}return Ue.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Xl,_gl:fr,_refresh:Xn,poll:function(){bl(),si&&si.update()},now:kl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Xt.onDone(null,xe),xe}return _c})}}),wq=He({"node_modules/gl-util/context.js"(Z,q){"use strict";var v=kv();q.exports=function(o){if(o?typeof o=="string"&&(o={container:o}):o={},S(o)?o={container:o}:M(o)?o={container:o}:e(o)?o={gl:o}:o=v(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}S(o.container)?(o.canvas=o.container,o.container=o.canvas.parentNode):o.canvas||(o.canvas=t(),o.container.appendChild(o.canvas),_(o))}else if(!o.canvas)if(typeof document<"u")o.container=document.body||document.documentElement,o.canvas=t(),o.container.appendChild(o.canvas),_(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 _(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 S(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}}}),Tq=He({"node_modules/font-atlas/index.js"(Z,q){"use strict";var v=c6(),_=[32,126];q.exports=S;function S(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||_;if(r&&typeof r!="string"&&(r=v(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 h=t.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,t.width,t.height),h.font=r,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var f=o[0]/2,m=o[1]/2,n=0;ne[0]-o[0]/2&&(f=o[0]/2,m+=o[1]);return t}}}),f6=He({"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<0)-(S<0)},Z.abs=function(S){var M=S>>q-1;return(S^M)-M},Z.min=function(S,M){return M^(S^M)&-(S65535)<<4,S>>>=M,e=(S>255)<<3,S>>>=e,M|=e,e=(S>15)<<2,S>>>=e,M|=e,e=(S>3)<<1,S>>>=e,M|=e,M|S>>1},Z.log10=function(S){return S>=1e9?9:S>=1e8?8:S>=1e7?7:S>=1e6?6:S>=1e5?5:S>=1e4?4:S>=1e3?3:S>=100?2:S>=10?1:0},Z.popCount=function(S){return S=S-(S>>>1&1431655765),S=(S&858993459)+(S>>>2&858993459),(S+(S>>>4)&252645135)*16843009>>>24};function v(S){var M=32;return S&=-S,S&&M--,S&65535&&(M-=16),S&16711935&&(M-=8),S&252645135&&(M-=4),S&858993459&&(M-=2),S&1431655765&&(M-=1),M}Z.countTrailingZeros=v,Z.nextPow2=function(S){return S+=S===0,--S,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S+1},Z.prevPow2=function(S){return S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S-(S>>>1)},Z.parity=function(S){return S^=S>>>16,S^=S>>>8,S^=S>>>4,S&=15,27030>>>S&1};var _=new Array(256);(function(S){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;S[M]=t<>>8&255]<<16|_[S>>>16&255]<<8|_[S>>>24&255]},Z.interleave2=function(S,M){return S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,M&=65535,M=(M|M<<8)&16711935,M=(M|M<<4)&252645135,M=(M|M<<2)&858993459,M=(M|M<<1)&1431655765,S|M<<1},Z.deinterleave2=function(S,M){return S=S>>>M&1431655765,S=(S|S>>>1)&858993459,S=(S|S>>>2)&252645135,S=(S|S>>>4)&16711935,S=(S|S>>>16)&65535,S<<16>>16},Z.interleave3=function(S,M,e){return S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,M&=1023,M=(M|M<<16)&4278190335,M=(M|M<<8)&251719695,M=(M|M<<4)&3272356035,M=(M|M<<2)&1227133513,S|=M<<1,e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,S|e<<2},Z.deinterleave3=function(S,M){return S=S>>>M&1227133513,S=(S|S>>>2)&3272356035,S=(S|S>>>4)&251719695,S=(S|S>>>8)&4278190335,S=(S|S>>>16)&1023,S<<22>>22},Z.nextCombination=function(S){var M=S|S-1;return M+1|(~M&-~M)-1>>>v(S)+1}}}),Aq=He({"node_modules/dup/dup.js"(Z,q){"use strict";function v(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"u"&&(e=0),typeof M){case"number":if(M>0)return _(M|0,e);break;case"object":if(typeof M.length=="number")return v(M,e,0);break}return[]}q.exports=S}}),Sq=He({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var q=f6(),v=Aq(),_=rg().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var S=typeof Uint8ClampedArray<"u",M=typeof BigUint64Array<"u",e=typeof BigInt64Array<"u",t=window.__TYPEDARRAY_POOL;t.UINT8C||(t.UINT8C=v([32,0])),t.BIGUINT64||(t.BIGUINT64=v([32,0])),t.BIGINT64||(t.BIGINT64=v([32,0])),t.BUFFER||(t.BUFFER=v([32,0]));var r=t.DATA,o=t.BUFFER;Z.free=function(u){if(_.isBuffer(u))o[q.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var g=u.length||u.byteLength,y=q.log2(g)|0;r[y].push(u)}};function a(d){if(d){var u=d.length||d.byteLength,g=q.log2(u);r[g].push(d)}}function i(d){a(d.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,g){if(g===void 0||g==="arraybuffer")return n(u);switch(g){case"uint8":return s(u);case"uint16":return h(u);case"uint32":return f(u);case"int8":return m(u);case"int16":return c(u);case"int32":return T(u);case"float":case"float32":return l(u);case"double":case"float64":return x(u);case"uint8_clamped":return w(u);case"bigint64":return E(u);case"biguint64":return A(u);case"buffer":return b(u);case"data":case"dataview":return p(u);default:return null}return null};function n(u){var u=q.nextPow2(u),g=q.log2(u),y=r[g];return y.length>0?y.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=n;function s(d){return new Uint8Array(n(d),0,d)}Z.mallocUint8=s;function h(d){return new Uint16Array(n(2*d),0,d)}Z.mallocUint16=h;function f(d){return new Uint32Array(n(4*d),0,d)}Z.mallocUint32=f;function m(d){return new Int8Array(n(d),0,d)}Z.mallocInt8=m;function c(d){return new Int16Array(n(2*d),0,d)}Z.mallocInt16=c;function T(d){return new Int32Array(n(4*d),0,d)}Z.mallocInt32=T;function l(d){return new Float32Array(n(4*d),0,d)}Z.mallocFloat32=Z.mallocFloat=l;function x(d){return new Float64Array(n(8*d),0,d)}Z.mallocFloat64=Z.mallocDouble=x;function w(d){return S?new Uint8ClampedArray(n(d),0,d):s(d)}Z.mallocUint8Clamped=w;function A(d){return M?new BigUint64Array(n(8*d),0,d):null}Z.mallocBigUint64=A;function E(d){return e?new BigInt64Array(n(8*d),0,d):null}Z.mallocBigInt64=E;function p(d){return new DataView(n(d),0,d)}Z.mallocDataView=p;function b(d){d=q.nextPow2(d);var u=q.log2(d),g=o[u];return g.length>0?g.pop():new _(d)}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}}}),Mq=He({"node_modules/is-plain-obj/index.js"(Z,q){"use strict";var v=Object.prototype.toString;q.exports=function(_){var S;return v.call(_)==="[object Object]"&&(S=Object.getPrototypeOf(_),S===null||S===Object.getPrototypeOf({}))}}}),h6=He({"node_modules/parse-unit/index.js"(Z,q){q.exports=function(_,S){S||(S=[0,""]),_=String(_);var M=parseFloat(_,10);return S[0]=M,S[1]=_.match(/[\d.\-\+]*\s*(.*)/)[1]||"",S}}}),Eq=He({"node_modules/to-px/topx.js"(Z,q){"use strict";var v=h6();q.exports=e;var _=96;function S(t,r){var o=v(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=S(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 S(r,"font-size");case"rem":return S(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 _;case"cm":return _/2.54;case"mm":return _/25.4;case"pt":return _/72;case"pc":return _/6}return 1}}}),kq=He({"node_modules/detect-kerning/index.js"(Z,q){"use strict";q.exports=M;var v=M.canvas=document.createElement("canvas"),_=v.getContext("2d"),S=e([32,126]);M.createPairs=e,M.ascii=S;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=S),_.font=i+"px "+t;for(var s=0;si*n){var c=(m-f)/i;o[h]=c*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];i0;o-=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}}}),Lq=He({"node_modules/gl-text/dist.js"(Z,q){"use strict";var v=xq(),_=kv(),S=bq(),M=wq(),e=r6(),t=v0(),r=Tq(),o=Sq(),a=C1(),i=Mq(),n=h6(),s=Eq(),h=kq(),f=ch(),m=Cq(),c=gg(),T=f6(),l=T.nextPow2,x=new e,w=!1;document.body&&(A=document.body.appendChild(document.createElement("div")),A.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(A).fontStretch&&(w=!0),document.body.removeChild(A));var A,E=function(d){p(d)?(d={regl:d},this.gl=d.regl._gl):this.gl=M(d),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=d.regl||S({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(),x.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(d)?d:{})};E.prototype.createShader=function(){var d=this.regl,u=d({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:d.prop("count"),offset:d.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:d.this("sizeBuffer")},width:{offset:0,stride:8,buffer:d.this("sizeBuffer")},char:d.this("charBuffer"),position:d.this("position")},uniforms:{atlasSize:function(y,D){return[D.atlas.width,D.atlas.height]},atlasDim:function(y,D){return[D.atlas.cols,D.atlas.rows]},atlas:function(y,D){return D.atlas.texture},charStep:function(y,D){return D.atlas.step},em:function(y,D){return D.atlas.em},color:d.prop("color"),opacity:d.prop("opacity"),viewport:d.this("viewportArray"),scale:d.this("scale"),align:d.prop("align"),baseline:d.prop("baseline"),translate:d.this("translate"),positionOffset:d.prop("positionOffset")},primitive:"points",viewport:d.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2691,17 +2691,17 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),g={};return{regl:d,draw:u,atlas:g}},E.prototype.update=function(d){var u=this;if(typeof d=="string")d={text:d};else if(!d)return;d=_(d,{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),d.opacity!=null&&(Array.isArray(d.opacity)?this.opacity=d.opacity.map(function(ne){return parseFloat(ne)}):this.opacity=parseFloat(d.opacity)),d.viewport!=null&&(this.viewport=a(d.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]),d.kerning!=null&&(this.kerning=d.kerning),d.offset!=null&&(typeof d.offset=="number"&&(d.offset=[d.offset,0]),this.positionOffset=c(d.offset)),d.direction&&(this.direction=d.direction),d.range&&(this.range=d.range,this.scale=[1/(d.range[2]-d.range[0]),1/(d.range[3]-d.range[1])],this.translate=[-d.range[0],-d.range[1]]),d.scale&&(this.scale=d.scale),d.translate&&(this.translate=d.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!d.font&&(d.font=E.baseFontSize+"px sans-serif");var g=!1,y=!1;if(d.font&&(Array.isArray(d.font)?d.font:[d.font]).forEach(function(ne,Ce){if(typeof ne=="string")try{ne=v.parse(ne)}catch{ne=v.parse(E.baseFontSize+"px "+ne)}else{var Ze=ne.style,rt=ne.weight,Je=ne.stretch,St=ne.variant;ne=v.parse(v.stringify(ne)),Ze&&(ne.style=Ze),rt&&(ne.weight=rt),Je&&(ne.stretch=Je),St&&(ne.variant=St)}var kt=v.stringify({size:E.baseFontSize,family:ne.family,stretch:w?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style}),Bt=n(ne.size),Vt=Math.round(Bt[0]*s(Bt[1]));if(Vt!==u.fontSize[Ce]&&(y=!0,u.fontSize[Ce]=Vt),(!u.font[Ce]||kt!=u.font[Ce].baseString)&&(g=!0,u.font[Ce]=E.fonts[kt],!u.font[Ce])){var Ar=ne.family.join(", "),vr=[ne.style];ne.style!=ne.variant&&vr.push(ne.variant),ne.variant!=ne.weight&&vr.push(ne.weight),w&&ne.weight!=ne.stretch&&vr.push(ne.stretch),u.font[Ce]={baseString:kt,family:Ar,weight:ne.weight,stretch:ne.stretch,style:ne.style,variant:ne.variant,width:{},kerning:{},metrics:m(Ar,{origin:"top",fontSize:E.baseFontSize,fontStyle:vr.join(" ")})},E.fonts[kt]=u.font[Ce]}}),(g||y)&&this.font.forEach(function(ne,Ce){var Ze=v.stringify({size:u.fontSize[Ce],family:ne.family,stretch:w?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style});if(u.fontAtlas[Ce]=u.shader.atlas[Ze],!u.fontAtlas[Ce]){var rt=ne.metrics;u.shader.atlas[Ze]=u.fontAtlas[Ce]={fontString:Ze,step:Math.ceil(u.fontSize[Ce]*rt.bottom*.5)*2,em:u.fontSize[Ce],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}d.text==null&&(d.text=u.text)}),typeof d.text=="string"&&d.position&&d.position.length>2){for(var D=Array(d.position.length*.5),P=0;P2){for(var N=!d.position[0].length,O=o.mallocFloat(this.count*2),L=0,U=0;L1?u.align[Ce]:u.align[0]:u.align;if(typeof Ze=="number")return Ze;switch(Ze){case"right":case"end":return-ne;case"center":case"centre":case"middle":return-ne*.5}return 0})),this.baseline==null&&d.baseline==null&&(d.baseline=0),d.baseline!=null&&(this.baseline=d.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,Ce){var Ze=(u.font[Ce]||u.font[0]).metrics,rt=0;return rt+=Ze.bottom*.5,typeof ne=="number"?rt+=ne-Ze.baseline:rt+=-Ze[ne],rt*=-1,rt})),d.color!=null)if(d.color||(d.color="transparent"),typeof d.color=="string"||!isNaN(d.color))this.color=t(d.color,"uint8");else{var Re;if(typeof d.color[0]=="number"&&d.color.length>this.counts.length){var Pe=d.color.length;Re=o.mallocUint8(Pe);for(var je=(d.color.subarray||d.color.slice).bind(d.color),at=0;at4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Ve){var he=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(he);for(var se=0;se1?this.counts[se]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[se]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(se*4,se*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[se]:this.opacity,baseline:this.baselineOffset[se]!=null?this.baselineOffset[se]:this.baselineOffset[0],align:this.align?this.alignOffset[se]!=null?this.alignOffset[se]:this.alignOffset[0]:0,atlas:this.fontAtlas[se]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(se*2,se*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 p(b){return typeof b=="function"&&b._gl&&b.prop&&b.texture&&b.buffer}q.exports=E}}),Pq=He({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?q.exports=_():v.createREGL=_()})(Z,function(){"use strict";var v=function(it,Xt){for(var fr=Object.keys(Xt),oa=0;oa1&&Xt===fr&&(Xt==='"'||Xt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var Ta=it.split(".");if(Ta.length===1)return['"'+r(it)+'"'];for(var ma=[],xa=0;xa"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Xt=="string"?fr=document.querySelector(Xt):typeof Xt=="object"&&(x(Xt)?fr=Xt:w(Xt)?(ma=Xt,Ta=ma.canvas):("gl"in Xt?ma=Xt.gl:"canvas"in Xt?Ta=E(Xt.canvas):"container"in Xt&&(oa=E(Xt.container)),"attributes"in Xt&&(xa=Xt.attributes),"extensions"in Xt&&(Ya=A(Xt.extensions)),"optionalExtensions"in Xt&&(bi=A(Xt.optionalExtensions)),"onDone"in Xt&&(zi=Xt.onDone),"profile"in Xt&&(si=!!Xt.profile),"pixelRatio"in Xt&&(yi=+Xt.pixelRatio),"cachedCode"in Xt&&(gn=Xt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Ta=fr:oa=fr),!ma){if(!Ta){var Na=T(oa||document.body,zi,yi);if(!Na)return null;Ta=Na.canvas,Ei=Na.onDestroy}xa.premultipliedAlpha===void 0&&(xa.premultipliedAlpha=!0),ma=l(Ta,xa)}return ma?{gl:ma,canvas:Ta,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:gn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Xt){var fr={};function oa(xa){var Ya=xa.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var Ta=0;Ta65535)<<4,it>>>=Xt,fr=(it>255)<<3,it>>>=fr,Xt|=fr,fr=(it>15)<<2,it>>>=fr,Xt|=fr,fr=(it>3)<<1,it>>>=fr,Xt|=fr,Xt|it>>1}function L(){var it=d(8,function(){return[]});function Xt(ma){var xa=N(ma),Ya=it[O(xa)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(xa)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,xa){var Ya=null;switch(ma){case u:Ya=new Int8Array(Xt(xa),0,xa);break;case g:Ya=new Uint8Array(Xt(xa),0,xa);break;case y:Ya=new Int16Array(Xt(2*xa),0,xa);break;case D:Ya=new Uint16Array(Xt(2*xa),0,xa);break;case P:Ya=new Int32Array(Xt(4*xa),0,xa);break;case z:Ya=new Uint32Array(Xt(4*xa),0,xa);break;case F:Ya=new Float32Array(Xt(4*xa),0,xa);break;default:return null}return Ya.length!==xa?Ya.subarray(0,xa):Ya}function Ta(ma){fr(ma.buffer)}return{alloc:Xt,free:fr,allocType:oa,freeType:Ta}}var U=L();U.zero=L();var B=3408,W=3410,$=3411,ue=3412,ce=3413,de=3414,Y=3415,X=33901,Q=33902,V=3379,le=3386,ae=34921,j=36347,ee=36348,te=35661,pe=35660,we=34930,Se=36349,Re=34076,Pe=34024,je=7936,at=7937,nt=7938,tt=35724,Ve=34047,he=36063,se=34852,ne=3553,Ce=34067,Ze=34069,rt=33984,Je=6408,St=5126,kt=5121,Bt=36160,Vt=36053,Ar=36064,vr=16384,qr=function(it,Xt){var fr=1;Xt.ext_texture_filter_anisotropic&&(fr=it.getParameter(Ve));var oa=1,Ta=1;Xt.webgl_draw_buffers&&(oa=it.getParameter(se),Ta=it.getParameter(he));var ma=!!Xt.oes_texture_float;if(ma){var xa=it.createTexture();it.bindTexture(ne,xa),it.texImage2D(ne,0,Je,1,1,0,Je,St,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Bt,Ya),it.framebufferTexture2D(Bt,Ar,ne,xa,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Bt)!==Vt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(vr);var bi=U.allocType(St,4);it.readPixels(0,0,1,1,Je,St,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(xa),ma=bi[0]===1),U.freeType(bi)}}var yi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),si=!0;if(!yi){var gn=it.createTexture(),zi=U.allocType(kt,36);it.activeTexture(rt),it.bindTexture(Ce,gn),it.texImage2D(Ze,0,Je,3,3,0,Je,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(W),it.getParameter($),it.getParameter(ue),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(Y),subpixelBits:it.getParameter(B),extensions:Object.keys(Xt).filter(function(Ei){return!!Xt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:Ta,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(Q),maxViewportDims:it.getParameter(le),maxCombinedTextureUnits:it.getParameter(te),maxCubeMapSize:it.getParameter(Re),maxRenderbufferSize:it.getParameter(Pe),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(V),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(je),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},kr=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function Ur(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||kr(it.data))}var _t=function(it){return Object.keys(it).map(function(Xt){return it[Xt]})},Fe={shape:st,flatten:Ke};function Ye(it,Xt,fr){for(var oa=0;oa0){var hn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua0){if(typeof Ha[0]=="number"){var Ti=U.allocType(Va.dtype,Ha.length);Fr(Ti,Ha),Li(Ti,Yi),U.freeType(Ti)}else if(Array.isArray(Ha[0])||kr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ur(Ha)){Ri=Ha.shape;var Xi=Ha.stride,vn=0,Rn=0,Ii=0,nn=0;Ri.length===1?(vn=Ri[0],Rn=1,Ii=Xi[0],nn=0):Ri.length===2&&(vn=Ri[0],Rn=Ri[1],Ii=Xi[0],nn=Xi[1]);var Cn=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(Cn,vn*Rn);ta(Dn,Ha.data,vn,Rn,Ii,nn,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=hn,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Xt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof xa?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ia={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rn=0,tn=1,cn=4,xt=5120,ut=5121,Or=5122,Cr=5123,wr=5124,Rr=5125,Nr=34963,Hr=35040,gt=35044;function Kt(it,Xt,fr,oa){var Ta={},ma=0,xa={uint8:ut,uint16:Cr};Xt.oes_element_index_uint&&(xa.uint32=Rr);function Ya(Na){this.id=ma++,Ta[this.id]=this,this.buffer=Na,this.primType=cn,this.vertCount=0,this.type=0}Ya.prototype.bind=function(){this.buffer.bind()};var bi=[];function yi(Na){var ea=bi.pop();return ea||(ea=new Ya(fr.create(null,Nr,!0,!1)._buffer)),gn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function gn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var hn=Bi;!Bi&&(!kr(ea)||Ur(ea)&&!kr(ea.data))&&(hn=Xt.oes_element_index_uint?Rr:Cr),fr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Nr,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case xt:Li=ut;break;case Cr:case Or:Li=Cr;break;case Rr:case wr:Li=Rr;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Rr&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=cn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=rn),Yi===2&&(Ua=tn),Yi===3&&(Ua=cn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete Ta[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Nr,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=cn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=cn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||kr(Va)||Ur(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ia[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=xa[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Or?Ua*=2:(Yi===Rr||Yi===wr)&&(Ua*=4))),gn(Qa,Bi,Li,hn,Ha,Ua,Yi)}return di}return di(Na),di._reglType="elements",di._elements=Qa,di.subdata=function(Va,Bi){return Ma.subdata(Va,Bi),di},di.destroy=function(){zi(Qa)},di}return{create:Ei,createStream:yi,destroyStream:si,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof Ya?Na._elements:null},clear:function(){_t(Ta).forEach(zi)}}}var mr=new Float32Array(1),Ir=new Uint32Array(mr.buffer),va=5123;function Pa(it){for(var Xt=U.allocType(va,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,xa=oa>>13&1023;if(ma<-24)Xt[fr]=Ta;else if(ma<-14){var Ya=-14-ma;Xt[fr]=Ta+(xa+1024>>Ya)}else ma>15?Xt[fr]=Ta+31744:Xt[fr]=Ta+(ma+15<<10)+xa}return Xt}function ga(it){return Array.isArray(it)||kr(it)}var la=34467,ba=3553,Ai=34067,ki=34069,Ki=6408,Mn=6406,wn=6407,On=6409,En=6410,ao=32854,Co=32855,bo=36194,zs=32819,kn=32820,wo=33635,Zn=34042,go=6402,os=34041,ys=35904,jo=35906,Yn=36193,Gn=33776,Hn=33777,ss=33778,_s=33779,ps=35986,Ko=35987,Gi=34798,Pn=35840,qs=35841,bs=35842,lo=35843,Zo=36196,ws=5121,Hs=5123,il=5125,yn=5126,Po=10242,To=10243,Ws=10497,Ll=33071,uo=33648,Nl=10240,Ks=10241,Ts=9728,Ls=9729,Jo=9984,Es=9985,Ul=9986,lu=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Wc=37440,uu=37441,Pl=37443,ic=37444,Ou=33984,nl=[Jo,Ul,Es,lu],vl=[0,On,En,wn,Ki],As={};As[On]=As[Mn]=As[go]=1,As[os]=As[En]=2,As[wn]=As[ys]=3,As[Ki]=As[jo]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),jl=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),us=Xs("HTMLVideoElement"),bh=Object.keys(ot).concat([nc,jl,qu,fl,xh,us]),Ps=[];Ps[ws]=1,Ps[yn]=4,Ps[Yn]=2,Ps[Hs]=2,Ps[il]=4;var to=[];to[ao]=2,to[Co]=2,to[bo]=2,to[os]=4,to[Gn]=.5,to[Hn]=.5,to[ss]=1,to[_s]=1,to[ps]=.5,to[Ko]=1,to[Gi]=1,to[Pn]=.5,to[qs]=.25,to[bs]=.5,to[lo]=.25,to[Zo]=.5;function Xc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Xt=it.length;return!(Xt===0||!ga(it[0]))}function ql(it){return Object.prototype.toString.call(it)}function Mf(it){return ql(it)===nc}function Ac(it){return ql(it)===jl}function nf(it){return ql(it)===qu}function Ql(it){return ql(it)===fl}function Jf(it){return ql(it)===xh}function Of(it){return ql(it)===us}function of(it){if(!it)return!1;var Xt=ql(it);return bh.indexOf(Xt)>=0?!0:Xc(it)||Vu(it)||Ur(it)}function jc(it){return ot[Object.prototype.toString.call(it)]|0}function Bf(it,Xt){var fr=Xt.length;switch(it.type){case ws:case Hs:case il:case yn:var oa=U.allocType(it.type,fr);oa.set(Xt),it.data=oa;break;case Yn:it.data=Pa(Xt);break;default:}}function Nf(it,Xt){return U.allocType(it.type===Yn?yn:it.type,Xt)}function Gu(it,Xt){it.type===Yn?(it.data=Pa(Xt),U.freeType(Xt)):it.data=Xt}function Ef(it,Xt,fr,oa,Ta,ma){for(var xa=it.width,Ya=it.height,bi=it.channels,yi=xa*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=xa*bi*bi,bi/=2;return Ya}else return xa*fr*oa}function Zc(it,Xt,fr,oa,Ta,ma,xa){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Ws,clamp:Ll,mirror:uo},yi={nearest:Ts,linear:Ls},si=v({mipmap:lu,"nearest mipmap nearest":Jo,"linear mipmap nearest":Es,"nearest mipmap linear":Ul,"linear mipmap linear":lu},yi),gn={none:0,browser:ic},zi={uint8:ws,rgba4:zs,rgb565:wo,"rgb5 a1":kn},Ei={alpha:Mn,luminance:On,"luminance alpha":En,rgb:wn,rgba:Ki,rgba4:ao,"rgb5 a1":Co,rgb565:bo},Na={};Xt.ext_srgb&&(Ei.srgb=ys,Ei.srgba=jo),Xt.oes_texture_float&&(zi.float32=zi.float=yn),Xt.oes_texture_half_float&&(zi.float16=zi["half float"]=Yn),Xt.webgl_depth_texture&&(v(Ei,{depth:go,"depth stencil":os}),v(zi,{uint16:Hs,uint32:il,"depth stencil":Zn})),Xt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":Hn,"rgba s3tc dxt3":ss,"rgba s3tc dxt5":_s}),Xt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":ps,"rgba atc explicit alpha":Ko,"rgba atc interpolated alpha":Gi}),Xt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":bs,"rgba pvrtc 2bppv1":lo}),Xt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Zo);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(ke){var Qe=Na[ke];ea.indexOf(Qe)>=0&&(Ei[ke]=Qe)});var Ma=Object.keys(Ei);fr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(ke){var Qe=Ei[ke];Qa[Qe]=ke});var di=[];Object.keys(zi).forEach(function(ke){var Qe=zi[ke];di[Qe]=ke});var Va=[];Object.keys(yi).forEach(function(ke){var Qe=yi[ke];Va[Qe]=ke});var Bi=[];Object.keys(si).forEach(function(ke){var Qe=si[ke];Bi[Qe]=ke});var Li=[];Object.keys(bi).forEach(function(ke){var Qe=bi[ke];Li[Qe]=ke});var hn=Ma.reduce(function(ke,Qe){var vt=Ei[Qe];return vt===On||vt===Mn||vt===On||vt===En||vt===go||vt===os||Xt.ext_srgb&&(vt===ys||vt===jo)?ke[vt]=vt:vt===Co||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=wn,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ws,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 Ua(ke,Qe){ke.internalformat=Qe.internalformat,ke.format=Qe.format,ke.type=Qe.type,ke.compressed=Qe.compressed,ke.premultiplyAlpha=Qe.premultiplyAlpha,ke.flipY=Qe.flipY,ke.unpackAlignment=Qe.unpackAlignment,ke.colorSpace=Qe.colorSpace,ke.width=Qe.width,ke.height=Qe.height,ke.channels=Qe.channels}function Yi(ke,Qe){if(!(typeof Qe!="object"||!Qe)){if("premultiplyAlpha"in Qe&&(ke.premultiplyAlpha=Qe.premultiplyAlpha),"flipY"in Qe&&(ke.flipY=Qe.flipY),"alignment"in Qe&&(ke.unpackAlignment=Qe.alignment),"colorSpace"in Qe&&(ke.colorSpace=gn[Qe.colorSpace]),"type"in Qe){var vt=Qe.type;ke.type=zi[vt]}var qt=ke.width,br=ke.height,Br=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],br=Qe.shape[1],Qe.shape.length===3&&(Br=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=br=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(br=Qe.height),"channels"in Qe&&(Br=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=br|0,ke.channels=Br|0;var mt=!1;if("format"in Qe){var Mt=Qe.format,Ft=ke.internalformat=Ei[Mt];ke.format=hn[Ft],Mt in zi&&("type"in Qe||(ke.type=zi[Mt])),Mt in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=As[ke.format]:pr&&!mt&&ke.channels!==vl[ke.format]&&(ke.format=ke.internalformat=vl[ke.channels])}}function Ri(ke){it.pixelStorei(Wc,ke.flipY),it.pixelStorei(uu,ke.premultiplyAlpha),it.pixelStorei(Pl,ke.colorSpace),it.pixelStorei(dc,ke.unpackAlignment)}function Ti(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xi(ke,Qe){var vt=null;if(of(Qe)?vt=Qe:Qe&&(Yi(ke,Qe),"x"in Qe&&(ke.xOffset=Qe.x|0),"y"in Qe&&(ke.yOffset=Qe.y|0),of(Qe.data)&&(vt=Qe.data)),Qe.copy){var qt=Ta.viewportWidth,br=Ta.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||br-ke.yOffset,ke.needsCopy=!0}else if(!vt)ke.width=ke.width||1,ke.height=ke.height||1,ke.channels=ke.channels||4;else if(kr(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ws&&(ke.type=jc(vt));else if(Xc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ur(vt)){var Br=vt.data;!Array.isArray(Br)&&ke.type===ws&&(ke.type=jc(Br));var pr=vt.shape,mt=vt.stride,Mt,Ft,rr,hr,sr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),Mt=pr[0],Ft=pr[1],hr=mt[0],sr=mt[1],ke.alignment=1,ke.width=Mt,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=vl[rr],ke.needsFree=!0,Ef(ke,Br,hr,sr,dr,vt.offset)}else if(Mf(vt)||Ac(vt)||nf(vt))Mf(vt)||Ac(vt)?ke.element=vt:ke.element=vt.canvas,ke.width=ke.element.width,ke.height=ke.element.height,ke.channels=4;else if(Ql(vt))ke.element=vt,ke.width=vt.width,ke.height=vt.height,ke.channels=4;else if(Jf(vt))ke.element=vt,ke.width=vt.naturalWidth,ke.height=vt.naturalHeight,ke.channels=4;else if(Of(vt))ke.element=vt,ke.width=vt.videoWidth,ke.height=vt.videoHeight,ke.channels=4;else if(Vu(vt)){var lr=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ga(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Gt=Fe.shape(vt),Dr=1,Jr=0;Jr>=br,vt.height>>=br,xi(vt,qt[br]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var br=ke.wrapS,Br=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?br=Br=bi[pr]:Array.isArray(pr)&&(br=bi[pr[0]],Br=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;br=bi[mt]}if("wrapT"in Qe){var Mt=Qe.wrapT;Br=bi[Mt]}}if(ke.wrapS=br,ke.wrapT=Br,"anisotropic"in Qe){var Ft=Qe.anisotropic;ke.anisotropic=Qe.anisotropic}if("mipmap"in Qe){var rr=!1;switch(typeof Qe.mipmap){case"string":ke.mipmapHint=Ya[Qe.mipmap],ke.genMipmaps=!0,rr=!0;break;case"boolean":rr=ke.genMipmaps=Qe.mipmap;break;case"object":ke.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Qe)&&(ke.minFilter=Jo)}}function El(ke,Qe){it.texParameteri(Qe,Ks,ke.minFilter),it.texParameteri(Qe,Nl,ke.magFilter),it.texParameteri(Qe,Po,ke.wrapS),it.texParameteri(Qe,To,ke.wrapT),Xt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var ru=0,js={},pl=fr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Xn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=ru++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,xa.profile&&(this.stats={size:0})}function kl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Io(){var ke=bl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(ba,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),bl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete js[ke.id],ma.textureCount--}v(Xn.prototype,{bind:function(){var ke=this;ke.bindCount+=1;var Qe=ke.unit;if(Qe<0){for(var vt=0;vt0)continue;qt.unit=-1}bl[vt]=ke,Qe=vt;break}Qe>=pl,xa.profile&&ma.maxTextureUnits>sr)-rr,dr.height=dr.height||(vt.height>>sr)-hr,kl(vt),vn(dr,ba,rr,hr,sr),Io(),nn(dr),qt}function Br(pr,mt){var Mt=pr|0,Ft=mt|0||Mt;if(Mt===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=Mt,qt.height=vt.height=Ft,kl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=Mt>>rr,sr=Ft>>rr;if(!hr||!sr)break;it.texImage2D(ba,rr,vt.format,hr,sr,0,vt.format,vt.type,null)}return Io(),xa.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Mt,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=br,qt.resize=Br,qt._reglType="texture2d",qt._texture=vt,xa.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,br,Br){var pr=new Xn(Ai);js[pr.id]=pr,ma.cubeCount++;var mt=new Array(6);function Mt(hr,sr,dr,lr,Wt,ir){var Gt,Dr=pr.texInfo;for(hs.call(Dr),Gt=0;Gt<6;++Gt)mt[Gt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Gt=0;Gt<6;++Gt)Dn(mt[Gt],Jr,Jr)}else if(typeof hr=="object")if(sr)Wn(mt[0],hr),Wn(mt[1],sr),Wn(mt[2],dr),Wn(mt[3],lr),Wn(mt[4],Wt),Wn(mt[5],ir);else if(Al(Dr,hr),Yi(pr,hr),"faces"in hr){var ya=hr.faces;for(Gt=0;Gt<6;++Gt)Ua(mt[Gt],pr),Wn(mt[Gt],ya[Gt])}else for(Gt=0;Gt<6;++Gt)Wn(mt[Gt],hr);for(Ua(pr,mt[0]),Dr.genMipmaps?pr.mipmask=(mt[0].width<<1)-1:pr.mipmask=mt[0].mipmask,pr.internalformat=mt[0].internalformat,Mt.width=mt[0].width,Mt.height=mt[0].height,kl(pr),Gt=0;Gt<6;++Gt)Os(mt[Gt],ki+Gt);for(El(Dr,Ai),Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,Dr.genMipmaps,!0)),Mt.format=Qa[pr.internalformat],Mt.type=di[pr.type],Mt.mag=Va[Dr.magFilter],Mt.min=Bi[Dr.minFilter],Mt.wrapS=Li[Dr.wrapS],Mt.wrapT=Li[Dr.wrapT],Gt=0;Gt<6;++Gt)Xl(mt[Gt]);return Mt}function Ft(hr,sr,dr,lr,Wt){var ir=dr|0,Gt=lr|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,sr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Gt,kl(pr),vn(Jr,ki+hr,ir,Gt,Dr),Io(),nn(Jr),Mt}function rr(hr){var sr=hr|0;if(sr!==pr.width){Mt.width=pr.width=sr,Mt.height=pr.height=sr,kl(pr);for(var dr=0;dr<6;++dr)for(var lr=0;pr.mipmask>>lr;++lr)it.texImage2D(ki+dr,lr,pr.format,sr>>lr,sr>>lr,0,pr.format,pr.type,null);return Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(ke,Qe,vt,qt,br,Br),Mt.subimage=Ft,Mt.resize=rr,Mt._reglType="textureCube",Mt._texture=pr,xa.profile&&(Mt.stats=pr.stats),Mt.destroy=function(){pr.decRef()},Mt}function re(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var br=0;br<6;++br)it.texImage2D(ki+br,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);El(vt.texInfo,vt.target)})}function Ue(){for(var ke=0;ke=0?Xl=!0:bi.indexOf(hs)>=0&&(Xl=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(bl=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Os=Xn.depth:(ru=Xn.depth,xl=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?xl=Xn.stencil:(js=Xn.stencil,Os=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Os=xl=Xn.depthStencil:(pl=Xn.depthStencil,Os=!1,xl=!1))}var Io=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Io=ho.map(Na);else if(ho)Io=[Na(ho)];else for(Io=new Array(El),Cn=0;Cn0&&(nn.depth=xi[0].depth,nn.stencil=xi[0].stencil,nn.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](nn):xi[Ii]=Ua(nn)}return v(Xi,{width:Cn,height:Cn,color:hs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var Cn=Xi.color;for(Ii=0;Ii=Cn.byteLength?Dn.subdata(Cn):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=Ta.create(Ii,mf,!1,!0)),nn.buffer=Ta.getBuffer(Dn),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,Xi[Rn]=1}else Ta.getBuffer(Ii)?(nn.buffer=Ta.getBuffer(Ii),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):Ta.getBuffer(Ii.buffer)?(nn.buffer=Ta.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=_a[Ii.type]:nn.type=nn.buffer.dtype,nn.offset=(Ii.offset||0)|0,nn.stride=(Ii.stride||0)|0,nn.divisor=(Ii.divisor||0)|0,nn.state=1):"x"in Ii&&(nn.x=+Ii.x||0,nn.y=+Ii.y||0,nn.z=+Ii.z||0,nn.w=+Ii.w||0,nn.state=2)}for(var Wn=0;Wn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){Ta={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),Ta=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,Ta[ma]=fr[ma]^1549556828;var xa=Pi(oa.concat(Pc(Xt)),512+Xt.length*8);return Qt(Pi(Ta.concat(xa),768))}function xu(it){for(var Xt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,Ta=0;Ta>>4&15)+Xt.charAt(oa&15);return fr}function Lc(it){for(var Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,Ta=0;Tait.length*8?fr+=Xu:fr+=Xt.charAt(ma>>>6*(3-xa)&63);return fr}function $c(it,Xt){var fr=Xt.length,oa=Array(),Ta,ma,xa,Ya,bi=Array(Math.ceil(it.length/2));for(Ta=0;Ta0;){for(Ya=Array(),xa=0,Ta=0;Ta0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=xa,bi=Ya}var yi="";for(Ta=oa.length-1;Ta>=0;Ta--)yi+=Xt.charAt(oa[Ta]);var si=Math.ceil(it.length*8/(Math.log(Xt.length)/Math.log(2)));for(Ta=yi.length;Ta>>6&31,128|oa&63):oa<=65535?Xt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Xt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Xt}function Pc(it){for(var Xt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Xt}function Qt(it){for(var Xt="",fr=0;fr>5]>>>24-fr%32&255);return Xt}function xr(it,Xt){return it>>>Xt|it<<32-Xt}function aa(it,Xt){return it>>>Xt}function $r(it,Xt,fr){return it&Xt^~it&fr}function ka(it,Xt,fr){return it&Xt^it&fr^Xt&fr}function li(it){return xr(it,2)^xr(it,13)^xr(it,22)}function Ci(it){return xr(it,6)^xr(it,11)^xr(it,25)}function Hi(it){return xr(it,7)^xr(it,18)^aa(it,3)}function Qi(it){return xr(it,17)^xr(it,19)^aa(it,10)}var pn=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 Pi(it,Xt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Xt>>5]|=128<<24-Xt%32,it[(Xt+64>>9<<4)+15]=Xt,zi=0;zi>16)+(Xt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Sn(it){var Xt=it&&it.cache,fr=0,oa=[],Ta=[],ma=[];function xa(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return v(ea,{def:Qa,toString:function(){return mi([Ma.length>0?"var "+Ma.join(",")+";":"",mi(Na)])}})}function bi(){var Na=Ya(),ea=Ya(),Ma=Na.toString,Qa=ea.toString;function di(Va,Bi){ea(Va,Bi,"=",Na.def(Va,Bi),";")}return v(function(){Na.apply(Na,Ni(arguments))},{def:Na.def,entry:Na,exit:ea,save:di,set:function(Va,Bi,Li){di(Va,Bi),Na(Va,Bi,"=",Li,";")},toString:function(){return Ma()+Qa()}})}function yi(){var Na=mi(arguments),ea=bi(),Ma=bi(),Qa=ea.toString,di=Ma.toString;return v(ea,{then:function(){return ea.apply(ea,Ni(arguments)),this},else:function(){return Ma.apply(Ma,Ni(arguments)),this},toString:function(){var Va=di();return Va&&(Va="else{"+Va+"}"),mi(["if(",Na,"){",Qa(),"}",Va])}})}var si=Ya(),gn={};function zi(Na,ea){var Ma=[];function Qa(){var hn="a"+Ma.length;return Ma.push(hn),hn}ea=ea||0;for(var di=0;di2){for(var D=Array(d.position.length*.5),P=0;P2){for(var N=!d.position[0].length,O=o.mallocFloat(this.count*2),L=0,U=0;L1?u.align[Ce]:u.align[0]:u.align;if(typeof Ze=="number")return Ze;switch(Ze){case"right":case"end":return-ne;case"center":case"centre":case"middle":return-ne*.5}return 0})),this.baseline==null&&d.baseline==null&&(d.baseline=0),d.baseline!=null&&(this.baseline=d.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,Ce){var Ze=(u.font[Ce]||u.font[0]).metrics,rt=0;return rt+=Ze.bottom*.5,typeof ne=="number"?rt+=ne-Ze.baseline:rt+=-Ze[ne],rt*=-1,rt})),d.color!=null)if(d.color||(d.color="transparent"),typeof d.color=="string"||!isNaN(d.color))this.color=t(d.color,"uint8");else{var Re;if(typeof d.color[0]=="number"&&d.color.length>this.counts.length){var Pe=d.color.length;Re=o.mallocUint8(Pe);for(var je=(d.color.subarray||d.color.slice).bind(d.color),at=0;at4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Ve){var he=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(he);for(var se=0;se1?this.counts[se]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[se]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(se*4,se*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[se]:this.opacity,baseline:this.baselineOffset[se]!=null?this.baselineOffset[se]:this.baselineOffset[0],align:this.align?this.alignOffset[se]!=null?this.alignOffset[se]:this.alignOffset[0]:0,atlas:this.fontAtlas[se]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(se*2,se*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 p(b){return typeof b=="function"&&b._gl&&b.prop&&b.texture&&b.buffer}q.exports=E}}),Pq=He({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?q.exports=_():v.createREGL=_()})(Z,function(){"use strict";var v=function(it,Xt){for(var fr=Object.keys(Xt),oa=0;oa1&&Xt===fr&&(Xt==='"'||Xt==="'"))return['"'+r(it.substr(1,it.length-2))+'"'];var oa=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(oa)return o(it.substr(0,oa.index)).concat(o(oa[1])).concat(o(it.substr(oa.index+oa[0].length)));var Ta=it.split(".");if(Ta.length===1)return['"'+r(it)+'"'];for(var ma=[],xa=0;xa"u"?1:window.devicePixelRatio,si=!1,gn={},zi=function(ea){},Ei=function(){};if(typeof Xt=="string"?fr=document.querySelector(Xt):typeof Xt=="object"&&(x(Xt)?fr=Xt:w(Xt)?(ma=Xt,Ta=ma.canvas):("gl"in Xt?ma=Xt.gl:"canvas"in Xt?Ta=E(Xt.canvas):"container"in Xt&&(oa=E(Xt.container)),"attributes"in Xt&&(xa=Xt.attributes),"extensions"in Xt&&(Ya=A(Xt.extensions)),"optionalExtensions"in Xt&&(bi=A(Xt.optionalExtensions)),"onDone"in Xt&&(zi=Xt.onDone),"profile"in Xt&&(si=!!Xt.profile),"pixelRatio"in Xt&&(yi=+Xt.pixelRatio),"cachedCode"in Xt&&(gn=Xt.cachedCode))),fr&&(fr.nodeName.toLowerCase()==="canvas"?Ta=fr:oa=fr),!ma){if(!Ta){var Na=T(oa||document.body,zi,yi);if(!Na)return null;Ta=Na.canvas,Ei=Na.onDestroy}xa.premultipliedAlpha===void 0&&(xa.premultipliedAlpha=!0),ma=l(Ta,xa)}return ma?{gl:ma,canvas:Ta,container:oa,extensions:Ya,optionalExtensions:bi,pixelRatio:yi,profile:si,cachedCode:gn,onDone:zi,onDestroy:Ei}:(Ei(),zi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(it,Xt){var fr={};function oa(xa){var Ya=xa.toLowerCase(),bi;try{bi=fr[Ya]=it.getExtension(Ya)}catch{}return!!bi}for(var Ta=0;Ta65535)<<4,it>>>=Xt,fr=(it>255)<<3,it>>>=fr,Xt|=fr,fr=(it>15)<<2,it>>>=fr,Xt|=fr,fr=(it>3)<<1,it>>>=fr,Xt|=fr,Xt|it>>1}function L(){var it=d(8,function(){return[]});function Xt(ma){var xa=N(ma),Ya=it[O(xa)>>2];return Ya.length>0?Ya.pop():new ArrayBuffer(xa)}function fr(ma){it[O(ma.byteLength)>>2].push(ma)}function oa(ma,xa){var Ya=null;switch(ma){case u:Ya=new Int8Array(Xt(xa),0,xa);break;case g:Ya=new Uint8Array(Xt(xa),0,xa);break;case y:Ya=new Int16Array(Xt(2*xa),0,xa);break;case D:Ya=new Uint16Array(Xt(2*xa),0,xa);break;case P:Ya=new Int32Array(Xt(4*xa),0,xa);break;case z:Ya=new Uint32Array(Xt(4*xa),0,xa);break;case F:Ya=new Float32Array(Xt(4*xa),0,xa);break;default:return null}return Ya.length!==xa?Ya.subarray(0,xa):Ya}function Ta(ma){fr(ma.buffer)}return{alloc:Xt,free:fr,allocType:oa,freeType:Ta}}var U=L();U.zero=L();var B=3408,W=3410,$=3411,ue=3412,ce=3413,de=3414,Y=3415,X=33901,Q=33902,V=3379,le=3386,ae=34921,j=36347,ee=36348,te=35661,pe=35660,we=34930,Se=36349,Re=34076,Pe=34024,je=7936,at=7937,nt=7938,tt=35724,Ve=34047,he=36063,se=34852,ne=3553,Ce=34067,Ze=34069,rt=33984,Je=6408,St=5126,kt=5121,Bt=36160,Vt=36053,Ar=36064,vr=16384,qr=function(it,Xt){var fr=1;Xt.ext_texture_filter_anisotropic&&(fr=it.getParameter(Ve));var oa=1,Ta=1;Xt.webgl_draw_buffers&&(oa=it.getParameter(se),Ta=it.getParameter(he));var ma=!!Xt.oes_texture_float;if(ma){var xa=it.createTexture();it.bindTexture(ne,xa),it.texImage2D(ne,0,Je,1,1,0,Je,St,null);var Ya=it.createFramebuffer();if(it.bindFramebuffer(Bt,Ya),it.framebufferTexture2D(Bt,Ar,ne,xa,0),it.bindTexture(ne,null),it.checkFramebufferStatus(Bt)!==Vt)ma=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(vr);var bi=U.allocType(St,4);it.readPixels(0,0,1,1,Je,St,bi),it.getError()?ma=!1:(it.deleteFramebuffer(Ya),it.deleteTexture(xa),ma=bi[0]===1),U.freeType(bi)}}var yi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),si=!0;if(!yi){var gn=it.createTexture(),zi=U.allocType(kt,36);it.activeTexture(rt),it.bindTexture(Ce,gn),it.texImage2D(Ze,0,Je,3,3,0,Je,kt,zi),U.freeType(zi),it.bindTexture(Ce,null),it.deleteTexture(gn),si=!it.getError()}return{colorBits:[it.getParameter(W),it.getParameter($),it.getParameter(ue),it.getParameter(ce)],depthBits:it.getParameter(de),stencilBits:it.getParameter(Y),subpixelBits:it.getParameter(B),extensions:Object.keys(Xt).filter(function(Ei){return!!Xt[Ei]}),maxAnisotropic:fr,maxDrawbuffers:oa,maxColorAttachments:Ta,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(Q),maxViewportDims:it.getParameter(le),maxCombinedTextureUnits:it.getParameter(te),maxCubeMapSize:it.getParameter(Re),maxRenderbufferSize:it.getParameter(Pe),maxTextureUnits:it.getParameter(we),maxTextureSize:it.getParameter(V),maxAttributes:it.getParameter(ae),maxVertexUniforms:it.getParameter(j),maxVertexTextureUnits:it.getParameter(pe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(Se),glsl:it.getParameter(tt),renderer:it.getParameter(at),vendor:it.getParameter(je),version:it.getParameter(nt),readFloat:ma,npotTextureCube:si}},kr=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function Ur(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||kr(it.data))}var _t=function(it){return Object.keys(it).map(function(Xt){return it[Xt]})},Fe={shape:st,flatten:Ke};function Ye(it,Xt,fr){for(var oa=0;oa0){var hn;if(Array.isArray(Ma[0])){Li=Ca(Ma);for(var Ha=1,Ua=1;Ua0){if(typeof Ha[0]=="number"){var Ti=U.allocType(Va.dtype,Ha.length);Fr(Ti,Ha),Li(Ti,Yi),U.freeType(Ti)}else if(Array.isArray(Ha[0])||kr(Ha[0])){Ri=Ca(Ha);var xi=Wa(Ha,Ri,Va.dtype);Li(xi,Yi),U.freeType(xi)}}}else if(Ur(Ha)){Ri=Ha.shape;var Xi=Ha.stride,vn=0,Rn=0,Ii=0,nn=0;Ri.length===1?(vn=Ri[0],Rn=1,Ii=Xi[0],nn=0):Ri.length===2&&(vn=Ri[0],Rn=Ri[1],Ii=Xi[0],nn=Xi[1]);var Ln=Array.isArray(Ha.data)?Va.dtype:Jt(Ha.data),Dn=U.allocType(Ln,vn*Rn);ta(Dn,Ha.data,vn,Rn,Ii,nn,Ha.offset),Li(Dn,Yi),U.freeType(Dn)}return Bi}return Qa||Bi(ea),Bi._reglType="buffer",Bi._buffer=Va,Bi.subdata=hn,fr.profile&&(Bi.stats=Va.stats),Bi.destroy=function(){zi(Va)},Bi}function Na(){_t(ma).forEach(function(ea){ea.buffer=it.createBuffer(),it.bindBuffer(ea.type,ea.buffer),it.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return fr.profile&&(Xt.getTotalBufferSize=function(){var ea=0;return Object.keys(ma).forEach(function(Ma){ea+=ma[Ma].stats.size}),ea}),{create:Ei,createStream:bi,destroyStream:yi,clear:function(){_t(ma).forEach(zi),Ya.forEach(zi)},getBuffer:function(ea){return ea&&ea._buffer instanceof xa?ea._buffer:null},restore:Na,_initBuffer:gn}}var ca=0,Ba=0,$a=1,Za=1,ri=4,pi=4,Ia={points:ca,point:Ba,lines:$a,line:Za,triangles:ri,triangle:pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rn=0,tn=1,cn=4,xt=5120,ut=5121,Or=5122,Cr=5123,wr=5124,Rr=5125,Nr=34963,Hr=35040,gt=35044;function Kt(it,Xt,fr,oa){var Ta={},ma=0,xa={uint8:ut,uint16:Cr};Xt.oes_element_index_uint&&(xa.uint32=Rr);function Ya(Na){this.id=ma++,Ta[this.id]=this,this.buffer=Na,this.primType=cn,this.vertCount=0,this.type=0}Ya.prototype.bind=function(){this.buffer.bind()};var bi=[];function yi(Na){var ea=bi.pop();return ea||(ea=new Ya(fr.create(null,Nr,!0,!1)._buffer)),gn(ea,Na,Hr,-1,-1,0,0),ea}function si(Na){bi.push(Na)}function gn(Na,ea,Ma,Qa,di,Va,Bi){Na.buffer.bind();var Li;if(ea){var hn=Bi;!Bi&&(!kr(ea)||Ur(ea)&&!kr(ea.data))&&(hn=Xt.oes_element_index_uint?Rr:Cr),fr._initBuffer(Na.buffer,ea,Ma,hn,3)}else it.bufferData(Nr,Va,Ma),Na.buffer.dtype=Li||ut,Na.buffer.usage=Ma,Na.buffer.dimension=3,Na.buffer.byteLength=Va;if(Li=Bi,!Bi){switch(Na.buffer.dtype){case ut:case xt:Li=ut;break;case Cr:case Or:Li=Cr;break;case Rr:case wr:Li=Rr;break;default:}Na.buffer.dtype=Li}Na.type=Li;var Ha=di;Ha<0&&(Ha=Na.buffer.byteLength,Li===Cr?Ha>>=1:Li===Rr&&(Ha>>=2)),Na.vertCount=Ha;var Ua=Qa;if(Qa<0){Ua=cn;var Yi=Na.buffer.dimension;Yi===1&&(Ua=rn),Yi===2&&(Ua=tn),Yi===3&&(Ua=cn)}Na.primType=Ua}function zi(Na){oa.elementsCount--,delete Ta[Na.id],Na.buffer.destroy(),Na.buffer=null}function Ei(Na,ea){var Ma=fr.create(null,Nr,!0),Qa=new Ya(Ma._buffer);oa.elementsCount++;function di(Va){if(!Va)Ma(),Qa.primType=cn,Qa.vertCount=0,Qa.type=ut;else if(typeof Va=="number")Ma(Va),Qa.primType=cn,Qa.vertCount=Va|0,Qa.type=ut;else{var Bi=null,Li=gt,hn=-1,Ha=-1,Ua=0,Yi=0;Array.isArray(Va)||kr(Va)||Ur(Va)?Bi=Va:("data"in Va&&(Bi=Va.data),"usage"in Va&&(Li=qa[Va.usage]),"primitive"in Va&&(hn=Ia[Va.primitive]),"count"in Va&&(Ha=Va.count|0),"type"in Va&&(Yi=xa[Va.type]),"length"in Va?Ua=Va.length|0:(Ua=Ha,Yi===Cr||Yi===Or?Ua*=2:(Yi===Rr||Yi===wr)&&(Ua*=4))),gn(Qa,Bi,Li,hn,Ha,Ua,Yi)}return di}return di(Na),di._reglType="elements",di._elements=Qa,di.subdata=function(Va,Bi){return Ma.subdata(Va,Bi),di},di.destroy=function(){zi(Qa)},di}return{create:Ei,createStream:yi,destroyStream:si,getElements:function(Na){return typeof Na=="function"&&Na._elements instanceof Ya?Na._elements:null},clear:function(){_t(Ta).forEach(zi)}}}var mr=new Float32Array(1),Ir=new Uint32Array(mr.buffer),va=5123;function Pa(it){for(var Xt=U.allocType(va,it.length),fr=0;fr>>31<<15,ma=(oa<<1>>>24)-127,xa=oa>>13&1023;if(ma<-24)Xt[fr]=Ta;else if(ma<-14){var Ya=-14-ma;Xt[fr]=Ta+(xa+1024>>Ya)}else ma>15?Xt[fr]=Ta+31744:Xt[fr]=Ta+(ma+15<<10)+xa}return Xt}function ga(it){return Array.isArray(it)||kr(it)}var la=34467,ba=3553,Ai=34067,ki=34069,Ki=6408,En=6406,Tn=6407,On=6409,kn=6410,ao=32854,Co=32855,bo=36194,zs=32819,Cn=32820,wo=33635,Zn=34042,go=6402,os=34041,ys=35904,jo=35906,Yn=36193,Gn=33776,Hn=33777,ss=33778,_s=33779,ps=35986,Ko=35987,Gi=34798,Pn=35840,qs=35841,bs=35842,lo=35843,Zo=36196,ws=5121,Hs=5123,il=5125,yn=5126,Po=10242,To=10243,Ws=10497,Ll=33071,uo=33648,Nl=10240,Ks=10241,Ts=9728,Ls=9729,Jo=9984,Es=9985,Ul=9986,lu=9987,Tc=33170,du=4352,Sf=4353,Uc=4354,Bs=34046,dc=3317,Wc=37440,uu=37441,Pl=37443,ic=37444,Ou=33984,nl=[Jo,Ul,Es,lu],vl=[0,On,kn,Tn,Ki],As={};As[On]=As[En]=As[go]=1,As[os]=As[kn]=2,As[Tn]=As[ys]=3,As[Ki]=As[jo]=4;function Xs(it){return"[object "+it+"]"}var nc=Xs("HTMLCanvasElement"),jl=Xs("OffscreenCanvas"),qu=Xs("CanvasRenderingContext2D"),fl=Xs("ImageBitmap"),xh=Xs("HTMLImageElement"),us=Xs("HTMLVideoElement"),bh=Object.keys(ot).concat([nc,jl,qu,fl,xh,us]),Ps=[];Ps[ws]=1,Ps[yn]=4,Ps[Yn]=2,Ps[Hs]=2,Ps[il]=4;var to=[];to[ao]=2,to[Co]=2,to[bo]=2,to[os]=4,to[Gn]=.5,to[Hn]=.5,to[ss]=1,to[_s]=1,to[ps]=.5,to[Ko]=1,to[Gi]=1,to[Pn]=.5,to[qs]=.25,to[bs]=.5,to[lo]=.25,to[Zo]=.5;function Xc(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function Vu(it){if(!Array.isArray(it))return!1;var Xt=it.length;return!(Xt===0||!ga(it[0]))}function ql(it){return Object.prototype.toString.call(it)}function Mf(it){return ql(it)===nc}function Ac(it){return ql(it)===jl}function nf(it){return ql(it)===qu}function Ql(it){return ql(it)===fl}function Jf(it){return ql(it)===xh}function Of(it){return ql(it)===us}function of(it){if(!it)return!1;var Xt=ql(it);return bh.indexOf(Xt)>=0?!0:Xc(it)||Vu(it)||Ur(it)}function jc(it){return ot[Object.prototype.toString.call(it)]|0}function Bf(it,Xt){var fr=Xt.length;switch(it.type){case ws:case Hs:case il:case yn:var oa=U.allocType(it.type,fr);oa.set(Xt),it.data=oa;break;case Yn:it.data=Pa(Xt);break;default:}}function Nf(it,Xt){return U.allocType(it.type===Yn?yn:it.type,Xt)}function Gu(it,Xt){it.type===Yn?(it.data=Pa(Xt),U.freeType(Xt)):it.data=Xt}function Ef(it,Xt,fr,oa,Ta,ma){for(var xa=it.width,Ya=it.height,bi=it.channels,yi=xa*Ya*bi,si=Nf(it,yi),gn=0,zi=0;zi=1;)Ya+=xa*bi*bi,bi/=2;return Ya}else return xa*fr*oa}function Zc(it,Xt,fr,oa,Ta,ma,xa){var Ya={"don't care":du,"dont care":du,nice:Uc,fast:Sf},bi={repeat:Ws,clamp:Ll,mirror:uo},yi={nearest:Ts,linear:Ls},si=v({mipmap:lu,"nearest mipmap nearest":Jo,"linear mipmap nearest":Es,"nearest mipmap linear":Ul,"linear mipmap linear":lu},yi),gn={none:0,browser:ic},zi={uint8:ws,rgba4:zs,rgb565:wo,"rgb5 a1":Cn},Ei={alpha:En,luminance:On,"luminance alpha":kn,rgb:Tn,rgba:Ki,rgba4:ao,"rgb5 a1":Co,rgb565:bo},Na={};Xt.ext_srgb&&(Ei.srgb=ys,Ei.srgba=jo),Xt.oes_texture_float&&(zi.float32=zi.float=yn),Xt.oes_texture_half_float&&(zi.float16=zi["half float"]=Yn),Xt.webgl_depth_texture&&(v(Ei,{depth:go,"depth stencil":os}),v(zi,{uint16:Hs,uint32:il,"depth stencil":Zn})),Xt.webgl_compressed_texture_s3tc&&v(Na,{"rgb s3tc dxt1":Gn,"rgba s3tc dxt1":Hn,"rgba s3tc dxt3":ss,"rgba s3tc dxt5":_s}),Xt.webgl_compressed_texture_atc&&v(Na,{"rgb atc":ps,"rgba atc explicit alpha":Ko,"rgba atc interpolated alpha":Gi}),Xt.webgl_compressed_texture_pvrtc&&v(Na,{"rgb pvrtc 4bppv1":Pn,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":bs,"rgba pvrtc 2bppv1":lo}),Xt.webgl_compressed_texture_etc1&&(Na["rgb etc1"]=Zo);var ea=Array.prototype.slice.call(it.getParameter(la));Object.keys(Na).forEach(function(ke){var Qe=Na[ke];ea.indexOf(Qe)>=0&&(Ei[ke]=Qe)});var Ma=Object.keys(Ei);fr.textureFormats=Ma;var Qa=[];Object.keys(Ei).forEach(function(ke){var Qe=Ei[ke];Qa[Qe]=ke});var di=[];Object.keys(zi).forEach(function(ke){var Qe=zi[ke];di[Qe]=ke});var Va=[];Object.keys(yi).forEach(function(ke){var Qe=yi[ke];Va[Qe]=ke});var Bi=[];Object.keys(si).forEach(function(ke){var Qe=si[ke];Bi[Qe]=ke});var Li=[];Object.keys(bi).forEach(function(ke){var Qe=bi[ke];Li[Qe]=ke});var hn=Ma.reduce(function(ke,Qe){var vt=Ei[Qe];return vt===On||vt===En||vt===On||vt===kn||vt===go||vt===os||Xt.ext_srgb&&(vt===ys||vt===jo)?ke[vt]=vt:vt===Co||Qe.indexOf("rgba")>=0?ke[vt]=Ki:ke[vt]=Tn,ke},{});function Ha(){this.internalformat=Ki,this.format=Ki,this.type=ws,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 Ua(ke,Qe){ke.internalformat=Qe.internalformat,ke.format=Qe.format,ke.type=Qe.type,ke.compressed=Qe.compressed,ke.premultiplyAlpha=Qe.premultiplyAlpha,ke.flipY=Qe.flipY,ke.unpackAlignment=Qe.unpackAlignment,ke.colorSpace=Qe.colorSpace,ke.width=Qe.width,ke.height=Qe.height,ke.channels=Qe.channels}function Yi(ke,Qe){if(!(typeof Qe!="object"||!Qe)){if("premultiplyAlpha"in Qe&&(ke.premultiplyAlpha=Qe.premultiplyAlpha),"flipY"in Qe&&(ke.flipY=Qe.flipY),"alignment"in Qe&&(ke.unpackAlignment=Qe.alignment),"colorSpace"in Qe&&(ke.colorSpace=gn[Qe.colorSpace]),"type"in Qe){var vt=Qe.type;ke.type=zi[vt]}var qt=ke.width,br=ke.height,Br=ke.channels,pr=!1;"shape"in Qe?(qt=Qe.shape[0],br=Qe.shape[1],Qe.shape.length===3&&(Br=Qe.shape[2],pr=!0)):("radius"in Qe&&(qt=br=Qe.radius),"width"in Qe&&(qt=Qe.width),"height"in Qe&&(br=Qe.height),"channels"in Qe&&(Br=Qe.channels,pr=!0)),ke.width=qt|0,ke.height=br|0,ke.channels=Br|0;var mt=!1;if("format"in Qe){var Mt=Qe.format,Ft=ke.internalformat=Ei[Mt];ke.format=hn[Ft],Mt in zi&&("type"in Qe||(ke.type=zi[Mt])),Mt in Na&&(ke.compressed=!0),mt=!0}!pr&&mt?ke.channels=As[ke.format]:pr&&!mt&&ke.channels!==vl[ke.format]&&(ke.format=ke.internalformat=vl[ke.channels])}}function Ri(ke){it.pixelStorei(Wc,ke.flipY),it.pixelStorei(uu,ke.premultiplyAlpha),it.pixelStorei(Pl,ke.colorSpace),it.pixelStorei(dc,ke.unpackAlignment)}function Ti(){Ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xi(ke,Qe){var vt=null;if(of(Qe)?vt=Qe:Qe&&(Yi(ke,Qe),"x"in Qe&&(ke.xOffset=Qe.x|0),"y"in Qe&&(ke.yOffset=Qe.y|0),of(Qe.data)&&(vt=Qe.data)),Qe.copy){var qt=Ta.viewportWidth,br=Ta.viewportHeight;ke.width=ke.width||qt-ke.xOffset,ke.height=ke.height||br-ke.yOffset,ke.needsCopy=!0}else if(!vt)ke.width=ke.width||1,ke.height=ke.height||1,ke.channels=ke.channels||4;else if(kr(vt))ke.channels=ke.channels||4,ke.data=vt,!("type"in Qe)&&ke.type===ws&&(ke.type=jc(vt));else if(Xc(vt))ke.channels=ke.channels||4,Bf(ke,vt),ke.alignment=1,ke.needsFree=!0;else if(Ur(vt)){var Br=vt.data;!Array.isArray(Br)&&ke.type===ws&&(ke.type=jc(Br));var pr=vt.shape,mt=vt.stride,Mt,Ft,rr,hr,sr,dr;pr.length===3?(rr=pr[2],dr=mt[2]):(rr=1,dr=1),Mt=pr[0],Ft=pr[1],hr=mt[0],sr=mt[1],ke.alignment=1,ke.width=Mt,ke.height=Ft,ke.channels=rr,ke.format=ke.internalformat=vl[rr],ke.needsFree=!0,Ef(ke,Br,hr,sr,dr,vt.offset)}else if(Mf(vt)||Ac(vt)||nf(vt))Mf(vt)||Ac(vt)?ke.element=vt:ke.element=vt.canvas,ke.width=ke.element.width,ke.height=ke.element.height,ke.channels=4;else if(Ql(vt))ke.element=vt,ke.width=vt.width,ke.height=vt.height,ke.channels=4;else if(Jf(vt))ke.element=vt,ke.width=vt.naturalWidth,ke.height=vt.naturalHeight,ke.channels=4;else if(Of(vt))ke.element=vt,ke.width=vt.videoWidth,ke.height=vt.videoHeight,ke.channels=4;else if(Vu(vt)){var lr=ke.width||vt[0].length,Wt=ke.height||vt.length,ir=ke.channels;ga(vt[0][0])?ir=ir||vt[0][0].length:ir=ir||1;for(var Gt=Fe.shape(vt),Dr=1,Jr=0;Jr>=br,vt.height>>=br,xi(vt,qt[br]),ke.mipmask|=1<=0&&!("faces"in Qe)&&(ke.genMipmaps=!0)}if("mag"in Qe){var qt=Qe.mag;ke.magFilter=yi[qt]}var br=ke.wrapS,Br=ke.wrapT;if("wrap"in Qe){var pr=Qe.wrap;typeof pr=="string"?br=Br=bi[pr]:Array.isArray(pr)&&(br=bi[pr[0]],Br=bi[pr[1]])}else{if("wrapS"in Qe){var mt=Qe.wrapS;br=bi[mt]}if("wrapT"in Qe){var Mt=Qe.wrapT;Br=bi[Mt]}}if(ke.wrapS=br,ke.wrapT=Br,"anisotropic"in Qe){var Ft=Qe.anisotropic;ke.anisotropic=Qe.anisotropic}if("mipmap"in Qe){var rr=!1;switch(typeof Qe.mipmap){case"string":ke.mipmapHint=Ya[Qe.mipmap],ke.genMipmaps=!0,rr=!0;break;case"boolean":rr=ke.genMipmaps=Qe.mipmap;break;case"object":ke.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Qe)&&(ke.minFilter=Jo)}}function El(ke,Qe){it.texParameteri(Qe,Ks,ke.minFilter),it.texParameteri(Qe,Nl,ke.magFilter),it.texParameteri(Qe,Po,ke.wrapS),it.texParameteri(Qe,To,ke.wrapT),Xt.ext_texture_filter_anisotropic&&it.texParameteri(Qe,Bs,ke.anisotropic),ke.genMipmaps&&(it.hint(Tc,ke.mipmapHint),it.generateMipmap(Qe))}var ru=0,js={},pl=fr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Xn(ke){Ha.call(this),this.mipmask=0,this.internalformat=Ki,this.id=ru++,this.refCount=1,this.target=ke,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new hs,xa.profile&&(this.stats={size:0})}function kl(ke){it.activeTexture(Ou),it.bindTexture(ke.target,ke.texture)}function Io(){var ke=bl[0];ke?it.bindTexture(ke.target,ke.texture):it.bindTexture(ba,null)}function ge(ke){var Qe=ke.texture,vt=ke.unit,qt=ke.target;vt>=0&&(it.activeTexture(Ou+vt),it.bindTexture(qt,null),bl[vt]=null),it.deleteTexture(Qe),ke.texture=null,ke.params=null,ke.pixels=null,ke.refCount=0,delete js[ke.id],ma.textureCount--}v(Xn.prototype,{bind:function(){var ke=this;ke.bindCount+=1;var Qe=ke.unit;if(Qe<0){for(var vt=0;vt0)continue;qt.unit=-1}bl[vt]=ke,Qe=vt;break}Qe>=pl,xa.profile&&ma.maxTextureUnits>sr)-rr,dr.height=dr.height||(vt.height>>sr)-hr,kl(vt),vn(dr,ba,rr,hr,sr),Io(),nn(dr),qt}function Br(pr,mt){var Mt=pr|0,Ft=mt|0||Mt;if(Mt===vt.width&&Ft===vt.height)return qt;qt.width=vt.width=Mt,qt.height=vt.height=Ft,kl(vt);for(var rr=0;vt.mipmask>>rr;++rr){var hr=Mt>>rr,sr=Ft>>rr;if(!hr||!sr)break;it.texImage2D(ba,rr,vt.format,hr,sr,0,vt.format,vt.type,null)}return Io(),xa.profile&&(vt.stats.size=oc(vt.internalformat,vt.type,Mt,Ft,!1,!1)),qt}return qt(ke,Qe),qt.subimage=br,qt.resize=Br,qt._reglType="texture2d",qt._texture=vt,xa.profile&&(qt.stats=vt.stats),qt.destroy=function(){vt.decRef()},qt}function xe(ke,Qe,vt,qt,br,Br){var pr=new Xn(Ai);js[pr.id]=pr,ma.cubeCount++;var mt=new Array(6);function Mt(hr,sr,dr,lr,Wt,ir){var Gt,Dr=pr.texInfo;for(hs.call(Dr),Gt=0;Gt<6;++Gt)mt[Gt]=ho();if(typeof hr=="number"||!hr){var Jr=hr|0||1;for(Gt=0;Gt<6;++Gt)Dn(mt[Gt],Jr,Jr)}else if(typeof hr=="object")if(sr)Wn(mt[0],hr),Wn(mt[1],sr),Wn(mt[2],dr),Wn(mt[3],lr),Wn(mt[4],Wt),Wn(mt[5],ir);else if(Al(Dr,hr),Yi(pr,hr),"faces"in hr){var ya=hr.faces;for(Gt=0;Gt<6;++Gt)Ua(mt[Gt],pr),Wn(mt[Gt],ya[Gt])}else for(Gt=0;Gt<6;++Gt)Wn(mt[Gt],hr);for(Ua(pr,mt[0]),Dr.genMipmaps?pr.mipmask=(mt[0].width<<1)-1:pr.mipmask=mt[0].mipmask,pr.internalformat=mt[0].internalformat,Mt.width=mt[0].width,Mt.height=mt[0].height,kl(pr),Gt=0;Gt<6;++Gt)Os(mt[Gt],ki+Gt);for(El(Dr,Ai),Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,Dr.genMipmaps,!0)),Mt.format=Qa[pr.internalformat],Mt.type=di[pr.type],Mt.mag=Va[Dr.magFilter],Mt.min=Bi[Dr.minFilter],Mt.wrapS=Li[Dr.wrapS],Mt.wrapT=Li[Dr.wrapT],Gt=0;Gt<6;++Gt)Xl(mt[Gt]);return Mt}function Ft(hr,sr,dr,lr,Wt){var ir=dr|0,Gt=lr|0,Dr=Wt|0,Jr=Ii();return Ua(Jr,pr),Jr.width=0,Jr.height=0,xi(Jr,sr),Jr.width=Jr.width||(pr.width>>Dr)-ir,Jr.height=Jr.height||(pr.height>>Dr)-Gt,kl(pr),vn(Jr,ki+hr,ir,Gt,Dr),Io(),nn(Jr),Mt}function rr(hr){var sr=hr|0;if(sr!==pr.width){Mt.width=pr.width=sr,Mt.height=pr.height=sr,kl(pr);for(var dr=0;dr<6;++dr)for(var lr=0;pr.mipmask>>lr;++lr)it.texImage2D(ki+dr,lr,pr.format,sr>>lr,sr>>lr,0,pr.format,pr.type,null);return Io(),xa.profile&&(pr.stats.size=oc(pr.internalformat,pr.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(ke,Qe,vt,qt,br,Br),Mt.subimage=Ft,Mt.resize=rr,Mt._reglType="textureCube",Mt._texture=pr,xa.profile&&(Mt.stats=pr.stats),Mt.destroy=function(){pr.decRef()},Mt}function re(){for(var ke=0;ke>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);else for(var br=0;br<6;++br)it.texImage2D(ki+br,qt,vt.internalformat,vt.width>>qt,vt.height>>qt,0,vt.internalformat,vt.type,null);El(vt.texInfo,vt.target)})}function Ue(){for(var ke=0;ke=0?Xl=!0:bi.indexOf(hs)>=0&&(Xl=!1))),("depthTexture"in Xn||"depthStencilTexture"in Xn)&&(bl=!!(Xn.depthTexture||Xn.depthStencilTexture)),"depth"in Xn&&(typeof Xn.depth=="boolean"?Os=Xn.depth:(ru=Xn.depth,xl=!1)),"stencil"in Xn&&(typeof Xn.stencil=="boolean"?xl=Xn.stencil:(js=Xn.stencil,Os=!1)),"depthStencil"in Xn&&(typeof Xn.depthStencil=="boolean"?Os=xl=Xn.depthStencil:(pl=Xn.depthStencil,Os=!1,xl=!1))}var Io=null,ge=null,K=null,xe=null;if(Array.isArray(ho))Io=ho.map(Na);else if(ho)Io=[Na(ho)];else for(Io=new Array(El),Ln=0;Ln0&&(nn.depth=xi[0].depth,nn.stencil=xi[0].stencil,nn.depthStencil=xi[0].depthStencil),xi[Ii]?xi[Ii](nn):xi[Ii]=Ua(nn)}return v(Xi,{width:Ln,height:Ln,color:hs})}function vn(Rn){var Ii,nn=Rn|0;if(nn===Xi.width)return Xi;var Ln=Xi.color;for(Ii=0;Ii=Ln.byteLength?Dn.subdata(Ln):(Dn.destroy(),Ua.buffers[Rn]=null)),Ua.buffers[Rn]||(Dn=Ua.buffers[Rn]=Ta.create(Ii,mf,!1,!0)),nn.buffer=Ta.getBuffer(Dn),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,Xi[Rn]=1}else Ta.getBuffer(Ii)?(nn.buffer=Ta.getBuffer(Ii),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):Ta.getBuffer(Ii.buffer)?(nn.buffer=Ta.getBuffer(Ii.buffer),nn.size=(+Ii.size||nn.buffer.dimension)|0,nn.normalized=!!Ii.normalized||!1,"type"in Ii?nn.type=_a[Ii.type]:nn.type=nn.buffer.dtype,nn.offset=(Ii.offset||0)|0,nn.stride=(Ii.stride||0)|0,nn.divisor=(Ii.divisor||0)|0,nn.state=1):"x"in Ii&&(nn.x=+Ii.x||0,nn.y=+Ii.y||0,nn.z=+Ii.z||0,nn.w=+Ii.w||0,nn.state=2)}for(var Wn=0;Wn1)for(var Ri=0;Riea&&(ea=Ma.stats.uniformsCount)}),ea},fr.getMaxAttributesCount=function(){var ea=0;return si.forEach(function(Ma){Ma.stats.attributesCount>ea&&(ea=Ma.stats.attributesCount)}),ea});function Na(){Ta={},ma={};for(var ea=0;ea16&&(fr=Pi(fr,it.length*8));for(var oa=Array(16),Ta=Array(16),ma=0;ma<16;ma++)oa[ma]=fr[ma]^909522486,Ta[ma]=fr[ma]^1549556828;var xa=Pi(oa.concat(Pc(Xt)),512+Xt.length*8);return Qt(Pi(Ta.concat(xa),768))}function xu(it){for(var Xt=Vf?"0123456789ABCDEF":"0123456789abcdef",fr="",oa,Ta=0;Ta>>4&15)+Xt.charAt(oa&15);return fr}function Lc(it){for(var Xt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr="",oa=it.length,Ta=0;Tait.length*8?fr+=Xu:fr+=Xt.charAt(ma>>>6*(3-xa)&63);return fr}function $c(it,Xt){var fr=Xt.length,oa=Array(),Ta,ma,xa,Ya,bi=Array(Math.ceil(it.length/2));for(Ta=0;Ta0;){for(Ya=Array(),xa=0,Ta=0;Ta0||ma>0)&&(Ya[Ya.length]=ma);oa[oa.length]=xa,bi=Ya}var yi="";for(Ta=oa.length-1;Ta>=0;Ta--)yi+=Xt.charAt(oa[Ta]);var si=Math.ceil(it.length*8/(Math.log(Xt.length)/Math.log(2)));for(Ta=yi.length;Ta>>6&31,128|oa&63):oa<=65535?Xt+=String.fromCharCode(224|oa>>>12&15,128|oa>>>6&63,128|oa&63):oa<=2097151&&(Xt+=String.fromCharCode(240|oa>>>18&7,128|oa>>>12&63,128|oa>>>6&63,128|oa&63));return Xt}function Pc(it){for(var Xt=Array(it.length>>2),fr=0;fr>5]|=(it.charCodeAt(fr/8)&255)<<24-fr%32;return Xt}function Qt(it){for(var Xt="",fr=0;fr>5]>>>24-fr%32&255);return Xt}function xr(it,Xt){return it>>>Xt|it<<32-Xt}function aa(it,Xt){return it>>>Xt}function $r(it,Xt,fr){return it&Xt^~it&fr}function ka(it,Xt,fr){return it&Xt^it&fr^Xt&fr}function li(it){return xr(it,2)^xr(it,13)^xr(it,22)}function Ci(it){return xr(it,6)^xr(it,11)^xr(it,25)}function Hi(it){return xr(it,7)^xr(it,18)^aa(it,3)}function Qi(it){return xr(it,17)^xr(it,19)^aa(it,10)}var pn=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 Pi(it,Xt){var fr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),oa=new Array(64),Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea;for(it[Xt>>5]|=128<<24-Xt%32,it[(Xt+64>>9<<4)+15]=Xt,zi=0;zi>16)+(Xt>>16)+(fr>>16);return oa<<16|fr&65535}function Ni(it){return Array.prototype.slice.call(it)}function mi(it){return Ni(it).join("")}function Mn(it){var Xt=it&&it.cache,fr=0,oa=[],Ta=[],ma=[];function xa(Na,ea){var Ma=ea&&ea.stable;if(!Ma){for(var Qa=0;Qa0&&(Na.push(di,"="),Na.push.apply(Na,Ni(arguments)),Na.push(";")),di}return v(ea,{def:Qa,toString:function(){return mi([Ma.length>0?"var "+Ma.join(",")+";":"",mi(Na)])}})}function bi(){var Na=Ya(),ea=Ya(),Ma=Na.toString,Qa=ea.toString;function di(Va,Bi){ea(Va,Bi,"=",Na.def(Va,Bi),";")}return v(function(){Na.apply(Na,Ni(arguments))},{def:Na.def,entry:Na,exit:ea,save:di,set:function(Va,Bi,Li){di(Va,Bi),Na(Va,Bi,"=",Li,";")},toString:function(){return Ma()+Qa()}})}function yi(){var Na=mi(arguments),ea=bi(),Ma=bi(),Qa=ea.toString,di=Ma.toString;return v(ea,{then:function(){return ea.apply(ea,Ni(arguments)),this},else:function(){return Ma.apply(Ma,Ni(arguments)),this},toString:function(){var Va=di();return Va&&(Va="else{"+Va+"}"),mi(["if(",Na,"){",Qa(),"}",Va])}})}var si=Ya(),gn={};function zi(Na,ea){var Ma=[];function Qa(){var hn="a"+Ma.length;return Ma.push(hn),hn}ea=ea||0;for(var di=0;di":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},za={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:dt};function fi(it){return Array.isArray(it)||kr(it)||Ur(it)}function ni(it){return it.sort(function(Xt,fr){return Xt===Me?-1:fr===Me?1:Xt=1,oa>=2,Xt)}else if(fr===ks){var Ta=it.data;return new La(Ta.thisDep,Ta.contextDep,Ta.propDep,Xt)}else{if(fr===rl)return new La(!1,!1,!1,Xt);if(fr===Ns){for(var ma=!1,xa=!1,Ya=!1,bi=0;bi=1&&(xa=!0),si>=2&&(Ya=!0)}else yi.type===ks&&(ma=ma||yi.data.thisDep,xa=xa||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,xa,Ya,Xt)}else return new La(fr===Qo,fr===yo,fr===un,Xt)}}var In=new La(!1,!1,!1,function(){});function Jn(it,Xt,fr,oa,Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=Mt}function xi(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),Array.isArray(Ft)?(Li[rr]=Ft.slice(),hn[rr]=Ft.slice()):Li[rr]=hn[rr]=Ft,Yi[rr]=Mt}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(Ss,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(yl,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Ro,"depthFunc",wa),xi(Js,"depthRange",[0,1]),xi(Fs,"depthMask",!0),xi(cu,cu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,An),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(fo,Bn),xi(Fo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Oe,"stencilOpSeparate",[me,zt,zt,zt]),xi(I,"stencilOpSeparate",[De,zt,zt,zt]),Ti(ie,on),xi(Te,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Me,Me,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var vn={gl:it,context:zi,strings:Xt,next:hn,current:Li,draw:gn,elements:ma,buffer:Ta,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ia,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:_a,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=d(oa.maxDrawbuffers,function(mt){return mt===0?[0]:d(mt,function(Mt){return Ja+Mt})}));var Ii=0;function nn(){var mt=Sn({cache:Na}),Mt=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=Mt(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var sr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(sr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var lr=mt.constants={};Object.keys(Rn).forEach(function(ir){lr[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Gt){switch(Gt.type){case Tn:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(Mt(Gt.data),".call(",Dr.slice(0,Math.max(Gt.data.length+1,4)),")");case un:return ir.def(hr.props,Gt.data);case yo:return ir.def(hr.context,Gt.data);case Qo:return ir.def("this",Gt.data);case ks:return Gt.data.append(mt,ir),Gt.data.ref;case rl:return Gt.data.toString();case Ns:return Gt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Gt=Xt.id(ir);if(Gt in Wt)return Wt[Gt];var Dr=yi.scope[Gt];Dr||(Dr=yi.scope[Gt]=new Ma);var Jr=Wt[Gt]=Mt(Dr);return Jr},mt}function Cn(mt){var Mt=mt.static,Ft=mt.dynamic,rr;if(ze in Mt){var hr=!!Mt[ze];rr=an(function(dr,lr){return hr}),rr.enable=hr}else if(ze in Ft){var sr=Ft[ze];rr=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}return rr}function Dn(mt,Mt){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),an(function(dr,lr){var Wt=dr.link(hr),ir=dr.shared;lr.set(ir.framebuffer,".next",Wt);var Gt=ir.context;return lr.set(Gt,"."+pt,Wt+".width"),lr.set(Gt,"."+Et,Wt+".height"),Wt})):an(function(dr,lr){var Wt=dr.shared;lr.set(Wt.framebuffer,".next","null");var ir=Wt.context;return lr.set(ir,"."+pt,ir+"."+yr),lr.set(ir,"."+Et,ir+"."+Er),"null"})}else if(ht in rr){var sr=rr[ht];return dn(sr,function(dr,lr){var Wt=dr.invoke(lr,sr),ir=dr.shared,Gt=ir.framebuffer,Dr=lr.def(Gt,".getFramebuffer(",Wt,")");lr.set(Gt,".next",Dr);var Jr=ir.context;return lr.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),lr.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Wn(mt,Mt,Ft){var rr=mt.static,hr=mt.dynamic;function sr(Wt){if(Wt in rr){var ir=rr[Wt],Gt=!0,Dr=ir.x|0,Jr=ir.y|0,ya,vi;return"width"in ir?ya=ir.width|0:Gt=!1,"height"in ir?vi=ir.height|0:Gt=!1,new La(!Gt&&Mt&&Mt.thisDep,!Gt&&Mt&&Mt.contextDep,!Gt&&Mt&&Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ya;"width"in ir||(_i=Fi.def(ui,".",pt,"-",Dr));var Si=vi;return"height"in ir||(Si=Fi.def(ui,".",Et,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Wt in hr){var Ga=hr[Wt],ai=dn(Ga,function(Zi,Fi){var ui=Zi.invoke(Fi,Ga),_i=Zi.shared.context,Si=Fi.def(ui,".x|0"),Ui=Fi.def(ui,".y|0"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,fn,_o]});return Mt&&(ai.thisDep=ai.thisDep||Mt.thisDep,ai.contextDep=ai.contextDep||Mt.contextDep,ai.propDep=ai.propDep||Mt.propDep),ai}else return Mt?new La(Mt.thisDep,Mt.contextDep,Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=sr(Me);if(dr){var lr=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Gt=lr.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Gt[2]),ir.set(Dr,"."+Dt,Gt[3]),Gt})}return{viewport:dr,scissor_box:sr(Te)}}function Os(mt,Mt){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(Mt.dynamic).length>0)return null;var hr=Mt.static,sr=Object.keys(hr);if(sr.length>0&&typeof hr[sr[0]]=="number"){for(var dr=[],lr=0;lr"+Si+"?"+Gt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ya,"(",Gt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Gt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Gt,".buffer);","}",Fi,'="type" in ',Gt,"?",Jr.glTypes,"[",Gt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Gt,".normalized;");function ui(_i){ir(Ga[_i],"=",Gt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[sr]=dn(dr,lr)}),hr}function El(mt){var Mt=mt.static,Ft=mt.dynamic,rr={};return Object.keys(Mt).forEach(function(hr){var sr=Mt[hr];rr[hr]=an(function(dr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:dr.link(sr)})}),Object.keys(Ft).forEach(function(hr){var sr=Ft[hr];rr[hr]=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}),rr}function ru(mt,Mt,Ft,rr,hr){var sr=mt.static,dr=mt.dynamic,lr=Os(mt,Mt),Wt=Dn(mt,hr),ir=Wn(mt,Wt,hr),Gt=ho(mt,hr),Dr=Xl(mt,hr),Jr=xl(mt,hr,lr);function ya(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ya(Me),ya(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Gt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Cn(mt,hr),Ga.uniforms=hs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Gt.vao,!Ga.drawVAO&&Jr.program&&!lr&&fr.angle_instanced_arrays&&Gt.static.elements){var ai=!0,Zi=Jr.program.attributes.map(function(ui){var _i=Mt.static[ui];return ai=ai&&!!_i,_i});if(ai&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Gt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return lr?Ga.useVAO=!0:Ga.attributes=Al(Mt,hr),Ga.context=El(rr,hr),Ga}function js(mt,Mt,Ft){var rr=mt.shared,hr=rr.context,sr=mt.scope();Object.keys(Ft).forEach(function(dr){Mt.save(hr,"."+dr);var lr=Ft[dr],Wt=lr.append(mt,Mt);Array.isArray(Wt)?sr(hr,".",dr,"=[",Wt.join(),"];"):sr(hr,".",dr,"=",Wt,";")}),Mt(sr)}function pl(mt,Mt,Ft,rr){var hr=mt.shared,sr=hr.gl,dr=hr.framebuffer,lr;Va&&(lr=Mt.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Gt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,Mt):Dr=Mt.def(dr,".next"),rr||Mt("if(",Dr,"!==",dr,".cur){"),Mt("if(",Dr,"){",sr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&Mt(lr,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),Mt("}else{",sr,".bindFramebuffer(",pa,",null);"),Va&&Mt(lr,".drawBuffersWEBGL(",Gt,");"),Mt("}",dr,".cur=",Dr,";"),rr||Mt("}")}function bl(mt,Mt,Ft){var rr=mt.shared,hr=rr.gl,sr=mt.current,dr=mt.next,lr=rr.current,Wt=rr.next,ir=mt.cond(lr,".dirty");Ha.forEach(function(Gt){var Dr=Ri(Gt);if(!(Dr in Ft.state)){var Jr,ya;if(Dr in dr){Jr=dr[Dr],ya=sr[Dr];var vi=d(Li[Dr].length,function(ai){return ir.def(Jr,"[",ai,"]")});ir(mt.cond(vi.map(function(ai,Zi){return ai+"!=="+ya+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ai,Zi){return ya+"["+Zi+"]="+ai}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",lr,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),lr,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(lr,".dirty=false;"),Mt(ir)}function Xn(mt,Mt,Ft,rr){var hr=mt.shared,sr=mt.current,dr=hr.current,lr=hr.gl,Wt;ni(Object.keys(Ft)).forEach(function(ir){var Gt=Ft[ir];if(!(rr&&!rr(Gt))){var Dr=Gt.append(mt,Mt);if(Ua[ir]){var Jr=Ua[ir];sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(mt.cond(Wt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Wt,";")):(Mt(mt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Dr,";"))}else if(ga(Dr)){var ya=sr[ir];Mt(lr,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ya+"["+Ga+"]="+vi}).join(";"),";")}else sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(lr,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):Mt(lr,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function kl(mt,Mt){di&&(mt.instancing=Mt.def(mt.shared.extensions,".angle_instanced_arrays"))}function Io(mt,Mt,Ft,rr,hr){var sr=mt.shared,dr=mt.stats,lr=sr.current,Wt=sr.timer,ir=Ft.profile;function Gt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ya(ui){Dr=Mt.def(),ui(Dr,"=",Gt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=Mt.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Gt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=Mt.def(lr,".profile");Mt(lr,".profile=",ui,";"),Mt.exit(lr,".profile=",_i,";")}var ai;if(ir){if(sn(ir)){ir.enable?(ya(Mt),vi(Mt.exit),Ga("true")):Ga("false");return}ai=ir.append(mt,Mt),Ga(ai)}else ai=Mt.def(lr,".profile");var Zi=mt.block();ya(Zi),Mt("if(",ai,"){",Zi,"}");var Fi=mt.block();vi(Fi),Mt.exit("if(",ai,"){",Fi,"}")}function ge(mt,Mt,Ft,rr,hr){var sr=mt.shared;function dr(Wt){switch(Wt){case ls:case ul:case Il:return 2;case Mo:case tl:case tu:return 3;case Yo:case es:case Ru:return 4;default:return 1}}function lr(Wt,ir,Gt){var Dr=sr.gl,Jr=Mt.def(Wt,".location"),ya=Mt.def(sr.attributes,"[",Jr,"]"),vi=Gt.state,Ga=Gt.buffer,ai=[Gt.x,Gt.y,Gt.z,Gt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){Mt("if(!",ya,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Gt.type,Si;if(Gt.size?Si=Mt.def(Gt.size,"||",ir):Si=ir,Mt("if(",ya,".type!==",_i,"||",ya,".size!==",Si,"||",Zi.map(function(fn){return ya+"."+fn+"!=="+Gt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Gt.normalized,Gt.stride,Gt.offset],");",ya,".type=",_i,";",ya,".size=",Si,";",Zi.map(function(fn){return ya+"."+fn+"="+Gt[fn]+";"}).join(""),"}"),di){var Ui=Gt.divisor;Mt("if(",ya,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ya,".divisor=",Ui,";}")}}function ui(){Mt("if(",ya,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ya,".buffer=null;","}if(",Qn.map(function(_i,Si){return ya+"."+_i+"!=="+ai[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ai,");",Qn.map(function(_i,Si){return ya+"."+_i+"="+ai[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===co?ui():(Mt("if(",vi,"===",eo,"){"),Fi(),Mt("}else{"),ui(),Mt("}"))}rr.forEach(function(Wt){var ir=Wt.name,Gt=Ft.attributes[ir],Dr;if(Gt){if(!hr(Gt))return;Dr=Gt.append(mt,Mt)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ya){Dr[ya]=Mt.def(Jr,".",ya)})}lr(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,Mt,Ft,rr,hr,sr){for(var dr=mt.shared,lr=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Ds=[],Oo=0;Oo>1)",Ga],");")}function Ui(){Ft(ai,".drawArraysInstancedANGLE(",[Jr,ya,vi,Ga],");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(sr+".drawElements("+[Jr,vi,Zi,ya+"<<(("+Zi+"-"+io+")>>1)"]+");")}function Ui(){Ft(sr+".drawArrays("+[Jr,ya,vi]+");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Ft("if(",Ga,">0){"),ui(),Ft("}else if(",Ga,"<0){"),_i(),Ft("}")):ui():_i()}function re(mt,Mt,Ft,rr,hr){var sr=nn(),dr=sr.proc("body",hr);return di&&(sr.instancing=dr.def(sr.shared.extensions,".angle_instanced_arrays")),mt(sr,dr,Ft,rr),sr.compile().body}function ye(mt,Mt,Ft,rr){kl(mt,Mt),Ft.useVAO?Ft.drawVAO?Mt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Mt),");"):Mt(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(Mt(mt.shared.vao,".setVAO(null);"),ge(mt,Mt,Ft,rr.attributes,function(){return!0})),K(mt,Mt,Ft,rr.uniforms,function(){return!0},!1),xe(mt,Mt,Mt,Ft)}function Ue(mt,Mt){var Ft=mt.proc("draw",1);kl(mt,Ft),js(mt,Ft,Mt.context),pl(mt,Ft,Mt.framebuffer),bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state),Io(mt,Ft,Mt,!1,!0);var rr=Mt.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),Mt.shader.program)ye(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),sr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",sr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",sr,"]=",mt.link(function(lr){return re(ye,mt,Mt,lr,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,Mt,Ft,rr){mt.batchId="a1",kl(mt,Mt);function hr(){return!0}ge(mt,Mt,Ft,rr.attributes,hr),K(mt,Mt,Ft,rr.uniforms,hr,!1),xe(mt,Mt,Mt,Ft)}function Qe(mt,Mt,Ft,rr){kl(mt,Mt);var hr=Ft.contextDep,sr=Mt.def(),dr="a0",lr="a1",Wt=Mt.def();mt.shared.props=Wt,mt.batchId=sr;var ir=mt.scope(),Gt=mt.scope();Mt(ir.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Wt,"=",dr,"[",sr,"];",Gt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&js(mt,Gt,Ft.context),Ft.needsFramebuffer&&pl(mt,Gt,Ft.framebuffer),Xn(mt,Gt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Io(mt,Gt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Gt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Gt),");"):ir(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,ir),");"):ir(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(ir(mt.shared.vao,".setVAO(null);"),ge(mt,ir,Ft,rr.attributes,Jr),ge(mt,Gt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Gt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Gt,Ft);else{var ya=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Gt),Ga=Gt.def(vi,".id"),ai=Gt.def(ya,"[",Ga,"]");Gt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ai,"){",ai,"=",ya,"[",Ga,"]=",mt.link(function(Zi){return re(ke,mt,Ft,Zi,2)}),"(",vi,");}",ai,".call(this,a0[",sr,"],",sr,");")}}function vt(mt,Mt){var Ft=mt.proc("batch",2);mt.batchId="0",kl(mt,Ft);var rr=!1,hr=!0;Object.keys(Mt.context).forEach(function(ya){rr=rr||Mt.context[ya].propDep}),rr||(js(mt,Ft,Mt.context),hr=!1);var sr=Mt.framebuffer,dr=!1;sr?(sr.propDep?rr=dr=!0:sr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,sr)):pl(mt,Ft,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(rr=!0);function lr(ya){return ya.contextDep&&rr||ya.propDep}bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state,function(ya){return!lr(ya)}),(!Mt.profile||!lr(Mt.profile))&&Io(mt,Ft,Mt,!1,"a1"),Mt.contextDep=rr,Mt.needsContext=hr,Mt.needsFramebuffer=dr;var Wt=Mt.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,Mt,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),Mt.shader.program)Qe(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Gt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Gt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Gt,"[",Dr,"]=",mt.link(function(ya){return re(Qe,mt,Mt,ya,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,Mt){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(js(mt,Ft,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(mt,Ft),ni(Object.keys(Mt.state)).forEach(function(lr){var Wt=Mt.state[lr],ir=Wt.append(mt,Ft);ga(ir)?ir.forEach(function(Gt,Dr){Xi(Gt)?Ft.set(mt.next[lr],"["+Dr+"]",Gt):Ft.set(mt.next[lr],"["+Dr+"]",mt.link(Gt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+lr,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+lr,ir)}),Io(mt,Ft,Mt,!0,!0),[$t,Kr,Sr,na,Tr].forEach(function(lr){var Wt=Mt.draw[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+lr,ir):Ft.set(rr.draw,"."+lr,mt.link(ir),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function(lr){var Wt=Mt.uniforms[lr].append(mt,Ft);Array.isArray(Wt)&&(Wt="["+Wt.map(function(ir){return Xi(ir)?ir:mt.link(ir,{stable:!0})})+"]"),Ft.set(rr.uniforms,"["+mt.link(Xt.id(lr),{stable:!0})+"]",Wt)}),Object.keys(Mt.attributes).forEach(function(lr){var Wt=Mt.attributes[lr].append(mt,Ft),ir=mt.scopeAttrib(lr);Object.keys(new Ma).forEach(function(Gt){Ft.set(ir,"."+Gt,Wt[Gt])})}),Mt.scopeVAO){var sr=Mt.scopeVAO.append(mt,Ft);Xi(sr)?Ft.set(rr.vao,".targetVAO",sr):Ft.set(rr.vao,".targetVAO",mt.link(sr,{stable:!0}))}function dr(lr){var Wt=Mt.shader[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+lr,ir):Ft.set(rr.shader,"."+lr,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(Mt.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function br(mt){if(!(typeof mt!="object"||ga(mt))){for(var Mt=Object.keys(mt),Ft=0;Ft=0;--re){var ye=vn[re];ye&&ye(Na,null,0)}fr.flush(),si&&si.update()}function Wn(){!Cn&&vn.length>0&&(Cn=f.next(Dn))}function Os(){Cn&&(f.cancel(Dn),Cn=null)}function xl(re){re.preventDefault(),Ta=!0,Os(),Rn.forEach(function(ye){ye()})}function ho(re){fr.getError(),Ta=!1,ma.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Wn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(fs,xl,!1),Xi.addEventListener(ms,ho,!1));function Xl(){vn.length=0,Os(),Xi&&(Xi.removeEventListener(fs,xl),Xi.removeEventListener(ms,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(re){re()})}function hs(re){function ye(sr){var dr=v({},sr);delete dr.uniforms,delete dr.attributes,delete dr.context,delete dr.vao,"stencil"in dr&&dr.stencil.op&&(dr.stencil.opBack=dr.stencil.opFront=dr.stencil.op,delete dr.stencil.op);function lr(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Gt){dr[Wt+"."+Gt]=ir[Gt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(dr.vao=sr.vao),dr}function Ue(sr,dr){var lr={},Wt={};return Object.keys(sr).forEach(function(ir){var Gt=sr[ir];if(h.isDynamic(Gt)){Wt[ir]=h.unbox(Gt,ir);return}else if(dr&&Array.isArray(Gt)){for(var Dr=0;Dr0)return mt.call(this,rr(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return mt.call(this,sr,sr.length)}else return pr.call(this,sr)}return v(hr,{stats:br,destroy:function(){Br.destroy()}})}var Al=Yi.setFBO=hs({framebuffer:h.define.call(null,Tl,"framebuffer")});function El(re,ye){var Ue=0;Ri.procs.poll();var ke=ye.color;ke&&(fr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),Ue|=al),"depth"in ye&&(fr.clearDepth(+ye.depth),Ue|=_l),"stencil"in ye&&(fr.clearStencil(ye.stencil|0),Ue|=mn),fr.clear(Ue)}function ru(re){if("framebuffer"in re)if(re.framebuffer&&re.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Al(v({framebuffer:re.framebuffer.faces[ye]},re),El);else Al(re,El);else El(null,re)}function js(re){vn.push(re);function ye(){var Ue=Rl(vn,re);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Os()}vn[Ue]=ke}return Wn(),{cancel:ye}}function pl(){var re=xi.viewport,ye=xi.scissor_box;re[0]=re[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=re[2]=ye[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=re[3]=ye[3]=fr.drawingBufferHeight}function bl(){Na.tick+=1,Na.time=kl(),pl(),Ri.procs.poll()}function Xn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function kl(){return(m()-gn)/1e3}Xn();function Io(re,ye){var Ue;switch(re){case"frame":return js(ye);case"lost":Ue=Rn;break;case"restore":Ue=Ii;break;case"destroy":Ue=nn;break;default:}return Ue.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Xl,_gl:fr,_refresh:Xn,poll:function(){bl(),si&&si.update()},now:kl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Xt.onDone(null,xe),xe}return _c})}}),xT=He({"src/lib/prepare_regl.js"(Z,q){"use strict";var v=TE(),_=Pq();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=_({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||v({container:r._glcontainer.node()}),o}}}),p6=He({"src/traces/scattergl/plot.js"(h,q){"use strict";var v=HE(),_=a6(),S=dq(),M=Lq(),e=sa(),t=Jd().selectMode,r=xT(),o=Fu(),a=O5(),i=qE().styleTextSelection,n={};function s(f,m,c,T){var l=f._size,x=f.width*T,w=f.height*T,A=l.l*T,E=l.b*T,p=l.r*T,b=l.t*T,d=l.w*T,u=l.h*T;return[A+m.domain[0]*d,E+c.domain[0]*u,x-p-(1-m.domain[1])*d,w-b-(1-c.domain[1])*u]}var h=q.exports=function(m,c,T){if(T.length){var l=m._fullLayout,x=c._scene,w=c.xaxis,A=c.yaxis,E,p;if(x){var b=r(m,["ANGLE_instanced_arrays","OES_element_index_uint"],n);if(!b){x.init();return}var d=x.count,u=l._glcanvas.data()[0].regl;if(a(m,c,T),x.dirty){if((x.line2d||x.error2d)&&!(x.scatter2d||x.fill2d||x.glText)&&u.clear({color:!0,depth:!0}),x.error2d===!0&&(x.error2d=S(u)),x.line2d===!0&&(x.line2d=_(u)),x.scatter2d===!0&&(x.scatter2d=v(u)),x.fill2d===!0&&(x.fill2d=_(u)),x.glText===!0)for(x.glText=new Array(d),E=0;Ex.glText.length){var g=d-x.glText.length;for(E=0;Eee&&(isNaN(j[te])||isNaN(j[te+1]));)te-=2;ae.positions=j.slice(ee,te+2)}return ae}),x.line2d.update(x.lineOptions)),x.error2d){var P=(x.errorXOptions||[]).concat(x.errorYOptions||[]).map(function(ae){return ae||{positions:[],errors:[]}});x.error2d.update(P)}x.scatter2d&&x.scatter2d.update(x.markerOptions),x.fillOrder=e.repeat(null,d),x.fill2d&&(x.fillOptions=x.fillOptions.map(function(ae,j){var ee=T[j];if(!(!ae||!ee||!ee[0]||!ee[0].trace)){var te=ee[0],pe=te.trace,we=te.t,Se=x.lineOptions[j],Re,Pe,je=[];pe._ownfill&&je.push(j),pe._nexttrace&&je.push(j+1),je.length&&(x.fillOrder[j]=je);var at=[],nt=Se&&Se.positions||we.positions,tt,Ve;if(pe.fill==="tozeroy"){for(tt=0;tttt&&isNaN(nt[Ve+1]);)Ve-=2;nt[tt+1]!==0&&(at=[nt[tt],0]),at=at.concat(nt.slice(tt,Ve+2)),nt[Ve+1]!==0&&(at=at.concat([nt[Ve],0]))}else if(pe.fill==="tozerox"){for(tt=0;tttt&&isNaN(nt[Ve]);)Ve-=2;nt[tt]!==0&&(at=[0,nt[tt+1]]),at=at.concat(nt.slice(tt,Ve+2)),nt[Ve]!==0&&(at=at.concat([0,nt[Ve+1]]))}else if(pe.fill==="toself"||pe.fill==="tonext"){for(at=[],Re=0,ae.splitNull=!0,Pe=0;Pe-1;for(let[ae]of T)if(ae){var O=ae.trace,L=ae.t,U=L.index,B=O._length,W=L.x,$=L.y;if(O.selectedpoints||F||N){if(F||(F=!0),O.selectedpoints){var ue=x.selectBatch[U]=e.selIndices2selPoints(O),ce={};for(p=0;pw&&c||xi,y;for(g?y=c.sizeAvg||Math.max(c.size,3):y=S(h,m),A=0;A{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 m=0;my||!c.lower&&g{h[T+x]=m})}this.scatter.draw(...h)}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,h,f){let m=s.id!=null?s.id:s,c=h,T=f;return m<<16|(c&255)<<8|T&255}function i(s,h,f){let m,c,T,l,x,w,A,E,p=s[h],b=s[f];return p.length>2?(m=p[0],T=p[2],c=p[1],l=p[3]):p.length?(m=c=p[0],T=l=p[1]):(m=p.x,c=p.y,T=p.x+p.width,l=p.y+p.height),b.length>2?(x=b[0],A=b[2],w=b[1],E=b[3]):b.length?(x=w=b[0],A=E=b[1]):(x=b.x,w=b.y,A=b.x+b.width,E=b.y+b.height),[x,c,A,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 h=t(s);return[h.x,h.y,h.x+h.width,h.y+h.height]}}}}),jq=He({"src/traces/splom/plot.js"(Z,q){"use strict";var v=Uq(),_=sa(),S=tf(),M=Jd().selectMode;q.exports=function(r,o,a){if(a.length)for(var i=0;i-1,N=M(c)||!!i.selectedpoints||F,O=!0;if(N){var L=i._length;if(i.selectedpoints){s.selectBatch=i.selectedpoints;var U=i.selectedpoints,B={};for(x=0;x=W[$][0]&&B<=W[$][1])return!0;return!1}function h(B){B.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function f(B){B.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(B){if(!B.brush.filterSpecified)return"0,"+B.height;for(var W=c(B.brush.filter.getConsolidated(),B.height),$=[0],ue,ce,de,Y=W.length?W[0][0]:null,X=0;XB[1]+$||W=.9*B[1]+.1*B[0]?"n":W<=.9*B[0]+.1*B[1]?"s":"ns"}function l(){_.select(document.body).style("cursor",null)}function x(B){B.attr("stroke-dasharray",m)}function w(B,W){var $=_.select(B).selectAll(".highlight, .highlight-shadow"),ue=W?$.transition().duration(v.bar.snapDuration).each("end",W):$;x(ue)}function A(B,W){var $=B.brush,ue=$.filterSpecified,ce=NaN,de={},Y;if(ue){var X=B.height,Q=$.filter.getConsolidated(),V=c(Q,X),le=NaN,ae=NaN,j=NaN;for(Y=0;Y<=V.length;Y++){var ee=V[Y];if(ee&&ee[0]<=W&&W<=ee[1]){le=Y;break}else if(ae=Y?Y-1:NaN,ee&&ee[0]>W){j=Y;break}}if(ce=le,isNaN(ce)&&(isNaN(ae)||isNaN(j)?ce=isNaN(ae)?j:ae:ce=W-V[ae][1]=Re[0]&&Se<=Re[1]){de.clickableOrdinalRange=Re;break}}}return de}function E(B,W){_.event.sourceEvent.stopPropagation();var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=W.unitToPaddedPx.invert($),ce=W.brush,de=A(W,$),Y=de.interval,X=ce.svgBrush;if(X.wasDragged=!1,X.grabbingBar=de.region==="ns",X.grabbingBar){var Q=Y.map(W.unitToPaddedPx);X.grabPoint=$-Q[0]-v.verticalPadding,X.barLength=Q[1]-Q[0]}X.clickableOrdinalRange=de.clickableOrdinalRange,X.stayingIntervals=W.multiselect&&ce.filterSpecified?ce.filter.getConsolidated():[],Y&&(X.stayingIntervals=X.stayingIntervals.filter(function(V){return V[0]!==Y[0]&&V[1]!==Y[1]})),X.startExtent=de.region?Y[de.region==="s"?1:0]:ue,W.parent.inBrushDrag=!0,X.brushStartCallback()}function p(B,W){_.event.sourceEvent.stopPropagation();var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=W.brush.svgBrush;ue.wasDragged=!0,ue._dragging=!0,ue.grabbingBar?ue.newExtent=[$-ue.grabPoint,$+ue.barLength-ue.grabPoint].map(W.unitToPaddedPx.invert):ue.newExtent=[ue.startExtent,W.unitToPaddedPx.invert($)].sort(e),W.brush.filterSpecified=!0,ue.extent=ue.stayingIntervals.concat([ue.newExtent]),ue.brushCallback(W),w(B.parentNode)}function b(B,W){var $=W.brush,ue=$.filter,ce=$.svgBrush;ce._dragging||(d(B,W),p(B,W),W.brush.svgBrush.wasDragged=!1),ce._dragging=!1;var de=_.event;de.sourceEvent.stopPropagation();var Y=ce.grabbingBar;if(ce.grabbingBar=!1,ce.grabLocation=void 0,W.parent.inBrushDrag=!1,l(),!ce.wasDragged){ce.wasDragged=void 0,ce.clickableOrdinalRange?$.filterSpecified&&W.multiselect?ce.extent.push(ce.clickableOrdinalRange):(ce.extent=[ce.clickableOrdinalRange],$.filterSpecified=!0):Y?(ce.extent=ce.stayingIntervals,ce.extent.length===0&&z($)):z($),ce.brushCallback(W),w(B.parentNode),ce.brushEndCallback($.filterSpecified?ue.getConsolidated():[]);return}var X=function(){ue.set(ue.getConsolidated())};if(W.ordinal){var Q=W.unitTickvals;Q[Q.length-1]ce.newExtent[0];ce.extent=ce.stayingIntervals.concat(V?[ce.newExtent]:[]),ce.extent.length||z($),ce.brushCallback(W),V?w(B.parentNode,X):(X(),w(B.parentNode))}else X();ce.brushEndCallback($.filterSpecified?ue.getConsolidated():[])}function d(B,W){var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=A(W,$),ce="crosshair";ue.clickableOrdinalRange?ce="pointer":ue.region&&(ce=ue.region+"-resize"),_.select(document.body).style("cursor",ce)}function u(B){B.on("mousemove",function(W){_.event.preventDefault(),W.parent.inBrushDrag||d(this,W)}).on("mouseleave",function(W){W.parent.inBrushDrag||l()}).call(_.behavior.drag().on("dragstart",function(W){E(this,W)}).on("drag",function(W){p(this,W)}).on("dragend",function(W){b(this,W)}))}function g(B,W){return B[0]-W[0]}function y(B,W,$){var ue=$._context.staticPlot,ce=B.selectAll(".background").data(M);ce.enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events",ue?"none":"auto").attr("transform",t(0,v.verticalPadding)),ce.call(u).attr("height",function(X){return X.height-v.verticalPadding});var de=B.selectAll(".highlight-shadow").data(M);de.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",W).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),de.attr("y1",function(X){return X.height}).call(x);var Y=B.selectAll(".highlight").data(M);Y.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),Y.attr("y1",function(X){return X.height}).call(x)}function D(B,W,$){var ue=B.selectAll("."+v.cn.axisBrush).data(M,S);ue.enter().append("g").classed(v.cn.axisBrush,!0),y(ue,W,$)}function P(B){return B.svgBrush.extent.map(function(W){return W.slice()})}function z(B){B.filterSpecified=!1,B.svgBrush.extent=[[-1/0,1/0]]}function F(B){return function($){var ue=$.brush,ce=P(ue),de=ce.slice();ue.filter.set(de),B()}}function N(B){for(var W=B.slice(),$=[],ue,ce=W.shift();ce;){for(ue=ce.slice();(ce=W.shift())&&ce[0]<=ue[1];)ue[1]=Math.max(ue[1],ce[1]);$.push(ue)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function O(){var B=[],W,$;return{set:function(ue){B=ue.map(function(ce){return ce.slice().sort(e)}).sort(g),B.length===1&&B[0][0]===-1/0&&B[0][1]===1/0&&(B=[[0,-1]]),W=N(B),$=B.reduce(function(ce,de){return[Math.min(ce[0],de[0]),Math.max(ce[1],de[1])]},[1/0,-1/0])},get:function(){return B.slice()},getConsolidated:function(){return W},getBounds:function(){return $}}}function L(B,W,$,ue,ce,de){var Y=O();return Y.set($),{filter:Y,filterSpecified:W,svgBrush:{extent:[],brushStartCallback:ue,brushCallback:F(ce),brushEndCallback:de}}}function U(B,W){if(Array.isArray(B[0])?(B=B.map(function(ue){return ue.sort(e)}),W.multiselect?B=N(B.sort(g)):B=[B[0]]):B=[B.sort(e)],W.tickvals){var $=W.tickvals.slice().sort(e);if(B=B.map(function(ue){var ce=[n(0,$,ue[0],[]),n(1,$,ue[1],[])];if(ce[1]>ce[0])return ce}).filter(function(ue){return ue}),!B.length)return}return B.length>1?B:B[0]}q.exports={makeBrush:L,ensureAxisBrush:D,cleanRanges:U}}}),Yq=He({"src/traces/parcoords/defaults.js"(Z,q){"use strict";var v=sa(),_=wp().hasColorscale,S=_h(),M=wc().defaults,e=pp(),t=Wo(),r=m6(),o=g6(),a=Ax().maxDimensionCount,i=bT();function n(h,f,m,c,T){var l=T("line.color",m);if(_(h,"line")&&v.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),S(h,f,c,T,{prefix:"line.",cLetter:"c"}),l.length;f.line.color=m}return 1/0}function s(h,f,m,c){function T(E,p){return v.coerce(h,f,r.dimensions,E,p)}var l=T("values"),x=T("visible");if(l&&l.length||(x=f.visible=!1),x){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,c.layout),T("multiselect");var A=T("constraintrange");A&&(f.constraintrange=o.cleanRanges(A,f))}}q.exports=function(f,m,c,T){function l(p,b){return v.coerce(f,m,r,p,b)}var x=f.dimensions;Array.isArray(x)&&x.length>a&&(v.log("parcoords traces support up to "+a+" dimensions at the moment"),x.splice(a));var w=e(f,m,{name:"dimensions",layout:T,handleItemDefaults:s}),A=n(f,m,c,T,l);M(m,T,l),(!Array.isArray(w)||!w.length)&&(m.visible=!1),i(m,w,"values",A);var E=v.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});v.coerceFont(l,"labelfont",E),v.coerceFont(l,"tickfont",E,{autoShadowDflt:!0}),v.coerceFont(l,"rangefont",E),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Kq=He({"src/traces/parcoords/calc.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray,_=rc(),S=Cv().wrap;q.exports=function(t,r){var o,a;return _.hasColorscale(r,"line")&&v(r.line.color)?(o=r.line.color,a=_.extractOpts(r.line).colorscale,_.calc(t,r,{vals:o,containerStr:"line",cLetter:"c"})):(o=M(r._length),a=[[0,r.line.color],[1,r.line.color]]),S({lineColor:o,cscale:a})};function M(e){for(var t=new Array(e),r=0;r>>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])S=wT.default[Z].slice(),e="rgb";else if(Z==="transparent")M=0,e="rgb",S=[0,0,0];else if(Z[0]==="#"){var t=Z.slice(1),r=t.length,o=r<=4;M=1,o?(S=[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)):(S=[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)),S[0]||(S[0]=0),S[1]||(S[1]=0),S[2]||(S[2]=0),e="rgb"}else if(_=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Z)){var a=_[1];e=a.replace(/a$/,"");var i=e==="cmyk"?4:e==="gray"?1:3;S=_[2].trim().split(/\s*[,\/]\s*|\s+/),e==="color"&&(e=S.shift()),S=S.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=S.length>i?S.pop():1}else/[0-9](?:\s|\/|,)/.test(Z)&&(S=Z.match(/([0-9]+)/g).map(function(n){return parseFloat(n)}),e=((v=(q=Z.match(/([a-z])/ig))==null?void 0:q.join(""))==null?void 0:v.toLowerCase())||"rgb");return{space:e,values:S,alpha:M}}var wT,y6,TT,$q=Ho({"node_modules/color-parse/index.js"(){wT=jp(xE(),1),y6=Jq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Sx,_6=Ho({"node_modules/color-space/rgb.js"(){Sx={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mx,Qq=Ho({"node_modules/color-space/hsl.js"(){_6(),Mx={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Z){var q=Z[0]/360,v=Z[1]/100,_=Z[2]/100,S,M,e,t,r,o=0;if(v===0)return r=_*255,[r,r,r];for(M=_<.5?_*(1+v):_+v-_*v,S=2*_-M,t=[0,0,0];o<3;)e=q+1/3*-(o-1),e<0?e++:e>1&&e--,r=6*e<1?S+(M-S)*6*e:2*e<1?M:3*e<2?S+(M-S)*(2/3-e)*6:S,t[o++]=r*255;return t}},Sx.hsl=function(Z){var q=Z[0]/255,v=Z[1]/255,_=Z[2]/255,S=Math.min(q,v,_),M=Math.max(q,v,_),e=M-S,t,r,o;return M===S?t=0:q===M?t=(v-_)/e:v===M?t=2+(_-q)/e:_===M&&(t=4+(q-v)/e),t=Math.min(t*60,360),t<0&&(t+=360),o=(S+M)/2,M===S?r=0:o<=.5?r=e/(M+S):r=e/(2-M-S),[t,r*100,o*100]}}}),x6={};Jl(x6,{default:()=>eV});function eV(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var q,v,_,S=y6(Z);if(!S.space)return[];let M=S.space[0]==="h"?Mx.min:Sx.min,e=S.space[0]==="h"?Mx.max:Sx.max;return q=Array(3),q[0]=Math.min(Math.max(S.values[0],M[0]),e[0]),q[1]=Math.min(Math.max(S.values[1],M[1]),e[1]),q[2]=Math.min(Math.max(S.values[2],M[2]),e[2]),S.space[0]==="h"&&(q=Mx.rgb(q)),q.push(Math.min(Math.max(S.alpha,0),1)),q}var tV=Ho({"node_modules/color-rgba/index.js"(){$q(),_6(),Qq()}}),b6=He({"src/traces/parcoords/helpers.js"(Z){"use strict";var q=sa().isTypedArray;Z.convertTypedArray=function(v){return q(v)?Array.prototype.slice.call(v):v},Z.isOrdinal=function(v){return!!v.tickvals},Z.isVisible=function(v){return v.visible||!("visible"in v)}}}),rV=He({"src/traces/parcoords/lines.js"(Z,q){"use strict";var v=["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(` +`),Ma;if(Xt&&(Ma=Cc(ea),Xt[Ma]))return Xt[Ma].apply(null,Ta);var Qa=Function.apply(null,oa.concat(ea));return Xt&&(Xt[Ma]=Qa),Qa.apply(null,Ta)}return{global:si,link:xa,block:Ya,proc:zi,scope:bi,cond:yi,compile:Ei}}var Qn="xyzw".split(""),io=5121,eo=1,co=2,An=0,un=1,yo=2,Qo=3,ks=4,rl=5,Ns=6,el="dither",Ss="blend.enable",Fl="blend.color",yl="blend.equation",ll="blend.func",Un="depth.enable",Ro="depth.func",Js="depth.range",Fs="depth.mask",cu="colorMask",Iu="cull.enable",Zu="cull.face",Ic="frontFace",bu="lineWidth",Rc="polygonOffset.enable",Au="polygonOffset.offset",yc="sample.alpha",fo="sample.enable",Fo="sample.coverage",Dc="stencil.enable",lc="stencil.mask",Yu="stencil.func",Oe="stencil.opFront",I="stencil.opBack",ie="scissor.enable",Te="scissor.box",Me="viewport",ze="profile",ht="framebuffer",wt="vert",Ot="frag",$t="elements",Tr="primitive",Sr="count",Kr="offset",na="instances",qe="vao",$e="Width",lt="Height",pt=ht+$e,Et=ht+lt,bt=Me+$e,Dt=Me+lt,ur="drawingBuffer",yr=ur+$e,Er=ur+lt,jr=[ll,yl,Yu,Oe,I,Fo,Me,Te,Au],Qr=34962,ha=34963,Aa=2884,Da=3042,ci=3024,Vi=2960,ji=2929,on=3089,Sn=32823,Kn=32926,Bn=32928,Ao=5126,ls=35664,Mo=35665,Yo=35666,ds=5124,ul=35667,tl=35668,es=35669,ts=35670,Il=35671,tu=35672,Ru=35673,vu=35674,wl=35675,fu=35676,uc=35678,Gl=35680,Hl=4,me=1028,De=1029,et=2304,dt=2305,yt=32775,Tt=32776,tr=519,zt=7680,_r=0,Gr=1,Xr=32774,wa=513,pa=36160,Ja=36064,ti={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sa={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},za={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:et,ccw:dt};function fi(it){return Array.isArray(it)||kr(it)||Ur(it)}function oi(it){return it.sort(function(Xt,fr){return Xt===Me?-1:fr===Me?1:Xt=1,oa>=2,Xt)}else if(fr===ks){var Ta=it.data;return new La(Ta.thisDep,Ta.contextDep,Ta.propDep,Xt)}else{if(fr===rl)return new La(!1,!1,!1,Xt);if(fr===Ns){for(var ma=!1,xa=!1,Ya=!1,bi=0;bi=1&&(xa=!0),si>=2&&(Ya=!0)}else yi.type===ks&&(ma=ma||yi.data.thisDep,xa=xa||yi.data.contextDep,Ya=Ya||yi.data.propDep)}return new La(ma,xa,Ya,Xt)}else return new La(fr===Qo,fr===yo,fr===un,Xt)}}var In=new La(!1,!1,!1,function(){});function Jn(it,Xt,fr,oa,Ta,ma,xa,Ya,bi,yi,si,gn,zi,Ei,Na,ea){var Ma=yi.Record,Qa={add:32774,subtract:32778,"reverse subtract":32779};fr.ext_blend_minmax&&(Qa.min=yt,Qa.max=Tt);var di=fr.angle_instanced_arrays,Va=fr.webgl_draw_buffers,Bi=fr.oes_vertex_array_object,Li={dirty:!0,profile:ea.profile},hn={},Ha=[],Ua={},Yi={};function Ri(mt){return mt.replace(".","_")}function Ti(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),hn[rr]=Li[rr]=!!Ft,Ua[rr]=Mt}function xi(mt,Mt,Ft){var rr=Ri(mt);Ha.push(mt),Array.isArray(Ft)?(Li[rr]=Ft.slice(),hn[rr]=Ft.slice()):Li[rr]=hn[rr]=Ft,Yi[rr]=Mt}function Xi(mt){return!!isNaN(mt)}Ti(el,ci),Ti(Ss,Da),xi(Fl,"blendColor",[0,0,0,0]),xi(yl,"blendEquationSeparate",[Xr,Xr]),xi(ll,"blendFuncSeparate",[Gr,_r,Gr,_r]),Ti(Un,ji,!0),xi(Ro,"depthFunc",wa),xi(Js,"depthRange",[0,1]),xi(Fs,"depthMask",!0),xi(cu,cu,[!0,!0,!0,!0]),Ti(Iu,Aa),xi(Zu,"cullFace",De),xi(Ic,Ic,dt),xi(bu,bu,1),Ti(Rc,Sn),xi(Au,"polygonOffset",[0,0]),Ti(yc,Kn),Ti(fo,Bn),xi(Fo,"sampleCoverage",[1,!1]),Ti(Dc,Vi),xi(lc,"stencilMask",-1),xi(Yu,"stencilFunc",[tr,0,-1]),xi(Oe,"stencilOpSeparate",[me,zt,zt,zt]),xi(I,"stencilOpSeparate",[De,zt,zt,zt]),Ti(ie,on),xi(Te,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),xi(Me,Me,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var vn={gl:it,context:zi,strings:Xt,next:hn,current:Li,draw:gn,elements:ma,buffer:Ta,shader:si,attributes:yi.state,vao:yi,uniforms:bi,framebuffer:Ya,extensions:fr,timer:Ei,isBufferArgs:fi},Rn={primTypes:Ia,compareFuncs:Sa,blendFuncs:ti,blendEquations:Qa,stencilOps:za,glTypes:_a,orientationType:Xa};Va&&(Rn.backBuffer=[De],Rn.drawBuffer=d(oa.maxDrawbuffers,function(mt){return mt===0?[0]:d(mt,function(Mt){return Ja+Mt})}));var Ii=0;function nn(){var mt=Mn({cache:Na}),Mt=mt.link,Ft=mt.global;mt.id=Ii++,mt.batchId="0";var rr=Mt(vn),hr=mt.shared={props:"a0"};Object.keys(vn).forEach(function(ir){hr[ir]=Ft.def(rr,".",ir)});var sr=mt.next={},dr=mt.current={};Object.keys(Yi).forEach(function(ir){Array.isArray(Li[ir])&&(sr[ir]=Ft.def(hr.next,".",ir),dr[ir]=Ft.def(hr.current,".",ir))});var lr=mt.constants={};Object.keys(Rn).forEach(function(ir){lr[ir]=Ft.def(JSON.stringify(Rn[ir]))}),mt.invoke=function(ir,Gt){switch(Gt.type){case An:var Dr=["this",hr.context,hr.props,mt.batchId];return ir.def(Mt(Gt.data),".call(",Dr.slice(0,Math.max(Gt.data.length+1,4)),")");case un:return ir.def(hr.props,Gt.data);case yo:return ir.def(hr.context,Gt.data);case Qo:return ir.def("this",Gt.data);case ks:return Gt.data.append(mt,ir),Gt.data.ref;case rl:return Gt.data.toString();case Ns:return Gt.data.map(function(Jr){return mt.invoke(ir,Jr)})}},mt.attribCache={};var Wt={};return mt.scopeAttrib=function(ir){var Gt=Xt.id(ir);if(Gt in Wt)return Wt[Gt];var Dr=yi.scope[Gt];Dr||(Dr=yi.scope[Gt]=new Ma);var Jr=Wt[Gt]=Mt(Dr);return Jr},mt}function Ln(mt){var Mt=mt.static,Ft=mt.dynamic,rr;if(ze in Mt){var hr=!!Mt[ze];rr=an(function(dr,lr){return hr}),rr.enable=hr}else if(ze in Ft){var sr=Ft[ze];rr=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}return rr}function Dn(mt,Mt){var Ft=mt.static,rr=mt.dynamic;if(ht in Ft){var hr=Ft[ht];return hr?(hr=Ya.getFramebuffer(hr),an(function(dr,lr){var Wt=dr.link(hr),ir=dr.shared;lr.set(ir.framebuffer,".next",Wt);var Gt=ir.context;return lr.set(Gt,"."+pt,Wt+".width"),lr.set(Gt,"."+Et,Wt+".height"),Wt})):an(function(dr,lr){var Wt=dr.shared;lr.set(Wt.framebuffer,".next","null");var ir=Wt.context;return lr.set(ir,"."+pt,ir+"."+yr),lr.set(ir,"."+Et,ir+"."+Er),"null"})}else if(ht in rr){var sr=rr[ht];return dn(sr,function(dr,lr){var Wt=dr.invoke(lr,sr),ir=dr.shared,Gt=ir.framebuffer,Dr=lr.def(Gt,".getFramebuffer(",Wt,")");lr.set(Gt,".next",Dr);var Jr=ir.context;return lr.set(Jr,"."+pt,Dr+"?"+Dr+".width:"+Jr+"."+yr),lr.set(Jr,"."+Et,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Wn(mt,Mt,Ft){var rr=mt.static,hr=mt.dynamic;function sr(Wt){if(Wt in rr){var ir=rr[Wt],Gt=!0,Dr=ir.x|0,Jr=ir.y|0,ya,vi;return"width"in ir?ya=ir.width|0:Gt=!1,"height"in ir?vi=ir.height|0:Gt=!1,new La(!Gt&&Mt&&Mt.thisDep,!Gt&&Mt&&Mt.contextDep,!Gt&&Mt&&Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context,_i=ya;"width"in ir||(_i=Fi.def(ui,".",pt,"-",Dr));var Si=vi;return"height"in ir||(Si=Fi.def(ui,".",Et,"-",Jr)),[Dr,Jr,_i,Si]})}else if(Wt in hr){var Ga=hr[Wt],ii=dn(Ga,function(Zi,Fi){var ui=Zi.invoke(Fi,Ga),_i=Zi.shared.context,Si=Fi.def(ui,".x|0"),Ui=Fi.def(ui,".y|0"),fn=Fi.def('"width" in ',ui,"?",ui,".width|0:","(",_i,".",pt,"-",Si,")"),_o=Fi.def('"height" in ',ui,"?",ui,".height|0:","(",_i,".",Et,"-",Ui,")");return[Si,Ui,fn,_o]});return Mt&&(ii.thisDep=ii.thisDep||Mt.thisDep,ii.contextDep=ii.contextDep||Mt.contextDep,ii.propDep=ii.propDep||Mt.propDep),ii}else return Mt?new La(Mt.thisDep,Mt.contextDep,Mt.propDep,function(Zi,Fi){var ui=Zi.shared.context;return[0,0,Fi.def(ui,".",pt),Fi.def(ui,".",Et)]}):null}var dr=sr(Me);if(dr){var lr=dr;dr=new La(dr.thisDep,dr.contextDep,dr.propDep,function(Wt,ir){var Gt=lr.append(Wt,ir),Dr=Wt.shared.context;return ir.set(Dr,"."+bt,Gt[2]),ir.set(Dr,"."+Dt,Gt[3]),Gt})}return{viewport:dr,scissor_box:sr(Te)}}function Os(mt,Mt){var Ft=mt.static,rr=typeof Ft[Ot]=="string"&&typeof Ft[wt]=="string";if(rr){if(Object.keys(Mt.dynamic).length>0)return null;var hr=Mt.static,sr=Object.keys(hr);if(sr.length>0&&typeof hr[sr[0]]=="number"){for(var dr=[],lr=0;lr"+Si+"?"+Gt+".constant["+Si+"]:0;"}).join(""),"}}else{","if(",ya,"(",Gt,".buffer)){",Zi,"=",vi,".createStream(",Qr,",",Gt,".buffer);","}else{",Zi,"=",vi,".getBuffer(",Gt,".buffer);","}",Fi,'="type" in ',Gt,"?",Jr.glTypes,"[",Gt,".type]:",Zi,".dtype;",Ga.normalized,"=!!",Gt,".normalized;");function ui(_i){ir(Ga[_i],"=",Gt,".",_i,"|0;")}return ui("size"),ui("offset"),ui("stride"),ui("divisor"),ir("}}"),ir.exit("if(",Ga.isStream,"){",vi,".destroyStream(",Zi,");","}"),Ga}hr[sr]=dn(dr,lr)}),hr}function El(mt){var Mt=mt.static,Ft=mt.dynamic,rr={};return Object.keys(Mt).forEach(function(hr){var sr=Mt[hr];rr[hr]=an(function(dr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:dr.link(sr)})}),Object.keys(Ft).forEach(function(hr){var sr=Ft[hr];rr[hr]=dn(sr,function(dr,lr){return dr.invoke(lr,sr)})}),rr}function ru(mt,Mt,Ft,rr,hr){var sr=mt.static,dr=mt.dynamic,lr=Os(mt,Mt),Wt=Dn(mt,hr),ir=Wn(mt,Wt,hr),Gt=ho(mt,hr),Dr=Xl(mt,hr),Jr=xl(mt,hr,lr);function ya(ui){var _i=ir[ui];_i&&(Dr[ui]=_i)}ya(Me),ya(Ri(Te));var vi=Object.keys(Dr).length>0,Ga={framebuffer:Wt,draw:Gt,shader:Jr,state:Dr,dirty:vi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Ln(mt,hr),Ga.uniforms=hs(Ft,hr),Ga.drawVAO=Ga.scopeVAO=Gt.vao,!Ga.drawVAO&&Jr.program&&!lr&&fr.angle_instanced_arrays&&Gt.static.elements){var ii=!0,Zi=Jr.program.attributes.map(function(ui){var _i=Mt.static[ui];return ii=ii&&!!_i,_i});if(ii&&Zi.length>0){var Fi=yi.getVAO(yi.createVAO({attributes:Zi,elements:Gt.static.elements}));Ga.drawVAO=new La(null,null,null,function(ui,_i){return ui.link(Fi)}),Ga.useVAO=!0}}return lr?Ga.useVAO=!0:Ga.attributes=Al(Mt,hr),Ga.context=El(rr,hr),Ga}function js(mt,Mt,Ft){var rr=mt.shared,hr=rr.context,sr=mt.scope();Object.keys(Ft).forEach(function(dr){Mt.save(hr,"."+dr);var lr=Ft[dr],Wt=lr.append(mt,Mt);Array.isArray(Wt)?sr(hr,".",dr,"=[",Wt.join(),"];"):sr(hr,".",dr,"=",Wt,";")}),Mt(sr)}function pl(mt,Mt,Ft,rr){var hr=mt.shared,sr=hr.gl,dr=hr.framebuffer,lr;Va&&(lr=Mt.def(hr.extensions,".webgl_draw_buffers"));var Wt=mt.constants,ir=Wt.drawBuffer,Gt=Wt.backBuffer,Dr;Ft?Dr=Ft.append(mt,Mt):Dr=Mt.def(dr,".next"),rr||Mt("if(",Dr,"!==",dr,".cur){"),Mt("if(",Dr,"){",sr,".bindFramebuffer(",pa,",",Dr,".framebuffer);"),Va&&Mt(lr,".drawBuffersWEBGL(",ir,"[",Dr,".colorAttachments.length]);"),Mt("}else{",sr,".bindFramebuffer(",pa,",null);"),Va&&Mt(lr,".drawBuffersWEBGL(",Gt,");"),Mt("}",dr,".cur=",Dr,";"),rr||Mt("}")}function bl(mt,Mt,Ft){var rr=mt.shared,hr=rr.gl,sr=mt.current,dr=mt.next,lr=rr.current,Wt=rr.next,ir=mt.cond(lr,".dirty");Ha.forEach(function(Gt){var Dr=Ri(Gt);if(!(Dr in Ft.state)){var Jr,ya;if(Dr in dr){Jr=dr[Dr],ya=sr[Dr];var vi=d(Li[Dr].length,function(ii){return ir.def(Jr,"[",ii,"]")});ir(mt.cond(vi.map(function(ii,Zi){return ii+"!=="+ya+"["+Zi+"]"}).join("||")).then(hr,".",Yi[Dr],"(",vi,");",vi.map(function(ii,Zi){return ya+"["+Zi+"]="+ii}).join(";"),";"))}else{Jr=ir.def(Wt,".",Dr);var Ga=mt.cond(Jr,"!==",lr,".",Dr);ir(Ga),Dr in Ua?Ga(mt.cond(Jr).then(hr,".enable(",Ua[Dr],");").else(hr,".disable(",Ua[Dr],");"),lr,".",Dr,"=",Jr,";"):Ga(hr,".",Yi[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&ir(lr,".dirty=false;"),Mt(ir)}function Xn(mt,Mt,Ft,rr){var hr=mt.shared,sr=mt.current,dr=hr.current,lr=hr.gl,Wt;oi(Object.keys(Ft)).forEach(function(ir){var Gt=Ft[ir];if(!(rr&&!rr(Gt))){var Dr=Gt.append(mt,Mt);if(Ua[ir]){var Jr=Ua[ir];sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(mt.cond(Wt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Wt,";")):(Mt(mt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Mt(dr,".",ir,"=",Dr,";"))}else if(ga(Dr)){var ya=sr[ir];Mt(lr,".",Yi[ir],"(",Dr,");",Dr.map(function(vi,Ga){return ya+"["+Ga+"]="+vi}).join(";"),";")}else sn(Gt)?(Wt=mt.link(Dr,{stable:!0}),Mt(lr,".",Yi[ir],"(",Wt,");",dr,".",ir,"=",Wt,";")):Mt(lr,".",Yi[ir],"(",Dr,");",dr,".",ir,"=",Dr,";")}})}function kl(mt,Mt){di&&(mt.instancing=Mt.def(mt.shared.extensions,".angle_instanced_arrays"))}function Io(mt,Mt,Ft,rr,hr){var sr=mt.shared,dr=mt.stats,lr=sr.current,Wt=sr.timer,ir=Ft.profile;function Gt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ya(ui){Dr=Mt.def(),ui(Dr,"=",Gt(),";"),typeof hr=="string"?ui(dr,".count+=",hr,";"):ui(dr,".count++;"),Ei&&(rr?(Jr=Mt.def(),ui(Jr,"=",Wt,".getNumPendingQueries();")):ui(Wt,".beginQuery(",dr,");"))}function vi(ui){ui(dr,".cpuTime+=",Gt(),"-",Dr,";"),Ei&&(rr?ui(Wt,".pushScopeStats(",Jr,",",Wt,".getNumPendingQueries(),",dr,");"):ui(Wt,".endQuery();"))}function Ga(ui){var _i=Mt.def(lr,".profile");Mt(lr,".profile=",ui,";"),Mt.exit(lr,".profile=",_i,";")}var ii;if(ir){if(sn(ir)){ir.enable?(ya(Mt),vi(Mt.exit),Ga("true")):Ga("false");return}ii=ir.append(mt,Mt),Ga(ii)}else ii=Mt.def(lr,".profile");var Zi=mt.block();ya(Zi),Mt("if(",ii,"){",Zi,"}");var Fi=mt.block();vi(Fi),Mt.exit("if(",ii,"){",Fi,"}")}function ge(mt,Mt,Ft,rr,hr){var sr=mt.shared;function dr(Wt){switch(Wt){case ls:case ul:case Il:return 2;case Mo:case tl:case tu:return 3;case Yo:case es:case Ru:return 4;default:return 1}}function lr(Wt,ir,Gt){var Dr=sr.gl,Jr=Mt.def(Wt,".location"),ya=Mt.def(sr.attributes,"[",Jr,"]"),vi=Gt.state,Ga=Gt.buffer,ii=[Gt.x,Gt.y,Gt.z,Gt.w],Zi=["buffer","normalized","offset","stride"];function Fi(){Mt("if(!",ya,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var _i=Gt.type,Si;if(Gt.size?Si=Mt.def(Gt.size,"||",ir):Si=ir,Mt("if(",ya,".type!==",_i,"||",ya,".size!==",Si,"||",Zi.map(function(fn){return ya+"."+fn+"!=="+Gt[fn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Ga,".buffer);",Dr,".vertexAttribPointer(",[Jr,Si,_i,Gt.normalized,Gt.stride,Gt.offset],");",ya,".type=",_i,";",ya,".size=",Si,";",Zi.map(function(fn){return ya+"."+fn+"="+Gt[fn]+";"}).join(""),"}"),di){var Ui=Gt.divisor;Mt("if(",ya,".divisor!==",Ui,"){",mt.instancing,".vertexAttribDivisorANGLE(",[Jr,Ui],");",ya,".divisor=",Ui,";}")}}function ui(){Mt("if(",ya,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ya,".buffer=null;","}if(",Qn.map(function(_i,Si){return ya+"."+_i+"!=="+ii[Si]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",ii,");",Qn.map(function(_i,Si){return ya+"."+_i+"="+ii[Si]+";"}).join(""),"}")}vi===eo?Fi():vi===co?ui():(Mt("if(",vi,"===",eo,"){"),Fi(),Mt("}else{"),ui(),Mt("}"))}rr.forEach(function(Wt){var ir=Wt.name,Gt=Ft.attributes[ir],Dr;if(Gt){if(!hr(Gt))return;Dr=Gt.append(mt,Mt)}else{if(!hr(In))return;var Jr=mt.scopeAttrib(ir);Dr={},Object.keys(new Ma).forEach(function(ya){Dr[ya]=Mt.def(Jr,".",ya)})}lr(mt.link(Wt),dr(Wt.info.type),Dr)})}function K(mt,Mt,Ft,rr,hr,sr){for(var dr=mt.shared,lr=dr.gl,Wt,ir=0;ir1){for(var Uo=[],Ds=[],Oo=0;Oo>1)",Ga],");")}function Ui(){Ft(ii,".drawArraysInstancedANGLE(",[Jr,ya,vi,Ga],");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}function _i(){function Si(){Ft(sr+".drawElements("+[Jr,vi,Zi,ya+"<<(("+Zi+"-"+io+")>>1)"]+");")}function Ui(){Ft(sr+".drawArrays("+[Jr,ya,vi]+");")}Gt&&Gt!=="null"?Fi?Si():(Ft("if(",Gt,"){"),Si(),Ft("}else{"),Ui(),Ft("}")):Ui()}di&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(Ft("if(",Ga,">0){"),ui(),Ft("}else if(",Ga,"<0){"),_i(),Ft("}")):ui():_i()}function re(mt,Mt,Ft,rr,hr){var sr=nn(),dr=sr.proc("body",hr);return di&&(sr.instancing=dr.def(sr.shared.extensions,".angle_instanced_arrays")),mt(sr,dr,Ft,rr),sr.compile().body}function ye(mt,Mt,Ft,rr){kl(mt,Mt),Ft.useVAO?Ft.drawVAO?Mt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Mt),");"):Mt(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(Mt(mt.shared.vao,".setVAO(null);"),ge(mt,Mt,Ft,rr.attributes,function(){return!0})),K(mt,Mt,Ft,rr.uniforms,function(){return!0},!1),xe(mt,Mt,Mt,Ft)}function Ue(mt,Mt){var Ft=mt.proc("draw",1);kl(mt,Ft),js(mt,Ft,Mt.context),pl(mt,Ft,Mt.framebuffer),bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state),Io(mt,Ft,Mt,!1,!0);var rr=Mt.shader.progVar.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",rr,".program);"),Mt.shader.program)ye(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var hr=mt.global.def("{}"),sr=Ft.def(rr,".id"),dr=Ft.def(hr,"[",sr,"]");Ft(mt.cond(dr).then(dr,".call(this,a0);").else(dr,"=",hr,"[",sr,"]=",mt.link(function(lr){return re(ye,mt,Mt,lr,1)}),"(",rr,");",dr,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function ke(mt,Mt,Ft,rr){mt.batchId="a1",kl(mt,Mt);function hr(){return!0}ge(mt,Mt,Ft,rr.attributes,hr),K(mt,Mt,Ft,rr.uniforms,hr,!1),xe(mt,Mt,Mt,Ft)}function Qe(mt,Mt,Ft,rr){kl(mt,Mt);var hr=Ft.contextDep,sr=Mt.def(),dr="a0",lr="a1",Wt=Mt.def();mt.shared.props=Wt,mt.batchId=sr;var ir=mt.scope(),Gt=mt.scope();Mt(ir.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Wt,"=",dr,"[",sr,"];",Gt,"}",ir.exit);function Dr(Zi){return Zi.contextDep&&hr||Zi.propDep}function Jr(Zi){return!Dr(Zi)}if(Ft.needsContext&&js(mt,Gt,Ft.context),Ft.needsFramebuffer&&pl(mt,Gt,Ft.framebuffer),Xn(mt,Gt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Io(mt,Gt,Ft,!1,!0),rr)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?Gt(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,Gt),");"):ir(mt.shared.vao,".setVAO(",Ft.drawVAO.append(mt,ir),");"):ir(mt.shared.vao,".setVAO(",mt.shared.vao,".targetVAO);"):(ir(mt.shared.vao,".setVAO(null);"),ge(mt,ir,Ft,rr.attributes,Jr),ge(mt,Gt,Ft,rr.attributes,Dr)),K(mt,ir,Ft,rr.uniforms,Jr,!1),K(mt,Gt,Ft,rr.uniforms,Dr,!0),xe(mt,ir,Gt,Ft);else{var ya=mt.global.def("{}"),vi=Ft.shader.progVar.append(mt,Gt),Ga=Gt.def(vi,".id"),ii=Gt.def(ya,"[",Ga,"]");Gt(mt.shared.gl,".useProgram(",vi,".program);","if(!",ii,"){",ii,"=",ya,"[",Ga,"]=",mt.link(function(Zi){return re(ke,mt,Ft,Zi,2)}),"(",vi,");}",ii,".call(this,a0[",sr,"],",sr,");")}}function vt(mt,Mt){var Ft=mt.proc("batch",2);mt.batchId="0",kl(mt,Ft);var rr=!1,hr=!0;Object.keys(Mt.context).forEach(function(ya){rr=rr||Mt.context[ya].propDep}),rr||(js(mt,Ft,Mt.context),hr=!1);var sr=Mt.framebuffer,dr=!1;sr?(sr.propDep?rr=dr=!0:sr.contextDep&&rr&&(dr=!0),dr||pl(mt,Ft,sr)):pl(mt,Ft,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(rr=!0);function lr(ya){return ya.contextDep&&rr||ya.propDep}bl(mt,Ft,Mt),Xn(mt,Ft,Mt.state,function(ya){return!lr(ya)}),(!Mt.profile||!lr(Mt.profile))&&Io(mt,Ft,Mt,!1,"a1"),Mt.contextDep=rr,Mt.needsContext=hr,Mt.needsFramebuffer=dr;var Wt=Mt.shader.progVar;if(Wt.contextDep&&rr||Wt.propDep)Qe(mt,Ft,Mt,null);else{var ir=Wt.append(mt,Ft);if(Ft(mt.shared.gl,".useProgram(",ir,".program);"),Mt.shader.program)Qe(mt,Ft,Mt,Mt.shader.program);else{Ft(mt.shared.vao,".setVAO(null);");var Gt=mt.global.def("{}"),Dr=Ft.def(ir,".id"),Jr=Ft.def(Gt,"[",Dr,"]");Ft(mt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",Gt,"[",Dr,"]=",mt.link(function(ya){return re(Qe,mt,Mt,ya,2)}),"(",ir,");",Jr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Ft(mt.shared.current,".dirty=true;"),mt.shared.vao&&Ft(mt.shared.vao,".setVAO(null);")}function qt(mt,Mt){var Ft=mt.proc("scope",3);mt.batchId="a2";var rr=mt.shared,hr=rr.current;if(js(mt,Ft,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(mt,Ft),oi(Object.keys(Mt.state)).forEach(function(lr){var Wt=Mt.state[lr],ir=Wt.append(mt,Ft);ga(ir)?ir.forEach(function(Gt,Dr){Xi(Gt)?Ft.set(mt.next[lr],"["+Dr+"]",Gt):Ft.set(mt.next[lr],"["+Dr+"]",mt.link(Gt,{stable:!0}))}):sn(Wt)?Ft.set(rr.next,"."+lr,mt.link(ir,{stable:!0})):Ft.set(rr.next,"."+lr,ir)}),Io(mt,Ft,Mt,!0,!0),[$t,Kr,Sr,na,Tr].forEach(function(lr){var Wt=Mt.draw[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.draw,"."+lr,ir):Ft.set(rr.draw,"."+lr,mt.link(ir),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function(lr){var Wt=Mt.uniforms[lr].append(mt,Ft);Array.isArray(Wt)&&(Wt="["+Wt.map(function(ir){return Xi(ir)?ir:mt.link(ir,{stable:!0})})+"]"),Ft.set(rr.uniforms,"["+mt.link(Xt.id(lr),{stable:!0})+"]",Wt)}),Object.keys(Mt.attributes).forEach(function(lr){var Wt=Mt.attributes[lr].append(mt,Ft),ir=mt.scopeAttrib(lr);Object.keys(new Ma).forEach(function(Gt){Ft.set(ir,"."+Gt,Wt[Gt])})}),Mt.scopeVAO){var sr=Mt.scopeVAO.append(mt,Ft);Xi(sr)?Ft.set(rr.vao,".targetVAO",sr):Ft.set(rr.vao,".targetVAO",mt.link(sr,{stable:!0}))}function dr(lr){var Wt=Mt.shader[lr];if(Wt){var ir=Wt.append(mt,Ft);Xi(ir)?Ft.set(rr.shader,"."+lr,ir):Ft.set(rr.shader,"."+lr,mt.link(ir,{stable:!0}))}}dr(wt),dr(Ot),Object.keys(Mt.state).length>0&&(Ft(hr,".dirty=true;"),Ft.exit(hr,".dirty=true;")),Ft("a1(",mt.shared.context,",a0,",mt.batchId,");")}function br(mt){if(!(typeof mt!="object"||ga(mt))){for(var Mt=Object.keys(mt),Ft=0;Ft=0;--re){var ye=vn[re];ye&&ye(Na,null,0)}fr.flush(),si&&si.update()}function Wn(){!Ln&&vn.length>0&&(Ln=f.next(Dn))}function Os(){Ln&&(f.cancel(Dn),Ln=null)}function xl(re){re.preventDefault(),Ta=!0,Os(),Rn.forEach(function(ye){ye()})}function ho(re){fr.getError(),Ta=!1,ma.restore(),hn.restore(),di.restore(),Ha.restore(),Ua.restore(),Yi.restore(),Bi.restore(),si&&si.restore(),Ri.procs.refresh(),Wn(),Ii.forEach(function(ye){ye()})}Xi&&(Xi.addEventListener(fs,xl,!1),Xi.addEventListener(ms,ho,!1));function Xl(){vn.length=0,Os(),Xi&&(Xi.removeEventListener(fs,xl),Xi.removeEventListener(ms,ho)),hn.clear(),Yi.clear(),Ua.clear(),Bi.clear(),Ha.clear(),Va.clear(),di.clear(),si&&si.clear(),nn.forEach(function(re){re()})}function hs(re){function ye(sr){var dr=v({},sr);delete dr.uniforms,delete dr.attributes,delete dr.context,delete dr.vao,"stencil"in dr&&dr.stencil.op&&(dr.stencil.opBack=dr.stencil.opFront=dr.stencil.op,delete dr.stencil.op);function lr(Wt){if(Wt in dr){var ir=dr[Wt];delete dr[Wt],Object.keys(ir).forEach(function(Gt){dr[Wt+"."+Gt]=ir[Gt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(dr.vao=sr.vao),dr}function Ue(sr,dr){var lr={},Wt={};return Object.keys(sr).forEach(function(ir){var Gt=sr[ir];if(h.isDynamic(Gt)){Wt[ir]=h.unbox(Gt,ir);return}else if(dr&&Array.isArray(Gt)){for(var Dr=0;Dr0)return mt.call(this,rr(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return mt.call(this,sr,sr.length)}else return pr.call(this,sr)}return v(hr,{stats:br,destroy:function(){Br.destroy()}})}var Al=Yi.setFBO=hs({framebuffer:h.define.call(null,Tl,"framebuffer")});function El(re,ye){var Ue=0;Ri.procs.poll();var ke=ye.color;ke&&(fr.clearColor(+ke[0]||0,+ke[1]||0,+ke[2]||0,+ke[3]||0),Ue|=al),"depth"in ye&&(fr.clearDepth(+ye.depth),Ue|=_l),"stencil"in ye&&(fr.clearStencil(ye.stencil|0),Ue|=mn),fr.clear(Ue)}function ru(re){if("framebuffer"in re)if(re.framebuffer&&re.framebuffer_reglType==="framebufferCube")for(var ye=0;ye<6;++ye)Al(v({framebuffer:re.framebuffer.faces[ye]},re),El);else Al(re,El);else El(null,re)}function js(re){vn.push(re);function ye(){var Ue=Rl(vn,re);function ke(){var Qe=Rl(vn,ke);vn[Qe]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Os()}vn[Ue]=ke}return Wn(),{cancel:ye}}function pl(){var re=xi.viewport,ye=xi.scissor_box;re[0]=re[1]=ye[0]=ye[1]=0,Na.viewportWidth=Na.framebufferWidth=Na.drawingBufferWidth=re[2]=ye[2]=fr.drawingBufferWidth,Na.viewportHeight=Na.framebufferHeight=Na.drawingBufferHeight=re[3]=ye[3]=fr.drawingBufferHeight}function bl(){Na.tick+=1,Na.time=kl(),pl(),Ri.procs.poll()}function Xn(){Ha.refresh(),pl(),Ri.procs.refresh(),si&&si.update()}function kl(){return(m()-gn)/1e3}Xn();function Io(re,ye){var Ue;switch(re){case"frame":return js(ye);case"lost":Ue=Rn;break;case"restore":Ue=Ii;break;case"destroy":Ue=nn;break;default:}return Ue.push(ye),{cancel:function(){for(var ke=0;ke=0},read:Ti,destroy:Xl,_gl:fr,_refresh:Xn,poll:function(){bl(),si&&si.update()},now:kl,stats:Ya,getCachedCode:ge,preloadCachedCode:K});return Xt.onDone(null,xe),xe}return _c})}}),xT=He({"src/lib/prepare_regl.js"(Z,q){"use strict";var v=TE(),_=Pq();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=_({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||v({container:r._glcontainer.node()}),o}}}),p6=He({"src/traces/scattergl/plot.js"(h,q){"use strict";var v=HE(),_=a6(),S=dq(),M=Lq(),e=sa(),t=Jd().selectMode,r=xT(),o=Fu(),a=O5(),i=qE().styleTextSelection,n={};function s(f,m,c,T){var l=f._size,x=f.width*T,w=f.height*T,A=l.l*T,E=l.b*T,p=l.r*T,b=l.t*T,d=l.w*T,u=l.h*T;return[A+m.domain[0]*d,E+c.domain[0]*u,x-p-(1-m.domain[1])*d,w-b-(1-c.domain[1])*u]}var h=q.exports=function(m,c,T){if(T.length){var l=m._fullLayout,x=c._scene,w=c.xaxis,A=c.yaxis,E,p;if(x){var b=r(m,["ANGLE_instanced_arrays","OES_element_index_uint"],n);if(!b){x.init();return}var d=x.count,u=l._glcanvas.data()[0].regl;if(a(m,c,T),x.dirty){if((x.line2d||x.error2d)&&!(x.scatter2d||x.fill2d||x.glText)&&u.clear({color:!0,depth:!0}),x.error2d===!0&&(x.error2d=S(u)),x.line2d===!0&&(x.line2d=_(u)),x.scatter2d===!0&&(x.scatter2d=v(u)),x.fill2d===!0&&(x.fill2d=_(u)),x.glText===!0)for(x.glText=new Array(d),E=0;Ex.glText.length){var g=d-x.glText.length;for(E=0;Eee&&(isNaN(j[te])||isNaN(j[te+1]));)te-=2;ae.positions=j.slice(ee,te+2)}return ae}),x.line2d.update(x.lineOptions)),x.error2d){var P=(x.errorXOptions||[]).concat(x.errorYOptions||[]).map(function(ae){return ae||{positions:[],errors:[]}});x.error2d.update(P)}x.scatter2d&&x.scatter2d.update(x.markerOptions),x.fillOrder=e.repeat(null,d),x.fill2d&&(x.fillOptions=x.fillOptions.map(function(ae,j){var ee=T[j];if(!(!ae||!ee||!ee[0]||!ee[0].trace)){var te=ee[0],pe=te.trace,we=te.t,Se=x.lineOptions[j],Re,Pe,je=[];pe._ownfill&&je.push(j),pe._nexttrace&&je.push(j+1),je.length&&(x.fillOrder[j]=je);var at=[],nt=Se&&Se.positions||we.positions,tt,Ve;if(pe.fill==="tozeroy"){for(tt=0;tttt&&isNaN(nt[Ve+1]);)Ve-=2;nt[tt+1]!==0&&(at=[nt[tt],0]),at=at.concat(nt.slice(tt,Ve+2)),nt[Ve+1]!==0&&(at=at.concat([nt[Ve],0]))}else if(pe.fill==="tozerox"){for(tt=0;tttt&&isNaN(nt[Ve]);)Ve-=2;nt[tt]!==0&&(at=[0,nt[tt+1]]),at=at.concat(nt.slice(tt,Ve+2)),nt[Ve]!==0&&(at=at.concat([0,nt[Ve+1]]))}else if(pe.fill==="toself"||pe.fill==="tonext"){for(at=[],Re=0,ae.splitNull=!0,Pe=0;Pe-1;for(let[ae]of T)if(ae){var O=ae.trace,L=ae.t,U=L.index,B=O._length,W=L.x,$=L.y;if(O.selectedpoints||F||N){if(F||(F=!0),O.selectedpoints){var ue=x.selectBatch[U]=e.selIndices2selPoints(O),ce={};for(p=0;pw&&c||xi,y;for(g?y=c.sizeAvg||Math.max(c.size,3):y=S(h,m),A=0;A{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 m=0;my||!c.lower&&g{h[T+x]=m})}this.scatter.draw(...h)}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,h,f){let m=s.id!=null?s.id:s,c=h,T=f;return m<<16|(c&255)<<8|T&255}function i(s,h,f){let m,c,T,l,x,w,A,E,p=s[h],b=s[f];return p.length>2?(m=p[0],T=p[2],c=p[1],l=p[3]):p.length?(m=c=p[0],T=l=p[1]):(m=p.x,c=p.y,T=p.x+p.width,l=p.y+p.height),b.length>2?(x=b[0],A=b[2],w=b[1],E=b[3]):b.length?(x=w=b[0],A=E=b[1]):(x=b.x,w=b.y,A=b.x+b.width,E=b.y+b.height),[x,c,A,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 h=t(s);return[h.x,h.y,h.x+h.width,h.y+h.height]}}}}),jq=He({"src/traces/splom/plot.js"(Z,q){"use strict";var v=Uq(),_=sa(),S=tf(),M=Jd().selectMode;q.exports=function(r,o,a){if(a.length)for(var i=0;i-1,N=M(c)||!!i.selectedpoints||F,O=!0;if(N){var L=i._length;if(i.selectedpoints){s.selectBatch=i.selectedpoints;var U=i.selectedpoints,B={};for(x=0;x=W[$][0]&&B<=W[$][1])return!0;return!1}function h(B){B.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function f(B){B.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(B){if(!B.brush.filterSpecified)return"0,"+B.height;for(var W=c(B.brush.filter.getConsolidated(),B.height),$=[0],ue,ce,de,Y=W.length?W[0][0]:null,X=0;XB[1]+$||W=.9*B[1]+.1*B[0]?"n":W<=.9*B[0]+.1*B[1]?"s":"ns"}function l(){_.select(document.body).style("cursor",null)}function x(B){B.attr("stroke-dasharray",m)}function w(B,W){var $=_.select(B).selectAll(".highlight, .highlight-shadow"),ue=W?$.transition().duration(v.bar.snapDuration).each("end",W):$;x(ue)}function A(B,W){var $=B.brush,ue=$.filterSpecified,ce=NaN,de={},Y;if(ue){var X=B.height,Q=$.filter.getConsolidated(),V=c(Q,X),le=NaN,ae=NaN,j=NaN;for(Y=0;Y<=V.length;Y++){var ee=V[Y];if(ee&&ee[0]<=W&&W<=ee[1]){le=Y;break}else if(ae=Y?Y-1:NaN,ee&&ee[0]>W){j=Y;break}}if(ce=le,isNaN(ce)&&(isNaN(ae)||isNaN(j)?ce=isNaN(ae)?j:ae:ce=W-V[ae][1]=Re[0]&&Se<=Re[1]){de.clickableOrdinalRange=Re;break}}}return de}function E(B,W){_.event.sourceEvent.stopPropagation();var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=W.unitToPaddedPx.invert($),ce=W.brush,de=A(W,$),Y=de.interval,X=ce.svgBrush;if(X.wasDragged=!1,X.grabbingBar=de.region==="ns",X.grabbingBar){var Q=Y.map(W.unitToPaddedPx);X.grabPoint=$-Q[0]-v.verticalPadding,X.barLength=Q[1]-Q[0]}X.clickableOrdinalRange=de.clickableOrdinalRange,X.stayingIntervals=W.multiselect&&ce.filterSpecified?ce.filter.getConsolidated():[],Y&&(X.stayingIntervals=X.stayingIntervals.filter(function(V){return V[0]!==Y[0]&&V[1]!==Y[1]})),X.startExtent=de.region?Y[de.region==="s"?1:0]:ue,W.parent.inBrushDrag=!0,X.brushStartCallback()}function p(B,W){_.event.sourceEvent.stopPropagation();var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=W.brush.svgBrush;ue.wasDragged=!0,ue._dragging=!0,ue.grabbingBar?ue.newExtent=[$-ue.grabPoint,$+ue.barLength-ue.grabPoint].map(W.unitToPaddedPx.invert):ue.newExtent=[ue.startExtent,W.unitToPaddedPx.invert($)].sort(e),W.brush.filterSpecified=!0,ue.extent=ue.stayingIntervals.concat([ue.newExtent]),ue.brushCallback(W),w(B.parentNode)}function b(B,W){var $=W.brush,ue=$.filter,ce=$.svgBrush;ce._dragging||(d(B,W),p(B,W),W.brush.svgBrush.wasDragged=!1),ce._dragging=!1;var de=_.event;de.sourceEvent.stopPropagation();var Y=ce.grabbingBar;if(ce.grabbingBar=!1,ce.grabLocation=void 0,W.parent.inBrushDrag=!1,l(),!ce.wasDragged){ce.wasDragged=void 0,ce.clickableOrdinalRange?$.filterSpecified&&W.multiselect?ce.extent.push(ce.clickableOrdinalRange):(ce.extent=[ce.clickableOrdinalRange],$.filterSpecified=!0):Y?(ce.extent=ce.stayingIntervals,ce.extent.length===0&&z($)):z($),ce.brushCallback(W),w(B.parentNode),ce.brushEndCallback($.filterSpecified?ue.getConsolidated():[]);return}var X=function(){ue.set(ue.getConsolidated())};if(W.ordinal){var Q=W.unitTickvals;Q[Q.length-1]ce.newExtent[0];ce.extent=ce.stayingIntervals.concat(V?[ce.newExtent]:[]),ce.extent.length||z($),ce.brushCallback(W),V?w(B.parentNode,X):(X(),w(B.parentNode))}else X();ce.brushEndCallback($.filterSpecified?ue.getConsolidated():[])}function d(B,W){var $=W.height-_.mouse(B)[1]-2*v.verticalPadding,ue=A(W,$),ce="crosshair";ue.clickableOrdinalRange?ce="pointer":ue.region&&(ce=ue.region+"-resize"),_.select(document.body).style("cursor",ce)}function u(B){B.on("mousemove",function(W){_.event.preventDefault(),W.parent.inBrushDrag||d(this,W)}).on("mouseleave",function(W){W.parent.inBrushDrag||l()}).call(_.behavior.drag().on("dragstart",function(W){E(this,W)}).on("drag",function(W){p(this,W)}).on("dragend",function(W){b(this,W)}))}function g(B,W){return B[0]-W[0]}function y(B,W,$){var ue=$._context.staticPlot,ce=B.selectAll(".background").data(M);ce.enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events",ue?"none":"auto").attr("transform",t(0,v.verticalPadding)),ce.call(u).attr("height",function(X){return X.height-v.verticalPadding});var de=B.selectAll(".highlight-shadow").data(M);de.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",W).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),de.attr("y1",function(X){return X.height}).call(x);var Y=B.selectAll(".highlight").data(M);Y.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),Y.attr("y1",function(X){return X.height}).call(x)}function D(B,W,$){var ue=B.selectAll("."+v.cn.axisBrush).data(M,S);ue.enter().append("g").classed(v.cn.axisBrush,!0),y(ue,W,$)}function P(B){return B.svgBrush.extent.map(function(W){return W.slice()})}function z(B){B.filterSpecified=!1,B.svgBrush.extent=[[-1/0,1/0]]}function F(B){return function($){var ue=$.brush,ce=P(ue),de=ce.slice();ue.filter.set(de),B()}}function N(B){for(var W=B.slice(),$=[],ue,ce=W.shift();ce;){for(ue=ce.slice();(ce=W.shift())&&ce[0]<=ue[1];)ue[1]=Math.max(ue[1],ce[1]);$.push(ue)}return $.length===1&&$[0][0]>$[0][1]&&($=[]),$}function O(){var B=[],W,$;return{set:function(ue){B=ue.map(function(ce){return ce.slice().sort(e)}).sort(g),B.length===1&&B[0][0]===-1/0&&B[0][1]===1/0&&(B=[[0,-1]]),W=N(B),$=B.reduce(function(ce,de){return[Math.min(ce[0],de[0]),Math.max(ce[1],de[1])]},[1/0,-1/0])},get:function(){return B.slice()},getConsolidated:function(){return W},getBounds:function(){return $}}}function L(B,W,$,ue,ce,de){var Y=O();return Y.set($),{filter:Y,filterSpecified:W,svgBrush:{extent:[],brushStartCallback:ue,brushCallback:F(ce),brushEndCallback:de}}}function U(B,W){if(Array.isArray(B[0])?(B=B.map(function(ue){return ue.sort(e)}),W.multiselect?B=N(B.sort(g)):B=[B[0]]):B=[B.sort(e)],W.tickvals){var $=W.tickvals.slice().sort(e);if(B=B.map(function(ue){var ce=[n(0,$,ue[0],[]),n(1,$,ue[1],[])];if(ce[1]>ce[0])return ce}).filter(function(ue){return ue}),!B.length)return}return B.length>1?B:B[0]}q.exports={makeBrush:L,ensureAxisBrush:D,cleanRanges:U}}}),Yq=He({"src/traces/parcoords/defaults.js"(Z,q){"use strict";var v=sa(),_=wp().hasColorscale,S=_h(),M=wc().defaults,e=pp(),t=Wo(),r=m6(),o=g6(),a=Ax().maxDimensionCount,i=bT();function n(h,f,m,c,T){var l=T("line.color",m);if(_(h,"line")&&v.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),S(h,f,c,T,{prefix:"line.",cLetter:"c"}),l.length;f.line.color=m}return 1/0}function s(h,f,m,c){function T(E,p){return v.coerce(h,f,r.dimensions,E,p)}var l=T("values"),x=T("visible");if(l&&l.length||(x=f.visible=!1),x){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,c.layout),T("multiselect");var A=T("constraintrange");A&&(f.constraintrange=o.cleanRanges(A,f))}}q.exports=function(f,m,c,T){function l(p,b){return v.coerce(f,m,r,p,b)}var x=f.dimensions;Array.isArray(x)&&x.length>a&&(v.log("parcoords traces support up to "+a+" dimensions at the moment"),x.splice(a));var w=e(f,m,{name:"dimensions",layout:T,handleItemDefaults:s}),A=n(f,m,c,T,l);M(m,T,l),(!Array.isArray(w)||!w.length)&&(m.visible=!1),i(m,w,"values",A);var E=v.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});v.coerceFont(l,"labelfont",E),v.coerceFont(l,"tickfont",E,{autoShadowDflt:!0}),v.coerceFont(l,"rangefont",E),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Kq=He({"src/traces/parcoords/calc.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray,_=rc(),S=Cv().wrap;q.exports=function(t,r){var o,a;return _.hasColorscale(r,"line")&&v(r.line.color)?(o=r.line.color,a=_.extractOpts(r.line).colorscale,_.calc(t,r,{vals:o,containerStr:"line",cLetter:"c"})):(o=M(r._length),a=[[0,r.line.color],[1,r.line.color]]),S({lineColor:o,cscale:a})};function M(e){for(var t=new Array(e),r=0;r>>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])S=wT.default[Z].slice(),e="rgb";else if(Z==="transparent")M=0,e="rgb",S=[0,0,0];else if(Z[0]==="#"){var t=Z.slice(1),r=t.length,o=r<=4;M=1,o?(S=[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)):(S=[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)),S[0]||(S[0]=0),S[1]||(S[1]=0),S[2]||(S[2]=0),e="rgb"}else if(_=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Z)){var a=_[1];e=a.replace(/a$/,"");var i=e==="cmyk"?4:e==="gray"?1:3;S=_[2].trim().split(/\s*[,\/]\s*|\s+/),e==="color"&&(e=S.shift()),S=S.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=S.length>i?S.pop():1}else/[0-9](?:\s|\/|,)/.test(Z)&&(S=Z.match(/([0-9]+)/g).map(function(n){return parseFloat(n)}),e=((v=(q=Z.match(/([a-z])/ig))==null?void 0:q.join(""))==null?void 0:v.toLowerCase())||"rgb");return{space:e,values:S,alpha:M}}var wT,y6,TT,$q=Ho({"node_modules/color-parse/index.js"(){wT=jp(xE(),1),y6=Jq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Sx,_6=Ho({"node_modules/color-space/rgb.js"(){Sx={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mx,Qq=Ho({"node_modules/color-space/hsl.js"(){_6(),Mx={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Z){var q=Z[0]/360,v=Z[1]/100,_=Z[2]/100,S,M,e,t,r,o=0;if(v===0)return r=_*255,[r,r,r];for(M=_<.5?_*(1+v):_+v-_*v,S=2*_-M,t=[0,0,0];o<3;)e=q+1/3*-(o-1),e<0?e++:e>1&&e--,r=6*e<1?S+(M-S)*6*e:2*e<1?M:3*e<2?S+(M-S)*(2/3-e)*6:S,t[o++]=r*255;return t}},Sx.hsl=function(Z){var q=Z[0]/255,v=Z[1]/255,_=Z[2]/255,S=Math.min(q,v,_),M=Math.max(q,v,_),e=M-S,t,r,o;return M===S?t=0:q===M?t=(v-_)/e:v===M?t=2+(_-q)/e:_===M&&(t=4+(q-v)/e),t=Math.min(t*60,360),t<0&&(t+=360),o=(S+M)/2,M===S?r=0:o<=.5?r=e/(M+S):r=e/(2-M-S),[t,r*100,o*100]}}}),x6={};Jl(x6,{default:()=>eV});function eV(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var q,v,_,S=y6(Z);if(!S.space)return[];let M=S.space[0]==="h"?Mx.min:Sx.min,e=S.space[0]==="h"?Mx.max:Sx.max;return q=Array(3),q[0]=Math.min(Math.max(S.values[0],M[0]),e[0]),q[1]=Math.min(Math.max(S.values[1],M[1]),e[1]),q[2]=Math.min(Math.max(S.values[2],M[2]),e[2]),S.space[0]==="h"&&(q=Mx.rgb(q)),q.push(Math.min(Math.max(S.alpha,0),1)),q}var tV=Ho({"node_modules/color-rgba/index.js"(){$q(),_6(),Qq()}}),b6=He({"src/traces/parcoords/helpers.js"(Z){"use strict";var q=sa().isTypedArray;Z.convertTypedArray=function(v){return q(v)?Array.prototype.slice.call(v):v},Z.isOrdinal=function(v){return!!v.tickvals},Z.isVisible=function(v){return v.visible||!("visible"in v)}}}),rV=He({"src/traces/parcoords/lines.js"(Z,q){"use strict";var v=["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(` `),_=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),S=Ax().maxDimensionCount,M=sa(),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,d,u,g,y){var D=b._gl;D.enable(D.SCISSOR_TEST),D.scissor(d,u,g,y),b.clear({color:[0,0,0,0],depth:1})}function s(b,d,u,g,y,D){var P=D.key;function z(F){var N=Math.min(g,y-F*g);F===0&&(window.cancelAnimationFrame(u.currentRafs[P]),delete u.currentRafs[P],n(b,D.scissorX,D.scissorY,D.scissorWidth,D.viewBoxSize[1])),!u.clearOnly&&(D.count=2*N,D.offset=2*F*g,d(D),F*g+N>>8*d)%256/255}function c(b,d,u){for(var g=new Array(b*(S+4)),y=0,D=0;DPe&&(Pe=ae[pe].dim1.canvasX,Se=pe);te===0&&n(y,0,0,N.canvasWidth,N.canvasHeight);var je=Y(u);for(pe=0;pepe._length&&(Ve=Ve.slice(0,pe._length));var he=pe.tickvals,se;function ne(St,kt){return{val:St,text:se[kt]}}function Ce(St,kt){return St.val-kt.val}if(S(he)&&he.length){_.isTypedArray(he)&&(he=Array.from(he)),se=pe.ticktext,!S(se)||!se.length?se=he.map(M(pe.tickformat)):se.length>he.length?se=se.slice(0,he.length):he.length>se.length&&(he=he.slice(0,se.length));for(var Ze=1;Ze=kt||vr>=Bt)return;var qr=Je.lineLayer.readPixel(Ar,Bt-1-vr),kr=qr[3]!==0,Ur=kr?qr[2]+256*(qr[1]+256*qr[0]):null,_t={x:Ar,y:vr,clientX:St.clientX,clientY:St.clientY,dataIndex:Je.model.key,curveNumber:Ur};Ur!==Se&&(kr?X.hover(_t):X.unhover&&X.unhover(_t),Se=Ur)}}),we.style("opacity",function(Je){return Je.pick?0:1}),le.style("background","rgba(255, 255, 255, 0)");var Pe=le.selectAll("."+T.cn.parcoords).data(pe,h);Pe.exit().remove(),Pe.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Pe.attr("transform",function(Je){return o(Je.model.translateX,Je.model.translateY)});var je=Pe.selectAll("."+T.cn.parcoordsControlView).data(f,h);je.enter().append("g").classed(T.cn.parcoordsControlView,!0),je.attr("transform",function(Je){return o(Je.model.pad.l,Je.model.pad.t)});var at=je.selectAll("."+T.cn.yAxis).data(function(Je){return Je.dimensions},h);at.enter().append("g").classed(T.cn.yAxis,!0),je.each(function(Je){U(at,Je,j)}),we.each(function(Je){if(Je.viewModel){!Je.lineLayer||X?Je.lineLayer=x(this,Je):Je.lineLayer.update(Je),(Je.key||Je.key===0)&&(Je.viewModel[Je.key]=Je.lineLayer);var St=!Je.context||X;Je.lineLayer.render(Je.viewModel.panels,St)}}),at.attr("transform",function(Je){return o(Je.xScale(Je.xIndex),0)}),at.call(v.behavior.drag().origin(function(Je){return Je}).on("drag",function(Je){var St=Je.parent;te.linePickActive(!1),Je.x=Math.max(-T.overdrag,Math.min(Je.model.width+T.overdrag,v.event.x)),Je.canvasX=Je.x*Je.model.canvasPixelRatio,at.sort(function(kt,Bt){return kt.x-Bt.x}).each(function(kt,Bt){kt.xIndex=Bt,kt.x=Je===kt?kt.x:kt.xScale(kt.xIndex),kt.canvasX=kt.x*kt.model.canvasPixelRatio}),U(at,St,j),at.filter(function(kt){return Math.abs(Je.xIndex-kt.xIndex)!==0}).attr("transform",function(kt){return o(kt.xScale(kt.xIndex),0)}),v.select(this).attr("transform",o(Je.x,0)),at.each(function(kt,Bt,Vt){Vt===Je.parent.key&&(St.dimensions[Bt]=kt)}),St.contextLayer&&St.contextLayer.render(St.panels,!1,!P(St)),St.focusLayer.render&&St.focusLayer.render(St.panels)}).on("dragend",function(Je){var St=Je.parent;Je.x=Je.xScale(Je.xIndex),Je.canvasX=Je.x*Je.model.canvasPixelRatio,U(at,St,j),v.select(this).attr("transform",function(kt){return o(kt.x,0)}),St.contextLayer&&St.contextLayer.render(St.panels,!1,!P(St)),St.focusLayer&&St.focusLayer.render(St.panels),St.pickLayer&&St.pickLayer.render(St.panels,!0),te.linePickActive(!0),X&&X.axesMoved&&X.axesMoved(St.key,St.dimensions.map(function(kt){return kt.crossfilterDimensionIndex}))})),at.exit().remove();var nt=at.selectAll("."+T.cn.axisOverlays).data(f,h);nt.enter().append("g").classed(T.cn.axisOverlays,!0),nt.selectAll("."+T.cn.axis).remove();var tt=nt.selectAll("."+T.cn.axis).data(f,h);tt.enter().append("g").classed(T.cn.axis,!0),tt.each(function(Je){var St=Je.model.height/Je.model.tickDistance,kt=Je.domainScale,Bt=kt.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(St,Je.tickFormat).tickValues(Je.ordinal?Bt:null).tickFormat(function(Vt){return c.isOrdinal(Je)?Vt:W(Je.model.dimensions[Je.visibleIndex],Vt)}).scale(kt)),i.font(tt.selectAll("text"),Je.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 Ve=nt.selectAll("."+T.cn.axisHeading).data(f,h);Ve.enter().append("g").classed(T.cn.axisHeading,!0);var he=Ve.selectAll("."+T.cn.axisTitle).data(f,h);he.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",Q?"none":"auto"),he.text(function(Je){return Je.label}).each(function(Je){var St=v.select(this);i.font(St,Je.model.labelFont),a.convertToTspans(St,ce)}).attr("transform",function(Je){var St=L(Je.model.labelAngle,Je.model.labelSide),kt=T.axisTitleOffset;return(St.dir>0?"":o(0,2*kt+Je.model.height))+r(St.degrees)+o(-kt*St.dx,-kt*St.dy)}).attr("text-anchor",function(Je){var St=L(Je.model.labelAngle,Je.model.labelSide),kt=Math.abs(St.dx),Bt=Math.abs(St.dy);return 2*kt>Bt?St.dir*St.dx<0?"start":"end":"middle"});var se=nt.selectAll("."+T.cn.axisExtent).data(f,h);se.enter().append("g").classed(T.cn.axisExtent,!0);var ne=se.selectAll("."+T.cn.axisExtentTop).data(f,h);ne.enter().append("g").classed(T.cn.axisExtentTop,!0),ne.attr("transform",o(0,-T.axisExtentOffset));var Ce=ne.selectAll("."+T.cn.axisExtentTopText).data(f,h);Ce.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(N),Ce.text(function(Je){return $(Je,!0)}).each(function(Je){i.font(v.select(this),Je.model.rangeFont)});var Ze=se.selectAll("."+T.cn.axisExtentBottom).data(f,h);Ze.enter().append("g").classed(T.cn.axisExtentBottom,!0),Ze.attr("transform",function(Je){return o(0,Je.model.height+T.axisExtentOffset)});var rt=Ze.selectAll("."+T.cn.axisExtentBottomText).data(f,h);rt.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(N),rt.text(function(Je){return $(Je,!1)}).each(function(Je){i.font(v.select(this),Je.model.rangeFont)}),l.ensureAxisBrush(nt,ee,ce)}}}),w6=He({"src/traces/parcoords/plot.js"(r,q){"use strict";var v=aV(),_=xT(),S=b6().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=_(a,[],M);if(s){var h={},f={},m={},c={},T=n._size;i.forEach(function(E,p){var b=E[0].trace;m[p]=b.index;var d=c[p]=b.index;h[p]=a.data[d].dimensions,f[p]=a.data[d].dimensions.slice()});var l=function(E,p,b){var d=f[E][p],u=b.map(function(F){return F.slice()}),g="dimensions["+p+"].constraintrange",y=n._tracePreGUI[a._fullData[m[E]]._fullInput.uid];if(y[g]===void 0){var D=d.constraintrange;y[g]=D||null}var P=a._fullData[m[E]].dimensions[p];u.length?(u.length===1&&(u=u[0]),d.constraintrange=u,P.constraintrange=u.slice(),u=[u]):(delete d.constraintrange,delete P.constraintrange,u=null);var z={};z[g]=u,a.emit("plotly_restyle",[z,[c[E]]])},x=function(E){a.emit("plotly_hover",E)},w=function(E){a.emit("plotly_unhover",E)},A=function(E,p){var b=t(p,f[E].filter(S));h[E].sort(b),f[E].filter(function(d){return!S(d)}).sort(function(d){return f[E].indexOf(d)}).forEach(function(d){h[E].splice(h[E].indexOf(d),1),h[E].splice(f[E].indexOf(d),0,d)}),a.emit("plotly_restyle",[{dimensions:[h[E]]},[c[E]]])};v(a,i,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{filterChanged:l,hover:x,unhover:w,axesMoved:A})}};r.reglPrecompiled=M}}),iV=He({"src/traces/parcoords/base_plot.js"(Z){"use strict";var q=Vn(),v=Wh().getModuleCalcData,_=w6(),S=vd();Z.name="parcoords",Z.plot=function(M){var e=v(M.calcdata,"parcoords")[0];e.length&&_(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:S.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)}}}),nV=He({"src/traces/parcoords/base_index.js"(Z,q){"use strict";q.exports={attributes:m6(),supplyDefaults:Yq(),calc:Kq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:iV(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),oV=He({"src/traces/parcoords/index.js"(Z,q){"use strict";var v=nV();v.plot=w6(),q.exports=v}}),sV=He({"lib/parcoords.js"(Z,q){"use strict";q.exports=oV()}}),T6=He({"src/traces/parcats/attributes.js"(Z,q){"use strict";var v=rs().extendFlat,_=au(),S=tc(),M=ku(),{hovertemplateAttrs:e,templatefallbackAttrs:t}=$l(),r=wc().attributes,o=v({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"]}),hovertemplatefallback:t({editType:"plot"})});q.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},_.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"]}),hovertemplatefallback:t({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:S({editType:"calc"}),tickfont:S({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:o,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}}}),lV=He({"src/traces/parcats/defaults.js"(Z,q){"use strict";var v=sa(),_=wp().hasColorscale,S=_h(),M=wc().defaults,e=pp(),t=T6(),r=bT(),o=hp().isTypedArraySpec;function a(n,s,h,f,m){m("line.shape"),m("line.hovertemplate"),m("line.hovertemplatefallback");var c=m("line.color",f.colorway[0]);if(_(n,"line")&&v.isArrayOrTypedArray(c)){if(c.length)return m("line.colorscale"),S(n,s,f,m,{prefix:"line.",cLetter:"c"}),c.length;s.line.color=h}return 1/0}function i(n,s){function h(w,A){return v.coerce(n,s,t.dimensions,w,A)}var f=h("values"),m=h("visible");if(f&&f.length||(m=s.visible=!1),m){h("label"),h("displayindex",s._index);var c=n.categoryarray,T=v.isArrayOrTypedArray(c)&&c.length>0||o(c),l;T&&(l="array");var x=h("categoryorder",l);x==="array"?(h("categoryarray"),h("ticktext")):(delete n.categoryarray,delete n.ticktext),!T&&x==="array"&&(s.categoryorder="trace")}}q.exports=function(s,h,f,m){function c(w,A){return v.coerce(s,h,t,w,A)}var T=e(s,h,{name:"dimensions",handleItemDefaults:i}),l=a(s,h,f,m,c);M(h,m,c),(!Array.isArray(T)||!T.length)&&(h.visible=!1),r(h,T,"values",l),c("hoveron"),c("hovertemplate"),c("hovertemplatefallback"),c("arrangement"),c("bundlecolors"),c("sortpaths"),c("counts");var x=m.font;v.coerceFont(c,"labelfont",x,{overrideDflt:{size:Math.round(x.size)}}),v.coerceFont(c,"tickfont",x,{autoShadowDflt:!0,overrideDflt:{size:Math.round(x.size/1.2)}})}}}),uV=He({"src/traces/parcats/calc.js"(Z,q){"use strict";var v=Cv().wrap,_=wp().hasColorscale,S=Tp(),M=r5(),e=as(),t=sa(),r=ns();q.exports=function(x,w){var A=t.filterVisible(w.dimensions);if(A.length===0)return[];var E=A.map(function(Y){var X;if(Y.categoryorder==="trace")X=null;else if(Y.categoryorder==="array")X=Y.categoryarray;else{X=M(Y.values);for(var Q=!0,V=0;V=l.length||x[l[w]]!==void 0)return!1;x[l[w]]=!0}return!0}}}),cV=He({"src/traces/parcats/parcats.js"(Z,q){"use strict";var v=Vn(),_=(pg(),zf(d0)).interpolateNumber,S=k2(),M=Hc(),e=sa(),t=e.strTranslate,r=as(),o=Ch(),a=su();function i(V,le,ae,j){var ee=le._context.staticPlot,te=V.map(ce.bind(0,le,ae)),pe=j.selectAll("g.parcatslayer").data([null]);pe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ee?"none":"all");var we=pe.selectAll("g.trace.parcats").data(te,n),Se=we.enter().append("g").attr("class","trace parcats");we.attr("transform",function(ne){return t(ne.x,ne.y)}),Se.append("g").attr("class","paths");var Re=we.select("g.paths"),Pe=Re.selectAll("path.path").data(function(ne){return ne.paths},n);Pe.attr("fill",function(ne){return ne.model.color});var je=Pe.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(ne){return ne.model.color}).attr("fill-opacity",0);x(je),Pe.attr("d",function(ne){return ne.svgD}),je.empty()||Pe.sort(h),Pe.exit().remove(),Pe.on("mouseover",f).on("mouseout",m).on("click",l),Se.append("g").attr("class","dimensions");var at=we.select("g.dimensions"),nt=at.selectAll("g.dimension").data(function(ne){return ne.dimensions},n);nt.enter().append("g").attr("class","dimension"),nt.attr("transform",function(ne){return t(ne.x,0)}),nt.exit().remove();var tt=nt.selectAll("g.category").data(function(ne){return ne.categories},n),Ve=tt.enter().append("g").attr("class","category");tt.attr("transform",function(ne){return t(0,ne.y)}),Ve.append("rect").attr("class","catrect").attr("pointer-events","none"),tt.select("rect.catrect").attr("fill","none").attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}),E(Ve);var he=tt.selectAll("rect.bandrect").data(function(ne){return ne.bands},n);he.each(function(){e.raiseToTop(this)}),he.attr("fill",function(ne){return ne.color});var se=he.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(ne){return ne.color}).attr("fill-opacity",0);he.attr("fill",function(ne){return ne.color}).attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}).attr("y",function(ne){return ne.y}).attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":ne.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),b(se),he.exit().remove(),Ve.append("text").attr("class","catlabel").attr("pointer-events","none"),tt.select("text.catlabel").attr("text-anchor",function(ne){return s(ne)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(ne){return s(ne)?ne.width+5:-5}).attr("y",function(ne){return ne.height/2}).text(function(ne){return ne.model.categoryLabel}).each(function(ne){r.font(v.select(this),ne.parcatsViewModel.categorylabelfont),a.convertToTspans(v.select(this),le)}),Ve.append("text").attr("class","dimlabel"),tt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(ne){return ne.width/2}).attr("y",-5).text(function(ne,Ce){return Ce===0?ne.parcatsViewModel.model.dimensions[ne.model.dimensionInd].dimensionLabel:null}).each(function(ne){r.font(v.select(this),ne.parcatsViewModel.labelfont)}),tt.selectAll("rect.bandrect").on("mouseover",N).on("mouseout",O),tt.exit().remove(),nt.call(v.behavior.drag().origin(function(ne){return{x:ne.x,y:0}}).on("dragstart",L).on("drag",U).on("dragend",B)),we.each(function(ne){ne.traceSelection=v.select(this),ne.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),ne.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}q.exports=function(V,le,ae,j){i(ae,V,j,le)};function n(V){return V.key}function s(V){var le=V.parcatsViewModel.dimensions.length,ae=V.parcatsViewModel.dimensions[le-1].model.dimensionInd;return V.model.dimensionInd===ae}function h(V,le){return V.model.rawColor>le.model.rawColor?1:V.model.rawColor"),Je=v.mouse(ee)[0];M.loneHover({trace:te,x:tt-we.left+Se.left,y:Ve-we.top+Se.top,text:rt,color:V.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:he,idealAlign:Je1&&Re.displayInd===Se.dimensions.length-1?(at=pe.left,nt="left"):(at=pe.left+pe.width,nt="right");var tt=we.model.count,Ve=we.model.categoryLabel,he=tt/we.parcatsViewModel.model.count,se={countLabel:tt,categoryLabel:Ve,probabilityLabel:he.toFixed(3)},ne=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ne.push(["Count:",se.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ne.push(["P("+se.categoryLabel+"):",se.probabilityLabel].join(" "));var Ce=ne.join("
");return{trace:Pe,x:j*(at-le.left),y:ee*(je-le.top),text:Ce,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:nt,hovertemplate:Pe.hovertemplate,hovertemplateLabels:se,eventData:[{data:Pe._input,fullData:Pe,count:tt,category:Ve,probability:he}]}}function z(V,le,ae){var j=[];return v.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ee=this;j.push(P(V,le,ee))}),j}function F(V,le,ae){V._fullLayout._calcInverseTransform(V);var j=V._fullLayout._invScaleX,ee=V._fullLayout._invScaleY,te=ae.getBoundingClientRect(),pe=v.select(ae).datum(),we=pe.categoryViewModel,Se=we.parcatsViewModel,Re=Se.model.dimensions[we.model.dimensionInd],Pe=Se.trace,je=te.y+te.height/2,at,nt;Se.dimensions.length>1&&Re.displayInd===Se.dimensions.length-1?(at=te.left,nt="left"):(at=te.left+te.width,nt="right");var tt=we.model.categoryLabel,Ve=pe.parcatsViewModel.model.count,he=0;pe.categoryViewModel.bands.forEach(function(Vt){Vt.color===pe.color&&(he+=Vt.count)});var se=we.model.count,ne=0;Se.pathSelection.each(function(Vt){Vt.model.color===pe.color&&(ne+=Vt.model.count)});var Ce=he/Ve,Ze=he/ne,rt=he/se,Je={countLabel:he,categoryLabel:tt,probabilityLabel:Ce.toFixed(3)},St=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&St.push(["Count:",Je.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(St.push("P(color \u2229 "+tt+"): "+Je.probabilityLabel),St.push("P("+tt+" | color): "+Ze.toFixed(3)),St.push("P(color | "+tt+"): "+rt.toFixed(3)));var kt=St.join("
"),Bt=o.mostReadable(pe.color,["black","white"]);return{trace:Pe,x:j*(at-le.left),y:ee*(je-le.top),text:kt,color:pe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Bt,fontSize:10,idealAlign:nt,hovertemplate:Pe.hovertemplate,hovertemplateLabels:Je,eventData:[{data:Pe._input,fullData:Pe,category:tt,count:Ve,probability:Ce,categorycount:se,colorcount:ne,bandcolorcount:he}]}}function N(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var le=v.mouse(this)[1];if(le<-1)return;var ae=V.parcatsViewModel.graphDiv,j=ae._fullLayout,ee=j._paperdiv.node().getBoundingClientRect(),te=V.parcatsViewModel.hoveron,pe=this;if(te==="color"?(g(pe),D(pe,"plotly_hover",v.event)):(u(pe),y(pe,"plotly_hover",v.event)),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;te==="category"?we=P(ae,ee,pe):te==="color"?we=F(ae,ee,pe):te==="dimension"&&(we=z(ae,ee,pe)),we&&M.loneHover(we,{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:ae})}}}function O(V){var le=V.parcatsViewModel;if(!le.dragDimension&&(x(le.pathSelection),E(le.dimensionSelection.selectAll("g.category")),b(le.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),M.loneUnhover(le.graphDiv._fullLayout._hoverlayer.node()),le.pathSelection.sort(h),le.hoverinfoItems.indexOf("skip")===-1)){var ae=V.parcatsViewModel.hoveron,j=this;ae==="color"?D(j,"plotly_unhover",v.event):y(j,"plotly_unhover",v.event)}}function L(V){V.parcatsViewModel.arrangement!=="fixed"&&(V.dragDimensionDisplayInd=V.model.displayInd,V.initialDragDimensionDisplayInds=V.parcatsViewModel.model.dimensions.map(function(le){return le.displayInd}),V.dragHasMoved=!1,V.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(le){var ae=v.mouse(this)[0],j=v.mouse(this)[1];-2<=ae&&ae<=le.width+2&&-2<=j&&j<=le.height+2&&(V.dragCategoryDisplayInd=le.model.displayInd,V.initialDragCategoryDisplayInds=V.model.categories.map(function(ee){return ee.displayInd}),le.model.dragY=le.y,e.raiseToTop(this.parentNode),v.select(this.parentNode).selectAll("rect.bandrect").each(function(ee){ee.yPe.y+Pe.height/2&&(te.model.displayInd=Pe.model.displayInd,Pe.model.displayInd=we),V.dragCategoryDisplayInd=te.model.displayInd}if(V.dragCategoryDisplayInd===null||V.parcatsViewModel.arrangement==="freeform"){ee.model.dragX=v.event.x;var je=V.parcatsViewModel.dimensions[ae],at=V.parcatsViewModel.dimensions[j];je!==void 0&&ee.model.dragXat.x&&(ee.model.displayInd=at.model.displayInd,at.model.displayInd=V.dragDimensionDisplayInd),V.dragDimensionDisplayInd=ee.model.displayInd}X(V.parcatsViewModel),Y(V.parcatsViewModel),ue(V.parcatsViewModel),$(V.parcatsViewModel)}}function B(V){if(V.parcatsViewModel.arrangement!=="fixed"&&V.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var le={},ae=W(V.parcatsViewModel),j=V.parcatsViewModel.model.dimensions.map(function(at){return at.displayInd}),ee=V.initialDragDimensionDisplayInds.some(function(at,nt){return at!==j[nt]});ee&&j.forEach(function(at,nt){var tt=V.parcatsViewModel.model.dimensions[nt].containerInd;le["dimensions["+tt+"].displayindex"]=at});var te=!1;if(V.dragCategoryDisplayInd!==null){var pe=V.model.categories.map(function(at){return at.displayInd});if(te=V.initialDragCategoryDisplayInds.some(function(at,nt){return at!==pe[nt]}),te){var we=V.model.categories.slice().sort(function(at,nt){return at.displayInd-nt.displayInd}),Se=we.map(function(at){return at.categoryValue}),Re=we.map(function(at){return at.categoryLabel});le["dimensions["+V.model.containerInd+"].categoryarray"]=[Se],le["dimensions["+V.model.containerInd+"].ticktext"]=[Re],le["dimensions["+V.model.containerInd+"].categoryorder"]="array"}}if(V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!V.dragHasMoved&&V.potentialClickBand&&(V.parcatsViewModel.hoveron==="color"?D(V.potentialClickBand,"plotly_click",v.event.sourceEvent):y(V.potentialClickBand,"plotly_click",v.event.sourceEvent)),V.model.dragX=null,V.dragCategoryDisplayInd!==null){var Pe=V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd];Pe.model.dragY=null,V.dragCategoryDisplayInd=null}V.dragDimensionDisplayInd=null,V.parcatsViewModel.dragDimension=null,V.dragHasMoved=null,V.potentialClickBand=null,X(V.parcatsViewModel),Y(V.parcatsViewModel);var je=v.transition().duration(300).ease("cubic-in-out");je.each(function(){ue(V.parcatsViewModel,!0),$(V.parcatsViewModel,!0)}).each("end",function(){(ee||te)&&S.restyle(V.parcatsViewModel.graphDiv,le,[ae])})}}function W(V){for(var le,ae=V.graphDiv._fullData,j=0;j=0;Se--)Re+="C"+pe[Se]+","+(le[Se+1]+j)+" "+te[Se]+","+(le[Se]+j)+" "+(V[Se]+ae[Se])+","+(le[Se]+j),Re+="l-"+ae[Se]+",0 ";return Re+="Z",Re}function Y(V){var le=V.dimensions,ae=V.model,j=le.map(function(qr){return qr.categories.map(function(kr){return kr.y})}),ee=V.model.dimensions.map(function(qr){return qr.categories.map(function(kr){return kr.displayInd})}),te=V.model.dimensions.map(function(qr){return qr.displayInd}),pe=V.dimensions.map(function(qr){return qr.model.dimensionInd}),we=le.map(function(qr){return qr.x}),Se=le.map(function(qr){return qr.width}),Re=[];for(var Pe in ae.paths)ae.paths.hasOwnProperty(Pe)&&Re.push(ae.paths[Pe]);function je(qr){var kr=qr.categoryInds.map(function(_t,Fe){return ee[Fe][_t]}),Ur=pe.map(function(_t){return kr[_t]});return Ur}Re.sort(function(qr,kr){var Ur=je(qr),_t=je(kr);return V.sortpaths==="backward"&&(Ur.reverse(),_t.reverse()),Ur.push(qr.valueInds[0]),_t.push(kr.valueInds[0]),V.bundlecolors&&(Ur.unshift(qr.rawColor),_t.unshift(kr.rawColor)),Ur<_t?-1:Ur>_t?1:0});for(var at=new Array(Re.length),nt=le[0].model.count,tt=le[0].categories.map(function(qr){return qr.height}).reduce(function(qr,kr){return qr+kr}),Ve=0;Ve0?se=tt*(he.count/nt):se=0;for(var ne=new Array(j.length),Ce=0;Ce1?pe=(V.width-2*ae-j)/(ee-1):pe=0,we=ae,Se=we+pe*te;var Re=[],Pe=V.model.maxCats,je=le.categories.length,at=8,nt=le.count,tt=V.height-at*(Pe-1),Ve,he,se,ne,Ce,Ze=(Pe-je)*at/2,rt=le.categories.map(function(Je){return{displayInd:Je.displayInd,categoryInd:Je.categoryInd}});for(rt.sort(function(Je,St){return Je.displayInd-St.displayInd}),Ce=0;Ce0?Ve=he.count/nt*tt:Ve=0,se={key:he.valueInds[0],model:he,width:j,height:Ve,y:he.dragY!==null?he.dragY:Ze,bands:[],parcatsViewModel:V},Ze=Ze+Ve+at,Re.push(se);return{key:le.dimensionInd,x:le.dragX!==null?le.dragX:Se,y:0,width:j,model:le,categories:Re,parcatsViewModel:V,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),A6=He({"src/traces/parcats/plot.js"(Z,q){"use strict";var v=cV();q.exports=function(S,M,e,t){var r=S._fullLayout,o=r._paper,a=r._size;v(S,o,M,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},e,t)}}}),fV=He({"src/traces/parcats/base_plot.js"(Z){"use strict";var q=Wh().getModuleCalcData,v=A6(),_="parcats";Z.name=_,Z.plot=function(S,M,e,t){var r=q(S.calcdata,_);if(r.length){var o=r[0];v(S,o,e,t)}},Z.clean=function(S,M,e,t){var r=t._has&&t._has("parcats"),o=M._has&&M._has("parcats");r&&!o&&t._paperdiv.selectAll(".parcats").remove()}}}),hV=He({"src/traces/parcats/index.js"(Z,q){"use strict";q.exports={attributes:T6(),supplyDefaults:lV(),calc:uV(),plot:A6(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:fV(),categories:["noOpacity"],meta:{}}}}),pV=He({"lib/parcats.js"(Z,q){"use strict";q.exports=hV()}}),nm=He({"src/plots/mapbox/constants.js"(Z,q){"use strict";var v=$m(),_="1.13.4",S='\xA9 OpenStreetMap contributors',M=['\xA9 Carto',S].join(" "),e=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),t=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,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=v(r);q.exports={requiredVersion:_,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@"+_+"."].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')`}}}}),Ex=He({"src/plots/mapbox/layout_attributes.js"(Z,q){"use strict";var v=sa(),_=$n().defaultLine,S=wc().attributes,M=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=nm(),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:[v.counterRegex("mapbox",".layers",!0)],domain:S({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:_},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:_}},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:v.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");i.uirevision={valType:"any",editType:"none"}}}),AT=He({"src/traces/scattermapbox/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:_,templatefallbackAttrs:S}=$l(),M=$d(),e=vg(),t=af(),r=Ex(),o=au(),a=ku(),i=rs().extendFlat,n=pc().overrideAll,s=Ex(),h=e.line,f=e.marker;q.exports=n({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:i({},s.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:i({},f.opacity,{dflt:1})},mode:i({},t.mode,{dflt:"markers"}),text:i({},t.text,{}),texttemplate:_({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:i({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:i({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode},a("marker")),fill:e.fill,fillcolor:M(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:i({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:S()},"calc","nested")}}),S6=He({"src/traces/scattermapbox/constants.js"(Z,q){"use strict";var v=["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(_){return v.indexOf(_)!==-1}}}}),dV=He({"src/traces/scattermapbox/defaults.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=md(),M=Dd(),e=zd(),t=ev(),r=AT(),o=S6().isSupportedFont;q.exports=function(n,s,h,f){function m(g,y){return v.coerce(n,s,r,g,y)}function c(g,y){return v.coerce2(n,s,r,g,y)}var T=a(n,s,m);if(!T){s.visible=!1;return}if(m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("mode"),m("below"),_.hasMarkers(s)){S(n,s,h,f,m,{noLine:!0,noAngle:!0}),m("marker.allowoverlap"),m("marker.angle");var l=s.marker;l.symbol!=="circle"&&(v.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),v.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}_.hasLines(s)&&(M(n,s,h,f,m,{noDash:!0}),m("connectgaps"));var x=c("cluster.maxzoom"),w=c("cluster.step"),A=c("cluster.color",s.marker&&s.marker.color||h),E=c("cluster.size"),p=c("cluster.opacity"),b=x!==!1||w!==!1||A!==!1||E!==!1||p!==!1,d=m("cluster.enabled",b);if(d||_.hasText(s)){var u=f.font.family;e(n,s,f,m,{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}})}m("fill"),s.fill!=="none"&&t(n,s,h,m),v.coerceSelectionMarkerOpacity(s,m)};function a(i,n,s){var h=s("lon")||[],f=s("lat")||[],m=Math.min(h.length,f.length);return n._length=m,m}}}),M6=He({"src/traces/scattermapbox/format_labels.js"(Z,q){"use strict";var v=Wo();q.exports=function(S,M,e){var t={},r=e[M.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=v.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=v.tickText(o,o.c2l(a[1]),!0).text,t}}}),E6=He({"src/plots/mapbox/convert_text_opts.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e=S.split(" "),t=e[0],r=e[1],o=v.isArrayOrTypedArray(M)?v.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 h;return n[0]&&n[1]?h=n.join("-"):n[0]?h=n[0]:n[1]?h=n[1]:h="center",{anchor:h,offset:s}}}}),vV=He({"src/traces/scattermapbox/convert.js"(Z,q){"use strict";var v=ns(),_=sa(),S=Gs().BADNUM,M=g0(),e=rc(),t=as(),r=r1(),o=Fu(),a=S6().isSupportedFont,i=E6(),n=$p().appendArrayPointValue,s=su().NEWLINES,h=su().BR_TAG_ALL;q.exports=function(p,b){var d=b[0].trace,u=d.visible===!0&&d._length!==0,g=d.fill!=="none",y=o.hasLines(d),D=o.hasMarkers(d),P=o.hasText(d),z=D&&d.marker.symbol==="circle",F=D&&d.marker.symbol!=="circle",N=d.cluster&&d.cluster.enabled,O=f("fill"),L=f("line"),U=f("circle"),B=f("symbol"),W={fill:O,line:L,circle:U,symbol:B};if(!u)return W;var $;if((g||y)&&($=M.calcTraceToLineCoords(b)),g&&(O.geojson=M.makePolygon($),O.layout.visibility="visible",_.extendFlat(O.paint,{"fill-color":d.fillcolor})),y&&(L.geojson=M.makeLine($),L.layout.visibility="visible",_.extendFlat(L.paint,{"line-width":d.line.width,"line-color":d.line.color,"line-opacity":d.opacity})),z){var ue=m(b);U.geojson=ue.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],W.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(d.cluster.color,d.cluster.step),"circle-radius":w(d.cluster.size,d.cluster.step),"circle-opacity":w(d.cluster.opacity,d.cluster.step)}},W.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(d),"text-size":12}}),_.extendFlat(U.paint,{"circle-color":ue.mcc,"circle-radius":ue.mrc,"circle-opacity":ue.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||P)&&(B.geojson=c(b,p),_.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(_.extendFlat(B.layout,{"icon-size":d.marker.size/10}),"angle"in d.marker&&d.marker.angle!=="auto"&&_.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=d.marker.allowoverlap,_.extendFlat(B.paint,{"icon-opacity":d.opacity*d.marker.opacity,"icon-color":d.marker.color})),P)){var ce=(d.marker||{}).size,de=i(d.textposition,ce);_.extendFlat(B.layout,{"text-size":d.textfont.size,"text-anchor":de.anchor,"text-offset":de.offset,"text-font":A(d)}),_.extendFlat(B.paint,{"text-color":d.textfont.color,"text-opacity":d.opacity})}return W};function f(E){return{type:E,geojson:M.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(E){var p=E[0].trace,b=p.marker,d=p.selectedpoints,u=_.isArrayOrTypedArray(b.color),g=_.isArrayOrTypedArray(b.size),y=_.isArrayOrTypedArray(b.opacity),D;function P(ce){return p.opacity*ce}function z(ce){return ce/2}var F;u&&(e.hasColorscale(p,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=_.identity);var N;g&&(N=r(p));var O;y&&(O=function(ce){var de=v(ce)?+_.constrain(ce,0,1):0;return P(de)});var L=[];for(D=0;D850?D+=" Black":u>750?D+=" Extra Bold":u>650?D+=" Bold":u>550?D+=" Semi Bold":u>450?D+=" Medium":u>350?D+=" Regular":u>250?D+=" Light":u>150?D+=" Extra Light":D+=" Thin"):g.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",u>750?D+=" Extrabold":u>650?D+=" Bold":u>550?D+=" Semibold":u>350?D+=" Regular":D+=" Light"):g.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",g[3]==="CJK"&&(D+=" CJK"),D+=u>500?" Bold":" Regular")),y&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),a(D)||(D=b);var P=D.split(", ");return P}}}),mV=He({"src/traces/scattermapbox/plot.js"(Z,q){"use strict";var v=sa(),_=vV(),S=nm().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:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+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&&v.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,h=this.subplot.getMapLayers(),f=0;f=0;y--){var D=g[y];n.removeLayer(c.layerIds[D])}u||n.removeSource(c.sourceIds.circle)}function x(u){for(var g=M.nonCluster,y=0;y=0;y--){var D=g[y];n.removeLayer(c.layerIds[D]),u||n.removeSource(c.sourceIds[D])}}function A(u){m?l(u):w(u)}function E(u){f?T(u):x(u)}function p(){for(var u=f?M.cluster:M.nonCluster,g=0;g=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,h=new e(o,i.uid,n,s),f=_(o.gd,a),m=h.below=o.belowLookup["trace-"+i.uid],c,T,l;if(n)for(h.addSource("circle",f.circle,i.cluster),c=0;c=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=A*360,p=i-E;function b(N){var O=N.lonlat;if(O[0]===e||x&&T.indexOf(N.i+1)===-1)return 1/0;var L=_.modHalf(O[0],360),U=O[1],B=c.project([L,U]),W=B.x-f.c2p([p,U]),$=B.y-m.c2p([L,n]),ue=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-ue,1-3/ue)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,g=[_.modHalf(u[0],360)+E,u[1]],y=f.c2p(g),D=m.c2p(g),P=d.mrc||1;a.x0=y-P,a.x1=y+P,a.y0=D-P,a.y1=D+P;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=i.lonlat,l=[];function x(w){return w+"\xB0"}return f||m&&c?l.push("("+x(T[1])+", "+x(T[0])+")"):m?l.push(n.lon+x(T[0])):c&&l.push(n.lat+x(T[1])),(f||h.indexOf("text")!==-1)&&M(i,a,l),l.join("
")}q.exports={hoverPoints:r,getExtraText:o}}}),gV=He({"src/traces/scattermapbox/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_}}}),yV=He({"src/traces/scattermapbox/select.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=Gs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!_.hasMarkers(n))return[];if(t===!1)for(s=0;s"u"&&(C=1e-6);var G,oe,be,Ie,Ne;for(be=k,Ne=0;Ne<8;Ne++){if(Ie=this.sampleCurveX(be)-k,Math.abs(Ie)oe)return oe;for(;GIe?G=be:oe=be,be=(oe-G)*.5+G}return be},a.prototype.solve=function(k,C){return this.sampleCurveY(this.solveCurveX(k,C))};var i=n;function n(k,C){this.x=k,this.y=C}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(k){return this.clone()._add(k)},sub:function(k){return this.clone()._sub(k)},multByPoint:function(k){return this.clone()._multByPoint(k)},divByPoint:function(k){return this.clone()._divByPoint(k)},mult:function(k){return this.clone()._mult(k)},div:function(k){return this.clone()._div(k)},rotate:function(k){return this.clone()._rotate(k)},rotateAround:function(k,C){return this.clone()._rotateAround(k,C)},matMult:function(k){return this.clone()._matMult(k)},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(k){return this.x===k.x&&this.y===k.y},dist:function(k){return Math.sqrt(this.distSqr(k))},distSqr:function(k){var C=k.x-this.x,G=k.y-this.y;return C*C+G*G},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(k){return Math.atan2(this.y-k.y,this.x-k.x)},angleWith:function(k){return this.angleWithSep(k.x,k.y)},angleWithSep:function(k,C){return Math.atan2(this.x*C-this.y*k,this.x*k+this.y*C)},_matMult:function(k){var C=k[0]*this.x+k[1]*this.y,G=k[2]*this.x+k[3]*this.y;return this.x=C,this.y=G,this},_add:function(k){return this.x+=k.x,this.y+=k.y,this},_sub:function(k){return this.x-=k.x,this.y-=k.y,this},_mult:function(k){return this.x*=k,this.y*=k,this},_div:function(k){return this.x/=k,this.y/=k,this},_multByPoint:function(k){return this.x*=k.x,this.y*=k.y,this},_divByPoint:function(k){return this.x/=k.x,this.y/=k.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var k=this.y;return this.y=this.x,this.x=-k,this},_rotate:function(k){var C=Math.cos(k),G=Math.sin(k),oe=C*this.x-G*this.y,be=G*this.x+C*this.y;return this.x=oe,this.y=be,this},_rotateAround:function(k,C){var G=Math.cos(k),oe=Math.sin(k),be=C.x+G*(this.x-C.x)-oe*(this.y-C.y),Ie=C.y+oe*(this.x-C.x)+G*(this.y-C.y);return this.x=be,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(k){return k instanceof n?k:Array.isArray(k)?new n(k[0],k[1]):k};var s=typeof self<"u"?self:{};function h(k,C){if(Array.isArray(k)){if(!Array.isArray(C)||k.length!==C.length)return!1;for(var G=0;G=1)return 1;var C=k*k,G=C*k;return 4*(k<.5?G:3*(k-C)+G-.75)}function c(k,C,G,oe){var be=new o(k,C,G,oe);return function(Ie){return be.solve(Ie)}}var T=c(.25,.1,.25,1);function l(k,C,G){return Math.min(G,Math.max(C,k))}function x(k,C,G){var oe=G-C,be=((k-C)%oe+oe)%oe+C;return be===C?G:be}function w(k,C,G){if(!k.length)return G(null,[]);var oe=k.length,be=new Array(k.length),Ie=null;k.forEach(function(Ne,ft){C(Ne,function(It,Ht){It&&(Ie=It),be[ft]=Ht,--oe===0&&G(Ie,be)})})}function A(k){var C=[];for(var G in k)C.push(k[G]);return C}function E(k,C){var G=[];for(var oe in k)oe in C||G.push(oe);return G}function p(k){for(var C=[],G=arguments.length-1;G-- >0;)C[G]=arguments[G+1];for(var oe=0,be=C;oe>C/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,k)}return k()}function y(k){return k<=1?1:Math.pow(2,Math.ceil(Math.log(k)/Math.LN2))}function D(k){return k?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(k):!1}function P(k,C){k.forEach(function(G){C[G]&&(C[G]=C[G].bind(C))})}function z(k,C){return k.indexOf(C,k.length-C.length)!==-1}function F(k,C,G){var oe={};for(var be in k)oe[be]=C.call(G||this,k[be],be,k);return oe}function N(k,C,G){var oe={};for(var be in k)C.call(G||this,k[be],be,k)&&(oe[be]=k[be]);return oe}function O(k){return Array.isArray(k)?k.map(O):typeof k=="object"&&k?F(k,O):k}function L(k,C){for(var G=0;G=0)return!0;return!1}var U={};function B(k){U[k]||(typeof console<"u"&&console.warn(k),U[k]=!0)}function W(k,C,G){return(G.y-k.y)*(C.x-k.x)>(C.y-k.y)*(G.x-k.x)}function $(k){for(var C=0,G=0,oe=k.length,be=oe-1,Ie=void 0,Ne=void 0;G@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,G={};if(k.replace(C,function(be,Ie,Ne,ft){var It=Ne||ft;return G[Ie]=It?It.toLowerCase():!0,""}),G["max-age"]){var oe=parseInt(G["max-age"],10);isNaN(oe)?delete G["max-age"]:G["max-age"]=oe}return G}var Y=null;function X(k){if(Y==null){var C=k.navigator?k.navigator.userAgent:null;Y=!!k.safari||!!(C&&(/\b(iPad|iPhone|iPod)\b/.test(C)||C.match("Safari")&&!C.match("Chrome")))}return Y}function Q(k){try{var C=s[k];return C.setItem("_mapbox_test_",1),C.removeItem("_mapbox_test_"),!0}catch{return!1}}function V(k){return s.btoa(encodeURIComponent(k).replace(/%([0-9A-F]{2})/g,function(C,G){return String.fromCharCode(+("0x"+G))}))}function le(k){return decodeURIComponent(s.atob(k).split("").map(function(C){return"%"+("00"+C.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var ae=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,te,pe,we={now:ae,frame:function(C){var G=j(C);return{cancel:function(){return ee(G)}}},getImageData:function(C,G){G===void 0&&(G=0);var oe=s.document.createElement("canvas"),be=oe.getContext("2d");if(!be)throw new Error("failed to create canvas 2d context");return oe.width=C.width,oe.height=C.height,be.drawImage(C,0,0,C.width,C.height),be.getImageData(-G,-G,C.width+2*G,C.height+2*G)},resolveURL:function(C){return te||(te=s.document.createElement("a")),te.href=C,te.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(pe==null&&(pe=s.matchMedia("(prefers-reduced-motion: reduce)")),pe.matches):!1}},Se={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},Re={supported:!1,testSupport:tt},Pe,je=!1,at,nt=!1;s.document&&(at=s.document.createElement("img"),at.onload=function(){Pe&&Ve(Pe),Pe=null,nt=!0},at.onerror=function(){je=!0,Pe=null},at.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function tt(k){je||!at||(nt?Ve(k):Pe=k)}function Ve(k){var C=k.createTexture();k.bindTexture(k.TEXTURE_2D,C);try{if(k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,at),k.isContextLost())return;Re.supported=!0}catch{}k.deleteTexture(C),je=!0}var he="01";function se(){for(var k="1",C="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",G="",oe=0;oe<10;oe++)G+=C[Math.floor(Math.random()*62)];var be=12*60*60*1e3,Ie=[k,he,G].join(""),Ne=Date.now()+be;return{token:Ie,tokenExpiresAt:Ne}}var ne=function(C,G){this._transformRequestFn=C,this._customAccessToken=G,this._createSkuToken()};ne.prototype._createSkuToken=function(){var C=se();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},ne.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ne.prototype.transformRequest=function(C,G){return this._transformRequestFn?this._transformRequestFn(C,G)||{url:C}:{url:C}},ne.prototype.normalizeStyleURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/styles/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeGlyphsURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/fonts/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeSourceURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/v4/"+oe.authority+".json",oe.params.push("secure"),this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeSpriteURL=function(C,G,oe,be){var Ie=Bt(C);return Ce(C)?(Ie.path="/styles/v1"+Ie.path+"/sprite"+G+oe,this._makeAPIURL(Ie,this._customAccessToken||be)):(Ie.path+=""+G+oe,Vt(Ie))},ne.prototype.normalizeTileURL=function(C,G){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!Ce(C))return C;var oe=Bt(C),be=/(\.(png|jpg)\d*)(?=$)/,Ie=/^.+\/v4\//,Ne=we.devicePixelRatio>=2||G===512?"@2x":"",ft=Re.supported?".webp":"$1";oe.path=oe.path.replace(be,""+Ne+ft),oe.path=oe.path.replace(Ie,"/"),oe.path="/v4"+oe.path;var It=this._customAccessToken||St(oe.params)||Se.ACCESS_TOKEN;return Se.REQUIRE_ACCESS_TOKEN&&It&&this._skuToken&&oe.params.push("sku="+this._skuToken),this._makeAPIURL(oe,It)},ne.prototype.canonicalizeTileURL=function(C,G){var oe="/v4/",be=/\.[\w]+$/,Ie=Bt(C);if(!Ie.path.match(/(^\/v4\/)/)||!Ie.path.match(be))return C;var Ne="mapbox://tiles/";Ne+=Ie.path.replace(oe,"");var ft=Ie.params;return G&&(ft=ft.filter(function(It){return!It.match(/^access_token=/)})),ft.length&&(Ne+="?"+ft.join("&")),Ne},ne.prototype.canonicalizeTileset=function(C,G){for(var oe=G?Ce(G):!1,be=[],Ie=0,Ne=C.tiles||[];Ie=0&&C.params.splice(Ie,1)}if(be.path!=="/"&&(C.path=""+be.path+C.path),!Se.REQUIRE_ACCESS_TOKEN)return Vt(C);if(G=G||Se.ACCESS_TOKEN,!G)throw new Error("An API access token is required to use Mapbox GL. "+oe);if(G[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+oe);return C.params=C.params.filter(function(Ne){return Ne.indexOf("access_token")===-1}),C.params.push("access_token="+G),Vt(C)};function Ce(k){return k.indexOf("mapbox:")===0}var Ze=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function rt(k){return Ze.test(k)}function Je(k){return k.indexOf("sku=")>0&&rt(k)}function St(k){for(var C=0,G=k;C=1&&s.localStorage.setItem(G,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},qr.prototype.processRequests=function(C){},qr.prototype.postEvent=function(C,G,oe,be){var Ie=this;if(Se.EVENTS_URL){var Ne=Bt(Se.EVENTS_URL);Ne.params.push("access_token="+(be||Se.ACCESS_TOKEN||""));var ft={event:this.type,created:new Date(C).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:he,userId:this.anonId},It=G?p(ft,G):ft,Ht={url:Vt(Ne),headers:{"Content-Type":"text/plain"},body:JSON.stringify([It])};this.pendingRequest=ca(Ht,function(er){Ie.pendingRequest=null,oe(er),Ie.saveEventData(),Ie.processRequests(be)})}},qr.prototype.queueRequest=function(C,G){this.queue.push(C),this.processRequests(G)};var kr=function(k){function C(){k.call(this,"map.load"),this.success={},this.skuToken=""}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postMapLoadEvent=function(oe,be,Ie,Ne){this.skuToken=Ie,(Se.EVENTS_URL&&Ne||Se.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(ft){return Ce(ft)||rt(ft)}))&&this.queueRequest({id:be,timestamp:Date.now()},Ne)},C.prototype.processRequests=function(oe){var be=this;if(!(this.pendingRequest||this.queue.length===0)){var Ie=this.queue.shift(),Ne=Ie.id,ft=Ie.timestamp;Ne&&this.success[Ne]||(this.anonId||this.fetchEventData(),D(this.anonId)||(this.anonId=g()),this.postEvent(ft,{skuToken:this.skuToken},function(It){It||Ne&&(be.success[Ne]=!0)},oe))}},C}(qr),Ur=function(k){function C(G){k.call(this,"appUserTurnstile"),this._customAccessToken=G}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postTurnstileEvent=function(oe,be){Se.EVENTS_URL&&Se.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(Ie){return Ce(Ie)||rt(Ie)})&&this.queueRequest(Date.now(),be)},C.prototype.processRequests=function(oe){var be=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ie=vr(Se.ACCESS_TOKEN),Ne=Ie?Ie.u:Se.ACCESS_TOKEN,ft=Ne!==this.eventData.tokenU;D(this.anonId)||(this.anonId=g(),ft=!0);var It=this.queue.shift();if(this.eventData.lastSuccess){var Ht=new Date(this.eventData.lastSuccess),er=new Date(It),Lr=(It-this.eventData.lastSuccess)/(24*60*60*1e3);ft=ft||Lr>=1||Lr<-1||Ht.getDate()!==er.getDate()}else ft=!0;if(!ft)return this.processRequests();this.postEvent(It,{"enabled.telemetry":!1},function(Zr){Zr||(be.eventData.lastSuccess=It,be.eventData.tokenU=Ne)},oe)}},C}(qr),_t=new Ur,Fe=_t.postTurnstileEvent.bind(_t),Ye=new kr,Ae=Ye.postMapLoadEvent.bind(Ye),Le="mapbox-tiles",We=500,Ke=50,st=1e3*60*7,ot;function Ut(){s.caches&&!ot&&(ot=s.caches.open(Le))}var Ct;function Pt(k,C){if(Ct===void 0)try{new Response(new ReadableStream),Ct=!0}catch{Ct=!1}Ct?C(k.body):k.blob().then(C)}function jt(k,C,G){if(Ut(),!!ot){var oe={status:C.status,statusText:C.statusText,headers:new s.Headers};C.headers.forEach(function(Ne,ft){return oe.headers.set(ft,Ne)});var be=de(C.headers.get("Cache-Control")||"");if(!be["no-store"]){be["max-age"]&&oe.headers.set("Expires",new Date(G+be["max-age"]*1e3).toUTCString());var Ie=new Date(oe.headers.get("Expires")).getTime()-G;IeDate.now()&&!G["no-cache"]}var Pr=1/0;function _a(k){Pr++,Pr>Ke&&(k.getActor().send("enforceCacheSizeLimit",We),Pr=0)}function Fa(k){Ut(),ot&&ot.then(function(C){C.keys().then(function(G){for(var oe=0;oe=200&&G.status<300||G.status===0)&&G.response!==null){var be=G.response;if(k.type==="json")try{be=JSON.parse(G.response)}catch(Ie){return C(Ie)}C(null,be,G.getResponseHeader("Cache-Control"),G.getResponseHeader("Expires"))}else C(new wi(G.statusText,G.status,k.url))},G.send(k.body),{cancel:function(){return G.abort()}}}var Fr=function(k,C){if(!Rt(k.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Zt(k,C);if(ce()&&self.worker&&self.worker.actor){var G=!0;return self.worker.actor.send("getResource",k,C,void 0,G)}}return Jt(k,C)},ta=function(k,C){return Fr(p(k,{type:"json"}),C)},ra=function(k,C){return Fr(p(k,{type:"arrayBuffer"}),C)},ca=function(k,C){return Fr(p(k,{method:"POST"}),C)};function Ba(k){var C=s.document.createElement("a");return C.href=k,C.protocol===s.document.location.protocol&&C.host===s.document.location.host}var $a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Za(k,C,G,oe){var be=new s.Image,Ie=s.URL;be.onload=function(){C(null,be),Ie.revokeObjectURL(be.src),be.onload=null,s.requestAnimationFrame(function(){be.src=$a})},be.onerror=function(){return C(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 Ne=new s.Blob([new Uint8Array(k)],{type:"image/png"});be.cacheControl=G,be.expires=oe,be.src=k.byteLength?Ie.createObjectURL(Ne):$a}function ri(k,C){var G=new s.Blob([new Uint8Array(k)],{type:"image/png"});s.createImageBitmap(G).then(function(oe){C(null,oe)}).catch(function(oe){C(new Error("Could not load image because of "+oe.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var pi,Ia,rn=function(){pi=[],Ia=0};rn();var tn=function(k,C){if(Re.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),Ia>=Se.MAX_PARALLEL_IMAGE_REQUESTS){var G={requestParameters:k,callback:C,cancelled:!1,cancel:function(){this.cancelled=!0}};return pi.push(G),G}Ia++;var oe=!1,be=function(){if(!oe)for(oe=!0,Ia--;pi.length&&Ia0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},wr.prototype.setEventedParent=function(C,G){return this._eventedParent=C,this._eventedParentData=G,this};var Rr=8,Nr={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"}},Hr={"*":{type:"source"}},gt=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Kt={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:"*"}},mr={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:"*"}},Ir={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:"*"}},va={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"}},Pa={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"}}},ga={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"}}},la={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"}},ba=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ai={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ki={"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"}},Ki={"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"}},Mn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},wn={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},On={"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"}},En={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ao={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Co={type:"array",value:"*"},bo={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},zs={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},kn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wo={type:"array",value:"*",minimum:1},Zn={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},go=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],os={"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"}},ys={"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"}},jo={"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"}},Yn={"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"}},Gn={"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"}},Hn={"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"}},ss={"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"}},_s={"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"}},ps={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Ko={"*":{type:"string"}},Gi={$version:Rr,$root:Nr,sources:Hr,source:gt,source_vector:Kt,source_raster:mr,source_raster_dem:Ir,source_geojson:va,source_video:Pa,source_image:ga,layer:la,layout:ba,layout_background:Ai,layout_fill:ki,layout_circle:Ki,layout_heatmap:Mn,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:wn,layout_symbol:On,layout_raster:En,layout_hillshade:ao,filter:Co,filter_operator:bo,geometry_type:zs,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:kn,expression:wo,light:Zn,paint:go,paint_fill:os,"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:ys,paint_circle:jo,paint_heatmap:Yn,paint_symbol:Gn,paint_raster:Hn,paint_hillshade:ss,paint_background:_s,transition:ps,"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:Ko},Pn=function(C,G,oe,be){this.message=(C?C+": ":"")+oe,be&&(this.identifier=be),G!=null&&G.__line__&&(this.line=G.__line__)};function qs(k){var C=k.key,G=k.value;return G?[new Pn(C,G,"constants have been deprecated as of v8")]:[]}function bs(k){for(var C=[],G=arguments.length-1;G-- >0;)C[G]=arguments[G+1];for(var oe=0,be=C;oe":k.itemType.kind==="value"?"array":"array<"+C+">"}else return k.kind}var Ul=[il,yn,Po,To,Ws,Ts,Ll,Jo(uo),Ls];function lu(k,C){if(C.kind==="error")return null;if(k.kind==="array"){if(C.kind==="array"&&(C.N===0&&C.itemType.kind==="value"||!lu(k.itemType,C.itemType))&&(typeof k.N!="number"||k.N===C.N))return null}else{if(k.kind===C.kind)return null;if(k.kind==="value")for(var G=0,oe=Ul;G255?255:Ht}function be(Ht){return Ht<0?0:Ht>1?1:Ht}function Ie(Ht){return Ht[Ht.length-1]==="%"?oe(parseFloat(Ht)/100*255):oe(parseInt(Ht))}function Ne(Ht){return Ht[Ht.length-1]==="%"?be(parseFloat(Ht)/100):be(parseFloat(Ht))}function ft(Ht,er,Lr){return Lr<0?Lr+=1:Lr>1&&(Lr-=1),Lr*6<1?Ht+(er-Ht)*Lr*6:Lr*2<1?er:Lr*3<2?Ht+(er-Ht)*(2/3-Lr)*6:Ht}function It(Ht){var er=Ht.replace(/ /g,"").toLowerCase();if(er in G)return G[er].slice();if(er[0]==="#"){if(er.length===4){var Lr=parseInt(er.substr(1),16);return Lr>=0&&Lr<=4095?[(Lr&3840)>>4|(Lr&3840)>>8,Lr&240|(Lr&240)>>4,Lr&15|(Lr&15)<<4,1]:null}else if(er.length===7){var Lr=parseInt(er.substr(1),16);return Lr>=0&&Lr<=16777215?[(Lr&16711680)>>16,(Lr&65280)>>8,Lr&255,1]:null}return null}var Zr=er.indexOf("("),Vr=er.indexOf(")");if(Zr!==-1&&Vr+1===er.length){var ua=er.substr(0,Zr),Oa=er.substr(Zr+1,Vr-(Zr+1)).split(","),Mi=1;switch(ua){case"rgba":if(Oa.length!==4)return null;Mi=Ne(Oa.pop());case"rgb":return Oa.length!==3?null:[Ie(Oa[0]),Ie(Oa[1]),Ie(Oa[2]),Mi];case"hsla":if(Oa.length!==4)return null;Mi=Ne(Oa.pop());case"hsl":if(Oa.length!==3)return null;var ii=(parseFloat(Oa[0])%360+360)%360/360,$i=Ne(Oa[1]),Oi=Ne(Oa[2]),Ji=Oi<=.5?Oi*($i+1):Oi+$i-Oi*$i,ln=Oi*2-Ji;return[oe(ft(ln,Ji,ii+1/3)*255),oe(ft(ln,Ji,ii)*255),oe(ft(ln,Ji,ii-1/3)*255),Mi];default:return null}}return null}try{C.parseCSSColor=It}catch{}}),Uc=Sf.parseCSSColor,Bs=function(C,G,oe,be){be===void 0&&(be=1),this.r=C,this.g=G,this.b=oe,this.a=be};Bs.parse=function(C){if(C){if(C instanceof Bs)return C;if(typeof C=="string"){var G=Uc(C);if(G)return new Bs(G[0]/255*G[3],G[1]/255*G[3],G[2]/255*G[3],G[3])}}},Bs.prototype.toString=function(){var C=this.toArray(),G=C[0],oe=C[1],be=C[2],Ie=C[3];return"rgba("+Math.round(G)+","+Math.round(oe)+","+Math.round(be)+","+Ie+")"},Bs.prototype.toArray=function(){var C=this,G=C.r,oe=C.g,be=C.b,Ie=C.a;return Ie===0?[0,0,0,0]:[G*255/Ie,oe*255/Ie,be*255/Ie,Ie]},Bs.black=new Bs(0,0,0,1),Bs.white=new Bs(1,1,1,1),Bs.transparent=new Bs(0,0,0,0),Bs.red=new Bs(1,0,0,1);var dc=function(C,G,oe){C?this.sensitivity=G?"variant":"case":this.sensitivity=G?"accent":"base",this.locale=oe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};dc.prototype.compare=function(C,G){return this.collator.compare(C,G)},dc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Wc=function(C,G,oe,be,Ie){this.text=C,this.image=G,this.scale=oe,this.fontStack=be,this.textColor=Ie},uu=function(C){this.sections=C};uu.fromString=function(C){return new uu([new Wc(C,null,null,null,null)])},uu.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(C){return C.text.length!==0||C.image&&C.image.name.length!==0})},uu.factory=function(C){return C instanceof uu?C:uu.fromString(C)},uu.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},uu.prototype.serialize=function(){for(var C=["format"],G=0,oe=this.sections;G=0&&k<=255&&typeof C=="number"&&C>=0&&C<=255&&typeof G=="number"&&G>=0&&G<=255)){var be=typeof oe=="number"?[k,C,G,oe]:[k,C,G];return"Invalid rgba value ["+be.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof oe>"u"||typeof oe=="number"&&oe>=0&&oe<=1?null:"Invalid rgba value ["+[k,C,G,oe].join(", ")+"]: 'a' must be between 0 and 1."}function Ou(k){if(k===null)return!0;if(typeof k=="string")return!0;if(typeof k=="boolean")return!0;if(typeof k=="number")return!0;if(k instanceof Bs)return!0;if(k instanceof dc)return!0;if(k instanceof uu)return!0;if(k instanceof Pl)return!0;if(Array.isArray(k)){for(var C=0,G=k;C2){var ft=C[1];if(typeof ft!="string"||!(ft in nc)||ft==="object")return G.error('The item type argument of "array" must be one of string, number, boolean',1);Ne=nc[ft],oe++}else Ne=uo;var It;if(C.length>3){if(C[2]!==null&&(typeof C[2]!="number"||C[2]<0||C[2]!==Math.floor(C[2])))return G.error('The length argument to "array" must be a positive integer literal',2);It=C[2],oe++}be=Jo(Ne,It)}else be=nc[Ie];for(var Ht=[];oe1)&&G.push(be)}}return G.concat(this.args.map(function(Ie){return Ie.serialize()}))};var qu=function(C){this.type=Ts,this.sections=C};qu.parse=function(C,G){if(C.length<2)return G.error("Expected at least one argument.");var oe=C[1];if(!Array.isArray(oe)&&typeof oe=="object")return G.error("First argument must be an image or text section.");for(var be=[],Ie=!1,Ne=1;Ne<=C.length-1;++Ne){var ft=C[Ne];if(Ie&&typeof ft=="object"&&!Array.isArray(ft)){Ie=!1;var It=null;if(ft["font-scale"]&&(It=G.parse(ft["font-scale"],1,yn),!It))return null;var Ht=null;if(ft["text-font"]&&(Ht=G.parse(ft["text-font"],1,Jo(Po)),!Ht))return null;var er=null;if(ft["text-color"]&&(er=G.parse(ft["text-color"],1,Ws),!er))return null;var Lr=be[be.length-1];Lr.scale=It,Lr.font=Ht,Lr.textColor=er}else{var Zr=G.parse(C[Ne],1,uo);if(!Zr)return null;var Vr=Zr.type.kind;if(Vr!=="string"&&Vr!=="value"&&Vr!=="null"&&Vr!=="resolvedImage")return G.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ie=!0,be.push({content:Zr,scale:null,font:null,textColor:null})}}return new qu(be)},qu.prototype.evaluate=function(C){var G=function(oe){var be=oe.content.evaluate(C);return nl(be)===Ls?new Wc("",be,null,null,null):new Wc(vl(be),null,oe.scale?oe.scale.evaluate(C):null,oe.font?oe.font.evaluate(C).join(","):null,oe.textColor?oe.textColor.evaluate(C):null)};return new uu(this.sections.map(G))},qu.prototype.eachChild=function(C){for(var G=0,oe=this.sections;G-1),oe},fl.prototype.eachChild=function(C){C(this.input)},fl.prototype.outputDefined=function(){return!1},fl.prototype.serialize=function(){return["image",this.input.serialize()]};var xh={"to-boolean":To,"to-color":Ws,"to-number":yn,"to-string":Po},us=function(C,G){this.type=C,this.args=G};us.parse=function(C,G){if(C.length<2)return G.error("Expected at least one argument.");var oe=C[0];if((oe==="to-boolean"||oe==="to-string")&&C.length!==2)return G.error("Expected one argument.");for(var be=xh[oe],Ie=[],Ne=1;Ne4?oe="Invalid rbga value "+JSON.stringify(G)+": expected an array containing either three or four numeric values.":oe=ic(G[0],G[1],G[2],G[3]),!oe))return new Bs(G[0]/255,G[1]/255,G[2]/255,G[3])}throw new Xs(oe||"Could not parse color from value '"+(typeof G=="string"?G:String(JSON.stringify(G)))+"'")}else if(this.type.kind==="number"){for(var It=null,Ht=0,er=this.args;Ht=C[2]||k[1]<=C[1]||k[3]>=C[3])}function Jf(k,C){var G=Ac(k[0]),oe=nf(k[1]),be=Math.pow(2,C.z);return[Math.round(G*be*ql),Math.round(oe*be*ql)]}function Of(k,C,G){var oe=k[0]-C[0],be=k[1]-C[1],Ie=k[0]-G[0],Ne=k[1]-G[1];return oe*Ne-Ie*be===0&&oe*Ie<=0&&be*Ne<=0}function of(k,C,G){return C[1]>k[1]!=G[1]>k[1]&&k[0]<(G[0]-C[0])*(k[1]-C[1])/(G[1]-C[1])+C[0]}function jc(k,C){for(var G=!1,oe=0,be=C.length;oe0&&Lr<0||er<0&&Lr>0}function Ef(k,C,G,oe){var be=[C[0]-k[0],C[1]-k[1]],Ie=[oe[0]-G[0],oe[1]-G[1]];return Nf(Ie,be)===0?!1:!!(Gu(k,C,G,oe)&&Gu(G,oe,k,C))}function oc(k,C,G){for(var oe=0,be=G;oeG[2]){var be=oe*.5,Ie=k[0]-G[0]>be?-oe:G[0]-k[0]>be?oe:0;Ie===0&&(Ie=k[0]-G[2]>be?-oe:G[2]-k[0]>be?oe:0),k[0]+=Ie}Mf(C,k)}function kf(k){k[0]=k[1]=1/0,k[2]=k[3]=-1/0}function fh(k,C,G,oe){for(var be=Math.pow(2,oe.z)*ql,Ie=[oe.x*ql,oe.y*ql],Ne=[],ft=0,It=k;ft=0)return!1;var G=!0;return k.eachChild(function(oe){G&&!Lu(oe,C)&&(G=!1)}),G}var Mc=function(C,G){this.type=G.type,this.name=C,this.boundExpression=G};Mc.parse=function(C,G){if(C.length!==2||typeof C[1]!="string")return G.error("'var' expression requires exactly one string literal argument.");var oe=C[1];return G.scope.has(oe)?new Mc(oe,G.scope.get(oe)):G.error('Unknown variable "'+oe+'". Make sure "'+oe+'" has been bound in an enclosing "let" expression before using it.',1)},Mc.prototype.evaluate=function(C){return this.boundExpression.evaluate(C)},Mc.prototype.eachChild=function(){},Mc.prototype.outputDefined=function(){return!1},Mc.prototype.serialize=function(){return["var",this.name]};var ol=function(C,G,oe,be,Ie){G===void 0&&(G=[]),be===void 0&&(be=new Hs),Ie===void 0&&(Ie=[]),this.registry=C,this.path=G,this.key=G.map(function(Ne){return"["+Ne+"]"}).join(""),this.scope=be,this.errors=Ie,this.expectedType=oe};ol.prototype.parse=function(C,G,oe,be,Ie){return Ie===void 0&&(Ie={}),G?this.concat(G,oe,be)._parse(C,Ie):this._parse(C,Ie)},ol.prototype._parse=function(C,G){(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number")&&(C=["literal",C]);function oe(er,Lr,Zr){return Zr==="assert"?new jl(Lr,[er]):Zr==="coerce"?new us(Lr,[er]):er}if(Array.isArray(C)){if(C.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var be=C[0];if(typeof be!="string")return this.error("Expression name must be a string, but found "+typeof be+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ie=this.registry[be];if(Ie){var Ne=Ie.parse(C,this);if(!Ne)return null;if(this.expectedType){var ft=this.expectedType,It=Ne.type;if((ft.kind==="string"||ft.kind==="number"||ft.kind==="boolean"||ft.kind==="object"||ft.kind==="array")&&It.kind==="value")Ne=oe(Ne,ft,G.typeAnnotation||"assert");else if((ft.kind==="color"||ft.kind==="formatted"||ft.kind==="resolvedImage")&&(It.kind==="value"||It.kind==="string"))Ne=oe(Ne,ft,G.typeAnnotation||"coerce");else if(this.checkSubtype(ft,It))return null}if(!(Ne instanceof As)&&Ne.type.kind!=="resolvedImage"&&vc(Ne)){var Ht=new Ps;try{Ne=new As(Ne.type,Ne.evaluate(Ht))}catch(er){return this.error(er.message),null}}return Ne}return this.error('Unknown expression "'+be+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof C>"u"?this.error("'undefined' value invalid. Use null instead."):typeof C=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof C+" instead.")},ol.prototype.concat=function(C,G,oe){var be=typeof C=="number"?this.path.concat(C):this.path,Ie=oe?this.scope.concat(oe):this.scope;return new ol(this.registry,be,G||null,Ie,this.errors)},ol.prototype.error=function(C){for(var G=[],oe=arguments.length-1;oe-- >0;)G[oe]=arguments[oe+1];var be=""+this.key+G.map(function(Ie){return"["+Ie+"]"}).join("");this.errors.push(new ws(be,C))},ol.prototype.checkSubtype=function(C,G){var oe=lu(C,G);return oe&&this.error(oe),oe};function vc(k){if(k instanceof Mc)return vc(k.boundExpression);if(k instanceof to&&k.name==="error")return!1;if(k instanceof Vu)return!1;if(k instanceof Cu)return!1;var C=k instanceof us||k instanceof jl,G=!0;return k.eachChild(function(oe){C?G=G&&vc(oe):G=G&&oe instanceof As}),G?jf(k)&&Lu(k,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function yu(k,C){for(var G=k.length-1,oe=0,be=G,Ie=0,Ne,ft;oe<=be;)if(Ie=Math.floor((oe+be)/2),Ne=k[Ie],ft=k[Ie+1],Ne<=C){if(Ie===G||CC)be=Ie-1;else throw new Xs("Input is not a number.");return 0}var Tu=function(C,G,oe){this.type=C,this.input=G,this.labels=[],this.outputs=[];for(var be=0,Ie=oe;be=ft)return G.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ht);var Lr=G.parse(It,er,Ie);if(!Lr)return null;Ie=Ie||Lr.type,be.push([ft,Lr])}return new Tu(Ie,oe,be)},Tu.prototype.evaluate=function(C){var G=this.labels,oe=this.outputs;if(G.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=G[0])return oe[0].evaluate(C);var Ie=G.length;if(be>=G[Ie-1])return oe[Ie-1].evaluate(C);var Ne=yu(G,be);return oe[Ne].evaluate(C)},Tu.prototype.eachChild=function(C){C(this.input);for(var G=0,oe=this.outputs;G0&&C.push(this.labels[G]),C.push(this.outputs[G].serialize());return C};function Ml(k,C,G){return k*(1-G)+C*G}function qf(k,C,G){return new Bs(Ml(k.r,C.r,G),Ml(k.g,C.g,G),Ml(k.b,C.b,G),Ml(k.a,C.a,G))}function Qf(k,C,G){return k.map(function(oe,be){return Ml(oe,C[be],G)})}var Bu=Object.freeze({__proto__:null,number:Ml,color:qf,array:Qf}),Ec=.95047,mc=1,Lh=1.08883,sf=4/29,vf=6/29,Nu=3*vf*vf,lf=vf*vf*vf,iu=Math.PI/180,Kc=180/Math.PI;function hh(k){return k>lf?Math.pow(k,1/3):k/Nu+sf}function mf(k){return k>vf?k*k*k:Nu*(k-sf)}function sl(k){return 255*(k<=.0031308?12.92*k:1.055*Math.pow(k,1/2.4)-.055)}function _u(k){return k/=255,k<=.04045?k/12.92:Math.pow((k+.055)/1.055,2.4)}function Pu(k){var C=_u(k.r),G=_u(k.g),oe=_u(k.b),be=hh((.4124564*C+.3575761*G+.1804375*oe)/Ec),Ie=hh((.2126729*C+.7151522*G+.072175*oe)/mc),Ne=hh((.0193339*C+.119192*G+.9503041*oe)/Lh);return{l:116*Ie-16,a:500*(be-Ie),b:200*(Ie-Ne),alpha:k.a}}function Cf(k){var C=(k.l+16)/116,G=isNaN(k.a)?C:C+k.a/500,oe=isNaN(k.b)?C:C-k.b/200;return C=mc*mf(C),G=Ec*mf(G),oe=Lh*mf(oe),new Bs(sl(3.2404542*G-1.5371385*C-.4985314*oe),sl(-.969266*G+1.8760108*C+.041556*oe),sl(.0556434*G-.2040259*C+1.0572252*oe),k.alpha)}function hl(k,C,G){return{l:Ml(k.l,C.l,G),a:Ml(k.a,C.a,G),b:Ml(k.b,C.b,G),alpha:Ml(k.alpha,C.alpha,G)}}function uf(k){var C=Pu(k),G=C.l,oe=C.a,be=C.b,Ie=Math.atan2(be,oe)*Kc;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(oe*oe+be*be),l:G,alpha:k.a}}function kc(k){var C=k.h*iu,G=k.c,oe=k.l;return Cf({l:oe,a:Math.cos(C)*G,b:Math.sin(C)*G,alpha:k.alpha})}function Hu(k,C,G){var oe=C-k;return k+G*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}function gf(k,C,G){return{h:Hu(k.h,C.h,G),c:Ml(k.c,C.c,G),l:Ml(k.l,C.l,G),alpha:Ml(k.alpha,C.alpha,G)}}var Wu={forward:Pu,reverse:Cf,interpolate:hl},Jc={forward:uf,reverse:kc,interpolate:gf},Lf=Object.freeze({__proto__:null,lab:Wu,hcl:Jc}),nu=function(C,G,oe,be,Ie){this.type=C,this.operator=G,this.interpolation=oe,this.input=be,this.labels=[],this.outputs=[];for(var Ne=0,ft=Ie;Ne1}))return G.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);be={name:"cubic-bezier",controlPoints:It}}else return G.error("Unknown interpolation type "+String(be[0]),1,0);if(C.length-1<4)return G.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!==0)return G.error("Expected an even number of arguments.");if(Ie=G.parse(Ie,2,yn),!Ie)return null;var Ht=[],er=null;oe==="interpolate-hcl"||oe==="interpolate-lab"?er=Ws:G.expectedType&&G.expectedType.kind!=="value"&&(er=G.expectedType);for(var Lr=0;Lr=Zr)return G.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ua);var Mi=G.parse(Vr,Oa,er);if(!Mi)return null;er=er||Mi.type,Ht.push([Zr,Mi])}return er.kind!=="number"&&er.kind!=="color"&&!(er.kind==="array"&&er.itemType.kind==="number"&&typeof er.N=="number")?G.error("Type "+Es(er)+" is not interpolatable."):new nu(er,oe,be,Ie,Ht)},nu.prototype.evaluate=function(C){var G=this.labels,oe=this.outputs;if(G.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=G[0])return oe[0].evaluate(C);var Ie=G.length;if(be>=G[Ie-1])return oe[Ie-1].evaluate(C);var Ne=yu(G,be),ft=G[Ne],It=G[Ne+1],Ht=nu.interpolationFactor(this.interpolation,be,ft,It),er=oe[Ne].evaluate(C),Lr=oe[Ne+1].evaluate(C);return this.operator==="interpolate"?Bu[this.type.kind.toLowerCase()](er,Lr,Ht):this.operator==="interpolate-hcl"?Jc.reverse(Jc.interpolate(Jc.forward(er),Jc.forward(Lr),Ht)):Wu.reverse(Wu.interpolate(Wu.forward(er),Wu.forward(Lr),Ht))},nu.prototype.eachChild=function(C){C(this.input);for(var G=0,oe=this.outputs;G=oe.length)throw new Xs("Array index out of bounds: "+G+" > "+(oe.length-1)+".");if(G!==Math.floor(G))throw new Xs("Array index must be an integer, but found "+G+" instead.");return oe[G]},gc.prototype.eachChild=function(C){C(this.index),C(this.input)},gc.prototype.outputDefined=function(){return!1},gc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Vl=function(C,G){this.type=To,this.needle=C,this.haystack=G};Vl.parse=function(C,G){if(C.length!==3)return G.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,uo);return!oe||!be?null:Tc(oe.type,[To,Po,yn,il,uo])?new Vl(oe,be):G.error("Expected first argument to be of type boolean, string, number or null, but found "+Es(oe.type)+" instead")},Vl.prototype.evaluate=function(C){var G=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!oe)return!1;if(!du(G,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+Es(nl(G))+" instead.");if(!du(oe,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+Es(nl(oe))+" instead.");return oe.indexOf(G)>=0},Vl.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},Vl.prototype.outputDefined=function(){return!0},Vl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xu=function(C,G,oe){this.type=yn,this.needle=C,this.haystack=G,this.fromIndex=oe};xu.parse=function(C,G){if(C.length<=2||C.length>=5)return G.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,uo);if(!oe||!be)return null;if(!Tc(oe.type,[To,Po,yn,il,uo]))return G.error("Expected first argument to be of type boolean, string, number or null, but found "+Es(oe.type)+" instead");if(C.length===4){var Ie=G.parse(C[3],3,yn);return Ie?new xu(oe,be,Ie):null}else return new xu(oe,be)},xu.prototype.evaluate=function(C){var G=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!du(G,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+Es(nl(G))+" instead.");if(!du(oe,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+Es(nl(oe))+" instead.");if(this.fromIndex){var be=this.fromIndex.evaluate(C);return oe.indexOf(G,be)}return oe.indexOf(G)},xu.prototype.eachChild=function(C){C(this.needle),C(this.haystack),this.fromIndex&&C(this.fromIndex)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var C=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),C]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Lc=function(C,G,oe,be,Ie,Ne){this.inputType=C,this.type=G,this.input=oe,this.cases=be,this.outputs=Ie,this.otherwise=Ne};Lc.parse=function(C,G){if(C.length<5)return G.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!==1)return G.error("Expected an even number of arguments.");var oe,be;G.expectedType&&G.expectedType.kind!=="value"&&(be=G.expectedType);for(var Ie={},Ne=[],ft=2;ftNumber.MAX_SAFE_INTEGER)return er.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return er.error("Numeric branch labels must be integer values.");if(!oe)oe=nl(Vr);else if(er.checkSubtype(oe,nl(Vr)))return null;if(typeof Ie[String(Vr)]<"u")return er.error("Branch labels must be unique.");Ie[String(Vr)]=Ne.length}var ua=G.parse(Ht,ft,be);if(!ua)return null;be=be||ua.type,Ne.push(ua)}var Oa=G.parse(C[1],1,uo);if(!Oa)return null;var Mi=G.parse(C[C.length-1],C.length-1,be);return!Mi||Oa.type.kind!=="value"&&G.concat(1).checkSubtype(oe,Oa.type)?null:new Lc(oe,be,Oa,Ie,Ne,Mi)},Lc.prototype.evaluate=function(C){var G=this.input.evaluate(C),oe=nl(G)===this.inputType&&this.outputs[this.cases[G]]||this.otherwise;return oe.evaluate(C)},Lc.prototype.eachChild=function(C){C(this.input),this.outputs.forEach(C),C(this.otherwise)},Lc.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})&&this.otherwise.outputDefined()},Lc.prototype.serialize=function(){for(var C=this,G=["match",this.input.serialize()],oe=Object.keys(this.cases).sort(),be=[],Ie={},Ne=0,ft=oe;Ne=5)return G.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,yn);if(!oe||!be)return null;if(!Tc(oe.type,[Jo(uo),Po,uo]))return G.error("Expected first argument to be of type array or string, but found "+Es(oe.type)+" instead");if(C.length===4){var Ie=G.parse(C[3],3,yn);return Ie?new sc(oe.type,oe,be,Ie):null}else return new sc(oe.type,oe,be)},sc.prototype.evaluate=function(C){var G=this.input.evaluate(C),oe=this.beginIndex.evaluate(C);if(!du(G,["string","array"]))throw new Xs("Expected first argument to be of type array or string, but found "+Es(nl(G))+" instead.");if(this.endIndex){var be=this.endIndex.evaluate(C);return G.slice(oe,be)}return G.slice(oe)},sc.prototype.eachChild=function(C){C(this.input),C(this.beginIndex),this.endIndex&&C(this.endIndex)},sc.prototype.outputDefined=function(){return!1},sc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var C=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),C]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Pc(k,C){return k==="=="||k==="!="?C.kind==="boolean"||C.kind==="string"||C.kind==="number"||C.kind==="null"||C.kind==="value":C.kind==="string"||C.kind==="number"||C.kind==="value"}function Qt(k,C,G){return C===G}function xr(k,C,G){return C!==G}function aa(k,C,G){return CG}function ka(k,C,G){return C<=G}function li(k,C,G){return C>=G}function Ci(k,C,G,oe){return oe.compare(C,G)===0}function Hi(k,C,G,oe){return!Ci(k,C,G,oe)}function Qi(k,C,G,oe){return oe.compare(C,G)<0}function pn(k,C,G,oe){return oe.compare(C,G)>0}function Pi(k,C,G,oe){return oe.compare(C,G)<=0}function Di(k,C,G,oe){return oe.compare(C,G)>=0}function Ni(k,C,G){var oe=k!=="=="&&k!=="!=";return function(){function be(Ie,Ne,ft){this.type=To,this.lhs=Ie,this.rhs=Ne,this.collator=ft,this.hasUntypedArgument=Ie.type.kind==="value"||Ne.type.kind==="value"}return be.parse=function(Ne,ft){if(Ne.length!==3&&Ne.length!==4)return ft.error("Expected two or three arguments.");var It=Ne[0],Ht=ft.parse(Ne[1],1,uo);if(!Ht)return null;if(!Pc(It,Ht.type))return ft.concat(1).error('"'+It+`" comparisons are not supported for type '`+Es(Ht.type)+"'.");var er=ft.parse(Ne[2],2,uo);if(!er)return null;if(!Pc(It,er.type))return ft.concat(2).error('"'+It+`" comparisons are not supported for type '`+Es(er.type)+"'.");if(Ht.type.kind!==er.type.kind&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot compare types '"+Es(Ht.type)+"' and '"+Es(er.type)+"'.");oe&&(Ht.type.kind==="value"&&er.type.kind!=="value"?Ht=new jl(er.type,[Ht]):Ht.type.kind!=="value"&&er.type.kind==="value"&&(er=new jl(Ht.type,[er])));var Lr=null;if(Ne.length===4){if(Ht.type.kind!=="string"&&er.type.kind!=="string"&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot use collator to compare non-string types.");if(Lr=ft.parse(Ne[3],3,Ks),!Lr)return null}return new be(Ht,er,Lr)},be.prototype.evaluate=function(Ne){var ft=this.lhs.evaluate(Ne),It=this.rhs.evaluate(Ne);if(oe&&this.hasUntypedArgument){var Ht=nl(ft),er=nl(It);if(Ht.kind!==er.kind||!(Ht.kind==="string"||Ht.kind==="number"))throw new Xs('Expected arguments for "'+k+'" to be (string, string) or (number, number), but found ('+Ht.kind+", "+er.kind+") instead.")}if(this.collator&&!oe&&this.hasUntypedArgument){var Lr=nl(ft),Zr=nl(It);if(Lr.kind!=="string"||Zr.kind!=="string")return C(Ne,ft,It)}return this.collator?G(Ne,ft,It,this.collator.evaluate(Ne)):C(Ne,ft,It)},be.prototype.eachChild=function(Ne){Ne(this.lhs),Ne(this.rhs),this.collator&&Ne(this.collator)},be.prototype.outputDefined=function(){return!0},be.prototype.serialize=function(){var Ne=[k];return this.eachChild(function(ft){Ne.push(ft.serialize())}),Ne},be}()}var mi=Ni("==",Qt,Ci),Sn=Ni("!=",xr,Hi),Qn=Ni("<",aa,Qi),io=Ni(">",$r,pn),eo=Ni("<=",ka,Pi),co=Ni(">=",li,Di),Tn=function(C,G,oe,be,Ie){this.type=Po,this.number=C,this.locale=G,this.currency=oe,this.minFractionDigits=be,this.maxFractionDigits=Ie};Tn.parse=function(C,G){if(C.length!==3)return G.error("Expected two arguments.");var oe=G.parse(C[1],1,yn);if(!oe)return null;var be=C[2];if(typeof be!="object"||Array.isArray(be))return G.error("NumberFormat options argument must be an object.");var Ie=null;if(be.locale&&(Ie=G.parse(be.locale,1,Po),!Ie))return null;var Ne=null;if(be.currency&&(Ne=G.parse(be.currency,1,Po),!Ne))return null;var ft=null;if(be["min-fraction-digits"]&&(ft=G.parse(be["min-fraction-digits"],1,yn),!ft))return null;var It=null;return be["max-fraction-digits"]&&(It=G.parse(be["max-fraction-digits"],1,yn),!It)?null:new Tn(oe,Ie,Ne,ft,It)},Tn.prototype.evaluate=function(C){return new Intl.NumberFormat(this.locale?this.locale.evaluate(C):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(C):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(C):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(C):void 0}).format(this.number.evaluate(C))},Tn.prototype.eachChild=function(C){C(this.number),this.locale&&C(this.locale),this.currency&&C(this.currency),this.minFractionDigits&&C(this.minFractionDigits),this.maxFractionDigits&&C(this.maxFractionDigits)},Tn.prototype.outputDefined=function(){return!1},Tn.prototype.serialize=function(){var C={};return this.locale&&(C.locale=this.locale.serialize()),this.currency&&(C.currency=this.currency.serialize()),this.minFractionDigits&&(C["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(C["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),C]};var un=function(C){this.type=yn,this.input=C};un.parse=function(C,G){if(C.length!==2)return G.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1);return oe?oe.type.kind!=="array"&&oe.type.kind!=="string"&&oe.type.kind!=="value"?G.error("Expected argument of type string or array, but found "+Es(oe.type)+" instead."):new un(oe):null},un.prototype.evaluate=function(C){var G=this.input.evaluate(C);if(typeof G=="string")return G.length;if(Array.isArray(G))return G.length;throw new Xs("Expected value to be of type string or array, but found "+Es(nl(G))+" instead.")},un.prototype.eachChild=function(C){C(this.input)},un.prototype.outputDefined=function(){return!1},un.prototype.serialize=function(){var C=["length"];return this.eachChild(function(G){C.push(G.serialize())}),C};var yo={"==":mi,"!=":Sn,">":io,"<":Qn,">=":co,"<=":eo,array:jl,at:gc,boolean:jl,case:$c,coalesce:Xu,collator:Vu,format:qu,image:fl,in:Vl,"index-of":xu,interpolate:nu,"interpolate-hcl":nu,"interpolate-lab":nu,length:un,let:Cc,literal:As,match:Lc,number:jl,"number-format":Tn,object:jl,slice:sc,step:Tu,string:jl,"to-boolean":us,"to-color":us,"to-number":us,"to-string":us,var:Mc,within:Cu};function Qo(k,C){var G=C[0],oe=C[1],be=C[2],Ie=C[3];G=G.evaluate(k),oe=oe.evaluate(k),be=be.evaluate(k);var Ne=Ie?Ie.evaluate(k):1,ft=ic(G,oe,be,Ne);if(ft)throw new Xs(ft);return new Bs(G/255*Ne,oe/255*Ne,be/255*Ne,Ne)}function ks(k,C){return k in C}function rl(k,C){var G=C[k];return typeof G>"u"?null:G}function Ns(k,C,G,oe){for(;G<=oe;){var be=G+oe>>1;if(C[be]===k)return!0;C[be]>k?oe=be-1:G=be+1}return!1}function el(k){return{type:k}}to.register(yo,{error:[Nl,[Po],function(k,C){var G=C[0];throw new Xs(G.evaluate(k))}],typeof:[Po,[uo],function(k,C){var G=C[0];return Es(nl(G.evaluate(k)))}],"to-rgba":[Jo(yn,4),[Ws],function(k,C){var G=C[0];return G.evaluate(k).toArray()}],rgb:[Ws,[yn,yn,yn],Qo],rgba:[Ws,[yn,yn,yn,yn],Qo],has:{type:To,overloads:[[[Po],function(k,C){var G=C[0];return ks(G.evaluate(k),k.properties())}],[[Po,Ll],function(k,C){var G=C[0],oe=C[1];return ks(G.evaluate(k),oe.evaluate(k))}]]},get:{type:uo,overloads:[[[Po],function(k,C){var G=C[0];return rl(G.evaluate(k),k.properties())}],[[Po,Ll],function(k,C){var G=C[0],oe=C[1];return rl(G.evaluate(k),oe.evaluate(k))}]]},"feature-state":[uo,[Po],function(k,C){var G=C[0];return rl(G.evaluate(k),k.featureState||{})}],properties:[Ll,[],function(k){return k.properties()}],"geometry-type":[Po,[],function(k){return k.geometryType()}],id:[uo,[],function(k){return k.id()}],zoom:[yn,[],function(k){return k.globals.zoom}],"heatmap-density":[yn,[],function(k){return k.globals.heatmapDensity||0}],"line-progress":[yn,[],function(k){return k.globals.lineProgress||0}],accumulated:[uo,[],function(k){return k.globals.accumulated===void 0?null:k.globals.accumulated}],"+":[yn,el(yn),function(k,C){for(var G=0,oe=0,be=C;oe":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be>Ie}],"filter-id->":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe>be}],"filter-<=":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be<=Ie}],"filter-id-<=":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe<=be}],"filter->=":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be>=Ie}],"filter-id->=":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe>=be}],"filter-has":[To,[uo],function(k,C){var G=C[0];return G.value in k.properties()}],"filter-has-id":[To,[],function(k){return k.id()!==null&&k.id()!==void 0}],"filter-type-in":[To,[Jo(Po)],function(k,C){var G=C[0];return G.value.indexOf(k.geometryType())>=0}],"filter-id-in":[To,[Jo(uo)],function(k,C){var G=C[0];return G.value.indexOf(k.id())>=0}],"filter-in-small":[To,[Po,Jo(uo)],function(k,C){var G=C[0],oe=C[1];return oe.value.indexOf(k.properties()[G.value])>=0}],"filter-in-large":[To,[Po,Jo(uo)],function(k,C){var G=C[0],oe=C[1];return Ns(k.properties()[G.value],oe.value,0,oe.value.length-1)}],all:{type:To,overloads:[[[To,To],function(k,C){var G=C[0],oe=C[1];return G.evaluate(k)&&oe.evaluate(k)}],[el(To),function(k,C){for(var G=0,oe=C;G-1}function Un(k){return!!k.expression&&k.expression.interpolated}function Ro(k){return k instanceof Number?"number":k instanceof String?"string":k instanceof Boolean?"boolean":Array.isArray(k)?"array":k===null?"null":typeof k}function Js(k){return typeof k=="object"&&k!==null&&!Array.isArray(k)}function Fs(k){return k}function cu(k,C){var G=C.type==="color",oe=k.stops&&typeof k.stops[0][0]=="object",be=oe||k.property!==void 0,Ie=oe||!be,Ne=k.type||(Un(C)?"exponential":"interval");if(G&&(k=bs({},k),k.stops&&(k.stops=k.stops.map(function(Nn){return[Nn[0],Bs.parse(Nn[1])]})),k.default?k.default=Bs.parse(k.default):k.default=Bs.parse(C.default)),k.colorSpace&&k.colorSpace!=="rgb"&&!Lf[k.colorSpace])throw new Error("Unknown color space: "+k.colorSpace);var ft,It,Ht;if(Ne==="exponential")ft=bu;else if(Ne==="interval")ft=Ic;else if(Ne==="categorical"){ft=Zu,It=Object.create(null);for(var er=0,Lr=k.stops;er=k.stops[oe-1][0])return k.stops[oe-1][1];var be=yu(k.stops.map(function(Ie){return Ie[0]}),G);return k.stops[be][1]}function bu(k,C,G){var oe=k.base!==void 0?k.base:1;if(Ro(G)!=="number")return Iu(k.default,C.default);var be=k.stops.length;if(be===1||G<=k.stops[0][0])return k.stops[0][1];if(G>=k.stops[be-1][0])return k.stops[be-1][1];var Ie=yu(k.stops.map(function(Lr){return Lr[0]}),G),Ne=Au(G,oe,k.stops[Ie][0],k.stops[Ie+1][0]),ft=k.stops[Ie][1],It=k.stops[Ie+1][1],Ht=Bu[C.type]||Fs;if(k.colorSpace&&k.colorSpace!=="rgb"){var er=Lf[k.colorSpace];Ht=function(Lr,Zr){return er.reverse(er.interpolate(er.forward(Lr),er.forward(Zr),Ne))}}return typeof ft.evaluate=="function"?{evaluate:function(){for(var Zr=[],Vr=arguments.length;Vr--;)Zr[Vr]=arguments[Vr];var ua=ft.evaluate.apply(void 0,Zr),Oa=It.evaluate.apply(void 0,Zr);if(!(ua===void 0||Oa===void 0))return Ht(ua,Oa,Ne)}}:Ht(ft,It,Ne)}function Rc(k,C,G){return C.type==="color"?G=Bs.parse(G):C.type==="formatted"?G=uu.fromString(G.toString()):C.type==="resolvedImage"?G=Pl.fromString(G.toString()):Ro(G)!==C.type&&(C.type!=="enum"||!C.values[G])&&(G=void 0),Iu(G,k.default,C.default)}function Au(k,C,G,oe){var be=oe-G,Ie=k-G;return be===0?0:C===1?Ie/be:(Math.pow(C,Ie)-1)/(Math.pow(C,be)-1)}var yc=function(C,G){this.expression=C,this._warningHistory={},this._evaluator=new Ps,this._defaultValue=G?Me(G):null,this._enumValues=G&&G.type==="enum"?G.values:null};yc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._evaluator.globals=C,this._evaluator.feature=G,this._evaluator.featureState=oe,this._evaluator.canonical=be,this._evaluator.availableImages=Ie||null,this._evaluator.formattedSection=Ne,this.expression.evaluate(this._evaluator)},yc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){this._evaluator.globals=C,this._evaluator.feature=G||null,this._evaluator.featureState=oe||null,this._evaluator.canonical=be,this._evaluator.availableImages=Ie||null,this._evaluator.formattedSection=Ne||null;try{var 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 Xs("Expected value to be one of "+Object.keys(this._enumValues).map(function(It){return JSON.stringify(It)}).join(", ")+", but found "+JSON.stringify(ft)+" instead.");return ft}catch(It){return this._warningHistory[It.message]||(this._warningHistory[It.message]=!0,typeof console<"u"&&console.warn(It.message)),this._defaultValue}};function fo(k){return Array.isArray(k)&&k.length>0&&typeof k[0]=="string"&&k[0]in yo}function Fo(k,C){var G=new ol(yo,[],C?Te(C):void 0),oe=G.parse(k,void 0,void 0,void 0,C&&C.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?Ss(new yc(oe,C)):Fl(G.errors)}var Dc=function(C,G){this.kind=C,this._styleExpression=G,this.isStateDependent=C!=="constant"&&!ml(G.expression)};Dc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,G,oe,be,Ie,Ne)},Dc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluate(C,G,oe,be,Ie,Ne)};var lc=function(C,G,oe,be){this.kind=C,this.zoomStops=oe,this._styleExpression=G,this.isStateDependent=C!=="camera"&&!ml(G.expression),this.interpolationType=be};lc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,G,oe,be,Ie,Ne)},lc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluate(C,G,oe,be,Ie,Ne)},lc.prototype.interpolationFactor=function(C,G,oe){return this.interpolationType?nu.interpolationFactor(this.interpolationType,C,G,oe):0};function Yu(k,C){if(k=Fo(k,C),k.result==="error")return k;var G=k.value.expression,oe=jf(G);if(!oe&&!yl(C))return Fl([new ws("","data expressions not supported")]);var be=Lu(G,["zoom"]);if(!be&&!ll(C))return Fl([new ws("","zoom expressions not supported")]);var Ie=ie(G);if(!Ie&&!be)return Fl([new ws("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof ws)return Fl([Ie]);if(Ie instanceof nu&&!Un(C))return Fl([new ws("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return Ss(oe?new Dc("constant",k.value):new Dc("source",k.value));var Ne=Ie instanceof nu?Ie.interpolation:void 0;return Ss(oe?new lc("camera",k.value,Ie.labels,Ne):new lc("composite",k.value,Ie.labels,Ne))}var Oe=function(C,G){this._parameters=C,this._specification=G,bs(this,cu(this._parameters,this._specification))};Oe.deserialize=function(C){return new Oe(C._parameters,C._specification)},Oe.serialize=function(C){return{_parameters:C._parameters,_specification:C._specification}};function I(k,C){if(Js(k))return new Oe(k,C);if(fo(k)){var G=Yu(k,C);if(G.result==="error")throw new Error(G.value.map(function(be){return be.key+": "+be.message}).join(", "));return G.value}else{var oe=k;return typeof k=="string"&&C.type==="color"&&(oe=Bs.parse(k)),{kind:"constant",evaluate:function(){return oe}}}}function ie(k){var C=null;if(k instanceof Cc)C=ie(k.result);else if(k instanceof Xu)for(var G=0,oe=k.args;Goe.maximum?[new Pn(C,G,G+" is greater than the maximum value "+oe.maximum)]:[]}function Ot(k){var C=k.valueSpec,G=lo(k.value.type),oe,be={},Ie,Ne,ft=G!=="categorical"&&k.value.property===void 0,It=!ft,Ht=Ro(k.value.stops)==="array"&&Ro(k.value.stops[0])==="array"&&Ro(k.value.stops[0][0])==="object",er=ze({key:k.key,value:k.value,valueSpec:k.styleSpec.function,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{stops:Lr,default:ua}});return G==="identity"&&ft&&er.push(new Pn(k.key,k.value,'missing required property "property"')),G!=="identity"&&!k.value.stops&&er.push(new Pn(k.key,k.value,'missing required property "stops"')),G==="exponential"&&k.valueSpec.expression&&!Un(k.valueSpec)&&er.push(new Pn(k.key,k.value,"exponential functions not supported")),k.styleSpec.$version>=8&&(It&&!yl(k.valueSpec)?er.push(new Pn(k.key,k.value,"property functions not supported")):ft&&!ll(k.valueSpec)&&er.push(new Pn(k.key,k.value,"zoom functions not supported"))),(G==="categorical"||Ht)&&k.value.property===void 0&&er.push(new Pn(k.key,k.value,'"property" property is required')),er;function Lr(Oa){if(G==="identity")return[new Pn(Oa.key,Oa.value,'identity function may not have a "stops" property')];var Mi=[],ii=Oa.value;return Mi=Mi.concat(ht({key:Oa.key,value:ii,valueSpec:Oa.valueSpec,style:Oa.style,styleSpec:Oa.styleSpec,arrayElementValidator:Zr})),Ro(ii)==="array"&&ii.length===0&&Mi.push(new Pn(Oa.key,ii,"array must have at least one stop")),Mi}function Zr(Oa){var Mi=[],ii=Oa.value,$i=Oa.key;if(Ro(ii)!=="array")return[new Pn($i,ii,"array expected, "+Ro(ii)+" found")];if(ii.length!==2)return[new Pn($i,ii,"array length 2 expected, length "+ii.length+" found")];if(Ht){if(Ro(ii[0])!=="object")return[new Pn($i,ii,"object expected, "+Ro(ii[0])+" found")];if(ii[0].zoom===void 0)return[new Pn($i,ii,"object stop key must have zoom")];if(ii[0].value===void 0)return[new Pn($i,ii,"object stop key must have value")];if(Ne&&Ne>lo(ii[0].zoom))return[new Pn($i,ii[0].zoom,"stop zoom values must appear in ascending order")];lo(ii[0].zoom)!==Ne&&(Ne=lo(ii[0].zoom),Ie=void 0,be={}),Mi=Mi.concat(ze({key:$i+"[0]",value:ii[0],valueSpec:{zoom:{}},style:Oa.style,styleSpec:Oa.styleSpec,objectElementValidators:{zoom:wt,value:Vr}}))}else Mi=Mi.concat(Vr({key:$i+"[0]",value:ii[0],valueSpec:{},style:Oa.style,styleSpec:Oa.styleSpec},ii));return fo(Zo(ii[1]))?Mi.concat([new Pn($i+"[1]",ii[1],"expressions are not allowed in function stops.")]):Mi.concat(Mo({key:$i+"[1]",value:ii[1],valueSpec:C,style:Oa.style,styleSpec:Oa.styleSpec}))}function Vr(Oa,Mi){var ii=Ro(Oa.value),$i=lo(Oa.value),Oi=Oa.value!==null?Oa.value:Mi;if(!oe)oe=ii;else if(ii!==oe)return[new Pn(Oa.key,Oi,ii+" stop domain type must match previous stop domain type "+oe)];if(ii!=="number"&&ii!=="string"&&ii!=="boolean")return[new Pn(Oa.key,Oi,"stop domain value must be a number, string, or boolean")];if(ii!=="number"&&G!=="categorical"){var Ji="number expected, "+ii+" found";return yl(C)&&G===void 0&&(Ji+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pn(Oa.key,Oi,Ji)]}return G==="categorical"&&ii==="number"&&(!isFinite($i)||Math.floor($i)!==$i)?[new Pn(Oa.key,Oi,"integer expected, found "+$i)]:G!=="categorical"&&ii==="number"&&Ie!==void 0&&$i=2&&k[1]!=="$id"&&k[1]!=="$type";case"in":return k.length>=3&&(typeof k[1]!="string"||Array.isArray(k[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return k.length!==3||Array.isArray(k[1])||Array.isArray(k[2]);case"any":case"all":for(var C=0,G=k.slice(1);CC?1:0}function pt(k){if(!Array.isArray(k))return!1;if(k[0]==="within")return!0;for(var C=1;C"||C==="<="||C===">="?bt(k[1],k[2],C):C==="any"?Dt(k.slice(1)):C==="all"?["all"].concat(k.slice(1).map(Et)):C==="none"?["all"].concat(k.slice(1).map(Et).map(Er)):C==="in"?ur(k[1],k.slice(2)):C==="!in"?Er(ur(k[1],k.slice(2))):C==="has"?yr(k[1]):C==="!has"?Er(yr(k[1])):C==="within"?k:!0;return G}function bt(k,C,G){switch(k){case"$type":return["filter-type-"+G,C];case"$id":return["filter-id-"+G,C];default:return["filter-"+G,k,C]}}function Dt(k){return["any"].concat(k.map(Et))}function ur(k,C){if(C.length===0)return!1;switch(k){case"$type":return["filter-type-in",["literal",C]];case"$id":return["filter-id-in",["literal",C]];default:return C.length>200&&!C.some(function(G){return typeof G!=typeof C[0]})?["filter-in-large",k,["literal",C.sort(lt)]]:["filter-in-small",k,["literal",C]]}}function yr(k){switch(k){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",k]}}function Er(k){return["!",k]}function jr(k){return na(Zo(k.value))?$t(bs({},k,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(k)}function Qr(k){var C=k.value,G=k.key;if(Ro(C)!=="array")return[new Pn(G,C,"array expected, "+Ro(C)+" found")];var oe=k.styleSpec,be,Ie=[];if(C.length<1)return[new Pn(G,C,"filter array must have at least 1 element")];switch(Ie=Ie.concat(Kr({key:G+"[0]",value:C[0],valueSpec:oe.filter_operator,style:k.style,styleSpec:k.styleSpec})),lo(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&lo(C[1])==="$type"&&Ie.push(new Pn(G,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&Ie.push(new Pn(G,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(be=Ro(C[1]),be!=="string"&&Ie.push(new Pn(G+"[1]",C[1],"string expected, "+be+" found")));for(var Ne=2;Ne=er[Vr+0]&&oe>=er[Vr+1])?(Ne[Zr]=!0,Ie.push(Ht[Zr])):Ne[Zr]=!1}}},fu.prototype._forEachCell=function(k,C,G,oe,be,Ie,Ne,ft){for(var It=this._convertToCellCoord(k),Ht=this._convertToCellCoord(C),er=this._convertToCellCoord(G),Lr=this._convertToCellCoord(oe),Zr=It;Zr<=er;Zr++)for(var Vr=Ht;Vr<=Lr;Vr++){var ua=this.d*Vr+Zr;if(!(ft&&!ft(this._convertFromCellCoord(Zr),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Zr+1),this._convertFromCellCoord(Vr+1)))&&be.call(this,k,C,G,oe,ua,Ie,Ne,ft))return}},fu.prototype._convertFromCellCoord=function(k){return(k-this.padding)/this.scale},fu.prototype._convertToCellCoord=function(k){return Math.max(0,Math.min(this.d-1,Math.floor(k*this.scale)+this.padding))},fu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var k=this.cells,C=wl+this.cells.length+1+1,G=0,oe=0;oe=0)){var Lr=k[er];Ht[er]=Hl[It].shallow.indexOf(er)>=0?Lr:yt(Lr,C)}k instanceof Error&&(Ht.message=k.message)}if(Ht.$name)throw new Error("$name property is reserved for worker serialization logic.");return It!=="Object"&&(Ht.$name=It),Ht}throw new Error("can't serialize object of type "+typeof k)}function Tt(k){if(k==null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||k instanceof Boolean||k instanceof Number||k instanceof String||k instanceof Date||k instanceof RegExp||et(k)||dt(k)||ArrayBuffer.isView(k)||k instanceof uc)return k;if(Array.isArray(k))return k.map(Tt);if(typeof k=="object"){var C=k.$name||"Object",G=Hl[C],oe=G.klass;if(!oe)throw new Error("can't deserialize unregistered class "+C);if(oe.deserialize)return oe.deserialize(k);for(var be=Object.create(oe.prototype),Ie=0,Ne=Object.keys(k);Ie=0?It:Tt(It)}}return be}throw new Error("can't deserialize object of type "+typeof k)}var tr=function(){this.first=!0};tr.prototype.update=function(C,G){var oe=Math.floor(C);return this.first?(this.first=!1,this.lastIntegerZoom=oe,this.lastIntegerZoomTime=0,this.lastZoom=C,this.lastFloorZoom=oe,!0):(this.lastFloorZoom>oe?(this.lastIntegerZoom=oe+1,this.lastIntegerZoomTime=G):this.lastFloorZoom=128&&k<=255},Arabic:function(k){return k>=1536&&k<=1791},"Arabic Supplement":function(k){return k>=1872&&k<=1919},"Arabic Extended-A":function(k){return k>=2208&&k<=2303},"Hangul Jamo":function(k){return k>=4352&&k<=4607},"Unified Canadian Aboriginal Syllabics":function(k){return k>=5120&&k<=5759},Khmer:function(k){return k>=6016&&k<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(k){return k>=6320&&k<=6399},"General Punctuation":function(k){return k>=8192&&k<=8303},"Letterlike Symbols":function(k){return k>=8448&&k<=8527},"Number Forms":function(k){return k>=8528&&k<=8591},"Miscellaneous Technical":function(k){return k>=8960&&k<=9215},"Control Pictures":function(k){return k>=9216&&k<=9279},"Optical Character Recognition":function(k){return k>=9280&&k<=9311},"Enclosed Alphanumerics":function(k){return k>=9312&&k<=9471},"Geometric Shapes":function(k){return k>=9632&&k<=9727},"Miscellaneous Symbols":function(k){return k>=9728&&k<=9983},"Miscellaneous Symbols and Arrows":function(k){return k>=11008&&k<=11263},"CJK Radicals Supplement":function(k){return k>=11904&&k<=12031},"Kangxi Radicals":function(k){return k>=12032&&k<=12255},"Ideographic Description Characters":function(k){return k>=12272&&k<=12287},"CJK Symbols and Punctuation":function(k){return k>=12288&&k<=12351},Hiragana:function(k){return k>=12352&&k<=12447},Katakana:function(k){return k>=12448&&k<=12543},Bopomofo:function(k){return k>=12544&&k<=12591},"Hangul Compatibility Jamo":function(k){return k>=12592&&k<=12687},Kanbun:function(k){return k>=12688&&k<=12703},"Bopomofo Extended":function(k){return k>=12704&&k<=12735},"CJK Strokes":function(k){return k>=12736&&k<=12783},"Katakana Phonetic Extensions":function(k){return k>=12784&&k<=12799},"Enclosed CJK Letters and Months":function(k){return k>=12800&&k<=13055},"CJK Compatibility":function(k){return k>=13056&&k<=13311},"CJK Unified Ideographs Extension A":function(k){return k>=13312&&k<=19903},"Yijing Hexagram Symbols":function(k){return k>=19904&&k<=19967},"CJK Unified Ideographs":function(k){return k>=19968&&k<=40959},"Yi Syllables":function(k){return k>=40960&&k<=42127},"Yi Radicals":function(k){return k>=42128&&k<=42191},"Hangul Jamo Extended-A":function(k){return k>=43360&&k<=43391},"Hangul Syllables":function(k){return k>=44032&&k<=55215},"Hangul Jamo Extended-B":function(k){return k>=55216&&k<=55295},"Private Use Area":function(k){return k>=57344&&k<=63743},"CJK Compatibility Ideographs":function(k){return k>=63744&&k<=64255},"Arabic Presentation Forms-A":function(k){return k>=64336&&k<=65023},"Vertical Forms":function(k){return k>=65040&&k<=65055},"CJK Compatibility Forms":function(k){return k>=65072&&k<=65103},"Small Form Variants":function(k){return k>=65104&&k<=65135},"Arabic Presentation Forms-B":function(k){return k>=65136&&k<=65279},"Halfwidth and Fullwidth Forms":function(k){return k>=65280&&k<=65519}};function _r(k){for(var C=0,G=k;C=65097&&k<=65103)||zt["CJK Compatibility Ideographs"](k)||zt["CJK Compatibility"](k)||zt["CJK Radicals Supplement"](k)||zt["CJK Strokes"](k)||zt["CJK Symbols and Punctuation"](k)&&!(k>=12296&&k<=12305)&&!(k>=12308&&k<=12319)&&k!==12336||zt["CJK Unified Ideographs Extension A"](k)||zt["CJK Unified Ideographs"](k)||zt["Enclosed CJK Letters and Months"](k)||zt["Hangul Compatibility Jamo"](k)||zt["Hangul Jamo Extended-A"](k)||zt["Hangul Jamo Extended-B"](k)||zt["Hangul Jamo"](k)||zt["Hangul Syllables"](k)||zt.Hiragana(k)||zt["Ideographic Description Characters"](k)||zt.Kanbun(k)||zt["Kangxi Radicals"](k)||zt["Katakana Phonetic Extensions"](k)||zt.Katakana(k)&&k!==12540||zt["Halfwidth and Fullwidth Forms"](k)&&k!==65288&&k!==65289&&k!==65293&&!(k>=65306&&k<=65310)&&k!==65339&&k!==65341&&k!==65343&&!(k>=65371&&k<=65503)&&k!==65507&&!(k>=65512&&k<=65519)||zt["Small Form Variants"](k)&&!(k>=65112&&k<=65118)&&!(k>=65123&&k<=65126)||zt["Unified Canadian Aboriginal Syllabics"](k)||zt["Unified Canadian Aboriginal Syllabics Extended"](k)||zt["Vertical Forms"](k)||zt["Yijing Hexagram Symbols"](k)||zt["Yi Syllables"](k)||zt["Yi Radicals"](k))}function Ja(k){return!!(zt["Latin-1 Supplement"](k)&&(k===167||k===169||k===174||k===177||k===188||k===189||k===190||k===215||k===247)||zt["General Punctuation"](k)&&(k===8214||k===8224||k===8225||k===8240||k===8241||k===8251||k===8252||k===8258||k===8263||k===8264||k===8265||k===8273)||zt["Letterlike Symbols"](k)||zt["Number Forms"](k)||zt["Miscellaneous Technical"](k)&&(k>=8960&&k<=8967||k>=8972&&k<=8991||k>=8996&&k<=9e3||k===9003||k>=9085&&k<=9114||k>=9150&&k<=9165||k===9167||k>=9169&&k<=9179||k>=9186&&k<=9215)||zt["Control Pictures"](k)&&k!==9251||zt["Optical Character Recognition"](k)||zt["Enclosed Alphanumerics"](k)||zt["Geometric Shapes"](k)||zt["Miscellaneous Symbols"](k)&&!(k>=9754&&k<=9759)||zt["Miscellaneous Symbols and Arrows"](k)&&(k>=11026&&k<=11055||k>=11088&&k<=11097||k>=11192&&k<=11243)||zt["CJK Symbols and Punctuation"](k)||zt.Katakana(k)||zt["Private Use Area"](k)||zt["CJK Compatibility Forms"](k)||zt["Small Form Variants"](k)||zt["Halfwidth and Fullwidth Forms"](k)||k===8734||k===8756||k===8757||k>=9984&&k<=10087||k>=10102&&k<=10131||k===65532||k===65533)}function ti(k){return!(pa(k)||Ja(k))}function Sa(k){return zt.Arabic(k)||zt["Arabic Supplement"](k)||zt["Arabic Extended-A"](k)||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k)}function za(k){return k>=1424&&k<=2303||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k)}function Xa(k,C){return!(!C&&za(k)||k>=2304&&k<=3583||k>=3840&&k<=4255||zt.Khmer(k))}function fi(k){for(var C=0,G=k;C-1&&(an=La.error),sn&&sn(k)};function Jn(){ro.fire(new Or("pluginStateChange",{pluginStatus:an,pluginURL:dn}))}var ro=new wr,$o=function(){return an},no=function(k){return k({pluginStatus:an,pluginURL:dn}),ro.on("pluginStateChange",k),k},Xo=function(k,C,G){if(G===void 0&&(G=!1),an===La.deferred||an===La.loading||an===La.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");dn=we.resolveURL(k),an=La.deferred,sn=C,Jn(),G||cl()},cl=function(){if(an!==La.deferred||!dn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");an=La.loading,Jn(),dn&&ra({url:dn},function(k){k?In(k):(an=La.loaded,Jn())})},al={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return an===La.loaded||al.applyArabicShaping!=null},isLoading:function(){return an===La.loading},setState:function(C){an=C.pluginStatus,dn=C.pluginURL},isParsed:function(){return al.applyArabicShaping!=null&&al.processBidirectionalText!=null&&al.processStyledBidirectionalText!=null},getPluginURL:function(){return dn}},_l=function(){!al.isLoading()&&!al.isLoaded()&&$o()==="deferred"&&cl()},mn=function(C,G){this.zoom=C,G?(this.now=G.now,this.fadeDuration=G.fadeDuration,this.zoomHistory=G.zoomHistory,this.transition=G.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new tr,this.transition={})};mn.prototype.isSupportedScript=function(C){return ni(C,al.isLoaded())},mn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},mn.prototype.getCrossfadeParameters=function(){var C=this.zoom,G=C-Math.floor(C),oe=this.crossFadingFactor();return C>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:G+(1-G)*oe}:{fromScale:.5,toScale:1,t:1-(1-oe)*G}};var po=function(C,G){this.property=C,this.value=G,this.expression=I(G===void 0?C.specification.default:G,C.specification)};po.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},po.prototype.possiblyEvaluate=function(C,G,oe){return this.property.possiblyEvaluate(this,C,G,oe)};var fs=function(C){this.property=C,this.value=new po(C,void 0)};fs.prototype.transitioned=function(C,G){return new Tl(this.property,this.value,G,p({},C.transition,this.transition),C.now)},fs.prototype.untransitioned=function(){return new Tl(this.property,this.value,null,{},0)};var ms=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};ms.prototype.getValue=function(C){return O(this._values[C].value.value)},ms.prototype.setValue=function(C,G){this._values.hasOwnProperty(C)||(this._values[C]=new fs(this._values[C].property)),this._values[C].value=new po(this._values[C].property,G===null?void 0:O(G))},ms.prototype.getTransition=function(C){return O(this._values[C].transition)},ms.prototype.setTransition=function(C,G){this._values.hasOwnProperty(C)||(this._values[C]=new fs(this._values[C].property)),this._values[C].transition=O(G)||void 0},ms.prototype.serialize=function(){for(var C={},G=0,oe=Object.keys(this._values);Gthis.end)return this.prior=null,Ie;if(this.value.isDataDriven())return this.prior=null,Ie;if(beNe.zoomHistory.lastIntegerZoom?{from:oe,to:be}:{from:Ie,to:be}},C.prototype.interpolate=function(oe){return oe},C}(Xt),oa=function(C){this.specification=C};oa.prototype.possiblyEvaluate=function(C,G,oe,be){if(C.value!==void 0)if(C.expression.kind==="constant"){var Ie=C.expression.evaluate(G,null,{},oe,be);return this._calculate(Ie,Ie,Ie,G)}else return this._calculate(C.expression.evaluate(new mn(Math.floor(G.zoom-1),G)),C.expression.evaluate(new mn(Math.floor(G.zoom),G)),C.expression.evaluate(new mn(Math.floor(G.zoom+1),G)),G)},oa.prototype._calculate=function(C,G,oe,be){var Ie=be.zoom;return Ie>be.zoomHistory.lastIntegerZoom?{from:C,to:G}:{from:oe,to:G}},oa.prototype.interpolate=function(C){return C};var Ta=function(C){this.specification=C};Ta.prototype.possiblyEvaluate=function(C,G,oe,be){return!!C.expression.evaluate(G,null,{},oe,be)},Ta.prototype.interpolate=function(){return!1};var ma=function(C){this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var G in C){var oe=C[G];oe.specification.overridable&&this.overridableProperties.push(G);var be=this.defaultPropertyValues[G]=new po(oe,void 0),Ie=this.defaultTransitionablePropertyValues[G]=new fs(oe);this.defaultTransitioningPropertyValues[G]=Ie.untransitioned(),this.defaultPossiblyEvaluatedValues[G]=be.possiblyEvaluate({})}};me("DataDrivenProperty",Xt),me("DataConstantProperty",it),me("CrossFadedDataDrivenProperty",fr),me("CrossFadedProperty",oa),me("ColorRampProperty",Ta);var xa="-transition",Ya=function(k){function C(G,oe){if(k.call(this),this.id=G.id,this.type=G.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},G.type!=="custom"&&(G=G,this.metadata=G.metadata,this.minzoom=G.minzoom,this.maxzoom=G.maxzoom,G.type!=="background"&&(this.source=G.source,this.sourceLayer=G["source-layer"],this.filter=G.filter),oe.layout&&(this._unevaluatedLayout=new Su(oe.layout)),oe.paint)){this._transitionablePaint=new ms(oe.paint);for(var be in G.paint)this.setPaintProperty(be,G.paint[be],{validate:!1});for(var Ie in G.layout)this.setLayoutProperty(Ie,G.layout[Ie],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _c(oe.paint)}}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},C.prototype.getLayoutProperty=function(oe){return oe==="visibility"?this.visibility:this._unevaluatedLayout.getValue(oe)},C.prototype.setLayoutProperty=function(oe,be,Ie){if(Ie===void 0&&(Ie={}),be!=null){var Ne="layers."+this.id+".layout."+oe;if(this._validate(tu,Ne,oe,be,Ie))return}if(oe==="visibility"){this.visibility=be;return}this._unevaluatedLayout.setValue(oe,be)},C.prototype.getPaintProperty=function(oe){return z(oe,xa)?this._transitionablePaint.getTransition(oe.slice(0,-xa.length)):this._transitionablePaint.getValue(oe)},C.prototype.setPaintProperty=function(oe,be,Ie){if(Ie===void 0&&(Ie={}),be!=null){var Ne="layers."+this.id+".paint."+oe;if(this._validate(Il,Ne,oe,be,Ie))return!1}if(z(oe,xa))return this._transitionablePaint.setTransition(oe.slice(0,-xa.length),be||void 0),!1;var ft=this._transitionablePaint._values[oe],It=ft.property.specification["property-type"]==="cross-faded-data-driven",Ht=ft.value.isDataDriven(),er=ft.value;this._transitionablePaint.setValue(oe,be),this._handleSpecialPaintPropertyUpdate(oe);var Lr=this._transitionablePaint._values[oe].value,Zr=Lr.isDataDriven();return Zr||Ht||It||this._handleOverridablePaintPropertyUpdate(oe,er,Lr)},C.prototype._handleSpecialPaintPropertyUpdate=function(oe){},C.prototype._handleOverridablePaintPropertyUpdate=function(oe,be,Ie){return!1},C.prototype.isHidden=function(oe){return this.minzoom&&oe=this.maxzoom?!0:this.visibility==="none"},C.prototype.updateTransitions=function(oe){this._transitioningPaint=this._transitionablePaint.transitioned(oe,this._transitioningPaint)},C.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},C.prototype.recalculate=function(oe,be){oe.getCrossfadeParameters&&(this._crossfadeParameters=oe.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(oe,void 0,be)),this.paint=this._transitioningPaint.possiblyEvaluate(oe,void 0,be)},C.prototype.serialize=function(){var oe={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&&(oe.layout=oe.layout||{},oe.layout.visibility=this.visibility),N(oe,function(be,Ie){return be!==void 0&&!(Ie==="layout"&&!Object.keys(be).length)&&!(Ie==="paint"&&!Object.keys(be).length)})},C.prototype._validate=function(oe,be,Ie,Ne,ft){return ft===void 0&&(ft={}),ft&&ft.validate===!1?!1:Ru(this,oe.call(es,{key:be,layerType:this.type,objectKey:Ie,value:Ne,styleSpec:Gi,style:{glyphs:!0,sprite:!0}}))},C.prototype.is3D=function(){return!1},C.prototype.isTileClipped=function(){return!1},C.prototype.hasOffscreenPass=function(){return!1},C.prototype.resize=function(){},C.prototype.isStateDependent=function(){for(var oe in this.paint._values){var be=this.paint.get(oe);if(!(!(be instanceof Rl)||!yl(be.property.specification))&&(be.value.kind==="source"||be.value.kind==="composite")&&be.value.isStateDependent)return!0}return!1},C}(wr),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},yi=function(C,G){this._structArray=C,this._pos1=G*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},si=128,gn=5,zi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};zi.serialize=function(C,G){return C._trim(),G&&(C.isTransferred=!0,G.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},zi.deserialize=function(C){var G=Object.create(this.prototype);return G.arrayBuffer=C.arrayBuffer,G.length=C.length,G.capacity=C.arrayBuffer.byteLength/G.bytesPerElement,G._refreshViews(),G},zi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},zi.prototype.clear=function(){this.length=0},zi.prototype.resize=function(C){this.reserve(C),this.length=C},zi.prototype.reserve=function(C){if(C>this.capacity){this.capacity=Math.max(C,Math.floor(this.capacity*gn),si),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var G=this.uint8;this._refreshViews(),G&&this.uint8.set(G)}},zi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Ei(k,C){C===void 0&&(C=1);var G=0,oe=0,be=k.map(function(Ne){var ft=Na(Ne.type),It=G=ea(G,Math.max(C,ft)),Ht=Ne.components||1;return oe=Math.max(oe,ft),G+=ft*Ht,{name:Ne.name,type:Ne.type,components:Ht,offset:It}}),Ie=ea(G,Math.max(oe,C));return{members:be,size:Ie,alignment:C}}function Na(k){return bi[k].BYTES_PER_ELEMENT}function ea(k,C){return Math.ceil(k/C)*C}var Ma=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.int16[Ne+0]=be,this.int16[Ne+1]=Ie,oe},C}(zi);Ma.prototype.bytesPerElement=4,me("StructArrayLayout2i4",Ma);var Qa=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*4;return this.int16[It+0]=be,this.int16[It+1]=Ie,this.int16[It+2]=Ne,this.int16[It+3]=ft,oe},C}(zi);Qa.prototype.bytesPerElement=8,me("StructArrayLayout4i8",Qa);var di=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Ie,this.int16[er+2]=Ne,this.int16[er+3]=ft,this.int16[er+4]=It,this.int16[er+5]=Ht,oe},C}(zi);di.prototype.bytesPerElement=12,me("StructArrayLayout2i4i12",di);var Va=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*4,Lr=oe*8;return this.int16[er+0]=be,this.int16[er+1]=Ie,this.uint8[Lr+4]=Ne,this.uint8[Lr+5]=ft,this.uint8[Lr+6]=It,this.uint8[Lr+7]=Ht,oe},C}(zi);Va.prototype.bytesPerElement=8,me("StructArrayLayout2i4ub8",Va);var Bi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.float32[Ne+0]=be,this.float32[Ne+1]=Ie,oe},C}(zi);Bi.prototype.bytesPerElement=8,me("StructArrayLayout2f8",Bi);var Li=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr){var ua=oe*10;return this.uint16[ua+0]=be,this.uint16[ua+1]=Ie,this.uint16[ua+2]=Ne,this.uint16[ua+3]=ft,this.uint16[ua+4]=It,this.uint16[ua+5]=Ht,this.uint16[ua+6]=er,this.uint16[ua+7]=Lr,this.uint16[ua+8]=Zr,this.uint16[ua+9]=Vr,oe},C}(zi);Li.prototype.bytesPerElement=20,me("StructArrayLayout10ui20",Li);var hn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua){var Oa=this.length;return this.resize(Oa+1),this.emplace(Oa,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa){var Mi=oe*12;return this.int16[Mi+0]=be,this.int16[Mi+1]=Ie,this.int16[Mi+2]=Ne,this.int16[Mi+3]=ft,this.uint16[Mi+4]=It,this.uint16[Mi+5]=Ht,this.uint16[Mi+6]=er,this.uint16[Mi+7]=Lr,this.int16[Mi+8]=Zr,this.int16[Mi+9]=Vr,this.int16[Mi+10]=ua,this.int16[Mi+11]=Oa,oe},C}(zi);hn.prototype.bytesPerElement=24,me("StructArrayLayout4i4ui4i24",hn);var Ha=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.float32[ft+0]=be,this.float32[ft+1]=Ie,this.float32[ft+2]=Ne,oe},C}(zi);Ha.prototype.bytesPerElement=12,me("StructArrayLayout3f12",Ha);var Ua=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Ie=oe*1;return this.uint32[Ie+0]=be,oe},C}(zi);Ua.prototype.bytesPerElement=4,me("StructArrayLayout1ul4",Ua);var Yi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr){var Zr=this.length;return this.resize(Zr+1),this.emplace(Zr,oe,be,Ie,Ne,ft,It,Ht,er,Lr)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr){var Vr=oe*10,ua=oe*5;return this.int16[Vr+0]=be,this.int16[Vr+1]=Ie,this.int16[Vr+2]=Ne,this.int16[Vr+3]=ft,this.int16[Vr+4]=It,this.int16[Vr+5]=Ht,this.uint32[ua+3]=er,this.uint16[Vr+8]=Lr,this.uint16[Vr+9]=Zr,oe},C}(zi);Yi.prototype.bytesPerElement=20,me("StructArrayLayout6i1ul2ui20",Yi);var Ri=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Ie,this.int16[er+2]=Ne,this.int16[er+3]=ft,this.int16[er+4]=It,this.int16[er+5]=Ht,oe},C}(zi);Ri.prototype.bytesPerElement=12,me("StructArrayLayout2i2i2i12",Ri);var Ti=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft){var It=this.length;return this.resize(It+1),this.emplace(It,oe,be,Ie,Ne,ft)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It){var Ht=oe*4,er=oe*8;return this.float32[Ht+0]=be,this.float32[Ht+1]=Ie,this.float32[Ht+2]=Ne,this.int16[er+6]=ft,this.int16[er+7]=It,oe},C}(zi);Ti.prototype.bytesPerElement=16,me("StructArrayLayout2f1f2i16",Ti);var xi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*12,Ht=oe*3;return this.uint8[It+0]=be,this.uint8[It+1]=Ie,this.float32[Ht+1]=Ne,this.float32[Ht+2]=ft,oe},C}(zi);xi.prototype.bytesPerElement=12,me("StructArrayLayout2ub2f12",xi);var Xi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.uint16[ft+0]=be,this.uint16[ft+1]=Ie,this.uint16[ft+2]=Ne,oe},C}(zi);Xi.prototype.bytesPerElement=6,me("StructArrayLayout3ui6",Xi);var vn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi){var Ji=this.length;return this.resize(Ji+1),this.emplace(Ji,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji){var ln=oe*24,bn=oe*12,qn=oe*48;return this.int16[ln+0]=be,this.int16[ln+1]=Ie,this.uint16[ln+2]=Ne,this.uint16[ln+3]=ft,this.uint32[bn+2]=It,this.uint32[bn+3]=Ht,this.uint32[bn+4]=er,this.uint16[ln+10]=Lr,this.uint16[ln+11]=Zr,this.uint16[ln+12]=Vr,this.float32[bn+7]=ua,this.float32[bn+8]=Oa,this.uint8[qn+36]=Mi,this.uint8[qn+37]=ii,this.uint8[qn+38]=$i,this.uint32[bn+10]=Oi,this.int16[ln+22]=Ji,oe},C}(zi);vn.prototype.bytesPerElement=48,me("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",vn);var Rn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do){var $s=this.length;return this.resize($s+1),this.emplace($s,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Zr,Vr,ua,Oa,Mi,ii,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do,$s){var Ms=oe*34,Zl=oe*17;return this.int16[Ms+0]=be,this.int16[Ms+1]=Ie,this.int16[Ms+2]=Ne,this.int16[Ms+3]=ft,this.int16[Ms+4]=It,this.int16[Ms+5]=Ht,this.int16[Ms+6]=er,this.int16[Ms+7]=Lr,this.uint16[Ms+8]=Zr,this.uint16[Ms+9]=Vr,this.uint16[Ms+10]=ua,this.uint16[Ms+11]=Oa,this.uint16[Ms+12]=Mi,this.uint16[Ms+13]=ii,this.uint16[Ms+14]=$i,this.uint16[Ms+15]=Oi,this.uint16[Ms+16]=Ji,this.uint16[Ms+17]=ln,this.uint16[Ms+18]=bn,this.uint16[Ms+19]=qn,this.uint16[Ms+20]=Nn,this.uint16[Ms+21]=Eo,this.uint16[Ms+22]=oo,this.uint32[Zl+12]=mo,this.float32[Zl+13]=Is,this.float32[Zl+14]=ko,this.float32[Zl+15]=Do,this.float32[Zl+16]=$s,oe},C}(zi);Rn.prototype.bytesPerElement=68,me("StructArrayLayout8i15ui1ul4f68",Rn);var Ii=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Ie=oe*1;return this.float32[Ie+0]=be,oe},C}(zi);Ii.prototype.bytesPerElement=4,me("StructArrayLayout1f4",Ii);var nn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.int16[ft+0]=be,this.int16[ft+1]=Ie,this.int16[ft+2]=Ne,oe},C}(zi);nn.prototype.bytesPerElement=6,me("StructArrayLayout3i6",nn);var Cn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*2,It=oe*4;return this.uint32[ft+0]=be,this.uint16[It+2]=Ie,this.uint16[It+3]=Ne,oe},C}(zi);Cn.prototype.bytesPerElement=8,me("StructArrayLayout1ul2ui8",Cn);var Dn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.uint16[Ne+0]=be,this.uint16[Ne+1]=Ie,oe},C}(zi);Dn.prototype.bytesPerElement=4,me("StructArrayLayout2ui4",Dn);var Wn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Ie=oe*1;return this.uint16[Ie+0]=be,oe},C}(zi);Wn.prototype.bytesPerElement=2,me("StructArrayLayout1ui2",Wn);var Os=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*4;return this.float32[It+0]=be,this.float32[It+1]=Ie,this.float32[It+2]=Ne,this.float32[It+3]=ft,oe},C}(zi);Os.prototype.bytesPerElement=16,me("StructArrayLayout4f16",Os);var xl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},G.x1.get=function(){return this._structArray.int16[this._pos2+2]},G.y1.get=function(){return this._structArray.int16[this._pos2+3]},G.x2.get=function(){return this._structArray.int16[this._pos2+4]},G.y2.get=function(){return this._structArray.int16[this._pos2+5]},G.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},G.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},G.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},G.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(C.prototype,G),C}(yi);xl.prototype.size=20;var ho=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new xl(this,oe)},C}(Yi);me("CollisionBoxArray",ho);var Xl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},G.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},G.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},G.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},G.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},G.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},G.segment.get=function(){return this._structArray.uint16[this._pos2+10]},G.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},G.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},G.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},G.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},G.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},G.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},G.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},G.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},G.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},G.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},G.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},G.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(C.prototype,G),C}(yi);Xl.prototype.size=48;var hs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new Xl(this,oe)},C}(vn);me("PlacedSymbolArray",hs);var Al=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},G.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},G.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},G.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},G.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},G.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},G.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},G.key.get=function(){return this._structArray.uint16[this._pos2+8]},G.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},G.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},G.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},G.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},G.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},G.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},G.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},G.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},G.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},G.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},G.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},G.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},G.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},G.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},G.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},G.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},G.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},G.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},G.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},G.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(C.prototype,G),C}(yi);Al.prototype.size=68;var El=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new Al(this,oe)},C}(Rn);me("SymbolInstanceArray",El);var ru=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getoffsetX=function(oe){return this.float32[oe*1+0]},C}(Ii);me("GlyphOffsetArray",ru);var js=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getx=function(oe){return this.int16[oe*3+0]},C.prototype.gety=function(oe){return this.int16[oe*3+1]},C.prototype.gettileUnitDistanceFromAnchor=function(oe){return this.int16[oe*3+2]},C}(nn);me("SymbolLineVertexArray",js);var pl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return G.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},G.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},G.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(C.prototype,G),C}(yi);pl.prototype.size=8;var bl=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new pl(this,oe)},C}(Cn);me("FeatureIndexArray",bl);var Xn=Ei([{name:"a_pos",components:2,type:"Int16"}],4),kl=Xn.members,Io=function(C){C===void 0&&(C=[]),this.segments=C};Io.prototype.prepareSegment=function(C,G,oe,be){var Ie=this.segments[this.segments.length-1];return C>Io.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+Io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!Ie||Ie.vertexLength+C>Io.MAX_VERTEX_ARRAY_LENGTH||Ie.sortKey!==be)&&(Ie={vertexOffset:G.length,primitiveOffset:oe.length,vertexLength:0,primitiveLength:0},be!==void 0&&(Ie.sortKey=be),this.segments.push(Ie)),Ie},Io.prototype.get=function(){return this.segments},Io.prototype.destroy=function(){for(var C=0,G=this.segments;C>>16)*It&65535)<<16)&4294967295,er=er<<15|er>>>17,er=(er&65535)*Ht+(((er>>>16)*Ht&65535)<<16)&4294967295,Ne^=er,Ne=Ne<<13|Ne>>>19,ft=(Ne&65535)*5+(((Ne>>>16)*5&65535)<<16)&4294967295,Ne=(ft&65535)+27492+(((ft>>>16)+58964&65535)<<16);switch(er=0,be){case 3:er^=(G.charCodeAt(Lr+2)&255)<<16;case 2:er^=(G.charCodeAt(Lr+1)&255)<<8;case 1:er^=G.charCodeAt(Lr)&255,er=(er&65535)*It+(((er>>>16)*It&65535)<<16)&4294967295,er=er<<15|er>>>17,er=(er&65535)*Ht+(((er>>>16)*Ht&65535)<<16)&4294967295,Ne^=er}return Ne^=G.length,Ne^=Ne>>>16,Ne=(Ne&65535)*2246822507+(((Ne>>>16)*2246822507&65535)<<16)&4294967295,Ne^=Ne>>>13,Ne=(Ne&65535)*3266489909+(((Ne>>>16)*3266489909&65535)<<16)&4294967295,Ne^=Ne>>>16,Ne>>>0}k.exports=C}),re=t(function(k){function C(G,oe){for(var be=G.length,Ie=oe^be,Ne=0,ft;be>=4;)ft=G.charCodeAt(Ne)&255|(G.charCodeAt(++Ne)&255)<<8|(G.charCodeAt(++Ne)&255)<<16|(G.charCodeAt(++Ne)&255)<<24,ft=(ft&65535)*1540483477+(((ft>>>16)*1540483477&65535)<<16),ft^=ft>>>24,ft=(ft&65535)*1540483477+(((ft>>>16)*1540483477&65535)<<16),Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16)^ft,be-=4,++Ne;switch(be){case 3:Ie^=(G.charCodeAt(Ne+2)&255)<<16;case 2:Ie^=(G.charCodeAt(Ne+1)&255)<<8;case 1:Ie^=G.charCodeAt(Ne)&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}k.exports=C}),ye=xe,Ue=xe,ke=re;ye.murmur3=Ue,ye.murmur2=ke;var Qe=function(){this.ids=[],this.positions=[],this.indexed=!1};Qe.prototype.add=function(C,G,oe,be){this.ids.push(qt(C)),this.positions.push(G,oe,be)},Qe.prototype.getPositions=function(C){for(var G=qt(C),oe=0,be=this.ids.length-1;oe>1;this.ids[Ie]>=G?be=Ie:oe=Ie+1}for(var Ne=[];this.ids[oe]===G;){var ft=this.positions[3*oe],It=this.positions[3*oe+1],Ht=this.positions[3*oe+2];Ne.push({index:ft,start:It,end:Ht}),oe++}return Ne},Qe.serialize=function(C,G){var oe=new Float64Array(C.ids),be=new Uint32Array(C.positions);return br(oe,be,0,oe.length-1),G&&G.push(oe.buffer,be.buffer),{ids:oe,positions:be}},Qe.deserialize=function(C){var G=new Qe;return G.ids=C.ids,G.positions=C.positions,G.indexed=!0,G};var vt=Math.pow(2,53)-1;function qt(k){var C=+k;return!isNaN(C)&&C<=vt?C:ye(String(k))}function br(k,C,G,oe){for(;G>1],Ie=G-1,Ne=oe+1;;){do Ie++;while(k[Ie]be);if(Ie>=Ne)break;Br(k,Ie,Ne),Br(C,3*Ie,3*Ne),Br(C,3*Ie+1,3*Ne+1),Br(C,3*Ie+2,3*Ne+2)}Ne-GNe.x+1||ItNe.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return G}function _o(k,C){return{type:k.type,id:k.id,properties:k.properties,geometry:C?fn(k):[]}}function Uo(k,C,G,oe,be){k.emplaceBack(C*2+(oe+1)/2,G*2+(be+1)/2)}var Ds=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(G){return G.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Ma,this.indexArray=new Xi,this.segments=new Io,this.programConfigurations=new Ga(C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(G){return G.isStateDependent()}).map(function(G){return G.id})};Ds.prototype.populate=function(C,G,oe){var be=this.layers[0],Ie=[],Ne=null;be.type==="circle"&&(Ne=be.layout.get("circle-sort-key"));for(var ft=0,It=C;ft=ui||Zr<0||Zr>=ui)){var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),ua=Vr.vertexLength;Uo(this.layoutVertexArray,Lr,Zr,-1,-1),Uo(this.layoutVertexArray,Lr,Zr,1,-1),Uo(this.layoutVertexArray,Lr,Zr,1,1),Uo(this.layoutVertexArray,Lr,Zr,-1,1),this.indexArray.emplaceBack(ua,ua+1,ua+2),this.indexArray.emplaceBack(ua,ua+3,ua+2),Vr.vertexLength+=4,Vr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,oe,{},be)},me("CircleBucket",Ds,{omit:["layers"]});function Oo(k,C){for(var G=0;G=3){for(var Ie=0;Ie1){if(kp(k,C))return!0;for(var oe=0;oe1?k.distSqr(G):k.distSqr(G.sub(C)._mult(be)._add(C))}function ed(k,C){for(var G=!1,oe,be,Ie,Ne=0;NeC.y!=Ie.y>C.y&&C.x<(Ie.x-be.x)*(C.y-be.y)/(Ie.y-be.y)+be.x&&(G=!G)}return G}function Ih(k,C){for(var G=!1,oe=0,be=k.length-1;oeC.y!=Ne.y>C.y&&C.x<(Ne.x-Ie.x)*(C.y-Ie.y)/(Ne.y-Ie.y)+Ie.x&&(G=!G)}return G}function td(k,C,G,oe,be){for(var Ie=0,Ne=k;Ie=ft.x&&be>=ft.y)return!0}var It=[new i(C,G),new i(C,be),new i(oe,be),new i(oe,G)];if(k.length>2)for(var Ht=0,er=It;Htbe.x&&C.x>be.x||k.ybe.y&&C.y>be.y)return!1;var Ie=W(k,C,G[0]);return Ie!==W(k,C,G[1])||Ie!==W(k,C,G[2])||Ie!==W(k,C,G[3])}function Rh(k,C,G){var oe=C.paint.get(k).value;return oe.kind==="constant"?oe.value:G.programConfigurations.get(C.id).getMaxValue(k)}function Cp(k){return Math.sqrt(k[0]*k[0]+k[1]*k[1])}function Vp(k,C,G,oe,be){if(!C[0]&&!C[1])return k;var Ie=i.convert(C)._mult(be);G==="viewport"&&Ie._rotate(-oe);for(var Ne=[],ft=0;ft0&&(Ie=1/Math.sqrt(Ie)),k[0]=C[0]*Ie,k[1]=C[1]*Ie,k[2]=C[2]*Ie,k}function UT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]}function jT(k,C,G){var oe=C[0],be=C[1],Ie=C[2],Ne=G[0],ft=G[1],It=G[2];return k[0]=be*It-Ie*ft,k[1]=Ie*Ne-oe*It,k[2]=oe*ft-be*Ne,k}function qT(k,C,G){var oe=C[0],be=C[1],Ie=C[2];return k[0]=oe*G[0]+be*G[3]+Ie*G[6],k[1]=oe*G[1]+be*G[4]+Ie*G[7],k[2]=oe*G[2]+be*G[5]+Ie*G[8],k}var VT=lv,vk=function(){var k=sv();return function(C,G,oe,be,Ie,Ne){var ft,It;for(G||(G=3),oe||(oe=0),be?It=Math.min(be*G+oe,C.length):It=C.length,ft=oe;ftk.width||be.height>k.height||G.x>k.width-be.width||G.y>k.height-be.height)throw new RangeError("out of range source coordinates for image copy");if(be.width>C.width||be.height>C.height||oe.x>C.width-be.width||oe.y>C.height-be.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ne=k.data,ft=C.data,It=0;It80*G){ft=Ht=k[0],It=er=k[1];for(var ua=G;uaHt&&(Ht=Lr),Zr>er&&(er=Zr);Vr=Math.max(Ht-ft,er-It),Vr=Vr!==0?1/Vr:0}return E0(Ie,Ne,G,ft,It,Vr),Ne}function Mg(k,C,G,oe,be){var Ie,Ne;if(be===U1(k,C,G,oe)>0)for(Ie=C;Ie=C;Ie-=oe)Ne=Ux(Ie,k[Ie],k[Ie+1],Ne);return Ne&&C0(Ne,Ne.next)&&(I0(Ne),Ne=Ne.next),Ne}function uv(k,C){if(!k)return k;C||(C=k);var G=k,oe;do if(oe=!1,!G.steiner&&(C0(G,G.next)||cf(G.prev,G,G.next)===0)){if(I0(G),G=C=G.prev,G===G.next)break;oe=!0}else G=G.next;while(oe||G!==C);return C}function E0(k,C,G,oe,be,Ie,Ne){if(k){!Ne&&Ie&&Eg(k,oe,be,Ie);for(var ft=k,It,Ht;k.prev!==k.next;){if(It=k.prev,Ht=k.next,Ie?Ox(k,oe,be,Ie):Fx(k)){C.push(It.i/G),C.push(k.i/G),C.push(Ht.i/G),I0(k),k=Ht.next,ft=Ht.next;continue}if(k=Ht,k===ft){Ne?Ne===1?(k=k0(uv(k),C,G),E0(k,C,G,oe,be,Ie,2)):Ne===2&&yd(k,C,G,oe,be,Ie):E0(uv(k),C,G,oe,be,Ie,1);break}}}}function Fx(k){var C=k.prev,G=k,oe=k.next;if(cf(C,G,oe)>=0)return!1;for(var be=k.next.next;be!==k.prev;){if(fv(C.x,C.y,G.x,G.y,oe.x,oe.y,be.x,be.y)&&cf(be.prev,be,be.next)>=0)return!1;be=be.next}return!0}function Ox(k,C,G,oe){var be=k.prev,Ie=k,Ne=k.next;if(cf(be,Ie,Ne)>=0)return!1;for(var ft=be.xIe.x?be.x>Ne.x?be.x:Ne.x:Ie.x>Ne.x?Ie.x:Ne.x,er=be.y>Ie.y?be.y>Ne.y?be.y:Ne.y:Ie.y>Ne.y?Ie.y:Ne.y,Lr=F1(ft,It,C,G,oe),Zr=F1(Ht,er,C,G,oe),Vr=k.prevZ,ua=k.nextZ;Vr&&Vr.z>=Lr&&ua&&ua.z<=Zr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Ie.x,Ie.y,Ne.x,Ne.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0||(Vr=Vr.prevZ,ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Ie.x,Ie.y,Ne.x,Ne.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0))return!1;ua=ua.nextZ}for(;Vr&&Vr.z>=Lr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Ie.x,Ie.y,Ne.x,Ne.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0)return!1;Vr=Vr.prevZ}for(;ua&&ua.z<=Zr;){if(ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Ie.x,Ie.y,Ne.x,Ne.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0)return!1;ua=ua.nextZ}return!0}function k0(k,C,G){var oe=k;do{var be=oe.prev,Ie=oe.next.next;!C0(be,Ie)&&kg(be,oe,oe.next,Ie)&&P0(be,Ie)&&P0(Ie,be)&&(C.push(be.i/G),C.push(oe.i/G),C.push(Ie.i/G),I0(oe),I0(oe.next),oe=k=Ie),oe=oe.next}while(oe!==k);return uv(oe)}function yd(k,C,G,oe,be,Ie){var Ne=k;do{for(var ft=Ne.next.next;ft!==Ne.prev;){if(Ne.i!==ft.i&&fm(Ne,ft)){var It=B1(Ne,ft);Ne=uv(Ne,Ne.next),It=uv(It,It.next),E0(Ne,C,G,oe,be,Ie),E0(It,C,G,oe,be,Ie);return}ft=ft.next}Ne=Ne.next}while(Ne!==k)}function cv(k,C,G,oe){var be=[],Ie,Ne,ft,It,Ht;for(Ie=0,Ne=C.length;Ie=G.next.y&&G.next.y!==G.y){var ft=G.x+(be-G.y)*(G.next.x-G.x)/(G.next.y-G.y);if(ft<=oe&&ft>Ie){if(Ie=ft,ft===oe){if(be===G.y)return G;if(be===G.next.y)return G.next}Ne=G.x=G.x&&G.x>=Ht&&oe!==G.x&&fv(beNe.x||G.x===Ne.x&&$T(Ne,G)))&&(Ne=G,Lr=Zr)),G=G.next;while(G!==It);return Ne}function $T(k,C){return cf(k.prev,k,C.prev)<0&&cf(C.next,k,k.next)<0}function Eg(k,C,G,oe){var be=k;do be.z===null&&(be.z=F1(be.x,be.y,C,G,oe)),be.prevZ=be.prev,be.nextZ=be.next,be=be.next;while(be!==k);be.prevZ.nextZ=null,be.prevZ=null,z1(be)}function z1(k){var C,G,oe,be,Ie,Ne,ft,It,Ht=1;do{for(G=k,k=null,Ie=null,Ne=0;G;){for(Ne++,oe=G,ft=0,C=0;C0||It>0&&oe;)ft!==0&&(It===0||!oe||G.z<=oe.z)?(be=G,G=G.nextZ,ft--):(be=oe,oe=oe.nextZ,It--),Ie?Ie.nextZ=be:k=be,be.prevZ=Ie,Ie=be;G=oe}Ie.nextZ=null,Ht*=2}while(Ne>1);return k}function F1(k,C,G,oe,be){return k=32767*(k-G)*be,C=32767*(C-oe)*be,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,k|C<<1}function O1(k){var C=k,G=k;do(C.x=0&&(k-Ne)*(oe-ft)-(G-Ne)*(C-ft)>=0&&(G-Ne)*(Ie-ft)-(be-Ne)*(oe-ft)>=0}function fm(k,C){return k.next.i!==C.i&&k.prev.i!==C.i&&!Nx(k,C)&&(P0(k,C)&&P0(C,k)&&QT(k,C)&&(cf(k.prev,k,C.prev)||cf(k,C.prev,C))||C0(k,C)&&cf(k.prev,k,k.next)>0&&cf(C.prev,C,C.next)>0)}function cf(k,C,G){return(C.y-k.y)*(G.x-C.x)-(C.x-k.x)*(G.y-C.y)}function C0(k,C){return k.x===C.x&&k.y===C.y}function kg(k,C,G,oe){var be=zv(cf(k,C,G)),Ie=zv(cf(k,C,oe)),Ne=zv(cf(G,oe,k)),ft=zv(cf(G,oe,C));return!!(be!==Ie&&Ne!==ft||be===0&&L0(k,G,C)||Ie===0&&L0(k,oe,C)||Ne===0&&L0(G,k,oe)||ft===0&&L0(G,C,oe))}function L0(k,C,G){return C.x<=Math.max(k.x,G.x)&&C.x>=Math.min(k.x,G.x)&&C.y<=Math.max(k.y,G.y)&&C.y>=Math.min(k.y,G.y)}function zv(k){return k>0?1:k<0?-1:0}function Nx(k,C){var G=k;do{if(G.i!==k.i&&G.next.i!==k.i&&G.i!==C.i&&G.next.i!==C.i&&kg(G,G.next,k,C))return!0;G=G.next}while(G!==k);return!1}function P0(k,C){return cf(k.prev,k,k.next)<0?cf(k,C,k.next)>=0&&cf(k,k.prev,C)>=0:cf(k,C,k.prev)<0||cf(k,k.next,C)<0}function QT(k,C){var G=k,oe=!1,be=(k.x+C.x)/2,Ie=(k.y+C.y)/2;do G.y>Ie!=G.next.y>Ie&&G.next.y!==G.y&&be<(G.next.x-G.x)*(Ie-G.y)/(G.next.y-G.y)+G.x&&(oe=!oe),G=G.next;while(G!==k);return oe}function B1(k,C){var G=new N1(k.i,k.x,k.y),oe=new N1(C.i,C.x,C.y),be=k.next,Ie=C.prev;return k.next=C,C.prev=k,G.next=be,be.prev=G,oe.next=G,G.prev=oe,Ie.next=oe,oe.prev=Ie,oe}function Ux(k,C,G,oe){var be=new N1(k,C,G);return oe?(be.next=oe.next,be.prev=oe,oe.next.prev=be,oe.next=be):(be.prev=be,be.next=be),be}function I0(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function N1(k,C,G){this.i=k,this.x=C,this.y=G,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}cm.deviation=function(k,C,G,oe){var be=C&&C.length,Ie=be?C[0]*G:k.length,Ne=Math.abs(U1(k,0,Ie,G));if(be)for(var ft=0,It=C.length;ft0&&(oe+=k[be-1].length,G.holes.push(oe))}return G},Sg.default=zx;function j1(k,C,G,oe,be){Hd(k,C,G||0,oe||k.length-1,be||jx)}function Hd(k,C,G,oe,be){for(;oe>G;){if(oe-G>600){var Ie=oe-G+1,Ne=C-G+1,ft=Math.log(Ie),It=.5*Math.exp(2*ft/3),Ht=.5*Math.sqrt(ft*It*(Ie-It)/Ie)*(Ne-Ie/2<0?-1:1),er=Math.max(G,Math.floor(C-Ne*It/Ie+Ht)),Lr=Math.min(oe,Math.floor(C+(Ie-Ne)*It/Ie+Ht));Hd(k,C,er,Lr,be)}var Zr=k[C],Vr=G,ua=oe;for(hm(k,G,C),be(k[oe],Zr)>0&&hm(k,G,oe);Vr0;)ua--}be(k[G],Zr)===0?hm(k,G,ua):(ua++,hm(k,ua,oe)),ua<=C&&(G=ua+1),C<=ua&&(oe=ua-1)}}function hm(k,C,G){var oe=k[C];k[C]=k[G],k[G]=oe}function jx(k,C){return kC?1:0}function Cg(k,C){var G=k.length;if(G<=1)return[k];for(var oe=[],be,Ie,Ne=0;Ne1)for(var It=0;It>3}if(oe--,G===1||G===2)be+=k.readSVarint(),Ie+=k.readSVarint(),G===1&&(ft&&Ne.push(ft),ft=[]),ft.push(new i(be,Ie));else if(G===7)ft&&ft.push(ft[0].clone());else throw new Error("unknown command "+G)}return ft&&Ne.push(ft),Ne},Fv.prototype.bbox=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,G=1,oe=0,be=0,Ie=0,Ne=1/0,ft=-1/0,It=1/0,Ht=-1/0;k.pos>3}if(oe--,G===1||G===2)be+=k.readSVarint(),Ie+=k.readSVarint(),beft&&(ft=be),IeHt&&(Ht=Ie);else if(G!==7)throw new Error("unknown command "+G)}return[Ne,It,ft,Ht]},Fv.prototype.toGeoJSON=function(k,C,G){var oe=this.extent*Math.pow(2,G),be=this.extent*k,Ie=this.extent*C,Ne=this.loadGeometry(),ft=Fv.types[this.type],It,Ht;function er(Vr){for(var ua=0;ua>3;C=oe===1?k.readString():oe===2?k.readFloat():oe===3?k.readDouble():oe===4?k.readVarint64():oe===5?k.readVarint():oe===6?k.readSVarint():oe===7?k.readBoolean():null}return C}G1.prototype.feature=function(k){if(k<0||k>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[k];var C=this._pbf.readVarint()+this._pbf.pos;return new V1(this._pbf,C,this.extent,this._keys,this._values)};var Jx=tA;function tA(k,C){this.layers=k.readFields(rA,{},C)}function rA(k,C,G){if(k===3){var oe=new Wd(G,G.readVarint()+G.pos);oe.length&&(C[oe.name]=oe)}}var $x=Jx,pm=V1,Qx=Wd,Xd={VectorTile:$x,VectorTileFeature:pm,VectorTileLayer:Qx},eb=Xd.VectorTileFeature.types,Pg=500,dm=Math.pow(2,13);function hv(k,C,G,oe,be,Ie,Ne,ft){k.emplaceBack(C,G,Math.floor(oe*dm)*2+Ne,be*dm*2,Ie*dm*2,Math.round(ft))}var cd=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(G){return G.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new di,this.indexArray=new Xi,this.programConfigurations=new Ga(C.layers,C.zoom),this.segments=new Io,this.stateDependentLayerIds=this.layers.filter(function(G){return G.isStateDependent()}).map(function(G){return G.id})};cd.prototype.populate=function(C,G,oe){this.features=[],this.hasPattern=Lg("fill-extrusion",this.layers,G);for(var be=0,Ie=C;be=1){var Ji=Mi[$i-1];if(!aA(Oi,Ji)){Vr.vertexLength+4>Io.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Oi.sub(Ji)._perp()._unit(),bn=Ji.dist(Oi);ii+bn>32768&&(ii=0),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,0,ii),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,1,ii),ii+=bn,hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,0,ii),hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,1,ii);var qn=Vr.vertexLength;this.indexArray.emplaceBack(qn,qn+2,qn+1),this.indexArray.emplaceBack(qn+1,qn+2,qn+3),Vr.vertexLength+=4,Vr.primitiveLength+=2}}}}if(Vr.vertexLength+Ht>Io.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray)),eb[C.type]==="Polygon"){for(var Nn=[],Eo=[],oo=Vr.vertexLength,mo=0,Is=It;moui)||k.y===C.y&&(k.y<0||k.y>ui)}function iA(k){return k.every(function(C){return C.x<0})||k.every(function(C){return C.x>ui})||k.every(function(C){return C.y<0})||k.every(function(C){return C.y>ui})}var vm=new ma({"fill-extrusion-opacity":new it(Gi["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fr(Gi["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new it(Gi["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),wh={paint:vm},pv=function(k){function C(G){k.call(this,G,wh)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.createBucket=function(oe){return new cd(oe)},C.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},C.prototype.is3D=function(){return!0},C.prototype.queryIntersectsFeature=function(oe,be,Ie,Ne,ft,It,Ht,er){var Lr=Vp(oe,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),It.angle,Ht),Zr=this.paint.get("fill-extrusion-height").evaluate(be,Ie),Vr=this.paint.get("fill-extrusion-base").evaluate(be,Ie),ua=nA(Lr,er,It,0),Oa=W1(Ne,Vr,Zr,er),Mi=Oa[0],ii=Oa[1];return tb(Mi,ii,ua)},C}(Ya);function Ov(k,C){return k.x*C.x+k.y*C.y}function H1(k,C){if(k.length===1){for(var G=0,oe=C[G++],be;!be||oe.equals(be);)if(be=C[G++],!be)return 1/0;for(;G=2&&C[Ht-1].equals(C[Ht-2]);)Ht--;for(var er=0;er0;if(Nn&&$i>er){var oo=Vr.dist(ua);if(oo>2*Lr){var mo=Vr.sub(Vr.sub(ua)._mult(Lr/oo)._round());this.updateDistance(ua,mo),this.addCurrentVertex(mo,Mi,0,0,Zr),ua=mo}}var Is=ua&&Oa,ko=Is?oe:It?"butt":be;if(Is&&ko==="round"&&(bnIe&&(ko="bevel"),ko==="bevel"&&(bn>2&&(ko="flipbevel"),bn100)Oi=ii.mult(-1);else{var Do=bn*Mi.add(ii).mag()/Mi.sub(ii).mag();Oi._perp()._mult(Do*(Eo?-1:1))}this.addCurrentVertex(Vr,Oi,0,0,Zr),this.addCurrentVertex(Vr,Oi.mult(-1),0,0,Zr)}else if(ko==="bevel"||ko==="fakeround"){var $s=-Math.sqrt(bn*bn-1),Ms=Eo?$s:0,Zl=Eo?0:$s;if(ua&&this.addCurrentVertex(Vr,Mi,Ms,Zl,Zr),ko==="fakeround")for(var zu=Math.round(qn*180/Math.PI/Z1),Yl=1;Yl2*Lr){var Zf=Vr.add(Oa.sub(Vr)._mult(Lr/gh)._round());this.updateDistance(Vr,Zf),this.addCurrentVertex(Zf,ii,0,0,Zr),Vr=Zf}}}}},Hf.prototype.addCurrentVertex=function(C,G,oe,be,Ie,Ne){Ne===void 0&&(Ne=!1);var ft=G.x+G.y*oe,It=G.y-G.x*oe,Ht=-G.x+G.y*be,er=-G.y-G.x*be;this.addHalfVertex(C,ft,It,Ne,!1,oe,Ie),this.addHalfVertex(C,Ht,er,Ne,!0,-be,Ie),this.distance>O0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,G,oe,be,Ie,Ne))},Hf.prototype.addHalfVertex=function(C,G,oe,be,Ie,Ne,ft){var It=C.x,Ht=C.y,er=this.lineClips?this.scaledDistance*(O0-1):this.scaledDistance,Lr=er*Rg;if(this.layoutVertexArray.emplaceBack((It<<1)+(be?1:0),(Ht<<1)+(Ie?1:0),Math.round(Ig*G)+128,Math.round(Ig*oe)+128,(Ne===0?0:Ne<0?-1:1)+1|(Lr&63)<<2,Lr>>6),this.lineClips){var Zr=this.scaledDistance-this.lineClips.start,Vr=this.lineClips.end-this.lineClips.start,ua=Zr/Vr;this.layoutVertexArray2.emplaceBack(ua,this.lineClipsArray.length)}var Oa=ft.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Oa),ft.primitiveLength++),Ie?this.e2=Oa:this.e1=Oa},Hf.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Hf.prototype.updateDistance=function(C,G){this.distance+=C.dist(G),this.updateScaledDistance()},me("LineBucket",Hf,{omit:["layers","patternFeatures"]});var Y1=new ma({"line-cap":new it(Gi.layout_line["line-cap"]),"line-join":new Xt(Gi.layout_line["line-join"]),"line-miter-limit":new it(Gi.layout_line["line-miter-limit"]),"line-round-limit":new it(Gi.layout_line["line-round-limit"]),"line-sort-key":new Xt(Gi.layout_line["line-sort-key"])}),K1=new ma({"line-opacity":new Xt(Gi.paint_line["line-opacity"]),"line-color":new Xt(Gi.paint_line["line-color"]),"line-translate":new it(Gi.paint_line["line-translate"]),"line-translate-anchor":new it(Gi.paint_line["line-translate-anchor"]),"line-width":new Xt(Gi.paint_line["line-width"]),"line-gap-width":new Xt(Gi.paint_line["line-gap-width"]),"line-offset":new Xt(Gi.paint_line["line-offset"]),"line-blur":new Xt(Gi.paint_line["line-blur"]),"line-dasharray":new oa(Gi.paint_line["line-dasharray"]),"line-pattern":new fr(Gi.paint_line["line-pattern"]),"line-gradient":new Ta(Gi.paint_line["line-gradient"])}),Dg={paint:K1,layout:Y1},sA=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.possiblyEvaluate=function(oe,be){return be=new mn(Math.floor(be.zoom),{now:be.now,fadeDuration:be.fadeDuration,zoomHistory:be.zoomHistory,transition:be.transition}),k.prototype.possiblyEvaluate.call(this,oe,be)},C.prototype.evaluate=function(oe,be,Ie,Ne){return be=p({},be,{zoom:Math.floor(be.zoom)}),k.prototype.evaluate.call(this,oe,be,Ie,Ne)},C}(Xt),H=new sA(Dg.paint.properties["line-width"].specification);H.useIntegerZoom=!0;var R=function(k){function C(G){k.call(this,G,Dg),this.gradientVersion=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._handleSpecialPaintPropertyUpdate=function(oe){if(oe==="line-gradient"){var be=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=be._styleExpression.expression instanceof Tu,this.gradientVersion=(this.gradientVersion+1)%f}},C.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},C.prototype.recalculate=function(oe,be){k.prototype.recalculate.call(this,oe,be),this.paint._values["line-floorwidth"]=H.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,oe)},C.prototype.createBucket=function(oe){return new Hf(oe)},C.prototype.queryRadius=function(oe){var be=oe,Ie=J(Rh("line-width",this,be),Rh("line-gap-width",this,be)),Ne=Rh("line-offset",this,be);return Ie/2+Math.abs(Ne)+Cp(this.paint.get("line-translate"))},C.prototype.queryIntersectsFeature=function(oe,be,Ie,Ne,ft,It,Ht){var er=Vp(oe,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),It.angle,Ht),Lr=Ht/2*J(this.paint.get("line-width").evaluate(be,Ie),this.paint.get("line-gap-width").evaluate(be,Ie)),Zr=this.paint.get("line-offset").evaluate(be,Ie);return Zr&&(Ne=ve(Ne,Zr*Ht)),mu(er,Ne,Lr)},C.prototype.isTileClipped=function(){return!0},C}(Ya);function J(k,C){return C>0?C+2*k:k}function ve(k,C){for(var G=[],oe=new i(0,0),be=0;be":"\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 qi(k){for(var C="",G=0;G>1,er=-7,Lr=G?be-1:0,Zr=G?-1:1,Vr=k[C+Lr];for(Lr+=Zr,Ie=Vr&(1<<-er)-1,Vr>>=-er,er+=ft;er>0;Ie=Ie*256+k[C+Lr],Lr+=Zr,er-=8);for(Ne=Ie&(1<<-er)-1,Ie>>=-er,er+=oe;er>0;Ne=Ne*256+k[C+Lr],Lr+=Zr,er-=8);if(Ie===0)Ie=1-Ht;else{if(Ie===It)return Ne?NaN:(Vr?-1:1)*(1/0);Ne=Ne+Math.pow(2,oe),Ie=Ie-Ht}return(Vr?-1:1)*Ne*Math.pow(2,Ie-oe)},Lo=function(k,C,G,oe,be,Ie){var Ne,ft,It,Ht=Ie*8-be-1,er=(1<>1,Zr=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,Vr=oe?0:Ie-1,ua=oe?1:-1,Oa=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(ft=isNaN(C)?1:0,Ne=er):(Ne=Math.floor(Math.log(C)/Math.LN2),C*(It=Math.pow(2,-Ne))<1&&(Ne--,It*=2),Ne+Lr>=1?C+=Zr/It:C+=Zr*Math.pow(2,1-Lr),C*It>=2&&(Ne++,It/=2),Ne+Lr>=er?(ft=0,Ne=er):Ne+Lr>=1?(ft=(C*It-1)*Math.pow(2,be),Ne=Ne+Lr):(ft=C*Math.pow(2,Lr-1)*Math.pow(2,be),Ne=0));be>=8;k[G+Vr]=ft&255,Vr+=ua,ft/=256,be-=8);for(Ne=Ne<0;k[G+Vr]=Ne&255,Vr+=ua,Ne/=256,Ht-=8);k[G+Vr-ua]|=Oa*128},xs={read:jn,write:Lo},vo=zn;function zn(k){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(k)?k:new Uint8Array(k||0),this.pos=0,this.type=0,this.length=this.buf.length}zn.Varint=0,zn.Fixed64=1,zn.Bytes=2,zn.Fixed32=5;var is=65536*65536,qo=1/is,Bo=12,xn=typeof TextDecoder>"u"?null:new TextDecoder("utf8");zn.prototype={destroy:function(){this.buf=null},readFields:function(k,C,G){for(G=G||this.length;this.pos>3,Ie=this.pos;this.type=oe&7,k(be,C,this),this.pos===Ie&&this.skip(oe)}return C},readMessage:function(k,C){return this.readFields(k,C,this.readVarint()+this.pos)},readFixed32:function(){var k=dh(this.buf,this.pos);return this.pos+=4,k},readSFixed32:function(){var k=Rp(this.buf,this.pos);return this.pos+=4,k},readFixed64:function(){var k=dh(this.buf,this.pos)+dh(this.buf,this.pos+4)*is;return this.pos+=8,k},readSFixed64:function(){var k=dh(this.buf,this.pos)+Rp(this.buf,this.pos+4)*is;return this.pos+=8,k},readFloat:function(){var k=xs.read(this.buf,this.pos,!0,23,4);return this.pos+=4,k},readDouble:function(){var k=xs.read(this.buf,this.pos,!0,52,8);return this.pos+=8,k},readVarint:function(k){var C=this.buf,G,oe;return oe=C[this.pos++],G=oe&127,oe<128||(oe=C[this.pos++],G|=(oe&127)<<7,oe<128)||(oe=C[this.pos++],G|=(oe&127)<<14,oe<128)||(oe=C[this.pos++],G|=(oe&127)<<21,oe<128)?G:(oe=C[this.pos],G|=(oe&15)<<28,cs(G,k,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var k=this.readVarint();return k%2===1?(k+1)/-2:k/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var k=this.readVarint()+this.pos,C=this.pos;return this.pos=k,k-C>=Bo&&xn?pu(this.buf,C,k):vp(this.buf,C,k)},readBytes:function(){var k=this.readVarint()+this.pos,C=this.buf.subarray(this.pos,k);return this.pos=k,C},readPackedVarint:function(k,C){if(this.type!==zn.Bytes)return k.push(this.readVarint(C));var G=No(this);for(k=k||[];this.pos127;);else if(C===zn.Bytes)this.pos=this.readVarint()+this.pos;else if(C===zn.Fixed32)this.pos+=4;else if(C===zn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+C)},writeTag:function(k,C){this.writeVarint(k<<3|C)},realloc:function(k){for(var C=this.length||16;C268435455||k<0){Ku(k,this);return}this.realloc(4),this.buf[this.pos++]=k&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=k>>>7&127)))},writeSVarint:function(k){this.writeVarint(k<0?-k*2-1:k*2)},writeBoolean:function(k){this.writeVarint(!!k)},writeString:function(k){k=String(k),this.realloc(k.length*4),this.pos++;var C=this.pos;this.pos=fc(this.buf,k,this.pos);var G=this.pos-C;G>=128&&Hp(C,G,this),this.pos=C-1,this.writeVarint(G),this.pos+=G},writeFloat:function(k){this.realloc(4),xs.write(this.buf,k,this.pos,!0,23,4),this.pos+=4},writeDouble:function(k){this.realloc(8),xs.write(this.buf,k,this.pos,!0,52,8),this.pos+=8},writeBytes:function(k){var C=k.length;this.writeVarint(C),this.realloc(C);for(var G=0;G=128&&Hp(G,oe,this),this.pos=G-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(k,C,G){this.writeTag(k,zn.Bytes),this.writeRawMessage(C,G)},writePackedVarint:function(k,C){C.length&&this.writeMessage(k,Th,C)},writePackedSVarint:function(k,C){C.length&&this.writeMessage(k,rh,C)},writePackedBoolean:function(k,C){C.length&&this.writeMessage(k,ep,C)},writePackedFloat:function(k,C){C.length&&this.writeMessage(k,$h,C)},writePackedDouble:function(k,C){C.length&&this.writeMessage(k,Qh,C)},writePackedFixed32:function(k,C){C.length&&this.writeMessage(k,ff,C)},writePackedSFixed32:function(k,C){C.length&&this.writeMessage(k,ah,C)},writePackedFixed64:function(k,C){C.length&&this.writeMessage(k,Fh,C)},writePackedSFixed64:function(k,C){C.length&&this.writeMessage(k,Ah,C)},writeBytesField:function(k,C){this.writeTag(k,zn.Bytes),this.writeBytes(C)},writeFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFixed32(C)},writeSFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeSFixed32(C)},writeFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeFixed64(C)},writeSFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeSFixed64(C)},writeVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeVarint(C)},writeSVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeSVarint(C)},writeStringField:function(k,C){this.writeTag(k,zn.Bytes),this.writeString(C)},writeFloatField:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFloat(C)},writeDoubleField:function(k,C){this.writeTag(k,zn.Fixed64),this.writeDouble(C)},writeBooleanField:function(k,C){this.writeVarintField(k,!!C)}};function cs(k,C,G){var oe=G.buf,be,Ie;if(Ie=oe[G.pos++],be=(Ie&112)>>4,Ie<128||(Ie=oe[G.pos++],be|=(Ie&127)<<3,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<10,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<17,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<24,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&1)<<31,Ie<128))return Rs(k,be,C);throw new Error("Expected varint not more than 10 bytes")}function No(k){return k.type===zn.Bytes?k.readVarint()+k.pos:k.pos+1}function Rs(k,C,G){return G?C*4294967296+(k>>>0):(C>>>0)*4294967296+(k>>>0)}function Ku(k,C){var G,oe;if(k>=0?(G=k%4294967296|0,oe=k/4294967296|0):(G=~(-k%4294967296),oe=~(-k/4294967296),G^4294967295?G=G+1|0:(G=0,oe=oe+1|0)),k>=18446744073709552e3||k<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");C.realloc(10),Uu(G,oe,C),th(oe,C)}function Uu(k,C,G){G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos]=k&127}function th(k,C){var G=(k&7)<<4;C.buf[C.pos++]|=G|((k>>>=3)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127)))))}function Hp(k,C,G){var oe=C<=16383?1:C<=2097151?2:C<=268435455?3:Math.floor(Math.log(C)/(Math.LN2*7));G.realloc(oe);for(var be=G.pos-1;be>=k;be--)G.buf[be+oe]=G.buf[be]}function Th(k,C){for(var G=0;G>>8,k[G+2]=C>>>16,k[G+3]=C>>>24}function Rp(k,C){return(k[C]|k[C+1]<<8|k[C+2]<<16)+(k[C+3]<<24)}function vp(k,C,G){for(var oe="",be=C;be239?4:Ie>223?3:Ie>191?2:1;if(be+ft>G)break;var It,Ht,er;ft===1?Ie<128&&(Ne=Ie):ft===2?(It=k[be+1],(It&192)===128&&(Ne=(Ie&31)<<6|It&63,Ne<=127&&(Ne=null))):ft===3?(It=k[be+1],Ht=k[be+2],(It&192)===128&&(Ht&192)===128&&(Ne=(Ie&15)<<12|(It&63)<<6|Ht&63,(Ne<=2047||Ne>=55296&&Ne<=57343)&&(Ne=null))):ft===4&&(It=k[be+1],Ht=k[be+2],er=k[be+3],(It&192)===128&&(Ht&192)===128&&(er&192)===128&&(Ne=(Ie&15)<<18|(It&63)<<12|(Ht&63)<<6|er&63,(Ne<=65535||Ne>=1114112)&&(Ne=null))),Ne===null?(Ne=65533,ft=1):Ne>65535&&(Ne-=65536,oe+=String.fromCharCode(Ne>>>10&1023|55296),Ne=56320|Ne&1023),oe+=String.fromCharCode(Ne),be+=ft}return oe}function pu(k,C,G){return xn.decode(k.subarray(C,G))}function fc(k,C,G){for(var oe=0,be,Ie;oe55295&&be<57344)if(Ie)if(be<56320){k[G++]=239,k[G++]=191,k[G++]=189,Ie=be;continue}else be=Ie-55296<<10|be-56320|65536,Ie=null;else{be>56319||oe+1===C.length?(k[G++]=239,k[G++]=191,k[G++]=189):Ie=be;continue}else Ie&&(k[G++]=239,k[G++]=191,k[G++]=189,Ie=null);be<128?k[G++]=be:(be<2048?k[G++]=be>>6|192:(be<65536?k[G++]=be>>12|224:(k[G++]=be>>18|240,k[G++]=be>>12&63|128),k[G++]=be>>6&63|128),k[G++]=be&63|128)}return G}var Ju=3;function Dp(k,C,G){k===1&&G.readMessage(Qc,C)}function Qc(k,C,G){if(k===3){var oe=G.readMessage(mm,{}),be=oe.id,Ie=oe.bitmap,Ne=oe.width,ft=oe.height,It=oe.left,Ht=oe.top,er=oe.advance;C.push({id:be,bitmap:new Ip({width:Ne+2*Ju,height:ft+2*Ju},Ie),metrics:{width:Ne,height:ft,left:It,top:Ht,advance:er}})}}function mm(k,C,G){k===1?C.id=G.readVarint():k===2?C.bitmap=G.readBytes():k===3?C.width=G.readVarint():k===4?C.height=G.readVarint():k===5?C.left=G.readSVarint():k===6?C.top=G.readSVarint():k===7&&(C.advance=G.readVarint())}function _d(k){return new vo(k).readFields(Dp,[])}var fd=Ju;function Wp(k){for(var C=0,G=0,oe=0,be=k;oe=0;Vr--){var ua=ft[Vr];if(!(Zr.w>ua.w||Zr.h>ua.h)){if(Zr.x=ua.x,Zr.y=ua.y,Ht=Math.max(Ht,Zr.y+Zr.h),It=Math.max(It,Zr.x+Zr.w),Zr.w===ua.w&&Zr.h===ua.h){var Oa=ft.pop();Vr=0&&be>=C&&bd[this.text.charCodeAt(be)];be--)oe--;this.text=this.text.substring(C,oe),this.sectionIndex=this.sectionIndex.slice(C,oe)},vh.prototype.substring=function(C,G){var oe=new vh;return oe.text=this.text.substring(C,G),oe.sectionIndex=this.sectionIndex.slice(C,G),oe.sections=this.sections,oe},vh.prototype.toString=function(){return this.text},vh.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(G,oe){return Math.max(G,C.sections[oe].scale)},0)},vh.prototype.addTextSection=function(C,G){this.text+=C.text,this.sections.push(Bv.forText(C.scale,C.fontStack||G));for(var oe=this.sections.length-1,be=0;be=xd?null:++this.imageSectionID:(this.imageSectionID=zg,this.imageSectionID)};function lA(k,C){for(var G=[],oe=k.text,be=0,Ie=0,Ne=C;Ie=0,er=0,Lr=0;Lr0&&Zf>Eo&&(Eo=Zf)}else{var Kl=G[mo.fontStack],Ol=Kl&&Kl[ko];if(Ol&&Ol.rect)Ms=Ol.rect,$s=Ol.metrics;else{var $u=C[mo.fontStack],hc=$u&&$u[ko];if(!hc)continue;$s=hc.metrics}Do=(ln-mo.scale)*en}Yl?(k.verticalizable=!0,Nn.push({glyph:ko,imageName:Zl,x:Zr,y:Vr+Do,vertical:Yl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Is,metrics:$s,rect:Ms}),Zr+=zu*mo.scale+Ht):(Nn.push({glyph:ko,imageName:Zl,x:Zr,y:Vr+Do,vertical:Yl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Is,metrics:$s,rect:Ms}),Zr+=$s.advance*mo.scale+Ht)}if(Nn.length!==0){var rp=Zr-Ht;ua=Math.max(rp,ua),hA(Nn,0,Nn.length-1,Mi,Eo)}Zr=0;var ap=Ie*ln+Eo;qn.lineOffset=Math.max(Eo,bn),Vr+=ap,Oa=Math.max(ap,Oa),++ii}var yh=Vr-gm,yp=$1(Ne),_p=yp.horizontalAlign,ih=yp.verticalAlign;Oh(k.positionedLines,Mi,_p,ih,ua,Oa,Ie,yh,be.length),k.top+=-ih*yh,k.bottom=k.top+yh,k.left+=-_p*ua,k.right=k.left+ua}function hA(k,C,G,oe,be){if(!(!oe&&!be))for(var Ie=k[G],Ne=Ie.metrics.advance*Ie.scale,ft=(k[G].x+Ne)*oe,It=C;It<=G;It++)k[It].x-=ft,k[It].y+=be}function Oh(k,C,G,oe,be,Ie,Ne,ft,It){var Ht=(C-G)*be,er=0;Ie!==Ne?er=-ft*oe-gm:er=(-oe*It+.5)*Ne;for(var Lr=0,Zr=k;Lr-G/2;){if(Ne--,Ne<0)return!1;ft-=k[Ne].dist(Ie),Ie=k[Ne]}ft+=k[Ne].dist(k[Ne+1]),Ne++;for(var It=[],Ht=0;ftoe;)Ht-=It.shift().angleDelta;if(Ht>be)return!1;Ne++,ft+=Lr.dist(Zr)}return!0}function xk(k){for(var C=0,G=0;GHt){var ua=(Ht-It)/Vr,Oa=Ml(Lr.x,Zr.x,ua),Mi=Ml(Lr.y,Zr.y,ua),ii=new tp(Oa,Mi,Zr.angleTo(Lr),er);return ii._round(),!Ne||_k(k,ii,ft,Ne,C)?ii:void 0}It+=Vr}}function bW(k,C,G,oe,be,Ie,Ne,ft,It){var Ht=bk(oe,Ie,Ne),er=wk(oe,be),Lr=er*Ne,Zr=k[0].x===0||k[0].x===It||k[0].y===0||k[0].y===It;C-Lr=0&&Ji=0&&ln=0&&Zr+Ht<=er){var bn=new tp(Ji,ln,$i,ua);bn._round(),(!oe||_k(k,bn,Ie,oe,be))&&Vr.push(bn)}}Lr+=ii}return!ft&&!Vr.length&&!Ne&&(Vr=Tk(k,Lr/2,G,oe,be,Ie,Ne,!0,It)),Vr}function Ak(k,C,G,oe,be){for(var Ie=[],Ne=0;Ne=oe&&Lr.x>=oe)&&(er.x>=oe?er=new i(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round():Lr.x>=oe&&(Lr=new i(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round()),!(er.y>=be&&Lr.y>=be)&&(er.y>=be?er=new i(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round():Lr.y>=be&&(Lr=new i(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round()),(!It||!er.equals(It[It.length-1]))&&(It=[er],Ie.push(It)),It.push(Lr)))))}return Ie}var Bg=zc;function Sk(k,C,G,oe){var be=[],Ie=k.image,Ne=Ie.pixelRatio,ft=Ie.paddedRect.w-2*Bg,It=Ie.paddedRect.h-2*Bg,Ht=k.right-k.left,er=k.bottom-k.top,Lr=Ie.stretchX||[[0,ft]],Zr=Ie.stretchY||[[0,It]],Vr=function(Kl,Ol){return Kl+Ol[1]-Ol[0]},ua=Lr.reduce(Vr,0),Oa=Zr.reduce(Vr,0),Mi=ft-ua,ii=It-Oa,$i=0,Oi=ua,Ji=0,ln=Oa,bn=0,qn=Mi,Nn=0,Eo=ii;if(Ie.content&&oe){var oo=Ie.content;$i=ub(Lr,0,oo[0]),Ji=ub(Zr,0,oo[1]),Oi=ub(Lr,oo[0],oo[2]),ln=ub(Zr,oo[1],oo[3]),bn=oo[0]-$i,Nn=oo[1]-Ji,qn=oo[2]-oo[0]-Oi,Eo=oo[3]-oo[1]-ln}var mo=function(Kl,Ol,$u,hc){var hf=cb(Kl.stretch-$i,Oi,Ht,k.left),_f=fb(Kl.fixed-bn,qn,Kl.stretch,ua),gh=cb(Ol.stretch-Ji,ln,er,k.top),Zf=fb(Ol.fixed-Nn,Eo,Ol.stretch,Oa),rp=cb($u.stretch-$i,Oi,Ht,k.left),ap=fb($u.fixed-bn,qn,$u.stretch,ua),yh=cb(hc.stretch-Ji,ln,er,k.top),yp=fb(hc.fixed-Nn,Eo,hc.stretch,Oa),_p=new i(hf,gh),ih=new i(rp,gh),xp=new i(rp,yh),nd=new i(hf,yh),jv=new i(_f/Ne,Zf/Ne),xm=new i(ap/Ne,yp/Ne),bm=C*Math.PI/180;if(bm){var wm=Math.sin(bm),Wg=Math.cos(bm),wd=[Wg,-wm,wm,Wg];_p._matMult(wd),ih._matMult(wd),nd._matMult(wd),xp._matMult(wd)}var gb=Kl.stretch+Kl.fixed,xA=$u.stretch+$u.fixed,yb=Ol.stretch+Ol.fixed,bA=hc.stretch+hc.fixed,hd={x:Ie.paddedRect.x+Bg+gb,y:Ie.paddedRect.y+Bg+yb,w:xA-gb,h:bA-yb},Xg=qn/Ne/Ht,_b=Eo/Ne/er;return{tl:_p,tr:ih,bl:nd,br:xp,tex:hd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:jv,pixelOffsetBR:xm,minFontScaleX:Xg,minFontScaleY:_b,isSDF:G}};if(!oe||!Ie.stretchX&&!Ie.stretchY)be.push(mo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ft+1},{fixed:0,stretch:It+1}));else for(var Is=Mk(Lr,Mi,ua),ko=Mk(Zr,ii,Oa),Do=0;Do0&&(ua=Math.max(10,ua),this.circleDiameter=ua)}else{var Oa=Ne.top*ft-It,Mi=Ne.bottom*ft+It,ii=Ne.left*ft-It,$i=Ne.right*ft+It,Oi=Ne.collisionPadding;if(Oi&&(ii-=Oi[0]*ft,Oa-=Oi[1]*ft,$i+=Oi[2]*ft,Mi+=Oi[3]*ft),er){var Ji=new i(ii,Oa),ln=new i($i,Oa),bn=new i(ii,Mi),qn=new i($i,Mi),Nn=er*Math.PI/180;Ji._rotate(Nn),ln._rotate(Nn),bn._rotate(Nn),qn._rotate(Nn),ii=Math.min(Ji.x,ln.x,bn.x,qn.x),$i=Math.max(Ji.x,ln.x,bn.x,qn.x),Oa=Math.min(Ji.y,ln.y,bn.y,qn.y),Mi=Math.max(Ji.y,ln.y,bn.y,qn.y)}C.emplaceBack(G.x,G.y,ii,Oa,$i,Mi,oe,be,Ie)}this.boxEndIndex=C.length},Ng=function(C,G){if(C===void 0&&(C=[]),G===void 0&&(G=TW),this.data=C,this.length=this.data.length,this.compare=G,this.length>0)for(var oe=(this.length>>1)-1;oe>=0;oe--)this._down(oe)};Ng.prototype.push=function(C){this.data.push(C),this.length++,this._up(this.length-1)},Ng.prototype.pop=function(){if(this.length!==0){var C=this.data[0],G=this.data.pop();return this.length--,this.length>0&&(this.data[0]=G,this._down(0)),C}},Ng.prototype.peek=function(){return this.data[0]},Ng.prototype._up=function(C){for(var G=this,oe=G.data,be=G.compare,Ie=oe[C];C>0;){var Ne=C-1>>1,ft=oe[Ne];if(be(Ie,ft)>=0)break;oe[C]=ft,C=Ne}oe[C]=Ie},Ng.prototype._down=function(C){for(var G=this,oe=G.data,be=G.compare,Ie=this.length>>1,Ne=oe[C];C=0)break;oe[C]=It,C=ft}oe[C]=Ne};function TW(k,C){return kC?1:0}function AW(k,C,G){C===void 0&&(C=1),G===void 0&&(G=!1);for(var oe=1/0,be=1/0,Ie=-1/0,Ne=-1/0,ft=k[0],It=0;ItIe)&&(Ie=Ht.x),(!It||Ht.y>Ne)&&(Ne=Ht.y)}var er=Ie-oe,Lr=Ne-be,Zr=Math.min(er,Lr),Vr=Zr/2,ua=new Ng([],SW);if(Zr===0)return new i(oe,be);for(var Oa=oe;Oaii.d||!ii.d)&&(ii=Oi,G&&console.log("found best %d after %d probes",Math.round(1e4*Oi.d)/1e4,$i)),!(Oi.max-ii.d<=C)&&(Vr=Oi.h/2,ua.push(new Ug(Oi.p.x-Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x-Vr,Oi.p.y+Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y+Vr,Vr,k)),$i+=4)}return G&&(console.log("num probes: "+$i),console.log("best distance: "+ii.d)),ii.p}function SW(k,C){return C.max-k.max}function Ug(k,C,G,oe){this.p=new i(k,C),this.h=G,this.d=MW(this.p,oe),this.max=this.d+this.h*Math.SQRT2}function MW(k,C){for(var G=!1,oe=1/0,be=0;bek.y!=er.y>k.y&&k.x<(er.x-Ht.x)*(k.y-Ht.y)/(er.y-Ht.y)+Ht.x&&(G=!G),oe=Math.min(oe,qd(k,Ht,er))}return(G?1:-1)*Math.sqrt(oe)}function EW(k){for(var C=0,G=0,oe=0,be=k[0],Ie=0,Ne=be.length,ft=Ne-1;Ie=ui||wd.y<0||wd.y>=ui||LW(k,wd,Wg,G,oe,be,ko,k.layers[0],k.collisionBoxArray,C.index,C.sourceLayerIndex,k.index,ii,ln,Nn,It,Oi,bn,Eo,Vr,C,Ie,Ht,er,Ne)};if(oo==="line")for(var $s=0,Ms=Ak(C.geometry,0,0,ui,ui);$s1){var gh=xW(_f,qn,G.vertical||ua,oe,Oa,$i);gh&&Do(_f,gh)}}else if(C.type==="Polygon")for(var Zf=0,rp=Cg(C.geometry,0);Zfym&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')):Mi.kind==="composite"&&(ii=[Bh*Vr.compositeTextSizes[0].evaluate(Ne,{},ua),Bh*Vr.compositeTextSizes[1].evaluate(Ne,{},ua)],(ii[0]>ym||ii[1]>ym)&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')),k.addSymbols(k.text,Oa,ii,ft,Ie,Ne,Ht,C,It.lineStartIndex,It.lineLength,Zr,ua);for(var $i=0,Oi=er;$iym&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')):_p.kind==="composite"&&(ih=[Bh*ln.compositeIconSizes[0].evaluate(Ji,{},qn),Bh*ln.compositeIconSizes[1].evaluate(Ji,{},qn)],(ih[0]>ym||ih[1]>ym)&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')),k.addSymbols(k.icon,yh,ih,Oi,$i,Ji,!1,C,oo.lineStartIndex,oo.lineLength,-1,qn),Yl=k.icon.placedSymbolArray.length-1,yp&&(Ms=yp.length*4,k.addSymbols(k.icon,yp,ih,Oi,$i,Ji,mp.vertical,C,oo.lineStartIndex,oo.lineLength,-1,qn),Kl=k.icon.placedSymbolArray.length-1)}for(var xp in oe.horizontal){var nd=oe.horizontal[xp];if(!mo){$u=ye(nd.text);var jv=ft.layout.get("text-rotate").evaluate(Ji,{},qn);mo=new hb(It,C,Ht,er,Lr,nd,Zr,Vr,ua,jv)}var xm=nd.positionedLines.length===1;if(Zl+=kk(k,C,nd,Ie,ft,ua,Ji,Oa,oo,oe.vertical?mp.horizontal:mp.horizontalOnly,xm?Object.keys(oe.horizontal):[xp],Ol,Yl,ln,qn),xm)break}oe.vertical&&(zu+=kk(k,C,oe.vertical,Ie,ft,ua,Ji,Oa,oo,mp.vertical,["vertical"],Ol,Kl,ln,qn));var bm=mo?mo.boxStartIndex:k.collisionBoxArray.length,wm=mo?mo.boxEndIndex:k.collisionBoxArray.length,Wg=ko?ko.boxStartIndex:k.collisionBoxArray.length,wd=ko?ko.boxEndIndex:k.collisionBoxArray.length,gb=Is?Is.boxStartIndex:k.collisionBoxArray.length,xA=Is?Is.boxEndIndex:k.collisionBoxArray.length,yb=Do?Do.boxStartIndex:k.collisionBoxArray.length,bA=Do?Do.boxEndIndex:k.collisionBoxArray.length,hd=-1,Xg=function(r_,Hk){return r_&&r_.circleDiameter?Math.max(r_.circleDiameter,Hk):Hk};hd=Xg(mo,hd),hd=Xg(ko,hd),hd=Xg(Is,hd),hd=Xg(Do,hd);var _b=hd>-1?1:0;_b&&(hd*=Nn/en),k.glyphOffsetArray.length>=Du.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ji.sortKey!==void 0&&k.addToSortKeyRanges(k.symbolInstances.length,Ji.sortKey),k.symbolInstances.emplaceBack(C.x,C.y,Ol.right>=0?Ol.right:-1,Ol.center>=0?Ol.center:-1,Ol.left>=0?Ol.left:-1,Ol.vertical||-1,Yl,Kl,$u,bm,wm,Wg,wd,gb,xA,yb,bA,Ht,Zl,zu,$s,Ms,_b,0,Zr,hc,hf,hd)}function PW(k,C,G,oe){var be=k.compareText;if(!(C in be))be[C]=[];else for(var Ie=be[C],Ne=Ie.length-1;Ne>=0;Ne--)if(oe.dist(Ie[Ne])0)&&(Ne.value.kind!=="constant"||Ne.value.value.length>0),er=It.value.kind!=="constant"||!!It.value.value||Object.keys(It.parameters).length>0,Lr=Ie.get("symbol-sort-key");if(this.features=[],!(!Ht&&!er)){for(var Zr=G.iconDependencies,Vr=G.glyphDependencies,ua=G.availableImages,Oa=new mn(this.zoom),Mi=0,ii=C;Mi=0;for(var zu=0,Yl=Eo.sections;zu=0;It--)Ne[It]={x:G[It].x,y:G[It].y,tileUnitDistanceFromAnchor:Ie},It>0&&(Ie+=G[It-1].dist(G[It]));for(var Ht=0;Ht0},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(C,G){for(var oe=C.placedSymbolArray.get(G),be=oe.vertexStartIndex+oe.numGlyphs*4,Ie=oe.vertexStartIndex;Ie1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(C),this.sortedAngle=C,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var oe=0,be=this.symbolInstanceIndexes;oe=0&&Ht.indexOf(ft)===It&&G.addIndicesForPlacedSymbol(G.text,ft)}),Ne.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ne.verticalPlacedTextSymbolIndex),Ne.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.placedIconSymbolIndex),Ne.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},me("SymbolBucket",Du,{omit:["layers","collisionBoxArray","features","compareText"]}),Du.MAX_GLYPHS=65535,Du.addDynamicAttributes=vA;function zW(k,C){return C.replace(/{([^{}]+)}/g,function(G,oe){return oe in k?String(k[oe]):""})}var FW=new ma({"symbol-placement":new it(Gi.layout_symbol["symbol-placement"]),"symbol-spacing":new it(Gi.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new it(Gi.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Xt(Gi.layout_symbol["symbol-sort-key"]),"symbol-z-order":new it(Gi.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new it(Gi.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new it(Gi.layout_symbol["icon-ignore-placement"]),"icon-optional":new it(Gi.layout_symbol["icon-optional"]),"icon-rotation-alignment":new it(Gi.layout_symbol["icon-rotation-alignment"]),"icon-size":new Xt(Gi.layout_symbol["icon-size"]),"icon-text-fit":new it(Gi.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new it(Gi.layout_symbol["icon-text-fit-padding"]),"icon-image":new Xt(Gi.layout_symbol["icon-image"]),"icon-rotate":new Xt(Gi.layout_symbol["icon-rotate"]),"icon-padding":new it(Gi.layout_symbol["icon-padding"]),"icon-keep-upright":new it(Gi.layout_symbol["icon-keep-upright"]),"icon-offset":new Xt(Gi.layout_symbol["icon-offset"]),"icon-anchor":new Xt(Gi.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new it(Gi.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new it(Gi.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new it(Gi.layout_symbol["text-rotation-alignment"]),"text-field":new Xt(Gi.layout_symbol["text-field"]),"text-font":new Xt(Gi.layout_symbol["text-font"]),"text-size":new Xt(Gi.layout_symbol["text-size"]),"text-max-width":new Xt(Gi.layout_symbol["text-max-width"]),"text-line-height":new it(Gi.layout_symbol["text-line-height"]),"text-letter-spacing":new Xt(Gi.layout_symbol["text-letter-spacing"]),"text-justify":new Xt(Gi.layout_symbol["text-justify"]),"text-radial-offset":new Xt(Gi.layout_symbol["text-radial-offset"]),"text-variable-anchor":new it(Gi.layout_symbol["text-variable-anchor"]),"text-anchor":new Xt(Gi.layout_symbol["text-anchor"]),"text-max-angle":new it(Gi.layout_symbol["text-max-angle"]),"text-writing-mode":new it(Gi.layout_symbol["text-writing-mode"]),"text-rotate":new Xt(Gi.layout_symbol["text-rotate"]),"text-padding":new it(Gi.layout_symbol["text-padding"]),"text-keep-upright":new it(Gi.layout_symbol["text-keep-upright"]),"text-transform":new Xt(Gi.layout_symbol["text-transform"]),"text-offset":new Xt(Gi.layout_symbol["text-offset"]),"text-allow-overlap":new it(Gi.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new it(Gi.layout_symbol["text-ignore-placement"]),"text-optional":new it(Gi.layout_symbol["text-optional"])}),OW=new ma({"icon-opacity":new Xt(Gi.paint_symbol["icon-opacity"]),"icon-color":new Xt(Gi.paint_symbol["icon-color"]),"icon-halo-color":new Xt(Gi.paint_symbol["icon-halo-color"]),"icon-halo-width":new Xt(Gi.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Xt(Gi.paint_symbol["icon-halo-blur"]),"icon-translate":new it(Gi.paint_symbol["icon-translate"]),"icon-translate-anchor":new it(Gi.paint_symbol["icon-translate-anchor"]),"text-opacity":new Xt(Gi.paint_symbol["text-opacity"]),"text-color":new Xt(Gi.paint_symbol["text-color"],{runtimeType:Ws,getOverride:function(k){return k.textColor},hasOverride:function(k){return!!k.textColor}}),"text-halo-color":new Xt(Gi.paint_symbol["text-halo-color"]),"text-halo-width":new Xt(Gi.paint_symbol["text-halo-width"]),"text-halo-blur":new Xt(Gi.paint_symbol["text-halo-blur"]),"text-translate":new it(Gi.paint_symbol["text-translate"]),"text-translate-anchor":new it(Gi.paint_symbol["text-translate-anchor"])}),mA={paint:OW,layout:FW},Vg=function(C){this.type=C.property.overrides?C.property.overrides.runtimeType:il,this.defaultValue=C};Vg.prototype.evaluate=function(C){if(C.formattedSection){var G=this.defaultValue.property.overrides;if(G&&G.hasOverride(C.formattedSection))return G.getOverride(C.formattedSection)}return C.feature&&C.featureState?this.defaultValue.evaluate(C.feature,C.featureState):this.defaultValue.property.specification.default},Vg.prototype.eachChild=function(C){if(!this.defaultValue.isConstant()){var G=this.defaultValue.value;C(G._styleExpression.expression)}},Vg.prototype.outputDefined=function(){return!1},Vg.prototype.serialize=function(){return null},me("FormatSectionOverride",Vg,{omit:["defaultValue"]});var BW=function(k){function C(G){k.call(this,G,mA)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.recalculate=function(oe,be){if(k.prototype.recalculate.call(this,oe,be),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 Ne=[],ft=0,It=Ie;ft",targetMapId:be,sourceMapId:Ne.mapId})}}},Gg.prototype.receive=function(C){var G=C.data,oe=G.id;if(oe&&!(G.targetMapId&&this.mapId!==G.targetMapId))if(G.type===""){delete this.tasks[oe];var be=this.cancelCallbacks[oe];delete this.cancelCallbacks[oe],be&&be()}else ce()||G.mustQueue?(this.tasks[oe]=G,this.taskQueue.push(oe),this.invoker.trigger()):this.processTask(oe,G)},Gg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),G=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),G&&this.processTask(C,G)}},Gg.prototype.processTask=function(C,G){var oe=this;if(G.type===""){var be=this.callbacks[C];delete this.callbacks[C],be&&(G.error?be(Tt(G.error)):be(null,Tt(G.data)))}else{var Ie=!1,Ne=X(this.globalScope)?void 0:[],ft=G.hasCallback?function(Zr,Vr){Ie=!0,delete oe.cancelCallbacks[C],oe.target.postMessage({id:C,type:"",sourceMapId:oe.mapId,error:Zr?yt(Zr):null,data:yt(Vr,Ne)},Ne)}:function(Zr){Ie=!0},It=null,Ht=Tt(G.data);if(this.parent[G.type])It=this.parent[G.type](G.sourceMapId,Ht,ft);else if(this.parent.getWorkerSource){var er=G.type.split("."),Lr=this.parent.getWorkerSource(G.sourceMapId,er[0],Ht.source);It=Lr[er[1]](Ht,ft)}else ft(new Error("Could not find function "+G.type));!Ie&&It&&It.cancel&&(this.cancelCallbacks[C]=It.cancel)}},Gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function YW(k,C,G){C=Math.pow(2,G)-C-1;var oe=Dk(k*256,C*256,G),be=Dk((k+1)*256,(C+1)*256,G);return oe[0]+","+oe[1]+","+be[0]+","+be[1]}function Dk(k,C,G){var oe=2*Math.PI*6378137/256/Math.pow(2,G),be=k*oe-2*Math.PI*6378137/2,Ie=C*oe-2*Math.PI*6378137/2;return[be,Ie]}var Wf=function(C,G){C&&(G?this.setSouthWest(C).setNorthEast(G):C.length===4?this.setSouthWest([C[0],C[1]]).setNorthEast([C[2],C[3]]):this.setSouthWest(C[0]).setNorthEast(C[1]))};Wf.prototype.setNorthEast=function(C){return this._ne=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.setSouthWest=function(C){return this._sw=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.extend=function(C){var G=this._sw,oe=this._ne,be,Ie;if(C instanceof Fc)be=C,Ie=C;else if(C instanceof Wf){if(be=C._sw,Ie=C._ne,!be||!Ie)return this}else{if(Array.isArray(C))if(C.length===4||C.every(Array.isArray)){var Ne=C;return this.extend(Wf.convert(Ne))}else{var ft=C;return this.extend(Fc.convert(ft))}return this}return!G&&!oe?(this._sw=new Fc(be.lng,be.lat),this._ne=new Fc(Ie.lng,Ie.lat)):(G.lng=Math.min(be.lng,G.lng),G.lat=Math.min(be.lat,G.lat),oe.lng=Math.max(Ie.lng,oe.lng),oe.lat=Math.max(Ie.lat,oe.lat)),this},Wf.prototype.getCenter=function(){return new Fc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Wf.prototype.getSouthWest=function(){return this._sw},Wf.prototype.getNorthEast=function(){return this._ne},Wf.prototype.getNorthWest=function(){return new Fc(this.getWest(),this.getNorth())},Wf.prototype.getSouthEast=function(){return new Fc(this.getEast(),this.getSouth())},Wf.prototype.getWest=function(){return this._sw.lng},Wf.prototype.getSouth=function(){return this._sw.lat},Wf.prototype.getEast=function(){return this._ne.lng},Wf.prototype.getNorth=function(){return this._ne.lat},Wf.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Wf.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Wf.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Wf.prototype.contains=function(C){var G=Fc.convert(C),oe=G.lng,be=G.lat,Ie=this._sw.lat<=be&&be<=this._ne.lat,Ne=this._sw.lng<=oe&&oe<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ne=this._sw.lng>=oe&&oe>=this._ne.lng),Ie&&Ne},Wf.convert=function(C){return!C||C instanceof Wf?C:new Wf(C)};var zk=63710088e-1,Fc=function(C,G){if(isNaN(C)||isNaN(G))throw new Error("Invalid LngLat object: ("+C+", "+G+")");if(this.lng=+C,this.lat=+G,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Fc.prototype.wrap=function(){return new Fc(x(this.lng,-180,180),this.lat)},Fc.prototype.toArray=function(){return[this.lng,this.lat]},Fc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Fc.prototype.distanceTo=function(C){var G=Math.PI/180,oe=this.lat*G,be=C.lat*G,Ie=Math.sin(oe)*Math.sin(be)+Math.cos(oe)*Math.cos(be)*Math.cos((C.lng-this.lng)*G),Ne=zk*Math.acos(Math.min(Ie,1));return Ne},Fc.prototype.toBounds=function(C){C===void 0&&(C=0);var G=40075017,oe=360*C/G,be=oe/Math.cos(Math.PI/180*this.lat);return new Wf(new Fc(this.lng-be,this.lat-oe),new Fc(this.lng+be,this.lat+oe))},Fc.convert=function(C){if(C instanceof Fc)return C;if(Array.isArray(C)&&(C.length===2||C.length===3))return new Fc(Number(C[0]),Number(C[1]));if(!Array.isArray(C)&&typeof C=="object"&&C!==null)return new Fc(Number("lng"in C?C.lng:C.lon),Number(C.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Fk=2*Math.PI*zk;function Ok(k){return Fk*Math.cos(k*Math.PI/180)}function Bk(k){return(180+k)/360}function Nk(k){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+k*Math.PI/360)))/360}function Uk(k,C){return k/Ok(C)}function KW(k){return k*360-180}function yA(k){var C=180-k*360;return 360/Math.PI*Math.atan(Math.exp(C*Math.PI/180))-90}function JW(k,C){return k*Ok(yA(C))}function $W(k){return 1/Math.cos(k*Math.PI/180)}var U0=function(C,G,oe){oe===void 0&&(oe=0),this.x=+C,this.y=+G,this.z=+oe};U0.fromLngLat=function(C,G){G===void 0&&(G=0);var oe=Fc.convert(C);return new U0(Bk(oe.lng),Nk(oe.lat),Uk(G,oe.lat))},U0.prototype.toLngLat=function(){return new Fc(KW(this.x),yA(this.y))},U0.prototype.toAltitude=function(){return JW(this.z,this.y)},U0.prototype.meterInMercatorCoordinateUnits=function(){return 1/Fk*$W(yA(this.y))};var j0=function(C,G,oe){this.z=C,this.x=G,this.y=oe,this.key=t_(0,C,C,G,oe)};j0.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},j0.prototype.url=function(C,G){var oe=YW(this.x,this.y,this.z),be=QW(this.z,this.x,this.y);return C[(this.x+this.y)%C.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(G==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",be).replace("{bbox-epsg-3857}",oe)},j0.prototype.getTilePoint=function(C){var G=Math.pow(2,this.z);return new i((C.x*G-this.x)*ui,(C.y*G-this.y)*ui)},j0.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jk=function(C,G){this.wrap=C,this.canonical=G,this.key=t_(C,G.z,G.z,G.x,G.y)},Xf=function(C,G,oe,be,Ie){this.overscaledZ=C,this.wrap=G,this.canonical=new j0(oe,+be,+Ie),this.key=t_(G,C,oe,be,Ie)};Xf.prototype.equals=function(C){return this.overscaledZ===C.overscaledZ&&this.wrap===C.wrap&&this.canonical.equals(C.canonical)},Xf.prototype.scaledTo=function(C){var G=this.canonical.z-C;return C>this.canonical.z?new Xf(C,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Xf(C,this.wrap,C,this.canonical.x>>G,this.canonical.y>>G)},Xf.prototype.calculateScaledKey=function(C,G){var oe=this.canonical.z-C;return C>this.canonical.z?t_(this.wrap*+G,C,this.canonical.z,this.canonical.x,this.canonical.y):t_(this.wrap*+G,C,C,this.canonical.x>>oe,this.canonical.y>>oe)},Xf.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var G=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ>G&&C.canonical.y===this.canonical.y>>G},Xf.prototype.children=function(C){if(this.overscaledZ>=C)return[new Xf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var G=this.canonical.z+1,oe=this.canonical.x*2,be=this.canonical.y*2;return[new Xf(G,this.wrap,G,oe,be),new Xf(G,this.wrap,G,oe+1,be),new Xf(G,this.wrap,G,oe,be+1),new Xf(G,this.wrap,G,oe+1,be+1)]},Xf.prototype.isLessThan=function(C){return this.wrapC.wrap?!1:this.overscaledZC.overscaledZ?!1:this.canonical.xC.canonical.x?!1:this.canonical.y0;Ie--)be=1<=this.dim+1||G<-1||G>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(G+1)*this.stride+(C+1)},Nv.prototype._unpackMapbox=function(C,G,oe){return(C*256*256+G*256+oe)/10-1e4},Nv.prototype._unpackTerrarium=function(C,G,oe){return C*256+G+oe/256-32768},Nv.prototype.getPixels=function(){return new eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Nv.prototype.backfillBorder=function(C,G,oe){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var be=G*this.dim,Ie=G*this.dim+this.dim,Ne=oe*this.dim,ft=oe*this.dim+this.dim;switch(G){case-1:be=Ie-1;break;case 1:Ie=be+1;break}switch(oe){case-1:Ne=ft-1;break;case 1:ft=Ne+1;break}for(var It=-G*this.dim,Ht=-oe*this.dim,er=Ne;er=0&&Lr[3]>=0&&It.insert(ft,Lr[0],Lr[1],Lr[2],Lr[3])}},Uv.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Xd.VectorTile(new vo(this.rawTileData)).layers,this.sourceLayerCoder=new vb(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Uv.prototype.query=function(C,G,oe,be){var Ie=this;this.loadVTLayers();for(var Ne=C.params||{},ft=ui/C.tileSize/C.scale,It=$e(Ne.filter),Ht=C.queryGeometry,er=C.queryPadding*ft,Lr=Vk(Ht),Zr=this.grid.query(Lr.minX-er,Lr.minY-er,Lr.maxX+er,Lr.maxY+er),Vr=Vk(C.cameraQueryGeometry),ua=this.grid3D.query(Vr.minX-er,Vr.minY-er,Vr.maxX+er,Vr.maxY+er,function(bn,qn,Nn,Eo){return td(C.cameraQueryGeometry,bn-er,qn-er,Nn+er,Eo+er)}),Oa=0,Mi=ua;Oabe)Ie=!1;else if(!G)Ie=!0;else if(this.expirationTime=Rr.maxzoom)&&Rr.visibility!=="none"){h(wr,this.zoom,Jt);var Nr=$a[Rr.id]=Rr.createBucket({index:Ba.bucketLayerIDs.length,layers:wr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:rn,sourceID:this.source});Nr.populate(tn,Za,this.tileID.canonical),Ba.bucketLayerIDs.push(wr.map(function(la){return la.id}))}}}}var Hr,gt,Kt,mr,Ir=e.mapObject(Za.glyphDependencies,function(la){return Object.keys(la).map(Number)});Object.keys(Ir).length?Fr.send("getGlyphs",{uid:this.uid,stacks:Ir},function(la,ba){Hr||(Hr=la,gt=ba,ga.call(ra))}):gt={};var va=Object.keys(Za.iconDependencies);va.length?Fr.send("getImages",{icons:va,source:this.source,tileID:this.tileID,type:"icons"},function(la,ba){Hr||(Hr=la,Kt=ba,ga.call(ra))}):Kt={};var Pa=Object.keys(Za.patternDependencies);Pa.length?Fr.send("getImages",{icons:Pa,source:this.source,tileID:this.tileID,type:"patterns"},function(la,ba){Hr||(Hr=la,mr=ba,ga.call(ra))}):mr={},ga.call(this);function ga(){if(Hr)return ta(Hr);if(gt&&Kt&&mr){var la=new n(gt),ba=new e.ImageAtlas(Kt,mr);for(var Ai in $a){var ki=$a[Ai];ki instanceof e.SymbolBucket?(h(ki.layers,this.zoom,Jt),e.performSymbolLayout(ki,gt,la.positions,Kt,ba.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):ki.hasPattern&&(ki instanceof e.LineBucket||ki instanceof e.FillBucket||ki instanceof e.FillExtrusionBucket)&&(h(ki.layers,this.zoom,Jt),ki.addFeatures(Za,this.tileID.canonical,ba.patternPositions))}this.status="done",ta(null,{buckets:e.values($a).filter(function(Ki){return!Ki.isEmpty()}),featureIndex:Ba,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:la.image,imageAtlas:ba,glyphMap:this.returnDependencies?gt:null,iconMap:this.returnDependencies?Kt:null,glyphPositions:this.returnDependencies?la.positions:null})}}};function h(Yt,Rt,Zt){for(var Jt=new e.EvaluationParameters(Rt),Fr=0,ta=Yt;Fr=0!=!!Rt&&Yt.reverse()}var E=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,p=function(Rt){this._feature=Rt,this.extent=e.EXTENT,this.type=Rt.type,this.properties=Rt.tags,"id"in Rt&&!isNaN(Rt.id)&&(this.id=parseInt(Rt.id,10))};p.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Rt=[],Zt=0,Jt=this._feature.geometry;Zt"u"&&(Jt.push(ca),Ba=Jt.length-1,ta[ca]=Ba),Rt.writeVarint(Ba);var $a=Zt.properties[ca],Za=typeof $a;Za!=="string"&&Za!=="boolean"&&Za!=="number"&&($a=JSON.stringify($a));var ri=Za+":"+$a,pi=ra[ri];typeof pi>"u"&&(Fr.push($a),pi=Fr.length-1,ra[ri]=pi),Rt.writeVarint(pi)}}function $(Yt,Rt){return(Rt<<3)+(Yt&7)}function ue(Yt){return Yt<<1^Yt>>31}function ce(Yt,Rt){for(var Zt=Yt.loadGeometry(),Jt=Yt.type,Fr=0,ta=0,ra=Zt.length,ca=0;ca>1;X(Yt,Rt,ra,Jt,Fr,ta%2),Y(Yt,Rt,Zt,Jt,ra-1,ta+1),Y(Yt,Rt,Zt,ra+1,Fr,ta+1)}}function X(Yt,Rt,Zt,Jt,Fr,ta){for(;Fr>Jt;){if(Fr-Jt>600){var ra=Fr-Jt+1,ca=Zt-Jt+1,Ba=Math.log(ra),$a=.5*Math.exp(2*Ba/3),Za=.5*Math.sqrt(Ba*$a*(ra-$a)/ra)*(ca-ra/2<0?-1:1),ri=Math.max(Jt,Math.floor(Zt-ca*$a/ra+Za)),pi=Math.min(Fr,Math.floor(Zt+(ra-ca)*$a/ra+Za));X(Yt,Rt,Zt,ri,pi,ta)}var Ia=Rt[2*Zt+ta],rn=Jt,tn=Fr;for(Q(Yt,Rt,Jt,Zt),Rt[2*Fr+ta]>Ia&&Q(Yt,Rt,Jt,Fr);rnIa;)tn--}Rt[2*Jt+ta]===Ia?Q(Yt,Rt,Jt,tn):(tn++,Q(Yt,Rt,tn,Fr)),tn<=Zt&&(Jt=tn+1),Zt<=tn&&(Fr=tn-1)}}function Q(Yt,Rt,Zt,Jt){V(Yt,Zt,Jt),V(Rt,2*Zt,2*Jt),V(Rt,2*Zt+1,2*Jt+1)}function V(Yt,Rt,Zt){var Jt=Yt[Rt];Yt[Rt]=Yt[Zt],Yt[Zt]=Jt}function le(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=[0,Yt.length-1,0],Ba=[],$a,Za;ca.length;){var ri=ca.pop(),pi=ca.pop(),Ia=ca.pop();if(pi-Ia<=ra){for(var rn=Ia;rn<=pi;rn++)$a=Rt[2*rn],Za=Rt[2*rn+1],$a>=Zt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Yt[rn]);continue}var tn=Math.floor((Ia+pi)/2);$a=Rt[2*tn],Za=Rt[2*tn+1],$a>=Zt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Yt[tn]);var cn=(ri+1)%2;(ri===0?Zt<=$a:Jt<=Za)&&(ca.push(Ia),ca.push(tn-1),ca.push(cn)),(ri===0?Fr>=$a:ta>=Za)&&(ca.push(tn+1),ca.push(pi),ca.push(cn))}return Ba}function ae(Yt,Rt,Zt,Jt,Fr,ta){for(var ra=[0,Yt.length-1,0],ca=[],Ba=Fr*Fr;ra.length;){var $a=ra.pop(),Za=ra.pop(),ri=ra.pop();if(Za-ri<=ta){for(var pi=ri;pi<=Za;pi++)j(Rt[2*pi],Rt[2*pi+1],Zt,Jt)<=Ba&&ca.push(Yt[pi]);continue}var Ia=Math.floor((ri+Za)/2),rn=Rt[2*Ia],tn=Rt[2*Ia+1];j(rn,tn,Zt,Jt)<=Ba&&ca.push(Yt[Ia]);var cn=($a+1)%2;($a===0?Zt-Fr<=rn:Jt-Fr<=tn)&&(ra.push(ri),ra.push(Ia-1),ra.push(cn)),($a===0?Zt+Fr>=rn:Jt+Fr>=tn)&&(ra.push(Ia+1),ra.push(Za),ra.push(cn))}return ca}function j(Yt,Rt,Zt,Jt){var Fr=Yt-Zt,ta=Rt-Jt;return Fr*Fr+ta*ta}var ee=function(Yt){return Yt[0]},te=function(Yt){return Yt[1]},pe=function(Rt,Zt,Jt,Fr,ta){Zt===void 0&&(Zt=ee),Jt===void 0&&(Jt=te),Fr===void 0&&(Fr=64),ta===void 0&&(ta=Float64Array),this.nodeSize=Fr,this.points=Rt;for(var ra=Rt.length<65536?Uint16Array:Uint32Array,ca=this.ids=new ra(Rt.length),Ba=this.coords=new ta(Rt.length*2),$a=0;$a=Fr;Za--){var ri=+Date.now();Ba=this._cluster(Ba,Za),this.trees[Za]=new pe(Ba,ne,Ce,ra,Float32Array),Jt&&console.log("z%d: %d clusters in %dms",Za,Ba.length,+Date.now()-ri)}return Jt&&console.timeEnd("total time"),this},Se.prototype.getClusters=function(Rt,Zt){var Jt=((Rt[0]+180)%360+360)%360-180,Fr=Math.max(-90,Math.min(90,Rt[1])),ta=Rt[2]===180?180:((Rt[2]+180)%360+360)%360-180,ra=Math.max(-90,Math.min(90,Rt[3]));if(Rt[2]-Rt[0]>=360)Jt=-180,ta=180;else if(Jt>ta){var ca=this.getClusters([Jt,Fr,180,ra],Zt),Ba=this.getClusters([-180,Fr,ta,ra],Zt);return ca.concat(Ba)}for(var $a=this.trees[this._limitZoom(Zt)],Za=$a.range(nt(Jt),tt(ra),nt(ta),tt(Fr)),ri=[],pi=0,Ia=Za;piZt&&(tn+=Or.numPoints||1)}if(tn>=Ba){for(var Cr=ri.x*rn,wr=ri.y*rn,Rr=ca&&rn>1?this._map(ri,!0):null,Nr=(Za<<5)+(Zt+1)+this.points.length,Hr=0,gt=Ia;Hr1)for(var va=0,Pa=Ia;va>5},Se.prototype._getOriginZoom=function(Rt){return(Rt-this.points.length)%32},Se.prototype._map=function(Rt,Zt){if(Rt.numPoints)return Zt?se({},Rt.properties):Rt.properties;var Jt=this.points[Rt.index].properties,Fr=this.options.map(Jt);return Zt&&Fr===Jt?se({},Fr):Fr};function Re(Yt,Rt,Zt,Jt,Fr){return{x:Yt,y:Rt,zoom:1/0,id:Zt,parentId:-1,numPoints:Jt,properties:Fr}}function Pe(Yt,Rt){var Zt=Yt.geometry.coordinates,Jt=Zt[0],Fr=Zt[1];return{x:nt(Jt),y:tt(Fr),zoom:1/0,index:Rt,parentId:-1}}function je(Yt){return{type:"Feature",id:Yt.id,properties:at(Yt),geometry:{type:"Point",coordinates:[Ve(Yt.x),he(Yt.y)]}}}function at(Yt){var Rt=Yt.numPoints,Zt=Rt>=1e4?Math.round(Rt/1e3)+"k":Rt>=1e3?Math.round(Rt/100)/10+"k":Rt;return se(se({},Yt.properties),{cluster:!0,cluster_id:Yt.id,point_count:Rt,point_count_abbreviated:Zt})}function nt(Yt){return Yt/360+.5}function tt(Yt){var Rt=Math.sin(Yt*Math.PI/180),Zt=.5-.25*Math.log((1+Rt)/(1-Rt))/Math.PI;return Zt<0?0:Zt>1?1:Zt}function Ve(Yt){return(Yt-.5)*360}function he(Yt){var Rt=(180-Yt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Rt))/Math.PI-90}function se(Yt,Rt){for(var Zt in Rt)Yt[Zt]=Rt[Zt];return Yt}function ne(Yt){return Yt.x}function Ce(Yt){return Yt.y}function Ze(Yt,Rt,Zt,Jt){for(var Fr=Jt,ta=Zt-Rt>>1,ra=Zt-Rt,ca,Ba=Yt[Rt],$a=Yt[Rt+1],Za=Yt[Zt],ri=Yt[Zt+1],pi=Rt+3;piFr)ca=pi,Fr=Ia;else if(Ia===Fr){var rn=Math.abs(pi-ta);rnJt&&(ca-Rt>3&&Ze(Yt,Rt,ca,Jt),Yt[ca+2]=Fr,Zt-ca>3&&Ze(Yt,ca,Zt,Jt))}function rt(Yt,Rt,Zt,Jt,Fr,ta){var ra=Fr-Zt,ca=ta-Jt;if(ra!==0||ca!==0){var Ba=((Yt-Zt)*ra+(Rt-Jt)*ca)/(ra*ra+ca*ca);Ba>1?(Zt=Fr,Jt=ta):Ba>0&&(Zt+=ra*Ba,Jt+=ca*Ba)}return ra=Yt-Zt,ca=Rt-Jt,ra*ra+ca*ca}function Je(Yt,Rt,Zt,Jt){var Fr={id:typeof Yt>"u"?null:Yt,type:Rt,geometry:Zt,tags:Jt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return St(Fr),Fr}function St(Yt){var Rt=Yt.geometry,Zt=Yt.type;if(Zt==="Point"||Zt==="MultiPoint"||Zt==="LineString")kt(Yt,Rt);else if(Zt==="Polygon"||Zt==="MultiLineString")for(var Jt=0;Jt0&&(Jt?ra+=(Fr*$a-Ba*ta)/2:ra+=Math.sqrt(Math.pow(Ba-Fr,2)+Math.pow($a-ta,2))),Fr=Ba,ta=$a}var Za=Rt.length-3;Rt[2]=1,Ze(Rt,0,Za,Zt),Rt[Za+2]=1,Rt.size=Math.abs(ra),Rt.start=0,Rt.end=Rt.size}function qr(Yt,Rt,Zt,Jt){for(var Fr=0;Fr1?1:Zt}function _t(Yt,Rt,Zt,Jt,Fr,ta,ra,ca){if(Zt/=Rt,Jt/=Rt,ta>=Zt&&ra=Jt)return null;for(var Ba=[],$a=0;$a=Zt&&rn=Jt)continue;var tn=[];if(pi==="Point"||pi==="MultiPoint")Fe(ri,tn,Zt,Jt,Fr);else if(pi==="LineString")Ye(ri,tn,Zt,Jt,Fr,!1,ca.lineMetrics);else if(pi==="MultiLineString")Le(ri,tn,Zt,Jt,Fr,!1);else if(pi==="Polygon")Le(ri,tn,Zt,Jt,Fr,!0);else if(pi==="MultiPolygon")for(var cn=0;cn=Zt&&ra<=Jt&&(Rt.push(Yt[ta]),Rt.push(Yt[ta+1]),Rt.push(Yt[ta+2]))}}function Ye(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=Ae(Yt),Ba=Fr===0?Ke:st,$a=Yt.start,Za,ri,pi=0;piZt&&(ri=Ba(ca,Ia,rn,cn,xt,Zt),ra&&(ca.start=$a+Za*ri)):ut>Jt?Or=Zt&&(ri=Ba(ca,Ia,rn,cn,xt,Zt),Cr=!0),Or>Jt&&ut<=Jt&&(ri=Ba(ca,Ia,rn,cn,xt,Jt),Cr=!0),!ta&&Cr&&(ra&&(ca.end=$a+Za*ri),Rt.push(ca),ca=Ae(Yt)),ra&&($a+=Za)}var wr=Yt.length-3;Ia=Yt[wr],rn=Yt[wr+1],tn=Yt[wr+2],ut=Fr===0?Ia:rn,ut>=Zt&&ut<=Jt&&We(ca,Ia,rn,tn),wr=ca.length-3,ta&&wr>=3&&(ca[wr]!==ca[0]||ca[wr+1]!==ca[1])&&We(ca,ca[0],ca[1],ca[2]),ca.length&&Rt.push(ca)}function Ae(Yt){var Rt=[];return Rt.size=Yt.size,Rt.start=Yt.start,Rt.end=Yt.end,Rt}function Le(Yt,Rt,Zt,Jt,Fr,ta){for(var ra=0;rara.maxX&&(ra.maxX=Za),ri>ra.maxY&&(ra.maxY=ri)}return ra}function or(Yt,Rt,Zt,Jt){var Fr=Rt.geometry,ta=Rt.type,ra=[];if(ta==="Point"||ta==="MultiPoint")for(var ca=0;ca0&&Rt.size<(Fr?ra:Jt)){Zt.numPoints+=Rt.length/3;return}for(var ca=[],Ba=0;Bara)&&(Zt.numSimplified++,ca.push(Rt[Ba]),ca.push(Rt[Ba+1])),Zt.numPoints++;Fr&&Pr(ca,ta),Yt.push(ca)}function Pr(Yt,Rt){for(var Zt=0,Jt=0,Fr=Yt.length,ta=Fr-2;Jt0===Rt)for(Jt=0,Fr=Yt.length;Jt24)throw new Error("maxZoom should be in the 0-24 range");if(Rt.promoteId&&Rt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Jt=Bt(Yt,Rt);this.tiles={},this.tileCoords=[],Zt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Rt.indexMaxZoom,Rt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Jt=ot(Jt,Rt),Jt.length&&this.splitTile(Jt,0,0,0),Zt&&(Jt.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)))}Fa.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Fa.prototype.splitTile=function(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=[Yt,Rt,Zt,Jt],Ba=this.options,$a=Ba.debug;ca.length;){Jt=ca.pop(),Zt=ca.pop(),Rt=ca.pop(),Yt=ca.pop();var Za=1<1&&console.time("creation"),pi=this.tiles[ri]=cr(Yt,Rt,Zt,Jt,Ba),this.tileCoords.push({z:Rt,x:Zt,y:Jt}),$a)){$a>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Rt,Zt,Jt,pi.numFeatures,pi.numPoints,pi.numSimplified),console.timeEnd("creation"));var Ia="z"+Rt;this.stats[Ia]=(this.stats[Ia]||0)+1,this.total++}if(pi.source=Yt,Fr){if(Rt===Ba.maxZoom||Rt===Fr)continue;var rn=1<1&&console.time("clipping");var tn=.5*Ba.buffer/Ba.extent,cn=.5-tn,xt=.5+tn,ut=1+tn,Or,Cr,wr,Rr,Nr,Hr;Or=Cr=wr=Rr=null,Nr=_t(Yt,Za,Zt-tn,Zt+xt,0,pi.minX,pi.maxX,Ba),Hr=_t(Yt,Za,Zt+cn,Zt+ut,0,pi.minX,pi.maxX,Ba),Yt=null,Nr&&(Or=_t(Nr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Cr=_t(Nr,Za,Jt+cn,Jt+ut,1,pi.minY,pi.maxY,Ba),Nr=null),Hr&&(wr=_t(Hr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Rr=_t(Hr,Za,Jt+cn,Jt+ut,1,pi.minY,pi.maxY,Ba),Hr=null),$a>1&&console.timeEnd("clipping"),ca.push(Or||[],Rt+1,Zt*2,Jt*2),ca.push(Cr||[],Rt+1,Zt*2,Jt*2+1),ca.push(wr||[],Rt+1,Zt*2+1,Jt*2),ca.push(Rr||[],Rt+1,Zt*2+1,Jt*2+1)}}},Fa.prototype.getTile=function(Yt,Rt,Zt){var Jt=this.options,Fr=Jt.extent,ta=Jt.debug;if(Yt<0||Yt>24)return null;var ra=1<1&&console.log("drilling down to z%d-%d-%d",Yt,Rt,Zt);for(var Ba=Yt,$a=Rt,Za=Zt,ri;!ri&&Ba>0;)Ba--,$a=Math.floor($a/2),Za=Math.floor(Za/2),ri=this.tiles[Ra(Ba,$a,Za)];return!ri||!ri.source?null:(ta>1&&console.log("found parent tile z%d-%d-%d",Ba,$a,Za),ta>1&&console.time("drilling down"),this.splitTile(ri.source,Ba,$a,Za,Yt,Rt,Zt),ta>1&&console.timeEnd("drilling down"),this.tiles[ca]?Pt(this.tiles[ca],Fr):null)};function Ra(Yt,Rt,Zt){return((1<=0?0:ge.button},r.remove=function(ge){ge.parentNode&&ge.parentNode.removeChild(ge)};function c(ge,K,xe){var re,ye,Ue,ke=e.browser.devicePixelRatio>1?"@2x":"",Qe=e.getJSON(K.transformRequest(K.normalizeSpriteURL(ge,ke,".json"),e.ResourceType.SpriteJSON),function(br,Br){Qe=null,Ue||(Ue=br,re=Br,qt())}),vt=e.getImage(K.transformRequest(K.normalizeSpriteURL(ge,ke,".png"),e.ResourceType.SpriteImage),function(br,Br){vt=null,Ue||(Ue=br,ye=Br,qt())});function qt(){if(Ue)xe(Ue);else if(re&&ye){var br=e.browser.getImageData(ye),Br={};for(var pr in re){var mt=re[pr],Mt=mt.width,Ft=mt.height,rr=mt.x,hr=mt.y,sr=mt.sdf,dr=mt.pixelRatio,lr=mt.stretchX,Wt=mt.stretchY,ir=mt.content,Gt=new e.RGBAImage({width:Mt,height:Ft});e.RGBAImage.copy(br,Gt,{x:rr,y:hr},{x:0,y:0},{width:Mt,height:Ft}),Br[pr]={data:Gt,pixelRatio:dr,sdf:sr,stretchX:lr,stretchY:Wt,content:ir}}xe(null,Br)}}return{cancel:function(){Qe&&(Qe.cancel(),Qe=null),vt&&(vt.cancel(),vt=null)}}}function T(ge){var K=ge.userImage;if(K&&K.render){var xe=K.render();if(xe)return ge.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var l=1,x=function(ge){function K(){ge.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 ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(re){if(this.loaded!==re&&(this.loaded=re,re)){for(var ye=0,Ue=this.requestors;ye=0?1.2:1))}b.prototype.draw=function(ge){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ge,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),xe=new Uint8ClampedArray(this.size*this.size),re=0;re65535){br(new Error("glyphs > 65535 not supported"));return}if(mt.ranges[Ft]){br(null,{stack:Br,id:pr,glyph:Mt});return}var rr=mt.requests[Ft];rr||(rr=mt.requests[Ft]=[],g.loadGlyphRange(Br,Ft,re.url,re.requestManager,function(hr,sr){if(sr){for(var dr in sr)re._doesCharSupportLocalGlyph(+dr)||(mt.glyphs[+dr]=sr[+dr]);mt.ranges[Ft]=!0}for(var lr=0,Wt=rr;lr1&&(qt=K[++vt]);var Br=Math.abs(br-qt.left),pr=Math.abs(br-qt.right),mt=Math.min(Br,pr),Mt=void 0,Ft=Ue/re*(ye+1);if(qt.isDash){var rr=ye-Math.abs(Ft);Mt=Math.sqrt(mt*mt+rr*rr)}else Mt=ye-Math.sqrt(mt*mt+Ft*Ft);this.data[Qe+br]=Math.max(0,Math.min(255,Mt+128))}},F.prototype.addRegularDash=function(K){for(var xe=K.length-1;xe>=0;--xe){var re=K[xe],ye=K[xe+1];re.zeroLength?K.splice(xe,1):ye&&ye.isDash===re.isDash&&(ye.left=re.left,K.splice(xe,1))}var Ue=K[0],ke=K[K.length-1];Ue.isDash===ke.isDash&&(Ue.left=ke.left-this.width,ke.right=Ue.right+this.width);for(var Qe=this.width*this.nextRow,vt=0,qt=K[vt],br=0;br1&&(qt=K[++vt]);var Br=Math.abs(br-qt.left),pr=Math.abs(br-qt.right),mt=Math.min(Br,pr),Mt=qt.isDash?mt:-mt;this.data[Qe+br]=Math.max(0,Math.min(255,Mt+128))}},F.prototype.addDash=function(K,xe){var re=xe?7:0,ye=2*re+1;if(this.nextRow+ye>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var Ue=0,ke=0;ke=re.minX&&K.x=re.minY&&K.y0&&(br[new e.OverscaledTileID(re.overscaledZ,Qe,ye.z,ke,ye.y-1).key]={backfilled:!1},br[new e.OverscaledTileID(re.overscaledZ,re.wrap,ye.z,ye.x,ye.y-1).key]={backfilled:!1},br[new e.OverscaledTileID(re.overscaledZ,qt,ye.z,vt,ye.y-1).key]={backfilled:!1}),ye.y+10&&(Ue.resourceTiming=re._resourceTiming,re._resourceTiming=[]),re.fire(new e.Event("data",Ue))})},K.prototype.onAdd=function(re){this.map=re,this.load()},K.prototype.setData=function(re){var ye=this;return this._data=re,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ue){if(Ue){ye.fire(new e.ErrorEvent(Ue));return}var ke={dataType:"source",sourceDataType:"content"};ye._collectResourceTiming&&ye._resourceTiming&&ye._resourceTiming.length>0&&(ke.resourceTiming=ye._resourceTiming,ye._resourceTiming=[]),ye.fire(new e.Event("data",ke))}),this},K.prototype.getClusterExpansionZoom=function(re,ye){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:re,source:this.id},ye),this},K.prototype.getClusterChildren=function(re,ye){return this.actor.send("geojson.getClusterChildren",{clusterId:re,source:this.id},ye),this},K.prototype.getClusterLeaves=function(re,ye,Ue,ke){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:re,limit:ye,offset:Ue},ke),this},K.prototype._updateWorkerData=function(re){var ye=this;this._loaded=!1;var Ue=e.extend({},this.workerOptions),ke=this._data;typeof ke=="string"?(Ue.request=this.map._requestManager.transformRequest(e.browser.resolveURL(ke),e.ResourceType.Source),Ue.request.collectResourceTiming=this._collectResourceTiming):Ue.data=JSON.stringify(ke),this.actor.send(this.type+".loadData",Ue,function(Qe,vt){ye._removed||vt&&vt.abandoned||(ye._loaded=!0,vt&&vt.resourceTiming&&vt.resourceTiming[ye.id]&&(ye._resourceTiming=vt.resourceTiming[ye.id].slice(0)),ye.actor.send(ye.type+".coalesce",{source:Ue.source},null),re(Qe))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(re,ye){var Ue=this,ke=re.actor?"reloadTile":"loadTile";re.actor=this.actor;var Qe={type:this.type,uid:re.uid,tileID:re.tileID,zoom:re.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};re.request=this.actor.send(ke,Qe,function(vt,qt){return delete re.request,re.unloadVectorData(),re.aborted?ye(null):vt?ye(vt):(re.loadVectorData(qt,Ue.map.painter,ke==="reloadTile"),ye(null))})},K.prototype.abortTile=function(re){re.request&&(re.request.cancel(),delete re.request),re.aborted=!0},K.prototype.unloadTile=function(re){re.unloadVectorData(),this.actor.send("removeTile",{uid:re.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(e.Evented),ue=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ce=function(ge){function K(xe,re,ye,Ue){ge.call(this),this.id=xe,this.dispatcher=ye,this.coordinates=re.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ue),this.options=re}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(re,ye){var Ue=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(ke,Qe){Ue._loaded=!0,ke?Ue.fire(new e.ErrorEvent(ke)):Qe&&(Ue.image=Qe,re&&(Ue.coordinates=re),ye&&ye(),Ue._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(re){var ye=this;return!this.image||!re.url?this:(this.options.url=re.url,this.load(re.coordinates,function(){ye.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(re){this.map=re,this.load()},K.prototype.setCoordinates=function(re){var ye=this;this.coordinates=re;var Ue=re.map(e.MercatorCoordinate.fromLngLat);this.tileID=de(Ue),this.minzoom=this.maxzoom=this.tileID.z;var ke=Ue.map(function(Qe){return ye.tileID.getTilePoint(Qe)._round()});return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(ke[0].x,ke[0].y,0,0),this._boundsArray.emplaceBack(ke[1].x,ke[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(ke[3].x,ke[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(ke[2].x,ke[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},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var re=this.map.painter.context,ye=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(re,this.image,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var Ue in this.tiles){var ke=this.tiles[Ue];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.loadTile=function(re,ye){this.tileID&&this.tileID.equals(re.tileID.canonical)?(this.tiles[String(re.tileID.wrap)]=re,re.buckets={},ye(null)):(re.state="errored",ye(null))},K.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return!1},K}(e.Evented);function de(ge){for(var K=1/0,xe=1/0,re=-1/0,ye=-1/0,Ue=0,ke=ge;Ueye.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ye.start(0)+" and "+ye.end(0)+"-second mark."))):this.video.currentTime=re}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(re){this.map||(this.map=re,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var re=this.map.painter.context,ye=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE),ye.texSubImage2D(ye.TEXTURE_2D,0,0,0,ye.RGBA,ye.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(re,this.video,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var Ue in this.tiles){var ke=this.tiles[Ue];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this.video&&!this.video.paused},K}(ce),X=function(ge){function K(xe,re,ye,Ue){ge.call(this,xe,re,ye,Ue),re.coordinates?(!Array.isArray(re.coordinates)||re.coordinates.length!==4||re.coordinates.some(function(ke){return!Array.isArray(ke)||ke.length!==2||ke.some(function(Qe){return typeof Qe!="number"})}))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'missing required property "coordinates"'))),re.animate&&typeof re.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'optional "animate" property must be a boolean value'))),re.canvas?typeof re.canvas!="string"&&!(re.canvas instanceof e.window.HTMLCanvasElement)&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,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."+xe,null,'missing required property "canvas"'))),this.options=re,this.animate=re.animate!==void 0?re.animate:!0}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.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()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(re){this.map=re,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var re=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,re=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,re=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ye=this.map.painter.context,Ue=ye.gl;this.boundsBuffer||(this.boundsBuffer=ye.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(re||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(ye,this.canvas,Ue.RGBA,{premultiply:!0});for(var ke in this.tiles){var Qe=this.tiles[ke];Qe.state!=="loaded"&&(Qe.state="loaded",Qe.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var re=0,ye=[this.canvas.width,this.canvas.height];rethis.max){var Qe=this._getAndRemoveByKey(this.order[0]);Qe&&this.onRemove(Qe)}return this},Pe.prototype.has=function(K){return K.wrapped().key in this.data},Pe.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},Pe.prototype._getAndRemoveByKey=function(K){var xe=this.data[K].shift();return xe.timeout&&clearTimeout(xe.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),xe.value},Pe.prototype.getByKey=function(K){var xe=this.data[K];return xe?xe[0].value:null},Pe.prototype.get=function(K){if(!this.has(K))return null;var xe=this.data[K.wrapped().key][0];return xe.value},Pe.prototype.remove=function(K,xe){if(!this.has(K))return this;var re=K.wrapped().key,ye=xe===void 0?0:this.data[re].indexOf(xe),Ue=this.data[re][ye];return this.data[re].splice(ye,1),Ue.timeout&&clearTimeout(Ue.timeout),this.data[re].length===0&&delete this.data[re],this.onRemove(Ue.value),this.order.splice(this.order.indexOf(re),1),this},Pe.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var xe=this._getAndRemoveByKey(this.order[0]);xe&&this.onRemove(xe)}return this},Pe.prototype.filter=function(K){var xe=[];for(var re in this.data)for(var ye=0,Ue=this.data[re];ye1||(Math.abs(Br)>1&&(Math.abs(Br+mt)===1?Br+=mt:Math.abs(Br-mt)===1&&(Br-=mt)),!(!br.dem||!qt.dem)&&(qt.dem.backfillBorder(br.dem,Br,pr),qt.neighboringTiles&&qt.neighboringTiles[Mt]&&(qt.neighboringTiles[Mt].backfilled=!0)))}},K.prototype.getTile=function(re){return this.getTileByID(re.key)},K.prototype.getTileByID=function(re){return this._tiles[re]},K.prototype._retainLoadedChildren=function(re,ye,Ue,ke){for(var Qe in this._tiles){var vt=this._tiles[Qe];if(!(ke[Qe]||!vt.hasData()||vt.tileID.overscaledZ<=ye||vt.tileID.overscaledZ>Ue)){for(var qt=vt.tileID;vt&&vt.tileID.overscaledZ>ye+1;){var br=vt.tileID.scaledTo(vt.tileID.overscaledZ-1);vt=this._tiles[br.key],vt&&vt.hasData()&&(qt=br)}for(var Br=qt;Br.overscaledZ>ye;)if(Br=Br.scaledTo(Br.overscaledZ-1),re[Br.key]){ke[qt.key]=qt;break}}}},K.prototype.findLoadedParent=function(re,ye){if(re.key in this._loadedParentTiles){var Ue=this._loadedParentTiles[re.key];return Ue&&Ue.tileID.overscaledZ>=ye?Ue:null}for(var ke=re.overscaledZ-1;ke>=ye;ke--){var Qe=re.scaledTo(ke),vt=this._getLoadedTile(Qe);if(vt)return vt}},K.prototype._getLoadedTile=function(re){var ye=this._tiles[re.key];if(ye&&ye.hasData())return ye;var Ue=this._cache.getByKey(re.wrapped().key);return Ue},K.prototype.updateCacheSize=function(re){var ye=Math.ceil(re.width/this._source.tileSize)+1,Ue=Math.ceil(re.height/this._source.tileSize)+1,ke=ye*Ue,Qe=5,vt=Math.floor(ke*Qe),qt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,vt):vt;this._cache.setMaxSize(qt)},K.prototype.handleWrapJump=function(re){var ye=this._prevLng===void 0?re:this._prevLng,Ue=re-ye,ke=Ue/360,Qe=Math.round(ke);if(this._prevLng=re,Qe){var vt={};for(var qt in this._tiles){var br=this._tiles[qt];br.tileID=br.tileID.unwrapTo(br.tileID.wrap+Qe),vt[br.tileID.key]=br}this._tiles=vt;for(var Br in this._timers)clearTimeout(this._timers[Br]),delete this._timers[Br];for(var pr in this._tiles){var mt=this._tiles[pr];this._setTileReloadTimer(pr,mt)}}},K.prototype.update=function(re){var ye=this;if(this.transform=re,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(re),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ue;this.used?this._source.tileID?Ue=re.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ya){return new e.OverscaledTileID(ya.canonical.z,ya.wrap,ya.canonical.z,ya.canonical.x,ya.canonical.y)}):(Ue=re.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ue=Ue.filter(function(ya){return ye._source.hasTile(ya)}))):Ue=[];var ke=re.coveringZoomLevel(this._source),Qe=Math.max(ke-K.maxOverzooming,this._source.minzoom),vt=Math.max(ke+K.maxUnderzooming,this._source.minzoom),qt=this._updateRetainedTiles(Ue,ke);if(Ba(this._source.type)){for(var br={},Br={},pr=Object.keys(qt),mt=0,Mt=pr;mtthis._source.maxzoom){var sr=rr.children(this._source.maxzoom)[0],dr=this.getTile(sr);if(dr&&dr.hasData()){Ue[sr.key]=sr;continue}}else{var lr=rr.children(this._source.maxzoom);if(Ue[lr[0].key]&&Ue[lr[1].key]&&Ue[lr[2].key]&&Ue[lr[3].key])continue}for(var Wt=hr.wasRequested(),ir=rr.overscaledZ-1;ir>=Qe;--ir){var Gt=rr.scaledTo(ir);if(ke[Gt.key]||(ke[Gt.key]=!0,hr=this.getTile(Gt),!hr&&Wt&&(hr=this._addTile(Gt)),hr&&(Ue[Gt.key]=Gt,Wt=hr.wasRequested(),hr.hasData())))break}}}return Ue},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var re in this._tiles){for(var ye=[],Ue=void 0,ke=this._tiles[re].tileID;ke.overscaledZ>0;){if(ke.key in this._loadedParentTiles){Ue=this._loadedParentTiles[ke.key];break}ye.push(ke.key);var Qe=ke.scaledTo(ke.overscaledZ-1);if(Ue=this._getLoadedTile(Qe),Ue)break;ke=Qe}for(var vt=0,qt=ye;vt0)&&(ye.hasData()&&ye.state!=="reloading"?this._cache.add(ye.tileID,ye,ye.getExpiryTimeout()):(ye.aborted=!0,this._abortTile(ye),this._unloadTile(ye))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var re in this._tiles)this._removeTile(re);this._cache.reset()},K.prototype.tilesIn=function(re,ye,Ue){var ke=this,Qe=[],vt=this.transform;if(!vt)return Qe;for(var qt=Ue?vt.getCameraQueryGeometry(re):re,br=re.map(function(ir){return vt.pointCoordinate(ir)}),Br=qt.map(function(ir){return vt.pointCoordinate(ir)}),pr=this.getIds(),mt=1/0,Mt=1/0,Ft=-1/0,rr=-1/0,hr=0,sr=Br;hr=0&&vi[1].y+ya>=0){var Ga=br.map(function(Zi){return Dr.getTilePoint(Zi)}),ai=Br.map(function(Zi){return Dr.getTilePoint(Zi)});Qe.push({tile:Gt,tileID:Dr,queryGeometry:Ga,cameraQueryGeometry:ai,scale:Jr})}}},Wt=0;Wt=e.browser.now())return!0}return!1},K.prototype.setFeatureState=function(re,ye,Ue){re=re||"_geojsonTileLayer",this._state.updateState(re,ye,Ue)},K.prototype.removeFeatureState=function(re,ye,Ue){re=re||"_geojsonTileLayer",this._state.removeFeatureState(re,ye,Ue)},K.prototype.getFeatureState=function(re,ye){return re=re||"_geojsonTileLayer",this._state.getState(re,ye)},K.prototype.setDependencies=function(re,ye,Ue){var ke=this._tiles[re];ke&&ke.setDependencies(ye,Ue)},K.prototype.reloadTilesForDependencies=function(re,ye){for(var Ue in this._tiles){var ke=this._tiles[Ue];ke.hasDependency(re,ye)&&this._reloadTile(Ue,"reloading")}this._cache.filter(function(Qe){return!Qe.hasDependency(re,ye)})},K}(e.Evented);ra.maxOverzooming=10,ra.maxUnderzooming=3;function ca(ge,K){var xe=Math.abs(ge.wrap*2)-+(ge.wrap<0),re=Math.abs(K.wrap*2)-+(K.wrap<0);return ge.overscaledZ-K.overscaledZ||re-xe||K.canonical.y-ge.canonical.y||K.canonical.x-ge.canonical.x}function Ba(ge){return ge==="raster"||ge==="image"||ge==="video"}function $a(){return new e.window.Worker(Io.workerUrl)}var Za="mapboxgl_preloaded_worker_pool",ri=function(){this.active={}};ri.prototype.acquire=function(K){if(!this.workers)for(this.workers=[];this.workers.length0?(ye-ke)/Qe:0;return this.points[Ue].mult(1-vt).add(this.points[xe].mult(vt))};var la=function(K,xe,re){var ye=this.boxCells=[],Ue=this.circleCells=[];this.xCellCount=Math.ceil(K/re),this.yCellCount=Math.ceil(xe/re);for(var ke=0;kethis.width||ye<0||xe>this.height)return Ue?!1:[];var Qe=[];if(K<=0&&xe<=0&&this.width<=re&&this.height<=ye){if(Ue)return!0;for(var vt=0;vt0:Qe}},la.prototype._queryCircle=function(K,xe,re,ye,Ue){var ke=K-re,Qe=K+re,vt=xe-re,qt=xe+re;if(Qe<0||ke>this.width||qt<0||vt>this.height)return ye?!1:[];var br=[],Br={hitTest:ye,circle:{x:K,y:xe,radius:re},seenUids:{box:{},circle:{}}};return this._forEachCell(ke,vt,Qe,qt,this._queryCellCircle,br,Br,Ue),ye?br.length>0:br},la.prototype.query=function(K,xe,re,ye,Ue){return this._query(K,xe,re,ye,!1,Ue)},la.prototype.hitTest=function(K,xe,re,ye,Ue){return this._query(K,xe,re,ye,!0,Ue)},la.prototype.hitTestCircle=function(K,xe,re,ye){return this._queryCircle(K,xe,re,!0,ye)},la.prototype._queryCell=function(K,xe,re,ye,Ue,ke,Qe,vt){var qt=Qe.seenUids,br=this.boxCells[Ue];if(br!==null)for(var Br=this.bboxes,pr=0,mt=br;pr=Br[Ft+0]&&ye>=Br[Ft+1]&&(!vt||vt(this.boxKeys[Mt]))){if(Qe.hitTest)return ke.push(!0),!0;ke.push({key:this.boxKeys[Mt],x1:Br[Ft],y1:Br[Ft+1],x2:Br[Ft+2],y2:Br[Ft+3]})}}}var rr=this.circleCells[Ue];if(rr!==null)for(var hr=this.circles,sr=0,dr=rr;srQe*Qe+vt*vt},la.prototype._circleAndRectCollide=function(K,xe,re,ye,Ue,ke,Qe){var vt=(ke-ye)/2,qt=Math.abs(K-(ye+vt));if(qt>vt+re)return!1;var br=(Qe-Ue)/2,Br=Math.abs(xe-(Ue+br));if(Br>br+re)return!1;if(qt<=vt||Br<=br)return!0;var pr=qt-vt,mt=Br-br;return pr*pr+mt*mt<=re*re};function ba(ge,K,xe,re,ye){var Ue=e.create();return K?(e.scale(Ue,Ue,[1/ye,1/ye,1]),xe||e.rotateZ(Ue,Ue,re.angle)):e.multiply(Ue,re.labelPlaneMatrix,ge),Ue}function Ai(ge,K,xe,re,ye){if(K){var Ue=e.clone(ge);return e.scale(Ue,Ue,[ye,ye,1]),xe||e.rotateZ(Ue,Ue,-re.angle),Ue}else return re.glCoordMatrix}function ki(ge,K){var xe=[ge.x,ge.y,0,1];wo(xe,xe,K);var re=xe[3];return{point:new e.Point(xe[0]/re,xe[1]/re),signedDistanceFromCamera:re}}function Ki(ge,K){return .5+.5*(ge/K)}function Mn(ge,K){var xe=ge[0]/ge[3],re=ge[1]/ge[3],ye=xe>=-K[0]&&xe<=K[0]&&re>=-K[1]&&re<=K[1];return ye}function wn(ge,K,xe,re,ye,Ue,ke,Qe){var vt=re?ge.textSizeData:ge.iconSizeData,qt=e.evaluateSizeForZoom(vt,xe.transform.zoom),br=[256/xe.width*2+1,256/xe.height*2+1],Br=re?ge.text.dynamicLayoutVertexArray:ge.icon.dynamicLayoutVertexArray;Br.clear();for(var pr=ge.lineVertexArray,mt=re?ge.text.placedSymbolArray:ge.icon.placedSymbolArray,Mt=xe.transform.width/xe.transform.height,Ft=!1,rr=0;rrUe)return{useVertical:!0}}return(ge===e.WritingMode.vertical?K.yxe.x)?{needsFlipping:!0}:null}function ao(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt,br,Br,pr,mt){var Mt=K/24,Ft=ge.lineOffsetX*Mt,rr=ge.lineOffsetY*Mt,hr;if(ge.numGlyphs>1){var sr=ge.glyphStartIndex+ge.numGlyphs,dr=ge.lineStartIndex,lr=ge.lineStartIndex+ge.lineLength,Wt=On(Mt,Qe,Ft,rr,xe,br,Br,ge,vt,Ue,pr);if(!Wt)return{notEnoughRoom:!0};var ir=ki(Wt.first.point,ke).point,Gt=ki(Wt.last.point,ke).point;if(re&&!xe){var Dr=En(ge.writingMode,ir,Gt,mt);if(Dr)return Dr}hr=[Wt.first];for(var Jr=ge.glyphStartIndex+1;Jr0?ai.point:Co(Br,Ga,ya,1,ye),Fi=En(ge.writingMode,ya,Zi,mt);if(Fi)return Fi}var ui=bo(Mt*Qe.getoffsetX(ge.glyphStartIndex),Ft,rr,xe,br,Br,ge.segment,ge.lineStartIndex,ge.lineStartIndex+ge.lineLength,vt,Ue,pr);if(!ui)return{notEnoughRoom:!0};hr=[ui]}for(var _i=0,Si=hr;_i0?1:-1,Mt=0;re&&(mt*=-1,Mt=Math.PI),mt<0&&(Mt+=Math.PI);for(var Ft=mt>0?Qe+ke:Qe+ke+1,rr=ye,hr=ye,sr=0,dr=0,lr=Math.abs(pr),Wt=[];sr+dr<=lr;){if(Ft+=mt,Ft=vt)return null;if(hr=rr,Wt.push(rr),rr=Br[Ft],rr===void 0){var ir=new e.Point(qt.getx(Ft),qt.gety(Ft)),Gt=ki(ir,br);if(Gt.signedDistanceFromCamera>0)rr=Br[Ft]=Gt.point;else{var Dr=Ft-mt,Jr=sr===0?Ue:new e.Point(qt.getx(Dr),qt.gety(Dr));rr=Co(Jr,ir,hr,lr-sr+1,br)}}sr+=dr,dr=hr.dist(rr)}var ya=(lr-sr)/dr,vi=rr.sub(hr),Ga=vi.mult(ya)._add(hr);Ga._add(vi._unit()._perp()._mult(xe*mt));var ai=Mt+Math.atan2(rr.y-hr.y,rr.x-hr.x);return Wt.push(Ga),{point:Ga,angle:ai,path:Wt}}var zs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function kn(ge,K){for(var xe=0;xe=1;Ui--)Si.push(ui.path[Ui]);for(var fn=1;fn<_i.path.length;fn++)Si.push(_i.path[fn]);var _o=Ga*2.5;if(vt){var Uo=Si.map(function(Lp){return ki(Lp,vt)});Uo.some(function(Lp){return Lp.signedDistanceFromCamera<=0})?Si=[]:Si=Uo.map(function(Lp){return Lp.point})}var Ds=[];if(Si.length>0){for(var Oo=Si[0].clone(),Cs=Si[0].clone(),Ys=1;Ys=ai.x&&Cs.x<=Zi.x&&Oo.y>=ai.y&&Cs.y<=Zi.y?Ds=[Si]:Cs.xZi.x||Cs.yZi.y?Ds=[]:Ds=e.clipLine([Si],ai.x,ai.y,Zi.x,Zi.y)}for(var mu=0,Ep=Ds;mu=this.screenRightBoundary||yethis.screenBottomBoundary},go.prototype.isInsideGrid=function(K,xe,re,ye){return re>=0&&K=0&&xe0){var lr;return this.prevPlacement&&this.prevPlacement.variableOffsets[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID].text&&(lr=this.prevPlacement.variableOffsets[pr.crossTileID].anchor),this.variableOffsets[pr.crossTileID]={textOffset:rr,width:re,height:ye,anchor:K,textBoxScale:Ue,prevAnchor:lr},this.markUsedJustification(mt,K,pr,Mt),mt.allowVerticalPlacement&&(this.markUsedOrientation(mt,Mt,pr),this.placedOrientations[pr.crossTileID]=Mt),{shift:hr,placedGlyphBoxes:sr}}},Ko.prototype.placeLayerBucketPart=function(K,xe,re){var ye=this,Ue=K.parameters,ke=Ue.bucket,Qe=Ue.layout,vt=Ue.posMatrix,qt=Ue.textLabelPlaneMatrix,br=Ue.labelToScreenMatrix,Br=Ue.textPixelRatio,pr=Ue.holdingForFade,mt=Ue.collisionBoxArray,Mt=Ue.partiallyEvaluatedTextSize,Ft=Ue.collisionGroup,rr=Qe.get("text-optional"),hr=Qe.get("icon-optional"),sr=Qe.get("text-allow-overlap"),dr=Qe.get("icon-allow-overlap"),lr=Qe.get("text-rotation-alignment")==="map",Wt=Qe.get("text-pitch-alignment")==="map",ir=Qe.get("icon-text-fit")!=="none",Gt=Qe.get("symbol-z-order")==="viewport-y",Dr=sr&&(dr||!ke.hasIconData()||hr),Jr=dr&&(sr||!ke.hasTextData()||rr);!ke.collisionArrays&&mt&&ke.deserializeCollisionBoxes(mt);var ya=function(ui,_i){if(!xe[ui.crossTileID]){if(pr){ye.placements[ui.crossTileID]=new Yn(!1,!1,!1);return}var Si=!1,Ui=!1,fn=!0,_o=null,Uo={box:null,offscreen:null},Ds={box:null,offscreen:null},Oo=null,Cs=null,Ys=null,mu=0,Ep=0,kp=0;_i.textFeatureIndex?mu=_i.textFeatureIndex:ui.useRuntimeCollisionCircles&&(mu=ui.featureIndex),_i.verticalTextFeatureIndex&&(Ep=_i.verticalTextFeatureIndex);var Ph=_i.textBox;if(Ph){var qp=function(cc){var hu=e.WritingMode.horizontal;if(ke.allowVerticalPlacement&&!cc&&ye.prevPlacement){var Dh=ye.prevPlacement.placedOrientations[ui.crossTileID];Dh&&(ye.placedOrientations[ui.crossTileID]=Dh,hu=Dh,ye.markUsedOrientation(ke,hu,ui))}return hu},qd=function(cc,hu){if(ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&_i.verticalTextBox)for(var Dh=0,Rv=ke.writingModes;Dh0&&(Jh=Jh.filter(function(cc){return cc!==Rh.anchor}),Jh.unshift(Rh.anchor))}var Cp=function(cc,hu,Dh){for(var Rv=cc.x2-cc.x1,lm=cc.y2-cc.y1,Mu=ui.textBoxScale,w0=ir&&!dr?hu:null,sv={box:[],offscreen:!1},xg=sr?Jh.length*2:Jh.length,Pp=0;Pp=Jh.length,T0=ye.attemptAnchorPlacement(lv,cc,Rv,lm,Mu,lr,Wt,Br,vt,Ft,bg,ui,ke,Dh,w0);if(T0&&(sv=T0.placedGlyphBoxes,sv&&sv.box&&sv.box.length)){Si=!0,_o=T0.shift;break}}return sv},Vp=function(){return Cp(Ph,_i.iconBox,e.WritingMode.horizontal)},Lp=function(){var cc=_i.verticalTextBox,hu=Uo&&Uo.box&&Uo.box.length;return ke.allowVerticalPlacement&&!hu&&ui.numVerticalGlyphVertices>0&&cc?Cp(cc,_i.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,Lp),Uo&&(Si=Uo.box,fn=Uo.offscreen);var Lv=qp(Uo&&Uo.box);if(!Si&&ye.prevPlacement){var Vd=ye.prevPlacement.variableOffsets[ui.crossTileID];Vd&&(ye.variableOffsets[ui.crossTileID]=Vd,ye.markUsedJustification(ke,Vd.anchor,ui,Lv))}}else{var ed=function(cc,hu){var Dh=ye.collisionIndex.placeCollisionBox(cc,sr,Br,vt,Ft.predicate);return Dh&&Dh.box&&Dh.box.length&&(ye.markUsedOrientation(ke,hu,ui),ye.placedOrientations[ui.crossTileID]=hu),Dh},Ih=function(){return ed(Ph,e.WritingMode.horizontal)},td=function(){var cc=_i.verticalTextBox;return ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&cc?ed(cc,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Ih,td),qp(Uo&&Uo.box&&Uo.box.length)}}if(Oo=Uo,Si=Oo&&Oo.box&&Oo.box.length>0,fn=Oo&&Oo.offscreen,ui.useRuntimeCollisionCircles){var Gf=ke.text.placedSymbolArray.get(ui.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(ke.textSizeData,Mt,Gf),Pv=Qe.get("text-padding"),ph=ui.collisionCircleDiameter;Cs=ye.collisionIndex.placeCollisionCircles(sr,Gf,ke.lineVertexArray,ke.glyphOffsetArray,Gd,vt,qt,br,re,Wt,Ft.predicate,ph,Pv),Si=sr||Cs.circles.length>0&&!Cs.collisionDetected,fn=fn&&Cs.offscreen}if(_i.iconFeatureIndex&&(kp=_i.iconFeatureIndex),_i.iconBox){var iv=function(cc){var hu=ir&&_o?ps(cc,_o.x,_o.y,lr,Wt,ye.transform.angle):cc;return ye.collisionIndex.placeCollisionBox(hu,dr,Br,vt,Ft.predicate)};Ds&&Ds.box&&Ds.box.length&&_i.verticalIconBox?(Ys=iv(_i.verticalIconBox),Ui=Ys.box.length>0):(Ys=iv(_i.iconBox),Ui=Ys.box.length>0),fn=fn&&Ys.offscreen}var om=rr||ui.numHorizontalGlyphVertices===0&&ui.numVerticalGlyphVertices===0,sm=hr||ui.numIconVertices===0;if(!om&&!sm?Ui=Si=Ui&&Si:sm?om||(Ui=Ui&&Si):Si=Ui&&Si,Si&&Oo&&Oo.box&&(Ds&&Ds.box&&Ep?ye.collisionIndex.insertCollisionBox(Oo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,Ep,Ft.ID):ye.collisionIndex.insertCollisionBox(Oo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID)),Ui&&Ys&&ye.collisionIndex.insertCollisionBox(Ys.box,Qe.get("icon-ignore-placement"),ke.bucketInstanceId,kp,Ft.ID),Cs&&(Si&&ye.collisionIndex.insertCollisionCircles(Cs.circles,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID),re)){var Iv=ke.bucketInstanceId,nv=ye.collisionCircleArrays[Iv];nv===void 0&&(nv=ye.collisionCircleArrays[Iv]=new Gn);for(var ov=0;ov=0;--Ga){var ai=vi[Ga];ya(ke.symbolInstances.get(ai),ke.collisionArrays[ai])}else for(var Zi=K.symbolInstanceStart;Zi=0&&(ke>=0&&br!==ke?K.text.placedSymbolArray.get(br).crossTileID=0:K.text.placedSymbolArray.get(br).crossTileID=re.crossTileID)}},Ko.prototype.markUsedOrientation=function(K,xe,re){for(var ye=xe===e.WritingMode.horizontal||xe===e.WritingMode.horizontalOnly?xe:0,Ue=xe===e.WritingMode.vertical?xe:0,ke=[re.leftJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.rightJustifiedTextSymbolIndex],Qe=0,vt=ke;Qe0||Wt>0,ya=dr.numIconVertices>0,vi=ye.placedOrientations[dr.crossTileID],Ga=vi===e.WritingMode.vertical,ai=vi===e.WritingMode.horizontal||vi===e.WritingMode.horizontalOnly;if(Jr){var Zi=il(Dr.text),Fi=Ga?yn:Zi;Mt(K.text,lr,Fi);var ui=ai?yn:Zi;Mt(K.text,Wt,ui);var _i=Dr.text.isHidden();[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex].forEach(function(kp){kp>=0&&(K.text.placedSymbolArray.get(kp).hidden=_i||Ga?1:0)}),dr.verticalPlacedTextSymbolIndex>=0&&(K.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=_i||ai?1:0);var Si=ye.variableOffsets[dr.crossTileID];Si&&ye.markUsedJustification(K,Si.anchor,dr,vi);var Ui=ye.placedOrientations[dr.crossTileID];Ui&&(ye.markUsedJustification(K,"left",dr,Ui),ye.markUsedOrientation(K,Ui,dr))}if(ya){var fn=il(Dr.icon),_o=!(pr&&dr.verticalPlacedIconSymbolIndex&&Ga);if(dr.placedIconSymbolIndex>=0){var Uo=_o?fn:yn;Mt(K.icon,dr.numIconVertices,Uo),K.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(dr.verticalPlacedIconSymbolIndex>=0){var Ds=_o?yn:fn;Mt(K.icon,dr.numVerticalIconVertices,Ds),K.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Oo=K.collisionArrays[sr];if(Oo){var Cs=new e.Point(0,0);if(Oo.textBox||Oo.verticalTextBox){var Ys=!0;if(qt){var mu=ye.variableOffsets[ir];mu?(Cs=_s(mu.anchor,mu.width,mu.height,mu.textOffset,mu.textBoxScale),br&&Cs._rotate(Br?ye.transform.angle:-ye.transform.angle)):Ys=!1}Oo.textBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||Ga,Cs.x,Cs.y),Oo.verticalTextBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||ai,Cs.x,Cs.y)}var Ep=!!(!ai&&Oo.verticalIconBox);Oo.iconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Ep,pr?Cs.x:0,pr?Cs.y:0),Oo.verticalIconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Ep,pr?Cs.x:0,pr?Cs.y:0)}}},rr=0;rrK},Ko.prototype.setStale=function(){this.stale=!0};function Gi(ge,K,xe,re,ye){ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0)}var Pn=Math.pow(2,25),qs=Math.pow(2,24),bs=Math.pow(2,17),lo=Math.pow(2,16),Zo=Math.pow(2,9),ws=Math.pow(2,8),Hs=Math.pow(2,1);function il(ge){if(ge.opacity===0&&!ge.placed)return 0;if(ge.opacity===1&&ge.placed)return 4294967295;var K=ge.placed?1:0,xe=Math.floor(ge.opacity*127);return xe*Pn+K*qs+xe*bs+K*lo+xe*Zo+K*ws+xe*Hs+K}var yn=0,Po=function(K){this._sortAcrossTiles=K.layout.get("symbol-z-order")!=="viewport-y"&&K.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Po.prototype.continuePlacement=function(K,xe,re,ye,Ue){for(var ke=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Qe=K[this._currentPlacementIndex],vt=xe[Qe],qt=this.placement.collisionIndex.transform.zoom;if(vt.type==="symbol"&&(!vt.minzoom||vt.minzoom<=qt)&&(!vt.maxzoom||vt.maxzoom>qt)){this._inProgressLayer||(this._inProgressLayer=new Po(vt));var br=this._inProgressLayer.continuePlacement(re[vt.source],this.placement,this._showCollisionBoxes,vt,ke);if(br)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},To.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Ws=512/e.EXTENT/2,Ll=function(K,xe,re){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=re;for(var ye=0;yeK.overscaledZ)for(var qt in vt){var br=vt[qt];br.tileID.isChildOf(K)&&br.findMatches(xe.symbolInstances,K,ke)}else{var Br=K.scaledTo(Number(Qe)),pr=vt[Br.key];pr&&pr.findMatches(xe.symbolInstances,K,ke)}}for(var mt=0;mt0)throw new Error("Unimplemented: "+ke.map(function(Qe){return Qe.command}).join(", ")+".");return Ue.forEach(function(Qe){Qe.command!=="setTransition"&&ye[Qe.command].apply(ye,Qe.args)}),this.stylesheet=re,!0},K.prototype.addImage=function(re,ye){if(this.getImage(re))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(re,ye),this._afterImageUpdated(re)},K.prototype.updateImage=function(re,ye){this.imageManager.updateImage(re,ye)},K.prototype.getImage=function(re){return this.imageManager.getImage(re)},K.prototype.removeImage=function(re){if(!this.getImage(re))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(re),this._afterImageUpdated(re)},K.prototype._afterImageUpdated=function(re){this._availableImages=this.imageManager.listImages(),this._changedImages[re]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(re,ye,Ue){var ke=this;if(Ue===void 0&&(Ue={}),this._checkLoaded(),this.sourceCaches[re]!==void 0)throw new Error("There is already a source with this ID");if(!ye.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(ye).join(", ")+".");var Qe=["vector","raster","geojson","video","image"],vt=Qe.indexOf(ye.type)>=0;if(!(vt&&this._validate(e.validateStyle.source,"sources."+re,ye,null,Ue))){this.map&&this.map._collectResourceTiming&&(ye.collectResourceTiming=!0);var qt=this.sourceCaches[re]=new ra(re,ye,this.dispatcher);qt.style=this,qt.setEventedParent(this,function(){return{isSourceLoaded:ke.loaded(),source:qt.serialize(),sourceId:re}}),qt.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(re){if(this._checkLoaded(),this.sourceCaches[re]===void 0)throw new Error("There is no source with this ID");for(var ye in this._layers)if(this._layers[ye].source===re)return this.fire(new e.ErrorEvent(new Error('Source "'+re+'" cannot be removed while layer "'+ye+'" is using it.')));var Ue=this.sourceCaches[re];delete this.sourceCaches[re],delete this._updatedSources[re],Ue.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:re})),Ue.setEventedParent(null),Ue.clearTiles(),Ue.onRemove&&Ue.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(re,ye){this._checkLoaded();var Ue=this.sourceCaches[re].getSource();Ue.setData(ye),this._changed=!0},K.prototype.getSource=function(re){return this.sourceCaches[re]&&this.sourceCaches[re].getSource()},K.prototype.addLayer=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._checkLoaded();var ke=re.id;if(this.getLayer(ke)){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ke+'" already exists on this map')));return}var Qe;if(re.type==="custom"){if(Ts(this,e.validateCustomStyleLayer(re)))return;Qe=e.createStyleLayer(re)}else{if(typeof re.source=="object"&&(this.addSource(ke,re.source),re=e.clone$1(re),re=e.extend(re,{source:ke})),this._validate(e.validateStyle.layer,"layers."+ke,re,{arrayIndex:-1},Ue))return;Qe=e.createStyleLayer(re),this._validateLayer(Qe),Qe.setEventedParent(this,{layer:{id:ke}}),this._serializedLayers[Qe.id]=Qe.serialize()}var vt=ye?this._order.indexOf(ye):this._order.length;if(ye&&vt===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ye+'" does not exist on this map.')));return}if(this._order.splice(vt,0,ke),this._layerOrderChanged=!0,this._layers[ke]=Qe,this._removedLayers[ke]&&Qe.source&&Qe.type!=="custom"){var qt=this._removedLayers[ke];delete this._removedLayers[ke],qt.type!==Qe.type?this._updatedSources[Qe.source]="clear":(this._updatedSources[Qe.source]="reload",this.sourceCaches[Qe.source].pause())}this._updateLayer(Qe),Qe.onAdd&&Qe.onAdd(this.map)},K.prototype.moveLayer=function(re,ye){this._checkLoaded(),this._changed=!0;var Ue=this._layers[re];if(!Ue){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be moved.")));return}if(re!==ye){var ke=this._order.indexOf(re);this._order.splice(ke,1);var Qe=ye?this._order.indexOf(ye):this._order.length;if(ye&&Qe===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ye+'" does not exist on this map.')));return}this._order.splice(Qe,0,re),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(re){this._checkLoaded();var ye=this._layers[re];if(!ye){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be removed.")));return}ye.setEventedParent(null);var Ue=this._order.indexOf(re);this._order.splice(Ue,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[re]=ye,delete this._layers[re],delete this._serializedLayers[re],delete this._updatedLayers[re],delete this._updatedPaintProps[re],ye.onRemove&&ye.onRemove(this.map)},K.prototype.getLayer=function(re){return this._layers[re]},K.prototype.hasLayer=function(re){return re in this._layers},K.prototype.setLayerZoomRange=function(re,ye,Ue){this._checkLoaded();var ke=this.getLayer(re);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot have zoom extent.")));return}ke.minzoom===ye&&ke.maxzoom===Ue||(ye!=null&&(ke.minzoom=ye),Ue!=null&&(ke.maxzoom=Ue),this._updateLayer(ke))},K.prototype.setFilter=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._checkLoaded();var ke=this.getLayer(re);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be filtered.")));return}if(!e.deepEqual(ke.filter,ye)){if(ye==null){ke.filter=void 0,this._updateLayer(ke);return}this._validate(e.validateStyle.filter,"layers."+ke.id+".filter",ye,null,Ue)||(ke.filter=e.clone$1(ye),this._updateLayer(ke))}},K.prototype.getFilter=function(re){return e.clone$1(this.getLayer(re).filter)},K.prototype.setLayoutProperty=function(re,ye,Ue,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}e.deepEqual(Qe.getLayoutProperty(ye),Ue)||(Qe.setLayoutProperty(ye,Ue,ke),this._updateLayer(Qe))},K.prototype.getLayoutProperty=function(re,ye){var Ue=this.getLayer(re);if(!Ue){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style.")));return}return Ue.getLayoutProperty(ye)},K.prototype.setPaintProperty=function(re,ye,Ue,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}if(!e.deepEqual(Qe.getPaintProperty(ye),Ue)){var vt=Qe.setPaintProperty(ye,Ue,ke);vt&&this._updateLayer(Qe),this._changed=!0,this._updatedPaintProps[re]=!0}},K.prototype.getPaintProperty=function(re,ye){return this.getLayer(re).getPaintProperty(ye)},K.prototype.setFeatureState=function(re,ye){this._checkLoaded();var Ue=re.source,ke=re.sourceLayer,Qe=this.sourceCaches[Ue];if(Qe===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ue+"' does not exist in the map's style.")));return}var vt=Qe.getSource().type;if(vt==="geojson"&&ke){this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(vt==="vector"&&!ke){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}re.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),Qe.setFeatureState(ke,re.id,ye)},K.prototype.removeFeatureState=function(re,ye){this._checkLoaded();var Ue=re.source,ke=this.sourceCaches[Ue];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ue+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type,vt=Qe==="vector"?re.sourceLayer:void 0;if(Qe==="vector"&&!vt){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(ye&&typeof re.id!="string"&&typeof re.id!="number"){this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ke.removeFeatureState(vt,re.id,ye)},K.prototype.getFeatureState=function(re){this._checkLoaded();var ye=re.source,Ue=re.sourceLayer,ke=this.sourceCaches[ye];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+ye+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type;if(Qe==="vector"&&!Ue){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return re.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),ke.getFeatureState(Ue,re.id)},K.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.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(re){return re.serialize()}),layers:this._serializeLayers(this._order)},function(re){return re!==void 0})},K.prototype._updateLayer=function(re){this._updatedLayers[re.id]=!0,re.source&&!this._updatedSources[re.source]&&this.sourceCaches[re.source].getSource().type!=="raster"&&(this._updatedSources[re.source]="reload",this.sourceCaches[re.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(re){for(var ye=this,Ue=function(ai){return ye._layers[ai].type==="fill-extrusion"},ke={},Qe=[],vt=this._order.length-1;vt>=0;vt--){var qt=this._order[vt];if(Ue(qt)){ke[qt]=vt;for(var br=0,Br=re;br=0;sr--){var dr=this._order[sr];if(Ue(dr))for(var lr=Qe.length-1;lr>=0;lr--){var Wt=Qe[lr].feature;if(ke[Wt.layer.id]850?D+=" Black":u>750?D+=" Extra Bold":u>650?D+=" Bold":u>550?D+=" Semi Bold":u>450?D+=" Medium":u>350?D+=" Regular":u>250?D+=" Light":u>150?D+=" Extra Light":D+=" Thin"):g.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",u>750?D+=" Extrabold":u>650?D+=" Bold":u>550?D+=" Semibold":u>350?D+=" Regular":D+=" Light"):g.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",g[3]==="CJK"&&(D+=" CJK"),D+=u>500?" Bold":" Regular")),y&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),a(D)||(D=b);var P=D.split(", ");return P}}}),mV=He({"src/traces/scattermapbox/plot.js"(Z,q){"use strict";var v=sa(),_=vV(),S=nm().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:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+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&&v.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,h=this.subplot.getMapLayers(),f=0;f=0;y--){var D=g[y];n.removeLayer(c.layerIds[D])}u||n.removeSource(c.sourceIds.circle)}function x(u){for(var g=M.nonCluster,y=0;y=0;y--){var D=g[y];n.removeLayer(c.layerIds[D]),u||n.removeSource(c.sourceIds[D])}}function A(u){m?l(u):w(u)}function E(u){f?T(u):x(u)}function p(){for(var u=f?M.cluster:M.nonCluster,g=0;g=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,h=new e(o,i.uid,n,s),f=_(o.gd,a),m=h.below=o.belowLookup["trace-"+i.uid],c,T,l;if(n)for(h.addSource("circle",f.circle,i.cluster),c=0;c=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=A*360,p=i-E;function b(N){var O=N.lonlat;if(O[0]===e||x&&T.indexOf(N.i+1)===-1)return 1/0;var L=_.modHalf(O[0],360),U=O[1],B=c.project([L,U]),W=B.x-f.c2p([p,U]),$=B.y-m.c2p([L,n]),ue=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-ue,1-3/ue)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,g=[_.modHalf(u[0],360)+E,u[1]],y=f.c2p(g),D=m.c2p(g),P=d.mrc||1;a.x0=y-P,a.x1=y+P,a.y0=D-P,a.y1=D+P;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=i.lonlat,l=[];function x(w){return w+"\xB0"}return f||m&&c?l.push("("+x(T[1])+", "+x(T[0])+")"):m?l.push(n.lon+x(T[0])):c&&l.push(n.lat+x(T[1])),(f||h.indexOf("text")!==-1)&&M(i,a,l),l.join("
")}q.exports={hoverPoints:r,getExtraText:o}}}),gV=He({"src/traces/scattermapbox/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_}}}),yV=He({"src/traces/scattermapbox/select.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=Gs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!_.hasMarkers(n))return[];if(t===!1)for(s=0;s"u"&&(C=1e-6);var G,oe,be,Ie,Ne;for(be=k,Ne=0;Ne<8;Ne++){if(Ie=this.sampleCurveX(be)-k,Math.abs(Ie)oe)return oe;for(;GIe?G=be:oe=be,be=(oe-G)*.5+G}return be},a.prototype.solve=function(k,C){return this.sampleCurveY(this.solveCurveX(k,C))};var i=n;function n(k,C){this.x=k,this.y=C}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(k){return this.clone()._add(k)},sub:function(k){return this.clone()._sub(k)},multByPoint:function(k){return this.clone()._multByPoint(k)},divByPoint:function(k){return this.clone()._divByPoint(k)},mult:function(k){return this.clone()._mult(k)},div:function(k){return this.clone()._div(k)},rotate:function(k){return this.clone()._rotate(k)},rotateAround:function(k,C){return this.clone()._rotateAround(k,C)},matMult:function(k){return this.clone()._matMult(k)},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(k){return this.x===k.x&&this.y===k.y},dist:function(k){return Math.sqrt(this.distSqr(k))},distSqr:function(k){var C=k.x-this.x,G=k.y-this.y;return C*C+G*G},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(k){return Math.atan2(this.y-k.y,this.x-k.x)},angleWith:function(k){return this.angleWithSep(k.x,k.y)},angleWithSep:function(k,C){return Math.atan2(this.x*C-this.y*k,this.x*k+this.y*C)},_matMult:function(k){var C=k[0]*this.x+k[1]*this.y,G=k[2]*this.x+k[3]*this.y;return this.x=C,this.y=G,this},_add:function(k){return this.x+=k.x,this.y+=k.y,this},_sub:function(k){return this.x-=k.x,this.y-=k.y,this},_mult:function(k){return this.x*=k,this.y*=k,this},_div:function(k){return this.x/=k,this.y/=k,this},_multByPoint:function(k){return this.x*=k.x,this.y*=k.y,this},_divByPoint:function(k){return this.x/=k.x,this.y/=k.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var k=this.y;return this.y=this.x,this.x=-k,this},_rotate:function(k){var C=Math.cos(k),G=Math.sin(k),oe=C*this.x-G*this.y,be=G*this.x+C*this.y;return this.x=oe,this.y=be,this},_rotateAround:function(k,C){var G=Math.cos(k),oe=Math.sin(k),be=C.x+G*(this.x-C.x)-oe*(this.y-C.y),Ie=C.y+oe*(this.x-C.x)+G*(this.y-C.y);return this.x=be,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(k){return k instanceof n?k:Array.isArray(k)?new n(k[0],k[1]):k};var s=typeof self<"u"?self:{};function h(k,C){if(Array.isArray(k)){if(!Array.isArray(C)||k.length!==C.length)return!1;for(var G=0;G=1)return 1;var C=k*k,G=C*k;return 4*(k<.5?G:3*(k-C)+G-.75)}function c(k,C,G,oe){var be=new o(k,C,G,oe);return function(Ie){return be.solve(Ie)}}var T=c(.25,.1,.25,1);function l(k,C,G){return Math.min(G,Math.max(C,k))}function x(k,C,G){var oe=G-C,be=((k-C)%oe+oe)%oe+C;return be===C?G:be}function w(k,C,G){if(!k.length)return G(null,[]);var oe=k.length,be=new Array(k.length),Ie=null;k.forEach(function(Ne,ft){C(Ne,function(It,Ht){It&&(Ie=It),be[ft]=Ht,--oe===0&&G(Ie,be)})})}function A(k){var C=[];for(var G in k)C.push(k[G]);return C}function E(k,C){var G=[];for(var oe in k)oe in C||G.push(oe);return G}function p(k){for(var C=[],G=arguments.length-1;G-- >0;)C[G]=arguments[G+1];for(var oe=0,be=C;oe>C/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,k)}return k()}function y(k){return k<=1?1:Math.pow(2,Math.ceil(Math.log(k)/Math.LN2))}function D(k){return k?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(k):!1}function P(k,C){k.forEach(function(G){C[G]&&(C[G]=C[G].bind(C))})}function z(k,C){return k.indexOf(C,k.length-C.length)!==-1}function F(k,C,G){var oe={};for(var be in k)oe[be]=C.call(G||this,k[be],be,k);return oe}function N(k,C,G){var oe={};for(var be in k)C.call(G||this,k[be],be,k)&&(oe[be]=k[be]);return oe}function O(k){return Array.isArray(k)?k.map(O):typeof k=="object"&&k?F(k,O):k}function L(k,C){for(var G=0;G=0)return!0;return!1}var U={};function B(k){U[k]||(typeof console<"u"&&console.warn(k),U[k]=!0)}function W(k,C,G){return(G.y-k.y)*(C.x-k.x)>(C.y-k.y)*(G.x-k.x)}function $(k){for(var C=0,G=0,oe=k.length,be=oe-1,Ie=void 0,Ne=void 0;G@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,G={};if(k.replace(C,function(be,Ie,Ne,ft){var It=Ne||ft;return G[Ie]=It?It.toLowerCase():!0,""}),G["max-age"]){var oe=parseInt(G["max-age"],10);isNaN(oe)?delete G["max-age"]:G["max-age"]=oe}return G}var Y=null;function X(k){if(Y==null){var C=k.navigator?k.navigator.userAgent:null;Y=!!k.safari||!!(C&&(/\b(iPad|iPhone|iPod)\b/.test(C)||C.match("Safari")&&!C.match("Chrome")))}return Y}function Q(k){try{var C=s[k];return C.setItem("_mapbox_test_",1),C.removeItem("_mapbox_test_"),!0}catch{return!1}}function V(k){return s.btoa(encodeURIComponent(k).replace(/%([0-9A-F]{2})/g,function(C,G){return String.fromCharCode(+("0x"+G))}))}function le(k){return decodeURIComponent(s.atob(k).split("").map(function(C){return"%"+("00"+C.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var ae=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,te,pe,we={now:ae,frame:function(C){var G=j(C);return{cancel:function(){return ee(G)}}},getImageData:function(C,G){G===void 0&&(G=0);var oe=s.document.createElement("canvas"),be=oe.getContext("2d");if(!be)throw new Error("failed to create canvas 2d context");return oe.width=C.width,oe.height=C.height,be.drawImage(C,0,0,C.width,C.height),be.getImageData(-G,-G,C.width+2*G,C.height+2*G)},resolveURL:function(C){return te||(te=s.document.createElement("a")),te.href=C,te.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(pe==null&&(pe=s.matchMedia("(prefers-reduced-motion: reduce)")),pe.matches):!1}},Se={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},Re={supported:!1,testSupport:tt},Pe,je=!1,at,nt=!1;s.document&&(at=s.document.createElement("img"),at.onload=function(){Pe&&Ve(Pe),Pe=null,nt=!0},at.onerror=function(){je=!0,Pe=null},at.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function tt(k){je||!at||(nt?Ve(k):Pe=k)}function Ve(k){var C=k.createTexture();k.bindTexture(k.TEXTURE_2D,C);try{if(k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,at),k.isContextLost())return;Re.supported=!0}catch{}k.deleteTexture(C),je=!0}var he="01";function se(){for(var k="1",C="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",G="",oe=0;oe<10;oe++)G+=C[Math.floor(Math.random()*62)];var be=12*60*60*1e3,Ie=[k,he,G].join(""),Ne=Date.now()+be;return{token:Ie,tokenExpiresAt:Ne}}var ne=function(C,G){this._transformRequestFn=C,this._customAccessToken=G,this._createSkuToken()};ne.prototype._createSkuToken=function(){var C=se();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},ne.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ne.prototype.transformRequest=function(C,G){return this._transformRequestFn?this._transformRequestFn(C,G)||{url:C}:{url:C}},ne.prototype.normalizeStyleURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/styles/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeGlyphsURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/fonts/v1"+oe.path,this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeSourceURL=function(C,G){if(!Ce(C))return C;var oe=Bt(C);return oe.path="/v4/"+oe.authority+".json",oe.params.push("secure"),this._makeAPIURL(oe,this._customAccessToken||G)},ne.prototype.normalizeSpriteURL=function(C,G,oe,be){var Ie=Bt(C);return Ce(C)?(Ie.path="/styles/v1"+Ie.path+"/sprite"+G+oe,this._makeAPIURL(Ie,this._customAccessToken||be)):(Ie.path+=""+G+oe,Vt(Ie))},ne.prototype.normalizeTileURL=function(C,G){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!Ce(C))return C;var oe=Bt(C),be=/(\.(png|jpg)\d*)(?=$)/,Ie=/^.+\/v4\//,Ne=we.devicePixelRatio>=2||G===512?"@2x":"",ft=Re.supported?".webp":"$1";oe.path=oe.path.replace(be,""+Ne+ft),oe.path=oe.path.replace(Ie,"/"),oe.path="/v4"+oe.path;var It=this._customAccessToken||St(oe.params)||Se.ACCESS_TOKEN;return Se.REQUIRE_ACCESS_TOKEN&&It&&this._skuToken&&oe.params.push("sku="+this._skuToken),this._makeAPIURL(oe,It)},ne.prototype.canonicalizeTileURL=function(C,G){var oe="/v4/",be=/\.[\w]+$/,Ie=Bt(C);if(!Ie.path.match(/(^\/v4\/)/)||!Ie.path.match(be))return C;var Ne="mapbox://tiles/";Ne+=Ie.path.replace(oe,"");var ft=Ie.params;return G&&(ft=ft.filter(function(It){return!It.match(/^access_token=/)})),ft.length&&(Ne+="?"+ft.join("&")),Ne},ne.prototype.canonicalizeTileset=function(C,G){for(var oe=G?Ce(G):!1,be=[],Ie=0,Ne=C.tiles||[];Ie=0&&C.params.splice(Ie,1)}if(be.path!=="/"&&(C.path=""+be.path+C.path),!Se.REQUIRE_ACCESS_TOKEN)return Vt(C);if(G=G||Se.ACCESS_TOKEN,!G)throw new Error("An API access token is required to use Mapbox GL. "+oe);if(G[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+oe);return C.params=C.params.filter(function(Ne){return Ne.indexOf("access_token")===-1}),C.params.push("access_token="+G),Vt(C)};function Ce(k){return k.indexOf("mapbox:")===0}var Ze=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function rt(k){return Ze.test(k)}function Je(k){return k.indexOf("sku=")>0&&rt(k)}function St(k){for(var C=0,G=k;C=1&&s.localStorage.setItem(G,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},qr.prototype.processRequests=function(C){},qr.prototype.postEvent=function(C,G,oe,be){var Ie=this;if(Se.EVENTS_URL){var Ne=Bt(Se.EVENTS_URL);Ne.params.push("access_token="+(be||Se.ACCESS_TOKEN||""));var ft={event:this.type,created:new Date(C).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:he,userId:this.anonId},It=G?p(ft,G):ft,Ht={url:Vt(Ne),headers:{"Content-Type":"text/plain"},body:JSON.stringify([It])};this.pendingRequest=ca(Ht,function(er){Ie.pendingRequest=null,oe(er),Ie.saveEventData(),Ie.processRequests(be)})}},qr.prototype.queueRequest=function(C,G){this.queue.push(C),this.processRequests(G)};var kr=function(k){function C(){k.call(this,"map.load"),this.success={},this.skuToken=""}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postMapLoadEvent=function(oe,be,Ie,Ne){this.skuToken=Ie,(Se.EVENTS_URL&&Ne||Se.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(ft){return Ce(ft)||rt(ft)}))&&this.queueRequest({id:be,timestamp:Date.now()},Ne)},C.prototype.processRequests=function(oe){var be=this;if(!(this.pendingRequest||this.queue.length===0)){var Ie=this.queue.shift(),Ne=Ie.id,ft=Ie.timestamp;Ne&&this.success[Ne]||(this.anonId||this.fetchEventData(),D(this.anonId)||(this.anonId=g()),this.postEvent(ft,{skuToken:this.skuToken},function(It){It||Ne&&(be.success[Ne]=!0)},oe))}},C}(qr),Ur=function(k){function C(G){k.call(this,"appUserTurnstile"),this._customAccessToken=G}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.postTurnstileEvent=function(oe,be){Se.EVENTS_URL&&Se.ACCESS_TOKEN&&Array.isArray(oe)&&oe.some(function(Ie){return Ce(Ie)||rt(Ie)})&&this.queueRequest(Date.now(),be)},C.prototype.processRequests=function(oe){var be=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ie=vr(Se.ACCESS_TOKEN),Ne=Ie?Ie.u:Se.ACCESS_TOKEN,ft=Ne!==this.eventData.tokenU;D(this.anonId)||(this.anonId=g(),ft=!0);var It=this.queue.shift();if(this.eventData.lastSuccess){var Ht=new Date(this.eventData.lastSuccess),er=new Date(It),Lr=(It-this.eventData.lastSuccess)/(24*60*60*1e3);ft=ft||Lr>=1||Lr<-1||Ht.getDate()!==er.getDate()}else ft=!0;if(!ft)return this.processRequests();this.postEvent(It,{"enabled.telemetry":!1},function(Yr){Yr||(be.eventData.lastSuccess=It,be.eventData.tokenU=Ne)},oe)}},C}(qr),_t=new Ur,Fe=_t.postTurnstileEvent.bind(_t),Ye=new kr,Ae=Ye.postMapLoadEvent.bind(Ye),Le="mapbox-tiles",We=500,Ke=50,st=1e3*60*7,ot;function Ut(){s.caches&&!ot&&(ot=s.caches.open(Le))}var Ct;function Pt(k,C){if(Ct===void 0)try{new Response(new ReadableStream),Ct=!0}catch{Ct=!1}Ct?C(k.body):k.blob().then(C)}function jt(k,C,G){if(Ut(),!!ot){var oe={status:C.status,statusText:C.statusText,headers:new s.Headers};C.headers.forEach(function(Ne,ft){return oe.headers.set(ft,Ne)});var be=de(C.headers.get("Cache-Control")||"");if(!be["no-store"]){be["max-age"]&&oe.headers.set("Expires",new Date(G+be["max-age"]*1e3).toUTCString());var Ie=new Date(oe.headers.get("Expires")).getTime()-G;IeDate.now()&&!G["no-cache"]}var Pr=1/0;function _a(k){Pr++,Pr>Ke&&(k.getActor().send("enforceCacheSizeLimit",We),Pr=0)}function Fa(k){Ut(),ot&&ot.then(function(C){C.keys().then(function(G){for(var oe=0;oe=200&&G.status<300||G.status===0)&&G.response!==null){var be=G.response;if(k.type==="json")try{be=JSON.parse(G.response)}catch(Ie){return C(Ie)}C(null,be,G.getResponseHeader("Cache-Control"),G.getResponseHeader("Expires"))}else C(new wi(G.statusText,G.status,k.url))},G.send(k.body),{cancel:function(){return G.abort()}}}var Fr=function(k,C){if(!Rt(k.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Zt(k,C);if(ce()&&self.worker&&self.worker.actor){var G=!0;return self.worker.actor.send("getResource",k,C,void 0,G)}}return Jt(k,C)},ta=function(k,C){return Fr(p(k,{type:"json"}),C)},ra=function(k,C){return Fr(p(k,{type:"arrayBuffer"}),C)},ca=function(k,C){return Fr(p(k,{method:"POST"}),C)};function Ba(k){var C=s.document.createElement("a");return C.href=k,C.protocol===s.document.location.protocol&&C.host===s.document.location.host}var $a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Za(k,C,G,oe){var be=new s.Image,Ie=s.URL;be.onload=function(){C(null,be),Ie.revokeObjectURL(be.src),be.onload=null,s.requestAnimationFrame(function(){be.src=$a})},be.onerror=function(){return C(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 Ne=new s.Blob([new Uint8Array(k)],{type:"image/png"});be.cacheControl=G,be.expires=oe,be.src=k.byteLength?Ie.createObjectURL(Ne):$a}function ri(k,C){var G=new s.Blob([new Uint8Array(k)],{type:"image/png"});s.createImageBitmap(G).then(function(oe){C(null,oe)}).catch(function(oe){C(new Error("Could not load image because of "+oe.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var pi,Ia,rn=function(){pi=[],Ia=0};rn();var tn=function(k,C){if(Re.supported&&(k.headers||(k.headers={}),k.headers.accept="image/webp,*/*"),Ia>=Se.MAX_PARALLEL_IMAGE_REQUESTS){var G={requestParameters:k,callback:C,cancelled:!1,cancel:function(){this.cancelled=!0}};return pi.push(G),G}Ia++;var oe=!1,be=function(){if(!oe)for(oe=!0,Ia--;pi.length&&Ia0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},wr.prototype.setEventedParent=function(C,G){return this._eventedParent=C,this._eventedParentData=G,this};var Rr=8,Nr={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"}},Hr={"*":{type:"source"}},gt=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Kt={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:"*"}},mr={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:"*"}},Ir={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:"*"}},va={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"}},Pa={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"}}},ga={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"}}},la={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"}},ba=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ai={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ki={"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"}},Ki={"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"}},En={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Tn={"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"}},On={"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"}},kn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ao={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Co={type:"array",value:"*"},bo={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},zs={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Cn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wo={type:"array",value:"*",minimum:1},Zn={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},go=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],os={"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"}},ys={"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"}},jo={"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"}},Yn={"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"}},Gn={"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"}},Hn={"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"}},ss={"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"}},_s={"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"}},ps={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Ko={"*":{type:"string"}},Gi={$version:Rr,$root:Nr,sources:Hr,source:gt,source_vector:Kt,source_raster:mr,source_raster_dem:Ir,source_geojson:va,source_video:Pa,source_image:ga,layer:la,layout:ba,layout_background:Ai,layout_fill:ki,layout_circle:Ki,layout_heatmap:En,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Tn,layout_symbol:On,layout_raster:kn,layout_hillshade:ao,filter:Co,filter_operator:bo,geometry_type:zs,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:Cn,expression:wo,light:Zn,paint:go,paint_fill:os,"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:ys,paint_circle:jo,paint_heatmap:Yn,paint_symbol:Gn,paint_raster:Hn,paint_hillshade:ss,paint_background:_s,transition:ps,"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:Ko},Pn=function(C,G,oe,be){this.message=(C?C+": ":"")+oe,be&&(this.identifier=be),G!=null&&G.__line__&&(this.line=G.__line__)};function qs(k){var C=k.key,G=k.value;return G?[new Pn(C,G,"constants have been deprecated as of v8")]:[]}function bs(k){for(var C=[],G=arguments.length-1;G-- >0;)C[G]=arguments[G+1];for(var oe=0,be=C;oe":k.itemType.kind==="value"?"array":"array<"+C+">"}else return k.kind}var Ul=[il,yn,Po,To,Ws,Ts,Ll,Jo(uo),Ls];function lu(k,C){if(C.kind==="error")return null;if(k.kind==="array"){if(C.kind==="array"&&(C.N===0&&C.itemType.kind==="value"||!lu(k.itemType,C.itemType))&&(typeof k.N!="number"||k.N===C.N))return null}else{if(k.kind===C.kind)return null;if(k.kind==="value")for(var G=0,oe=Ul;G255?255:Ht}function be(Ht){return Ht<0?0:Ht>1?1:Ht}function Ie(Ht){return Ht[Ht.length-1]==="%"?oe(parseFloat(Ht)/100*255):oe(parseInt(Ht))}function Ne(Ht){return Ht[Ht.length-1]==="%"?be(parseFloat(Ht)/100):be(parseFloat(Ht))}function ft(Ht,er,Lr){return Lr<0?Lr+=1:Lr>1&&(Lr-=1),Lr*6<1?Ht+(er-Ht)*Lr*6:Lr*2<1?er:Lr*3<2?Ht+(er-Ht)*(2/3-Lr)*6:Ht}function It(Ht){var er=Ht.replace(/ /g,"").toLowerCase();if(er in G)return G[er].slice();if(er[0]==="#"){if(er.length===4){var Lr=parseInt(er.substr(1),16);return Lr>=0&&Lr<=4095?[(Lr&3840)>>4|(Lr&3840)>>8,Lr&240|(Lr&240)>>4,Lr&15|(Lr&15)<<4,1]:null}else if(er.length===7){var Lr=parseInt(er.substr(1),16);return Lr>=0&&Lr<=16777215?[(Lr&16711680)>>16,(Lr&65280)>>8,Lr&255,1]:null}return null}var Yr=er.indexOf("("),Vr=er.indexOf(")");if(Yr!==-1&&Vr+1===er.length){var ua=er.substr(0,Yr),Oa=er.substr(Yr+1,Vr-(Yr+1)).split(","),Mi=1;switch(ua){case"rgba":if(Oa.length!==4)return null;Mi=Ne(Oa.pop());case"rgb":return Oa.length!==3?null:[Ie(Oa[0]),Ie(Oa[1]),Ie(Oa[2]),Mi];case"hsla":if(Oa.length!==4)return null;Mi=Ne(Oa.pop());case"hsl":if(Oa.length!==3)return null;var ni=(parseFloat(Oa[0])%360+360)%360/360,$i=Ne(Oa[1]),Oi=Ne(Oa[2]),Ji=Oi<=.5?Oi*($i+1):Oi+$i-Oi*$i,ln=Oi*2-Ji;return[oe(ft(ln,Ji,ni+1/3)*255),oe(ft(ln,Ji,ni)*255),oe(ft(ln,Ji,ni-1/3)*255),Mi];default:return null}}return null}try{C.parseCSSColor=It}catch{}}),Uc=Sf.parseCSSColor,Bs=function(C,G,oe,be){be===void 0&&(be=1),this.r=C,this.g=G,this.b=oe,this.a=be};Bs.parse=function(C){if(C){if(C instanceof Bs)return C;if(typeof C=="string"){var G=Uc(C);if(G)return new Bs(G[0]/255*G[3],G[1]/255*G[3],G[2]/255*G[3],G[3])}}},Bs.prototype.toString=function(){var C=this.toArray(),G=C[0],oe=C[1],be=C[2],Ie=C[3];return"rgba("+Math.round(G)+","+Math.round(oe)+","+Math.round(be)+","+Ie+")"},Bs.prototype.toArray=function(){var C=this,G=C.r,oe=C.g,be=C.b,Ie=C.a;return Ie===0?[0,0,0,0]:[G*255/Ie,oe*255/Ie,be*255/Ie,Ie]},Bs.black=new Bs(0,0,0,1),Bs.white=new Bs(1,1,1,1),Bs.transparent=new Bs(0,0,0,0),Bs.red=new Bs(1,0,0,1);var dc=function(C,G,oe){C?this.sensitivity=G?"variant":"case":this.sensitivity=G?"accent":"base",this.locale=oe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};dc.prototype.compare=function(C,G){return this.collator.compare(C,G)},dc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Wc=function(C,G,oe,be,Ie){this.text=C,this.image=G,this.scale=oe,this.fontStack=be,this.textColor=Ie},uu=function(C){this.sections=C};uu.fromString=function(C){return new uu([new Wc(C,null,null,null,null)])},uu.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(C){return C.text.length!==0||C.image&&C.image.name.length!==0})},uu.factory=function(C){return C instanceof uu?C:uu.fromString(C)},uu.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},uu.prototype.serialize=function(){for(var C=["format"],G=0,oe=this.sections;G=0&&k<=255&&typeof C=="number"&&C>=0&&C<=255&&typeof G=="number"&&G>=0&&G<=255)){var be=typeof oe=="number"?[k,C,G,oe]:[k,C,G];return"Invalid rgba value ["+be.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof oe>"u"||typeof oe=="number"&&oe>=0&&oe<=1?null:"Invalid rgba value ["+[k,C,G,oe].join(", ")+"]: 'a' must be between 0 and 1."}function Ou(k){if(k===null)return!0;if(typeof k=="string")return!0;if(typeof k=="boolean")return!0;if(typeof k=="number")return!0;if(k instanceof Bs)return!0;if(k instanceof dc)return!0;if(k instanceof uu)return!0;if(k instanceof Pl)return!0;if(Array.isArray(k)){for(var C=0,G=k;C2){var ft=C[1];if(typeof ft!="string"||!(ft in nc)||ft==="object")return G.error('The item type argument of "array" must be one of string, number, boolean',1);Ne=nc[ft],oe++}else Ne=uo;var It;if(C.length>3){if(C[2]!==null&&(typeof C[2]!="number"||C[2]<0||C[2]!==Math.floor(C[2])))return G.error('The length argument to "array" must be a positive integer literal',2);It=C[2],oe++}be=Jo(Ne,It)}else be=nc[Ie];for(var Ht=[];oe1)&&G.push(be)}}return G.concat(this.args.map(function(Ie){return Ie.serialize()}))};var qu=function(C){this.type=Ts,this.sections=C};qu.parse=function(C,G){if(C.length<2)return G.error("Expected at least one argument.");var oe=C[1];if(!Array.isArray(oe)&&typeof oe=="object")return G.error("First argument must be an image or text section.");for(var be=[],Ie=!1,Ne=1;Ne<=C.length-1;++Ne){var ft=C[Ne];if(Ie&&typeof ft=="object"&&!Array.isArray(ft)){Ie=!1;var It=null;if(ft["font-scale"]&&(It=G.parse(ft["font-scale"],1,yn),!It))return null;var Ht=null;if(ft["text-font"]&&(Ht=G.parse(ft["text-font"],1,Jo(Po)),!Ht))return null;var er=null;if(ft["text-color"]&&(er=G.parse(ft["text-color"],1,Ws),!er))return null;var Lr=be[be.length-1];Lr.scale=It,Lr.font=Ht,Lr.textColor=er}else{var Yr=G.parse(C[Ne],1,uo);if(!Yr)return null;var Vr=Yr.type.kind;if(Vr!=="string"&&Vr!=="value"&&Vr!=="null"&&Vr!=="resolvedImage")return G.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ie=!0,be.push({content:Yr,scale:null,font:null,textColor:null})}}return new qu(be)},qu.prototype.evaluate=function(C){var G=function(oe){var be=oe.content.evaluate(C);return nl(be)===Ls?new Wc("",be,null,null,null):new Wc(vl(be),null,oe.scale?oe.scale.evaluate(C):null,oe.font?oe.font.evaluate(C).join(","):null,oe.textColor?oe.textColor.evaluate(C):null)};return new uu(this.sections.map(G))},qu.prototype.eachChild=function(C){for(var G=0,oe=this.sections;G-1),oe},fl.prototype.eachChild=function(C){C(this.input)},fl.prototype.outputDefined=function(){return!1},fl.prototype.serialize=function(){return["image",this.input.serialize()]};var xh={"to-boolean":To,"to-color":Ws,"to-number":yn,"to-string":Po},us=function(C,G){this.type=C,this.args=G};us.parse=function(C,G){if(C.length<2)return G.error("Expected at least one argument.");var oe=C[0];if((oe==="to-boolean"||oe==="to-string")&&C.length!==2)return G.error("Expected one argument.");for(var be=xh[oe],Ie=[],Ne=1;Ne4?oe="Invalid rbga value "+JSON.stringify(G)+": expected an array containing either three or four numeric values.":oe=ic(G[0],G[1],G[2],G[3]),!oe))return new Bs(G[0]/255,G[1]/255,G[2]/255,G[3])}throw new Xs(oe||"Could not parse color from value '"+(typeof G=="string"?G:String(JSON.stringify(G)))+"'")}else if(this.type.kind==="number"){for(var It=null,Ht=0,er=this.args;Ht=C[2]||k[1]<=C[1]||k[3]>=C[3])}function Jf(k,C){var G=Ac(k[0]),oe=nf(k[1]),be=Math.pow(2,C.z);return[Math.round(G*be*ql),Math.round(oe*be*ql)]}function Of(k,C,G){var oe=k[0]-C[0],be=k[1]-C[1],Ie=k[0]-G[0],Ne=k[1]-G[1];return oe*Ne-Ie*be===0&&oe*Ie<=0&&be*Ne<=0}function of(k,C,G){return C[1]>k[1]!=G[1]>k[1]&&k[0]<(G[0]-C[0])*(k[1]-C[1])/(G[1]-C[1])+C[0]}function jc(k,C){for(var G=!1,oe=0,be=C.length;oe0&&Lr<0||er<0&&Lr>0}function Ef(k,C,G,oe){var be=[C[0]-k[0],C[1]-k[1]],Ie=[oe[0]-G[0],oe[1]-G[1]];return Nf(Ie,be)===0?!1:!!(Gu(k,C,G,oe)&&Gu(G,oe,k,C))}function oc(k,C,G){for(var oe=0,be=G;oeG[2]){var be=oe*.5,Ie=k[0]-G[0]>be?-oe:G[0]-k[0]>be?oe:0;Ie===0&&(Ie=k[0]-G[2]>be?-oe:G[2]-k[0]>be?oe:0),k[0]+=Ie}Mf(C,k)}function kf(k){k[0]=k[1]=1/0,k[2]=k[3]=-1/0}function fh(k,C,G,oe){for(var be=Math.pow(2,oe.z)*ql,Ie=[oe.x*ql,oe.y*ql],Ne=[],ft=0,It=k;ft=0)return!1;var G=!0;return k.eachChild(function(oe){G&&!Lu(oe,C)&&(G=!1)}),G}var Mc=function(C,G){this.type=G.type,this.name=C,this.boundExpression=G};Mc.parse=function(C,G){if(C.length!==2||typeof C[1]!="string")return G.error("'var' expression requires exactly one string literal argument.");var oe=C[1];return G.scope.has(oe)?new Mc(oe,G.scope.get(oe)):G.error('Unknown variable "'+oe+'". Make sure "'+oe+'" has been bound in an enclosing "let" expression before using it.',1)},Mc.prototype.evaluate=function(C){return this.boundExpression.evaluate(C)},Mc.prototype.eachChild=function(){},Mc.prototype.outputDefined=function(){return!1},Mc.prototype.serialize=function(){return["var",this.name]};var ol=function(C,G,oe,be,Ie){G===void 0&&(G=[]),be===void 0&&(be=new Hs),Ie===void 0&&(Ie=[]),this.registry=C,this.path=G,this.key=G.map(function(Ne){return"["+Ne+"]"}).join(""),this.scope=be,this.errors=Ie,this.expectedType=oe};ol.prototype.parse=function(C,G,oe,be,Ie){return Ie===void 0&&(Ie={}),G?this.concat(G,oe,be)._parse(C,Ie):this._parse(C,Ie)},ol.prototype._parse=function(C,G){(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number")&&(C=["literal",C]);function oe(er,Lr,Yr){return Yr==="assert"?new jl(Lr,[er]):Yr==="coerce"?new us(Lr,[er]):er}if(Array.isArray(C)){if(C.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var be=C[0];if(typeof be!="string")return this.error("Expression name must be a string, but found "+typeof be+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ie=this.registry[be];if(Ie){var Ne=Ie.parse(C,this);if(!Ne)return null;if(this.expectedType){var ft=this.expectedType,It=Ne.type;if((ft.kind==="string"||ft.kind==="number"||ft.kind==="boolean"||ft.kind==="object"||ft.kind==="array")&&It.kind==="value")Ne=oe(Ne,ft,G.typeAnnotation||"assert");else if((ft.kind==="color"||ft.kind==="formatted"||ft.kind==="resolvedImage")&&(It.kind==="value"||It.kind==="string"))Ne=oe(Ne,ft,G.typeAnnotation||"coerce");else if(this.checkSubtype(ft,It))return null}if(!(Ne instanceof As)&&Ne.type.kind!=="resolvedImage"&&vc(Ne)){var Ht=new Ps;try{Ne=new As(Ne.type,Ne.evaluate(Ht))}catch(er){return this.error(er.message),null}}return Ne}return this.error('Unknown expression "'+be+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof C>"u"?this.error("'undefined' value invalid. Use null instead."):typeof C=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof C+" instead.")},ol.prototype.concat=function(C,G,oe){var be=typeof C=="number"?this.path.concat(C):this.path,Ie=oe?this.scope.concat(oe):this.scope;return new ol(this.registry,be,G||null,Ie,this.errors)},ol.prototype.error=function(C){for(var G=[],oe=arguments.length-1;oe-- >0;)G[oe]=arguments[oe+1];var be=""+this.key+G.map(function(Ie){return"["+Ie+"]"}).join("");this.errors.push(new ws(be,C))},ol.prototype.checkSubtype=function(C,G){var oe=lu(C,G);return oe&&this.error(oe),oe};function vc(k){if(k instanceof Mc)return vc(k.boundExpression);if(k instanceof to&&k.name==="error")return!1;if(k instanceof Vu)return!1;if(k instanceof Cu)return!1;var C=k instanceof us||k instanceof jl,G=!0;return k.eachChild(function(oe){C?G=G&&vc(oe):G=G&&oe instanceof As}),G?jf(k)&&Lu(k,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function yu(k,C){for(var G=k.length-1,oe=0,be=G,Ie=0,Ne,ft;oe<=be;)if(Ie=Math.floor((oe+be)/2),Ne=k[Ie],ft=k[Ie+1],Ne<=C){if(Ie===G||CC)be=Ie-1;else throw new Xs("Input is not a number.");return 0}var Tu=function(C,G,oe){this.type=C,this.input=G,this.labels=[],this.outputs=[];for(var be=0,Ie=oe;be=ft)return G.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ht);var Lr=G.parse(It,er,Ie);if(!Lr)return null;Ie=Ie||Lr.type,be.push([ft,Lr])}return new Tu(Ie,oe,be)},Tu.prototype.evaluate=function(C){var G=this.labels,oe=this.outputs;if(G.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=G[0])return oe[0].evaluate(C);var Ie=G.length;if(be>=G[Ie-1])return oe[Ie-1].evaluate(C);var Ne=yu(G,be);return oe[Ne].evaluate(C)},Tu.prototype.eachChild=function(C){C(this.input);for(var G=0,oe=this.outputs;G0&&C.push(this.labels[G]),C.push(this.outputs[G].serialize());return C};function Ml(k,C,G){return k*(1-G)+C*G}function qf(k,C,G){return new Bs(Ml(k.r,C.r,G),Ml(k.g,C.g,G),Ml(k.b,C.b,G),Ml(k.a,C.a,G))}function Qf(k,C,G){return k.map(function(oe,be){return Ml(oe,C[be],G)})}var Bu=Object.freeze({__proto__:null,number:Ml,color:qf,array:Qf}),Ec=.95047,mc=1,Lh=1.08883,sf=4/29,vf=6/29,Nu=3*vf*vf,lf=vf*vf*vf,iu=Math.PI/180,Kc=180/Math.PI;function hh(k){return k>lf?Math.pow(k,1/3):k/Nu+sf}function mf(k){return k>vf?k*k*k:Nu*(k-sf)}function sl(k){return 255*(k<=.0031308?12.92*k:1.055*Math.pow(k,1/2.4)-.055)}function _u(k){return k/=255,k<=.04045?k/12.92:Math.pow((k+.055)/1.055,2.4)}function Pu(k){var C=_u(k.r),G=_u(k.g),oe=_u(k.b),be=hh((.4124564*C+.3575761*G+.1804375*oe)/Ec),Ie=hh((.2126729*C+.7151522*G+.072175*oe)/mc),Ne=hh((.0193339*C+.119192*G+.9503041*oe)/Lh);return{l:116*Ie-16,a:500*(be-Ie),b:200*(Ie-Ne),alpha:k.a}}function Cf(k){var C=(k.l+16)/116,G=isNaN(k.a)?C:C+k.a/500,oe=isNaN(k.b)?C:C-k.b/200;return C=mc*mf(C),G=Ec*mf(G),oe=Lh*mf(oe),new Bs(sl(3.2404542*G-1.5371385*C-.4985314*oe),sl(-.969266*G+1.8760108*C+.041556*oe),sl(.0556434*G-.2040259*C+1.0572252*oe),k.alpha)}function hl(k,C,G){return{l:Ml(k.l,C.l,G),a:Ml(k.a,C.a,G),b:Ml(k.b,C.b,G),alpha:Ml(k.alpha,C.alpha,G)}}function uf(k){var C=Pu(k),G=C.l,oe=C.a,be=C.b,Ie=Math.atan2(be,oe)*Kc;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(oe*oe+be*be),l:G,alpha:k.a}}function kc(k){var C=k.h*iu,G=k.c,oe=k.l;return Cf({l:oe,a:Math.cos(C)*G,b:Math.sin(C)*G,alpha:k.alpha})}function Hu(k,C,G){var oe=C-k;return k+G*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}function gf(k,C,G){return{h:Hu(k.h,C.h,G),c:Ml(k.c,C.c,G),l:Ml(k.l,C.l,G),alpha:Ml(k.alpha,C.alpha,G)}}var Wu={forward:Pu,reverse:Cf,interpolate:hl},Jc={forward:uf,reverse:kc,interpolate:gf},Lf=Object.freeze({__proto__:null,lab:Wu,hcl:Jc}),nu=function(C,G,oe,be,Ie){this.type=C,this.operator=G,this.interpolation=oe,this.input=be,this.labels=[],this.outputs=[];for(var Ne=0,ft=Ie;Ne1}))return G.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);be={name:"cubic-bezier",controlPoints:It}}else return G.error("Unknown interpolation type "+String(be[0]),1,0);if(C.length-1<4)return G.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!==0)return G.error("Expected an even number of arguments.");if(Ie=G.parse(Ie,2,yn),!Ie)return null;var Ht=[],er=null;oe==="interpolate-hcl"||oe==="interpolate-lab"?er=Ws:G.expectedType&&G.expectedType.kind!=="value"&&(er=G.expectedType);for(var Lr=0;Lr=Yr)return G.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ua);var Mi=G.parse(Vr,Oa,er);if(!Mi)return null;er=er||Mi.type,Ht.push([Yr,Mi])}return er.kind!=="number"&&er.kind!=="color"&&!(er.kind==="array"&&er.itemType.kind==="number"&&typeof er.N=="number")?G.error("Type "+Es(er)+" is not interpolatable."):new nu(er,oe,be,Ie,Ht)},nu.prototype.evaluate=function(C){var G=this.labels,oe=this.outputs;if(G.length===1)return oe[0].evaluate(C);var be=this.input.evaluate(C);if(be<=G[0])return oe[0].evaluate(C);var Ie=G.length;if(be>=G[Ie-1])return oe[Ie-1].evaluate(C);var Ne=yu(G,be),ft=G[Ne],It=G[Ne+1],Ht=nu.interpolationFactor(this.interpolation,be,ft,It),er=oe[Ne].evaluate(C),Lr=oe[Ne+1].evaluate(C);return this.operator==="interpolate"?Bu[this.type.kind.toLowerCase()](er,Lr,Ht):this.operator==="interpolate-hcl"?Jc.reverse(Jc.interpolate(Jc.forward(er),Jc.forward(Lr),Ht)):Wu.reverse(Wu.interpolate(Wu.forward(er),Wu.forward(Lr),Ht))},nu.prototype.eachChild=function(C){C(this.input);for(var G=0,oe=this.outputs;G=oe.length)throw new Xs("Array index out of bounds: "+G+" > "+(oe.length-1)+".");if(G!==Math.floor(G))throw new Xs("Array index must be an integer, but found "+G+" instead.");return oe[G]},gc.prototype.eachChild=function(C){C(this.index),C(this.input)},gc.prototype.outputDefined=function(){return!1},gc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Vl=function(C,G){this.type=To,this.needle=C,this.haystack=G};Vl.parse=function(C,G){if(C.length!==3)return G.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,uo);return!oe||!be?null:Tc(oe.type,[To,Po,yn,il,uo])?new Vl(oe,be):G.error("Expected first argument to be of type boolean, string, number or null, but found "+Es(oe.type)+" instead")},Vl.prototype.evaluate=function(C){var G=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!oe)return!1;if(!du(G,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+Es(nl(G))+" instead.");if(!du(oe,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+Es(nl(oe))+" instead.");return oe.indexOf(G)>=0},Vl.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},Vl.prototype.outputDefined=function(){return!0},Vl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xu=function(C,G,oe){this.type=yn,this.needle=C,this.haystack=G,this.fromIndex=oe};xu.parse=function(C,G){if(C.length<=2||C.length>=5)return G.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,uo);if(!oe||!be)return null;if(!Tc(oe.type,[To,Po,yn,il,uo]))return G.error("Expected first argument to be of type boolean, string, number or null, but found "+Es(oe.type)+" instead");if(C.length===4){var Ie=G.parse(C[3],3,yn);return Ie?new xu(oe,be,Ie):null}else return new xu(oe,be)},xu.prototype.evaluate=function(C){var G=this.needle.evaluate(C),oe=this.haystack.evaluate(C);if(!du(G,["boolean","string","number","null"]))throw new Xs("Expected first argument to be of type boolean, string, number or null, but found "+Es(nl(G))+" instead.");if(!du(oe,["string","array"]))throw new Xs("Expected second argument to be of type array or string, but found "+Es(nl(oe))+" instead.");if(this.fromIndex){var be=this.fromIndex.evaluate(C);return oe.indexOf(G,be)}return oe.indexOf(G)},xu.prototype.eachChild=function(C){C(this.needle),C(this.haystack),this.fromIndex&&C(this.fromIndex)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var C=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),C]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Lc=function(C,G,oe,be,Ie,Ne){this.inputType=C,this.type=G,this.input=oe,this.cases=be,this.outputs=Ie,this.otherwise=Ne};Lc.parse=function(C,G){if(C.length<5)return G.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!==1)return G.error("Expected an even number of arguments.");var oe,be;G.expectedType&&G.expectedType.kind!=="value"&&(be=G.expectedType);for(var Ie={},Ne=[],ft=2;ftNumber.MAX_SAFE_INTEGER)return er.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return er.error("Numeric branch labels must be integer values.");if(!oe)oe=nl(Vr);else if(er.checkSubtype(oe,nl(Vr)))return null;if(typeof Ie[String(Vr)]<"u")return er.error("Branch labels must be unique.");Ie[String(Vr)]=Ne.length}var ua=G.parse(Ht,ft,be);if(!ua)return null;be=be||ua.type,Ne.push(ua)}var Oa=G.parse(C[1],1,uo);if(!Oa)return null;var Mi=G.parse(C[C.length-1],C.length-1,be);return!Mi||Oa.type.kind!=="value"&&G.concat(1).checkSubtype(oe,Oa.type)?null:new Lc(oe,be,Oa,Ie,Ne,Mi)},Lc.prototype.evaluate=function(C){var G=this.input.evaluate(C),oe=nl(G)===this.inputType&&this.outputs[this.cases[G]]||this.otherwise;return oe.evaluate(C)},Lc.prototype.eachChild=function(C){C(this.input),this.outputs.forEach(C),C(this.otherwise)},Lc.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})&&this.otherwise.outputDefined()},Lc.prototype.serialize=function(){for(var C=this,G=["match",this.input.serialize()],oe=Object.keys(this.cases).sort(),be=[],Ie={},Ne=0,ft=oe;Ne=5)return G.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1,uo),be=G.parse(C[2],2,yn);if(!oe||!be)return null;if(!Tc(oe.type,[Jo(uo),Po,uo]))return G.error("Expected first argument to be of type array or string, but found "+Es(oe.type)+" instead");if(C.length===4){var Ie=G.parse(C[3],3,yn);return Ie?new sc(oe.type,oe,be,Ie):null}else return new sc(oe.type,oe,be)},sc.prototype.evaluate=function(C){var G=this.input.evaluate(C),oe=this.beginIndex.evaluate(C);if(!du(G,["string","array"]))throw new Xs("Expected first argument to be of type array or string, but found "+Es(nl(G))+" instead.");if(this.endIndex){var be=this.endIndex.evaluate(C);return G.slice(oe,be)}return G.slice(oe)},sc.prototype.eachChild=function(C){C(this.input),C(this.beginIndex),this.endIndex&&C(this.endIndex)},sc.prototype.outputDefined=function(){return!1},sc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var C=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),C]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Pc(k,C){return k==="=="||k==="!="?C.kind==="boolean"||C.kind==="string"||C.kind==="number"||C.kind==="null"||C.kind==="value":C.kind==="string"||C.kind==="number"||C.kind==="value"}function Qt(k,C,G){return C===G}function xr(k,C,G){return C!==G}function aa(k,C,G){return CG}function ka(k,C,G){return C<=G}function li(k,C,G){return C>=G}function Ci(k,C,G,oe){return oe.compare(C,G)===0}function Hi(k,C,G,oe){return!Ci(k,C,G,oe)}function Qi(k,C,G,oe){return oe.compare(C,G)<0}function pn(k,C,G,oe){return oe.compare(C,G)>0}function Pi(k,C,G,oe){return oe.compare(C,G)<=0}function Di(k,C,G,oe){return oe.compare(C,G)>=0}function Ni(k,C,G){var oe=k!=="=="&&k!=="!=";return function(){function be(Ie,Ne,ft){this.type=To,this.lhs=Ie,this.rhs=Ne,this.collator=ft,this.hasUntypedArgument=Ie.type.kind==="value"||Ne.type.kind==="value"}return be.parse=function(Ne,ft){if(Ne.length!==3&&Ne.length!==4)return ft.error("Expected two or three arguments.");var It=Ne[0],Ht=ft.parse(Ne[1],1,uo);if(!Ht)return null;if(!Pc(It,Ht.type))return ft.concat(1).error('"'+It+`" comparisons are not supported for type '`+Es(Ht.type)+"'.");var er=ft.parse(Ne[2],2,uo);if(!er)return null;if(!Pc(It,er.type))return ft.concat(2).error('"'+It+`" comparisons are not supported for type '`+Es(er.type)+"'.");if(Ht.type.kind!==er.type.kind&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot compare types '"+Es(Ht.type)+"' and '"+Es(er.type)+"'.");oe&&(Ht.type.kind==="value"&&er.type.kind!=="value"?Ht=new jl(er.type,[Ht]):Ht.type.kind!=="value"&&er.type.kind==="value"&&(er=new jl(Ht.type,[er])));var Lr=null;if(Ne.length===4){if(Ht.type.kind!=="string"&&er.type.kind!=="string"&&Ht.type.kind!=="value"&&er.type.kind!=="value")return ft.error("Cannot use collator to compare non-string types.");if(Lr=ft.parse(Ne[3],3,Ks),!Lr)return null}return new be(Ht,er,Lr)},be.prototype.evaluate=function(Ne){var ft=this.lhs.evaluate(Ne),It=this.rhs.evaluate(Ne);if(oe&&this.hasUntypedArgument){var Ht=nl(ft),er=nl(It);if(Ht.kind!==er.kind||!(Ht.kind==="string"||Ht.kind==="number"))throw new Xs('Expected arguments for "'+k+'" to be (string, string) or (number, number), but found ('+Ht.kind+", "+er.kind+") instead.")}if(this.collator&&!oe&&this.hasUntypedArgument){var Lr=nl(ft),Yr=nl(It);if(Lr.kind!=="string"||Yr.kind!=="string")return C(Ne,ft,It)}return this.collator?G(Ne,ft,It,this.collator.evaluate(Ne)):C(Ne,ft,It)},be.prototype.eachChild=function(Ne){Ne(this.lhs),Ne(this.rhs),this.collator&&Ne(this.collator)},be.prototype.outputDefined=function(){return!0},be.prototype.serialize=function(){var Ne=[k];return this.eachChild(function(ft){Ne.push(ft.serialize())}),Ne},be}()}var mi=Ni("==",Qt,Ci),Mn=Ni("!=",xr,Hi),Qn=Ni("<",aa,Qi),io=Ni(">",$r,pn),eo=Ni("<=",ka,Pi),co=Ni(">=",li,Di),An=function(C,G,oe,be,Ie){this.type=Po,this.number=C,this.locale=G,this.currency=oe,this.minFractionDigits=be,this.maxFractionDigits=Ie};An.parse=function(C,G){if(C.length!==3)return G.error("Expected two arguments.");var oe=G.parse(C[1],1,yn);if(!oe)return null;var be=C[2];if(typeof be!="object"||Array.isArray(be))return G.error("NumberFormat options argument must be an object.");var Ie=null;if(be.locale&&(Ie=G.parse(be.locale,1,Po),!Ie))return null;var Ne=null;if(be.currency&&(Ne=G.parse(be.currency,1,Po),!Ne))return null;var ft=null;if(be["min-fraction-digits"]&&(ft=G.parse(be["min-fraction-digits"],1,yn),!ft))return null;var It=null;return be["max-fraction-digits"]&&(It=G.parse(be["max-fraction-digits"],1,yn),!It)?null:new An(oe,Ie,Ne,ft,It)},An.prototype.evaluate=function(C){return new Intl.NumberFormat(this.locale?this.locale.evaluate(C):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(C):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(C):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(C):void 0}).format(this.number.evaluate(C))},An.prototype.eachChild=function(C){C(this.number),this.locale&&C(this.locale),this.currency&&C(this.currency),this.minFractionDigits&&C(this.minFractionDigits),this.maxFractionDigits&&C(this.maxFractionDigits)},An.prototype.outputDefined=function(){return!1},An.prototype.serialize=function(){var C={};return this.locale&&(C.locale=this.locale.serialize()),this.currency&&(C.currency=this.currency.serialize()),this.minFractionDigits&&(C["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(C["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),C]};var un=function(C){this.type=yn,this.input=C};un.parse=function(C,G){if(C.length!==2)return G.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var oe=G.parse(C[1],1);return oe?oe.type.kind!=="array"&&oe.type.kind!=="string"&&oe.type.kind!=="value"?G.error("Expected argument of type string or array, but found "+Es(oe.type)+" instead."):new un(oe):null},un.prototype.evaluate=function(C){var G=this.input.evaluate(C);if(typeof G=="string")return G.length;if(Array.isArray(G))return G.length;throw new Xs("Expected value to be of type string or array, but found "+Es(nl(G))+" instead.")},un.prototype.eachChild=function(C){C(this.input)},un.prototype.outputDefined=function(){return!1},un.prototype.serialize=function(){var C=["length"];return this.eachChild(function(G){C.push(G.serialize())}),C};var yo={"==":mi,"!=":Mn,">":io,"<":Qn,">=":co,"<=":eo,array:jl,at:gc,boolean:jl,case:$c,coalesce:Xu,collator:Vu,format:qu,image:fl,in:Vl,"index-of":xu,interpolate:nu,"interpolate-hcl":nu,"interpolate-lab":nu,length:un,let:Cc,literal:As,match:Lc,number:jl,"number-format":An,object:jl,slice:sc,step:Tu,string:jl,"to-boolean":us,"to-color":us,"to-number":us,"to-string":us,var:Mc,within:Cu};function Qo(k,C){var G=C[0],oe=C[1],be=C[2],Ie=C[3];G=G.evaluate(k),oe=oe.evaluate(k),be=be.evaluate(k);var Ne=Ie?Ie.evaluate(k):1,ft=ic(G,oe,be,Ne);if(ft)throw new Xs(ft);return new Bs(G/255*Ne,oe/255*Ne,be/255*Ne,Ne)}function ks(k,C){return k in C}function rl(k,C){var G=C[k];return typeof G>"u"?null:G}function Ns(k,C,G,oe){for(;G<=oe;){var be=G+oe>>1;if(C[be]===k)return!0;C[be]>k?oe=be-1:G=be+1}return!1}function el(k){return{type:k}}to.register(yo,{error:[Nl,[Po],function(k,C){var G=C[0];throw new Xs(G.evaluate(k))}],typeof:[Po,[uo],function(k,C){var G=C[0];return Es(nl(G.evaluate(k)))}],"to-rgba":[Jo(yn,4),[Ws],function(k,C){var G=C[0];return G.evaluate(k).toArray()}],rgb:[Ws,[yn,yn,yn],Qo],rgba:[Ws,[yn,yn,yn,yn],Qo],has:{type:To,overloads:[[[Po],function(k,C){var G=C[0];return ks(G.evaluate(k),k.properties())}],[[Po,Ll],function(k,C){var G=C[0],oe=C[1];return ks(G.evaluate(k),oe.evaluate(k))}]]},get:{type:uo,overloads:[[[Po],function(k,C){var G=C[0];return rl(G.evaluate(k),k.properties())}],[[Po,Ll],function(k,C){var G=C[0],oe=C[1];return rl(G.evaluate(k),oe.evaluate(k))}]]},"feature-state":[uo,[Po],function(k,C){var G=C[0];return rl(G.evaluate(k),k.featureState||{})}],properties:[Ll,[],function(k){return k.properties()}],"geometry-type":[Po,[],function(k){return k.geometryType()}],id:[uo,[],function(k){return k.id()}],zoom:[yn,[],function(k){return k.globals.zoom}],"heatmap-density":[yn,[],function(k){return k.globals.heatmapDensity||0}],"line-progress":[yn,[],function(k){return k.globals.lineProgress||0}],accumulated:[uo,[],function(k){return k.globals.accumulated===void 0?null:k.globals.accumulated}],"+":[yn,el(yn),function(k,C){for(var G=0,oe=0,be=C;oe":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be>Ie}],"filter-id->":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe>be}],"filter-<=":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be<=Ie}],"filter-id-<=":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe<=be}],"filter->=":[To,[Po,uo],function(k,C){var G=C[0],oe=C[1],be=k.properties()[G.value],Ie=oe.value;return typeof be==typeof Ie&&be>=Ie}],"filter-id->=":[To,[uo],function(k,C){var G=C[0],oe=k.id(),be=G.value;return typeof oe==typeof be&&oe>=be}],"filter-has":[To,[uo],function(k,C){var G=C[0];return G.value in k.properties()}],"filter-has-id":[To,[],function(k){return k.id()!==null&&k.id()!==void 0}],"filter-type-in":[To,[Jo(Po)],function(k,C){var G=C[0];return G.value.indexOf(k.geometryType())>=0}],"filter-id-in":[To,[Jo(uo)],function(k,C){var G=C[0];return G.value.indexOf(k.id())>=0}],"filter-in-small":[To,[Po,Jo(uo)],function(k,C){var G=C[0],oe=C[1];return oe.value.indexOf(k.properties()[G.value])>=0}],"filter-in-large":[To,[Po,Jo(uo)],function(k,C){var G=C[0],oe=C[1];return Ns(k.properties()[G.value],oe.value,0,oe.value.length-1)}],all:{type:To,overloads:[[[To,To],function(k,C){var G=C[0],oe=C[1];return G.evaluate(k)&&oe.evaluate(k)}],[el(To),function(k,C){for(var G=0,oe=C;G-1}function Un(k){return!!k.expression&&k.expression.interpolated}function Ro(k){return k instanceof Number?"number":k instanceof String?"string":k instanceof Boolean?"boolean":Array.isArray(k)?"array":k===null?"null":typeof k}function Js(k){return typeof k=="object"&&k!==null&&!Array.isArray(k)}function Fs(k){return k}function cu(k,C){var G=C.type==="color",oe=k.stops&&typeof k.stops[0][0]=="object",be=oe||k.property!==void 0,Ie=oe||!be,Ne=k.type||(Un(C)?"exponential":"interval");if(G&&(k=bs({},k),k.stops&&(k.stops=k.stops.map(function(Nn){return[Nn[0],Bs.parse(Nn[1])]})),k.default?k.default=Bs.parse(k.default):k.default=Bs.parse(C.default)),k.colorSpace&&k.colorSpace!=="rgb"&&!Lf[k.colorSpace])throw new Error("Unknown color space: "+k.colorSpace);var ft,It,Ht;if(Ne==="exponential")ft=bu;else if(Ne==="interval")ft=Ic;else if(Ne==="categorical"){ft=Zu,It=Object.create(null);for(var er=0,Lr=k.stops;er=k.stops[oe-1][0])return k.stops[oe-1][1];var be=yu(k.stops.map(function(Ie){return Ie[0]}),G);return k.stops[be][1]}function bu(k,C,G){var oe=k.base!==void 0?k.base:1;if(Ro(G)!=="number")return Iu(k.default,C.default);var be=k.stops.length;if(be===1||G<=k.stops[0][0])return k.stops[0][1];if(G>=k.stops[be-1][0])return k.stops[be-1][1];var Ie=yu(k.stops.map(function(Lr){return Lr[0]}),G),Ne=Au(G,oe,k.stops[Ie][0],k.stops[Ie+1][0]),ft=k.stops[Ie][1],It=k.stops[Ie+1][1],Ht=Bu[C.type]||Fs;if(k.colorSpace&&k.colorSpace!=="rgb"){var er=Lf[k.colorSpace];Ht=function(Lr,Yr){return er.reverse(er.interpolate(er.forward(Lr),er.forward(Yr),Ne))}}return typeof ft.evaluate=="function"?{evaluate:function(){for(var Yr=[],Vr=arguments.length;Vr--;)Yr[Vr]=arguments[Vr];var ua=ft.evaluate.apply(void 0,Yr),Oa=It.evaluate.apply(void 0,Yr);if(!(ua===void 0||Oa===void 0))return Ht(ua,Oa,Ne)}}:Ht(ft,It,Ne)}function Rc(k,C,G){return C.type==="color"?G=Bs.parse(G):C.type==="formatted"?G=uu.fromString(G.toString()):C.type==="resolvedImage"?G=Pl.fromString(G.toString()):Ro(G)!==C.type&&(C.type!=="enum"||!C.values[G])&&(G=void 0),Iu(G,k.default,C.default)}function Au(k,C,G,oe){var be=oe-G,Ie=k-G;return be===0?0:C===1?Ie/be:(Math.pow(C,Ie)-1)/(Math.pow(C,be)-1)}var yc=function(C,G){this.expression=C,this._warningHistory={},this._evaluator=new Ps,this._defaultValue=G?Me(G):null,this._enumValues=G&&G.type==="enum"?G.values:null};yc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._evaluator.globals=C,this._evaluator.feature=G,this._evaluator.featureState=oe,this._evaluator.canonical=be,this._evaluator.availableImages=Ie||null,this._evaluator.formattedSection=Ne,this.expression.evaluate(this._evaluator)},yc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){this._evaluator.globals=C,this._evaluator.feature=G||null,this._evaluator.featureState=oe||null,this._evaluator.canonical=be,this._evaluator.availableImages=Ie||null,this._evaluator.formattedSection=Ne||null;try{var 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 Xs("Expected value to be one of "+Object.keys(this._enumValues).map(function(It){return JSON.stringify(It)}).join(", ")+", but found "+JSON.stringify(ft)+" instead.");return ft}catch(It){return this._warningHistory[It.message]||(this._warningHistory[It.message]=!0,typeof console<"u"&&console.warn(It.message)),this._defaultValue}};function fo(k){return Array.isArray(k)&&k.length>0&&typeof k[0]=="string"&&k[0]in yo}function Fo(k,C){var G=new ol(yo,[],C?Te(C):void 0),oe=G.parse(k,void 0,void 0,void 0,C&&C.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?Ss(new yc(oe,C)):Fl(G.errors)}var Dc=function(C,G){this.kind=C,this._styleExpression=G,this.isStateDependent=C!=="constant"&&!ml(G.expression)};Dc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,G,oe,be,Ie,Ne)},Dc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluate(C,G,oe,be,Ie,Ne)};var lc=function(C,G,oe,be){this.kind=C,this.zoomStops=oe,this._styleExpression=G,this.isStateDependent=C!=="camera"&&!ml(G.expression),this.interpolationType=be};lc.prototype.evaluateWithoutErrorHandling=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluateWithoutErrorHandling(C,G,oe,be,Ie,Ne)},lc.prototype.evaluate=function(C,G,oe,be,Ie,Ne){return this._styleExpression.evaluate(C,G,oe,be,Ie,Ne)},lc.prototype.interpolationFactor=function(C,G,oe){return this.interpolationType?nu.interpolationFactor(this.interpolationType,C,G,oe):0};function Yu(k,C){if(k=Fo(k,C),k.result==="error")return k;var G=k.value.expression,oe=jf(G);if(!oe&&!yl(C))return Fl([new ws("","data expressions not supported")]);var be=Lu(G,["zoom"]);if(!be&&!ll(C))return Fl([new ws("","zoom expressions not supported")]);var Ie=ie(G);if(!Ie&&!be)return Fl([new ws("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof ws)return Fl([Ie]);if(Ie instanceof nu&&!Un(C))return Fl([new ws("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return Ss(oe?new Dc("constant",k.value):new Dc("source",k.value));var Ne=Ie instanceof nu?Ie.interpolation:void 0;return Ss(oe?new lc("camera",k.value,Ie.labels,Ne):new lc("composite",k.value,Ie.labels,Ne))}var Oe=function(C,G){this._parameters=C,this._specification=G,bs(this,cu(this._parameters,this._specification))};Oe.deserialize=function(C){return new Oe(C._parameters,C._specification)},Oe.serialize=function(C){return{_parameters:C._parameters,_specification:C._specification}};function I(k,C){if(Js(k))return new Oe(k,C);if(fo(k)){var G=Yu(k,C);if(G.result==="error")throw new Error(G.value.map(function(be){return be.key+": "+be.message}).join(", "));return G.value}else{var oe=k;return typeof k=="string"&&C.type==="color"&&(oe=Bs.parse(k)),{kind:"constant",evaluate:function(){return oe}}}}function ie(k){var C=null;if(k instanceof Cc)C=ie(k.result);else if(k instanceof Xu)for(var G=0,oe=k.args;Goe.maximum?[new Pn(C,G,G+" is greater than the maximum value "+oe.maximum)]:[]}function Ot(k){var C=k.valueSpec,G=lo(k.value.type),oe,be={},Ie,Ne,ft=G!=="categorical"&&k.value.property===void 0,It=!ft,Ht=Ro(k.value.stops)==="array"&&Ro(k.value.stops[0])==="array"&&Ro(k.value.stops[0][0])==="object",er=ze({key:k.key,value:k.value,valueSpec:k.styleSpec.function,style:k.style,styleSpec:k.styleSpec,objectElementValidators:{stops:Lr,default:ua}});return G==="identity"&&ft&&er.push(new Pn(k.key,k.value,'missing required property "property"')),G!=="identity"&&!k.value.stops&&er.push(new Pn(k.key,k.value,'missing required property "stops"')),G==="exponential"&&k.valueSpec.expression&&!Un(k.valueSpec)&&er.push(new Pn(k.key,k.value,"exponential functions not supported")),k.styleSpec.$version>=8&&(It&&!yl(k.valueSpec)?er.push(new Pn(k.key,k.value,"property functions not supported")):ft&&!ll(k.valueSpec)&&er.push(new Pn(k.key,k.value,"zoom functions not supported"))),(G==="categorical"||Ht)&&k.value.property===void 0&&er.push(new Pn(k.key,k.value,'"property" property is required')),er;function Lr(Oa){if(G==="identity")return[new Pn(Oa.key,Oa.value,'identity function may not have a "stops" property')];var Mi=[],ni=Oa.value;return Mi=Mi.concat(ht({key:Oa.key,value:ni,valueSpec:Oa.valueSpec,style:Oa.style,styleSpec:Oa.styleSpec,arrayElementValidator:Yr})),Ro(ni)==="array"&&ni.length===0&&Mi.push(new Pn(Oa.key,ni,"array must have at least one stop")),Mi}function Yr(Oa){var Mi=[],ni=Oa.value,$i=Oa.key;if(Ro(ni)!=="array")return[new Pn($i,ni,"array expected, "+Ro(ni)+" found")];if(ni.length!==2)return[new Pn($i,ni,"array length 2 expected, length "+ni.length+" found")];if(Ht){if(Ro(ni[0])!=="object")return[new Pn($i,ni,"object expected, "+Ro(ni[0])+" found")];if(ni[0].zoom===void 0)return[new Pn($i,ni,"object stop key must have zoom")];if(ni[0].value===void 0)return[new Pn($i,ni,"object stop key must have value")];if(Ne&&Ne>lo(ni[0].zoom))return[new Pn($i,ni[0].zoom,"stop zoom values must appear in ascending order")];lo(ni[0].zoom)!==Ne&&(Ne=lo(ni[0].zoom),Ie=void 0,be={}),Mi=Mi.concat(ze({key:$i+"[0]",value:ni[0],valueSpec:{zoom:{}},style:Oa.style,styleSpec:Oa.styleSpec,objectElementValidators:{zoom:wt,value:Vr}}))}else Mi=Mi.concat(Vr({key:$i+"[0]",value:ni[0],valueSpec:{},style:Oa.style,styleSpec:Oa.styleSpec},ni));return fo(Zo(ni[1]))?Mi.concat([new Pn($i+"[1]",ni[1],"expressions are not allowed in function stops.")]):Mi.concat(Mo({key:$i+"[1]",value:ni[1],valueSpec:C,style:Oa.style,styleSpec:Oa.styleSpec}))}function Vr(Oa,Mi){var ni=Ro(Oa.value),$i=lo(Oa.value),Oi=Oa.value!==null?Oa.value:Mi;if(!oe)oe=ni;else if(ni!==oe)return[new Pn(Oa.key,Oi,ni+" stop domain type must match previous stop domain type "+oe)];if(ni!=="number"&&ni!=="string"&&ni!=="boolean")return[new Pn(Oa.key,Oi,"stop domain value must be a number, string, or boolean")];if(ni!=="number"&&G!=="categorical"){var Ji="number expected, "+ni+" found";return yl(C)&&G===void 0&&(Ji+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pn(Oa.key,Oi,Ji)]}return G==="categorical"&&ni==="number"&&(!isFinite($i)||Math.floor($i)!==$i)?[new Pn(Oa.key,Oi,"integer expected, found "+$i)]:G!=="categorical"&&ni==="number"&&Ie!==void 0&&$i=2&&k[1]!=="$id"&&k[1]!=="$type";case"in":return k.length>=3&&(typeof k[1]!="string"||Array.isArray(k[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return k.length!==3||Array.isArray(k[1])||Array.isArray(k[2]);case"any":case"all":for(var C=0,G=k.slice(1);CC?1:0}function pt(k){if(!Array.isArray(k))return!1;if(k[0]==="within")return!0;for(var C=1;C"||C==="<="||C===">="?bt(k[1],k[2],C):C==="any"?Dt(k.slice(1)):C==="all"?["all"].concat(k.slice(1).map(Et)):C==="none"?["all"].concat(k.slice(1).map(Et).map(Er)):C==="in"?ur(k[1],k.slice(2)):C==="!in"?Er(ur(k[1],k.slice(2))):C==="has"?yr(k[1]):C==="!has"?Er(yr(k[1])):C==="within"?k:!0;return G}function bt(k,C,G){switch(k){case"$type":return["filter-type-"+G,C];case"$id":return["filter-id-"+G,C];default:return["filter-"+G,k,C]}}function Dt(k){return["any"].concat(k.map(Et))}function ur(k,C){if(C.length===0)return!1;switch(k){case"$type":return["filter-type-in",["literal",C]];case"$id":return["filter-id-in",["literal",C]];default:return C.length>200&&!C.some(function(G){return typeof G!=typeof C[0]})?["filter-in-large",k,["literal",C.sort(lt)]]:["filter-in-small",k,["literal",C]]}}function yr(k){switch(k){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",k]}}function Er(k){return["!",k]}function jr(k){return na(Zo(k.value))?$t(bs({},k,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(k)}function Qr(k){var C=k.value,G=k.key;if(Ro(C)!=="array")return[new Pn(G,C,"array expected, "+Ro(C)+" found")];var oe=k.styleSpec,be,Ie=[];if(C.length<1)return[new Pn(G,C,"filter array must have at least 1 element")];switch(Ie=Ie.concat(Kr({key:G+"[0]",value:C[0],valueSpec:oe.filter_operator,style:k.style,styleSpec:k.styleSpec})),lo(C[0])){case"<":case"<=":case">":case">=":C.length>=2&&lo(C[1])==="$type"&&Ie.push(new Pn(G,C,'"$type" cannot be use with operator "'+C[0]+'"'));case"==":case"!=":C.length!==3&&Ie.push(new Pn(G,C,'filter array for operator "'+C[0]+'" must have 3 elements'));case"in":case"!in":C.length>=2&&(be=Ro(C[1]),be!=="string"&&Ie.push(new Pn(G+"[1]",C[1],"string expected, "+be+" found")));for(var Ne=2;Ne=er[Vr+0]&&oe>=er[Vr+1])?(Ne[Yr]=!0,Ie.push(Ht[Yr])):Ne[Yr]=!1}}},fu.prototype._forEachCell=function(k,C,G,oe,be,Ie,Ne,ft){for(var It=this._convertToCellCoord(k),Ht=this._convertToCellCoord(C),er=this._convertToCellCoord(G),Lr=this._convertToCellCoord(oe),Yr=It;Yr<=er;Yr++)for(var Vr=Ht;Vr<=Lr;Vr++){var ua=this.d*Vr+Yr;if(!(ft&&!ft(this._convertFromCellCoord(Yr),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Yr+1),this._convertFromCellCoord(Vr+1)))&&be.call(this,k,C,G,oe,ua,Ie,Ne,ft))return}},fu.prototype._convertFromCellCoord=function(k){return(k-this.padding)/this.scale},fu.prototype._convertToCellCoord=function(k){return Math.max(0,Math.min(this.d-1,Math.floor(k*this.scale)+this.padding))},fu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var k=this.cells,C=wl+this.cells.length+1+1,G=0,oe=0;oe=0)){var Lr=k[er];Ht[er]=Hl[It].shallow.indexOf(er)>=0?Lr:yt(Lr,C)}k instanceof Error&&(Ht.message=k.message)}if(Ht.$name)throw new Error("$name property is reserved for worker serialization logic.");return It!=="Object"&&(Ht.$name=It),Ht}throw new Error("can't serialize object of type "+typeof k)}function Tt(k){if(k==null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||k instanceof Boolean||k instanceof Number||k instanceof String||k instanceof Date||k instanceof RegExp||et(k)||dt(k)||ArrayBuffer.isView(k)||k instanceof uc)return k;if(Array.isArray(k))return k.map(Tt);if(typeof k=="object"){var C=k.$name||"Object",G=Hl[C],oe=G.klass;if(!oe)throw new Error("can't deserialize unregistered class "+C);if(oe.deserialize)return oe.deserialize(k);for(var be=Object.create(oe.prototype),Ie=0,Ne=Object.keys(k);Ie=0?It:Tt(It)}}return be}throw new Error("can't deserialize object of type "+typeof k)}var tr=function(){this.first=!0};tr.prototype.update=function(C,G){var oe=Math.floor(C);return this.first?(this.first=!1,this.lastIntegerZoom=oe,this.lastIntegerZoomTime=0,this.lastZoom=C,this.lastFloorZoom=oe,!0):(this.lastFloorZoom>oe?(this.lastIntegerZoom=oe+1,this.lastIntegerZoomTime=G):this.lastFloorZoom=128&&k<=255},Arabic:function(k){return k>=1536&&k<=1791},"Arabic Supplement":function(k){return k>=1872&&k<=1919},"Arabic Extended-A":function(k){return k>=2208&&k<=2303},"Hangul Jamo":function(k){return k>=4352&&k<=4607},"Unified Canadian Aboriginal Syllabics":function(k){return k>=5120&&k<=5759},Khmer:function(k){return k>=6016&&k<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(k){return k>=6320&&k<=6399},"General Punctuation":function(k){return k>=8192&&k<=8303},"Letterlike Symbols":function(k){return k>=8448&&k<=8527},"Number Forms":function(k){return k>=8528&&k<=8591},"Miscellaneous Technical":function(k){return k>=8960&&k<=9215},"Control Pictures":function(k){return k>=9216&&k<=9279},"Optical Character Recognition":function(k){return k>=9280&&k<=9311},"Enclosed Alphanumerics":function(k){return k>=9312&&k<=9471},"Geometric Shapes":function(k){return k>=9632&&k<=9727},"Miscellaneous Symbols":function(k){return k>=9728&&k<=9983},"Miscellaneous Symbols and Arrows":function(k){return k>=11008&&k<=11263},"CJK Radicals Supplement":function(k){return k>=11904&&k<=12031},"Kangxi Radicals":function(k){return k>=12032&&k<=12255},"Ideographic Description Characters":function(k){return k>=12272&&k<=12287},"CJK Symbols and Punctuation":function(k){return k>=12288&&k<=12351},Hiragana:function(k){return k>=12352&&k<=12447},Katakana:function(k){return k>=12448&&k<=12543},Bopomofo:function(k){return k>=12544&&k<=12591},"Hangul Compatibility Jamo":function(k){return k>=12592&&k<=12687},Kanbun:function(k){return k>=12688&&k<=12703},"Bopomofo Extended":function(k){return k>=12704&&k<=12735},"CJK Strokes":function(k){return k>=12736&&k<=12783},"Katakana Phonetic Extensions":function(k){return k>=12784&&k<=12799},"Enclosed CJK Letters and Months":function(k){return k>=12800&&k<=13055},"CJK Compatibility":function(k){return k>=13056&&k<=13311},"CJK Unified Ideographs Extension A":function(k){return k>=13312&&k<=19903},"Yijing Hexagram Symbols":function(k){return k>=19904&&k<=19967},"CJK Unified Ideographs":function(k){return k>=19968&&k<=40959},"Yi Syllables":function(k){return k>=40960&&k<=42127},"Yi Radicals":function(k){return k>=42128&&k<=42191},"Hangul Jamo Extended-A":function(k){return k>=43360&&k<=43391},"Hangul Syllables":function(k){return k>=44032&&k<=55215},"Hangul Jamo Extended-B":function(k){return k>=55216&&k<=55295},"Private Use Area":function(k){return k>=57344&&k<=63743},"CJK Compatibility Ideographs":function(k){return k>=63744&&k<=64255},"Arabic Presentation Forms-A":function(k){return k>=64336&&k<=65023},"Vertical Forms":function(k){return k>=65040&&k<=65055},"CJK Compatibility Forms":function(k){return k>=65072&&k<=65103},"Small Form Variants":function(k){return k>=65104&&k<=65135},"Arabic Presentation Forms-B":function(k){return k>=65136&&k<=65279},"Halfwidth and Fullwidth Forms":function(k){return k>=65280&&k<=65519}};function _r(k){for(var C=0,G=k;C=65097&&k<=65103)||zt["CJK Compatibility Ideographs"](k)||zt["CJK Compatibility"](k)||zt["CJK Radicals Supplement"](k)||zt["CJK Strokes"](k)||zt["CJK Symbols and Punctuation"](k)&&!(k>=12296&&k<=12305)&&!(k>=12308&&k<=12319)&&k!==12336||zt["CJK Unified Ideographs Extension A"](k)||zt["CJK Unified Ideographs"](k)||zt["Enclosed CJK Letters and Months"](k)||zt["Hangul Compatibility Jamo"](k)||zt["Hangul Jamo Extended-A"](k)||zt["Hangul Jamo Extended-B"](k)||zt["Hangul Jamo"](k)||zt["Hangul Syllables"](k)||zt.Hiragana(k)||zt["Ideographic Description Characters"](k)||zt.Kanbun(k)||zt["Kangxi Radicals"](k)||zt["Katakana Phonetic Extensions"](k)||zt.Katakana(k)&&k!==12540||zt["Halfwidth and Fullwidth Forms"](k)&&k!==65288&&k!==65289&&k!==65293&&!(k>=65306&&k<=65310)&&k!==65339&&k!==65341&&k!==65343&&!(k>=65371&&k<=65503)&&k!==65507&&!(k>=65512&&k<=65519)||zt["Small Form Variants"](k)&&!(k>=65112&&k<=65118)&&!(k>=65123&&k<=65126)||zt["Unified Canadian Aboriginal Syllabics"](k)||zt["Unified Canadian Aboriginal Syllabics Extended"](k)||zt["Vertical Forms"](k)||zt["Yijing Hexagram Symbols"](k)||zt["Yi Syllables"](k)||zt["Yi Radicals"](k))}function Ja(k){return!!(zt["Latin-1 Supplement"](k)&&(k===167||k===169||k===174||k===177||k===188||k===189||k===190||k===215||k===247)||zt["General Punctuation"](k)&&(k===8214||k===8224||k===8225||k===8240||k===8241||k===8251||k===8252||k===8258||k===8263||k===8264||k===8265||k===8273)||zt["Letterlike Symbols"](k)||zt["Number Forms"](k)||zt["Miscellaneous Technical"](k)&&(k>=8960&&k<=8967||k>=8972&&k<=8991||k>=8996&&k<=9e3||k===9003||k>=9085&&k<=9114||k>=9150&&k<=9165||k===9167||k>=9169&&k<=9179||k>=9186&&k<=9215)||zt["Control Pictures"](k)&&k!==9251||zt["Optical Character Recognition"](k)||zt["Enclosed Alphanumerics"](k)||zt["Geometric Shapes"](k)||zt["Miscellaneous Symbols"](k)&&!(k>=9754&&k<=9759)||zt["Miscellaneous Symbols and Arrows"](k)&&(k>=11026&&k<=11055||k>=11088&&k<=11097||k>=11192&&k<=11243)||zt["CJK Symbols and Punctuation"](k)||zt.Katakana(k)||zt["Private Use Area"](k)||zt["CJK Compatibility Forms"](k)||zt["Small Form Variants"](k)||zt["Halfwidth and Fullwidth Forms"](k)||k===8734||k===8756||k===8757||k>=9984&&k<=10087||k>=10102&&k<=10131||k===65532||k===65533)}function ti(k){return!(pa(k)||Ja(k))}function Sa(k){return zt.Arabic(k)||zt["Arabic Supplement"](k)||zt["Arabic Extended-A"](k)||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k)}function za(k){return k>=1424&&k<=2303||zt["Arabic Presentation Forms-A"](k)||zt["Arabic Presentation Forms-B"](k)}function Xa(k,C){return!(!C&&za(k)||k>=2304&&k<=3583||k>=3840&&k<=4255||zt.Khmer(k))}function fi(k){for(var C=0,G=k;C-1&&(an=La.error),sn&&sn(k)};function Jn(){ro.fire(new Or("pluginStateChange",{pluginStatus:an,pluginURL:dn}))}var ro=new wr,$o=function(){return an},no=function(k){return k({pluginStatus:an,pluginURL:dn}),ro.on("pluginStateChange",k),k},Xo=function(k,C,G){if(G===void 0&&(G=!1),an===La.deferred||an===La.loading||an===La.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");dn=we.resolveURL(k),an=La.deferred,sn=C,Jn(),G||cl()},cl=function(){if(an!==La.deferred||!dn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");an=La.loading,Jn(),dn&&ra({url:dn},function(k){k?In(k):(an=La.loaded,Jn())})},al={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return an===La.loaded||al.applyArabicShaping!=null},isLoading:function(){return an===La.loading},setState:function(C){an=C.pluginStatus,dn=C.pluginURL},isParsed:function(){return al.applyArabicShaping!=null&&al.processBidirectionalText!=null&&al.processStyledBidirectionalText!=null},getPluginURL:function(){return dn}},_l=function(){!al.isLoading()&&!al.isLoaded()&&$o()==="deferred"&&cl()},mn=function(C,G){this.zoom=C,G?(this.now=G.now,this.fadeDuration=G.fadeDuration,this.zoomHistory=G.zoomHistory,this.transition=G.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new tr,this.transition={})};mn.prototype.isSupportedScript=function(C){return oi(C,al.isLoaded())},mn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},mn.prototype.getCrossfadeParameters=function(){var C=this.zoom,G=C-Math.floor(C),oe=this.crossFadingFactor();return C>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:G+(1-G)*oe}:{fromScale:.5,toScale:1,t:1-(1-oe)*G}};var po=function(C,G){this.property=C,this.value=G,this.expression=I(G===void 0?C.specification.default:G,C.specification)};po.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},po.prototype.possiblyEvaluate=function(C,G,oe){return this.property.possiblyEvaluate(this,C,G,oe)};var fs=function(C){this.property=C,this.value=new po(C,void 0)};fs.prototype.transitioned=function(C,G){return new Tl(this.property,this.value,G,p({},C.transition,this.transition),C.now)},fs.prototype.untransitioned=function(){return new Tl(this.property,this.value,null,{},0)};var ms=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};ms.prototype.getValue=function(C){return O(this._values[C].value.value)},ms.prototype.setValue=function(C,G){this._values.hasOwnProperty(C)||(this._values[C]=new fs(this._values[C].property)),this._values[C].value=new po(this._values[C].property,G===null?void 0:O(G))},ms.prototype.getTransition=function(C){return O(this._values[C].transition)},ms.prototype.setTransition=function(C,G){this._values.hasOwnProperty(C)||(this._values[C]=new fs(this._values[C].property)),this._values[C].transition=O(G)||void 0},ms.prototype.serialize=function(){for(var C={},G=0,oe=Object.keys(this._values);Gthis.end)return this.prior=null,Ie;if(this.value.isDataDriven())return this.prior=null,Ie;if(beNe.zoomHistory.lastIntegerZoom?{from:oe,to:be}:{from:Ie,to:be}},C.prototype.interpolate=function(oe){return oe},C}(Xt),oa=function(C){this.specification=C};oa.prototype.possiblyEvaluate=function(C,G,oe,be){if(C.value!==void 0)if(C.expression.kind==="constant"){var Ie=C.expression.evaluate(G,null,{},oe,be);return this._calculate(Ie,Ie,Ie,G)}else return this._calculate(C.expression.evaluate(new mn(Math.floor(G.zoom-1),G)),C.expression.evaluate(new mn(Math.floor(G.zoom),G)),C.expression.evaluate(new mn(Math.floor(G.zoom+1),G)),G)},oa.prototype._calculate=function(C,G,oe,be){var Ie=be.zoom;return Ie>be.zoomHistory.lastIntegerZoom?{from:C,to:G}:{from:oe,to:G}},oa.prototype.interpolate=function(C){return C};var Ta=function(C){this.specification=C};Ta.prototype.possiblyEvaluate=function(C,G,oe,be){return!!C.expression.evaluate(G,null,{},oe,be)},Ta.prototype.interpolate=function(){return!1};var ma=function(C){this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var G in C){var oe=C[G];oe.specification.overridable&&this.overridableProperties.push(G);var be=this.defaultPropertyValues[G]=new po(oe,void 0),Ie=this.defaultTransitionablePropertyValues[G]=new fs(oe);this.defaultTransitioningPropertyValues[G]=Ie.untransitioned(),this.defaultPossiblyEvaluatedValues[G]=be.possiblyEvaluate({})}};me("DataDrivenProperty",Xt),me("DataConstantProperty",it),me("CrossFadedDataDrivenProperty",fr),me("CrossFadedProperty",oa),me("ColorRampProperty",Ta);var xa="-transition",Ya=function(k){function C(G,oe){if(k.call(this),this.id=G.id,this.type=G.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},G.type!=="custom"&&(G=G,this.metadata=G.metadata,this.minzoom=G.minzoom,this.maxzoom=G.maxzoom,G.type!=="background"&&(this.source=G.source,this.sourceLayer=G["source-layer"],this.filter=G.filter),oe.layout&&(this._unevaluatedLayout=new Su(oe.layout)),oe.paint)){this._transitionablePaint=new ms(oe.paint);for(var be in G.paint)this.setPaintProperty(be,G.paint[be],{validate:!1});for(var Ie in G.layout)this.setLayoutProperty(Ie,G.layout[Ie],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _c(oe.paint)}}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},C.prototype.getLayoutProperty=function(oe){return oe==="visibility"?this.visibility:this._unevaluatedLayout.getValue(oe)},C.prototype.setLayoutProperty=function(oe,be,Ie){if(Ie===void 0&&(Ie={}),be!=null){var Ne="layers."+this.id+".layout."+oe;if(this._validate(tu,Ne,oe,be,Ie))return}if(oe==="visibility"){this.visibility=be;return}this._unevaluatedLayout.setValue(oe,be)},C.prototype.getPaintProperty=function(oe){return z(oe,xa)?this._transitionablePaint.getTransition(oe.slice(0,-xa.length)):this._transitionablePaint.getValue(oe)},C.prototype.setPaintProperty=function(oe,be,Ie){if(Ie===void 0&&(Ie={}),be!=null){var Ne="layers."+this.id+".paint."+oe;if(this._validate(Il,Ne,oe,be,Ie))return!1}if(z(oe,xa))return this._transitionablePaint.setTransition(oe.slice(0,-xa.length),be||void 0),!1;var ft=this._transitionablePaint._values[oe],It=ft.property.specification["property-type"]==="cross-faded-data-driven",Ht=ft.value.isDataDriven(),er=ft.value;this._transitionablePaint.setValue(oe,be),this._handleSpecialPaintPropertyUpdate(oe);var Lr=this._transitionablePaint._values[oe].value,Yr=Lr.isDataDriven();return Yr||Ht||It||this._handleOverridablePaintPropertyUpdate(oe,er,Lr)},C.prototype._handleSpecialPaintPropertyUpdate=function(oe){},C.prototype._handleOverridablePaintPropertyUpdate=function(oe,be,Ie){return!1},C.prototype.isHidden=function(oe){return this.minzoom&&oe=this.maxzoom?!0:this.visibility==="none"},C.prototype.updateTransitions=function(oe){this._transitioningPaint=this._transitionablePaint.transitioned(oe,this._transitioningPaint)},C.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},C.prototype.recalculate=function(oe,be){oe.getCrossfadeParameters&&(this._crossfadeParameters=oe.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(oe,void 0,be)),this.paint=this._transitioningPaint.possiblyEvaluate(oe,void 0,be)},C.prototype.serialize=function(){var oe={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&&(oe.layout=oe.layout||{},oe.layout.visibility=this.visibility),N(oe,function(be,Ie){return be!==void 0&&!(Ie==="layout"&&!Object.keys(be).length)&&!(Ie==="paint"&&!Object.keys(be).length)})},C.prototype._validate=function(oe,be,Ie,Ne,ft){return ft===void 0&&(ft={}),ft&&ft.validate===!1?!1:Ru(this,oe.call(es,{key:be,layerType:this.type,objectKey:Ie,value:Ne,styleSpec:Gi,style:{glyphs:!0,sprite:!0}}))},C.prototype.is3D=function(){return!1},C.prototype.isTileClipped=function(){return!1},C.prototype.hasOffscreenPass=function(){return!1},C.prototype.resize=function(){},C.prototype.isStateDependent=function(){for(var oe in this.paint._values){var be=this.paint.get(oe);if(!(!(be instanceof Rl)||!yl(be.property.specification))&&(be.value.kind==="source"||be.value.kind==="composite")&&be.value.isStateDependent)return!0}return!1},C}(wr),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},yi=function(C,G){this._structArray=C,this._pos1=G*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},si=128,gn=5,zi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};zi.serialize=function(C,G){return C._trim(),G&&(C.isTransferred=!0,G.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},zi.deserialize=function(C){var G=Object.create(this.prototype);return G.arrayBuffer=C.arrayBuffer,G.length=C.length,G.capacity=C.arrayBuffer.byteLength/G.bytesPerElement,G._refreshViews(),G},zi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},zi.prototype.clear=function(){this.length=0},zi.prototype.resize=function(C){this.reserve(C),this.length=C},zi.prototype.reserve=function(C){if(C>this.capacity){this.capacity=Math.max(C,Math.floor(this.capacity*gn),si),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var G=this.uint8;this._refreshViews(),G&&this.uint8.set(G)}},zi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Ei(k,C){C===void 0&&(C=1);var G=0,oe=0,be=k.map(function(Ne){var ft=Na(Ne.type),It=G=ea(G,Math.max(C,ft)),Ht=Ne.components||1;return oe=Math.max(oe,ft),G+=ft*Ht,{name:Ne.name,type:Ne.type,components:Ht,offset:It}}),Ie=ea(G,Math.max(oe,C));return{members:be,size:Ie,alignment:C}}function Na(k){return bi[k].BYTES_PER_ELEMENT}function ea(k,C){return Math.ceil(k/C)*C}var Ma=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.int16[Ne+0]=be,this.int16[Ne+1]=Ie,oe},C}(zi);Ma.prototype.bytesPerElement=4,me("StructArrayLayout2i4",Ma);var Qa=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*4;return this.int16[It+0]=be,this.int16[It+1]=Ie,this.int16[It+2]=Ne,this.int16[It+3]=ft,oe},C}(zi);Qa.prototype.bytesPerElement=8,me("StructArrayLayout4i8",Qa);var di=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Ie,this.int16[er+2]=Ne,this.int16[er+3]=ft,this.int16[er+4]=It,this.int16[er+5]=Ht,oe},C}(zi);di.prototype.bytesPerElement=12,me("StructArrayLayout2i4i12",di);var Va=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*4,Lr=oe*8;return this.int16[er+0]=be,this.int16[er+1]=Ie,this.uint8[Lr+4]=Ne,this.uint8[Lr+5]=ft,this.uint8[Lr+6]=It,this.uint8[Lr+7]=Ht,oe},C}(zi);Va.prototype.bytesPerElement=8,me("StructArrayLayout2i4ub8",Va);var Bi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.float32[Ne+0]=be,this.float32[Ne+1]=Ie,oe},C}(zi);Bi.prototype.bytesPerElement=8,me("StructArrayLayout2f8",Bi);var Li=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr){var ua=oe*10;return this.uint16[ua+0]=be,this.uint16[ua+1]=Ie,this.uint16[ua+2]=Ne,this.uint16[ua+3]=ft,this.uint16[ua+4]=It,this.uint16[ua+5]=Ht,this.uint16[ua+6]=er,this.uint16[ua+7]=Lr,this.uint16[ua+8]=Yr,this.uint16[ua+9]=Vr,oe},C}(zi);Li.prototype.bytesPerElement=20,me("StructArrayLayout10ui20",Li);var hn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua){var Oa=this.length;return this.resize(Oa+1),this.emplace(Oa,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa){var Mi=oe*12;return this.int16[Mi+0]=be,this.int16[Mi+1]=Ie,this.int16[Mi+2]=Ne,this.int16[Mi+3]=ft,this.uint16[Mi+4]=It,this.uint16[Mi+5]=Ht,this.uint16[Mi+6]=er,this.uint16[Mi+7]=Lr,this.int16[Mi+8]=Yr,this.int16[Mi+9]=Vr,this.int16[Mi+10]=ua,this.int16[Mi+11]=Oa,oe},C}(zi);hn.prototype.bytesPerElement=24,me("StructArrayLayout4i4ui4i24",hn);var Ha=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.float32[ft+0]=be,this.float32[ft+1]=Ie,this.float32[ft+2]=Ne,oe},C}(zi);Ha.prototype.bytesPerElement=12,me("StructArrayLayout3f12",Ha);var Ua=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Ie=oe*1;return this.uint32[Ie+0]=be,oe},C}(zi);Ua.prototype.bytesPerElement=4,me("StructArrayLayout1ul4",Ua);var Yi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr){var Yr=this.length;return this.resize(Yr+1),this.emplace(Yr,oe,be,Ie,Ne,ft,It,Ht,er,Lr)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr){var Vr=oe*10,ua=oe*5;return this.int16[Vr+0]=be,this.int16[Vr+1]=Ie,this.int16[Vr+2]=Ne,this.int16[Vr+3]=ft,this.int16[Vr+4]=It,this.int16[Vr+5]=Ht,this.uint32[ua+3]=er,this.uint16[Vr+8]=Lr,this.uint16[Vr+9]=Yr,oe},C}(zi);Yi.prototype.bytesPerElement=20,me("StructArrayLayout6i1ul2ui20",Yi);var Ri=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,oe,be,Ie,Ne,ft,It)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht){var er=oe*6;return this.int16[er+0]=be,this.int16[er+1]=Ie,this.int16[er+2]=Ne,this.int16[er+3]=ft,this.int16[er+4]=It,this.int16[er+5]=Ht,oe},C}(zi);Ri.prototype.bytesPerElement=12,me("StructArrayLayout2i2i2i12",Ri);var Ti=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft){var It=this.length;return this.resize(It+1),this.emplace(It,oe,be,Ie,Ne,ft)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It){var Ht=oe*4,er=oe*8;return this.float32[Ht+0]=be,this.float32[Ht+1]=Ie,this.float32[Ht+2]=Ne,this.int16[er+6]=ft,this.int16[er+7]=It,oe},C}(zi);Ti.prototype.bytesPerElement=16,me("StructArrayLayout2f1f2i16",Ti);var xi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*12,Ht=oe*3;return this.uint8[It+0]=be,this.uint8[It+1]=Ie,this.float32[Ht+1]=Ne,this.float32[Ht+2]=ft,oe},C}(zi);xi.prototype.bytesPerElement=12,me("StructArrayLayout2ub2f12",xi);var Xi=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.uint16[ft+0]=be,this.uint16[ft+1]=Ie,this.uint16[ft+2]=Ne,oe},C}(zi);Xi.prototype.bytesPerElement=6,me("StructArrayLayout3ui6",Xi);var vn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi){var Ji=this.length;return this.resize(Ji+1),this.emplace(Ji,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi,Ji){var ln=oe*24,bn=oe*12,qn=oe*48;return this.int16[ln+0]=be,this.int16[ln+1]=Ie,this.uint16[ln+2]=Ne,this.uint16[ln+3]=ft,this.uint32[bn+2]=It,this.uint32[bn+3]=Ht,this.uint32[bn+4]=er,this.uint16[ln+10]=Lr,this.uint16[ln+11]=Yr,this.uint16[ln+12]=Vr,this.float32[bn+7]=ua,this.float32[bn+8]=Oa,this.uint8[qn+36]=Mi,this.uint8[qn+37]=ni,this.uint8[qn+38]=$i,this.uint32[bn+10]=Oi,this.int16[ln+22]=Ji,oe},C}(zi);vn.prototype.bytesPerElement=48,me("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",vn);var Rn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.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)},C.prototype.emplaceBack=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do){var $s=this.length;return this.resize($s+1),this.emplace($s,oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do)},C.prototype.emplace=function(oe,be,Ie,Ne,ft,It,Ht,er,Lr,Yr,Vr,ua,Oa,Mi,ni,$i,Oi,Ji,ln,bn,qn,Nn,Eo,oo,mo,Is,ko,Do,$s){var Ms=oe*34,Zl=oe*17;return this.int16[Ms+0]=be,this.int16[Ms+1]=Ie,this.int16[Ms+2]=Ne,this.int16[Ms+3]=ft,this.int16[Ms+4]=It,this.int16[Ms+5]=Ht,this.int16[Ms+6]=er,this.int16[Ms+7]=Lr,this.uint16[Ms+8]=Yr,this.uint16[Ms+9]=Vr,this.uint16[Ms+10]=ua,this.uint16[Ms+11]=Oa,this.uint16[Ms+12]=Mi,this.uint16[Ms+13]=ni,this.uint16[Ms+14]=$i,this.uint16[Ms+15]=Oi,this.uint16[Ms+16]=Ji,this.uint16[Ms+17]=ln,this.uint16[Ms+18]=bn,this.uint16[Ms+19]=qn,this.uint16[Ms+20]=Nn,this.uint16[Ms+21]=Eo,this.uint16[Ms+22]=oo,this.uint32[Zl+12]=mo,this.float32[Zl+13]=Is,this.float32[Zl+14]=ko,this.float32[Zl+15]=Do,this.float32[Zl+16]=$s,oe},C}(zi);Rn.prototype.bytesPerElement=68,me("StructArrayLayout8i15ui1ul4f68",Rn);var Ii=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Ie=oe*1;return this.float32[Ie+0]=be,oe},C}(zi);Ii.prototype.bytesPerElement=4,me("StructArrayLayout1f4",Ii);var nn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*3;return this.int16[ft+0]=be,this.int16[ft+1]=Ie,this.int16[ft+2]=Ne,oe},C}(zi);nn.prototype.bytesPerElement=6,me("StructArrayLayout3i6",nn);var Ln=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,oe,be,Ie)},C.prototype.emplace=function(oe,be,Ie,Ne){var ft=oe*2,It=oe*4;return this.uint32[ft+0]=be,this.uint16[It+2]=Ie,this.uint16[It+3]=Ne,oe},C}(zi);Ln.prototype.bytesPerElement=8,me("StructArrayLayout1ul2ui8",Ln);var Dn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,oe,be)},C.prototype.emplace=function(oe,be,Ie){var Ne=oe*2;return this.uint16[Ne+0]=be,this.uint16[Ne+1]=Ie,oe},C}(zi);Dn.prototype.bytesPerElement=4,me("StructArrayLayout2ui4",Dn);var Wn=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe){var be=this.length;return this.resize(be+1),this.emplace(be,oe)},C.prototype.emplace=function(oe,be){var Ie=oe*1;return this.uint16[Ie+0]=be,oe},C}(zi);Wn.prototype.bytesPerElement=2,me("StructArrayLayout1ui2",Wn);var Os=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},C.prototype.emplaceBack=function(oe,be,Ie,Ne){var ft=this.length;return this.resize(ft+1),this.emplace(ft,oe,be,Ie,Ne)},C.prototype.emplace=function(oe,be,Ie,Ne,ft){var It=oe*4;return this.float32[It+0]=be,this.float32[It+1]=Ie,this.float32[It+2]=Ne,this.float32[It+3]=ft,oe},C}(zi);Os.prototype.bytesPerElement=16,me("StructArrayLayout4f16",Os);var xl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},G.x1.get=function(){return this._structArray.int16[this._pos2+2]},G.y1.get=function(){return this._structArray.int16[this._pos2+3]},G.x2.get=function(){return this._structArray.int16[this._pos2+4]},G.y2.get=function(){return this._structArray.int16[this._pos2+5]},G.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},G.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},G.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},G.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(C.prototype,G),C}(yi);xl.prototype.size=20;var ho=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new xl(this,oe)},C}(Yi);me("CollisionBoxArray",ho);var Xl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},G.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},G.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},G.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},G.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},G.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},G.segment.get=function(){return this._structArray.uint16[this._pos2+10]},G.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},G.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},G.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},G.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},G.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},G.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},G.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},G.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},G.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},G.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},G.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},G.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(C.prototype,G),C}(yi);Xl.prototype.size=48;var hs=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new Xl(this,oe)},C}(vn);me("PlacedSymbolArray",hs);var Al=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={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 G.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},G.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},G.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},G.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},G.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},G.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},G.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},G.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},G.key.get=function(){return this._structArray.uint16[this._pos2+8]},G.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},G.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},G.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},G.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},G.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},G.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},G.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},G.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},G.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},G.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},G.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},G.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},G.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},G.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},G.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},G.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},G.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},G.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},G.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},G.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(C.prototype,G),C}(yi);Al.prototype.size=68;var El=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new Al(this,oe)},C}(Rn);me("SymbolInstanceArray",El);var ru=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getoffsetX=function(oe){return this.float32[oe*1+0]},C}(Ii);me("GlyphOffsetArray",ru);var js=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.getx=function(oe){return this.int16[oe*3+0]},C.prototype.gety=function(oe){return this.int16[oe*3+1]},C.prototype.gettileUnitDistanceFromAnchor=function(oe){return this.int16[oe*3+2]},C}(nn);me("SymbolLineVertexArray",js);var pl=function(k){function C(){k.apply(this,arguments)}k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C;var G={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return G.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},G.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},G.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(C.prototype,G),C}(yi);pl.prototype.size=8;var bl=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.get=function(oe){return new pl(this,oe)},C}(Ln);me("FeatureIndexArray",bl);var Xn=Ei([{name:"a_pos",components:2,type:"Int16"}],4),kl=Xn.members,Io=function(C){C===void 0&&(C=[]),this.segments=C};Io.prototype.prepareSegment=function(C,G,oe,be){var Ie=this.segments[this.segments.length-1];return C>Io.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+Io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!Ie||Ie.vertexLength+C>Io.MAX_VERTEX_ARRAY_LENGTH||Ie.sortKey!==be)&&(Ie={vertexOffset:G.length,primitiveOffset:oe.length,vertexLength:0,primitiveLength:0},be!==void 0&&(Ie.sortKey=be),this.segments.push(Ie)),Ie},Io.prototype.get=function(){return this.segments},Io.prototype.destroy=function(){for(var C=0,G=this.segments;C>>16)*It&65535)<<16)&4294967295,er=er<<15|er>>>17,er=(er&65535)*Ht+(((er>>>16)*Ht&65535)<<16)&4294967295,Ne^=er,Ne=Ne<<13|Ne>>>19,ft=(Ne&65535)*5+(((Ne>>>16)*5&65535)<<16)&4294967295,Ne=(ft&65535)+27492+(((ft>>>16)+58964&65535)<<16);switch(er=0,be){case 3:er^=(G.charCodeAt(Lr+2)&255)<<16;case 2:er^=(G.charCodeAt(Lr+1)&255)<<8;case 1:er^=G.charCodeAt(Lr)&255,er=(er&65535)*It+(((er>>>16)*It&65535)<<16)&4294967295,er=er<<15|er>>>17,er=(er&65535)*Ht+(((er>>>16)*Ht&65535)<<16)&4294967295,Ne^=er}return Ne^=G.length,Ne^=Ne>>>16,Ne=(Ne&65535)*2246822507+(((Ne>>>16)*2246822507&65535)<<16)&4294967295,Ne^=Ne>>>13,Ne=(Ne&65535)*3266489909+(((Ne>>>16)*3266489909&65535)<<16)&4294967295,Ne^=Ne>>>16,Ne>>>0}k.exports=C}),re=t(function(k){function C(G,oe){for(var be=G.length,Ie=oe^be,Ne=0,ft;be>=4;)ft=G.charCodeAt(Ne)&255|(G.charCodeAt(++Ne)&255)<<8|(G.charCodeAt(++Ne)&255)<<16|(G.charCodeAt(++Ne)&255)<<24,ft=(ft&65535)*1540483477+(((ft>>>16)*1540483477&65535)<<16),ft^=ft>>>24,ft=(ft&65535)*1540483477+(((ft>>>16)*1540483477&65535)<<16),Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16)^ft,be-=4,++Ne;switch(be){case 3:Ie^=(G.charCodeAt(Ne+2)&255)<<16;case 2:Ie^=(G.charCodeAt(Ne+1)&255)<<8;case 1:Ie^=G.charCodeAt(Ne)&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}k.exports=C}),ye=xe,Ue=xe,ke=re;ye.murmur3=Ue,ye.murmur2=ke;var Qe=function(){this.ids=[],this.positions=[],this.indexed=!1};Qe.prototype.add=function(C,G,oe,be){this.ids.push(qt(C)),this.positions.push(G,oe,be)},Qe.prototype.getPositions=function(C){for(var G=qt(C),oe=0,be=this.ids.length-1;oe>1;this.ids[Ie]>=G?be=Ie:oe=Ie+1}for(var Ne=[];this.ids[oe]===G;){var ft=this.positions[3*oe],It=this.positions[3*oe+1],Ht=this.positions[3*oe+2];Ne.push({index:ft,start:It,end:Ht}),oe++}return Ne},Qe.serialize=function(C,G){var oe=new Float64Array(C.ids),be=new Uint32Array(C.positions);return br(oe,be,0,oe.length-1),G&&G.push(oe.buffer,be.buffer),{ids:oe,positions:be}},Qe.deserialize=function(C){var G=new Qe;return G.ids=C.ids,G.positions=C.positions,G.indexed=!0,G};var vt=Math.pow(2,53)-1;function qt(k){var C=+k;return!isNaN(C)&&C<=vt?C:ye(String(k))}function br(k,C,G,oe){for(;G>1],Ie=G-1,Ne=oe+1;;){do Ie++;while(k[Ie]be);if(Ie>=Ne)break;Br(k,Ie,Ne),Br(C,3*Ie,3*Ne),Br(C,3*Ie+1,3*Ne+1),Br(C,3*Ie+2,3*Ne+2)}Ne-GNe.x+1||ItNe.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return G}function _o(k,C){return{type:k.type,id:k.id,properties:k.properties,geometry:C?fn(k):[]}}function Uo(k,C,G,oe,be){k.emplaceBack(C*2+(oe+1)/2,G*2+(be+1)/2)}var Ds=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(G){return G.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Ma,this.indexArray=new Xi,this.segments=new Io,this.programConfigurations=new Ga(C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(G){return G.isStateDependent()}).map(function(G){return G.id})};Ds.prototype.populate=function(C,G,oe){var be=this.layers[0],Ie=[],Ne=null;be.type==="circle"&&(Ne=be.layout.get("circle-sort-key"));for(var ft=0,It=C;ft=ui||Yr<0||Yr>=ui)){var Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),ua=Vr.vertexLength;Uo(this.layoutVertexArray,Lr,Yr,-1,-1),Uo(this.layoutVertexArray,Lr,Yr,1,-1),Uo(this.layoutVertexArray,Lr,Yr,1,1),Uo(this.layoutVertexArray,Lr,Yr,-1,1),this.indexArray.emplaceBack(ua,ua+1,ua+2),this.indexArray.emplaceBack(ua,ua+3,ua+2),Vr.vertexLength+=4,Vr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,oe,{},be)},me("CircleBucket",Ds,{omit:["layers"]});function Oo(k,C){for(var G=0;G=3){for(var Ie=0;Ie1){if(kp(k,C))return!0;for(var oe=0;oe1?k.distSqr(G):k.distSqr(G.sub(C)._mult(be)._add(C))}function ed(k,C){for(var G=!1,oe,be,Ie,Ne=0;NeC.y!=Ie.y>C.y&&C.x<(Ie.x-be.x)*(C.y-be.y)/(Ie.y-be.y)+be.x&&(G=!G)}return G}function Ih(k,C){for(var G=!1,oe=0,be=k.length-1;oeC.y!=Ne.y>C.y&&C.x<(Ne.x-Ie.x)*(C.y-Ie.y)/(Ne.y-Ie.y)+Ie.x&&(G=!G)}return G}function td(k,C,G,oe,be){for(var Ie=0,Ne=k;Ie=ft.x&&be>=ft.y)return!0}var It=[new i(C,G),new i(C,be),new i(oe,be),new i(oe,G)];if(k.length>2)for(var Ht=0,er=It;Htbe.x&&C.x>be.x||k.ybe.y&&C.y>be.y)return!1;var Ie=W(k,C,G[0]);return Ie!==W(k,C,G[1])||Ie!==W(k,C,G[2])||Ie!==W(k,C,G[3])}function Rh(k,C,G){var oe=C.paint.get(k).value;return oe.kind==="constant"?oe.value:G.programConfigurations.get(C.id).getMaxValue(k)}function Cp(k){return Math.sqrt(k[0]*k[0]+k[1]*k[1])}function Vp(k,C,G,oe,be){if(!C[0]&&!C[1])return k;var Ie=i.convert(C)._mult(be);G==="viewport"&&Ie._rotate(-oe);for(var Ne=[],ft=0;ft0&&(Ie=1/Math.sqrt(Ie)),k[0]=C[0]*Ie,k[1]=C[1]*Ie,k[2]=C[2]*Ie,k}function UT(k,C){return k[0]*C[0]+k[1]*C[1]+k[2]*C[2]}function jT(k,C,G){var oe=C[0],be=C[1],Ie=C[2],Ne=G[0],ft=G[1],It=G[2];return k[0]=be*It-Ie*ft,k[1]=Ie*Ne-oe*It,k[2]=oe*ft-be*Ne,k}function qT(k,C,G){var oe=C[0],be=C[1],Ie=C[2];return k[0]=oe*G[0]+be*G[3]+Ie*G[6],k[1]=oe*G[1]+be*G[4]+Ie*G[7],k[2]=oe*G[2]+be*G[5]+Ie*G[8],k}var VT=lv,vk=function(){var k=sv();return function(C,G,oe,be,Ie,Ne){var ft,It;for(G||(G=3),oe||(oe=0),be?It=Math.min(be*G+oe,C.length):It=C.length,ft=oe;ftk.width||be.height>k.height||G.x>k.width-be.width||G.y>k.height-be.height)throw new RangeError("out of range source coordinates for image copy");if(be.width>C.width||be.height>C.height||oe.x>C.width-be.width||oe.y>C.height-be.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ne=k.data,ft=C.data,It=0;It80*G){ft=Ht=k[0],It=er=k[1];for(var ua=G;uaHt&&(Ht=Lr),Yr>er&&(er=Yr);Vr=Math.max(Ht-ft,er-It),Vr=Vr!==0?1/Vr:0}return E0(Ie,Ne,G,ft,It,Vr),Ne}function Mg(k,C,G,oe,be){var Ie,Ne;if(be===U1(k,C,G,oe)>0)for(Ie=C;Ie=C;Ie-=oe)Ne=Ux(Ie,k[Ie],k[Ie+1],Ne);return Ne&&C0(Ne,Ne.next)&&(I0(Ne),Ne=Ne.next),Ne}function uv(k,C){if(!k)return k;C||(C=k);var G=k,oe;do if(oe=!1,!G.steiner&&(C0(G,G.next)||cf(G.prev,G,G.next)===0)){if(I0(G),G=C=G.prev,G===G.next)break;oe=!0}else G=G.next;while(oe||G!==C);return C}function E0(k,C,G,oe,be,Ie,Ne){if(k){!Ne&&Ie&&Eg(k,oe,be,Ie);for(var ft=k,It,Ht;k.prev!==k.next;){if(It=k.prev,Ht=k.next,Ie?Ox(k,oe,be,Ie):Fx(k)){C.push(It.i/G),C.push(k.i/G),C.push(Ht.i/G),I0(k),k=Ht.next,ft=Ht.next;continue}if(k=Ht,k===ft){Ne?Ne===1?(k=k0(uv(k),C,G),E0(k,C,G,oe,be,Ie,2)):Ne===2&&yd(k,C,G,oe,be,Ie):E0(uv(k),C,G,oe,be,Ie,1);break}}}}function Fx(k){var C=k.prev,G=k,oe=k.next;if(cf(C,G,oe)>=0)return!1;for(var be=k.next.next;be!==k.prev;){if(fv(C.x,C.y,G.x,G.y,oe.x,oe.y,be.x,be.y)&&cf(be.prev,be,be.next)>=0)return!1;be=be.next}return!0}function Ox(k,C,G,oe){var be=k.prev,Ie=k,Ne=k.next;if(cf(be,Ie,Ne)>=0)return!1;for(var ft=be.xIe.x?be.x>Ne.x?be.x:Ne.x:Ie.x>Ne.x?Ie.x:Ne.x,er=be.y>Ie.y?be.y>Ne.y?be.y:Ne.y:Ie.y>Ne.y?Ie.y:Ne.y,Lr=F1(ft,It,C,G,oe),Yr=F1(Ht,er,C,G,oe),Vr=k.prevZ,ua=k.nextZ;Vr&&Vr.z>=Lr&&ua&&ua.z<=Yr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Ie.x,Ie.y,Ne.x,Ne.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0||(Vr=Vr.prevZ,ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Ie.x,Ie.y,Ne.x,Ne.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0))return!1;ua=ua.nextZ}for(;Vr&&Vr.z>=Lr;){if(Vr!==k.prev&&Vr!==k.next&&fv(be.x,be.y,Ie.x,Ie.y,Ne.x,Ne.y,Vr.x,Vr.y)&&cf(Vr.prev,Vr,Vr.next)>=0)return!1;Vr=Vr.prevZ}for(;ua&&ua.z<=Yr;){if(ua!==k.prev&&ua!==k.next&&fv(be.x,be.y,Ie.x,Ie.y,Ne.x,Ne.y,ua.x,ua.y)&&cf(ua.prev,ua,ua.next)>=0)return!1;ua=ua.nextZ}return!0}function k0(k,C,G){var oe=k;do{var be=oe.prev,Ie=oe.next.next;!C0(be,Ie)&&kg(be,oe,oe.next,Ie)&&P0(be,Ie)&&P0(Ie,be)&&(C.push(be.i/G),C.push(oe.i/G),C.push(Ie.i/G),I0(oe),I0(oe.next),oe=k=Ie),oe=oe.next}while(oe!==k);return uv(oe)}function yd(k,C,G,oe,be,Ie){var Ne=k;do{for(var ft=Ne.next.next;ft!==Ne.prev;){if(Ne.i!==ft.i&&fm(Ne,ft)){var It=B1(Ne,ft);Ne=uv(Ne,Ne.next),It=uv(It,It.next),E0(Ne,C,G,oe,be,Ie),E0(It,C,G,oe,be,Ie);return}ft=ft.next}Ne=Ne.next}while(Ne!==k)}function cv(k,C,G,oe){var be=[],Ie,Ne,ft,It,Ht;for(Ie=0,Ne=C.length;Ie=G.next.y&&G.next.y!==G.y){var ft=G.x+(be-G.y)*(G.next.x-G.x)/(G.next.y-G.y);if(ft<=oe&&ft>Ie){if(Ie=ft,ft===oe){if(be===G.y)return G;if(be===G.next.y)return G.next}Ne=G.x=G.x&&G.x>=Ht&&oe!==G.x&&fv(beNe.x||G.x===Ne.x&&$T(Ne,G)))&&(Ne=G,Lr=Yr)),G=G.next;while(G!==It);return Ne}function $T(k,C){return cf(k.prev,k,C.prev)<0&&cf(C.next,k,k.next)<0}function Eg(k,C,G,oe){var be=k;do be.z===null&&(be.z=F1(be.x,be.y,C,G,oe)),be.prevZ=be.prev,be.nextZ=be.next,be=be.next;while(be!==k);be.prevZ.nextZ=null,be.prevZ=null,z1(be)}function z1(k){var C,G,oe,be,Ie,Ne,ft,It,Ht=1;do{for(G=k,k=null,Ie=null,Ne=0;G;){for(Ne++,oe=G,ft=0,C=0;C0||It>0&&oe;)ft!==0&&(It===0||!oe||G.z<=oe.z)?(be=G,G=G.nextZ,ft--):(be=oe,oe=oe.nextZ,It--),Ie?Ie.nextZ=be:k=be,be.prevZ=Ie,Ie=be;G=oe}Ie.nextZ=null,Ht*=2}while(Ne>1);return k}function F1(k,C,G,oe,be){return k=32767*(k-G)*be,C=32767*(C-oe)*be,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,k|C<<1}function O1(k){var C=k,G=k;do(C.x=0&&(k-Ne)*(oe-ft)-(G-Ne)*(C-ft)>=0&&(G-Ne)*(Ie-ft)-(be-Ne)*(oe-ft)>=0}function fm(k,C){return k.next.i!==C.i&&k.prev.i!==C.i&&!Nx(k,C)&&(P0(k,C)&&P0(C,k)&&QT(k,C)&&(cf(k.prev,k,C.prev)||cf(k,C.prev,C))||C0(k,C)&&cf(k.prev,k,k.next)>0&&cf(C.prev,C,C.next)>0)}function cf(k,C,G){return(C.y-k.y)*(G.x-C.x)-(C.x-k.x)*(G.y-C.y)}function C0(k,C){return k.x===C.x&&k.y===C.y}function kg(k,C,G,oe){var be=zv(cf(k,C,G)),Ie=zv(cf(k,C,oe)),Ne=zv(cf(G,oe,k)),ft=zv(cf(G,oe,C));return!!(be!==Ie&&Ne!==ft||be===0&&L0(k,G,C)||Ie===0&&L0(k,oe,C)||Ne===0&&L0(G,k,oe)||ft===0&&L0(G,C,oe))}function L0(k,C,G){return C.x<=Math.max(k.x,G.x)&&C.x>=Math.min(k.x,G.x)&&C.y<=Math.max(k.y,G.y)&&C.y>=Math.min(k.y,G.y)}function zv(k){return k>0?1:k<0?-1:0}function Nx(k,C){var G=k;do{if(G.i!==k.i&&G.next.i!==k.i&&G.i!==C.i&&G.next.i!==C.i&&kg(G,G.next,k,C))return!0;G=G.next}while(G!==k);return!1}function P0(k,C){return cf(k.prev,k,k.next)<0?cf(k,C,k.next)>=0&&cf(k,k.prev,C)>=0:cf(k,C,k.prev)<0||cf(k,k.next,C)<0}function QT(k,C){var G=k,oe=!1,be=(k.x+C.x)/2,Ie=(k.y+C.y)/2;do G.y>Ie!=G.next.y>Ie&&G.next.y!==G.y&&be<(G.next.x-G.x)*(Ie-G.y)/(G.next.y-G.y)+G.x&&(oe=!oe),G=G.next;while(G!==k);return oe}function B1(k,C){var G=new N1(k.i,k.x,k.y),oe=new N1(C.i,C.x,C.y),be=k.next,Ie=C.prev;return k.next=C,C.prev=k,G.next=be,be.prev=G,oe.next=G,G.prev=oe,Ie.next=oe,oe.prev=Ie,oe}function Ux(k,C,G,oe){var be=new N1(k,C,G);return oe?(be.next=oe.next,be.prev=oe,oe.next.prev=be,oe.next=be):(be.prev=be,be.next=be),be}function I0(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function N1(k,C,G){this.i=k,this.x=C,this.y=G,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}cm.deviation=function(k,C,G,oe){var be=C&&C.length,Ie=be?C[0]*G:k.length,Ne=Math.abs(U1(k,0,Ie,G));if(be)for(var ft=0,It=C.length;ft0&&(oe+=k[be-1].length,G.holes.push(oe))}return G},Sg.default=zx;function j1(k,C,G,oe,be){Hd(k,C,G||0,oe||k.length-1,be||jx)}function Hd(k,C,G,oe,be){for(;oe>G;){if(oe-G>600){var Ie=oe-G+1,Ne=C-G+1,ft=Math.log(Ie),It=.5*Math.exp(2*ft/3),Ht=.5*Math.sqrt(ft*It*(Ie-It)/Ie)*(Ne-Ie/2<0?-1:1),er=Math.max(G,Math.floor(C-Ne*It/Ie+Ht)),Lr=Math.min(oe,Math.floor(C+(Ie-Ne)*It/Ie+Ht));Hd(k,C,er,Lr,be)}var Yr=k[C],Vr=G,ua=oe;for(hm(k,G,C),be(k[oe],Yr)>0&&hm(k,G,oe);Vr0;)ua--}be(k[G],Yr)===0?hm(k,G,ua):(ua++,hm(k,ua,oe)),ua<=C&&(G=ua+1),C<=ua&&(oe=ua-1)}}function hm(k,C,G){var oe=k[C];k[C]=k[G],k[G]=oe}function jx(k,C){return kC?1:0}function Cg(k,C){var G=k.length;if(G<=1)return[k];for(var oe=[],be,Ie,Ne=0;Ne1)for(var It=0;It>3}if(oe--,G===1||G===2)be+=k.readSVarint(),Ie+=k.readSVarint(),G===1&&(ft&&Ne.push(ft),ft=[]),ft.push(new i(be,Ie));else if(G===7)ft&&ft.push(ft[0].clone());else throw new Error("unknown command "+G)}return ft&&Ne.push(ft),Ne},Fv.prototype.bbox=function(){var k=this._pbf;k.pos=this._geometry;for(var C=k.readVarint()+k.pos,G=1,oe=0,be=0,Ie=0,Ne=1/0,ft=-1/0,It=1/0,Ht=-1/0;k.pos>3}if(oe--,G===1||G===2)be+=k.readSVarint(),Ie+=k.readSVarint(),beft&&(ft=be),IeHt&&(Ht=Ie);else if(G!==7)throw new Error("unknown command "+G)}return[Ne,It,ft,Ht]},Fv.prototype.toGeoJSON=function(k,C,G){var oe=this.extent*Math.pow(2,G),be=this.extent*k,Ie=this.extent*C,Ne=this.loadGeometry(),ft=Fv.types[this.type],It,Ht;function er(Vr){for(var ua=0;ua>3;C=oe===1?k.readString():oe===2?k.readFloat():oe===3?k.readDouble():oe===4?k.readVarint64():oe===5?k.readVarint():oe===6?k.readSVarint():oe===7?k.readBoolean():null}return C}G1.prototype.feature=function(k){if(k<0||k>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[k];var C=this._pbf.readVarint()+this._pbf.pos;return new V1(this._pbf,C,this.extent,this._keys,this._values)};var Jx=tA;function tA(k,C){this.layers=k.readFields(rA,{},C)}function rA(k,C,G){if(k===3){var oe=new Wd(G,G.readVarint()+G.pos);oe.length&&(C[oe.name]=oe)}}var $x=Jx,pm=V1,Qx=Wd,Xd={VectorTile:$x,VectorTileFeature:pm,VectorTileLayer:Qx},eb=Xd.VectorTileFeature.types,Pg=500,dm=Math.pow(2,13);function hv(k,C,G,oe,be,Ie,Ne,ft){k.emplaceBack(C,G,Math.floor(oe*dm)*2+Ne,be*dm*2,Ie*dm*2,Math.round(ft))}var cd=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(G){return G.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new di,this.indexArray=new Xi,this.programConfigurations=new Ga(C.layers,C.zoom),this.segments=new Io,this.stateDependentLayerIds=this.layers.filter(function(G){return G.isStateDependent()}).map(function(G){return G.id})};cd.prototype.populate=function(C,G,oe){this.features=[],this.hasPattern=Lg("fill-extrusion",this.layers,G);for(var be=0,Ie=C;be=1){var Ji=Mi[$i-1];if(!aA(Oi,Ji)){Vr.vertexLength+4>Io.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Oi.sub(Ji)._perp()._unit(),bn=Ji.dist(Oi);ni+bn>32768&&(ni=0),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,0,ni),hv(this.layoutVertexArray,Oi.x,Oi.y,ln.x,ln.y,0,1,ni),ni+=bn,hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,0,ni),hv(this.layoutVertexArray,Ji.x,Ji.y,ln.x,ln.y,0,1,ni);var qn=Vr.vertexLength;this.indexArray.emplaceBack(qn,qn+2,qn+1),this.indexArray.emplaceBack(qn+1,qn+2,qn+3),Vr.vertexLength+=4,Vr.primitiveLength+=2}}}}if(Vr.vertexLength+Ht>Io.MAX_VERTEX_ARRAY_LENGTH&&(Vr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray)),eb[C.type]==="Polygon"){for(var Nn=[],Eo=[],oo=Vr.vertexLength,mo=0,Is=It;moui)||k.y===C.y&&(k.y<0||k.y>ui)}function iA(k){return k.every(function(C){return C.x<0})||k.every(function(C){return C.x>ui})||k.every(function(C){return C.y<0})||k.every(function(C){return C.y>ui})}var vm=new ma({"fill-extrusion-opacity":new it(Gi["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new it(Gi["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fr(Gi["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Xt(Gi["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new it(Gi["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),wh={paint:vm},pv=function(k){function C(G){k.call(this,G,wh)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.createBucket=function(oe){return new cd(oe)},C.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},C.prototype.is3D=function(){return!0},C.prototype.queryIntersectsFeature=function(oe,be,Ie,Ne,ft,It,Ht,er){var Lr=Vp(oe,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),It.angle,Ht),Yr=this.paint.get("fill-extrusion-height").evaluate(be,Ie),Vr=this.paint.get("fill-extrusion-base").evaluate(be,Ie),ua=nA(Lr,er,It,0),Oa=W1(Ne,Vr,Yr,er),Mi=Oa[0],ni=Oa[1];return tb(Mi,ni,ua)},C}(Ya);function Ov(k,C){return k.x*C.x+k.y*C.y}function H1(k,C){if(k.length===1){for(var G=0,oe=C[G++],be;!be||oe.equals(be);)if(be=C[G++],!be)return 1/0;for(;G=2&&C[Ht-1].equals(C[Ht-2]);)Ht--;for(var er=0;er0;if(Nn&&$i>er){var oo=Vr.dist(ua);if(oo>2*Lr){var mo=Vr.sub(Vr.sub(ua)._mult(Lr/oo)._round());this.updateDistance(ua,mo),this.addCurrentVertex(mo,Mi,0,0,Yr),ua=mo}}var Is=ua&&Oa,ko=Is?oe:It?"butt":be;if(Is&&ko==="round"&&(bnIe&&(ko="bevel"),ko==="bevel"&&(bn>2&&(ko="flipbevel"),bn100)Oi=ni.mult(-1);else{var Do=bn*Mi.add(ni).mag()/Mi.sub(ni).mag();Oi._perp()._mult(Do*(Eo?-1:1))}this.addCurrentVertex(Vr,Oi,0,0,Yr),this.addCurrentVertex(Vr,Oi.mult(-1),0,0,Yr)}else if(ko==="bevel"||ko==="fakeround"){var $s=-Math.sqrt(bn*bn-1),Ms=Eo?$s:0,Zl=Eo?0:$s;if(ua&&this.addCurrentVertex(Vr,Mi,Ms,Zl,Yr),ko==="fakeround")for(var zu=Math.round(qn*180/Math.PI/Z1),Yl=1;Yl2*Lr){var Zf=Vr.add(Oa.sub(Vr)._mult(Lr/gh)._round());this.updateDistance(Vr,Zf),this.addCurrentVertex(Zf,ni,0,0,Yr),Vr=Zf}}}}},Hf.prototype.addCurrentVertex=function(C,G,oe,be,Ie,Ne){Ne===void 0&&(Ne=!1);var ft=G.x+G.y*oe,It=G.y-G.x*oe,Ht=-G.x+G.y*be,er=-G.y-G.x*be;this.addHalfVertex(C,ft,It,Ne,!1,oe,Ie),this.addHalfVertex(C,Ht,er,Ne,!0,-be,Ie),this.distance>O0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,G,oe,be,Ie,Ne))},Hf.prototype.addHalfVertex=function(C,G,oe,be,Ie,Ne,ft){var It=C.x,Ht=C.y,er=this.lineClips?this.scaledDistance*(O0-1):this.scaledDistance,Lr=er*Rg;if(this.layoutVertexArray.emplaceBack((It<<1)+(be?1:0),(Ht<<1)+(Ie?1:0),Math.round(Ig*G)+128,Math.round(Ig*oe)+128,(Ne===0?0:Ne<0?-1:1)+1|(Lr&63)<<2,Lr>>6),this.lineClips){var Yr=this.scaledDistance-this.lineClips.start,Vr=this.lineClips.end-this.lineClips.start,ua=Yr/Vr;this.layoutVertexArray2.emplaceBack(ua,this.lineClipsArray.length)}var Oa=ft.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Oa),ft.primitiveLength++),Ie?this.e2=Oa:this.e1=Oa},Hf.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Hf.prototype.updateDistance=function(C,G){this.distance+=C.dist(G),this.updateScaledDistance()},me("LineBucket",Hf,{omit:["layers","patternFeatures"]});var Y1=new ma({"line-cap":new it(Gi.layout_line["line-cap"]),"line-join":new Xt(Gi.layout_line["line-join"]),"line-miter-limit":new it(Gi.layout_line["line-miter-limit"]),"line-round-limit":new it(Gi.layout_line["line-round-limit"]),"line-sort-key":new Xt(Gi.layout_line["line-sort-key"])}),K1=new ma({"line-opacity":new Xt(Gi.paint_line["line-opacity"]),"line-color":new Xt(Gi.paint_line["line-color"]),"line-translate":new it(Gi.paint_line["line-translate"]),"line-translate-anchor":new it(Gi.paint_line["line-translate-anchor"]),"line-width":new Xt(Gi.paint_line["line-width"]),"line-gap-width":new Xt(Gi.paint_line["line-gap-width"]),"line-offset":new Xt(Gi.paint_line["line-offset"]),"line-blur":new Xt(Gi.paint_line["line-blur"]),"line-dasharray":new oa(Gi.paint_line["line-dasharray"]),"line-pattern":new fr(Gi.paint_line["line-pattern"]),"line-gradient":new Ta(Gi.paint_line["line-gradient"])}),Dg={paint:K1,layout:Y1},sA=function(k){function C(){k.apply(this,arguments)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.possiblyEvaluate=function(oe,be){return be=new mn(Math.floor(be.zoom),{now:be.now,fadeDuration:be.fadeDuration,zoomHistory:be.zoomHistory,transition:be.transition}),k.prototype.possiblyEvaluate.call(this,oe,be)},C.prototype.evaluate=function(oe,be,Ie,Ne){return be=p({},be,{zoom:Math.floor(be.zoom)}),k.prototype.evaluate.call(this,oe,be,Ie,Ne)},C}(Xt),H=new sA(Dg.paint.properties["line-width"].specification);H.useIntegerZoom=!0;var R=function(k){function C(G){k.call(this,G,Dg),this.gradientVersion=0}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype._handleSpecialPaintPropertyUpdate=function(oe){if(oe==="line-gradient"){var be=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=be._styleExpression.expression instanceof Tu,this.gradientVersion=(this.gradientVersion+1)%f}},C.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},C.prototype.recalculate=function(oe,be){k.prototype.recalculate.call(this,oe,be),this.paint._values["line-floorwidth"]=H.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,oe)},C.prototype.createBucket=function(oe){return new Hf(oe)},C.prototype.queryRadius=function(oe){var be=oe,Ie=J(Rh("line-width",this,be),Rh("line-gap-width",this,be)),Ne=Rh("line-offset",this,be);return Ie/2+Math.abs(Ne)+Cp(this.paint.get("line-translate"))},C.prototype.queryIntersectsFeature=function(oe,be,Ie,Ne,ft,It,Ht){var er=Vp(oe,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),It.angle,Ht),Lr=Ht/2*J(this.paint.get("line-width").evaluate(be,Ie),this.paint.get("line-gap-width").evaluate(be,Ie)),Yr=this.paint.get("line-offset").evaluate(be,Ie);return Yr&&(Ne=ve(Ne,Yr*Ht)),mu(er,Ne,Lr)},C.prototype.isTileClipped=function(){return!0},C}(Ya);function J(k,C){return C>0?C+2*k:k}function ve(k,C){for(var G=[],oe=new i(0,0),be=0;be":"\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 qi(k){for(var C="",G=0;G>1,er=-7,Lr=G?be-1:0,Yr=G?-1:1,Vr=k[C+Lr];for(Lr+=Yr,Ie=Vr&(1<<-er)-1,Vr>>=-er,er+=ft;er>0;Ie=Ie*256+k[C+Lr],Lr+=Yr,er-=8);for(Ne=Ie&(1<<-er)-1,Ie>>=-er,er+=oe;er>0;Ne=Ne*256+k[C+Lr],Lr+=Yr,er-=8);if(Ie===0)Ie=1-Ht;else{if(Ie===It)return Ne?NaN:(Vr?-1:1)*(1/0);Ne=Ne+Math.pow(2,oe),Ie=Ie-Ht}return(Vr?-1:1)*Ne*Math.pow(2,Ie-oe)},Lo=function(k,C,G,oe,be,Ie){var Ne,ft,It,Ht=Ie*8-be-1,er=(1<>1,Yr=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,Vr=oe?0:Ie-1,ua=oe?1:-1,Oa=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(ft=isNaN(C)?1:0,Ne=er):(Ne=Math.floor(Math.log(C)/Math.LN2),C*(It=Math.pow(2,-Ne))<1&&(Ne--,It*=2),Ne+Lr>=1?C+=Yr/It:C+=Yr*Math.pow(2,1-Lr),C*It>=2&&(Ne++,It/=2),Ne+Lr>=er?(ft=0,Ne=er):Ne+Lr>=1?(ft=(C*It-1)*Math.pow(2,be),Ne=Ne+Lr):(ft=C*Math.pow(2,Lr-1)*Math.pow(2,be),Ne=0));be>=8;k[G+Vr]=ft&255,Vr+=ua,ft/=256,be-=8);for(Ne=Ne<0;k[G+Vr]=Ne&255,Vr+=ua,Ne/=256,Ht-=8);k[G+Vr-ua]|=Oa*128},xs={read:jn,write:Lo},vo=zn;function zn(k){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(k)?k:new Uint8Array(k||0),this.pos=0,this.type=0,this.length=this.buf.length}zn.Varint=0,zn.Fixed64=1,zn.Bytes=2,zn.Fixed32=5;var is=65536*65536,qo=1/is,Bo=12,xn=typeof TextDecoder>"u"?null:new TextDecoder("utf8");zn.prototype={destroy:function(){this.buf=null},readFields:function(k,C,G){for(G=G||this.length;this.pos>3,Ie=this.pos;this.type=oe&7,k(be,C,this),this.pos===Ie&&this.skip(oe)}return C},readMessage:function(k,C){return this.readFields(k,C,this.readVarint()+this.pos)},readFixed32:function(){var k=dh(this.buf,this.pos);return this.pos+=4,k},readSFixed32:function(){var k=Rp(this.buf,this.pos);return this.pos+=4,k},readFixed64:function(){var k=dh(this.buf,this.pos)+dh(this.buf,this.pos+4)*is;return this.pos+=8,k},readSFixed64:function(){var k=dh(this.buf,this.pos)+Rp(this.buf,this.pos+4)*is;return this.pos+=8,k},readFloat:function(){var k=xs.read(this.buf,this.pos,!0,23,4);return this.pos+=4,k},readDouble:function(){var k=xs.read(this.buf,this.pos,!0,52,8);return this.pos+=8,k},readVarint:function(k){var C=this.buf,G,oe;return oe=C[this.pos++],G=oe&127,oe<128||(oe=C[this.pos++],G|=(oe&127)<<7,oe<128)||(oe=C[this.pos++],G|=(oe&127)<<14,oe<128)||(oe=C[this.pos++],G|=(oe&127)<<21,oe<128)?G:(oe=C[this.pos],G|=(oe&15)<<28,cs(G,k,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var k=this.readVarint();return k%2===1?(k+1)/-2:k/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var k=this.readVarint()+this.pos,C=this.pos;return this.pos=k,k-C>=Bo&&xn?pu(this.buf,C,k):vp(this.buf,C,k)},readBytes:function(){var k=this.readVarint()+this.pos,C=this.buf.subarray(this.pos,k);return this.pos=k,C},readPackedVarint:function(k,C){if(this.type!==zn.Bytes)return k.push(this.readVarint(C));var G=No(this);for(k=k||[];this.pos127;);else if(C===zn.Bytes)this.pos=this.readVarint()+this.pos;else if(C===zn.Fixed32)this.pos+=4;else if(C===zn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+C)},writeTag:function(k,C){this.writeVarint(k<<3|C)},realloc:function(k){for(var C=this.length||16;C268435455||k<0){Ku(k,this);return}this.realloc(4),this.buf[this.pos++]=k&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=(k>>>=7)&127|(k>127?128:0),!(k<=127)&&(this.buf[this.pos++]=k>>>7&127)))},writeSVarint:function(k){this.writeVarint(k<0?-k*2-1:k*2)},writeBoolean:function(k){this.writeVarint(!!k)},writeString:function(k){k=String(k),this.realloc(k.length*4),this.pos++;var C=this.pos;this.pos=fc(this.buf,k,this.pos);var G=this.pos-C;G>=128&&Hp(C,G,this),this.pos=C-1,this.writeVarint(G),this.pos+=G},writeFloat:function(k){this.realloc(4),xs.write(this.buf,k,this.pos,!0,23,4),this.pos+=4},writeDouble:function(k){this.realloc(8),xs.write(this.buf,k,this.pos,!0,52,8),this.pos+=8},writeBytes:function(k){var C=k.length;this.writeVarint(C),this.realloc(C);for(var G=0;G=128&&Hp(G,oe,this),this.pos=G-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(k,C,G){this.writeTag(k,zn.Bytes),this.writeRawMessage(C,G)},writePackedVarint:function(k,C){C.length&&this.writeMessage(k,Th,C)},writePackedSVarint:function(k,C){C.length&&this.writeMessage(k,rh,C)},writePackedBoolean:function(k,C){C.length&&this.writeMessage(k,ep,C)},writePackedFloat:function(k,C){C.length&&this.writeMessage(k,$h,C)},writePackedDouble:function(k,C){C.length&&this.writeMessage(k,Qh,C)},writePackedFixed32:function(k,C){C.length&&this.writeMessage(k,ff,C)},writePackedSFixed32:function(k,C){C.length&&this.writeMessage(k,ah,C)},writePackedFixed64:function(k,C){C.length&&this.writeMessage(k,Fh,C)},writePackedSFixed64:function(k,C){C.length&&this.writeMessage(k,Ah,C)},writeBytesField:function(k,C){this.writeTag(k,zn.Bytes),this.writeBytes(C)},writeFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFixed32(C)},writeSFixed32Field:function(k,C){this.writeTag(k,zn.Fixed32),this.writeSFixed32(C)},writeFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeFixed64(C)},writeSFixed64Field:function(k,C){this.writeTag(k,zn.Fixed64),this.writeSFixed64(C)},writeVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeVarint(C)},writeSVarintField:function(k,C){this.writeTag(k,zn.Varint),this.writeSVarint(C)},writeStringField:function(k,C){this.writeTag(k,zn.Bytes),this.writeString(C)},writeFloatField:function(k,C){this.writeTag(k,zn.Fixed32),this.writeFloat(C)},writeDoubleField:function(k,C){this.writeTag(k,zn.Fixed64),this.writeDouble(C)},writeBooleanField:function(k,C){this.writeVarintField(k,!!C)}};function cs(k,C,G){var oe=G.buf,be,Ie;if(Ie=oe[G.pos++],be=(Ie&112)>>4,Ie<128||(Ie=oe[G.pos++],be|=(Ie&127)<<3,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<10,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<17,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&127)<<24,Ie<128)||(Ie=oe[G.pos++],be|=(Ie&1)<<31,Ie<128))return Rs(k,be,C);throw new Error("Expected varint not more than 10 bytes")}function No(k){return k.type===zn.Bytes?k.readVarint()+k.pos:k.pos+1}function Rs(k,C,G){return G?C*4294967296+(k>>>0):(C>>>0)*4294967296+(k>>>0)}function Ku(k,C){var G,oe;if(k>=0?(G=k%4294967296|0,oe=k/4294967296|0):(G=~(-k%4294967296),oe=~(-k/4294967296),G^4294967295?G=G+1|0:(G=0,oe=oe+1|0)),k>=18446744073709552e3||k<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");C.realloc(10),Uu(G,oe,C),th(oe,C)}function Uu(k,C,G){G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos++]=k&127|128,k>>>=7,G.buf[G.pos]=k&127}function th(k,C){var G=(k&7)<<4;C.buf[C.pos++]|=G|((k>>>=3)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127|((k>>>=7)?128:0),k&&(C.buf[C.pos++]=k&127)))))}function Hp(k,C,G){var oe=C<=16383?1:C<=2097151?2:C<=268435455?3:Math.floor(Math.log(C)/(Math.LN2*7));G.realloc(oe);for(var be=G.pos-1;be>=k;be--)G.buf[be+oe]=G.buf[be]}function Th(k,C){for(var G=0;G>>8,k[G+2]=C>>>16,k[G+3]=C>>>24}function Rp(k,C){return(k[C]|k[C+1]<<8|k[C+2]<<16)+(k[C+3]<<24)}function vp(k,C,G){for(var oe="",be=C;be239?4:Ie>223?3:Ie>191?2:1;if(be+ft>G)break;var It,Ht,er;ft===1?Ie<128&&(Ne=Ie):ft===2?(It=k[be+1],(It&192)===128&&(Ne=(Ie&31)<<6|It&63,Ne<=127&&(Ne=null))):ft===3?(It=k[be+1],Ht=k[be+2],(It&192)===128&&(Ht&192)===128&&(Ne=(Ie&15)<<12|(It&63)<<6|Ht&63,(Ne<=2047||Ne>=55296&&Ne<=57343)&&(Ne=null))):ft===4&&(It=k[be+1],Ht=k[be+2],er=k[be+3],(It&192)===128&&(Ht&192)===128&&(er&192)===128&&(Ne=(Ie&15)<<18|(It&63)<<12|(Ht&63)<<6|er&63,(Ne<=65535||Ne>=1114112)&&(Ne=null))),Ne===null?(Ne=65533,ft=1):Ne>65535&&(Ne-=65536,oe+=String.fromCharCode(Ne>>>10&1023|55296),Ne=56320|Ne&1023),oe+=String.fromCharCode(Ne),be+=ft}return oe}function pu(k,C,G){return xn.decode(k.subarray(C,G))}function fc(k,C,G){for(var oe=0,be,Ie;oe55295&&be<57344)if(Ie)if(be<56320){k[G++]=239,k[G++]=191,k[G++]=189,Ie=be;continue}else be=Ie-55296<<10|be-56320|65536,Ie=null;else{be>56319||oe+1===C.length?(k[G++]=239,k[G++]=191,k[G++]=189):Ie=be;continue}else Ie&&(k[G++]=239,k[G++]=191,k[G++]=189,Ie=null);be<128?k[G++]=be:(be<2048?k[G++]=be>>6|192:(be<65536?k[G++]=be>>12|224:(k[G++]=be>>18|240,k[G++]=be>>12&63|128),k[G++]=be>>6&63|128),k[G++]=be&63|128)}return G}var Ju=3;function Dp(k,C,G){k===1&&G.readMessage(Qc,C)}function Qc(k,C,G){if(k===3){var oe=G.readMessage(mm,{}),be=oe.id,Ie=oe.bitmap,Ne=oe.width,ft=oe.height,It=oe.left,Ht=oe.top,er=oe.advance;C.push({id:be,bitmap:new Ip({width:Ne+2*Ju,height:ft+2*Ju},Ie),metrics:{width:Ne,height:ft,left:It,top:Ht,advance:er}})}}function mm(k,C,G){k===1?C.id=G.readVarint():k===2?C.bitmap=G.readBytes():k===3?C.width=G.readVarint():k===4?C.height=G.readVarint():k===5?C.left=G.readSVarint():k===6?C.top=G.readSVarint():k===7&&(C.advance=G.readVarint())}function _d(k){return new vo(k).readFields(Dp,[])}var fd=Ju;function Wp(k){for(var C=0,G=0,oe=0,be=k;oe=0;Vr--){var ua=ft[Vr];if(!(Yr.w>ua.w||Yr.h>ua.h)){if(Yr.x=ua.x,Yr.y=ua.y,Ht=Math.max(Ht,Yr.y+Yr.h),It=Math.max(It,Yr.x+Yr.w),Yr.w===ua.w&&Yr.h===ua.h){var Oa=ft.pop();Vr=0&&be>=C&&bd[this.text.charCodeAt(be)];be--)oe--;this.text=this.text.substring(C,oe),this.sectionIndex=this.sectionIndex.slice(C,oe)},vh.prototype.substring=function(C,G){var oe=new vh;return oe.text=this.text.substring(C,G),oe.sectionIndex=this.sectionIndex.slice(C,G),oe.sections=this.sections,oe},vh.prototype.toString=function(){return this.text},vh.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(G,oe){return Math.max(G,C.sections[oe].scale)},0)},vh.prototype.addTextSection=function(C,G){this.text+=C.text,this.sections.push(Bv.forText(C.scale,C.fontStack||G));for(var oe=this.sections.length-1,be=0;be=xd?null:++this.imageSectionID:(this.imageSectionID=zg,this.imageSectionID)};function lA(k,C){for(var G=[],oe=k.text,be=0,Ie=0,Ne=C;Ie=0,er=0,Lr=0;Lr0&&Zf>Eo&&(Eo=Zf)}else{var Kl=G[mo.fontStack],Ol=Kl&&Kl[ko];if(Ol&&Ol.rect)Ms=Ol.rect,$s=Ol.metrics;else{var $u=C[mo.fontStack],hc=$u&&$u[ko];if(!hc)continue;$s=hc.metrics}Do=(ln-mo.scale)*en}Yl?(k.verticalizable=!0,Nn.push({glyph:ko,imageName:Zl,x:Yr,y:Vr+Do,vertical:Yl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Is,metrics:$s,rect:Ms}),Yr+=zu*mo.scale+Ht):(Nn.push({glyph:ko,imageName:Zl,x:Yr,y:Vr+Do,vertical:Yl,scale:mo.scale,fontStack:mo.fontStack,sectionIndex:Is,metrics:$s,rect:Ms}),Yr+=$s.advance*mo.scale+Ht)}if(Nn.length!==0){var rp=Yr-Ht;ua=Math.max(rp,ua),hA(Nn,0,Nn.length-1,Mi,Eo)}Yr=0;var ap=Ie*ln+Eo;qn.lineOffset=Math.max(Eo,bn),Vr+=ap,Oa=Math.max(ap,Oa),++ni}var yh=Vr-gm,yp=$1(Ne),_p=yp.horizontalAlign,ih=yp.verticalAlign;Oh(k.positionedLines,Mi,_p,ih,ua,Oa,Ie,yh,be.length),k.top+=-ih*yh,k.bottom=k.top+yh,k.left+=-_p*ua,k.right=k.left+ua}function hA(k,C,G,oe,be){if(!(!oe&&!be))for(var Ie=k[G],Ne=Ie.metrics.advance*Ie.scale,ft=(k[G].x+Ne)*oe,It=C;It<=G;It++)k[It].x-=ft,k[It].y+=be}function Oh(k,C,G,oe,be,Ie,Ne,ft,It){var Ht=(C-G)*be,er=0;Ie!==Ne?er=-ft*oe-gm:er=(-oe*It+.5)*Ne;for(var Lr=0,Yr=k;Lr-G/2;){if(Ne--,Ne<0)return!1;ft-=k[Ne].dist(Ie),Ie=k[Ne]}ft+=k[Ne].dist(k[Ne+1]),Ne++;for(var It=[],Ht=0;ftoe;)Ht-=It.shift().angleDelta;if(Ht>be)return!1;Ne++,ft+=Lr.dist(Yr)}return!0}function xk(k){for(var C=0,G=0;GHt){var ua=(Ht-It)/Vr,Oa=Ml(Lr.x,Yr.x,ua),Mi=Ml(Lr.y,Yr.y,ua),ni=new tp(Oa,Mi,Yr.angleTo(Lr),er);return ni._round(),!Ne||_k(k,ni,ft,Ne,C)?ni:void 0}It+=Vr}}function bW(k,C,G,oe,be,Ie,Ne,ft,It){var Ht=bk(oe,Ie,Ne),er=wk(oe,be),Lr=er*Ne,Yr=k[0].x===0||k[0].x===It||k[0].y===0||k[0].y===It;C-Lr=0&&Ji=0&&ln=0&&Yr+Ht<=er){var bn=new tp(Ji,ln,$i,ua);bn._round(),(!oe||_k(k,bn,Ie,oe,be))&&Vr.push(bn)}}Lr+=ni}return!ft&&!Vr.length&&!Ne&&(Vr=Tk(k,Lr/2,G,oe,be,Ie,Ne,!0,It)),Vr}function Ak(k,C,G,oe,be){for(var Ie=[],Ne=0;Ne=oe&&Lr.x>=oe)&&(er.x>=oe?er=new i(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round():Lr.x>=oe&&(Lr=new i(oe,er.y+(Lr.y-er.y)*((oe-er.x)/(Lr.x-er.x)))._round()),!(er.y>=be&&Lr.y>=be)&&(er.y>=be?er=new i(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round():Lr.y>=be&&(Lr=new i(er.x+(Lr.x-er.x)*((be-er.y)/(Lr.y-er.y)),be)._round()),(!It||!er.equals(It[It.length-1]))&&(It=[er],Ie.push(It)),It.push(Lr)))))}return Ie}var Bg=zc;function Sk(k,C,G,oe){var be=[],Ie=k.image,Ne=Ie.pixelRatio,ft=Ie.paddedRect.w-2*Bg,It=Ie.paddedRect.h-2*Bg,Ht=k.right-k.left,er=k.bottom-k.top,Lr=Ie.stretchX||[[0,ft]],Yr=Ie.stretchY||[[0,It]],Vr=function(Kl,Ol){return Kl+Ol[1]-Ol[0]},ua=Lr.reduce(Vr,0),Oa=Yr.reduce(Vr,0),Mi=ft-ua,ni=It-Oa,$i=0,Oi=ua,Ji=0,ln=Oa,bn=0,qn=Mi,Nn=0,Eo=ni;if(Ie.content&&oe){var oo=Ie.content;$i=ub(Lr,0,oo[0]),Ji=ub(Yr,0,oo[1]),Oi=ub(Lr,oo[0],oo[2]),ln=ub(Yr,oo[1],oo[3]),bn=oo[0]-$i,Nn=oo[1]-Ji,qn=oo[2]-oo[0]-Oi,Eo=oo[3]-oo[1]-ln}var mo=function(Kl,Ol,$u,hc){var hf=cb(Kl.stretch-$i,Oi,Ht,k.left),_f=fb(Kl.fixed-bn,qn,Kl.stretch,ua),gh=cb(Ol.stretch-Ji,ln,er,k.top),Zf=fb(Ol.fixed-Nn,Eo,Ol.stretch,Oa),rp=cb($u.stretch-$i,Oi,Ht,k.left),ap=fb($u.fixed-bn,qn,$u.stretch,ua),yh=cb(hc.stretch-Ji,ln,er,k.top),yp=fb(hc.fixed-Nn,Eo,hc.stretch,Oa),_p=new i(hf,gh),ih=new i(rp,gh),xp=new i(rp,yh),nd=new i(hf,yh),jv=new i(_f/Ne,Zf/Ne),xm=new i(ap/Ne,yp/Ne),bm=C*Math.PI/180;if(bm){var wm=Math.sin(bm),Wg=Math.cos(bm),wd=[Wg,-wm,wm,Wg];_p._matMult(wd),ih._matMult(wd),nd._matMult(wd),xp._matMult(wd)}var gb=Kl.stretch+Kl.fixed,xA=$u.stretch+$u.fixed,yb=Ol.stretch+Ol.fixed,bA=hc.stretch+hc.fixed,hd={x:Ie.paddedRect.x+Bg+gb,y:Ie.paddedRect.y+Bg+yb,w:xA-gb,h:bA-yb},Xg=qn/Ne/Ht,_b=Eo/Ne/er;return{tl:_p,tr:ih,bl:nd,br:xp,tex:hd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:jv,pixelOffsetBR:xm,minFontScaleX:Xg,minFontScaleY:_b,isSDF:G}};if(!oe||!Ie.stretchX&&!Ie.stretchY)be.push(mo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ft+1},{fixed:0,stretch:It+1}));else for(var Is=Mk(Lr,Mi,ua),ko=Mk(Yr,ni,Oa),Do=0;Do0&&(ua=Math.max(10,ua),this.circleDiameter=ua)}else{var Oa=Ne.top*ft-It,Mi=Ne.bottom*ft+It,ni=Ne.left*ft-It,$i=Ne.right*ft+It,Oi=Ne.collisionPadding;if(Oi&&(ni-=Oi[0]*ft,Oa-=Oi[1]*ft,$i+=Oi[2]*ft,Mi+=Oi[3]*ft),er){var Ji=new i(ni,Oa),ln=new i($i,Oa),bn=new i(ni,Mi),qn=new i($i,Mi),Nn=er*Math.PI/180;Ji._rotate(Nn),ln._rotate(Nn),bn._rotate(Nn),qn._rotate(Nn),ni=Math.min(Ji.x,ln.x,bn.x,qn.x),$i=Math.max(Ji.x,ln.x,bn.x,qn.x),Oa=Math.min(Ji.y,ln.y,bn.y,qn.y),Mi=Math.max(Ji.y,ln.y,bn.y,qn.y)}C.emplaceBack(G.x,G.y,ni,Oa,$i,Mi,oe,be,Ie)}this.boxEndIndex=C.length},Ng=function(C,G){if(C===void 0&&(C=[]),G===void 0&&(G=TW),this.data=C,this.length=this.data.length,this.compare=G,this.length>0)for(var oe=(this.length>>1)-1;oe>=0;oe--)this._down(oe)};Ng.prototype.push=function(C){this.data.push(C),this.length++,this._up(this.length-1)},Ng.prototype.pop=function(){if(this.length!==0){var C=this.data[0],G=this.data.pop();return this.length--,this.length>0&&(this.data[0]=G,this._down(0)),C}},Ng.prototype.peek=function(){return this.data[0]},Ng.prototype._up=function(C){for(var G=this,oe=G.data,be=G.compare,Ie=oe[C];C>0;){var Ne=C-1>>1,ft=oe[Ne];if(be(Ie,ft)>=0)break;oe[C]=ft,C=Ne}oe[C]=Ie},Ng.prototype._down=function(C){for(var G=this,oe=G.data,be=G.compare,Ie=this.length>>1,Ne=oe[C];C=0)break;oe[C]=It,C=ft}oe[C]=Ne};function TW(k,C){return kC?1:0}function AW(k,C,G){C===void 0&&(C=1),G===void 0&&(G=!1);for(var oe=1/0,be=1/0,Ie=-1/0,Ne=-1/0,ft=k[0],It=0;ItIe)&&(Ie=Ht.x),(!It||Ht.y>Ne)&&(Ne=Ht.y)}var er=Ie-oe,Lr=Ne-be,Yr=Math.min(er,Lr),Vr=Yr/2,ua=new Ng([],SW);if(Yr===0)return new i(oe,be);for(var Oa=oe;Oani.d||!ni.d)&&(ni=Oi,G&&console.log("found best %d after %d probes",Math.round(1e4*Oi.d)/1e4,$i)),!(Oi.max-ni.d<=C)&&(Vr=Oi.h/2,ua.push(new Ug(Oi.p.x-Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y-Vr,Vr,k)),ua.push(new Ug(Oi.p.x-Vr,Oi.p.y+Vr,Vr,k)),ua.push(new Ug(Oi.p.x+Vr,Oi.p.y+Vr,Vr,k)),$i+=4)}return G&&(console.log("num probes: "+$i),console.log("best distance: "+ni.d)),ni.p}function SW(k,C){return C.max-k.max}function Ug(k,C,G,oe){this.p=new i(k,C),this.h=G,this.d=MW(this.p,oe),this.max=this.d+this.h*Math.SQRT2}function MW(k,C){for(var G=!1,oe=1/0,be=0;bek.y!=er.y>k.y&&k.x<(er.x-Ht.x)*(k.y-Ht.y)/(er.y-Ht.y)+Ht.x&&(G=!G),oe=Math.min(oe,qd(k,Ht,er))}return(G?1:-1)*Math.sqrt(oe)}function EW(k){for(var C=0,G=0,oe=0,be=k[0],Ie=0,Ne=be.length,ft=Ne-1;Ie=ui||wd.y<0||wd.y>=ui||LW(k,wd,Wg,G,oe,be,ko,k.layers[0],k.collisionBoxArray,C.index,C.sourceLayerIndex,k.index,ni,ln,Nn,It,Oi,bn,Eo,Vr,C,Ie,Ht,er,Ne)};if(oo==="line")for(var $s=0,Ms=Ak(C.geometry,0,0,ui,ui);$s1){var gh=xW(_f,qn,G.vertical||ua,oe,Oa,$i);gh&&Do(_f,gh)}}else if(C.type==="Polygon")for(var Zf=0,rp=Cg(C.geometry,0);Zfym&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')):Mi.kind==="composite"&&(ni=[Bh*Vr.compositeTextSizes[0].evaluate(Ne,{},ua),Bh*Vr.compositeTextSizes[1].evaluate(Ne,{},ua)],(ni[0]>ym||ni[1]>ym)&&B(k.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')),k.addSymbols(k.text,Oa,ni,ft,Ie,Ne,Ht,C,It.lineStartIndex,It.lineLength,Yr,ua);for(var $i=0,Oi=er;$iym&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')):_p.kind==="composite"&&(ih=[Bh*ln.compositeIconSizes[0].evaluate(Ji,{},qn),Bh*ln.compositeIconSizes[1].evaluate(Ji,{},qn)],(ih[0]>ym||ih[1]>ym)&&B(k.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')),k.addSymbols(k.icon,yh,ih,Oi,$i,Ji,!1,C,oo.lineStartIndex,oo.lineLength,-1,qn),Yl=k.icon.placedSymbolArray.length-1,yp&&(Ms=yp.length*4,k.addSymbols(k.icon,yp,ih,Oi,$i,Ji,mp.vertical,C,oo.lineStartIndex,oo.lineLength,-1,qn),Kl=k.icon.placedSymbolArray.length-1)}for(var xp in oe.horizontal){var nd=oe.horizontal[xp];if(!mo){$u=ye(nd.text);var jv=ft.layout.get("text-rotate").evaluate(Ji,{},qn);mo=new hb(It,C,Ht,er,Lr,nd,Yr,Vr,ua,jv)}var xm=nd.positionedLines.length===1;if(Zl+=kk(k,C,nd,Ie,ft,ua,Ji,Oa,oo,oe.vertical?mp.horizontal:mp.horizontalOnly,xm?Object.keys(oe.horizontal):[xp],Ol,Yl,ln,qn),xm)break}oe.vertical&&(zu+=kk(k,C,oe.vertical,Ie,ft,ua,Ji,Oa,oo,mp.vertical,["vertical"],Ol,Kl,ln,qn));var bm=mo?mo.boxStartIndex:k.collisionBoxArray.length,wm=mo?mo.boxEndIndex:k.collisionBoxArray.length,Wg=ko?ko.boxStartIndex:k.collisionBoxArray.length,wd=ko?ko.boxEndIndex:k.collisionBoxArray.length,gb=Is?Is.boxStartIndex:k.collisionBoxArray.length,xA=Is?Is.boxEndIndex:k.collisionBoxArray.length,yb=Do?Do.boxStartIndex:k.collisionBoxArray.length,bA=Do?Do.boxEndIndex:k.collisionBoxArray.length,hd=-1,Xg=function(r_,Hk){return r_&&r_.circleDiameter?Math.max(r_.circleDiameter,Hk):Hk};hd=Xg(mo,hd),hd=Xg(ko,hd),hd=Xg(Is,hd),hd=Xg(Do,hd);var _b=hd>-1?1:0;_b&&(hd*=Nn/en),k.glyphOffsetArray.length>=Du.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ji.sortKey!==void 0&&k.addToSortKeyRanges(k.symbolInstances.length,Ji.sortKey),k.symbolInstances.emplaceBack(C.x,C.y,Ol.right>=0?Ol.right:-1,Ol.center>=0?Ol.center:-1,Ol.left>=0?Ol.left:-1,Ol.vertical||-1,Yl,Kl,$u,bm,wm,Wg,wd,gb,xA,yb,bA,Ht,Zl,zu,$s,Ms,_b,0,Yr,hc,hf,hd)}function PW(k,C,G,oe){var be=k.compareText;if(!(C in be))be[C]=[];else for(var Ie=be[C],Ne=Ie.length-1;Ne>=0;Ne--)if(oe.dist(Ie[Ne])0)&&(Ne.value.kind!=="constant"||Ne.value.value.length>0),er=It.value.kind!=="constant"||!!It.value.value||Object.keys(It.parameters).length>0,Lr=Ie.get("symbol-sort-key");if(this.features=[],!(!Ht&&!er)){for(var Yr=G.iconDependencies,Vr=G.glyphDependencies,ua=G.availableImages,Oa=new mn(this.zoom),Mi=0,ni=C;Mi=0;for(var zu=0,Yl=Eo.sections;zu=0;It--)Ne[It]={x:G[It].x,y:G[It].y,tileUnitDistanceFromAnchor:Ie},It>0&&(Ie+=G[It-1].dist(G[It]));for(var Ht=0;Ht0},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(C,G){for(var oe=C.placedSymbolArray.get(G),be=oe.vertexStartIndex+oe.numGlyphs*4,Ie=oe.vertexStartIndex;Ie1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(C),this.sortedAngle=C,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var oe=0,be=this.symbolInstanceIndexes;oe=0&&Ht.indexOf(ft)===It&&G.addIndicesForPlacedSymbol(G.text,ft)}),Ne.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ne.verticalPlacedTextSymbolIndex),Ne.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.placedIconSymbolIndex),Ne.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ne.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},me("SymbolBucket",Du,{omit:["layers","collisionBoxArray","features","compareText"]}),Du.MAX_GLYPHS=65535,Du.addDynamicAttributes=vA;function zW(k,C){return C.replace(/{([^{}]+)}/g,function(G,oe){return oe in k?String(k[oe]):""})}var FW=new ma({"symbol-placement":new it(Gi.layout_symbol["symbol-placement"]),"symbol-spacing":new it(Gi.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new it(Gi.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Xt(Gi.layout_symbol["symbol-sort-key"]),"symbol-z-order":new it(Gi.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new it(Gi.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new it(Gi.layout_symbol["icon-ignore-placement"]),"icon-optional":new it(Gi.layout_symbol["icon-optional"]),"icon-rotation-alignment":new it(Gi.layout_symbol["icon-rotation-alignment"]),"icon-size":new Xt(Gi.layout_symbol["icon-size"]),"icon-text-fit":new it(Gi.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new it(Gi.layout_symbol["icon-text-fit-padding"]),"icon-image":new Xt(Gi.layout_symbol["icon-image"]),"icon-rotate":new Xt(Gi.layout_symbol["icon-rotate"]),"icon-padding":new it(Gi.layout_symbol["icon-padding"]),"icon-keep-upright":new it(Gi.layout_symbol["icon-keep-upright"]),"icon-offset":new Xt(Gi.layout_symbol["icon-offset"]),"icon-anchor":new Xt(Gi.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new it(Gi.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new it(Gi.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new it(Gi.layout_symbol["text-rotation-alignment"]),"text-field":new Xt(Gi.layout_symbol["text-field"]),"text-font":new Xt(Gi.layout_symbol["text-font"]),"text-size":new Xt(Gi.layout_symbol["text-size"]),"text-max-width":new Xt(Gi.layout_symbol["text-max-width"]),"text-line-height":new it(Gi.layout_symbol["text-line-height"]),"text-letter-spacing":new Xt(Gi.layout_symbol["text-letter-spacing"]),"text-justify":new Xt(Gi.layout_symbol["text-justify"]),"text-radial-offset":new Xt(Gi.layout_symbol["text-radial-offset"]),"text-variable-anchor":new it(Gi.layout_symbol["text-variable-anchor"]),"text-anchor":new Xt(Gi.layout_symbol["text-anchor"]),"text-max-angle":new it(Gi.layout_symbol["text-max-angle"]),"text-writing-mode":new it(Gi.layout_symbol["text-writing-mode"]),"text-rotate":new Xt(Gi.layout_symbol["text-rotate"]),"text-padding":new it(Gi.layout_symbol["text-padding"]),"text-keep-upright":new it(Gi.layout_symbol["text-keep-upright"]),"text-transform":new Xt(Gi.layout_symbol["text-transform"]),"text-offset":new Xt(Gi.layout_symbol["text-offset"]),"text-allow-overlap":new it(Gi.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new it(Gi.layout_symbol["text-ignore-placement"]),"text-optional":new it(Gi.layout_symbol["text-optional"])}),OW=new ma({"icon-opacity":new Xt(Gi.paint_symbol["icon-opacity"]),"icon-color":new Xt(Gi.paint_symbol["icon-color"]),"icon-halo-color":new Xt(Gi.paint_symbol["icon-halo-color"]),"icon-halo-width":new Xt(Gi.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Xt(Gi.paint_symbol["icon-halo-blur"]),"icon-translate":new it(Gi.paint_symbol["icon-translate"]),"icon-translate-anchor":new it(Gi.paint_symbol["icon-translate-anchor"]),"text-opacity":new Xt(Gi.paint_symbol["text-opacity"]),"text-color":new Xt(Gi.paint_symbol["text-color"],{runtimeType:Ws,getOverride:function(k){return k.textColor},hasOverride:function(k){return!!k.textColor}}),"text-halo-color":new Xt(Gi.paint_symbol["text-halo-color"]),"text-halo-width":new Xt(Gi.paint_symbol["text-halo-width"]),"text-halo-blur":new Xt(Gi.paint_symbol["text-halo-blur"]),"text-translate":new it(Gi.paint_symbol["text-translate"]),"text-translate-anchor":new it(Gi.paint_symbol["text-translate-anchor"])}),mA={paint:OW,layout:FW},Vg=function(C){this.type=C.property.overrides?C.property.overrides.runtimeType:il,this.defaultValue=C};Vg.prototype.evaluate=function(C){if(C.formattedSection){var G=this.defaultValue.property.overrides;if(G&&G.hasOverride(C.formattedSection))return G.getOverride(C.formattedSection)}return C.feature&&C.featureState?this.defaultValue.evaluate(C.feature,C.featureState):this.defaultValue.property.specification.default},Vg.prototype.eachChild=function(C){if(!this.defaultValue.isConstant()){var G=this.defaultValue.value;C(G._styleExpression.expression)}},Vg.prototype.outputDefined=function(){return!1},Vg.prototype.serialize=function(){return null},me("FormatSectionOverride",Vg,{omit:["defaultValue"]});var BW=function(k){function C(G){k.call(this,G,mA)}return k&&(C.__proto__=k),C.prototype=Object.create(k&&k.prototype),C.prototype.constructor=C,C.prototype.recalculate=function(oe,be){if(k.prototype.recalculate.call(this,oe,be),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 Ne=[],ft=0,It=Ie;ft",targetMapId:be,sourceMapId:Ne.mapId})}}},Gg.prototype.receive=function(C){var G=C.data,oe=G.id;if(oe&&!(G.targetMapId&&this.mapId!==G.targetMapId))if(G.type===""){delete this.tasks[oe];var be=this.cancelCallbacks[oe];delete this.cancelCallbacks[oe],be&&be()}else ce()||G.mustQueue?(this.tasks[oe]=G,this.taskQueue.push(oe),this.invoker.trigger()):this.processTask(oe,G)},Gg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),G=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),G&&this.processTask(C,G)}},Gg.prototype.processTask=function(C,G){var oe=this;if(G.type===""){var be=this.callbacks[C];delete this.callbacks[C],be&&(G.error?be(Tt(G.error)):be(null,Tt(G.data)))}else{var Ie=!1,Ne=X(this.globalScope)?void 0:[],ft=G.hasCallback?function(Yr,Vr){Ie=!0,delete oe.cancelCallbacks[C],oe.target.postMessage({id:C,type:"",sourceMapId:oe.mapId,error:Yr?yt(Yr):null,data:yt(Vr,Ne)},Ne)}:function(Yr){Ie=!0},It=null,Ht=Tt(G.data);if(this.parent[G.type])It=this.parent[G.type](G.sourceMapId,Ht,ft);else if(this.parent.getWorkerSource){var er=G.type.split("."),Lr=this.parent.getWorkerSource(G.sourceMapId,er[0],Ht.source);It=Lr[er[1]](Ht,ft)}else ft(new Error("Could not find function "+G.type));!Ie&&It&&It.cancel&&(this.cancelCallbacks[C]=It.cancel)}},Gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function YW(k,C,G){C=Math.pow(2,G)-C-1;var oe=Dk(k*256,C*256,G),be=Dk((k+1)*256,(C+1)*256,G);return oe[0]+","+oe[1]+","+be[0]+","+be[1]}function Dk(k,C,G){var oe=2*Math.PI*6378137/256/Math.pow(2,G),be=k*oe-2*Math.PI*6378137/2,Ie=C*oe-2*Math.PI*6378137/2;return[be,Ie]}var Wf=function(C,G){C&&(G?this.setSouthWest(C).setNorthEast(G):C.length===4?this.setSouthWest([C[0],C[1]]).setNorthEast([C[2],C[3]]):this.setSouthWest(C[0]).setNorthEast(C[1]))};Wf.prototype.setNorthEast=function(C){return this._ne=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.setSouthWest=function(C){return this._sw=C instanceof Fc?new Fc(C.lng,C.lat):Fc.convert(C),this},Wf.prototype.extend=function(C){var G=this._sw,oe=this._ne,be,Ie;if(C instanceof Fc)be=C,Ie=C;else if(C instanceof Wf){if(be=C._sw,Ie=C._ne,!be||!Ie)return this}else{if(Array.isArray(C))if(C.length===4||C.every(Array.isArray)){var Ne=C;return this.extend(Wf.convert(Ne))}else{var ft=C;return this.extend(Fc.convert(ft))}return this}return!G&&!oe?(this._sw=new Fc(be.lng,be.lat),this._ne=new Fc(Ie.lng,Ie.lat)):(G.lng=Math.min(be.lng,G.lng),G.lat=Math.min(be.lat,G.lat),oe.lng=Math.max(Ie.lng,oe.lng),oe.lat=Math.max(Ie.lat,oe.lat)),this},Wf.prototype.getCenter=function(){return new Fc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Wf.prototype.getSouthWest=function(){return this._sw},Wf.prototype.getNorthEast=function(){return this._ne},Wf.prototype.getNorthWest=function(){return new Fc(this.getWest(),this.getNorth())},Wf.prototype.getSouthEast=function(){return new Fc(this.getEast(),this.getSouth())},Wf.prototype.getWest=function(){return this._sw.lng},Wf.prototype.getSouth=function(){return this._sw.lat},Wf.prototype.getEast=function(){return this._ne.lng},Wf.prototype.getNorth=function(){return this._ne.lat},Wf.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Wf.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Wf.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Wf.prototype.contains=function(C){var G=Fc.convert(C),oe=G.lng,be=G.lat,Ie=this._sw.lat<=be&&be<=this._ne.lat,Ne=this._sw.lng<=oe&&oe<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ne=this._sw.lng>=oe&&oe>=this._ne.lng),Ie&&Ne},Wf.convert=function(C){return!C||C instanceof Wf?C:new Wf(C)};var zk=63710088e-1,Fc=function(C,G){if(isNaN(C)||isNaN(G))throw new Error("Invalid LngLat object: ("+C+", "+G+")");if(this.lng=+C,this.lat=+G,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Fc.prototype.wrap=function(){return new Fc(x(this.lng,-180,180),this.lat)},Fc.prototype.toArray=function(){return[this.lng,this.lat]},Fc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Fc.prototype.distanceTo=function(C){var G=Math.PI/180,oe=this.lat*G,be=C.lat*G,Ie=Math.sin(oe)*Math.sin(be)+Math.cos(oe)*Math.cos(be)*Math.cos((C.lng-this.lng)*G),Ne=zk*Math.acos(Math.min(Ie,1));return Ne},Fc.prototype.toBounds=function(C){C===void 0&&(C=0);var G=40075017,oe=360*C/G,be=oe/Math.cos(Math.PI/180*this.lat);return new Wf(new Fc(this.lng-be,this.lat-oe),new Fc(this.lng+be,this.lat+oe))},Fc.convert=function(C){if(C instanceof Fc)return C;if(Array.isArray(C)&&(C.length===2||C.length===3))return new Fc(Number(C[0]),Number(C[1]));if(!Array.isArray(C)&&typeof C=="object"&&C!==null)return new Fc(Number("lng"in C?C.lng:C.lon),Number(C.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Fk=2*Math.PI*zk;function Ok(k){return Fk*Math.cos(k*Math.PI/180)}function Bk(k){return(180+k)/360}function Nk(k){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+k*Math.PI/360)))/360}function Uk(k,C){return k/Ok(C)}function KW(k){return k*360-180}function yA(k){var C=180-k*360;return 360/Math.PI*Math.atan(Math.exp(C*Math.PI/180))-90}function JW(k,C){return k*Ok(yA(C))}function $W(k){return 1/Math.cos(k*Math.PI/180)}var U0=function(C,G,oe){oe===void 0&&(oe=0),this.x=+C,this.y=+G,this.z=+oe};U0.fromLngLat=function(C,G){G===void 0&&(G=0);var oe=Fc.convert(C);return new U0(Bk(oe.lng),Nk(oe.lat),Uk(G,oe.lat))},U0.prototype.toLngLat=function(){return new Fc(KW(this.x),yA(this.y))},U0.prototype.toAltitude=function(){return JW(this.z,this.y)},U0.prototype.meterInMercatorCoordinateUnits=function(){return 1/Fk*$W(yA(this.y))};var j0=function(C,G,oe){this.z=C,this.x=G,this.y=oe,this.key=t_(0,C,C,G,oe)};j0.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},j0.prototype.url=function(C,G){var oe=YW(this.x,this.y,this.z),be=QW(this.z,this.x,this.y);return C[(this.x+this.y)%C.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(G==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",be).replace("{bbox-epsg-3857}",oe)},j0.prototype.getTilePoint=function(C){var G=Math.pow(2,this.z);return new i((C.x*G-this.x)*ui,(C.y*G-this.y)*ui)},j0.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jk=function(C,G){this.wrap=C,this.canonical=G,this.key=t_(C,G.z,G.z,G.x,G.y)},Xf=function(C,G,oe,be,Ie){this.overscaledZ=C,this.wrap=G,this.canonical=new j0(oe,+be,+Ie),this.key=t_(G,C,oe,be,Ie)};Xf.prototype.equals=function(C){return this.overscaledZ===C.overscaledZ&&this.wrap===C.wrap&&this.canonical.equals(C.canonical)},Xf.prototype.scaledTo=function(C){var G=this.canonical.z-C;return C>this.canonical.z?new Xf(C,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Xf(C,this.wrap,C,this.canonical.x>>G,this.canonical.y>>G)},Xf.prototype.calculateScaledKey=function(C,G){var oe=this.canonical.z-C;return C>this.canonical.z?t_(this.wrap*+G,C,this.canonical.z,this.canonical.x,this.canonical.y):t_(this.wrap*+G,C,C,this.canonical.x>>oe,this.canonical.y>>oe)},Xf.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var G=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ>G&&C.canonical.y===this.canonical.y>>G},Xf.prototype.children=function(C){if(this.overscaledZ>=C)return[new Xf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var G=this.canonical.z+1,oe=this.canonical.x*2,be=this.canonical.y*2;return[new Xf(G,this.wrap,G,oe,be),new Xf(G,this.wrap,G,oe+1,be),new Xf(G,this.wrap,G,oe,be+1),new Xf(G,this.wrap,G,oe+1,be+1)]},Xf.prototype.isLessThan=function(C){return this.wrapC.wrap?!1:this.overscaledZC.overscaledZ?!1:this.canonical.xC.canonical.x?!1:this.canonical.y0;Ie--)be=1<=this.dim+1||G<-1||G>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(G+1)*this.stride+(C+1)},Nv.prototype._unpackMapbox=function(C,G,oe){return(C*256*256+G*256+oe)/10-1e4},Nv.prototype._unpackTerrarium=function(C,G,oe){return C*256+G+oe/256-32768},Nv.prototype.getPixels=function(){return new eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Nv.prototype.backfillBorder=function(C,G,oe){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var be=G*this.dim,Ie=G*this.dim+this.dim,Ne=oe*this.dim,ft=oe*this.dim+this.dim;switch(G){case-1:be=Ie-1;break;case 1:Ie=be+1;break}switch(oe){case-1:Ne=ft-1;break;case 1:ft=Ne+1;break}for(var It=-G*this.dim,Ht=-oe*this.dim,er=Ne;er=0&&Lr[3]>=0&&It.insert(ft,Lr[0],Lr[1],Lr[2],Lr[3])}},Uv.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Xd.VectorTile(new vo(this.rawTileData)).layers,this.sourceLayerCoder=new vb(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Uv.prototype.query=function(C,G,oe,be){var Ie=this;this.loadVTLayers();for(var Ne=C.params||{},ft=ui/C.tileSize/C.scale,It=$e(Ne.filter),Ht=C.queryGeometry,er=C.queryPadding*ft,Lr=Vk(Ht),Yr=this.grid.query(Lr.minX-er,Lr.minY-er,Lr.maxX+er,Lr.maxY+er),Vr=Vk(C.cameraQueryGeometry),ua=this.grid3D.query(Vr.minX-er,Vr.minY-er,Vr.maxX+er,Vr.maxY+er,function(bn,qn,Nn,Eo){return td(C.cameraQueryGeometry,bn-er,qn-er,Nn+er,Eo+er)}),Oa=0,Mi=ua;Oabe)Ie=!1;else if(!G)Ie=!0;else if(this.expirationTime=Rr.maxzoom)&&Rr.visibility!=="none"){h(wr,this.zoom,Jt);var Nr=$a[Rr.id]=Rr.createBucket({index:Ba.bucketLayerIDs.length,layers:wr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:rn,sourceID:this.source});Nr.populate(tn,Za,this.tileID.canonical),Ba.bucketLayerIDs.push(wr.map(function(la){return la.id}))}}}}var Hr,gt,Kt,mr,Ir=e.mapObject(Za.glyphDependencies,function(la){return Object.keys(la).map(Number)});Object.keys(Ir).length?Fr.send("getGlyphs",{uid:this.uid,stacks:Ir},function(la,ba){Hr||(Hr=la,gt=ba,ga.call(ra))}):gt={};var va=Object.keys(Za.iconDependencies);va.length?Fr.send("getImages",{icons:va,source:this.source,tileID:this.tileID,type:"icons"},function(la,ba){Hr||(Hr=la,Kt=ba,ga.call(ra))}):Kt={};var Pa=Object.keys(Za.patternDependencies);Pa.length?Fr.send("getImages",{icons:Pa,source:this.source,tileID:this.tileID,type:"patterns"},function(la,ba){Hr||(Hr=la,mr=ba,ga.call(ra))}):mr={},ga.call(this);function ga(){if(Hr)return ta(Hr);if(gt&&Kt&&mr){var la=new n(gt),ba=new e.ImageAtlas(Kt,mr);for(var Ai in $a){var ki=$a[Ai];ki instanceof e.SymbolBucket?(h(ki.layers,this.zoom,Jt),e.performSymbolLayout(ki,gt,la.positions,Kt,ba.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):ki.hasPattern&&(ki instanceof e.LineBucket||ki instanceof e.FillBucket||ki instanceof e.FillExtrusionBucket)&&(h(ki.layers,this.zoom,Jt),ki.addFeatures(Za,this.tileID.canonical,ba.patternPositions))}this.status="done",ta(null,{buckets:e.values($a).filter(function(Ki){return!Ki.isEmpty()}),featureIndex:Ba,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:la.image,imageAtlas:ba,glyphMap:this.returnDependencies?gt:null,iconMap:this.returnDependencies?Kt:null,glyphPositions:this.returnDependencies?la.positions:null})}}};function h(Yt,Rt,Zt){for(var Jt=new e.EvaluationParameters(Rt),Fr=0,ta=Yt;Fr=0!=!!Rt&&Yt.reverse()}var E=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,p=function(Rt){this._feature=Rt,this.extent=e.EXTENT,this.type=Rt.type,this.properties=Rt.tags,"id"in Rt&&!isNaN(Rt.id)&&(this.id=parseInt(Rt.id,10))};p.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Rt=[],Zt=0,Jt=this._feature.geometry;Zt"u"&&(Jt.push(ca),Ba=Jt.length-1,ta[ca]=Ba),Rt.writeVarint(Ba);var $a=Zt.properties[ca],Za=typeof $a;Za!=="string"&&Za!=="boolean"&&Za!=="number"&&($a=JSON.stringify($a));var ri=Za+":"+$a,pi=ra[ri];typeof pi>"u"&&(Fr.push($a),pi=Fr.length-1,ra[ri]=pi),Rt.writeVarint(pi)}}function $(Yt,Rt){return(Rt<<3)+(Yt&7)}function ue(Yt){return Yt<<1^Yt>>31}function ce(Yt,Rt){for(var Zt=Yt.loadGeometry(),Jt=Yt.type,Fr=0,ta=0,ra=Zt.length,ca=0;ca>1;X(Yt,Rt,ra,Jt,Fr,ta%2),Y(Yt,Rt,Zt,Jt,ra-1,ta+1),Y(Yt,Rt,Zt,ra+1,Fr,ta+1)}}function X(Yt,Rt,Zt,Jt,Fr,ta){for(;Fr>Jt;){if(Fr-Jt>600){var ra=Fr-Jt+1,ca=Zt-Jt+1,Ba=Math.log(ra),$a=.5*Math.exp(2*Ba/3),Za=.5*Math.sqrt(Ba*$a*(ra-$a)/ra)*(ca-ra/2<0?-1:1),ri=Math.max(Jt,Math.floor(Zt-ca*$a/ra+Za)),pi=Math.min(Fr,Math.floor(Zt+(ra-ca)*$a/ra+Za));X(Yt,Rt,Zt,ri,pi,ta)}var Ia=Rt[2*Zt+ta],rn=Jt,tn=Fr;for(Q(Yt,Rt,Jt,Zt),Rt[2*Fr+ta]>Ia&&Q(Yt,Rt,Jt,Fr);rnIa;)tn--}Rt[2*Jt+ta]===Ia?Q(Yt,Rt,Jt,tn):(tn++,Q(Yt,Rt,tn,Fr)),tn<=Zt&&(Jt=tn+1),Zt<=tn&&(Fr=tn-1)}}function Q(Yt,Rt,Zt,Jt){V(Yt,Zt,Jt),V(Rt,2*Zt,2*Jt),V(Rt,2*Zt+1,2*Jt+1)}function V(Yt,Rt,Zt){var Jt=Yt[Rt];Yt[Rt]=Yt[Zt],Yt[Zt]=Jt}function le(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=[0,Yt.length-1,0],Ba=[],$a,Za;ca.length;){var ri=ca.pop(),pi=ca.pop(),Ia=ca.pop();if(pi-Ia<=ra){for(var rn=Ia;rn<=pi;rn++)$a=Rt[2*rn],Za=Rt[2*rn+1],$a>=Zt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Yt[rn]);continue}var tn=Math.floor((Ia+pi)/2);$a=Rt[2*tn],Za=Rt[2*tn+1],$a>=Zt&&$a<=Fr&&Za>=Jt&&Za<=ta&&Ba.push(Yt[tn]);var cn=(ri+1)%2;(ri===0?Zt<=$a:Jt<=Za)&&(ca.push(Ia),ca.push(tn-1),ca.push(cn)),(ri===0?Fr>=$a:ta>=Za)&&(ca.push(tn+1),ca.push(pi),ca.push(cn))}return Ba}function ae(Yt,Rt,Zt,Jt,Fr,ta){for(var ra=[0,Yt.length-1,0],ca=[],Ba=Fr*Fr;ra.length;){var $a=ra.pop(),Za=ra.pop(),ri=ra.pop();if(Za-ri<=ta){for(var pi=ri;pi<=Za;pi++)j(Rt[2*pi],Rt[2*pi+1],Zt,Jt)<=Ba&&ca.push(Yt[pi]);continue}var Ia=Math.floor((ri+Za)/2),rn=Rt[2*Ia],tn=Rt[2*Ia+1];j(rn,tn,Zt,Jt)<=Ba&&ca.push(Yt[Ia]);var cn=($a+1)%2;($a===0?Zt-Fr<=rn:Jt-Fr<=tn)&&(ra.push(ri),ra.push(Ia-1),ra.push(cn)),($a===0?Zt+Fr>=rn:Jt+Fr>=tn)&&(ra.push(Ia+1),ra.push(Za),ra.push(cn))}return ca}function j(Yt,Rt,Zt,Jt){var Fr=Yt-Zt,ta=Rt-Jt;return Fr*Fr+ta*ta}var ee=function(Yt){return Yt[0]},te=function(Yt){return Yt[1]},pe=function(Rt,Zt,Jt,Fr,ta){Zt===void 0&&(Zt=ee),Jt===void 0&&(Jt=te),Fr===void 0&&(Fr=64),ta===void 0&&(ta=Float64Array),this.nodeSize=Fr,this.points=Rt;for(var ra=Rt.length<65536?Uint16Array:Uint32Array,ca=this.ids=new ra(Rt.length),Ba=this.coords=new ta(Rt.length*2),$a=0;$a=Fr;Za--){var ri=+Date.now();Ba=this._cluster(Ba,Za),this.trees[Za]=new pe(Ba,ne,Ce,ra,Float32Array),Jt&&console.log("z%d: %d clusters in %dms",Za,Ba.length,+Date.now()-ri)}return Jt&&console.timeEnd("total time"),this},Se.prototype.getClusters=function(Rt,Zt){var Jt=((Rt[0]+180)%360+360)%360-180,Fr=Math.max(-90,Math.min(90,Rt[1])),ta=Rt[2]===180?180:((Rt[2]+180)%360+360)%360-180,ra=Math.max(-90,Math.min(90,Rt[3]));if(Rt[2]-Rt[0]>=360)Jt=-180,ta=180;else if(Jt>ta){var ca=this.getClusters([Jt,Fr,180,ra],Zt),Ba=this.getClusters([-180,Fr,ta,ra],Zt);return ca.concat(Ba)}for(var $a=this.trees[this._limitZoom(Zt)],Za=$a.range(nt(Jt),tt(ra),nt(ta),tt(Fr)),ri=[],pi=0,Ia=Za;piZt&&(tn+=Or.numPoints||1)}if(tn>=Ba){for(var Cr=ri.x*rn,wr=ri.y*rn,Rr=ca&&rn>1?this._map(ri,!0):null,Nr=(Za<<5)+(Zt+1)+this.points.length,Hr=0,gt=Ia;Hr1)for(var va=0,Pa=Ia;va>5},Se.prototype._getOriginZoom=function(Rt){return(Rt-this.points.length)%32},Se.prototype._map=function(Rt,Zt){if(Rt.numPoints)return Zt?se({},Rt.properties):Rt.properties;var Jt=this.points[Rt.index].properties,Fr=this.options.map(Jt);return Zt&&Fr===Jt?se({},Fr):Fr};function Re(Yt,Rt,Zt,Jt,Fr){return{x:Yt,y:Rt,zoom:1/0,id:Zt,parentId:-1,numPoints:Jt,properties:Fr}}function Pe(Yt,Rt){var Zt=Yt.geometry.coordinates,Jt=Zt[0],Fr=Zt[1];return{x:nt(Jt),y:tt(Fr),zoom:1/0,index:Rt,parentId:-1}}function je(Yt){return{type:"Feature",id:Yt.id,properties:at(Yt),geometry:{type:"Point",coordinates:[Ve(Yt.x),he(Yt.y)]}}}function at(Yt){var Rt=Yt.numPoints,Zt=Rt>=1e4?Math.round(Rt/1e3)+"k":Rt>=1e3?Math.round(Rt/100)/10+"k":Rt;return se(se({},Yt.properties),{cluster:!0,cluster_id:Yt.id,point_count:Rt,point_count_abbreviated:Zt})}function nt(Yt){return Yt/360+.5}function tt(Yt){var Rt=Math.sin(Yt*Math.PI/180),Zt=.5-.25*Math.log((1+Rt)/(1-Rt))/Math.PI;return Zt<0?0:Zt>1?1:Zt}function Ve(Yt){return(Yt-.5)*360}function he(Yt){var Rt=(180-Yt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Rt))/Math.PI-90}function se(Yt,Rt){for(var Zt in Rt)Yt[Zt]=Rt[Zt];return Yt}function ne(Yt){return Yt.x}function Ce(Yt){return Yt.y}function Ze(Yt,Rt,Zt,Jt){for(var Fr=Jt,ta=Zt-Rt>>1,ra=Zt-Rt,ca,Ba=Yt[Rt],$a=Yt[Rt+1],Za=Yt[Zt],ri=Yt[Zt+1],pi=Rt+3;piFr)ca=pi,Fr=Ia;else if(Ia===Fr){var rn=Math.abs(pi-ta);rnJt&&(ca-Rt>3&&Ze(Yt,Rt,ca,Jt),Yt[ca+2]=Fr,Zt-ca>3&&Ze(Yt,ca,Zt,Jt))}function rt(Yt,Rt,Zt,Jt,Fr,ta){var ra=Fr-Zt,ca=ta-Jt;if(ra!==0||ca!==0){var Ba=((Yt-Zt)*ra+(Rt-Jt)*ca)/(ra*ra+ca*ca);Ba>1?(Zt=Fr,Jt=ta):Ba>0&&(Zt+=ra*Ba,Jt+=ca*Ba)}return ra=Yt-Zt,ca=Rt-Jt,ra*ra+ca*ca}function Je(Yt,Rt,Zt,Jt){var Fr={id:typeof Yt>"u"?null:Yt,type:Rt,geometry:Zt,tags:Jt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return St(Fr),Fr}function St(Yt){var Rt=Yt.geometry,Zt=Yt.type;if(Zt==="Point"||Zt==="MultiPoint"||Zt==="LineString")kt(Yt,Rt);else if(Zt==="Polygon"||Zt==="MultiLineString")for(var Jt=0;Jt0&&(Jt?ra+=(Fr*$a-Ba*ta)/2:ra+=Math.sqrt(Math.pow(Ba-Fr,2)+Math.pow($a-ta,2))),Fr=Ba,ta=$a}var Za=Rt.length-3;Rt[2]=1,Ze(Rt,0,Za,Zt),Rt[Za+2]=1,Rt.size=Math.abs(ra),Rt.start=0,Rt.end=Rt.size}function qr(Yt,Rt,Zt,Jt){for(var Fr=0;Fr1?1:Zt}function _t(Yt,Rt,Zt,Jt,Fr,ta,ra,ca){if(Zt/=Rt,Jt/=Rt,ta>=Zt&&ra=Jt)return null;for(var Ba=[],$a=0;$a=Zt&&rn=Jt)continue;var tn=[];if(pi==="Point"||pi==="MultiPoint")Fe(ri,tn,Zt,Jt,Fr);else if(pi==="LineString")Ye(ri,tn,Zt,Jt,Fr,!1,ca.lineMetrics);else if(pi==="MultiLineString")Le(ri,tn,Zt,Jt,Fr,!1);else if(pi==="Polygon")Le(ri,tn,Zt,Jt,Fr,!0);else if(pi==="MultiPolygon")for(var cn=0;cn=Zt&&ra<=Jt&&(Rt.push(Yt[ta]),Rt.push(Yt[ta+1]),Rt.push(Yt[ta+2]))}}function Ye(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=Ae(Yt),Ba=Fr===0?Ke:st,$a=Yt.start,Za,ri,pi=0;piZt&&(ri=Ba(ca,Ia,rn,cn,xt,Zt),ra&&(ca.start=$a+Za*ri)):ut>Jt?Or=Zt&&(ri=Ba(ca,Ia,rn,cn,xt,Zt),Cr=!0),Or>Jt&&ut<=Jt&&(ri=Ba(ca,Ia,rn,cn,xt,Jt),Cr=!0),!ta&&Cr&&(ra&&(ca.end=$a+Za*ri),Rt.push(ca),ca=Ae(Yt)),ra&&($a+=Za)}var wr=Yt.length-3;Ia=Yt[wr],rn=Yt[wr+1],tn=Yt[wr+2],ut=Fr===0?Ia:rn,ut>=Zt&&ut<=Jt&&We(ca,Ia,rn,tn),wr=ca.length-3,ta&&wr>=3&&(ca[wr]!==ca[0]||ca[wr+1]!==ca[1])&&We(ca,ca[0],ca[1],ca[2]),ca.length&&Rt.push(ca)}function Ae(Yt){var Rt=[];return Rt.size=Yt.size,Rt.start=Yt.start,Rt.end=Yt.end,Rt}function Le(Yt,Rt,Zt,Jt,Fr,ta){for(var ra=0;rara.maxX&&(ra.maxX=Za),ri>ra.maxY&&(ra.maxY=ri)}return ra}function or(Yt,Rt,Zt,Jt){var Fr=Rt.geometry,ta=Rt.type,ra=[];if(ta==="Point"||ta==="MultiPoint")for(var ca=0;ca0&&Rt.size<(Fr?ra:Jt)){Zt.numPoints+=Rt.length/3;return}for(var ca=[],Ba=0;Bara)&&(Zt.numSimplified++,ca.push(Rt[Ba]),ca.push(Rt[Ba+1])),Zt.numPoints++;Fr&&Pr(ca,ta),Yt.push(ca)}function Pr(Yt,Rt){for(var Zt=0,Jt=0,Fr=Yt.length,ta=Fr-2;Jt0===Rt)for(Jt=0,Fr=Yt.length;Jt24)throw new Error("maxZoom should be in the 0-24 range");if(Rt.promoteId&&Rt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Jt=Bt(Yt,Rt);this.tiles={},this.tileCoords=[],Zt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Rt.indexMaxZoom,Rt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Jt=ot(Jt,Rt),Jt.length&&this.splitTile(Jt,0,0,0),Zt&&(Jt.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)))}Fa.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Fa.prototype.splitTile=function(Yt,Rt,Zt,Jt,Fr,ta,ra){for(var ca=[Yt,Rt,Zt,Jt],Ba=this.options,$a=Ba.debug;ca.length;){Jt=ca.pop(),Zt=ca.pop(),Rt=ca.pop(),Yt=ca.pop();var Za=1<1&&console.time("creation"),pi=this.tiles[ri]=cr(Yt,Rt,Zt,Jt,Ba),this.tileCoords.push({z:Rt,x:Zt,y:Jt}),$a)){$a>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Rt,Zt,Jt,pi.numFeatures,pi.numPoints,pi.numSimplified),console.timeEnd("creation"));var Ia="z"+Rt;this.stats[Ia]=(this.stats[Ia]||0)+1,this.total++}if(pi.source=Yt,Fr){if(Rt===Ba.maxZoom||Rt===Fr)continue;var rn=1<1&&console.time("clipping");var tn=.5*Ba.buffer/Ba.extent,cn=.5-tn,xt=.5+tn,ut=1+tn,Or,Cr,wr,Rr,Nr,Hr;Or=Cr=wr=Rr=null,Nr=_t(Yt,Za,Zt-tn,Zt+xt,0,pi.minX,pi.maxX,Ba),Hr=_t(Yt,Za,Zt+cn,Zt+ut,0,pi.minX,pi.maxX,Ba),Yt=null,Nr&&(Or=_t(Nr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Cr=_t(Nr,Za,Jt+cn,Jt+ut,1,pi.minY,pi.maxY,Ba),Nr=null),Hr&&(wr=_t(Hr,Za,Jt-tn,Jt+xt,1,pi.minY,pi.maxY,Ba),Rr=_t(Hr,Za,Jt+cn,Jt+ut,1,pi.minY,pi.maxY,Ba),Hr=null),$a>1&&console.timeEnd("clipping"),ca.push(Or||[],Rt+1,Zt*2,Jt*2),ca.push(Cr||[],Rt+1,Zt*2,Jt*2+1),ca.push(wr||[],Rt+1,Zt*2+1,Jt*2),ca.push(Rr||[],Rt+1,Zt*2+1,Jt*2+1)}}},Fa.prototype.getTile=function(Yt,Rt,Zt){var Jt=this.options,Fr=Jt.extent,ta=Jt.debug;if(Yt<0||Yt>24)return null;var ra=1<1&&console.log("drilling down to z%d-%d-%d",Yt,Rt,Zt);for(var Ba=Yt,$a=Rt,Za=Zt,ri;!ri&&Ba>0;)Ba--,$a=Math.floor($a/2),Za=Math.floor(Za/2),ri=this.tiles[Ra(Ba,$a,Za)];return!ri||!ri.source?null:(ta>1&&console.log("found parent tile z%d-%d-%d",Ba,$a,Za),ta>1&&console.time("drilling down"),this.splitTile(ri.source,Ba,$a,Za,Yt,Rt,Zt),ta>1&&console.timeEnd("drilling down"),this.tiles[ca]?Pt(this.tiles[ca],Fr):null)};function Ra(Yt,Rt,Zt){return((1<=0?0:ge.button},r.remove=function(ge){ge.parentNode&&ge.parentNode.removeChild(ge)};function c(ge,K,xe){var re,ye,Ue,ke=e.browser.devicePixelRatio>1?"@2x":"",Qe=e.getJSON(K.transformRequest(K.normalizeSpriteURL(ge,ke,".json"),e.ResourceType.SpriteJSON),function(br,Br){Qe=null,Ue||(Ue=br,re=Br,qt())}),vt=e.getImage(K.transformRequest(K.normalizeSpriteURL(ge,ke,".png"),e.ResourceType.SpriteImage),function(br,Br){vt=null,Ue||(Ue=br,ye=Br,qt())});function qt(){if(Ue)xe(Ue);else if(re&&ye){var br=e.browser.getImageData(ye),Br={};for(var pr in re){var mt=re[pr],Mt=mt.width,Ft=mt.height,rr=mt.x,hr=mt.y,sr=mt.sdf,dr=mt.pixelRatio,lr=mt.stretchX,Wt=mt.stretchY,ir=mt.content,Gt=new e.RGBAImage({width:Mt,height:Ft});e.RGBAImage.copy(br,Gt,{x:rr,y:hr},{x:0,y:0},{width:Mt,height:Ft}),Br[pr]={data:Gt,pixelRatio:dr,sdf:sr,stretchX:lr,stretchY:Wt,content:ir}}xe(null,Br)}}return{cancel:function(){Qe&&(Qe.cancel(),Qe=null),vt&&(vt.cancel(),vt=null)}}}function T(ge){var K=ge.userImage;if(K&&K.render){var xe=K.render();if(xe)return ge.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var l=1,x=function(ge){function K(){ge.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 ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(re){if(this.loaded!==re&&(this.loaded=re,re)){for(var ye=0,Ue=this.requestors;ye=0?1.2:1))}b.prototype.draw=function(ge){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ge,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),xe=new Uint8ClampedArray(this.size*this.size),re=0;re65535){br(new Error("glyphs > 65535 not supported"));return}if(mt.ranges[Ft]){br(null,{stack:Br,id:pr,glyph:Mt});return}var rr=mt.requests[Ft];rr||(rr=mt.requests[Ft]=[],g.loadGlyphRange(Br,Ft,re.url,re.requestManager,function(hr,sr){if(sr){for(var dr in sr)re._doesCharSupportLocalGlyph(+dr)||(mt.glyphs[+dr]=sr[+dr]);mt.ranges[Ft]=!0}for(var lr=0,Wt=rr;lr1&&(qt=K[++vt]);var Br=Math.abs(br-qt.left),pr=Math.abs(br-qt.right),mt=Math.min(Br,pr),Mt=void 0,Ft=Ue/re*(ye+1);if(qt.isDash){var rr=ye-Math.abs(Ft);Mt=Math.sqrt(mt*mt+rr*rr)}else Mt=ye-Math.sqrt(mt*mt+Ft*Ft);this.data[Qe+br]=Math.max(0,Math.min(255,Mt+128))}},F.prototype.addRegularDash=function(K){for(var xe=K.length-1;xe>=0;--xe){var re=K[xe],ye=K[xe+1];re.zeroLength?K.splice(xe,1):ye&&ye.isDash===re.isDash&&(ye.left=re.left,K.splice(xe,1))}var Ue=K[0],ke=K[K.length-1];Ue.isDash===ke.isDash&&(Ue.left=ke.left-this.width,ke.right=Ue.right+this.width);for(var Qe=this.width*this.nextRow,vt=0,qt=K[vt],br=0;br1&&(qt=K[++vt]);var Br=Math.abs(br-qt.left),pr=Math.abs(br-qt.right),mt=Math.min(Br,pr),Mt=qt.isDash?mt:-mt;this.data[Qe+br]=Math.max(0,Math.min(255,Mt+128))}},F.prototype.addDash=function(K,xe){var re=xe?7:0,ye=2*re+1;if(this.nextRow+ye>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var Ue=0,ke=0;ke=re.minX&&K.x=re.minY&&K.y0&&(br[new e.OverscaledTileID(re.overscaledZ,Qe,ye.z,ke,ye.y-1).key]={backfilled:!1},br[new e.OverscaledTileID(re.overscaledZ,re.wrap,ye.z,ye.x,ye.y-1).key]={backfilled:!1},br[new e.OverscaledTileID(re.overscaledZ,qt,ye.z,vt,ye.y-1).key]={backfilled:!1}),ye.y+10&&(Ue.resourceTiming=re._resourceTiming,re._resourceTiming=[]),re.fire(new e.Event("data",Ue))})},K.prototype.onAdd=function(re){this.map=re,this.load()},K.prototype.setData=function(re){var ye=this;return this._data=re,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ue){if(Ue){ye.fire(new e.ErrorEvent(Ue));return}var ke={dataType:"source",sourceDataType:"content"};ye._collectResourceTiming&&ye._resourceTiming&&ye._resourceTiming.length>0&&(ke.resourceTiming=ye._resourceTiming,ye._resourceTiming=[]),ye.fire(new e.Event("data",ke))}),this},K.prototype.getClusterExpansionZoom=function(re,ye){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:re,source:this.id},ye),this},K.prototype.getClusterChildren=function(re,ye){return this.actor.send("geojson.getClusterChildren",{clusterId:re,source:this.id},ye),this},K.prototype.getClusterLeaves=function(re,ye,Ue,ke){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:re,limit:ye,offset:Ue},ke),this},K.prototype._updateWorkerData=function(re){var ye=this;this._loaded=!1;var Ue=e.extend({},this.workerOptions),ke=this._data;typeof ke=="string"?(Ue.request=this.map._requestManager.transformRequest(e.browser.resolveURL(ke),e.ResourceType.Source),Ue.request.collectResourceTiming=this._collectResourceTiming):Ue.data=JSON.stringify(ke),this.actor.send(this.type+".loadData",Ue,function(Qe,vt){ye._removed||vt&&vt.abandoned||(ye._loaded=!0,vt&&vt.resourceTiming&&vt.resourceTiming[ye.id]&&(ye._resourceTiming=vt.resourceTiming[ye.id].slice(0)),ye.actor.send(ye.type+".coalesce",{source:Ue.source},null),re(Qe))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(re,ye){var Ue=this,ke=re.actor?"reloadTile":"loadTile";re.actor=this.actor;var Qe={type:this.type,uid:re.uid,tileID:re.tileID,zoom:re.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};re.request=this.actor.send(ke,Qe,function(vt,qt){return delete re.request,re.unloadVectorData(),re.aborted?ye(null):vt?ye(vt):(re.loadVectorData(qt,Ue.map.painter,ke==="reloadTile"),ye(null))})},K.prototype.abortTile=function(re){re.request&&(re.request.cancel(),delete re.request),re.aborted=!0},K.prototype.unloadTile=function(re){re.unloadVectorData(),this.actor.send("removeTile",{uid:re.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(e.Evented),ue=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ce=function(ge){function K(xe,re,ye,Ue){ge.call(this),this.id=xe,this.dispatcher=ye,this.coordinates=re.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ue),this.options=re}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.load=function(re,ye){var Ue=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(ke,Qe){Ue._loaded=!0,ke?Ue.fire(new e.ErrorEvent(ke)):Qe&&(Ue.image=Qe,re&&(Ue.coordinates=re),ye&&ye(),Ue._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(re){var ye=this;return!this.image||!re.url?this:(this.options.url=re.url,this.load(re.coordinates,function(){ye.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(re){this.map=re,this.load()},K.prototype.setCoordinates=function(re){var ye=this;this.coordinates=re;var Ue=re.map(e.MercatorCoordinate.fromLngLat);this.tileID=de(Ue),this.minzoom=this.maxzoom=this.tileID.z;var ke=Ue.map(function(Qe){return ye.tileID.getTilePoint(Qe)._round()});return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(ke[0].x,ke[0].y,0,0),this._boundsArray.emplaceBack(ke[1].x,ke[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(ke[3].x,ke[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(ke[2].x,ke[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},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var re=this.map.painter.context,ye=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(re,this.image,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var Ue in this.tiles){var ke=this.tiles[Ue];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.loadTile=function(re,ye){this.tileID&&this.tileID.equals(re.tileID.canonical)?(this.tiles[String(re.tileID.wrap)]=re,re.buckets={},ye(null)):(re.state="errored",ye(null))},K.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return!1},K}(e.Evented);function de(ge){for(var K=1/0,xe=1/0,re=-1/0,ye=-1/0,Ue=0,ke=ge;Ueye.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ye.start(0)+" and "+ye.end(0)+"-second mark."))):this.video.currentTime=re}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(re){this.map||(this.map=re,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var re=this.map.painter.context,ye=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE),ye.texSubImage2D(ye.TEXTURE_2D,0,0,0,ye.RGBA,ye.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(re,this.video,ye.RGBA),this.texture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE));for(var Ue in this.tiles){var ke=this.tiles[Ue];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this.video&&!this.video.paused},K}(ce),X=function(ge){function K(xe,re,ye,Ue){ge.call(this,xe,re,ye,Ue),re.coordinates?(!Array.isArray(re.coordinates)||re.coordinates.length!==4||re.coordinates.some(function(ke){return!Array.isArray(ke)||ke.length!==2||ke.some(function(Qe){return typeof Qe!="number"})}))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'missing required property "coordinates"'))),re.animate&&typeof re.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,null,'optional "animate" property must be a boolean value'))),re.canvas?typeof re.canvas!="string"&&!(re.canvas instanceof e.window.HTMLCanvasElement)&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+xe,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."+xe,null,'missing required property "canvas"'))),this.options=re,this.animate=re.animate!==void 0?re.animate:!0}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.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()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(re){this.map=re,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var re=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,re=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,re=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ye=this.map.painter.context,Ue=ye.gl;this.boundsBuffer||(this.boundsBuffer=ye.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(re||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(ye,this.canvas,Ue.RGBA,{premultiply:!0});for(var ke in this.tiles){var Qe=this.tiles[ke];Qe.state!=="loaded"&&(Qe.state="loaded",Qe.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var re=0,ye=[this.canvas.width,this.canvas.height];rethis.max){var Qe=this._getAndRemoveByKey(this.order[0]);Qe&&this.onRemove(Qe)}return this},Pe.prototype.has=function(K){return K.wrapped().key in this.data},Pe.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},Pe.prototype._getAndRemoveByKey=function(K){var xe=this.data[K].shift();return xe.timeout&&clearTimeout(xe.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),xe.value},Pe.prototype.getByKey=function(K){var xe=this.data[K];return xe?xe[0].value:null},Pe.prototype.get=function(K){if(!this.has(K))return null;var xe=this.data[K.wrapped().key][0];return xe.value},Pe.prototype.remove=function(K,xe){if(!this.has(K))return this;var re=K.wrapped().key,ye=xe===void 0?0:this.data[re].indexOf(xe),Ue=this.data[re][ye];return this.data[re].splice(ye,1),Ue.timeout&&clearTimeout(Ue.timeout),this.data[re].length===0&&delete this.data[re],this.onRemove(Ue.value),this.order.splice(this.order.indexOf(re),1),this},Pe.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var xe=this._getAndRemoveByKey(this.order[0]);xe&&this.onRemove(xe)}return this},Pe.prototype.filter=function(K){var xe=[];for(var re in this.data)for(var ye=0,Ue=this.data[re];ye1||(Math.abs(Br)>1&&(Math.abs(Br+mt)===1?Br+=mt:Math.abs(Br-mt)===1&&(Br-=mt)),!(!br.dem||!qt.dem)&&(qt.dem.backfillBorder(br.dem,Br,pr),qt.neighboringTiles&&qt.neighboringTiles[Mt]&&(qt.neighboringTiles[Mt].backfilled=!0)))}},K.prototype.getTile=function(re){return this.getTileByID(re.key)},K.prototype.getTileByID=function(re){return this._tiles[re]},K.prototype._retainLoadedChildren=function(re,ye,Ue,ke){for(var Qe in this._tiles){var vt=this._tiles[Qe];if(!(ke[Qe]||!vt.hasData()||vt.tileID.overscaledZ<=ye||vt.tileID.overscaledZ>Ue)){for(var qt=vt.tileID;vt&&vt.tileID.overscaledZ>ye+1;){var br=vt.tileID.scaledTo(vt.tileID.overscaledZ-1);vt=this._tiles[br.key],vt&&vt.hasData()&&(qt=br)}for(var Br=qt;Br.overscaledZ>ye;)if(Br=Br.scaledTo(Br.overscaledZ-1),re[Br.key]){ke[qt.key]=qt;break}}}},K.prototype.findLoadedParent=function(re,ye){if(re.key in this._loadedParentTiles){var Ue=this._loadedParentTiles[re.key];return Ue&&Ue.tileID.overscaledZ>=ye?Ue:null}for(var ke=re.overscaledZ-1;ke>=ye;ke--){var Qe=re.scaledTo(ke),vt=this._getLoadedTile(Qe);if(vt)return vt}},K.prototype._getLoadedTile=function(re){var ye=this._tiles[re.key];if(ye&&ye.hasData())return ye;var Ue=this._cache.getByKey(re.wrapped().key);return Ue},K.prototype.updateCacheSize=function(re){var ye=Math.ceil(re.width/this._source.tileSize)+1,Ue=Math.ceil(re.height/this._source.tileSize)+1,ke=ye*Ue,Qe=5,vt=Math.floor(ke*Qe),qt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,vt):vt;this._cache.setMaxSize(qt)},K.prototype.handleWrapJump=function(re){var ye=this._prevLng===void 0?re:this._prevLng,Ue=re-ye,ke=Ue/360,Qe=Math.round(ke);if(this._prevLng=re,Qe){var vt={};for(var qt in this._tiles){var br=this._tiles[qt];br.tileID=br.tileID.unwrapTo(br.tileID.wrap+Qe),vt[br.tileID.key]=br}this._tiles=vt;for(var Br in this._timers)clearTimeout(this._timers[Br]),delete this._timers[Br];for(var pr in this._tiles){var mt=this._tiles[pr];this._setTileReloadTimer(pr,mt)}}},K.prototype.update=function(re){var ye=this;if(this.transform=re,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(re),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ue;this.used?this._source.tileID?Ue=re.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ya){return new e.OverscaledTileID(ya.canonical.z,ya.wrap,ya.canonical.z,ya.canonical.x,ya.canonical.y)}):(Ue=re.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ue=Ue.filter(function(ya){return ye._source.hasTile(ya)}))):Ue=[];var ke=re.coveringZoomLevel(this._source),Qe=Math.max(ke-K.maxOverzooming,this._source.minzoom),vt=Math.max(ke+K.maxUnderzooming,this._source.minzoom),qt=this._updateRetainedTiles(Ue,ke);if(Ba(this._source.type)){for(var br={},Br={},pr=Object.keys(qt),mt=0,Mt=pr;mtthis._source.maxzoom){var sr=rr.children(this._source.maxzoom)[0],dr=this.getTile(sr);if(dr&&dr.hasData()){Ue[sr.key]=sr;continue}}else{var lr=rr.children(this._source.maxzoom);if(Ue[lr[0].key]&&Ue[lr[1].key]&&Ue[lr[2].key]&&Ue[lr[3].key])continue}for(var Wt=hr.wasRequested(),ir=rr.overscaledZ-1;ir>=Qe;--ir){var Gt=rr.scaledTo(ir);if(ke[Gt.key]||(ke[Gt.key]=!0,hr=this.getTile(Gt),!hr&&Wt&&(hr=this._addTile(Gt)),hr&&(Ue[Gt.key]=Gt,Wt=hr.wasRequested(),hr.hasData())))break}}}return Ue},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var re in this._tiles){for(var ye=[],Ue=void 0,ke=this._tiles[re].tileID;ke.overscaledZ>0;){if(ke.key in this._loadedParentTiles){Ue=this._loadedParentTiles[ke.key];break}ye.push(ke.key);var Qe=ke.scaledTo(ke.overscaledZ-1);if(Ue=this._getLoadedTile(Qe),Ue)break;ke=Qe}for(var vt=0,qt=ye;vt0)&&(ye.hasData()&&ye.state!=="reloading"?this._cache.add(ye.tileID,ye,ye.getExpiryTimeout()):(ye.aborted=!0,this._abortTile(ye),this._unloadTile(ye))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var re in this._tiles)this._removeTile(re);this._cache.reset()},K.prototype.tilesIn=function(re,ye,Ue){var ke=this,Qe=[],vt=this.transform;if(!vt)return Qe;for(var qt=Ue?vt.getCameraQueryGeometry(re):re,br=re.map(function(ir){return vt.pointCoordinate(ir)}),Br=qt.map(function(ir){return vt.pointCoordinate(ir)}),pr=this.getIds(),mt=1/0,Mt=1/0,Ft=-1/0,rr=-1/0,hr=0,sr=Br;hr=0&&vi[1].y+ya>=0){var Ga=br.map(function(Zi){return Dr.getTilePoint(Zi)}),ii=Br.map(function(Zi){return Dr.getTilePoint(Zi)});Qe.push({tile:Gt,tileID:Dr,queryGeometry:Ga,cameraQueryGeometry:ii,scale:Jr})}}},Wt=0;Wt=e.browser.now())return!0}return!1},K.prototype.setFeatureState=function(re,ye,Ue){re=re||"_geojsonTileLayer",this._state.updateState(re,ye,Ue)},K.prototype.removeFeatureState=function(re,ye,Ue){re=re||"_geojsonTileLayer",this._state.removeFeatureState(re,ye,Ue)},K.prototype.getFeatureState=function(re,ye){return re=re||"_geojsonTileLayer",this._state.getState(re,ye)},K.prototype.setDependencies=function(re,ye,Ue){var ke=this._tiles[re];ke&&ke.setDependencies(ye,Ue)},K.prototype.reloadTilesForDependencies=function(re,ye){for(var Ue in this._tiles){var ke=this._tiles[Ue];ke.hasDependency(re,ye)&&this._reloadTile(Ue,"reloading")}this._cache.filter(function(Qe){return!Qe.hasDependency(re,ye)})},K}(e.Evented);ra.maxOverzooming=10,ra.maxUnderzooming=3;function ca(ge,K){var xe=Math.abs(ge.wrap*2)-+(ge.wrap<0),re=Math.abs(K.wrap*2)-+(K.wrap<0);return ge.overscaledZ-K.overscaledZ||re-xe||K.canonical.y-ge.canonical.y||K.canonical.x-ge.canonical.x}function Ba(ge){return ge==="raster"||ge==="image"||ge==="video"}function $a(){return new e.window.Worker(Io.workerUrl)}var Za="mapboxgl_preloaded_worker_pool",ri=function(){this.active={}};ri.prototype.acquire=function(K){if(!this.workers)for(this.workers=[];this.workers.length0?(ye-ke)/Qe:0;return this.points[Ue].mult(1-vt).add(this.points[xe].mult(vt))};var la=function(K,xe,re){var ye=this.boxCells=[],Ue=this.circleCells=[];this.xCellCount=Math.ceil(K/re),this.yCellCount=Math.ceil(xe/re);for(var ke=0;kethis.width||ye<0||xe>this.height)return Ue?!1:[];var Qe=[];if(K<=0&&xe<=0&&this.width<=re&&this.height<=ye){if(Ue)return!0;for(var vt=0;vt0:Qe}},la.prototype._queryCircle=function(K,xe,re,ye,Ue){var ke=K-re,Qe=K+re,vt=xe-re,qt=xe+re;if(Qe<0||ke>this.width||qt<0||vt>this.height)return ye?!1:[];var br=[],Br={hitTest:ye,circle:{x:K,y:xe,radius:re},seenUids:{box:{},circle:{}}};return this._forEachCell(ke,vt,Qe,qt,this._queryCellCircle,br,Br,Ue),ye?br.length>0:br},la.prototype.query=function(K,xe,re,ye,Ue){return this._query(K,xe,re,ye,!1,Ue)},la.prototype.hitTest=function(K,xe,re,ye,Ue){return this._query(K,xe,re,ye,!0,Ue)},la.prototype.hitTestCircle=function(K,xe,re,ye){return this._queryCircle(K,xe,re,!0,ye)},la.prototype._queryCell=function(K,xe,re,ye,Ue,ke,Qe,vt){var qt=Qe.seenUids,br=this.boxCells[Ue];if(br!==null)for(var Br=this.bboxes,pr=0,mt=br;pr=Br[Ft+0]&&ye>=Br[Ft+1]&&(!vt||vt(this.boxKeys[Mt]))){if(Qe.hitTest)return ke.push(!0),!0;ke.push({key:this.boxKeys[Mt],x1:Br[Ft],y1:Br[Ft+1],x2:Br[Ft+2],y2:Br[Ft+3]})}}}var rr=this.circleCells[Ue];if(rr!==null)for(var hr=this.circles,sr=0,dr=rr;srQe*Qe+vt*vt},la.prototype._circleAndRectCollide=function(K,xe,re,ye,Ue,ke,Qe){var vt=(ke-ye)/2,qt=Math.abs(K-(ye+vt));if(qt>vt+re)return!1;var br=(Qe-Ue)/2,Br=Math.abs(xe-(Ue+br));if(Br>br+re)return!1;if(qt<=vt||Br<=br)return!0;var pr=qt-vt,mt=Br-br;return pr*pr+mt*mt<=re*re};function ba(ge,K,xe,re,ye){var Ue=e.create();return K?(e.scale(Ue,Ue,[1/ye,1/ye,1]),xe||e.rotateZ(Ue,Ue,re.angle)):e.multiply(Ue,re.labelPlaneMatrix,ge),Ue}function Ai(ge,K,xe,re,ye){if(K){var Ue=e.clone(ge);return e.scale(Ue,Ue,[ye,ye,1]),xe||e.rotateZ(Ue,Ue,-re.angle),Ue}else return re.glCoordMatrix}function ki(ge,K){var xe=[ge.x,ge.y,0,1];wo(xe,xe,K);var re=xe[3];return{point:new e.Point(xe[0]/re,xe[1]/re),signedDistanceFromCamera:re}}function Ki(ge,K){return .5+.5*(ge/K)}function En(ge,K){var xe=ge[0]/ge[3],re=ge[1]/ge[3],ye=xe>=-K[0]&&xe<=K[0]&&re>=-K[1]&&re<=K[1];return ye}function Tn(ge,K,xe,re,ye,Ue,ke,Qe){var vt=re?ge.textSizeData:ge.iconSizeData,qt=e.evaluateSizeForZoom(vt,xe.transform.zoom),br=[256/xe.width*2+1,256/xe.height*2+1],Br=re?ge.text.dynamicLayoutVertexArray:ge.icon.dynamicLayoutVertexArray;Br.clear();for(var pr=ge.lineVertexArray,mt=re?ge.text.placedSymbolArray:ge.icon.placedSymbolArray,Mt=xe.transform.width/xe.transform.height,Ft=!1,rr=0;rrUe)return{useVertical:!0}}return(ge===e.WritingMode.vertical?K.yxe.x)?{needsFlipping:!0}:null}function ao(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt,br,Br,pr,mt){var Mt=K/24,Ft=ge.lineOffsetX*Mt,rr=ge.lineOffsetY*Mt,hr;if(ge.numGlyphs>1){var sr=ge.glyphStartIndex+ge.numGlyphs,dr=ge.lineStartIndex,lr=ge.lineStartIndex+ge.lineLength,Wt=On(Mt,Qe,Ft,rr,xe,br,Br,ge,vt,Ue,pr);if(!Wt)return{notEnoughRoom:!0};var ir=ki(Wt.first.point,ke).point,Gt=ki(Wt.last.point,ke).point;if(re&&!xe){var Dr=kn(ge.writingMode,ir,Gt,mt);if(Dr)return Dr}hr=[Wt.first];for(var Jr=ge.glyphStartIndex+1;Jr0?ii.point:Co(Br,Ga,ya,1,ye),Fi=kn(ge.writingMode,ya,Zi,mt);if(Fi)return Fi}var ui=bo(Mt*Qe.getoffsetX(ge.glyphStartIndex),Ft,rr,xe,br,Br,ge.segment,ge.lineStartIndex,ge.lineStartIndex+ge.lineLength,vt,Ue,pr);if(!ui)return{notEnoughRoom:!0};hr=[ui]}for(var _i=0,Si=hr;_i0?1:-1,Mt=0;re&&(mt*=-1,Mt=Math.PI),mt<0&&(Mt+=Math.PI);for(var Ft=mt>0?Qe+ke:Qe+ke+1,rr=ye,hr=ye,sr=0,dr=0,lr=Math.abs(pr),Wt=[];sr+dr<=lr;){if(Ft+=mt,Ft=vt)return null;if(hr=rr,Wt.push(rr),rr=Br[Ft],rr===void 0){var ir=new e.Point(qt.getx(Ft),qt.gety(Ft)),Gt=ki(ir,br);if(Gt.signedDistanceFromCamera>0)rr=Br[Ft]=Gt.point;else{var Dr=Ft-mt,Jr=sr===0?Ue:new e.Point(qt.getx(Dr),qt.gety(Dr));rr=Co(Jr,ir,hr,lr-sr+1,br)}}sr+=dr,dr=hr.dist(rr)}var ya=(lr-sr)/dr,vi=rr.sub(hr),Ga=vi.mult(ya)._add(hr);Ga._add(vi._unit()._perp()._mult(xe*mt));var ii=Mt+Math.atan2(rr.y-hr.y,rr.x-hr.x);return Wt.push(Ga),{point:Ga,angle:ii,path:Wt}}var zs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Cn(ge,K){for(var xe=0;xe=1;Ui--)Si.push(ui.path[Ui]);for(var fn=1;fn<_i.path.length;fn++)Si.push(_i.path[fn]);var _o=Ga*2.5;if(vt){var Uo=Si.map(function(Lp){return ki(Lp,vt)});Uo.some(function(Lp){return Lp.signedDistanceFromCamera<=0})?Si=[]:Si=Uo.map(function(Lp){return Lp.point})}var Ds=[];if(Si.length>0){for(var Oo=Si[0].clone(),Cs=Si[0].clone(),Ys=1;Ys=ii.x&&Cs.x<=Zi.x&&Oo.y>=ii.y&&Cs.y<=Zi.y?Ds=[Si]:Cs.xZi.x||Cs.yZi.y?Ds=[]:Ds=e.clipLine([Si],ii.x,ii.y,Zi.x,Zi.y)}for(var mu=0,Ep=Ds;mu=this.screenRightBoundary||yethis.screenBottomBoundary},go.prototype.isInsideGrid=function(K,xe,re,ye){return re>=0&&K=0&&xe0){var lr;return this.prevPlacement&&this.prevPlacement.variableOffsets[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID]&&this.prevPlacement.placements[pr.crossTileID].text&&(lr=this.prevPlacement.variableOffsets[pr.crossTileID].anchor),this.variableOffsets[pr.crossTileID]={textOffset:rr,width:re,height:ye,anchor:K,textBoxScale:Ue,prevAnchor:lr},this.markUsedJustification(mt,K,pr,Mt),mt.allowVerticalPlacement&&(this.markUsedOrientation(mt,Mt,pr),this.placedOrientations[pr.crossTileID]=Mt),{shift:hr,placedGlyphBoxes:sr}}},Ko.prototype.placeLayerBucketPart=function(K,xe,re){var ye=this,Ue=K.parameters,ke=Ue.bucket,Qe=Ue.layout,vt=Ue.posMatrix,qt=Ue.textLabelPlaneMatrix,br=Ue.labelToScreenMatrix,Br=Ue.textPixelRatio,pr=Ue.holdingForFade,mt=Ue.collisionBoxArray,Mt=Ue.partiallyEvaluatedTextSize,Ft=Ue.collisionGroup,rr=Qe.get("text-optional"),hr=Qe.get("icon-optional"),sr=Qe.get("text-allow-overlap"),dr=Qe.get("icon-allow-overlap"),lr=Qe.get("text-rotation-alignment")==="map",Wt=Qe.get("text-pitch-alignment")==="map",ir=Qe.get("icon-text-fit")!=="none",Gt=Qe.get("symbol-z-order")==="viewport-y",Dr=sr&&(dr||!ke.hasIconData()||hr),Jr=dr&&(sr||!ke.hasTextData()||rr);!ke.collisionArrays&&mt&&ke.deserializeCollisionBoxes(mt);var ya=function(ui,_i){if(!xe[ui.crossTileID]){if(pr){ye.placements[ui.crossTileID]=new Yn(!1,!1,!1);return}var Si=!1,Ui=!1,fn=!0,_o=null,Uo={box:null,offscreen:null},Ds={box:null,offscreen:null},Oo=null,Cs=null,Ys=null,mu=0,Ep=0,kp=0;_i.textFeatureIndex?mu=_i.textFeatureIndex:ui.useRuntimeCollisionCircles&&(mu=ui.featureIndex),_i.verticalTextFeatureIndex&&(Ep=_i.verticalTextFeatureIndex);var Ph=_i.textBox;if(Ph){var qp=function(cc){var hu=e.WritingMode.horizontal;if(ke.allowVerticalPlacement&&!cc&&ye.prevPlacement){var Dh=ye.prevPlacement.placedOrientations[ui.crossTileID];Dh&&(ye.placedOrientations[ui.crossTileID]=Dh,hu=Dh,ye.markUsedOrientation(ke,hu,ui))}return hu},qd=function(cc,hu){if(ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&_i.verticalTextBox)for(var Dh=0,Rv=ke.writingModes;Dh0&&(Jh=Jh.filter(function(cc){return cc!==Rh.anchor}),Jh.unshift(Rh.anchor))}var Cp=function(cc,hu,Dh){for(var Rv=cc.x2-cc.x1,lm=cc.y2-cc.y1,Mu=ui.textBoxScale,w0=ir&&!dr?hu:null,sv={box:[],offscreen:!1},xg=sr?Jh.length*2:Jh.length,Pp=0;Pp=Jh.length,T0=ye.attemptAnchorPlacement(lv,cc,Rv,lm,Mu,lr,Wt,Br,vt,Ft,bg,ui,ke,Dh,w0);if(T0&&(sv=T0.placedGlyphBoxes,sv&&sv.box&&sv.box.length)){Si=!0,_o=T0.shift;break}}return sv},Vp=function(){return Cp(Ph,_i.iconBox,e.WritingMode.horizontal)},Lp=function(){var cc=_i.verticalTextBox,hu=Uo&&Uo.box&&Uo.box.length;return ke.allowVerticalPlacement&&!hu&&ui.numVerticalGlyphVertices>0&&cc?Cp(cc,_i.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,Lp),Uo&&(Si=Uo.box,fn=Uo.offscreen);var Lv=qp(Uo&&Uo.box);if(!Si&&ye.prevPlacement){var Vd=ye.prevPlacement.variableOffsets[ui.crossTileID];Vd&&(ye.variableOffsets[ui.crossTileID]=Vd,ye.markUsedJustification(ke,Vd.anchor,ui,Lv))}}else{var ed=function(cc,hu){var Dh=ye.collisionIndex.placeCollisionBox(cc,sr,Br,vt,Ft.predicate);return Dh&&Dh.box&&Dh.box.length&&(ye.markUsedOrientation(ke,hu,ui),ye.placedOrientations[ui.crossTileID]=hu),Dh},Ih=function(){return ed(Ph,e.WritingMode.horizontal)},td=function(){var cc=_i.verticalTextBox;return ke.allowVerticalPlacement&&ui.numVerticalGlyphVertices>0&&cc?ed(cc,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Ih,td),qp(Uo&&Uo.box&&Uo.box.length)}}if(Oo=Uo,Si=Oo&&Oo.box&&Oo.box.length>0,fn=Oo&&Oo.offscreen,ui.useRuntimeCollisionCircles){var Gf=ke.text.placedSymbolArray.get(ui.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(ke.textSizeData,Mt,Gf),Pv=Qe.get("text-padding"),ph=ui.collisionCircleDiameter;Cs=ye.collisionIndex.placeCollisionCircles(sr,Gf,ke.lineVertexArray,ke.glyphOffsetArray,Gd,vt,qt,br,re,Wt,Ft.predicate,ph,Pv),Si=sr||Cs.circles.length>0&&!Cs.collisionDetected,fn=fn&&Cs.offscreen}if(_i.iconFeatureIndex&&(kp=_i.iconFeatureIndex),_i.iconBox){var iv=function(cc){var hu=ir&&_o?ps(cc,_o.x,_o.y,lr,Wt,ye.transform.angle):cc;return ye.collisionIndex.placeCollisionBox(hu,dr,Br,vt,Ft.predicate)};Ds&&Ds.box&&Ds.box.length&&_i.verticalIconBox?(Ys=iv(_i.verticalIconBox),Ui=Ys.box.length>0):(Ys=iv(_i.iconBox),Ui=Ys.box.length>0),fn=fn&&Ys.offscreen}var om=rr||ui.numHorizontalGlyphVertices===0&&ui.numVerticalGlyphVertices===0,sm=hr||ui.numIconVertices===0;if(!om&&!sm?Ui=Si=Ui&&Si:sm?om||(Ui=Ui&&Si):Si=Ui&&Si,Si&&Oo&&Oo.box&&(Ds&&Ds.box&&Ep?ye.collisionIndex.insertCollisionBox(Oo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,Ep,Ft.ID):ye.collisionIndex.insertCollisionBox(Oo.box,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID)),Ui&&Ys&&ye.collisionIndex.insertCollisionBox(Ys.box,Qe.get("icon-ignore-placement"),ke.bucketInstanceId,kp,Ft.ID),Cs&&(Si&&ye.collisionIndex.insertCollisionCircles(Cs.circles,Qe.get("text-ignore-placement"),ke.bucketInstanceId,mu,Ft.ID),re)){var Iv=ke.bucketInstanceId,nv=ye.collisionCircleArrays[Iv];nv===void 0&&(nv=ye.collisionCircleArrays[Iv]=new Gn);for(var ov=0;ov=0;--Ga){var ii=vi[Ga];ya(ke.symbolInstances.get(ii),ke.collisionArrays[ii])}else for(var Zi=K.symbolInstanceStart;Zi=0&&(ke>=0&&br!==ke?K.text.placedSymbolArray.get(br).crossTileID=0:K.text.placedSymbolArray.get(br).crossTileID=re.crossTileID)}},Ko.prototype.markUsedOrientation=function(K,xe,re){for(var ye=xe===e.WritingMode.horizontal||xe===e.WritingMode.horizontalOnly?xe:0,Ue=xe===e.WritingMode.vertical?xe:0,ke=[re.leftJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.rightJustifiedTextSymbolIndex],Qe=0,vt=ke;Qe0||Wt>0,ya=dr.numIconVertices>0,vi=ye.placedOrientations[dr.crossTileID],Ga=vi===e.WritingMode.vertical,ii=vi===e.WritingMode.horizontal||vi===e.WritingMode.horizontalOnly;if(Jr){var Zi=il(Dr.text),Fi=Ga?yn:Zi;Mt(K.text,lr,Fi);var ui=ii?yn:Zi;Mt(K.text,Wt,ui);var _i=Dr.text.isHidden();[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex].forEach(function(kp){kp>=0&&(K.text.placedSymbolArray.get(kp).hidden=_i||Ga?1:0)}),dr.verticalPlacedTextSymbolIndex>=0&&(K.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=_i||ii?1:0);var Si=ye.variableOffsets[dr.crossTileID];Si&&ye.markUsedJustification(K,Si.anchor,dr,vi);var Ui=ye.placedOrientations[dr.crossTileID];Ui&&(ye.markUsedJustification(K,"left",dr,Ui),ye.markUsedOrientation(K,Ui,dr))}if(ya){var fn=il(Dr.icon),_o=!(pr&&dr.verticalPlacedIconSymbolIndex&&Ga);if(dr.placedIconSymbolIndex>=0){var Uo=_o?fn:yn;Mt(K.icon,dr.numIconVertices,Uo),K.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(dr.verticalPlacedIconSymbolIndex>=0){var Ds=_o?yn:fn;Mt(K.icon,dr.numVerticalIconVertices,Ds),K.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Oo=K.collisionArrays[sr];if(Oo){var Cs=new e.Point(0,0);if(Oo.textBox||Oo.verticalTextBox){var Ys=!0;if(qt){var mu=ye.variableOffsets[ir];mu?(Cs=_s(mu.anchor,mu.width,mu.height,mu.textOffset,mu.textBoxScale),br&&Cs._rotate(Br?ye.transform.angle:-ye.transform.angle)):Ys=!1}Oo.textBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||Ga,Cs.x,Cs.y),Oo.verticalTextBox&&Gi(K.textCollisionBox.collisionVertexArray,Dr.text.placed,!Ys||ii,Cs.x,Cs.y)}var Ep=!!(!ii&&Oo.verticalIconBox);Oo.iconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Ep,pr?Cs.x:0,pr?Cs.y:0),Oo.verticalIconBox&&Gi(K.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Ep,pr?Cs.x:0,pr?Cs.y:0)}}},rr=0;rrK},Ko.prototype.setStale=function(){this.stale=!0};function Gi(ge,K,xe,re,ye){ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0),ge.emplaceBack(K?1:0,xe?1:0,re||0,ye||0)}var Pn=Math.pow(2,25),qs=Math.pow(2,24),bs=Math.pow(2,17),lo=Math.pow(2,16),Zo=Math.pow(2,9),ws=Math.pow(2,8),Hs=Math.pow(2,1);function il(ge){if(ge.opacity===0&&!ge.placed)return 0;if(ge.opacity===1&&ge.placed)return 4294967295;var K=ge.placed?1:0,xe=Math.floor(ge.opacity*127);return xe*Pn+K*qs+xe*bs+K*lo+xe*Zo+K*ws+xe*Hs+K}var yn=0,Po=function(K){this._sortAcrossTiles=K.layout.get("symbol-z-order")!=="viewport-y"&&K.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Po.prototype.continuePlacement=function(K,xe,re,ye,Ue){for(var ke=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Qe=K[this._currentPlacementIndex],vt=xe[Qe],qt=this.placement.collisionIndex.transform.zoom;if(vt.type==="symbol"&&(!vt.minzoom||vt.minzoom<=qt)&&(!vt.maxzoom||vt.maxzoom>qt)){this._inProgressLayer||(this._inProgressLayer=new Po(vt));var br=this._inProgressLayer.continuePlacement(re[vt.source],this.placement,this._showCollisionBoxes,vt,ke);if(br)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},To.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Ws=512/e.EXTENT/2,Ll=function(K,xe,re){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=re;for(var ye=0;yeK.overscaledZ)for(var qt in vt){var br=vt[qt];br.tileID.isChildOf(K)&&br.findMatches(xe.symbolInstances,K,ke)}else{var Br=K.scaledTo(Number(Qe)),pr=vt[Br.key];pr&&pr.findMatches(xe.symbolInstances,K,ke)}}for(var mt=0;mt0)throw new Error("Unimplemented: "+ke.map(function(Qe){return Qe.command}).join(", ")+".");return Ue.forEach(function(Qe){Qe.command!=="setTransition"&&ye[Qe.command].apply(ye,Qe.args)}),this.stylesheet=re,!0},K.prototype.addImage=function(re,ye){if(this.getImage(re))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(re,ye),this._afterImageUpdated(re)},K.prototype.updateImage=function(re,ye){this.imageManager.updateImage(re,ye)},K.prototype.getImage=function(re){return this.imageManager.getImage(re)},K.prototype.removeImage=function(re){if(!this.getImage(re))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(re),this._afterImageUpdated(re)},K.prototype._afterImageUpdated=function(re){this._availableImages=this.imageManager.listImages(),this._changedImages[re]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(re,ye,Ue){var ke=this;if(Ue===void 0&&(Ue={}),this._checkLoaded(),this.sourceCaches[re]!==void 0)throw new Error("There is already a source with this ID");if(!ye.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(ye).join(", ")+".");var Qe=["vector","raster","geojson","video","image"],vt=Qe.indexOf(ye.type)>=0;if(!(vt&&this._validate(e.validateStyle.source,"sources."+re,ye,null,Ue))){this.map&&this.map._collectResourceTiming&&(ye.collectResourceTiming=!0);var qt=this.sourceCaches[re]=new ra(re,ye,this.dispatcher);qt.style=this,qt.setEventedParent(this,function(){return{isSourceLoaded:ke.loaded(),source:qt.serialize(),sourceId:re}}),qt.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(re){if(this._checkLoaded(),this.sourceCaches[re]===void 0)throw new Error("There is no source with this ID");for(var ye in this._layers)if(this._layers[ye].source===re)return this.fire(new e.ErrorEvent(new Error('Source "'+re+'" cannot be removed while layer "'+ye+'" is using it.')));var Ue=this.sourceCaches[re];delete this.sourceCaches[re],delete this._updatedSources[re],Ue.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:re})),Ue.setEventedParent(null),Ue.clearTiles(),Ue.onRemove&&Ue.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(re,ye){this._checkLoaded();var Ue=this.sourceCaches[re].getSource();Ue.setData(ye),this._changed=!0},K.prototype.getSource=function(re){return this.sourceCaches[re]&&this.sourceCaches[re].getSource()},K.prototype.addLayer=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._checkLoaded();var ke=re.id;if(this.getLayer(ke)){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ke+'" already exists on this map')));return}var Qe;if(re.type==="custom"){if(Ts(this,e.validateCustomStyleLayer(re)))return;Qe=e.createStyleLayer(re)}else{if(typeof re.source=="object"&&(this.addSource(ke,re.source),re=e.clone$1(re),re=e.extend(re,{source:ke})),this._validate(e.validateStyle.layer,"layers."+ke,re,{arrayIndex:-1},Ue))return;Qe=e.createStyleLayer(re),this._validateLayer(Qe),Qe.setEventedParent(this,{layer:{id:ke}}),this._serializedLayers[Qe.id]=Qe.serialize()}var vt=ye?this._order.indexOf(ye):this._order.length;if(ye&&vt===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ye+'" does not exist on this map.')));return}if(this._order.splice(vt,0,ke),this._layerOrderChanged=!0,this._layers[ke]=Qe,this._removedLayers[ke]&&Qe.source&&Qe.type!=="custom"){var qt=this._removedLayers[ke];delete this._removedLayers[ke],qt.type!==Qe.type?this._updatedSources[Qe.source]="clear":(this._updatedSources[Qe.source]="reload",this.sourceCaches[Qe.source].pause())}this._updateLayer(Qe),Qe.onAdd&&Qe.onAdd(this.map)},K.prototype.moveLayer=function(re,ye){this._checkLoaded(),this._changed=!0;var Ue=this._layers[re];if(!Ue){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be moved.")));return}if(re!==ye){var ke=this._order.indexOf(re);this._order.splice(ke,1);var Qe=ye?this._order.indexOf(ye):this._order.length;if(ye&&Qe===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+ye+'" does not exist on this map.')));return}this._order.splice(Qe,0,re),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(re){this._checkLoaded();var ye=this._layers[re];if(!ye){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be removed.")));return}ye.setEventedParent(null);var Ue=this._order.indexOf(re);this._order.splice(Ue,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[re]=ye,delete this._layers[re],delete this._serializedLayers[re],delete this._updatedLayers[re],delete this._updatedPaintProps[re],ye.onRemove&&ye.onRemove(this.map)},K.prototype.getLayer=function(re){return this._layers[re]},K.prototype.hasLayer=function(re){return re in this._layers},K.prototype.setLayerZoomRange=function(re,ye,Ue){this._checkLoaded();var ke=this.getLayer(re);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot have zoom extent.")));return}ke.minzoom===ye&&ke.maxzoom===Ue||(ye!=null&&(ke.minzoom=ye),Ue!=null&&(ke.maxzoom=Ue),this._updateLayer(ke))},K.prototype.setFilter=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._checkLoaded();var ke=this.getLayer(re);if(!ke){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be filtered.")));return}if(!e.deepEqual(ke.filter,ye)){if(ye==null){ke.filter=void 0,this._updateLayer(ke);return}this._validate(e.validateStyle.filter,"layers."+ke.id+".filter",ye,null,Ue)||(ke.filter=e.clone$1(ye),this._updateLayer(ke))}},K.prototype.getFilter=function(re){return e.clone$1(this.getLayer(re).filter)},K.prototype.setLayoutProperty=function(re,ye,Ue,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}e.deepEqual(Qe.getLayoutProperty(ye),Ue)||(Qe.setLayoutProperty(ye,Ue,ke),this._updateLayer(Qe))},K.prototype.getLayoutProperty=function(re,ye){var Ue=this.getLayer(re);if(!Ue){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style.")));return}return Ue.getLayoutProperty(ye)},K.prototype.setPaintProperty=function(re,ye,Ue,ke){ke===void 0&&(ke={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new e.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}if(!e.deepEqual(Qe.getPaintProperty(ye),Ue)){var vt=Qe.setPaintProperty(ye,Ue,ke);vt&&this._updateLayer(Qe),this._changed=!0,this._updatedPaintProps[re]=!0}},K.prototype.getPaintProperty=function(re,ye){return this.getLayer(re).getPaintProperty(ye)},K.prototype.setFeatureState=function(re,ye){this._checkLoaded();var Ue=re.source,ke=re.sourceLayer,Qe=this.sourceCaches[Ue];if(Qe===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ue+"' does not exist in the map's style.")));return}var vt=Qe.getSource().type;if(vt==="geojson"&&ke){this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(vt==="vector"&&!ke){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}re.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),Qe.setFeatureState(ke,re.id,ye)},K.prototype.removeFeatureState=function(re,ye){this._checkLoaded();var Ue=re.source,ke=this.sourceCaches[Ue];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ue+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type,vt=Qe==="vector"?re.sourceLayer:void 0;if(Qe==="vector"&&!vt){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(ye&&typeof re.id!="string"&&typeof re.id!="number"){this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ke.removeFeatureState(vt,re.id,ye)},K.prototype.getFeatureState=function(re){this._checkLoaded();var ye=re.source,Ue=re.sourceLayer,ke=this.sourceCaches[ye];if(ke===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+ye+"' does not exist in the map's style.")));return}var Qe=ke.getSource().type;if(Qe==="vector"&&!Ue){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return re.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),ke.getFeatureState(Ue,re.id)},K.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.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(re){return re.serialize()}),layers:this._serializeLayers(this._order)},function(re){return re!==void 0})},K.prototype._updateLayer=function(re){this._updatedLayers[re.id]=!0,re.source&&!this._updatedSources[re.source]&&this.sourceCaches[re.source].getSource().type!=="raster"&&(this._updatedSources[re.source]="reload",this.sourceCaches[re.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(re){for(var ye=this,Ue=function(ii){return ye._layers[ii].type==="fill-extrusion"},ke={},Qe=[],vt=this._order.length-1;vt>=0;vt--){var qt=this._order[vt];if(Ue(qt)){ke[qt]=vt;for(var br=0,Br=re;br=0;sr--){var dr=this._order[sr];if(Ue(dr))for(var lr=Qe.length-1;lr>=0;lr--){var Wt=Qe[lr].feature;if(ke[Wt.layer.id]>16,Qe>>16],u_pixel_coord_lower:[ke&65535,Qe&65535]}}function Jc(ge,K,xe,re){var ye=xe.imageManager.getPattern(ge.from.toString()),Ue=xe.imageManager.getPattern(ge.to.toString()),ke=xe.imageManager.getPixelSize(),Qe=ke.width,vt=ke.height,qt=Math.pow(2,re.tileID.overscaledZ),br=re.tileSize*Math.pow(2,xe.transform.tileZoom)/qt,Br=br*(re.tileID.canonical.x+re.tileID.wrap*qt),pr=br*re.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ye.tl,u_pattern_br_a:ye.br,u_pattern_tl_b:Ue.tl,u_pattern_br_b:Ue.br,u_texsize:[Qe,vt],u_mix:K.t,u_pattern_size_a:ye.displaySize,u_pattern_size_b:Ue.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/os(re,1,xe.transform.tileZoom),u_pixel_coord_upper:[Br>>16,pr>>16],u_pixel_coord_lower:[Br&65535,pr&65535]}}var Lf=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_lightpos:new e.Uniform3f(ge,K.u_lightpos),u_lightintensity:new e.Uniform1f(ge,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ge,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ge,K.u_vertical_gradient),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},nu=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_lightpos:new e.Uniform3f(ge,K.u_lightpos),u_lightintensity:new e.Uniform1f(ge,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ge,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ge,K.u_vertical_gradient),u_height_factor:new e.Uniform1f(ge,K.u_height_factor),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},Vf=function(ge,K,xe,re){var ye=K.style.light,Ue=ye.properties.get("position"),ke=[Ue.x,Ue.y,Ue.z],Qe=e.create$1();ye.properties.get("anchor")==="viewport"&&e.fromRotation(Qe,-K.transform.angle),e.transformMat3(ke,ke,Qe);var vt=ye.properties.get("color");return{u_matrix:ge,u_lightpos:ke,u_lightintensity:ye.properties.get("intensity"),u_lightcolor:[vt.r,vt.g,vt.b],u_vertical_gradient:+xe,u_opacity:re}},Xu=function(ge,K,xe,re,ye,Ue,ke){return e.extend(Vf(ge,K,xe,re),Wu(Ue,K,ke),{u_height_factor:-Math.pow(2,ye.overscaledZ)/ke.tileSize/8})},Cc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},gc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Vl=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world)}},xu=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Lc=function(ge){return{u_matrix:ge}},$c=function(ge,K,xe,re){return e.extend(Lc(ge),Wu(xe,K,re))},sc=function(ge,K){return{u_matrix:ge,u_world:K}},Pc=function(ge,K,xe,re,ye){return e.extend($c(ge,K,xe,re),{u_world:ye})},Qt=function(ge,K){return{u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(ge,K.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(ge,K.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},xr=function(ge,K,xe,re){var ye=ge.transform,Ue,ke;if(re.paint.get("circle-pitch-alignment")==="map"){var Qe=os(xe,1,ye.zoom);Ue=!0,ke=[Qe,Qe]}else Ue=!1,ke=ye.pixelsToGLUnits;return{u_camera_to_center_distance:ye.cameraToCenterDistance,u_scale_with_map:+(re.paint.get("circle-pitch-scale")==="map"),u_matrix:ge.translatePosMatrix(K.posMatrix,xe,re.paint.get("circle-translate"),re.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ue,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:ke}},aa=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(ge,K.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(ge,K.u_extrude_scale),u_overscale_factor:new e.Uniform1f(ge,K.u_overscale_factor)}},$r=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_inv_matrix:new e.UniformMatrix4f(ge,K.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(ge,K.u_viewport_size)}},ka=function(ge,K,xe){var re=os(xe,1,K.zoom),ye=Math.pow(2,K.zoom-xe.tileID.overscaledZ),Ue=xe.tileID.overscaleFactor();return{u_matrix:ge,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:re,u_extrude_scale:[K.pixelsToGLUnits[0]/(re*ye),K.pixelsToGLUnits[1]/(re*ye)],u_overscale_factor:Ue}},li=function(ge,K,xe){return{u_matrix:ge,u_inv_matrix:K,u_camera_to_center_distance:xe.cameraToCenterDistance,u_viewport_size:[xe.width,xe.height]}},Ci=function(ge,K){return{u_color:new e.UniformColor(ge,K.u_color),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_overlay:new e.Uniform1i(ge,K.u_overlay),u_overlay_scale:new e.Uniform1f(ge,K.u_overlay_scale)}},Hi=function(ge,K,xe){return xe===void 0&&(xe=1),{u_matrix:ge,u_color:K,u_overlay:0,u_overlay_scale:xe}},Qi=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},pn=function(ge){return{u_matrix:ge}},Pi=function(ge,K){return{u_extrude_scale:new e.Uniform1f(ge,K.u_extrude_scale),u_intensity:new e.Uniform1f(ge,K.u_intensity),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},Di=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world),u_image:new e.Uniform1i(ge,K.u_image),u_color_ramp:new e.Uniform1i(ge,K.u_color_ramp),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},Ni=function(ge,K,xe,re){return{u_matrix:ge,u_extrude_scale:os(K,1,xe),u_intensity:re}},mi=function(ge,K,xe,re){var ye=e.create();e.ortho(ye,0,ge.width,ge.height,0,0,1);var Ue=ge.context.gl;return{u_matrix:ye,u_world:[Ue.drawingBufferWidth,Ue.drawingBufferHeight],u_image:xe,u_color_ramp:re,u_opacity:K.paint.get("heatmap-opacity")}},Sn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_latrange:new e.Uniform2f(ge,K.u_latrange),u_light:new e.Uniform2f(ge,K.u_light),u_shadow:new e.UniformColor(ge,K.u_shadow),u_highlight:new e.UniformColor(ge,K.u_highlight),u_accent:new e.UniformColor(ge,K.u_accent)}},Qn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_dimension:new e.Uniform2f(ge,K.u_dimension),u_zoom:new e.Uniform1f(ge,K.u_zoom),u_unpack:new e.Uniform4f(ge,K.u_unpack)}},io=function(ge,K,xe){var re=xe.paint.get("hillshade-shadow-color"),ye=xe.paint.get("hillshade-highlight-color"),Ue=xe.paint.get("hillshade-accent-color"),ke=xe.paint.get("hillshade-illumination-direction")*(Math.PI/180);xe.paint.get("hillshade-illumination-anchor")==="viewport"&&(ke-=ge.transform.angle);var Qe=!ge.options.moving;return{u_matrix:ge.transform.calculatePosMatrix(K.tileID.toUnwrapped(),Qe),u_image:0,u_latrange:co(ge,K.tileID),u_light:[xe.paint.get("hillshade-exaggeration"),ke],u_shadow:re,u_highlight:ye,u_accent:Ue}},eo=function(ge,K){var xe=K.stride,re=e.create();return e.ortho(re,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(re,re,[0,-e.EXTENT,0]),{u_matrix:re,u_image:1,u_dimension:[xe,xe],u_zoom:ge.overscaledZ,u_unpack:K.getUnpackVector()}};function co(ge,K){var xe=Math.pow(2,K.canonical.z),re=K.canonical.y;return[new e.MercatorCoordinate(0,re/xe).toLngLat().lat,new e.MercatorCoordinate(0,(re+1)/xe).toLngLat().lat]}var Tn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels)}},un=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_image:new e.Uniform1i(ge,K.u_image),u_image_height:new e.Uniform1f(ge,K.u_image_height)}},yo=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_image:new e.Uniform1i(ge,K.u_image),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Qo=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(ge,K.u_patternscale_a),u_patternscale_b:new e.Uniform2f(ge,K.u_patternscale_b),u_sdfgamma:new e.Uniform1f(ge,K.u_sdfgamma),u_image:new e.Uniform1i(ge,K.u_image),u_tex_y_a:new e.Uniform1f(ge,K.u_tex_y_a),u_tex_y_b:new e.Uniform1f(ge,K.u_tex_y_b),u_mix:new e.Uniform1f(ge,K.u_mix)}},ks=function(ge,K,xe){var re=ge.transform;return{u_matrix:Fl(ge,K,xe),u_ratio:1/os(K,1,re.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/re.pixelsToGLUnits[0],1/re.pixelsToGLUnits[1]]}},rl=function(ge,K,xe,re){return e.extend(ks(ge,K,xe),{u_image:0,u_image_height:re})},Ns=function(ge,K,xe,re){var ye=ge.transform,Ue=Ss(K,ye);return{u_matrix:Fl(ge,K,xe),u_texsize:K.imageAtlasTexture.size,u_ratio:1/os(K,1,ye.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[Ue,re.fromScale,re.toScale],u_fade:re.t,u_units_to_pixels:[1/ye.pixelsToGLUnits[0],1/ye.pixelsToGLUnits[1]]}},el=function(ge,K,xe,re,ye){var Ue=ge.transform,ke=ge.lineAtlas,Qe=Ss(K,Ue),vt=xe.layout.get("line-cap")==="round",qt=ke.getDash(re.from,vt),br=ke.getDash(re.to,vt),Br=qt.width*ye.fromScale,pr=br.width*ye.toScale;return e.extend(ks(ge,K,xe),{u_patternscale_a:[Qe/Br,-qt.height/2],u_patternscale_b:[Qe/pr,-br.height/2],u_sdfgamma:ke.width/(Math.min(Br,pr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:qt.y,u_tex_y_b:br.y,u_mix:ye.t})};function Ss(ge,K){return 1/os(ge,1,K.tileZoom)}function Fl(ge,K,xe){return ge.translatePosMatrix(K.tileID.posMatrix,K,xe.paint.get("line-translate"),xe.paint.get("line-translate-anchor"))}var yl=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_tl_parent:new e.Uniform2f(ge,K.u_tl_parent),u_scale_parent:new e.Uniform1f(ge,K.u_scale_parent),u_buffer_scale:new e.Uniform1f(ge,K.u_buffer_scale),u_fade_t:new e.Uniform1f(ge,K.u_fade_t),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_image0:new e.Uniform1i(ge,K.u_image0),u_image1:new e.Uniform1i(ge,K.u_image1),u_brightness_low:new e.Uniform1f(ge,K.u_brightness_low),u_brightness_high:new e.Uniform1f(ge,K.u_brightness_high),u_saturation_factor:new e.Uniform1f(ge,K.u_saturation_factor),u_contrast_factor:new e.Uniform1f(ge,K.u_contrast_factor),u_spin_weights:new e.Uniform3f(ge,K.u_spin_weights)}},ll=function(ge,K,xe,re,ye){return{u_matrix:ge,u_tl_parent:K,u_scale_parent:xe,u_buffer_scale:1,u_fade_t:re.mix,u_opacity:re.opacity*ye.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ye.paint.get("raster-brightness-min"),u_brightness_high:ye.paint.get("raster-brightness-max"),u_saturation_factor:Js(ye.paint.get("raster-saturation")),u_contrast_factor:Ro(ye.paint.get("raster-contrast")),u_spin_weights:Un(ye.paint.get("raster-hue-rotate"))}};function Un(ge){ge*=Math.PI/180;var K=Math.sin(ge),xe=Math.cos(ge);return[(2*xe+1)/3,(-Math.sqrt(3)*K-xe+1)/3,(Math.sqrt(3)*K-xe+1)/3]}function Ro(ge){return ge>0?1/(1-ge):1+ge}function Js(ge){return ge>0?1-1/(1.001-ge):-ge}var Fs=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texture:new e.Uniform1i(ge,K.u_texture)}},cu=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texture:new e.Uniform1i(ge,K.u_texture),u_gamma_scale:new e.Uniform1f(ge,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ge,K.u_is_halo)}},Iu=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texsize_icon:new e.Uniform2f(ge,K.u_texsize_icon),u_texture:new e.Uniform1i(ge,K.u_texture),u_texture_icon:new e.Uniform1i(ge,K.u_texture_icon),u_gamma_scale:new e.Uniform1f(ge,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ge,K.u_is_halo)}},Zu=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt){var br=ye.transform;return{u_is_size_zoom_constant:+(ge==="constant"||ge==="source"),u_is_size_feature_constant:+(ge==="constant"||ge==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:br.cameraToCenterDistance,u_pitch:br.pitch/360*2*Math.PI,u_rotate_symbol:+xe,u_aspect_ratio:br.width/br.height,u_fade_change:ye.options.fadeDuration?ye.symbolFadeChange:1,u_matrix:Ue,u_label_plane_matrix:ke,u_coord_matrix:Qe,u_is_text:+vt,u_pitch_with_map:+re,u_texsize:qt,u_texture:0}},Ic=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt,br){var Br=ye.transform;return e.extend(Zu(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt),{u_gamma_scale:re?Math.cos(Br._pitch)*Br.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+br})},bu=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt){return e.extend(Ic(ge,K,xe,re,ye,Ue,ke,Qe,!0,vt,!0),{u_texsize_icon:qt,u_texture_icon:1})},Rc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_color:new e.UniformColor(ge,K.u_color)}},Au=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_image:new e.Uniform1i(ge,K.u_image),u_pattern_tl_a:new e.Uniform2f(ge,K.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(ge,K.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(ge,K.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(ge,K.u_pattern_br_b),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_mix:new e.Uniform1f(ge,K.u_mix),u_pattern_size_a:new e.Uniform2f(ge,K.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(ge,K.u_pattern_size_b),u_scale_a:new e.Uniform1f(ge,K.u_scale_a),u_scale_b:new e.Uniform1f(ge,K.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(ge,K.u_tile_units_to_pixels)}},yc=function(ge,K,xe){return{u_matrix:ge,u_opacity:K,u_color:xe}},fo=function(ge,K,xe,re,ye,Ue){return e.extend(Jc(re,Ue,xe,ye),{u_matrix:ge,u_opacity:K})},Fo={fillExtrusion:Lf,fillExtrusionPattern:nu,fill:Cc,fillPattern:gc,fillOutline:Vl,fillOutlinePattern:xu,circle:Qt,collisionBox:aa,collisionCircle:$r,debug:Ci,clippingMask:Qi,heatmap:Pi,heatmapTexture:Di,hillshade:Sn,hillshadePrepare:Qn,line:Tn,lineGradient:un,linePattern:yo,lineSDF:Qo,raster:yl,symbolIcon:Fs,symbolSDF:cu,symbolTextAndIcon:Iu,background:Rc,backgroundPattern:Au},Dc;function lc(ge,K,xe,re,ye,Ue,ke){for(var Qe=ge.context,vt=Qe.gl,qt=ge.useProgram("collisionBox"),br=[],Br=0,pr=0,mt=0;mt0){var lr=e.create(),Wt=hr;e.mul(lr,rr.placementInvProjMatrix,ge.transform.glCoordMatrix),e.mul(lr,lr,rr.placementViewportMatrix),br.push({circleArray:dr,circleOffset:pr,transform:Wt,invTransform:lr}),Br+=dr.length/4,pr=Br}sr&&qt.draw(Qe,vt.LINES,Ra.disabled,Ca.disabled,ge.colorModeForRenderPass(),Fr.disabled,ka(hr,ge.transform,Ft),xe.id,sr.layoutVertexBuffer,sr.indexBuffer,sr.segments,null,ge.transform.zoom,null,null,sr.collisionVertexBuffer)}}if(!(!ke||!br.length)){var ir=ge.useProgram("collisionCircle"),Gt=new e.StructArrayLayout2f1f2i16;Gt.resize(Br*4),Gt._trim();for(var Dr=0,Jr=0,ya=br;Jr=0&&(Mt[rr.associatedIconIndex]={shiftedAnchor:ai,angle:Zi})}}if(br){mt.clear();for(var ui=ge.icon.placedSymbolArray,_i=0;_i0){var ke=e.browser.now(),Qe=(ke-ge.timeAdded)/Ue,vt=K?(ke-K.timeAdded)/Ue:-1,qt=xe.getSource(),br=ye.coveringZoomLevel({tileSize:qt.tileSize,roundZoom:qt.roundZoom}),Br=!K||Math.abs(K.tileID.overscaledZ-br)>Math.abs(ge.tileID.overscaledZ-br),pr=Br&&ge.refreshedUponExpiration?1:e.clamp(Br?Qe:1-vt,0,1);return ge.refreshedUponExpiration&&Qe>=1&&(ge.refreshedUponExpiration=!1),K?{opacity:1,mix:1-pr}:{opacity:pr,mix:0}}else return{opacity:1,mix:0}}function Er(ge,K,xe){var re=xe.paint.get("background-color"),ye=xe.paint.get("background-opacity");if(ye!==0){var Ue=ge.context,ke=Ue.gl,Qe=ge.transform,vt=Qe.tileSize,qt=xe.paint.get("background-pattern");if(!ge.isPatternMissing(qt)){var br=!qt&&re.a===1&&ye===1&&ge.opaquePassEnabledForLayer()?"opaque":"translucent";if(ge.renderPass===br){var Br=Ca.disabled,pr=ge.depthModeForSublayer(0,br==="opaque"?Ra.ReadWrite:Ra.ReadOnly),mt=ge.colorModeForRenderPass(),Mt=ge.useProgram(qt?"backgroundPattern":"background"),Ft=Qe.coveringTiles({tileSize:vt});qt&&(Ue.activeTexture.set(ke.TEXTURE0),ge.imageManager.bind(ge.context));for(var rr=xe.getCrossfadeParameters(),hr=0,sr=Ft;hr "+xe.overscaledZ);var hr=rr+" "+mt+"kb";Ao(ge,hr),ke.draw(re,ye.TRIANGLES,Qe,vt,Rt.alphaBlended,Fr.disabled,Hi(Ue,e.Color.transparent,Ft),br,ge.debugBuffer,ge.quadTriangleIndexBuffer,ge.debugSegments)}function Ao(ge,K){ge.initDebugOverlayCanvas();var xe=ge.debugOverlayCanvas,re=ge.context.gl,ye=ge.debugOverlayCanvas.getContext("2d");ye.clearRect(0,0,xe.width,xe.height),ye.shadowColor="white",ye.shadowBlur=2,ye.lineWidth=1.5,ye.strokeStyle="white",ye.textBaseline="top",ye.font="bold 36px Open Sans, sans-serif",ye.fillText(K,5,5),ye.strokeText(K,5,5),ge.debugOverlayTexture.update(xe),ge.debugOverlayTexture.bind(re.LINEAR,re.CLAMP_TO_EDGE)}function ls(ge,K,xe){var re=ge.context,ye=xe.implementation;if(ge.renderPass==="offscreen"){var Ue=ye.prerender;Ue&&(ge.setCustomLayerDefaults(),re.setColorMode(ge.colorModeForRenderPass()),Ue.call(ye,re.gl,ge.transform.customLayerMatrix()),re.setDirty(),ge.setBaseState())}else if(ge.renderPass==="translucent"){ge.setCustomLayerDefaults(),re.setColorMode(ge.colorModeForRenderPass()),re.setStencilMode(Ca.disabled);var ke=ye.renderingMode==="3d"?new Ra(ge.context.gl.LEQUAL,Ra.ReadWrite,ge.depthRangeFor3D):ge.depthModeForSublayer(0,Ra.ReadOnly);re.setDepthMode(ke),ye.render(re.gl,ge.transform.customLayerMatrix()),re.setDirty(),ge.setBaseState(),re.bindFramebuffer.set(null)}}var Mo={symbol:I,circle:Ot,heatmap:$t,line:na,fill:qe,"fill-extrusion":lt,hillshade:Et,raster:ur,background:Er,debug:Kn,custom:ls},Yo=function(K,xe){this.context=new ta(K),this.transform=xe,this._tileTextures={},this.setup(),this.numSublayers=ra.maxUnderzooming+ra.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ks,this.gpuTimers={}};Yo.prototype.resize=function(K,xe){if(this.width=K*e.browser.devicePixelRatio,this.height=xe*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var re=0,ye=this.style._order;re256&&this.clearStencil(),re.setColorMode(Rt.disabled),re.setDepthMode(Ra.disabled);var Ue=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ke=0,Qe=xe;ke256&&this.clearStencil();var K=this.nextStencilID++,xe=this.context.gl;return new Ca({func:xe.NOTEQUAL,mask:255},K,255,xe.KEEP,xe.KEEP,xe.REPLACE)},Yo.prototype.stencilModeForClipping=function(K){var xe=this.context.gl;return new Ca({func:xe.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,xe.KEEP,xe.KEEP,xe.REPLACE)},Yo.prototype.stencilConfigForOverlap=function(K){var xe,re=this.context.gl,ye=K.sort(function(qt,br){return br.overscaledZ-qt.overscaledZ}),Ue=ye[ye.length-1].overscaledZ,ke=ye[0].overscaledZ-Ue+1;if(ke>1){this.currentStencilSource=void 0,this.nextStencilID+ke>256&&this.clearStencil();for(var Qe={},vt=0;vt=0;this.currentLayer--){var lr=this.style._layers[ye[this.currentLayer]],Wt=Ue[lr.source],ir=vt[lr.source];this._renderTileClippingMasks(lr,ir),this.renderLayer(this,Wt,lr,ir)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?xe.pop():null},Yo.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var xe=this.imageManager.getPattern(K.from.toString()),re=this.imageManager.getPattern(K.to.toString());return!xe||!re},Yo.prototype.useProgram=function(K,xe){this.cache=this.cache||{};var re=""+K+(xe?xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[re]||(this.cache[re]=new gf(this.context,K,uf[K],xe,Fo[K],this._showOverdrawInspector)),this.cache[re]},Yo.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()},Yo.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Yo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Yo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ds=function(K,xe){this.points=K,this.planes=xe};ds.fromInvProjectionMatrix=function(K,xe,re){var ye=[[-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]],Ue=Math.pow(2,re),ke=ye.map(function(qt){return e.transformMat4([],qt,K)}).map(function(qt){return e.scale$1([],qt,1/qt[3]/xe*Ue)}),Qe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],vt=Qe.map(function(qt){var br=e.sub([],ke[qt[0]],ke[qt[1]]),Br=e.sub([],ke[qt[2]],ke[qt[1]]),pr=e.normalize([],e.cross([],br,Br)),mt=-e.dot(pr,ke[qt[1]]);return pr.concat(mt)});return new ds(ke,vt)};var ul=function(K,xe){this.min=K,this.max=xe,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ul.prototype.quadrant=function(K){for(var xe=[K%2===0,K<2],re=e.clone$2(this.min),ye=e.clone$2(this.max),Ue=0;Ue=0;if(ke===0)return 0;ke!==xe.length&&(re=!1)}if(re)return 2;for(var vt=0;vt<3;vt++){for(var qt=Number.MAX_VALUE,br=-Number.MAX_VALUE,Br=0;Brthis.max[vt]-this.min[vt])return 0}return 1};var tl=function(K,xe,re,ye){if(K===void 0&&(K=0),xe===void 0&&(xe=0),re===void 0&&(re=0),ye===void 0&&(ye=0),isNaN(K)||K<0||isNaN(xe)||xe<0||isNaN(re)||re<0||isNaN(ye)||ye<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=xe,this.left=re,this.right=ye};tl.prototype.interpolate=function(K,xe,re){return xe.top!=null&&K.top!=null&&(this.top=e.number(K.top,xe.top,re)),xe.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,xe.bottom,re)),xe.left!=null&&K.left!=null&&(this.left=e.number(K.left,xe.left,re)),xe.right!=null&&K.right!=null&&(this.right=e.number(K.right,xe.right,re)),this},tl.prototype.getCenter=function(K,xe){var re=e.clamp((this.left+K-this.right)/2,0,K),ye=e.clamp((this.top+xe-this.bottom)/2,0,xe);return new e.Point(re,ye)},tl.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},tl.prototype.clone=function(){return new tl(this.top,this.bottom,this.left,this.right)},tl.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var es=function(K,xe,re,ye,Ue){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ue===void 0?!0:Ue,this._minZoom=K||0,this._maxZoom=xe||22,this._minPitch=re??0,this._maxPitch=ye??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 tl,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 K=new es(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},ts.minZoom.get=function(){return this._minZoom},ts.minZoom.set=function(ge){this._minZoom!==ge&&(this._minZoom=ge,this.zoom=Math.max(this.zoom,ge))},ts.maxZoom.get=function(){return this._maxZoom},ts.maxZoom.set=function(ge){this._maxZoom!==ge&&(this._maxZoom=ge,this.zoom=Math.min(this.zoom,ge))},ts.minPitch.get=function(){return this._minPitch},ts.minPitch.set=function(ge){this._minPitch!==ge&&(this._minPitch=ge,this.pitch=Math.max(this.pitch,ge))},ts.maxPitch.get=function(){return this._maxPitch},ts.maxPitch.set=function(ge){this._maxPitch!==ge&&(this._maxPitch=ge,this.pitch=Math.min(this.pitch,ge))},ts.renderWorldCopies.get=function(){return this._renderWorldCopies},ts.renderWorldCopies.set=function(ge){ge===void 0?ge=!0:ge===null&&(ge=!1),this._renderWorldCopies=ge},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(ge){var K=-e.wrap(ge,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,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(ge){var K=e.clamp(ge,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},ts.fov.get=function(){return this._fov/Math.PI*180},ts.fov.set=function(ge){ge=Math.max(.01,Math.min(60,ge)),this._fov!==ge&&(this._unmodified=!1,this._fov=ge/180*Math.PI,this._calcMatrices())},ts.zoom.get=function(){return this._zoom},ts.zoom.set=function(ge){var K=Math.min(Math.max(ge,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},ts.center.get=function(){return this._center},ts.center.set=function(ge){ge.lat===this._center.lat&&ge.lng===this._center.lng||(this._unmodified=!1,this._center=ge,this._constrain(),this._calcMatrices())},ts.padding.get=function(){return this._edgeInsets.toJSON()},ts.padding.set=function(ge){this._edgeInsets.equals(ge)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ge,1),this._calcMatrices())},ts.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},es.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},es.prototype.interpolatePadding=function(K,xe,re){this._unmodified=!1,this._edgeInsets.interpolate(K,xe,re),this._constrain(),this._calcMatrices()},es.prototype.coveringZoomLevel=function(K){var xe=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,xe)},es.prototype.getVisibleUnwrappedCoordinates=function(K){var xe=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var re=this.pointCoordinate(new e.Point(0,0)),ye=this.pointCoordinate(new e.Point(this.width,0)),Ue=this.pointCoordinate(new e.Point(this.width,this.height)),ke=this.pointCoordinate(new e.Point(0,this.height)),Qe=Math.floor(Math.min(re.x,ye.x,Ue.x,ke.x)),vt=Math.floor(Math.max(re.x,ye.x,Ue.x,ke.x)),qt=1,br=Qe-qt;br<=vt+qt;br++)br!==0&&xe.push(new e.UnwrappedTileID(br,K));return xe},es.prototype.coveringTiles=function(K){var xe=this.coveringZoomLevel(K),re=xe;if(K.minzoom!==void 0&&xeK.maxzoom&&(xe=K.maxzoom);var ye=e.MercatorCoordinate.fromLngLat(this.center),Ue=Math.pow(2,xe),ke=[Ue*ye.x,Ue*ye.y,0],Qe=ds.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,xe),vt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(vt=xe);var qt=3,br=function(Ga){return{aabb:new ul([Ga*Ue,0,0],[(Ga+1)*Ue,Ue,0]),zoom:0,x:0,y:0,wrap:Ga,fullyVisible:!1}},Br=[],pr=[],mt=xe,Mt=K.reparseOverscaled?re:xe;if(this._renderWorldCopies)for(var Ft=1;Ft<=3;Ft++)Br.push(br(-Ft)),Br.push(br(Ft));for(Br.push(br(0));Br.length>0;){var rr=Br.pop(),hr=rr.x,sr=rr.y,dr=rr.fullyVisible;if(!dr){var lr=rr.aabb.intersects(Qe);if(lr===0)continue;dr=lr===2}var Wt=rr.aabb.distanceX(ke),ir=rr.aabb.distanceY(ke),Gt=Math.max(Math.abs(Wt),Math.abs(ir)),Dr=qt+(1<Dr&&rr.zoom>=vt){pr.push({tileID:new e.OverscaledTileID(rr.zoom===mt?Mt:rr.zoom,rr.wrap,rr.zoom,hr,sr),distanceSq:e.sqrLen([ke[0]-.5-hr,ke[1]-.5-sr])});continue}for(var Jr=0;Jr<4;Jr++){var ya=(hr<<1)+Jr%2,vi=(sr<<1)+(Jr>>1);Br.push({aabb:rr.aabb.quadrant(Jr),zoom:rr.zoom+1,x:ya,y:vi,wrap:rr.wrap,fullyVisible:dr})}}return pr.sort(function(Ga,ai){return Ga.distanceSq-ai.distanceSq}).map(function(Ga){return Ga.tileID})},es.prototype.resize=function(K,xe){this.width=K,this.height=xe,this.pixelsToGLUnits=[2/K,-2/xe],this._constrain(),this._calcMatrices()},ts.unmodified.get=function(){return this._unmodified},es.prototype.zoomScale=function(K){return Math.pow(2,K)},es.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},es.prototype.project=function(K){var xe=e.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(K.lng)*this.worldSize,e.mercatorYfromLat(xe)*this.worldSize)},es.prototype.unproject=function(K){return new e.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},ts.point.get=function(){return this.project(this.center)},es.prototype.setLocationAtPoint=function(K,xe){var re=this.pointCoordinate(xe),ye=this.pointCoordinate(this.centerPoint),Ue=this.locationCoordinate(K),ke=new e.MercatorCoordinate(Ue.x-(re.x-ye.x),Ue.y-(re.y-ye.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())},es.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},es.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},es.prototype.locationCoordinate=function(K){return e.MercatorCoordinate.fromLngLat(K)},es.prototype.coordinateLocation=function(K){return K.toLngLat()},es.prototype.pointCoordinate=function(K){var xe=0,re=[K.x,K.y,0,1],ye=[K.x,K.y,1,1];e.transformMat4(re,re,this.pixelMatrixInverse),e.transformMat4(ye,ye,this.pixelMatrixInverse);var Ue=re[3],ke=ye[3],Qe=re[0]/Ue,vt=ye[0]/ke,qt=re[1]/Ue,br=ye[1]/ke,Br=re[2]/Ue,pr=ye[2]/ke,mt=Br===pr?0:(xe-Br)/(pr-Br);return new e.MercatorCoordinate(e.number(Qe,vt,mt)/this.worldSize,e.number(qt,br,mt)/this.worldSize)},es.prototype.coordinatePoint=function(K){var xe=[K.x*this.worldSize,K.y*this.worldSize,0,1];return e.transformMat4(xe,xe,this.pixelMatrix),new e.Point(xe[0]/xe[3],xe[1]/xe[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(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},es.prototype.calculatePosMatrix=function(K,xe){xe===void 0&&(xe=!1);var re=K.key,ye=xe?this._alignedPosMatrixCache:this._posMatrixCache;if(ye[re])return ye[re];var Ue=K.canonical,ke=this.worldSize/this.zoomScale(Ue.z),Qe=Ue.x+Math.pow(2,Ue.z)*K.wrap,vt=e.identity(new Float64Array(16));return e.translate(vt,vt,[Qe*ke,Ue.y*ke,0]),e.scale(vt,vt,[ke/e.EXTENT,ke/e.EXTENT,1]),e.multiply(vt,xe?this.alignedProjMatrix:this.projMatrix,vt),ye[re]=new Float32Array(vt),ye[re]},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 K=-90,xe=90,re=-180,ye=180,Ue,ke,Qe,vt,qt=this.size,br=this._unmodified;if(this.latRange){var Br=this.latRange;K=e.mercatorYfromLat(Br[1])*this.worldSize,xe=e.mercatorYfromLat(Br[0])*this.worldSize,Ue=xe-Kxe&&(vt=xe-rr)}if(this.lngRange){var hr=mt.x,sr=qt.x/2;hr-srye&&(Qe=ye-sr)}(Qe!==void 0||vt!==void 0)&&(this.center=this.unproject(new e.Point(Qe!==void 0?Qe:mt.x,vt!==void 0?vt:mt.y))),this._unmodified=br,this._constraining=!1}},es.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,xe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var re=Math.PI/2+this._pitch,ye=this._fov*(.5+xe.y/this.height),Ue=Math.sin(ye)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-re-ye,.01,Math.PI-.01)),ke=this.point,Qe=ke.x,vt=ke.y,qt=Math.cos(Math.PI/2-this._pitch)*Ue+this.cameraToCenterDistance,br=qt*1.01,Br=this.height/50,pr=new Float64Array(16);e.perspective(pr,this._fov,this.width/this.height,Br,br),pr[8]=-xe.x*2/this.width,pr[9]=xe.y*2/this.height,e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[0,0,-this.cameraToCenterDistance]),e.rotateX(pr,pr,this._pitch),e.rotateZ(pr,pr,this.angle),e.translate(pr,pr,[-Qe,-vt,0]),this.mercatorMatrix=e.scale([],pr,[this.worldSize,this.worldSize,this.worldSize]),e.scale(pr,pr,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=pr,this.invProjMatrix=e.invert([],this.projMatrix);var mt=this.width%2/2,Mt=this.height%2/2,Ft=Math.cos(this.angle),rr=Math.sin(this.angle),hr=Qe-Math.round(Qe)+Ft*mt+rr*Mt,sr=vt-Math.round(vt)+Ft*Mt+rr*mt,dr=new Float64Array(pr);if(e.translate(dr,dr,[hr>.5?hr-1:hr,sr>.5?sr-1:sr,0]),this.alignedProjMatrix=dr,pr=e.create(),e.scale(pr,pr,[this.width/2,-this.height/2,1]),e.translate(pr,pr,[1,-1,0]),this.labelPlaneMatrix=pr,pr=e.create(),e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[-1,-1,0]),e.scale(pr,pr,[2/this.width,2/this.height,1]),this.glCoordMatrix=pr,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),pr=e.invert(new Float64Array(16),this.pixelMatrix),!pr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=pr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},es.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new e.Point(0,0)),xe=[K.x*this.worldSize,K.y*this.worldSize,0,1],re=e.transformMat4(xe,xe,this.pixelMatrix);return re[3]/this.cameraToCenterDistance},es.prototype.getCameraPoint=function(){var K=this._pitch,xe=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,xe))},es.prototype.getCameraQueryGeometry=function(K){var xe=this.getCameraPoint();if(K.length===1)return[K[0],xe];for(var re=xe.x,ye=xe.y,Ue=xe.x,ke=xe.y,Qe=0,vt=K;Qe=3&&!K.some(function(re){return isNaN(re)})){var xe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:xe,pitch:+(K[4]||0)}),!0}return!1},tu.prototype._updateHashUnthrottled=function(){var K=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,K)}catch{}};var Ru={linearity:.3,easing:e.bezier(0,0,.3,1)},vu=e.extend({deceleration:2500,maxSpeed:1400},Ru),wl=e.extend({deceleration:20,maxSpeed:1400},Ru),fu=e.extend({deceleration:1e3,maxSpeed:360},Ru),uc=e.extend({deceleration:1e3,maxSpeed:90},Ru),Gl=function(K){this._map=K,this.clear()};Gl.prototype.clear=function(){this._inertiaBuffer=[]},Gl.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:K})},Gl.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,xe=e.browser.now(),re=160;K.length>0&&xe-K[0].time>re;)K.shift()},Gl.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var xe={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},re=0,ye=this._inertiaBuffer;re=this._clickTolerance||this._map.fire(new De(K.type,this._map,K))},yt.prototype.dblclick=function(K){return this._firePreventable(new De(K.type,this._map,K))},yt.prototype.mouseover=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.mouseout=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.touchstart=function(K){return this._firePreventable(new et(K.type,this._map,K))},yt.prototype.touchmove=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype.touchend=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype.touchcancel=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},yt.prototype.isEnabled=function(){return!0},yt.prototype.isActive=function(){return!1},yt.prototype.enable=function(){},yt.prototype.disable=function(){};var Tt=function(K){this._map=K};Tt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Tt.prototype.mousemove=function(K){this._map.fire(new De(K.type,this._map,K))},Tt.prototype.mousedown=function(){this._delayContextMenu=!0},Tt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new De("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Tt.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new De(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Tt.prototype.isEnabled=function(){return!0},Tt.prototype.isActive=function(){return!1},Tt.prototype.enable=function(){},Tt.prototype.disable=function(){};var tr=function(K,xe){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=xe.clickTolerance||1};tr.prototype.isEnabled=function(){return!!this._enabled},tr.prototype.isActive=function(){return!!this._active},tr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},tr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},tr.prototype.mousedown=function(K,xe){this.isEnabled()&&K.shiftKey&&K.button===0&&(r.disableDrag(),this._startPos=this._lastPos=xe,this._active=!0)},tr.prototype.mousemoveWindow=function(K,xe){if(this._active){var re=xe;if(!(this._lastPos.equals(re)||!this._box&&re.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),re.length===this.numTouches&&(this.centroid=_r(xe),this.touches=zt(re,xe)))},pa.prototype.touchmove=function(K,xe,re){if(!(this.aborted||!this.centroid)){var ye=zt(re,xe);for(var Ue in this.touches){var ke=this.touches[Ue],Qe=ye[Ue];(!Qe||Qe.dist(ke)>wa)&&(this.aborted=!0)}}},pa.prototype.touchend=function(K,xe,re){if((!this.centroid||K.timeStamp-this.startTime>Xr)&&(this.aborted=!0),re.length===0){var ye=!this.aborted&&this.centroid;if(this.reset(),ye)return ye}};var Ja=function(K){this.singleTap=new pa(K),this.numTaps=K.numTaps,this.reset()};Ja.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ja.prototype.touchstart=function(K,xe,re){this.singleTap.touchstart(K,xe,re)},Ja.prototype.touchmove=function(K,xe,re){this.singleTap.touchmove(K,xe,re)},Ja.prototype.touchend=function(K,xe,re){var ye=this.singleTap.touchend(K,xe,re);if(ye){var Ue=K.timeStamp-this.lastTime0&&(this._active=!0);var ye=zt(re,xe),Ue=new e.Point(0,0),ke=new e.Point(0,0),Qe=0;for(var vt in ye){var qt=ye[vt],br=this._touches[vt];br&&(Ue._add(qt),ke._add(qt.sub(br)),Qe++,ye[vt]=qt)}if(this._touches=ye,!(QeMath.abs(ge.x)}var mn=100,po=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ge.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(re){this._lastPoints=re,_l(re[0].sub(re[1]))&&(this._valid=!1)},K.prototype._move=function(re,ye,Ue){var ke=re[0].sub(this._lastPoints[0]),Qe=re[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ke,Qe,Ue.timeStamp),!!this._valid){this._lastPoints=re,this._active=!0;var vt=(ke.y+Qe.y)/2,qt=-.5;return{pitchDelta:vt*qt}}},K.prototype.gestureBeginsVertically=function(re,ye,Ue){if(this._valid!==void 0)return this._valid;var ke=2,Qe=re.mag()>=ke,vt=ye.mag()>=ke;if(!(!Qe&&!vt)){if(!Qe||!vt)return this._firstMove===void 0&&(this._firstMove=Ue),Ue-this._firstMove0==ye.y>0;return _l(re)&&_l(ye)&&qt}},K}(In),fs={panStep:100,bearingStep:15,pitchStep:10},ms=function(){var K=fs;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};ms.prototype.reset=function(){this._active=!1},ms.prototype.keydown=function(K){var xe=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var re=0,ye=0,Ue=0,ke=0,Qe=0;switch(K.keyCode){case 61:case 107:case 171:case 187:re=1;break;case 189:case 109:case 173:re=-1;break;case 37:K.shiftKey?ye=-1:(K.preventDefault(),ke=-1);break;case 39:K.shiftKey?ye=1:(K.preventDefault(),ke=1);break;case 38:K.shiftKey?Ue=1:(K.preventDefault(),Qe=-1);break;case 40:K.shiftKey?Ue=-1:(K.preventDefault(),Qe=1);break;default:return}return this._rotationDisabled&&(ye=0,Ue=0),{cameraAnimation:function(vt){var qt=vt.getZoom();vt.easeTo({duration:300,easeId:"keyboardHandler",easing:Tl,zoom:re?Math.round(qt)+re*(K.shiftKey?2:1):qt,bearing:vt.getBearing()+ye*xe._bearingStep,pitch:vt.getPitch()+Ue*xe._pitchStep,offset:[-ke*xe._panStep,-Qe*xe._panStep],center:vt.getCenter()},{originalEvent:K})}}}},ms.prototype.enable=function(){this._enabled=!0},ms.prototype.disable=function(){this._enabled=!1,this.reset()},ms.prototype.isEnabled=function(){return this._enabled},ms.prototype.isActive=function(){return this._active},ms.prototype.disableRotation=function(){this._rotationDisabled=!0},ms.prototype.enableRotation=function(){this._rotationDisabled=!1};function Tl(ge){return ge*(2-ge)}var Wl=4.000244140625,Su=1/100,Rl=1/450,_c=2,it=function(K,xe){this._map=K,this._el=K.getCanvasContainer(),this._handler=xe,this._delta=0,this._defaultZoomRate=Su,this._wheelZoomRate=Rl,e.bindAll(["_onTimeout"],this)};it.prototype.setZoomRate=function(K){this._defaultZoomRate=K},it.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},it.prototype.isEnabled=function(){return!!this._enabled},it.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},it.prototype.isZooming=function(){return!!this._zooming},it.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},it.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},it.prototype.wheel=function(K){if(this.isEnabled()){var xe=K.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,re=e.browser.now(),ye=re-(this._lastWheelEventTime||0);this._lastWheelEventTime=re,xe!==0&&xe%Wl===0?this._type="wheel":xe!==0&&Math.abs(xe)<4?this._type="trackpad":ye>400?(this._type=null,this._lastValue=xe,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(ye*xe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,xe+=this._lastValue)),K.shiftKey&&xe&&(xe=xe/4),this._type&&(this._lastWheelEvent=K,this._delta-=xe,this._active||this._start(K)),K.preventDefault()}},it.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},it.prototype._start=function(K){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 xe=r.mousePos(this._el,K);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(xe)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},it.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var xe=this._map.transform;if(this._delta!==0){var re=this._type==="wheel"&&Math.abs(this._delta)>Wl?this._wheelZoomRate:this._defaultZoomRate,ye=_c/(1+Math.exp(-Math.abs(this._delta*re)));this._delta<0&&ye!==0&&(ye=1/ye);var Ue=typeof this._targetZoom=="number"?xe.zoomScale(this._targetZoom):xe.scale;this._targetZoom=Math.min(xe.maxZoom,Math.max(xe.minZoom,xe.scaleZoom(Ue*ye))),this._type==="wheel"&&(this._startZoom=xe.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ke=typeof this._targetZoom=="number"?this._targetZoom:xe.zoom,Qe=this._startZoom,vt=this._easing,qt=!1,br;if(this._type==="wheel"&&Qe&&vt){var Br=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),pr=vt(Br);br=e.number(Qe,ke,pr),Br<1?this._frameId||(this._frameId=!0):qt=!0}else br=ke,qt=!0;return this._active=!0,qt&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!qt,zoomDelta:br-xe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},it.prototype._smoothOutEasing=function(K){var xe=e.ease;if(this._prevEase){var re=this._prevEase,ye=(e.browser.now()-re.start)/re.duration,Ue=re.easing(ye+.01)-re.easing(ye),ke=.27/Math.sqrt(Ue*Ue+1e-4)*.01,Qe=Math.sqrt(.27*.27-ke*ke);xe=e.bezier(ke,Qe,.25,1)}return this._prevEase={start:e.browser.now(),duration:K,easing:xe},xe},it.prototype.reset=function(){this._active=!1};var Xt=function(K,xe){this._clickZoom=K,this._tapZoom=xe};Xt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Xt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Xt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Xt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var fr=function(){this.reset()};fr.prototype.reset=function(){this._active=!1},fr.prototype.dblclick=function(K,xe){return K.preventDefault(),{cameraAnimation:function(re){re.easeTo({duration:300,zoom:re.getZoom()+(K.shiftKey?-1:1),around:re.unproject(xe)},{originalEvent:K})}}},fr.prototype.enable=function(){this._enabled=!0},fr.prototype.disable=function(){this._enabled=!1,this.reset()},fr.prototype.isEnabled=function(){return this._enabled},fr.prototype.isActive=function(){return this._active};var oa=function(){this._tap=new Ja({numTouches:1,numTaps:1}),this.reset()};oa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},oa.prototype.touchstart=function(K,xe,re){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?re.length>0&&(this._swipePoint=xe[0],this._swipeTouch=re[0].identifier):this._tap.touchstart(K,xe,re))},oa.prototype.touchmove=function(K,xe,re){if(!this._tapTime)this._tap.touchmove(K,xe,re);else if(this._swipePoint){if(re[0].identifier!==this._swipeTouch)return;var ye=xe[0],Ue=ye.y-this._swipePoint.y;return this._swipePoint=ye,K.preventDefault(),this._active=!0,{zoomDelta:Ue/128}}},oa.prototype.touchend=function(K,xe,re){if(this._tapTime)this._swipePoint&&re.length===0&&this.reset();else{var ye=this._tap.touchend(K,xe,re);ye&&(this._tapTime=K.timeStamp)}},oa.prototype.touchcancel=function(){this.reset()},oa.prototype.enable=function(){this._enabled=!0},oa.prototype.disable=function(){this._enabled=!1,this.reset()},oa.prototype.isEnabled=function(){return this._enabled},oa.prototype.isActive=function(){return this._active};var Ta=function(K,xe,re){this._el=K,this._mousePan=xe,this._touchPan=re};Ta.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ta.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ta.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ta.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ma=function(K,xe,re){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=xe,this._mousePitch=re};ma.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ma.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ma.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ma.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var xa=function(K,xe,re,ye){this._el=K,this._touchZoom=xe,this._touchRotate=re,this._tapDragZoom=ye,this._rotationDisabled=!1,this._enabled=!0};xa.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},xa.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},xa.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},xa.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},xa.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},xa.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ya=function(ge){return ge.zoom||ge.drag||ge.pitch||ge.rotate},bi=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K}(e.Event);function yi(ge){return ge.panDelta&&ge.panDelta.mag()||ge.zoomDelta||ge.bearingDelta||ge.pitchDelta}var si=function(K,xe){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Gl(K),this._bearingSnap=xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(xe),e.bindAll(["handleEvent","handleWindowEvent"],this);var re=this._el;this._listeners=[[re,"touchstart",{passive:!0}],[re,"touchmove",{passive:!1}],[re,"touchend",void 0],[re,"touchcancel",void 0],[re,"mousedown",void 0],[re,"mousemove",void 0],[re,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[re,"mouseover",void 0],[re,"mouseout",void 0],[re,"dblclick",void 0],[re,"click",void 0],[re,"keydown",{capture:!1}],[re,"keyup",void 0],[re,"wheel",{passive:!1}],[re,"contextmenu",void 0],[e.window,"blur",void 0]];for(var ye=0,Ue=this._listeners;yeQe?Math.min(2,Wt):Math.max(.5,Wt),Ga=Math.pow(vi,1-Jr),ai=ke.unproject(dr.add(lr.mult(Jr*Ga)).mult(ya));ke.setLocationAtPoint(ke.renderWorldCopies?ai.wrap():ai,rr)}Ue._fireMoveEvents(ye)},function(Jr){Ue._afterEase(ye,Jr)},re),this},K.prototype._prepareEase=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._moving=!0,!ye&&!Ue.moving&&this.fire(new e.Event("movestart",re)),this._zooming&&!Ue.zooming&&this.fire(new e.Event("zoomstart",re)),this._rotating&&!Ue.rotating&&this.fire(new e.Event("rotatestart",re)),this._pitching&&!Ue.pitching&&this.fire(new e.Event("pitchstart",re))},K.prototype._fireMoveEvents=function(re){this.fire(new e.Event("move",re)),this._zooming&&this.fire(new e.Event("zoom",re)),this._rotating&&this.fire(new e.Event("rotate",re)),this._pitching&&this.fire(new e.Event("pitch",re))},K.prototype._afterEase=function(re,ye){if(!(this._easeId&&ye&&this._easeId===ye)){delete this._easeId;var Ue=this._zooming,ke=this._rotating,Qe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ue&&this.fire(new e.Event("zoomend",re)),ke&&this.fire(new e.Event("rotateend",re)),Qe&&this.fire(new e.Event("pitchend",re)),this.fire(new e.Event("moveend",re))}},K.prototype.flyTo=function(re,ye){var Ue=this;if(!re.essential&&e.browser.prefersReducedMotion){var ke=e.pick(re,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ke,ye)}this.stop(),re=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},re);var Qe=this.transform,vt=this.getZoom(),qt=this.getBearing(),br=this.getPitch(),Br=this.getPadding(),pr="zoom"in re?e.clamp(+re.zoom,Qe.minZoom,Qe.maxZoom):vt,mt="bearing"in re?this._normalizeBearing(re.bearing,qt):qt,Mt="pitch"in re?+re.pitch:br,Ft="padding"in re?re.padding:Qe.padding,rr=Qe.zoomScale(pr-vt),hr=e.Point.convert(re.offset),sr=Qe.centerPoint.add(hr),dr=Qe.pointLocation(sr),lr=e.LngLat.convert(re.center||dr);this._normalizeCenter(lr);var Wt=Qe.project(dr),ir=Qe.project(lr).sub(Wt),Gt=re.curve,Dr=Math.max(Qe.width,Qe.height),Jr=Dr/rr,ya=ir.mag();if("minZoom"in re){var vi=e.clamp(Math.min(re.minZoom,vt,pr),Qe.minZoom,Qe.maxZoom),Ga=Dr/Qe.zoomScale(vi-vt);Gt=Math.sqrt(Ga/ya*2)}var ai=Gt*Gt;function Zi(Oo){var Cs=(Jr*Jr-Dr*Dr+(Oo?-1:1)*ai*ai*ya*ya)/(2*(Oo?Jr:Dr)*ai*ya);return Math.log(Math.sqrt(Cs*Cs+1)-Cs)}function Fi(Oo){return(Math.exp(Oo)-Math.exp(-Oo))/2}function ui(Oo){return(Math.exp(Oo)+Math.exp(-Oo))/2}function _i(Oo){return Fi(Oo)/ui(Oo)}var Si=Zi(0),Ui=function(Oo){return ui(Si)/ui(Si+Gt*Oo)},fn=function(Oo){return Dr*((ui(Si)*_i(Si+Gt*Oo)-Fi(Si))/ai)/ya},_o=(Zi(1)-Si)/Gt;if(Math.abs(ya)<1e-6||!isFinite(_o)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(re,ye);var Uo=Jrre.maxDuration&&(re.duration=0),this._zooming=!0,this._rotating=qt!==mt,this._pitching=Mt!==br,this._padding=!Qe.isPaddingEqual(Ft),this._prepareEase(ye,!1),this._ease(function(Oo){var Cs=Oo*_o,Ys=1/Ui(Cs);Qe.zoom=Oo===1?pr:vt+Qe.scaleZoom(Ys),Ue._rotating&&(Qe.bearing=e.number(qt,mt,Oo)),Ue._pitching&&(Qe.pitch=e.number(br,Mt,Oo)),Ue._padding&&(Qe.interpolatePadding(Br,Ft,Oo),sr=Qe.centerPoint.add(hr));var mu=Oo===1?lr:Qe.unproject(Wt.add(ir.mult(fn(Cs))).mult(Ys));Qe.setLocationAtPoint(Qe.renderWorldCopies?mu.wrap():mu,sr),Ue._fireMoveEvents(ye)},function(){return Ue._afterEase(ye)},re),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(re,ye){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ue=this._onEaseEnd;delete this._onEaseEnd,Ue.call(this,ye)}if(!re){var ke=this.handlers;ke&&ke.stop(!1)}return this},K.prototype._ease=function(re,ye,Ue){Ue.animate===!1||Ue.duration===0?(re(1),ye()):(this._easeStart=e.browser.now(),this._easeOptions=Ue,this._onEaseFrame=re,this._onEaseEnd=ye,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var re=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(re)),re<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(re,ye){re=e.wrap(re,-180,180);var Ue=Math.abs(re-ye);return Math.abs(re-360-ye)180?-360:Ue<-180?360:0}},K}(e.Evented),zi=function(K){K===void 0&&(K={}),this.options=K,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};zi.prototype.getDefaultPosition=function(){return"bottom-right"},zi.prototype.onAdd=function(K){var xe=this.options&&this.options.compact;return this._map=K,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"),xe&&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),xe===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},zi.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},zi.prototype._setElementTitle=function(K,xe){var re=this._map._getUIString("AttributionControl."+xe);K.title=re,K.setAttribute("aria-label",re)},zi.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"))},zi.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var xe=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(K){var re=xe.reduce(function(ye,Ue,ke){return Ue.value&&(ye+=Ue.key+"="+Ue.value+(ke=0)return!1;return!0});var Qe=K.join(" | ");Qe!==this._attribHTML&&(this._attribHTML=Qe,K.length?(this._innerContainer.innerHTML=Qe,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},zi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Ei=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Ei.prototype.onAdd=function(K){this._map=K,this._container=r.create("div","mapboxgl-ctrl");var xe=r.create("a","mapboxgl-ctrl-logo");return xe.target="_blank",xe.rel="noopener nofollow",xe.href="https://www.mapbox.com/",xe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),xe.setAttribute("rel","noopener nofollow"),this._container.appendChild(xe),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ei.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ei.prototype.getDefaultPosition=function(){return"bottom-left"},Ei.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Ei.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var xe in K){var re=K[xe].getSource();if(re.mapbox_logo)return!0}return!1}},Ei.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var xe=K[0];this._map.getCanvasContainer().offsetWidth<250?xe.classList.add("mapboxgl-compact"):xe.classList.remove("mapboxgl-compact")}};var Na=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Na.prototype.add=function(K){var xe=++this._id,re=this._queue;return re.push({callback:K,id:xe,cancelled:!1}),xe},Na.prototype.remove=function(K){for(var xe=this._currentlyRunning,re=xe?this._queue.concat(xe):this._queue,ye=0,Ue=re;yere.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(re.minPitch!=null&&re.maxPitch!=null&&re.minPitch>re.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(re.minPitch!=null&&re.minPitchhn)throw new Error("maxPitch must be less than or equal to "+hn);var Ue=new es(re.minZoom,re.maxZoom,re.minPitch,re.maxPitch,re.renderWorldCopies);if(ge.call(this,Ue,re),this._interactive=re.interactive,this._maxTileCacheSize=re.maxTileCacheSize,this._failIfMajorPerformanceCaveat=re.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=re.preserveDrawingBuffer,this._antialias=re.antialias,this._trackResize=re.trackResize,this._bearingSnap=re.bearingSnap,this._refreshExpiredTiles=re.refreshExpiredTiles,this._fadeDuration=re.fadeDuration,this._crossSourceCollisions=re.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=re.collectResourceTiming,this._renderTaskQueue=new Na,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ea,re.locale),this._clickTolerance=re.clickTolerance,this._requestManager=new e.RequestManager(re.transformRequest,re.accessToken),typeof re.container=="string"){if(this._container=e.window.document.getElementById(re.container),!this._container)throw new Error("Container '"+re.container+"' not found.")}else if(re.container instanceof Qa)this._container=re.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(re.maxBounds&&this.setMaxBounds(re.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 ye._update(!1)}),this.on("moveend",function(){return ye._update(!1)}),this.on("zoom",function(){return ye._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 si(this,re);var ke=typeof re.hash=="string"&&re.hash||void 0;this._hash=re.hash&&new tu(ke).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:re.center,zoom:re.zoom,bearing:re.bearing,pitch:re.pitch}),re.bounds&&(this.resize(),this.fitBounds(re.bounds,e.extend({},re.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=re.localIdeographFontFamily,re.style&&this.setStyle(re.style,{localIdeographFontFamily:re.localIdeographFontFamily}),re.attributionControl&&this.addControl(new zi({customAttribution:re.customAttribution})),this.addControl(new Ei,re.logoPosition),this.on("style.load",function(){ye.transform.unmodified&&ye.jumpTo(ye.style.stylesheet)}),this.on("data",function(Qe){ye._update(Qe.dataType==="style"),ye.fire(new e.Event(Qe.dataType+"data",Qe))}),this.on("dataloading",function(Qe){ye.fire(new e.Event(Qe.dataType+"dataloading",Qe))})}ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K;var xe={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(ye,Ue){if(Ue===void 0&&(ye.getDefaultPosition?Ue=ye.getDefaultPosition():Ue="top-right"),!ye||!ye.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 ke=ye.onAdd(this);this._controls.push(ye);var Qe=this._controlPositions[Ue];return Ue.indexOf("bottom")!==-1?Qe.insertBefore(ke,Qe.firstChild):Qe.appendChild(ke),this},K.prototype.removeControl=function(ye){if(!ye||!ye.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 Ue=this._controls.indexOf(ye);return Ue>-1&&this._controls.splice(Ue,1),ye.onRemove(this),this},K.prototype.hasControl=function(ye){return this._controls.indexOf(ye)>-1},K.prototype.resize=function(ye){var Ue=this._containerDimensions(),ke=Ue[0],Qe=Ue[1];this._resizeCanvas(ke,Qe),this.transform.resize(ke,Qe),this.painter.resize(ke,Qe);var vt=!this._moving;return vt&&(this.stop(),this.fire(new e.Event("movestart",ye)).fire(new e.Event("move",ye))),this.fire(new e.Event("resize",ye)),vt&&this.fire(new e.Event("moveend",ye)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(ye){return this.transform.setMaxBounds(e.LngLatBounds.convert(ye)),this._update()},K.prototype.setMinZoom=function(ye){if(ye=ye??Va,ye>=Va&&ye<=this.transform.maxZoom)return this.transform.minZoom=ye,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ye,this._update(),this.getZoom()>ye&&this.setZoom(ye),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(ye){if(ye=ye??Li,ye=Li&&ye<=this.transform.maxPitch)return this.transform.minPitch=ye,this._update(),this.getPitch()hn)throw new Error("maxPitch must be less than or equal to "+hn);if(ye>=this.transform.minPitch)return this.transform.maxPitch=ye,this._update(),this.getPitch()>ye&&this.setPitch(ye),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(ye){return this.transform.renderWorldCopies=ye,this._update()},K.prototype.project=function(ye){return this.transform.locationPoint(e.LngLat.convert(ye))},K.prototype.unproject=function(ye){return this.transform.pointLocation(e.Point.convert(ye))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(ye,Ue,ke){var Qe=this,vt;if(ye==="mouseenter"||ye==="mouseover"){var qt=!1,br=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length?qt||(qt=!0,ke.call(Qe,new De(ye,Qe,rr.originalEvent,{features:hr}))):qt=!1},Br=function(){qt=!1};return{layer:Ue,listener:ke,delegates:{mousemove:br,mouseout:Br}}}else if(ye==="mouseleave"||ye==="mouseout"){var pr=!1,mt=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length?pr=!0:pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))},Mt=function(rr){pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))};return{layer:Ue,listener:ke,delegates:{mousemove:mt,mouseout:Mt}}}else{var Ft=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length&&(rr.features=hr,ke.call(Qe,rr),delete rr.features)};return{layer:Ue,listener:ke,delegates:(vt={},vt[ye]=Ft,vt)}}},K.prototype.on=function(ye,Ue,ke){if(ke===void 0)return ge.prototype.on.call(this,ye,Ue);var Qe=this._createDelegatedListener(ye,Ue,ke);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ye]=this._delegatedListeners[ye]||[],this._delegatedListeners[ye].push(Qe);for(var vt in Qe.delegates)this.on(vt,Qe.delegates[vt]);return this},K.prototype.once=function(ye,Ue,ke){if(ke===void 0)return ge.prototype.once.call(this,ye,Ue);var Qe=this._createDelegatedListener(ye,Ue,ke);for(var vt in Qe.delegates)this.once(vt,Qe.delegates[vt]);return this},K.prototype.off=function(ye,Ue,ke){var Qe=this;if(ke===void 0)return ge.prototype.off.call(this,ye,Ue);var vt=function(qt){for(var br=qt[ye],Br=0;Br180;){var ke=xe.locationPoint(ge);if(ke.x>=0&&ke.y>=0&&ke.x<=xe.width&&ke.y<=xe.height)break;ge.lng>xe.center.lng?ge.lng-=360:ge.lng+=360}return ge}var vn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Rn(ge,K,xe){var re=ge.classList;for(var ye in vn)re.remove("mapboxgl-"+xe+"-anchor-"+ye);re.add("mapboxgl-"+xe+"-anchor-"+K)}var Ii=function(ge){function K(xe,re){if(ge.call(this),(xe instanceof e.window.HTMLElement||re)&&(xe=e.extend({element:xe},re)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=xe&&xe.anchor||"center",this._color=xe&&xe.color||"#3FB1CE",this._scale=xe&&xe.scale||1,this._draggable=xe&&xe.draggable||!1,this._clickTolerance=xe&&xe.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=xe&&xe.rotation||0,this._rotationAlignment=xe&&xe.rotationAlignment||"auto",this._pitchAlignment=xe&&xe.pitchAlignment&&xe.pitchAlignment!=="auto"?xe.pitchAlignment:this._rotationAlignment,!xe||!xe.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var ye=r.createNS("http://www.w3.org/2000/svg","svg"),Ue=41,ke=27;ye.setAttributeNS(null,"display","block"),ye.setAttributeNS(null,"height",Ue+"px"),ye.setAttributeNS(null,"width",ke+"px"),ye.setAttributeNS(null,"viewBox","0 0 "+ke+" "+Ue);var Qe=r.createNS("http://www.w3.org/2000/svg","g");Qe.setAttributeNS(null,"stroke","none"),Qe.setAttributeNS(null,"stroke-width","1"),Qe.setAttributeNS(null,"fill","none"),Qe.setAttributeNS(null,"fill-rule","evenodd");var vt=r.createNS("http://www.w3.org/2000/svg","g");vt.setAttributeNS(null,"fill-rule","nonzero");var qt=r.createNS("http://www.w3.org/2000/svg","g");qt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),qt.setAttributeNS(null,"fill","#000000");for(var br=[{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"}],Br=0,pr=br;Br=ye}this._isDragging&&(this._pos=re.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")))},K.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"},K.prototype._addDragHandler=function(re){this._element.contains(re.originalEvent.target)&&(re.preventDefault(),this._positionDelta=re.point.sub(this._pos).add(this._offset),this._pointerdownPos=re.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))},K.prototype.setDraggable=function(re){return this._draggable=!!re,this._map&&(re?(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},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(re){return this._rotation=re||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(re){return this._rotationAlignment=re||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(re){return this._pitchAlignment=re&&re!=="auto"?re:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(e.Evented),nn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Cn;function Dn(ge){Cn!==void 0?ge(Cn):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Cn=K.state!=="denied",ge(Cn)}):(Cn=!!e.window.navigator.geolocation,ge(Cn))}var Wn=0,Os=!1,xl=function(ge){function K(xe){ge.call(this),this.options=e.extend({},nn,xe),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(re){return this._map=re,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Dn(this._setupUI),this._container},K.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,Wn=0,Os=!1},K.prototype._isOutOfMapMaxBounds=function(re){var ye=this._map.getMaxBounds(),Ue=re.coords;return ye&&(Ue.longitudeye.getEast()||Ue.latitudeye.getNorth())},K.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}},K.prototype._onSuccess=function(re){if(this._map){if(this._isOutOfMapMaxBounds(re)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",re)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=re,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(re),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(re),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",re)),this._finish()}},K.prototype._updateCamera=function(re){var ye=new e.LngLat(re.coords.longitude,re.coords.latitude),Ue=re.coords.accuracy,ke=this._map.getBearing(),Qe=e.extend({bearing:ke},this.options.fitBoundsOptions);this._map.fitBounds(ye.toBounds(Ue),Qe,{geolocateSource:!0})},K.prototype._updateMarker=function(re){if(re){var ye=new e.LngLat(re.coords.longitude,re.coords.latitude);this._accuracyCircleMarker.setLngLat(ye).addTo(this._map),this._userLocationDotMarker.setLngLat(ye).addTo(this._map),this._accuracy=re.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var re=this._map._container.clientHeight/2,ye=this._map.unproject([0,re]),Ue=this._map.unproject([1,re]),ke=ye.distanceTo(Ue),Qe=Math.ceil(2*this._accuracy/ke);this._circleElement.style.width=Qe+"px",this._circleElement.style.height=Qe+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(re){if(this._map){if(this.options.trackUserLocation)if(re.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 ye=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ye,this._geolocateButton.setAttribute("aria-label",ye),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(re.code===3&&Os)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",re)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(re){var ye=this;if(this._container.addEventListener("contextmenu",function(Qe){return Qe.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",re===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ue=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ue,this._geolocateButton.setAttribute("aria-label",Ue)}else{var ke=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ke,this._geolocateButton.setAttribute("aria-label",ke)}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 Ii(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ii({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(Qe){var vt=Qe.originalEvent&&Qe.originalEvent.type==="resize";!Qe.geolocateSource&&ye._watchState==="ACTIVE_LOCK"&&!vt&&(ye._watchState="BACKGROUND",ye._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ye._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ye.fire(new e.Event("trackuserlocationend")))})},K.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":Wn--,Os=!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"),Wn++;var re;Wn>1?(re={maximumAge:6e5,timeout:0},Os=!0):(re=this.options.positionOptions,Os=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,re)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.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)},K}(e.Evented),ho={maxWidth:100,unit:"metric"},Xl=function(K){this.options=e.extend({},ho,K),e.bindAll(["_onMove","setUnit"],this)};Xl.prototype.getDefaultPosition=function(){return"bottom-left"},Xl.prototype._onMove=function(){hs(this._map,this._container,this.options)},Xl.prototype.onAdd=function(K){return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Xl.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xl.prototype.setUnit=function(K){this.options.unit=K,hs(this._map,this._container,this.options)};function hs(ge,K,xe){var re=xe&&xe.maxWidth||100,ye=ge._container.clientHeight/2,Ue=ge.unproject([0,ye]),ke=ge.unproject([re,ye]),Qe=Ue.distanceTo(ke);if(xe&&xe.unit==="imperial"){var vt=3.2808*Qe;if(vt>5280){var qt=vt/5280;Al(K,re,qt,ge._getUIString("ScaleControl.Miles"))}else Al(K,re,vt,ge._getUIString("ScaleControl.Feet"))}else if(xe&&xe.unit==="nautical"){var br=Qe/1852;Al(K,re,br,ge._getUIString("ScaleControl.NauticalMiles"))}else Qe>=1e3?Al(K,re,Qe/1e3,ge._getUIString("ScaleControl.Kilometers")):Al(K,re,Qe,ge._getUIString("ScaleControl.Meters"))}function Al(ge,K,xe,re){var ye=ru(xe),Ue=ye/xe;ge.style.width=K*Ue+"px",ge.innerHTML=ye+" "+re}function El(ge){var K=Math.pow(10,Math.ceil(-Math.log(ge)/Math.LN10));return Math.round(ge*K)/K}function ru(ge){var K=Math.pow(10,(""+Math.floor(ge)).length-1),xe=ge/K;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:El(xe),K*xe}var js=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof e.window.HTMLElement?this._container=K.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")};js.prototype.onAdd=function(K){return this._map=K,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},js.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},js.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},js.prototype._setupUI=function(){var K=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},js.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},js.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},js.prototype._isFullscreen=function(){return this._fullscreen},js.prototype._changeIcon=function(){var K=e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},js.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(", "),Xn=function(ge){function K(xe){ge.call(this),this.options=e.extend(Object.create(pl),xe),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.addTo=function(re){return this._map&&this.remove(),this._map=re,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},K.prototype.isOpen=function(){return!!this._map},K.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},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(re){return this._lngLat=e.LngLat.convert(re),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},K.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},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(re){return this.setDOMContent(e.window.document.createTextNode(re))},K.prototype.setHTML=function(re){var ye=e.window.document.createDocumentFragment(),Ue=e.window.document.createElement("body"),ke;for(Ue.innerHTML=re;ke=Ue.firstChild,!!ke;)ye.appendChild(ke);return this.setDOMContent(ye)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(re){return this.options.maxWidth=re,this._update(),this},K.prototype.setDOMContent=function(re){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(re),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(re){this._container&&this._container.classList.add(re)},K.prototype.removeClassName=function(re){this._container&&this._container.classList.remove(re)},K.prototype.setOffset=function(re){return this.options.offset=re,this._update(),this},K.prototype.toggleClassName=function(re){if(this._container)return this._container.classList.toggle(re)},K.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="×",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(re){this._update(re.point)},K.prototype._onMouseMove=function(re){this._update(re.point)},K.prototype._onDrag=function(re){this._update(re.point)},K.prototype._update=function(re){var ye=this,Ue=this._lngLat||this._trackPointer;if(!(!this._map||!Ue||!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(mt){return ye._container.classList.add(mt)}),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=Xi(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!re))){var ke=this._pos=this._trackPointer&&re?re:this._map.project(this._lngLat),Qe=this.options.anchor,vt=kl(this.options.offset);if(!Qe){var qt=this._container.offsetWidth,br=this._container.offsetHeight,Br;ke.y+vt.bottom.ythis._map.transform.height-br?Br=["bottom"]:Br=[],ke.xthis._map.transform.width-qt/2&&Br.push("right"),Br.length===0?Qe="bottom":Qe=Br.join("-")}var pr=ke.add(vt[Qe]).round();r.setTransform(this._container,vn[Qe]+" translate("+pr.x+"px,"+pr.y+"px)"),Rn(this._container,Qe,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var re=this._container.querySelector(bl);re&&re.focus()}},K.prototype._onClose=function(){this.remove()},K}(e.Evented);function kl(ge){if(ge)if(typeof ge=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ge,2)));return{center:new e.Point(0,0),top:new e.Point(0,ge),"top-left":new e.Point(K,K),"top-right":new e.Point(-K,K),bottom:new e.Point(0,-ge),"bottom-left":new e.Point(K,-K),"bottom-right":new e.Point(-K,-K),left:new e.Point(ge,0),right:new e.Point(-ge,0)}}else if(ge instanceof e.Point||Array.isArray(ge)){var xe=e.Point.convert(ge);return{center:xe,top:xe,"top-left":xe,"top-right":xe,bottom:xe,"bottom-left":xe,"bottom-right":xe,left:xe,right:xe}}else return{center:e.Point.convert(ge.center||[0,0]),top:e.Point.convert(ge.top||[0,0]),"top-left":e.Point.convert(ge["top-left"]||[0,0]),"top-right":e.Point.convert(ge["top-right"]||[0,0]),bottom:e.Point.convert(ge.bottom||[0,0]),"bottom-left":e.Point.convert(ge["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(ge["bottom-right"]||[0,0]),left:e.Point.convert(ge.left||[0,0]),right:e.Point.convert(ge.right||[0,0])};else return kl(new e.Point(0,0))}var Io={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Ua,NavigationControl:Ti,GeolocateControl:xl,AttributionControl:zi,ScaleControl:Xl,FullscreenControl:js,Popup:Xn,Marker:Ii,Style:Ul,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:tn,clearPrewarmedResources:cn,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(ge){e.config.ACCESS_TOKEN=ge},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(ge){e.config.API_URL=ge},get workerCount(){return ri.workerCount},set workerCount(ge){ri.workerCount=ge},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ge){e.config.MAX_PARALLEL_IMAGE_REQUESTS=ge},clearStorage:function(K){e.clearTileCache(K)},workerUrl:""};return Io}),S})}}),_V=He({"src/plots/mapbox/layers.js"(Z,q){"use strict";var v=sa(),_=su().sanitizeHTML,S=E6(),M=nm();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;s0){for(var s=0;s0}function o(i){var n={},s={};switch(i.type){case"circle":v.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":v.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var h=i.symbol,f=S(h.textposition,h.iconsize);v.extendFlat(n,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":i.color,"text-color":h.textfont.color,"text-opacity":i.opacity});break;case"raster":v.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,h={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",h.tileSize=256):n==="image"&&(f="url",h.coordinates=i.coordinates),h[f]=s,i.sourceattribution&&(h.attribution=_(i.sourceattribution)),h}q.exports=function(n,s,h){var f=new e(n,s);return f.update(h),f}}}),xV=He({"src/plots/mapbox/mapbox.js"(Z,q){"use strict";var v=k6(),_=sa(),S=Ev(),M=so(),e=Wo(),t=Ap(),r=Hc(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,m=nm(),c=_V();function T(p,b){this.id=b,this.gd=p;var d=p._fullLayout,u=p._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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(p,b,d){var u=this,g=b[u.id];u.map&&g.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var y;u.map?y=new Promise(function(D,P){u.updateMap(p,b,D,P)}):y=new Promise(function(D,P){u.createMap(p,b,D,P)}),d.push(y)},l.createMap=function(p,b,d,u){var g=this,y=b[g.id],D=g.styleObj=w(y.style,b);g.accessToken=y.accesstoken;var P=y.bounds,z=P?[[P.west,P.south],[P.east,P.north]]:null,F=g.map=new v.Map({container:g.div,style:D.style,center:E(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!g.isStatic,preserveDrawingBuffer:g.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",g.rejectOnError(u),g.isStatic||g.initFx(p,b);var N=[];N.push(new Promise(function(O){F.once("load",O)})),N=N.concat(S.fetchTraceGeoData(p)),Promise.all(N).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.updateMap=function(p,b,d,u){var g=this,y=g.map,D=b[this.id];g.rejectOnError(u);var P=[],z=w(D.style,b);JSON.stringify(g.styleObj)!==JSON.stringify(z)&&(g.styleObj=z,y.setStyle(z.style),g.traceHash={},P.push(new Promise(function(F){y.once("styledata",F)}))),P=P.concat(S.fetchTraceGeoData(p)),Promise.all(P).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(p,b){var d=b[this.id],u=d.layers,g,y,D=this.belowLookup={},P=!1;for(g=0;g1)for(g=0;g-1&&f(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,P),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(p){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function g(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var y=p.dragmode,D;D=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[g([F.xmin,F.ymin]),g([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(g)}};var P=b.dragOptions;b.dragOptions=_.extendDeep(P||{},{dragmode:p.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:p[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:D},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),i(y)||a(y)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){n(z,F,N,b.dragOptions,y)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(p){var b=p[this.id].domain,d=p._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(p){var b=p[this.id],d=b.layers,u=this.layerList,g;if(d.length!==u.length){for(g=0;gN/2){var O=D.split("|").join("
");z.text(O).attr("data-unformatted",O).call(o.convertToTspans,c),F=r.bBox(z.node())}z.attr("transform",_(-3,-F.height+8)),P.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 L=1;F.width+6>N&&(L=N/(F.width+6));var U=[x.l+x.w*E.x[1],x.t+x.h*(1-E.y[0])];P.attr("transform",_(U[0],U[1])+S(L))}};function f(c,T){var l=c._fullLayout,x=c._context;if(x.mapboxAccessToken==="")return"";for(var w=[],A=[],E=!1,p=!1,b=0;b1&&v.warn(n.multipleTokensErrorMsg),w[0]):(A.length&&v.log(["Listed mapbox access token(s)",A.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function m(c){return typeof c=="string"&&(n.styleValuesMapbox.indexOf(c)!==-1||c.indexOf("mapbox://")===0||c.indexOf("stamen")===0)}Z.updateFx=function(c){for(var T=c._fullLayout,l=T._subplots[i],x=0;x=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=v(o),h=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,h),o[0].trace._glTrace=i,i}}}),MV=He({"src/traces/choroplethmapbox/index.js"(Z,q){"use strict";var v=["*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:AV(),colorbar:o0(),calc:lT(),plot:SV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(_,S){if(S){var M=S[0].trace;M._glTrace.updateOnSelect(S)}},getBelow:function(_,S){for(var M=S.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;r0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var p=M.extractOpts(a),b=p.reversescale?M.flipScale(p.colorscale):p.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),g=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=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 S(t,o.uid),i=a.sourceId,n=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),IV=He({"src/traces/densitymapbox/hover.js"(Z,q){"use strict";var v=Wo(),_=ST().hoverPoints,S=ST().getExtraText;q.exports=function(e,t,r){var o=_(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 h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),RV=He({"src/traces/densitymapbox/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_.z=S.z,_}}}),DV=He({"src/traces/densitymapbox/index.js"(Z,q){"use strict";var v=["*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:P6(),supplyDefaults:kV(),colorbar:o0(),formatLabels:M6(),calc:CV(),plot:PV(),hoverPoints:IV(),eventData:RV(),getBelow:function(_,S){for(var M=S.getMapLayers(),e=0;eESRI"},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} +`),Wt=Qe.createShader(Qe.FRAGMENT_SHADER);if(Qe.isContextLost()){this.failedToCreate=!0;return}Qe.shaderSource(Wt,dr),Qe.compileShader(Wt),Qe.attachShader(this.program,Wt);var ir=Qe.createShader(Qe.VERTEX_SHADER);if(Qe.isContextLost()){this.failedToCreate=!0;return}Qe.shaderSource(ir,lr),Qe.compileShader(ir),Qe.attachShader(this.program,ir),this.attributes={};var Gt={};this.numAttributes=br.length;for(var Dr=0;Dr>16,Qe>>16],u_pixel_coord_lower:[ke&65535,Qe&65535]}}function Jc(ge,K,xe,re){var ye=xe.imageManager.getPattern(ge.from.toString()),Ue=xe.imageManager.getPattern(ge.to.toString()),ke=xe.imageManager.getPixelSize(),Qe=ke.width,vt=ke.height,qt=Math.pow(2,re.tileID.overscaledZ),br=re.tileSize*Math.pow(2,xe.transform.tileZoom)/qt,Br=br*(re.tileID.canonical.x+re.tileID.wrap*qt),pr=br*re.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ye.tl,u_pattern_br_a:ye.br,u_pattern_tl_b:Ue.tl,u_pattern_br_b:Ue.br,u_texsize:[Qe,vt],u_mix:K.t,u_pattern_size_a:ye.displaySize,u_pattern_size_b:Ue.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/os(re,1,xe.transform.tileZoom),u_pixel_coord_upper:[Br>>16,pr>>16],u_pixel_coord_lower:[Br&65535,pr&65535]}}var Lf=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_lightpos:new e.Uniform3f(ge,K.u_lightpos),u_lightintensity:new e.Uniform1f(ge,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ge,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ge,K.u_vertical_gradient),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},nu=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_lightpos:new e.Uniform3f(ge,K.u_lightpos),u_lightintensity:new e.Uniform1f(ge,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ge,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ge,K.u_vertical_gradient),u_height_factor:new e.Uniform1f(ge,K.u_height_factor),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},Vf=function(ge,K,xe,re){var ye=K.style.light,Ue=ye.properties.get("position"),ke=[Ue.x,Ue.y,Ue.z],Qe=e.create$1();ye.properties.get("anchor")==="viewport"&&e.fromRotation(Qe,-K.transform.angle),e.transformMat3(ke,ke,Qe);var vt=ye.properties.get("color");return{u_matrix:ge,u_lightpos:ke,u_lightintensity:ye.properties.get("intensity"),u_lightcolor:[vt.r,vt.g,vt.b],u_vertical_gradient:+xe,u_opacity:re}},Xu=function(ge,K,xe,re,ye,Ue,ke){return e.extend(Vf(ge,K,xe,re),Wu(Ue,K,ke),{u_height_factor:-Math.pow(2,ye.overscaledZ)/ke.tileSize/8})},Cc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},gc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Vl=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world)}},xu=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world),u_image:new e.Uniform1i(ge,K.u_image),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Lc=function(ge){return{u_matrix:ge}},$c=function(ge,K,xe,re){return e.extend(Lc(ge),Wu(xe,K,re))},sc=function(ge,K){return{u_matrix:ge,u_world:K}},Pc=function(ge,K,xe,re,ye){return e.extend($c(ge,K,xe,re),{u_world:ye})},Qt=function(ge,K){return{u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(ge,K.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(ge,K.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},xr=function(ge,K,xe,re){var ye=ge.transform,Ue,ke;if(re.paint.get("circle-pitch-alignment")==="map"){var Qe=os(xe,1,ye.zoom);Ue=!0,ke=[Qe,Qe]}else Ue=!1,ke=ye.pixelsToGLUnits;return{u_camera_to_center_distance:ye.cameraToCenterDistance,u_scale_with_map:+(re.paint.get("circle-pitch-scale")==="map"),u_matrix:ge.translatePosMatrix(K.posMatrix,xe,re.paint.get("circle-translate"),re.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ue,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:ke}},aa=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(ge,K.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(ge,K.u_extrude_scale),u_overscale_factor:new e.Uniform1f(ge,K.u_overscale_factor)}},$r=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_inv_matrix:new e.UniformMatrix4f(ge,K.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(ge,K.u_viewport_size)}},ka=function(ge,K,xe){var re=os(xe,1,K.zoom),ye=Math.pow(2,K.zoom-xe.tileID.overscaledZ),Ue=xe.tileID.overscaleFactor();return{u_matrix:ge,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:re,u_extrude_scale:[K.pixelsToGLUnits[0]/(re*ye),K.pixelsToGLUnits[1]/(re*ye)],u_overscale_factor:Ue}},li=function(ge,K,xe){return{u_matrix:ge,u_inv_matrix:K,u_camera_to_center_distance:xe.cameraToCenterDistance,u_viewport_size:[xe.width,xe.height]}},Ci=function(ge,K){return{u_color:new e.UniformColor(ge,K.u_color),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_overlay:new e.Uniform1i(ge,K.u_overlay),u_overlay_scale:new e.Uniform1f(ge,K.u_overlay_scale)}},Hi=function(ge,K,xe){return xe===void 0&&(xe=1),{u_matrix:ge,u_color:K,u_overlay:0,u_overlay_scale:xe}},Qi=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},pn=function(ge){return{u_matrix:ge}},Pi=function(ge,K){return{u_extrude_scale:new e.Uniform1f(ge,K.u_extrude_scale),u_intensity:new e.Uniform1f(ge,K.u_intensity),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix)}},Di=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_world:new e.Uniform2f(ge,K.u_world),u_image:new e.Uniform1i(ge,K.u_image),u_color_ramp:new e.Uniform1i(ge,K.u_color_ramp),u_opacity:new e.Uniform1f(ge,K.u_opacity)}},Ni=function(ge,K,xe,re){return{u_matrix:ge,u_extrude_scale:os(K,1,xe),u_intensity:re}},mi=function(ge,K,xe,re){var ye=e.create();e.ortho(ye,0,ge.width,ge.height,0,0,1);var Ue=ge.context.gl;return{u_matrix:ye,u_world:[Ue.drawingBufferWidth,Ue.drawingBufferHeight],u_image:xe,u_color_ramp:re,u_opacity:K.paint.get("heatmap-opacity")}},Mn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_latrange:new e.Uniform2f(ge,K.u_latrange),u_light:new e.Uniform2f(ge,K.u_light),u_shadow:new e.UniformColor(ge,K.u_shadow),u_highlight:new e.UniformColor(ge,K.u_highlight),u_accent:new e.UniformColor(ge,K.u_accent)}},Qn=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_image:new e.Uniform1i(ge,K.u_image),u_dimension:new e.Uniform2f(ge,K.u_dimension),u_zoom:new e.Uniform1f(ge,K.u_zoom),u_unpack:new e.Uniform4f(ge,K.u_unpack)}},io=function(ge,K,xe){var re=xe.paint.get("hillshade-shadow-color"),ye=xe.paint.get("hillshade-highlight-color"),Ue=xe.paint.get("hillshade-accent-color"),ke=xe.paint.get("hillshade-illumination-direction")*(Math.PI/180);xe.paint.get("hillshade-illumination-anchor")==="viewport"&&(ke-=ge.transform.angle);var Qe=!ge.options.moving;return{u_matrix:ge.transform.calculatePosMatrix(K.tileID.toUnwrapped(),Qe),u_image:0,u_latrange:co(ge,K.tileID),u_light:[xe.paint.get("hillshade-exaggeration"),ke],u_shadow:re,u_highlight:ye,u_accent:Ue}},eo=function(ge,K){var xe=K.stride,re=e.create();return e.ortho(re,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(re,re,[0,-e.EXTENT,0]),{u_matrix:re,u_image:1,u_dimension:[xe,xe],u_zoom:ge.overscaledZ,u_unpack:K.getUnpackVector()}};function co(ge,K){var xe=Math.pow(2,K.canonical.z),re=K.canonical.y;return[new e.MercatorCoordinate(0,re/xe).toLngLat().lat,new e.MercatorCoordinate(0,(re+1)/xe).toLngLat().lat]}var An=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels)}},un=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_image:new e.Uniform1i(ge,K.u_image),u_image_height:new e.Uniform1f(ge,K.u_image_height)}},yo=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_image:new e.Uniform1i(ge,K.u_image),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_scale:new e.Uniform3f(ge,K.u_scale),u_fade:new e.Uniform1f(ge,K.u_fade)}},Qo=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_ratio:new e.Uniform1f(ge,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ge,K.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(ge,K.u_patternscale_a),u_patternscale_b:new e.Uniform2f(ge,K.u_patternscale_b),u_sdfgamma:new e.Uniform1f(ge,K.u_sdfgamma),u_image:new e.Uniform1i(ge,K.u_image),u_tex_y_a:new e.Uniform1f(ge,K.u_tex_y_a),u_tex_y_b:new e.Uniform1f(ge,K.u_tex_y_b),u_mix:new e.Uniform1f(ge,K.u_mix)}},ks=function(ge,K,xe){var re=ge.transform;return{u_matrix:Fl(ge,K,xe),u_ratio:1/os(K,1,re.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/re.pixelsToGLUnits[0],1/re.pixelsToGLUnits[1]]}},rl=function(ge,K,xe,re){return e.extend(ks(ge,K,xe),{u_image:0,u_image_height:re})},Ns=function(ge,K,xe,re){var ye=ge.transform,Ue=Ss(K,ye);return{u_matrix:Fl(ge,K,xe),u_texsize:K.imageAtlasTexture.size,u_ratio:1/os(K,1,ye.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[Ue,re.fromScale,re.toScale],u_fade:re.t,u_units_to_pixels:[1/ye.pixelsToGLUnits[0],1/ye.pixelsToGLUnits[1]]}},el=function(ge,K,xe,re,ye){var Ue=ge.transform,ke=ge.lineAtlas,Qe=Ss(K,Ue),vt=xe.layout.get("line-cap")==="round",qt=ke.getDash(re.from,vt),br=ke.getDash(re.to,vt),Br=qt.width*ye.fromScale,pr=br.width*ye.toScale;return e.extend(ks(ge,K,xe),{u_patternscale_a:[Qe/Br,-qt.height/2],u_patternscale_b:[Qe/pr,-br.height/2],u_sdfgamma:ke.width/(Math.min(Br,pr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:qt.y,u_tex_y_b:br.y,u_mix:ye.t})};function Ss(ge,K){return 1/os(ge,1,K.tileZoom)}function Fl(ge,K,xe){return ge.translatePosMatrix(K.tileID.posMatrix,K,xe.paint.get("line-translate"),xe.paint.get("line-translate-anchor"))}var yl=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_tl_parent:new e.Uniform2f(ge,K.u_tl_parent),u_scale_parent:new e.Uniform1f(ge,K.u_scale_parent),u_buffer_scale:new e.Uniform1f(ge,K.u_buffer_scale),u_fade_t:new e.Uniform1f(ge,K.u_fade_t),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_image0:new e.Uniform1i(ge,K.u_image0),u_image1:new e.Uniform1i(ge,K.u_image1),u_brightness_low:new e.Uniform1f(ge,K.u_brightness_low),u_brightness_high:new e.Uniform1f(ge,K.u_brightness_high),u_saturation_factor:new e.Uniform1f(ge,K.u_saturation_factor),u_contrast_factor:new e.Uniform1f(ge,K.u_contrast_factor),u_spin_weights:new e.Uniform3f(ge,K.u_spin_weights)}},ll=function(ge,K,xe,re,ye){return{u_matrix:ge,u_tl_parent:K,u_scale_parent:xe,u_buffer_scale:1,u_fade_t:re.mix,u_opacity:re.opacity*ye.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ye.paint.get("raster-brightness-min"),u_brightness_high:ye.paint.get("raster-brightness-max"),u_saturation_factor:Js(ye.paint.get("raster-saturation")),u_contrast_factor:Ro(ye.paint.get("raster-contrast")),u_spin_weights:Un(ye.paint.get("raster-hue-rotate"))}};function Un(ge){ge*=Math.PI/180;var K=Math.sin(ge),xe=Math.cos(ge);return[(2*xe+1)/3,(-Math.sqrt(3)*K-xe+1)/3,(Math.sqrt(3)*K-xe+1)/3]}function Ro(ge){return ge>0?1/(1-ge):1+ge}function Js(ge){return ge>0?1-1/(1.001-ge):-ge}var Fs=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texture:new e.Uniform1i(ge,K.u_texture)}},cu=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texture:new e.Uniform1i(ge,K.u_texture),u_gamma_scale:new e.Uniform1f(ge,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ge,K.u_is_halo)}},Iu=function(ge,K){return{u_is_size_zoom_constant:new e.Uniform1i(ge,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ge,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ge,K.u_size_t),u_size:new e.Uniform1f(ge,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ge,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ge,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ge,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ge,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ge,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ge,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ge,K.u_coord_matrix),u_is_text:new e.Uniform1i(ge,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ge,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_texsize_icon:new e.Uniform2f(ge,K.u_texsize_icon),u_texture:new e.Uniform1i(ge,K.u_texture),u_texture_icon:new e.Uniform1i(ge,K.u_texture_icon),u_gamma_scale:new e.Uniform1f(ge,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ge,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ge,K.u_is_halo)}},Zu=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt){var br=ye.transform;return{u_is_size_zoom_constant:+(ge==="constant"||ge==="source"),u_is_size_feature_constant:+(ge==="constant"||ge==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:br.cameraToCenterDistance,u_pitch:br.pitch/360*2*Math.PI,u_rotate_symbol:+xe,u_aspect_ratio:br.width/br.height,u_fade_change:ye.options.fadeDuration?ye.symbolFadeChange:1,u_matrix:Ue,u_label_plane_matrix:ke,u_coord_matrix:Qe,u_is_text:+vt,u_pitch_with_map:+re,u_texsize:qt,u_texture:0}},Ic=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt,br){var Br=ye.transform;return e.extend(Zu(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt),{u_gamma_scale:re?Math.cos(Br._pitch)*Br.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+br})},bu=function(ge,K,xe,re,ye,Ue,ke,Qe,vt,qt){return e.extend(Ic(ge,K,xe,re,ye,Ue,ke,Qe,!0,vt,!0),{u_texsize_icon:qt,u_texture_icon:1})},Rc=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_color:new e.UniformColor(ge,K.u_color)}},Au=function(ge,K){return{u_matrix:new e.UniformMatrix4f(ge,K.u_matrix),u_opacity:new e.Uniform1f(ge,K.u_opacity),u_image:new e.Uniform1i(ge,K.u_image),u_pattern_tl_a:new e.Uniform2f(ge,K.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(ge,K.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(ge,K.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(ge,K.u_pattern_br_b),u_texsize:new e.Uniform2f(ge,K.u_texsize),u_mix:new e.Uniform1f(ge,K.u_mix),u_pattern_size_a:new e.Uniform2f(ge,K.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(ge,K.u_pattern_size_b),u_scale_a:new e.Uniform1f(ge,K.u_scale_a),u_scale_b:new e.Uniform1f(ge,K.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(ge,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ge,K.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(ge,K.u_tile_units_to_pixels)}},yc=function(ge,K,xe){return{u_matrix:ge,u_opacity:K,u_color:xe}},fo=function(ge,K,xe,re,ye,Ue){return e.extend(Jc(re,Ue,xe,ye),{u_matrix:ge,u_opacity:K})},Fo={fillExtrusion:Lf,fillExtrusionPattern:nu,fill:Cc,fillPattern:gc,fillOutline:Vl,fillOutlinePattern:xu,circle:Qt,collisionBox:aa,collisionCircle:$r,debug:Ci,clippingMask:Qi,heatmap:Pi,heatmapTexture:Di,hillshade:Mn,hillshadePrepare:Qn,line:An,lineGradient:un,linePattern:yo,lineSDF:Qo,raster:yl,symbolIcon:Fs,symbolSDF:cu,symbolTextAndIcon:Iu,background:Rc,backgroundPattern:Au},Dc;function lc(ge,K,xe,re,ye,Ue,ke){for(var Qe=ge.context,vt=Qe.gl,qt=ge.useProgram("collisionBox"),br=[],Br=0,pr=0,mt=0;mt0){var lr=e.create(),Wt=hr;e.mul(lr,rr.placementInvProjMatrix,ge.transform.glCoordMatrix),e.mul(lr,lr,rr.placementViewportMatrix),br.push({circleArray:dr,circleOffset:pr,transform:Wt,invTransform:lr}),Br+=dr.length/4,pr=Br}sr&&qt.draw(Qe,vt.LINES,Ra.disabled,Ca.disabled,ge.colorModeForRenderPass(),Fr.disabled,ka(hr,ge.transform,Ft),xe.id,sr.layoutVertexBuffer,sr.indexBuffer,sr.segments,null,ge.transform.zoom,null,null,sr.collisionVertexBuffer)}}if(!(!ke||!br.length)){var ir=ge.useProgram("collisionCircle"),Gt=new e.StructArrayLayout2f1f2i16;Gt.resize(Br*4),Gt._trim();for(var Dr=0,Jr=0,ya=br;Jr=0&&(Mt[rr.associatedIconIndex]={shiftedAnchor:ii,angle:Zi})}}if(br){mt.clear();for(var ui=ge.icon.placedSymbolArray,_i=0;_i0){var ke=e.browser.now(),Qe=(ke-ge.timeAdded)/Ue,vt=K?(ke-K.timeAdded)/Ue:-1,qt=xe.getSource(),br=ye.coveringZoomLevel({tileSize:qt.tileSize,roundZoom:qt.roundZoom}),Br=!K||Math.abs(K.tileID.overscaledZ-br)>Math.abs(ge.tileID.overscaledZ-br),pr=Br&&ge.refreshedUponExpiration?1:e.clamp(Br?Qe:1-vt,0,1);return ge.refreshedUponExpiration&&Qe>=1&&(ge.refreshedUponExpiration=!1),K?{opacity:1,mix:1-pr}:{opacity:pr,mix:0}}else return{opacity:1,mix:0}}function Er(ge,K,xe){var re=xe.paint.get("background-color"),ye=xe.paint.get("background-opacity");if(ye!==0){var Ue=ge.context,ke=Ue.gl,Qe=ge.transform,vt=Qe.tileSize,qt=xe.paint.get("background-pattern");if(!ge.isPatternMissing(qt)){var br=!qt&&re.a===1&&ye===1&&ge.opaquePassEnabledForLayer()?"opaque":"translucent";if(ge.renderPass===br){var Br=Ca.disabled,pr=ge.depthModeForSublayer(0,br==="opaque"?Ra.ReadWrite:Ra.ReadOnly),mt=ge.colorModeForRenderPass(),Mt=ge.useProgram(qt?"backgroundPattern":"background"),Ft=Qe.coveringTiles({tileSize:vt});qt&&(Ue.activeTexture.set(ke.TEXTURE0),ge.imageManager.bind(ge.context));for(var rr=xe.getCrossfadeParameters(),hr=0,sr=Ft;hr "+xe.overscaledZ);var hr=rr+" "+mt+"kb";Ao(ge,hr),ke.draw(re,ye.TRIANGLES,Qe,vt,Rt.alphaBlended,Fr.disabled,Hi(Ue,e.Color.transparent,Ft),br,ge.debugBuffer,ge.quadTriangleIndexBuffer,ge.debugSegments)}function Ao(ge,K){ge.initDebugOverlayCanvas();var xe=ge.debugOverlayCanvas,re=ge.context.gl,ye=ge.debugOverlayCanvas.getContext("2d");ye.clearRect(0,0,xe.width,xe.height),ye.shadowColor="white",ye.shadowBlur=2,ye.lineWidth=1.5,ye.strokeStyle="white",ye.textBaseline="top",ye.font="bold 36px Open Sans, sans-serif",ye.fillText(K,5,5),ye.strokeText(K,5,5),ge.debugOverlayTexture.update(xe),ge.debugOverlayTexture.bind(re.LINEAR,re.CLAMP_TO_EDGE)}function ls(ge,K,xe){var re=ge.context,ye=xe.implementation;if(ge.renderPass==="offscreen"){var Ue=ye.prerender;Ue&&(ge.setCustomLayerDefaults(),re.setColorMode(ge.colorModeForRenderPass()),Ue.call(ye,re.gl,ge.transform.customLayerMatrix()),re.setDirty(),ge.setBaseState())}else if(ge.renderPass==="translucent"){ge.setCustomLayerDefaults(),re.setColorMode(ge.colorModeForRenderPass()),re.setStencilMode(Ca.disabled);var ke=ye.renderingMode==="3d"?new Ra(ge.context.gl.LEQUAL,Ra.ReadWrite,ge.depthRangeFor3D):ge.depthModeForSublayer(0,Ra.ReadOnly);re.setDepthMode(ke),ye.render(re.gl,ge.transform.customLayerMatrix()),re.setDirty(),ge.setBaseState(),re.bindFramebuffer.set(null)}}var Mo={symbol:I,circle:Ot,heatmap:$t,line:na,fill:qe,"fill-extrusion":lt,hillshade:Et,raster:ur,background:Er,debug:Kn,custom:ls},Yo=function(K,xe){this.context=new ta(K),this.transform=xe,this._tileTextures={},this.setup(),this.numSublayers=ra.maxUnderzooming+ra.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ks,this.gpuTimers={}};Yo.prototype.resize=function(K,xe){if(this.width=K*e.browser.devicePixelRatio,this.height=xe*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var re=0,ye=this.style._order;re256&&this.clearStencil(),re.setColorMode(Rt.disabled),re.setDepthMode(Ra.disabled);var Ue=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ke=0,Qe=xe;ke256&&this.clearStencil();var K=this.nextStencilID++,xe=this.context.gl;return new Ca({func:xe.NOTEQUAL,mask:255},K,255,xe.KEEP,xe.KEEP,xe.REPLACE)},Yo.prototype.stencilModeForClipping=function(K){var xe=this.context.gl;return new Ca({func:xe.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,xe.KEEP,xe.KEEP,xe.REPLACE)},Yo.prototype.stencilConfigForOverlap=function(K){var xe,re=this.context.gl,ye=K.sort(function(qt,br){return br.overscaledZ-qt.overscaledZ}),Ue=ye[ye.length-1].overscaledZ,ke=ye[0].overscaledZ-Ue+1;if(ke>1){this.currentStencilSource=void 0,this.nextStencilID+ke>256&&this.clearStencil();for(var Qe={},vt=0;vt=0;this.currentLayer--){var lr=this.style._layers[ye[this.currentLayer]],Wt=Ue[lr.source],ir=vt[lr.source];this._renderTileClippingMasks(lr,ir),this.renderLayer(this,Wt,lr,ir)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?xe.pop():null},Yo.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var xe=this.imageManager.getPattern(K.from.toString()),re=this.imageManager.getPattern(K.to.toString());return!xe||!re},Yo.prototype.useProgram=function(K,xe){this.cache=this.cache||{};var re=""+K+(xe?xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[re]||(this.cache[re]=new gf(this.context,K,uf[K],xe,Fo[K],this._showOverdrawInspector)),this.cache[re]},Yo.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()},Yo.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Yo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Yo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ds=function(K,xe){this.points=K,this.planes=xe};ds.fromInvProjectionMatrix=function(K,xe,re){var ye=[[-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]],Ue=Math.pow(2,re),ke=ye.map(function(qt){return e.transformMat4([],qt,K)}).map(function(qt){return e.scale$1([],qt,1/qt[3]/xe*Ue)}),Qe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],vt=Qe.map(function(qt){var br=e.sub([],ke[qt[0]],ke[qt[1]]),Br=e.sub([],ke[qt[2]],ke[qt[1]]),pr=e.normalize([],e.cross([],br,Br)),mt=-e.dot(pr,ke[qt[1]]);return pr.concat(mt)});return new ds(ke,vt)};var ul=function(K,xe){this.min=K,this.max=xe,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ul.prototype.quadrant=function(K){for(var xe=[K%2===0,K<2],re=e.clone$2(this.min),ye=e.clone$2(this.max),Ue=0;Ue=0;if(ke===0)return 0;ke!==xe.length&&(re=!1)}if(re)return 2;for(var vt=0;vt<3;vt++){for(var qt=Number.MAX_VALUE,br=-Number.MAX_VALUE,Br=0;Brthis.max[vt]-this.min[vt])return 0}return 1};var tl=function(K,xe,re,ye){if(K===void 0&&(K=0),xe===void 0&&(xe=0),re===void 0&&(re=0),ye===void 0&&(ye=0),isNaN(K)||K<0||isNaN(xe)||xe<0||isNaN(re)||re<0||isNaN(ye)||ye<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=xe,this.left=re,this.right=ye};tl.prototype.interpolate=function(K,xe,re){return xe.top!=null&&K.top!=null&&(this.top=e.number(K.top,xe.top,re)),xe.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,xe.bottom,re)),xe.left!=null&&K.left!=null&&(this.left=e.number(K.left,xe.left,re)),xe.right!=null&&K.right!=null&&(this.right=e.number(K.right,xe.right,re)),this},tl.prototype.getCenter=function(K,xe){var re=e.clamp((this.left+K-this.right)/2,0,K),ye=e.clamp((this.top+xe-this.bottom)/2,0,xe);return new e.Point(re,ye)},tl.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},tl.prototype.clone=function(){return new tl(this.top,this.bottom,this.left,this.right)},tl.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var es=function(K,xe,re,ye,Ue){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ue===void 0?!0:Ue,this._minZoom=K||0,this._maxZoom=xe||22,this._minPitch=re??0,this._maxPitch=ye??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 tl,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 K=new es(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},ts.minZoom.get=function(){return this._minZoom},ts.minZoom.set=function(ge){this._minZoom!==ge&&(this._minZoom=ge,this.zoom=Math.max(this.zoom,ge))},ts.maxZoom.get=function(){return this._maxZoom},ts.maxZoom.set=function(ge){this._maxZoom!==ge&&(this._maxZoom=ge,this.zoom=Math.min(this.zoom,ge))},ts.minPitch.get=function(){return this._minPitch},ts.minPitch.set=function(ge){this._minPitch!==ge&&(this._minPitch=ge,this.pitch=Math.max(this.pitch,ge))},ts.maxPitch.get=function(){return this._maxPitch},ts.maxPitch.set=function(ge){this._maxPitch!==ge&&(this._maxPitch=ge,this.pitch=Math.min(this.pitch,ge))},ts.renderWorldCopies.get=function(){return this._renderWorldCopies},ts.renderWorldCopies.set=function(ge){ge===void 0?ge=!0:ge===null&&(ge=!1),this._renderWorldCopies=ge},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(ge){var K=-e.wrap(ge,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,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(ge){var K=e.clamp(ge,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},ts.fov.get=function(){return this._fov/Math.PI*180},ts.fov.set=function(ge){ge=Math.max(.01,Math.min(60,ge)),this._fov!==ge&&(this._unmodified=!1,this._fov=ge/180*Math.PI,this._calcMatrices())},ts.zoom.get=function(){return this._zoom},ts.zoom.set=function(ge){var K=Math.min(Math.max(ge,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},ts.center.get=function(){return this._center},ts.center.set=function(ge){ge.lat===this._center.lat&&ge.lng===this._center.lng||(this._unmodified=!1,this._center=ge,this._constrain(),this._calcMatrices())},ts.padding.get=function(){return this._edgeInsets.toJSON()},ts.padding.set=function(ge){this._edgeInsets.equals(ge)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ge,1),this._calcMatrices())},ts.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},es.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},es.prototype.interpolatePadding=function(K,xe,re){this._unmodified=!1,this._edgeInsets.interpolate(K,xe,re),this._constrain(),this._calcMatrices()},es.prototype.coveringZoomLevel=function(K){var xe=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,xe)},es.prototype.getVisibleUnwrappedCoordinates=function(K){var xe=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var re=this.pointCoordinate(new e.Point(0,0)),ye=this.pointCoordinate(new e.Point(this.width,0)),Ue=this.pointCoordinate(new e.Point(this.width,this.height)),ke=this.pointCoordinate(new e.Point(0,this.height)),Qe=Math.floor(Math.min(re.x,ye.x,Ue.x,ke.x)),vt=Math.floor(Math.max(re.x,ye.x,Ue.x,ke.x)),qt=1,br=Qe-qt;br<=vt+qt;br++)br!==0&&xe.push(new e.UnwrappedTileID(br,K));return xe},es.prototype.coveringTiles=function(K){var xe=this.coveringZoomLevel(K),re=xe;if(K.minzoom!==void 0&&xeK.maxzoom&&(xe=K.maxzoom);var ye=e.MercatorCoordinate.fromLngLat(this.center),Ue=Math.pow(2,xe),ke=[Ue*ye.x,Ue*ye.y,0],Qe=ds.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,xe),vt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(vt=xe);var qt=3,br=function(Ga){return{aabb:new ul([Ga*Ue,0,0],[(Ga+1)*Ue,Ue,0]),zoom:0,x:0,y:0,wrap:Ga,fullyVisible:!1}},Br=[],pr=[],mt=xe,Mt=K.reparseOverscaled?re:xe;if(this._renderWorldCopies)for(var Ft=1;Ft<=3;Ft++)Br.push(br(-Ft)),Br.push(br(Ft));for(Br.push(br(0));Br.length>0;){var rr=Br.pop(),hr=rr.x,sr=rr.y,dr=rr.fullyVisible;if(!dr){var lr=rr.aabb.intersects(Qe);if(lr===0)continue;dr=lr===2}var Wt=rr.aabb.distanceX(ke),ir=rr.aabb.distanceY(ke),Gt=Math.max(Math.abs(Wt),Math.abs(ir)),Dr=qt+(1<Dr&&rr.zoom>=vt){pr.push({tileID:new e.OverscaledTileID(rr.zoom===mt?Mt:rr.zoom,rr.wrap,rr.zoom,hr,sr),distanceSq:e.sqrLen([ke[0]-.5-hr,ke[1]-.5-sr])});continue}for(var Jr=0;Jr<4;Jr++){var ya=(hr<<1)+Jr%2,vi=(sr<<1)+(Jr>>1);Br.push({aabb:rr.aabb.quadrant(Jr),zoom:rr.zoom+1,x:ya,y:vi,wrap:rr.wrap,fullyVisible:dr})}}return pr.sort(function(Ga,ii){return Ga.distanceSq-ii.distanceSq}).map(function(Ga){return Ga.tileID})},es.prototype.resize=function(K,xe){this.width=K,this.height=xe,this.pixelsToGLUnits=[2/K,-2/xe],this._constrain(),this._calcMatrices()},ts.unmodified.get=function(){return this._unmodified},es.prototype.zoomScale=function(K){return Math.pow(2,K)},es.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},es.prototype.project=function(K){var xe=e.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(K.lng)*this.worldSize,e.mercatorYfromLat(xe)*this.worldSize)},es.prototype.unproject=function(K){return new e.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},ts.point.get=function(){return this.project(this.center)},es.prototype.setLocationAtPoint=function(K,xe){var re=this.pointCoordinate(xe),ye=this.pointCoordinate(this.centerPoint),Ue=this.locationCoordinate(K),ke=new e.MercatorCoordinate(Ue.x-(re.x-ye.x),Ue.y-(re.y-ye.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())},es.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},es.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},es.prototype.locationCoordinate=function(K){return e.MercatorCoordinate.fromLngLat(K)},es.prototype.coordinateLocation=function(K){return K.toLngLat()},es.prototype.pointCoordinate=function(K){var xe=0,re=[K.x,K.y,0,1],ye=[K.x,K.y,1,1];e.transformMat4(re,re,this.pixelMatrixInverse),e.transformMat4(ye,ye,this.pixelMatrixInverse);var Ue=re[3],ke=ye[3],Qe=re[0]/Ue,vt=ye[0]/ke,qt=re[1]/Ue,br=ye[1]/ke,Br=re[2]/Ue,pr=ye[2]/ke,mt=Br===pr?0:(xe-Br)/(pr-Br);return new e.MercatorCoordinate(e.number(Qe,vt,mt)/this.worldSize,e.number(qt,br,mt)/this.worldSize)},es.prototype.coordinatePoint=function(K){var xe=[K.x*this.worldSize,K.y*this.worldSize,0,1];return e.transformMat4(xe,xe,this.pixelMatrix),new e.Point(xe[0]/xe[3],xe[1]/xe[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(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},es.prototype.calculatePosMatrix=function(K,xe){xe===void 0&&(xe=!1);var re=K.key,ye=xe?this._alignedPosMatrixCache:this._posMatrixCache;if(ye[re])return ye[re];var Ue=K.canonical,ke=this.worldSize/this.zoomScale(Ue.z),Qe=Ue.x+Math.pow(2,Ue.z)*K.wrap,vt=e.identity(new Float64Array(16));return e.translate(vt,vt,[Qe*ke,Ue.y*ke,0]),e.scale(vt,vt,[ke/e.EXTENT,ke/e.EXTENT,1]),e.multiply(vt,xe?this.alignedProjMatrix:this.projMatrix,vt),ye[re]=new Float32Array(vt),ye[re]},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 K=-90,xe=90,re=-180,ye=180,Ue,ke,Qe,vt,qt=this.size,br=this._unmodified;if(this.latRange){var Br=this.latRange;K=e.mercatorYfromLat(Br[1])*this.worldSize,xe=e.mercatorYfromLat(Br[0])*this.worldSize,Ue=xe-Kxe&&(vt=xe-rr)}if(this.lngRange){var hr=mt.x,sr=qt.x/2;hr-srye&&(Qe=ye-sr)}(Qe!==void 0||vt!==void 0)&&(this.center=this.unproject(new e.Point(Qe!==void 0?Qe:mt.x,vt!==void 0?vt:mt.y))),this._unmodified=br,this._constraining=!1}},es.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,xe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var re=Math.PI/2+this._pitch,ye=this._fov*(.5+xe.y/this.height),Ue=Math.sin(ye)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-re-ye,.01,Math.PI-.01)),ke=this.point,Qe=ke.x,vt=ke.y,qt=Math.cos(Math.PI/2-this._pitch)*Ue+this.cameraToCenterDistance,br=qt*1.01,Br=this.height/50,pr=new Float64Array(16);e.perspective(pr,this._fov,this.width/this.height,Br,br),pr[8]=-xe.x*2/this.width,pr[9]=xe.y*2/this.height,e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[0,0,-this.cameraToCenterDistance]),e.rotateX(pr,pr,this._pitch),e.rotateZ(pr,pr,this.angle),e.translate(pr,pr,[-Qe,-vt,0]),this.mercatorMatrix=e.scale([],pr,[this.worldSize,this.worldSize,this.worldSize]),e.scale(pr,pr,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=pr,this.invProjMatrix=e.invert([],this.projMatrix);var mt=this.width%2/2,Mt=this.height%2/2,Ft=Math.cos(this.angle),rr=Math.sin(this.angle),hr=Qe-Math.round(Qe)+Ft*mt+rr*Mt,sr=vt-Math.round(vt)+Ft*Mt+rr*mt,dr=new Float64Array(pr);if(e.translate(dr,dr,[hr>.5?hr-1:hr,sr>.5?sr-1:sr,0]),this.alignedProjMatrix=dr,pr=e.create(),e.scale(pr,pr,[this.width/2,-this.height/2,1]),e.translate(pr,pr,[1,-1,0]),this.labelPlaneMatrix=pr,pr=e.create(),e.scale(pr,pr,[1,-1,1]),e.translate(pr,pr,[-1,-1,0]),e.scale(pr,pr,[2/this.width,2/this.height,1]),this.glCoordMatrix=pr,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),pr=e.invert(new Float64Array(16),this.pixelMatrix),!pr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=pr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},es.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new e.Point(0,0)),xe=[K.x*this.worldSize,K.y*this.worldSize,0,1],re=e.transformMat4(xe,xe,this.pixelMatrix);return re[3]/this.cameraToCenterDistance},es.prototype.getCameraPoint=function(){var K=this._pitch,xe=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,xe))},es.prototype.getCameraQueryGeometry=function(K){var xe=this.getCameraPoint();if(K.length===1)return[K[0],xe];for(var re=xe.x,ye=xe.y,Ue=xe.x,ke=xe.y,Qe=0,vt=K;Qe=3&&!K.some(function(re){return isNaN(re)})){var xe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:xe,pitch:+(K[4]||0)}),!0}return!1},tu.prototype._updateHashUnthrottled=function(){var K=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,K)}catch{}};var Ru={linearity:.3,easing:e.bezier(0,0,.3,1)},vu=e.extend({deceleration:2500,maxSpeed:1400},Ru),wl=e.extend({deceleration:20,maxSpeed:1400},Ru),fu=e.extend({deceleration:1e3,maxSpeed:360},Ru),uc=e.extend({deceleration:1e3,maxSpeed:90},Ru),Gl=function(K){this._map=K,this.clear()};Gl.prototype.clear=function(){this._inertiaBuffer=[]},Gl.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:K})},Gl.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,xe=e.browser.now(),re=160;K.length>0&&xe-K[0].time>re;)K.shift()},Gl.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var xe={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},re=0,ye=this._inertiaBuffer;re=this._clickTolerance||this._map.fire(new De(K.type,this._map,K))},yt.prototype.dblclick=function(K){return this._firePreventable(new De(K.type,this._map,K))},yt.prototype.mouseover=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.mouseout=function(K){this._map.fire(new De(K.type,this._map,K))},yt.prototype.touchstart=function(K){return this._firePreventable(new et(K.type,this._map,K))},yt.prototype.touchmove=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype.touchend=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype.touchcancel=function(K){this._map.fire(new et(K.type,this._map,K))},yt.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},yt.prototype.isEnabled=function(){return!0},yt.prototype.isActive=function(){return!1},yt.prototype.enable=function(){},yt.prototype.disable=function(){};var Tt=function(K){this._map=K};Tt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Tt.prototype.mousemove=function(K){this._map.fire(new De(K.type,this._map,K))},Tt.prototype.mousedown=function(){this._delayContextMenu=!0},Tt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new De("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Tt.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new De(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Tt.prototype.isEnabled=function(){return!0},Tt.prototype.isActive=function(){return!1},Tt.prototype.enable=function(){},Tt.prototype.disable=function(){};var tr=function(K,xe){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=xe.clickTolerance||1};tr.prototype.isEnabled=function(){return!!this._enabled},tr.prototype.isActive=function(){return!!this._active},tr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},tr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},tr.prototype.mousedown=function(K,xe){this.isEnabled()&&K.shiftKey&&K.button===0&&(r.disableDrag(),this._startPos=this._lastPos=xe,this._active=!0)},tr.prototype.mousemoveWindow=function(K,xe){if(this._active){var re=xe;if(!(this._lastPos.equals(re)||!this._box&&re.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),re.length===this.numTouches&&(this.centroid=_r(xe),this.touches=zt(re,xe)))},pa.prototype.touchmove=function(K,xe,re){if(!(this.aborted||!this.centroid)){var ye=zt(re,xe);for(var Ue in this.touches){var ke=this.touches[Ue],Qe=ye[Ue];(!Qe||Qe.dist(ke)>wa)&&(this.aborted=!0)}}},pa.prototype.touchend=function(K,xe,re){if((!this.centroid||K.timeStamp-this.startTime>Xr)&&(this.aborted=!0),re.length===0){var ye=!this.aborted&&this.centroid;if(this.reset(),ye)return ye}};var Ja=function(K){this.singleTap=new pa(K),this.numTaps=K.numTaps,this.reset()};Ja.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ja.prototype.touchstart=function(K,xe,re){this.singleTap.touchstart(K,xe,re)},Ja.prototype.touchmove=function(K,xe,re){this.singleTap.touchmove(K,xe,re)},Ja.prototype.touchend=function(K,xe,re){var ye=this.singleTap.touchend(K,xe,re);if(ye){var Ue=K.timeStamp-this.lastTime0&&(this._active=!0);var ye=zt(re,xe),Ue=new e.Point(0,0),ke=new e.Point(0,0),Qe=0;for(var vt in ye){var qt=ye[vt],br=this._touches[vt];br&&(Ue._add(qt),ke._add(qt.sub(br)),Qe++,ye[vt]=qt)}if(this._touches=ye,!(QeMath.abs(ge.x)}var mn=100,po=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ge.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(re){this._lastPoints=re,_l(re[0].sub(re[1]))&&(this._valid=!1)},K.prototype._move=function(re,ye,Ue){var ke=re[0].sub(this._lastPoints[0]),Qe=re[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ke,Qe,Ue.timeStamp),!!this._valid){this._lastPoints=re,this._active=!0;var vt=(ke.y+Qe.y)/2,qt=-.5;return{pitchDelta:vt*qt}}},K.prototype.gestureBeginsVertically=function(re,ye,Ue){if(this._valid!==void 0)return this._valid;var ke=2,Qe=re.mag()>=ke,vt=ye.mag()>=ke;if(!(!Qe&&!vt)){if(!Qe||!vt)return this._firstMove===void 0&&(this._firstMove=Ue),Ue-this._firstMove0==ye.y>0;return _l(re)&&_l(ye)&&qt}},K}(In),fs={panStep:100,bearingStep:15,pitchStep:10},ms=function(){var K=fs;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};ms.prototype.reset=function(){this._active=!1},ms.prototype.keydown=function(K){var xe=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var re=0,ye=0,Ue=0,ke=0,Qe=0;switch(K.keyCode){case 61:case 107:case 171:case 187:re=1;break;case 189:case 109:case 173:re=-1;break;case 37:K.shiftKey?ye=-1:(K.preventDefault(),ke=-1);break;case 39:K.shiftKey?ye=1:(K.preventDefault(),ke=1);break;case 38:K.shiftKey?Ue=1:(K.preventDefault(),Qe=-1);break;case 40:K.shiftKey?Ue=-1:(K.preventDefault(),Qe=1);break;default:return}return this._rotationDisabled&&(ye=0,Ue=0),{cameraAnimation:function(vt){var qt=vt.getZoom();vt.easeTo({duration:300,easeId:"keyboardHandler",easing:Tl,zoom:re?Math.round(qt)+re*(K.shiftKey?2:1):qt,bearing:vt.getBearing()+ye*xe._bearingStep,pitch:vt.getPitch()+Ue*xe._pitchStep,offset:[-ke*xe._panStep,-Qe*xe._panStep],center:vt.getCenter()},{originalEvent:K})}}}},ms.prototype.enable=function(){this._enabled=!0},ms.prototype.disable=function(){this._enabled=!1,this.reset()},ms.prototype.isEnabled=function(){return this._enabled},ms.prototype.isActive=function(){return this._active},ms.prototype.disableRotation=function(){this._rotationDisabled=!0},ms.prototype.enableRotation=function(){this._rotationDisabled=!1};function Tl(ge){return ge*(2-ge)}var Wl=4.000244140625,Su=1/100,Rl=1/450,_c=2,it=function(K,xe){this._map=K,this._el=K.getCanvasContainer(),this._handler=xe,this._delta=0,this._defaultZoomRate=Su,this._wheelZoomRate=Rl,e.bindAll(["_onTimeout"],this)};it.prototype.setZoomRate=function(K){this._defaultZoomRate=K},it.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},it.prototype.isEnabled=function(){return!!this._enabled},it.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},it.prototype.isZooming=function(){return!!this._zooming},it.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},it.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},it.prototype.wheel=function(K){if(this.isEnabled()){var xe=K.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,re=e.browser.now(),ye=re-(this._lastWheelEventTime||0);this._lastWheelEventTime=re,xe!==0&&xe%Wl===0?this._type="wheel":xe!==0&&Math.abs(xe)<4?this._type="trackpad":ye>400?(this._type=null,this._lastValue=xe,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(ye*xe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,xe+=this._lastValue)),K.shiftKey&&xe&&(xe=xe/4),this._type&&(this._lastWheelEvent=K,this._delta-=xe,this._active||this._start(K)),K.preventDefault()}},it.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},it.prototype._start=function(K){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 xe=r.mousePos(this._el,K);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(xe)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},it.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var xe=this._map.transform;if(this._delta!==0){var re=this._type==="wheel"&&Math.abs(this._delta)>Wl?this._wheelZoomRate:this._defaultZoomRate,ye=_c/(1+Math.exp(-Math.abs(this._delta*re)));this._delta<0&&ye!==0&&(ye=1/ye);var Ue=typeof this._targetZoom=="number"?xe.zoomScale(this._targetZoom):xe.scale;this._targetZoom=Math.min(xe.maxZoom,Math.max(xe.minZoom,xe.scaleZoom(Ue*ye))),this._type==="wheel"&&(this._startZoom=xe.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ke=typeof this._targetZoom=="number"?this._targetZoom:xe.zoom,Qe=this._startZoom,vt=this._easing,qt=!1,br;if(this._type==="wheel"&&Qe&&vt){var Br=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),pr=vt(Br);br=e.number(Qe,ke,pr),Br<1?this._frameId||(this._frameId=!0):qt=!0}else br=ke,qt=!0;return this._active=!0,qt&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!qt,zoomDelta:br-xe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},it.prototype._smoothOutEasing=function(K){var xe=e.ease;if(this._prevEase){var re=this._prevEase,ye=(e.browser.now()-re.start)/re.duration,Ue=re.easing(ye+.01)-re.easing(ye),ke=.27/Math.sqrt(Ue*Ue+1e-4)*.01,Qe=Math.sqrt(.27*.27-ke*ke);xe=e.bezier(ke,Qe,.25,1)}return this._prevEase={start:e.browser.now(),duration:K,easing:xe},xe},it.prototype.reset=function(){this._active=!1};var Xt=function(K,xe){this._clickZoom=K,this._tapZoom=xe};Xt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Xt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Xt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Xt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var fr=function(){this.reset()};fr.prototype.reset=function(){this._active=!1},fr.prototype.dblclick=function(K,xe){return K.preventDefault(),{cameraAnimation:function(re){re.easeTo({duration:300,zoom:re.getZoom()+(K.shiftKey?-1:1),around:re.unproject(xe)},{originalEvent:K})}}},fr.prototype.enable=function(){this._enabled=!0},fr.prototype.disable=function(){this._enabled=!1,this.reset()},fr.prototype.isEnabled=function(){return this._enabled},fr.prototype.isActive=function(){return this._active};var oa=function(){this._tap=new Ja({numTouches:1,numTaps:1}),this.reset()};oa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},oa.prototype.touchstart=function(K,xe,re){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?re.length>0&&(this._swipePoint=xe[0],this._swipeTouch=re[0].identifier):this._tap.touchstart(K,xe,re))},oa.prototype.touchmove=function(K,xe,re){if(!this._tapTime)this._tap.touchmove(K,xe,re);else if(this._swipePoint){if(re[0].identifier!==this._swipeTouch)return;var ye=xe[0],Ue=ye.y-this._swipePoint.y;return this._swipePoint=ye,K.preventDefault(),this._active=!0,{zoomDelta:Ue/128}}},oa.prototype.touchend=function(K,xe,re){if(this._tapTime)this._swipePoint&&re.length===0&&this.reset();else{var ye=this._tap.touchend(K,xe,re);ye&&(this._tapTime=K.timeStamp)}},oa.prototype.touchcancel=function(){this.reset()},oa.prototype.enable=function(){this._enabled=!0},oa.prototype.disable=function(){this._enabled=!1,this.reset()},oa.prototype.isEnabled=function(){return this._enabled},oa.prototype.isActive=function(){return this._active};var Ta=function(K,xe,re){this._el=K,this._mousePan=xe,this._touchPan=re};Ta.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ta.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ta.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ta.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ma=function(K,xe,re){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=xe,this._mousePitch=re};ma.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ma.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ma.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ma.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var xa=function(K,xe,re,ye){this._el=K,this._touchZoom=xe,this._touchRotate=re,this._tapDragZoom=ye,this._rotationDisabled=!1,this._enabled=!0};xa.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},xa.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},xa.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},xa.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},xa.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},xa.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ya=function(ge){return ge.zoom||ge.drag||ge.pitch||ge.rotate},bi=function(ge){function K(){ge.apply(this,arguments)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K}(e.Event);function yi(ge){return ge.panDelta&&ge.panDelta.mag()||ge.zoomDelta||ge.bearingDelta||ge.pitchDelta}var si=function(K,xe){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Gl(K),this._bearingSnap=xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(xe),e.bindAll(["handleEvent","handleWindowEvent"],this);var re=this._el;this._listeners=[[re,"touchstart",{passive:!0}],[re,"touchmove",{passive:!1}],[re,"touchend",void 0],[re,"touchcancel",void 0],[re,"mousedown",void 0],[re,"mousemove",void 0],[re,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[re,"mouseover",void 0],[re,"mouseout",void 0],[re,"dblclick",void 0],[re,"click",void 0],[re,"keydown",{capture:!1}],[re,"keyup",void 0],[re,"wheel",{passive:!1}],[re,"contextmenu",void 0],[e.window,"blur",void 0]];for(var ye=0,Ue=this._listeners;yeQe?Math.min(2,Wt):Math.max(.5,Wt),Ga=Math.pow(vi,1-Jr),ii=ke.unproject(dr.add(lr.mult(Jr*Ga)).mult(ya));ke.setLocationAtPoint(ke.renderWorldCopies?ii.wrap():ii,rr)}Ue._fireMoveEvents(ye)},function(Jr){Ue._afterEase(ye,Jr)},re),this},K.prototype._prepareEase=function(re,ye,Ue){Ue===void 0&&(Ue={}),this._moving=!0,!ye&&!Ue.moving&&this.fire(new e.Event("movestart",re)),this._zooming&&!Ue.zooming&&this.fire(new e.Event("zoomstart",re)),this._rotating&&!Ue.rotating&&this.fire(new e.Event("rotatestart",re)),this._pitching&&!Ue.pitching&&this.fire(new e.Event("pitchstart",re))},K.prototype._fireMoveEvents=function(re){this.fire(new e.Event("move",re)),this._zooming&&this.fire(new e.Event("zoom",re)),this._rotating&&this.fire(new e.Event("rotate",re)),this._pitching&&this.fire(new e.Event("pitch",re))},K.prototype._afterEase=function(re,ye){if(!(this._easeId&&ye&&this._easeId===ye)){delete this._easeId;var Ue=this._zooming,ke=this._rotating,Qe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ue&&this.fire(new e.Event("zoomend",re)),ke&&this.fire(new e.Event("rotateend",re)),Qe&&this.fire(new e.Event("pitchend",re)),this.fire(new e.Event("moveend",re))}},K.prototype.flyTo=function(re,ye){var Ue=this;if(!re.essential&&e.browser.prefersReducedMotion){var ke=e.pick(re,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ke,ye)}this.stop(),re=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},re);var Qe=this.transform,vt=this.getZoom(),qt=this.getBearing(),br=this.getPitch(),Br=this.getPadding(),pr="zoom"in re?e.clamp(+re.zoom,Qe.minZoom,Qe.maxZoom):vt,mt="bearing"in re?this._normalizeBearing(re.bearing,qt):qt,Mt="pitch"in re?+re.pitch:br,Ft="padding"in re?re.padding:Qe.padding,rr=Qe.zoomScale(pr-vt),hr=e.Point.convert(re.offset),sr=Qe.centerPoint.add(hr),dr=Qe.pointLocation(sr),lr=e.LngLat.convert(re.center||dr);this._normalizeCenter(lr);var Wt=Qe.project(dr),ir=Qe.project(lr).sub(Wt),Gt=re.curve,Dr=Math.max(Qe.width,Qe.height),Jr=Dr/rr,ya=ir.mag();if("minZoom"in re){var vi=e.clamp(Math.min(re.minZoom,vt,pr),Qe.minZoom,Qe.maxZoom),Ga=Dr/Qe.zoomScale(vi-vt);Gt=Math.sqrt(Ga/ya*2)}var ii=Gt*Gt;function Zi(Oo){var Cs=(Jr*Jr-Dr*Dr+(Oo?-1:1)*ii*ii*ya*ya)/(2*(Oo?Jr:Dr)*ii*ya);return Math.log(Math.sqrt(Cs*Cs+1)-Cs)}function Fi(Oo){return(Math.exp(Oo)-Math.exp(-Oo))/2}function ui(Oo){return(Math.exp(Oo)+Math.exp(-Oo))/2}function _i(Oo){return Fi(Oo)/ui(Oo)}var Si=Zi(0),Ui=function(Oo){return ui(Si)/ui(Si+Gt*Oo)},fn=function(Oo){return Dr*((ui(Si)*_i(Si+Gt*Oo)-Fi(Si))/ii)/ya},_o=(Zi(1)-Si)/Gt;if(Math.abs(ya)<1e-6||!isFinite(_o)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(re,ye);var Uo=Jrre.maxDuration&&(re.duration=0),this._zooming=!0,this._rotating=qt!==mt,this._pitching=Mt!==br,this._padding=!Qe.isPaddingEqual(Ft),this._prepareEase(ye,!1),this._ease(function(Oo){var Cs=Oo*_o,Ys=1/Ui(Cs);Qe.zoom=Oo===1?pr:vt+Qe.scaleZoom(Ys),Ue._rotating&&(Qe.bearing=e.number(qt,mt,Oo)),Ue._pitching&&(Qe.pitch=e.number(br,Mt,Oo)),Ue._padding&&(Qe.interpolatePadding(Br,Ft,Oo),sr=Qe.centerPoint.add(hr));var mu=Oo===1?lr:Qe.unproject(Wt.add(ir.mult(fn(Cs))).mult(Ys));Qe.setLocationAtPoint(Qe.renderWorldCopies?mu.wrap():mu,sr),Ue._fireMoveEvents(ye)},function(){return Ue._afterEase(ye)},re),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(re,ye){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ue=this._onEaseEnd;delete this._onEaseEnd,Ue.call(this,ye)}if(!re){var ke=this.handlers;ke&&ke.stop(!1)}return this},K.prototype._ease=function(re,ye,Ue){Ue.animate===!1||Ue.duration===0?(re(1),ye()):(this._easeStart=e.browser.now(),this._easeOptions=Ue,this._onEaseFrame=re,this._onEaseEnd=ye,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var re=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(re)),re<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(re,ye){re=e.wrap(re,-180,180);var Ue=Math.abs(re-ye);return Math.abs(re-360-ye)180?-360:Ue<-180?360:0}},K}(e.Evented),zi=function(K){K===void 0&&(K={}),this.options=K,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};zi.prototype.getDefaultPosition=function(){return"bottom-right"},zi.prototype.onAdd=function(K){var xe=this.options&&this.options.compact;return this._map=K,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"),xe&&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),xe===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},zi.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},zi.prototype._setElementTitle=function(K,xe){var re=this._map._getUIString("AttributionControl."+xe);K.title=re,K.setAttribute("aria-label",re)},zi.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"))},zi.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var xe=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(K){var re=xe.reduce(function(ye,Ue,ke){return Ue.value&&(ye+=Ue.key+"="+Ue.value+(ke=0)return!1;return!0});var Qe=K.join(" | ");Qe!==this._attribHTML&&(this._attribHTML=Qe,K.length?(this._innerContainer.innerHTML=Qe,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},zi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Ei=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Ei.prototype.onAdd=function(K){this._map=K,this._container=r.create("div","mapboxgl-ctrl");var xe=r.create("a","mapboxgl-ctrl-logo");return xe.target="_blank",xe.rel="noopener nofollow",xe.href="https://www.mapbox.com/",xe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),xe.setAttribute("rel","noopener nofollow"),this._container.appendChild(xe),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ei.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ei.prototype.getDefaultPosition=function(){return"bottom-left"},Ei.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Ei.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var xe in K){var re=K[xe].getSource();if(re.mapbox_logo)return!0}return!1}},Ei.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var xe=K[0];this._map.getCanvasContainer().offsetWidth<250?xe.classList.add("mapboxgl-compact"):xe.classList.remove("mapboxgl-compact")}};var Na=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Na.prototype.add=function(K){var xe=++this._id,re=this._queue;return re.push({callback:K,id:xe,cancelled:!1}),xe},Na.prototype.remove=function(K){for(var xe=this._currentlyRunning,re=xe?this._queue.concat(xe):this._queue,ye=0,Ue=re;yere.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(re.minPitch!=null&&re.maxPitch!=null&&re.minPitch>re.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(re.minPitch!=null&&re.minPitchhn)throw new Error("maxPitch must be less than or equal to "+hn);var Ue=new es(re.minZoom,re.maxZoom,re.minPitch,re.maxPitch,re.renderWorldCopies);if(ge.call(this,Ue,re),this._interactive=re.interactive,this._maxTileCacheSize=re.maxTileCacheSize,this._failIfMajorPerformanceCaveat=re.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=re.preserveDrawingBuffer,this._antialias=re.antialias,this._trackResize=re.trackResize,this._bearingSnap=re.bearingSnap,this._refreshExpiredTiles=re.refreshExpiredTiles,this._fadeDuration=re.fadeDuration,this._crossSourceCollisions=re.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=re.collectResourceTiming,this._renderTaskQueue=new Na,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ea,re.locale),this._clickTolerance=re.clickTolerance,this._requestManager=new e.RequestManager(re.transformRequest,re.accessToken),typeof re.container=="string"){if(this._container=e.window.document.getElementById(re.container),!this._container)throw new Error("Container '"+re.container+"' not found.")}else if(re.container instanceof Qa)this._container=re.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(re.maxBounds&&this.setMaxBounds(re.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 ye._update(!1)}),this.on("moveend",function(){return ye._update(!1)}),this.on("zoom",function(){return ye._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 si(this,re);var ke=typeof re.hash=="string"&&re.hash||void 0;this._hash=re.hash&&new tu(ke).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:re.center,zoom:re.zoom,bearing:re.bearing,pitch:re.pitch}),re.bounds&&(this.resize(),this.fitBounds(re.bounds,e.extend({},re.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=re.localIdeographFontFamily,re.style&&this.setStyle(re.style,{localIdeographFontFamily:re.localIdeographFontFamily}),re.attributionControl&&this.addControl(new zi({customAttribution:re.customAttribution})),this.addControl(new Ei,re.logoPosition),this.on("style.load",function(){ye.transform.unmodified&&ye.jumpTo(ye.style.stylesheet)}),this.on("data",function(Qe){ye._update(Qe.dataType==="style"),ye.fire(new e.Event(Qe.dataType+"data",Qe))}),this.on("dataloading",function(Qe){ye.fire(new e.Event(Qe.dataType+"dataloading",Qe))})}ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K;var xe={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(ye,Ue){if(Ue===void 0&&(ye.getDefaultPosition?Ue=ye.getDefaultPosition():Ue="top-right"),!ye||!ye.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 ke=ye.onAdd(this);this._controls.push(ye);var Qe=this._controlPositions[Ue];return Ue.indexOf("bottom")!==-1?Qe.insertBefore(ke,Qe.firstChild):Qe.appendChild(ke),this},K.prototype.removeControl=function(ye){if(!ye||!ye.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 Ue=this._controls.indexOf(ye);return Ue>-1&&this._controls.splice(Ue,1),ye.onRemove(this),this},K.prototype.hasControl=function(ye){return this._controls.indexOf(ye)>-1},K.prototype.resize=function(ye){var Ue=this._containerDimensions(),ke=Ue[0],Qe=Ue[1];this._resizeCanvas(ke,Qe),this.transform.resize(ke,Qe),this.painter.resize(ke,Qe);var vt=!this._moving;return vt&&(this.stop(),this.fire(new e.Event("movestart",ye)).fire(new e.Event("move",ye))),this.fire(new e.Event("resize",ye)),vt&&this.fire(new e.Event("moveend",ye)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(ye){return this.transform.setMaxBounds(e.LngLatBounds.convert(ye)),this._update()},K.prototype.setMinZoom=function(ye){if(ye=ye??Va,ye>=Va&&ye<=this.transform.maxZoom)return this.transform.minZoom=ye,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ye,this._update(),this.getZoom()>ye&&this.setZoom(ye),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(ye){if(ye=ye??Li,ye=Li&&ye<=this.transform.maxPitch)return this.transform.minPitch=ye,this._update(),this.getPitch()hn)throw new Error("maxPitch must be less than or equal to "+hn);if(ye>=this.transform.minPitch)return this.transform.maxPitch=ye,this._update(),this.getPitch()>ye&&this.setPitch(ye),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(ye){return this.transform.renderWorldCopies=ye,this._update()},K.prototype.project=function(ye){return this.transform.locationPoint(e.LngLat.convert(ye))},K.prototype.unproject=function(ye){return this.transform.pointLocation(e.Point.convert(ye))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(ye,Ue,ke){var Qe=this,vt;if(ye==="mouseenter"||ye==="mouseover"){var qt=!1,br=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length?qt||(qt=!0,ke.call(Qe,new De(ye,Qe,rr.originalEvent,{features:hr}))):qt=!1},Br=function(){qt=!1};return{layer:Ue,listener:ke,delegates:{mousemove:br,mouseout:Br}}}else if(ye==="mouseleave"||ye==="mouseout"){var pr=!1,mt=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length?pr=!0:pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))},Mt=function(rr){pr&&(pr=!1,ke.call(Qe,new De(ye,Qe,rr.originalEvent)))};return{layer:Ue,listener:ke,delegates:{mousemove:mt,mouseout:Mt}}}else{var Ft=function(rr){var hr=Qe.getLayer(Ue)?Qe.queryRenderedFeatures(rr.point,{layers:[Ue]}):[];hr.length&&(rr.features=hr,ke.call(Qe,rr),delete rr.features)};return{layer:Ue,listener:ke,delegates:(vt={},vt[ye]=Ft,vt)}}},K.prototype.on=function(ye,Ue,ke){if(ke===void 0)return ge.prototype.on.call(this,ye,Ue);var Qe=this._createDelegatedListener(ye,Ue,ke);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ye]=this._delegatedListeners[ye]||[],this._delegatedListeners[ye].push(Qe);for(var vt in Qe.delegates)this.on(vt,Qe.delegates[vt]);return this},K.prototype.once=function(ye,Ue,ke){if(ke===void 0)return ge.prototype.once.call(this,ye,Ue);var Qe=this._createDelegatedListener(ye,Ue,ke);for(var vt in Qe.delegates)this.once(vt,Qe.delegates[vt]);return this},K.prototype.off=function(ye,Ue,ke){var Qe=this;if(ke===void 0)return ge.prototype.off.call(this,ye,Ue);var vt=function(qt){for(var br=qt[ye],Br=0;Br180;){var ke=xe.locationPoint(ge);if(ke.x>=0&&ke.y>=0&&ke.x<=xe.width&&ke.y<=xe.height)break;ge.lng>xe.center.lng?ge.lng-=360:ge.lng+=360}return ge}var vn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Rn(ge,K,xe){var re=ge.classList;for(var ye in vn)re.remove("mapboxgl-"+xe+"-anchor-"+ye);re.add("mapboxgl-"+xe+"-anchor-"+K)}var Ii=function(ge){function K(xe,re){if(ge.call(this),(xe instanceof e.window.HTMLElement||re)&&(xe=e.extend({element:xe},re)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=xe&&xe.anchor||"center",this._color=xe&&xe.color||"#3FB1CE",this._scale=xe&&xe.scale||1,this._draggable=xe&&xe.draggable||!1,this._clickTolerance=xe&&xe.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=xe&&xe.rotation||0,this._rotationAlignment=xe&&xe.rotationAlignment||"auto",this._pitchAlignment=xe&&xe.pitchAlignment&&xe.pitchAlignment!=="auto"?xe.pitchAlignment:this._rotationAlignment,!xe||!xe.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var ye=r.createNS("http://www.w3.org/2000/svg","svg"),Ue=41,ke=27;ye.setAttributeNS(null,"display","block"),ye.setAttributeNS(null,"height",Ue+"px"),ye.setAttributeNS(null,"width",ke+"px"),ye.setAttributeNS(null,"viewBox","0 0 "+ke+" "+Ue);var Qe=r.createNS("http://www.w3.org/2000/svg","g");Qe.setAttributeNS(null,"stroke","none"),Qe.setAttributeNS(null,"stroke-width","1"),Qe.setAttributeNS(null,"fill","none"),Qe.setAttributeNS(null,"fill-rule","evenodd");var vt=r.createNS("http://www.w3.org/2000/svg","g");vt.setAttributeNS(null,"fill-rule","nonzero");var qt=r.createNS("http://www.w3.org/2000/svg","g");qt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),qt.setAttributeNS(null,"fill","#000000");for(var br=[{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"}],Br=0,pr=br;Br=ye}this._isDragging&&(this._pos=re.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")))},K.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"},K.prototype._addDragHandler=function(re){this._element.contains(re.originalEvent.target)&&(re.preventDefault(),this._positionDelta=re.point.sub(this._pos).add(this._offset),this._pointerdownPos=re.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))},K.prototype.setDraggable=function(re){return this._draggable=!!re,this._map&&(re?(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},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(re){return this._rotation=re||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(re){return this._rotationAlignment=re||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(re){return this._pitchAlignment=re&&re!=="auto"?re:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(e.Evented),nn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ln;function Dn(ge){Ln!==void 0?ge(Ln):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Ln=K.state!=="denied",ge(Ln)}):(Ln=!!e.window.navigator.geolocation,ge(Ln))}var Wn=0,Os=!1,xl=function(ge){function K(xe){ge.call(this),this.options=e.extend({},nn,xe),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(re){return this._map=re,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Dn(this._setupUI),this._container},K.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,Wn=0,Os=!1},K.prototype._isOutOfMapMaxBounds=function(re){var ye=this._map.getMaxBounds(),Ue=re.coords;return ye&&(Ue.longitudeye.getEast()||Ue.latitudeye.getNorth())},K.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}},K.prototype._onSuccess=function(re){if(this._map){if(this._isOutOfMapMaxBounds(re)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",re)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=re,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(re),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(re),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",re)),this._finish()}},K.prototype._updateCamera=function(re){var ye=new e.LngLat(re.coords.longitude,re.coords.latitude),Ue=re.coords.accuracy,ke=this._map.getBearing(),Qe=e.extend({bearing:ke},this.options.fitBoundsOptions);this._map.fitBounds(ye.toBounds(Ue),Qe,{geolocateSource:!0})},K.prototype._updateMarker=function(re){if(re){var ye=new e.LngLat(re.coords.longitude,re.coords.latitude);this._accuracyCircleMarker.setLngLat(ye).addTo(this._map),this._userLocationDotMarker.setLngLat(ye).addTo(this._map),this._accuracy=re.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var re=this._map._container.clientHeight/2,ye=this._map.unproject([0,re]),Ue=this._map.unproject([1,re]),ke=ye.distanceTo(Ue),Qe=Math.ceil(2*this._accuracy/ke);this._circleElement.style.width=Qe+"px",this._circleElement.style.height=Qe+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(re){if(this._map){if(this.options.trackUserLocation)if(re.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 ye=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ye,this._geolocateButton.setAttribute("aria-label",ye),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(re.code===3&&Os)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",re)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(re){var ye=this;if(this._container.addEventListener("contextmenu",function(Qe){return Qe.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",re===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ue=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ue,this._geolocateButton.setAttribute("aria-label",Ue)}else{var ke=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ke,this._geolocateButton.setAttribute("aria-label",ke)}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 Ii(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ii({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(Qe){var vt=Qe.originalEvent&&Qe.originalEvent.type==="resize";!Qe.geolocateSource&&ye._watchState==="ACTIVE_LOCK"&&!vt&&(ye._watchState="BACKGROUND",ye._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ye._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ye.fire(new e.Event("trackuserlocationend")))})},K.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":Wn--,Os=!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"),Wn++;var re;Wn>1?(re={maximumAge:6e5,timeout:0},Os=!0):(re=this.options.positionOptions,Os=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,re)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.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)},K}(e.Evented),ho={maxWidth:100,unit:"metric"},Xl=function(K){this.options=e.extend({},ho,K),e.bindAll(["_onMove","setUnit"],this)};Xl.prototype.getDefaultPosition=function(){return"bottom-left"},Xl.prototype._onMove=function(){hs(this._map,this._container,this.options)},Xl.prototype.onAdd=function(K){return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Xl.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xl.prototype.setUnit=function(K){this.options.unit=K,hs(this._map,this._container,this.options)};function hs(ge,K,xe){var re=xe&&xe.maxWidth||100,ye=ge._container.clientHeight/2,Ue=ge.unproject([0,ye]),ke=ge.unproject([re,ye]),Qe=Ue.distanceTo(ke);if(xe&&xe.unit==="imperial"){var vt=3.2808*Qe;if(vt>5280){var qt=vt/5280;Al(K,re,qt,ge._getUIString("ScaleControl.Miles"))}else Al(K,re,vt,ge._getUIString("ScaleControl.Feet"))}else if(xe&&xe.unit==="nautical"){var br=Qe/1852;Al(K,re,br,ge._getUIString("ScaleControl.NauticalMiles"))}else Qe>=1e3?Al(K,re,Qe/1e3,ge._getUIString("ScaleControl.Kilometers")):Al(K,re,Qe,ge._getUIString("ScaleControl.Meters"))}function Al(ge,K,xe,re){var ye=ru(xe),Ue=ye/xe;ge.style.width=K*Ue+"px",ge.innerHTML=ye+" "+re}function El(ge){var K=Math.pow(10,Math.ceil(-Math.log(ge)/Math.LN10));return Math.round(ge*K)/K}function ru(ge){var K=Math.pow(10,(""+Math.floor(ge)).length-1),xe=ge/K;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:El(xe),K*xe}var js=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof e.window.HTMLElement?this._container=K.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")};js.prototype.onAdd=function(K){return this._map=K,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},js.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},js.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},js.prototype._setupUI=function(){var K=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},js.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},js.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},js.prototype._isFullscreen=function(){return this._fullscreen},js.prototype._changeIcon=function(){var K=e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},js.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(", "),Xn=function(ge){function K(xe){ge.call(this),this.options=e.extend(Object.create(pl),xe),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ge&&(K.__proto__=ge),K.prototype=Object.create(ge&&ge.prototype),K.prototype.constructor=K,K.prototype.addTo=function(re){return this._map&&this.remove(),this._map=re,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},K.prototype.isOpen=function(){return!!this._map},K.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},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(re){return this._lngLat=e.LngLat.convert(re),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},K.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},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(re){return this.setDOMContent(e.window.document.createTextNode(re))},K.prototype.setHTML=function(re){var ye=e.window.document.createDocumentFragment(),Ue=e.window.document.createElement("body"),ke;for(Ue.innerHTML=re;ke=Ue.firstChild,!!ke;)ye.appendChild(ke);return this.setDOMContent(ye)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(re){return this.options.maxWidth=re,this._update(),this},K.prototype.setDOMContent=function(re){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(re),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(re){this._container&&this._container.classList.add(re)},K.prototype.removeClassName=function(re){this._container&&this._container.classList.remove(re)},K.prototype.setOffset=function(re){return this.options.offset=re,this._update(),this},K.prototype.toggleClassName=function(re){if(this._container)return this._container.classList.toggle(re)},K.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="×",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(re){this._update(re.point)},K.prototype._onMouseMove=function(re){this._update(re.point)},K.prototype._onDrag=function(re){this._update(re.point)},K.prototype._update=function(re){var ye=this,Ue=this._lngLat||this._trackPointer;if(!(!this._map||!Ue||!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(mt){return ye._container.classList.add(mt)}),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=Xi(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!re))){var ke=this._pos=this._trackPointer&&re?re:this._map.project(this._lngLat),Qe=this.options.anchor,vt=kl(this.options.offset);if(!Qe){var qt=this._container.offsetWidth,br=this._container.offsetHeight,Br;ke.y+vt.bottom.ythis._map.transform.height-br?Br=["bottom"]:Br=[],ke.xthis._map.transform.width-qt/2&&Br.push("right"),Br.length===0?Qe="bottom":Qe=Br.join("-")}var pr=ke.add(vt[Qe]).round();r.setTransform(this._container,vn[Qe]+" translate("+pr.x+"px,"+pr.y+"px)"),Rn(this._container,Qe,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var re=this._container.querySelector(bl);re&&re.focus()}},K.prototype._onClose=function(){this.remove()},K}(e.Evented);function kl(ge){if(ge)if(typeof ge=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ge,2)));return{center:new e.Point(0,0),top:new e.Point(0,ge),"top-left":new e.Point(K,K),"top-right":new e.Point(-K,K),bottom:new e.Point(0,-ge),"bottom-left":new e.Point(K,-K),"bottom-right":new e.Point(-K,-K),left:new e.Point(ge,0),right:new e.Point(-ge,0)}}else if(ge instanceof e.Point||Array.isArray(ge)){var xe=e.Point.convert(ge);return{center:xe,top:xe,"top-left":xe,"top-right":xe,bottom:xe,"bottom-left":xe,"bottom-right":xe,left:xe,right:xe}}else return{center:e.Point.convert(ge.center||[0,0]),top:e.Point.convert(ge.top||[0,0]),"top-left":e.Point.convert(ge["top-left"]||[0,0]),"top-right":e.Point.convert(ge["top-right"]||[0,0]),bottom:e.Point.convert(ge.bottom||[0,0]),"bottom-left":e.Point.convert(ge["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(ge["bottom-right"]||[0,0]),left:e.Point.convert(ge.left||[0,0]),right:e.Point.convert(ge.right||[0,0])};else return kl(new e.Point(0,0))}var Io={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Ua,NavigationControl:Ti,GeolocateControl:xl,AttributionControl:zi,ScaleControl:Xl,FullscreenControl:js,Popup:Xn,Marker:Ii,Style:Ul,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:tn,clearPrewarmedResources:cn,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(ge){e.config.ACCESS_TOKEN=ge},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(ge){e.config.API_URL=ge},get workerCount(){return ri.workerCount},set workerCount(ge){ri.workerCount=ge},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ge){e.config.MAX_PARALLEL_IMAGE_REQUESTS=ge},clearStorage:function(K){e.clearTileCache(K)},workerUrl:""};return Io}),S})}}),_V=He({"src/plots/mapbox/layers.js"(Z,q){"use strict";var v=sa(),_=su().sanitizeHTML,S=E6(),M=nm();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;s0){for(var s=0;s0}function o(i){var n={},s={};switch(i.type){case"circle":v.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":v.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var h=i.symbol,f=S(h.textposition,h.iconsize);v.extendFlat(n,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":i.color,"text-color":h.textfont.color,"text-opacity":i.opacity});break;case"raster":v.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,h={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",h.tileSize=256):n==="image"&&(f="url",h.coordinates=i.coordinates),h[f]=s,i.sourceattribution&&(h.attribution=_(i.sourceattribution)),h}q.exports=function(n,s,h){var f=new e(n,s);return f.update(h),f}}}),xV=He({"src/plots/mapbox/mapbox.js"(Z,q){"use strict";var v=k6(),_=sa(),S=Ev(),M=so(),e=Wo(),t=Ap(),r=Hc(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,m=nm(),c=_V();function T(p,b){this.id=b,this.gd=p;var d=p._fullLayout,u=p._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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(p,b,d){var u=this,g=b[u.id];u.map&&g.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var y;u.map?y=new Promise(function(D,P){u.updateMap(p,b,D,P)}):y=new Promise(function(D,P){u.createMap(p,b,D,P)}),d.push(y)},l.createMap=function(p,b,d,u){var g=this,y=b[g.id],D=g.styleObj=w(y.style,b);g.accessToken=y.accesstoken;var P=y.bounds,z=P?[[P.west,P.south],[P.east,P.north]]:null,F=g.map=new v.Map({container:g.div,style:D.style,center:E(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!g.isStatic,preserveDrawingBuffer:g.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",g.rejectOnError(u),g.isStatic||g.initFx(p,b);var N=[];N.push(new Promise(function(O){F.once("load",O)})),N=N.concat(S.fetchTraceGeoData(p)),Promise.all(N).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.updateMap=function(p,b,d,u){var g=this,y=g.map,D=b[this.id];g.rejectOnError(u);var P=[],z=w(D.style,b);JSON.stringify(g.styleObj)!==JSON.stringify(z)&&(g.styleObj=z,y.setStyle(z.style),g.traceHash={},P.push(new Promise(function(F){y.once("styledata",F)}))),P=P.concat(S.fetchTraceGeoData(p)),Promise.all(P).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(p,b){var d=b[this.id],u=d.layers,g,y,D=this.belowLookup={},P=!1;for(g=0;g1)for(g=0;g-1&&f(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,P),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(p){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function g(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var y=p.dragmode,D;D=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[g([F.xmin,F.ymin]),g([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(g)}};var P=b.dragOptions;b.dragOptions=_.extendDeep(P||{},{dragmode:p.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:p[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:D},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),i(y)||a(y)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){n(z,F,N,b.dragOptions,y)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(p){var b=p[this.id].domain,d=p._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(p){var b=p[this.id],d=b.layers,u=this.layerList,g;if(d.length!==u.length){for(g=0;gN/2){var O=D.split("|").join("
");z.text(O).attr("data-unformatted",O).call(o.convertToTspans,c),F=r.bBox(z.node())}z.attr("transform",_(-3,-F.height+8)),P.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 L=1;F.width+6>N&&(L=N/(F.width+6));var U=[x.l+x.w*E.x[1],x.t+x.h*(1-E.y[0])];P.attr("transform",_(U[0],U[1])+S(L))}};function f(c,T){var l=c._fullLayout,x=c._context;if(x.mapboxAccessToken==="")return"";for(var w=[],A=[],E=!1,p=!1,b=0;b1&&v.warn(n.multipleTokensErrorMsg),w[0]):(A.length&&v.log(["Listed mapbox access token(s)",A.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function m(c){return typeof c=="string"&&(n.styleValuesMapbox.indexOf(c)!==-1||c.indexOf("mapbox://")===0||c.indexOf("stamen")===0)}Z.updateFx=function(c){for(var T=c._fullLayout,l=T._subplots[i],x=0;x=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=v(o),h=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,h),o[0].trace._glTrace=i,i}}}),MV=He({"src/traces/choroplethmapbox/index.js"(Z,q){"use strict";var v=["*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:AV(),colorbar:o0(),calc:lT(),plot:SV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(_,S){if(S){var M=S[0].trace;M._glTrace.updateOnSelect(S)}},getBelow:function(_,S){for(var M=S.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;r0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var p=M.extractOpts(a),b=p.reversescale?M.flipScale(p.colorscale):p.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),g=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=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 S(t,o.uid),i=a.sourceId,n=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),IV=He({"src/traces/densitymapbox/hover.js"(Z,q){"use strict";var v=Wo(),_=ST().hoverPoints,S=ST().getExtraText;q.exports=function(e,t,r){var o=_(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 h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),RV=He({"src/traces/densitymapbox/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_.z=S.z,_}}}),DV=He({"src/traces/densitymapbox/index.js"(Z,q){"use strict";var v=["*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:P6(),supplyDefaults:kV(),colorbar:o0(),formatLabels:M6(),calc:CV(),plot:PV(),hoverPoints:IV(),eventData:RV(),getBelow:function(_,S){for(var M=S.getMapLayers(),e=0;eESRI"},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} @@ -3210,8 +3210,8 @@ uniform `+br+" "+Br+" u_"+pr+`; {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"}}}),OV=He({"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 © ESRI"},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"}}]}}}),b0=He({"src/plots/map/constants.js"(Z,q){"use strict";var v=$m(),_=FV(),S=OV(),M='\xA9 OpenStreetMap 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:S,"satellite-streets":_,"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=v(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."}}}),kx=He({"src/plots/map/layout_attributes.js"(Z,q){"use strict";var v=sa(),_=$n().defaultLine,S=wc().attributes,M=tc(),e=af().textposition,t=pc().overrideAll,r=zl().templatedArray,o=b0(),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:[v.counterRegex("map",".layers",!0)],domain:S({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:_},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:_}},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:v.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");i.uirevision={valType:"any",editType:"none"}}}),ET=He({"src/traces/scattermap/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:_,templatefallbackAttrs:S}=$l(),M=$d(),e=vg(),t=af(),r=kx(),o=au(),a=ku(),i=rs().extendFlat,n=pc().overrideAll,s=kx(),h=e.line,f=e.marker;q.exports=n({lon:e.lon,lat:e.lat,cluster:{enabled:{valType:"boolean"},maxzoom:i({},s.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:i({},f.opacity,{dflt:1})},mode:i({},t.mode,{dflt:"markers"}),text:i({},t.text,{}),texttemplate:_({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:i({},t.hovertext,{}),line:{color:h.color,width:h.width},connectgaps:t.connectgaps,marker:i({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode},a("marker")),fill:e.fill,fillcolor:M(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:t.selected.marker},unselected:{marker:t.unselected.marker},hoverinfo:i({},o.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:S()},"calc","nested")}}),I6=He({"src/traces/scattermap/constants.js"(Z,q){"use strict";var v=["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(_){return v.indexOf(_)!==-1}}}}),BV=He({"src/traces/scattermap/defaults.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=md(),M=Dd(),e=zd(),t=ev(),r=ET(),o=I6().isSupportedFont;q.exports=function(n,s,h,f){function m(g,y){return v.coerce(n,s,r,g,y)}function c(g,y){return v.coerce2(n,s,r,g,y)}var T=a(n,s,m);if(!T){s.visible=!1;return}if(m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("mode"),m("below"),_.hasMarkers(s)){S(n,s,h,f,m,{noLine:!0,noAngle:!0}),m("marker.allowoverlap"),m("marker.angle");var l=s.marker;l.symbol!=="circle"&&(v.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),v.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}_.hasLines(s)&&(M(n,s,h,f,m,{noDash:!0}),m("connectgaps"));var x=c("cluster.maxzoom"),w=c("cluster.step"),A=c("cluster.color",s.marker&&s.marker.color||h),E=c("cluster.size"),p=c("cluster.opacity"),b=x!==!1||w!==!1||A!==!1||E!==!1||p!==!1,d=m("cluster.enabled",b);if(d||_.hasText(s)){var u=f.font.family;e(n,s,f,m,{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}})}m("fill"),s.fill!=="none"&&t(n,s,h,m),v.coerceSelectionMarkerOpacity(s,m)};function a(i,n,s){var h=s("lon")||[],f=s("lat")||[],m=Math.min(h.length,f.length);return n._length=m,m}}}),R6=He({"src/traces/scattermap/format_labels.js"(Z,q){"use strict";var v=Wo();q.exports=function(S,M,e){var t={},r=e[M.subplot]._subplot,o=r.mockAxis,a=S.lonlat;return t.lonLabel=v.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=v.tickText(o,o.c2l(a[1]),!0).text,t}}}),D6=He({"src/plots/map/convert_text_opts.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M){var e=S.split(" "),t=e[0],r=e[1],o=v.isArrayOrTypedArray(M)?v.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 h;return n[0]&&n[1]?h=n.join("-"):n[0]?h=n[0]:n[1]?h=n[1]:h="center",{anchor:h,offset:s}}}}),NV=He({"src/traces/scattermap/convert.js"(Z,q){"use strict";var v=ns(),_=sa(),S=Gs().BADNUM,M=g0(),e=rc(),t=as(),r=r1(),o=Fu(),a=I6().isSupportedFont,i=D6(),n=$p().appendArrayPointValue,s=su().NEWLINES,h=su().BR_TAG_ALL;q.exports=function(p,b){var d=b[0].trace,u=d.visible===!0&&d._length!==0,g=d.fill!=="none",y=o.hasLines(d),D=o.hasMarkers(d),P=o.hasText(d),z=D&&d.marker.symbol==="circle",F=D&&d.marker.symbol!=="circle",N=d.cluster&&d.cluster.enabled,O=f("fill"),L=f("line"),U=f("circle"),B=f("symbol"),W={fill:O,line:L,circle:U,symbol:B};if(!u)return W;var $;if((g||y)&&($=M.calcTraceToLineCoords(b)),g&&(O.geojson=M.makePolygon($),O.layout.visibility="visible",_.extendFlat(O.paint,{"fill-color":d.fillcolor})),y&&(L.geojson=M.makeLine($),L.layout.visibility="visible",_.extendFlat(L.paint,{"line-width":d.line.width,"line-color":d.line.color,"line-opacity":d.opacity})),z){var ue=m(b);U.geojson=ue.geojson,U.layout.visibility="visible",N&&(U.filter=["!",["has","point_count"]],W.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(d.cluster.color,d.cluster.step),"circle-radius":w(d.cluster.size,d.cluster.step),"circle-opacity":w(d.cluster.opacity,d.cluster.step)}},W.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(d),"text-size":12}}),_.extendFlat(U.paint,{"circle-color":ue.mcc,"circle-radius":ue.mrc,"circle-opacity":ue.mo})}if(z&&N&&(U.filter=["!",["has","point_count"]]),(F||P)&&(B.geojson=c(b,p),_.extendFlat(B.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(_.extendFlat(B.layout,{"icon-size":d.marker.size/10}),"angle"in d.marker&&d.marker.angle!=="auto"&&_.extendFlat(B.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),B.layout["icon-allow-overlap"]=d.marker.allowoverlap,_.extendFlat(B.paint,{"icon-opacity":d.opacity*d.marker.opacity,"icon-color":d.marker.color})),P)){var ce=(d.marker||{}).size,de=i(d.textposition,ce);_.extendFlat(B.layout,{"text-size":d.textfont.size,"text-anchor":de.anchor,"text-offset":de.offset,"text-font":A(d)}),_.extendFlat(B.paint,{"text-color":d.textfont.color,"text-opacity":d.opacity})}return W};function f(E){return{type:E,geojson:M.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function m(E){var p=E[0].trace,b=p.marker,d=p.selectedpoints,u=_.isArrayOrTypedArray(b.color),g=_.isArrayOrTypedArray(b.size),y=_.isArrayOrTypedArray(b.opacity),D;function P(ce){return p.opacity*ce}function z(ce){return ce/2}var F;u&&(e.hasColorscale(p,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=_.identity);var N;g&&(N=r(p));var O;y&&(O=function(ce){var de=v(ce)?+_.constrain(ce,0,1):0;return P(de)});var L=[];for(D=0;D850?D+=" Black":u>750?D+=" Extra Bold":u>650?D+=" Bold":u>550?D+=" Semi Bold":u>450?D+=" Medium":u>350?D+=" Regular":u>250?D+=" Light":u>150?D+=" Extra Light":D+=" Thin"):g.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",u>750?D+=" Extrabold":u>650?D+=" Bold":u>550?D+=" Semibold":u>350?D+=" Regular":D+=" Light"):g.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",g[3]==="CJK"&&(D+=" CJK"),D+=u>500?" Bold":" Regular")),y&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),a(D)||(D=b);var P=D.split(", ");return P}}}),UV=He({"src/traces/scattermap/plot.js"(Z,q){"use strict";var v=sa(),_=NV(),S=b0().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:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+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&&v.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,h=this.subplot.getMapLayers(),f=0;f=0;y--){var D=g[y];n.removeLayer(c.layerIds[D])}u||n.removeSource(c.sourceIds.circle)}function x(u){for(var g=M.nonCluster,y=0;y=0;y--){var D=g[y];n.removeLayer(c.layerIds[D]),u||n.removeSource(c.sourceIds[D])}}function A(u){m?l(u):w(u)}function E(u){f?T(u):x(u)}function p(){for(var u=f?M.cluster:M.nonCluster,g=0;g=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,h=new e(o,i.uid,n,s),f=_(o.gd,a),m=h.below=o.belowLookup["trace-"+i.uid],c,T,l;if(n)for(h.addSource("circle",f.circle,i.cluster),c=0;c=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=A*360,p=i-E;function b(N){var O=N.lonlat;if(O[0]===e||x&&T.indexOf(N.i+1)===-1)return 1/0;var L=_.modHalf(O[0],360),U=O[1],B=c.project([L,U]),W=B.x-f.c2p([p,U]),$=B.y-m.c2p([L,n]),ue=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-ue,1-3/ue)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,g=[_.modHalf(u[0],360)+E,u[1]],y=f.c2p(g),D=m.c2p(g),P=d.mrc||1;a.x0=y-P,a.x1=y+P,a.y0=D-P,a.y1=D+P;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=i.lonlat,l=[];function x(w){return w+"\xB0"}return f||m&&c?l.push("("+x(T[1])+", "+x(T[0])+")"):m?l.push(n.lon+x(T[0])):c&&l.push(n.lat+x(T[1])),(f||h.indexOf("text")!==-1)&&M(i,a,l),l.join("
")}q.exports={hoverPoints:r,getExtraText:o}}}),jV=He({"src/traces/scattermap/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_}}}),qV=He({"src/traces/scattermap/select.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=Gs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!_.hasMarkers(n))return[];if(t===!1)for(s=0;s1)return 1;for(var J=H,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-H;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(H,R){return this.sampleCurveY(this.solveCurveX(H,R))}};var h=r(n);let f,m;function c(){return f==null&&(f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),f}function T(){if(m==null&&(m=!1,c())){let R=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(R){for(let ve=0;ve<5*5;ve++){let Ee=4*ve;R.fillStyle=`rgb(${Ee},${Ee+1},${Ee+2})`,R.fillRect(ve%5,Math.floor(ve/5),1,1)}let J=R.getImageData(0,0,5,5).data;for(let ve=0;ve<5*5*4;ve++)if(ve%4!=3&&J[ve]!==ve){m=!0;break}}}return m||!1}function l(H,R,J,ve){let Ee=new h(H,R,J,ve);return Be=>Ee.solve(Be)}let x=l(.25,.1,.25,1);function w(H,R,J){return Math.min(J,Math.max(R,H))}function A(H,R,J){let ve=J-R,Ee=((H-R)%ve+ve)%ve+R;return Ee===R?J:Ee}function E(H,...R){for(let J of R)for(let ve in J)H[ve]=J[ve];return H}let p=1;function b(H,R,J){let ve={};for(let Ee in H)ve[Ee]=R.call(this,H[Ee],Ee,H);return ve}function d(H,R,J){let ve={};for(let Ee in H)R.call(this,H[Ee],Ee,H)&&(ve[Ee]=H[Ee]);return ve}function u(H){return Array.isArray(H)?H.map(u):typeof H=="object"&&H?b(H,u):H}let g={};function y(H){g[H]||(typeof console<"u"&&console.warn(H),g[H]=!0)}function D(H,R,J){return(J.y-H.y)*(R.x-H.x)>(R.y-H.y)*(J.x-H.x)}function P(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 N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(H,R,J,ve,Ee){return t(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Be=new VideoFrame(H,{timestamp:0});try{let Ge=Be?.format;if(!Ge||!Ge.startsWith("BGR")&&!Ge.startsWith("RGB"))throw new Error(`Unrecognized format ${Ge}`);let ct=Ge.startsWith("BGR"),At=new Uint8ClampedArray(ve*Ee*4);if(yield Be.copyTo(At,function(Nt,ar,Mr,zr,Wr){let ia=4*Math.max(-ar,0),fa=(Math.max(0,Mr)-Mr)*zr*4+ia,ja=4*zr,Ka=Math.max(0,ar),Wi=Math.max(0,Mr);return{rect:{x:Ka,y:Wi,width:Math.min(Nt.width,ar+zr)-Ka,height:Math.min(Nt.height,Mr+Wr)-Wi},layout:[{offset:fa,stride:ja}]}}(H,R,J,ve,Ee)),ct)for(let Nt=0;NtP(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,X=function(H,R){if(/:\/\//.test(H.url)&&!/^https?:|^file:/.test(H.url)){let ve=ue(H.url);if(ve)return ve(H,R);if(P(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,targetMapId:ce},R)}if(!(/^file:/.test(J=H.url)||/^file:/.test(Y())&&!/^\w+:/.test(J))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(ve,Ee){return t(this,void 0,void 0,function*(){let Be=new Request(ve.url,{method:ve.method||"GET",body:ve.body,credentials:ve.credentials,headers:ve.headers,cache:ve.cache,referrer:Y(),signal:Ee.signal});ve.type!=="json"||Be.headers.has("Accept")||Be.headers.set("Accept","application/json");let Ge=yield fetch(Be);if(!Ge.ok){let Nt=yield Ge.blob();throw new de(Ge.status,Ge.statusText,ve.url,Nt)}let ct;ct=ve.type==="arrayBuffer"||ve.type==="image"?Ge.arrayBuffer():ve.type==="json"?Ge.json():Ge.text();let At=yield ct;if(Ee.signal.aborted)throw W();return{data:At,cacheControl:Ge.headers.get("Cache-Control"),expires:Ge.headers.get("Expires")}})}(H,R);if(P(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,mustQueue:!0,targetMapId:ce},R)}var J;return function(ve,Ee){return new Promise((Be,Ge)=>{var ct;let At=new XMLHttpRequest;At.open(ve.method||"GET",ve.url,!0),ve.type!=="arrayBuffer"&&ve.type!=="image"||(At.responseType="arraybuffer");for(let Nt in ve.headers)At.setRequestHeader(Nt,ve.headers[Nt]);ve.type==="json"&&(At.responseType="text",!((ct=ve.headers)===null||ct===void 0)&&ct.Accept||At.setRequestHeader("Accept","application/json")),At.withCredentials=ve.credentials==="include",At.onerror=()=>{Ge(new Error(At.statusText))},At.onload=()=>{if(!Ee.signal.aborted)if((At.status>=200&&At.status<300||At.status===0)&&At.response!==null){let Nt=At.response;if(ve.type==="json")try{Nt=JSON.parse(At.response)}catch(ar){return void Ge(ar)}Be({data:Nt,cacheControl:At.getResponseHeader("Cache-Control"),expires:At.getResponseHeader("Expires")})}else{let Nt=new Blob([At.response],{type:At.getResponseHeader("Content-Type")});Ge(new de(At.status,At.statusText,ve.url,Nt))}},Ee.signal.addEventListener("abort",()=>{At.abort(),Ge(W())}),At.send(ve.body)})}(H,R)};function Q(H){if(!H||H.indexOf("://")<=0||H.indexOf("data:image/")===0||H.indexOf("blob:")===0)return!0;let R=new URL(H),J=window.location;return R.protocol===J.protocol&&R.host===J.host}function V(H,R,J){J[H]&&J[H].indexOf(R)!==-1||(J[H]=J[H]||[],J[H].push(R))}function le(H,R,J){if(J&&J[H]){let ve=J[H].indexOf(R);ve!==-1&&J[H].splice(ve,1)}}class ae{constructor(R,J={}){E(this,J),this.type=R}}class j extends ae{constructor(R,J={}){super("error",E({error:R},J))}}class ee{on(R,J){return this._listeners=this._listeners||{},V(R,J,this._listeners),this}off(R,J){return le(R,J,this._listeners),le(R,J,this._oneTimeListeners),this}once(R,J){return J?(this._oneTimeListeners=this._oneTimeListeners||{},V(R,J,this._oneTimeListeners),this):new Promise(ve=>this.once(R,ve))}fire(R,J){typeof R=="string"&&(R=new ae(R,J||{}));let ve=R.type;if(this.listens(ve)){R.target=this;let Ee=this._listeners&&this._listeners[ve]?this._listeners[ve].slice():[];for(let ct of Ee)ct.call(this,R);let Be=this._oneTimeListeners&&this._oneTimeListeners[ve]?this._oneTimeListeners[ve].slice():[];for(let ct of Be)le(ve,ct,this._oneTimeListeners),ct.call(this,R);let Ge=this._eventedParent;Ge&&(E(R,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ge.fire(R))}else R instanceof j&&console.error(R.error);return this}listens(R){return this._listeners&&this._listeners[R]&&this._listeners[R].length>0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)}setEventedParent(R,J){return this._eventedParent=R,this._eventedParentData=J,this}}var te={$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 pe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function we(H,R){let J={};for(let ve in H)ve!=="ref"&&(J[ve]=H[ve]);return pe.forEach(ve=>{ve in R&&(J[ve]=R[ve])}),J}function Se(H,R){if(Array.isArray(H)){if(!Array.isArray(R)||H.length!==R.length)return!1;for(let J=0;J`:H.itemType.kind==="value"?"array":`array<${R}>`}return H.kind}let Ae=[rt,Je,St,kt,Bt,qr,Vt,Fe(Ar),kr,Ur,_t];function Le(H,R){if(R.kind==="error")return null;if(H.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!Le(H.itemType,R.itemType))&&(typeof H.N!="number"||H.N===R.N))return null}else{if(H.kind===R.kind)return null;if(H.kind==="value"){for(let J of Ae)if(!Le(J,R))return null}}return`Expected ${Ye(H)} but found ${Ye(R)} instead.`}function We(H,R){return R.some(J=>J.kind===H.kind)}function Ke(H,R){return R.some(J=>J==="null"?H===null:J==="array"?Array.isArray(H):J==="object"?H&&!Array.isArray(H)&&typeof H=="object":J===typeof H)}function st(H,R){return H.kind==="array"&&R.kind==="array"?H.itemType.kind===R.itemType.kind&&typeof H.N=="number":H.kind===R.kind}let ot=.96422,Ut=.82521,Ct=4/29,Pt=6/29,jt=3*Pt*Pt,cr=Pt*Pt*Pt,or=Math.PI/180,nr=180/Math.PI;function Pr(H){return(H%=360)<0&&(H+=360),H}function _a([H,R,J,ve]){let Ee,Be,Ge=Ra((.2225045*(H=Fa(H))+.7168786*(R=Fa(R))+.0606169*(J=Fa(J)))/1);H===R&&R===J?Ee=Be=Ge:(Ee=Ra((.4360747*H+.3850649*R+.1430804*J)/ot),Be=Ra((.0139322*H+.0971045*R+.7141733*J)/Ut));let ct=116*Ge-16;return[ct<0?0:ct,500*(Ee-Ge),200*(Ge-Be),ve]}function Fa(H){return H<=.04045?H/12.92:Math.pow((H+.055)/1.055,2.4)}function Ra(H){return H>cr?Math.pow(H,1/3):H/jt+Ct}function qa([H,R,J,ve]){let Ee=(H+16)/116,Be=isNaN(R)?Ee:Ee+R/500,Ge=isNaN(J)?Ee:Ee-J/200;return Ee=1*Ca(Ee),Be=ot*Ca(Be),Ge=Ut*Ca(Ge),[Wa(3.1338561*Be-1.6168667*Ee-.4906146*Ge),Wa(-.9787684*Be+1.9161415*Ee+.033454*Ge),Wa(.0719453*Be-.2289914*Ee+1.4052427*Ge),ve]}function Wa(H){return(H=H<=.00304?12.92*H:1.055*Math.pow(H,1/2.4)-.055)<0?0:H>1?1:H}function Ca(H){return H>Pt?H*H*H:jt*(H-Ct)}function hi(H){return parseInt(H.padEnd(2,H),16)/255}function wi(H,R){return Yt(R?H/100:H,0,1)}function Yt(H,R,J){return Math.min(Math.max(R,H),J)}function Rt(H){return!H.some(Number.isNaN)}let Zt={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 Jt{constructor(R,J,ve,Ee=1,Be=!0){this.r=R,this.g=J,this.b=ve,this.a=Ee,Be||(this.r*=Ee,this.g*=Ee,this.b*=Ee,Ee||this.overwriteGetter("rgb",[R,J,ve,Ee]))}static parse(R){if(R instanceof Jt)return R;if(typeof R!="string")return;let J=function(ve){if((ve=ve.toLowerCase().trim())==="transparent")return[0,0,0,0];let Ee=Zt[ve];if(Ee){let[Ge,ct,At]=Ee;return[Ge/255,ct/255,At/255,1]}if(ve.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(ve)){let Ge=ve.length<6?1:2,ct=1;return[hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+Ge)||"ff")]}if(ve.startsWith("rgb")){let Ge=ve.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Ge){let[ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi]=Ge,gi=[ar||" ",Wr||" ",ja].join("");if(gi===" "||gi===" /"||gi===",,"||gi===",,,"){let qi=[Nt,zr,fa].join(""),en=qi==="%%%"?100:qi===""?255:0;if(en){let jn=[Yt(+At/en,0,1),Yt(+Mr/en,0,1),Yt(+ia/en,0,1),Ka?wi(+Ka,Wi):1];if(Rt(jn))return jn}}return}}let Be=ve.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Be){let[Ge,ct,At,Nt,ar,Mr,zr,Wr,ia]=Be,fa=[At||" ",ar||" ",zr].join("");if(fa===" "||fa===" /"||fa===",,"||fa===",,,"){let ja=[+ct,Yt(+Nt,0,100),Yt(+Mr,0,100),Wr?wi(+Wr,ia):1];if(Rt(ja))return function([Ka,Wi,gi,qi]){function en(jn){let Lo=(jn+Ka/30)%12,xs=Wi*Math.min(gi,1-gi);return gi-xs*Math.max(-1,Math.min(Lo-3,9-Lo,1))}return Ka=Pr(Ka),Wi/=100,gi/=100,[en(0),en(8),en(4),qi]}(ja)}}}(R);return J?new Jt(...J,!1):void 0}get rgb(){let{r:R,g:J,b:ve,a:Ee}=this,Be=Ee||1/0;return this.overwriteGetter("rgb",[R/Be,J/Be,ve/Be,Ee])}get hcl(){return this.overwriteGetter("hcl",function(R){let[J,ve,Ee,Be]=_a(R),Ge=Math.sqrt(ve*ve+Ee*Ee);return[Math.round(1e4*Ge)?Pr(Math.atan2(Ee,ve)*nr):NaN,Ge,J,Be]}(this.rgb))}get lab(){return this.overwriteGetter("lab",_a(this.rgb))}overwriteGetter(R,J){return Object.defineProperty(this,R,{value:J}),J}toString(){let[R,J,ve,Ee]=this.rgb;return`rgba(${[R,J,ve].map(Be=>Math.round(255*Be)).join(",")},${Ee})`}}Jt.black=new Jt(0,0,0,1),Jt.white=new Jt(1,1,1,1),Jt.transparent=new Jt(0,0,0,0),Jt.red=new Jt(1,0,0,1);class Fr{constructor(R,J,ve){this.sensitivity=R?J?"variant":"case":J?"accent":"base",this.locale=ve,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(R,J){return this.collator.compare(R,J)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ta{constructor(R,J,ve,Ee,Be){this.text=R,this.image=J,this.scale=ve,this.fontStack=Ee,this.textColor=Be}}class ra{constructor(R){this.sections=R}static fromString(R){return new ra([new ta(R,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(R=>R.text.length!==0||R.image&&R.image.name.length!==0)}static factory(R){return R instanceof ra?R:ra.fromString(R)}toString(){return this.sections.length===0?"":this.sections.map(R=>R.text).join("")}}class ca{constructor(R){this.values=R.slice()}static parse(R){if(R instanceof ca)return R;if(typeof R=="number")return new ca([R,R,R,R]);if(Array.isArray(R)&&!(R.length<1||R.length>4)){for(let J of R)if(typeof J!="number")return;switch(R.length){case 1:R=[R[0],R[0],R[0],R[0]];break;case 2:R=[R[0],R[1],R[0],R[1]];break;case 3:R=[R[0],R[1],R[2],R[1]]}return new ca(R)}}toString(){return JSON.stringify(this.values)}}let Ba=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class $a{constructor(R){this.values=R.slice()}static parse(R){if(R instanceof $a)return R;if(Array.isArray(R)&&!(R.length<1)&&R.length%2==0){for(let J=0;J=0&&H<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof J=="number"&&J>=0&&J<=255?ve===void 0||typeof ve=="number"&&ve>=0&&ve<=1?null:`Invalid rgba value [${[H,R,J,ve].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof ve=="number"?[H,R,J,ve]:[H,R,J]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pi(H){if(H===null||typeof H=="string"||typeof H=="boolean"||typeof H=="number"||H instanceof Jt||H instanceof Fr||H instanceof ra||H instanceof ca||H instanceof $a||H instanceof Za)return!0;if(Array.isArray(H)){for(let R of H)if(!pi(R))return!1;return!0}if(typeof H=="object"){for(let R in H)if(!pi(H[R]))return!1;return!0}return!1}function Ia(H){if(H===null)return rt;if(typeof H=="string")return St;if(typeof H=="boolean")return kt;if(typeof H=="number")return Je;if(H instanceof Jt)return Bt;if(H instanceof Fr)return vr;if(H instanceof ra)return qr;if(H instanceof ca)return kr;if(H instanceof $a)return _t;if(H instanceof Za)return Ur;if(Array.isArray(H)){let R=H.length,J;for(let ve of H){let Ee=Ia(ve);if(J){if(J===Ee)continue;J=Ar;break}J=Ee}return Fe(J||Ar,R)}return Vt}function rn(H){let R=typeof H;return H===null?"":R==="string"||R==="number"||R==="boolean"?String(H):H instanceof Jt||H instanceof ra||H instanceof ca||H instanceof $a||H instanceof Za?H.toString():JSON.stringify(H)}class tn{constructor(R,J){this.type=R,this.value=J}static parse(R,J){if(R.length!==2)return J.error(`'literal' expression requires exactly one argument, but found ${R.length-1} instead.`);if(!pi(R[1]))return J.error("invalid value");let ve=R[1],Ee=Ia(ve),Be=J.expectedType;return Ee.kind!=="array"||Ee.N!==0||!Be||Be.kind!=="array"||typeof Be.N=="number"&&Be.N!==0||(Ee=Be),new tn(Ee,ve)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class cn{constructor(R){this.name="ExpressionEvaluationError",this.message=R}toJSON(){return this.message}}let xt={string:St,number:Je,boolean:kt,object:Vt};class ut{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve,Ee=1,Be=R[0];if(Be==="array"){let ct,At;if(R.length>2){let Nt=R[1];if(typeof Nt!="string"||!(Nt in xt)||Nt==="object")return J.error('The item type argument of "array" must be one of string, number, boolean',1);ct=xt[Nt],Ee++}else ct=Ar;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return J.error('The length argument to "array" must be a positive integer literal',2);At=R[2],Ee++}ve=Fe(ct,At)}else{if(!xt[Be])throw new Error(`Types doesn't contain name = ${Be}`);ve=xt[Be]}let Ge=[];for(;EeR.outputDefined())}}let Or={"to-boolean":kt,"to-color":Bt,"to-number":Je,"to-string":St};class Cr{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve=R[0];if(!Or[ve])throw new Error(`Can't parse ${ve} as it is not part of the known types`);if((ve==="to-boolean"||ve==="to-string")&&R.length!==2)return J.error("Expected one argument.");let Ee=Or[ve],Be=[];for(let Ge=1;Ge4?`Invalid rbga value ${JSON.stringify(J)}: expected an array containing either three or four numeric values.`:ri(J[0],J[1],J[2],J[3]),!ve))return new Jt(J[0]/255,J[1]/255,J[2]/255,J[3])}throw new cn(ve||`Could not parse color from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"padding":{let J;for(let ve of this.args){J=ve.evaluate(R);let Ee=ca.parse(J);if(Ee)return Ee}throw new cn(`Could not parse padding from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"variableAnchorOffsetCollection":{let J;for(let ve of this.args){J=ve.evaluate(R);let Ee=$a.parse(J);if(Ee)return Ee}throw new cn(`Could not parse variableAnchorOffsetCollection from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"number":{let J=null;for(let ve of this.args){if(J=ve.evaluate(R),J===null)return 0;let Ee=Number(J);if(!isNaN(Ee))return Ee}throw new cn(`Could not convert ${JSON.stringify(J)} to number.`)}case"formatted":return ra.fromString(rn(this.args[0].evaluate(R)));case"resolvedImage":return Za.fromString(rn(this.args[0].evaluate(R)));default:return rn(this.args[0].evaluate(R))}}eachChild(R){this.args.forEach(R)}outputDefined(){return this.args.every(R=>R.outputDefined())}}let wr=["Unknown","Point","LineString","Polygon"];class Rr{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"?wr[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(R){let J=this._parseColorCache[R];return J||(J=this._parseColorCache[R]=Jt.parse(R)),J}}class Nr{constructor(R,J,ve=[],Ee,Be=new Ze,Ge=[]){this.registry=R,this.path=ve,this.key=ve.map(ct=>`[${ct}]`).join(""),this.scope=Be,this.errors=Ge,this.expectedType=Ee,this._isConstant=J}parse(R,J,ve,Ee,Be={}){return J?this.concat(J,ve,Ee)._parse(R,Be):this._parse(R,Be)}_parse(R,J){function ve(Ee,Be,Ge){return Ge==="assert"?new ut(Be,[Ee]):Ge==="coerce"?new Cr(Be,[Ee]):Ee}if(R!==null&&typeof R!="string"&&typeof R!="boolean"&&typeof R!="number"||(R=["literal",R]),Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Ee=R[0];if(typeof Ee!="string")return this.error(`Expression name must be a string, but found ${typeof Ee} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Be=this.registry[Ee];if(Be){let Ge=Be.parse(R,this);if(!Ge)return null;if(this.expectedType){let ct=this.expectedType,At=Ge.type;if(ct.kind!=="string"&&ct.kind!=="number"&&ct.kind!=="boolean"&&ct.kind!=="object"&&ct.kind!=="array"||At.kind!=="value")if(ct.kind!=="color"&&ct.kind!=="formatted"&&ct.kind!=="resolvedImage"||At.kind!=="value"&&At.kind!=="string")if(ct.kind!=="padding"||At.kind!=="value"&&At.kind!=="number"&&At.kind!=="array")if(ct.kind!=="variableAnchorOffsetCollection"||At.kind!=="value"&&At.kind!=="array"){if(this.checkSubtype(ct,At))return null}else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"assert")}if(!(Ge instanceof tn)&&Ge.type.kind!=="resolvedImage"&&this._isConstant(Ge)){let ct=new Rr;try{Ge=new tn(Ge.type,Ge.evaluate(ct))}catch(At){return this.error(At.message),null}}return Ge}return this.error(`Unknown expression "${Ee}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(R===void 0?"'undefined' value invalid. Use null instead.":typeof R=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof R} instead.`)}concat(R,J,ve){let Ee=typeof R=="number"?this.path.concat(R):this.path,Be=ve?this.scope.concat(ve):this.scope;return new Nr(this.registry,this._isConstant,Ee,J||null,Be,this.errors)}error(R,...J){let ve=`${this.key}${J.map(Ee=>`[${Ee}]`).join("")}`;this.errors.push(new Ce(ve,R))}checkSubtype(R,J){let ve=Le(R,J);return ve&&this.error(ve),ve}}class Hr{constructor(R,J){this.type=J.type,this.bindings=[].concat(R),this.result=J}evaluate(R){return this.result.evaluate(R)}eachChild(R){for(let J of this.bindings)R(J[1]);R(this.result)}static parse(R,J){if(R.length<4)return J.error(`Expected at least 3 arguments, but found ${R.length-1} instead.`);let ve=[];for(let Be=1;Be=ve.length)throw new cn(`Array index out of bounds: ${J} > ${ve.length-1}.`);if(J!==Math.floor(J))throw new cn(`Array index must be an integer, but found ${J} instead.`);return ve[J]}eachChild(R){R(this.index),R(this.input)}outputDefined(){return!1}}class mr{constructor(R,J){this.type=kt,this.needle=R,this.haystack=J}static parse(R,J){if(R.length!==3)return J.error(`Expected 2 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Ar);return ve&&Ee?We(ve.type,[kt,St,Je,rt,Ar])?new mr(ve,Ee):J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(ve.type)} instead`):null}evaluate(R){let J=this.needle.evaluate(R),ve=this.haystack.evaluate(R);if(!ve)return!1;if(!Ke(J,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ia(J))} instead.`);if(!Ke(ve,["string","array"]))throw new cn(`Expected second argument to be of type array or string, but found ${Ye(Ia(ve))} instead.`);return ve.indexOf(J)>=0}eachChild(R){R(this.needle),R(this.haystack)}outputDefined(){return!0}}class Ir{constructor(R,J,ve){this.type=Je,this.needle=R,this.haystack=J,this.fromIndex=ve}static parse(R,J){if(R.length<=2||R.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Ar);if(!ve||!Ee)return null;if(!We(ve.type,[kt,St,Je,rt,Ar]))return J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(ve.type)} instead`);if(R.length===4){let Be=J.parse(R[3],3,Je);return Be?new Ir(ve,Ee,Be):null}return new Ir(ve,Ee)}evaluate(R){let J=this.needle.evaluate(R),ve=this.haystack.evaluate(R);if(!Ke(J,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ia(J))} instead.`);let Ee;if(this.fromIndex&&(Ee=this.fromIndex.evaluate(R)),Ke(ve,["string"])){let Be=ve.indexOf(J,Ee);return Be===-1?-1:[...ve.slice(0,Be)].length}if(Ke(ve,["array"]))return ve.indexOf(J,Ee);throw new cn(`Expected second argument to be of type array or string, but found ${Ye(Ia(ve))} instead.`)}eachChild(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)}outputDefined(){return!1}}class va{constructor(R,J,ve,Ee,Be,Ge){this.inputType=R,this.type=J,this.input=ve,this.cases=Ee,this.outputs=Be,this.otherwise=Ge}static parse(R,J){if(R.length<5)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if(R.length%2!=1)return J.error("Expected an even number of arguments.");let ve,Ee;J.expectedType&&J.expectedType.kind!=="value"&&(Ee=J.expectedType);let Be={},Ge=[];for(let Nt=2;NtNumber.MAX_SAFE_INTEGER)return zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ia=="number"&&Math.floor(ia)!==ia)return zr.error("Numeric branch labels must be integer values.");if(ve){if(zr.checkSubtype(ve,Ia(ia)))return null}else ve=Ia(ia);if(Be[String(ia)]!==void 0)return zr.error("Branch labels must be unique.");Be[String(ia)]=Ge.length}let Wr=J.parse(Mr,Nt,Ee);if(!Wr)return null;Ee=Ee||Wr.type,Ge.push(Wr)}let ct=J.parse(R[1],1,Ar);if(!ct)return null;let At=J.parse(R[R.length-1],R.length-1,Ee);return At?ct.type.kind!=="value"&&J.concat(1).checkSubtype(ve,ct.type)?null:new va(ve,Ee,ct,Be,Ge,At):null}evaluate(R){let J=this.input.evaluate(R);return(Ia(J)===this.inputType&&this.outputs[this.cases[J]]||this.otherwise).evaluate(R)}eachChild(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)}outputDefined(){return this.outputs.every(R=>R.outputDefined())&&this.otherwise.outputDefined()}}class Pa{constructor(R,J,ve){this.type=R,this.branches=J,this.otherwise=ve}static parse(R,J){if(R.length<4)return J.error(`Expected at least 3 arguments, but found only ${R.length-1}.`);if(R.length%2!=0)return J.error("Expected an odd number of arguments.");let ve;J.expectedType&&J.expectedType.kind!=="value"&&(ve=J.expectedType);let Ee=[];for(let Ge=1;GeJ.outputDefined())&&this.otherwise.outputDefined()}}class ga{constructor(R,J,ve,Ee){this.type=R,this.input=J,this.beginIndex=ve,this.endIndex=Ee}static parse(R,J){if(R.length<=2||R.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Je);if(!ve||!Ee)return null;if(!We(ve.type,[Fe(Ar),St,Ar]))return J.error(`Expected first argument to be of type array or string, but found ${Ye(ve.type)} instead`);if(R.length===4){let Be=J.parse(R[3],3,Je);return Be?new ga(ve.type,ve,Ee,Be):null}return new ga(ve.type,ve,Ee)}evaluate(R){let J=this.input.evaluate(R),ve=this.beginIndex.evaluate(R),Ee;if(this.endIndex&&(Ee=this.endIndex.evaluate(R)),Ke(J,["string"]))return[...J].slice(ve,Ee).join("");if(Ke(J,["array"]))return J.slice(ve,Ee);throw new cn(`Expected first argument to be of type array or string, but found ${Ye(Ia(J))} instead.`)}eachChild(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)}outputDefined(){return!1}}function la(H,R){let J=H.length-1,ve,Ee,Be=0,Ge=J,ct=0;for(;Be<=Ge;)if(ct=Math.floor((Be+Ge)/2),ve=H[ct],Ee=H[ct+1],ve<=R){if(ct===J||RR))throw new cn("Input is not a number.");Ge=ct-1}return 0}class ba{constructor(R,J,ve){this.type=R,this.input=J,this.labels=[],this.outputs=[];for(let[Ee,Be]of ve)this.labels.push(Ee),this.outputs.push(Be)}static parse(R,J){if(R.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if((R.length-1)%2!=0)return J.error("Expected an even number of arguments.");let ve=J.parse(R[1],1,Je);if(!ve)return null;let Ee=[],Be=null;J.expectedType&&J.expectedType.kind!=="value"&&(Be=J.expectedType);for(let Ge=1;Ge=ct)return J.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Nt);let Mr=J.parse(At,ar,Be);if(!Mr)return null;Be=Be||Mr.type,Ee.push([ct,Mr])}return new ba(Be,ve,Ee)}evaluate(R){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(R);let Ee=this.input.evaluate(R);if(Ee<=J[0])return ve[0].evaluate(R);let Be=J.length;return Ee>=J[Be-1]?ve[Be-1].evaluate(R):ve[la(J,Ee)].evaluate(R)}eachChild(R){R(this.input);for(let J of this.outputs)R(J)}outputDefined(){return this.outputs.every(R=>R.outputDefined())}}function Ai(H){return H&&H.__esModule&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H}var ki=Ki;function Ki(H,R,J,ve){this.cx=3*H,this.bx=3*(J-H)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*R,this.by=3*(ve-R)-this.cy,this.ay=1-this.cy-this.by,this.p1x=H,this.p1y=R,this.p2x=J,this.p2y=ve}Ki.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,R){if(R===void 0&&(R=1e-6),H<0)return 0;if(H>1)return 1;for(var J=H,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-H;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(H,R){return this.sampleCurveY(this.solveCurveX(H,R))}};var Mn=Ai(ki);function wn(H,R,J){return H+J*(R-H)}function On(H,R,J){return H.map((ve,Ee)=>wn(ve,R[Ee],J))}let En={number:wn,color:function(H,R,J,ve="rgb"){switch(ve){case"rgb":{let[Ee,Be,Ge,ct]=On(H.rgb,R.rgb,J);return new Jt(Ee,Be,Ge,ct,!1)}case"hcl":{let[Ee,Be,Ge,ct]=H.hcl,[At,Nt,ar,Mr]=R.hcl,zr,Wr;if(isNaN(Ee)||isNaN(At))isNaN(Ee)?isNaN(At)?zr=NaN:(zr=At,Ge!==1&&Ge!==0||(Wr=Nt)):(zr=Ee,ar!==1&&ar!==0||(Wr=Be));else{let Wi=At-Ee;At>Ee&&Wi>180?Wi-=360:At180&&(Wi+=360),zr=Ee+J*Wi}let[ia,fa,ja,Ka]=function([Wi,gi,qi,en]){return Wi=isNaN(Wi)?0:Wi*or,qa([qi,Math.cos(Wi)*gi,Math.sin(Wi)*gi,en])}([zr,Wr??wn(Be,Nt,J),wn(Ge,ar,J),wn(ct,Mr,J)]);return new Jt(ia,fa,ja,Ka,!1)}case"lab":{let[Ee,Be,Ge,ct]=qa(On(H.lab,R.lab,J));return new Jt(Ee,Be,Ge,ct,!1)}}},array:On,padding:function(H,R,J){return new ca(On(H.values,R.values,J))},variableAnchorOffsetCollection:function(H,R,J){let ve=H.values,Ee=R.values;if(ve.length!==Ee.length)throw new cn(`Cannot interpolate values of different length. from: ${H.toString()}, to: ${R.toString()}`);let Be=[];for(let Ge=0;Getypeof ar!="number"||ar<0||ar>1))return J.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Ee={name:"cubic-bezier",controlPoints:Nt}}}if(R.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if((R.length-1)%2!=0)return J.error("Expected an even number of arguments.");if(Be=J.parse(Be,2,Je),!Be)return null;let ct=[],At=null;ve==="interpolate-hcl"||ve==="interpolate-lab"?At=Bt:J.expectedType&&J.expectedType.kind!=="value"&&(At=J.expectedType);for(let Nt=0;Nt=ar)return J.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',zr);let ia=J.parse(Mr,Wr,At);if(!ia)return null;At=At||ia.type,ct.push([ar,ia])}return st(At,Je)||st(At,Bt)||st(At,kr)||st(At,_t)||st(At,Fe(Je))?new ao(At,ve,Ee,Be,ct):J.error(`Type ${Ye(At)} is not interpolatable.`)}evaluate(R){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(R);let Ee=this.input.evaluate(R);if(Ee<=J[0])return ve[0].evaluate(R);let Be=J.length;if(Ee>=J[Be-1])return ve[Be-1].evaluate(R);let Ge=la(J,Ee),ct=ao.interpolationFactor(this.interpolation,Ee,J[Ge],J[Ge+1]),At=ve[Ge].evaluate(R),Nt=ve[Ge+1].evaluate(R);switch(this.operator){case"interpolate":return En[this.type.kind](At,Nt,ct);case"interpolate-hcl":return En.color(At,Nt,ct,"hcl");case"interpolate-lab":return En.color(At,Nt,ct,"lab")}}eachChild(R){R(this.input);for(let J of this.outputs)R(J)}outputDefined(){return this.outputs.every(R=>R.outputDefined())}}function Co(H,R,J,ve){let Ee=ve-J,Be=H-J;return Ee===0?0:R===1?Be/Ee:(Math.pow(R,Be)-1)/(Math.pow(R,Ee)-1)}class bo{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expectected at least one argument.");let ve=null,Ee=J.expectedType;Ee&&Ee.kind!=="value"&&(ve=Ee);let Be=[];for(let ct of R.slice(1)){let At=J.parse(ct,1+Be.length,ve,void 0,{typeAnnotation:"omit"});if(!At)return null;ve=ve||At.type,Be.push(At)}if(!ve)throw new Error("No output type");let Ge=Ee&&Be.some(ct=>Le(Ee,ct.type));return new bo(Ge?Ar:ve,Be)}evaluate(R){let J,ve=null,Ee=0;for(let Be of this.args)if(Ee++,ve=Be.evaluate(R),ve&&ve instanceof Za&&!ve.available&&(J||(J=ve.name),ve=null,Ee===this.args.length&&(ve=J)),ve!==null)break;return ve}eachChild(R){this.args.forEach(R)}outputDefined(){return this.args.every(R=>R.outputDefined())}}function zs(H,R){return H==="=="||H==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function kn(H,R,J,ve){return ve.compare(R,J)===0}function wo(H,R,J){let ve=H!=="=="&&H!=="!=";return class t7{constructor(Be,Ge,ct){this.type=kt,this.lhs=Be,this.rhs=Ge,this.collator=ct,this.hasUntypedArgument=Be.type.kind==="value"||Ge.type.kind==="value"}static parse(Be,Ge){if(Be.length!==3&&Be.length!==4)return Ge.error("Expected two or three arguments.");let ct=Be[0],At=Ge.parse(Be[1],1,Ar);if(!At)return null;if(!zs(ct,At.type))return Ge.concat(1).error(`"${ct}" comparisons are not supported for type '${Ye(At.type)}'.`);let Nt=Ge.parse(Be[2],2,Ar);if(!Nt)return null;if(!zs(ct,Nt.type))return Ge.concat(2).error(`"${ct}" comparisons are not supported for type '${Ye(Nt.type)}'.`);if(At.type.kind!==Nt.type.kind&&At.type.kind!=="value"&&Nt.type.kind!=="value")return Ge.error(`Cannot compare types '${Ye(At.type)}' and '${Ye(Nt.type)}'.`);ve&&(At.type.kind==="value"&&Nt.type.kind!=="value"?At=new ut(Nt.type,[At]):At.type.kind!=="value"&&Nt.type.kind==="value"&&(Nt=new ut(At.type,[Nt])));let ar=null;if(Be.length===4){if(At.type.kind!=="string"&&Nt.type.kind!=="string"&&At.type.kind!=="value"&&Nt.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(ar=Ge.parse(Be[3],3,vr),!ar)return null}return new t7(At,Nt,ar)}evaluate(Be){let Ge=this.lhs.evaluate(Be),ct=this.rhs.evaluate(Be);if(ve&&this.hasUntypedArgument){let At=Ia(Ge),Nt=Ia(ct);if(At.kind!==Nt.kind||At.kind!=="string"&&At.kind!=="number")throw new cn(`Expected arguments for "${H}" to be (string, string) or (number, number), but found (${At.kind}, ${Nt.kind}) instead.`)}if(this.collator&&!ve&&this.hasUntypedArgument){let At=Ia(Ge),Nt=Ia(ct);if(At.kind!=="string"||Nt.kind!=="string")return R(Be,Ge,ct)}return this.collator?J(Be,Ge,ct,this.collator.evaluate(Be)):R(Be,Ge,ct)}eachChild(Be){Be(this.lhs),Be(this.rhs),this.collator&&Be(this.collator)}outputDefined(){return!0}}}let Zn=wo("==",function(H,R,J){return R===J},kn),go=wo("!=",function(H,R,J){return R!==J},function(H,R,J,ve){return!kn(0,R,J,ve)}),os=wo("<",function(H,R,J){return R",function(H,R,J){return R>J},function(H,R,J,ve){return ve.compare(R,J)>0}),jo=wo("<=",function(H,R,J){return R<=J},function(H,R,J,ve){return ve.compare(R,J)<=0}),Yn=wo(">=",function(H,R,J){return R>=J},function(H,R,J,ve){return ve.compare(R,J)>=0});class Gn{constructor(R,J,ve){this.type=vr,this.locale=ve,this.caseSensitive=R,this.diacriticSensitive=J}static parse(R,J){if(R.length!==2)return J.error("Expected one argument.");let ve=R[1];if(typeof ve!="object"||Array.isArray(ve))return J.error("Collator options argument must be an object.");let Ee=J.parse(ve["case-sensitive"]!==void 0&&ve["case-sensitive"],1,kt);if(!Ee)return null;let Be=J.parse(ve["diacritic-sensitive"]!==void 0&&ve["diacritic-sensitive"],1,kt);if(!Be)return null;let Ge=null;return ve.locale&&(Ge=J.parse(ve.locale,1,St),!Ge)?null:new Gn(Ee,Be,Ge)}evaluate(R){return new Fr(this.caseSensitive.evaluate(R),this.diacriticSensitive.evaluate(R),this.locale?this.locale.evaluate(R):null)}eachChild(R){R(this.caseSensitive),R(this.diacriticSensitive),this.locale&&R(this.locale)}outputDefined(){return!1}}class Hn{constructor(R,J,ve,Ee,Be){this.type=St,this.number=R,this.locale=J,this.currency=ve,this.minFractionDigits=Ee,this.maxFractionDigits=Be}static parse(R,J){if(R.length!==3)return J.error("Expected two arguments.");let ve=J.parse(R[1],1,Je);if(!ve)return null;let Ee=R[2];if(typeof Ee!="object"||Array.isArray(Ee))return J.error("NumberFormat options argument must be an object.");let Be=null;if(Ee.locale&&(Be=J.parse(Ee.locale,1,St),!Be))return null;let Ge=null;if(Ee.currency&&(Ge=J.parse(Ee.currency,1,St),!Ge))return null;let ct=null;if(Ee["min-fraction-digits"]&&(ct=J.parse(Ee["min-fraction-digits"],1,Je),!ct))return null;let At=null;return Ee["max-fraction-digits"]&&(At=J.parse(Ee["max-fraction-digits"],1,Je),!At)?null:new Hn(ve,Be,Ge,ct,At)}evaluate(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))}eachChild(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)}outputDefined(){return!1}}class ss{constructor(R){this.type=qr,this.sections=R}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve=R[1];if(!Array.isArray(ve)&&typeof ve=="object")return J.error("First argument must be an image or text section.");let Ee=[],Be=!1;for(let Ge=1;Ge<=R.length-1;++Ge){let ct=R[Ge];if(Be&&typeof ct=="object"&&!Array.isArray(ct)){Be=!1;let At=null;if(ct["font-scale"]&&(At=J.parse(ct["font-scale"],1,Je),!At))return null;let Nt=null;if(ct["text-font"]&&(Nt=J.parse(ct["text-font"],1,Fe(St)),!Nt))return null;let ar=null;if(ct["text-color"]&&(ar=J.parse(ct["text-color"],1,Bt),!ar))return null;let Mr=Ee[Ee.length-1];Mr.scale=At,Mr.font=Nt,Mr.textColor=ar}else{let At=J.parse(R[Ge],1,Ar);if(!At)return null;let Nt=At.type.kind;if(Nt!=="string"&&Nt!=="value"&&Nt!=="null"&&Nt!=="resolvedImage")return J.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Be=!0,Ee.push({content:At,scale:null,font:null,textColor:null})}}return new ss(Ee)}evaluate(R){return new ra(this.sections.map(J=>{let ve=J.content.evaluate(R);return Ia(ve)===Ur?new ta("",ve,null,null,null):new ta(rn(ve),null,J.scale?J.scale.evaluate(R):null,J.font?J.font.evaluate(R).join(","):null,J.textColor?J.textColor.evaluate(R):null)}))}eachChild(R){for(let J of this.sections)R(J.content),J.scale&&R(J.scale),J.font&&R(J.font),J.textColor&&R(J.textColor)}outputDefined(){return!1}}class _s{constructor(R){this.type=Ur,this.input=R}static parse(R,J){if(R.length!==2)return J.error("Expected two arguments.");let ve=J.parse(R[1],1,St);return ve?new _s(ve):J.error("No image name provided.")}evaluate(R){let J=this.input.evaluate(R),ve=Za.fromString(J);return ve&&R.availableImages&&(ve.available=R.availableImages.indexOf(J)>-1),ve}eachChild(R){R(this.input)}outputDefined(){return!1}}class ps{constructor(R){this.type=Je,this.input=R}static parse(R,J){if(R.length!==2)return J.error(`Expected 1 argument, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1);return ve?ve.type.kind!=="array"&&ve.type.kind!=="string"&&ve.type.kind!=="value"?J.error(`Expected argument of type string or array, but found ${Ye(ve.type)} instead.`):new ps(ve):null}evaluate(R){let J=this.input.evaluate(R);if(typeof J=="string")return[...J].length;if(Array.isArray(J))return J.length;throw new cn(`Expected value to be of type string or array, but found ${Ye(Ia(J))} instead.`)}eachChild(R){R(this.input)}outputDefined(){return!1}}let Ko=8192;function Gi(H,R){let J=(180+H[0])/360,ve=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H[1]*Math.PI/360)))/360,Ee=Math.pow(2,R.z);return[Math.round(J*Ee*Ko),Math.round(ve*Ee*Ko)]}function Pn(H,R){let J=Math.pow(2,R.z);return[(Ee=(H[0]/Ko+R.x)/J,360*Ee-180),(ve=(H[1]/Ko+R.y)/J,360/Math.PI*Math.atan(Math.exp((180-360*ve)*Math.PI/180))-90)];var ve,Ee}function qs(H,R){H[0]=Math.min(H[0],R[0]),H[1]=Math.min(H[1],R[1]),H[2]=Math.max(H[2],R[0]),H[3]=Math.max(H[3],R[1])}function bs(H,R){return!(H[0]<=R[0]||H[2]>=R[2]||H[1]<=R[1]||H[3]>=R[3])}function lo(H,R,J){let ve=H[0]-R[0],Ee=H[1]-R[1],Be=H[0]-J[0],Ge=H[1]-J[1];return ve*Ge-Be*Ee==0&&ve*Be<=0&&Ee*Ge<=0}function Zo(H,R,J,ve){return(Ee=[ve[0]-J[0],ve[1]-J[1]])[0]*(Be=[R[0]-H[0],R[1]-H[1]])[1]-Ee[1]*Be[0]!=0&&!(!To(H,R,J,ve)||!To(J,ve,H,R));var Ee,Be}function ws(H,R,J){for(let ve of J)for(let Ee=0;Ee(Ee=H)[1]!=(Ge=ct[At+1])[1]>Ee[1]&&Ee[0]<(Ge[0]-Be[0])*(Ee[1]-Be[1])/(Ge[1]-Be[1])+Be[0]&&(ve=!ve)}var Ee,Be,Ge;return ve}function il(H,R){for(let J of R)if(Hs(H,J))return!0;return!1}function yn(H,R){for(let J of H)if(!Hs(J,R))return!1;for(let J=0;J0&&ct<0||Ge<0&&ct>0}function Ws(H,R,J){let ve=[];for(let Ee=0;EeJ[2]){let Ee=.5*ve,Be=H[0]-J[0]>Ee?-ve:J[0]-H[0]>Ee?ve:0;Be===0&&(Be=H[0]-J[2]>Ee?-ve:J[2]-H[0]>Ee?ve:0),H[0]+=Be}qs(R,H)}function Nl(H,R,J,ve){let Ee=Math.pow(2,ve.z)*Ko,Be=[ve.x*Ko,ve.y*Ko],Ge=[];for(let ct of H)for(let At of ct){let Nt=[At.x+Be[0],At.y+Be[1]];uo(Nt,R,J,Ee),Ge.push(Nt)}return Ge}function Ks(H,R,J,ve){let Ee=Math.pow(2,ve.z)*Ko,Be=[ve.x*Ko,ve.y*Ko],Ge=[];for(let At of H){let Nt=[];for(let ar of At){let Mr=[ar.x+Be[0],ar.y+Be[1]];qs(R,Mr),Nt.push(Mr)}Ge.push(Nt)}if(R[2]-R[0]<=Ee/2){(ct=R)[0]=ct[1]=1/0,ct[2]=ct[3]=-1/0;for(let At of Ge)for(let Nt of At)uo(Nt,R,J,Ee)}var ct;return Ge}class Ts{constructor(R,J){this.type=kt,this.geojson=R,this.geometries=J}static parse(R,J){if(R.length!==2)return J.error(`'within' expression requires exactly one argument, but found ${R.length-1} instead.`);if(pi(R[1])){let ve=R[1];if(ve.type==="FeatureCollection"){let Ee=[];for(let Be of ve.features){let{type:Ge,coordinates:ct}=Be.geometry;Ge==="Polygon"&&Ee.push(ct),Ge==="MultiPolygon"&&Ee.push(...ct)}if(Ee.length)return new Ts(ve,{type:"MultiPolygon",coordinates:Ee})}else if(ve.type==="Feature"){let Ee=ve.geometry.type;if(Ee==="Polygon"||Ee==="MultiPolygon")return new Ts(ve,ve.geometry)}else if(ve.type==="Polygon"||ve.type==="MultiPolygon")return new Ts(ve,ve)}return J.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.geometryType()==="Point")return function(J,ve){let Ee=[1/0,1/0,-1/0,-1/0],Be=[1/0,1/0,-1/0,-1/0],Ge=J.canonicalID();if(ve.type==="Polygon"){let ct=Ws(ve.coordinates,Be,Ge),At=Nl(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!Hs(Nt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=Ll(ve.coordinates,Be,Ge),At=Nl(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!il(Nt,ct))return!1}return!0}(R,this.geometries);if(R.geometryType()==="LineString")return function(J,ve){let Ee=[1/0,1/0,-1/0,-1/0],Be=[1/0,1/0,-1/0,-1/0],Ge=J.canonicalID();if(ve.type==="Polygon"){let ct=Ws(ve.coordinates,Be,Ge),At=Ks(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!yn(Nt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=Ll(ve.coordinates,Be,Ge),At=Ks(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!Po(Nt,ct))return!1}return!0}(R,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Ls=class{constructor(H=[],R=(J,ve)=>Jve?1:0){if(this.data=H,this.length=this.data.length,this.compare=R,this.length>0)for(let J=(this.length>>1)-1;J>=0;J--)this._down(J)}push(H){this.data.push(H),this._up(this.length++)}pop(){if(this.length===0)return;let H=this.data[0],R=this.data.pop();return--this.length>0&&(this.data[0]=R,this._down(0)),H}peek(){return this.data[0]}_up(H){let{data:R,compare:J}=this,ve=R[H];for(;H>0;){let Ee=H-1>>1,Be=R[Ee];if(J(ve,Be)>=0)break;R[H]=Be,H=Ee}R[H]=ve}_down(H){let{data:R,compare:J}=this,ve=this.length>>1,Ee=R[H];for(;H=0)break;R[H]=R[Be],H=Be}R[H]=Ee}};function Jo(H,R,J,ve,Ee){Es(H,R,J,ve||H.length-1,Ee||lu)}function Es(H,R,J,ve,Ee){for(;ve>J;){if(ve-J>600){var Be=ve-J+1,Ge=R-J+1,ct=Math.log(Be),At=.5*Math.exp(2*ct/3),Nt=.5*Math.sqrt(ct*At*(Be-At)/Be)*(Ge-Be/2<0?-1:1);Es(H,R,Math.max(J,Math.floor(R-Ge*At/Be+Nt)),Math.min(ve,Math.floor(R+(Be-Ge)*At/Be+Nt)),Ee)}var ar=H[R],Mr=J,zr=ve;for(Ul(H,J,R),Ee(H[ve],ar)>0&&Ul(H,J,ve);Mr0;)zr--}Ee(H[J],ar)===0?Ul(H,J,zr):Ul(H,++zr,ve),zr<=R&&(J=zr+1),R<=zr&&(ve=zr-1)}}function Ul(H,R,J){var ve=H[R];H[R]=H[J],H[J]=ve}function lu(H,R){return HR?1:0}function Tc(H,R){if(H.length<=1)return[H];let J=[],ve,Ee;for(let Be of H){let Ge=Sf(Be);Ge!==0&&(Be.area=Math.abs(Ge),Ee===void 0&&(Ee=Ge<0),Ee===Ge<0?(ve&&J.push(ve),ve=[Be]):ve.push(Be))}if(ve&&J.push(ve),R>1)for(let Be=0;Be1?(Nt=R[At+1][0],ar=R[At+1][1]):Wr>0&&(Nt+=Mr/this.kx*Wr,ar+=zr/this.ky*Wr)),Mr=this.wrap(J[0]-Nt)*this.kx,zr=(J[1]-ar)*this.ky;let ia=Mr*Mr+zr*zr;ia180;)R-=360;return R}}function uu(H,R){return R[0]-H[0]}function Pl(H){return H[1]-H[0]+1}function ic(H,R){return H[1]>=H[0]&&H[1]H[1])return[null,null];let J=Pl(H);if(R){if(J===2)return[H,null];let Ee=Math.floor(J/2);return[[H[0],H[0]+Ee],[H[0]+Ee,H[1]]]}if(J===1)return[H,null];let ve=Math.floor(J/2)-1;return[[H[0],H[0]+ve],[H[0]+ve+1,H[1]]]}function nl(H,R){if(!ic(R,H.length))return[1/0,1/0,-1/0,-1/0];let J=[1/0,1/0,-1/0,-1/0];for(let ve=R[0];ve<=R[1];++ve)qs(J,H[ve]);return J}function vl(H){let R=[1/0,1/0,-1/0,-1/0];for(let J of H)for(let ve of J)qs(R,ve);return R}function As(H){return H[0]!==-1/0&&H[1]!==-1/0&&H[2]!==1/0&&H[3]!==1/0}function Xs(H,R,J){if(!As(H)||!As(R))return NaN;let ve=0,Ee=0;return H[2]R[2]&&(ve=H[0]-R[2]),H[1]>R[3]&&(Ee=H[1]-R[3]),H[3]=ve)return ve;if(bs(Ee,Be)){if(bh(H,R))return 0}else if(bh(R,H))return 0;let Ge=1/0;for(let ct of H)for(let At=0,Nt=ct.length,ar=Nt-1;At0;){let At=Ge.pop();if(At[0]>=Be)continue;let Nt=At[1],ar=R?50:100;if(Pl(Nt)<=ar){if(!ic(Nt,H.length))return NaN;if(R){let Mr=us(H,Nt,J,ve);if(isNaN(Mr)||Mr===0)return Mr;Be=Math.min(Be,Mr)}else for(let Mr=Nt[0];Mr<=Nt[1];++Mr){let zr=xh(H[Mr],J,ve);if(Be=Math.min(Be,zr),Be===0)return 0}}else{let Mr=Ou(Nt,R);to(Ge,Be,ve,H,ct,Mr[0]),to(Ge,Be,ve,H,ct,Mr[1])}}return Be}function ql(H,R,J,ve,Ee,Be=1/0){let Ge=Math.min(Be,Ee.distance(H[0],J[0]));if(Ge===0)return Ge;let ct=new Ls([[0,[0,H.length-1],[0,J.length-1]]],uu);for(;ct.length>0;){let At=ct.pop();if(At[0]>=Ge)continue;let Nt=At[1],ar=At[2],Mr=R?50:100,zr=ve?50:100;if(Pl(Nt)<=Mr&&Pl(ar)<=zr){if(!ic(Nt,H.length)&&ic(ar,J.length))return NaN;let Wr;if(R&&ve)Wr=qu(H,Nt,J,ar,Ee),Ge=Math.min(Ge,Wr);else if(R&&!ve){let ia=H.slice(Nt[0],Nt[1]+1);for(let fa=ar[0];fa<=ar[1];++fa)if(Wr=nc(J[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else if(!R&&ve){let ia=J.slice(ar[0],ar[1]+1);for(let fa=Nt[0];fa<=Nt[1];++fa)if(Wr=nc(H[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else Wr=fl(H,Nt,J,ar,Ee),Ge=Math.min(Ge,Wr)}else{let Wr=Ou(Nt,R),ia=Ou(ar,ve);Xc(ct,Ge,Ee,H,J,Wr[0],ia[0]),Xc(ct,Ge,Ee,H,J,Wr[0],ia[1]),Xc(ct,Ge,Ee,H,J,Wr[1],ia[0]),Xc(ct,Ge,Ee,H,J,Wr[1],ia[1])}}return Ge}function Mf(H){return H.type==="MultiPolygon"?H.coordinates.map(R=>({type:"Polygon",coordinates:R})):H.type==="MultiLineString"?H.coordinates.map(R=>({type:"LineString",coordinates:R})):H.type==="MultiPoint"?H.coordinates.map(R=>({type:"Point",coordinates:R})):[H]}class Ac{constructor(R,J){this.type=Je,this.geojson=R,this.geometries=J}static parse(R,J){if(R.length!==2)return J.error(`'distance' expression requires exactly one argument, but found ${R.length-1} instead.`);if(pi(R[1])){let ve=R[1];if(ve.type==="FeatureCollection")return new Ac(ve,ve.features.map(Ee=>Mf(Ee.geometry)).flat());if(ve.type==="Feature")return new Ac(ve,Mf(ve.geometry));if("type"in ve&&"coordinates"in ve)return new Ac(ve,Mf(ve))}return J.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.geometryType()==="Point")return function(J,ve){let Ee=J.geometry(),Be=Ee.flat().map(At=>Pn([At.x,At.y],J.canonical));if(Ee.length===0)return NaN;let Ge=new Wc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,ql(Be,!1,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,ql(Be,!1,At.coordinates,!0,Ge,ct));break;case"Polygon":ct=Math.min(ct,Vu(Be,!1,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(R,this.geometries);if(R.geometryType()==="LineString")return function(J,ve){let Ee=J.geometry(),Be=Ee.flat().map(At=>Pn([At.x,At.y],J.canonical));if(Ee.length===0)return NaN;let Ge=new Wc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,ql(Be,!0,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,ql(Be,!0,At.coordinates,!0,Ge,ct));break;case"Polygon":ct=Math.min(ct,Vu(Be,!0,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(R,this.geometries);if(R.geometryType()==="Polygon")return function(J,ve){let Ee=J.geometry();if(Ee.length===0||Ee[0].length===0)return NaN;let Be=Tc(Ee,0).map(At=>At.map(Nt=>Nt.map(ar=>Pn([ar.x,ar.y],J.canonical)))),Ge=new Wc(Be[0][0][0][1]),ct=1/0;for(let At of ve)for(let Nt of Be){switch(At.type){case"Point":ct=Math.min(ct,Vu([At.coordinates],!1,Nt,Ge,ct));break;case"LineString":ct=Math.min(ct,Vu(At.coordinates,!0,Nt,Ge,ct));break;case"Polygon":ct=Math.min(ct,Ps(Nt,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(R,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nf={"==":Zn,"!=":go,">":ys,"<":os,">=":Yn,"<=":jo,array:ut,at:Kt,boolean:ut,case:Pa,coalesce:bo,collator:Gn,format:ss,image:_s,in:mr,"index-of":Ir,interpolate:ao,"interpolate-hcl":ao,"interpolate-lab":ao,length:ps,let:Hr,literal:tn,match:va,number:ut,"number-format":Hn,object:ut,slice:ga,step:ba,string:ut,"to-boolean":Cr,"to-color":Cr,"to-number":Cr,"to-string":Cr,var:gt,within:Ts,distance:Ac};class Ql{constructor(R,J,ve,Ee){this.name=R,this.type=J,this._evaluate=ve,this.args=Ee}evaluate(R){return this._evaluate(R,this.args)}eachChild(R){this.args.forEach(R)}outputDefined(){return!1}static parse(R,J){let ve=R[0],Ee=Ql.definitions[ve];if(!Ee)return J.error(`Unknown expression "${ve}". If you wanted a literal array, use ["literal", [...]].`,0);let Be=Array.isArray(Ee)?Ee[0]:Ee.type,Ge=Array.isArray(Ee)?[[Ee[1],Ee[2]]]:Ee.overloads,ct=Ge.filter(([Nt])=>!Array.isArray(Nt)||Nt.length===R.length-1),At=null;for(let[Nt,ar]of ct){At=new Nr(J.registry,Bf,J.path,null,J.scope);let Mr=[],zr=!1;for(let Wr=1;Wr{return zr=Mr,Array.isArray(zr)?`(${zr.map(Ye).join(", ")})`:`(${Ye(zr.type)}...)`;var zr}).join(" | "),ar=[];for(let Mr=1;Mr{J=R?J&&Bf(ve):J&&ve instanceof tn}),!!J&&Nf(H)&&Ef(H,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nf(H){if(H instanceof Ql&&(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 Ts||H instanceof Ac)return!1;let R=!0;return H.eachChild(J=>{R&&!Nf(J)&&(R=!1)}),R}function Gu(H){if(H instanceof Ql&&H.name==="feature-state")return!1;let R=!0;return H.eachChild(J=>{R&&!Gu(J)&&(R=!1)}),R}function Ef(H,R){if(H instanceof Ql&&R.indexOf(H.name)>=0)return!1;let J=!0;return H.eachChild(ve=>{J&&!Ef(ve,R)&&(J=!1)}),J}function oc(H){return{result:"success",value:H}}function Zc(H){return{result:"error",value:H}}function eu(H){return H["property-type"]==="data-driven"||H["property-type"]==="cross-faded-data-driven"}function qc(H){return!!H.expression&&H.expression.parameters.indexOf("zoom")>-1}function Sc(H){return!!H.expression&&H.expression.interpolated}function Zs(H){return H instanceof Number?"number":H instanceof String?"string":H instanceof Boolean?"boolean":Array.isArray(H)?"array":H===null?"null":typeof H}function kf(H){return typeof H=="object"&&H!==null&&!Array.isArray(H)}function fh(H){return H}function Uf(H,R){let J=R.type==="color",ve=H.stops&&typeof H.stops[0][0]=="object",Ee=ve||!(ve||H.property!==void 0),Be=H.type||(Sc(R)?"exponential":"interval");if(J||R.type==="padding"){let ar=J?Jt.parse:ca.parse;(H=ne({},H)).stops&&(H.stops=H.stops.map(Mr=>[Mr[0],ar(Mr[1])])),H.default=ar(H.default?H.default:R.default)}if(H.colorSpace&&(Ge=H.colorSpace)!=="rgb"&&Ge!=="hcl"&&Ge!=="lab")throw new Error(`Unknown color space: "${H.colorSpace}"`);var Ge;let ct,At,Nt;if(Be==="exponential")ct=jf;else if(Be==="interval")ct=Cu;else if(Be==="categorical"){ct=$f,At=Object.create(null);for(let ar of H.stops)At[ar[0]]=ar[1];Nt=typeof H.stops[0][0]}else{if(Be!=="identity")throw new Error(`Unknown function type "${Be}"`);ct=ml}if(ve){let ar={},Mr=[];for(let ia=0;iaia[0]),evaluate:({zoom:ia},fa)=>jf({stops:zr,base:H.base},R,ia).evaluate(ia,fa)}}if(Ee){let ar=Be==="exponential"?{name:"exponential",base:H.base!==void 0?H.base:1}:null;return{kind:"camera",interpolationType:ar,interpolationFactor:ao.interpolationFactor.bind(void 0,ar),zoomStops:H.stops.map(Mr=>Mr[0]),evaluate:({zoom:Mr})=>ct(H,R,Mr,At,Nt)}}return{kind:"source",evaluate(ar,Mr){let zr=Mr&&Mr.properties?Mr.properties[H.property]:void 0;return zr===void 0?Yc(H.default,R.default):ct(H,R,zr,At,Nt)}}}function Yc(H,R,J){return H!==void 0?H:R!==void 0?R:J!==void 0?J:void 0}function $f(H,R,J,ve,Ee){return Yc(typeof J===Ee?ve[J]:void 0,H.default,R.default)}function Cu(H,R,J){if(Zs(J)!=="number")return Yc(H.default,R.default);let ve=H.stops.length;if(ve===1||J<=H.stops[0][0])return H.stops[0][1];if(J>=H.stops[ve-1][0])return H.stops[ve-1][1];let Ee=la(H.stops.map(Be=>Be[0]),J);return H.stops[Ee][1]}function jf(H,R,J){let ve=H.base!==void 0?H.base:1;if(Zs(J)!=="number")return Yc(H.default,R.default);let Ee=H.stops.length;if(Ee===1||J<=H.stops[0][0])return H.stops[0][1];if(J>=H.stops[Ee-1][0])return H.stops[Ee-1][1];let Be=la(H.stops.map(ar=>ar[0]),J),Ge=function(ar,Mr,zr,Wr){let ia=Wr-zr,fa=ar-zr;return ia===0?0:Mr===1?fa/ia:(Math.pow(Mr,fa)-1)/(Math.pow(Mr,ia)-1)}(J,ve,H.stops[Be][0],H.stops[Be+1][0]),ct=H.stops[Be][1],At=H.stops[Be+1][1],Nt=En[R.type]||fh;return typeof ct.evaluate=="function"?{evaluate(...ar){let Mr=ct.evaluate.apply(void 0,ar),zr=At.evaluate.apply(void 0,ar);if(Mr!==void 0&&zr!==void 0)return Nt(Mr,zr,Ge,H.colorSpace)}}:Nt(ct,At,Ge,H.colorSpace)}function ml(H,R,J){switch(R.type){case"color":J=Jt.parse(J);break;case"formatted":J=ra.fromString(J.toString());break;case"resolvedImage":J=Za.fromString(J.toString());break;case"padding":J=ca.parse(J);break;default:Zs(J)===R.type||R.type==="enum"&&R.values[J]||(J=void 0)}return Yc(J,H.default,R.default)}Ql.register(nf,{error:[{kind:"error"},[St],(H,[R])=>{throw new cn(R.evaluate(H))}],typeof:[St,[Ar],(H,[R])=>Ye(Ia(R.evaluate(H)))],"to-rgba":[Fe(Je,4),[Bt],(H,[R])=>{let[J,ve,Ee,Be]=R.evaluate(H).rgb;return[255*J,255*ve,255*Ee,Be]}],rgb:[Bt,[Je,Je,Je],Jf],rgba:[Bt,[Je,Je,Je,Je],Jf],has:{type:kt,overloads:[[[St],(H,[R])=>Of(R.evaluate(H),H.properties())],[[St,Vt],(H,[R,J])=>Of(R.evaluate(H),J.evaluate(H))]]},get:{type:Ar,overloads:[[[St],(H,[R])=>of(R.evaluate(H),H.properties())],[[St,Vt],(H,[R,J])=>of(R.evaluate(H),J.evaluate(H))]]},"feature-state":[Ar,[St],(H,[R])=>of(R.evaluate(H),H.featureState||{})],properties:[Vt,[],H=>H.properties()],"geometry-type":[St,[],H=>H.geometryType()],id:[Ar,[],H=>H.id()],zoom:[Je,[],H=>H.globals.zoom],"heatmap-density":[Je,[],H=>H.globals.heatmapDensity||0],"line-progress":[Je,[],H=>H.globals.lineProgress||0],accumulated:[Ar,[],H=>H.globals.accumulated===void 0?null:H.globals.accumulated],"+":[Je,jc(Je),(H,R)=>{let J=0;for(let ve of R)J+=ve.evaluate(H);return J}],"*":[Je,jc(Je),(H,R)=>{let J=1;for(let ve of R)J*=ve.evaluate(H);return J}],"-":{type:Je,overloads:[[[Je,Je],(H,[R,J])=>R.evaluate(H)-J.evaluate(H)],[[Je],(H,[R])=>-R.evaluate(H)]]},"/":[Je,[Je,Je],(H,[R,J])=>R.evaluate(H)/J.evaluate(H)],"%":[Je,[Je,Je],(H,[R,J])=>R.evaluate(H)%J.evaluate(H)],ln2:[Je,[],()=>Math.LN2],pi:[Je,[],()=>Math.PI],e:[Je,[],()=>Math.E],"^":[Je,[Je,Je],(H,[R,J])=>Math.pow(R.evaluate(H),J.evaluate(H))],sqrt:[Je,[Je],(H,[R])=>Math.sqrt(R.evaluate(H))],log10:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))/Math.LN10],ln:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))],log2:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))/Math.LN2],sin:[Je,[Je],(H,[R])=>Math.sin(R.evaluate(H))],cos:[Je,[Je],(H,[R])=>Math.cos(R.evaluate(H))],tan:[Je,[Je],(H,[R])=>Math.tan(R.evaluate(H))],asin:[Je,[Je],(H,[R])=>Math.asin(R.evaluate(H))],acos:[Je,[Je],(H,[R])=>Math.acos(R.evaluate(H))],atan:[Je,[Je],(H,[R])=>Math.atan(R.evaluate(H))],min:[Je,jc(Je),(H,R)=>Math.min(...R.map(J=>J.evaluate(H)))],max:[Je,jc(Je),(H,R)=>Math.max(...R.map(J=>J.evaluate(H)))],abs:[Je,[Je],(H,[R])=>Math.abs(R.evaluate(H))],round:[Je,[Je],(H,[R])=>{let J=R.evaluate(H);return J<0?-Math.round(-J):Math.round(J)}],floor:[Je,[Je],(H,[R])=>Math.floor(R.evaluate(H))],ceil:[Je,[Je],(H,[R])=>Math.ceil(R.evaluate(H))],"filter-==":[kt,[St,Ar],(H,[R,J])=>H.properties()[R.value]===J.value],"filter-id-==":[kt,[Ar],(H,[R])=>H.id()===R.value],"filter-type-==":[kt,[St],(H,[R])=>H.geometryType()===R.value],"filter-<":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve>Ee}],"filter-id->":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J>ve}],"filter-<=":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve<=Ee}],"filter-id-<=":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J<=ve}],"filter->=":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve>=Ee}],"filter-id->=":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J>=ve}],"filter-has":[kt,[Ar],(H,[R])=>R.value in H.properties()],"filter-has-id":[kt,[],H=>H.id()!==null&&H.id()!==void 0],"filter-type-in":[kt,[Fe(St)],(H,[R])=>R.value.indexOf(H.geometryType())>=0],"filter-id-in":[kt,[Fe(Ar)],(H,[R])=>R.value.indexOf(H.id())>=0],"filter-in-small":[kt,[St,Fe(Ar)],(H,[R,J])=>J.value.indexOf(H.properties()[R.value])>=0],"filter-in-large":[kt,[St,Fe(Ar)],(H,[R,J])=>function(ve,Ee,Be,Ge){for(;Be<=Ge;){let ct=Be+Ge>>1;if(Ee[ct]===ve)return!0;Ee[ct]>ve?Ge=ct-1:Be=ct+1}return!1}(H.properties()[R.value],J.value,0,J.value.length-1)],all:{type:kt,overloads:[[[kt,kt],(H,[R,J])=>R.evaluate(H)&&J.evaluate(H)],[jc(kt),(H,R)=>{for(let J of R)if(!J.evaluate(H))return!1;return!0}]]},any:{type:kt,overloads:[[[kt,kt],(H,[R,J])=>R.evaluate(H)||J.evaluate(H)],[jc(kt),(H,R)=>{for(let J of R)if(J.evaluate(H))return!0;return!1}]]},"!":[kt,[kt],(H,[R])=>!R.evaluate(H)],"is-supported-script":[kt,[St],(H,[R])=>{let J=H.globals&&H.globals.isSupportedScript;return!J||J(R.evaluate(H))}],upcase:[St,[St],(H,[R])=>R.evaluate(H).toUpperCase()],downcase:[St,[St],(H,[R])=>R.evaluate(H).toLowerCase()],concat:[St,jc(Ar),(H,R)=>R.map(J=>rn(J.evaluate(H))).join("")],"resolved-locale":[St,[vr],(H,[R])=>R.evaluate(H).resolvedLocale()]});class Lu{constructor(R,J){var ve;this.expression=R,this._warningHistory={},this._evaluator=new Rr,this._defaultValue=J?(ve=J).type==="color"&&kf(ve.default)?new Jt(0,0,0,0):ve.type==="color"?Jt.parse(ve.default)||null:ve.type==="padding"?ca.parse(ve.default)||null:ve.type==="variableAnchorOffsetCollection"?$a.parse(ve.default)||null:ve.default===void 0?null:ve.default:null,this._enumValues=J&&J.type==="enum"?J.values:null}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._evaluator.globals=R,this._evaluator.feature=J,this._evaluator.featureState=ve,this._evaluator.canonical=Ee,this._evaluator.availableImages=Be||null,this._evaluator.formattedSection=Ge,this.expression.evaluate(this._evaluator)}evaluate(R,J,ve,Ee,Be,Ge){this._evaluator.globals=R,this._evaluator.feature=J||null,this._evaluator.featureState=ve||null,this._evaluator.canonical=Ee,this._evaluator.availableImages=Be||null,this._evaluator.formattedSection=Ge||null;try{let ct=this.expression.evaluate(this._evaluator);if(ct==null||typeof ct=="number"&&ct!=ct)return this._defaultValue;if(this._enumValues&&!(ct in this._enumValues))throw new cn(`Expected value to be one of ${Object.keys(this._enumValues).map(At=>JSON.stringify(At)).join(", ")}, but found ${JSON.stringify(ct)} instead.`);return ct}catch(ct){return this._warningHistory[ct.message]||(this._warningHistory[ct.message]=!0,typeof console<"u"&&console.warn(ct.message)),this._defaultValue}}}function Mc(H){return Array.isArray(H)&&H.length>0&&typeof H[0]=="string"&&H[0]in nf}function ol(H,R){let J=new Nr(nf,Bf,[],R?function(Ee){let Be={color:Bt,string:St,number:Je,enum:St,boolean:kt,formatted:qr,padding:kr,resolvedImage:Ur,variableAnchorOffsetCollection:_t};return Ee.type==="array"?Fe(Be[Ee.value]||Ar,Ee.length):Be[Ee.type]}(R):void 0),ve=J.parse(H,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return ve?oc(new Lu(ve,R)):Zc(J.errors)}class vc{constructor(R,J){this.kind=R,this._styleExpression=J,this.isStateDependent=R!=="constant"&&!Gu(J.expression)}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge)}evaluate(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(R,J,ve,Ee,Be,Ge)}}class yu{constructor(R,J,ve,Ee){this.kind=R,this.zoomStops=ve,this._styleExpression=J,this.isStateDependent=R!=="camera"&&!Gu(J.expression),this.interpolationType=Ee}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge)}evaluate(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(R,J,ve,Ee,Be,Ge)}interpolationFactor(R,J,ve){return this.interpolationType?ao.interpolationFactor(this.interpolationType,R,J,ve):0}}function Tu(H,R){let J=ol(H,R);if(J.result==="error")return J;let ve=J.value.expression,Ee=Nf(ve);if(!Ee&&!eu(R))return Zc([new Ce("","data expressions not supported")]);let Be=Ef(ve,["zoom"]);if(!Be&&!qc(R))return Zc([new Ce("","zoom expressions not supported")]);let Ge=qf(ve);return Ge||Be?Ge instanceof Ce?Zc([Ge]):Ge instanceof ao&&!Sc(R)?Zc([new Ce("",'"interpolate" expressions cannot be used with this property')]):oc(Ge?new yu(Ee?"camera":"composite",J.value,Ge.labels,Ge instanceof ao?Ge.interpolation:void 0):new vc(Ee?"constant":"source",J.value)):Zc([new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ml{constructor(R,J){this._parameters=R,this._specification=J,ne(this,Uf(this._parameters,this._specification))}static deserialize(R){return new Ml(R._parameters,R._specification)}static serialize(R){return{_parameters:R._parameters,_specification:R._specification}}}function qf(H){let R=null;if(H instanceof Hr)R=qf(H.result);else if(H instanceof bo){for(let J of H.args)if(R=qf(J),R)break}else(H instanceof ba||H instanceof ao)&&H.input instanceof Ql&&H.input.name==="zoom"&&(R=H);return R instanceof Ce||H.eachChild(J=>{let ve=qf(J);ve instanceof Ce?R=ve:!R&&ve?R=new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):R&&ve&&R!==ve&&(R=new Ce("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),R}function Qf(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 R of H.slice(1))if(!Qf(R)&&typeof R!="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 Ec(H){if(H==null)return{filter:()=>!0,needGeometry:!1};Qf(H)||(H=sf(H));let R=ol(H,Bu);if(R.result==="error")throw new Error(R.value.map(J=>`${J.key}: ${J.message}`).join(", "));return{filter:(J,ve,Ee)=>R.value.evaluate(J,ve,{},Ee),needGeometry:Lh(H)}}function mc(H,R){return HR?1:0}function Lh(H){if(!Array.isArray(H))return!1;if(H[0]==="within"||H[0]==="distance")return!0;for(let R=1;R"||R==="<="||R===">="?vf(H[1],H[2],R):R==="any"?(J=H.slice(1),["any"].concat(J.map(sf))):R==="all"?["all"].concat(H.slice(1).map(sf)):R==="none"?["all"].concat(H.slice(1).map(sf).map(iu)):R==="in"?Nu(H[1],H.slice(2)):R==="!in"?iu(Nu(H[1],H.slice(2))):R==="has"?lf(H[1]):R!=="!has"||iu(lf(H[1]));var J}function vf(H,R,J){switch(H){case"$type":return[`filter-type-${J}`,R];case"$id":return[`filter-id-${J}`,R];default:return[`filter-${J}`,H,R]}}function Nu(H,R){if(R.length===0)return!1;switch(H){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(J=>typeof J!=typeof R[0])?["filter-in-large",H,["literal",R.sort(mc)]]:["filter-in-small",H,["literal",R]]}}function lf(H){switch(H){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",H]}}function iu(H){return["!",H]}function Kc(H){let R=typeof H;if(R==="number"||R==="boolean"||R==="string"||H==null)return JSON.stringify(H);if(Array.isArray(H)){let Ee="[";for(let Be of H)Ee+=`${Kc(Be)},`;return`${Ee}]`}let J=Object.keys(H).sort(),ve="{";for(let Ee=0;Eeve.maximum?[new se(R,J,`${J} is greater than the maximum value ${ve.maximum}`)]:[]}function uf(H){let R=H.valueSpec,J=sl(H.value.type),ve,Ee,Be,Ge={},ct=J!=="categorical"&&H.value.property===void 0,At=!ct,Nt=Zs(H.value.stops)==="array"&&Zs(H.value.stops[0])==="array"&&Zs(H.value.stops[0][0])==="object",ar=Pu({key:H.key,value:H.value,valueSpec:H.styleSpec.function,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{stops:function(Wr){if(J==="identity")return[new se(Wr.key,Wr.value,'identity function may not have a "stops" property')];let ia=[],fa=Wr.value;return ia=ia.concat(Cf({key:Wr.key,value:fa,valueSpec:Wr.valueSpec,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,arrayElementValidator:Mr})),Zs(fa)==="array"&&fa.length===0&&ia.push(new se(Wr.key,fa,"array must have at least one stop")),ia},default:function(Wr){return Wr.validateSpec({key:Wr.key,value:Wr.value,valueSpec:R,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec})}}});return J==="identity"&&ct&&ar.push(new se(H.key,H.value,'missing required property "property"')),J==="identity"||H.value.stops||ar.push(new se(H.key,H.value,'missing required property "stops"')),J==="exponential"&&H.valueSpec.expression&&!Sc(H.valueSpec)&&ar.push(new se(H.key,H.value,"exponential functions not supported")),H.styleSpec.$version>=8&&(At&&!eu(H.valueSpec)?ar.push(new se(H.key,H.value,"property functions not supported")):ct&&!qc(H.valueSpec)&&ar.push(new se(H.key,H.value,"zoom functions not supported"))),J!=="categorical"&&!Nt||H.value.property!==void 0||ar.push(new se(H.key,H.value,'"property" property is required')),ar;function Mr(Wr){let ia=[],fa=Wr.value,ja=Wr.key;if(Zs(fa)!=="array")return[new se(ja,fa,`array expected, ${Zs(fa)} found`)];if(fa.length!==2)return[new se(ja,fa,`array length 2 expected, length ${fa.length} found`)];if(Nt){if(Zs(fa[0])!=="object")return[new se(ja,fa,`object expected, ${Zs(fa[0])} found`)];if(fa[0].zoom===void 0)return[new se(ja,fa,"object stop key must have zoom")];if(fa[0].value===void 0)return[new se(ja,fa,"object stop key must have value")];if(Be&&Be>sl(fa[0].zoom))return[new se(ja,fa[0].zoom,"stop zoom values must appear in ascending order")];sl(fa[0].zoom)!==Be&&(Be=sl(fa[0].zoom),Ee=void 0,Ge={}),ia=ia.concat(Pu({key:`${ja}[0]`,value:fa[0],valueSpec:{zoom:{}},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,objectElementValidators:{zoom:hl,value:zr}}))}else ia=ia.concat(zr({key:`${ja}[0]`,value:fa[0],valueSpec:{},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec},fa));return Mc(_u(fa[1]))?ia.concat([new se(`${ja}[1]`,fa[1],"expressions are not allowed in function stops.")]):ia.concat(Wr.validateSpec({key:`${ja}[1]`,value:fa[1],valueSpec:R,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec}))}function zr(Wr,ia){let fa=Zs(Wr.value),ja=sl(Wr.value),Ka=Wr.value!==null?Wr.value:ia;if(ve){if(fa!==ve)return[new se(Wr.key,Ka,`${fa} stop domain type must match previous stop domain type ${ve}`)]}else ve=fa;if(fa!=="number"&&fa!=="string"&&fa!=="boolean")return[new se(Wr.key,Ka,"stop domain value must be a number, string, or boolean")];if(fa!=="number"&&J!=="categorical"){let Wi=`number expected, ${fa} found`;return eu(R)&&J===void 0&&(Wi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new se(Wr.key,Ka,Wi)]}return J!=="categorical"||fa!=="number"||isFinite(ja)&&Math.floor(ja)===ja?J!=="categorical"&&fa==="number"&&Ee!==void 0&&janew se(`${H.key}${ve.key}`,H.value,ve.message));let J=R.value.expression||R.value._styleExpression.expression;if(H.expressionContext==="property"&&H.propertyKey==="text-font"&&!J.outputDefined())return[new se(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(J))return[new se(H.key,H.value,'"feature-state" data expressions are not supported with layout properties.')];if(H.expressionContext==="filter"&&!Gu(J))return[new se(H.key,H.value,'"feature-state" data expressions are not supported with filters.')];if(H.expressionContext&&H.expressionContext.indexOf("cluster")===0){if(!Ef(J,["zoom","feature-state"]))return[new se(H.key,H.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(H.expressionContext==="cluster-initial"&&!Nf(J))return[new se(H.key,H.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hu(H){let R=H.key,J=H.value,ve=H.valueSpec,Ee=[];return Array.isArray(ve.values)?ve.values.indexOf(sl(J))===-1&&Ee.push(new se(R,J,`expected one of [${ve.values.join(", ")}], ${JSON.stringify(J)} found`)):Object.keys(ve.values).indexOf(sl(J))===-1&&Ee.push(new se(R,J,`expected one of [${Object.keys(ve.values).join(", ")}], ${JSON.stringify(J)} found`)),Ee}function gf(H){return Qf(_u(H.value))?kc(ne({},H,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(H)}function Wu(H){let R=H.value,J=H.key;if(Zs(R)!=="array")return[new se(J,R,`array expected, ${Zs(R)} found`)];let ve=H.styleSpec,Ee,Be=[];if(R.length<1)return[new se(J,R,"filter array must have at least 1 element")];switch(Be=Be.concat(Hu({key:`${J}[0]`,value:R[0],valueSpec:ve.filter_operator,style:H.style,styleSpec:H.styleSpec})),sl(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&sl(R[1])==="$type"&&Be.push(new se(J,R,`"$type" cannot be use with operator "${R[0]}"`));case"==":case"!=":R.length!==3&&Be.push(new se(J,R,`filter array for operator "${R[0]}" must have 3 elements`));case"in":case"!in":R.length>=2&&(Ee=Zs(R[1]),Ee!=="string"&&Be.push(new se(`${J}[1]`,R[1],`string expected, ${Ee} found`)));for(let Ge=2;Ge{Nt in J&&R.push(new se(ve,J[Nt],`"${Nt}" is prohibited for ref layers`))}),Ee.layers.forEach(Nt=>{sl(Nt.id)===ct&&(At=Nt)}),At?At.ref?R.push(new se(ve,J.ref,"ref cannot reference another ref layer")):Ge=sl(At.type):R.push(new se(ve,J.ref,`ref layer "${ct}" not found`))}else if(Ge!=="background")if(J.source){let At=Ee.sources&&Ee.sources[J.source],Nt=At&&sl(At.type);At?Nt==="vector"&&Ge==="raster"?R.push(new se(ve,J.source,`layer "${J.id}" requires a raster source`)):Nt!=="raster-dem"&&Ge==="hillshade"?R.push(new se(ve,J.source,`layer "${J.id}" requires a raster-dem source`)):Nt==="raster"&&Ge!=="raster"?R.push(new se(ve,J.source,`layer "${J.id}" requires a vector source`)):Nt!=="vector"||J["source-layer"]?Nt==="raster-dem"&&Ge!=="hillshade"?R.push(new se(ve,J.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ge!=="line"||!J.paint||!J.paint["line-gradient"]||Nt==="geojson"&&At.lineMetrics||R.push(new se(ve,J,`layer "${J.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):R.push(new se(ve,J,`layer "${J.id}" must specify a "source-layer"`)):R.push(new se(ve,J.source,`source "${J.source}" not found`))}else R.push(new se(ve,J,'missing required property "source"'));return R=R.concat(Pu({key:ve,value:J,valueSpec:Be.layer,style:H.style,styleSpec:H.styleSpec,validateSpec:H.validateSpec,objectElementValidators:{"*":()=>[],type:()=>H.validateSpec({key:`${ve}.type`,value:J.type,valueSpec:Be.layer.type,style:H.style,styleSpec:H.styleSpec,validateSpec:H.validateSpec,object:J,objectKey:"type"}),filter:gf,layout:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Nt=>nu(ne({layerType:Ge},Nt))}}),paint:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Nt=>Lf(ne({layerType:Ge},Nt))}})}})),R}function Xu(H){let R=H.value,J=H.key,ve=Zs(R);return ve!=="string"?[new se(J,R,`string expected, ${ve} found`)]:[]}let Cc={promoteId:function({key:H,value:R}){if(Zs(R)==="string")return Xu({key:H,value:R});{let J=[];for(let ve in R)J.push(...Xu({key:`${H}.${ve}`,value:R[ve]}));return J}}};function gc(H){let R=H.value,J=H.key,ve=H.styleSpec,Ee=H.style,Be=H.validateSpec;if(!R.type)return[new se(J,R,'"type" is required')];let Ge=sl(R.type),ct;switch(Ge){case"vector":case"raster":return ct=Pu({key:J,value:R,valueSpec:ve[`source_${Ge.replace("-","_")}`],style:H.style,styleSpec:ve,objectElementValidators:Cc,validateSpec:Be}),ct;case"raster-dem":return ct=function(At){var Nt;let ar=(Nt=At.sourceName)!==null&&Nt!==void 0?Nt:"",Mr=At.value,zr=At.styleSpec,Wr=zr.source_raster_dem,ia=At.style,fa=[],ja=Zs(Mr);if(Mr===void 0)return fa;if(ja!=="object")return fa.push(new se("source_raster_dem",Mr,`object expected, ${ja} found`)),fa;let Ka=sl(Mr.encoding)==="custom",Wi=["redFactor","greenFactor","blueFactor","baseShift"],gi=At.value.encoding?`"${At.value.encoding}"`:"Default";for(let qi in Mr)!Ka&&Wi.includes(qi)?fa.push(new se(qi,Mr[qi],`In "${ar}": "${qi}" is only valid when "encoding" is set to "custom". ${gi} encoding found`)):Wr[qi]?fa=fa.concat(At.validateSpec({key:qi,value:Mr[qi],valueSpec:Wr[qi],validateSpec:At.validateSpec,style:ia,styleSpec:zr})):fa.push(new se(qi,Mr[qi],`unknown property "${qi}"`));return fa}({sourceName:J,value:R,style:H.style,styleSpec:ve,validateSpec:Be}),ct;case"geojson":if(ct=Pu({key:J,value:R,valueSpec:ve.source_geojson,style:Ee,styleSpec:ve,validateSpec:Be,objectElementValidators:Cc}),R.cluster)for(let At in R.clusterProperties){let[Nt,ar]=R.clusterProperties[At],Mr=typeof Nt=="string"?[Nt,["accumulated"],["get",At]]:Nt;ct.push(...kc({key:`${J}.${At}.map`,value:ar,validateSpec:Be,expressionContext:"cluster-map"})),ct.push(...kc({key:`${J}.${At}.reduce`,value:Mr,validateSpec:Be,expressionContext:"cluster-reduce"}))}return ct;case"video":return Pu({key:J,value:R,valueSpec:ve.source_video,style:Ee,validateSpec:Be,styleSpec:ve});case"image":return Pu({key:J,value:R,valueSpec:ve.source_image,style:Ee,validateSpec:Be,styleSpec:ve});case"canvas":return[new se(J,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Hu({key:`${J}.type`,value:R.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:Ee,validateSpec:Be,styleSpec:ve})}}function Vl(H){let R=H.value,J=H.styleSpec,ve=J.light,Ee=H.style,Be=[],Ge=Zs(R);if(R===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new se("light",R,`object expected, ${Ge} found`)]),Be;for(let ct in R){let At=ct.match(/^(.*)-transition$/);Be=Be.concat(At&&ve[At[1]]&&ve[At[1]].transition?H.validateSpec({key:ct,value:R[ct],valueSpec:J.transition,validateSpec:H.validateSpec,style:Ee,styleSpec:J}):ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],validateSpec:H.validateSpec,style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)])}return Be}function xu(H){let R=H.value,J=H.styleSpec,ve=J.sky,Ee=H.style,Be=Zs(R);if(R===void 0)return[];if(Be!=="object")return[new se("sky",R,`object expected, ${Be} found`)];let Ge=[];for(let ct in R)Ge=Ge.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Ge}function Lc(H){let R=H.value,J=H.styleSpec,ve=J.terrain,Ee=H.style,Be=[],Ge=Zs(R);if(R===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new se("terrain",R,`object expected, ${Ge} found`)]),Be;for(let ct in R)Be=Be.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],validateSpec:H.validateSpec,style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Be}function $c(H){let R=[],J=H.value,ve=H.key;if(Array.isArray(J)){let Ee=[],Be=[];for(let Ge in J)J[Ge].id&&Ee.includes(J[Ge].id)&&R.push(new se(ve,J,`all the sprites' ids must be unique, but ${J[Ge].id} is duplicated`)),Ee.push(J[Ge].id),J[Ge].url&&Be.includes(J[Ge].url)&&R.push(new se(ve,J,`all the sprites' URLs must be unique, but ${J[Ge].url} is duplicated`)),Be.push(J[Ge].url),R=R.concat(Pu({key:`${ve}[${Ge}]`,value:J[Ge],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:H.validateSpec}));return R}return Xu({key:ve,value:J})}let sc={"*":()=>[],array:Cf,boolean:function(H){let R=H.value,J=H.key,ve=Zs(R);return ve!=="boolean"?[new se(J,R,`boolean expected, ${ve} found`)]:[]},number:hl,color:function(H){let R=H.key,J=H.value,ve=Zs(J);return ve!=="string"?[new se(R,J,`color expected, ${ve} found`)]:Jt.parse(String(J))?[]:[new se(R,J,`color expected, "${J}" found`)]},constants:mf,enum:Hu,filter:gf,function:uf,layer:Vf,object:Pu,source:gc,light:Vl,sky:xu,terrain:Lc,projection:function(H){let R=H.value,J=H.styleSpec,ve=J.projection,Ee=H.style,Be=Zs(R);if(R===void 0)return[];if(Be!=="object")return[new se("projection",R,`object expected, ${Be} found`)];let Ge=[];for(let ct in R)Ge=Ge.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Ge},string:Xu,formatted:function(H){return Xu(H).length===0?[]:kc(H)},resolvedImage:function(H){return Xu(H).length===0?[]:kc(H)},padding:function(H){let R=H.key,J=H.value;if(Zs(J)==="array"){if(J.length<1||J.length>4)return[new se(R,J,`padding requires 1 to 4 values; ${J.length} values found`)];let ve={type:"number"},Ee=[];for(let Be=0;Be[]}})),H.constants&&(J=J.concat(mf({key:"constants",value:H.constants,style:H,styleSpec:R,validateSpec:Pc}))),$r(J)}function aa(H){return function(R){return H(vs(So({},R),{validateSpec:Pc}))}}function $r(H){return[].concat(H).sort((R,J)=>R.line-J.line)}function ka(H){return function(...R){return $r(H.apply(this,R))}}xr.source=ka(aa(gc)),xr.sprite=ka(aa($c)),xr.glyphs=ka(aa(Qt)),xr.light=ka(aa(Vl)),xr.sky=ka(aa(xu)),xr.terrain=ka(aa(Lc)),xr.layer=ka(aa(Vf)),xr.filter=ka(aa(gf)),xr.paintProperty=ka(aa(Lf)),xr.layoutProperty=ka(aa(nu));let li=xr,Ci=li.light,Hi=li.sky,Qi=li.paintProperty,pn=li.layoutProperty;function Pi(H,R){let J=!1;if(R&&R.length)for(let ve of R)H.fire(new j(new Error(ve.message))),J=!0;return J}class Di{constructor(R,J,ve){let Ee=this.cells=[];if(R instanceof ArrayBuffer){this.arrayBuffer=R;let Ge=new Int32Array(this.arrayBuffer);R=Ge[0],this.d=(J=Ge[1])+2*(ve=Ge[2]);for(let At=0;At=Mr[ia+0]&&Ee>=Mr[ia+1])?(ct[Wr]=!0,Ge.push(ar[Wr])):ct[Wr]=!1}}}}_forEachCell(R,J,ve,Ee,Be,Ge,ct,At){let Nt=this._convertToCellCoord(R),ar=this._convertToCellCoord(J),Mr=this._convertToCellCoord(ve),zr=this._convertToCellCoord(Ee);for(let Wr=Nt;Wr<=Mr;Wr++)for(let ia=ar;ia<=zr;ia++){let fa=this.d*ia+Wr;if((!At||At(this._convertFromCellCoord(Wr),this._convertFromCellCoord(ia),this._convertFromCellCoord(Wr+1),this._convertFromCellCoord(ia+1)))&&Be.call(this,R,J,ve,Ee,fa,Ge,ct,At))return}}_convertFromCellCoord(R){return(R-this.padding)/this.scale}_convertToCellCoord(R){return Math.max(0,Math.min(this.d-1,Math.floor(R*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let R=this.cells,J=3+this.cells.length+1+1,ve=0;for(let Ge=0;Ge=0)continue;let Ge=H[Be];Ee[Be]=Ni[J].shallow.indexOf(Be)>=0?Ge:eo(Ge,R)}H instanceof Error&&(Ee.message=H.message)}if(Ee.$name)throw new Error("$name property is reserved for worker serialization logic.");return J!=="Object"&&(Ee.$name=J),Ee}function co(H){if(io(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 R=Qn(H)||"Object";if(!Ni[R])throw new Error(`can't deserialize unregistered class ${R}`);let{klass:J}=Ni[R];if(!J)throw new Error(`can't deserialize unregistered class ${R}`);if(J.deserialize)return J.deserialize(H);let ve=Object.create(J.prototype);for(let Ee of Object.keys(H)){if(Ee==="$name")continue;let Be=H[Ee];ve[Ee]=Ni[R].shallow.indexOf(Ee)>=0?Be:co(Be)}return ve}class Tn{constructor(){this.first=!0}update(R,J){let ve=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=ve,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=ve,!0):(this.lastFloorZoom>ve?(this.lastIntegerZoom=ve+1,this.lastIntegerZoomTime=J):this.lastFloorZoomH>=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 yo(H){for(let R of H)if(Ss(R.charCodeAt(0)))return!0;return!1}function Qo(H){for(let R of H)if(!Ns(R.charCodeAt(0)))return!1;return!0}function ks(H){let R=H.map(J=>{try{return new RegExp(`\\p{sc=${J}}`,"u").source}catch{return null}}).filter(J=>J);return new RegExp(R.join("|"),"u")}let rl=ks(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ns(H){return!rl.test(String.fromCodePoint(H))}let el=ks(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ss(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))||el.test(String.fromCodePoint(H)))))}function Fl(H){return!(Ss(H)||function(R){return!!(un["Latin-1 Supplement"](R)&&(R===167||R===169||R===174||R===177||R===188||R===189||R===190||R===215||R===247)||un["General Punctuation"](R)&&(R===8214||R===8224||R===8225||R===8240||R===8241||R===8251||R===8252||R===8258||R===8263||R===8264||R===8265||R===8273)||un["Letterlike Symbols"](R)||un["Number Forms"](R)||un["Miscellaneous Technical"](R)&&(R>=8960&&R<=8967||R>=8972&&R<=8991||R>=8996&&R<=9e3||R===9003||R>=9085&&R<=9114||R>=9150&&R<=9165||R===9167||R>=9169&&R<=9179||R>=9186&&R<=9215)||un["Control Pictures"](R)&&R!==9251||un["Optical Character Recognition"](R)||un["Enclosed Alphanumerics"](R)||un["Geometric Shapes"](R)||un["Miscellaneous Symbols"](R)&&!(R>=9754&&R<=9759)||un["Miscellaneous Symbols and Arrows"](R)&&(R>=11026&&R<=11055||R>=11088&&R<=11097||R>=11192&&R<=11243)||un["CJK Symbols and Punctuation"](R)||un.Katakana(R)||un["Private Use Area"](R)||un["CJK Compatibility Forms"](R)||un["Small Form Variants"](R)||un["Halfwidth and Fullwidth Forms"](R)||R===8734||R===8756||R===8757||R>=9984&&R<=10087||R>=10102&&R<=10131||R===65532||R===65533)}(H))}let yl=ks(["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 ll(H){return yl.test(String.fromCodePoint(H))}function Un(H,R){return!(!R&&ll(H)||H>=2304&&H<=3583||H>=3840&&H<=4255||un.Khmer(H))}function Ro(H){for(let R of H)if(ll(R.charCodeAt(0)))return!0;return!1}let Js=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 Fs{constructor(R,J){this.zoom=R,J?(this.now=J.now,this.fadeDuration=J.fadeDuration,this.zoomHistory=J.zoomHistory,this.transition=J.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Tn,this.transition={})}isSupportedScript(R){return function(J,ve){for(let Ee of J)if(!Un(Ee.charCodeAt(0),ve))return!1;return!0}(R,Js.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let R=this.zoom,J=R-Math.floor(R),ve=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:J+(1-J)*ve}:{fromScale:.5,toScale:1,t:1-(1-ve)*J}}}class cu{constructor(R,J){this.property=R,this.value=J,this.expression=function(ve,Ee){if(kf(ve))return new Ml(ve,Ee);if(Mc(ve)){let Be=Tu(ve,Ee);if(Be.result==="error")throw new Error(Be.value.map(Ge=>`${Ge.key}: ${Ge.message}`).join(", "));return Be.value}{let Be=ve;return Ee.type==="color"&&typeof ve=="string"?Be=Jt.parse(ve):Ee.type!=="padding"||typeof ve!="number"&&!Array.isArray(ve)?Ee.type==="variableAnchorOffsetCollection"&&Array.isArray(ve)&&(Be=$a.parse(ve)):Be=ca.parse(ve),{kind:"constant",evaluate:()=>Be}}}(J===void 0?R.specification.default:J,R.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(R,J,ve){return this.property.possiblyEvaluate(this,R,J,ve)}}class Iu{constructor(R){this.property=R,this.value=new cu(R,void 0)}transitioned(R,J){return new Ic(this.property,this.value,J,E({},R.transition,this.transition),R.now)}untransitioned(){return new Ic(this.property,this.value,null,{},0)}}class Zu{constructor(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)}getValue(R){return u(this._values[R].value.value)}setValue(R,J){Object.prototype.hasOwnProperty.call(this._values,R)||(this._values[R]=new Iu(this._values[R].property)),this._values[R].value=new cu(this._values[R].property,J===null?void 0:u(J))}getTransition(R){return u(this._values[R].transition)}setTransition(R,J){Object.prototype.hasOwnProperty.call(this._values,R)||(this._values[R]=new Iu(this._values[R].property)),this._values[R].transition=u(J)||void 0}serialize(){let R={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(R[J]=ve);let Ee=this.getTransition(J);Ee!==void 0&&(R[`${J}-transition`]=Ee)}return R}transitioned(R,J){let ve=new bu(this._properties);for(let Ee of Object.keys(this._values))ve._values[Ee]=this._values[Ee].transitioned(R,J._values[Ee]);return ve}untransitioned(){let R=new bu(this._properties);for(let J of Object.keys(this._values))R._values[J]=this._values[J].untransitioned();return R}}class Ic{constructor(R,J,ve,Ee,Be){this.property=R,this.value=J,this.begin=Be+Ee.delay||0,this.end=this.begin+Ee.duration||0,R.specification.transition&&(Ee.delay||Ee.duration)&&(this.prior=ve)}possiblyEvaluate(R,J,ve){let Ee=R.now||0,Be=this.value.possiblyEvaluate(R,J,ve),Ge=this.prior;if(Ge){if(Ee>this.end)return this.prior=null,Be;if(this.value.isDataDriven())return this.prior=null,Be;if(Ee=1)return 1;let Nt=At*At,ar=Nt*At;return 4*(At<.5?ar:3*(At-Nt)+ar-.75)}(ct))}}return Be}}class bu{constructor(R){this._properties=R,this._values=Object.create(R.defaultTransitioningPropertyValues)}possiblyEvaluate(R,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(R,J,ve);return Ee}hasTransition(){for(let R of Object.keys(this._values))if(this._values[R].prior)return!0;return!1}}class Rc{constructor(R){this._properties=R,this._values=Object.create(R.defaultPropertyValues)}hasValue(R){return this._values[R].value!==void 0}getValue(R){return u(this._values[R].value)}setValue(R,J){this._values[R]=new cu(this._values[R].property,J===null?void 0:u(J))}serialize(){let R={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(R[J]=ve)}return R}possiblyEvaluate(R,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(R,J,ve);return Ee}}class Au{constructor(R,J,ve){this.property=R,this.value=J,this.parameters=ve}isConstant(){return this.value.kind==="constant"}constantOr(R){return this.value.kind==="constant"?this.value.value:R}evaluate(R,J,ve,Ee){return this.property.evaluate(this.value,this.parameters,R,J,ve,Ee)}}class yc{constructor(R){this._properties=R,this._values=Object.create(R.defaultPossiblyEvaluatedValues)}get(R){return this._values[R]}}class fo{constructor(R){this.specification=R}possiblyEvaluate(R,J){if(R.isDataDriven())throw new Error("Value should not be data driven");return R.expression.evaluate(J)}interpolate(R,J,ve){let Ee=En[this.specification.type];return Ee?Ee(R,J,ve):R}}class Fo{constructor(R,J){this.specification=R,this.overrides=J}possiblyEvaluate(R,J,ve,Ee){return new Au(this,R.expression.kind==="constant"||R.expression.kind==="camera"?{kind:"constant",value:R.expression.evaluate(J,null,{},ve,Ee)}:R.expression,J)}interpolate(R,J,ve){if(R.value.kind!=="constant"||J.value.kind!=="constant")return R;if(R.value.value===void 0||J.value.value===void 0)return new Au(this,{kind:"constant",value:void 0},R.parameters);let Ee=En[this.specification.type];if(Ee){let Be=Ee(R.value.value,J.value.value,ve);return new Au(this,{kind:"constant",value:Be},R.parameters)}return R}evaluate(R,J,ve,Ee,Be,Ge){return R.kind==="constant"?R.value:R.evaluate(J,ve,Ee,Be,Ge)}}class Dc extends Fo{possiblyEvaluate(R,J,ve,Ee){if(R.value===void 0)return new Au(this,{kind:"constant",value:void 0},J);if(R.expression.kind==="constant"){let Be=R.expression.evaluate(J,null,{},ve,Ee),Ge=R.property.specification.type==="resolvedImage"&&typeof Be!="string"?Be.name:Be,ct=this._calculate(Ge,Ge,Ge,J);return new Au(this,{kind:"constant",value:ct},J)}if(R.expression.kind==="camera"){let Be=this._calculate(R.expression.evaluate({zoom:J.zoom-1}),R.expression.evaluate({zoom:J.zoom}),R.expression.evaluate({zoom:J.zoom+1}),J);return new Au(this,{kind:"constant",value:Be},J)}return new Au(this,R.expression,J)}evaluate(R,J,ve,Ee,Be,Ge){if(R.kind==="source"){let ct=R.evaluate(J,ve,Ee,Be,Ge);return this._calculate(ct,ct,ct,J)}return R.kind==="composite"?this._calculate(R.evaluate({zoom:Math.floor(J.zoom)-1},ve,Ee),R.evaluate({zoom:Math.floor(J.zoom)},ve,Ee),R.evaluate({zoom:Math.floor(J.zoom)+1},ve,Ee),J):R.value}_calculate(R,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:R,to:J}:{from:ve,to:J}}interpolate(R){return R}}class lc{constructor(R){this.specification=R}possiblyEvaluate(R,J,ve,Ee){if(R.value!==void 0){if(R.expression.kind==="constant"){let Be=R.expression.evaluate(J,null,{},ve,Ee);return this._calculate(Be,Be,Be,J)}return this._calculate(R.expression.evaluate(new Fs(Math.floor(J.zoom-1),J)),R.expression.evaluate(new Fs(Math.floor(J.zoom),J)),R.expression.evaluate(new Fs(Math.floor(J.zoom+1),J)),J)}}_calculate(R,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:R,to:J}:{from:ve,to:J}}interpolate(R){return R}}class Yu{constructor(R){this.specification=R}possiblyEvaluate(R,J,ve,Ee){return!!R.expression.evaluate(J,null,{},ve,Ee)}interpolate(){return!1}}class Oe{constructor(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let J in R){let ve=R[J];ve.specification.overridable&&this.overridableProperties.push(J);let Ee=this.defaultPropertyValues[J]=new cu(ve,void 0),Be=this.defaultTransitionablePropertyValues[J]=new Iu(ve);this.defaultTransitioningPropertyValues[J]=Be.untransitioned(),this.defaultPossiblyEvaluatedValues[J]=Ee.possiblyEvaluate({})}}}mi("DataDrivenProperty",Fo),mi("DataConstantProperty",fo),mi("CrossFadedDataDrivenProperty",Dc),mi("CrossFadedProperty",lc),mi("ColorRampProperty",Yu);let I="-transition";class ie extends ee{constructor(R,J){if(super(),this.id=R.id,this.type=R.type,this._featureFilter={filter:()=>!0,needGeometry:!1},R.type!=="custom"&&(this.metadata=R.metadata,this.minzoom=R.minzoom,this.maxzoom=R.maxzoom,R.type!=="background"&&(this.source=R.source,this.sourceLayer=R["source-layer"],this.filter=R.filter),J.layout&&(this._unevaluatedLayout=new Rc(J.layout)),J.paint)){this._transitionablePaint=new Zu(J.paint);for(let ve in R.paint)this.setPaintProperty(ve,R.paint[ve],{validate:!1});for(let ve in R.layout)this.setLayoutProperty(ve,R.layout[ve],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(J.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(R){return R==="visibility"?this.visibility:this._unevaluatedLayout.getValue(R)}setLayoutProperty(R,J,ve={}){J!=null&&this._validate(pn,`layers.${this.id}.layout.${R}`,R,J,ve)||(R!=="visibility"?this._unevaluatedLayout.setValue(R,J):this.visibility=J)}getPaintProperty(R){return R.endsWith(I)?this._transitionablePaint.getTransition(R.slice(0,-11)):this._transitionablePaint.getValue(R)}setPaintProperty(R,J,ve={}){if(J!=null&&this._validate(Qi,`layers.${this.id}.paint.${R}`,R,J,ve))return!1;if(R.endsWith(I))return this._transitionablePaint.setTransition(R.slice(0,-11),J||void 0),!1;{let Ee=this._transitionablePaint._values[R],Be=Ee.property.specification["property-type"]==="cross-faded-data-driven",Ge=Ee.value.isDataDriven(),ct=Ee.value;this._transitionablePaint.setValue(R,J),this._handleSpecialPaintPropertyUpdate(R);let At=this._transitionablePaint._values[R].value;return At.isDataDriven()||Ge||Be||this._handleOverridablePaintPropertyUpdate(R,ct,At)}}_handleSpecialPaintPropertyUpdate(R){}_handleOverridablePaintPropertyUpdate(R,J,ve){return!1}isHidden(R){return!!(this.minzoom&&R=this.maxzoom)||this.visibility==="none"}updateTransitions(R){this._transitioningPaint=this._transitionablePaint.transitioned(R,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(R,J){R.getCrossfadeParameters&&(this._crossfadeParameters=R.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(R,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(R,void 0,J)}serialize(){let R={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&&(R.layout=R.layout||{},R.layout.visibility=this.visibility),d(R,(J,ve)=>!(J===void 0||ve==="layout"&&!Object.keys(J).length||ve==="paint"&&!Object.keys(J).length))}_validate(R,J,ve,Ee,Be={}){return(!Be||Be.validate!==!1)&&Pi(this,R.call(li,{key:J,layerType:this.type,objectKey:ve,value:Ee,styleSpec:te,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let R in this.paint._values){let J=this.paint.get(R);if(J instanceof Au&&eu(J.property.specification)&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1}}let Te={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Me{constructor(R,J){this._structArray=R,this._pos1=J*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ze{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(R,J){return R._trim(),J&&(R.isTransferred=!0,J.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}}static deserialize(R){let J=Object.create(this.prototype);return J.arrayBuffer=R.arrayBuffer,J.length=R.length,J.capacity=R.arrayBuffer.byteLength/J.bytesPerElement,J._refreshViews(),J}_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(R){this.reserve(R),this.length=R}reserve(R){if(R>this.capacity){this.capacity=Math.max(R,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let J=this.uint8;this._refreshViews(),J&&this.uint8.set(J)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ht(H,R=1){let J=0,ve=0;return{members:H.map(Ee=>{let Be=Te[Ee.type].BYTES_PER_ELEMENT,Ge=J=wt(J,Math.max(R,Be)),ct=Ee.components||1;return ve=Math.max(ve,Be),J+=Be*ct,{name:Ee.name,type:Ee.type,components:ct,offset:Ge}}),size:wt(J,Math.max(ve,R)),alignment:R}}function wt(H,R){return Math.ceil(H/R)*R}class Ot extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.int16[Ee+0]=J,this.int16[Ee+1]=ve,R}}Ot.prototype.bytesPerElement=4,mi("StructArrayLayout2i4",Ot);class $t extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.int16[Be+0]=J,this.int16[Be+1]=ve,this.int16[Be+2]=Ee,R}}$t.prototype.bytesPerElement=6,mi("StructArrayLayout3i6",$t);class Tr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,R,J,ve,Ee)}emplace(R,J,ve,Ee,Be){let Ge=4*R;return this.int16[Ge+0]=J,this.int16[Ge+1]=ve,this.int16[Ge+2]=Ee,this.int16[Ge+3]=Be,R}}Tr.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Tr);class Sr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=6*R;return this.int16[At+0]=J,this.int16[At+1]=ve,this.int16[At+2]=Ee,this.int16[At+3]=Be,this.int16[At+4]=Ge,this.int16[At+5]=ct,R}}Sr.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Sr);class Kr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=4*R,Nt=8*R;return this.int16[At+0]=J,this.int16[At+1]=ve,this.uint8[Nt+4]=Ee,this.uint8[Nt+5]=Be,this.uint8[Nt+6]=Ge,this.uint8[Nt+7]=ct,R}}Kr.prototype.bytesPerElement=8,mi("StructArrayLayout2i4ub8",Kr);class na extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.float32[Ee+0]=J,this.float32[Ee+1]=ve,R}}na.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",na);class qe extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=this.length;return this.resize(Mr+1),this.emplace(Mr,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr){let zr=10*R;return this.uint16[zr+0]=J,this.uint16[zr+1]=ve,this.uint16[zr+2]=Ee,this.uint16[zr+3]=Be,this.uint16[zr+4]=Ge,this.uint16[zr+5]=ct,this.uint16[zr+6]=At,this.uint16[zr+7]=Nt,this.uint16[zr+8]=ar,this.uint16[zr+9]=Mr,R}}qe.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",qe);class $e extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr){let Wr=this.length;return this.resize(Wr+1),this.emplace(Wr,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr){let ia=12*R;return this.int16[ia+0]=J,this.int16[ia+1]=ve,this.int16[ia+2]=Ee,this.int16[ia+3]=Be,this.uint16[ia+4]=Ge,this.uint16[ia+5]=ct,this.uint16[ia+6]=At,this.uint16[ia+7]=Nt,this.int16[ia+8]=ar,this.int16[ia+9]=Mr,this.int16[ia+10]=zr,this.int16[ia+11]=Wr,R}}$e.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",$e);class lt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.float32[Be+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,R}}lt.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",lt);class pt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.uint32[1*R+0]=J,R}}pt.prototype.bytesPerElement=4,mi("StructArrayLayout1ul4",pt);class Et extends ze{_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(R,J,ve,Ee,Be,Ge,ct,At,Nt){let ar=this.length;return this.resize(ar+1),this.emplace(ar,R,J,ve,Ee,Be,Ge,ct,At,Nt)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=10*R,zr=5*R;return this.int16[Mr+0]=J,this.int16[Mr+1]=ve,this.int16[Mr+2]=Ee,this.int16[Mr+3]=Be,this.int16[Mr+4]=Ge,this.int16[Mr+5]=ct,this.uint32[zr+3]=At,this.uint16[Mr+8]=Nt,this.uint16[Mr+9]=ar,R}}Et.prototype.bytesPerElement=20,mi("StructArrayLayout6i1ul2ui20",Et);class bt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=6*R;return this.int16[At+0]=J,this.int16[At+1]=ve,this.int16[At+2]=Ee,this.int16[At+3]=Be,this.int16[At+4]=Ge,this.int16[At+5]=ct,R}}bt.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",bt);class Dt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,R,J,ve,Ee,Be)}emplace(R,J,ve,Ee,Be,Ge){let ct=4*R,At=8*R;return this.float32[ct+0]=J,this.float32[ct+1]=ve,this.float32[ct+2]=Ee,this.int16[At+6]=Be,this.int16[At+7]=Ge,R}}Dt.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",Dt);class ur extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=16*R,Nt=4*R,ar=8*R;return this.uint8[At+0]=J,this.uint8[At+1]=ve,this.float32[Nt+1]=Ee,this.float32[Nt+2]=Be,this.int16[ar+6]=Ge,this.int16[ar+7]=ct,R}}ur.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",ur);class yr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.uint16[Be+0]=J,this.uint16[Be+1]=ve,this.uint16[Be+2]=Ee,R}}yr.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",yr);class Er extends ze{_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(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka){let Wi=this.length;return this.resize(Wi+1),this.emplace(Wi,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi){let gi=24*R,qi=12*R,en=48*R;return this.int16[gi+0]=J,this.int16[gi+1]=ve,this.uint16[gi+2]=Ee,this.uint16[gi+3]=Be,this.uint32[qi+2]=Ge,this.uint32[qi+3]=ct,this.uint32[qi+4]=At,this.uint16[gi+10]=Nt,this.uint16[gi+11]=ar,this.uint16[gi+12]=Mr,this.float32[qi+7]=zr,this.float32[qi+8]=Wr,this.uint8[en+36]=ia,this.uint8[en+37]=fa,this.uint8[en+38]=ja,this.uint32[qi+10]=Ka,this.int16[gi+22]=Wi,R}}Er.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Er);class jr extends ze{_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(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo){let Bo=this.length;return this.resize(Bo+1),this.emplace(Bo,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo,Bo){let xn=32*R,cs=16*R;return this.int16[xn+0]=J,this.int16[xn+1]=ve,this.int16[xn+2]=Ee,this.int16[xn+3]=Be,this.int16[xn+4]=Ge,this.int16[xn+5]=ct,this.int16[xn+6]=At,this.int16[xn+7]=Nt,this.uint16[xn+8]=ar,this.uint16[xn+9]=Mr,this.uint16[xn+10]=zr,this.uint16[xn+11]=Wr,this.uint16[xn+12]=ia,this.uint16[xn+13]=fa,this.uint16[xn+14]=ja,this.uint16[xn+15]=Ka,this.uint16[xn+16]=Wi,this.uint16[xn+17]=gi,this.uint16[xn+18]=qi,this.uint16[xn+19]=en,this.uint16[xn+20]=jn,this.uint16[xn+21]=Lo,this.uint16[xn+22]=xs,this.uint32[cs+12]=vo,this.float32[cs+13]=zn,this.float32[cs+14]=is,this.uint16[xn+30]=qo,this.uint16[xn+31]=Bo,R}}jr.prototype.bytesPerElement=64,mi("StructArrayLayout8i15ui1ul2f2ui64",jr);class Qr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.float32[1*R+0]=J,R}}Qr.prototype.bytesPerElement=4,mi("StructArrayLayout1f4",Qr);class ha extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.uint16[6*R+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,R}}ha.prototype.bytesPerElement=12,mi("StructArrayLayout1ui2f12",ha);class Aa extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=4*R;return this.uint32[2*R+0]=J,this.uint16[Be+2]=ve,this.uint16[Be+3]=Ee,R}}Aa.prototype.bytesPerElement=8,mi("StructArrayLayout1ul2ui8",Aa);class Da extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.uint16[Ee+0]=J,this.uint16[Ee+1]=ve,R}}Da.prototype.bytesPerElement=4,mi("StructArrayLayout2ui4",Da);class ci extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.uint16[1*R+0]=J,R}}ci.prototype.bytesPerElement=2,mi("StructArrayLayout1ui2",ci);class Vi extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,R,J,ve,Ee)}emplace(R,J,ve,Ee,Be){let Ge=4*R;return this.float32[Ge+0]=J,this.float32[Ge+1]=ve,this.float32[Ge+2]=Ee,this.float32[Ge+3]=Be,R}}Vi.prototype.bytesPerElement=16,mi("StructArrayLayout4f16",Vi);class ji extends Me{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)}}ji.prototype.size=20;class on extends Et{get(R){return new ji(this,R)}}mi("CollisionBoxArray",on);class An extends Me{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(R){this._structArray.uint8[this._pos1+37]=R}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(R){this._structArray.uint8[this._pos1+38]=R}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(R){this._structArray.uint32[this._pos4+10]=R}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}An.prototype.size=48;class Kn extends Er{get(R){return new An(this,R)}}mi("PlacedSymbolArray",Kn);class Bn extends Me{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(R){this._structArray.uint32[this._pos4+12]=R}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 jr{get(R){return new Bn(this,R)}}mi("SymbolInstanceArray",Ao);class ls extends Qr{getoffsetX(R){return this.float32[1*R+0]}}mi("GlyphOffsetArray",ls);class Mo extends $t{getx(R){return this.int16[3*R+0]}gety(R){return this.int16[3*R+1]}gettileUnitDistanceFromAnchor(R){return this.int16[3*R+2]}}mi("SymbolLineVertexArray",Mo);class Yo extends Me{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]}}Yo.prototype.size=12;class ds extends ha{get(R){return new Yo(this,R)}}mi("TextAnchorOffsetArray",ds);class ul extends Me{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]}}ul.prototype.size=8;class tl extends Aa{get(R){return new ul(this,R)}}mi("FeatureIndexArray",tl);class es extends Ot{}class ts extends Ot{}class Il extends Ot{}class tu extends Sr{}class Ru extends Kr{}class vu extends na{}class wl extends qe{}class fu extends $e{}class uc extends lt{}class Gl extends pt{}class Hl extends bt{}class me extends ur{}class De extends yr{}class et extends Da{}let dt=ht([{name:"a_pos",components:2,type:"Int16"}],4),{members:yt}=dt;class Tt{constructor(R=[]){this.segments=R}prepareSegment(R,J,ve,Ee){let Be=this.segments[this.segments.length-1];return R>Tt.MAX_VERTEX_ARRAY_LENGTH&&y(`Max vertices per segment is ${Tt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${R}`),(!Be||Be.vertexLength+R>Tt.MAX_VERTEX_ARRAY_LENGTH||Be.sortKey!==Ee)&&(Be={vertexOffset:J.length,primitiveOffset:ve.length,vertexLength:0,primitiveLength:0},Ee!==void 0&&(Be.sortKey=Ee),this.segments.push(Be)),Be}get(){return this.segments}destroy(){for(let R of this.segments)for(let J in R.vaos)R.vaos[J].destroy()}static simpleSegment(R,J,ve,Ee){return new Tt([{vertexOffset:R,primitiveOffset:J,vertexLength:ve,primitiveLength:Ee,vaos:{},sortKey:0}])}}function tr(H,R){return 256*(H=w(Math.floor(H),0,255))+w(Math.floor(R),0,255)}Tt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mi("SegmentVector",Tt);let zt=ht([{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 _r={exports:{}},Gr={exports:{}};Gr.exports=function(H,R){var J,ve,Ee,Be,Ge,ct,At,Nt;for(ve=H.length-(J=3&H.length),Ee=R,Ge=3432918353,ct=461845907,Nt=0;Nt>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295)<<13|Ee>>>19))+((5*(Ee>>>16)&65535)<<16)&4294967295))+((58964+(Be>>>16)&65535)<<16);switch(At=0,J){case 3:At^=(255&H.charCodeAt(Nt+2))<<16;case 2:At^=(255&H.charCodeAt(Nt+1))<<8;case 1:Ee^=At=(65535&(At=(At=(65535&(At^=255&H.charCodeAt(Nt)))*Ge+(((At>>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295}return Ee^=H.length,Ee=2246822507*(65535&(Ee^=Ee>>>16))+((2246822507*(Ee>>>16)&65535)<<16)&4294967295,Ee=3266489909*(65535&(Ee^=Ee>>>13))+((3266489909*(Ee>>>16)&65535)<<16)&4294967295,(Ee^=Ee>>>16)>>>0};var Xr=Gr.exports,wa={exports:{}};wa.exports=function(H,R){for(var J,ve=H.length,Ee=R^ve,Be=0;ve>=4;)J=1540483477*(65535&(J=255&H.charCodeAt(Be)|(255&H.charCodeAt(++Be))<<8|(255&H.charCodeAt(++Be))<<16|(255&H.charCodeAt(++Be))<<24))+((1540483477*(J>>>16)&65535)<<16),Ee=1540483477*(65535&Ee)+((1540483477*(Ee>>>16)&65535)<<16)^(J=1540483477*(65535&(J^=J>>>24))+((1540483477*(J>>>16)&65535)<<16)),ve-=4,++Be;switch(ve){case 3:Ee^=(255&H.charCodeAt(Be+2))<<16;case 2:Ee^=(255&H.charCodeAt(Be+1))<<8;case 1:Ee=1540483477*(65535&(Ee^=255&H.charCodeAt(Be)))+((1540483477*(Ee>>>16)&65535)<<16)}return Ee=1540483477*(65535&(Ee^=Ee>>>13))+((1540483477*(Ee>>>16)&65535)<<16),(Ee^=Ee>>>15)>>>0};var pa=Xr,Ja=wa.exports;_r.exports=pa,_r.exports.murmur3=pa,_r.exports.murmur2=Ja;var ti=r(_r.exports);class Sa{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(R,J,ve,Ee){this.ids.push(za(R)),this.positions.push(J,ve,Ee)}getPositions(R){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let J=za(R),ve=0,Ee=this.ids.length-1;for(;ve>1;this.ids[Ge]>=J?Ee=Ge:ve=Ge+1}let Be=[];for(;this.ids[ve]===J;)Be.push({index:this.positions[3*ve],start:this.positions[3*ve+1],end:this.positions[3*ve+2]}),ve++;return Be}static serialize(R,J){let ve=new Float64Array(R.ids),Ee=new Uint32Array(R.positions);return Xa(ve,Ee,0,ve.length-1),J&&J.push(ve.buffer,Ee.buffer),{ids:ve,positions:Ee}}static deserialize(R){let J=new Sa;return J.ids=R.ids,J.positions=R.positions,J.indexed=!0,J}}function za(H){let R=+H;return!isNaN(R)&&R<=Number.MAX_SAFE_INTEGER?R:ti(String(H))}function Xa(H,R,J,ve){for(;J>1],Be=J-1,Ge=ve+1;for(;;){do Be++;while(H[Be]Ee);if(Be>=Ge)break;fi(H,Be,Ge),fi(R,3*Be,3*Ge),fi(R,3*Be+1,3*Ge+1),fi(R,3*Be+2,3*Ge+2)}Ge-J`u_${Ee}`),this.type=ve}setUniform(R,J,ve){R.set(ve.constantOr(this.value))}getBinding(R,J,ve){return this.type==="color"?new an(R,J):new La(R,J)}}class ro{constructor(R,J){this.uniformNames=J.map(ve=>`u_${ve}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(R,J){this.pixelRatioFrom=J.pixelRatio,this.pixelRatioTo=R.pixelRatio,this.patternFrom=J.tlbr,this.patternTo=R.tlbr}setUniform(R,J,ve,Ee){let Be=Ee==="u_pattern_to"?this.patternTo:Ee==="u_pattern_from"?this.patternFrom:Ee==="u_pixel_ratio_to"?this.pixelRatioTo:Ee==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Be&&R.set(Be)}getBinding(R,J,ve){return ve.substr(0,9)==="u_pattern"?new sn(R,J):new La(R,J)}}class $o{constructor(R,J,ve,Ee){this.expression=R,this.type=ve,this.maxValue=0,this.paintVertexAttributes=J.map(Be=>({name:`a_${Be}`,type:"Float32",components:ve==="color"?2:1,offset:0})),this.paintVertexArray=new Ee}populatePaintArray(R,J,ve,Ee,Be){let Ge=this.paintVertexArray.length,ct=this.expression.evaluate(new Fs(0),J,{},Ee,[],Be);this.paintVertexArray.resize(R),this._setPaintValue(Ge,R,ct)}updatePaintArray(R,J,ve,Ee){let Be=this.expression.evaluate({zoom:0},ve,Ee);this._setPaintValue(R,J,Be)}_setPaintValue(R,J,ve){if(this.type==="color"){let Ee=In(ve);for(let Be=R;Be`u_${ct}_t`),this.type=ve,this.useIntegerZoom=Ee,this.zoom=Be,this.maxValue=0,this.paintVertexAttributes=J.map(ct=>({name:`a_${ct}`,type:"Float32",components:ve==="color"?4:2,offset:0})),this.paintVertexArray=new Ge}populatePaintArray(R,J,ve,Ee,Be){let Ge=this.expression.evaluate(new Fs(this.zoom),J,{},Ee,[],Be),ct=this.expression.evaluate(new Fs(this.zoom+1),J,{},Ee,[],Be),At=this.paintVertexArray.length;this.paintVertexArray.resize(R),this._setPaintValue(At,R,Ge,ct)}updatePaintArray(R,J,ve,Ee){let Be=this.expression.evaluate({zoom:this.zoom},ve,Ee),Ge=this.expression.evaluate({zoom:this.zoom+1},ve,Ee);this._setPaintValue(R,J,Be,Ge)}_setPaintValue(R,J,ve,Ee){if(this.type==="color"){let Be=In(ve),Ge=In(Ee);for(let ct=R;ct`#define HAS_UNIFORM_${Ee}`))}return R}getBinderAttributes(){let R=[];for(let J in this.binders){let ve=this.binders[J];if(ve instanceof $o||ve instanceof no)for(let Ee=0;Ee!0){this.programConfigurations={};for(let Ee of R)this.programConfigurations[Ee.id]=new cl(Ee,J,ve);this.needsUpload=!1,this._featureMap=new Sa,this._bufferOffset=0}populatePaintArrays(R,J,ve,Ee,Be,Ge){for(let ct in this.programConfigurations)this.programConfigurations[ct].populatePaintArrays(R,J,Ee,Be,Ge);J.id!==void 0&&this._featureMap.add(J.id,ve,this._bufferOffset,R),this._bufferOffset=R,this.needsUpload=!0}updatePaintArrays(R,J,ve,Ee){for(let Be of ve)this.needsUpload=this.programConfigurations[Be.id].updatePaintArrays(R,this._featureMap,J,Be,Ee)||this.needsUpload}get(R){return this.programConfigurations[R]}upload(R){if(this.needsUpload){for(let J in this.programConfigurations)this.programConfigurations[J].upload(R);this.needsUpload=!1}}destroy(){for(let R in this.programConfigurations)this.programConfigurations[R].destroy()}}function _l(H,R){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(`${R}-`,"").replace(/-/g,"_")]}function mn(H,R,J){let ve={color:{source:na,composite:Vi},number:{source:Qr,composite:na}},Ee=function(Be){return{"line-pattern":{source:wl,composite:wl},"fill-pattern":{source:wl,composite:wl},"fill-extrusion-pattern":{source:wl,composite:wl}}[Be]}(H);return Ee&&Ee[J]||ve[R][J]}mi("ConstantBinder",Jn),mi("CrossFadedConstantBinder",ro),mi("SourceExpressionBinder",$o),mi("CrossFadedCompositeBinder",Xo),mi("CompositeExpressionBinder",no),mi("ProgramConfiguration",cl,{omit:["_buffers"]}),mi("ProgramConfigurationSet",al);let po=8192,fs=Math.pow(2,14)-1,ms=-fs-1;function Tl(H){let R=po/H.extent,J=H.loadGeometry();for(let ve=0;veGe.x+1||AtGe.y+1)&&y("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return J}function Wl(H,R){return{type:H.type,id:H.id,properties:H.properties,geometry:R?Tl(H):[]}}function Su(H,R,J,ve,Ee){H.emplaceBack(2*R+(ve+1)/2,2*J+(Ee+1)/2)}class Rl{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new ts,this.indexArray=new De,this.segments=new Tt,this.programConfigurations=new al(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){let Ee=this.layers[0],Be=[],Ge=null,ct=!1;Ee.type==="circle"&&(Ge=Ee.layout.get("circle-sort-key"),ct=!Ge.isConstant());for(let{feature:At,id:Nt,index:ar,sourceLayerIndex:Mr}of R){let zr=this.layers[0]._featureFilter.needGeometry,Wr=Wl(At,zr);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),Wr,ve))continue;let ia=ct?Ge.evaluate(Wr,{},ve):void 0,fa={id:Nt,properties:At.properties,type:At.type,sourceLayerIndex:Mr,index:ar,geometry:zr?Wr.geometry:Tl(At),patterns:{},sortKey:ia};Be.push(fa)}ct&&Be.sort((At,Nt)=>At.sortKey-Nt.sortKey);for(let At of Be){let{geometry:Nt,index:ar,sourceLayerIndex:Mr}=At,zr=R[ar].feature;this.addFeature(At,Nt,ar,ve),J.featureIndex.insert(zr,Nt,ar,Mr,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,yt),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(R,J,ve,Ee){for(let Be of J)for(let Ge of Be){let ct=Ge.x,At=Ge.y;if(ct<0||ct>=po||At<0||At>=po)continue;let Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),ar=Nt.vertexLength;Su(this.layoutVertexArray,ct,At,-1,-1),Su(this.layoutVertexArray,ct,At,1,-1),Su(this.layoutVertexArray,ct,At,1,1),Su(this.layoutVertexArray,ct,At,-1,1),this.indexArray.emplaceBack(ar,ar+1,ar+2),this.indexArray.emplaceBack(ar,ar+3,ar+2),Nt.vertexLength+=4,Nt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ve,{},Ee)}}function _c(H,R){for(let J=0;J1){if(oa(H,R))return!0;for(let ve=0;ve1?J:J.sub(R)._mult(Ee)._add(R))}function Ya(H,R){let J,ve,Ee,Be=!1;for(let Ge=0;GeR.y!=Ee.y>R.y&&R.x<(Ee.x-ve.x)*(R.y-ve.y)/(Ee.y-ve.y)+ve.x&&(Be=!Be)}return Be}function bi(H,R){let J=!1;for(let ve=0,Ee=H.length-1;veR.y!=Ge.y>R.y&&R.x<(Ge.x-Be.x)*(R.y-Be.y)/(Ge.y-Be.y)+Be.x&&(J=!J)}return J}function yi(H,R,J){let ve=J[0],Ee=J[2];if(H.xEe.x&&R.x>Ee.x||H.yEe.y&&R.y>Ee.y)return!1;let Be=D(H,R,J[0]);return Be!==D(H,R,J[1])||Be!==D(H,R,J[2])||Be!==D(H,R,J[3])}function si(H,R,J){let ve=R.paint.get(H).value;return ve.kind==="constant"?ve.value:J.programConfigurations.get(R.id).getMaxValue(H)}function gn(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])}function zi(H,R,J,ve,Ee){if(!R[0]&&!R[1])return H;let Be=i.convert(R)._mult(Ee);J==="viewport"&&Be._rotate(-ve);let Ge=[];for(let ct=0;ctUa(ja,fa))}(Nt,At),Wr=Mr?ar*ct:ar;for(let ia of Ee)for(let fa of ia){let ja=Mr?fa:Ua(fa,At),Ka=Wr,Wi=hn([],[fa.x,fa.y,0,1],At);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ka*=Wi[3]/Ge.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ka*=Ge.cameraToCenterDistance/Wi[3]),it(zr,ja,Ka))return!0}return!1}}function Ua(H,R){let J=hn([],[H.x,H.y,0,1],R);return new i(J[0]/J[3],J[1]/J[3])}class Yi extends Rl{}let Ri;mi("HeatmapBucket",Yi,{omit:["layers"]});var Ti={get paint(){return Ri=Ri||new Oe({"heatmap-radius":new Fo(te.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Fo(te.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fo(te.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(te.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fo(te.paint_heatmap["heatmap-opacity"])})}};function xi(H,{width:R,height:J},ve,Ee){if(Ee){if(Ee instanceof Uint8ClampedArray)Ee=new Uint8Array(Ee.buffer);else if(Ee.length!==R*J*ve)throw new RangeError(`mismatched image size. expected: ${Ee.length} but got: ${R*J*ve}`)}else Ee=new Uint8Array(R*J*ve);return H.width=R,H.height=J,H.data=Ee,H}function Xi(H,{width:R,height:J},ve){if(R===H.width&&J===H.height)return;let Ee=xi({},{width:R,height:J},ve);vn(H,Ee,{x:0,y:0},{x:0,y:0},{width:Math.min(H.width,R),height:Math.min(H.height,J)},ve),H.width=R,H.height=J,H.data=Ee.data}function vn(H,R,J,ve,Ee,Be){if(Ee.width===0||Ee.height===0)return R;if(Ee.width>H.width||Ee.height>H.height||J.x>H.width-Ee.width||J.y>H.height-Ee.height)throw new RangeError("out of range source coordinates for image copy");if(Ee.width>R.width||Ee.height>R.height||ve.x>R.width-Ee.width||ve.y>R.height-Ee.height)throw new RangeError("out of range destination coordinates for image copy");let Ge=H.data,ct=R.data;if(Ge===ct)throw new Error("srcData equals dstData, so image is already copied");for(let At=0;At{R[H.evaluationKey]=At;let Nt=H.expression.evaluate(R);Ee.data[Ge+ct+0]=Math.floor(255*Nt.r/Nt.a),Ee.data[Ge+ct+1]=Math.floor(255*Nt.g/Nt.a),Ee.data[Ge+ct+2]=Math.floor(255*Nt.b/Nt.a),Ee.data[Ge+ct+3]=Math.floor(255*Nt.a)};if(H.clips)for(let Ge=0,ct=0;Ge80*J){ct=1/0,At=1/0;let ar=-1/0,Mr=-1/0;for(let zr=J;zrar&&(ar=Wr),ia>Mr&&(Mr=ia)}Nt=Math.max(ar-ct,Mr-At),Nt=Nt!==0?32767/Nt:0}return ru(Be,Ge,J,ct,At,Nt,0),Ge}function Al(H,R,J,ve,Ee){let Be;if(Ee===function(Ge,ct,At,Nt){let ar=0;for(let Mr=ct,zr=At-Nt;Mr0)for(let Ge=R;Ge=R;Ge-=ve)Be=pr(Ge/ve|0,H[Ge],H[Ge+1],Be);return Be&&ke(Be,Be.next)&&(mt(Be),Be=Be.next),Be}function El(H,R){if(!H)return H;R||(R=H);let J,ve=H;do if(J=!1,ve.steiner||!ke(ve,ve.next)&&Ue(ve.prev,ve,ve.next)!==0)ve=ve.next;else{if(mt(ve),ve=R=ve.prev,ve===ve.next)break;J=!0}while(J||ve!==R);return R}function ru(H,R,J,ve,Ee,Be,Ge){if(!H)return;!Ge&&Be&&function(At,Nt,ar,Mr){let zr=At;do zr.z===0&&(zr.z=K(zr.x,zr.y,Nt,ar,Mr)),zr.prevZ=zr.prev,zr.nextZ=zr.next,zr=zr.next;while(zr!==At);zr.prevZ.nextZ=null,zr.prevZ=null,function(Wr){let ia,fa=1;do{let ja,Ka=Wr;Wr=null;let Wi=null;for(ia=0;Ka;){ia++;let gi=Ka,qi=0;for(let jn=0;jn0||en>0&&gi;)qi!==0&&(en===0||!gi||Ka.z<=gi.z)?(ja=Ka,Ka=Ka.nextZ,qi--):(ja=gi,gi=gi.nextZ,en--),Wi?Wi.nextZ=ja:Wr=ja,ja.prevZ=Wi,Wi=ja;Ka=gi}Wi.nextZ=null,fa*=2}while(ia>1)}(zr)}(H,ve,Ee,Be);let ct=H;for(;H.prev!==H.next;){let At=H.prev,Nt=H.next;if(Be?pl(H,ve,Ee,Be):js(H))R.push(At.i,H.i,Nt.i),mt(H),H=Nt.next,ct=Nt.next;else if((H=Nt)===ct){Ge?Ge===1?ru(H=bl(El(H),R),R,J,ve,Ee,Be,2):Ge===2&&Xn(H,R,J,ve,Ee,Be):ru(El(H),R,J,ve,Ee,Be,1);break}}}function js(H){let R=H.prev,J=H,ve=H.next;if(Ue(R,J,ve)>=0)return!1;let Ee=R.x,Be=J.x,Ge=ve.x,ct=R.y,At=J.y,Nt=ve.y,ar=EeBe?Ee>Ge?Ee:Ge:Be>Ge?Be:Ge,Wr=ct>At?ct>Nt?ct:Nt:At>Nt?At:Nt,ia=ve.next;for(;ia!==R;){if(ia.x>=ar&&ia.x<=zr&&ia.y>=Mr&&ia.y<=Wr&&re(Ee,ct,Be,At,Ge,Nt,ia.x,ia.y)&&Ue(ia.prev,ia,ia.next)>=0)return!1;ia=ia.next}return!0}function pl(H,R,J,ve){let Ee=H.prev,Be=H,Ge=H.next;if(Ue(Ee,Be,Ge)>=0)return!1;let ct=Ee.x,At=Be.x,Nt=Ge.x,ar=Ee.y,Mr=Be.y,zr=Ge.y,Wr=ctAt?ct>Nt?ct:Nt:At>Nt?At:Nt,ja=ar>Mr?ar>zr?ar:zr:Mr>zr?Mr:zr,Ka=K(Wr,ia,R,J,ve),Wi=K(fa,ja,R,J,ve),gi=H.prevZ,qi=H.nextZ;for(;gi&&gi.z>=Ka&&qi&&qi.z<=Wi;){if(gi.x>=Wr&&gi.x<=fa&&gi.y>=ia&&gi.y<=ja&&gi!==Ee&&gi!==Ge&&re(ct,ar,At,Mr,Nt,zr,gi.x,gi.y)&&Ue(gi.prev,gi,gi.next)>=0||(gi=gi.prevZ,qi.x>=Wr&&qi.x<=fa&&qi.y>=ia&&qi.y<=ja&&qi!==Ee&&qi!==Ge&&re(ct,ar,At,Mr,Nt,zr,qi.x,qi.y)&&Ue(qi.prev,qi,qi.next)>=0))return!1;qi=qi.nextZ}for(;gi&&gi.z>=Ka;){if(gi.x>=Wr&&gi.x<=fa&&gi.y>=ia&&gi.y<=ja&&gi!==Ee&&gi!==Ge&&re(ct,ar,At,Mr,Nt,zr,gi.x,gi.y)&&Ue(gi.prev,gi,gi.next)>=0)return!1;gi=gi.prevZ}for(;qi&&qi.z<=Wi;){if(qi.x>=Wr&&qi.x<=fa&&qi.y>=ia&&qi.y<=ja&&qi!==Ee&&qi!==Ge&&re(ct,ar,At,Mr,Nt,zr,qi.x,qi.y)&&Ue(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function bl(H,R){let J=H;do{let ve=J.prev,Ee=J.next.next;!ke(ve,Ee)&&Qe(ve,J,J.next,Ee)&&br(ve,Ee)&&br(Ee,ve)&&(R.push(ve.i,J.i,Ee.i),mt(J),mt(J.next),J=H=Ee),J=J.next}while(J!==H);return El(J)}function Xn(H,R,J,ve,Ee,Be){let Ge=H;do{let ct=Ge.next.next;for(;ct!==Ge.prev;){if(Ge.i!==ct.i&&ye(Ge,ct)){let At=Br(Ge,ct);return Ge=El(Ge,Ge.next),At=El(At,At.next),ru(Ge,R,J,ve,Ee,Be,0),void ru(At,R,J,ve,Ee,Be,0)}ct=ct.next}Ge=Ge.next}while(Ge!==H)}function kl(H,R){return H.x-R.x}function Io(H,R){let J=function(Ee,Be){let Ge=Be,ct=Ee.x,At=Ee.y,Nt,ar=-1/0;do{if(At<=Ge.y&&At>=Ge.next.y&&Ge.next.y!==Ge.y){let fa=Ge.x+(At-Ge.y)*(Ge.next.x-Ge.x)/(Ge.next.y-Ge.y);if(fa<=ct&&fa>ar&&(ar=fa,Nt=Ge.x=Ge.x&&Ge.x>=zr&&ct!==Ge.x&&re(AtNt.x||Ge.x===Nt.x&&ge(Nt,Ge)))&&(Nt=Ge,ia=fa)}Ge=Ge.next}while(Ge!==Mr);return Nt}(H,R);if(!J)return R;let ve=Br(J,H);return El(ve,ve.next),El(J,J.next)}function ge(H,R){return Ue(H.prev,H,R.prev)<0&&Ue(R.next,H,H.next)<0}function K(H,R,J,ve,Ee){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=(H-J)*Ee|0)|H<<8))|H<<4))|H<<2))|H<<1))|(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-ve)*Ee|0)|R<<8))|R<<4))|R<<2))|R<<1))<<1}function xe(H){let R=H,J=H;do(R.x=(H-Ge)*(Be-ct)&&(H-Ge)*(ve-ct)>=(J-Ge)*(R-ct)&&(J-Ge)*(Be-ct)>=(Ee-Ge)*(ve-ct)}function ye(H,R){return H.next.i!==R.i&&H.prev.i!==R.i&&!function(J,ve){let Ee=J;do{if(Ee.i!==J.i&&Ee.next.i!==J.i&&Ee.i!==ve.i&&Ee.next.i!==ve.i&&Qe(Ee,Ee.next,J,ve))return!0;Ee=Ee.next}while(Ee!==J);return!1}(H,R)&&(br(H,R)&&br(R,H)&&function(J,ve){let Ee=J,Be=!1,Ge=(J.x+ve.x)/2,ct=(J.y+ve.y)/2;do Ee.y>ct!=Ee.next.y>ct&&Ee.next.y!==Ee.y&&Ge<(Ee.next.x-Ee.x)*(ct-Ee.y)/(Ee.next.y-Ee.y)+Ee.x&&(Be=!Be),Ee=Ee.next;while(Ee!==J);return Be}(H,R)&&(Ue(H.prev,H,R.prev)||Ue(H,R.prev,R))||ke(H,R)&&Ue(H.prev,H,H.next)>0&&Ue(R.prev,R,R.next)>0)}function Ue(H,R,J){return(R.y-H.y)*(J.x-R.x)-(R.x-H.x)*(J.y-R.y)}function ke(H,R){return H.x===R.x&&H.y===R.y}function Qe(H,R,J,ve){let Ee=qt(Ue(H,R,J)),Be=qt(Ue(H,R,ve)),Ge=qt(Ue(J,ve,H)),ct=qt(Ue(J,ve,R));return Ee!==Be&&Ge!==ct||!(Ee!==0||!vt(H,J,R))||!(Be!==0||!vt(H,ve,R))||!(Ge!==0||!vt(J,H,ve))||!(ct!==0||!vt(J,R,ve))}function vt(H,R,J){return R.x<=Math.max(H.x,J.x)&&R.x>=Math.min(H.x,J.x)&&R.y<=Math.max(H.y,J.y)&&R.y>=Math.min(H.y,J.y)}function qt(H){return H>0?1:H<0?-1:0}function br(H,R){return Ue(H.prev,H,H.next)<0?Ue(H,R,H.next)>=0&&Ue(H,H.prev,R)>=0:Ue(H,R,H.prev)<0||Ue(H,H.next,R)<0}function Br(H,R){let J=Mt(H.i,H.x,H.y),ve=Mt(R.i,R.x,R.y),Ee=H.next,Be=R.prev;return H.next=R,R.prev=H,J.next=Ee,Ee.prev=J,ve.next=J,J.prev=ve,Be.next=ve,ve.prev=Be,ve}function pr(H,R,J,ve){let Ee=Mt(H,R,J);return ve?(Ee.next=ve.next,Ee.prev=ve,ve.next.prev=Ee,ve.next=Ee):(Ee.prev=Ee,Ee.next=Ee),Ee}function mt(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 Mt(H,R,J){return{i:H,x:R,y:J,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ft(H,R,J){let ve=J.patternDependencies,Ee=!1;for(let Be of R){let Ge=Be.paint.get(`${H}-pattern`);Ge.isConstant()||(Ee=!0);let ct=Ge.constantOr(null);ct&&(Ee=!0,ve[ct.to]=!0,ve[ct.from]=!0)}return Ee}function rr(H,R,J,ve,Ee){let Be=Ee.patternDependencies;for(let Ge of R){let ct=Ge.paint.get(`${H}-pattern`).value;if(ct.kind!=="constant"){let At=ct.evaluate({zoom:ve-1},J,{},Ee.availableImages),Nt=ct.evaluate({zoom:ve},J,{},Ee.availableImages),ar=ct.evaluate({zoom:ve+1},J,{},Ee.availableImages);At=At&&At.name?At.name:At,Nt=Nt&&Nt.name?Nt.name:Nt,ar=ar&&ar.name?ar.name:ar,Be[At]=!0,Be[Nt]=!0,Be[ar]=!0,J.patterns[Ge.id]={min:At,mid:Nt,max:ar}}}return J}class hr{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Il,this.indexArray=new De,this.indexArray2=new et,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.segments2=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){this.hasPattern=Ft("fill",this.layers,J);let Ee=this.layers[0].layout.get("fill-sort-key"),Be=!Ee.isConstant(),Ge=[];for(let{feature:ct,id:At,index:Nt,sourceLayerIndex:ar}of R){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Wl(ct,Mr);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),zr,ve))continue;let Wr=Be?Ee.evaluate(zr,{},ve,J.availableImages):void 0,ia={id:At,properties:ct.properties,type:ct.type,sourceLayerIndex:ar,index:Nt,geometry:Mr?zr.geometry:Tl(ct),patterns:{},sortKey:Wr};Ge.push(ia)}Be&&Ge.sort((ct,At)=>ct.sortKey-At.sortKey);for(let ct of Ge){let{geometry:At,index:Nt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Mr=rr("fill",this.layers,ct,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ct,At,Nt,ve,{});J.featureIndex.insert(R[Nt].feature,At,Nt,ar,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}addFeatures(R,J,ve){for(let Ee of this.patternFeatures)this.addFeature(Ee,Ee.geometry,Ee.index,J,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Xl),this.indexBuffer=R.createIndexBuffer(this.indexArray),this.indexBuffer2=R.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(R),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(R,J,ve,Ee,Be){for(let Ge of Tc(J,500)){let ct=0;for(let Wr of Ge)ct+=Wr.length;let At=this.segments.prepareSegment(ct,this.layoutVertexArray,this.indexArray),Nt=At.vertexLength,ar=[],Mr=[];for(let Wr of Ge){if(Wr.length===0)continue;Wr!==Ge[0]&&Mr.push(ar.length/2);let ia=this.segments2.prepareSegment(Wr.length,this.layoutVertexArray,this.indexArray2),fa=ia.vertexLength;this.layoutVertexArray.emplaceBack(Wr[0].x,Wr[0].y),this.indexArray2.emplaceBack(fa+Wr.length-1,fa),ar.push(Wr[0].x),ar.push(Wr[0].y);for(let ja=1;ja>3}if(Ee--,ve===1||ve===2)Be+=H.readSVarint(),Ge+=H.readSVarint(),ve===1&&(R&&ct.push(R),R=[]),R.push(new ya(Be,Ge));else{if(ve!==7)throw new Error("unknown command "+ve);R&&R.push(R[0].clone())}}return R&&ct.push(R),ct},Ga.prototype.bbox=function(){var H=this._pbf;H.pos=this._geometry;for(var R=H.readVarint()+H.pos,J=1,ve=0,Ee=0,Be=0,Ge=1/0,ct=-1/0,At=1/0,Nt=-1/0;H.pos>3}if(ve--,J===1||J===2)(Ee+=H.readSVarint())ct&&(ct=Ee),(Be+=H.readSVarint())Nt&&(Nt=Be);else if(J!==7)throw new Error("unknown command "+J)}return[Ge,At,ct,Nt]},Ga.prototype.toGeoJSON=function(H,R,J){var ve,Ee,Be=this.extent*Math.pow(2,J),Ge=this.extent*H,ct=this.extent*R,At=this.loadGeometry(),Nt=Ga.types[this.type];function ar(Wr){for(var ia=0;ia>3;Ee=Ge===1?ve.readString():Ge===2?ve.readFloat():Ge===3?ve.readDouble():Ge===4?ve.readVarint64():Ge===5?ve.readVarint():Ge===6?ve.readSVarint():Ge===7?ve.readBoolean():null}return Ee}(J))}_i.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 R=this._pbf.readVarint()+this._pbf.pos;return new Fi(this._pbf,R,this.extent,this._keys,this._values)};var Ui=ui;function fn(H,R,J){if(H===3){var ve=new Ui(J,J.readVarint()+J.pos);ve.length&&(R[ve.name]=ve)}}Jr.VectorTile=function(H,R){this.layers=H.readFields(fn,{},R)},Jr.VectorTileFeature=vi,Jr.VectorTileLayer=ui;let _o=Jr.VectorTileFeature.types,Uo=Math.pow(2,13);function Ds(H,R,J,ve,Ee,Be,Ge,ct){H.emplaceBack(R,J,2*Math.floor(ve*Uo)+Ge,Ee*Uo*2,Be*Uo*2,Math.round(ct))}class Oo{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new tu,this.centroidVertexArray=new es,this.indexArray=new De,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){this.features=[],this.hasPattern=Ft("fill-extrusion",this.layers,J);for(let{feature:Ee,id:Be,index:Ge,sourceLayerIndex:ct}of R){let At=this.layers[0]._featureFilter.needGeometry,Nt=Wl(Ee,At);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),Nt,ve))continue;let ar={id:Be,sourceLayerIndex:ct,index:Ge,geometry:At?Nt.geometry:Tl(Ee),properties:Ee.properties,type:Ee.type,patterns:{}};this.hasPattern?this.features.push(rr("fill-extrusion",this.layers,ar,this.zoom,J)):this.addFeature(ar,ar.geometry,Ge,ve,{}),J.featureIndex.insert(Ee,ar.geometry,Ge,ct,this.index,!0)}}addFeatures(R,J,ve){for(let Ee of this.features){let{geometry:Be}=Ee;this.addFeature(Ee,Be,Ee.index,J,ve)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Dr),this.centroidVertexBuffer=R.createVertexBuffer(this.centroidVertexArray,Gt.members,!0),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(R,J,ve,Ee,Be){for(let Ge of Tc(J,500)){let ct={x:0,y:0,vertexCount:0},At=0;for(let ia of Ge)At+=ia.length;let Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let ia of Ge){if(ia.length===0||Ys(ia))continue;let fa=0;for(let ja=0;ja=1){let Wi=ia[ja-1];if(!Cs(Ka,Wi)){Nt.vertexLength+4>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let gi=Ka.sub(Wi)._perp()._unit(),qi=Wi.dist(Ka);fa+qi>32768&&(fa=0),Ds(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,0,fa),Ds(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,1,fa),ct.x+=2*Ka.x,ct.y+=2*Ka.y,ct.vertexCount+=2,fa+=qi,Ds(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,0,fa),Ds(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,1,fa),ct.x+=2*Wi.x,ct.y+=2*Wi.y,ct.vertexCount+=2;let en=Nt.vertexLength;this.indexArray.emplaceBack(en,en+2,en+1),this.indexArray.emplaceBack(en+1,en+2,en+3),Nt.vertexLength+=4,Nt.primitiveLength+=2}}}}if(Nt.vertexLength+At>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Nt=this.segments.prepareSegment(At,this.layoutVertexArray,this.indexArray)),_o[R.type]!=="Polygon")continue;let ar=[],Mr=[],zr=Nt.vertexLength;for(let ia of Ge)if(ia.length!==0){ia!==Ge[0]&&Mr.push(ar.length/2);for(let fa=0;fapo)||H.y===R.y&&(H.y<0||H.y>po)}function Ys(H){return H.every(R=>R.x<0)||H.every(R=>R.x>po)||H.every(R=>R.y<0)||H.every(R=>R.y>po)}let mu;mi("FillExtrusionBucket",Oo,{omit:["layers","features"]});var Ep={get paint(){return mu=mu||new Oe({"fill-extrusion-opacity":new fo(te["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Fo(te["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fo(te["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fo(te["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Dc(te["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Fo(te["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Fo(te["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fo(te["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ie{constructor(R){super(R,Ep)}createBucket(R){return new Oo(R)}queryRadius(){return gn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(R,J,ve,Ee,Be,Ge,ct,At){let Nt=zi(R,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Ge.angle,ct),ar=this.paint.get("fill-extrusion-height").evaluate(J,ve),Mr=this.paint.get("fill-extrusion-base").evaluate(J,ve),zr=function(ia,fa,ja,Ka){let Wi=[];for(let gi of ia){let qi=[gi.x,gi.y,0,1];hn(qi,qi,fa),Wi.push(new i(qi[0]/qi[3],qi[1]/qi[3]))}return Wi}(Nt,At),Wr=function(ia,fa,ja,Ka){let Wi=[],gi=[],qi=Ka[8]*fa,en=Ka[9]*fa,jn=Ka[10]*fa,Lo=Ka[11]*fa,xs=Ka[8]*ja,vo=Ka[9]*ja,zn=Ka[10]*ja,is=Ka[11]*ja;for(let qo of ia){let Bo=[],xn=[];for(let cs of qo){let No=cs.x,Rs=cs.y,Ku=Ka[0]*No+Ka[4]*Rs+Ka[12],Uu=Ka[1]*No+Ka[5]*Rs+Ka[13],th=Ka[2]*No+Ka[6]*Rs+Ka[14],Hp=Ka[3]*No+Ka[7]*Rs+Ka[15],Th=th+jn,rh=Hp+Lo,$h=Ku+xs,Qh=Uu+vo,ep=th+zn,ff=Hp+is,ah=new i((Ku+qi)/rh,(Uu+en)/rh);ah.z=Th/rh,Bo.push(ah);let Fh=new i($h/ff,Qh/ff);Fh.z=ep/ff,xn.push(Fh)}Wi.push(Bo),gi.push(xn)}return[Wi,gi]}(Ee,Mr,ar,At);return function(ia,fa,ja){let Ka=1/0;Xt(ja,fa)&&(Ka=qp(ja,fa[0]));for(let Wi=0;WiJ.id),this.index=R.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(J=>{this.gradients[J.id]={}}),this.layoutVertexArray=new Ru,this.layoutVertexArray2=new vu,this.indexArray=new De,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){this.hasPattern=Ft("line",this.layers,J);let Ee=this.layers[0].layout.get("line-sort-key"),Be=!Ee.isConstant(),Ge=[];for(let{feature:ct,id:At,index:Nt,sourceLayerIndex:ar}of R){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Wl(ct,Mr);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),zr,ve))continue;let Wr=Be?Ee.evaluate(zr,{},ve):void 0,ia={id:At,properties:ct.properties,type:ct.type,sourceLayerIndex:ar,index:Nt,geometry:Mr?zr.geometry:Tl(ct),patterns:{},sortKey:Wr};Ge.push(ia)}Be&&Ge.sort((ct,At)=>ct.sortKey-At.sortKey);for(let ct of Ge){let{geometry:At,index:Nt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Mr=rr("line",this.layers,ct,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ct,At,Nt,ve,{});J.featureIndex.insert(R[Nt].feature,At,Nt,ar,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}addFeatures(R,J,ve){for(let Ee of this.patternFeatures)this.addFeature(Ee,Ee.geometry,Ee.index,J,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=R.createVertexBuffer(this.layoutVertexArray2,td)),this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,ed),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(R){if(R.properties&&Object.prototype.hasOwnProperty.call(R.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(R.properties,"mapbox_clip_end"))return{start:+R.properties.mapbox_clip_start,end:+R.properties.mapbox_clip_end}}addFeature(R,J,ve,Ee,Be){let Ge=this.layers[0].layout,ct=Ge.get("line-join").evaluate(R,{}),At=Ge.get("line-cap"),Nt=Ge.get("line-miter-limit"),ar=Ge.get("line-round-limit");this.lineClips=this.lineFeatureClips(R);for(let Mr of J)this.addLine(Mr,R,ct,At,Nt,ar);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ve,Be,Ee)}addLine(R,J,ve,Ee,Be,Ge){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ka=0;Ka=2&&R[At-1].equals(R[At-2]);)At--;let Nt=0;for(;Nt0;if(Lo&&Ka>Nt){let is=zr.dist(Wr);if(is>2*ar){let qo=zr.sub(zr.sub(Wr)._mult(ar/is)._round());this.updateDistance(Wr,qo),this.addCurrentVertex(qo,fa,0,0,Mr),Wr=qo}}let vo=Wr&&ia,zn=vo?ve:ct?"butt":Ee;if(vo&&zn==="round"&&(enBe&&(zn="bevel"),zn==="bevel"&&(en>2&&(zn="flipbevel"),en100)Wi=ja.mult(-1);else{let is=en*fa.add(ja).mag()/fa.sub(ja).mag();Wi._perp()._mult(is*(xs?-1:1))}this.addCurrentVertex(zr,Wi,0,0,Mr),this.addCurrentVertex(zr,Wi.mult(-1),0,0,Mr)}else if(zn==="bevel"||zn==="fakeround"){let is=-Math.sqrt(en*en-1),qo=xs?is:0,Bo=xs?0:is;if(Wr&&this.addCurrentVertex(zr,fa,qo,Bo,Mr),zn==="fakeround"){let xn=Math.round(180*jn/Math.PI/20);for(let cs=1;cs2*ar){let qo=zr.add(ia.sub(zr)._mult(ar/is)._round());this.updateDistance(zr,qo),this.addCurrentVertex(qo,ja,0,0,Mr),zr=qo}}}}addCurrentVertex(R,J,ve,Ee,Be,Ge=!1){let ct=J.y*Ee-J.x,At=-J.y-J.x*Ee;this.addHalfVertex(R,J.x+J.y*ve,J.y-J.x*ve,Ge,!1,ve,Be),this.addHalfVertex(R,ct,At,Ge,!0,-Ee,Be),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(R,J,ve,Ee,Be,Ge))}addHalfVertex({x:R,y:J},ve,Ee,Be,Ge,ct,At){let Nt=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((R<<1)+(Be?1:0),(J<<1)+(Ge?1:0),Math.round(63*ve)+128,Math.round(63*Ee)+128,1+(ct===0?0:ct<0?-1:1)|(63&Nt)<<2,Nt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let ar=At.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ar),At.primitiveLength++),Ge?this.e2=ar:this.e1=ar}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(R,J){this.distance+=R.dist(J),this.updateScaledDistance()}}let Lp,Lv;mi("LineBucket",Vp,{omit:["layers","patternFeatures"]});var Vd={get paint(){return Lv=Lv||new Oe({"line-opacity":new Fo(te.paint_line["line-opacity"]),"line-color":new Fo(te.paint_line["line-color"]),"line-translate":new fo(te.paint_line["line-translate"]),"line-translate-anchor":new fo(te.paint_line["line-translate-anchor"]),"line-width":new Fo(te.paint_line["line-width"]),"line-gap-width":new Fo(te.paint_line["line-gap-width"]),"line-offset":new Fo(te.paint_line["line-offset"]),"line-blur":new Fo(te.paint_line["line-blur"]),"line-dasharray":new lc(te.paint_line["line-dasharray"]),"line-pattern":new Dc(te.paint_line["line-pattern"]),"line-gradient":new Yu(te.paint_line["line-gradient"])})},get layout(){return Lp=Lp||new Oe({"line-cap":new fo(te.layout_line["line-cap"]),"line-join":new Fo(te.layout_line["line-join"]),"line-miter-limit":new fo(te.layout_line["line-miter-limit"]),"line-round-limit":new fo(te.layout_line["line-round-limit"]),"line-sort-key":new Fo(te.layout_line["line-sort-key"])})}};class Gf extends Fo{possiblyEvaluate(R,J){return J=new Fs(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),super.possiblyEvaluate(R,J)}evaluate(R,J,ve,Ee){return J=E({},J,{zoom:Math.floor(J.zoom)}),super.evaluate(R,J,ve,Ee)}}let Gd;class Pv extends ie{constructor(R){super(R,Vd),this.gradientVersion=0,Gd||(Gd=new Gf(Vd.paint.properties["line-width"].specification),Gd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(R){if(R==="line-gradient"){let J=this.gradientExpression();this.stepInterpolant=!!function(ve){return ve._styleExpression!==void 0}(J)&&J._styleExpression.expression instanceof ba,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(R,J){super.recalculate(R,J),this.paint._values["line-floorwidth"]=Gd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,R)}createBucket(R){return new Vp(R)}queryRadius(R){let J=R,ve=ph(si("line-width",this,J),si("line-gap-width",this,J)),Ee=si("line-offset",this,J);return ve/2+Math.abs(Ee)+gn(this.paint.get("line-translate"))}queryIntersectsFeature(R,J,ve,Ee,Be,Ge,ct){let At=zi(R,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ge.angle,ct),Nt=ct/2*ph(this.paint.get("line-width").evaluate(J,ve),this.paint.get("line-gap-width").evaluate(J,ve)),ar=this.paint.get("line-offset").evaluate(J,ve);return ar&&(Ee=function(Mr,zr){let Wr=[];for(let ia=0;ia=3){for(let ja=0;ja0?R+2*H:H}let iv=ht([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),om=ht([{name:"a_projected_pos",components:3,type:"Float32"}],4);ht([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let sm=ht([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ht([{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 Iv=ht([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nv=ht([{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,R,J){return H.sections.forEach(ve=>{ve.text=function(Ee,Be,Ge){let ct=Be.layout.get("text-transform").evaluate(Ge,{});return ct==="uppercase"?Ee=Ee.toLocaleUpperCase():ct==="lowercase"&&(Ee=Ee.toLocaleLowerCase()),Js.applyArabicShaping&&(Ee=Js.applyArabicShaping(Ee)),Ee}(ve.text,R,J)}),H}ht([{name:"triangle",components:3,type:"Uint16"}]),ht([{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"}]),ht([{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"}]),ht([{type:"Float32",name:"offsetX"}]),ht([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ht([{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 hu=24,Dh=Mu,Rv=function(H,R,J,ve,Ee){var Be,Ge,ct=8*Ee-ve-1,At=(1<>1,ar=-7,Mr=J?Ee-1:0,zr=J?-1:1,Wr=H[R+Mr];for(Mr+=zr,Be=Wr&(1<<-ar)-1,Wr>>=-ar,ar+=ct;ar>0;Be=256*Be+H[R+Mr],Mr+=zr,ar-=8);for(Ge=Be&(1<<-ar)-1,Be>>=-ar,ar+=ve;ar>0;Ge=256*Ge+H[R+Mr],Mr+=zr,ar-=8);if(Be===0)Be=1-Nt;else{if(Be===At)return Ge?NaN:1/0*(Wr?-1:1);Ge+=Math.pow(2,ve),Be-=Nt}return(Wr?-1:1)*Ge*Math.pow(2,Be-ve)},lm=function(H,R,J,ve,Ee,Be){var Ge,ct,At,Nt=8*Be-Ee-1,ar=(1<>1,zr=Ee===23?Math.pow(2,-24)-Math.pow(2,-77):0,Wr=ve?0:Be-1,ia=ve?1:-1,fa=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(ct=isNaN(R)?1:0,Ge=ar):(Ge=Math.floor(Math.log(R)/Math.LN2),R*(At=Math.pow(2,-Ge))<1&&(Ge--,At*=2),(R+=Ge+Mr>=1?zr/At:zr*Math.pow(2,1-Mr))*At>=2&&(Ge++,At/=2),Ge+Mr>=ar?(ct=0,Ge=ar):Ge+Mr>=1?(ct=(R*At-1)*Math.pow(2,Ee),Ge+=Mr):(ct=R*Math.pow(2,Mr-1)*Math.pow(2,Ee),Ge=0));Ee>=8;H[J+Wr]=255&ct,Wr+=ia,ct/=256,Ee-=8);for(Ge=Ge<0;H[J+Wr]=255&Ge,Wr+=ia,Ge/=256,Nt-=8);H[J+Wr-ia]|=128*fa};function Mu(H){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(H)?H:new Uint8Array(H||0),this.pos=0,this.type=0,this.length=this.buf.length}Mu.Varint=0,Mu.Fixed64=1,Mu.Bytes=2,Mu.Fixed32=5;var w0=4294967296,sv=1/w0,xg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Pp(H){return H.type===Mu.Bytes?H.readVarint()+H.pos:H.pos+1}function lv(H,R,J){return J?4294967296*R+(H>>>0):4294967296*(R>>>0)+(H>>>0)}function bg(H,R,J){var ve=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(7*Math.LN2));J.realloc(ve);for(var Ee=J.pos-1;Ee>=H;Ee--)J.buf[Ee+ve]=J.buf[Ee]}function T0(H,R){for(var J=0;J>>8,H[J+2]=R>>>16,H[J+3]=R>>>24}function Lx(H,R){return(H[R]|H[R+1]<<8|H[R+2]<<16)+(H[R+3]<<24)}Mu.prototype={destroy:function(){this.buf=null},readFields:function(H,R,J){for(J=J||this.length;this.pos>3,Be=this.pos;this.type=7&ve,H(Ee,R,this),this.pos===Be&&this.skip(ve)}return R},readMessage:function(H,R){return this.readFields(H,R,this.readVarint()+this.pos)},readFixed32:function(){var H=Dv(this.buf,this.pos);return this.pos+=4,H},readSFixed32:function(){var H=Lx(this.buf,this.pos);return this.pos+=4,H},readFixed64:function(){var H=Dv(this.buf,this.pos)+Dv(this.buf,this.pos+4)*w0;return this.pos+=8,H},readSFixed64:function(){var H=Dv(this.buf,this.pos)+Lx(this.buf,this.pos+4)*w0;return this.pos+=8,H},readFloat:function(){var H=Rv(this.buf,this.pos,!0,23,4);return this.pos+=4,H},readDouble:function(){var H=Rv(this.buf,this.pos,!0,52,8);return this.pos+=8,H},readVarint:function(H){var R,J,ve=this.buf;return R=127&(J=ve[this.pos++]),J<128?R:(R|=(127&(J=ve[this.pos++]))<<7,J<128?R:(R|=(127&(J=ve[this.pos++]))<<14,J<128?R:(R|=(127&(J=ve[this.pos++]))<<21,J<128?R:function(Ee,Be,Ge){var ct,At,Nt=Ge.buf;if(ct=(112&(At=Nt[Ge.pos++]))>>4,At<128||(ct|=(127&(At=Nt[Ge.pos++]))<<3,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<10,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<17,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<24,At<128)||(ct|=(1&(At=Nt[Ge.pos++]))<<31,At<128))return lv(Ee,ct,Be);throw new Error("Expected varint not more than 10 bytes")}(R|=(15&(J=ve[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,R=this.pos;return this.pos=H,H-R>=12&&xg?function(J,ve,Ee){return xg.decode(J.subarray(ve,Ee))}(this.buf,R,H):function(J,ve,Ee){for(var Be="",Ge=ve;Ge239?4:ar>223?3:ar>191?2:1;if(Ge+zr>Ee)break;zr===1?ar<128&&(Mr=ar):zr===2?(192&(ct=J[Ge+1]))==128&&(Mr=(31&ar)<<6|63&ct)<=127&&(Mr=null):zr===3?(At=J[Ge+2],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&((Mr=(15&ar)<<12|(63&ct)<<6|63&At)<=2047||Mr>=55296&&Mr<=57343)&&(Mr=null)):zr===4&&(At=J[Ge+2],Nt=J[Ge+3],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&(192&Nt)==128&&((Mr=(15&ar)<<18|(63&ct)<<12|(63&At)<<6|63&Nt)<=65535||Mr>=1114112)&&(Mr=null)),Mr===null?(Mr=65533,zr=1):Mr>65535&&(Mr-=65536,Be+=String.fromCharCode(Mr>>>10&1023|55296),Mr=56320|1023&Mr),Be+=String.fromCharCode(Mr),Ge+=zr}return Be}(this.buf,R,H)},readBytes:function(){var H=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,H);return this.pos=H,R},readPackedVarint:function(H,R){if(this.type!==Mu.Bytes)return H.push(this.readVarint(R));var J=Pp(this);for(H=H||[];this.pos127;);else if(R===Mu.Bytes)this.pos=this.readVarint()+this.pos;else if(R===Mu.Fixed32)this.pos+=4;else{if(R!==Mu.Fixed64)throw new Error("Unimplemented type: "+R);this.pos+=8}},writeTag:function(H,R){this.writeVarint(H<<3|R)},realloc:function(H){for(var R=this.length||16;R268435455||H<0?function(R,J){var ve,Ee;if(R>=0?(ve=R%4294967296|0,Ee=R/4294967296|0):(Ee=~(-R/4294967296),4294967295^(ve=~(-R%4294967296))?ve=ve+1|0:(ve=0,Ee=Ee+1|0)),R>=18446744073709552e3||R<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");J.realloc(10),function(Be,Ge,ct){ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,ct.buf[ct.pos]=127&(Be>>>=7)}(ve,0,J),function(Be,Ge){var ct=(7&Be)<<4;Ge.buf[Ge.pos++]|=ct|((Be>>>=3)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be)))))}(Ee,J)}(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 R=this.pos;this.pos=function(ve,Ee,Be){for(var Ge,ct,At=0;At55295&&Ge<57344){if(!ct){Ge>56319||At+1===Ee.length?(ve[Be++]=239,ve[Be++]=191,ve[Be++]=189):ct=Ge;continue}if(Ge<56320){ve[Be++]=239,ve[Be++]=191,ve[Be++]=189,ct=Ge;continue}Ge=ct-55296<<10|Ge-56320|65536,ct=null}else ct&&(ve[Be++]=239,ve[Be++]=191,ve[Be++]=189,ct=null);Ge<128?ve[Be++]=Ge:(Ge<2048?ve[Be++]=Ge>>6|192:(Ge<65536?ve[Be++]=Ge>>12|224:(ve[Be++]=Ge>>18|240,ve[Be++]=Ge>>12&63|128),ve[Be++]=Ge>>6&63|128),ve[Be++]=63&Ge|128)}return Be}(this.buf,H,this.pos);var J=this.pos-R;J>=128&&bg(R,J,this),this.pos=R-1,this.writeVarint(J),this.pos+=J},writeFloat:function(H){this.realloc(4),lm(this.buf,H,this.pos,!0,23,4),this.pos+=4},writeDouble:function(H){this.realloc(8),lm(this.buf,H,this.pos,!0,52,8),this.pos+=8},writeBytes:function(H){var R=H.length;this.writeVarint(R),this.realloc(R);for(var J=0;J=128&&bg(J,ve,this),this.pos=J-1,this.writeVarint(ve),this.pos+=ve},writeMessage:function(H,R,J){this.writeTag(H,Mu.Bytes),this.writeRawMessage(R,J)},writePackedVarint:function(H,R){R.length&&this.writeMessage(H,T0,R)},writePackedSVarint:function(H,R){R.length&&this.writeMessage(H,UT,R)},writePackedBoolean:function(H,R){R.length&&this.writeMessage(H,VT,R)},writePackedFloat:function(H,R){R.length&&this.writeMessage(H,jT,R)},writePackedDouble:function(H,R){R.length&&this.writeMessage(H,qT,R)},writePackedFixed32:function(H,R){R.length&&this.writeMessage(H,vk,R)},writePackedSFixed32:function(H,R){R.length&&this.writeMessage(H,GT,R)},writePackedFixed64:function(H,R){R.length&&this.writeMessage(H,HT,R)},writePackedSFixed64:function(H,R){R.length&&this.writeMessage(H,WT,R)},writeBytesField:function(H,R){this.writeTag(H,Mu.Bytes),this.writeBytes(R)},writeFixed32Field:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeSFixed64(R)},writeVarintField:function(H,R){this.writeTag(H,Mu.Varint),this.writeVarint(R)},writeSVarintField:function(H,R){this.writeTag(H,Mu.Varint),this.writeSVarint(R)},writeStringField:function(H,R){this.writeTag(H,Mu.Bytes),this.writeString(R)},writeFloatField:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeFloat(R)},writeDoubleField:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeDouble(R)},writeBooleanField:function(H,R){this.writeVarintField(H,!!R)}};var P1=r(Dh);let I1=3;function mk(H,R,J){H===1&&J.readMessage(XT,R)}function XT(H,R,J){if(H===3){let{id:ve,bitmap:Ee,width:Be,height:Ge,left:ct,top:At,advance:Nt}=J.readMessage(Px,{});R.push({id:ve,bitmap:new Rn({width:Be+2*I1,height:Ge+2*I1},Ee),metrics:{width:Be,height:Ge,left:ct,top:At,advance:Nt}})}}function Px(H,R,J){H===1?R.id=J.readVarint():H===2?R.bitmap=J.readBytes():H===3?R.width=J.readVarint():H===4?R.height=J.readVarint():H===5?R.left=J.readSVarint():H===6?R.top=J.readSVarint():H===7&&(R.advance=J.readVarint())}let Ix=I1;function R1(H){let R=0,J=0;for(let Ge of H)R+=Ge.w*Ge.h,J=Math.max(J,Ge.w);H.sort((Ge,ct)=>ct.h-Ge.h);let ve=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(R/.95)),J),h:1/0}],Ee=0,Be=0;for(let Ge of H)for(let ct=ve.length-1;ct>=0;ct--){let At=ve[ct];if(!(Ge.w>At.w||Ge.h>At.h)){if(Ge.x=At.x,Ge.y=At.y,Be=Math.max(Be,Ge.y+Ge.h),Ee=Math.max(Ee,Ge.x+Ge.w),Ge.w===At.w&&Ge.h===At.h){let Nt=ve.pop();ct=0&&ve>=R&&Ag[this.text.charCodeAt(ve)];ve--)J--;this.text=this.text.substring(R,J),this.sectionIndex=this.sectionIndex.slice(R,J)}substring(R,J){let ve=new um;return ve.text=this.text.substring(R,J),ve.sectionIndex=this.sectionIndex.slice(R,J),ve.sections=this.sections,ve}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((R,J)=>Math.max(R,this.sections[J].scale),0)}addTextSection(R,J){this.text+=R.text,this.sections.push(S0.forText(R.scale,R.fontStack||J));let ve=this.sections.length-1;for(let Ee=0;Ee=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function M0(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia){let fa=um.fromFeature(H,Ee),ja;Mr===e.ah.vertical&&fa.verticalizePunctuation();let{processBidirectionalText:Ka,processStyledBidirectionalText:Wi}=Js;if(Ka&&fa.sections.length===1){ja=[];let en=Ka(fa.toString(),cm(fa,Nt,Be,R,ve,Wr));for(let jn of en){let Lo=new um;Lo.text=jn,Lo.sections=fa.sections;for(let xs=0;xs0&&Xp>yf&&(yf=Xp)}else{let zc=Lo[pu.fontStack],Pf=zc&&zc[Ju];if(Pf&&Pf.rect)mm=Pf.rect,Qc=Pf.metrics;else{let Xp=jn[pu.fontStack],Zd=Xp&&Xp[Ju];if(!Zd)continue;Qc=Zd.metrics}Dp=(ah-pu.scale)*hu}Wp?(en.verticalizable=!0,dh.push({glyph:Ju,imageName:_d,x:Rs,y:Ku+Dp,vertical:Wp,scale:pu.scale,fontStack:pu.fontStack,sectionIndex:fc,metrics:Qc,rect:mm}),Rs+=fd*pu.scale+xn):(dh.push({glyph:Ju,imageName:_d,x:Rs,y:Ku+Dp,vertical:Wp,scale:pu.scale,fontStack:pu.fontStack,sectionIndex:fc,metrics:Qc,rect:mm}),Rs+=Qc.advance*pu.scale+xn)}dh.length!==0&&(Uu=Math.max(Rs-xn,Uu),uv(dh,0,dh.length-1,Hp,yf)),Rs=0;let Rp=zn*ah+yf;Ah.lineOffset=Math.max(yf,Fh),Ku+=Rp,th=Math.max(Rp,th),++Th}var rh;let $h=Ku-eh,{horizontalAlign:Qh,verticalAlign:ep}=Mg(is);(function(ff,ah,Fh,Ah,dh,yf,Rp,vp,pu){let fc=(ah-Fh)*dh,Ju=0;Ju=yf!==Rp?-vp*Ah-eh:(-Ah*pu+.5)*Rp;for(let Dp of ff)for(let Qc of Dp.positionedGlyphs)Qc.x+=fc,Qc.y+=Ju})(en.positionedLines,Hp,Qh,ep,Uu,th,zn,$h,vo.length),en.top+=-ep*$h,en.bottom=en.top+$h,en.left+=-Qh*Uu,en.right=en.left+Uu}(qi,R,J,ve,ja,Ge,ct,At,Mr,Nt,zr,ia),!function(en){for(let jn of en)if(jn.positionedGlyphs.length!==0)return!1;return!0}(gi)&&qi}let Ag={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 Rx(H,R,J,ve,Ee,Be){if(R.imageName){let Ge=ve[R.imageName];return Ge?Ge.displaySize[0]*R.scale*hu/Be+Ee:0}{let Ge=J[R.fontStack],ct=Ge&&Ge[H];return ct?ct.metrics.advance*R.scale+Ee:0}}function Dx(H,R,J,ve){let Ee=Math.pow(H-R,2);return ve?H=0,Nt=0;for(let Mr=0;MrNt){let ar=Math.ceil(Be/Nt);Ee*=ar/Ge,Ge=ar}return{x1:ve,y1:Ee,x2:ve+Be,y2:Ee+Ge}}function Ox(H,R,J,ve,Ee,Be){let Ge=H.image,ct;if(Ge.content){let ja=Ge.content,Ka=Ge.pixelRatio||1;ct=[ja[0]/Ka,ja[1]/Ka,Ge.displaySize[0]-ja[2]/Ka,Ge.displaySize[1]-ja[3]/Ka]}let At=R.left*Be,Nt=R.right*Be,ar,Mr,zr,Wr;J==="width"||J==="both"?(Wr=Ee[0]+At-ve[3],Mr=Ee[0]+Nt+ve[1]):(Wr=Ee[0]+(At+Nt-Ge.displaySize[0])/2,Mr=Wr+Ge.displaySize[0]);let ia=R.top*Be,fa=R.bottom*Be;return J==="height"||J==="both"?(ar=Ee[1]+ia-ve[0],zr=Ee[1]+fa+ve[2]):(ar=Ee[1]+(ia+fa-Ge.displaySize[1])/2,zr=ar+Ge.displaySize[1]),{image:Ge,top:ar,right:Mr,bottom:zr,left:Wr,collisionPadding:ct}}let k0=255,yd=128,cv=k0*yd;function Bx(H,R){let{expression:J}=R;if(J.kind==="constant")return{kind:"constant",layoutSize:J.evaluate(new Fs(H+1))};if(J.kind==="source")return{kind:"source"};{let{zoomStops:ve,interpolationType:Ee}=J,Be=0;for(;BeGe.id),this.index=R.index,this.pixelRatio=R.pixelRatio,this.sourceLayerIndex=R.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=di([]),this.placementViewportMatrix=di([]);let J=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Bx(this.zoom,J["text-size"]),this.iconSizeData=Bx(this.zoom,J["icon-size"]);let ve=this.layers[0].layout,Ee=ve.get("symbol-sort-key"),Be=ve.get("symbol-z-order");this.canOverlap=D1(ve,"text-overlap","text-allow-overlap")!=="never"||D1(ve,"icon-overlap","icon-allow-overlap")!=="never"||ve.get("text-ignore-placement")||ve.get("icon-ignore-placement"),this.sortFeaturesByKey=Be!=="viewport-y"&&!Ee.isConstant(),this.sortFeaturesByY=(Be==="viewport-y"||Be==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,ve.get("symbol-placement")==="point"&&(this.writingModes=ve.get("text-writing-mode").map(Ge=>e.ah[Ge])),this.stateDependentLayerIds=this.layers.filter(Ge=>Ge.isStateDependent()).map(Ge=>Ge.id),this.sourceID=R.sourceID}createArrays(){this.text=new O1(new al(this.layers,this.zoom,R=>/^text/.test(R))),this.icon=new O1(new al(this.layers,this.zoom,R=>/^icon/.test(R))),this.glyphOffsetArray=new ls,this.lineVertexArray=new Mo,this.symbolInstances=new Ao,this.textAnchorOffsets=new ds}calculateGlyphDependencies(R,J,ve,Ee,Be){for(let Ge=0;Ge0)&&(Ge.value.kind!=="constant"||Ge.value.value.length>0),ar=At.value.kind!=="constant"||!!At.value.value||Object.keys(At.parameters).length>0,Mr=Be.get("symbol-sort-key");if(this.features=[],!Nt&&!ar)return;let zr=J.iconDependencies,Wr=J.glyphDependencies,ia=J.availableImages,fa=new Fs(this.zoom);for(let{feature:ja,id:Ka,index:Wi,sourceLayerIndex:gi}of R){let qi=Ee._featureFilter.needGeometry,en=Wl(ja,qi);if(!Ee._featureFilter.filter(fa,en,ve))continue;let jn,Lo;if(qi||(en.geometry=Tl(ja)),Nt){let vo=Ee.getValueAndResolveTokens("text-field",en,ve,ia),zn=ra.factory(vo),is=this.hasRTLText=this.hasRTLText||F1(zn);(!is||Js.getRTLTextPluginStatus()==="unavailable"||is&&Js.isParsed())&&(jn=ov(zn,Ee,en))}if(ar){let vo=Ee.getValueAndResolveTokens("icon-image",en,ve,ia);Lo=vo instanceof Za?vo:Za.fromString(vo)}if(!jn&&!Lo)continue;let xs=this.sortFeaturesByKey?Mr.evaluate(en,{},ve):void 0;if(this.features.push({id:Ka,text:jn,icon:Lo,index:Wi,sourceLayerIndex:gi,geometry:en.geometry,properties:ja.properties,type:JT[ja.type],sortKey:xs}),Lo&&(zr[Lo.name]=!0),jn){let vo=Ge.evaluate(en,{},ve).join(","),zn=Be.get("text-rotation-alignment")!=="viewport"&&Be.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 qo=yo(jn.toString()),Bo=is.fontStack||vo,xn=Wr[Bo]=Wr[Bo]||{};this.calculateGlyphDependencies(is.text,xn,zn,this.allowVerticalPlacement,qo)}}}Be.get("symbol-placement")==="line"&&(this.features=function(ja){let Ka={},Wi={},gi=[],qi=0;function en(vo){gi.push(ja[vo]),qi++}function jn(vo,zn,is){let qo=Wi[vo];return delete Wi[vo],Wi[zn]=qo,gi[qo].geometry[0].pop(),gi[qo].geometry[0]=gi[qo].geometry[0].concat(is[0]),qo}function Lo(vo,zn,is){let qo=Ka[zn];return delete Ka[zn],Ka[vo]=qo,gi[qo].geometry[0].shift(),gi[qo].geometry[0]=is[0].concat(gi[qo].geometry[0]),qo}function xs(vo,zn,is){let qo=is?zn[0][zn[0].length-1]:zn[0][0];return`${vo}:${qo.x}:${qo.y}`}for(let vo=0;vovo.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ja,Ka)=>ja.sortKey-Ka.sortKey)}update(R,J,ve){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(R,J,this.layers,ve),this.icon.programConfigurations.updatePaintArrays(R,J,this.layers,ve))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(R){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(R),this.iconCollisionBox.upload(R)),this.text.upload(R,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(R,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(R,J){let ve=this.lineVertexArray.length;if(R.segment!==void 0){let Ee=R.dist(J[R.segment+1]),Be=R.dist(J[R.segment]),Ge={};for(let ct=R.segment+1;ct=0;ct--)Ge[ct]={x:J[ct].x,y:J[ct].y,tileUnitDistanceFromAnchor:Be},ct>0&&(Be+=J[ct-1].dist(J[ct]));for(let ct=0;ct0}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(R,J){let ve=R.placedSymbolArray.get(J),Ee=ve.vertexStartIndex+4*ve.numGlyphs;for(let Be=ve.vertexStartIndex;BeEe[ct]-Ee[At]||Be[At]-Be[ct]),Ge}addToSortKeyRanges(R,J){let ve=this.sortKeyRanges[this.sortKeyRanges.length-1];ve&&ve.sortKey===J?ve.symbolInstanceEnd=R+1:this.sortKeyRanges.push({sortKey:J,symbolInstanceStart:R,symbolInstanceEnd:R+1})}sortFeatures(R){if(this.sortFeaturesByY&&this.sortedAngle!==R&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let J of this.symbolInstanceIndexes){let ve=this.symbolInstances.get(J);this.featureSortOrder.push(ve.featureIndex),[ve.rightJustifiedTextSymbolIndex,ve.centerJustifiedTextSymbolIndex,ve.leftJustifiedTextSymbolIndex].forEach((Ee,Be,Ge)=>{Ee>=0&&Ge.indexOf(Ee)===Be&&this.addIndicesForPlacedSymbol(this.text,Ee)}),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)}}}let cf,C0;mi("SymbolBucket",fm,{omit:["layers","collisionBoxArray","features","compareText"]}),fm.MAX_GLYPHS=65535,fm.addDynamicAttributes=z1;var kg={get paint(){return C0=C0||new Oe({"icon-opacity":new Fo(te.paint_symbol["icon-opacity"]),"icon-color":new Fo(te.paint_symbol["icon-color"]),"icon-halo-color":new Fo(te.paint_symbol["icon-halo-color"]),"icon-halo-width":new Fo(te.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Fo(te.paint_symbol["icon-halo-blur"]),"icon-translate":new fo(te.paint_symbol["icon-translate"]),"icon-translate-anchor":new fo(te.paint_symbol["icon-translate-anchor"]),"text-opacity":new Fo(te.paint_symbol["text-opacity"]),"text-color":new Fo(te.paint_symbol["text-color"],{runtimeType:Bt,getOverride:H=>H.textColor,hasOverride:H=>!!H.textColor}),"text-halo-color":new Fo(te.paint_symbol["text-halo-color"]),"text-halo-width":new Fo(te.paint_symbol["text-halo-width"]),"text-halo-blur":new Fo(te.paint_symbol["text-halo-blur"]),"text-translate":new fo(te.paint_symbol["text-translate"]),"text-translate-anchor":new fo(te.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Oe({"symbol-placement":new fo(te.layout_symbol["symbol-placement"]),"symbol-spacing":new fo(te.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fo(te.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Fo(te.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fo(te.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fo(te.layout_symbol["icon-allow-overlap"]),"icon-overlap":new fo(te.layout_symbol["icon-overlap"]),"icon-ignore-placement":new fo(te.layout_symbol["icon-ignore-placement"]),"icon-optional":new fo(te.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fo(te.layout_symbol["icon-rotation-alignment"]),"icon-size":new Fo(te.layout_symbol["icon-size"]),"icon-text-fit":new fo(te.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fo(te.layout_symbol["icon-text-fit-padding"]),"icon-image":new Fo(te.layout_symbol["icon-image"]),"icon-rotate":new Fo(te.layout_symbol["icon-rotate"]),"icon-padding":new Fo(te.layout_symbol["icon-padding"]),"icon-keep-upright":new fo(te.layout_symbol["icon-keep-upright"]),"icon-offset":new Fo(te.layout_symbol["icon-offset"]),"icon-anchor":new Fo(te.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fo(te.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fo(te.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fo(te.layout_symbol["text-rotation-alignment"]),"text-field":new Fo(te.layout_symbol["text-field"]),"text-font":new Fo(te.layout_symbol["text-font"]),"text-size":new Fo(te.layout_symbol["text-size"]),"text-max-width":new Fo(te.layout_symbol["text-max-width"]),"text-line-height":new fo(te.layout_symbol["text-line-height"]),"text-letter-spacing":new Fo(te.layout_symbol["text-letter-spacing"]),"text-justify":new Fo(te.layout_symbol["text-justify"]),"text-radial-offset":new Fo(te.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fo(te.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Fo(te.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Fo(te.layout_symbol["text-anchor"]),"text-max-angle":new fo(te.layout_symbol["text-max-angle"]),"text-writing-mode":new fo(te.layout_symbol["text-writing-mode"]),"text-rotate":new Fo(te.layout_symbol["text-rotate"]),"text-padding":new fo(te.layout_symbol["text-padding"]),"text-keep-upright":new fo(te.layout_symbol["text-keep-upright"]),"text-transform":new Fo(te.layout_symbol["text-transform"]),"text-offset":new Fo(te.layout_symbol["text-offset"]),"text-allow-overlap":new fo(te.layout_symbol["text-allow-overlap"]),"text-overlap":new fo(te.layout_symbol["text-overlap"]),"text-ignore-placement":new fo(te.layout_symbol["text-ignore-placement"]),"text-optional":new fo(te.layout_symbol["text-optional"])})}};class L0{constructor(R){if(R.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=R.property.overrides?R.property.overrides.runtimeType:rt,this.defaultValue=R}evaluate(R){if(R.formattedSection){let J=this.defaultValue.property.overrides;if(J&&J.hasOverride(R.formattedSection))return J.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default}eachChild(R){this.defaultValue.isConstant()||R(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}mi("FormatSectionOverride",L0,{omit:["defaultValue"]});class zv extends ie{constructor(R){super(R,kg)}recalculate(R,J){if(super.recalculate(R,J),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 ve=this.layout.get("text-writing-mode");if(ve){let Ee=[];for(let Be of ve)Ee.indexOf(Be)<0&&Ee.push(Be);this.layout._values["text-writing-mode"]=Ee}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(R,J,ve,Ee){let Be=this.layout.get(R).evaluate(J,{},ve,Ee),Ge=this._unevaluatedLayout._values[R];return Ge.isDataDriven()||Mc(Ge.value)||!Be?Be:function(ct,At){return At.replace(/{([^{}]+)}/g,(Nt,ar)=>ct&&ar in ct?String(ct[ar]):"")}(J.properties,Be)}createBucket(R){return new fm(R)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let R of kg.paint.overridableProperties){if(!zv.hasPaintOverride(this.layout,R))continue;let J=this.paint.get(R),ve=new L0(J),Ee=new Lu(ve,J.property.specification),Be=null;Be=J.value.kind==="constant"||J.value.kind==="source"?new vc("source",Ee):new yu("composite",Ee,J.value.zoomStops),this.paint._values[R]=new Au(J.property,Be,J.parameters)}}_handleOverridablePaintPropertyUpdate(R,J,ve){return!(!this.layout||J.isDataDriven()||ve.isDataDriven())&&zv.hasPaintOverride(this.layout,R)}static hasPaintOverride(R,J){let ve=R.get("text-field"),Ee=kg.paint.properties[J],Be=!1,Ge=ct=>{for(let At of ct)if(Ee.overrides&&Ee.overrides.hasOverride(At))return void(Be=!0)};if(ve.value.kind==="constant"&&ve.value.value instanceof ra)Ge(ve.value.value.sections);else if(ve.value.kind==="source"){let ct=Nt=>{Be||(Nt instanceof tn&&Ia(Nt.value)===qr?Ge(Nt.value.sections):Nt instanceof ss?Ge(Nt.sections):Nt.eachChild(ct))},At=ve.value;At._styleExpression&&ct(At._styleExpression.expression)}return Be}}let Nx;var P0={get paint(){return Nx=Nx||new Oe({"background-color":new fo(te.paint_background["background-color"]),"background-pattern":new lc(te.paint_background["background-pattern"]),"background-opacity":new fo(te.paint_background["background-opacity"])})}};class QT extends ie{constructor(R){super(R,P0)}}let B1;var Ux={get paint(){return B1=B1||new Oe({"raster-opacity":new fo(te.paint_raster["raster-opacity"]),"raster-hue-rotate":new fo(te.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fo(te.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fo(te.paint_raster["raster-brightness-max"]),"raster-saturation":new fo(te.paint_raster["raster-saturation"]),"raster-contrast":new fo(te.paint_raster["raster-contrast"]),"raster-resampling":new fo(te.paint_raster["raster-resampling"]),"raster-fade-duration":new fo(te.paint_raster["raster-fade-duration"])})}};class I0 extends ie{constructor(R){super(R,Ux)}}class N1 extends ie{constructor(R){super(R,{}),this.onAdd=J=>{this.implementation.onAdd&&this.implementation.onAdd(J,J.painter.context.gl)},this.onRemove=J=>{this.implementation.onRemove&&this.implementation.onRemove(J,J.painter.context.gl)},this.implementation=R}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(R){this._methodToThrottle=R,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(R,J){if(isNaN(R)||isNaN(J))throw new Error(`Invalid LngLat object: (${R}, ${J})`);if(this.lng=+R,this.lat=+J,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Hd(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(R){let J=Math.PI/180,ve=this.lat*J,Ee=R.lat*J,Be=Math.sin(ve)*Math.sin(Ee)+Math.cos(ve)*Math.cos(Ee)*Math.cos((R.lng-this.lng)*J);return j1*Math.acos(Math.min(Be,1))}static convert(R){if(R instanceof Hd)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new Hd(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new Hd(Number("lng"in R?R.lng:R.lon),Number(R.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let hm=2*Math.PI*j1;function jx(H){return hm*Math.cos(H*Math.PI/180)}function Cg(H){return(180+H)/360}function qx(H){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H*Math.PI/360)))/360}function Lg(H,R){return H/jx(R)}function R0(H){return 360/Math.PI*Math.atan(Math.exp((180-360*H)*Math.PI/180))-90}class D0{constructor(R,J,ve=0){this.x=+R,this.y=+J,this.z=+ve}static fromLngLat(R,J=0){let ve=Hd.convert(R);return new D0(Cg(ve.lng),qx(ve.lat),Lg(J,ve.lat))}toLngLat(){return new Hd(360*this.x-180,R0(this.y))}toAltitude(){return this.z*jx(R0(this.y))}meterInMercatorCoordinateUnits(){return 1/hm*(R=R0(this.y),1/Math.cos(R*Math.PI/180));var R}}function rd(H,R,J){var ve=2*Math.PI*6378137/256/Math.pow(2,J);return[H*ve-2*Math.PI*6378137/2,R*ve-2*Math.PI*6378137/2]}class q1{constructor(R,J,ve){if(!function(Ee,Be,Ge){return!(Ee<0||Ee>25||Ge<0||Ge>=Math.pow(2,Ee)||Be<0||Be>=Math.pow(2,Ee))}(R,J,ve))throw new Error(`x=${J}, y=${ve}, z=${R} outside of bounds. 0<=x<${Math.pow(2,R)}, 0<=y<${Math.pow(2,R)} 0<=z<=25 `);this.z=R,this.x=J,this.y=ve,this.key=z0(0,R,R,J,ve)}equals(R){return this.z===R.z&&this.x===R.x&&this.y===R.y}url(R,J,ve){let Ee=(Ge=this.y,ct=this.z,At=rd(256*(Be=this.x),256*(Ge=Math.pow(2,ct)-Ge-1),ct),Nt=rd(256*(Be+1),256*(Ge+1),ct),At[0]+","+At[1]+","+Nt[0]+","+Nt[1]);var Be,Ge,ct,At,Nt;let ar=function(Mr,zr,Wr){let ia,fa="";for(let ja=Mr;ja>0;ja--)ia=1<1?"@2x":"").replace(/{quadkey}/g,ar).replace(/{bbox-epsg-3857}/g,Ee)}isChildOf(R){let J=this.z-R.z;return J>0&&R.x===this.x>>J&&R.y===this.y>>J}getTilePoint(R){let J=Math.pow(2,this.z);return new i((R.x*J-this.x)*po,(R.y*J-this.y)*po)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vx{constructor(R,J){this.wrap=R,this.canonical=J,this.key=z0(R,J.z,J.z,J.x,J.y)}}class Gp{constructor(R,J,ve,Ee,Be){if(R= z; overscaledZ = ${R}; z = ${ve}`);this.overscaledZ=R,this.wrap=J,this.canonical=new q1(ve,+Ee,+Be),this.key=z0(J,R,ve,Ee,Be)}clone(){return new Gp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)}scaledTo(R){if(R>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${R}; overscaledZ = ${this.overscaledZ}`);let J=this.canonical.z-R;return R>this.canonical.z?new Gp(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Gp(R,this.wrap,R,this.canonical.x>>J,this.canonical.y>>J)}calculateScaledKey(R,J){if(R>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${R}; overscaledZ = ${this.overscaledZ}`);let ve=this.canonical.z-R;return R>this.canonical.z?z0(this.wrap*+J,R,this.canonical.z,this.canonical.x,this.canonical.y):z0(this.wrap*+J,R,R,this.canonical.x>>ve,this.canonical.y>>ve)}isChildOf(R){if(R.wrap!==this.wrap)return!1;let J=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>J&&R.canonical.y===this.canonical.y>>J}children(R){if(this.overscaledZ>=R)return[new Gp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let J=this.canonical.z+1,ve=2*this.canonical.x,Ee=2*this.canonical.y;return[new Gp(J,this.wrap,J,ve,Ee),new Gp(J,this.wrap,J,ve+1,Ee),new Gp(J,this.wrap,J,ve,Ee+1),new Gp(J,this.wrap,J,ve+1,Ee+1)]}isLessThan(R){return this.wrapR.wrap)&&(this.overscaledZR.overscaledZ)&&(this.canonical.xR.canonical.x)&&this.canonical.ythis.max&&(this.max=Mr),Mr=this.dim+1||J<-1||J>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(J+1)*this.stride+(R+1)}unpack(R,J,ve){return R*this.redFactor+J*this.greenFactor+ve*this.blueFactor-this.baseShift}getPixels(){return new Ii({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(R,J,ve){if(this.dim!==R.dim)throw new Error("dem dimension mismatch");let Ee=J*this.dim,Be=J*this.dim+this.dim,Ge=ve*this.dim,ct=ve*this.dim+this.dim;switch(J){case-1:Ee=Be-1;break;case 1:Be=Ee+1}switch(ve){case-1:Ge=ct-1;break;case 1:ct=Ge+1}let At=-J*this.dim,Nt=-ve*this.dim;for(let ar=Ge;ar=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${R} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[R]}}class V1{constructor(R,J,ve,Ee,Be){this.type="Feature",this._vectorTileFeature=R,R._z=J,R._x=ve,R._y=Ee,this.properties=R.properties,this.id=Be}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(R){this._geometry=R}toJSON(){let R={geometry:this.geometry};for(let J in this)J!=="_geometry"&&J!=="_vectorTileFeature"&&(R[J]=this[J]);return R}}class Fv{constructor(R,J){this.tileID=R,this.x=R.canonical.x,this.y=R.canonical.y,this.z=R.canonical.z,this.grid=new Di(po,16,0),this.grid3D=new Di(po,16,0),this.featureIndexArray=new tl,this.promoteId=J}insert(R,J,ve,Ee,Be,Ge){let ct=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(ve,Ee,Be);let At=Ge?this.grid3D:this.grid;for(let Nt=0;Nt=0&&Mr[3]>=0&&At.insert(ct,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 Hx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(R,J,ve,Ee){this.loadVTLayers();let Be=R.params||{},Ge=po/R.tileSize/R.scale,ct=Ec(Be.filter),At=R.queryGeometry,Nt=R.queryPadding*Ge,ar=Xx(At),Mr=this.grid.query(ar.minX-Nt,ar.minY-Nt,ar.maxX+Nt,ar.maxY+Nt),zr=Xx(R.cameraQueryGeometry),Wr=this.grid3D.query(zr.minX-Nt,zr.minY-Nt,zr.maxX+Nt,zr.maxY+Nt,(ja,Ka,Wi,gi)=>function(qi,en,jn,Lo,xs){for(let zn of qi)if(en<=zn.x&&jn<=zn.y&&Lo>=zn.x&&xs>=zn.y)return!0;let vo=[new i(en,jn),new i(en,xs),new i(Lo,xs),new i(Lo,jn)];if(qi.length>2){for(let zn of vo)if(bi(qi,zn))return!0}for(let zn=0;zn(gi||(gi=Tl(qi)),en.queryIntersectsFeature(At,qi,jn,gi,this.z,R.transform,Ge,R.pixelPosMatrix)))}return ia}loadMatchingFeature(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr){let zr=this.bucketLayerIDs[J];if(Ge&&!function(ja,Ka){for(let Wi=0;Wi=0)return!0;return!1}(Ge,zr))return;let Wr=this.sourceLayerCoder.decode(ve),ia=this.vtLayers[Wr].feature(Ee);if(Be.needGeometry){let ja=Wl(ia,!0);if(!Be.filter(new Fs(this.tileID.overscaledZ),ja,this.tileID.canonical))return}else if(!Be.filter(new Fs(this.tileID.overscaledZ),ia))return;let fa=this.getId(ia,Wr);for(let ja=0;ja{let ct=R instanceof yc?R.get(Ge):null;return ct&&ct.evaluate?ct.evaluate(J,ve,Ee):ct})}function Xx(H){let R=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of H)R=Math.min(R,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return{minX:R,minY:J,maxX:ve,maxY:Ee}}function eA(H,R){return R-H}function Zx(H,R,J,ve,Ee){let Be=[];for(let Ge=0;Ge=ve&&Mr.x>=ve||(ar.x>=ve?ar=new i(ve,ar.y+(ve-ar.x)/(Mr.x-ar.x)*(Mr.y-ar.y))._round():Mr.x>=ve&&(Mr=new i(ve,ar.y+(ve-ar.x)/(Mr.x-ar.x)*(Mr.y-ar.y))._round()),ar.y>=Ee&&Mr.y>=Ee||(ar.y>=Ee?ar=new i(ar.x+(Ee-ar.y)/(Mr.y-ar.y)*(Mr.x-ar.x),Ee)._round():Mr.y>=Ee&&(Mr=new i(ar.x+(Ee-ar.y)/(Mr.y-ar.y)*(Mr.x-ar.x),Ee)._round()),At&&ar.equals(At[At.length-1])||(At=[ar],Be.push(At)),At.push(Mr)))))}}return Be}mi("FeatureIndex",Fv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends i{constructor(R,J,ve,Ee){super(R,J),this.angle=ve,Ee!==void 0&&(this.segment=Ee)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(H,R,J,ve,Ee){if(R.segment===void 0||J===0)return!0;let Be=R,Ge=R.segment+1,ct=0;for(;ct>-J/2;){if(Ge--,Ge<0)return!1;ct-=H[Ge].dist(Be),Be=H[Ge]}ct+=H[Ge].dist(H[Ge+1]),Ge++;let At=[],Nt=0;for(;ctve;)Nt-=At.shift().angleDelta;if(Nt>Ee)return!1;Ge++,ct+=ar.dist(Mr)}return!0}function Yx(H){let R=0;for(let J=0;JNt){let ia=(Nt-At)/Wr,fa=En.number(Mr.x,zr.x,ia),ja=En.number(Mr.y,zr.y,ia),Ka=new Wd(fa,ja,zr.angleTo(Mr),ar);return Ka._round(),!Ge||G1(H,Ka,ct,Ge,R)?Ka:void 0}At+=Wr}}function rA(H,R,J,ve,Ee,Be,Ge,ct,At){let Nt=Kx(ve,Be,Ge),ar=Jx(ve,Ee),Mr=ar*Ge,zr=H[0].x===0||H[0].x===At||H[0].y===0||H[0].y===At;return R-Mr=0&&qi=0&&en=0&&zr+Nt<=ar){let jn=new Wd(qi,en,Wi,ia);jn._round(),ve&&!G1(H,jn,Be,ve,Ee)||Wr.push(jn)}}Mr+=Ka}return ct||Wr.length||Ge||(Wr=$x(H,Mr/2,J,ve,Ee,Be,Ge,!0,At)),Wr}mi("Anchor",Wd);let pm=zh;function Qx(H,R,J,ve){let Ee=[],Be=H.image,Ge=Be.pixelRatio,ct=Be.paddedRect.w-2*pm,At=Be.paddedRect.h-2*pm,Nt={x1:H.left,y1:H.top,x2:H.right,y2:H.bottom},ar=Be.stretchX||[[0,ct]],Mr=Be.stretchY||[[0,At]],zr=(xn,cs)=>xn+cs[1]-cs[0],Wr=ar.reduce(zr,0),ia=Mr.reduce(zr,0),fa=ct-Wr,ja=At-ia,Ka=0,Wi=Wr,gi=0,qi=ia,en=0,jn=fa,Lo=0,xs=ja;if(Be.content&&ve){let xn=Be.content,cs=xn[2]-xn[0],No=xn[3]-xn[1];(Be.textFitWidth||Be.textFitHeight)&&(Nt=Fx(H)),Ka=Xd(ar,0,xn[0]),gi=Xd(Mr,0,xn[1]),Wi=Xd(ar,xn[0],xn[2]),qi=Xd(Mr,xn[1],xn[3]),en=xn[0]-Ka,Lo=xn[1]-gi,jn=cs-Wi,xs=No-qi}let vo=Nt.x1,zn=Nt.y1,is=Nt.x2-vo,qo=Nt.y2-zn,Bo=(xn,cs,No,Rs)=>{let Ku=Pg(xn.stretch-Ka,Wi,is,vo),Uu=dm(xn.fixed-en,jn,xn.stretch,Wr),th=Pg(cs.stretch-gi,qi,qo,zn),Hp=dm(cs.fixed-Lo,xs,cs.stretch,ia),Th=Pg(No.stretch-Ka,Wi,is,vo),rh=dm(No.fixed-en,jn,No.stretch,Wr),$h=Pg(Rs.stretch-gi,qi,qo,zn),Qh=dm(Rs.fixed-Lo,xs,Rs.stretch,ia),ep=new i(Ku,th),ff=new i(Th,th),ah=new i(Th,$h),Fh=new i(Ku,$h),Ah=new i(Uu/Ge,Hp/Ge),dh=new i(rh/Ge,Qh/Ge),yf=R*Math.PI/180;if(yf){let pu=Math.sin(yf),fc=Math.cos(yf),Ju=[fc,-pu,pu,fc];ep._matMult(Ju),ff._matMult(Ju),Fh._matMult(Ju),ah._matMult(Ju)}let Rp=xn.stretch+xn.fixed,vp=cs.stretch+cs.fixed;return{tl:ep,tr:ff,bl:Fh,br:ah,tex:{x:Be.paddedRect.x+pm+Rp,y:Be.paddedRect.y+pm+vp,w:No.stretch+No.fixed-Rp,h:Rs.stretch+Rs.fixed-vp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ah,pixelOffsetBR:dh,minFontScaleX:jn/Ge/is,minFontScaleY:xs/Ge/qo,isSDF:J}};if(ve&&(Be.stretchX||Be.stretchY)){let xn=eb(ar,fa,Wr),cs=eb(Mr,ja,ia);for(let No=0;No0&&(fa=Math.max(10,fa),this.circleDiameter=fa)}else{let zr=!((Mr=Ge.image)===null||Mr===void 0)&&Mr.content&&(Ge.image.textFitWidth||Ge.image.textFitHeight)?Fx(Ge):{x1:Ge.left,y1:Ge.top,x2:Ge.right,y2:Ge.bottom};zr.y1=zr.y1*ct-At[0],zr.y2=zr.y2*ct+At[2],zr.x1=zr.x1*ct-At[3],zr.x2=zr.x2*ct+At[1];let Wr=Ge.collisionPadding;if(Wr&&(zr.x1-=Wr[0]*ct,zr.y1-=Wr[1]*ct,zr.x2+=Wr[2]*ct,zr.y2+=Wr[3]*ct),ar){let ia=new i(zr.x1,zr.y1),fa=new i(zr.x2,zr.y1),ja=new i(zr.x1,zr.y2),Ka=new i(zr.x2,zr.y2),Wi=ar*Math.PI/180;ia._rotate(Wi),fa._rotate(Wi),ja._rotate(Wi),Ka._rotate(Wi),zr.x1=Math.min(ia.x,fa.x,ja.x,Ka.x),zr.x2=Math.max(ia.x,fa.x,ja.x,Ka.x),zr.y1=Math.min(ia.y,fa.y,ja.y,Ka.y),zr.y2=Math.max(ia.y,fa.y,ja.y,Ka.y)}R.emplaceBack(J.x,J.y,zr.x1,zr.y1,zr.x2,zr.y2,ve,Ee,Be)}this.boxEndIndex=R.length}}class cd{constructor(R=[],J=(ve,Ee)=>veEe?1:0){if(this.data=R,this.length=this.data.length,this.compare=J,this.length>0)for(let ve=(this.length>>1)-1;ve>=0;ve--)this._down(ve)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],J=this.data.pop();return--this.length>0&&(this.data[0]=J,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:J,compare:ve}=this,Ee=J[R];for(;R>0;){let Be=R-1>>1,Ge=J[Be];if(ve(Ee,Ge)>=0)break;J[R]=Ge,R=Be}J[R]=Ee}_down(R){let{data:J,compare:ve}=this,Ee=this.length>>1,Be=J[R];for(;R=0)break;J[R]=J[Ge],R=Ge}J[R]=Be}}function aA(H,R=1,J=!1){let ve=1/0,Ee=1/0,Be=-1/0,Ge=-1/0,ct=H[0];for(let Wr=0;WrBe)&&(Be=ia.x),(!Wr||ia.y>Ge)&&(Ge=ia.y)}let At=Math.min(Be-ve,Ge-Ee),Nt=At/2,ar=new cd([],iA);if(At===0)return new i(ve,Ee);for(let Wr=ve;WrMr.d||!Mr.d)&&(Mr=Wr,J&&console.log("found best %d after %d probes",Math.round(1e4*Wr.d)/1e4,zr)),Wr.max-Mr.d<=R||(Nt=Wr.h/2,ar.push(new vm(Wr.p.x-Nt,Wr.p.y-Nt,Nt,H)),ar.push(new vm(Wr.p.x+Nt,Wr.p.y-Nt,Nt,H)),ar.push(new vm(Wr.p.x-Nt,Wr.p.y+Nt,Nt,H)),ar.push(new vm(Wr.p.x+Nt,Wr.p.y+Nt,Nt,H)),zr+=4)}return J&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Mr.d}`)),Mr.p}function iA(H,R){return R.max-H.max}function vm(H,R,J,ve){this.p=new i(H,R),this.h=J,this.d=function(Ee,Be){let Ge=!1,ct=1/0;for(let At=0;AtEe.y!=ia.y>Ee.y&&Ee.x<(ia.x-Wr.x)*(Ee.y-Wr.y)/(ia.y-Wr.y)+Wr.x&&(Ge=!Ge),ct=Math.min(ct,xa(Ee,Wr,ia))}}return(Ge?1:-1)*Math.sqrt(ct)}(this.p,ve),this.max=this.d+this.h*Math.SQRT2}var wh;e.aq=void 0,(wh=e.aq||(e.aq={}))[wh.center=1]="center",wh[wh.left=2]="left",wh[wh.right=3]="right",wh[wh.top=4]="top",wh[wh.bottom=5]="bottom",wh[wh["top-left"]=6]="top-left",wh[wh["top-right"]=7]="top-right",wh[wh["bottom-left"]=8]="bottom-left",wh[wh["bottom-right"]=9]="bottom-right";let pv=7,Ov=Number.POSITIVE_INFINITY;function H1(H,R){return R[1]!==Ov?function(J,ve,Ee){let Be=0,Ge=0;switch(ve=Math.abs(ve),Ee=Math.abs(Ee),J){case"top-right":case"top-left":case"top":Ge=Ee-pv;break;case"bottom-right":case"bottom-left":case"bottom":Ge=-Ee+pv}switch(J){case"top-right":case"bottom-right":case"right":Be=-ve;break;case"top-left":case"bottom-left":case"left":Be=ve}return[Be,Ge]}(H,R[0],R[1]):function(J,ve){let Ee=0,Be=0;ve<0&&(ve=0);let Ge=ve/Math.SQRT2;switch(J){case"top-right":case"top-left":Be=Ge-pv;break;case"bottom-right":case"bottom-left":Be=-Ge+pv;break;case"bottom":Be=-ve+pv;break;case"top":Be=ve-pv}switch(J){case"top-right":case"bottom-right":Ee=-Ge;break;case"top-left":case"bottom-left":Ee=Ge;break;case"left":Ee=ve;break;case"right":Ee=-ve}return[Ee,Be]}(H,R[0])}function tb(H,R,J){var ve;let Ee=H.layout,Be=(ve=Ee.get("text-variable-anchor-offset"))===null||ve===void 0?void 0:ve.evaluate(R,{},J);if(Be){let ct=Be.values,At=[];for(let Nt=0;Ntzr*hu);ar.startsWith("top")?Mr[1]-=pv:ar.startsWith("bottom")&&(Mr[1]+=pv),At[Nt+1]=Mr}return new $a(At)}let Ge=Ee.get("text-variable-anchor");if(Ge){let ct;ct=H._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Ee.get("text-radial-offset").evaluate(R,{},J)*hu,Ov]:Ee.get("text-offset").evaluate(R,{},J).map(Nt=>Nt*hu);let At=[];for(let Nt of Ge)At.push(Nt,H1(Nt,ct));return new $a(At)}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,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=Be.textMaxSize.evaluate(R,{});Mr===void 0&&(Mr=Ge);let zr=H.layers[0].layout,Wr=zr.get("icon-offset").evaluate(R,{},ar),ia=ab(J.horizontal),fa=Ge/24,ja=H.tilePixelRatio*fa,Ka=H.tilePixelRatio*Mr/24,Wi=H.tilePixelRatio*ct,gi=H.tilePixelRatio*zr.get("symbol-spacing"),qi=zr.get("text-padding")*H.tilePixelRatio,en=function(xn,cs,No,Rs=1){let Ku=xn.get("icon-padding").evaluate(cs,{},No),Uu=Ku&&Ku.values;return[Uu[0]*Rs,Uu[1]*Rs,Uu[2]*Rs,Uu[3]*Rs]}(zr,R,ar,H.tilePixelRatio),jn=zr.get("text-max-angle")/180*Math.PI,Lo=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",xs=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",vo=zr.get("symbol-placement"),zn=gi/2,is=zr.get("icon-text-fit"),qo;ve&&is!=="none"&&(H.allowVerticalPlacement&&J.vertical&&(qo=Ox(ve,J.vertical,is,zr.get("icon-text-fit-padding"),Wr,fa)),ia&&(ve=Ox(ve,ia,is,zr.get("icon-text-fit-padding"),Wr,fa)));let Bo=(xn,cs)=>{cs.x<0||cs.x>=po||cs.y<0||cs.y>=po||function(No,Rs,Ku,Uu,th,Hp,Th,rh,$h,Qh,ep,ff,ah,Fh,Ah,dh,yf,Rp,vp,pu,fc,Ju,Dp,Qc,mm){let _d=No.addToLineVertexArray(Rs,Ku),fd,Wp,zc,Pf,Xp=0,Zd=0,mp=0,gm=0,J1=-1,zg=-1,xd={},Bv=ti("");if(No.allowVerticalPlacement&&Uu.vertical){let Oh=rh.layout.get("text-rotate").evaluate(fc,{},Qc)+90;zc=new hv($h,Rs,Qh,ep,ff,Uu.vertical,ah,Fh,Ah,Oh),Th&&(Pf=new hv($h,Rs,Qh,ep,ff,Th,yf,Rp,Ah,Oh))}if(th){let Oh=rh.layout.get("icon-rotate").evaluate(fc,{}),Zp=rh.layout.get("icon-text-fit")!=="none",dv=Qx(th,Oh,Dp,Zp),tp=Th?Qx(Th,Oh,Dp,Zp):void 0;Wp=new hv($h,Rs,Qh,ep,ff,th,yf,Rp,!1,Oh),Xp=4*dv.length;let Bh=No.iconSizeData,id=null;Bh.kind==="source"?(id=[yd*rh.layout.get("icon-size").evaluate(fc,{})],id[0]>cv&&y(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)):Bh.kind==="composite"&&(id=[yd*Ju.compositeIconSizes[0].evaluate(fc,{},Qc),yd*Ju.compositeIconSizes[1].evaluate(fc,{},Qc)],(id[0]>cv||id[1]>cv)&&y(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)),No.addSymbols(No.icon,dv,id,pu,vp,fc,e.ah.none,Rs,_d.lineStartIndex,_d.lineLength,-1,Qc),J1=No.icon.placedSymbolArray.length-1,tp&&(Zd=4*tp.length,No.addSymbols(No.icon,tp,id,pu,vp,fc,e.ah.vertical,Rs,_d.lineStartIndex,_d.lineLength,-1,Qc),zg=No.icon.placedSymbolArray.length-1)}let vh=Object.keys(Uu.horizontal);for(let Oh of vh){let Zp=Uu.horizontal[Oh];if(!fd){Bv=ti(Zp.text);let tp=rh.layout.get("text-rotate").evaluate(fc,{},Qc);fd=new hv($h,Rs,Qh,ep,ff,Zp,ah,Fh,Ah,tp)}let dv=Zp.positionedLines.length===1;if(mp+=rb(No,Rs,Zp,Hp,rh,Ah,fc,dh,_d,Uu.vertical?e.ah.horizontal:e.ah.horizontalOnly,dv?vh:[Oh],xd,J1,Ju,Qc),dv)break}Uu.vertical&&(gm+=rb(No,Rs,Uu.vertical,Hp,rh,Ah,fc,dh,_d,e.ah.vertical,["vertical"],xd,zg,Ju,Qc));let lA=fd?fd.boxStartIndex:No.collisionBoxArray.length,Fg=fd?fd.boxEndIndex:No.collisionBoxArray.length,bd=zc?zc.boxStartIndex:No.collisionBoxArray.length,gp=zc?zc.boxEndIndex:No.collisionBoxArray.length,sb=Wp?Wp.boxStartIndex:No.collisionBoxArray.length,uA=Wp?Wp.boxEndIndex:No.collisionBoxArray.length,lb=Pf?Pf.boxStartIndex:No.collisionBoxArray.length,cA=Pf?Pf.boxEndIndex:No.collisionBoxArray.length,ad=-1,B0=(Oh,Zp)=>Oh&&Oh.circleDiameter?Math.max(Oh.circleDiameter,Zp):Zp;ad=B0(fd,ad),ad=B0(zc,ad),ad=B0(Wp,ad),ad=B0(Pf,ad);let Og=ad>-1?1:0;Og&&(ad*=mm/hu),No.glyphOffsetArray.length>=fm.MAX_GLYPHS&&y("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=tb(rh,fc,Qc),[fA,hA]=function(Oh,Zp){let dv=Oh.length,tp=Zp?.values;if(tp?.length>0)for(let Bh=0;Bh=0?xd.right:-1,xd.center>=0?xd.center:-1,xd.left>=0?xd.left:-1,xd.vertical||-1,J1,zg,Bv,lA,Fg,bd,gp,sb,uA,lb,cA,Qh,mp,gm,Xp,Zd,Og,0,ah,ad,fA,hA)}(H,cs,xn,J,ve,Ee,qo,H.layers[0],H.collisionBoxArray,R.index,R.sourceLayerIndex,H.index,ja,[qi,qi,qi,qi],Lo,At,Wi,en,xs,Wr,R,Be,Nt,ar,Ge)};if(vo==="line")for(let xn of Zx(R.geometry,0,0,po,po)){let cs=rA(xn,gi,jn,J.vertical||ia,ve,24,Ka,H.overscaling,po);for(let No of cs)ia&&oA(H,ia.text,zn,No)||Bo(xn,No)}else if(vo==="line-center"){for(let xn of R.geometry)if(xn.length>1){let cs=tA(xn,jn,J.vertical||ia,ve,24,Ka);cs&&Bo(xn,cs)}}else if(R.type==="Polygon")for(let xn of Tc(R.geometry,0)){let cs=aA(xn,16);Bo(xn[0],new Wd(cs.x,cs.y,0))}else if(R.type==="LineString")for(let xn of R.geometry)Bo(xn,new Wd(xn[0].x,xn[0].y,0));else if(R.type==="Point")for(let xn of R.geometry)for(let cs of xn)Bo([cs],new Wd(cs.x,cs.y,0))}function rb(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia){let fa=function(Wi,gi,qi,en,jn,Lo,xs,vo){let zn=en.layout.get("text-rotate").evaluate(Lo,{})*Math.PI/180,is=[];for(let qo of gi.positionedLines)for(let Bo of qo.positionedGlyphs){if(!Bo.rect)continue;let xn=Bo.rect||{},cs=Ix+1,No=!0,Rs=1,Ku=0,Uu=(jn||vo)&&Bo.vertical,th=Bo.metrics.advance*Bo.scale/2;if(vo&&gi.verticalizable&&(Ku=qo.lineOffset/2-(Bo.imageName?-(hu-Bo.metrics.width*Bo.scale)/2:(Bo.scale-1)*hu)),Bo.imageName){let pu=xs[Bo.imageName];No=pu.sdf,Rs=pu.pixelRatio,cs=zh/Rs}let Hp=jn?[Bo.x+th,Bo.y]:[0,0],Th=jn?[0,0]:[Bo.x+th+qi[0],Bo.y+qi[1]-Ku],rh=[0,0];Uu&&(rh=Th,Th=[0,0]);let $h=Bo.metrics.isDoubleResolution?2:1,Qh=(Bo.metrics.left-cs)*Bo.scale-th+Th[0],ep=(-Bo.metrics.top-cs)*Bo.scale+Th[1],ff=Qh+xn.w/$h*Bo.scale/Rs,ah=ep+xn.h/$h*Bo.scale/Rs,Fh=new i(Qh,ep),Ah=new i(ff,ep),dh=new i(Qh,ah),yf=new i(ff,ah);if(Uu){let pu=new i(-th,th-eh),fc=-Math.PI/2,Ju=hu/2-th,Dp=new i(5-eh-Ju,-(Bo.imageName?Ju:0)),Qc=new i(...rh);Fh._rotateAround(fc,pu)._add(Dp)._add(Qc),Ah._rotateAround(fc,pu)._add(Dp)._add(Qc),dh._rotateAround(fc,pu)._add(Dp)._add(Qc),yf._rotateAround(fc,pu)._add(Dp)._add(Qc)}if(zn){let pu=Math.sin(zn),fc=Math.cos(zn),Ju=[fc,-pu,pu,fc];Fh._matMult(Ju),Ah._matMult(Ju),dh._matMult(Ju),yf._matMult(Ju)}let Rp=new i(0,0),vp=new i(0,0);is.push({tl:Fh,tr:Ah,bl:dh,br:yf,tex:xn,writingMode:gi.writingMode,glyphOffset:Hp,sectionIndex:Bo.sectionIndex,isSDF:No,pixelOffsetTL:Rp,pixelOffsetBR:vp,minFontScaleX:0,minFontScaleY:0})}return is}(0,J,ct,Ee,Be,Ge,ve,H.allowVerticalPlacement),ja=H.textSizeData,Ka=null;ja.kind==="source"?(Ka=[yd*Ee.layout.get("text-size").evaluate(Ge,{})],Ka[0]>cv&&y(`${H.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)):ja.kind==="composite"&&(Ka=[yd*Wr.compositeTextSizes[0].evaluate(Ge,{},ia),yd*Wr.compositeTextSizes[1].evaluate(Ge,{},ia)],(Ka[0]>cv||Ka[1]>cv)&&y(`${H.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)),H.addSymbols(H.text,fa,Ka,ct,Be,Ge,Nt,R,At.lineStartIndex,At.lineLength,zr,ia);for(let Wi of ar)Mr[Wi]=H.text.placedSymbolArray.length-1;return 4*fa.length}function ab(H){for(let R in H)return H[R];return null}function oA(H,R,J,ve){let Ee=H.compareText;if(R in Ee){let Be=Ee[R];for(let Ge=Be.length-1;Ge>=0;Ge--)if(ve.dist(Be[Ge])>4;if(Ee!==1)throw new Error(`Got v${Ee} data when expected v1.`);let Be=ib[15&ve];if(!Be)throw new Error("Unrecognized array type.");let[Ge]=new Uint16Array(R,2,1),[ct]=new Uint32Array(R,4,1);return new X1(ct,Ge,Be,R)}constructor(R,J=64,ve=Float64Array,Ee){if(isNaN(R)||R<0)throw new Error(`Unpexpected numItems value: ${R}.`);this.numItems=+R,this.nodeSize=Math.min(Math.max(+J,2),65535),this.ArrayType=ve,this.IndexArrayType=R<65536?Uint16Array:Uint32Array;let Be=ib.indexOf(this.ArrayType),Ge=2*R*this.ArrayType.BYTES_PER_ELEMENT,ct=R*this.IndexArrayType.BYTES_PER_ELEMENT,At=(8-ct%8)%8;if(Be<0)throw new Error(`Unexpected typed array class: ${ve}.`);Ee&&Ee instanceof ArrayBuffer?(this.data=Ee,this.ids=new this.IndexArrayType(this.data,8,R),this.coords=new this.ArrayType(this.data,8+ct+At,2*R),this._pos=2*R,this._finished=!0):(this.data=new ArrayBuffer(8+Ge+ct+At),this.ids=new this.IndexArrayType(this.data,8,R),this.coords=new this.ArrayType(this.data,8+ct+At,2*R),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Be]),new Uint16Array(this.data,2,1)[0]=J,new Uint32Array(this.data,4,1)[0]=R)}add(R,J){let ve=this._pos>>1;return this.ids[ve]=ve,this.coords[this._pos++]=R,this.coords[this._pos++]=J,ve}finish(){let R=this._pos>>1;if(R!==this.numItems)throw new Error(`Added ${R} items when expected ${this.numItems}.`);return Ig(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(R,J,ve,Ee){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Be,coords:Ge,nodeSize:ct}=this,At=[0,Be.length-1,0],Nt=[];for(;At.length;){let ar=At.pop()||0,Mr=At.pop()||0,zr=At.pop()||0;if(Mr-zr<=ct){for(let ja=zr;ja<=Mr;ja++){let Ka=Ge[2*ja],Wi=Ge[2*ja+1];Ka>=R&&Ka<=ve&&Wi>=J&&Wi<=Ee&&Nt.push(Be[ja])}continue}let Wr=zr+Mr>>1,ia=Ge[2*Wr],fa=Ge[2*Wr+1];ia>=R&&ia<=ve&&fa>=J&&fa<=Ee&&Nt.push(Be[Wr]),(ar===0?R<=ia:J<=fa)&&(At.push(zr),At.push(Wr-1),At.push(1-ar)),(ar===0?ve>=ia:Ee>=fa)&&(At.push(Wr+1),At.push(Mr),At.push(1-ar))}return Nt}within(R,J,ve){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Ee,coords:Be,nodeSize:Ge}=this,ct=[0,Ee.length-1,0],At=[],Nt=ve*ve;for(;ct.length;){let ar=ct.pop()||0,Mr=ct.pop()||0,zr=ct.pop()||0;if(Mr-zr<=Ge){for(let ja=zr;ja<=Mr;ja++)ob(Be[2*ja],Be[2*ja+1],R,J)<=Nt&&At.push(Ee[ja]);continue}let Wr=zr+Mr>>1,ia=Be[2*Wr],fa=Be[2*Wr+1];ob(ia,fa,R,J)<=Nt&&At.push(Ee[Wr]),(ar===0?R-ve<=ia:J-ve<=fa)&&(ct.push(zr),ct.push(Wr-1),ct.push(1-ar)),(ar===0?R+ve>=ia:J+ve>=fa)&&(ct.push(Wr+1),ct.push(Mr),ct.push(1-ar))}return At}}function Ig(H,R,J,ve,Ee,Be){if(Ee-ve<=J)return;let Ge=ve+Ee>>1;nb(H,R,Ge,ve,Ee,Be),Ig(H,R,J,ve,Ge-1,1-Be),Ig(H,R,J,Ge+1,Ee,1-Be)}function nb(H,R,J,ve,Ee,Be){for(;Ee>ve;){if(Ee-ve>600){let Nt=Ee-ve+1,ar=J-ve+1,Mr=Math.log(Nt),zr=.5*Math.exp(2*Mr/3),Wr=.5*Math.sqrt(Mr*zr*(Nt-zr)/Nt)*(ar-Nt/2<0?-1:1);nb(H,R,J,Math.max(ve,Math.floor(J-ar*zr/Nt+Wr)),Math.min(Ee,Math.floor(J+(Nt-ar)*zr/Nt+Wr)),Be)}let Ge=R[2*J+Be],ct=ve,At=Ee;for(F0(H,R,ve,J),R[2*Ee+Be]>Ge&&F0(H,R,ve,Ee);ctGe;)At--}R[2*ve+Be]===Ge?F0(H,R,ve,At):(At++,F0(H,R,At,Ee)),At<=J&&(ve=At+1),J<=At&&(Ee=At-1)}}function F0(H,R,J,ve){Z1(H,J,ve),Z1(R,2*J,2*ve),Z1(R,2*J+1,2*ve+1)}function Z1(H,R,J){let ve=H[R];H[R]=H[J],H[J]=ve}function ob(H,R,J,ve){let Ee=H-J,Be=R-ve;return Ee*Ee+Be*Be}var Rg;e.bg=void 0,(Rg=e.bg||(e.bg={})).create="create",Rg.load="load",Rg.fullLoad="fullLoad";let O0=null,Hf=[],Y1=1e3/60,K1="loadTime",Dg="fullLoadTime",sA={mark(H){performance.mark(H)},frame(H){let R=H;O0!=null&&Hf.push(R-O0),O0=R},clearMetrics(){O0=null,Hf=[],performance.clearMeasures(K1),performance.clearMeasures(Dg);for(let H in e.bg)performance.clearMarks(e.bg[H])},getPerformanceMetrics(){performance.measure(K1,e.bg.create,e.bg.load),performance.measure(Dg,e.bg.create,e.bg.fullLoad);let H=performance.getEntriesByName(K1)[0].duration,R=performance.getEntriesByName(Dg)[0].duration,J=Hf.length,ve=1/(Hf.reduce((Be,Ge)=>Be+Ge,0)/J/1e3),Ee=Hf.filter(Be=>Be>Y1).reduce((Be,Ge)=>Be+(Ge-Y1)/Y1,0);return{loadTime:H,fullLoadTime:R,fps:ve,percentDroppedFrames:Ee/(J+Ee)*100,totalFrames:J}}};e.$=class extends Tr{},e.A=Qa,e.B=Hi,e.C=function(H){if(z==null){let R=H.navigator?H.navigator.userAgent:null;z=!!H.safari||!(!R||!(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return z},e.D=fo,e.E=ee,e.F=class{constructor(H,R){this.target=H,this.mapId=R,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new U1(()=>this.process()),this.subscription=function(J,ve,Ee,Be){return J.addEventListener(ve,Ee,!1),{unsubscribe:()=>{J.removeEventListener(ve,Ee,!1)}}}(this.target,"message",J=>this.receive(J)),this.globalScope=P(self)?H:window}registerMessageHandler(H,R){this.messageHandlers[H]=R}sendAsync(H,R){return new Promise((J,ve)=>{let Ee=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Ee]={resolve:J,reject:ve},R&&R.signal.addEventListener("abort",()=>{delete this.resolveRejects[Ee];let ct={id:Ee,type:"",origin:location.origin,targetMapId:H.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ct)},{once:!0});let Be=[],Ge=Object.assign(Object.assign({},H),{id:Ee,sourceMapId:this.mapId,origin:location.origin,data:eo(H.data,Be)});this.target.postMessage(Ge,{transfer:Be})})}receive(H){let R=H.data,J=R.id;if(!(R.origin!=="file://"&&location.origin!=="file://"&&R.origin!=="resource://android"&&location.origin!=="resource://android"&&R.origin!==location.origin||R.targetMapId&&this.mapId!==R.targetMapId)){if(R.type===""){delete this.tasks[J];let ve=this.abortControllers[J];return delete this.abortControllers[J],void(ve&&ve.abort())}if(P(self)||R.mustQueue)return this.tasks[J]=R,this.taskQueue.push(J),void this.invoker.trigger();this.processTask(J,R)}}process(){if(this.taskQueue.length===0)return;let H=this.taskQueue.shift(),R=this.tasks[H];delete this.tasks[H],this.taskQueue.length>0&&this.invoker.trigger(),R&&this.processTask(H,R)}processTask(H,R){return t(this,void 0,void 0,function*(){if(R.type===""){let Ee=this.resolveRejects[H];return delete this.resolveRejects[H],Ee?void(R.error?Ee.reject(co(R.error)):Ee.resolve(co(R.data))):void 0}if(!this.messageHandlers[R.type])return void this.completeTask(H,new Error(`Could not find a registered handler for ${R.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let J=co(R.data),ve=new AbortController;this.abortControllers[H]=ve;try{let Ee=yield this.messageHandlers[R.type](R.sourceMapId,J,ve);this.completeTask(H,null,Ee)}catch(Ee){this.completeTask(H,Ee)}})}completeTask(H,R,J){let ve=[];delete this.abortControllers[H];let Ee={id:H,type:"",sourceMapId:this.mapId,origin:location.origin,error:R?eo(R):null,data:eo(J,ve)};this.target.postMessage(Ee,{transfer:ve})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=ce,e.H=function(){var H=new Qa(16);return Qa!=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=wg,e.J=function(H,R,J){var ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa=J[0],ja=J[1],Ka=J[2];return R===H?(H[12]=R[0]*fa+R[4]*ja+R[8]*Ka+R[12],H[13]=R[1]*fa+R[5]*ja+R[9]*Ka+R[13],H[14]=R[2]*fa+R[6]*ja+R[10]*Ka+R[14],H[15]=R[3]*fa+R[7]*ja+R[11]*Ka+R[15]):(Ee=R[1],Be=R[2],Ge=R[3],ct=R[4],At=R[5],Nt=R[6],ar=R[7],Mr=R[8],zr=R[9],Wr=R[10],ia=R[11],H[0]=ve=R[0],H[1]=Ee,H[2]=Be,H[3]=Ge,H[4]=ct,H[5]=At,H[6]=Nt,H[7]=ar,H[8]=Mr,H[9]=zr,H[10]=Wr,H[11]=ia,H[12]=ve*fa+ct*ja+Mr*Ka+R[12],H[13]=Ee*fa+At*ja+zr*Ka+R[13],H[14]=Be*fa+Nt*ja+Wr*Ka+R[14],H[15]=Ge*fa+ar*ja+ia*Ka+R[15]),H},e.K=function(H,R,J){var ve=J[0],Ee=J[1],Be=J[2];return H[0]=R[0]*ve,H[1]=R[1]*ve,H[2]=R[2]*ve,H[3]=R[3]*ve,H[4]=R[4]*Ee,H[5]=R[5]*Ee,H[6]=R[6]*Ee,H[7]=R[7]*Ee,H[8]=R[8]*Be,H[9]=R[9]*Be,H[10]=R[10]*Be,H[11]=R[11]*Be,H[12]=R[12],H[13]=R[13],H[14]=R[14],H[15]=R[15],H},e.L=Va,e.M=function(H,R){let J={};for(let ve=0;ve{let R=window.document.createElement("video");return R.muted=!0,new Promise(J=>{R.onloadstart=()=>{J(R)};for(let ve of H){let Ee=window.document.createElement("source");Q(ve)||(R.crossOrigin="Anonymous"),Ee.src=ve,R.appendChild(Ee)}})},e.a4=function(){return p++},e.a5=on,e.a6=fm,e.a7=Ec,e.a8=Wl,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 Ha(H);case"fill":return new Wt(H);case"fill-extrusion":return new kp(H);case"heatmap":return new Dn(H);case"hillshade":return new xl(H);case"line":return new Pv(H);case"raster":return new I0(H);case"symbol":return new zv(H)}},e.aB=u,e.aC=function(H,R){if(!H)return[{command:"setStyle",args:[R]}];let J=[];try{if(!Se(H.version,R.version))return[{command:"setStyle",args:[R]}];Se(H.center,R.center)||J.push({command:"setCenter",args:[R.center]}),Se(H.zoom,R.zoom)||J.push({command:"setZoom",args:[R.zoom]}),Se(H.bearing,R.bearing)||J.push({command:"setBearing",args:[R.bearing]}),Se(H.pitch,R.pitch)||J.push({command:"setPitch",args:[R.pitch]}),Se(H.sprite,R.sprite)||J.push({command:"setSprite",args:[R.sprite]}),Se(H.glyphs,R.glyphs)||J.push({command:"setGlyphs",args:[R.glyphs]}),Se(H.transition,R.transition)||J.push({command:"setTransition",args:[R.transition]}),Se(H.light,R.light)||J.push({command:"setLight",args:[R.light]}),Se(H.terrain,R.terrain)||J.push({command:"setTerrain",args:[R.terrain]}),Se(H.sky,R.sky)||J.push({command:"setSky",args:[R.sky]}),Se(H.projection,R.projection)||J.push({command:"setProjection",args:[R.projection]});let ve={},Ee=[];(function(Ge,ct,At,Nt){let ar;for(ar in ct=ct||{},Ge=Ge||{})Object.prototype.hasOwnProperty.call(Ge,ar)&&(Object.prototype.hasOwnProperty.call(ct,ar)||je(ar,At,Nt));for(ar in ct)Object.prototype.hasOwnProperty.call(ct,ar)&&(Object.prototype.hasOwnProperty.call(Ge,ar)?Se(Ge[ar],ct[ar])||(Ge[ar].type==="geojson"&&ct[ar].type==="geojson"&&nt(Ge,ct,ar)?Re(At,{command:"setGeoJSONSourceData",args:[ar,ct[ar].data]}):at(ar,ct,At,Nt)):Pe(ar,ct,At))})(H.sources,R.sources,Ee,ve);let Be=[];H.layers&&H.layers.forEach(Ge=>{"source"in Ge&&ve[Ge.source]?J.push({command:"removeLayer",args:[Ge.id]}):Be.push(Ge)}),J=J.concat(Ee),function(Ge,ct,At){ct=ct||[];let Nt=(Ge=Ge||[]).map(Ve),ar=ct.map(Ve),Mr=Ge.reduce(he,{}),zr=ct.reduce(he,{}),Wr=Nt.slice(),ia=Object.create(null),fa,ja,Ka,Wi,gi;for(let qi=0,en=0;qi@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(J,ve,Ee,Be)=>{let Ge=Ee||Be;return R[ve]=!Ge||Ge.toLowerCase(),""}),R["max-age"]){let J=parseInt(R["max-age"],10);isNaN(J)?delete R["max-age"]:R["max-age"]=J}return R},e.ab=function(H,R){let J=[];for(let ve in H)ve in R||J.push(ve);return J},e.ac=w,e.ad=function(H,R,J){var ve=Math.sin(J),Ee=Math.cos(J),Be=R[0],Ge=R[1],ct=R[2],At=R[3],Nt=R[4],ar=R[5],Mr=R[6],zr=R[7];return R!==H&&(H[8]=R[8],H[9]=R[9],H[10]=R[10],H[11]=R[11],H[12]=R[12],H[13]=R[13],H[14]=R[14],H[15]=R[15]),H[0]=Be*Ee+Nt*ve,H[1]=Ge*Ee+ar*ve,H[2]=ct*Ee+Mr*ve,H[3]=At*Ee+zr*ve,H[4]=Nt*Ee-Be*ve,H[5]=ar*Ee-Ge*ve,H[6]=Mr*Ee-ct*ve,H[7]=zr*Ee-At*ve,H},e.ae=function(H){var R=new Qa(16);return R[0]=H[0],R[1]=H[1],R[2]=H[2],R[3]=H[3],R[4]=H[4],R[5]=H[5],R[6]=H[6],R[7]=H[7],R[8]=H[8],R[9]=H[9],R[10]=H[10],R[11]=H[11],R[12]=H[12],R[13]=H[13],R[14]=H[14],R[15]=H[15],R},e.af=hn,e.ag=function(H,R){let J=0,ve=0;if(H.kind==="constant")ve=H.layoutSize;else if(H.kind!=="source"){let{interpolationType:Ee,minZoom:Be,maxZoom:Ge}=H,ct=Ee?w(ao.interpolationFactor(Ee,R,Be,Ge),0,1):0;H.kind==="camera"?ve=En.number(H.minSize,H.maxSize,ct):J=ct}return{uSizeT:J,uSize:ve}},e.ai=function(H,{uSize:R,uSizeT:J},{lowerSize:ve,upperSize:Ee}){return H.kind==="source"?ve/yd:H.kind==="composite"?En.number(ve/yd,Ee/yd,J):R},e.aj=z1,e.ak=function(H,R,J,ve){let Ee=R.y-H.y,Be=R.x-H.x,Ge=ve.y-J.y,ct=ve.x-J.x,At=Ge*Be-ct*Ee;if(At===0)return null;let Nt=(ct*(H.y-J.y)-Ge*(H.x-J.x))/At;return new i(H.x+Nt*Be,H.y+Nt*Ee)},e.al=Zx,e.am=_c,e.an=di,e.ao=function(H){let R=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of H)R=Math.min(R,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return[R,J,ve,Ee]},e.ap=hu,e.ar=D1,e.as=function(H,R){var J=R[0],ve=R[1],Ee=R[2],Be=R[3],Ge=R[4],ct=R[5],At=R[6],Nt=R[7],ar=R[8],Mr=R[9],zr=R[10],Wr=R[11],ia=R[12],fa=R[13],ja=R[14],Ka=R[15],Wi=J*ct-ve*Ge,gi=J*At-Ee*Ge,qi=J*Nt-Be*Ge,en=ve*At-Ee*ct,jn=ve*Nt-Be*ct,Lo=Ee*Nt-Be*At,xs=ar*fa-Mr*ia,vo=ar*ja-zr*ia,zn=ar*Ka-Wr*ia,is=Mr*ja-zr*fa,qo=Mr*Ka-Wr*fa,Bo=zr*Ka-Wr*ja,xn=Wi*Bo-gi*qo+qi*is+en*zn-jn*vo+Lo*xs;return xn?(H[0]=(ct*Bo-At*qo+Nt*is)*(xn=1/xn),H[1]=(Ee*qo-ve*Bo-Be*is)*xn,H[2]=(fa*Lo-ja*jn+Ka*en)*xn,H[3]=(zr*jn-Mr*Lo-Wr*en)*xn,H[4]=(At*zn-Ge*Bo-Nt*vo)*xn,H[5]=(J*Bo-Ee*zn+Be*vo)*xn,H[6]=(ja*qi-ia*Lo-Ka*gi)*xn,H[7]=(ar*Lo-zr*qi+Wr*gi)*xn,H[8]=(Ge*qo-ct*zn+Nt*xs)*xn,H[9]=(ve*zn-J*qo-Be*xs)*xn,H[10]=(ia*jn-fa*qi+Ka*Wi)*xn,H[11]=(Mr*qi-ar*jn-Wr*Wi)*xn,H[12]=(ct*vo-Ge*is-At*xs)*xn,H[13]=(J*is-ve*vo+Ee*xs)*xn,H[14]=(fa*gi-ia*en-ja*Wi)*xn,H[15]=(ar*en-Mr*gi+zr*Wi)*xn,H):null},e.at=W1,e.au=Mg,e.av=X1,e.aw=function(){let H={},R=te.$version;for(let J in te.$root){let ve=te.$root[J];if(ve.required){let Ee=null;Ee=J==="version"?R:ve.type==="array"?[]:{},Ee!=null&&(H[J]=Ee)}}return H},e.ax=Tn,e.ay=Y,e.az=function(H){H=H.slice();let R=Object.create(null);for(let J=0;J25||ve<0||ve>=1||J<0||J>=1)},e.bc=function(H,R){return H[0]=R[0],H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=R[1],H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=R[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=de,e.bi=function(H,R){$.REGISTERED_PROTOCOLS[H]=R},e.bj=function(H){delete $.REGISTERED_PROTOCOLS[H]},e.bk=function(H,R){let J={};for(let Ee=0;EeBo*hu)}let vo=Ge?"center":J.get("text-justify").evaluate(Nt,{},H.canonical),zn=J.get("symbol-placement")==="point"?J.get("text-max-width").evaluate(Nt,{},H.canonical)*hu:1/0,is=()=>{H.bucket.allowVerticalPlacement&&yo(qi)&&(ia.vertical=M0(fa,H.glyphMap,H.glyphPositions,H.imagePositions,ar,zn,Be,Lo,"left",jn,Ka,e.ah.vertical,!0,zr,Mr))};if(!Ge&&xs){let qo=new Set;if(vo==="auto")for(let xn=0;xnt(void 0,void 0,void 0,function*(){if(H.byteLength===0)return createImageBitmap(new ImageData(1,1));let R=new Blob([new Uint8Array(H)],{type:"image/png"});try{return createImageBitmap(R)}catch(J){throw new Error(`Could not load image because of ${J.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((R,J)=>{let ve=new Image;ve.onload=()=>{R(ve),URL.revokeObjectURL(ve.src),ve.onload=null,window.requestAnimationFrame(()=>{ve.src=N})},ve.onerror=()=>J(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 Ee=new Blob([new Uint8Array(H)],{type:"image/png"});ve.src=H.byteLength?URL.createObjectURL(Ee):N}),e.g=ue,e.h=(H,R)=>X(E(H,{type:"json"}),R),e.i=P,e.j=j,e.k=ae,e.l=(H,R)=>X(E(H,{type:"arrayBuffer"}),R),e.m=X,e.n=function(H){return new P1(H).readFields(mk,[])},e.o=Rn,e.p=R1,e.q=Oe,e.r=Ci,e.s=Q,e.t=Pi,e.u=li,e.v=te,e.w=y,e.x=function([H,R,J]){return R+=90,R*=Math.PI/180,J*=Math.PI/180,{x:H*Math.cos(R)*Math.sin(J),y:H*Math.sin(R)*Math.sin(J),z:H*Math.cos(J)}},e.y=En,e.z=Fs}),S("worker",["./shared"],function(e){"use strict";class t{constructor(Fe){this.keyCache={},Fe&&this.replace(Fe)}replace(Fe){this._layerConfigs={},this._layers={},this.update(Fe,[])}update(Fe,Ye){for(let Le of Fe){this._layerConfigs[Le.id]=Le;let We=this._layers[Le.id]=e.aA(Le);We._featureFilter=e.a7(We.filter),this.keyCache[Le.id]&&delete this.keyCache[Le.id]}for(let Le of Ye)delete this.keyCache[Le],delete this._layerConfigs[Le],delete this._layers[Le];this.familiesBySource={};let Ae=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let Le of Ae){let We=Le.map(Pt=>this._layers[Pt.id]),Ke=We[0];if(Ke.visibility==="none")continue;let st=Ke.source||"",ot=this.familiesBySource[st];ot||(ot=this.familiesBySource[st]={});let Ut=Ke.sourceLayer||"_geojsonTileLayer",Ct=ot[Ut];Ct||(Ct=ot[Ut]=[]),Ct.push(We)}}}class r{constructor(Fe){let Ye={},Ae=[];for(let st in Fe){let ot=Fe[st],Ut=Ye[st]={};for(let Ct in ot){let Pt=ot[+Ct];if(!Pt||Pt.bitmap.width===0||Pt.bitmap.height===0)continue;let jt={x:0,y:0,w:Pt.bitmap.width+2,h:Pt.bitmap.height+2};Ae.push(jt),Ut[Ct]={rect:jt,metrics:Pt.metrics}}}let{w:Le,h:We}=e.p(Ae),Ke=new e.o({width:Le||1,height:We||1});for(let st in Fe){let ot=Fe[st];for(let Ut in ot){let Ct=ot[+Ut];if(!Ct||Ct.bitmap.width===0||Ct.bitmap.height===0)continue;let Pt=Ye[st][Ut].rect;e.o.copy(Ct.bitmap,Ke,{x:0,y:0},{x:Pt.x+1,y:Pt.y+1},Ct.bitmap)}}this.image=Ke,this.positions=Ye}}e.bl("GlyphAtlas",r);class o{constructor(Fe){this.tileID=new e.S(Fe.tileID.overscaledZ,Fe.tileID.wrap,Fe.tileID.canonical.z,Fe.tileID.canonical.x,Fe.tileID.canonical.y),this.uid=Fe.uid,this.zoom=Fe.zoom,this.pixelRatio=Fe.pixelRatio,this.tileSize=Fe.tileSize,this.source=Fe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Fe.showCollisionBoxes,this.collectResourceTiming=!!Fe.collectResourceTiming,this.returnDependencies=!!Fe.returnDependencies,this.promoteId=Fe.promoteId,this.inFlightDependencies=[]}parse(Fe,Ye,Ae,Le){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Fe,this.collisionBoxArray=new e.a5;let We=new e.bm(Object.keys(Fe.layers).sort()),Ke=new e.bn(this.tileID,this.promoteId);Ke.bucketLayerIDs=[];let st={},ot={featureIndex:Ke,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ae},Ut=Ye.familiesBySource[this.source];for(let Wa in Ut){let Ca=Fe.layers[Wa];if(!Ca)continue;Ca.version===1&&e.w(`Vector tile source "${this.source}" layer "${Wa}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let hi=We.encode(Wa),wi=[];for(let Yt=0;Yt=Rt.maxzoom||Rt.visibility!=="none"&&(a(Yt,this.zoom,Ae),(st[Rt.id]=Rt.createBucket({index:Ke.bucketLayerIDs.length,layers:Yt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hi,sourceID:this.source})).populate(wi,ot,this.tileID.canonical),Ke.bucketLayerIDs.push(Yt.map(Zt=>Zt.id)))}}let Ct=e.aF(ot.glyphDependencies,Wa=>Object.keys(Wa).map(Number));this.inFlightDependencies.forEach(Wa=>Wa?.abort()),this.inFlightDependencies=[];let Pt=Promise.resolve({});if(Object.keys(Ct).length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),Pt=Le.sendAsync({type:"GG",data:{stacks:Ct,source:this.source,tileID:this.tileID,type:"glyphs"}},Wa)}let jt=Object.keys(ot.iconDependencies),cr=Promise.resolve({});if(jt.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),cr=Le.sendAsync({type:"GI",data:{icons:jt,source:this.source,tileID:this.tileID,type:"icons"}},Wa)}let or=Object.keys(ot.patternDependencies),nr=Promise.resolve({});if(or.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),nr=Le.sendAsync({type:"GI",data:{icons:or,source:this.source,tileID:this.tileID,type:"patterns"}},Wa)}let[Pr,_a,Fa]=yield Promise.all([Pt,cr,nr]),Ra=new r(Pr),qa=new e.bo(_a,Fa);for(let Wa in st){let Ca=st[Wa];Ca instanceof e.a6?(a(Ca.layers,this.zoom,Ae),e.bp({bucket:Ca,glyphMap:Pr,glyphPositions:Ra.positions,imageMap:_a,imagePositions:qa.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Ca.hasPattern&&(Ca instanceof e.bq||Ca instanceof e.br||Ca instanceof e.bs)&&(a(Ca.layers,this.zoom,Ae),Ca.addFeatures(ot,this.tileID.canonical,qa.patternPositions))}return this.status="done",{buckets:Object.values(st).filter(Wa=>!Wa.isEmpty()),featureIndex:Ke,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ra.image,imageAtlas:qa,glyphMap:this.returnDependencies?Pr:null,iconMap:this.returnDependencies?_a:null,glyphPositions:this.returnDependencies?Ra.positions:null}})}}function a(_t,Fe,Ye){let Ae=new e.z(Fe);for(let Le of _t)Le.recalculate(Ae,Ye)}class i{constructor(Fe,Ye,Ae){this.actor=Fe,this.layerIndex=Ye,this.availableImages=Ae,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=yield e.l(Fe.request,Ye);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Ae.data)),rawData:Ae.data,cacheControl:Ae.cacheControl,expires:Ae.expires}}catch(Le){let We=new Uint8Array(Ae.data),Ke=`Unable to parse the tile at ${Fe.request.url}, `;throw Ke+=We[0]===31&&We[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Le.message}`,new Error(Ke)}})}loadTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=Fe.uid,Ae=!!(Fe&&Fe.request&&Fe.request.collectResourceTiming)&&new e.bv(Fe.request),Le=new o(Fe);this.loading[Ye]=Le;let We=new AbortController;Le.abort=We;try{let Ke=yield this.loadVectorTile(Fe,We);if(delete this.loading[Ye],!Ke)return null;let st=Ke.rawData,ot={};Ke.expires&&(ot.expires=Ke.expires),Ke.cacheControl&&(ot.cacheControl=Ke.cacheControl);let Ut={};if(Ae){let Pt=Ae.finish();Pt&&(Ut.resourceTiming=JSON.parse(JSON.stringify(Pt)))}Le.vectorTile=Ke.vectorTile;let Ct=Le.parse(Ke.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ye]=Le,this.fetching[Ye]={rawTileData:st,cacheControl:ot,resourceTiming:Ut};try{let Pt=yield Ct;return e.e({rawTileData:st.slice(0)},Pt,ot,Ut)}finally{delete this.fetching[Ye]}}catch(Ke){throw delete this.loading[Ye],Le.status="done",this.loaded[Ye]=Le,Ke}})}reloadTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=Fe.uid;if(!this.loaded||!this.loaded[Ye])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ae=this.loaded[Ye];if(Ae.showCollisionBoxes=Fe.showCollisionBoxes,Ae.status==="parsing"){let Le=yield Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor),We;if(this.fetching[Ye]){let{rawTileData:Ke,cacheControl:st,resourceTiming:ot}=this.fetching[Ye];delete this.fetching[Ye],We=e.e({rawTileData:Ke.slice(0)},Le,st,ot)}else We=Le;return We}if(Ae.status==="done"&&Ae.vectorTile)return Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=this.loading,Ae=Fe.uid;Ye&&Ye[Ae]&&Ye[Ae].abort&&(Ye[Ae].abort.abort(),delete Ye[Ae])})}removeTile(Fe){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Fe.uid]&&delete this.loaded[Fe.uid]})}}class n{constructor(){this.loaded={}}loadTile(Fe){return e._(this,void 0,void 0,function*(){let{uid:Ye,encoding:Ae,rawImageData:Le,redFactor:We,greenFactor:Ke,blueFactor:st,baseShift:ot}=Fe,Ut=Le.width+2,Ct=Le.height+2,Pt=e.b(Le)?new e.R({width:Ut,height:Ct},yield e.bw(Le,-1,-1,Ut,Ct)):Le,jt=new e.bx(Ye,Pt,Ae,We,Ke,st,ot);return this.loaded=this.loaded||{},this.loaded[Ye]=jt,jt})}removeTile(Fe){let Ye=this.loaded,Ae=Fe.uid;Ye&&Ye[Ae]&&delete Ye[Ae]}}function s(_t,Fe){if(_t.length!==0){h(_t[0],Fe);for(var Ye=1;Ye<_t.length;Ye++)h(_t[Ye],!Fe)}}function h(_t,Fe){for(var Ye=0,Ae=0,Le=0,We=_t.length,Ke=We-1;Le=Math.abs(st)?Ye-ot+st:st-ot+Ye,Ye=ot}Ye+Ae>=0!=!!Fe&&_t.reverse()}var f=e.by(function _t(Fe,Ye){var Ae,Le=Fe&&Fe.type;if(Le==="FeatureCollection")for(Ae=0;Ae>31}function P(_t,Fe){for(var Ye=_t.loadGeometry(),Ae=_t.type,Le=0,We=0,Ke=Ye.length,st=0;st_t},O=Math.fround||(L=new Float32Array(1),_t=>(L[0]=+_t,L[0]));var L;let U=3,B=5,W=6;class ${constructor(Fe){this.options=Object.assign(Object.create(N),Fe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Fe){let{log:Ye,minZoom:Ae,maxZoom:Le}=this.options;Ye&&console.time("total time");let We=`prepare ${Fe.length} points`;Ye&&console.time(We),this.points=Fe;let Ke=[];for(let ot=0;ot=Ae;ot--){let Ut=+Date.now();st=this.trees[ot]=this._createTree(this._cluster(st,ot)),Ye&&console.log("z%d: %d clusters in %dms",ot,st.numItems,+Date.now()-Ut)}return Ye&&console.timeEnd("total time"),this}getClusters(Fe,Ye){let Ae=((Fe[0]+180)%360+360)%360-180,Le=Math.max(-90,Math.min(90,Fe[1])),We=Fe[2]===180?180:((Fe[2]+180)%360+360)%360-180,Ke=Math.max(-90,Math.min(90,Fe[3]));if(Fe[2]-Fe[0]>=360)Ae=-180,We=180;else if(Ae>We){let Pt=this.getClusters([Ae,Le,180,Ke],Ye),jt=this.getClusters([-180,Le,We,Ke],Ye);return Pt.concat(jt)}let st=this.trees[this._limitZoom(Ye)],ot=st.range(de(Ae),Y(Ke),de(We),Y(Le)),Ut=st.data,Ct=[];for(let Pt of ot){let jt=this.stride*Pt;Ct.push(Ut[jt+B]>1?ue(Ut,jt,this.clusterProps):this.points[Ut[jt+U]])}return Ct}getChildren(Fe){let Ye=this._getOriginId(Fe),Ae=this._getOriginZoom(Fe),Le="No cluster with the specified id.",We=this.trees[Ae];if(!We)throw new Error(Le);let Ke=We.data;if(Ye*this.stride>=Ke.length)throw new Error(Le);let st=this.options.radius/(this.options.extent*Math.pow(2,Ae-1)),ot=We.within(Ke[Ye*this.stride],Ke[Ye*this.stride+1],st),Ut=[];for(let Ct of ot){let Pt=Ct*this.stride;Ke[Pt+4]===Fe&&Ut.push(Ke[Pt+B]>1?ue(Ke,Pt,this.clusterProps):this.points[Ke[Pt+U]])}if(Ut.length===0)throw new Error(Le);return Ut}getLeaves(Fe,Ye,Ae){let Le=[];return this._appendLeaves(Le,Fe,Ye=Ye||10,Ae=Ae||0,0),Le}getTile(Fe,Ye,Ae){let Le=this.trees[this._limitZoom(Fe)],We=Math.pow(2,Fe),{extent:Ke,radius:st}=this.options,ot=st/Ke,Ut=(Ae-ot)/We,Ct=(Ae+1+ot)/We,Pt={features:[]};return this._addTileFeatures(Le.range((Ye-ot)/We,Ut,(Ye+1+ot)/We,Ct),Le.data,Ye,Ae,We,Pt),Ye===0&&this._addTileFeatures(Le.range(1-ot/We,Ut,1,Ct),Le.data,We,Ae,We,Pt),Ye===We-1&&this._addTileFeatures(Le.range(0,Ut,ot/We,Ct),Le.data,-1,Ae,We,Pt),Pt.features.length?Pt:null}getClusterExpansionZoom(Fe){let Ye=this._getOriginZoom(Fe)-1;for(;Ye<=this.options.maxZoom;){let Ae=this.getChildren(Fe);if(Ye++,Ae.length!==1)break;Fe=Ae[0].properties.cluster_id}return Ye}_appendLeaves(Fe,Ye,Ae,Le,We){let Ke=this.getChildren(Ye);for(let st of Ke){let ot=st.properties;if(ot&&ot.cluster?We+ot.point_count<=Le?We+=ot.point_count:We=this._appendLeaves(Fe,ot.cluster_id,Ae,Le,We):We1,Ct,Pt,jt;if(Ut)Ct=ce(Ye,ot,this.clusterProps),Pt=Ye[ot],jt=Ye[ot+1];else{let nr=this.points[Ye[ot+U]];Ct=nr.properties;let[Pr,_a]=nr.geometry.coordinates;Pt=de(Pr),jt=Y(_a)}let cr={type:1,geometry:[[Math.round(this.options.extent*(Pt*We-Ae)),Math.round(this.options.extent*(jt*We-Le))]],tags:Ct},or;or=Ut||this.options.generateId?Ye[ot+U]:this.points[Ye[ot+U]].id,or!==void 0&&(cr.id=or),Ke.features.push(cr)}}_limitZoom(Fe){return Math.max(this.options.minZoom,Math.min(Math.floor(+Fe),this.options.maxZoom+1))}_cluster(Fe,Ye){let{radius:Ae,extent:Le,reduce:We,minPoints:Ke}=this.options,st=Ae/(Le*Math.pow(2,Ye)),ot=Fe.data,Ut=[],Ct=this.stride;for(let Pt=0;PtYe&&(Pr+=ot[Fa+B])}if(Pr>nr&&Pr>=Ke){let _a,Fa=jt*nr,Ra=cr*nr,qa=-1,Wa=((Pt/Ct|0)<<5)+(Ye+1)+this.points.length;for(let Ca of or){let hi=Ca*Ct;if(ot[hi+2]<=Ye)continue;ot[hi+2]=Ye;let wi=ot[hi+B];Fa+=ot[hi]*wi,Ra+=ot[hi+1]*wi,ot[hi+4]=Wa,We&&(_a||(_a=this._map(ot,Pt,!0),qa=this.clusterProps.length,this.clusterProps.push(_a)),We(_a,this._map(ot,hi)))}ot[Pt+4]=Wa,Ut.push(Fa/Pr,Ra/Pr,1/0,Wa,-1,Pr),We&&Ut.push(qa)}else{for(let _a=0;_a1)for(let _a of or){let Fa=_a*Ct;if(!(ot[Fa+2]<=Ye)){ot[Fa+2]=Ye;for(let Ra=0;Ra>5}_getOriginZoom(Fe){return(Fe-this.points.length)%32}_map(Fe,Ye,Ae){if(Fe[Ye+B]>1){let Ke=this.clusterProps[Fe[Ye+W]];return Ae?Object.assign({},Ke):Ke}let Le=this.points[Fe[Ye+U]].properties,We=this.options.map(Le);return Ae&&We===Le?Object.assign({},We):We}}function ue(_t,Fe,Ye){return{type:"Feature",id:_t[Fe+U],properties:ce(_t,Fe,Ye),geometry:{type:"Point",coordinates:[(Ae=_t[Fe],360*(Ae-.5)),X(_t[Fe+1])]}};var Ae}function ce(_t,Fe,Ye){let Ae=_t[Fe+B],Le=Ae>=1e4?`${Math.round(Ae/1e3)}k`:Ae>=1e3?Math.round(Ae/100)/10+"k":Ae,We=_t[Fe+W],Ke=We===-1?{}:Object.assign({},Ye[We]);return Object.assign(Ke,{cluster:!0,cluster_id:_t[Fe+U],point_count:Ae,point_count_abbreviated:Le})}function de(_t){return _t/360+.5}function Y(_t){let Fe=Math.sin(_t*Math.PI/180),Ye=.5-.25*Math.log((1+Fe)/(1-Fe))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function X(_t){let Fe=(180-360*_t)*Math.PI/180;return 360*Math.atan(Math.exp(Fe))/Math.PI-90}function Q(_t,Fe,Ye,Ae){let Le=Ae,We=Fe+(Ye-Fe>>1),Ke,st=Ye-Fe,ot=_t[Fe],Ut=_t[Fe+1],Ct=_t[Ye],Pt=_t[Ye+1];for(let jt=Fe+3;jtLe)Ke=jt,Le=cr;else if(cr===Le){let or=Math.abs(jt-We);orAe&&(Ke-Fe>3&&Q(_t,Fe,Ke,Ae),_t[Ke+2]=Le,Ye-Ke>3&&Q(_t,Ke,Ye,Ae))}function V(_t,Fe,Ye,Ae,Le,We){let Ke=Le-Ye,st=We-Ae;if(Ke!==0||st!==0){let ot=((_t-Ye)*Ke+(Fe-Ae)*st)/(Ke*Ke+st*st);ot>1?(Ye=Le,Ae=We):ot>0&&(Ye+=Ke*ot,Ae+=st*ot)}return Ke=_t-Ye,st=Fe-Ae,Ke*Ke+st*st}function le(_t,Fe,Ye,Ae){let Le={id:_t??null,type:Fe,geometry:Ye,tags:Ae,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Fe==="Point"||Fe==="MultiPoint"||Fe==="LineString")ae(Le,Ye);else if(Fe==="Polygon")ae(Le,Ye[0]);else if(Fe==="MultiLineString")for(let We of Ye)ae(Le,We);else if(Fe==="MultiPolygon")for(let We of Ye)ae(Le,We[0]);return Le}function ae(_t,Fe){for(let Ye=0;Ye0&&(Ke+=Ae?(Le*Ct-Ut*We)/2:Math.sqrt(Math.pow(Ut-Le,2)+Math.pow(Ct-We,2))),Le=Ut,We=Ct}let st=Fe.length-3;Fe[2]=1,Q(Fe,0,st,Ye),Fe[st+2]=1,Fe.size=Math.abs(Ke),Fe.start=0,Fe.end=Fe.size}function pe(_t,Fe,Ye,Ae){for(let Le=0;Le<_t.length;Le++){let We=[];te(_t[Le],We,Ye,Ae),Fe.push(We)}}function we(_t){return _t/360+.5}function Se(_t){let Fe=Math.sin(_t*Math.PI/180),Ye=.5-.25*Math.log((1+Fe)/(1-Fe))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function Re(_t,Fe,Ye,Ae,Le,We,Ke,st){if(Ae/=Fe,We>=(Ye/=Fe)&&Ke=Ae)return null;let ot=[];for(let Ut of _t){let Ct=Ut.geometry,Pt=Ut.type,jt=Le===0?Ut.minX:Ut.minY,cr=Le===0?Ut.maxX:Ut.maxY;if(jt>=Ye&&cr=Ae)continue;let or=[];if(Pt==="Point"||Pt==="MultiPoint")Pe(Ct,or,Ye,Ae,Le);else if(Pt==="LineString")je(Ct,or,Ye,Ae,Le,!1,st.lineMetrics);else if(Pt==="MultiLineString")nt(Ct,or,Ye,Ae,Le,!1);else if(Pt==="Polygon")nt(Ct,or,Ye,Ae,Le,!0);else if(Pt==="MultiPolygon")for(let nr of Ct){let Pr=[];nt(nr,Pr,Ye,Ae,Le,!0),Pr.length&&or.push(Pr)}if(or.length){if(st.lineMetrics&&Pt==="LineString"){for(let nr of or)ot.push(le(Ut.id,Pt,nr,Ut.tags));continue}Pt!=="LineString"&&Pt!=="MultiLineString"||(or.length===1?(Pt="LineString",or=or[0]):Pt="MultiLineString"),Pt!=="Point"&&Pt!=="MultiPoint"||(Pt=or.length===3?"Point":"MultiPoint"),ot.push(le(Ut.id,Pt,or,Ut.tags))}}return ot.length?ot:null}function Pe(_t,Fe,Ye,Ae,Le){for(let We=0;We<_t.length;We+=3){let Ke=_t[We+Le];Ke>=Ye&&Ke<=Ae&&tt(Fe,_t[We],_t[We+1],_t[We+2])}}function je(_t,Fe,Ye,Ae,Le,We,Ke){let st=at(_t),ot=Le===0?Ve:he,Ut,Ct,Pt=_t.start;for(let Pr=0;Pr<_t.length-3;Pr+=3){let _a=_t[Pr],Fa=_t[Pr+1],Ra=_t[Pr+2],qa=_t[Pr+3],Wa=_t[Pr+4],Ca=Le===0?_a:Fa,hi=Le===0?qa:Wa,wi=!1;Ke&&(Ut=Math.sqrt(Math.pow(_a-qa,2)+Math.pow(Fa-Wa,2))),CaYe&&(Ct=ot(st,_a,Fa,qa,Wa,Ye),Ke&&(st.start=Pt+Ut*Ct)):Ca>Ae?hi=Ye&&(Ct=ot(st,_a,Fa,qa,Wa,Ye),wi=!0),hi>Ae&&Ca<=Ae&&(Ct=ot(st,_a,Fa,qa,Wa,Ae),wi=!0),!We&&wi&&(Ke&&(st.end=Pt+Ut*Ct),Fe.push(st),st=at(_t)),Ke&&(Pt+=Ut)}let jt=_t.length-3,cr=_t[jt],or=_t[jt+1],nr=Le===0?cr:or;nr>=Ye&&nr<=Ae&&tt(st,cr,or,_t[jt+2]),jt=st.length-3,We&&jt>=3&&(st[jt]!==st[0]||st[jt+1]!==st[1])&&tt(st,st[0],st[1],st[2]),st.length&&Fe.push(st)}function at(_t){let Fe=[];return Fe.size=_t.size,Fe.start=_t.start,Fe.end=_t.end,Fe}function nt(_t,Fe,Ye,Ae,Le,We){for(let Ke of _t)je(Ke,Fe,Ye,Ae,Le,We,!1)}function tt(_t,Fe,Ye,Ae){_t.push(Fe,Ye,Ae)}function Ve(_t,Fe,Ye,Ae,Le,We){let Ke=(We-Fe)/(Ae-Fe);return tt(_t,We,Ye+(Le-Ye)*Ke,1),Ke}function he(_t,Fe,Ye,Ae,Le,We){let Ke=(We-Ye)/(Le-Ye);return tt(_t,Fe+(Ae-Fe)*Ke,We,1),Ke}function se(_t,Fe){let Ye=[];for(let Ae=0;Ae<_t.length;Ae++){let Le=_t[Ae],We=Le.type,Ke;if(We==="Point"||We==="MultiPoint"||We==="LineString")Ke=ne(Le.geometry,Fe);else if(We==="MultiLineString"||We==="Polygon"){Ke=[];for(let st of Le.geometry)Ke.push(ne(st,Fe))}else if(We==="MultiPolygon"){Ke=[];for(let st of Le.geometry){let ot=[];for(let Ut of st)ot.push(ne(Ut,Fe));Ke.push(ot)}}Ye.push(le(Le.id,We,Ke,Le.tags))}return Ye}function ne(_t,Fe){let Ye=[];Ye.size=_t.size,_t.start!==void 0&&(Ye.start=_t.start,Ye.end=_t.end);for(let Ae=0;Ae<_t.length;Ae+=3)Ye.push(_t[Ae]+Fe,_t[Ae+1],_t[Ae+2]);return Ye}function Ce(_t,Fe){if(_t.transformed)return _t;let Ye=1<<_t.z,Ae=_t.x,Le=_t.y;for(let We of _t.features){let Ke=We.geometry,st=We.type;if(We.geometry=[],st===1)for(let ot=0;ot0&&Fe.size<(Le?Ke:Ae))return void(Ye.numPoints+=Fe.length/3);let st=[];for(let ot=0;otKe)&&(Ye.numSimplified++,st.push(Fe[ot],Fe[ot+1])),Ye.numPoints++;Le&&function(ot,Ut){let Ct=0;for(let Pt=0,jt=ot.length,cr=jt-2;Pt0===Ut)for(let Pt=0,jt=ot.length;Pt24)throw new Error("maxZoom should be in the 0-24 range");if(Ye.promoteId&&Ye.generateId)throw new Error("promoteId and generateId cannot be used together.");let Le=function(We,Ke){let st=[];if(We.type==="FeatureCollection")for(let ot=0;ot1&&console.time("creation"),cr=this.tiles[jt]=rt(Fe,Ye,Ae,Le,Ut),this.tileCoords.push({z:Ye,x:Ae,y:Le}),Ct)){Ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ye,Ae,Le,cr.numFeatures,cr.numPoints,cr.numSimplified),console.timeEnd("creation"));let wi=`z${Ye}`;this.stats[wi]=(this.stats[wi]||0)+1,this.total++}if(cr.source=Fe,We==null){if(Ye===Ut.indexMaxZoom||cr.numPoints<=Ut.indexMaxPoints)continue}else{if(Ye===Ut.maxZoom||Ye===We)continue;if(We!=null){let wi=We-Ye;if(Ae!==Ke>>wi||Le!==st>>wi)continue}}if(cr.source=null,Fe.length===0)continue;Ct>1&&console.time("clipping");let or=.5*Ut.buffer/Ut.extent,nr=.5-or,Pr=.5+or,_a=1+or,Fa=null,Ra=null,qa=null,Wa=null,Ca=Re(Fe,Pt,Ae-or,Ae+Pr,0,cr.minX,cr.maxX,Ut),hi=Re(Fe,Pt,Ae+nr,Ae+_a,0,cr.minX,cr.maxX,Ut);Fe=null,Ca&&(Fa=Re(Ca,Pt,Le-or,Le+Pr,1,cr.minY,cr.maxY,Ut),Ra=Re(Ca,Pt,Le+nr,Le+_a,1,cr.minY,cr.maxY,Ut),Ca=null),hi&&(qa=Re(hi,Pt,Le-or,Le+Pr,1,cr.minY,cr.maxY,Ut),Wa=Re(hi,Pt,Le+nr,Le+_a,1,cr.minY,cr.maxY,Ut),hi=null),Ct>1&&console.timeEnd("clipping"),ot.push(Fa||[],Ye+1,2*Ae,2*Le),ot.push(Ra||[],Ye+1,2*Ae,2*Le+1),ot.push(qa||[],Ye+1,2*Ae+1,2*Le),ot.push(Wa||[],Ye+1,2*Ae+1,2*Le+1)}}getTile(Fe,Ye,Ae){Fe=+Fe,Ye=+Ye,Ae=+Ae;let Le=this.options,{extent:We,debug:Ke}=Le;if(Fe<0||Fe>24)return null;let st=1<1&&console.log("drilling down to z%d-%d-%d",Fe,Ye,Ae);let Ut,Ct=Fe,Pt=Ye,jt=Ae;for(;!Ut&&Ct>0;)Ct--,Pt>>=1,jt>>=1,Ut=this.tiles[Vt(Ct,Pt,jt)];return Ut&&Ut.source?(Ke>1&&(console.log("found parent tile z%d-%d-%d",Ct,Pt,jt),console.time("drilling down")),this.splitTile(Ut.source,Ct,Pt,jt,Fe,Ye,Ae),Ke>1&&console.timeEnd("drilling down"),this.tiles[ot]?Ce(this.tiles[ot],We):null):null}}function Vt(_t,Fe,Ye){return 32*((1<<_t)*Ye+Fe)+_t}function Ar(_t,Fe){return Fe?_t.properties[Fe]:_t.id}function vr(_t,Fe){if(_t==null)return!0;if(_t.type==="Feature")return Ar(_t,Fe)!=null;if(_t.type==="FeatureCollection"){let Ye=new Set;for(let Ae of _t.features){let Le=Ar(Ae,Fe);if(Le==null||Ye.has(Le))return!1;Ye.add(Le)}return!0}return!1}function qr(_t,Fe){let Ye=new Map;if(_t!=null)if(_t.type==="Feature")Ye.set(Ar(_t,Fe),_t);else for(let Ae of _t.features)Ye.set(Ar(Ae,Fe),Ae);return Ye}class kr extends i{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=Fe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let Le=this._geoJSONIndex.getTile(Ae.z,Ae.x,Ae.y);if(!Le)return null;let We=new class{constructor(st){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.X,this.length=st.length,this._features=st}feature(st){return new class{constructor(ot){this._feature=ot,this.extent=e.X,this.type=ot.type,this.properties=ot.tags,"id"in ot&&!isNaN(ot.id)&&(this.id=parseInt(ot.id,10))}loadGeometry(){if(this._feature.type===1){let ot=[];for(let Ut of this._feature.geometry)ot.push([new e.P(Ut[0],Ut[1])]);return ot}{let ot=[];for(let Ut of this._feature.geometry){let Ct=[];for(let Pt of Ut)Ct.push(new e.P(Pt[0],Pt[1]));ot.push(Ct)}return ot}}toGeoJSON(ot,Ut,Ct){return m.call(this,ot,Ut,Ct)}}(this._features[st])}}(Le.features),Ke=F(We);return Ke.byteOffset===0&&Ke.byteLength===Ke.buffer.byteLength||(Ke=new Uint8Array(Ke)),{vectorTile:We,rawData:Ke.buffer}})}loadData(Fe){return e._(this,void 0,void 0,function*(){var Ye;(Ye=this._pendingRequest)===null||Ye===void 0||Ye.abort();let Ae=!!(Fe&&Fe.request&&Fe.request.collectResourceTiming)&&new e.bv(Fe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Fe,this._pendingRequest),this._geoJSONIndex=Fe.cluster?new $(function({superclusterOptions:Ke,clusterProperties:st}){if(!st||!Ke)return Ke;let ot={},Ut={},Ct={accumulated:null,zoom:0},Pt={properties:null},jt=Object.keys(st);for(let cr of jt){let[or,nr]=st[cr],Pr=e.bC(nr),_a=e.bC(typeof or=="string"?[or,["accumulated"],["get",cr]]:or);ot[cr]=Pr.value,Ut[cr]=_a.value}return Ke.map=cr=>{Pt.properties=cr;let or={};for(let nr of jt)or[nr]=ot[nr].evaluate(Ct,Pt);return or},Ke.reduce=(cr,or)=>{Pt.properties=or;for(let nr of jt)Ct.accumulated=cr[nr],cr[nr]=Ut[nr].evaluate(Ct,Pt)},Ke}(Fe)).load((yield this._pendingData).features):(Le=yield this._pendingData,new Bt(Le,Fe.geojsonVtOptions)),this.loaded={};let We={};if(Ae){let Ke=Ae.finish();Ke&&(We.resourceTiming={},We.resourceTiming[Fe.source]=JSON.parse(JSON.stringify(Ke)))}return We}catch(We){if(delete this._pendingRequest,e.bB(We))return{abandoned:!0};throw We}var Le})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Fe){let Ye=this.loaded;return Ye&&Ye[Fe.uid]?super.reloadTile(Fe):this.loadTile(Fe)}loadAndProcessGeoJSON(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=yield this.loadGeoJSON(Fe,Ye);if(delete this._pendingRequest,typeof Ae!="object")throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`);if(f(Ae,!0),Fe.filter){let Le=e.bC(Fe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Le.result==="error")throw new Error(Le.value.map(Ke=>`${Ke.key}: ${Ke.message}`).join(", "));Ae={type:"FeatureCollection",features:Ae.features.filter(Ke=>Le.value.evaluate({zoom:0},Ke))}}return Ae})}loadGeoJSON(Fe,Ye){return e._(this,void 0,void 0,function*(){let{promoteId:Ae}=Fe;if(Fe.request){let Le=yield e.h(Fe.request,Ye);return this._dataUpdateable=vr(Le.data,Ae)?qr(Le.data,Ae):void 0,Le.data}if(typeof Fe.data=="string")try{let Le=JSON.parse(Fe.data);return this._dataUpdateable=vr(Le,Ae)?qr(Le,Ae):void 0,Le}catch{throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`)}if(!Fe.dataDiff)throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Fe.source}`);return function(Le,We,Ke){var st,ot,Ut,Ct;if(We.removeAll&&Le.clear(),We.remove)for(let Pt of We.remove)Le.delete(Pt);if(We.add)for(let Pt of We.add){let jt=Ar(Pt,Ke);jt!=null&&Le.set(jt,Pt)}if(We.update)for(let Pt of We.update){let jt=Le.get(Pt.id);if(jt==null)continue;let cr=!Pt.removeAllProperties&&(((st=Pt.removeProperties)===null||st===void 0?void 0:st.length)>0||((ot=Pt.addOrUpdateProperties)===null||ot===void 0?void 0:ot.length)>0);if((Pt.newGeometry||Pt.removeAllProperties||cr)&&(jt=Object.assign({},jt),Le.set(Pt.id,jt),cr&&(jt.properties=Object.assign({},jt.properties))),Pt.newGeometry&&(jt.geometry=Pt.newGeometry),Pt.removeAllProperties)jt.properties={};else if(((Ut=Pt.removeProperties)===null||Ut===void 0?void 0:Ut.length)>0)for(let or of Pt.removeProperties)Object.prototype.hasOwnProperty.call(jt.properties,or)&&delete jt.properties[or];if(((Ct=Pt.addOrUpdateProperties)===null||Ct===void 0?void 0:Ct.length)>0)for(let{key:or,value:nr}of Pt.addOrUpdateProperties)jt.properties[or]=nr}}(this._dataUpdateable,Fe.dataDiff,Ae),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Fe){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Fe){return this._geoJSONIndex.getClusterExpansionZoom(Fe.clusterId)}getClusterChildren(Fe){return this._geoJSONIndex.getChildren(Fe.clusterId)}getClusterLeaves(Fe){return this._geoJSONIndex.getLeaves(Fe.clusterId,Fe.limit,Fe.offset)}}class Ur{constructor(Fe){this.self=Fe,this.actor=new e.F(Fe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ye,Ae)=>{if(this.externalWorkerSourceTypes[Ye])throw new Error(`Worker source with name "${Ye}" already registered.`);this.externalWorkerSourceTypes[Ye]=Ae},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Ye=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Ye)},this.actor.registerMessageHandler("LDT",(Ye,Ae)=>this._getDEMWorkerSource(Ye,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RDT",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ye,Ae.source).removeTile(Ae)})),this.actor.registerMessageHandler("GCEZ",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterExpansionZoom(Ae)})),this.actor.registerMessageHandler("GCC",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterChildren(Ae)})),this.actor.registerMessageHandler("GCL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterLeaves(Ae)})),this.actor.registerMessageHandler("LD",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).loadData(Ae)),this.actor.registerMessageHandler("GD",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).getData()),this.actor.registerMessageHandler("LT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).reloadTile(Ae)),this.actor.registerMessageHandler("AT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).abortTile(Ae)),this.actor.registerMessageHandler("RMT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).removeTile(Ae)),this.actor.registerMessageHandler("RS",(Ye,Ae)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Ye]||!this.workerSources[Ye][Ae.type]||!this.workerSources[Ye][Ae.type][Ae.source])return;let Le=this.workerSources[Ye][Ae.type][Ae.source];delete this.workerSources[Ye][Ae.type][Ae.source],Le.removeSource!==void 0&&Le.removeSource(Ae)})),this.actor.registerMessageHandler("RM",Ye=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Ye],delete this.availableImages[Ye],delete this.workerSources[Ye],delete this.demWorkerSources[Ye]})),this.actor.registerMessageHandler("SR",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this.referrer=Ae})),this.actor.registerMessageHandler("SRPS",(Ye,Ae)=>this._syncRTLPluginState(Ye,Ae)),this.actor.registerMessageHandler("IS",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Ae)})),this.actor.registerMessageHandler("SI",(Ye,Ae)=>this._setImages(Ye,Ae)),this.actor.registerMessageHandler("UL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).update(Ae.layers,Ae.removedIds)})),this.actor.registerMessageHandler("SL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).replace(Ae)}))}_setImages(Fe,Ye){return e._(this,void 0,void 0,function*(){this.availableImages[Fe]=Ye;for(let Ae in this.workerSources[Fe]){let Le=this.workerSources[Fe][Ae];for(let We in Le)Le[We].availableImages=Ye}})}_syncRTLPluginState(Fe,Ye){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Ye.pluginStatus!=="loading")return e.bD.setState(Ye),Ye;let Ae=Ye.pluginURL;if(this.self.importScripts(Ae),e.bD.isParsed()){let Le={pluginStatus:"loaded",pluginURL:Ae};return e.bD.setState(Le),Le}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ae}`)})}_getAvailableImages(Fe){let Ye=this.availableImages[Fe];return Ye||(Ye=[]),Ye}_getLayerIndex(Fe){let Ye=this.layerIndexes[Fe];return Ye||(Ye=this.layerIndexes[Fe]=new t),Ye}_getWorkerSource(Fe,Ye,Ae){if(this.workerSources[Fe]||(this.workerSources[Fe]={}),this.workerSources[Fe][Ye]||(this.workerSources[Fe][Ye]={}),!this.workerSources[Fe][Ye][Ae]){let Le={sendAsync:(We,Ke)=>(We.targetMapId=Fe,this.actor.sendAsync(We,Ke))};switch(Ye){case"vector":this.workerSources[Fe][Ye][Ae]=new i(Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe));break;case"geojson":this.workerSources[Fe][Ye][Ae]=new kr(Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe));break;default:this.workerSources[Fe][Ye][Ae]=new this.externalWorkerSourceTypes[Ye](Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe))}}return this.workerSources[Fe][Ye][Ae]}_getDEMWorkerSource(Fe,Ye){return this.demWorkerSources[Fe]||(this.demWorkerSources[Fe]={}),this.demWorkerSources[Fe][Ye]||(this.demWorkerSources[Fe][Ye]=new n),this.demWorkerSources[Fe][Ye]}}return e.i(self)&&(self.worker=new Ur(self)),Ur}),S("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:Oe=>new Promise((I,ie)=>{let Te=requestAnimationFrame(I);Oe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Te),ie(t.c())})}),getImageData(Oe,I=0){return this.getImageCanvasContext(Oe).getImageData(-I,-I,Oe.width+2*I,Oe.height+2*I)},getImageCanvasContext(Oe){let I=window.document.createElement("canvas"),ie=I.getContext("2d",{willReadFrequently:!0});if(!ie)throw new Error("failed to create canvas 2d context");return I.width=Oe.width,I.height=Oe.height,ie.drawImage(Oe,0,0,Oe.width,Oe.height),ie},resolveURL:Oe=>(o||(o=document.createElement("a")),o.href=Oe,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(I){if(!n.docStyle)return I[0];for(let ie=0;ie{window.removeEventListener("click",n.suppressClickInternal,!0)},0)}static getScale(I){let ie=I.getBoundingClientRect();return{x:ie.width/I.offsetWidth||1,y:ie.height/I.offsetHeight||1,boundingClientRect:ie}}static getPoint(I,ie,Te){let Me=ie.boundingClientRect;return new t.P((Te.clientX-Me.left)/ie.x-I.clientLeft,(Te.clientY-Me.top)/ie.y-I.clientTop)}static mousePos(I,ie){let Te=n.getScale(I);return n.getPoint(I,Te,ie)}static touchPos(I,ie){let Te=[],Me=n.getScale(I);for(let ze=0;ze{h&&T(h),h=null,c=!0},f.onerror=()=>{m=!0,h=null},f.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Oe){let I,ie,Te,Me;Oe.resetRequestQueue=()=>{I=[],ie=0,Te=0,Me={}},Oe.addThrottleControl=Ot=>{let $t=Te++;return Me[$t]=Ot,$t},Oe.removeThrottleControl=Ot=>{delete Me[Ot],ht()},Oe.getImage=(Ot,$t,Tr=!0)=>new Promise((Sr,Kr)=>{s.supported&&(Ot.headers||(Ot.headers={}),Ot.headers.accept="image/webp,*/*"),t.e(Ot,{type:"image"}),I.push({abortController:$t,requestParameters:Ot,supportImageRefresh:Tr,state:"queued",onError:na=>{Kr(na)},onSuccess:na=>{Sr(na)}}),ht()});let ze=Ot=>t._(this,void 0,void 0,function*(){Ot.state="running";let{requestParameters:$t,supportImageRefresh:Tr,onError:Sr,onSuccess:Kr,abortController:na}=Ot,qe=Tr===!1&&!t.i(self)&&!t.g($t.url)&&(!$t.headers||Object.keys($t.headers).reduce((pt,Et)=>pt&&Et==="accept",!0));ie++;let $e=qe?wt($t,na):t.m($t,na);try{let pt=yield $e;delete Ot.abortController,Ot.state="completed",pt.data instanceof HTMLImageElement||t.b(pt.data)?Kr(pt):pt.data&&Kr({data:yield(lt=pt.data,typeof createImageBitmap=="function"?t.d(lt):t.f(lt)),cacheControl:pt.cacheControl,expires:pt.expires})}catch(pt){delete Ot.abortController,Sr(pt)}finally{ie--,ht()}var lt}),ht=()=>{let Ot=(()=>{for(let $t of Object.keys(Me))if(Me[$t]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let $t=ie;$t0;$t++){let Tr=I.shift();Tr.abortController.signal.aborted?$t--:ze(Tr)}},wt=(Ot,$t)=>new Promise((Tr,Sr)=>{let Kr=new Image,na=Ot.url,qe=Ot.credentials;qe&&qe==="include"?Kr.crossOrigin="use-credentials":(qe&&qe==="same-origin"||!t.s(na))&&(Kr.crossOrigin="anonymous"),$t.signal.addEventListener("abort",()=>{Kr.src="",Sr(t.c())}),Kr.fetchPriority="high",Kr.onload=()=>{Kr.onerror=Kr.onload=null,Tr({data:Kr})},Kr.onerror=()=>{Kr.onerror=Kr.onload=null,$t.signal.aborted||Sr(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."))},Kr.src=na})}(l||(l={})),l.resetRequestQueue();class x{constructor(I){this._transformRequestFn=I}transformRequest(I,ie){return this._transformRequestFn&&this._transformRequestFn(I,ie)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function w(Oe){var I=new t.A(3);return I[0]=Oe[0],I[1]=Oe[1],I[2]=Oe[2],I}var A,E=function(Oe,I,ie){return Oe[0]=I[0]-ie[0],Oe[1]=I[1]-ie[1],Oe[2]=I[2]-ie[2],Oe};A=new t.A(3),t.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var p=function(Oe){var I=Oe[0],ie=Oe[1];return I*I+ie*ie};function b(Oe){let I=[];if(typeof Oe=="string")I.push({id:"default",url:Oe});else if(Oe&&Oe.length>0){let ie=[];for(let{id:Te,url:Me}of Oe){let ze=`${Te}${Me}`;ie.indexOf(ze)===-1&&(ie.push(ze),I.push({id:Te,url:Me}))}}return I}function d(Oe,I,ie){let Te=Oe.split("?");return Te[0]+=`${I}${ie}`,Te.join("?")}(function(){var Oe=new t.A(2);t.A!=Float32Array&&(Oe[0]=0,Oe[1]=0)})();class u{constructor(I,ie,Te,Me){this.context=I,this.format=Te,this.texture=I.gl.createTexture(),this.update(ie,Me)}update(I,ie,Te){let{width:Me,height:ze}=I,ht=!(this.size&&this.size[0]===Me&&this.size[1]===ze||Te),{context:wt}=this,{gl:Ot}=wt;if(this.useMipmap=!!(ie&&ie.useMipmap),Ot.bindTexture(Ot.TEXTURE_2D,this.texture),wt.pixelStoreUnpackFlipY.set(!1),wt.pixelStoreUnpack.set(1),wt.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ot.RGBA&&(!ie||ie.premultiply!==!1)),ht)this.size=[Me,ze],I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Ot.texImage2D(Ot.TEXTURE_2D,0,this.format,this.format,Ot.UNSIGNED_BYTE,I):Ot.texImage2D(Ot.TEXTURE_2D,0,this.format,Me,ze,0,this.format,Ot.UNSIGNED_BYTE,I.data);else{let{x:$t,y:Tr}=Te||{x:0,y:0};I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Ot.texSubImage2D(Ot.TEXTURE_2D,0,$t,Tr,Ot.RGBA,Ot.UNSIGNED_BYTE,I):Ot.texSubImage2D(Ot.TEXTURE_2D,0,$t,Tr,Me,ze,Ot.RGBA,Ot.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ot.generateMipmap(Ot.TEXTURE_2D)}bind(I,ie,Te){let{context:Me}=this,{gl:ze}=Me;ze.bindTexture(ze.TEXTURE_2D,this.texture),Te!==ze.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Te=ze.LINEAR),I!==this.filter&&(ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MAG_FILTER,I),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MIN_FILTER,Te||I),this.filter=I),ie!==this.wrap&&(ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_S,ie),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_T,ie),this.wrap=ie)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:I}=this.context;I.deleteTexture(this.texture),this.texture=null}}function g(Oe){let{userImage:I}=Oe;return!!(I&&I.render&&I.render())&&(Oe.data.replace(new Uint8Array(I.data.buffer)),!0)}class y 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(I){if(this.loaded!==I&&(this.loaded=I,I)){for(let{ids:ie,promiseResolve:Te}of this.requestors)Te(this._getImagesForIds(ie));this.requestors=[]}}getImage(I){let ie=this.images[I];if(ie&&!ie.data&&ie.spriteData){let Te=ie.spriteData;ie.data=new t.R({width:Te.width,height:Te.height},Te.context.getImageData(Te.x,Te.y,Te.width,Te.height).data),ie.spriteData=null}return ie}addImage(I,ie){if(this.images[I])throw new Error(`Image id ${I} already exist, use updateImage instead`);this._validate(I,ie)&&(this.images[I]=ie)}_validate(I,ie){let Te=!0,Me=ie.data||ie.spriteData;return this._validateStretch(ie.stretchX,Me&&Me.width)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchX" value`))),Te=!1),this._validateStretch(ie.stretchY,Me&&Me.height)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchY" value`))),Te=!1),this._validateContent(ie.content,ie)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "content" value`))),Te=!1),Te}_validateStretch(I,ie){if(!I)return!0;let Te=0;for(let Me of I){if(Me[0]{let Me=!0;if(!this.isLoaded())for(let ze of I)this.images[ze]||(Me=!1);this.isLoaded()||Me?ie(this._getImagesForIds(I)):this.requestors.push({ids:I,promiseResolve:ie})})}_getImagesForIds(I){let ie={};for(let Te of I){let Me=this.getImage(Te);Me||(this.fire(new t.k("styleimagemissing",{id:Te})),Me=this.getImage(Te)),Me?ie[Te]={data:Me.data.clone(),pixelRatio:Me.pixelRatio,sdf:Me.sdf,version:Me.version,stretchX:Me.stretchX,stretchY:Me.stretchY,content:Me.content,textFitWidth:Me.textFitWidth,textFitHeight:Me.textFitHeight,hasRenderCallback:!!(Me.userImage&&Me.userImage.render)}:t.w(`Image "${Te}" 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 ie}getPixelSize(){let{width:I,height:ie}=this.atlasImage;return{width:I,height:ie}}getPattern(I){let ie=this.patterns[I],Te=this.getImage(I);if(!Te)return null;if(ie&&ie.position.version===Te.version)return ie.position;if(ie)ie.position.version=Te.version;else{let Me={w:Te.data.width+2,h:Te.data.height+2,x:0,y:0},ze=new t.I(Me,Te);this.patterns[I]={bin:Me,position:ze}}return this._updatePatternAtlas(),this.patterns[I].position}bind(I){let ie=I.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new u(I,this.atlasImage,ie.RGBA),this.atlasTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE)}_updatePatternAtlas(){let I=[];for(let ze in this.patterns)I.push(this.patterns[ze].bin);let{w:ie,h:Te}=t.p(I),Me=this.atlasImage;Me.resize({width:ie||1,height:Te||1});for(let ze in this.patterns){let{bin:ht}=this.patterns[ze],wt=ht.x+1,Ot=ht.y+1,$t=this.getImage(ze).data,Tr=$t.width,Sr=$t.height;t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot},{width:Tr,height:Sr}),t.R.copy($t,Me,{x:0,y:Sr-1},{x:wt,y:Ot-1},{width:Tr,height:1}),t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot+Sr},{width:Tr,height:1}),t.R.copy($t,Me,{x:Tr-1,y:0},{x:wt-1,y:Ot},{width:1,height:Sr}),t.R.copy($t,Me,{x:0,y:0},{x:wt+Tr,y:Ot},{width:1,height:Sr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(I){for(let ie of I){if(this.callbackDispatchedThisFrame[ie])continue;this.callbackDispatchedThisFrame[ie]=!0;let Te=this.getImage(ie);Te||t.w(`Image with ID: "${ie}" was not found`),g(Te)&&this.updateImage(ie,Te)}}}let D=1e20;function P(Oe,I,ie,Te,Me,ze,ht,wt,Ot){for(let $t=I;$t-1);Ot++,ze[Ot]=wt,ht[Ot]=$t,ht[Ot+1]=D}for(let wt=0,Ot=0;wt65535)throw new Error("glyphs > 65535 not supported");if(Te.ranges[ze])return{stack:I,id:ie,glyph:Me};if(!this.url)throw new Error("glyphsUrl is not set");if(!Te.requests[ze]){let wt=F.loadGlyphRange(I,ze,this.url,this.requestManager);Te.requests[ze]=wt}let ht=yield Te.requests[ze];for(let wt in ht)this._doesCharSupportLocalGlyph(+wt)||(Te.glyphs[+wt]=ht[+wt]);return Te.ranges[ze]=!0,{stack:I,id:ie,glyph:ht[ie]||null}})}_doesCharSupportLocalGlyph(I){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(I))}_tinySDF(I,ie,Te){let Me=this.localIdeographFontFamily;if(!Me||!this._doesCharSupportLocalGlyph(Te))return;let ze=I.tinySDF;if(!ze){let wt="400";/bold/i.test(ie)?wt="900":/medium/i.test(ie)?wt="500":/light/i.test(ie)&&(wt="200"),ze=I.tinySDF=new F.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Me,fontWeight:wt})}let ht=ze.draw(String.fromCharCode(Te));return{id:Te,bitmap:new t.o({width:ht.width||60,height:ht.height||60},ht.data),metrics:{width:ht.glyphWidth/2||24,height:ht.glyphHeight/2||24,left:ht.glyphLeft/2+.5||0,top:ht.glyphTop/2-27.5||-8,advance:ht.glyphAdvance/2||24,isDoubleResolution:!0}}}}F.loadGlyphRange=function(Oe,I,ie,Te){return t._(this,void 0,void 0,function*(){let Me=256*I,ze=Me+255,ht=Te.transformRequest(ie.replace("{fontstack}",Oe).replace("{range}",`${Me}-${ze}`),"Glyphs"),wt=yield t.l(ht,new AbortController);if(!wt||!wt.data)throw new Error(`Could not load glyph range. range: ${I}, ${Me}-${ze}`);let Ot={};for(let $t of t.n(wt.data))Ot[$t.id]=$t;return Ot})},F.TinySDF=class{constructor({fontSize:Oe=24,buffer:I=3,radius:ie=8,cutoff:Te=.25,fontFamily:Me="sans-serif",fontWeight:ze="normal",fontStyle:ht="normal"}={}){this.buffer=I,this.cutoff=Te,this.radius=ie;let wt=this.size=Oe+4*I,Ot=this._createCanvas(wt),$t=this.ctx=Ot.getContext("2d",{willReadFrequently:!0});$t.font=`${ht} ${ze} ${Oe}px ${Me}`,$t.textBaseline="alphabetic",$t.textAlign="left",$t.fillStyle="black",this.gridOuter=new Float64Array(wt*wt),this.gridInner=new Float64Array(wt*wt),this.f=new Float64Array(wt),this.z=new Float64Array(wt+1),this.v=new Uint16Array(wt)}_createCanvas(Oe){let I=document.createElement("canvas");return I.width=I.height=Oe,I}draw(Oe){let{width:I,actualBoundingBoxAscent:ie,actualBoundingBoxDescent:Te,actualBoundingBoxLeft:Me,actualBoundingBoxRight:ze}=this.ctx.measureText(Oe),ht=Math.ceil(ie),wt=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(ze-Me))),Ot=Math.min(this.size-this.buffer,ht+Math.ceil(Te)),$t=wt+2*this.buffer,Tr=Ot+2*this.buffer,Sr=Math.max($t*Tr,0),Kr=new Uint8ClampedArray(Sr),na={data:Kr,width:$t,height:Tr,glyphWidth:wt,glyphHeight:Ot,glyphTop:ht,glyphLeft:0,glyphAdvance:I};if(wt===0||Ot===0)return na;let{ctx:qe,buffer:$e,gridInner:lt,gridOuter:pt}=this;qe.clearRect($e,$e,wt,Ot),qe.fillText(Oe,$e,$e+ht);let Et=qe.getImageData($e,$e,wt,Ot);pt.fill(D,0,Sr),lt.fill(0,0,Sr);for(let bt=0;bt0?Er*Er:0,lt[yr]=Er<0?Er*Er:0}}P(pt,0,0,$t,Tr,$t,this.f,this.v,this.z),P(lt,$e,$e,wt,Ot,$t,this.f,this.v,this.z);for(let bt=0;bt1&&(Ot=I[++wt]);let Tr=Math.abs($t-Ot.left),Sr=Math.abs($t-Ot.right),Kr=Math.min(Tr,Sr),na,qe=ze/Te*(Me+1);if(Ot.isDash){let $e=Me-Math.abs(qe);na=Math.sqrt(Kr*Kr+$e*$e)}else na=Me-Math.sqrt(Kr*Kr+qe*qe);this.data[ht+$t]=Math.max(0,Math.min(255,na+128))}}}addRegularDash(I){for(let wt=I.length-1;wt>=0;--wt){let Ot=I[wt],$t=I[wt+1];Ot.zeroLength?I.splice(wt,1):$t&&$t.isDash===Ot.isDash&&($t.left=Ot.left,I.splice(wt,1))}let ie=I[0],Te=I[I.length-1];ie.isDash===Te.isDash&&(ie.left=Te.left-this.width,Te.right=ie.right+this.width);let Me=this.width*this.nextRow,ze=0,ht=I[ze];for(let wt=0;wt1&&(ht=I[++ze]);let Ot=Math.abs(wt-ht.left),$t=Math.abs(wt-ht.right),Tr=Math.min(Ot,$t);this.data[Me+wt]=Math.max(0,Math.min(255,(ht.isDash?Tr:-Tr)+128))}}addDash(I,ie){let Te=ie?7:0,Me=2*Te+1;if(this.nextRow+Me>this.height)return t.w("LineAtlas out of space"),null;let ze=0;for(let wt=0;wt{ie.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[$]}numActive(){return Object.keys(this.active).length}}let ce=Math.floor(i.hardwareConcurrency/2),de,Y;function X(){return de||(de=new ue),de}ue.workerCount=t.C(globalThis)?Math.max(Math.min(ce,3),1):1;class Q{constructor(I,ie){this.workerPool=I,this.actors=[],this.currentActor=0,this.id=ie;let Te=this.workerPool.acquire(ie);for(let Me=0;Me{ie.remove()}),this.actors=[],I&&this.workerPool.release(this.id)}registerMessageHandler(I,ie){for(let Te of this.actors)Te.registerMessageHandler(I,ie)}}function V(){return Y||(Y=new Q(X(),t.G),Y.registerMessageHandler("GR",(Oe,I,ie)=>t.m(I,ie))),Y}function le(Oe,I){let ie=t.H();return t.J(ie,ie,[1,1,0]),t.K(ie,ie,[.5*Oe.width,.5*Oe.height,1]),t.L(ie,ie,Oe.calculatePosMatrix(I.toUnwrapped()))}function ae(Oe,I,ie,Te,Me,ze){let ht=function(Sr,Kr,na){if(Sr)for(let qe of Sr){let $e=Kr[qe];if($e&&$e.source===na&&$e.type==="fill-extrusion")return!0}else for(let qe in Kr){let $e=Kr[qe];if($e.source===na&&$e.type==="fill-extrusion")return!0}return!1}(Me&&Me.layers,I,Oe.id),wt=ze.maxPitchScaleFactor(),Ot=Oe.tilesIn(Te,wt,ht);Ot.sort(j);let $t=[];for(let Sr of Ot)$t.push({wrappedTileID:Sr.tileID.wrapped().key,queryResults:Sr.tile.queryRenderedFeatures(I,ie,Oe._state,Sr.queryGeometry,Sr.cameraQueryGeometry,Sr.scale,Me,ze,wt,le(Oe.transform,Sr.tileID))});let Tr=function(Sr){let Kr={},na={};for(let qe of Sr){let $e=qe.queryResults,lt=qe.wrappedTileID,pt=na[lt]=na[lt]||{};for(let Et in $e){let bt=$e[Et],Dt=pt[Et]=pt[Et]||{},ur=Kr[Et]=Kr[Et]||[];for(let yr of bt)Dt[yr.featureIndex]||(Dt[yr.featureIndex]=!0,ur.push(yr))}}return Kr}($t);for(let Sr in Tr)Tr[Sr].forEach(Kr=>{let na=Kr.feature,qe=Oe.getFeatureState(na.layer["source-layer"],na.id);na.source=na.layer.source,na.layer["source-layer"]&&(na.sourceLayer=na.layer["source-layer"]),na.state=qe});return Tr}function j(Oe,I){let ie=Oe.tileID,Te=I.tileID;return ie.overscaledZ-Te.overscaledZ||ie.canonical.y-Te.canonical.y||ie.wrap-Te.wrap||ie.canonical.x-Te.canonical.x}function ee(Oe,I,ie){return t._(this,void 0,void 0,function*(){let Te=Oe;if(Oe.url?Te=(yield t.h(I.transformRequest(Oe.url,"Source"),ie)).data:yield i.frameAsync(ie),!Te)return null;let Me=t.M(t.e(Te,Oe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Te&&Te.vector_layers&&(Me.vectorLayerIds=Te.vector_layers.map(ze=>ze.id)),Me})}class te{constructor(I,ie){I&&(ie?this.setSouthWest(I).setNorthEast(ie):Array.isArray(I)&&(I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1])))}setNorthEast(I){return this._ne=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}setSouthWest(I){return this._sw=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}extend(I){let ie=this._sw,Te=this._ne,Me,ze;if(I instanceof t.N)Me=I,ze=I;else{if(!(I instanceof te))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(te.convert(I)):this.extend(t.N.convert(I)):I&&("lng"in I||"lon"in I)&&"lat"in I?this.extend(t.N.convert(I)):this;if(Me=I._sw,ze=I._ne,!Me||!ze)return this}return ie||Te?(ie.lng=Math.min(Me.lng,ie.lng),ie.lat=Math.min(Me.lat,ie.lat),Te.lng=Math.max(ze.lng,Te.lng),Te.lat=Math.max(ze.lat,Te.lat)):(this._sw=new t.N(Me.lng,Me.lat),this._ne=new t.N(ze.lng,ze.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(I){let{lng:ie,lat:Te}=t.N.convert(I),Me=this._sw.lng<=ie&&ie<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Me=this._sw.lng>=ie&&ie>=this._ne.lng),this._sw.lat<=Te&&Te<=this._ne.lat&&Me}static convert(I){return I instanceof te?I:I&&new te(I)}static fromLngLat(I,ie=0){let Te=360*ie/40075017,Me=Te/Math.cos(Math.PI/180*I.lat);return new te(new t.N(I.lng-Me,I.lat-Te),new t.N(I.lng+Me,I.lat+Te))}adjustAntiMeridian(){let I=new t.N(this._sw.lng,this._sw.lat),ie=new t.N(this._ne.lng,this._ne.lat);return new te(I,I.lng>ie.lng?new t.N(ie.lng+360,ie.lat):ie)}}class pe{constructor(I,ie,Te){this.bounds=te.convert(this.validateBounds(I)),this.minzoom=ie||0,this.maxzoom=Te||24}validateBounds(I){return Array.isArray(I)&&I.length===4?[Math.max(-180,I[0]),Math.max(-90,I[1]),Math.min(180,I[2]),Math.min(90,I[3])]:[-180,-90,180,90]}contains(I){let ie=Math.pow(2,I.z),Te=Math.floor(t.O(this.bounds.getWest())*ie),Me=Math.floor(t.Q(this.bounds.getNorth())*ie),ze=Math.ceil(t.O(this.bounds.getEast())*ie),ht=Math.ceil(t.Q(this.bounds.getSouth())*ie);return I.x>=Te&&I.x=Me&&I.y{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Te={request:this.map._requestManager.transformRequest(ie,"Tile"),uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,tileSize:this.tileSize*I.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Te.request.collectResourceTiming=this._collectResourceTiming;let Me="RT";if(I.actor&&I.state!=="expired"){if(I.state==="loading")return new Promise((ze,ht)=>{I.reloadPromise={resolve:ze,reject:ht}})}else I.actor=this.dispatcher.getActor(),Me="LT";I.abortController=new AbortController;try{let ze=yield I.actor.sendAsync({type:Me,data:Te},I.abortController);if(delete I.abortController,I.aborted)return;this._afterTileLoadWorkerResponse(I,ze)}catch(ze){if(delete I.abortController,I.aborted)return;if(ze&&ze.status!==404)throw ze;this._afterTileLoadWorkerResponse(I,null)}})}_afterTileLoadWorkerResponse(I,ie){if(ie&&ie.resourceTiming&&(I.resourceTiming=ie.resourceTiming),ie&&this.map._refreshExpiredTiles&&I.setExpiryData(ie),I.loadVectorData(ie,this.map.painter),I.reloadPromise){let Te=I.reloadPromise;I.reloadPromise=null,this.loadTile(I).then(Te.resolve).catch(Te.reject)}}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.actor&&(yield I.actor.sendAsync({type:"AT",data:{uid:I.uid,type:this.type,source:this.id}}))})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.unloadVectorData(),I.actor&&(yield I.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Se extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.dispatcher=Te,this.setEventedParent(Me),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"},ie),t.e(this,t.M(ie,["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 I=yield ee(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,I&&(t.e(this,I),I.bounds&&(this.tileBounds=new pe(I.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(I){this._tileJSONRequest=null,this.fire(new t.j(I))}})}loaded(){return this._loaded}onAdd(I){this.map=I,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(I){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),I(),this.load()}setTiles(I){return this.setSourceProperty(()=>{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}serialize(){return t.e({},this._options)}hasTile(I){return!this.tileBounds||this.tileBounds.contains(I.canonical)}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);I.abortController=new AbortController;try{let Te=yield l.getImage(this.map._requestManager.transformRequest(ie,"Tile"),I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Te&&Te.data){this.map._refreshExpiredTiles&&Te.cacheControl&&Te.expires&&I.setExpiryData({cacheControl:Te.cacheControl,expires:Te.expires});let Me=this.map.painter.context,ze=Me.gl,ht=Te.data;I.texture=this.map.painter.getTileTexture(ht.width),I.texture?I.texture.update(ht,{useMipmap:!0}):(I.texture=new u(Me,ht,ze.RGBA,{useMipmap:!0}),I.texture.bind(ze.LINEAR,ze.CLAMP_TO_EDGE,ze.LINEAR_MIPMAP_NEAREST)),I.state="loaded"}}catch(Te){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Te)throw I.state="errored",Te}})}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController)})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.texture&&this.map.painter.saveTileTexture(I.texture)})}hasTransition(){return!1}}class Re extends Se{constructor(I,ie,Te,Me){super(I,ie,Te,Me),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},ie),this.encoding=ie.encoding||"mapbox",this.redFactor=ie.redFactor,this.greenFactor=ie.greenFactor,this.blueFactor=ie.blueFactor,this.baseShift=ie.baseShift}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Te=this.map._requestManager.transformRequest(ie,"Tile");I.neighboringTiles=this._getNeighboringTiles(I.tileID),I.abortController=new AbortController;try{let Me=yield l.getImage(Te,I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Me&&Me.data){let ze=Me.data;this.map._refreshExpiredTiles&&Me.cacheControl&&Me.expires&&I.setExpiryData({cacheControl:Me.cacheControl,expires:Me.expires});let ht=t.b(ze)&&t.U()?ze:yield this.readImageNow(ze),wt={type:this.type,uid:I.uid,source:this.id,rawImageData:ht,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!I.actor||I.state==="expired"){I.actor=this.dispatcher.getActor();let Ot=yield I.actor.sendAsync({type:"LDT",data:wt});I.dem=Ot,I.needsHillshadePrepare=!0,I.needsTerrainPrepare=!0,I.state="loaded"}}}catch(Me){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Me)throw I.state="errored",Me}})}readImageNow(I){return t._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&t.V()){let ie=I.width+2,Te=I.height+2;try{return new t.R({width:ie,height:Te},yield t.W(I,-1,-1,ie,Te))}catch{}}return i.getImageData(I,1)})}_getNeighboringTiles(I){let ie=I.canonical,Te=Math.pow(2,ie.z),Me=(ie.x-1+Te)%Te,ze=ie.x===0?I.wrap-1:I.wrap,ht=(ie.x+1+Te)%Te,wt=ie.x+1===Te?I.wrap+1:I.wrap,Ot={};return Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y).key]={backfilled:!1},ie.y>0&&(Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y-1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,I.wrap,ie.z,ie.x,ie.y-1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y-1).key]={backfilled:!1}),ie.y+10&&t.e(ze,{resourceTiming:Me}),this.fire(new t.k("data",Object.assign(Object.assign({},ze),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},ze),{sourceDataType:"content"})))}catch(Te){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(Te))}})}loaded(){return this._pendingLoads===0}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.actor?"RT":"LT";I.actor=this.actor;let Te={type:this.type,uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};I.abortController=new AbortController;let Me=yield this.actor.sendAsync({type:ie,data:Te},I.abortController);delete I.abortController,I.unloadVectorData(),I.aborted||I.loadVectorData(Me,this.map.painter,ie==="RT")})}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.aborted=!0})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:I.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 je=t.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class at extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.dispatcher=Te,this.coordinates=ie.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Me),this.options=ie}load(I){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 ie=yield l.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ie&&ie.data&&(this.image=ie.data,I&&(this.coordinates=I),this._finishLoading())}catch(ie){this._request=null,this._loaded=!0,this.fire(new t.j(ie))}})}loaded(){return this._loaded}updateImage(I){return I.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=I.url,this.load(I.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(I){this.map=I,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(I){this.coordinates=I;let ie=I.map(t.Z.fromLngLat);this.tileID=function(Me){let ze=1/0,ht=1/0,wt=-1/0,Ot=-1/0;for(let Kr of Me)ze=Math.min(ze,Kr.x),ht=Math.min(ht,Kr.y),wt=Math.max(wt,Kr.x),Ot=Math.max(Ot,Kr.y);let $t=Math.max(wt-ze,Ot-ht),Tr=Math.max(0,Math.floor(-Math.log($t)/Math.LN2)),Sr=Math.pow(2,Tr);return new t.a1(Tr,Math.floor((ze+wt)/2*Sr),Math.floor((ht+Ot)/2*Sr))}(ie),this.minzoom=this.maxzoom=this.tileID.z;let Te=ie.map(Me=>this.tileID.getTilePoint(Me)._round());return this._boundsArray=new t.$,this._boundsArray.emplaceBack(Te[0].x,Te[0].y,0,0),this._boundsArray.emplaceBack(Te[1].x,Te[1].y,t.X,0),this._boundsArray.emplaceBack(Te[3].x,Te[3].y,0,t.X),this._boundsArray.emplaceBack(Te[2].x,Te[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 I=this.map.painter.context,ie=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,je.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new u(I,this.image,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let Te=!1;for(let Me in this.tiles){let ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,Te=!0)}Te&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(I){return t._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(I.tileID.canonical)?(this.tiles[String(I.tileID.wrap)]=I,I.buckets={}):I.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class nt extends at{constructor(I,ie,Te,Me){super(I,ie,Te,Me),this.roundZoom=!0,this.type="video",this.options=ie}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let I=this.options;this.urls=[];for(let ie of I.urls)this.urls.push(this.map._requestManager.transformRequest(ie,"Source").url);try{let ie=yield t.a3(this.urls);if(this._loaded=!0,!ie)return;this.video=ie,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ie){this.fire(new t.j(ie))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(I){if(this.video){let ie=this.video.seekable;Iie.end(0)?this.fire(new t.j(new t.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ie.start(0)} and ${ie.end(0)}-second mark.`))):this.video.currentTime=I}}getVideo(){return this.video}onAdd(I){this.map||(this.map=I,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 I=this.map.painter.context,ie=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,je.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),ie.texSubImage2D(ie.TEXTURE_2D,0,0,0,ie.RGBA,ie.UNSIGNED_BYTE,this.video)):(this.texture=new u(I,this.video,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let Te=!1;for(let Me in this.tiles){let ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,Te=!0)}Te&&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 at{constructor(I,ie,Te,Me){super(I,ie,Te,Me),ie.coordinates?Array.isArray(ie.coordinates)&&ie.coordinates.length===4&&!ie.coordinates.some(ze=>!Array.isArray(ze)||ze.length!==2||ze.some(ht=>typeof ht!="number"))||this.fire(new t.j(new t.a2(`sources.${I}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.j(new t.a2(`sources.${I}`,null,'missing required property "coordinates"'))),ie.animate&&typeof ie.animate!="boolean"&&this.fire(new t.j(new t.a2(`sources.${I}`,null,'optional "animate" property must be a boolean value'))),ie.canvas?typeof ie.canvas=="string"||ie.canvas instanceof HTMLCanvasElement||this.fire(new t.j(new t.a2(`sources.${I}`,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.${I}`,null,'missing required property "canvas"'))),this.options=ie,this.animate=ie.animate===void 0||ie.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(I){this.map=I,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let I=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,I=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,I=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ie=this.map.painter.context,Te=ie.gl;this.boundsBuffer||(this.boundsBuffer=ie.createVertexBuffer(this._boundsArray,je.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?(I||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new u(ie,this.canvas,Te.RGBA,{premultiply:!0});let Me=!1;for(let ze in this.tiles){let ht=this.tiles[ze];ht.state!=="loaded"&&(ht.state="loaded",ht.texture=this.texture,Me=!0)}Me&&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 I of[this.canvas.width,this.canvas.height])if(isNaN(I)||I<=0)return!0;return!1}}let Ve={},he=Oe=>{switch(Oe){case"geojson":return Pe;case"image":return at;case"raster":return Se;case"raster-dem":return Re;case"vector":return we;case"video":return nt;case"canvas":return tt}return Ve[Oe]},se="RTLPluginLoaded";class ne extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=V()}_syncState(I){return this.status=I,this.dispatcher.broadcast("SRPS",{pluginStatus:I,pluginURL:this.url}).catch(ie=>{throw this.status="error",ie})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(I){return t._(this,arguments,void 0,function*(ie,Te=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=i.resolveURL(ie),!this.url)throw new Error(`requested url ${ie} is invalid`);if(this.status==="unavailable"){if(!Te)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(se))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ce=null;function Ze(){return Ce||(Ce=new ne),Ce}class rt{constructor(I,ie){this.timeAdded=0,this.fadeEndTime=0,this.tileID=I,this.uid=t.a4(),this.uses=0,this.tileSize=ie,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(I){let ie=I+this.timeAdded;ieze.getLayer($t)).filter(Boolean);if(Ot.length!==0){wt.layers=Ot,wt.stateDependentLayerIds&&(wt.stateDependentLayers=wt.stateDependentLayerIds.map($t=>Ot.filter(Tr=>Tr.id===$t)[0]));for(let $t of Ot)ht[$t.id]=wt}}return ht}(I.buckets,ie.style),this.hasSymbolBuckets=!1;for(let Me in this.buckets){let ze=this.buckets[Me];if(ze instanceof t.a6){if(this.hasSymbolBuckets=!0,!Te)break;ze.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let Me in this.buckets){let ze=this.buckets[Me];if(ze instanceof t.a6&&ze.hasRTLText){this.hasRTLText=!0,Ze().lazyLoad();break}}this.queryPadding=0;for(let Me in this.buckets){let ze=this.buckets[Me];this.queryPadding=Math.max(this.queryPadding,ie.style.getLayer(Me).queryRadius(ze))}I.imageAtlas&&(this.imageAtlas=I.imageAtlas),I.glyphAtlasImage&&(this.glyphAtlasImage=I.glyphAtlasImage)}else this.collisionBoxArray=new t.a5}unloadVectorData(){for(let I in this.buckets)this.buckets[I].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(I){return this.buckets[I.id]}upload(I){for(let Te in this.buckets){let Me=this.buckets[Te];Me.uploadPending()&&Me.upload(I)}let ie=I.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new u(I,this.imageAtlas.image,ie.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new u(I,this.glyphAtlasImage,ie.ALPHA),this.glyphAtlasImage=null)}prepare(I){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(I,this.imageAtlasTexture)}queryRenderedFeatures(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Me,cameraQueryGeometry:ze,scale:ht,tileSize:this.tileSize,pixelPosMatrix:Tr,transform:Ot,params:wt,queryPadding:this.queryPadding*$t},I,ie,Te):{}}querySourceFeatures(I,ie){let Te=this.latestFeatureIndex;if(!Te||!Te.rawTileData)return;let Me=Te.loadVTLayers(),ze=ie&&ie.sourceLayer?ie.sourceLayer:"",ht=Me._geojsonTileLayer||Me[ze];if(!ht)return;let wt=t.a7(ie&&ie.filter),{z:Ot,x:$t,y:Tr}=this.tileID.canonical,Sr={z:Ot,x:$t,y:Tr};for(let Kr=0;KrTe)Me=!1;else if(ie)if(this.expirationTime{this.remove(I,ze)},Te)),this.data[Me].push(ze),this.order.push(Me),this.order.length>this.max){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}has(I){return I.wrapped().key in this.data}getAndRemove(I){return this.has(I)?this._getAndRemoveByKey(I.wrapped().key):null}_getAndRemoveByKey(I){let ie=this.data[I].shift();return ie.timeout&&clearTimeout(ie.timeout),this.data[I].length===0&&delete this.data[I],this.order.splice(this.order.indexOf(I),1),ie.value}getByKey(I){let ie=this.data[I];return ie?ie[0].value:null}get(I){return this.has(I)?this.data[I.wrapped().key][0].value:null}remove(I,ie){if(!this.has(I))return this;let Te=I.wrapped().key,Me=ie===void 0?0:this.data[Te].indexOf(ie),ze=this.data[Te][Me];return this.data[Te].splice(Me,1),ze.timeout&&clearTimeout(ze.timeout),this.data[Te].length===0&&delete this.data[Te],this.onRemove(ze.value),this.order.splice(this.order.indexOf(Te),1),this}setMaxSize(I){for(this.max=I;this.order.length>this.max;){let ie=this._getAndRemoveByKey(this.order[0]);ie&&this.onRemove(ie)}return this}filter(I){let ie=[];for(let Te in this.data)for(let Me of this.data[Te])I(Me.value)||ie.push(Me);for(let Te of ie)this.remove(Te.value.tileID,Te)}}class St{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(I,ie,Te){let Me=String(ie);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][Me]=this.stateChanges[I][Me]||{},t.e(this.stateChanges[I][Me],Te),this.deletedStates[I]===null){this.deletedStates[I]={};for(let ze in this.state[I])ze!==Me&&(this.deletedStates[I][ze]=null)}else if(this.deletedStates[I]&&this.deletedStates[I][Me]===null){this.deletedStates[I][Me]={};for(let ze in this.state[I][Me])Te[ze]||(this.deletedStates[I][Me][ze]=null)}else for(let ze in Te)this.deletedStates[I]&&this.deletedStates[I][Me]&&this.deletedStates[I][Me][ze]===null&&delete this.deletedStates[I][Me][ze]}removeFeatureState(I,ie,Te){if(this.deletedStates[I]===null)return;let Me=String(ie);if(this.deletedStates[I]=this.deletedStates[I]||{},Te&&ie!==void 0)this.deletedStates[I][Me]!==null&&(this.deletedStates[I][Me]=this.deletedStates[I][Me]||{},this.deletedStates[I][Me][Te]=null);else if(ie!==void 0)if(this.stateChanges[I]&&this.stateChanges[I][Me])for(Te in this.deletedStates[I][Me]={},this.stateChanges[I][Me])this.deletedStates[I][Me][Te]=null;else this.deletedStates[I][Me]=null;else this.deletedStates[I]=null}getState(I,ie){let Te=String(ie),Me=t.e({},(this.state[I]||{})[Te],(this.stateChanges[I]||{})[Te]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){let ze=this.deletedStates[I][ie];if(ze===null)return{};for(let ht in ze)delete Me[ht]}return Me}initializeTileState(I,ie){I.setFeatureState(this.state,ie)}coalesceChanges(I,ie){let Te={};for(let Me in this.stateChanges){this.state[Me]=this.state[Me]||{};let ze={};for(let ht in this.stateChanges[Me])this.state[Me][ht]||(this.state[Me][ht]={}),t.e(this.state[Me][ht],this.stateChanges[Me][ht]),ze[ht]=this.state[Me][ht];Te[Me]=ze}for(let Me in this.deletedStates){this.state[Me]=this.state[Me]||{};let ze={};if(this.deletedStates[Me]===null)for(let ht in this.state[Me])ze[ht]={},this.state[Me][ht]={};else for(let ht in this.deletedStates[Me]){if(this.deletedStates[Me][ht]===null)this.state[Me][ht]={};else for(let wt of Object.keys(this.deletedStates[Me][ht]))delete this.state[Me][ht][wt];ze[ht]=this.state[Me][ht]}Te[Me]=Te[Me]||{},t.e(Te[Me],ze)}if(this.stateChanges={},this.deletedStates={},Object.keys(Te).length!==0)for(let Me in I)I[Me].setFeatureState(Te,ie)}}class kt extends t.E{constructor(I,ie,Te){super(),this.id=I,this.dispatcher=Te,this.on("data",Me=>this._dataHandler(Me)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Me,ze,ht,wt)=>{let Ot=new(he(ze.type))(Me,ze,ht,wt);if(Ot.id!==Me)throw new Error(`Expected Source id to be ${Me} instead of ${Ot.id}`);return Ot})(I,ie,Te,this),this._tiles={},this._cache=new Je(0,Me=>this._unloadTile(Me)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new St,this._didEmitContent=!1,this._updated=!1}onAdd(I){this.map=I,this._maxTileCacheSize=I?I._maxTileCacheSize:null,this._maxTileCacheZoomLevels=I?I._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(I)}onRemove(I){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(I)}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 I in this._tiles){let ie=this._tiles[I];if(ie.state!=="loaded"&&ie.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let I=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,I&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(I,ie,Te){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(I),this._tileLoaded(I,ie,Te)}catch(Me){I.state="errored",Me.status!==404?this._source.fire(new t.j(Me,{tile:I})):this.update(this.transform,this.terrain)}})}_unloadTile(I){this._source.unloadTile&&this._source.unloadTile(I)}_abortTile(I){this._source.abortTile&&this._source.abortTile(I),this._source.fire(new t.k("dataabort",{tile:I,coord:I.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(I){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ie in this._tiles){let Te=this._tiles[ie];Te.upload(I),Te.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(I=>I.tileID).sort(Bt).map(I=>I.key)}getRenderableIds(I){let ie=[];for(let Te in this._tiles)this._isIdRenderable(Te,I)&&ie.push(this._tiles[Te]);return I?ie.sort((Te,Me)=>{let ze=Te.tileID,ht=Me.tileID,wt=new t.P(ze.canonical.x,ze.canonical.y)._rotate(this.transform.angle),Ot=new t.P(ht.canonical.x,ht.canonical.y)._rotate(this.transform.angle);return ze.overscaledZ-ht.overscaledZ||Ot.y-wt.y||Ot.x-wt.x}).map(Te=>Te.tileID.key):ie.map(Te=>Te.tileID).sort(Bt).map(Te=>Te.key)}hasRenderableParent(I){let ie=this.findLoadedParent(I,0);return!!ie&&this._isIdRenderable(ie.tileID.key)}_isIdRenderable(I,ie){return this._tiles[I]&&this._tiles[I].hasData()&&!this._coveredTiles[I]&&(ie||!this._tiles[I].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let I in this._tiles)this._tiles[I].state!=="errored"&&this._reloadTile(I,"reloading")}}_reloadTile(I,ie){return t._(this,void 0,void 0,function*(){let Te=this._tiles[I];Te&&(Te.state!=="loading"&&(Te.state=ie),yield this._loadTile(Te,I,ie))})}_tileLoaded(I,ie,Te){I.timeAdded=i.now(),Te==="expired"&&(I.refreshedUponExpiration=!0),this._setTileReloadTimer(ie,I),this.getSource().type==="raster-dem"&&I.dem&&this._backfillDEM(I),this._state.initializeTileState(I,this.map?this.map.painter:null),I.aborted||this._source.fire(new t.k("data",{dataType:"source",tile:I,coord:I.tileID}))}_backfillDEM(I){let ie=this.getRenderableIds();for(let Me=0;Me1||(Math.abs(ht)>1&&(Math.abs(ht+Ot)===1?ht+=Ot:Math.abs(ht-Ot)===1&&(ht-=Ot)),ze.dem&&Me.dem&&(Me.dem.backfillBorder(ze.dem,ht,wt),Me.neighboringTiles&&Me.neighboringTiles[$t]&&(Me.neighboringTiles[$t].backfilled=!0)))}}getTile(I){return this.getTileByID(I.key)}getTileByID(I){return this._tiles[I]}_retainLoadedChildren(I,ie,Te,Me){for(let ze in this._tiles){let ht=this._tiles[ze];if(Me[ze]||!ht.hasData()||ht.tileID.overscaledZ<=ie||ht.tileID.overscaledZ>Te)continue;let wt=ht.tileID;for(;ht&&ht.tileID.overscaledZ>ie+1;){let $t=ht.tileID.scaledTo(ht.tileID.overscaledZ-1);ht=this._tiles[$t.key],ht&&ht.hasData()&&(wt=$t)}let Ot=wt;for(;Ot.overscaledZ>ie;)if(Ot=Ot.scaledTo(Ot.overscaledZ-1),I[Ot.key]){Me[wt.key]=wt;break}}}findLoadedParent(I,ie){if(I.key in this._loadedParentTiles){let Te=this._loadedParentTiles[I.key];return Te&&Te.tileID.overscaledZ>=ie?Te:null}for(let Te=I.overscaledZ-1;Te>=ie;Te--){let Me=I.scaledTo(Te),ze=this._getLoadedTile(Me);if(ze)return ze}}findLoadedSibling(I){return this._getLoadedTile(I)}_getLoadedTile(I){let ie=this._tiles[I.key];return ie&&ie.hasData()?ie:this._cache.getByKey(I.wrapped().key)}updateCacheSize(I){let ie=Math.ceil(I.width/this._source.tileSize)+1,Te=Math.ceil(I.height/this._source.tileSize)+1,Me=Math.floor(ie*Te*(this._maxTileCacheZoomLevels===null?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),ze=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Me):Me;this._cache.setMaxSize(ze)}handleWrapJump(I){let ie=Math.round((I-(this._prevLng===void 0?I:this._prevLng))/360);if(this._prevLng=I,ie){let Te={};for(let Me in this._tiles){let ze=this._tiles[Me];ze.tileID=ze.tileID.unwrapTo(ze.tileID.wrap+ie),Te[ze.tileID.key]=ze}this._tiles=Te;for(let Me in this._timers)clearTimeout(this._timers[Me]),delete this._timers[Me];for(let Me in this._tiles)this._setTileReloadTimer(Me,this._tiles[Me])}}_updateCoveredAndRetainedTiles(I,ie,Te,Me,ze,ht){let wt={},Ot={},$t=Object.keys(I),Tr=i.now();for(let Sr of $t){let Kr=I[Sr],na=this._tiles[Sr];if(!na||na.fadeEndTime!==0&&na.fadeEndTime<=Tr)continue;let qe=this.findLoadedParent(Kr,ie),$e=this.findLoadedSibling(Kr),lt=qe||$e||null;lt&&(this._addTile(lt.tileID),wt[lt.tileID.key]=lt.tileID),Ot[Sr]=Kr}this._retainLoadedChildren(Ot,Me,Te,I);for(let Sr in wt)I[Sr]||(this._coveredTiles[Sr]=!0,I[Sr]=wt[Sr]);if(ht){let Sr={},Kr={};for(let na of ze)this._tiles[na.key].hasData()?Sr[na.key]=na:Kr[na.key]=na;for(let na in Kr){let qe=Kr[na].children(this._source.maxzoom);this._tiles[qe[0].key]&&this._tiles[qe[1].key]&&this._tiles[qe[2].key]&&this._tiles[qe[3].key]&&(Sr[qe[0].key]=I[qe[0].key]=qe[0],Sr[qe[1].key]=I[qe[1].key]=qe[1],Sr[qe[2].key]=I[qe[2].key]=qe[2],Sr[qe[3].key]=I[qe[3].key]=qe[3],delete Kr[na])}for(let na in Kr){let qe=Kr[na],$e=this.findLoadedParent(qe,this._source.minzoom),lt=this.findLoadedSibling(qe),pt=$e||lt||null;if(pt){Sr[pt.tileID.key]=I[pt.tileID.key]=pt.tileID;for(let Et in Sr)Sr[Et].isChildOf(pt.tileID)&&delete Sr[Et]}}for(let na in this._tiles)Sr[na]||(this._coveredTiles[na]=!0)}}update(I,ie){if(!this._sourceLoaded||this._paused)return;let Te;this.transform=I,this.terrain=ie,this.updateCacheSize(I),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Te=I.getVisibleUnwrappedCoordinates(this._source.tileID).map(Tr=>new t.S(Tr.canonical.z,Tr.wrap,Tr.canonical.z,Tr.canonical.x,Tr.canonical.y)):(Te=I.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:ie}),this._source.hasTile&&(Te=Te.filter(Tr=>this._source.hasTile(Tr)))):Te=[];let Me=I.coveringZoomLevel(this._source),ze=Math.max(Me-kt.maxOverzooming,this._source.minzoom),ht=Math.max(Me+kt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Tr={};for(let Sr of Te)if(Sr.canonical.z>this._source.minzoom){let Kr=Sr.scaledTo(Sr.canonical.z-1);Tr[Kr.key]=Kr;let na=Sr.scaledTo(Math.max(this._source.minzoom,Math.min(Sr.canonical.z,5)));Tr[na.key]=na}Te=Te.concat(Object.values(Tr))}let wt=Te.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,wt&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ot=this._updateRetainedTiles(Te,Me);Vt(this._source.type)&&this._updateCoveredAndRetainedTiles(Ot,ze,ht,Me,Te,ie);for(let Tr in Ot)this._tiles[Tr].clearFadeHold();let $t=t.ab(this._tiles,Ot);for(let Tr of $t){let Sr=this._tiles[Tr];Sr.hasSymbolBuckets&&!Sr.holdingForFade()?Sr.setHoldDuration(this.map._fadeDuration):Sr.hasSymbolBuckets&&!Sr.symbolFadeFinished()||this._removeTile(Tr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let I in this._tiles)this._tiles[I].holdingForFade()&&this._removeTile(I)}_updateRetainedTiles(I,ie){var Te;let Me={},ze={},ht=Math.max(ie-kt.maxOverzooming,this._source.minzoom),wt=Math.max(ie+kt.maxUnderzooming,this._source.minzoom),Ot={};for(let $t of I){let Tr=this._addTile($t);Me[$t.key]=$t,Tr.hasData()||iethis._source.maxzoom){let Kr=$t.children(this._source.maxzoom)[0],na=this.getTile(Kr);if(na&&na.hasData()){Me[Kr.key]=Kr;continue}}else{let Kr=$t.children(this._source.maxzoom);if(Me[Kr[0].key]&&Me[Kr[1].key]&&Me[Kr[2].key]&&Me[Kr[3].key])continue}let Sr=Tr.wasRequested();for(let Kr=$t.overscaledZ-1;Kr>=ht;--Kr){let na=$t.scaledTo(Kr);if(ze[na.key])break;if(ze[na.key]=!0,Tr=this.getTile(na),!Tr&&Sr&&(Tr=this._addTile(na)),Tr){let qe=Tr.hasData();if((qe||!(!((Te=this.map)===null||Te===void 0)&&Te.cancelPendingTileRequestsWhileZooming)||Sr)&&(Me[na.key]=na),Sr=Tr.wasRequested(),qe)break}}}return Me}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let I in this._tiles){let ie=[],Te,Me=this._tiles[I].tileID;for(;Me.overscaledZ>0;){if(Me.key in this._loadedParentTiles){Te=this._loadedParentTiles[Me.key];break}ie.push(Me.key);let ze=Me.scaledTo(Me.overscaledZ-1);if(Te=this._getLoadedTile(ze),Te)break;Me=ze}for(let ze of ie)this._loadedParentTiles[ze]=Te}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let I in this._tiles){let ie=this._tiles[I].tileID,Te=this._getLoadedTile(ie);this._loadedSiblingTiles[ie.key]=Te}}_addTile(I){let ie=this._tiles[I.key];if(ie)return ie;ie=this._cache.getAndRemove(I),ie&&(this._setTileReloadTimer(I.key,ie),ie.tileID=I,this._state.initializeTileState(ie,this.map?this.map.painter:null),this._cacheTimers[I.key]&&(clearTimeout(this._cacheTimers[I.key]),delete this._cacheTimers[I.key],this._setTileReloadTimer(I.key,ie)));let Te=ie;return ie||(ie=new rt(I,this._source.tileSize*I.overscaleFactor()),this._loadTile(ie,I.key,ie.state)),ie.uses++,this._tiles[I.key]=ie,Te||this._source.fire(new t.k("dataloading",{tile:ie,coord:ie.tileID,dataType:"source"})),ie}_setTileReloadTimer(I,ie){I in this._timers&&(clearTimeout(this._timers[I]),delete this._timers[I]);let Te=ie.getExpiryTimeout();Te&&(this._timers[I]=setTimeout(()=>{this._reloadTile(I,"expired"),delete this._timers[I]},Te))}_removeTile(I){let ie=this._tiles[I];ie&&(ie.uses--,delete this._tiles[I],this._timers[I]&&(clearTimeout(this._timers[I]),delete this._timers[I]),ie.uses>0||(ie.hasData()&&ie.state!=="reloading"?this._cache.add(ie.tileID,ie,ie.getExpiryTimeout()):(ie.aborted=!0,this._abortTile(ie),this._unloadTile(ie))))}_dataHandler(I){let ie=I.sourceDataType;I.dataType==="source"&&ie==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&I.dataType==="source"&&ie==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let I in this._tiles)this._removeTile(I);this._cache.reset()}tilesIn(I,ie,Te){let Me=[],ze=this.transform;if(!ze)return Me;let ht=Te?ze.getCameraQueryGeometry(I):I,wt=I.map(qe=>ze.pointCoordinate(qe,this.terrain)),Ot=ht.map(qe=>ze.pointCoordinate(qe,this.terrain)),$t=this.getIds(),Tr=1/0,Sr=1/0,Kr=-1/0,na=-1/0;for(let qe of Ot)Tr=Math.min(Tr,qe.x),Sr=Math.min(Sr,qe.y),Kr=Math.max(Kr,qe.x),na=Math.max(na,qe.y);for(let qe=0;qe<$t.length;qe++){let $e=this._tiles[$t[qe]];if($e.holdingForFade())continue;let lt=$e.tileID,pt=Math.pow(2,ze.zoom-$e.tileID.overscaledZ),Et=ie*$e.queryPadding*t.X/$e.tileSize/pt,bt=[lt.getTilePoint(new t.Z(Tr,Sr)),lt.getTilePoint(new t.Z(Kr,na))];if(bt[0].x-Et=0&&bt[1].y+Et>=0){let Dt=wt.map(yr=>lt.getTilePoint(yr)),ur=Ot.map(yr=>lt.getTilePoint(yr));Me.push({tile:$e,tileID:lt,queryGeometry:Dt,cameraQueryGeometry:ur,scale:pt})}}return Me}getVisibleCoordinates(I){let ie=this.getRenderableIds(I).map(Te=>this._tiles[Te].tileID);for(let Te of ie)Te.posMatrix=this.transform.calculatePosMatrix(Te.toUnwrapped());return ie}hasTransition(){if(this._source.hasTransition())return!0;if(Vt(this._source.type)){let I=i.now();for(let ie in this._tiles)if(this._tiles[ie].fadeEndTime>=I)return!0}return!1}setFeatureState(I,ie,Te){this._state.updateState(I=I||"_geojsonTileLayer",ie,Te)}removeFeatureState(I,ie,Te){this._state.removeFeatureState(I=I||"_geojsonTileLayer",ie,Te)}getFeatureState(I,ie){return this._state.getState(I=I||"_geojsonTileLayer",ie)}setDependencies(I,ie,Te){let Me=this._tiles[I];Me&&Me.setDependencies(ie,Te)}reloadTilesForDependencies(I,ie){for(let Te in this._tiles)this._tiles[Te].hasDependency(I,ie)&&this._reloadTile(Te,"reloading");this._cache.filter(Te=>!Te.hasDependency(I,ie))}}function Bt(Oe,I){let ie=Math.abs(2*Oe.wrap)-+(Oe.wrap<0),Te=Math.abs(2*I.wrap)-+(I.wrap<0);return Oe.overscaledZ-I.overscaledZ||Te-ie||I.canonical.y-Oe.canonical.y||I.canonical.x-Oe.canonical.x}function Vt(Oe){return Oe==="raster"||Oe==="image"||Oe==="video"}kt.maxOverzooming=10,kt.maxUnderzooming=3;class Ar{constructor(I,ie){this.reset(I,ie)}reset(I,ie){this.points=I||[],this._distances=[0];for(let Te=1;Te0?(Me-ht)/wt:0;return this.points[ze].mult(1-Ot).add(this.points[ie].mult(Ot))}}function vr(Oe,I){let ie=!0;return Oe==="always"||Oe!=="never"&&I!=="never"||(ie=!1),ie}class qr{constructor(I,ie,Te){let Me=this.boxCells=[],ze=this.circleCells=[];this.xCellCount=Math.ceil(I/Te),this.yCellCount=Math.ceil(ie/Te);for(let ht=0;htthis.width||Me<0||ie>this.height)return[];let Ot=[];if(I<=0&&ie<=0&&this.width<=Te&&this.height<=Me){if(ze)return[{key:null,x1:I,y1:ie,x2:Te,y2:Me}];for(let $t=0;$t0}hitTestCircle(I,ie,Te,Me,ze){let ht=I-Te,wt=I+Te,Ot=ie-Te,$t=ie+Te;if(wt<0||ht>this.width||$t<0||Ot>this.height)return!1;let Tr=[];return this._forEachCell(ht,Ot,wt,$t,this._queryCellCircle,Tr,{hitTest:!0,overlapMode:Me,circle:{x:I,y:ie,radius:Te},seenUids:{box:{},circle:{}}},ze),Tr.length>0}_queryCell(I,ie,Te,Me,ze,ht,wt,Ot){let{seenUids:$t,hitTest:Tr,overlapMode:Sr}=wt,Kr=this.boxCells[ze];if(Kr!==null){let qe=this.bboxes;for(let $e of Kr)if(!$t.box[$e]){$t.box[$e]=!0;let lt=4*$e,pt=this.boxKeys[$e];if(I<=qe[lt+2]&&ie<=qe[lt+3]&&Te>=qe[lt+0]&&Me>=qe[lt+1]&&(!Ot||Ot(pt))&&(!Tr||!vr(Sr,pt.overlapMode))&&(ht.push({key:pt,x1:qe[lt],y1:qe[lt+1],x2:qe[lt+2],y2:qe[lt+3]}),Tr))return!0}}let na=this.circleCells[ze];if(na!==null){let qe=this.circles;for(let $e of na)if(!$t.circle[$e]){$t.circle[$e]=!0;let lt=3*$e,pt=this.circleKeys[$e];if(this._circleAndRectCollide(qe[lt],qe[lt+1],qe[lt+2],I,ie,Te,Me)&&(!Ot||Ot(pt))&&(!Tr||!vr(Sr,pt.overlapMode))){let Et=qe[lt],bt=qe[lt+1],Dt=qe[lt+2];if(ht.push({key:pt,x1:Et-Dt,y1:bt-Dt,x2:Et+Dt,y2:bt+Dt}),Tr)return!0}}}return!1}_queryCellCircle(I,ie,Te,Me,ze,ht,wt,Ot){let{circle:$t,seenUids:Tr,overlapMode:Sr}=wt,Kr=this.boxCells[ze];if(Kr!==null){let qe=this.bboxes;for(let $e of Kr)if(!Tr.box[$e]){Tr.box[$e]=!0;let lt=4*$e,pt=this.boxKeys[$e];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,qe[lt+0],qe[lt+1],qe[lt+2],qe[lt+3])&&(!Ot||Ot(pt))&&!vr(Sr,pt.overlapMode))return ht.push(!0),!0}}let na=this.circleCells[ze];if(na!==null){let qe=this.circles;for(let $e of na)if(!Tr.circle[$e]){Tr.circle[$e]=!0;let lt=3*$e,pt=this.circleKeys[$e];if(this._circlesCollide(qe[lt],qe[lt+1],qe[lt+2],$t.x,$t.y,$t.radius)&&(!Ot||Ot(pt))&&!vr(Sr,pt.overlapMode))return ht.push(!0),!0}}}_forEachCell(I,ie,Te,Me,ze,ht,wt,Ot){let $t=this._convertToXCellCoord(I),Tr=this._convertToYCellCoord(ie),Sr=this._convertToXCellCoord(Te),Kr=this._convertToYCellCoord(Me);for(let na=$t;na<=Sr;na++)for(let qe=Tr;qe<=Kr;qe++)if(ze.call(this,I,ie,Te,Me,this.xCellCount*qe+na,ht,wt,Ot))return}_convertToXCellCoord(I){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(I*this.xScale)))}_convertToYCellCoord(I){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(I*this.yScale)))}_circlesCollide(I,ie,Te,Me,ze,ht){let wt=Me-I,Ot=ze-ie,$t=Te+ht;return $t*$t>wt*wt+Ot*Ot}_circleAndRectCollide(I,ie,Te,Me,ze,ht,wt){let Ot=(ht-Me)/2,$t=Math.abs(I-(Me+Ot));if($t>Ot+Te)return!1;let Tr=(wt-ze)/2,Sr=Math.abs(ie-(ze+Tr));if(Sr>Tr+Te)return!1;if($t<=Ot||Sr<=Tr)return!0;let Kr=$t-Ot,na=Sr-Tr;return Kr*Kr+na*na<=Te*Te}}function kr(Oe,I,ie,Te,Me){let ze=t.H();return I?(t.K(ze,ze,[1/Me,1/Me,1]),ie||t.ad(ze,ze,Te.angle)):t.L(ze,Te.labelPlaneMatrix,Oe),ze}function Ur(Oe,I,ie,Te,Me){if(I){let ze=t.ae(Oe);return t.K(ze,ze,[Me,Me,1]),ie||t.ad(ze,ze,-Te.angle),ze}return Te.glCoordMatrix}function _t(Oe,I,ie,Te){let Me;Te?(Me=[Oe,I,Te(Oe,I),1],t.af(Me,Me,ie)):(Me=[Oe,I,0,1],nr(Me,Me,ie));let ze=Me[3];return{point:new t.P(Me[0]/ze,Me[1]/ze),signedDistanceFromCamera:ze,isOccluded:!1}}function Fe(Oe,I){return .5+Oe/I*.5}function Ye(Oe,I){return Oe.x>=-I[0]&&Oe.x<=I[0]&&Oe.y>=-I[1]&&Oe.y<=I[1]}function Ae(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe){let $e=Te?Oe.textSizeData:Oe.iconSizeData,lt=t.ag($e,ie.transform.zoom),pt=[256/ie.width*2+1,256/ie.height*2+1],Et=Te?Oe.text.dynamicLayoutVertexArray:Oe.icon.dynamicLayoutVertexArray;Et.clear();let bt=Oe.lineVertexArray,Dt=Te?Oe.text.placedSymbolArray:Oe.icon.placedSymbolArray,ur=ie.transform.width/ie.transform.height,yr=!1;for(let Er=0;ErMath.abs(ie.x-I.x)*Te?{useVertical:!0}:(Oe===t.ah.vertical?I.yie.x)?{needsFlipping:!0}:null}function Ke(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){let Sr=ie/24,Kr=I.lineOffsetX*Sr,na=I.lineOffsetY*Sr,qe;if(I.numGlyphs>1){let $e=I.glyphStartIndex+I.numGlyphs,lt=I.lineStartIndex,pt=I.lineStartIndex+I.lineLength,Et=Le(Sr,wt,Kr,na,Te,I,Tr,Oe);if(!Et)return{notEnoughRoom:!0};let bt=_t(Et.first.point.x,Et.first.point.y,ht,Oe.getElevation).point,Dt=_t(Et.last.point.x,Et.last.point.y,ht,Oe.getElevation).point;if(Me&&!Te){let ur=We(I.writingMode,bt,Dt,$t);if(ur)return ur}qe=[Et.first];for(let ur=I.glyphStartIndex+1;ur<$e-1;ur++)qe.push(jt(Sr*wt.getoffsetX(ur),Kr,na,Te,I.segment,lt,pt,Oe,Tr));qe.push(Et.last)}else{if(Me&&!Te){let lt=_t(Oe.tileAnchorPoint.x,Oe.tileAnchorPoint.y,ze,Oe.getElevation).point,pt=I.lineStartIndex+I.segment+1,Et=new t.P(Oe.lineVertexArray.getx(pt),Oe.lineVertexArray.gety(pt)),bt=_t(Et.x,Et.y,ze,Oe.getElevation),Dt=bt.signedDistanceFromCamera>0?bt.point:function(yr,Er,jr,Qr,ha,Aa){return st(yr,Er,jr,1,ha,Aa)}(Oe.tileAnchorPoint,Et,lt,0,ze,Oe),ur=We(I.writingMode,lt,Dt,$t);if(ur)return ur}let $e=jt(Sr*wt.getoffsetX(I.glyphStartIndex),Kr,na,Te,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Oe,Tr);if(!$e||Oe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};qe=[$e]}for(let $e of qe)t.aj(Ot,$e.point,$e.angle);return{}}function st(Oe,I,ie,Te,Me,ze){let ht=Oe.add(Oe.sub(I)._unit()),wt=Me!==void 0?_t(ht.x,ht.y,Me,ze.getElevation).point:Ut(ht.x,ht.y,ze).point,Ot=ie.sub(wt);return ie.add(Ot._mult(Te/Ot.mag()))}function ot(Oe,I,ie){let Te=I.projectionCache;if(Te.projections[Oe])return Te.projections[Oe];let Me=new t.P(I.lineVertexArray.getx(Oe),I.lineVertexArray.gety(Oe)),ze=Ut(Me.x,Me.y,I);if(ze.signedDistanceFromCamera>0)return Te.projections[Oe]=ze.point,Te.anyProjectionOccluded=Te.anyProjectionOccluded||ze.isOccluded,ze.point;let ht=Oe-ie.direction;return function(wt,Ot,$t,Tr,Sr){return st(wt,Ot,$t,Tr,void 0,Sr)}(ie.distanceFromAnchor===0?I.tileAnchorPoint:new t.P(I.lineVertexArray.getx(ht),I.lineVertexArray.gety(ht)),Me,ie.previousVertex,ie.absOffsetX-ie.distanceFromAnchor+1,I)}function Ut(Oe,I,ie){let Te=Oe+ie.translation[0],Me=I+ie.translation[1],ze;return!ie.pitchWithMap&&ie.projection.useSpecialProjectionForSymbols?(ze=ie.projection.projectTileCoordinates(Te,Me,ie.unwrappedTileID,ie.getElevation),ze.point.x=(.5*ze.point.x+.5)*ie.width,ze.point.y=(.5*-ze.point.y+.5)*ie.height):(ze=_t(Te,Me,ie.labelPlaneMatrix,ie.getElevation),ze.isOccluded=!1),ze}function Ct(Oe,I,ie){return Oe._unit()._perp()._mult(I*ie)}function Pt(Oe,I,ie,Te,Me,ze,ht,wt,Ot){if(wt.projectionCache.offsets[Oe])return wt.projectionCache.offsets[Oe];let $t=ie.add(I);if(Oe+Ot.direction=Me)return wt.projectionCache.offsets[Oe]=$t,$t;let Tr=ot(Oe+Ot.direction,wt,Ot),Sr=Ct(Tr.sub(ie),ht,Ot.direction),Kr=ie.add(Sr),na=Tr.add(Sr);return wt.projectionCache.offsets[Oe]=t.ak(ze,$t,Kr,na)||$t,wt.projectionCache.offsets[Oe]}function jt(Oe,I,ie,Te,Me,ze,ht,wt,Ot){let $t=Te?Oe-I:Oe+I,Tr=$t>0?1:-1,Sr=0;Te&&(Tr*=-1,Sr=Math.PI),Tr<0&&(Sr+=Math.PI);let Kr,na=Tr>0?ze+Me:ze+Me+1;wt.projectionCache.cachedAnchorPoint?Kr=wt.projectionCache.cachedAnchorPoint:(Kr=Ut(wt.tileAnchorPoint.x,wt.tileAnchorPoint.y,wt).point,wt.projectionCache.cachedAnchorPoint=Kr);let qe,$e,lt=Kr,pt=Kr,Et=0,bt=0,Dt=Math.abs($t),ur=[],yr;for(;Et+bt<=Dt;){if(na+=Tr,na=ht)return null;Et+=bt,pt=lt,$e=qe;let Qr={absOffsetX:Dt,direction:Tr,distanceFromAnchor:Et,previousVertex:pt};if(lt=ot(na,wt,Qr),ie===0)ur.push(pt),yr=lt.sub(pt);else{let ha,Aa=lt.sub(pt);ha=Aa.mag()===0?Ct(ot(na+Tr,wt,Qr).sub(lt),ie,Tr):Ct(Aa,ie,Tr),$e||($e=pt.add(ha)),qe=Pt(na,ha,lt,ze,ht,$e,ie,wt,Qr),ur.push($e),yr=qe.sub($e)}bt=yr.mag()}let Er=yr._mult((Dt-Et)/bt)._add($e||pt),jr=Sr+Math.atan2(lt.y-pt.y,lt.x-pt.x);return ur.push(Er),{point:Er,angle:Ot?jr:0,path:ur}}let cr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function or(Oe,I){for(let ie=0;ie=1;Bn--)on.push(Vi.path[Bn]);for(let Bn=1;BnAo.signedDistanceFromCamera<=0)?[]:Bn.map(Ao=>Ao.point)}let Kn=[];if(on.length>0){let Bn=on[0].clone(),Ao=on[0].clone();for(let ls=1;ls=Aa.x&&Ao.x<=Da.x&&Bn.y>=Aa.y&&Ao.y<=Da.y?[on]:Ao.xDa.x||Ao.yDa.y?[]:t.al([on],Aa.x,Aa.y,Da.x,Da.y)}for(let Bn of Kn){ci.reset(Bn,.25*ha);let Ao=0;Ao=ci.length<=.5*ha?1:Math.ceil(ci.paddedLength/An)+1;for(let ls=0;ls_t(Me.x,Me.y,Te,ie.getElevation))}queryRenderedSymbols(I){if(I.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ie=[],Te=1/0,Me=1/0,ze=-1/0,ht=-1/0;for(let Tr of I){let Sr=new t.P(Tr.x+Pr,Tr.y+Pr);Te=Math.min(Te,Sr.x),Me=Math.min(Me,Sr.y),ze=Math.max(ze,Sr.x),ht=Math.max(ht,Sr.y),ie.push(Sr)}let wt=this.grid.query(Te,Me,ze,ht).concat(this.ignoredGrid.query(Te,Me,ze,ht)),Ot={},$t={};for(let Tr of wt){let Sr=Tr.key;if(Ot[Sr.bucketInstanceId]===void 0&&(Ot[Sr.bucketInstanceId]={}),Ot[Sr.bucketInstanceId][Sr.featureIndex])continue;let Kr=[new t.P(Tr.x1,Tr.y1),new t.P(Tr.x2,Tr.y1),new t.P(Tr.x2,Tr.y2),new t.P(Tr.x1,Tr.y2)];t.am(ie,Kr)&&(Ot[Sr.bucketInstanceId][Sr.featureIndex]=!0,$t[Sr.bucketInstanceId]===void 0&&($t[Sr.bucketInstanceId]=[]),$t[Sr.bucketInstanceId].push(Sr.featureIndex))}return $t}insertCollisionBox(I,ie,Te,Me,ze,ht){(Te?this.ignoredGrid:this.grid).insert({bucketInstanceId:Me,featureIndex:ze,collisionGroupID:ht,overlapMode:ie},I[0],I[1],I[2],I[3])}insertCollisionCircles(I,ie,Te,Me,ze,ht){let wt=Te?this.ignoredGrid:this.grid,Ot={bucketInstanceId:Me,featureIndex:ze,collisionGroupID:ht,overlapMode:ie};for(let $t=0;$t=this.screenRightBoundary||Methis.screenBottomBoundary}isInsideGrid(I,ie,Te,Me){return Te>=0&&I=0&&iethis.projectAndGetPerspectiveRatio(Te,ha.x,ha.y,Me,$t));jr=Qr.some(ha=>!ha.isOccluded),Er=Qr.map(ha=>ha.point)}else jr=!0;return{box:t.ao(Er),allPointsOccluded:!jr}}}function Fa(Oe,I,ie){return I*(t.X/(Oe.tileSize*Math.pow(2,ie-Oe.tileID.overscaledZ)))}class Ra{constructor(I,ie,Te,Me){this.opacity=I?Math.max(0,Math.min(1,I.opacity+(I.placed?ie:-ie))):Me&&Te?1:0,this.placed=Te}isHidden(){return this.opacity===0&&!this.placed}}class qa{constructor(I,ie,Te,Me,ze){this.text=new Ra(I?I.text:null,ie,Te,ze),this.icon=new Ra(I?I.icon:null,ie,Me,ze)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Wa{constructor(I,ie,Te){this.text=I,this.icon=ie,this.skipFade=Te}}class Ca{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class hi{constructor(I,ie,Te,Me,ze){this.bucketInstanceId=I,this.featureIndex=ie,this.sourceLayerIndex=Te,this.bucketIndex=Me,this.tileID=ze}}class wi{constructor(I){this.crossSourceCollisions=I,this.maxGroupID=0,this.collisionGroups={}}get(I){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[I]){let ie=++this.maxGroupID;this.collisionGroups[I]={ID:ie,predicate:Te=>Te.collisionGroupID===ie}}return this.collisionGroups[I]}}function Yt(Oe,I,ie,Te,Me){let{horizontalAlign:ze,verticalAlign:ht}=t.au(Oe);return new t.P(-(ze-.5)*I+Te[0]*Me,-(ht-.5)*ie+Te[1]*Me)}class Rt{constructor(I,ie,Te,Me,ze,ht){this.transform=I.clone(),this.terrain=Te,this.collisionIndex=new _a(this.transform,ie),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Me,this.retainedQueryData={},this.collisionGroups=new wi(ze),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ht,ht&&(ht.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(I){let ie=this.terrain;return ie?(Te,Me)=>ie.getElevation(I,Te,Me):null}getBucketParts(I,ie,Te,Me){let ze=Te.getBucket(ie),ht=Te.latestFeatureIndex;if(!ze||!ht||ie.id!==ze.layerIds[0])return;let wt=Te.collisionBoxArray,Ot=ze.layers[0].layout,$t=ze.layers[0].paint,Tr=Math.pow(2,this.transform.zoom-Te.tileID.overscaledZ),Sr=Te.tileSize/t.X,Kr=Te.tileID.toUnwrapped(),na=this.transform.calculatePosMatrix(Kr),qe=Ot.get("text-pitch-alignment")==="map",$e=Ot.get("text-rotation-alignment")==="map",lt=Fa(Te,1,this.transform.zoom),pt=this.collisionIndex.mapProjection.translatePosition(this.transform,Te,$t.get("text-translate"),$t.get("text-translate-anchor")),Et=this.collisionIndex.mapProjection.translatePosition(this.transform,Te,$t.get("icon-translate"),$t.get("icon-translate-anchor")),bt=kr(na,qe,$e,this.transform,lt),Dt=null;if(qe){let yr=Ur(na,qe,$e,this.transform,lt);Dt=t.L([],this.transform.labelPlaneMatrix,yr)}this.retainedQueryData[ze.bucketInstanceId]=new hi(ze.bucketInstanceId,ht,ze.sourceLayerIndex,ze.index,Te.tileID);let ur={bucket:ze,layout:Ot,translationText:pt,translationIcon:Et,posMatrix:na,unwrappedTileID:Kr,textLabelPlaneMatrix:bt,labelToScreenMatrix:Dt,scale:Tr,textPixelRatio:Sr,holdingForFade:Te.holdingForFade(),collisionBoxArray:wt,partiallyEvaluatedTextSize:t.ag(ze.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(ze.sourceID)};if(Me)for(let yr of ze.sortKeyRanges){let{sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr}=yr;I.push({sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr,parameters:ur})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:ze.symbolInstances.length,parameters:ur})}attemptAnchorPlacement(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe,$e,lt,pt,Et,bt){let Dt=t.aq[I.textAnchor],ur=[I.textOffset0,I.textOffset1],yr=Yt(Dt,Te,Me,ur,ze),Er=this.collisionIndex.placeCollisionBox(ie,Kr,Ot,$t,Tr,wt,ht,lt,Sr.predicate,bt,yr);if((!Et||this.collisionIndex.placeCollisionBox(Et,Kr,Ot,$t,Tr,wt,ht,pt,Sr.predicate,bt,yr).placeable)&&Er.placeable){let jr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[na.crossTileID]&&this.prevPlacement.placements[na.crossTileID]&&this.prevPlacement.placements[na.crossTileID].text&&(jr=this.prevPlacement.variableOffsets[na.crossTileID].anchor),na.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[na.crossTileID]={textOffset:ur,width:Te,height:Me,anchor:Dt,textBoxScale:ze,prevAnchor:jr},this.markUsedJustification(qe,Dt,na,$e),qe.allowVerticalPlacement&&(this.markUsedOrientation(qe,$e,na),this.placedOrientations[na.crossTileID]=$e),{shift:yr,placedGlyphBoxes:Er}}}placeLayerBucketPart(I,ie,Te){let{bucket:Me,layout:ze,translationText:ht,translationIcon:wt,posMatrix:Ot,unwrappedTileID:$t,textLabelPlaneMatrix:Tr,labelToScreenMatrix:Sr,textPixelRatio:Kr,holdingForFade:na,collisionBoxArray:qe,partiallyEvaluatedTextSize:$e,collisionGroup:lt}=I.parameters,pt=ze.get("text-optional"),Et=ze.get("icon-optional"),bt=t.ar(ze,"text-overlap","text-allow-overlap"),Dt=bt==="always",ur=t.ar(ze,"icon-overlap","icon-allow-overlap"),yr=ur==="always",Er=ze.get("text-rotation-alignment")==="map",jr=ze.get("text-pitch-alignment")==="map",Qr=ze.get("icon-text-fit")!=="none",ha=ze.get("symbol-z-order")==="viewport-y",Aa=Dt&&(yr||!Me.hasIconData()||Et),Da=yr&&(Dt||!Me.hasTextData()||pt);!Me.collisionArrays&&qe&&Me.deserializeCollisionBoxes(qe);let ci=this._getTerrainElevationFunc(this.retainedQueryData[Me.bucketInstanceId].tileID),Vi=(ji,on,An)=>{var Kn,Bn;if(ie[ji.crossTileID])return;if(na)return void(this.placements[ji.crossTileID]=new Wa(!1,!1,!1));let Ao=!1,ls=!1,Mo=!0,Yo=null,ds={box:null,placeable:!1,offscreen:null},ul={box:null,placeable:!1,offscreen:null},tl=null,es=null,ts=null,Il=0,tu=0,Ru=0;on.textFeatureIndex?Il=on.textFeatureIndex:ji.useRuntimeCollisionCircles&&(Il=ji.featureIndex),on.verticalTextFeatureIndex&&(tu=on.verticalTextFeatureIndex);let vu=on.textBox;if(vu){let Gl=et=>{let dt=t.ah.horizontal;if(Me.allowVerticalPlacement&&!et&&this.prevPlacement){let yt=this.prevPlacement.placedOrientations[ji.crossTileID];yt&&(this.placedOrientations[ji.crossTileID]=yt,dt=yt,this.markUsedOrientation(Me,dt,ji))}return dt},Hl=(et,dt)=>{if(Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&on.verticalTextBox){for(let yt of Me.writingModes)if(yt===t.ah.vertical?(ds=dt(),ul=ds):ds=et(),ds&&ds.placeable)break}else ds=et()},me=ji.textAnchorOffsetStartIndex,De=ji.textAnchorOffsetEndIndex;if(De===me){let et=(dt,yt)=>{let Tt=this.collisionIndex.placeCollisionBox(dt,bt,Kr,Ot,$t,jr,Er,ht,lt.predicate,ci);return Tt&&Tt.placeable&&(this.markUsedOrientation(Me,yt,ji),this.placedOrientations[ji.crossTileID]=yt),Tt};Hl(()=>et(vu,t.ah.horizontal),()=>{let dt=on.verticalTextBox;return Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&dt?et(dt,t.ah.vertical):{box:null,offscreen:null}}),Gl(ds&&ds.placeable)}else{let et=t.aq[(Bn=(Kn=this.prevPlacement)===null||Kn===void 0?void 0:Kn.variableOffsets[ji.crossTileID])===null||Bn===void 0?void 0:Bn.anchor],dt=(Tt,tr,zt)=>{let _r=Tt.x2-Tt.x1,Gr=Tt.y2-Tt.y1,Xr=ji.textBoxScale,wa=Qr&&ur==="never"?tr:null,pa=null,Ja=bt==="never"?1:2,ti="never";et&&Ja++;for(let Sa=0;Sadt(vu,on.iconBox,t.ah.horizontal),()=>{let Tt=on.verticalTextBox;return Me.allowVerticalPlacement&&(!ds||!ds.placeable)&&ji.numVerticalGlyphVertices>0&&Tt?dt(Tt,on.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),ds&&(Ao=ds.placeable,Mo=ds.offscreen);let yt=Gl(ds&&ds.placeable);if(!Ao&&this.prevPlacement){let Tt=this.prevPlacement.variableOffsets[ji.crossTileID];Tt&&(this.variableOffsets[ji.crossTileID]=Tt,this.markUsedJustification(Me,Tt.anchor,ji,yt))}}}if(tl=ds,Ao=tl&&tl.placeable,Mo=tl&&tl.offscreen,ji.useRuntimeCollisionCircles){let Gl=Me.text.placedSymbolArray.get(ji.centerJustifiedTextSymbolIndex),Hl=t.ai(Me.textSizeData,$e,Gl),me=ze.get("text-padding");es=this.collisionIndex.placeCollisionCircles(bt,Gl,Me.lineVertexArray,Me.glyphOffsetArray,Hl,Ot,$t,Tr,Sr,Te,jr,lt.predicate,ji.collisionCircleDiameter,me,ht,ci),es.circles.length&&es.collisionDetected&&!Te&&t.w("Collisions detected, but collision boxes are not shown"),Ao=Dt||es.circles.length>0&&!es.collisionDetected,Mo=Mo&&es.offscreen}if(on.iconFeatureIndex&&(Ru=on.iconFeatureIndex),on.iconBox){let Gl=Hl=>this.collisionIndex.placeCollisionBox(Hl,ur,Kr,Ot,$t,jr,Er,wt,lt.predicate,ci,Qr&&Yo?Yo:void 0);ul&&ul.placeable&&on.verticalIconBox?(ts=Gl(on.verticalIconBox),ls=ts.placeable):(ts=Gl(on.iconBox),ls=ts.placeable),Mo=Mo&&ts.offscreen}let wl=pt||ji.numHorizontalGlyphVertices===0&&ji.numVerticalGlyphVertices===0,fu=Et||ji.numIconVertices===0;wl||fu?fu?wl||(ls=ls&&Ao):Ao=ls&&Ao:ls=Ao=ls&&Ao;let uc=ls&&ts.placeable;if(Ao&&tl.placeable&&this.collisionIndex.insertCollisionBox(tl.box,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,ul&&ul.placeable&&tu?tu:Il,lt.ID),uc&&this.collisionIndex.insertCollisionBox(ts.box,ur,ze.get("icon-ignore-placement"),Me.bucketInstanceId,Ru,lt.ID),es&&Ao&&this.collisionIndex.insertCollisionCircles(es.circles,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,Il,lt.ID),Te&&this.storeCollisionData(Me.bucketInstanceId,An,on,tl,ts,es),ji.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Me.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ji.crossTileID]=new Wa(Ao||Aa,ls||Da,Mo||Me.justReloaded),ie[ji.crossTileID]=!0};if(ha){if(I.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ji=Me.getSortedSymbolIndexes(this.transform.angle);for(let on=ji.length-1;on>=0;--on){let An=ji[on];Vi(Me.symbolInstances.get(An),Me.collisionArrays[An],An)}}else for(let ji=I.symbolInstanceStart;ji=0&&(I.text.placedSymbolArray.get(wt).crossTileID=ze>=0&&wt!==ze?0:Te.crossTileID)}markUsedOrientation(I,ie,Te){let Me=ie===t.ah.horizontal||ie===t.ah.horizontalOnly?ie:0,ze=ie===t.ah.vertical?ie:0,ht=[Te.leftJustifiedTextSymbolIndex,Te.centerJustifiedTextSymbolIndex,Te.rightJustifiedTextSymbolIndex];for(let wt of ht)I.text.placedSymbolArray.get(wt).placedOrientation=Me;Te.verticalPlacedTextSymbolIndex&&(I.text.placedSymbolArray.get(Te.verticalPlacedTextSymbolIndex).placedOrientation=ze)}commit(I){this.commitTime=I,this.zoomAtLastRecencyCheck=this.transform.zoom;let ie=this.prevPlacement,Te=!1;this.prevZoomAdjustment=ie?ie.zoomAdjustment(this.transform.zoom):0;let Me=ie?ie.symbolFadeChange(I):1,ze=ie?ie.opacities:{},ht=ie?ie.variableOffsets:{},wt=ie?ie.placedOrientations:{};for(let Ot in this.placements){let $t=this.placements[Ot],Tr=ze[Ot];Tr?(this.opacities[Ot]=new qa(Tr,Me,$t.text,$t.icon),Te=Te||$t.text!==Tr.text.placed||$t.icon!==Tr.icon.placed):(this.opacities[Ot]=new qa(null,Me,$t.text,$t.icon,$t.skipFade),Te=Te||$t.text||$t.icon)}for(let Ot in ze){let $t=ze[Ot];if(!this.opacities[Ot]){let Tr=new qa($t,Me,!1,!1);Tr.isHidden()||(this.opacities[Ot]=Tr,Te=Te||$t.text.placed||$t.icon.placed)}}for(let Ot in ht)this.variableOffsets[Ot]||!this.opacities[Ot]||this.opacities[Ot].isHidden()||(this.variableOffsets[Ot]=ht[Ot]);for(let Ot in wt)this.placedOrientations[Ot]||!this.opacities[Ot]||this.opacities[Ot].isHidden()||(this.placedOrientations[Ot]=wt[Ot]);if(ie&&ie.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Te?this.lastPlacementChangeTime=I:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ie?ie.lastPlacementChangeTime:I)}updateLayerOpacities(I,ie){let Te={};for(let Me of ie){let ze=Me.getBucket(I);ze&&Me.latestFeatureIndex&&I.id===ze.layerIds[0]&&this.updateBucketOpacities(ze,Me.tileID,Te,Me.collisionBoxArray)}}updateBucketOpacities(I,ie,Te,Me){I.hasTextData()&&(I.text.opacityVertexArray.clear(),I.text.hasVisibleVertices=!1),I.hasIconData()&&(I.icon.opacityVertexArray.clear(),I.icon.hasVisibleVertices=!1),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexArray.clear(),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexArray.clear();let ze=I.layers[0],ht=ze.layout,wt=new qa(null,0,!1,!1,!0),Ot=ht.get("text-allow-overlap"),$t=ht.get("icon-allow-overlap"),Tr=ze._unevaluatedLayout.hasValue("text-variable-anchor")||ze._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Sr=ht.get("text-rotation-alignment")==="map",Kr=ht.get("text-pitch-alignment")==="map",na=ht.get("icon-text-fit")!=="none",qe=new qa(null,0,Ot&&($t||!I.hasIconData()||ht.get("icon-optional")),$t&&(Ot||!I.hasTextData()||ht.get("text-optional")),!0);!I.collisionArrays&&Me&&(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData())&&I.deserializeCollisionBoxes(Me);let $e=(pt,Et,bt)=>{for(let Dt=0;Dt0,jr=this.placedOrientations[Et.crossTileID],Qr=jr===t.ah.vertical,ha=jr===t.ah.horizontal||jr===t.ah.horizontalOnly;if(bt>0||Dt>0){let Da=Za(yr.text);$e(I.text,bt,Qr?ri:Da),$e(I.text,Dt,ha?ri:Da);let ci=yr.text.isHidden();[Et.rightJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.leftJustifiedTextSymbolIndex].forEach(on=>{on>=0&&(I.text.placedSymbolArray.get(on).hidden=ci||Qr?1:0)}),Et.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).hidden=ci||ha?1:0);let Vi=this.variableOffsets[Et.crossTileID];Vi&&this.markUsedJustification(I,Vi.anchor,Et,jr);let ji=this.placedOrientations[Et.crossTileID];ji&&(this.markUsedJustification(I,"left",Et,ji),this.markUsedOrientation(I,ji,Et))}if(Er){let Da=Za(yr.icon),ci=!(na&&Et.verticalPlacedIconSymbolIndex&&Qr);Et.placedIconSymbolIndex>=0&&($e(I.icon,Et.numIconVertices,ci?Da:ri),I.icon.placedSymbolArray.get(Et.placedIconSymbolIndex).hidden=yr.icon.isHidden()),Et.verticalPlacedIconSymbolIndex>=0&&($e(I.icon,Et.numVerticalIconVertices,ci?ri:Da),I.icon.placedSymbolArray.get(Et.verticalPlacedIconSymbolIndex).hidden=yr.icon.isHidden())}let Aa=lt&<.has(pt)?lt.get(pt):{text:null,icon:null};if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){let Da=I.collisionArrays[pt];if(Da){let ci=new t.P(0,0);if(Da.textBox||Da.verticalTextBox){let Vi=!0;if(Tr){let ji=this.variableOffsets[ur];ji?(ci=Yt(ji.anchor,ji.width,ji.height,ji.textOffset,ji.textBoxScale),Sr&&ci._rotate(Kr?this.transform.angle:-this.transform.angle)):Vi=!1}if(Da.textBox||Da.verticalTextBox){let ji;Da.textBox&&(ji=Qr),Da.verticalTextBox&&(ji=ha),Zt(I.textCollisionBox.collisionVertexArray,yr.text.placed,!Vi||ji,Aa.text,ci.x,ci.y)}}if(Da.iconBox||Da.verticalIconBox){let Vi=!!(!ha&&Da.verticalIconBox),ji;Da.iconBox&&(ji=Vi),Da.verticalIconBox&&(ji=!Vi),Zt(I.iconCollisionBox.collisionVertexArray,yr.icon.placed,ji,Aa.icon,na?ci.x:0,na?ci.y:0)}}}}if(I.sortFeatures(this.transform.angle),this.retainedQueryData[I.bucketInstanceId]&&(this.retainedQueryData[I.bucketInstanceId].featureSortOrder=I.featureSortOrder),I.hasTextData()&&I.text.opacityVertexBuffer&&I.text.opacityVertexBuffer.updateData(I.text.opacityVertexArray),I.hasIconData()&&I.icon.opacityVertexBuffer&&I.icon.opacityVertexBuffer.updateData(I.icon.opacityVertexArray),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexBuffer&&I.iconCollisionBox.collisionVertexBuffer.updateData(I.iconCollisionBox.collisionVertexArray),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexBuffer&&I.textCollisionBox.collisionVertexBuffer.updateData(I.textCollisionBox.collisionVertexArray),I.text.opacityVertexArray.length!==I.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${I.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${I.text.layoutVertexArray.length}) / 4`);if(I.icon.opacityVertexArray.length!==I.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${I.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${I.icon.layoutVertexArray.length}) / 4`);if(I.bucketInstanceId in this.collisionCircleArrays){let pt=this.collisionCircleArrays[I.bucketInstanceId];I.placementInvProjMatrix=pt.invProjMatrix,I.placementViewportMatrix=pt.viewportMatrix,I.collisionCircleArray=pt.circles,delete this.collisionCircleArrays[I.bucketInstanceId]}}symbolFadeChange(I){return this.fadeDuration===0?1:(I-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(I){return Math.max(0,(this.transform.zoom-I)/1.5)}hasTransitions(I){return this.stale||I-this.lastPlacementChangeTimeI}setStale(){this.stale=!0}}function Zt(Oe,I,ie,Te,Me,ze){Te&&Te.length!==0||(Te=[0,0,0,0]);let ht=Te[0]-Pr,wt=Te[1]-Pr,Ot=Te[2]-Pr,$t=Te[3]-Pr;Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,wt),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,wt),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,$t),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,$t)}let Jt=Math.pow(2,25),Fr=Math.pow(2,24),ta=Math.pow(2,17),ra=Math.pow(2,16),ca=Math.pow(2,9),Ba=Math.pow(2,8),$a=Math.pow(2,1);function Za(Oe){if(Oe.opacity===0&&!Oe.placed)return 0;if(Oe.opacity===1&&Oe.placed)return 4294967295;let I=Oe.placed?1:0,ie=Math.floor(127*Oe.opacity);return ie*Jt+I*Fr+ie*ta+I*ra+ie*ca+I*Ba+ie*$a+I}let ri=0;function pi(){return{isOccluded:(Oe,I,ie)=>!1,getPitchedTextCorrection:(Oe,I,ie)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Oe,I,ie,Te){throw new Error("Not implemented.")},translatePosition:(Oe,I,ie,Te)=>function(Me,ze,ht,wt,Ot=!1){if(!ht[0]&&!ht[1])return[0,0];let $t=Ot?wt==="map"?Me.angle:0:wt==="viewport"?-Me.angle:0;if($t){let Tr=Math.sin($t),Sr=Math.cos($t);ht=[ht[0]*Sr-ht[1]*Tr,ht[0]*Tr+ht[1]*Sr]}return[Ot?ht[0]:Fa(ze,ht[0],Me.zoom),Ot?ht[1]:Fa(ze,ht[1],Me.zoom)]}(Oe,I,ie,Te),getCircleRadiusCorrection:Oe=>1}}class Ia{constructor(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&!I.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(I,ie,Te,Me,ze){let ht=this._bucketParts;for(;this._currentTileIndexwt.sortKey-Ot.sortKey));this._currentPartIndex!this._forceFullPlacement&&i.now()-Me>2;for(;this._currentPlacementIndex>=0;){let ht=ie[I[this._currentPlacementIndex]],wt=this.placement.collisionIndex.transform.zoom;if(ht.type==="symbol"&&(!ht.minzoom||ht.minzoom<=wt)&&(!ht.maxzoom||ht.maxzoom>wt)){if(this._inProgressLayer||(this._inProgressLayer=new Ia(ht)),this._inProgressLayer.continuePlacement(Te[ht.source],this.placement,this._showCollisionBoxes,ht,ze))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(I){return this.placement.commit(I),this.placement}}let tn=512/t.X/2;class cn{constructor(I,ie,Te){this.tileID=I,this.bucketInstanceId=Te,this._symbolsByKey={};let Me=new Map;for(let ze=0;ze({x:Math.floor(Ot.anchorX*tn),y:Math.floor(Ot.anchorY*tn)})),crossTileIDs:ht.map(Ot=>Ot.crossTileID)};if(wt.positions.length>128){let Ot=new t.av(wt.positions.length,16,Uint16Array);for(let{x:$t,y:Tr}of wt.positions)Ot.add($t,Tr);Ot.finish(),delete wt.positions,wt.index=Ot}this._symbolsByKey[ze]=wt}}getScaledCoordinates(I,ie){let{x:Te,y:Me,z:ze}=this.tileID.canonical,{x:ht,y:wt,z:Ot}=ie.canonical,$t=tn/Math.pow(2,Ot-ze),Tr=(wt*t.X+I.anchorY)*$t,Sr=Me*t.X*tn;return{x:Math.floor((ht*t.X+I.anchorX)*$t-Te*t.X*tn),y:Math.floor(Tr-Sr)}}findMatches(I,ie,Te){let Me=this.tileID.canonical.zI)}}class xt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ut{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(I){let ie=Math.round((I-this.lng)/360);if(ie!==0)for(let Te in this.indexes){let Me=this.indexes[Te],ze={};for(let ht in Me){let wt=Me[ht];wt.tileID=wt.tileID.unwrapTo(wt.tileID.wrap+ie),ze[wt.tileID.key]=wt}this.indexes[Te]=ze}this.lng=I}addBucket(I,ie,Te){if(this.indexes[I.overscaledZ]&&this.indexes[I.overscaledZ][I.key]){if(this.indexes[I.overscaledZ][I.key].bucketInstanceId===ie.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(I.overscaledZ,this.indexes[I.overscaledZ][I.key])}for(let ze=0;zeI.overscaledZ)for(let wt in ht){let Ot=ht[wt];Ot.tileID.isChildOf(I)&&Ot.findMatches(ie.symbolInstances,I,Me)}else{let wt=ht[I.scaledTo(Number(ze)).key];wt&&wt.findMatches(ie.symbolInstances,I,Me)}}for(let ze=0;ze{ie[Te]=!0});for(let Te in this.layerIndexes)ie[Te]||delete this.layerIndexes[Te]}}let Cr=(Oe,I)=>t.t(Oe,I&&I.filter(ie=>ie.identifier!=="source.canvas")),wr=t.aw();class Rr extends t.E{constructor(I,ie={}){super(),this._rtlPluginLoaded=()=>{for(let Te in this.sourceCaches){let Me=this.sourceCaches[Te].getSource().type;Me!=="vector"&&Me!=="geojson"||this.sourceCaches[Te].reload()}},this.map=I,this.dispatcher=new Q(X(),I._getMapId()),this.dispatcher.registerMessageHandler("GG",(Te,Me)=>this.getGlyphs(Te,Me)),this.dispatcher.registerMessageHandler("GI",(Te,Me)=>this.getImages(Te,Me)),this.imageManager=new y,this.imageManager.setEventedParent(this),this.glyphManager=new F(I._requestManager,ie.localIdeographFontFamily),this.lineAtlas=new W(256,512),this.crossTileSymbolIndex=new Or,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()),Ze().on(se,this._rtlPluginLoaded),this.on("data",Te=>{if(Te.dataType!=="source"||Te.sourceDataType!=="metadata")return;let Me=this.sourceCaches[Te.sourceId];if(!Me)return;let ze=Me.getSource();if(ze&&ze.vectorLayerIds)for(let ht in this._layers){let wt=this._layers[ht];wt.source===ze.id&&this._validateLayer(wt)}})}loadURL(I,ie={},Te){this.fire(new t.k("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate;let Me=this.map._requestManager.transformRequest(I,"Style");this._loadStyleRequest=new AbortController;let ze=this._loadStyleRequest;t.h(Me,this._loadStyleRequest).then(ht=>{this._loadStyleRequest=null,this._load(ht.data,ie,Te)}).catch(ht=>{this._loadStyleRequest=null,ht&&!ze.signal.aborted&&this.fire(new t.j(ht))})}loadJSON(I,ie={},Te){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,i.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ie.validate=ie.validate!==!1,this._load(I,ie,Te)}).catch(()=>{})}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(wr,{validate:!1})}_load(I,ie,Te){var Me;let ze=ie.transformStyle?ie.transformStyle(Te,I):I;if(!ie.validate||!Cr(this,t.u(ze))){this._loaded=!0,this.stylesheet=ze;for(let ht in ze.sources)this.addSource(ht,ze.sources[ht],{validate:!1});ze.sprite?this._loadSprite(ze.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(ze.glyphs),this._createLayers(),this.light=new L(this.stylesheet.light),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((Me=this.stylesheet.terrain)!==null&&Me!==void 0?Me:null),this.fire(new t.k("data",{dataType:"style"})),this.fire(new t.k("style.load"))}}_createLayers(){let I=t.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",I),this._order=I.map(ie=>ie.id),this._layers={},this._serializedLayers=null;for(let ie of I){let Te=t.aA(ie);Te.setEventedParent(this,{layer:{id:ie.id}}),this._layers[ie.id]=Te}}_loadSprite(I,ie=!1,Te=void 0){let Me;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(ze,ht,wt,Ot){return t._(this,void 0,void 0,function*(){let $t=b(ze),Tr=wt>1?"@2x":"",Sr={},Kr={};for(let{id:na,url:qe}of $t){let $e=ht.transformRequest(d(qe,Tr,".json"),"SpriteJSON");Sr[na]=t.h($e,Ot);let lt=ht.transformRequest(d(qe,Tr,".png"),"SpriteImage");Kr[na]=l.getImage(lt,Ot)}return yield Promise.all([...Object.values(Sr),...Object.values(Kr)]),function(na,qe){return t._(this,void 0,void 0,function*(){let $e={};for(let lt in na){$e[lt]={};let pt=i.getImageCanvasContext((yield qe[lt]).data),Et=(yield na[lt]).data;for(let bt in Et){let{width:Dt,height:ur,x:yr,y:Er,sdf:jr,pixelRatio:Qr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi}=Et[bt];$e[lt][bt]={data:null,pixelRatio:Qr,sdf:jr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi,spriteData:{width:Dt,height:ur,x:yr,y:Er,context:pt}}}}return $e})}(Sr,Kr)})}(I,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(ze=>{if(this._spriteRequest=null,ze)for(let ht in ze){this._spritesImagesIds[ht]=[];let wt=this._spritesImagesIds[ht]?this._spritesImagesIds[ht].filter(Ot=>!(Ot in ze)):[];for(let Ot of wt)this.imageManager.removeImage(Ot),this._changedImages[Ot]=!0;for(let Ot in ze[ht]){let $t=ht==="default"?Ot:`${ht}:${Ot}`;this._spritesImagesIds[ht].push($t),$t in this.imageManager.images?this.imageManager.updateImage($t,ze[ht][Ot],!1):this.imageManager.addImage($t,ze[ht][Ot]),ie&&(this._changedImages[$t]=!0)}}}).catch(ze=>{this._spriteRequest=null,Me=ze,this.fire(new t.j(Me))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ie&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"})),Te&&Te(Me)})}_unloadSprite(){for(let I of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(I),this._changedImages[I]=!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(I){let ie=this.sourceCaches[I.source];if(!ie)return;let Te=I.sourceLayer;if(!Te)return;let Me=ie.getSource();(Me.type==="geojson"||Me.vectorLayerIds&&Me.vectorLayerIds.indexOf(Te)===-1)&&this.fire(new t.j(new Error(`Source layer "${Te}" does not exist on source "${Me.id}" as specified by style layer "${I.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let I in this.sourceCaches)if(!this.sourceCaches[I].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(I,ie=!1){let Te=this._serializedAllLayers();if(!I||I.length===0)return Object.values(ie?t.aB(Te):Te);let Me=[];for(let ze of I)if(Te[ze]){let ht=ie?t.aB(Te[ze]):Te[ze];Me.push(ht)}return Me}_serializedAllLayers(){let I=this._serializedLayers;if(I)return I;I=this._serializedLayers={};let ie=Object.keys(this._layers);for(let Te of ie){let Me=this._layers[Te];Me.type!=="custom"&&(I[Te]=Me.serialize())}return I}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let I in this.sourceCaches)if(this.sourceCaches[I].hasTransition())return!0;for(let I in this._layers)if(this._layers[I].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(I){if(!this._loaded)return;let ie=this._changed;if(ie){let Me=Object.keys(this._updatedLayers),ze=Object.keys(this._removedLayers);(Me.length||ze.length)&&this._updateWorkerLayers(Me,ze);for(let ht in this._updatedSources){let wt=this._updatedSources[ht];if(wt==="reload")this._reloadSource(ht);else{if(wt!=="clear")throw new Error(`Invalid action ${wt}`);this._clearSource(ht)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ht in this._updatedPaintProps)this._layers[ht].updateTransitions(I);this.light.updateTransitions(I),this.sky.updateTransitions(I),this._resetUpdates()}let Te={};for(let Me in this.sourceCaches){let ze=this.sourceCaches[Me];Te[Me]=ze.used,ze.used=!1}for(let Me of this._order){let ze=this._layers[Me];ze.recalculate(I,this._availableImages),!ze.isHidden(I.zoom)&&ze.source&&(this.sourceCaches[ze.source].used=!0)}for(let Me in Te){let ze=this.sourceCaches[Me];!!Te[Me]!=!!ze.used&&ze.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Me}))}this.light.recalculate(I),this.sky.recalculate(I),this.z=I.zoom,ie&&this.fire(new t.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let I=Object.keys(this._changedImages);if(I.length){for(let ie in this.sourceCaches)this.sourceCaches[ie].reloadTilesForDependencies(["icons","patterns"],I);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let I in this.sourceCaches)this.sourceCaches[I].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(I,ie){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(I,!1),removedIds:ie})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(I,ie={}){var Te;this._checkLoaded();let Me=this.serialize();if(I=ie.transformStyle?ie.transformStyle(Me,I):I,((Te=ie.validate)===null||Te===void 0||Te)&&Cr(this,t.u(I)))return!1;(I=t.aB(I)).layers=t.az(I.layers);let ze=t.aC(Me,I),ht=this._getOperationsToPerform(ze);if(ht.unimplemented.length>0)throw new Error(`Unimplemented: ${ht.unimplemented.join(", ")}.`);if(ht.operations.length===0)return!1;for(let wt of ht.operations)wt();return this.stylesheet=I,this._serializedLayers=null,!0}_getOperationsToPerform(I){let ie=[],Te=[];for(let Me of I)switch(Me.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ie.push(()=>this.addLayer.apply(this,Me.args));break;case"removeLayer":ie.push(()=>this.removeLayer.apply(this,Me.args));break;case"setPaintProperty":ie.push(()=>this.setPaintProperty.apply(this,Me.args));break;case"setLayoutProperty":ie.push(()=>this.setLayoutProperty.apply(this,Me.args));break;case"setFilter":ie.push(()=>this.setFilter.apply(this,Me.args));break;case"addSource":ie.push(()=>this.addSource.apply(this,Me.args));break;case"removeSource":ie.push(()=>this.removeSource.apply(this,Me.args));break;case"setLayerZoomRange":ie.push(()=>this.setLayerZoomRange.apply(this,Me.args));break;case"setLight":ie.push(()=>this.setLight.apply(this,Me.args));break;case"setGeoJSONSourceData":ie.push(()=>this.setGeoJSONSourceData.apply(this,Me.args));break;case"setGlyphs":ie.push(()=>this.setGlyphs.apply(this,Me.args));break;case"setSprite":ie.push(()=>this.setSprite.apply(this,Me.args));break;case"setSky":ie.push(()=>this.setSky.apply(this,Me.args));break;case"setTerrain":ie.push(()=>this.map.setTerrain.apply(this,Me.args));break;case"setTransition":ie.push(()=>{});break;default:Te.push(Me.command)}return{operations:ie,unimplemented:Te}}addImage(I,ie){if(this.getImage(I))return this.fire(new t.j(new Error(`An image named "${I}" already exists.`)));this.imageManager.addImage(I,ie),this._afterImageUpdated(I)}updateImage(I,ie){this.imageManager.updateImage(I,ie)}getImage(I){return this.imageManager.getImage(I)}removeImage(I){if(!this.getImage(I))return this.fire(new t.j(new Error(`An image named "${I}" does not exist.`)));this.imageManager.removeImage(I),this._afterImageUpdated(I)}_afterImageUpdated(I){this._availableImages=this.imageManager.listImages(),this._changedImages[I]=!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(I,ie,Te={}){if(this._checkLoaded(),this.sourceCaches[I]!==void 0)throw new Error(`Source "${I}" already exists.`);if(!ie.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ie).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ie.type)>=0&&this._validate(t.u.source,`sources.${I}`,ie,null,Te))return;this.map&&this.map._collectResourceTiming&&(ie.collectResourceTiming=!0);let Me=this.sourceCaches[I]=new kt(I,ie,this.dispatcher);Me.style=this,Me.setEventedParent(this,()=>({isSourceLoaded:Me.loaded(),source:Me.serialize(),sourceId:I})),Me.onAdd(this.map),this._changed=!0}removeSource(I){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error("There is no source with this ID");for(let Te in this._layers)if(this._layers[Te].source===I)return this.fire(new t.j(new Error(`Source "${I}" cannot be removed while layer "${Te}" is using it.`)));let ie=this.sourceCaches[I];delete this.sourceCaches[I],delete this._updatedSources[I],ie.fire(new t.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:I})),ie.setEventedParent(null),ie.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(I,ie){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error(`There is no source with this ID=${I}`);let Te=this.sourceCaches[I].getSource();if(Te.type!=="geojson")throw new Error(`geojsonSource.type is ${Te.type}, which is !== 'geojson`);Te.setData(ie),this._changed=!0}getSource(I){return this.sourceCaches[I]&&this.sourceCaches[I].getSource()}addLayer(I,ie,Te={}){this._checkLoaded();let Me=I.id;if(this.getLayer(Me))return void this.fire(new t.j(new Error(`Layer "${Me}" already exists on this map.`)));let ze;if(I.type==="custom"){if(Cr(this,t.aD(I)))return;ze=t.aA(I)}else{if("source"in I&&typeof I.source=="object"&&(this.addSource(Me,I.source),I=t.aB(I),I=t.e(I,{source:Me})),this._validate(t.u.layer,`layers.${Me}`,I,{arrayIndex:-1},Te))return;ze=t.aA(I),this._validateLayer(ze),ze.setEventedParent(this,{layer:{id:Me}})}let ht=ie?this._order.indexOf(ie):this._order.length;if(ie&&ht===-1)this.fire(new t.j(new Error(`Cannot add layer "${Me}" before non-existing layer "${ie}".`)));else{if(this._order.splice(ht,0,Me),this._layerOrderChanged=!0,this._layers[Me]=ze,this._removedLayers[Me]&&ze.source&&ze.type!=="custom"){let wt=this._removedLayers[Me];delete this._removedLayers[Me],wt.type!==ze.type?this._updatedSources[ze.source]="clear":(this._updatedSources[ze.source]="reload",this.sourceCaches[ze.source].pause())}this._updateLayer(ze),ze.onAdd&&ze.onAdd(this.map)}}moveLayer(I,ie){if(this._checkLoaded(),this._changed=!0,!this._layers[I])return void this.fire(new t.j(new Error(`The layer '${I}' does not exist in the map's style and cannot be moved.`)));if(I===ie)return;let Te=this._order.indexOf(I);this._order.splice(Te,1);let Me=ie?this._order.indexOf(ie):this._order.length;ie&&Me===-1?this.fire(new t.j(new Error(`Cannot move layer "${I}" before non-existing layer "${ie}".`))):(this._order.splice(Me,0,I),this._layerOrderChanged=!0)}removeLayer(I){this._checkLoaded();let ie=this._layers[I];if(!ie)return void this.fire(new t.j(new Error(`Cannot remove non-existing layer "${I}".`)));ie.setEventedParent(null);let Te=this._order.indexOf(I);this._order.splice(Te,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[I]=ie,delete this._layers[I],this._serializedLayers&&delete this._serializedLayers[I],delete this._updatedLayers[I],delete this._updatedPaintProps[I],ie.onRemove&&ie.onRemove(this.map)}getLayer(I){return this._layers[I]}getLayersOrder(){return[...this._order]}hasLayer(I){return I in this._layers}setLayerZoomRange(I,ie,Te){this._checkLoaded();let Me=this.getLayer(I);Me?Me.minzoom===ie&&Me.maxzoom===Te||(ie!=null&&(Me.minzoom=ie),Te!=null&&(Me.maxzoom=Te),this._updateLayer(Me)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${I}".`)))}setFilter(I,ie,Te={}){this._checkLoaded();let Me=this.getLayer(I);if(Me){if(!t.aE(Me.filter,ie))return ie==null?(Me.filter=void 0,void this._updateLayer(Me)):void(this._validate(t.u.filter,`layers.${Me.id}.filter`,ie,null,Te)||(Me.filter=t.aB(ie),this._updateLayer(Me)))}else this.fire(new t.j(new Error(`Cannot filter non-existing layer "${I}".`)))}getFilter(I){return t.aB(this.getLayer(I).filter)}setLayoutProperty(I,ie,Te,Me={}){this._checkLoaded();let ze=this.getLayer(I);ze?t.aE(ze.getLayoutProperty(ie),Te)||(ze.setLayoutProperty(ie,Te,Me),this._updateLayer(ze)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getLayoutProperty(I,ie){let Te=this.getLayer(I);if(Te)return Te.getLayoutProperty(ie);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${I}".`)))}setPaintProperty(I,ie,Te,Me={}){this._checkLoaded();let ze=this.getLayer(I);ze?t.aE(ze.getPaintProperty(ie),Te)||(ze.setPaintProperty(ie,Te,Me)&&this._updateLayer(ze),this._changed=!0,this._updatedPaintProps[I]=!0,this._serializedLayers=null):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getPaintProperty(I,ie){return this.getLayer(I).getPaintProperty(ie)}setFeatureState(I,ie){this._checkLoaded();let Te=I.source,Me=I.sourceLayer,ze=this.sourceCaches[Te];if(ze===void 0)return void this.fire(new t.j(new Error(`The source '${Te}' does not exist in the map's style.`)));let ht=ze.getSource().type;ht==="geojson"&&Me?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ht!=="vector"||Me?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),ze.setFeatureState(Me,I.id,ie)):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(I,ie){this._checkLoaded();let Te=I.source,Me=this.sourceCaches[Te];if(Me===void 0)return void this.fire(new t.j(new Error(`The source '${Te}' does not exist in the map's style.`)));let ze=Me.getSource().type,ht=ze==="vector"?I.sourceLayer:void 0;ze!=="vector"||ht?ie&&typeof I.id!="string"&&typeof I.id!="number"?this.fire(new t.j(new Error("A feature id is required to remove its specific state property."))):Me.removeFeatureState(ht,I.id,ie):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(I){this._checkLoaded();let ie=I.source,Te=I.sourceLayer,Me=this.sourceCaches[ie];if(Me!==void 0)return Me.getSource().type!=="vector"||Te?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Me.getFeatureState(Te,I.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 '${ie}' 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 I=t.aF(this.sourceCaches,ze=>ze.serialize()),ie=this._serializeByIds(this._order,!0),Te=this.map.getTerrain()||void 0,Me=this.stylesheet;return t.aG({version:Me.version,name:Me.name,metadata:Me.metadata,light:Me.light,sky:Me.sky,center:Me.center,zoom:Me.zoom,bearing:Me.bearing,pitch:Me.pitch,sprite:Me.sprite,glyphs:Me.glyphs,transition:Me.transition,sources:I,layers:ie,terrain:Te},ze=>ze!==void 0)}_updateLayer(I){this._updatedLayers[I.id]=!0,I.source&&!this._updatedSources[I.source]&&this.sourceCaches[I.source].getSource().type!=="raster"&&(this._updatedSources[I.source]="reload",this.sourceCaches[I.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(I){let ie=ht=>this._layers[ht].type==="fill-extrusion",Te={},Me=[];for(let ht=this._order.length-1;ht>=0;ht--){let wt=this._order[ht];if(ie(wt)){Te[wt]=ht;for(let Ot of I){let $t=Ot[wt];if($t)for(let Tr of $t)Me.push(Tr)}}}Me.sort((ht,wt)=>wt.intersectionZ-ht.intersectionZ);let ze=[];for(let ht=this._order.length-1;ht>=0;ht--){let wt=this._order[ht];if(ie(wt))for(let Ot=Me.length-1;Ot>=0;Ot--){let $t=Me[Ot].feature;if(Te[$t.layer.id]{let jr=pt.featureSortOrder;if(jr){let Qr=jr.indexOf(yr.featureIndex);return jr.indexOf(Er.featureIndex)-Qr}return Er.featureIndex-yr.featureIndex});for(let yr of ur)Dt.push(yr)}}for(let pt in qe)qe[pt].forEach(Et=>{let bt=Et.feature,Dt=$t[wt[pt].source].getFeatureState(bt.layer["source-layer"],bt.id);bt.source=bt.layer.source,bt.layer["source-layer"]&&(bt.sourceLayer=bt.layer["source-layer"]),bt.state=Dt});return qe}(this._layers,ht,this.sourceCaches,I,ie,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(ze)}querySourceFeatures(I,ie){ie&&ie.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",ie.filter,null,ie);let Te=this.sourceCaches[I];return Te?function(Me,ze){let ht=Me.getRenderableIds().map($t=>Me.getTileByID($t)),wt=[],Ot={};for(let $t=0;$tKr.getTileByID(na)).sort((na,qe)=>qe.tileID.overscaledZ-na.tileID.overscaledZ||(na.tileID.isLessThan(qe.tileID)?-1:1))}let Sr=this.crossTileSymbolIndex.addLayer(Tr,Ot[Tr.source],I.center.lng);ht=ht||Sr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((ze=ze||this._layerOrderChanged||Te===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.now(),I.zoom))&&(this.pauseablePlacement=new rn(I,this.map.terrain,this._order,ze,ie,Te,Me,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ot),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(i.now()),wt=!0),ht&&this.pauseablePlacement.placement.setStale()),wt||ht)for(let $t of this._order){let Tr=this._layers[$t];Tr.type==="symbol"&&this.placement.updateLayerOpacities(Tr,Ot[Tr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(i.now())}_releaseSymbolFadeTiles(){for(let I in this.sourceCaches)this.sourceCaches[I].releaseSymbolFadeTiles()}getImages(I,ie){return t._(this,void 0,void 0,function*(){let Te=yield this.imageManager.getImages(ie.icons);this._updateTilesForChangedImages();let Me=this.sourceCaches[ie.source];return Me&&Me.setDependencies(ie.tileID.key,ie.type,ie.icons),Te})}getGlyphs(I,ie){return t._(this,void 0,void 0,function*(){let Te=yield this.glyphManager.getGlyphs(ie.stacks),Me=this.sourceCaches[ie.source];return Me&&Me.setDependencies(ie.tileID.key,ie.type,[""]),Te})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(I,ie={}){this._checkLoaded(),I&&this._validate(t.u.glyphs,"glyphs",I,null,ie)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=I,this.glyphManager.entries={},this.glyphManager.setURL(I))}addSprite(I,ie,Te={},Me){this._checkLoaded();let ze=[{id:I,url:ie}],ht=[...b(this.stylesheet.sprite),...ze];this._validate(t.u.sprite,"sprite",ht,null,Te)||(this.stylesheet.sprite=ht,this._loadSprite(ze,!0,Me))}removeSprite(I){this._checkLoaded();let ie=b(this.stylesheet.sprite);if(ie.find(Te=>Te.id===I)){if(this._spritesImagesIds[I])for(let Te of this._spritesImagesIds[I])this.imageManager.removeImage(Te),this._changedImages[Te]=!0;ie.splice(ie.findIndex(Te=>Te.id===I),1),this.stylesheet.sprite=ie.length>0?ie:void 0,delete this._spritesImagesIds[I],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 "${I}" doesn't exists on this map.`)))}getSprite(){return b(this.stylesheet.sprite)}setSprite(I,ie={},Te){this._checkLoaded(),I&&this._validate(t.u.sprite,"sprite",I,null,ie)||(this.stylesheet.sprite=I,I?this._loadSprite(I,!0,Te):(this._unloadSprite(),Te&&Te(null)))}}var Nr=t.Y([{name:"a_pos",type:"Int16",components:2}]);let Hr={prelude:gt(`#ifdef GL_ES +`)),F.push({type:"Feature",geometry:{type:"Point",coordinates:O.lonlat},properties:{symbol:D(N),angle:P(N),text:U}})}}return{type:"FeatureCollection",features:F}}function T(E,p){return _.isArrayOrTypedArray(E)?p?function(b){return v(E[b])?+E[b]:0}:function(b){return E[b]}:E?function(){return E}:l}function l(){return""}function x(E){return E[0]===S}function w(E,p){var b;if(_.isArrayOrTypedArray(E)&&_.isArrayOrTypedArray(p)){b=["step",["get","point_count"],E[0]];for(var d=1;d850?D+=" Black":u>750?D+=" Extra Bold":u>650?D+=" Bold":u>550?D+=" Semi Bold":u>450?D+=" Medium":u>350?D+=" Regular":u>250?D+=" Light":u>150?D+=" Extra Light":D+=" Thin"):g.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",u>750?D+=" Extrabold":u>650?D+=" Bold":u>550?D+=" Semibold":u>350?D+=" Regular":D+=" Light"):g.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",g[3]==="CJK"&&(D+=" CJK"),D+=u>500?" Bold":" Regular")),y&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),a(D)||(D=b);var P=D.split(", ");return P}}}),UV=He({"src/traces/scattermap/plot.js"(Z,q){"use strict";var v=sa(),_=NV(),S=b0().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:S+o+"-fill",line:S+o+"-line",circle:S+o+"-circle",symbol:S+o+"-symbol",cluster:S+o+"-cluster",clusterCount:S+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&&v.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,h=this.subplot.getMapLayers(),f=0;f=0;y--){var D=g[y];n.removeLayer(c.layerIds[D])}u||n.removeSource(c.sourceIds.circle)}function x(u){for(var g=M.nonCluster,y=0;y=0;y--){var D=g[y];n.removeLayer(c.layerIds[D]),u||n.removeSource(c.sourceIds[D])}}function A(u){m?l(u):w(u)}function E(u){f?T(u):x(u)}function p(){for(var u=f?M.cluster:M.nonCluster,g=0;g=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,h=new e(o,i.uid,n,s),f=_(o.gd,a),m=h.below=o.belowLookup["trace-"+i.uid],c,T,l;if(n)for(h.addSource("circle",f.circle,i.cluster),c=0;c=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=A*360,p=i-E;function b(N){var O=N.lonlat;if(O[0]===e||x&&T.indexOf(N.i+1)===-1)return 1/0;var L=_.modHalf(O[0],360),U=O[1],B=c.project([L,U]),W=B.x-f.c2p([p,U]),$=B.y-m.c2p([L,n]),ue=Math.max(3,N.mrc||0);return Math.max(Math.sqrt(W*W+$*$)-ue,1-3/ue)}if(v.getClosest(s,b,a),a.index!==!1){var d=s[a.index],u=d.lonlat,g=[_.modHalf(u[0],360)+E,u[1]],y=f.c2p(g),D=m.c2p(g),P=d.mrc||1;a.x0=y-P,a.x1=y+P,a.y0=D-P,a.y1=D+P;var z={};z[h.subplot]={_subplot:c};var F=h._module.formatLabels(d,h,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=S(h,d),a.extraText=o(h,d,s[0].t.labels),a.hovertemplate=h.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,h=s.split("+"),f=h.indexOf("all")!==-1,m=h.indexOf("lon")!==-1,c=h.indexOf("lat")!==-1,T=i.lonlat,l=[];function x(w){return w+"\xB0"}return f||m&&c?l.push("("+x(T[1])+", "+x(T[0])+")"):m?l.push(n.lon+x(T[0])):c&&l.push(n.lat+x(T[1])),(f||h.indexOf("text")!==-1)&&M(i,a,l),l.join("
")}q.exports={hoverPoints:r,getExtraText:o}}}),jV=He({"src/traces/scattermap/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_}}}),qV=He({"src/traces/scattermap/select.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=Gs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!_.hasMarkers(n))return[];if(t===!1)for(s=0;s1)return 1;for(var J=H,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-H;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(H,R){return this.sampleCurveY(this.solveCurveX(H,R))}};var h=r(n);let f,m;function c(){return f==null&&(f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),f}function T(){if(m==null&&(m=!1,c())){let R=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(R){for(let ve=0;ve<5*5;ve++){let Ee=4*ve;R.fillStyle=`rgb(${Ee},${Ee+1},${Ee+2})`,R.fillRect(ve%5,Math.floor(ve/5),1,1)}let J=R.getImageData(0,0,5,5).data;for(let ve=0;ve<5*5*4;ve++)if(ve%4!=3&&J[ve]!==ve){m=!0;break}}}return m||!1}function l(H,R,J,ve){let Ee=new h(H,R,J,ve);return Be=>Ee.solve(Be)}let x=l(.25,.1,.25,1);function w(H,R,J){return Math.min(J,Math.max(R,H))}function A(H,R,J){let ve=J-R,Ee=((H-R)%ve+ve)%ve+R;return Ee===R?J:Ee}function E(H,...R){for(let J of R)for(let ve in J)H[ve]=J[ve];return H}let p=1;function b(H,R,J){let ve={};for(let Ee in H)ve[Ee]=R.call(this,H[Ee],Ee,H);return ve}function d(H,R,J){let ve={};for(let Ee in H)R.call(this,H[Ee],Ee,H)&&(ve[Ee]=H[Ee]);return ve}function u(H){return Array.isArray(H)?H.map(u):typeof H=="object"&&H?b(H,u):H}let g={};function y(H){g[H]||(typeof console<"u"&&console.warn(H),g[H]=!0)}function D(H,R,J){return(J.y-H.y)*(R.x-H.x)>(R.y-H.y)*(J.x-H.x)}function P(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 N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(H,R,J,ve,Ee){return t(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Be=new VideoFrame(H,{timestamp:0});try{let Ge=Be?.format;if(!Ge||!Ge.startsWith("BGR")&&!Ge.startsWith("RGB"))throw new Error(`Unrecognized format ${Ge}`);let ct=Ge.startsWith("BGR"),At=new Uint8ClampedArray(ve*Ee*4);if(yield Be.copyTo(At,function(Nt,ar,Mr,zr,Wr){let ia=4*Math.max(-ar,0),fa=(Math.max(0,Mr)-Mr)*zr*4+ia,ja=4*zr,Ka=Math.max(0,ar),Wi=Math.max(0,Mr);return{rect:{x:Ka,y:Wi,width:Math.min(Nt.width,ar+zr)-Ka,height:Math.min(Nt.height,Mr+Wr)-Wi},layout:[{offset:fa,stride:ja}]}}(H,R,J,ve,Ee)),ct)for(let Nt=0;NtP(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,X=function(H,R){if(/:\/\//.test(H.url)&&!/^https?:|^file:/.test(H.url)){let ve=ue(H.url);if(ve)return ve(H,R);if(P(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,targetMapId:ce},R)}if(!(/^file:/.test(J=H.url)||/^file:/.test(Y())&&!/^\w+:/.test(J))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(ve,Ee){return t(this,void 0,void 0,function*(){let Be=new Request(ve.url,{method:ve.method||"GET",body:ve.body,credentials:ve.credentials,headers:ve.headers,cache:ve.cache,referrer:Y(),signal:Ee.signal});ve.type!=="json"||Be.headers.has("Accept")||Be.headers.set("Accept","application/json");let Ge=yield fetch(Be);if(!Ge.ok){let Nt=yield Ge.blob();throw new de(Ge.status,Ge.statusText,ve.url,Nt)}let ct;ct=ve.type==="arrayBuffer"||ve.type==="image"?Ge.arrayBuffer():ve.type==="json"?Ge.json():Ge.text();let At=yield ct;if(Ee.signal.aborted)throw W();return{data:At,cacheControl:Ge.headers.get("Cache-Control"),expires:Ge.headers.get("Expires")}})}(H,R);if(P(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,mustQueue:!0,targetMapId:ce},R)}var J;return function(ve,Ee){return new Promise((Be,Ge)=>{var ct;let At=new XMLHttpRequest;At.open(ve.method||"GET",ve.url,!0),ve.type!=="arrayBuffer"&&ve.type!=="image"||(At.responseType="arraybuffer");for(let Nt in ve.headers)At.setRequestHeader(Nt,ve.headers[Nt]);ve.type==="json"&&(At.responseType="text",!((ct=ve.headers)===null||ct===void 0)&&ct.Accept||At.setRequestHeader("Accept","application/json")),At.withCredentials=ve.credentials==="include",At.onerror=()=>{Ge(new Error(At.statusText))},At.onload=()=>{if(!Ee.signal.aborted)if((At.status>=200&&At.status<300||At.status===0)&&At.response!==null){let Nt=At.response;if(ve.type==="json")try{Nt=JSON.parse(At.response)}catch(ar){return void Ge(ar)}Be({data:Nt,cacheControl:At.getResponseHeader("Cache-Control"),expires:At.getResponseHeader("Expires")})}else{let Nt=new Blob([At.response],{type:At.getResponseHeader("Content-Type")});Ge(new de(At.status,At.statusText,ve.url,Nt))}},Ee.signal.addEventListener("abort",()=>{At.abort(),Ge(W())}),At.send(ve.body)})}(H,R)};function Q(H){if(!H||H.indexOf("://")<=0||H.indexOf("data:image/")===0||H.indexOf("blob:")===0)return!0;let R=new URL(H),J=window.location;return R.protocol===J.protocol&&R.host===J.host}function V(H,R,J){J[H]&&J[H].indexOf(R)!==-1||(J[H]=J[H]||[],J[H].push(R))}function le(H,R,J){if(J&&J[H]){let ve=J[H].indexOf(R);ve!==-1&&J[H].splice(ve,1)}}class ae{constructor(R,J={}){E(this,J),this.type=R}}class j extends ae{constructor(R,J={}){super("error",E({error:R},J))}}class ee{on(R,J){return this._listeners=this._listeners||{},V(R,J,this._listeners),this}off(R,J){return le(R,J,this._listeners),le(R,J,this._oneTimeListeners),this}once(R,J){return J?(this._oneTimeListeners=this._oneTimeListeners||{},V(R,J,this._oneTimeListeners),this):new Promise(ve=>this.once(R,ve))}fire(R,J){typeof R=="string"&&(R=new ae(R,J||{}));let ve=R.type;if(this.listens(ve)){R.target=this;let Ee=this._listeners&&this._listeners[ve]?this._listeners[ve].slice():[];for(let ct of Ee)ct.call(this,R);let Be=this._oneTimeListeners&&this._oneTimeListeners[ve]?this._oneTimeListeners[ve].slice():[];for(let ct of Be)le(ve,ct,this._oneTimeListeners),ct.call(this,R);let Ge=this._eventedParent;Ge&&(E(R,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ge.fire(R))}else R instanceof j&&console.error(R.error);return this}listens(R){return this._listeners&&this._listeners[R]&&this._listeners[R].length>0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)}setEventedParent(R,J){return this._eventedParent=R,this._eventedParentData=J,this}}var te={$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 pe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function we(H,R){let J={};for(let ve in H)ve!=="ref"&&(J[ve]=H[ve]);return pe.forEach(ve=>{ve in R&&(J[ve]=R[ve])}),J}function Se(H,R){if(Array.isArray(H)){if(!Array.isArray(R)||H.length!==R.length)return!1;for(let J=0;J`:H.itemType.kind==="value"?"array":`array<${R}>`}return H.kind}let Ae=[rt,Je,St,kt,Bt,qr,Vt,Fe(Ar),kr,Ur,_t];function Le(H,R){if(R.kind==="error")return null;if(H.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!Le(H.itemType,R.itemType))&&(typeof H.N!="number"||H.N===R.N))return null}else{if(H.kind===R.kind)return null;if(H.kind==="value"){for(let J of Ae)if(!Le(J,R))return null}}return`Expected ${Ye(H)} but found ${Ye(R)} instead.`}function We(H,R){return R.some(J=>J.kind===H.kind)}function Ke(H,R){return R.some(J=>J==="null"?H===null:J==="array"?Array.isArray(H):J==="object"?H&&!Array.isArray(H)&&typeof H=="object":J===typeof H)}function st(H,R){return H.kind==="array"&&R.kind==="array"?H.itemType.kind===R.itemType.kind&&typeof H.N=="number":H.kind===R.kind}let ot=.96422,Ut=.82521,Ct=4/29,Pt=6/29,jt=3*Pt*Pt,cr=Pt*Pt*Pt,or=Math.PI/180,nr=180/Math.PI;function Pr(H){return(H%=360)<0&&(H+=360),H}function _a([H,R,J,ve]){let Ee,Be,Ge=Ra((.2225045*(H=Fa(H))+.7168786*(R=Fa(R))+.0606169*(J=Fa(J)))/1);H===R&&R===J?Ee=Be=Ge:(Ee=Ra((.4360747*H+.3850649*R+.1430804*J)/ot),Be=Ra((.0139322*H+.0971045*R+.7141733*J)/Ut));let ct=116*Ge-16;return[ct<0?0:ct,500*(Ee-Ge),200*(Ge-Be),ve]}function Fa(H){return H<=.04045?H/12.92:Math.pow((H+.055)/1.055,2.4)}function Ra(H){return H>cr?Math.pow(H,1/3):H/jt+Ct}function qa([H,R,J,ve]){let Ee=(H+16)/116,Be=isNaN(R)?Ee:Ee+R/500,Ge=isNaN(J)?Ee:Ee-J/200;return Ee=1*Ca(Ee),Be=ot*Ca(Be),Ge=Ut*Ca(Ge),[Wa(3.1338561*Be-1.6168667*Ee-.4906146*Ge),Wa(-.9787684*Be+1.9161415*Ee+.033454*Ge),Wa(.0719453*Be-.2289914*Ee+1.4052427*Ge),ve]}function Wa(H){return(H=H<=.00304?12.92*H:1.055*Math.pow(H,1/2.4)-.055)<0?0:H>1?1:H}function Ca(H){return H>Pt?H*H*H:jt*(H-Ct)}function hi(H){return parseInt(H.padEnd(2,H),16)/255}function wi(H,R){return Yt(R?H/100:H,0,1)}function Yt(H,R,J){return Math.min(Math.max(R,H),J)}function Rt(H){return!H.some(Number.isNaN)}let Zt={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 Jt{constructor(R,J,ve,Ee=1,Be=!0){this.r=R,this.g=J,this.b=ve,this.a=Ee,Be||(this.r*=Ee,this.g*=Ee,this.b*=Ee,Ee||this.overwriteGetter("rgb",[R,J,ve,Ee]))}static parse(R){if(R instanceof Jt)return R;if(typeof R!="string")return;let J=function(ve){if((ve=ve.toLowerCase().trim())==="transparent")return[0,0,0,0];let Ee=Zt[ve];if(Ee){let[Ge,ct,At]=Ee;return[Ge/255,ct/255,At/255,1]}if(ve.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(ve)){let Ge=ve.length<6?1:2,ct=1;return[hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+=Ge)),hi(ve.slice(ct,ct+Ge)||"ff")]}if(ve.startsWith("rgb")){let Ge=ve.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Ge){let[ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi]=Ge,gi=[ar||" ",Wr||" ",ja].join("");if(gi===" "||gi===" /"||gi===",,"||gi===",,,"){let qi=[Nt,zr,fa].join(""),en=qi==="%%%"?100:qi===""?255:0;if(en){let jn=[Yt(+At/en,0,1),Yt(+Mr/en,0,1),Yt(+ia/en,0,1),Ka?wi(+Ka,Wi):1];if(Rt(jn))return jn}}return}}let Be=ve.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Be){let[Ge,ct,At,Nt,ar,Mr,zr,Wr,ia]=Be,fa=[At||" ",ar||" ",zr].join("");if(fa===" "||fa===" /"||fa===",,"||fa===",,,"){let ja=[+ct,Yt(+Nt,0,100),Yt(+Mr,0,100),Wr?wi(+Wr,ia):1];if(Rt(ja))return function([Ka,Wi,gi,qi]){function en(jn){let Lo=(jn+Ka/30)%12,xs=Wi*Math.min(gi,1-gi);return gi-xs*Math.max(-1,Math.min(Lo-3,9-Lo,1))}return Ka=Pr(Ka),Wi/=100,gi/=100,[en(0),en(8),en(4),qi]}(ja)}}}(R);return J?new Jt(...J,!1):void 0}get rgb(){let{r:R,g:J,b:ve,a:Ee}=this,Be=Ee||1/0;return this.overwriteGetter("rgb",[R/Be,J/Be,ve/Be,Ee])}get hcl(){return this.overwriteGetter("hcl",function(R){let[J,ve,Ee,Be]=_a(R),Ge=Math.sqrt(ve*ve+Ee*Ee);return[Math.round(1e4*Ge)?Pr(Math.atan2(Ee,ve)*nr):NaN,Ge,J,Be]}(this.rgb))}get lab(){return this.overwriteGetter("lab",_a(this.rgb))}overwriteGetter(R,J){return Object.defineProperty(this,R,{value:J}),J}toString(){let[R,J,ve,Ee]=this.rgb;return`rgba(${[R,J,ve].map(Be=>Math.round(255*Be)).join(",")},${Ee})`}}Jt.black=new Jt(0,0,0,1),Jt.white=new Jt(1,1,1,1),Jt.transparent=new Jt(0,0,0,0),Jt.red=new Jt(1,0,0,1);class Fr{constructor(R,J,ve){this.sensitivity=R?J?"variant":"case":J?"accent":"base",this.locale=ve,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(R,J){return this.collator.compare(R,J)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ta{constructor(R,J,ve,Ee,Be){this.text=R,this.image=J,this.scale=ve,this.fontStack=Ee,this.textColor=Be}}class ra{constructor(R){this.sections=R}static fromString(R){return new ra([new ta(R,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(R=>R.text.length!==0||R.image&&R.image.name.length!==0)}static factory(R){return R instanceof ra?R:ra.fromString(R)}toString(){return this.sections.length===0?"":this.sections.map(R=>R.text).join("")}}class ca{constructor(R){this.values=R.slice()}static parse(R){if(R instanceof ca)return R;if(typeof R=="number")return new ca([R,R,R,R]);if(Array.isArray(R)&&!(R.length<1||R.length>4)){for(let J of R)if(typeof J!="number")return;switch(R.length){case 1:R=[R[0],R[0],R[0],R[0]];break;case 2:R=[R[0],R[1],R[0],R[1]];break;case 3:R=[R[0],R[1],R[2],R[1]]}return new ca(R)}}toString(){return JSON.stringify(this.values)}}let Ba=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class $a{constructor(R){this.values=R.slice()}static parse(R){if(R instanceof $a)return R;if(Array.isArray(R)&&!(R.length<1)&&R.length%2==0){for(let J=0;J=0&&H<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof J=="number"&&J>=0&&J<=255?ve===void 0||typeof ve=="number"&&ve>=0&&ve<=1?null:`Invalid rgba value [${[H,R,J,ve].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof ve=="number"?[H,R,J,ve]:[H,R,J]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pi(H){if(H===null||typeof H=="string"||typeof H=="boolean"||typeof H=="number"||H instanceof Jt||H instanceof Fr||H instanceof ra||H instanceof ca||H instanceof $a||H instanceof Za)return!0;if(Array.isArray(H)){for(let R of H)if(!pi(R))return!1;return!0}if(typeof H=="object"){for(let R in H)if(!pi(H[R]))return!1;return!0}return!1}function Ia(H){if(H===null)return rt;if(typeof H=="string")return St;if(typeof H=="boolean")return kt;if(typeof H=="number")return Je;if(H instanceof Jt)return Bt;if(H instanceof Fr)return vr;if(H instanceof ra)return qr;if(H instanceof ca)return kr;if(H instanceof $a)return _t;if(H instanceof Za)return Ur;if(Array.isArray(H)){let R=H.length,J;for(let ve of H){let Ee=Ia(ve);if(J){if(J===Ee)continue;J=Ar;break}J=Ee}return Fe(J||Ar,R)}return Vt}function rn(H){let R=typeof H;return H===null?"":R==="string"||R==="number"||R==="boolean"?String(H):H instanceof Jt||H instanceof ra||H instanceof ca||H instanceof $a||H instanceof Za?H.toString():JSON.stringify(H)}class tn{constructor(R,J){this.type=R,this.value=J}static parse(R,J){if(R.length!==2)return J.error(`'literal' expression requires exactly one argument, but found ${R.length-1} instead.`);if(!pi(R[1]))return J.error("invalid value");let ve=R[1],Ee=Ia(ve),Be=J.expectedType;return Ee.kind!=="array"||Ee.N!==0||!Be||Be.kind!=="array"||typeof Be.N=="number"&&Be.N!==0||(Ee=Be),new tn(Ee,ve)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class cn{constructor(R){this.name="ExpressionEvaluationError",this.message=R}toJSON(){return this.message}}let xt={string:St,number:Je,boolean:kt,object:Vt};class ut{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve,Ee=1,Be=R[0];if(Be==="array"){let ct,At;if(R.length>2){let Nt=R[1];if(typeof Nt!="string"||!(Nt in xt)||Nt==="object")return J.error('The item type argument of "array" must be one of string, number, boolean',1);ct=xt[Nt],Ee++}else ct=Ar;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return J.error('The length argument to "array" must be a positive integer literal',2);At=R[2],Ee++}ve=Fe(ct,At)}else{if(!xt[Be])throw new Error(`Types doesn't contain name = ${Be}`);ve=xt[Be]}let Ge=[];for(;EeR.outputDefined())}}let Or={"to-boolean":kt,"to-color":Bt,"to-number":Je,"to-string":St};class Cr{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve=R[0];if(!Or[ve])throw new Error(`Can't parse ${ve} as it is not part of the known types`);if((ve==="to-boolean"||ve==="to-string")&&R.length!==2)return J.error("Expected one argument.");let Ee=Or[ve],Be=[];for(let Ge=1;Ge4?`Invalid rbga value ${JSON.stringify(J)}: expected an array containing either three or four numeric values.`:ri(J[0],J[1],J[2],J[3]),!ve))return new Jt(J[0]/255,J[1]/255,J[2]/255,J[3])}throw new cn(ve||`Could not parse color from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"padding":{let J;for(let ve of this.args){J=ve.evaluate(R);let Ee=ca.parse(J);if(Ee)return Ee}throw new cn(`Could not parse padding from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"variableAnchorOffsetCollection":{let J;for(let ve of this.args){J=ve.evaluate(R);let Ee=$a.parse(J);if(Ee)return Ee}throw new cn(`Could not parse variableAnchorOffsetCollection from value '${typeof J=="string"?J:JSON.stringify(J)}'`)}case"number":{let J=null;for(let ve of this.args){if(J=ve.evaluate(R),J===null)return 0;let Ee=Number(J);if(!isNaN(Ee))return Ee}throw new cn(`Could not convert ${JSON.stringify(J)} to number.`)}case"formatted":return ra.fromString(rn(this.args[0].evaluate(R)));case"resolvedImage":return Za.fromString(rn(this.args[0].evaluate(R)));default:return rn(this.args[0].evaluate(R))}}eachChild(R){this.args.forEach(R)}outputDefined(){return this.args.every(R=>R.outputDefined())}}let wr=["Unknown","Point","LineString","Polygon"];class Rr{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"?wr[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(R){let J=this._parseColorCache[R];return J||(J=this._parseColorCache[R]=Jt.parse(R)),J}}class Nr{constructor(R,J,ve=[],Ee,Be=new Ze,Ge=[]){this.registry=R,this.path=ve,this.key=ve.map(ct=>`[${ct}]`).join(""),this.scope=Be,this.errors=Ge,this.expectedType=Ee,this._isConstant=J}parse(R,J,ve,Ee,Be={}){return J?this.concat(J,ve,Ee)._parse(R,Be):this._parse(R,Be)}_parse(R,J){function ve(Ee,Be,Ge){return Ge==="assert"?new ut(Be,[Ee]):Ge==="coerce"?new Cr(Be,[Ee]):Ee}if(R!==null&&typeof R!="string"&&typeof R!="boolean"&&typeof R!="number"||(R=["literal",R]),Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Ee=R[0];if(typeof Ee!="string")return this.error(`Expression name must be a string, but found ${typeof Ee} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Be=this.registry[Ee];if(Be){let Ge=Be.parse(R,this);if(!Ge)return null;if(this.expectedType){let ct=this.expectedType,At=Ge.type;if(ct.kind!=="string"&&ct.kind!=="number"&&ct.kind!=="boolean"&&ct.kind!=="object"&&ct.kind!=="array"||At.kind!=="value")if(ct.kind!=="color"&&ct.kind!=="formatted"&&ct.kind!=="resolvedImage"||At.kind!=="value"&&At.kind!=="string")if(ct.kind!=="padding"||At.kind!=="value"&&At.kind!=="number"&&At.kind!=="array")if(ct.kind!=="variableAnchorOffsetCollection"||At.kind!=="value"&&At.kind!=="array"){if(this.checkSubtype(ct,At))return null}else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"coerce");else Ge=ve(Ge,ct,J.typeAnnotation||"assert")}if(!(Ge instanceof tn)&&Ge.type.kind!=="resolvedImage"&&this._isConstant(Ge)){let ct=new Rr;try{Ge=new tn(Ge.type,Ge.evaluate(ct))}catch(At){return this.error(At.message),null}}return Ge}return this.error(`Unknown expression "${Ee}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(R===void 0?"'undefined' value invalid. Use null instead.":typeof R=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof R} instead.`)}concat(R,J,ve){let Ee=typeof R=="number"?this.path.concat(R):this.path,Be=ve?this.scope.concat(ve):this.scope;return new Nr(this.registry,this._isConstant,Ee,J||null,Be,this.errors)}error(R,...J){let ve=`${this.key}${J.map(Ee=>`[${Ee}]`).join("")}`;this.errors.push(new Ce(ve,R))}checkSubtype(R,J){let ve=Le(R,J);return ve&&this.error(ve),ve}}class Hr{constructor(R,J){this.type=J.type,this.bindings=[].concat(R),this.result=J}evaluate(R){return this.result.evaluate(R)}eachChild(R){for(let J of this.bindings)R(J[1]);R(this.result)}static parse(R,J){if(R.length<4)return J.error(`Expected at least 3 arguments, but found ${R.length-1} instead.`);let ve=[];for(let Be=1;Be=ve.length)throw new cn(`Array index out of bounds: ${J} > ${ve.length-1}.`);if(J!==Math.floor(J))throw new cn(`Array index must be an integer, but found ${J} instead.`);return ve[J]}eachChild(R){R(this.index),R(this.input)}outputDefined(){return!1}}class mr{constructor(R,J){this.type=kt,this.needle=R,this.haystack=J}static parse(R,J){if(R.length!==3)return J.error(`Expected 2 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Ar);return ve&&Ee?We(ve.type,[kt,St,Je,rt,Ar])?new mr(ve,Ee):J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(ve.type)} instead`):null}evaluate(R){let J=this.needle.evaluate(R),ve=this.haystack.evaluate(R);if(!ve)return!1;if(!Ke(J,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ia(J))} instead.`);if(!Ke(ve,["string","array"]))throw new cn(`Expected second argument to be of type array or string, but found ${Ye(Ia(ve))} instead.`);return ve.indexOf(J)>=0}eachChild(R){R(this.needle),R(this.haystack)}outputDefined(){return!0}}class Ir{constructor(R,J,ve){this.type=Je,this.needle=R,this.haystack=J,this.fromIndex=ve}static parse(R,J){if(R.length<=2||R.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Ar);if(!ve||!Ee)return null;if(!We(ve.type,[kt,St,Je,rt,Ar]))return J.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(ve.type)} instead`);if(R.length===4){let Be=J.parse(R[3],3,Je);return Be?new Ir(ve,Ee,Be):null}return new Ir(ve,Ee)}evaluate(R){let J=this.needle.evaluate(R),ve=this.haystack.evaluate(R);if(!Ke(J,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ia(J))} instead.`);let Ee;if(this.fromIndex&&(Ee=this.fromIndex.evaluate(R)),Ke(ve,["string"])){let Be=ve.indexOf(J,Ee);return Be===-1?-1:[...ve.slice(0,Be)].length}if(Ke(ve,["array"]))return ve.indexOf(J,Ee);throw new cn(`Expected second argument to be of type array or string, but found ${Ye(Ia(ve))} instead.`)}eachChild(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)}outputDefined(){return!1}}class va{constructor(R,J,ve,Ee,Be,Ge){this.inputType=R,this.type=J,this.input=ve,this.cases=Ee,this.outputs=Be,this.otherwise=Ge}static parse(R,J){if(R.length<5)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if(R.length%2!=1)return J.error("Expected an even number of arguments.");let ve,Ee;J.expectedType&&J.expectedType.kind!=="value"&&(Ee=J.expectedType);let Be={},Ge=[];for(let Nt=2;NtNumber.MAX_SAFE_INTEGER)return zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ia=="number"&&Math.floor(ia)!==ia)return zr.error("Numeric branch labels must be integer values.");if(ve){if(zr.checkSubtype(ve,Ia(ia)))return null}else ve=Ia(ia);if(Be[String(ia)]!==void 0)return zr.error("Branch labels must be unique.");Be[String(ia)]=Ge.length}let Wr=J.parse(Mr,Nt,Ee);if(!Wr)return null;Ee=Ee||Wr.type,Ge.push(Wr)}let ct=J.parse(R[1],1,Ar);if(!ct)return null;let At=J.parse(R[R.length-1],R.length-1,Ee);return At?ct.type.kind!=="value"&&J.concat(1).checkSubtype(ve,ct.type)?null:new va(ve,Ee,ct,Be,Ge,At):null}evaluate(R){let J=this.input.evaluate(R);return(Ia(J)===this.inputType&&this.outputs[this.cases[J]]||this.otherwise).evaluate(R)}eachChild(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)}outputDefined(){return this.outputs.every(R=>R.outputDefined())&&this.otherwise.outputDefined()}}class Pa{constructor(R,J,ve){this.type=R,this.branches=J,this.otherwise=ve}static parse(R,J){if(R.length<4)return J.error(`Expected at least 3 arguments, but found only ${R.length-1}.`);if(R.length%2!=0)return J.error("Expected an odd number of arguments.");let ve;J.expectedType&&J.expectedType.kind!=="value"&&(ve=J.expectedType);let Ee=[];for(let Ge=1;GeJ.outputDefined())&&this.otherwise.outputDefined()}}class ga{constructor(R,J,ve,Ee){this.type=R,this.input=J,this.beginIndex=ve,this.endIndex=Ee}static parse(R,J){if(R.length<=2||R.length>=5)return J.error(`Expected 3 or 4 arguments, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1,Ar),Ee=J.parse(R[2],2,Je);if(!ve||!Ee)return null;if(!We(ve.type,[Fe(Ar),St,Ar]))return J.error(`Expected first argument to be of type array or string, but found ${Ye(ve.type)} instead`);if(R.length===4){let Be=J.parse(R[3],3,Je);return Be?new ga(ve.type,ve,Ee,Be):null}return new ga(ve.type,ve,Ee)}evaluate(R){let J=this.input.evaluate(R),ve=this.beginIndex.evaluate(R),Ee;if(this.endIndex&&(Ee=this.endIndex.evaluate(R)),Ke(J,["string"]))return[...J].slice(ve,Ee).join("");if(Ke(J,["array"]))return J.slice(ve,Ee);throw new cn(`Expected first argument to be of type array or string, but found ${Ye(Ia(J))} instead.`)}eachChild(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)}outputDefined(){return!1}}function la(H,R){let J=H.length-1,ve,Ee,Be=0,Ge=J,ct=0;for(;Be<=Ge;)if(ct=Math.floor((Be+Ge)/2),ve=H[ct],Ee=H[ct+1],ve<=R){if(ct===J||RR))throw new cn("Input is not a number.");Ge=ct-1}return 0}class ba{constructor(R,J,ve){this.type=R,this.input=J,this.labels=[],this.outputs=[];for(let[Ee,Be]of ve)this.labels.push(Ee),this.outputs.push(Be)}static parse(R,J){if(R.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if((R.length-1)%2!=0)return J.error("Expected an even number of arguments.");let ve=J.parse(R[1],1,Je);if(!ve)return null;let Ee=[],Be=null;J.expectedType&&J.expectedType.kind!=="value"&&(Be=J.expectedType);for(let Ge=1;Ge=ct)return J.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Nt);let Mr=J.parse(At,ar,Be);if(!Mr)return null;Be=Be||Mr.type,Ee.push([ct,Mr])}return new ba(Be,ve,Ee)}evaluate(R){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(R);let Ee=this.input.evaluate(R);if(Ee<=J[0])return ve[0].evaluate(R);let Be=J.length;return Ee>=J[Be-1]?ve[Be-1].evaluate(R):ve[la(J,Ee)].evaluate(R)}eachChild(R){R(this.input);for(let J of this.outputs)R(J)}outputDefined(){return this.outputs.every(R=>R.outputDefined())}}function Ai(H){return H&&H.__esModule&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H}var ki=Ki;function Ki(H,R,J,ve){this.cx=3*H,this.bx=3*(J-H)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*R,this.by=3*(ve-R)-this.cy,this.ay=1-this.cy-this.by,this.p1x=H,this.p1y=R,this.p2x=J,this.p2y=ve}Ki.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,R){if(R===void 0&&(R=1e-6),H<0)return 0;if(H>1)return 1;for(var J=H,ve=0;ve<8;ve++){var Ee=this.sampleCurveX(J)-H;if(Math.abs(Ee)Ee?Ge=J:ct=J,J=.5*(ct-Ge)+Ge;return J},solve:function(H,R){return this.sampleCurveY(this.solveCurveX(H,R))}};var En=Ai(ki);function Tn(H,R,J){return H+J*(R-H)}function On(H,R,J){return H.map((ve,Ee)=>Tn(ve,R[Ee],J))}let kn={number:Tn,color:function(H,R,J,ve="rgb"){switch(ve){case"rgb":{let[Ee,Be,Ge,ct]=On(H.rgb,R.rgb,J);return new Jt(Ee,Be,Ge,ct,!1)}case"hcl":{let[Ee,Be,Ge,ct]=H.hcl,[At,Nt,ar,Mr]=R.hcl,zr,Wr;if(isNaN(Ee)||isNaN(At))isNaN(Ee)?isNaN(At)?zr=NaN:(zr=At,Ge!==1&&Ge!==0||(Wr=Nt)):(zr=Ee,ar!==1&&ar!==0||(Wr=Be));else{let Wi=At-Ee;At>Ee&&Wi>180?Wi-=360:At180&&(Wi+=360),zr=Ee+J*Wi}let[ia,fa,ja,Ka]=function([Wi,gi,qi,en]){return Wi=isNaN(Wi)?0:Wi*or,qa([qi,Math.cos(Wi)*gi,Math.sin(Wi)*gi,en])}([zr,Wr??Tn(Be,Nt,J),Tn(Ge,ar,J),Tn(ct,Mr,J)]);return new Jt(ia,fa,ja,Ka,!1)}case"lab":{let[Ee,Be,Ge,ct]=qa(On(H.lab,R.lab,J));return new Jt(Ee,Be,Ge,ct,!1)}}},array:On,padding:function(H,R,J){return new ca(On(H.values,R.values,J))},variableAnchorOffsetCollection:function(H,R,J){let ve=H.values,Ee=R.values;if(ve.length!==Ee.length)throw new cn(`Cannot interpolate values of different length. from: ${H.toString()}, to: ${R.toString()}`);let Be=[];for(let Ge=0;Getypeof ar!="number"||ar<0||ar>1))return J.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Ee={name:"cubic-bezier",controlPoints:Nt}}}if(R.length-1<4)return J.error(`Expected at least 4 arguments, but found only ${R.length-1}.`);if((R.length-1)%2!=0)return J.error("Expected an even number of arguments.");if(Be=J.parse(Be,2,Je),!Be)return null;let ct=[],At=null;ve==="interpolate-hcl"||ve==="interpolate-lab"?At=Bt:J.expectedType&&J.expectedType.kind!=="value"&&(At=J.expectedType);for(let Nt=0;Nt=ar)return J.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',zr);let ia=J.parse(Mr,Wr,At);if(!ia)return null;At=At||ia.type,ct.push([ar,ia])}return st(At,Je)||st(At,Bt)||st(At,kr)||st(At,_t)||st(At,Fe(Je))?new ao(At,ve,Ee,Be,ct):J.error(`Type ${Ye(At)} is not interpolatable.`)}evaluate(R){let J=this.labels,ve=this.outputs;if(J.length===1)return ve[0].evaluate(R);let Ee=this.input.evaluate(R);if(Ee<=J[0])return ve[0].evaluate(R);let Be=J.length;if(Ee>=J[Be-1])return ve[Be-1].evaluate(R);let Ge=la(J,Ee),ct=ao.interpolationFactor(this.interpolation,Ee,J[Ge],J[Ge+1]),At=ve[Ge].evaluate(R),Nt=ve[Ge+1].evaluate(R);switch(this.operator){case"interpolate":return kn[this.type.kind](At,Nt,ct);case"interpolate-hcl":return kn.color(At,Nt,ct,"hcl");case"interpolate-lab":return kn.color(At,Nt,ct,"lab")}}eachChild(R){R(this.input);for(let J of this.outputs)R(J)}outputDefined(){return this.outputs.every(R=>R.outputDefined())}}function Co(H,R,J,ve){let Ee=ve-J,Be=H-J;return Ee===0?0:R===1?Be/Ee:(Math.pow(R,Be)-1)/(Math.pow(R,Ee)-1)}class bo{constructor(R,J){this.type=R,this.args=J}static parse(R,J){if(R.length<2)return J.error("Expectected at least one argument.");let ve=null,Ee=J.expectedType;Ee&&Ee.kind!=="value"&&(ve=Ee);let Be=[];for(let ct of R.slice(1)){let At=J.parse(ct,1+Be.length,ve,void 0,{typeAnnotation:"omit"});if(!At)return null;ve=ve||At.type,Be.push(At)}if(!ve)throw new Error("No output type");let Ge=Ee&&Be.some(ct=>Le(Ee,ct.type));return new bo(Ge?Ar:ve,Be)}evaluate(R){let J,ve=null,Ee=0;for(let Be of this.args)if(Ee++,ve=Be.evaluate(R),ve&&ve instanceof Za&&!ve.available&&(J||(J=ve.name),ve=null,Ee===this.args.length&&(ve=J)),ve!==null)break;return ve}eachChild(R){this.args.forEach(R)}outputDefined(){return this.args.every(R=>R.outputDefined())}}function zs(H,R){return H==="=="||H==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function Cn(H,R,J,ve){return ve.compare(R,J)===0}function wo(H,R,J){let ve=H!=="=="&&H!=="!=";return class t7{constructor(Be,Ge,ct){this.type=kt,this.lhs=Be,this.rhs=Ge,this.collator=ct,this.hasUntypedArgument=Be.type.kind==="value"||Ge.type.kind==="value"}static parse(Be,Ge){if(Be.length!==3&&Be.length!==4)return Ge.error("Expected two or three arguments.");let ct=Be[0],At=Ge.parse(Be[1],1,Ar);if(!At)return null;if(!zs(ct,At.type))return Ge.concat(1).error(`"${ct}" comparisons are not supported for type '${Ye(At.type)}'.`);let Nt=Ge.parse(Be[2],2,Ar);if(!Nt)return null;if(!zs(ct,Nt.type))return Ge.concat(2).error(`"${ct}" comparisons are not supported for type '${Ye(Nt.type)}'.`);if(At.type.kind!==Nt.type.kind&&At.type.kind!=="value"&&Nt.type.kind!=="value")return Ge.error(`Cannot compare types '${Ye(At.type)}' and '${Ye(Nt.type)}'.`);ve&&(At.type.kind==="value"&&Nt.type.kind!=="value"?At=new ut(Nt.type,[At]):At.type.kind!=="value"&&Nt.type.kind==="value"&&(Nt=new ut(At.type,[Nt])));let ar=null;if(Be.length===4){if(At.type.kind!=="string"&&Nt.type.kind!=="string"&&At.type.kind!=="value"&&Nt.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(ar=Ge.parse(Be[3],3,vr),!ar)return null}return new t7(At,Nt,ar)}evaluate(Be){let Ge=this.lhs.evaluate(Be),ct=this.rhs.evaluate(Be);if(ve&&this.hasUntypedArgument){let At=Ia(Ge),Nt=Ia(ct);if(At.kind!==Nt.kind||At.kind!=="string"&&At.kind!=="number")throw new cn(`Expected arguments for "${H}" to be (string, string) or (number, number), but found (${At.kind}, ${Nt.kind}) instead.`)}if(this.collator&&!ve&&this.hasUntypedArgument){let At=Ia(Ge),Nt=Ia(ct);if(At.kind!=="string"||Nt.kind!=="string")return R(Be,Ge,ct)}return this.collator?J(Be,Ge,ct,this.collator.evaluate(Be)):R(Be,Ge,ct)}eachChild(Be){Be(this.lhs),Be(this.rhs),this.collator&&Be(this.collator)}outputDefined(){return!0}}}let Zn=wo("==",function(H,R,J){return R===J},Cn),go=wo("!=",function(H,R,J){return R!==J},function(H,R,J,ve){return!Cn(0,R,J,ve)}),os=wo("<",function(H,R,J){return R",function(H,R,J){return R>J},function(H,R,J,ve){return ve.compare(R,J)>0}),jo=wo("<=",function(H,R,J){return R<=J},function(H,R,J,ve){return ve.compare(R,J)<=0}),Yn=wo(">=",function(H,R,J){return R>=J},function(H,R,J,ve){return ve.compare(R,J)>=0});class Gn{constructor(R,J,ve){this.type=vr,this.locale=ve,this.caseSensitive=R,this.diacriticSensitive=J}static parse(R,J){if(R.length!==2)return J.error("Expected one argument.");let ve=R[1];if(typeof ve!="object"||Array.isArray(ve))return J.error("Collator options argument must be an object.");let Ee=J.parse(ve["case-sensitive"]!==void 0&&ve["case-sensitive"],1,kt);if(!Ee)return null;let Be=J.parse(ve["diacritic-sensitive"]!==void 0&&ve["diacritic-sensitive"],1,kt);if(!Be)return null;let Ge=null;return ve.locale&&(Ge=J.parse(ve.locale,1,St),!Ge)?null:new Gn(Ee,Be,Ge)}evaluate(R){return new Fr(this.caseSensitive.evaluate(R),this.diacriticSensitive.evaluate(R),this.locale?this.locale.evaluate(R):null)}eachChild(R){R(this.caseSensitive),R(this.diacriticSensitive),this.locale&&R(this.locale)}outputDefined(){return!1}}class Hn{constructor(R,J,ve,Ee,Be){this.type=St,this.number=R,this.locale=J,this.currency=ve,this.minFractionDigits=Ee,this.maxFractionDigits=Be}static parse(R,J){if(R.length!==3)return J.error("Expected two arguments.");let ve=J.parse(R[1],1,Je);if(!ve)return null;let Ee=R[2];if(typeof Ee!="object"||Array.isArray(Ee))return J.error("NumberFormat options argument must be an object.");let Be=null;if(Ee.locale&&(Be=J.parse(Ee.locale,1,St),!Be))return null;let Ge=null;if(Ee.currency&&(Ge=J.parse(Ee.currency,1,St),!Ge))return null;let ct=null;if(Ee["min-fraction-digits"]&&(ct=J.parse(Ee["min-fraction-digits"],1,Je),!ct))return null;let At=null;return Ee["max-fraction-digits"]&&(At=J.parse(Ee["max-fraction-digits"],1,Je),!At)?null:new Hn(ve,Be,Ge,ct,At)}evaluate(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))}eachChild(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)}outputDefined(){return!1}}class ss{constructor(R){this.type=qr,this.sections=R}static parse(R,J){if(R.length<2)return J.error("Expected at least one argument.");let ve=R[1];if(!Array.isArray(ve)&&typeof ve=="object")return J.error("First argument must be an image or text section.");let Ee=[],Be=!1;for(let Ge=1;Ge<=R.length-1;++Ge){let ct=R[Ge];if(Be&&typeof ct=="object"&&!Array.isArray(ct)){Be=!1;let At=null;if(ct["font-scale"]&&(At=J.parse(ct["font-scale"],1,Je),!At))return null;let Nt=null;if(ct["text-font"]&&(Nt=J.parse(ct["text-font"],1,Fe(St)),!Nt))return null;let ar=null;if(ct["text-color"]&&(ar=J.parse(ct["text-color"],1,Bt),!ar))return null;let Mr=Ee[Ee.length-1];Mr.scale=At,Mr.font=Nt,Mr.textColor=ar}else{let At=J.parse(R[Ge],1,Ar);if(!At)return null;let Nt=At.type.kind;if(Nt!=="string"&&Nt!=="value"&&Nt!=="null"&&Nt!=="resolvedImage")return J.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Be=!0,Ee.push({content:At,scale:null,font:null,textColor:null})}}return new ss(Ee)}evaluate(R){return new ra(this.sections.map(J=>{let ve=J.content.evaluate(R);return Ia(ve)===Ur?new ta("",ve,null,null,null):new ta(rn(ve),null,J.scale?J.scale.evaluate(R):null,J.font?J.font.evaluate(R).join(","):null,J.textColor?J.textColor.evaluate(R):null)}))}eachChild(R){for(let J of this.sections)R(J.content),J.scale&&R(J.scale),J.font&&R(J.font),J.textColor&&R(J.textColor)}outputDefined(){return!1}}class _s{constructor(R){this.type=Ur,this.input=R}static parse(R,J){if(R.length!==2)return J.error("Expected two arguments.");let ve=J.parse(R[1],1,St);return ve?new _s(ve):J.error("No image name provided.")}evaluate(R){let J=this.input.evaluate(R),ve=Za.fromString(J);return ve&&R.availableImages&&(ve.available=R.availableImages.indexOf(J)>-1),ve}eachChild(R){R(this.input)}outputDefined(){return!1}}class ps{constructor(R){this.type=Je,this.input=R}static parse(R,J){if(R.length!==2)return J.error(`Expected 1 argument, but found ${R.length-1} instead.`);let ve=J.parse(R[1],1);return ve?ve.type.kind!=="array"&&ve.type.kind!=="string"&&ve.type.kind!=="value"?J.error(`Expected argument of type string or array, but found ${Ye(ve.type)} instead.`):new ps(ve):null}evaluate(R){let J=this.input.evaluate(R);if(typeof J=="string")return[...J].length;if(Array.isArray(J))return J.length;throw new cn(`Expected value to be of type string or array, but found ${Ye(Ia(J))} instead.`)}eachChild(R){R(this.input)}outputDefined(){return!1}}let Ko=8192;function Gi(H,R){let J=(180+H[0])/360,ve=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H[1]*Math.PI/360)))/360,Ee=Math.pow(2,R.z);return[Math.round(J*Ee*Ko),Math.round(ve*Ee*Ko)]}function Pn(H,R){let J=Math.pow(2,R.z);return[(Ee=(H[0]/Ko+R.x)/J,360*Ee-180),(ve=(H[1]/Ko+R.y)/J,360/Math.PI*Math.atan(Math.exp((180-360*ve)*Math.PI/180))-90)];var ve,Ee}function qs(H,R){H[0]=Math.min(H[0],R[0]),H[1]=Math.min(H[1],R[1]),H[2]=Math.max(H[2],R[0]),H[3]=Math.max(H[3],R[1])}function bs(H,R){return!(H[0]<=R[0]||H[2]>=R[2]||H[1]<=R[1]||H[3]>=R[3])}function lo(H,R,J){let ve=H[0]-R[0],Ee=H[1]-R[1],Be=H[0]-J[0],Ge=H[1]-J[1];return ve*Ge-Be*Ee==0&&ve*Be<=0&&Ee*Ge<=0}function Zo(H,R,J,ve){return(Ee=[ve[0]-J[0],ve[1]-J[1]])[0]*(Be=[R[0]-H[0],R[1]-H[1]])[1]-Ee[1]*Be[0]!=0&&!(!To(H,R,J,ve)||!To(J,ve,H,R));var Ee,Be}function ws(H,R,J){for(let ve of J)for(let Ee=0;Ee(Ee=H)[1]!=(Ge=ct[At+1])[1]>Ee[1]&&Ee[0]<(Ge[0]-Be[0])*(Ee[1]-Be[1])/(Ge[1]-Be[1])+Be[0]&&(ve=!ve)}var Ee,Be,Ge;return ve}function il(H,R){for(let J of R)if(Hs(H,J))return!0;return!1}function yn(H,R){for(let J of H)if(!Hs(J,R))return!1;for(let J=0;J0&&ct<0||Ge<0&&ct>0}function Ws(H,R,J){let ve=[];for(let Ee=0;EeJ[2]){let Ee=.5*ve,Be=H[0]-J[0]>Ee?-ve:J[0]-H[0]>Ee?ve:0;Be===0&&(Be=H[0]-J[2]>Ee?-ve:J[2]-H[0]>Ee?ve:0),H[0]+=Be}qs(R,H)}function Nl(H,R,J,ve){let Ee=Math.pow(2,ve.z)*Ko,Be=[ve.x*Ko,ve.y*Ko],Ge=[];for(let ct of H)for(let At of ct){let Nt=[At.x+Be[0],At.y+Be[1]];uo(Nt,R,J,Ee),Ge.push(Nt)}return Ge}function Ks(H,R,J,ve){let Ee=Math.pow(2,ve.z)*Ko,Be=[ve.x*Ko,ve.y*Ko],Ge=[];for(let At of H){let Nt=[];for(let ar of At){let Mr=[ar.x+Be[0],ar.y+Be[1]];qs(R,Mr),Nt.push(Mr)}Ge.push(Nt)}if(R[2]-R[0]<=Ee/2){(ct=R)[0]=ct[1]=1/0,ct[2]=ct[3]=-1/0;for(let At of Ge)for(let Nt of At)uo(Nt,R,J,Ee)}var ct;return Ge}class Ts{constructor(R,J){this.type=kt,this.geojson=R,this.geometries=J}static parse(R,J){if(R.length!==2)return J.error(`'within' expression requires exactly one argument, but found ${R.length-1} instead.`);if(pi(R[1])){let ve=R[1];if(ve.type==="FeatureCollection"){let Ee=[];for(let Be of ve.features){let{type:Ge,coordinates:ct}=Be.geometry;Ge==="Polygon"&&Ee.push(ct),Ge==="MultiPolygon"&&Ee.push(...ct)}if(Ee.length)return new Ts(ve,{type:"MultiPolygon",coordinates:Ee})}else if(ve.type==="Feature"){let Ee=ve.geometry.type;if(Ee==="Polygon"||Ee==="MultiPolygon")return new Ts(ve,ve.geometry)}else if(ve.type==="Polygon"||ve.type==="MultiPolygon")return new Ts(ve,ve)}return J.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.geometryType()==="Point")return function(J,ve){let Ee=[1/0,1/0,-1/0,-1/0],Be=[1/0,1/0,-1/0,-1/0],Ge=J.canonicalID();if(ve.type==="Polygon"){let ct=Ws(ve.coordinates,Be,Ge),At=Nl(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!Hs(Nt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=Ll(ve.coordinates,Be,Ge),At=Nl(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!il(Nt,ct))return!1}return!0}(R,this.geometries);if(R.geometryType()==="LineString")return function(J,ve){let Ee=[1/0,1/0,-1/0,-1/0],Be=[1/0,1/0,-1/0,-1/0],Ge=J.canonicalID();if(ve.type==="Polygon"){let ct=Ws(ve.coordinates,Be,Ge),At=Ks(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!yn(Nt,ct))return!1}if(ve.type==="MultiPolygon"){let ct=Ll(ve.coordinates,Be,Ge),At=Ks(J.geometry(),Ee,Be,Ge);if(!bs(Ee,Be))return!1;for(let Nt of At)if(!Po(Nt,ct))return!1}return!0}(R,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Ls=class{constructor(H=[],R=(J,ve)=>Jve?1:0){if(this.data=H,this.length=this.data.length,this.compare=R,this.length>0)for(let J=(this.length>>1)-1;J>=0;J--)this._down(J)}push(H){this.data.push(H),this._up(this.length++)}pop(){if(this.length===0)return;let H=this.data[0],R=this.data.pop();return--this.length>0&&(this.data[0]=R,this._down(0)),H}peek(){return this.data[0]}_up(H){let{data:R,compare:J}=this,ve=R[H];for(;H>0;){let Ee=H-1>>1,Be=R[Ee];if(J(ve,Be)>=0)break;R[H]=Be,H=Ee}R[H]=ve}_down(H){let{data:R,compare:J}=this,ve=this.length>>1,Ee=R[H];for(;H=0)break;R[H]=R[Be],H=Be}R[H]=Ee}};function Jo(H,R,J,ve,Ee){Es(H,R,J,ve||H.length-1,Ee||lu)}function Es(H,R,J,ve,Ee){for(;ve>J;){if(ve-J>600){var Be=ve-J+1,Ge=R-J+1,ct=Math.log(Be),At=.5*Math.exp(2*ct/3),Nt=.5*Math.sqrt(ct*At*(Be-At)/Be)*(Ge-Be/2<0?-1:1);Es(H,R,Math.max(J,Math.floor(R-Ge*At/Be+Nt)),Math.min(ve,Math.floor(R+(Be-Ge)*At/Be+Nt)),Ee)}var ar=H[R],Mr=J,zr=ve;for(Ul(H,J,R),Ee(H[ve],ar)>0&&Ul(H,J,ve);Mr0;)zr--}Ee(H[J],ar)===0?Ul(H,J,zr):Ul(H,++zr,ve),zr<=R&&(J=zr+1),R<=zr&&(ve=zr-1)}}function Ul(H,R,J){var ve=H[R];H[R]=H[J],H[J]=ve}function lu(H,R){return HR?1:0}function Tc(H,R){if(H.length<=1)return[H];let J=[],ve,Ee;for(let Be of H){let Ge=Sf(Be);Ge!==0&&(Be.area=Math.abs(Ge),Ee===void 0&&(Ee=Ge<0),Ee===Ge<0?(ve&&J.push(ve),ve=[Be]):ve.push(Be))}if(ve&&J.push(ve),R>1)for(let Be=0;Be1?(Nt=R[At+1][0],ar=R[At+1][1]):Wr>0&&(Nt+=Mr/this.kx*Wr,ar+=zr/this.ky*Wr)),Mr=this.wrap(J[0]-Nt)*this.kx,zr=(J[1]-ar)*this.ky;let ia=Mr*Mr+zr*zr;ia180;)R-=360;return R}}function uu(H,R){return R[0]-H[0]}function Pl(H){return H[1]-H[0]+1}function ic(H,R){return H[1]>=H[0]&&H[1]H[1])return[null,null];let J=Pl(H);if(R){if(J===2)return[H,null];let Ee=Math.floor(J/2);return[[H[0],H[0]+Ee],[H[0]+Ee,H[1]]]}if(J===1)return[H,null];let ve=Math.floor(J/2)-1;return[[H[0],H[0]+ve],[H[0]+ve+1,H[1]]]}function nl(H,R){if(!ic(R,H.length))return[1/0,1/0,-1/0,-1/0];let J=[1/0,1/0,-1/0,-1/0];for(let ve=R[0];ve<=R[1];++ve)qs(J,H[ve]);return J}function vl(H){let R=[1/0,1/0,-1/0,-1/0];for(let J of H)for(let ve of J)qs(R,ve);return R}function As(H){return H[0]!==-1/0&&H[1]!==-1/0&&H[2]!==1/0&&H[3]!==1/0}function Xs(H,R,J){if(!As(H)||!As(R))return NaN;let ve=0,Ee=0;return H[2]R[2]&&(ve=H[0]-R[2]),H[1]>R[3]&&(Ee=H[1]-R[3]),H[3]=ve)return ve;if(bs(Ee,Be)){if(bh(H,R))return 0}else if(bh(R,H))return 0;let Ge=1/0;for(let ct of H)for(let At=0,Nt=ct.length,ar=Nt-1;At0;){let At=Ge.pop();if(At[0]>=Be)continue;let Nt=At[1],ar=R?50:100;if(Pl(Nt)<=ar){if(!ic(Nt,H.length))return NaN;if(R){let Mr=us(H,Nt,J,ve);if(isNaN(Mr)||Mr===0)return Mr;Be=Math.min(Be,Mr)}else for(let Mr=Nt[0];Mr<=Nt[1];++Mr){let zr=xh(H[Mr],J,ve);if(Be=Math.min(Be,zr),Be===0)return 0}}else{let Mr=Ou(Nt,R);to(Ge,Be,ve,H,ct,Mr[0]),to(Ge,Be,ve,H,ct,Mr[1])}}return Be}function ql(H,R,J,ve,Ee,Be=1/0){let Ge=Math.min(Be,Ee.distance(H[0],J[0]));if(Ge===0)return Ge;let ct=new Ls([[0,[0,H.length-1],[0,J.length-1]]],uu);for(;ct.length>0;){let At=ct.pop();if(At[0]>=Ge)continue;let Nt=At[1],ar=At[2],Mr=R?50:100,zr=ve?50:100;if(Pl(Nt)<=Mr&&Pl(ar)<=zr){if(!ic(Nt,H.length)&&ic(ar,J.length))return NaN;let Wr;if(R&&ve)Wr=qu(H,Nt,J,ar,Ee),Ge=Math.min(Ge,Wr);else if(R&&!ve){let ia=H.slice(Nt[0],Nt[1]+1);for(let fa=ar[0];fa<=ar[1];++fa)if(Wr=nc(J[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else if(!R&&ve){let ia=J.slice(ar[0],ar[1]+1);for(let fa=Nt[0];fa<=Nt[1];++fa)if(Wr=nc(H[fa],ia,Ee),Ge=Math.min(Ge,Wr),Ge===0)return Ge}else Wr=fl(H,Nt,J,ar,Ee),Ge=Math.min(Ge,Wr)}else{let Wr=Ou(Nt,R),ia=Ou(ar,ve);Xc(ct,Ge,Ee,H,J,Wr[0],ia[0]),Xc(ct,Ge,Ee,H,J,Wr[0],ia[1]),Xc(ct,Ge,Ee,H,J,Wr[1],ia[0]),Xc(ct,Ge,Ee,H,J,Wr[1],ia[1])}}return Ge}function Mf(H){return H.type==="MultiPolygon"?H.coordinates.map(R=>({type:"Polygon",coordinates:R})):H.type==="MultiLineString"?H.coordinates.map(R=>({type:"LineString",coordinates:R})):H.type==="MultiPoint"?H.coordinates.map(R=>({type:"Point",coordinates:R})):[H]}class Ac{constructor(R,J){this.type=Je,this.geojson=R,this.geometries=J}static parse(R,J){if(R.length!==2)return J.error(`'distance' expression requires exactly one argument, but found ${R.length-1} instead.`);if(pi(R[1])){let ve=R[1];if(ve.type==="FeatureCollection")return new Ac(ve,ve.features.map(Ee=>Mf(Ee.geometry)).flat());if(ve.type==="Feature")return new Ac(ve,Mf(ve.geometry));if("type"in ve&&"coordinates"in ve)return new Ac(ve,Mf(ve))}return J.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(R){if(R.geometry()!=null&&R.canonicalID()!=null){if(R.geometryType()==="Point")return function(J,ve){let Ee=J.geometry(),Be=Ee.flat().map(At=>Pn([At.x,At.y],J.canonical));if(Ee.length===0)return NaN;let Ge=new Wc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,ql(Be,!1,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,ql(Be,!1,At.coordinates,!0,Ge,ct));break;case"Polygon":ct=Math.min(ct,Vu(Be,!1,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(R,this.geometries);if(R.geometryType()==="LineString")return function(J,ve){let Ee=J.geometry(),Be=Ee.flat().map(At=>Pn([At.x,At.y],J.canonical));if(Ee.length===0)return NaN;let Ge=new Wc(Be[0][1]),ct=1/0;for(let At of ve){switch(At.type){case"Point":ct=Math.min(ct,ql(Be,!0,[At.coordinates],!1,Ge,ct));break;case"LineString":ct=Math.min(ct,ql(Be,!0,At.coordinates,!0,Ge,ct));break;case"Polygon":ct=Math.min(ct,Vu(Be,!0,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(R,this.geometries);if(R.geometryType()==="Polygon")return function(J,ve){let Ee=J.geometry();if(Ee.length===0||Ee[0].length===0)return NaN;let Be=Tc(Ee,0).map(At=>At.map(Nt=>Nt.map(ar=>Pn([ar.x,ar.y],J.canonical)))),Ge=new Wc(Be[0][0][0][1]),ct=1/0;for(let At of ve)for(let Nt of Be){switch(At.type){case"Point":ct=Math.min(ct,Vu([At.coordinates],!1,Nt,Ge,ct));break;case"LineString":ct=Math.min(ct,Vu(At.coordinates,!0,Nt,Ge,ct));break;case"Polygon":ct=Math.min(ct,Ps(Nt,At.coordinates,Ge,ct))}if(ct===0)return ct}return ct}(R,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nf={"==":Zn,"!=":go,">":ys,"<":os,">=":Yn,"<=":jo,array:ut,at:Kt,boolean:ut,case:Pa,coalesce:bo,collator:Gn,format:ss,image:_s,in:mr,"index-of":Ir,interpolate:ao,"interpolate-hcl":ao,"interpolate-lab":ao,length:ps,let:Hr,literal:tn,match:va,number:ut,"number-format":Hn,object:ut,slice:ga,step:ba,string:ut,"to-boolean":Cr,"to-color":Cr,"to-number":Cr,"to-string":Cr,var:gt,within:Ts,distance:Ac};class Ql{constructor(R,J,ve,Ee){this.name=R,this.type=J,this._evaluate=ve,this.args=Ee}evaluate(R){return this._evaluate(R,this.args)}eachChild(R){this.args.forEach(R)}outputDefined(){return!1}static parse(R,J){let ve=R[0],Ee=Ql.definitions[ve];if(!Ee)return J.error(`Unknown expression "${ve}". If you wanted a literal array, use ["literal", [...]].`,0);let Be=Array.isArray(Ee)?Ee[0]:Ee.type,Ge=Array.isArray(Ee)?[[Ee[1],Ee[2]]]:Ee.overloads,ct=Ge.filter(([Nt])=>!Array.isArray(Nt)||Nt.length===R.length-1),At=null;for(let[Nt,ar]of ct){At=new Nr(J.registry,Bf,J.path,null,J.scope);let Mr=[],zr=!1;for(let Wr=1;Wr{return zr=Mr,Array.isArray(zr)?`(${zr.map(Ye).join(", ")})`:`(${Ye(zr.type)}...)`;var zr}).join(" | "),ar=[];for(let Mr=1;Mr{J=R?J&&Bf(ve):J&&ve instanceof tn}),!!J&&Nf(H)&&Ef(H,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nf(H){if(H instanceof Ql&&(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 Ts||H instanceof Ac)return!1;let R=!0;return H.eachChild(J=>{R&&!Nf(J)&&(R=!1)}),R}function Gu(H){if(H instanceof Ql&&H.name==="feature-state")return!1;let R=!0;return H.eachChild(J=>{R&&!Gu(J)&&(R=!1)}),R}function Ef(H,R){if(H instanceof Ql&&R.indexOf(H.name)>=0)return!1;let J=!0;return H.eachChild(ve=>{J&&!Ef(ve,R)&&(J=!1)}),J}function oc(H){return{result:"success",value:H}}function Zc(H){return{result:"error",value:H}}function eu(H){return H["property-type"]==="data-driven"||H["property-type"]==="cross-faded-data-driven"}function qc(H){return!!H.expression&&H.expression.parameters.indexOf("zoom")>-1}function Sc(H){return!!H.expression&&H.expression.interpolated}function Zs(H){return H instanceof Number?"number":H instanceof String?"string":H instanceof Boolean?"boolean":Array.isArray(H)?"array":H===null?"null":typeof H}function kf(H){return typeof H=="object"&&H!==null&&!Array.isArray(H)}function fh(H){return H}function Uf(H,R){let J=R.type==="color",ve=H.stops&&typeof H.stops[0][0]=="object",Ee=ve||!(ve||H.property!==void 0),Be=H.type||(Sc(R)?"exponential":"interval");if(J||R.type==="padding"){let ar=J?Jt.parse:ca.parse;(H=ne({},H)).stops&&(H.stops=H.stops.map(Mr=>[Mr[0],ar(Mr[1])])),H.default=ar(H.default?H.default:R.default)}if(H.colorSpace&&(Ge=H.colorSpace)!=="rgb"&&Ge!=="hcl"&&Ge!=="lab")throw new Error(`Unknown color space: "${H.colorSpace}"`);var Ge;let ct,At,Nt;if(Be==="exponential")ct=jf;else if(Be==="interval")ct=Cu;else if(Be==="categorical"){ct=$f,At=Object.create(null);for(let ar of H.stops)At[ar[0]]=ar[1];Nt=typeof H.stops[0][0]}else{if(Be!=="identity")throw new Error(`Unknown function type "${Be}"`);ct=ml}if(ve){let ar={},Mr=[];for(let ia=0;iaia[0]),evaluate:({zoom:ia},fa)=>jf({stops:zr,base:H.base},R,ia).evaluate(ia,fa)}}if(Ee){let ar=Be==="exponential"?{name:"exponential",base:H.base!==void 0?H.base:1}:null;return{kind:"camera",interpolationType:ar,interpolationFactor:ao.interpolationFactor.bind(void 0,ar),zoomStops:H.stops.map(Mr=>Mr[0]),evaluate:({zoom:Mr})=>ct(H,R,Mr,At,Nt)}}return{kind:"source",evaluate(ar,Mr){let zr=Mr&&Mr.properties?Mr.properties[H.property]:void 0;return zr===void 0?Yc(H.default,R.default):ct(H,R,zr,At,Nt)}}}function Yc(H,R,J){return H!==void 0?H:R!==void 0?R:J!==void 0?J:void 0}function $f(H,R,J,ve,Ee){return Yc(typeof J===Ee?ve[J]:void 0,H.default,R.default)}function Cu(H,R,J){if(Zs(J)!=="number")return Yc(H.default,R.default);let ve=H.stops.length;if(ve===1||J<=H.stops[0][0])return H.stops[0][1];if(J>=H.stops[ve-1][0])return H.stops[ve-1][1];let Ee=la(H.stops.map(Be=>Be[0]),J);return H.stops[Ee][1]}function jf(H,R,J){let ve=H.base!==void 0?H.base:1;if(Zs(J)!=="number")return Yc(H.default,R.default);let Ee=H.stops.length;if(Ee===1||J<=H.stops[0][0])return H.stops[0][1];if(J>=H.stops[Ee-1][0])return H.stops[Ee-1][1];let Be=la(H.stops.map(ar=>ar[0]),J),Ge=function(ar,Mr,zr,Wr){let ia=Wr-zr,fa=ar-zr;return ia===0?0:Mr===1?fa/ia:(Math.pow(Mr,fa)-1)/(Math.pow(Mr,ia)-1)}(J,ve,H.stops[Be][0],H.stops[Be+1][0]),ct=H.stops[Be][1],At=H.stops[Be+1][1],Nt=kn[R.type]||fh;return typeof ct.evaluate=="function"?{evaluate(...ar){let Mr=ct.evaluate.apply(void 0,ar),zr=At.evaluate.apply(void 0,ar);if(Mr!==void 0&&zr!==void 0)return Nt(Mr,zr,Ge,H.colorSpace)}}:Nt(ct,At,Ge,H.colorSpace)}function ml(H,R,J){switch(R.type){case"color":J=Jt.parse(J);break;case"formatted":J=ra.fromString(J.toString());break;case"resolvedImage":J=Za.fromString(J.toString());break;case"padding":J=ca.parse(J);break;default:Zs(J)===R.type||R.type==="enum"&&R.values[J]||(J=void 0)}return Yc(J,H.default,R.default)}Ql.register(nf,{error:[{kind:"error"},[St],(H,[R])=>{throw new cn(R.evaluate(H))}],typeof:[St,[Ar],(H,[R])=>Ye(Ia(R.evaluate(H)))],"to-rgba":[Fe(Je,4),[Bt],(H,[R])=>{let[J,ve,Ee,Be]=R.evaluate(H).rgb;return[255*J,255*ve,255*Ee,Be]}],rgb:[Bt,[Je,Je,Je],Jf],rgba:[Bt,[Je,Je,Je,Je],Jf],has:{type:kt,overloads:[[[St],(H,[R])=>Of(R.evaluate(H),H.properties())],[[St,Vt],(H,[R,J])=>Of(R.evaluate(H),J.evaluate(H))]]},get:{type:Ar,overloads:[[[St],(H,[R])=>of(R.evaluate(H),H.properties())],[[St,Vt],(H,[R,J])=>of(R.evaluate(H),J.evaluate(H))]]},"feature-state":[Ar,[St],(H,[R])=>of(R.evaluate(H),H.featureState||{})],properties:[Vt,[],H=>H.properties()],"geometry-type":[St,[],H=>H.geometryType()],id:[Ar,[],H=>H.id()],zoom:[Je,[],H=>H.globals.zoom],"heatmap-density":[Je,[],H=>H.globals.heatmapDensity||0],"line-progress":[Je,[],H=>H.globals.lineProgress||0],accumulated:[Ar,[],H=>H.globals.accumulated===void 0?null:H.globals.accumulated],"+":[Je,jc(Je),(H,R)=>{let J=0;for(let ve of R)J+=ve.evaluate(H);return J}],"*":[Je,jc(Je),(H,R)=>{let J=1;for(let ve of R)J*=ve.evaluate(H);return J}],"-":{type:Je,overloads:[[[Je,Je],(H,[R,J])=>R.evaluate(H)-J.evaluate(H)],[[Je],(H,[R])=>-R.evaluate(H)]]},"/":[Je,[Je,Je],(H,[R,J])=>R.evaluate(H)/J.evaluate(H)],"%":[Je,[Je,Je],(H,[R,J])=>R.evaluate(H)%J.evaluate(H)],ln2:[Je,[],()=>Math.LN2],pi:[Je,[],()=>Math.PI],e:[Je,[],()=>Math.E],"^":[Je,[Je,Je],(H,[R,J])=>Math.pow(R.evaluate(H),J.evaluate(H))],sqrt:[Je,[Je],(H,[R])=>Math.sqrt(R.evaluate(H))],log10:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))/Math.LN10],ln:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))],log2:[Je,[Je],(H,[R])=>Math.log(R.evaluate(H))/Math.LN2],sin:[Je,[Je],(H,[R])=>Math.sin(R.evaluate(H))],cos:[Je,[Je],(H,[R])=>Math.cos(R.evaluate(H))],tan:[Je,[Je],(H,[R])=>Math.tan(R.evaluate(H))],asin:[Je,[Je],(H,[R])=>Math.asin(R.evaluate(H))],acos:[Je,[Je],(H,[R])=>Math.acos(R.evaluate(H))],atan:[Je,[Je],(H,[R])=>Math.atan(R.evaluate(H))],min:[Je,jc(Je),(H,R)=>Math.min(...R.map(J=>J.evaluate(H)))],max:[Je,jc(Je),(H,R)=>Math.max(...R.map(J=>J.evaluate(H)))],abs:[Je,[Je],(H,[R])=>Math.abs(R.evaluate(H))],round:[Je,[Je],(H,[R])=>{let J=R.evaluate(H);return J<0?-Math.round(-J):Math.round(J)}],floor:[Je,[Je],(H,[R])=>Math.floor(R.evaluate(H))],ceil:[Je,[Je],(H,[R])=>Math.ceil(R.evaluate(H))],"filter-==":[kt,[St,Ar],(H,[R,J])=>H.properties()[R.value]===J.value],"filter-id-==":[kt,[Ar],(H,[R])=>H.id()===R.value],"filter-type-==":[kt,[St],(H,[R])=>H.geometryType()===R.value],"filter-<":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve>Ee}],"filter-id->":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J>ve}],"filter-<=":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve<=Ee}],"filter-id-<=":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J<=ve}],"filter->=":[kt,[St,Ar],(H,[R,J])=>{let ve=H.properties()[R.value],Ee=J.value;return typeof ve==typeof Ee&&ve>=Ee}],"filter-id->=":[kt,[Ar],(H,[R])=>{let J=H.id(),ve=R.value;return typeof J==typeof ve&&J>=ve}],"filter-has":[kt,[Ar],(H,[R])=>R.value in H.properties()],"filter-has-id":[kt,[],H=>H.id()!==null&&H.id()!==void 0],"filter-type-in":[kt,[Fe(St)],(H,[R])=>R.value.indexOf(H.geometryType())>=0],"filter-id-in":[kt,[Fe(Ar)],(H,[R])=>R.value.indexOf(H.id())>=0],"filter-in-small":[kt,[St,Fe(Ar)],(H,[R,J])=>J.value.indexOf(H.properties()[R.value])>=0],"filter-in-large":[kt,[St,Fe(Ar)],(H,[R,J])=>function(ve,Ee,Be,Ge){for(;Be<=Ge;){let ct=Be+Ge>>1;if(Ee[ct]===ve)return!0;Ee[ct]>ve?Ge=ct-1:Be=ct+1}return!1}(H.properties()[R.value],J.value,0,J.value.length-1)],all:{type:kt,overloads:[[[kt,kt],(H,[R,J])=>R.evaluate(H)&&J.evaluate(H)],[jc(kt),(H,R)=>{for(let J of R)if(!J.evaluate(H))return!1;return!0}]]},any:{type:kt,overloads:[[[kt,kt],(H,[R,J])=>R.evaluate(H)||J.evaluate(H)],[jc(kt),(H,R)=>{for(let J of R)if(J.evaluate(H))return!0;return!1}]]},"!":[kt,[kt],(H,[R])=>!R.evaluate(H)],"is-supported-script":[kt,[St],(H,[R])=>{let J=H.globals&&H.globals.isSupportedScript;return!J||J(R.evaluate(H))}],upcase:[St,[St],(H,[R])=>R.evaluate(H).toUpperCase()],downcase:[St,[St],(H,[R])=>R.evaluate(H).toLowerCase()],concat:[St,jc(Ar),(H,R)=>R.map(J=>rn(J.evaluate(H))).join("")],"resolved-locale":[St,[vr],(H,[R])=>R.evaluate(H).resolvedLocale()]});class Lu{constructor(R,J){var ve;this.expression=R,this._warningHistory={},this._evaluator=new Rr,this._defaultValue=J?(ve=J).type==="color"&&kf(ve.default)?new Jt(0,0,0,0):ve.type==="color"?Jt.parse(ve.default)||null:ve.type==="padding"?ca.parse(ve.default)||null:ve.type==="variableAnchorOffsetCollection"?$a.parse(ve.default)||null:ve.default===void 0?null:ve.default:null,this._enumValues=J&&J.type==="enum"?J.values:null}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._evaluator.globals=R,this._evaluator.feature=J,this._evaluator.featureState=ve,this._evaluator.canonical=Ee,this._evaluator.availableImages=Be||null,this._evaluator.formattedSection=Ge,this.expression.evaluate(this._evaluator)}evaluate(R,J,ve,Ee,Be,Ge){this._evaluator.globals=R,this._evaluator.feature=J||null,this._evaluator.featureState=ve||null,this._evaluator.canonical=Ee,this._evaluator.availableImages=Be||null,this._evaluator.formattedSection=Ge||null;try{let ct=this.expression.evaluate(this._evaluator);if(ct==null||typeof ct=="number"&&ct!=ct)return this._defaultValue;if(this._enumValues&&!(ct in this._enumValues))throw new cn(`Expected value to be one of ${Object.keys(this._enumValues).map(At=>JSON.stringify(At)).join(", ")}, but found ${JSON.stringify(ct)} instead.`);return ct}catch(ct){return this._warningHistory[ct.message]||(this._warningHistory[ct.message]=!0,typeof console<"u"&&console.warn(ct.message)),this._defaultValue}}}function Mc(H){return Array.isArray(H)&&H.length>0&&typeof H[0]=="string"&&H[0]in nf}function ol(H,R){let J=new Nr(nf,Bf,[],R?function(Ee){let Be={color:Bt,string:St,number:Je,enum:St,boolean:kt,formatted:qr,padding:kr,resolvedImage:Ur,variableAnchorOffsetCollection:_t};return Ee.type==="array"?Fe(Be[Ee.value]||Ar,Ee.length):Be[Ee.type]}(R):void 0),ve=J.parse(H,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return ve?oc(new Lu(ve,R)):Zc(J.errors)}class vc{constructor(R,J){this.kind=R,this._styleExpression=J,this.isStateDependent=R!=="constant"&&!Gu(J.expression)}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge)}evaluate(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(R,J,ve,Ee,Be,Ge)}}class yu{constructor(R,J,ve,Ee){this.kind=R,this.zoomStops=ve,this._styleExpression=J,this.isStateDependent=R!=="camera"&&!Gu(J.expression),this.interpolationType=Ee}evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluateWithoutErrorHandling(R,J,ve,Ee,Be,Ge)}evaluate(R,J,ve,Ee,Be,Ge){return this._styleExpression.evaluate(R,J,ve,Ee,Be,Ge)}interpolationFactor(R,J,ve){return this.interpolationType?ao.interpolationFactor(this.interpolationType,R,J,ve):0}}function Tu(H,R){let J=ol(H,R);if(J.result==="error")return J;let ve=J.value.expression,Ee=Nf(ve);if(!Ee&&!eu(R))return Zc([new Ce("","data expressions not supported")]);let Be=Ef(ve,["zoom"]);if(!Be&&!qc(R))return Zc([new Ce("","zoom expressions not supported")]);let Ge=qf(ve);return Ge||Be?Ge instanceof Ce?Zc([Ge]):Ge instanceof ao&&!Sc(R)?Zc([new Ce("",'"interpolate" expressions cannot be used with this property')]):oc(Ge?new yu(Ee?"camera":"composite",J.value,Ge.labels,Ge instanceof ao?Ge.interpolation:void 0):new vc(Ee?"constant":"source",J.value)):Zc([new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ml{constructor(R,J){this._parameters=R,this._specification=J,ne(this,Uf(this._parameters,this._specification))}static deserialize(R){return new Ml(R._parameters,R._specification)}static serialize(R){return{_parameters:R._parameters,_specification:R._specification}}}function qf(H){let R=null;if(H instanceof Hr)R=qf(H.result);else if(H instanceof bo){for(let J of H.args)if(R=qf(J),R)break}else(H instanceof ba||H instanceof ao)&&H.input instanceof Ql&&H.input.name==="zoom"&&(R=H);return R instanceof Ce||H.eachChild(J=>{let ve=qf(J);ve instanceof Ce?R=ve:!R&&ve?R=new Ce("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):R&&ve&&R!==ve&&(R=new Ce("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),R}function Qf(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 R of H.slice(1))if(!Qf(R)&&typeof R!="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 Ec(H){if(H==null)return{filter:()=>!0,needGeometry:!1};Qf(H)||(H=sf(H));let R=ol(H,Bu);if(R.result==="error")throw new Error(R.value.map(J=>`${J.key}: ${J.message}`).join(", "));return{filter:(J,ve,Ee)=>R.value.evaluate(J,ve,{},Ee),needGeometry:Lh(H)}}function mc(H,R){return HR?1:0}function Lh(H){if(!Array.isArray(H))return!1;if(H[0]==="within"||H[0]==="distance")return!0;for(let R=1;R"||R==="<="||R===">="?vf(H[1],H[2],R):R==="any"?(J=H.slice(1),["any"].concat(J.map(sf))):R==="all"?["all"].concat(H.slice(1).map(sf)):R==="none"?["all"].concat(H.slice(1).map(sf).map(iu)):R==="in"?Nu(H[1],H.slice(2)):R==="!in"?iu(Nu(H[1],H.slice(2))):R==="has"?lf(H[1]):R!=="!has"||iu(lf(H[1]));var J}function vf(H,R,J){switch(H){case"$type":return[`filter-type-${J}`,R];case"$id":return[`filter-id-${J}`,R];default:return[`filter-${J}`,H,R]}}function Nu(H,R){if(R.length===0)return!1;switch(H){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(J=>typeof J!=typeof R[0])?["filter-in-large",H,["literal",R.sort(mc)]]:["filter-in-small",H,["literal",R]]}}function lf(H){switch(H){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",H]}}function iu(H){return["!",H]}function Kc(H){let R=typeof H;if(R==="number"||R==="boolean"||R==="string"||H==null)return JSON.stringify(H);if(Array.isArray(H)){let Ee="[";for(let Be of H)Ee+=`${Kc(Be)},`;return`${Ee}]`}let J=Object.keys(H).sort(),ve="{";for(let Ee=0;Eeve.maximum?[new se(R,J,`${J} is greater than the maximum value ${ve.maximum}`)]:[]}function uf(H){let R=H.valueSpec,J=sl(H.value.type),ve,Ee,Be,Ge={},ct=J!=="categorical"&&H.value.property===void 0,At=!ct,Nt=Zs(H.value.stops)==="array"&&Zs(H.value.stops[0])==="array"&&Zs(H.value.stops[0][0])==="object",ar=Pu({key:H.key,value:H.value,valueSpec:H.styleSpec.function,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{stops:function(Wr){if(J==="identity")return[new se(Wr.key,Wr.value,'identity function may not have a "stops" property')];let ia=[],fa=Wr.value;return ia=ia.concat(Cf({key:Wr.key,value:fa,valueSpec:Wr.valueSpec,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,arrayElementValidator:Mr})),Zs(fa)==="array"&&fa.length===0&&ia.push(new se(Wr.key,fa,"array must have at least one stop")),ia},default:function(Wr){return Wr.validateSpec({key:Wr.key,value:Wr.value,valueSpec:R,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec})}}});return J==="identity"&&ct&&ar.push(new se(H.key,H.value,'missing required property "property"')),J==="identity"||H.value.stops||ar.push(new se(H.key,H.value,'missing required property "stops"')),J==="exponential"&&H.valueSpec.expression&&!Sc(H.valueSpec)&&ar.push(new se(H.key,H.value,"exponential functions not supported")),H.styleSpec.$version>=8&&(At&&!eu(H.valueSpec)?ar.push(new se(H.key,H.value,"property functions not supported")):ct&&!qc(H.valueSpec)&&ar.push(new se(H.key,H.value,"zoom functions not supported"))),J!=="categorical"&&!Nt||H.value.property!==void 0||ar.push(new se(H.key,H.value,'"property" property is required')),ar;function Mr(Wr){let ia=[],fa=Wr.value,ja=Wr.key;if(Zs(fa)!=="array")return[new se(ja,fa,`array expected, ${Zs(fa)} found`)];if(fa.length!==2)return[new se(ja,fa,`array length 2 expected, length ${fa.length} found`)];if(Nt){if(Zs(fa[0])!=="object")return[new se(ja,fa,`object expected, ${Zs(fa[0])} found`)];if(fa[0].zoom===void 0)return[new se(ja,fa,"object stop key must have zoom")];if(fa[0].value===void 0)return[new se(ja,fa,"object stop key must have value")];if(Be&&Be>sl(fa[0].zoom))return[new se(ja,fa[0].zoom,"stop zoom values must appear in ascending order")];sl(fa[0].zoom)!==Be&&(Be=sl(fa[0].zoom),Ee=void 0,Ge={}),ia=ia.concat(Pu({key:`${ja}[0]`,value:fa[0],valueSpec:{zoom:{}},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec,objectElementValidators:{zoom:hl,value:zr}}))}else ia=ia.concat(zr({key:`${ja}[0]`,value:fa[0],valueSpec:{},validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec},fa));return Mc(_u(fa[1]))?ia.concat([new se(`${ja}[1]`,fa[1],"expressions are not allowed in function stops.")]):ia.concat(Wr.validateSpec({key:`${ja}[1]`,value:fa[1],valueSpec:R,validateSpec:Wr.validateSpec,style:Wr.style,styleSpec:Wr.styleSpec}))}function zr(Wr,ia){let fa=Zs(Wr.value),ja=sl(Wr.value),Ka=Wr.value!==null?Wr.value:ia;if(ve){if(fa!==ve)return[new se(Wr.key,Ka,`${fa} stop domain type must match previous stop domain type ${ve}`)]}else ve=fa;if(fa!=="number"&&fa!=="string"&&fa!=="boolean")return[new se(Wr.key,Ka,"stop domain value must be a number, string, or boolean")];if(fa!=="number"&&J!=="categorical"){let Wi=`number expected, ${fa} found`;return eu(R)&&J===void 0&&(Wi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new se(Wr.key,Ka,Wi)]}return J!=="categorical"||fa!=="number"||isFinite(ja)&&Math.floor(ja)===ja?J!=="categorical"&&fa==="number"&&Ee!==void 0&&janew se(`${H.key}${ve.key}`,H.value,ve.message));let J=R.value.expression||R.value._styleExpression.expression;if(H.expressionContext==="property"&&H.propertyKey==="text-font"&&!J.outputDefined())return[new se(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(J))return[new se(H.key,H.value,'"feature-state" data expressions are not supported with layout properties.')];if(H.expressionContext==="filter"&&!Gu(J))return[new se(H.key,H.value,'"feature-state" data expressions are not supported with filters.')];if(H.expressionContext&&H.expressionContext.indexOf("cluster")===0){if(!Ef(J,["zoom","feature-state"]))return[new se(H.key,H.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(H.expressionContext==="cluster-initial"&&!Nf(J))return[new se(H.key,H.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hu(H){let R=H.key,J=H.value,ve=H.valueSpec,Ee=[];return Array.isArray(ve.values)?ve.values.indexOf(sl(J))===-1&&Ee.push(new se(R,J,`expected one of [${ve.values.join(", ")}], ${JSON.stringify(J)} found`)):Object.keys(ve.values).indexOf(sl(J))===-1&&Ee.push(new se(R,J,`expected one of [${Object.keys(ve.values).join(", ")}], ${JSON.stringify(J)} found`)),Ee}function gf(H){return Qf(_u(H.value))?kc(ne({},H,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(H)}function Wu(H){let R=H.value,J=H.key;if(Zs(R)!=="array")return[new se(J,R,`array expected, ${Zs(R)} found`)];let ve=H.styleSpec,Ee,Be=[];if(R.length<1)return[new se(J,R,"filter array must have at least 1 element")];switch(Be=Be.concat(Hu({key:`${J}[0]`,value:R[0],valueSpec:ve.filter_operator,style:H.style,styleSpec:H.styleSpec})),sl(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&sl(R[1])==="$type"&&Be.push(new se(J,R,`"$type" cannot be use with operator "${R[0]}"`));case"==":case"!=":R.length!==3&&Be.push(new se(J,R,`filter array for operator "${R[0]}" must have 3 elements`));case"in":case"!in":R.length>=2&&(Ee=Zs(R[1]),Ee!=="string"&&Be.push(new se(`${J}[1]`,R[1],`string expected, ${Ee} found`)));for(let Ge=2;Ge{Nt in J&&R.push(new se(ve,J[Nt],`"${Nt}" is prohibited for ref layers`))}),Ee.layers.forEach(Nt=>{sl(Nt.id)===ct&&(At=Nt)}),At?At.ref?R.push(new se(ve,J.ref,"ref cannot reference another ref layer")):Ge=sl(At.type):R.push(new se(ve,J.ref,`ref layer "${ct}" not found`))}else if(Ge!=="background")if(J.source){let At=Ee.sources&&Ee.sources[J.source],Nt=At&&sl(At.type);At?Nt==="vector"&&Ge==="raster"?R.push(new se(ve,J.source,`layer "${J.id}" requires a raster source`)):Nt!=="raster-dem"&&Ge==="hillshade"?R.push(new se(ve,J.source,`layer "${J.id}" requires a raster-dem source`)):Nt==="raster"&&Ge!=="raster"?R.push(new se(ve,J.source,`layer "${J.id}" requires a vector source`)):Nt!=="vector"||J["source-layer"]?Nt==="raster-dem"&&Ge!=="hillshade"?R.push(new se(ve,J.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ge!=="line"||!J.paint||!J.paint["line-gradient"]||Nt==="geojson"&&At.lineMetrics||R.push(new se(ve,J,`layer "${J.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):R.push(new se(ve,J,`layer "${J.id}" must specify a "source-layer"`)):R.push(new se(ve,J.source,`source "${J.source}" not found`))}else R.push(new se(ve,J,'missing required property "source"'));return R=R.concat(Pu({key:ve,value:J,valueSpec:Be.layer,style:H.style,styleSpec:H.styleSpec,validateSpec:H.validateSpec,objectElementValidators:{"*":()=>[],type:()=>H.validateSpec({key:`${ve}.type`,value:J.type,valueSpec:Be.layer.type,style:H.style,styleSpec:H.styleSpec,validateSpec:H.validateSpec,object:J,objectKey:"type"}),filter:gf,layout:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Nt=>nu(ne({layerType:Ge},Nt))}}),paint:At=>Pu({layer:J,key:At.key,value:At.value,style:At.style,styleSpec:At.styleSpec,validateSpec:At.validateSpec,objectElementValidators:{"*":Nt=>Lf(ne({layerType:Ge},Nt))}})}})),R}function Xu(H){let R=H.value,J=H.key,ve=Zs(R);return ve!=="string"?[new se(J,R,`string expected, ${ve} found`)]:[]}let Cc={promoteId:function({key:H,value:R}){if(Zs(R)==="string")return Xu({key:H,value:R});{let J=[];for(let ve in R)J.push(...Xu({key:`${H}.${ve}`,value:R[ve]}));return J}}};function gc(H){let R=H.value,J=H.key,ve=H.styleSpec,Ee=H.style,Be=H.validateSpec;if(!R.type)return[new se(J,R,'"type" is required')];let Ge=sl(R.type),ct;switch(Ge){case"vector":case"raster":return ct=Pu({key:J,value:R,valueSpec:ve[`source_${Ge.replace("-","_")}`],style:H.style,styleSpec:ve,objectElementValidators:Cc,validateSpec:Be}),ct;case"raster-dem":return ct=function(At){var Nt;let ar=(Nt=At.sourceName)!==null&&Nt!==void 0?Nt:"",Mr=At.value,zr=At.styleSpec,Wr=zr.source_raster_dem,ia=At.style,fa=[],ja=Zs(Mr);if(Mr===void 0)return fa;if(ja!=="object")return fa.push(new se("source_raster_dem",Mr,`object expected, ${ja} found`)),fa;let Ka=sl(Mr.encoding)==="custom",Wi=["redFactor","greenFactor","blueFactor","baseShift"],gi=At.value.encoding?`"${At.value.encoding}"`:"Default";for(let qi in Mr)!Ka&&Wi.includes(qi)?fa.push(new se(qi,Mr[qi],`In "${ar}": "${qi}" is only valid when "encoding" is set to "custom". ${gi} encoding found`)):Wr[qi]?fa=fa.concat(At.validateSpec({key:qi,value:Mr[qi],valueSpec:Wr[qi],validateSpec:At.validateSpec,style:ia,styleSpec:zr})):fa.push(new se(qi,Mr[qi],`unknown property "${qi}"`));return fa}({sourceName:J,value:R,style:H.style,styleSpec:ve,validateSpec:Be}),ct;case"geojson":if(ct=Pu({key:J,value:R,valueSpec:ve.source_geojson,style:Ee,styleSpec:ve,validateSpec:Be,objectElementValidators:Cc}),R.cluster)for(let At in R.clusterProperties){let[Nt,ar]=R.clusterProperties[At],Mr=typeof Nt=="string"?[Nt,["accumulated"],["get",At]]:Nt;ct.push(...kc({key:`${J}.${At}.map`,value:ar,validateSpec:Be,expressionContext:"cluster-map"})),ct.push(...kc({key:`${J}.${At}.reduce`,value:Mr,validateSpec:Be,expressionContext:"cluster-reduce"}))}return ct;case"video":return Pu({key:J,value:R,valueSpec:ve.source_video,style:Ee,validateSpec:Be,styleSpec:ve});case"image":return Pu({key:J,value:R,valueSpec:ve.source_image,style:Ee,validateSpec:Be,styleSpec:ve});case"canvas":return[new se(J,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Hu({key:`${J}.type`,value:R.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:Ee,validateSpec:Be,styleSpec:ve})}}function Vl(H){let R=H.value,J=H.styleSpec,ve=J.light,Ee=H.style,Be=[],Ge=Zs(R);if(R===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new se("light",R,`object expected, ${Ge} found`)]),Be;for(let ct in R){let At=ct.match(/^(.*)-transition$/);Be=Be.concat(At&&ve[At[1]]&&ve[At[1]].transition?H.validateSpec({key:ct,value:R[ct],valueSpec:J.transition,validateSpec:H.validateSpec,style:Ee,styleSpec:J}):ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],validateSpec:H.validateSpec,style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)])}return Be}function xu(H){let R=H.value,J=H.styleSpec,ve=J.sky,Ee=H.style,Be=Zs(R);if(R===void 0)return[];if(Be!=="object")return[new se("sky",R,`object expected, ${Be} found`)];let Ge=[];for(let ct in R)Ge=Ge.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Ge}function Lc(H){let R=H.value,J=H.styleSpec,ve=J.terrain,Ee=H.style,Be=[],Ge=Zs(R);if(R===void 0)return Be;if(Ge!=="object")return Be=Be.concat([new se("terrain",R,`object expected, ${Ge} found`)]),Be;for(let ct in R)Be=Be.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],validateSpec:H.validateSpec,style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Be}function $c(H){let R=[],J=H.value,ve=H.key;if(Array.isArray(J)){let Ee=[],Be=[];for(let Ge in J)J[Ge].id&&Ee.includes(J[Ge].id)&&R.push(new se(ve,J,`all the sprites' ids must be unique, but ${J[Ge].id} is duplicated`)),Ee.push(J[Ge].id),J[Ge].url&&Be.includes(J[Ge].url)&&R.push(new se(ve,J,`all the sprites' URLs must be unique, but ${J[Ge].url} is duplicated`)),Be.push(J[Ge].url),R=R.concat(Pu({key:`${ve}[${Ge}]`,value:J[Ge],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:H.validateSpec}));return R}return Xu({key:ve,value:J})}let sc={"*":()=>[],array:Cf,boolean:function(H){let R=H.value,J=H.key,ve=Zs(R);return ve!=="boolean"?[new se(J,R,`boolean expected, ${ve} found`)]:[]},number:hl,color:function(H){let R=H.key,J=H.value,ve=Zs(J);return ve!=="string"?[new se(R,J,`color expected, ${ve} found`)]:Jt.parse(String(J))?[]:[new se(R,J,`color expected, "${J}" found`)]},constants:mf,enum:Hu,filter:gf,function:uf,layer:Vf,object:Pu,source:gc,light:Vl,sky:xu,terrain:Lc,projection:function(H){let R=H.value,J=H.styleSpec,ve=J.projection,Ee=H.style,Be=Zs(R);if(R===void 0)return[];if(Be!=="object")return[new se("projection",R,`object expected, ${Be} found`)];let Ge=[];for(let ct in R)Ge=Ge.concat(ve[ct]?H.validateSpec({key:ct,value:R[ct],valueSpec:ve[ct],style:Ee,styleSpec:J}):[new se(ct,R[ct],`unknown property "${ct}"`)]);return Ge},string:Xu,formatted:function(H){return Xu(H).length===0?[]:kc(H)},resolvedImage:function(H){return Xu(H).length===0?[]:kc(H)},padding:function(H){let R=H.key,J=H.value;if(Zs(J)==="array"){if(J.length<1||J.length>4)return[new se(R,J,`padding requires 1 to 4 values; ${J.length} values found`)];let ve={type:"number"},Ee=[];for(let Be=0;Be[]}})),H.constants&&(J=J.concat(mf({key:"constants",value:H.constants,style:H,styleSpec:R,validateSpec:Pc}))),$r(J)}function aa(H){return function(R){return H(vs(So({},R),{validateSpec:Pc}))}}function $r(H){return[].concat(H).sort((R,J)=>R.line-J.line)}function ka(H){return function(...R){return $r(H.apply(this,R))}}xr.source=ka(aa(gc)),xr.sprite=ka(aa($c)),xr.glyphs=ka(aa(Qt)),xr.light=ka(aa(Vl)),xr.sky=ka(aa(xu)),xr.terrain=ka(aa(Lc)),xr.layer=ka(aa(Vf)),xr.filter=ka(aa(gf)),xr.paintProperty=ka(aa(Lf)),xr.layoutProperty=ka(aa(nu));let li=xr,Ci=li.light,Hi=li.sky,Qi=li.paintProperty,pn=li.layoutProperty;function Pi(H,R){let J=!1;if(R&&R.length)for(let ve of R)H.fire(new j(new Error(ve.message))),J=!0;return J}class Di{constructor(R,J,ve){let Ee=this.cells=[];if(R instanceof ArrayBuffer){this.arrayBuffer=R;let Ge=new Int32Array(this.arrayBuffer);R=Ge[0],this.d=(J=Ge[1])+2*(ve=Ge[2]);for(let At=0;At=Mr[ia+0]&&Ee>=Mr[ia+1])?(ct[Wr]=!0,Ge.push(ar[Wr])):ct[Wr]=!1}}}}_forEachCell(R,J,ve,Ee,Be,Ge,ct,At){let Nt=this._convertToCellCoord(R),ar=this._convertToCellCoord(J),Mr=this._convertToCellCoord(ve),zr=this._convertToCellCoord(Ee);for(let Wr=Nt;Wr<=Mr;Wr++)for(let ia=ar;ia<=zr;ia++){let fa=this.d*ia+Wr;if((!At||At(this._convertFromCellCoord(Wr),this._convertFromCellCoord(ia),this._convertFromCellCoord(Wr+1),this._convertFromCellCoord(ia+1)))&&Be.call(this,R,J,ve,Ee,fa,Ge,ct,At))return}}_convertFromCellCoord(R){return(R-this.padding)/this.scale}_convertToCellCoord(R){return Math.max(0,Math.min(this.d-1,Math.floor(R*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let R=this.cells,J=3+this.cells.length+1+1,ve=0;for(let Ge=0;Ge=0)continue;let Ge=H[Be];Ee[Be]=Ni[J].shallow.indexOf(Be)>=0?Ge:eo(Ge,R)}H instanceof Error&&(Ee.message=H.message)}if(Ee.$name)throw new Error("$name property is reserved for worker serialization logic.");return J!=="Object"&&(Ee.$name=J),Ee}function co(H){if(io(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 R=Qn(H)||"Object";if(!Ni[R])throw new Error(`can't deserialize unregistered class ${R}`);let{klass:J}=Ni[R];if(!J)throw new Error(`can't deserialize unregistered class ${R}`);if(J.deserialize)return J.deserialize(H);let ve=Object.create(J.prototype);for(let Ee of Object.keys(H)){if(Ee==="$name")continue;let Be=H[Ee];ve[Ee]=Ni[R].shallow.indexOf(Ee)>=0?Be:co(Be)}return ve}class An{constructor(){this.first=!0}update(R,J){let ve=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=ve,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=ve,!0):(this.lastFloorZoom>ve?(this.lastIntegerZoom=ve+1,this.lastIntegerZoomTime=J):this.lastFloorZoomH>=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 yo(H){for(let R of H)if(Ss(R.charCodeAt(0)))return!0;return!1}function Qo(H){for(let R of H)if(!Ns(R.charCodeAt(0)))return!1;return!0}function ks(H){let R=H.map(J=>{try{return new RegExp(`\\p{sc=${J}}`,"u").source}catch{return null}}).filter(J=>J);return new RegExp(R.join("|"),"u")}let rl=ks(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ns(H){return!rl.test(String.fromCodePoint(H))}let el=ks(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ss(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))||el.test(String.fromCodePoint(H)))))}function Fl(H){return!(Ss(H)||function(R){return!!(un["Latin-1 Supplement"](R)&&(R===167||R===169||R===174||R===177||R===188||R===189||R===190||R===215||R===247)||un["General Punctuation"](R)&&(R===8214||R===8224||R===8225||R===8240||R===8241||R===8251||R===8252||R===8258||R===8263||R===8264||R===8265||R===8273)||un["Letterlike Symbols"](R)||un["Number Forms"](R)||un["Miscellaneous Technical"](R)&&(R>=8960&&R<=8967||R>=8972&&R<=8991||R>=8996&&R<=9e3||R===9003||R>=9085&&R<=9114||R>=9150&&R<=9165||R===9167||R>=9169&&R<=9179||R>=9186&&R<=9215)||un["Control Pictures"](R)&&R!==9251||un["Optical Character Recognition"](R)||un["Enclosed Alphanumerics"](R)||un["Geometric Shapes"](R)||un["Miscellaneous Symbols"](R)&&!(R>=9754&&R<=9759)||un["Miscellaneous Symbols and Arrows"](R)&&(R>=11026&&R<=11055||R>=11088&&R<=11097||R>=11192&&R<=11243)||un["CJK Symbols and Punctuation"](R)||un.Katakana(R)||un["Private Use Area"](R)||un["CJK Compatibility Forms"](R)||un["Small Form Variants"](R)||un["Halfwidth and Fullwidth Forms"](R)||R===8734||R===8756||R===8757||R>=9984&&R<=10087||R>=10102&&R<=10131||R===65532||R===65533)}(H))}let yl=ks(["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 ll(H){return yl.test(String.fromCodePoint(H))}function Un(H,R){return!(!R&&ll(H)||H>=2304&&H<=3583||H>=3840&&H<=4255||un.Khmer(H))}function Ro(H){for(let R of H)if(ll(R.charCodeAt(0)))return!0;return!1}let Js=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 Fs{constructor(R,J){this.zoom=R,J?(this.now=J.now,this.fadeDuration=J.fadeDuration,this.zoomHistory=J.zoomHistory,this.transition=J.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new An,this.transition={})}isSupportedScript(R){return function(J,ve){for(let Ee of J)if(!Un(Ee.charCodeAt(0),ve))return!1;return!0}(R,Js.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let R=this.zoom,J=R-Math.floor(R),ve=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:J+(1-J)*ve}:{fromScale:.5,toScale:1,t:1-(1-ve)*J}}}class cu{constructor(R,J){this.property=R,this.value=J,this.expression=function(ve,Ee){if(kf(ve))return new Ml(ve,Ee);if(Mc(ve)){let Be=Tu(ve,Ee);if(Be.result==="error")throw new Error(Be.value.map(Ge=>`${Ge.key}: ${Ge.message}`).join(", "));return Be.value}{let Be=ve;return Ee.type==="color"&&typeof ve=="string"?Be=Jt.parse(ve):Ee.type!=="padding"||typeof ve!="number"&&!Array.isArray(ve)?Ee.type==="variableAnchorOffsetCollection"&&Array.isArray(ve)&&(Be=$a.parse(ve)):Be=ca.parse(ve),{kind:"constant",evaluate:()=>Be}}}(J===void 0?R.specification.default:J,R.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(R,J,ve){return this.property.possiblyEvaluate(this,R,J,ve)}}class Iu{constructor(R){this.property=R,this.value=new cu(R,void 0)}transitioned(R,J){return new Ic(this.property,this.value,J,E({},R.transition,this.transition),R.now)}untransitioned(){return new Ic(this.property,this.value,null,{},0)}}class Zu{constructor(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)}getValue(R){return u(this._values[R].value.value)}setValue(R,J){Object.prototype.hasOwnProperty.call(this._values,R)||(this._values[R]=new Iu(this._values[R].property)),this._values[R].value=new cu(this._values[R].property,J===null?void 0:u(J))}getTransition(R){return u(this._values[R].transition)}setTransition(R,J){Object.prototype.hasOwnProperty.call(this._values,R)||(this._values[R]=new Iu(this._values[R].property)),this._values[R].transition=u(J)||void 0}serialize(){let R={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(R[J]=ve);let Ee=this.getTransition(J);Ee!==void 0&&(R[`${J}-transition`]=Ee)}return R}transitioned(R,J){let ve=new bu(this._properties);for(let Ee of Object.keys(this._values))ve._values[Ee]=this._values[Ee].transitioned(R,J._values[Ee]);return ve}untransitioned(){let R=new bu(this._properties);for(let J of Object.keys(this._values))R._values[J]=this._values[J].untransitioned();return R}}class Ic{constructor(R,J,ve,Ee,Be){this.property=R,this.value=J,this.begin=Be+Ee.delay||0,this.end=this.begin+Ee.duration||0,R.specification.transition&&(Ee.delay||Ee.duration)&&(this.prior=ve)}possiblyEvaluate(R,J,ve){let Ee=R.now||0,Be=this.value.possiblyEvaluate(R,J,ve),Ge=this.prior;if(Ge){if(Ee>this.end)return this.prior=null,Be;if(this.value.isDataDriven())return this.prior=null,Be;if(Ee=1)return 1;let Nt=At*At,ar=Nt*At;return 4*(At<.5?ar:3*(At-Nt)+ar-.75)}(ct))}}return Be}}class bu{constructor(R){this._properties=R,this._values=Object.create(R.defaultTransitioningPropertyValues)}possiblyEvaluate(R,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(R,J,ve);return Ee}hasTransition(){for(let R of Object.keys(this._values))if(this._values[R].prior)return!0;return!1}}class Rc{constructor(R){this._properties=R,this._values=Object.create(R.defaultPropertyValues)}hasValue(R){return this._values[R].value!==void 0}getValue(R){return u(this._values[R].value)}setValue(R,J){this._values[R]=new cu(this._values[R].property,J===null?void 0:u(J))}serialize(){let R={};for(let J of Object.keys(this._values)){let ve=this.getValue(J);ve!==void 0&&(R[J]=ve)}return R}possiblyEvaluate(R,J,ve){let Ee=new yc(this._properties);for(let Be of Object.keys(this._values))Ee._values[Be]=this._values[Be].possiblyEvaluate(R,J,ve);return Ee}}class Au{constructor(R,J,ve){this.property=R,this.value=J,this.parameters=ve}isConstant(){return this.value.kind==="constant"}constantOr(R){return this.value.kind==="constant"?this.value.value:R}evaluate(R,J,ve,Ee){return this.property.evaluate(this.value,this.parameters,R,J,ve,Ee)}}class yc{constructor(R){this._properties=R,this._values=Object.create(R.defaultPossiblyEvaluatedValues)}get(R){return this._values[R]}}class fo{constructor(R){this.specification=R}possiblyEvaluate(R,J){if(R.isDataDriven())throw new Error("Value should not be data driven");return R.expression.evaluate(J)}interpolate(R,J,ve){let Ee=kn[this.specification.type];return Ee?Ee(R,J,ve):R}}class Fo{constructor(R,J){this.specification=R,this.overrides=J}possiblyEvaluate(R,J,ve,Ee){return new Au(this,R.expression.kind==="constant"||R.expression.kind==="camera"?{kind:"constant",value:R.expression.evaluate(J,null,{},ve,Ee)}:R.expression,J)}interpolate(R,J,ve){if(R.value.kind!=="constant"||J.value.kind!=="constant")return R;if(R.value.value===void 0||J.value.value===void 0)return new Au(this,{kind:"constant",value:void 0},R.parameters);let Ee=kn[this.specification.type];if(Ee){let Be=Ee(R.value.value,J.value.value,ve);return new Au(this,{kind:"constant",value:Be},R.parameters)}return R}evaluate(R,J,ve,Ee,Be,Ge){return R.kind==="constant"?R.value:R.evaluate(J,ve,Ee,Be,Ge)}}class Dc extends Fo{possiblyEvaluate(R,J,ve,Ee){if(R.value===void 0)return new Au(this,{kind:"constant",value:void 0},J);if(R.expression.kind==="constant"){let Be=R.expression.evaluate(J,null,{},ve,Ee),Ge=R.property.specification.type==="resolvedImage"&&typeof Be!="string"?Be.name:Be,ct=this._calculate(Ge,Ge,Ge,J);return new Au(this,{kind:"constant",value:ct},J)}if(R.expression.kind==="camera"){let Be=this._calculate(R.expression.evaluate({zoom:J.zoom-1}),R.expression.evaluate({zoom:J.zoom}),R.expression.evaluate({zoom:J.zoom+1}),J);return new Au(this,{kind:"constant",value:Be},J)}return new Au(this,R.expression,J)}evaluate(R,J,ve,Ee,Be,Ge){if(R.kind==="source"){let ct=R.evaluate(J,ve,Ee,Be,Ge);return this._calculate(ct,ct,ct,J)}return R.kind==="composite"?this._calculate(R.evaluate({zoom:Math.floor(J.zoom)-1},ve,Ee),R.evaluate({zoom:Math.floor(J.zoom)},ve,Ee),R.evaluate({zoom:Math.floor(J.zoom)+1},ve,Ee),J):R.value}_calculate(R,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:R,to:J}:{from:ve,to:J}}interpolate(R){return R}}class lc{constructor(R){this.specification=R}possiblyEvaluate(R,J,ve,Ee){if(R.value!==void 0){if(R.expression.kind==="constant"){let Be=R.expression.evaluate(J,null,{},ve,Ee);return this._calculate(Be,Be,Be,J)}return this._calculate(R.expression.evaluate(new Fs(Math.floor(J.zoom-1),J)),R.expression.evaluate(new Fs(Math.floor(J.zoom),J)),R.expression.evaluate(new Fs(Math.floor(J.zoom+1),J)),J)}}_calculate(R,J,ve,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:R,to:J}:{from:ve,to:J}}interpolate(R){return R}}class Yu{constructor(R){this.specification=R}possiblyEvaluate(R,J,ve,Ee){return!!R.expression.evaluate(J,null,{},ve,Ee)}interpolate(){return!1}}class Oe{constructor(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let J in R){let ve=R[J];ve.specification.overridable&&this.overridableProperties.push(J);let Ee=this.defaultPropertyValues[J]=new cu(ve,void 0),Be=this.defaultTransitionablePropertyValues[J]=new Iu(ve);this.defaultTransitioningPropertyValues[J]=Be.untransitioned(),this.defaultPossiblyEvaluatedValues[J]=Ee.possiblyEvaluate({})}}}mi("DataDrivenProperty",Fo),mi("DataConstantProperty",fo),mi("CrossFadedDataDrivenProperty",Dc),mi("CrossFadedProperty",lc),mi("ColorRampProperty",Yu);let I="-transition";class ie extends ee{constructor(R,J){if(super(),this.id=R.id,this.type=R.type,this._featureFilter={filter:()=>!0,needGeometry:!1},R.type!=="custom"&&(this.metadata=R.metadata,this.minzoom=R.minzoom,this.maxzoom=R.maxzoom,R.type!=="background"&&(this.source=R.source,this.sourceLayer=R["source-layer"],this.filter=R.filter),J.layout&&(this._unevaluatedLayout=new Rc(J.layout)),J.paint)){this._transitionablePaint=new Zu(J.paint);for(let ve in R.paint)this.setPaintProperty(ve,R.paint[ve],{validate:!1});for(let ve in R.layout)this.setLayoutProperty(ve,R.layout[ve],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(J.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(R){return R==="visibility"?this.visibility:this._unevaluatedLayout.getValue(R)}setLayoutProperty(R,J,ve={}){J!=null&&this._validate(pn,`layers.${this.id}.layout.${R}`,R,J,ve)||(R!=="visibility"?this._unevaluatedLayout.setValue(R,J):this.visibility=J)}getPaintProperty(R){return R.endsWith(I)?this._transitionablePaint.getTransition(R.slice(0,-11)):this._transitionablePaint.getValue(R)}setPaintProperty(R,J,ve={}){if(J!=null&&this._validate(Qi,`layers.${this.id}.paint.${R}`,R,J,ve))return!1;if(R.endsWith(I))return this._transitionablePaint.setTransition(R.slice(0,-11),J||void 0),!1;{let Ee=this._transitionablePaint._values[R],Be=Ee.property.specification["property-type"]==="cross-faded-data-driven",Ge=Ee.value.isDataDriven(),ct=Ee.value;this._transitionablePaint.setValue(R,J),this._handleSpecialPaintPropertyUpdate(R);let At=this._transitionablePaint._values[R].value;return At.isDataDriven()||Ge||Be||this._handleOverridablePaintPropertyUpdate(R,ct,At)}}_handleSpecialPaintPropertyUpdate(R){}_handleOverridablePaintPropertyUpdate(R,J,ve){return!1}isHidden(R){return!!(this.minzoom&&R=this.maxzoom)||this.visibility==="none"}updateTransitions(R){this._transitioningPaint=this._transitionablePaint.transitioned(R,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(R,J){R.getCrossfadeParameters&&(this._crossfadeParameters=R.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(R,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(R,void 0,J)}serialize(){let R={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&&(R.layout=R.layout||{},R.layout.visibility=this.visibility),d(R,(J,ve)=>!(J===void 0||ve==="layout"&&!Object.keys(J).length||ve==="paint"&&!Object.keys(J).length))}_validate(R,J,ve,Ee,Be={}){return(!Be||Be.validate!==!1)&&Pi(this,R.call(li,{key:J,layerType:this.type,objectKey:ve,value:Ee,styleSpec:te,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let R in this.paint._values){let J=this.paint.get(R);if(J instanceof Au&&eu(J.property.specification)&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1}}let Te={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Me{constructor(R,J){this._structArray=R,this._pos1=J*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ze{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(R,J){return R._trim(),J&&(R.isTransferred=!0,J.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}}static deserialize(R){let J=Object.create(this.prototype);return J.arrayBuffer=R.arrayBuffer,J.length=R.length,J.capacity=R.arrayBuffer.byteLength/J.bytesPerElement,J._refreshViews(),J}_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(R){this.reserve(R),this.length=R}reserve(R){if(R>this.capacity){this.capacity=Math.max(R,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let J=this.uint8;this._refreshViews(),J&&this.uint8.set(J)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ht(H,R=1){let J=0,ve=0;return{members:H.map(Ee=>{let Be=Te[Ee.type].BYTES_PER_ELEMENT,Ge=J=wt(J,Math.max(R,Be)),ct=Ee.components||1;return ve=Math.max(ve,Be),J+=Be*ct,{name:Ee.name,type:Ee.type,components:ct,offset:Ge}}),size:wt(J,Math.max(ve,R)),alignment:R}}function wt(H,R){return Math.ceil(H/R)*R}class Ot extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.int16[Ee+0]=J,this.int16[Ee+1]=ve,R}}Ot.prototype.bytesPerElement=4,mi("StructArrayLayout2i4",Ot);class $t extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.int16[Be+0]=J,this.int16[Be+1]=ve,this.int16[Be+2]=Ee,R}}$t.prototype.bytesPerElement=6,mi("StructArrayLayout3i6",$t);class Tr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,R,J,ve,Ee)}emplace(R,J,ve,Ee,Be){let Ge=4*R;return this.int16[Ge+0]=J,this.int16[Ge+1]=ve,this.int16[Ge+2]=Ee,this.int16[Ge+3]=Be,R}}Tr.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Tr);class Sr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=6*R;return this.int16[At+0]=J,this.int16[At+1]=ve,this.int16[At+2]=Ee,this.int16[At+3]=Be,this.int16[At+4]=Ge,this.int16[At+5]=ct,R}}Sr.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Sr);class Kr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=4*R,Nt=8*R;return this.int16[At+0]=J,this.int16[At+1]=ve,this.uint8[Nt+4]=Ee,this.uint8[Nt+5]=Be,this.uint8[Nt+6]=Ge,this.uint8[Nt+7]=ct,R}}Kr.prototype.bytesPerElement=8,mi("StructArrayLayout2i4ub8",Kr);class na extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.float32[Ee+0]=J,this.float32[Ee+1]=ve,R}}na.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",na);class qe extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=this.length;return this.resize(Mr+1),this.emplace(Mr,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr){let zr=10*R;return this.uint16[zr+0]=J,this.uint16[zr+1]=ve,this.uint16[zr+2]=Ee,this.uint16[zr+3]=Be,this.uint16[zr+4]=Ge,this.uint16[zr+5]=ct,this.uint16[zr+6]=At,this.uint16[zr+7]=Nt,this.uint16[zr+8]=ar,this.uint16[zr+9]=Mr,R}}qe.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",qe);class $e extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr){let Wr=this.length;return this.resize(Wr+1),this.emplace(Wr,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr){let ia=12*R;return this.int16[ia+0]=J,this.int16[ia+1]=ve,this.int16[ia+2]=Ee,this.int16[ia+3]=Be,this.uint16[ia+4]=Ge,this.uint16[ia+5]=ct,this.uint16[ia+6]=At,this.uint16[ia+7]=Nt,this.int16[ia+8]=ar,this.int16[ia+9]=Mr,this.int16[ia+10]=zr,this.int16[ia+11]=Wr,R}}$e.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",$e);class lt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.float32[Be+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,R}}lt.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",lt);class pt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.uint32[1*R+0]=J,R}}pt.prototype.bytesPerElement=4,mi("StructArrayLayout1ul4",pt);class Et extends ze{_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(R,J,ve,Ee,Be,Ge,ct,At,Nt){let ar=this.length;return this.resize(ar+1),this.emplace(ar,R,J,ve,Ee,Be,Ge,ct,At,Nt)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=10*R,zr=5*R;return this.int16[Mr+0]=J,this.int16[Mr+1]=ve,this.int16[Mr+2]=Ee,this.int16[Mr+3]=Be,this.int16[Mr+4]=Ge,this.int16[Mr+5]=ct,this.uint32[zr+3]=At,this.uint16[Mr+8]=Nt,this.uint16[Mr+9]=ar,R}}Et.prototype.bytesPerElement=20,mi("StructArrayLayout6i1ul2ui20",Et);class bt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=6*R;return this.int16[At+0]=J,this.int16[At+1]=ve,this.int16[At+2]=Ee,this.int16[At+3]=Be,this.int16[At+4]=Ge,this.int16[At+5]=ct,R}}bt.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",bt);class Dt extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,R,J,ve,Ee,Be)}emplace(R,J,ve,Ee,Be,Ge){let ct=4*R,At=8*R;return this.float32[ct+0]=J,this.float32[ct+1]=ve,this.float32[ct+2]=Ee,this.int16[At+6]=Be,this.int16[At+7]=Ge,R}}Dt.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",Dt);class ur extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee,Be,Ge){let ct=this.length;return this.resize(ct+1),this.emplace(ct,R,J,ve,Ee,Be,Ge)}emplace(R,J,ve,Ee,Be,Ge,ct){let At=16*R,Nt=4*R,ar=8*R;return this.uint8[At+0]=J,this.uint8[At+1]=ve,this.float32[Nt+1]=Ee,this.float32[Nt+2]=Be,this.int16[ar+6]=Ge,this.int16[ar+7]=ct,R}}ur.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",ur);class yr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.uint16[Be+0]=J,this.uint16[Be+1]=ve,this.uint16[Be+2]=Ee,R}}yr.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",yr);class Er extends ze{_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(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka){let Wi=this.length;return this.resize(Wi+1),this.emplace(Wi,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi){let gi=24*R,qi=12*R,en=48*R;return this.int16[gi+0]=J,this.int16[gi+1]=ve,this.uint16[gi+2]=Ee,this.uint16[gi+3]=Be,this.uint32[qi+2]=Ge,this.uint32[qi+3]=ct,this.uint32[qi+4]=At,this.uint16[gi+10]=Nt,this.uint16[gi+11]=ar,this.uint16[gi+12]=Mr,this.float32[qi+7]=zr,this.float32[qi+8]=Wr,this.uint8[en+36]=ia,this.uint8[en+37]=fa,this.uint8[en+38]=ja,this.uint32[qi+10]=Ka,this.int16[gi+22]=Wi,R}}Er.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Er);class jr extends ze{_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(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo){let Bo=this.length;return this.resize(Bo+1),this.emplace(Bo,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo)}emplace(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa,ja,Ka,Wi,gi,qi,en,jn,Lo,xs,vo,zn,is,qo,Bo){let xn=32*R,cs=16*R;return this.int16[xn+0]=J,this.int16[xn+1]=ve,this.int16[xn+2]=Ee,this.int16[xn+3]=Be,this.int16[xn+4]=Ge,this.int16[xn+5]=ct,this.int16[xn+6]=At,this.int16[xn+7]=Nt,this.uint16[xn+8]=ar,this.uint16[xn+9]=Mr,this.uint16[xn+10]=zr,this.uint16[xn+11]=Wr,this.uint16[xn+12]=ia,this.uint16[xn+13]=fa,this.uint16[xn+14]=ja,this.uint16[xn+15]=Ka,this.uint16[xn+16]=Wi,this.uint16[xn+17]=gi,this.uint16[xn+18]=qi,this.uint16[xn+19]=en,this.uint16[xn+20]=jn,this.uint16[xn+21]=Lo,this.uint16[xn+22]=xs,this.uint32[cs+12]=vo,this.float32[cs+13]=zn,this.float32[cs+14]=is,this.uint16[xn+30]=qo,this.uint16[xn+31]=Bo,R}}jr.prototype.bytesPerElement=64,mi("StructArrayLayout8i15ui1ul2f2ui64",jr);class Qr extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.float32[1*R+0]=J,R}}Qr.prototype.bytesPerElement=4,mi("StructArrayLayout1f4",Qr);class ha extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=3*R;return this.uint16[6*R+0]=J,this.float32[Be+1]=ve,this.float32[Be+2]=Ee,R}}ha.prototype.bytesPerElement=12,mi("StructArrayLayout1ui2f12",ha);class Aa extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J,ve){let Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,R,J,ve)}emplace(R,J,ve,Ee){let Be=4*R;return this.uint32[2*R+0]=J,this.uint16[Be+2]=ve,this.uint16[Be+3]=Ee,R}}Aa.prototype.bytesPerElement=8,mi("StructArrayLayout1ul2ui8",Aa);class Da extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R,J){let ve=this.length;return this.resize(ve+1),this.emplace(ve,R,J)}emplace(R,J,ve){let Ee=2*R;return this.uint16[Ee+0]=J,this.uint16[Ee+1]=ve,R}}Da.prototype.bytesPerElement=4,mi("StructArrayLayout2ui4",Da);class ci extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(R){let J=this.length;return this.resize(J+1),this.emplace(J,R)}emplace(R,J){return this.uint16[1*R+0]=J,R}}ci.prototype.bytesPerElement=2,mi("StructArrayLayout1ui2",ci);class Vi extends ze{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(R,J,ve,Ee){let Be=this.length;return this.resize(Be+1),this.emplace(Be,R,J,ve,Ee)}emplace(R,J,ve,Ee,Be){let Ge=4*R;return this.float32[Ge+0]=J,this.float32[Ge+1]=ve,this.float32[Ge+2]=Ee,this.float32[Ge+3]=Be,R}}Vi.prototype.bytesPerElement=16,mi("StructArrayLayout4f16",Vi);class ji extends Me{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)}}ji.prototype.size=20;class on extends Et{get(R){return new ji(this,R)}}mi("CollisionBoxArray",on);class Sn extends Me{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(R){this._structArray.uint8[this._pos1+37]=R}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(R){this._structArray.uint8[this._pos1+38]=R}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(R){this._structArray.uint32[this._pos4+10]=R}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Sn.prototype.size=48;class Kn extends Er{get(R){return new Sn(this,R)}}mi("PlacedSymbolArray",Kn);class Bn extends Me{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(R){this._structArray.uint32[this._pos4+12]=R}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 jr{get(R){return new Bn(this,R)}}mi("SymbolInstanceArray",Ao);class ls extends Qr{getoffsetX(R){return this.float32[1*R+0]}}mi("GlyphOffsetArray",ls);class Mo extends $t{getx(R){return this.int16[3*R+0]}gety(R){return this.int16[3*R+1]}gettileUnitDistanceFromAnchor(R){return this.int16[3*R+2]}}mi("SymbolLineVertexArray",Mo);class Yo extends Me{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]}}Yo.prototype.size=12;class ds extends ha{get(R){return new Yo(this,R)}}mi("TextAnchorOffsetArray",ds);class ul extends Me{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]}}ul.prototype.size=8;class tl extends Aa{get(R){return new ul(this,R)}}mi("FeatureIndexArray",tl);class es extends Ot{}class ts extends Ot{}class Il extends Ot{}class tu extends Sr{}class Ru extends Kr{}class vu extends na{}class wl extends qe{}class fu extends $e{}class uc extends lt{}class Gl extends pt{}class Hl extends bt{}class me extends ur{}class De extends yr{}class et extends Da{}let dt=ht([{name:"a_pos",components:2,type:"Int16"}],4),{members:yt}=dt;class Tt{constructor(R=[]){this.segments=R}prepareSegment(R,J,ve,Ee){let Be=this.segments[this.segments.length-1];return R>Tt.MAX_VERTEX_ARRAY_LENGTH&&y(`Max vertices per segment is ${Tt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${R}`),(!Be||Be.vertexLength+R>Tt.MAX_VERTEX_ARRAY_LENGTH||Be.sortKey!==Ee)&&(Be={vertexOffset:J.length,primitiveOffset:ve.length,vertexLength:0,primitiveLength:0},Ee!==void 0&&(Be.sortKey=Ee),this.segments.push(Be)),Be}get(){return this.segments}destroy(){for(let R of this.segments)for(let J in R.vaos)R.vaos[J].destroy()}static simpleSegment(R,J,ve,Ee){return new Tt([{vertexOffset:R,primitiveOffset:J,vertexLength:ve,primitiveLength:Ee,vaos:{},sortKey:0}])}}function tr(H,R){return 256*(H=w(Math.floor(H),0,255))+w(Math.floor(R),0,255)}Tt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mi("SegmentVector",Tt);let zt=ht([{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 _r={exports:{}},Gr={exports:{}};Gr.exports=function(H,R){var J,ve,Ee,Be,Ge,ct,At,Nt;for(ve=H.length-(J=3&H.length),Ee=R,Ge=3432918353,ct=461845907,Nt=0;Nt>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295)<<13|Ee>>>19))+((5*(Ee>>>16)&65535)<<16)&4294967295))+((58964+(Be>>>16)&65535)<<16);switch(At=0,J){case 3:At^=(255&H.charCodeAt(Nt+2))<<16;case 2:At^=(255&H.charCodeAt(Nt+1))<<8;case 1:Ee^=At=(65535&(At=(At=(65535&(At^=255&H.charCodeAt(Nt)))*Ge+(((At>>>16)*Ge&65535)<<16)&4294967295)<<15|At>>>17))*ct+(((At>>>16)*ct&65535)<<16)&4294967295}return Ee^=H.length,Ee=2246822507*(65535&(Ee^=Ee>>>16))+((2246822507*(Ee>>>16)&65535)<<16)&4294967295,Ee=3266489909*(65535&(Ee^=Ee>>>13))+((3266489909*(Ee>>>16)&65535)<<16)&4294967295,(Ee^=Ee>>>16)>>>0};var Xr=Gr.exports,wa={exports:{}};wa.exports=function(H,R){for(var J,ve=H.length,Ee=R^ve,Be=0;ve>=4;)J=1540483477*(65535&(J=255&H.charCodeAt(Be)|(255&H.charCodeAt(++Be))<<8|(255&H.charCodeAt(++Be))<<16|(255&H.charCodeAt(++Be))<<24))+((1540483477*(J>>>16)&65535)<<16),Ee=1540483477*(65535&Ee)+((1540483477*(Ee>>>16)&65535)<<16)^(J=1540483477*(65535&(J^=J>>>24))+((1540483477*(J>>>16)&65535)<<16)),ve-=4,++Be;switch(ve){case 3:Ee^=(255&H.charCodeAt(Be+2))<<16;case 2:Ee^=(255&H.charCodeAt(Be+1))<<8;case 1:Ee=1540483477*(65535&(Ee^=255&H.charCodeAt(Be)))+((1540483477*(Ee>>>16)&65535)<<16)}return Ee=1540483477*(65535&(Ee^=Ee>>>13))+((1540483477*(Ee>>>16)&65535)<<16),(Ee^=Ee>>>15)>>>0};var pa=Xr,Ja=wa.exports;_r.exports=pa,_r.exports.murmur3=pa,_r.exports.murmur2=Ja;var ti=r(_r.exports);class Sa{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(R,J,ve,Ee){this.ids.push(za(R)),this.positions.push(J,ve,Ee)}getPositions(R){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let J=za(R),ve=0,Ee=this.ids.length-1;for(;ve>1;this.ids[Ge]>=J?Ee=Ge:ve=Ge+1}let Be=[];for(;this.ids[ve]===J;)Be.push({index:this.positions[3*ve],start:this.positions[3*ve+1],end:this.positions[3*ve+2]}),ve++;return Be}static serialize(R,J){let ve=new Float64Array(R.ids),Ee=new Uint32Array(R.positions);return Xa(ve,Ee,0,ve.length-1),J&&J.push(ve.buffer,Ee.buffer),{ids:ve,positions:Ee}}static deserialize(R){let J=new Sa;return J.ids=R.ids,J.positions=R.positions,J.indexed=!0,J}}function za(H){let R=+H;return!isNaN(R)&&R<=Number.MAX_SAFE_INTEGER?R:ti(String(H))}function Xa(H,R,J,ve){for(;J>1],Be=J-1,Ge=ve+1;for(;;){do Be++;while(H[Be]Ee);if(Be>=Ge)break;fi(H,Be,Ge),fi(R,3*Be,3*Ge),fi(R,3*Be+1,3*Ge+1),fi(R,3*Be+2,3*Ge+2)}Ge-J`u_${Ee}`),this.type=ve}setUniform(R,J,ve){R.set(ve.constantOr(this.value))}getBinding(R,J,ve){return this.type==="color"?new an(R,J):new La(R,J)}}class ro{constructor(R,J){this.uniformNames=J.map(ve=>`u_${ve}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(R,J){this.pixelRatioFrom=J.pixelRatio,this.pixelRatioTo=R.pixelRatio,this.patternFrom=J.tlbr,this.patternTo=R.tlbr}setUniform(R,J,ve,Ee){let Be=Ee==="u_pattern_to"?this.patternTo:Ee==="u_pattern_from"?this.patternFrom:Ee==="u_pixel_ratio_to"?this.pixelRatioTo:Ee==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Be&&R.set(Be)}getBinding(R,J,ve){return ve.substr(0,9)==="u_pattern"?new sn(R,J):new La(R,J)}}class $o{constructor(R,J,ve,Ee){this.expression=R,this.type=ve,this.maxValue=0,this.paintVertexAttributes=J.map(Be=>({name:`a_${Be}`,type:"Float32",components:ve==="color"?2:1,offset:0})),this.paintVertexArray=new Ee}populatePaintArray(R,J,ve,Ee,Be){let Ge=this.paintVertexArray.length,ct=this.expression.evaluate(new Fs(0),J,{},Ee,[],Be);this.paintVertexArray.resize(R),this._setPaintValue(Ge,R,ct)}updatePaintArray(R,J,ve,Ee){let Be=this.expression.evaluate({zoom:0},ve,Ee);this._setPaintValue(R,J,Be)}_setPaintValue(R,J,ve){if(this.type==="color"){let Ee=In(ve);for(let Be=R;Be`u_${ct}_t`),this.type=ve,this.useIntegerZoom=Ee,this.zoom=Be,this.maxValue=0,this.paintVertexAttributes=J.map(ct=>({name:`a_${ct}`,type:"Float32",components:ve==="color"?4:2,offset:0})),this.paintVertexArray=new Ge}populatePaintArray(R,J,ve,Ee,Be){let Ge=this.expression.evaluate(new Fs(this.zoom),J,{},Ee,[],Be),ct=this.expression.evaluate(new Fs(this.zoom+1),J,{},Ee,[],Be),At=this.paintVertexArray.length;this.paintVertexArray.resize(R),this._setPaintValue(At,R,Ge,ct)}updatePaintArray(R,J,ve,Ee){let Be=this.expression.evaluate({zoom:this.zoom},ve,Ee),Ge=this.expression.evaluate({zoom:this.zoom+1},ve,Ee);this._setPaintValue(R,J,Be,Ge)}_setPaintValue(R,J,ve,Ee){if(this.type==="color"){let Be=In(ve),Ge=In(Ee);for(let ct=R;ct`#define HAS_UNIFORM_${Ee}`))}return R}getBinderAttributes(){let R=[];for(let J in this.binders){let ve=this.binders[J];if(ve instanceof $o||ve instanceof no)for(let Ee=0;Ee!0){this.programConfigurations={};for(let Ee of R)this.programConfigurations[Ee.id]=new cl(Ee,J,ve);this.needsUpload=!1,this._featureMap=new Sa,this._bufferOffset=0}populatePaintArrays(R,J,ve,Ee,Be,Ge){for(let ct in this.programConfigurations)this.programConfigurations[ct].populatePaintArrays(R,J,Ee,Be,Ge);J.id!==void 0&&this._featureMap.add(J.id,ve,this._bufferOffset,R),this._bufferOffset=R,this.needsUpload=!0}updatePaintArrays(R,J,ve,Ee){for(let Be of ve)this.needsUpload=this.programConfigurations[Be.id].updatePaintArrays(R,this._featureMap,J,Be,Ee)||this.needsUpload}get(R){return this.programConfigurations[R]}upload(R){if(this.needsUpload){for(let J in this.programConfigurations)this.programConfigurations[J].upload(R);this.needsUpload=!1}}destroy(){for(let R in this.programConfigurations)this.programConfigurations[R].destroy()}}function _l(H,R){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(`${R}-`,"").replace(/-/g,"_")]}function mn(H,R,J){let ve={color:{source:na,composite:Vi},number:{source:Qr,composite:na}},Ee=function(Be){return{"line-pattern":{source:wl,composite:wl},"fill-pattern":{source:wl,composite:wl},"fill-extrusion-pattern":{source:wl,composite:wl}}[Be]}(H);return Ee&&Ee[J]||ve[R][J]}mi("ConstantBinder",Jn),mi("CrossFadedConstantBinder",ro),mi("SourceExpressionBinder",$o),mi("CrossFadedCompositeBinder",Xo),mi("CompositeExpressionBinder",no),mi("ProgramConfiguration",cl,{omit:["_buffers"]}),mi("ProgramConfigurationSet",al);let po=8192,fs=Math.pow(2,14)-1,ms=-fs-1;function Tl(H){let R=po/H.extent,J=H.loadGeometry();for(let ve=0;veGe.x+1||AtGe.y+1)&&y("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return J}function Wl(H,R){return{type:H.type,id:H.id,properties:H.properties,geometry:R?Tl(H):[]}}function Su(H,R,J,ve,Ee){H.emplaceBack(2*R+(ve+1)/2,2*J+(Ee+1)/2)}class Rl{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new ts,this.indexArray=new De,this.segments=new Tt,this.programConfigurations=new al(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){let Ee=this.layers[0],Be=[],Ge=null,ct=!1;Ee.type==="circle"&&(Ge=Ee.layout.get("circle-sort-key"),ct=!Ge.isConstant());for(let{feature:At,id:Nt,index:ar,sourceLayerIndex:Mr}of R){let zr=this.layers[0]._featureFilter.needGeometry,Wr=Wl(At,zr);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),Wr,ve))continue;let ia=ct?Ge.evaluate(Wr,{},ve):void 0,fa={id:Nt,properties:At.properties,type:At.type,sourceLayerIndex:Mr,index:ar,geometry:zr?Wr.geometry:Tl(At),patterns:{},sortKey:ia};Be.push(fa)}ct&&Be.sort((At,Nt)=>At.sortKey-Nt.sortKey);for(let At of Be){let{geometry:Nt,index:ar,sourceLayerIndex:Mr}=At,zr=R[ar].feature;this.addFeature(At,Nt,ar,ve),J.featureIndex.insert(zr,Nt,ar,Mr,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,yt),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(R,J,ve,Ee){for(let Be of J)for(let Ge of Be){let ct=Ge.x,At=Ge.y;if(ct<0||ct>=po||At<0||At>=po)continue;let Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),ar=Nt.vertexLength;Su(this.layoutVertexArray,ct,At,-1,-1),Su(this.layoutVertexArray,ct,At,1,-1),Su(this.layoutVertexArray,ct,At,1,1),Su(this.layoutVertexArray,ct,At,-1,1),this.indexArray.emplaceBack(ar,ar+1,ar+2),this.indexArray.emplaceBack(ar,ar+3,ar+2),Nt.vertexLength+=4,Nt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ve,{},Ee)}}function _c(H,R){for(let J=0;J1){if(oa(H,R))return!0;for(let ve=0;ve1?J:J.sub(R)._mult(Ee)._add(R))}function Ya(H,R){let J,ve,Ee,Be=!1;for(let Ge=0;GeR.y!=Ee.y>R.y&&R.x<(Ee.x-ve.x)*(R.y-ve.y)/(Ee.y-ve.y)+ve.x&&(Be=!Be)}return Be}function bi(H,R){let J=!1;for(let ve=0,Ee=H.length-1;veR.y!=Ge.y>R.y&&R.x<(Ge.x-Be.x)*(R.y-Be.y)/(Ge.y-Be.y)+Be.x&&(J=!J)}return J}function yi(H,R,J){let ve=J[0],Ee=J[2];if(H.xEe.x&&R.x>Ee.x||H.yEe.y&&R.y>Ee.y)return!1;let Be=D(H,R,J[0]);return Be!==D(H,R,J[1])||Be!==D(H,R,J[2])||Be!==D(H,R,J[3])}function si(H,R,J){let ve=R.paint.get(H).value;return ve.kind==="constant"?ve.value:J.programConfigurations.get(R.id).getMaxValue(H)}function gn(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])}function zi(H,R,J,ve,Ee){if(!R[0]&&!R[1])return H;let Be=i.convert(R)._mult(Ee);J==="viewport"&&Be._rotate(-ve);let Ge=[];for(let ct=0;ctUa(ja,fa))}(Nt,At),Wr=Mr?ar*ct:ar;for(let ia of Ee)for(let fa of ia){let ja=Mr?fa:Ua(fa,At),Ka=Wr,Wi=hn([],[fa.x,fa.y,0,1],At);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ka*=Wi[3]/Ge.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ka*=Ge.cameraToCenterDistance/Wi[3]),it(zr,ja,Ka))return!0}return!1}}function Ua(H,R){let J=hn([],[H.x,H.y,0,1],R);return new i(J[0]/J[3],J[1]/J[3])}class Yi extends Rl{}let Ri;mi("HeatmapBucket",Yi,{omit:["layers"]});var Ti={get paint(){return Ri=Ri||new Oe({"heatmap-radius":new Fo(te.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Fo(te.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fo(te.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(te.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fo(te.paint_heatmap["heatmap-opacity"])})}};function xi(H,{width:R,height:J},ve,Ee){if(Ee){if(Ee instanceof Uint8ClampedArray)Ee=new Uint8Array(Ee.buffer);else if(Ee.length!==R*J*ve)throw new RangeError(`mismatched image size. expected: ${Ee.length} but got: ${R*J*ve}`)}else Ee=new Uint8Array(R*J*ve);return H.width=R,H.height=J,H.data=Ee,H}function Xi(H,{width:R,height:J},ve){if(R===H.width&&J===H.height)return;let Ee=xi({},{width:R,height:J},ve);vn(H,Ee,{x:0,y:0},{x:0,y:0},{width:Math.min(H.width,R),height:Math.min(H.height,J)},ve),H.width=R,H.height=J,H.data=Ee.data}function vn(H,R,J,ve,Ee,Be){if(Ee.width===0||Ee.height===0)return R;if(Ee.width>H.width||Ee.height>H.height||J.x>H.width-Ee.width||J.y>H.height-Ee.height)throw new RangeError("out of range source coordinates for image copy");if(Ee.width>R.width||Ee.height>R.height||ve.x>R.width-Ee.width||ve.y>R.height-Ee.height)throw new RangeError("out of range destination coordinates for image copy");let Ge=H.data,ct=R.data;if(Ge===ct)throw new Error("srcData equals dstData, so image is already copied");for(let At=0;At{R[H.evaluationKey]=At;let Nt=H.expression.evaluate(R);Ee.data[Ge+ct+0]=Math.floor(255*Nt.r/Nt.a),Ee.data[Ge+ct+1]=Math.floor(255*Nt.g/Nt.a),Ee.data[Ge+ct+2]=Math.floor(255*Nt.b/Nt.a),Ee.data[Ge+ct+3]=Math.floor(255*Nt.a)};if(H.clips)for(let Ge=0,ct=0;Ge80*J){ct=1/0,At=1/0;let ar=-1/0,Mr=-1/0;for(let zr=J;zrar&&(ar=Wr),ia>Mr&&(Mr=ia)}Nt=Math.max(ar-ct,Mr-At),Nt=Nt!==0?32767/Nt:0}return ru(Be,Ge,J,ct,At,Nt,0),Ge}function Al(H,R,J,ve,Ee){let Be;if(Ee===function(Ge,ct,At,Nt){let ar=0;for(let Mr=ct,zr=At-Nt;Mr0)for(let Ge=R;Ge=R;Ge-=ve)Be=pr(Ge/ve|0,H[Ge],H[Ge+1],Be);return Be&&ke(Be,Be.next)&&(mt(Be),Be=Be.next),Be}function El(H,R){if(!H)return H;R||(R=H);let J,ve=H;do if(J=!1,ve.steiner||!ke(ve,ve.next)&&Ue(ve.prev,ve,ve.next)!==0)ve=ve.next;else{if(mt(ve),ve=R=ve.prev,ve===ve.next)break;J=!0}while(J||ve!==R);return R}function ru(H,R,J,ve,Ee,Be,Ge){if(!H)return;!Ge&&Be&&function(At,Nt,ar,Mr){let zr=At;do zr.z===0&&(zr.z=K(zr.x,zr.y,Nt,ar,Mr)),zr.prevZ=zr.prev,zr.nextZ=zr.next,zr=zr.next;while(zr!==At);zr.prevZ.nextZ=null,zr.prevZ=null,function(Wr){let ia,fa=1;do{let ja,Ka=Wr;Wr=null;let Wi=null;for(ia=0;Ka;){ia++;let gi=Ka,qi=0;for(let jn=0;jn0||en>0&&gi;)qi!==0&&(en===0||!gi||Ka.z<=gi.z)?(ja=Ka,Ka=Ka.nextZ,qi--):(ja=gi,gi=gi.nextZ,en--),Wi?Wi.nextZ=ja:Wr=ja,ja.prevZ=Wi,Wi=ja;Ka=gi}Wi.nextZ=null,fa*=2}while(ia>1)}(zr)}(H,ve,Ee,Be);let ct=H;for(;H.prev!==H.next;){let At=H.prev,Nt=H.next;if(Be?pl(H,ve,Ee,Be):js(H))R.push(At.i,H.i,Nt.i),mt(H),H=Nt.next,ct=Nt.next;else if((H=Nt)===ct){Ge?Ge===1?ru(H=bl(El(H),R),R,J,ve,Ee,Be,2):Ge===2&&Xn(H,R,J,ve,Ee,Be):ru(El(H),R,J,ve,Ee,Be,1);break}}}function js(H){let R=H.prev,J=H,ve=H.next;if(Ue(R,J,ve)>=0)return!1;let Ee=R.x,Be=J.x,Ge=ve.x,ct=R.y,At=J.y,Nt=ve.y,ar=EeBe?Ee>Ge?Ee:Ge:Be>Ge?Be:Ge,Wr=ct>At?ct>Nt?ct:Nt:At>Nt?At:Nt,ia=ve.next;for(;ia!==R;){if(ia.x>=ar&&ia.x<=zr&&ia.y>=Mr&&ia.y<=Wr&&re(Ee,ct,Be,At,Ge,Nt,ia.x,ia.y)&&Ue(ia.prev,ia,ia.next)>=0)return!1;ia=ia.next}return!0}function pl(H,R,J,ve){let Ee=H.prev,Be=H,Ge=H.next;if(Ue(Ee,Be,Ge)>=0)return!1;let ct=Ee.x,At=Be.x,Nt=Ge.x,ar=Ee.y,Mr=Be.y,zr=Ge.y,Wr=ctAt?ct>Nt?ct:Nt:At>Nt?At:Nt,ja=ar>Mr?ar>zr?ar:zr:Mr>zr?Mr:zr,Ka=K(Wr,ia,R,J,ve),Wi=K(fa,ja,R,J,ve),gi=H.prevZ,qi=H.nextZ;for(;gi&&gi.z>=Ka&&qi&&qi.z<=Wi;){if(gi.x>=Wr&&gi.x<=fa&&gi.y>=ia&&gi.y<=ja&&gi!==Ee&&gi!==Ge&&re(ct,ar,At,Mr,Nt,zr,gi.x,gi.y)&&Ue(gi.prev,gi,gi.next)>=0||(gi=gi.prevZ,qi.x>=Wr&&qi.x<=fa&&qi.y>=ia&&qi.y<=ja&&qi!==Ee&&qi!==Ge&&re(ct,ar,At,Mr,Nt,zr,qi.x,qi.y)&&Ue(qi.prev,qi,qi.next)>=0))return!1;qi=qi.nextZ}for(;gi&&gi.z>=Ka;){if(gi.x>=Wr&&gi.x<=fa&&gi.y>=ia&&gi.y<=ja&&gi!==Ee&&gi!==Ge&&re(ct,ar,At,Mr,Nt,zr,gi.x,gi.y)&&Ue(gi.prev,gi,gi.next)>=0)return!1;gi=gi.prevZ}for(;qi&&qi.z<=Wi;){if(qi.x>=Wr&&qi.x<=fa&&qi.y>=ia&&qi.y<=ja&&qi!==Ee&&qi!==Ge&&re(ct,ar,At,Mr,Nt,zr,qi.x,qi.y)&&Ue(qi.prev,qi,qi.next)>=0)return!1;qi=qi.nextZ}return!0}function bl(H,R){let J=H;do{let ve=J.prev,Ee=J.next.next;!ke(ve,Ee)&&Qe(ve,J,J.next,Ee)&&br(ve,Ee)&&br(Ee,ve)&&(R.push(ve.i,J.i,Ee.i),mt(J),mt(J.next),J=H=Ee),J=J.next}while(J!==H);return El(J)}function Xn(H,R,J,ve,Ee,Be){let Ge=H;do{let ct=Ge.next.next;for(;ct!==Ge.prev;){if(Ge.i!==ct.i&&ye(Ge,ct)){let At=Br(Ge,ct);return Ge=El(Ge,Ge.next),At=El(At,At.next),ru(Ge,R,J,ve,Ee,Be,0),void ru(At,R,J,ve,Ee,Be,0)}ct=ct.next}Ge=Ge.next}while(Ge!==H)}function kl(H,R){return H.x-R.x}function Io(H,R){let J=function(Ee,Be){let Ge=Be,ct=Ee.x,At=Ee.y,Nt,ar=-1/0;do{if(At<=Ge.y&&At>=Ge.next.y&&Ge.next.y!==Ge.y){let fa=Ge.x+(At-Ge.y)*(Ge.next.x-Ge.x)/(Ge.next.y-Ge.y);if(fa<=ct&&fa>ar&&(ar=fa,Nt=Ge.x=Ge.x&&Ge.x>=zr&&ct!==Ge.x&&re(AtNt.x||Ge.x===Nt.x&&ge(Nt,Ge)))&&(Nt=Ge,ia=fa)}Ge=Ge.next}while(Ge!==Mr);return Nt}(H,R);if(!J)return R;let ve=Br(J,H);return El(ve,ve.next),El(J,J.next)}function ge(H,R){return Ue(H.prev,H,R.prev)<0&&Ue(R.next,H,H.next)<0}function K(H,R,J,ve,Ee){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=(H-J)*Ee|0)|H<<8))|H<<4))|H<<2))|H<<1))|(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-ve)*Ee|0)|R<<8))|R<<4))|R<<2))|R<<1))<<1}function xe(H){let R=H,J=H;do(R.x=(H-Ge)*(Be-ct)&&(H-Ge)*(ve-ct)>=(J-Ge)*(R-ct)&&(J-Ge)*(Be-ct)>=(Ee-Ge)*(ve-ct)}function ye(H,R){return H.next.i!==R.i&&H.prev.i!==R.i&&!function(J,ve){let Ee=J;do{if(Ee.i!==J.i&&Ee.next.i!==J.i&&Ee.i!==ve.i&&Ee.next.i!==ve.i&&Qe(Ee,Ee.next,J,ve))return!0;Ee=Ee.next}while(Ee!==J);return!1}(H,R)&&(br(H,R)&&br(R,H)&&function(J,ve){let Ee=J,Be=!1,Ge=(J.x+ve.x)/2,ct=(J.y+ve.y)/2;do Ee.y>ct!=Ee.next.y>ct&&Ee.next.y!==Ee.y&&Ge<(Ee.next.x-Ee.x)*(ct-Ee.y)/(Ee.next.y-Ee.y)+Ee.x&&(Be=!Be),Ee=Ee.next;while(Ee!==J);return Be}(H,R)&&(Ue(H.prev,H,R.prev)||Ue(H,R.prev,R))||ke(H,R)&&Ue(H.prev,H,H.next)>0&&Ue(R.prev,R,R.next)>0)}function Ue(H,R,J){return(R.y-H.y)*(J.x-R.x)-(R.x-H.x)*(J.y-R.y)}function ke(H,R){return H.x===R.x&&H.y===R.y}function Qe(H,R,J,ve){let Ee=qt(Ue(H,R,J)),Be=qt(Ue(H,R,ve)),Ge=qt(Ue(J,ve,H)),ct=qt(Ue(J,ve,R));return Ee!==Be&&Ge!==ct||!(Ee!==0||!vt(H,J,R))||!(Be!==0||!vt(H,ve,R))||!(Ge!==0||!vt(J,H,ve))||!(ct!==0||!vt(J,R,ve))}function vt(H,R,J){return R.x<=Math.max(H.x,J.x)&&R.x>=Math.min(H.x,J.x)&&R.y<=Math.max(H.y,J.y)&&R.y>=Math.min(H.y,J.y)}function qt(H){return H>0?1:H<0?-1:0}function br(H,R){return Ue(H.prev,H,H.next)<0?Ue(H,R,H.next)>=0&&Ue(H,H.prev,R)>=0:Ue(H,R,H.prev)<0||Ue(H,H.next,R)<0}function Br(H,R){let J=Mt(H.i,H.x,H.y),ve=Mt(R.i,R.x,R.y),Ee=H.next,Be=R.prev;return H.next=R,R.prev=H,J.next=Ee,Ee.prev=J,ve.next=J,J.prev=ve,Be.next=ve,ve.prev=Be,ve}function pr(H,R,J,ve){let Ee=Mt(H,R,J);return ve?(Ee.next=ve.next,Ee.prev=ve,ve.next.prev=Ee,ve.next=Ee):(Ee.prev=Ee,Ee.next=Ee),Ee}function mt(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 Mt(H,R,J){return{i:H,x:R,y:J,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ft(H,R,J){let ve=J.patternDependencies,Ee=!1;for(let Be of R){let Ge=Be.paint.get(`${H}-pattern`);Ge.isConstant()||(Ee=!0);let ct=Ge.constantOr(null);ct&&(Ee=!0,ve[ct.to]=!0,ve[ct.from]=!0)}return Ee}function rr(H,R,J,ve,Ee){let Be=Ee.patternDependencies;for(let Ge of R){let ct=Ge.paint.get(`${H}-pattern`).value;if(ct.kind!=="constant"){let At=ct.evaluate({zoom:ve-1},J,{},Ee.availableImages),Nt=ct.evaluate({zoom:ve},J,{},Ee.availableImages),ar=ct.evaluate({zoom:ve+1},J,{},Ee.availableImages);At=At&&At.name?At.name:At,Nt=Nt&&Nt.name?Nt.name:Nt,ar=ar&&ar.name?ar.name:ar,Be[At]=!0,Be[Nt]=!0,Be[ar]=!0,J.patterns[Ge.id]={min:At,mid:Nt,max:ar}}}return J}class hr{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Il,this.indexArray=new De,this.indexArray2=new et,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.segments2=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){this.hasPattern=Ft("fill",this.layers,J);let Ee=this.layers[0].layout.get("fill-sort-key"),Be=!Ee.isConstant(),Ge=[];for(let{feature:ct,id:At,index:Nt,sourceLayerIndex:ar}of R){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Wl(ct,Mr);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),zr,ve))continue;let Wr=Be?Ee.evaluate(zr,{},ve,J.availableImages):void 0,ia={id:At,properties:ct.properties,type:ct.type,sourceLayerIndex:ar,index:Nt,geometry:Mr?zr.geometry:Tl(ct),patterns:{},sortKey:Wr};Ge.push(ia)}Be&&Ge.sort((ct,At)=>ct.sortKey-At.sortKey);for(let ct of Ge){let{geometry:At,index:Nt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Mr=rr("fill",this.layers,ct,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ct,At,Nt,ve,{});J.featureIndex.insert(R[Nt].feature,At,Nt,ar,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}addFeatures(R,J,ve){for(let Ee of this.patternFeatures)this.addFeature(Ee,Ee.geometry,Ee.index,J,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Xl),this.indexBuffer=R.createIndexBuffer(this.indexArray),this.indexBuffer2=R.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(R),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(R,J,ve,Ee,Be){for(let Ge of Tc(J,500)){let ct=0;for(let Wr of Ge)ct+=Wr.length;let At=this.segments.prepareSegment(ct,this.layoutVertexArray,this.indexArray),Nt=At.vertexLength,ar=[],Mr=[];for(let Wr of Ge){if(Wr.length===0)continue;Wr!==Ge[0]&&Mr.push(ar.length/2);let ia=this.segments2.prepareSegment(Wr.length,this.layoutVertexArray,this.indexArray2),fa=ia.vertexLength;this.layoutVertexArray.emplaceBack(Wr[0].x,Wr[0].y),this.indexArray2.emplaceBack(fa+Wr.length-1,fa),ar.push(Wr[0].x),ar.push(Wr[0].y);for(let ja=1;ja>3}if(Ee--,ve===1||ve===2)Be+=H.readSVarint(),Ge+=H.readSVarint(),ve===1&&(R&&ct.push(R),R=[]),R.push(new ya(Be,Ge));else{if(ve!==7)throw new Error("unknown command "+ve);R&&R.push(R[0].clone())}}return R&&ct.push(R),ct},Ga.prototype.bbox=function(){var H=this._pbf;H.pos=this._geometry;for(var R=H.readVarint()+H.pos,J=1,ve=0,Ee=0,Be=0,Ge=1/0,ct=-1/0,At=1/0,Nt=-1/0;H.pos>3}if(ve--,J===1||J===2)(Ee+=H.readSVarint())ct&&(ct=Ee),(Be+=H.readSVarint())Nt&&(Nt=Be);else if(J!==7)throw new Error("unknown command "+J)}return[Ge,At,ct,Nt]},Ga.prototype.toGeoJSON=function(H,R,J){var ve,Ee,Be=this.extent*Math.pow(2,J),Ge=this.extent*H,ct=this.extent*R,At=this.loadGeometry(),Nt=Ga.types[this.type];function ar(Wr){for(var ia=0;ia>3;Ee=Ge===1?ve.readString():Ge===2?ve.readFloat():Ge===3?ve.readDouble():Ge===4?ve.readVarint64():Ge===5?ve.readVarint():Ge===6?ve.readSVarint():Ge===7?ve.readBoolean():null}return Ee}(J))}_i.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 R=this._pbf.readVarint()+this._pbf.pos;return new Fi(this._pbf,R,this.extent,this._keys,this._values)};var Ui=ui;function fn(H,R,J){if(H===3){var ve=new Ui(J,J.readVarint()+J.pos);ve.length&&(R[ve.name]=ve)}}Jr.VectorTile=function(H,R){this.layers=H.readFields(fn,{},R)},Jr.VectorTileFeature=vi,Jr.VectorTileLayer=ui;let _o=Jr.VectorTileFeature.types,Uo=Math.pow(2,13);function Ds(H,R,J,ve,Ee,Be,Ge,ct){H.emplaceBack(R,J,2*Math.floor(ve*Uo)+Ge,Ee*Uo*2,Be*Uo*2,Math.round(ct))}class Oo{constructor(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(J=>J.id),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new tu,this.centroidVertexArray=new es,this.indexArray=new De,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){this.features=[],this.hasPattern=Ft("fill-extrusion",this.layers,J);for(let{feature:Ee,id:Be,index:Ge,sourceLayerIndex:ct}of R){let At=this.layers[0]._featureFilter.needGeometry,Nt=Wl(Ee,At);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),Nt,ve))continue;let ar={id:Be,sourceLayerIndex:ct,index:Ge,geometry:At?Nt.geometry:Tl(Ee),properties:Ee.properties,type:Ee.type,patterns:{}};this.hasPattern?this.features.push(rr("fill-extrusion",this.layers,ar,this.zoom,J)):this.addFeature(ar,ar.geometry,Ge,ve,{}),J.featureIndex.insert(Ee,ar.geometry,Ge,ct,this.index,!0)}}addFeatures(R,J,ve){for(let Ee of this.features){let{geometry:Be}=Ee;this.addFeature(Ee,Be,Ee.index,J,ve)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,Dr),this.centroidVertexBuffer=R.createVertexBuffer(this.centroidVertexArray,Gt.members,!0),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(R,J,ve,Ee,Be){for(let Ge of Tc(J,500)){let ct={x:0,y:0,vertexCount:0},At=0;for(let ia of Ge)At+=ia.length;let Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let ia of Ge){if(ia.length===0||Ys(ia))continue;let fa=0;for(let ja=0;ja=1){let Wi=ia[ja-1];if(!Cs(Ka,Wi)){Nt.vertexLength+4>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Nt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let gi=Ka.sub(Wi)._perp()._unit(),qi=Wi.dist(Ka);fa+qi>32768&&(fa=0),Ds(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,0,fa),Ds(this.layoutVertexArray,Ka.x,Ka.y,gi.x,gi.y,0,1,fa),ct.x+=2*Ka.x,ct.y+=2*Ka.y,ct.vertexCount+=2,fa+=qi,Ds(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,0,fa),Ds(this.layoutVertexArray,Wi.x,Wi.y,gi.x,gi.y,0,1,fa),ct.x+=2*Wi.x,ct.y+=2*Wi.y,ct.vertexCount+=2;let en=Nt.vertexLength;this.indexArray.emplaceBack(en,en+2,en+1),this.indexArray.emplaceBack(en+1,en+2,en+3),Nt.vertexLength+=4,Nt.primitiveLength+=2}}}}if(Nt.vertexLength+At>Tt.MAX_VERTEX_ARRAY_LENGTH&&(Nt=this.segments.prepareSegment(At,this.layoutVertexArray,this.indexArray)),_o[R.type]!=="Polygon")continue;let ar=[],Mr=[],zr=Nt.vertexLength;for(let ia of Ge)if(ia.length!==0){ia!==Ge[0]&&Mr.push(ar.length/2);for(let fa=0;fapo)||H.y===R.y&&(H.y<0||H.y>po)}function Ys(H){return H.every(R=>R.x<0)||H.every(R=>R.x>po)||H.every(R=>R.y<0)||H.every(R=>R.y>po)}let mu;mi("FillExtrusionBucket",Oo,{omit:["layers","features"]});var Ep={get paint(){return mu=mu||new Oe({"fill-extrusion-opacity":new fo(te["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Fo(te["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fo(te["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fo(te["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Dc(te["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Fo(te["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Fo(te["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fo(te["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class kp extends ie{constructor(R){super(R,Ep)}createBucket(R){return new Oo(R)}queryRadius(){return gn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(R,J,ve,Ee,Be,Ge,ct,At){let Nt=zi(R,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Ge.angle,ct),ar=this.paint.get("fill-extrusion-height").evaluate(J,ve),Mr=this.paint.get("fill-extrusion-base").evaluate(J,ve),zr=function(ia,fa,ja,Ka){let Wi=[];for(let gi of ia){let qi=[gi.x,gi.y,0,1];hn(qi,qi,fa),Wi.push(new i(qi[0]/qi[3],qi[1]/qi[3]))}return Wi}(Nt,At),Wr=function(ia,fa,ja,Ka){let Wi=[],gi=[],qi=Ka[8]*fa,en=Ka[9]*fa,jn=Ka[10]*fa,Lo=Ka[11]*fa,xs=Ka[8]*ja,vo=Ka[9]*ja,zn=Ka[10]*ja,is=Ka[11]*ja;for(let qo of ia){let Bo=[],xn=[];for(let cs of qo){let No=cs.x,Rs=cs.y,Ku=Ka[0]*No+Ka[4]*Rs+Ka[12],Uu=Ka[1]*No+Ka[5]*Rs+Ka[13],th=Ka[2]*No+Ka[6]*Rs+Ka[14],Hp=Ka[3]*No+Ka[7]*Rs+Ka[15],Th=th+jn,rh=Hp+Lo,$h=Ku+xs,Qh=Uu+vo,ep=th+zn,ff=Hp+is,ah=new i((Ku+qi)/rh,(Uu+en)/rh);ah.z=Th/rh,Bo.push(ah);let Fh=new i($h/ff,Qh/ff);Fh.z=ep/ff,xn.push(Fh)}Wi.push(Bo),gi.push(xn)}return[Wi,gi]}(Ee,Mr,ar,At);return function(ia,fa,ja){let Ka=1/0;Xt(ja,fa)&&(Ka=qp(ja,fa[0]));for(let Wi=0;WiJ.id),this.index=R.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(J=>{this.gradients[J.id]={}}),this.layoutVertexArray=new Ru,this.layoutVertexArray2=new vu,this.indexArray=new De,this.programConfigurations=new al(R.layers,R.zoom),this.segments=new Tt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(J=>J.isStateDependent()).map(J=>J.id)}populate(R,J,ve){this.hasPattern=Ft("line",this.layers,J);let Ee=this.layers[0].layout.get("line-sort-key"),Be=!Ee.isConstant(),Ge=[];for(let{feature:ct,id:At,index:Nt,sourceLayerIndex:ar}of R){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Wl(ct,Mr);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),zr,ve))continue;let Wr=Be?Ee.evaluate(zr,{},ve):void 0,ia={id:At,properties:ct.properties,type:ct.type,sourceLayerIndex:ar,index:Nt,geometry:Mr?zr.geometry:Tl(ct),patterns:{},sortKey:Wr};Ge.push(ia)}Be&&Ge.sort((ct,At)=>ct.sortKey-At.sortKey);for(let ct of Ge){let{geometry:At,index:Nt,sourceLayerIndex:ar}=ct;if(this.hasPattern){let Mr=rr("line",this.layers,ct,this.zoom,J);this.patternFeatures.push(Mr)}else this.addFeature(ct,At,Nt,ve,{});J.featureIndex.insert(R[Nt].feature,At,Nt,ar,this.index)}}update(R,J,ve){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(R,J,this.stateDependentLayers,ve)}addFeatures(R,J,ve){for(let Ee of this.patternFeatures)this.addFeature(Ee,Ee.geometry,Ee.index,J,ve)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(R){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=R.createVertexBuffer(this.layoutVertexArray2,td)),this.layoutVertexBuffer=R.createVertexBuffer(this.layoutVertexArray,ed),this.indexBuffer=R.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(R),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(R){if(R.properties&&Object.prototype.hasOwnProperty.call(R.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(R.properties,"mapbox_clip_end"))return{start:+R.properties.mapbox_clip_start,end:+R.properties.mapbox_clip_end}}addFeature(R,J,ve,Ee,Be){let Ge=this.layers[0].layout,ct=Ge.get("line-join").evaluate(R,{}),At=Ge.get("line-cap"),Nt=Ge.get("line-miter-limit"),ar=Ge.get("line-round-limit");this.lineClips=this.lineFeatureClips(R);for(let Mr of J)this.addLine(Mr,R,ct,At,Nt,ar);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ve,Be,Ee)}addLine(R,J,ve,Ee,Be,Ge){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ka=0;Ka=2&&R[At-1].equals(R[At-2]);)At--;let Nt=0;for(;Nt0;if(Lo&&Ka>Nt){let is=zr.dist(Wr);if(is>2*ar){let qo=zr.sub(zr.sub(Wr)._mult(ar/is)._round());this.updateDistance(Wr,qo),this.addCurrentVertex(qo,fa,0,0,Mr),Wr=qo}}let vo=Wr&&ia,zn=vo?ve:ct?"butt":Ee;if(vo&&zn==="round"&&(enBe&&(zn="bevel"),zn==="bevel"&&(en>2&&(zn="flipbevel"),en100)Wi=ja.mult(-1);else{let is=en*fa.add(ja).mag()/fa.sub(ja).mag();Wi._perp()._mult(is*(xs?-1:1))}this.addCurrentVertex(zr,Wi,0,0,Mr),this.addCurrentVertex(zr,Wi.mult(-1),0,0,Mr)}else if(zn==="bevel"||zn==="fakeround"){let is=-Math.sqrt(en*en-1),qo=xs?is:0,Bo=xs?0:is;if(Wr&&this.addCurrentVertex(zr,fa,qo,Bo,Mr),zn==="fakeround"){let xn=Math.round(180*jn/Math.PI/20);for(let cs=1;cs2*ar){let qo=zr.add(ia.sub(zr)._mult(ar/is)._round());this.updateDistance(zr,qo),this.addCurrentVertex(qo,ja,0,0,Mr),zr=qo}}}}addCurrentVertex(R,J,ve,Ee,Be,Ge=!1){let ct=J.y*Ee-J.x,At=-J.y-J.x*Ee;this.addHalfVertex(R,J.x+J.y*ve,J.y-J.x*ve,Ge,!1,ve,Be),this.addHalfVertex(R,ct,At,Ge,!0,-Ee,Be),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(R,J,ve,Ee,Be,Ge))}addHalfVertex({x:R,y:J},ve,Ee,Be,Ge,ct,At){let Nt=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((R<<1)+(Be?1:0),(J<<1)+(Ge?1:0),Math.round(63*ve)+128,Math.round(63*Ee)+128,1+(ct===0?0:ct<0?-1:1)|(63&Nt)<<2,Nt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let ar=At.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ar),At.primitiveLength++),Ge?this.e2=ar:this.e1=ar}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(R,J){this.distance+=R.dist(J),this.updateScaledDistance()}}let Lp,Lv;mi("LineBucket",Vp,{omit:["layers","patternFeatures"]});var Vd={get paint(){return Lv=Lv||new Oe({"line-opacity":new Fo(te.paint_line["line-opacity"]),"line-color":new Fo(te.paint_line["line-color"]),"line-translate":new fo(te.paint_line["line-translate"]),"line-translate-anchor":new fo(te.paint_line["line-translate-anchor"]),"line-width":new Fo(te.paint_line["line-width"]),"line-gap-width":new Fo(te.paint_line["line-gap-width"]),"line-offset":new Fo(te.paint_line["line-offset"]),"line-blur":new Fo(te.paint_line["line-blur"]),"line-dasharray":new lc(te.paint_line["line-dasharray"]),"line-pattern":new Dc(te.paint_line["line-pattern"]),"line-gradient":new Yu(te.paint_line["line-gradient"])})},get layout(){return Lp=Lp||new Oe({"line-cap":new fo(te.layout_line["line-cap"]),"line-join":new Fo(te.layout_line["line-join"]),"line-miter-limit":new fo(te.layout_line["line-miter-limit"]),"line-round-limit":new fo(te.layout_line["line-round-limit"]),"line-sort-key":new Fo(te.layout_line["line-sort-key"])})}};class Gf extends Fo{possiblyEvaluate(R,J){return J=new Fs(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),super.possiblyEvaluate(R,J)}evaluate(R,J,ve,Ee){return J=E({},J,{zoom:Math.floor(J.zoom)}),super.evaluate(R,J,ve,Ee)}}let Gd;class Pv extends ie{constructor(R){super(R,Vd),this.gradientVersion=0,Gd||(Gd=new Gf(Vd.paint.properties["line-width"].specification),Gd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(R){if(R==="line-gradient"){let J=this.gradientExpression();this.stepInterpolant=!!function(ve){return ve._styleExpression!==void 0}(J)&&J._styleExpression.expression instanceof ba,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(R,J){super.recalculate(R,J),this.paint._values["line-floorwidth"]=Gd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,R)}createBucket(R){return new Vp(R)}queryRadius(R){let J=R,ve=ph(si("line-width",this,J),si("line-gap-width",this,J)),Ee=si("line-offset",this,J);return ve/2+Math.abs(Ee)+gn(this.paint.get("line-translate"))}queryIntersectsFeature(R,J,ve,Ee,Be,Ge,ct){let At=zi(R,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ge.angle,ct),Nt=ct/2*ph(this.paint.get("line-width").evaluate(J,ve),this.paint.get("line-gap-width").evaluate(J,ve)),ar=this.paint.get("line-offset").evaluate(J,ve);return ar&&(Ee=function(Mr,zr){let Wr=[];for(let ia=0;ia=3){for(let ja=0;ja0?R+2*H:H}let iv=ht([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),om=ht([{name:"a_projected_pos",components:3,type:"Float32"}],4);ht([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let sm=ht([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ht([{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 Iv=ht([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nv=ht([{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,R,J){return H.sections.forEach(ve=>{ve.text=function(Ee,Be,Ge){let ct=Be.layout.get("text-transform").evaluate(Ge,{});return ct==="uppercase"?Ee=Ee.toLocaleUpperCase():ct==="lowercase"&&(Ee=Ee.toLocaleLowerCase()),Js.applyArabicShaping&&(Ee=Js.applyArabicShaping(Ee)),Ee}(ve.text,R,J)}),H}ht([{name:"triangle",components:3,type:"Uint16"}]),ht([{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"}]),ht([{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"}]),ht([{type:"Float32",name:"offsetX"}]),ht([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ht([{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 hu=24,Dh=Mu,Rv=function(H,R,J,ve,Ee){var Be,Ge,ct=8*Ee-ve-1,At=(1<>1,ar=-7,Mr=J?Ee-1:0,zr=J?-1:1,Wr=H[R+Mr];for(Mr+=zr,Be=Wr&(1<<-ar)-1,Wr>>=-ar,ar+=ct;ar>0;Be=256*Be+H[R+Mr],Mr+=zr,ar-=8);for(Ge=Be&(1<<-ar)-1,Be>>=-ar,ar+=ve;ar>0;Ge=256*Ge+H[R+Mr],Mr+=zr,ar-=8);if(Be===0)Be=1-Nt;else{if(Be===At)return Ge?NaN:1/0*(Wr?-1:1);Ge+=Math.pow(2,ve),Be-=Nt}return(Wr?-1:1)*Ge*Math.pow(2,Be-ve)},lm=function(H,R,J,ve,Ee,Be){var Ge,ct,At,Nt=8*Be-Ee-1,ar=(1<>1,zr=Ee===23?Math.pow(2,-24)-Math.pow(2,-77):0,Wr=ve?0:Be-1,ia=ve?1:-1,fa=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(ct=isNaN(R)?1:0,Ge=ar):(Ge=Math.floor(Math.log(R)/Math.LN2),R*(At=Math.pow(2,-Ge))<1&&(Ge--,At*=2),(R+=Ge+Mr>=1?zr/At:zr*Math.pow(2,1-Mr))*At>=2&&(Ge++,At/=2),Ge+Mr>=ar?(ct=0,Ge=ar):Ge+Mr>=1?(ct=(R*At-1)*Math.pow(2,Ee),Ge+=Mr):(ct=R*Math.pow(2,Mr-1)*Math.pow(2,Ee),Ge=0));Ee>=8;H[J+Wr]=255&ct,Wr+=ia,ct/=256,Ee-=8);for(Ge=Ge<0;H[J+Wr]=255&Ge,Wr+=ia,Ge/=256,Nt-=8);H[J+Wr-ia]|=128*fa};function Mu(H){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(H)?H:new Uint8Array(H||0),this.pos=0,this.type=0,this.length=this.buf.length}Mu.Varint=0,Mu.Fixed64=1,Mu.Bytes=2,Mu.Fixed32=5;var w0=4294967296,sv=1/w0,xg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Pp(H){return H.type===Mu.Bytes?H.readVarint()+H.pos:H.pos+1}function lv(H,R,J){return J?4294967296*R+(H>>>0):4294967296*(R>>>0)+(H>>>0)}function bg(H,R,J){var ve=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(7*Math.LN2));J.realloc(ve);for(var Ee=J.pos-1;Ee>=H;Ee--)J.buf[Ee+ve]=J.buf[Ee]}function T0(H,R){for(var J=0;J>>8,H[J+2]=R>>>16,H[J+3]=R>>>24}function Lx(H,R){return(H[R]|H[R+1]<<8|H[R+2]<<16)+(H[R+3]<<24)}Mu.prototype={destroy:function(){this.buf=null},readFields:function(H,R,J){for(J=J||this.length;this.pos>3,Be=this.pos;this.type=7&ve,H(Ee,R,this),this.pos===Be&&this.skip(ve)}return R},readMessage:function(H,R){return this.readFields(H,R,this.readVarint()+this.pos)},readFixed32:function(){var H=Dv(this.buf,this.pos);return this.pos+=4,H},readSFixed32:function(){var H=Lx(this.buf,this.pos);return this.pos+=4,H},readFixed64:function(){var H=Dv(this.buf,this.pos)+Dv(this.buf,this.pos+4)*w0;return this.pos+=8,H},readSFixed64:function(){var H=Dv(this.buf,this.pos)+Lx(this.buf,this.pos+4)*w0;return this.pos+=8,H},readFloat:function(){var H=Rv(this.buf,this.pos,!0,23,4);return this.pos+=4,H},readDouble:function(){var H=Rv(this.buf,this.pos,!0,52,8);return this.pos+=8,H},readVarint:function(H){var R,J,ve=this.buf;return R=127&(J=ve[this.pos++]),J<128?R:(R|=(127&(J=ve[this.pos++]))<<7,J<128?R:(R|=(127&(J=ve[this.pos++]))<<14,J<128?R:(R|=(127&(J=ve[this.pos++]))<<21,J<128?R:function(Ee,Be,Ge){var ct,At,Nt=Ge.buf;if(ct=(112&(At=Nt[Ge.pos++]))>>4,At<128||(ct|=(127&(At=Nt[Ge.pos++]))<<3,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<10,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<17,At<128)||(ct|=(127&(At=Nt[Ge.pos++]))<<24,At<128)||(ct|=(1&(At=Nt[Ge.pos++]))<<31,At<128))return lv(Ee,ct,Be);throw new Error("Expected varint not more than 10 bytes")}(R|=(15&(J=ve[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,R=this.pos;return this.pos=H,H-R>=12&&xg?function(J,ve,Ee){return xg.decode(J.subarray(ve,Ee))}(this.buf,R,H):function(J,ve,Ee){for(var Be="",Ge=ve;Ge239?4:ar>223?3:ar>191?2:1;if(Ge+zr>Ee)break;zr===1?ar<128&&(Mr=ar):zr===2?(192&(ct=J[Ge+1]))==128&&(Mr=(31&ar)<<6|63&ct)<=127&&(Mr=null):zr===3?(At=J[Ge+2],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&((Mr=(15&ar)<<12|(63&ct)<<6|63&At)<=2047||Mr>=55296&&Mr<=57343)&&(Mr=null)):zr===4&&(At=J[Ge+2],Nt=J[Ge+3],(192&(ct=J[Ge+1]))==128&&(192&At)==128&&(192&Nt)==128&&((Mr=(15&ar)<<18|(63&ct)<<12|(63&At)<<6|63&Nt)<=65535||Mr>=1114112)&&(Mr=null)),Mr===null?(Mr=65533,zr=1):Mr>65535&&(Mr-=65536,Be+=String.fromCharCode(Mr>>>10&1023|55296),Mr=56320|1023&Mr),Be+=String.fromCharCode(Mr),Ge+=zr}return Be}(this.buf,R,H)},readBytes:function(){var H=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,H);return this.pos=H,R},readPackedVarint:function(H,R){if(this.type!==Mu.Bytes)return H.push(this.readVarint(R));var J=Pp(this);for(H=H||[];this.pos127;);else if(R===Mu.Bytes)this.pos=this.readVarint()+this.pos;else if(R===Mu.Fixed32)this.pos+=4;else{if(R!==Mu.Fixed64)throw new Error("Unimplemented type: "+R);this.pos+=8}},writeTag:function(H,R){this.writeVarint(H<<3|R)},realloc:function(H){for(var R=this.length||16;R268435455||H<0?function(R,J){var ve,Ee;if(R>=0?(ve=R%4294967296|0,Ee=R/4294967296|0):(Ee=~(-R/4294967296),4294967295^(ve=~(-R%4294967296))?ve=ve+1|0:(ve=0,Ee=Ee+1|0)),R>=18446744073709552e3||R<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");J.realloc(10),function(Be,Ge,ct){ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,Be>>>=7,ct.buf[ct.pos++]=127&Be|128,ct.buf[ct.pos]=127&(Be>>>=7)}(ve,0,J),function(Be,Ge){var ct=(7&Be)<<4;Ge.buf[Ge.pos++]|=ct|((Be>>>=3)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be|((Be>>>=7)?128:0),Be&&(Ge.buf[Ge.pos++]=127&Be)))))}(Ee,J)}(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 R=this.pos;this.pos=function(ve,Ee,Be){for(var Ge,ct,At=0;At55295&&Ge<57344){if(!ct){Ge>56319||At+1===Ee.length?(ve[Be++]=239,ve[Be++]=191,ve[Be++]=189):ct=Ge;continue}if(Ge<56320){ve[Be++]=239,ve[Be++]=191,ve[Be++]=189,ct=Ge;continue}Ge=ct-55296<<10|Ge-56320|65536,ct=null}else ct&&(ve[Be++]=239,ve[Be++]=191,ve[Be++]=189,ct=null);Ge<128?ve[Be++]=Ge:(Ge<2048?ve[Be++]=Ge>>6|192:(Ge<65536?ve[Be++]=Ge>>12|224:(ve[Be++]=Ge>>18|240,ve[Be++]=Ge>>12&63|128),ve[Be++]=Ge>>6&63|128),ve[Be++]=63&Ge|128)}return Be}(this.buf,H,this.pos);var J=this.pos-R;J>=128&&bg(R,J,this),this.pos=R-1,this.writeVarint(J),this.pos+=J},writeFloat:function(H){this.realloc(4),lm(this.buf,H,this.pos,!0,23,4),this.pos+=4},writeDouble:function(H){this.realloc(8),lm(this.buf,H,this.pos,!0,52,8),this.pos+=8},writeBytes:function(H){var R=H.length;this.writeVarint(R),this.realloc(R);for(var J=0;J=128&&bg(J,ve,this),this.pos=J-1,this.writeVarint(ve),this.pos+=ve},writeMessage:function(H,R,J){this.writeTag(H,Mu.Bytes),this.writeRawMessage(R,J)},writePackedVarint:function(H,R){R.length&&this.writeMessage(H,T0,R)},writePackedSVarint:function(H,R){R.length&&this.writeMessage(H,UT,R)},writePackedBoolean:function(H,R){R.length&&this.writeMessage(H,VT,R)},writePackedFloat:function(H,R){R.length&&this.writeMessage(H,jT,R)},writePackedDouble:function(H,R){R.length&&this.writeMessage(H,qT,R)},writePackedFixed32:function(H,R){R.length&&this.writeMessage(H,vk,R)},writePackedSFixed32:function(H,R){R.length&&this.writeMessage(H,GT,R)},writePackedFixed64:function(H,R){R.length&&this.writeMessage(H,HT,R)},writePackedSFixed64:function(H,R){R.length&&this.writeMessage(H,WT,R)},writeBytesField:function(H,R){this.writeTag(H,Mu.Bytes),this.writeBytes(R)},writeFixed32Field:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeSFixed64(R)},writeVarintField:function(H,R){this.writeTag(H,Mu.Varint),this.writeVarint(R)},writeSVarintField:function(H,R){this.writeTag(H,Mu.Varint),this.writeSVarint(R)},writeStringField:function(H,R){this.writeTag(H,Mu.Bytes),this.writeString(R)},writeFloatField:function(H,R){this.writeTag(H,Mu.Fixed32),this.writeFloat(R)},writeDoubleField:function(H,R){this.writeTag(H,Mu.Fixed64),this.writeDouble(R)},writeBooleanField:function(H,R){this.writeVarintField(H,!!R)}};var P1=r(Dh);let I1=3;function mk(H,R,J){H===1&&J.readMessage(XT,R)}function XT(H,R,J){if(H===3){let{id:ve,bitmap:Ee,width:Be,height:Ge,left:ct,top:At,advance:Nt}=J.readMessage(Px,{});R.push({id:ve,bitmap:new Rn({width:Be+2*I1,height:Ge+2*I1},Ee),metrics:{width:Be,height:Ge,left:ct,top:At,advance:Nt}})}}function Px(H,R,J){H===1?R.id=J.readVarint():H===2?R.bitmap=J.readBytes():H===3?R.width=J.readVarint():H===4?R.height=J.readVarint():H===5?R.left=J.readSVarint():H===6?R.top=J.readSVarint():H===7&&(R.advance=J.readVarint())}let Ix=I1;function R1(H){let R=0,J=0;for(let Ge of H)R+=Ge.w*Ge.h,J=Math.max(J,Ge.w);H.sort((Ge,ct)=>ct.h-Ge.h);let ve=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(R/.95)),J),h:1/0}],Ee=0,Be=0;for(let Ge of H)for(let ct=ve.length-1;ct>=0;ct--){let At=ve[ct];if(!(Ge.w>At.w||Ge.h>At.h)){if(Ge.x=At.x,Ge.y=At.y,Be=Math.max(Be,Ge.y+Ge.h),Ee=Math.max(Ee,Ge.x+Ge.w),Ge.w===At.w&&Ge.h===At.h){let Nt=ve.pop();ct=0&&ve>=R&&Ag[this.text.charCodeAt(ve)];ve--)J--;this.text=this.text.substring(R,J),this.sectionIndex=this.sectionIndex.slice(R,J)}substring(R,J){let ve=new um;return ve.text=this.text.substring(R,J),ve.sectionIndex=this.sectionIndex.slice(R,J),ve.sections=this.sections,ve}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((R,J)=>Math.max(R,this.sections[J].scale),0)}addTextSection(R,J){this.text+=R.text,this.sections.push(S0.forText(R.scale,R.fontStack||J));let ve=this.sections.length-1;for(let Ee=0;Ee=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function M0(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia){let fa=um.fromFeature(H,Ee),ja;Mr===e.ah.vertical&&fa.verticalizePunctuation();let{processBidirectionalText:Ka,processStyledBidirectionalText:Wi}=Js;if(Ka&&fa.sections.length===1){ja=[];let en=Ka(fa.toString(),cm(fa,Nt,Be,R,ve,Wr));for(let jn of en){let Lo=new um;Lo.text=jn,Lo.sections=fa.sections;for(let xs=0;xs0&&Xp>yf&&(yf=Xp)}else{let zc=Lo[pu.fontStack],Pf=zc&&zc[Ju];if(Pf&&Pf.rect)mm=Pf.rect,Qc=Pf.metrics;else{let Xp=jn[pu.fontStack],Zd=Xp&&Xp[Ju];if(!Zd)continue;Qc=Zd.metrics}Dp=(ah-pu.scale)*hu}Wp?(en.verticalizable=!0,dh.push({glyph:Ju,imageName:_d,x:Rs,y:Ku+Dp,vertical:Wp,scale:pu.scale,fontStack:pu.fontStack,sectionIndex:fc,metrics:Qc,rect:mm}),Rs+=fd*pu.scale+xn):(dh.push({glyph:Ju,imageName:_d,x:Rs,y:Ku+Dp,vertical:Wp,scale:pu.scale,fontStack:pu.fontStack,sectionIndex:fc,metrics:Qc,rect:mm}),Rs+=Qc.advance*pu.scale+xn)}dh.length!==0&&(Uu=Math.max(Rs-xn,Uu),uv(dh,0,dh.length-1,Hp,yf)),Rs=0;let Rp=zn*ah+yf;Ah.lineOffset=Math.max(yf,Fh),Ku+=Rp,th=Math.max(Rp,th),++Th}var rh;let $h=Ku-eh,{horizontalAlign:Qh,verticalAlign:ep}=Mg(is);(function(ff,ah,Fh,Ah,dh,yf,Rp,vp,pu){let fc=(ah-Fh)*dh,Ju=0;Ju=yf!==Rp?-vp*Ah-eh:(-Ah*pu+.5)*Rp;for(let Dp of ff)for(let Qc of Dp.positionedGlyphs)Qc.x+=fc,Qc.y+=Ju})(en.positionedLines,Hp,Qh,ep,Uu,th,zn,$h,vo.length),en.top+=-ep*$h,en.bottom=en.top+$h,en.left+=-Qh*Uu,en.right=en.left+Uu}(qi,R,J,ve,ja,Ge,ct,At,Mr,Nt,zr,ia),!function(en){for(let jn of en)if(jn.positionedGlyphs.length!==0)return!1;return!0}(gi)&&qi}let Ag={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 Rx(H,R,J,ve,Ee,Be){if(R.imageName){let Ge=ve[R.imageName];return Ge?Ge.displaySize[0]*R.scale*hu/Be+Ee:0}{let Ge=J[R.fontStack],ct=Ge&&Ge[H];return ct?ct.metrics.advance*R.scale+Ee:0}}function Dx(H,R,J,ve){let Ee=Math.pow(H-R,2);return ve?H=0,Nt=0;for(let Mr=0;MrNt){let ar=Math.ceil(Be/Nt);Ee*=ar/Ge,Ge=ar}return{x1:ve,y1:Ee,x2:ve+Be,y2:Ee+Ge}}function Ox(H,R,J,ve,Ee,Be){let Ge=H.image,ct;if(Ge.content){let ja=Ge.content,Ka=Ge.pixelRatio||1;ct=[ja[0]/Ka,ja[1]/Ka,Ge.displaySize[0]-ja[2]/Ka,Ge.displaySize[1]-ja[3]/Ka]}let At=R.left*Be,Nt=R.right*Be,ar,Mr,zr,Wr;J==="width"||J==="both"?(Wr=Ee[0]+At-ve[3],Mr=Ee[0]+Nt+ve[1]):(Wr=Ee[0]+(At+Nt-Ge.displaySize[0])/2,Mr=Wr+Ge.displaySize[0]);let ia=R.top*Be,fa=R.bottom*Be;return J==="height"||J==="both"?(ar=Ee[1]+ia-ve[0],zr=Ee[1]+fa+ve[2]):(ar=Ee[1]+(ia+fa-Ge.displaySize[1])/2,zr=ar+Ge.displaySize[1]),{image:Ge,top:ar,right:Mr,bottom:zr,left:Wr,collisionPadding:ct}}let k0=255,yd=128,cv=k0*yd;function Bx(H,R){let{expression:J}=R;if(J.kind==="constant")return{kind:"constant",layoutSize:J.evaluate(new Fs(H+1))};if(J.kind==="source")return{kind:"source"};{let{zoomStops:ve,interpolationType:Ee}=J,Be=0;for(;BeGe.id),this.index=R.index,this.pixelRatio=R.pixelRatio,this.sourceLayerIndex=R.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=di([]),this.placementViewportMatrix=di([]);let J=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Bx(this.zoom,J["text-size"]),this.iconSizeData=Bx(this.zoom,J["icon-size"]);let ve=this.layers[0].layout,Ee=ve.get("symbol-sort-key"),Be=ve.get("symbol-z-order");this.canOverlap=D1(ve,"text-overlap","text-allow-overlap")!=="never"||D1(ve,"icon-overlap","icon-allow-overlap")!=="never"||ve.get("text-ignore-placement")||ve.get("icon-ignore-placement"),this.sortFeaturesByKey=Be!=="viewport-y"&&!Ee.isConstant(),this.sortFeaturesByY=(Be==="viewport-y"||Be==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,ve.get("symbol-placement")==="point"&&(this.writingModes=ve.get("text-writing-mode").map(Ge=>e.ah[Ge])),this.stateDependentLayerIds=this.layers.filter(Ge=>Ge.isStateDependent()).map(Ge=>Ge.id),this.sourceID=R.sourceID}createArrays(){this.text=new O1(new al(this.layers,this.zoom,R=>/^text/.test(R))),this.icon=new O1(new al(this.layers,this.zoom,R=>/^icon/.test(R))),this.glyphOffsetArray=new ls,this.lineVertexArray=new Mo,this.symbolInstances=new Ao,this.textAnchorOffsets=new ds}calculateGlyphDependencies(R,J,ve,Ee,Be){for(let Ge=0;Ge0)&&(Ge.value.kind!=="constant"||Ge.value.value.length>0),ar=At.value.kind!=="constant"||!!At.value.value||Object.keys(At.parameters).length>0,Mr=Be.get("symbol-sort-key");if(this.features=[],!Nt&&!ar)return;let zr=J.iconDependencies,Wr=J.glyphDependencies,ia=J.availableImages,fa=new Fs(this.zoom);for(let{feature:ja,id:Ka,index:Wi,sourceLayerIndex:gi}of R){let qi=Ee._featureFilter.needGeometry,en=Wl(ja,qi);if(!Ee._featureFilter.filter(fa,en,ve))continue;let jn,Lo;if(qi||(en.geometry=Tl(ja)),Nt){let vo=Ee.getValueAndResolveTokens("text-field",en,ve,ia),zn=ra.factory(vo),is=this.hasRTLText=this.hasRTLText||F1(zn);(!is||Js.getRTLTextPluginStatus()==="unavailable"||is&&Js.isParsed())&&(jn=ov(zn,Ee,en))}if(ar){let vo=Ee.getValueAndResolveTokens("icon-image",en,ve,ia);Lo=vo instanceof Za?vo:Za.fromString(vo)}if(!jn&&!Lo)continue;let xs=this.sortFeaturesByKey?Mr.evaluate(en,{},ve):void 0;if(this.features.push({id:Ka,text:jn,icon:Lo,index:Wi,sourceLayerIndex:gi,geometry:en.geometry,properties:ja.properties,type:JT[ja.type],sortKey:xs}),Lo&&(zr[Lo.name]=!0),jn){let vo=Ge.evaluate(en,{},ve).join(","),zn=Be.get("text-rotation-alignment")!=="viewport"&&Be.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 qo=yo(jn.toString()),Bo=is.fontStack||vo,xn=Wr[Bo]=Wr[Bo]||{};this.calculateGlyphDependencies(is.text,xn,zn,this.allowVerticalPlacement,qo)}}}Be.get("symbol-placement")==="line"&&(this.features=function(ja){let Ka={},Wi={},gi=[],qi=0;function en(vo){gi.push(ja[vo]),qi++}function jn(vo,zn,is){let qo=Wi[vo];return delete Wi[vo],Wi[zn]=qo,gi[qo].geometry[0].pop(),gi[qo].geometry[0]=gi[qo].geometry[0].concat(is[0]),qo}function Lo(vo,zn,is){let qo=Ka[zn];return delete Ka[zn],Ka[vo]=qo,gi[qo].geometry[0].shift(),gi[qo].geometry[0]=is[0].concat(gi[qo].geometry[0]),qo}function xs(vo,zn,is){let qo=is?zn[0][zn[0].length-1]:zn[0][0];return`${vo}:${qo.x}:${qo.y}`}for(let vo=0;vovo.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ja,Ka)=>ja.sortKey-Ka.sortKey)}update(R,J,ve){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(R,J,this.layers,ve),this.icon.programConfigurations.updatePaintArrays(R,J,this.layers,ve))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(R){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(R),this.iconCollisionBox.upload(R)),this.text.upload(R,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(R,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(R,J){let ve=this.lineVertexArray.length;if(R.segment!==void 0){let Ee=R.dist(J[R.segment+1]),Be=R.dist(J[R.segment]),Ge={};for(let ct=R.segment+1;ct=0;ct--)Ge[ct]={x:J[ct].x,y:J[ct].y,tileUnitDistanceFromAnchor:Be},ct>0&&(Be+=J[ct-1].dist(J[ct]));for(let ct=0;ct0}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(R,J){let ve=R.placedSymbolArray.get(J),Ee=ve.vertexStartIndex+4*ve.numGlyphs;for(let Be=ve.vertexStartIndex;BeEe[ct]-Ee[At]||Be[At]-Be[ct]),Ge}addToSortKeyRanges(R,J){let ve=this.sortKeyRanges[this.sortKeyRanges.length-1];ve&&ve.sortKey===J?ve.symbolInstanceEnd=R+1:this.sortKeyRanges.push({sortKey:J,symbolInstanceStart:R,symbolInstanceEnd:R+1})}sortFeatures(R){if(this.sortFeaturesByY&&this.sortedAngle!==R&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let J of this.symbolInstanceIndexes){let ve=this.symbolInstances.get(J);this.featureSortOrder.push(ve.featureIndex),[ve.rightJustifiedTextSymbolIndex,ve.centerJustifiedTextSymbolIndex,ve.leftJustifiedTextSymbolIndex].forEach((Ee,Be,Ge)=>{Ee>=0&&Ge.indexOf(Ee)===Be&&this.addIndicesForPlacedSymbol(this.text,Ee)}),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)}}}let cf,C0;mi("SymbolBucket",fm,{omit:["layers","collisionBoxArray","features","compareText"]}),fm.MAX_GLYPHS=65535,fm.addDynamicAttributes=z1;var kg={get paint(){return C0=C0||new Oe({"icon-opacity":new Fo(te.paint_symbol["icon-opacity"]),"icon-color":new Fo(te.paint_symbol["icon-color"]),"icon-halo-color":new Fo(te.paint_symbol["icon-halo-color"]),"icon-halo-width":new Fo(te.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Fo(te.paint_symbol["icon-halo-blur"]),"icon-translate":new fo(te.paint_symbol["icon-translate"]),"icon-translate-anchor":new fo(te.paint_symbol["icon-translate-anchor"]),"text-opacity":new Fo(te.paint_symbol["text-opacity"]),"text-color":new Fo(te.paint_symbol["text-color"],{runtimeType:Bt,getOverride:H=>H.textColor,hasOverride:H=>!!H.textColor}),"text-halo-color":new Fo(te.paint_symbol["text-halo-color"]),"text-halo-width":new Fo(te.paint_symbol["text-halo-width"]),"text-halo-blur":new Fo(te.paint_symbol["text-halo-blur"]),"text-translate":new fo(te.paint_symbol["text-translate"]),"text-translate-anchor":new fo(te.paint_symbol["text-translate-anchor"])})},get layout(){return cf=cf||new Oe({"symbol-placement":new fo(te.layout_symbol["symbol-placement"]),"symbol-spacing":new fo(te.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fo(te.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Fo(te.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fo(te.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fo(te.layout_symbol["icon-allow-overlap"]),"icon-overlap":new fo(te.layout_symbol["icon-overlap"]),"icon-ignore-placement":new fo(te.layout_symbol["icon-ignore-placement"]),"icon-optional":new fo(te.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fo(te.layout_symbol["icon-rotation-alignment"]),"icon-size":new Fo(te.layout_symbol["icon-size"]),"icon-text-fit":new fo(te.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fo(te.layout_symbol["icon-text-fit-padding"]),"icon-image":new Fo(te.layout_symbol["icon-image"]),"icon-rotate":new Fo(te.layout_symbol["icon-rotate"]),"icon-padding":new Fo(te.layout_symbol["icon-padding"]),"icon-keep-upright":new fo(te.layout_symbol["icon-keep-upright"]),"icon-offset":new Fo(te.layout_symbol["icon-offset"]),"icon-anchor":new Fo(te.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fo(te.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fo(te.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fo(te.layout_symbol["text-rotation-alignment"]),"text-field":new Fo(te.layout_symbol["text-field"]),"text-font":new Fo(te.layout_symbol["text-font"]),"text-size":new Fo(te.layout_symbol["text-size"]),"text-max-width":new Fo(te.layout_symbol["text-max-width"]),"text-line-height":new fo(te.layout_symbol["text-line-height"]),"text-letter-spacing":new Fo(te.layout_symbol["text-letter-spacing"]),"text-justify":new Fo(te.layout_symbol["text-justify"]),"text-radial-offset":new Fo(te.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fo(te.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Fo(te.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Fo(te.layout_symbol["text-anchor"]),"text-max-angle":new fo(te.layout_symbol["text-max-angle"]),"text-writing-mode":new fo(te.layout_symbol["text-writing-mode"]),"text-rotate":new Fo(te.layout_symbol["text-rotate"]),"text-padding":new fo(te.layout_symbol["text-padding"]),"text-keep-upright":new fo(te.layout_symbol["text-keep-upright"]),"text-transform":new Fo(te.layout_symbol["text-transform"]),"text-offset":new Fo(te.layout_symbol["text-offset"]),"text-allow-overlap":new fo(te.layout_symbol["text-allow-overlap"]),"text-overlap":new fo(te.layout_symbol["text-overlap"]),"text-ignore-placement":new fo(te.layout_symbol["text-ignore-placement"]),"text-optional":new fo(te.layout_symbol["text-optional"])})}};class L0{constructor(R){if(R.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=R.property.overrides?R.property.overrides.runtimeType:rt,this.defaultValue=R}evaluate(R){if(R.formattedSection){let J=this.defaultValue.property.overrides;if(J&&J.hasOverride(R.formattedSection))return J.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default}eachChild(R){this.defaultValue.isConstant()||R(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}mi("FormatSectionOverride",L0,{omit:["defaultValue"]});class zv extends ie{constructor(R){super(R,kg)}recalculate(R,J){if(super.recalculate(R,J),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 ve=this.layout.get("text-writing-mode");if(ve){let Ee=[];for(let Be of ve)Ee.indexOf(Be)<0&&Ee.push(Be);this.layout._values["text-writing-mode"]=Ee}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(R,J,ve,Ee){let Be=this.layout.get(R).evaluate(J,{},ve,Ee),Ge=this._unevaluatedLayout._values[R];return Ge.isDataDriven()||Mc(Ge.value)||!Be?Be:function(ct,At){return At.replace(/{([^{}]+)}/g,(Nt,ar)=>ct&&ar in ct?String(ct[ar]):"")}(J.properties,Be)}createBucket(R){return new fm(R)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let R of kg.paint.overridableProperties){if(!zv.hasPaintOverride(this.layout,R))continue;let J=this.paint.get(R),ve=new L0(J),Ee=new Lu(ve,J.property.specification),Be=null;Be=J.value.kind==="constant"||J.value.kind==="source"?new vc("source",Ee):new yu("composite",Ee,J.value.zoomStops),this.paint._values[R]=new Au(J.property,Be,J.parameters)}}_handleOverridablePaintPropertyUpdate(R,J,ve){return!(!this.layout||J.isDataDriven()||ve.isDataDriven())&&zv.hasPaintOverride(this.layout,R)}static hasPaintOverride(R,J){let ve=R.get("text-field"),Ee=kg.paint.properties[J],Be=!1,Ge=ct=>{for(let At of ct)if(Ee.overrides&&Ee.overrides.hasOverride(At))return void(Be=!0)};if(ve.value.kind==="constant"&&ve.value.value instanceof ra)Ge(ve.value.value.sections);else if(ve.value.kind==="source"){let ct=Nt=>{Be||(Nt instanceof tn&&Ia(Nt.value)===qr?Ge(Nt.value.sections):Nt instanceof ss?Ge(Nt.sections):Nt.eachChild(ct))},At=ve.value;At._styleExpression&&ct(At._styleExpression.expression)}return Be}}let Nx;var P0={get paint(){return Nx=Nx||new Oe({"background-color":new fo(te.paint_background["background-color"]),"background-pattern":new lc(te.paint_background["background-pattern"]),"background-opacity":new fo(te.paint_background["background-opacity"])})}};class QT extends ie{constructor(R){super(R,P0)}}let B1;var Ux={get paint(){return B1=B1||new Oe({"raster-opacity":new fo(te.paint_raster["raster-opacity"]),"raster-hue-rotate":new fo(te.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fo(te.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fo(te.paint_raster["raster-brightness-max"]),"raster-saturation":new fo(te.paint_raster["raster-saturation"]),"raster-contrast":new fo(te.paint_raster["raster-contrast"]),"raster-resampling":new fo(te.paint_raster["raster-resampling"]),"raster-fade-duration":new fo(te.paint_raster["raster-fade-duration"])})}};class I0 extends ie{constructor(R){super(R,Ux)}}class N1 extends ie{constructor(R){super(R,{}),this.onAdd=J=>{this.implementation.onAdd&&this.implementation.onAdd(J,J.painter.context.gl)},this.onRemove=J=>{this.implementation.onRemove&&this.implementation.onRemove(J,J.painter.context.gl)},this.implementation=R}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(R){this._methodToThrottle=R,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(R,J){if(isNaN(R)||isNaN(J))throw new Error(`Invalid LngLat object: (${R}, ${J})`);if(this.lng=+R,this.lat=+J,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Hd(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(R){let J=Math.PI/180,ve=this.lat*J,Ee=R.lat*J,Be=Math.sin(ve)*Math.sin(Ee)+Math.cos(ve)*Math.cos(Ee)*Math.cos((R.lng-this.lng)*J);return j1*Math.acos(Math.min(Be,1))}static convert(R){if(R instanceof Hd)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new Hd(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new Hd(Number("lng"in R?R.lng:R.lon),Number(R.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let hm=2*Math.PI*j1;function jx(H){return hm*Math.cos(H*Math.PI/180)}function Cg(H){return(180+H)/360}function qx(H){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H*Math.PI/360)))/360}function Lg(H,R){return H/jx(R)}function R0(H){return 360/Math.PI*Math.atan(Math.exp((180-360*H)*Math.PI/180))-90}class D0{constructor(R,J,ve=0){this.x=+R,this.y=+J,this.z=+ve}static fromLngLat(R,J=0){let ve=Hd.convert(R);return new D0(Cg(ve.lng),qx(ve.lat),Lg(J,ve.lat))}toLngLat(){return new Hd(360*this.x-180,R0(this.y))}toAltitude(){return this.z*jx(R0(this.y))}meterInMercatorCoordinateUnits(){return 1/hm*(R=R0(this.y),1/Math.cos(R*Math.PI/180));var R}}function rd(H,R,J){var ve=2*Math.PI*6378137/256/Math.pow(2,J);return[H*ve-2*Math.PI*6378137/2,R*ve-2*Math.PI*6378137/2]}class q1{constructor(R,J,ve){if(!function(Ee,Be,Ge){return!(Ee<0||Ee>25||Ge<0||Ge>=Math.pow(2,Ee)||Be<0||Be>=Math.pow(2,Ee))}(R,J,ve))throw new Error(`x=${J}, y=${ve}, z=${R} outside of bounds. 0<=x<${Math.pow(2,R)}, 0<=y<${Math.pow(2,R)} 0<=z<=25 `);this.z=R,this.x=J,this.y=ve,this.key=z0(0,R,R,J,ve)}equals(R){return this.z===R.z&&this.x===R.x&&this.y===R.y}url(R,J,ve){let Ee=(Ge=this.y,ct=this.z,At=rd(256*(Be=this.x),256*(Ge=Math.pow(2,ct)-Ge-1),ct),Nt=rd(256*(Be+1),256*(Ge+1),ct),At[0]+","+At[1]+","+Nt[0]+","+Nt[1]);var Be,Ge,ct,At,Nt;let ar=function(Mr,zr,Wr){let ia,fa="";for(let ja=Mr;ja>0;ja--)ia=1<1?"@2x":"").replace(/{quadkey}/g,ar).replace(/{bbox-epsg-3857}/g,Ee)}isChildOf(R){let J=this.z-R.z;return J>0&&R.x===this.x>>J&&R.y===this.y>>J}getTilePoint(R){let J=Math.pow(2,this.z);return new i((R.x*J-this.x)*po,(R.y*J-this.y)*po)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vx{constructor(R,J){this.wrap=R,this.canonical=J,this.key=z0(R,J.z,J.z,J.x,J.y)}}class Gp{constructor(R,J,ve,Ee,Be){if(R= z; overscaledZ = ${R}; z = ${ve}`);this.overscaledZ=R,this.wrap=J,this.canonical=new q1(ve,+Ee,+Be),this.key=z0(J,R,ve,Ee,Be)}clone(){return new Gp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)}scaledTo(R){if(R>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${R}; overscaledZ = ${this.overscaledZ}`);let J=this.canonical.z-R;return R>this.canonical.z?new Gp(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Gp(R,this.wrap,R,this.canonical.x>>J,this.canonical.y>>J)}calculateScaledKey(R,J){if(R>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${R}; overscaledZ = ${this.overscaledZ}`);let ve=this.canonical.z-R;return R>this.canonical.z?z0(this.wrap*+J,R,this.canonical.z,this.canonical.x,this.canonical.y):z0(this.wrap*+J,R,R,this.canonical.x>>ve,this.canonical.y>>ve)}isChildOf(R){if(R.wrap!==this.wrap)return!1;let J=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>J&&R.canonical.y===this.canonical.y>>J}children(R){if(this.overscaledZ>=R)return[new Gp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let J=this.canonical.z+1,ve=2*this.canonical.x,Ee=2*this.canonical.y;return[new Gp(J,this.wrap,J,ve,Ee),new Gp(J,this.wrap,J,ve+1,Ee),new Gp(J,this.wrap,J,ve,Ee+1),new Gp(J,this.wrap,J,ve+1,Ee+1)]}isLessThan(R){return this.wrapR.wrap)&&(this.overscaledZR.overscaledZ)&&(this.canonical.xR.canonical.x)&&this.canonical.ythis.max&&(this.max=Mr),Mr=this.dim+1||J<-1||J>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(J+1)*this.stride+(R+1)}unpack(R,J,ve){return R*this.redFactor+J*this.greenFactor+ve*this.blueFactor-this.baseShift}getPixels(){return new Ii({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(R,J,ve){if(this.dim!==R.dim)throw new Error("dem dimension mismatch");let Ee=J*this.dim,Be=J*this.dim+this.dim,Ge=ve*this.dim,ct=ve*this.dim+this.dim;switch(J){case-1:Ee=Be-1;break;case 1:Be=Ee+1}switch(ve){case-1:Ge=ct-1;break;case 1:ct=Ge+1}let At=-J*this.dim,Nt=-ve*this.dim;for(let ar=Ge;ar=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${R} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[R]}}class V1{constructor(R,J,ve,Ee,Be){this.type="Feature",this._vectorTileFeature=R,R._z=J,R._x=ve,R._y=Ee,this.properties=R.properties,this.id=Be}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(R){this._geometry=R}toJSON(){let R={geometry:this.geometry};for(let J in this)J!=="_geometry"&&J!=="_vectorTileFeature"&&(R[J]=this[J]);return R}}class Fv{constructor(R,J){this.tileID=R,this.x=R.canonical.x,this.y=R.canonical.y,this.z=R.canonical.z,this.grid=new Di(po,16,0),this.grid3D=new Di(po,16,0),this.featureIndexArray=new tl,this.promoteId=J}insert(R,J,ve,Ee,Be,Ge){let ct=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(ve,Ee,Be);let At=Ge?this.grid3D:this.grid;for(let Nt=0;Nt=0&&Mr[3]>=0&&At.insert(ct,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 Hx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(R,J,ve,Ee){this.loadVTLayers();let Be=R.params||{},Ge=po/R.tileSize/R.scale,ct=Ec(Be.filter),At=R.queryGeometry,Nt=R.queryPadding*Ge,ar=Xx(At),Mr=this.grid.query(ar.minX-Nt,ar.minY-Nt,ar.maxX+Nt,ar.maxY+Nt),zr=Xx(R.cameraQueryGeometry),Wr=this.grid3D.query(zr.minX-Nt,zr.minY-Nt,zr.maxX+Nt,zr.maxY+Nt,(ja,Ka,Wi,gi)=>function(qi,en,jn,Lo,xs){for(let zn of qi)if(en<=zn.x&&jn<=zn.y&&Lo>=zn.x&&xs>=zn.y)return!0;let vo=[new i(en,jn),new i(en,xs),new i(Lo,xs),new i(Lo,jn)];if(qi.length>2){for(let zn of vo)if(bi(qi,zn))return!0}for(let zn=0;zn(gi||(gi=Tl(qi)),en.queryIntersectsFeature(At,qi,jn,gi,this.z,R.transform,Ge,R.pixelPosMatrix)))}return ia}loadMatchingFeature(R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr){let zr=this.bucketLayerIDs[J];if(Ge&&!function(ja,Ka){for(let Wi=0;Wi=0)return!0;return!1}(Ge,zr))return;let Wr=this.sourceLayerCoder.decode(ve),ia=this.vtLayers[Wr].feature(Ee);if(Be.needGeometry){let ja=Wl(ia,!0);if(!Be.filter(new Fs(this.tileID.overscaledZ),ja,this.tileID.canonical))return}else if(!Be.filter(new Fs(this.tileID.overscaledZ),ia))return;let fa=this.getId(ia,Wr);for(let ja=0;ja{let ct=R instanceof yc?R.get(Ge):null;return ct&&ct.evaluate?ct.evaluate(J,ve,Ee):ct})}function Xx(H){let R=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of H)R=Math.min(R,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return{minX:R,minY:J,maxX:ve,maxY:Ee}}function eA(H,R){return R-H}function Zx(H,R,J,ve,Ee){let Be=[];for(let Ge=0;Ge=ve&&Mr.x>=ve||(ar.x>=ve?ar=new i(ve,ar.y+(ve-ar.x)/(Mr.x-ar.x)*(Mr.y-ar.y))._round():Mr.x>=ve&&(Mr=new i(ve,ar.y+(ve-ar.x)/(Mr.x-ar.x)*(Mr.y-ar.y))._round()),ar.y>=Ee&&Mr.y>=Ee||(ar.y>=Ee?ar=new i(ar.x+(Ee-ar.y)/(Mr.y-ar.y)*(Mr.x-ar.x),Ee)._round():Mr.y>=Ee&&(Mr=new i(ar.x+(Ee-ar.y)/(Mr.y-ar.y)*(Mr.x-ar.x),Ee)._round()),At&&ar.equals(At[At.length-1])||(At=[ar],Be.push(At)),At.push(Mr)))))}}return Be}mi("FeatureIndex",Fv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends i{constructor(R,J,ve,Ee){super(R,J),this.angle=ve,Ee!==void 0&&(this.segment=Ee)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(H,R,J,ve,Ee){if(R.segment===void 0||J===0)return!0;let Be=R,Ge=R.segment+1,ct=0;for(;ct>-J/2;){if(Ge--,Ge<0)return!1;ct-=H[Ge].dist(Be),Be=H[Ge]}ct+=H[Ge].dist(H[Ge+1]),Ge++;let At=[],Nt=0;for(;ctve;)Nt-=At.shift().angleDelta;if(Nt>Ee)return!1;Ge++,ct+=ar.dist(Mr)}return!0}function Yx(H){let R=0;for(let J=0;JNt){let ia=(Nt-At)/Wr,fa=kn.number(Mr.x,zr.x,ia),ja=kn.number(Mr.y,zr.y,ia),Ka=new Wd(fa,ja,zr.angleTo(Mr),ar);return Ka._round(),!Ge||G1(H,Ka,ct,Ge,R)?Ka:void 0}At+=Wr}}function rA(H,R,J,ve,Ee,Be,Ge,ct,At){let Nt=Kx(ve,Be,Ge),ar=Jx(ve,Ee),Mr=ar*Ge,zr=H[0].x===0||H[0].x===At||H[0].y===0||H[0].y===At;return R-Mr=0&&qi=0&&en=0&&zr+Nt<=ar){let jn=new Wd(qi,en,Wi,ia);jn._round(),ve&&!G1(H,jn,Be,ve,Ee)||Wr.push(jn)}}Mr+=Ka}return ct||Wr.length||Ge||(Wr=$x(H,Mr/2,J,ve,Ee,Be,Ge,!0,At)),Wr}mi("Anchor",Wd);let pm=zh;function Qx(H,R,J,ve){let Ee=[],Be=H.image,Ge=Be.pixelRatio,ct=Be.paddedRect.w-2*pm,At=Be.paddedRect.h-2*pm,Nt={x1:H.left,y1:H.top,x2:H.right,y2:H.bottom},ar=Be.stretchX||[[0,ct]],Mr=Be.stretchY||[[0,At]],zr=(xn,cs)=>xn+cs[1]-cs[0],Wr=ar.reduce(zr,0),ia=Mr.reduce(zr,0),fa=ct-Wr,ja=At-ia,Ka=0,Wi=Wr,gi=0,qi=ia,en=0,jn=fa,Lo=0,xs=ja;if(Be.content&&ve){let xn=Be.content,cs=xn[2]-xn[0],No=xn[3]-xn[1];(Be.textFitWidth||Be.textFitHeight)&&(Nt=Fx(H)),Ka=Xd(ar,0,xn[0]),gi=Xd(Mr,0,xn[1]),Wi=Xd(ar,xn[0],xn[2]),qi=Xd(Mr,xn[1],xn[3]),en=xn[0]-Ka,Lo=xn[1]-gi,jn=cs-Wi,xs=No-qi}let vo=Nt.x1,zn=Nt.y1,is=Nt.x2-vo,qo=Nt.y2-zn,Bo=(xn,cs,No,Rs)=>{let Ku=Pg(xn.stretch-Ka,Wi,is,vo),Uu=dm(xn.fixed-en,jn,xn.stretch,Wr),th=Pg(cs.stretch-gi,qi,qo,zn),Hp=dm(cs.fixed-Lo,xs,cs.stretch,ia),Th=Pg(No.stretch-Ka,Wi,is,vo),rh=dm(No.fixed-en,jn,No.stretch,Wr),$h=Pg(Rs.stretch-gi,qi,qo,zn),Qh=dm(Rs.fixed-Lo,xs,Rs.stretch,ia),ep=new i(Ku,th),ff=new i(Th,th),ah=new i(Th,$h),Fh=new i(Ku,$h),Ah=new i(Uu/Ge,Hp/Ge),dh=new i(rh/Ge,Qh/Ge),yf=R*Math.PI/180;if(yf){let pu=Math.sin(yf),fc=Math.cos(yf),Ju=[fc,-pu,pu,fc];ep._matMult(Ju),ff._matMult(Ju),Fh._matMult(Ju),ah._matMult(Ju)}let Rp=xn.stretch+xn.fixed,vp=cs.stretch+cs.fixed;return{tl:ep,tr:ff,bl:Fh,br:ah,tex:{x:Be.paddedRect.x+pm+Rp,y:Be.paddedRect.y+pm+vp,w:No.stretch+No.fixed-Rp,h:Rs.stretch+Rs.fixed-vp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ah,pixelOffsetBR:dh,minFontScaleX:jn/Ge/is,minFontScaleY:xs/Ge/qo,isSDF:J}};if(ve&&(Be.stretchX||Be.stretchY)){let xn=eb(ar,fa,Wr),cs=eb(Mr,ja,ia);for(let No=0;No0&&(fa=Math.max(10,fa),this.circleDiameter=fa)}else{let zr=!((Mr=Ge.image)===null||Mr===void 0)&&Mr.content&&(Ge.image.textFitWidth||Ge.image.textFitHeight)?Fx(Ge):{x1:Ge.left,y1:Ge.top,x2:Ge.right,y2:Ge.bottom};zr.y1=zr.y1*ct-At[0],zr.y2=zr.y2*ct+At[2],zr.x1=zr.x1*ct-At[3],zr.x2=zr.x2*ct+At[1];let Wr=Ge.collisionPadding;if(Wr&&(zr.x1-=Wr[0]*ct,zr.y1-=Wr[1]*ct,zr.x2+=Wr[2]*ct,zr.y2+=Wr[3]*ct),ar){let ia=new i(zr.x1,zr.y1),fa=new i(zr.x2,zr.y1),ja=new i(zr.x1,zr.y2),Ka=new i(zr.x2,zr.y2),Wi=ar*Math.PI/180;ia._rotate(Wi),fa._rotate(Wi),ja._rotate(Wi),Ka._rotate(Wi),zr.x1=Math.min(ia.x,fa.x,ja.x,Ka.x),zr.x2=Math.max(ia.x,fa.x,ja.x,Ka.x),zr.y1=Math.min(ia.y,fa.y,ja.y,Ka.y),zr.y2=Math.max(ia.y,fa.y,ja.y,Ka.y)}R.emplaceBack(J.x,J.y,zr.x1,zr.y1,zr.x2,zr.y2,ve,Ee,Be)}this.boxEndIndex=R.length}}class cd{constructor(R=[],J=(ve,Ee)=>veEe?1:0){if(this.data=R,this.length=this.data.length,this.compare=J,this.length>0)for(let ve=(this.length>>1)-1;ve>=0;ve--)this._down(ve)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],J=this.data.pop();return--this.length>0&&(this.data[0]=J,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:J,compare:ve}=this,Ee=J[R];for(;R>0;){let Be=R-1>>1,Ge=J[Be];if(ve(Ee,Ge)>=0)break;J[R]=Ge,R=Be}J[R]=Ee}_down(R){let{data:J,compare:ve}=this,Ee=this.length>>1,Be=J[R];for(;R=0)break;J[R]=J[Ge],R=Ge}J[R]=Be}}function aA(H,R=1,J=!1){let ve=1/0,Ee=1/0,Be=-1/0,Ge=-1/0,ct=H[0];for(let Wr=0;WrBe)&&(Be=ia.x),(!Wr||ia.y>Ge)&&(Ge=ia.y)}let At=Math.min(Be-ve,Ge-Ee),Nt=At/2,ar=new cd([],iA);if(At===0)return new i(ve,Ee);for(let Wr=ve;WrMr.d||!Mr.d)&&(Mr=Wr,J&&console.log("found best %d after %d probes",Math.round(1e4*Wr.d)/1e4,zr)),Wr.max-Mr.d<=R||(Nt=Wr.h/2,ar.push(new vm(Wr.p.x-Nt,Wr.p.y-Nt,Nt,H)),ar.push(new vm(Wr.p.x+Nt,Wr.p.y-Nt,Nt,H)),ar.push(new vm(Wr.p.x-Nt,Wr.p.y+Nt,Nt,H)),ar.push(new vm(Wr.p.x+Nt,Wr.p.y+Nt,Nt,H)),zr+=4)}return J&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Mr.d}`)),Mr.p}function iA(H,R){return R.max-H.max}function vm(H,R,J,ve){this.p=new i(H,R),this.h=J,this.d=function(Ee,Be){let Ge=!1,ct=1/0;for(let At=0;AtEe.y!=ia.y>Ee.y&&Ee.x<(ia.x-Wr.x)*(Ee.y-Wr.y)/(ia.y-Wr.y)+Wr.x&&(Ge=!Ge),ct=Math.min(ct,xa(Ee,Wr,ia))}}return(Ge?1:-1)*Math.sqrt(ct)}(this.p,ve),this.max=this.d+this.h*Math.SQRT2}var wh;e.aq=void 0,(wh=e.aq||(e.aq={}))[wh.center=1]="center",wh[wh.left=2]="left",wh[wh.right=3]="right",wh[wh.top=4]="top",wh[wh.bottom=5]="bottom",wh[wh["top-left"]=6]="top-left",wh[wh["top-right"]=7]="top-right",wh[wh["bottom-left"]=8]="bottom-left",wh[wh["bottom-right"]=9]="bottom-right";let pv=7,Ov=Number.POSITIVE_INFINITY;function H1(H,R){return R[1]!==Ov?function(J,ve,Ee){let Be=0,Ge=0;switch(ve=Math.abs(ve),Ee=Math.abs(Ee),J){case"top-right":case"top-left":case"top":Ge=Ee-pv;break;case"bottom-right":case"bottom-left":case"bottom":Ge=-Ee+pv}switch(J){case"top-right":case"bottom-right":case"right":Be=-ve;break;case"top-left":case"bottom-left":case"left":Be=ve}return[Be,Ge]}(H,R[0],R[1]):function(J,ve){let Ee=0,Be=0;ve<0&&(ve=0);let Ge=ve/Math.SQRT2;switch(J){case"top-right":case"top-left":Be=Ge-pv;break;case"bottom-right":case"bottom-left":Be=-Ge+pv;break;case"bottom":Be=-ve+pv;break;case"top":Be=ve-pv}switch(J){case"top-right":case"bottom-right":Ee=-Ge;break;case"top-left":case"bottom-left":Ee=Ge;break;case"left":Ee=ve;break;case"right":Ee=-ve}return[Ee,Be]}(H,R[0])}function tb(H,R,J){var ve;let Ee=H.layout,Be=(ve=Ee.get("text-variable-anchor-offset"))===null||ve===void 0?void 0:ve.evaluate(R,{},J);if(Be){let ct=Be.values,At=[];for(let Nt=0;Ntzr*hu);ar.startsWith("top")?Mr[1]-=pv:ar.startsWith("bottom")&&(Mr[1]+=pv),At[Nt+1]=Mr}return new $a(At)}let Ge=Ee.get("text-variable-anchor");if(Ge){let ct;ct=H._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Ee.get("text-radial-offset").evaluate(R,{},J)*hu,Ov]:Ee.get("text-offset").evaluate(R,{},J).map(Nt=>Nt*hu);let At=[];for(let Nt of Ge)At.push(Nt,H1(Nt,ct));return new $a(At)}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,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar){let Mr=Be.textMaxSize.evaluate(R,{});Mr===void 0&&(Mr=Ge);let zr=H.layers[0].layout,Wr=zr.get("icon-offset").evaluate(R,{},ar),ia=ab(J.horizontal),fa=Ge/24,ja=H.tilePixelRatio*fa,Ka=H.tilePixelRatio*Mr/24,Wi=H.tilePixelRatio*ct,gi=H.tilePixelRatio*zr.get("symbol-spacing"),qi=zr.get("text-padding")*H.tilePixelRatio,en=function(xn,cs,No,Rs=1){let Ku=xn.get("icon-padding").evaluate(cs,{},No),Uu=Ku&&Ku.values;return[Uu[0]*Rs,Uu[1]*Rs,Uu[2]*Rs,Uu[3]*Rs]}(zr,R,ar,H.tilePixelRatio),jn=zr.get("text-max-angle")/180*Math.PI,Lo=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",xs=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",vo=zr.get("symbol-placement"),zn=gi/2,is=zr.get("icon-text-fit"),qo;ve&&is!=="none"&&(H.allowVerticalPlacement&&J.vertical&&(qo=Ox(ve,J.vertical,is,zr.get("icon-text-fit-padding"),Wr,fa)),ia&&(ve=Ox(ve,ia,is,zr.get("icon-text-fit-padding"),Wr,fa)));let Bo=(xn,cs)=>{cs.x<0||cs.x>=po||cs.y<0||cs.y>=po||function(No,Rs,Ku,Uu,th,Hp,Th,rh,$h,Qh,ep,ff,ah,Fh,Ah,dh,yf,Rp,vp,pu,fc,Ju,Dp,Qc,mm){let _d=No.addToLineVertexArray(Rs,Ku),fd,Wp,zc,Pf,Xp=0,Zd=0,mp=0,gm=0,J1=-1,zg=-1,xd={},Bv=ti("");if(No.allowVerticalPlacement&&Uu.vertical){let Oh=rh.layout.get("text-rotate").evaluate(fc,{},Qc)+90;zc=new hv($h,Rs,Qh,ep,ff,Uu.vertical,ah,Fh,Ah,Oh),Th&&(Pf=new hv($h,Rs,Qh,ep,ff,Th,yf,Rp,Ah,Oh))}if(th){let Oh=rh.layout.get("icon-rotate").evaluate(fc,{}),Zp=rh.layout.get("icon-text-fit")!=="none",dv=Qx(th,Oh,Dp,Zp),tp=Th?Qx(Th,Oh,Dp,Zp):void 0;Wp=new hv($h,Rs,Qh,ep,ff,th,yf,Rp,!1,Oh),Xp=4*dv.length;let Bh=No.iconSizeData,id=null;Bh.kind==="source"?(id=[yd*rh.layout.get("icon-size").evaluate(fc,{})],id[0]>cv&&y(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)):Bh.kind==="composite"&&(id=[yd*Ju.compositeIconSizes[0].evaluate(fc,{},Qc),yd*Ju.compositeIconSizes[1].evaluate(fc,{},Qc)],(id[0]>cv||id[1]>cv)&&y(`${No.layerIds[0]}: Value for "icon-size" is >= ${k0}. Reduce your "icon-size".`)),No.addSymbols(No.icon,dv,id,pu,vp,fc,e.ah.none,Rs,_d.lineStartIndex,_d.lineLength,-1,Qc),J1=No.icon.placedSymbolArray.length-1,tp&&(Zd=4*tp.length,No.addSymbols(No.icon,tp,id,pu,vp,fc,e.ah.vertical,Rs,_d.lineStartIndex,_d.lineLength,-1,Qc),zg=No.icon.placedSymbolArray.length-1)}let vh=Object.keys(Uu.horizontal);for(let Oh of vh){let Zp=Uu.horizontal[Oh];if(!fd){Bv=ti(Zp.text);let tp=rh.layout.get("text-rotate").evaluate(fc,{},Qc);fd=new hv($h,Rs,Qh,ep,ff,Zp,ah,Fh,Ah,tp)}let dv=Zp.positionedLines.length===1;if(mp+=rb(No,Rs,Zp,Hp,rh,Ah,fc,dh,_d,Uu.vertical?e.ah.horizontal:e.ah.horizontalOnly,dv?vh:[Oh],xd,J1,Ju,Qc),dv)break}Uu.vertical&&(gm+=rb(No,Rs,Uu.vertical,Hp,rh,Ah,fc,dh,_d,e.ah.vertical,["vertical"],xd,zg,Ju,Qc));let lA=fd?fd.boxStartIndex:No.collisionBoxArray.length,Fg=fd?fd.boxEndIndex:No.collisionBoxArray.length,bd=zc?zc.boxStartIndex:No.collisionBoxArray.length,gp=zc?zc.boxEndIndex:No.collisionBoxArray.length,sb=Wp?Wp.boxStartIndex:No.collisionBoxArray.length,uA=Wp?Wp.boxEndIndex:No.collisionBoxArray.length,lb=Pf?Pf.boxStartIndex:No.collisionBoxArray.length,cA=Pf?Pf.boxEndIndex:No.collisionBoxArray.length,ad=-1,B0=(Oh,Zp)=>Oh&&Oh.circleDiameter?Math.max(Oh.circleDiameter,Zp):Zp;ad=B0(fd,ad),ad=B0(zc,ad),ad=B0(Wp,ad),ad=B0(Pf,ad);let Og=ad>-1?1:0;Og&&(ad*=mm/hu),No.glyphOffsetArray.length>=fm.MAX_GLYPHS&&y("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=tb(rh,fc,Qc),[fA,hA]=function(Oh,Zp){let dv=Oh.length,tp=Zp?.values;if(tp?.length>0)for(let Bh=0;Bh=0?xd.right:-1,xd.center>=0?xd.center:-1,xd.left>=0?xd.left:-1,xd.vertical||-1,J1,zg,Bv,lA,Fg,bd,gp,sb,uA,lb,cA,Qh,mp,gm,Xp,Zd,Og,0,ah,ad,fA,hA)}(H,cs,xn,J,ve,Ee,qo,H.layers[0],H.collisionBoxArray,R.index,R.sourceLayerIndex,H.index,ja,[qi,qi,qi,qi],Lo,At,Wi,en,xs,Wr,R,Be,Nt,ar,Ge)};if(vo==="line")for(let xn of Zx(R.geometry,0,0,po,po)){let cs=rA(xn,gi,jn,J.vertical||ia,ve,24,Ka,H.overscaling,po);for(let No of cs)ia&&oA(H,ia.text,zn,No)||Bo(xn,No)}else if(vo==="line-center"){for(let xn of R.geometry)if(xn.length>1){let cs=tA(xn,jn,J.vertical||ia,ve,24,Ka);cs&&Bo(xn,cs)}}else if(R.type==="Polygon")for(let xn of Tc(R.geometry,0)){let cs=aA(xn,16);Bo(xn[0],new Wd(cs.x,cs.y,0))}else if(R.type==="LineString")for(let xn of R.geometry)Bo(xn,new Wd(xn[0].x,xn[0].y,0));else if(R.type==="Point")for(let xn of R.geometry)for(let cs of xn)Bo([cs],new Wd(cs.x,cs.y,0))}function rb(H,R,J,ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia){let fa=function(Wi,gi,qi,en,jn,Lo,xs,vo){let zn=en.layout.get("text-rotate").evaluate(Lo,{})*Math.PI/180,is=[];for(let qo of gi.positionedLines)for(let Bo of qo.positionedGlyphs){if(!Bo.rect)continue;let xn=Bo.rect||{},cs=Ix+1,No=!0,Rs=1,Ku=0,Uu=(jn||vo)&&Bo.vertical,th=Bo.metrics.advance*Bo.scale/2;if(vo&&gi.verticalizable&&(Ku=qo.lineOffset/2-(Bo.imageName?-(hu-Bo.metrics.width*Bo.scale)/2:(Bo.scale-1)*hu)),Bo.imageName){let pu=xs[Bo.imageName];No=pu.sdf,Rs=pu.pixelRatio,cs=zh/Rs}let Hp=jn?[Bo.x+th,Bo.y]:[0,0],Th=jn?[0,0]:[Bo.x+th+qi[0],Bo.y+qi[1]-Ku],rh=[0,0];Uu&&(rh=Th,Th=[0,0]);let $h=Bo.metrics.isDoubleResolution?2:1,Qh=(Bo.metrics.left-cs)*Bo.scale-th+Th[0],ep=(-Bo.metrics.top-cs)*Bo.scale+Th[1],ff=Qh+xn.w/$h*Bo.scale/Rs,ah=ep+xn.h/$h*Bo.scale/Rs,Fh=new i(Qh,ep),Ah=new i(ff,ep),dh=new i(Qh,ah),yf=new i(ff,ah);if(Uu){let pu=new i(-th,th-eh),fc=-Math.PI/2,Ju=hu/2-th,Dp=new i(5-eh-Ju,-(Bo.imageName?Ju:0)),Qc=new i(...rh);Fh._rotateAround(fc,pu)._add(Dp)._add(Qc),Ah._rotateAround(fc,pu)._add(Dp)._add(Qc),dh._rotateAround(fc,pu)._add(Dp)._add(Qc),yf._rotateAround(fc,pu)._add(Dp)._add(Qc)}if(zn){let pu=Math.sin(zn),fc=Math.cos(zn),Ju=[fc,-pu,pu,fc];Fh._matMult(Ju),Ah._matMult(Ju),dh._matMult(Ju),yf._matMult(Ju)}let Rp=new i(0,0),vp=new i(0,0);is.push({tl:Fh,tr:Ah,bl:dh,br:yf,tex:xn,writingMode:gi.writingMode,glyphOffset:Hp,sectionIndex:Bo.sectionIndex,isSDF:No,pixelOffsetTL:Rp,pixelOffsetBR:vp,minFontScaleX:0,minFontScaleY:0})}return is}(0,J,ct,Ee,Be,Ge,ve,H.allowVerticalPlacement),ja=H.textSizeData,Ka=null;ja.kind==="source"?(Ka=[yd*Ee.layout.get("text-size").evaluate(Ge,{})],Ka[0]>cv&&y(`${H.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)):ja.kind==="composite"&&(Ka=[yd*Wr.compositeTextSizes[0].evaluate(Ge,{},ia),yd*Wr.compositeTextSizes[1].evaluate(Ge,{},ia)],(Ka[0]>cv||Ka[1]>cv)&&y(`${H.layerIds[0]}: Value for "text-size" is >= ${k0}. Reduce your "text-size".`)),H.addSymbols(H.text,fa,Ka,ct,Be,Ge,Nt,R,At.lineStartIndex,At.lineLength,zr,ia);for(let Wi of ar)Mr[Wi]=H.text.placedSymbolArray.length-1;return 4*fa.length}function ab(H){for(let R in H)return H[R];return null}function oA(H,R,J,ve){let Ee=H.compareText;if(R in Ee){let Be=Ee[R];for(let Ge=Be.length-1;Ge>=0;Ge--)if(ve.dist(Be[Ge])>4;if(Ee!==1)throw new Error(`Got v${Ee} data when expected v1.`);let Be=ib[15&ve];if(!Be)throw new Error("Unrecognized array type.");let[Ge]=new Uint16Array(R,2,1),[ct]=new Uint32Array(R,4,1);return new X1(ct,Ge,Be,R)}constructor(R,J=64,ve=Float64Array,Ee){if(isNaN(R)||R<0)throw new Error(`Unpexpected numItems value: ${R}.`);this.numItems=+R,this.nodeSize=Math.min(Math.max(+J,2),65535),this.ArrayType=ve,this.IndexArrayType=R<65536?Uint16Array:Uint32Array;let Be=ib.indexOf(this.ArrayType),Ge=2*R*this.ArrayType.BYTES_PER_ELEMENT,ct=R*this.IndexArrayType.BYTES_PER_ELEMENT,At=(8-ct%8)%8;if(Be<0)throw new Error(`Unexpected typed array class: ${ve}.`);Ee&&Ee instanceof ArrayBuffer?(this.data=Ee,this.ids=new this.IndexArrayType(this.data,8,R),this.coords=new this.ArrayType(this.data,8+ct+At,2*R),this._pos=2*R,this._finished=!0):(this.data=new ArrayBuffer(8+Ge+ct+At),this.ids=new this.IndexArrayType(this.data,8,R),this.coords=new this.ArrayType(this.data,8+ct+At,2*R),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Be]),new Uint16Array(this.data,2,1)[0]=J,new Uint32Array(this.data,4,1)[0]=R)}add(R,J){let ve=this._pos>>1;return this.ids[ve]=ve,this.coords[this._pos++]=R,this.coords[this._pos++]=J,ve}finish(){let R=this._pos>>1;if(R!==this.numItems)throw new Error(`Added ${R} items when expected ${this.numItems}.`);return Ig(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(R,J,ve,Ee){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Be,coords:Ge,nodeSize:ct}=this,At=[0,Be.length-1,0],Nt=[];for(;At.length;){let ar=At.pop()||0,Mr=At.pop()||0,zr=At.pop()||0;if(Mr-zr<=ct){for(let ja=zr;ja<=Mr;ja++){let Ka=Ge[2*ja],Wi=Ge[2*ja+1];Ka>=R&&Ka<=ve&&Wi>=J&&Wi<=Ee&&Nt.push(Be[ja])}continue}let Wr=zr+Mr>>1,ia=Ge[2*Wr],fa=Ge[2*Wr+1];ia>=R&&ia<=ve&&fa>=J&&fa<=Ee&&Nt.push(Be[Wr]),(ar===0?R<=ia:J<=fa)&&(At.push(zr),At.push(Wr-1),At.push(1-ar)),(ar===0?ve>=ia:Ee>=fa)&&(At.push(Wr+1),At.push(Mr),At.push(1-ar))}return Nt}within(R,J,ve){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Ee,coords:Be,nodeSize:Ge}=this,ct=[0,Ee.length-1,0],At=[],Nt=ve*ve;for(;ct.length;){let ar=ct.pop()||0,Mr=ct.pop()||0,zr=ct.pop()||0;if(Mr-zr<=Ge){for(let ja=zr;ja<=Mr;ja++)ob(Be[2*ja],Be[2*ja+1],R,J)<=Nt&&At.push(Ee[ja]);continue}let Wr=zr+Mr>>1,ia=Be[2*Wr],fa=Be[2*Wr+1];ob(ia,fa,R,J)<=Nt&&At.push(Ee[Wr]),(ar===0?R-ve<=ia:J-ve<=fa)&&(ct.push(zr),ct.push(Wr-1),ct.push(1-ar)),(ar===0?R+ve>=ia:J+ve>=fa)&&(ct.push(Wr+1),ct.push(Mr),ct.push(1-ar))}return At}}function Ig(H,R,J,ve,Ee,Be){if(Ee-ve<=J)return;let Ge=ve+Ee>>1;nb(H,R,Ge,ve,Ee,Be),Ig(H,R,J,ve,Ge-1,1-Be),Ig(H,R,J,Ge+1,Ee,1-Be)}function nb(H,R,J,ve,Ee,Be){for(;Ee>ve;){if(Ee-ve>600){let Nt=Ee-ve+1,ar=J-ve+1,Mr=Math.log(Nt),zr=.5*Math.exp(2*Mr/3),Wr=.5*Math.sqrt(Mr*zr*(Nt-zr)/Nt)*(ar-Nt/2<0?-1:1);nb(H,R,J,Math.max(ve,Math.floor(J-ar*zr/Nt+Wr)),Math.min(Ee,Math.floor(J+(Nt-ar)*zr/Nt+Wr)),Be)}let Ge=R[2*J+Be],ct=ve,At=Ee;for(F0(H,R,ve,J),R[2*Ee+Be]>Ge&&F0(H,R,ve,Ee);ctGe;)At--}R[2*ve+Be]===Ge?F0(H,R,ve,At):(At++,F0(H,R,At,Ee)),At<=J&&(ve=At+1),J<=At&&(Ee=At-1)}}function F0(H,R,J,ve){Z1(H,J,ve),Z1(R,2*J,2*ve),Z1(R,2*J+1,2*ve+1)}function Z1(H,R,J){let ve=H[R];H[R]=H[J],H[J]=ve}function ob(H,R,J,ve){let Ee=H-J,Be=R-ve;return Ee*Ee+Be*Be}var Rg;e.bg=void 0,(Rg=e.bg||(e.bg={})).create="create",Rg.load="load",Rg.fullLoad="fullLoad";let O0=null,Hf=[],Y1=1e3/60,K1="loadTime",Dg="fullLoadTime",sA={mark(H){performance.mark(H)},frame(H){let R=H;O0!=null&&Hf.push(R-O0),O0=R},clearMetrics(){O0=null,Hf=[],performance.clearMeasures(K1),performance.clearMeasures(Dg);for(let H in e.bg)performance.clearMarks(e.bg[H])},getPerformanceMetrics(){performance.measure(K1,e.bg.create,e.bg.load),performance.measure(Dg,e.bg.create,e.bg.fullLoad);let H=performance.getEntriesByName(K1)[0].duration,R=performance.getEntriesByName(Dg)[0].duration,J=Hf.length,ve=1/(Hf.reduce((Be,Ge)=>Be+Ge,0)/J/1e3),Ee=Hf.filter(Be=>Be>Y1).reduce((Be,Ge)=>Be+(Ge-Y1)/Y1,0);return{loadTime:H,fullLoadTime:R,fps:ve,percentDroppedFrames:Ee/(J+Ee)*100,totalFrames:J}}};e.$=class extends Tr{},e.A=Qa,e.B=Hi,e.C=function(H){if(z==null){let R=H.navigator?H.navigator.userAgent:null;z=!!H.safari||!(!R||!(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return z},e.D=fo,e.E=ee,e.F=class{constructor(H,R){this.target=H,this.mapId=R,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new U1(()=>this.process()),this.subscription=function(J,ve,Ee,Be){return J.addEventListener(ve,Ee,!1),{unsubscribe:()=>{J.removeEventListener(ve,Ee,!1)}}}(this.target,"message",J=>this.receive(J)),this.globalScope=P(self)?H:window}registerMessageHandler(H,R){this.messageHandlers[H]=R}sendAsync(H,R){return new Promise((J,ve)=>{let Ee=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Ee]={resolve:J,reject:ve},R&&R.signal.addEventListener("abort",()=>{delete this.resolveRejects[Ee];let ct={id:Ee,type:"",origin:location.origin,targetMapId:H.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ct)},{once:!0});let Be=[],Ge=Object.assign(Object.assign({},H),{id:Ee,sourceMapId:this.mapId,origin:location.origin,data:eo(H.data,Be)});this.target.postMessage(Ge,{transfer:Be})})}receive(H){let R=H.data,J=R.id;if(!(R.origin!=="file://"&&location.origin!=="file://"&&R.origin!=="resource://android"&&location.origin!=="resource://android"&&R.origin!==location.origin||R.targetMapId&&this.mapId!==R.targetMapId)){if(R.type===""){delete this.tasks[J];let ve=this.abortControllers[J];return delete this.abortControllers[J],void(ve&&ve.abort())}if(P(self)||R.mustQueue)return this.tasks[J]=R,this.taskQueue.push(J),void this.invoker.trigger();this.processTask(J,R)}}process(){if(this.taskQueue.length===0)return;let H=this.taskQueue.shift(),R=this.tasks[H];delete this.tasks[H],this.taskQueue.length>0&&this.invoker.trigger(),R&&this.processTask(H,R)}processTask(H,R){return t(this,void 0,void 0,function*(){if(R.type===""){let Ee=this.resolveRejects[H];return delete this.resolveRejects[H],Ee?void(R.error?Ee.reject(co(R.error)):Ee.resolve(co(R.data))):void 0}if(!this.messageHandlers[R.type])return void this.completeTask(H,new Error(`Could not find a registered handler for ${R.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let J=co(R.data),ve=new AbortController;this.abortControllers[H]=ve;try{let Ee=yield this.messageHandlers[R.type](R.sourceMapId,J,ve);this.completeTask(H,null,Ee)}catch(Ee){this.completeTask(H,Ee)}})}completeTask(H,R,J){let ve=[];delete this.abortControllers[H];let Ee={id:H,type:"",sourceMapId:this.mapId,origin:location.origin,error:R?eo(R):null,data:eo(J,ve)};this.target.postMessage(Ee,{transfer:ve})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=ce,e.H=function(){var H=new Qa(16);return Qa!=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=wg,e.J=function(H,R,J){var ve,Ee,Be,Ge,ct,At,Nt,ar,Mr,zr,Wr,ia,fa=J[0],ja=J[1],Ka=J[2];return R===H?(H[12]=R[0]*fa+R[4]*ja+R[8]*Ka+R[12],H[13]=R[1]*fa+R[5]*ja+R[9]*Ka+R[13],H[14]=R[2]*fa+R[6]*ja+R[10]*Ka+R[14],H[15]=R[3]*fa+R[7]*ja+R[11]*Ka+R[15]):(Ee=R[1],Be=R[2],Ge=R[3],ct=R[4],At=R[5],Nt=R[6],ar=R[7],Mr=R[8],zr=R[9],Wr=R[10],ia=R[11],H[0]=ve=R[0],H[1]=Ee,H[2]=Be,H[3]=Ge,H[4]=ct,H[5]=At,H[6]=Nt,H[7]=ar,H[8]=Mr,H[9]=zr,H[10]=Wr,H[11]=ia,H[12]=ve*fa+ct*ja+Mr*Ka+R[12],H[13]=Ee*fa+At*ja+zr*Ka+R[13],H[14]=Be*fa+Nt*ja+Wr*Ka+R[14],H[15]=Ge*fa+ar*ja+ia*Ka+R[15]),H},e.K=function(H,R,J){var ve=J[0],Ee=J[1],Be=J[2];return H[0]=R[0]*ve,H[1]=R[1]*ve,H[2]=R[2]*ve,H[3]=R[3]*ve,H[4]=R[4]*Ee,H[5]=R[5]*Ee,H[6]=R[6]*Ee,H[7]=R[7]*Ee,H[8]=R[8]*Be,H[9]=R[9]*Be,H[10]=R[10]*Be,H[11]=R[11]*Be,H[12]=R[12],H[13]=R[13],H[14]=R[14],H[15]=R[15],H},e.L=Va,e.M=function(H,R){let J={};for(let ve=0;ve{let R=window.document.createElement("video");return R.muted=!0,new Promise(J=>{R.onloadstart=()=>{J(R)};for(let ve of H){let Ee=window.document.createElement("source");Q(ve)||(R.crossOrigin="Anonymous"),Ee.src=ve,R.appendChild(Ee)}})},e.a4=function(){return p++},e.a5=on,e.a6=fm,e.a7=Ec,e.a8=Wl,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 Ha(H);case"fill":return new Wt(H);case"fill-extrusion":return new kp(H);case"heatmap":return new Dn(H);case"hillshade":return new xl(H);case"line":return new Pv(H);case"raster":return new I0(H);case"symbol":return new zv(H)}},e.aB=u,e.aC=function(H,R){if(!H)return[{command:"setStyle",args:[R]}];let J=[];try{if(!Se(H.version,R.version))return[{command:"setStyle",args:[R]}];Se(H.center,R.center)||J.push({command:"setCenter",args:[R.center]}),Se(H.zoom,R.zoom)||J.push({command:"setZoom",args:[R.zoom]}),Se(H.bearing,R.bearing)||J.push({command:"setBearing",args:[R.bearing]}),Se(H.pitch,R.pitch)||J.push({command:"setPitch",args:[R.pitch]}),Se(H.sprite,R.sprite)||J.push({command:"setSprite",args:[R.sprite]}),Se(H.glyphs,R.glyphs)||J.push({command:"setGlyphs",args:[R.glyphs]}),Se(H.transition,R.transition)||J.push({command:"setTransition",args:[R.transition]}),Se(H.light,R.light)||J.push({command:"setLight",args:[R.light]}),Se(H.terrain,R.terrain)||J.push({command:"setTerrain",args:[R.terrain]}),Se(H.sky,R.sky)||J.push({command:"setSky",args:[R.sky]}),Se(H.projection,R.projection)||J.push({command:"setProjection",args:[R.projection]});let ve={},Ee=[];(function(Ge,ct,At,Nt){let ar;for(ar in ct=ct||{},Ge=Ge||{})Object.prototype.hasOwnProperty.call(Ge,ar)&&(Object.prototype.hasOwnProperty.call(ct,ar)||je(ar,At,Nt));for(ar in ct)Object.prototype.hasOwnProperty.call(ct,ar)&&(Object.prototype.hasOwnProperty.call(Ge,ar)?Se(Ge[ar],ct[ar])||(Ge[ar].type==="geojson"&&ct[ar].type==="geojson"&&nt(Ge,ct,ar)?Re(At,{command:"setGeoJSONSourceData",args:[ar,ct[ar].data]}):at(ar,ct,At,Nt)):Pe(ar,ct,At))})(H.sources,R.sources,Ee,ve);let Be=[];H.layers&&H.layers.forEach(Ge=>{"source"in Ge&&ve[Ge.source]?J.push({command:"removeLayer",args:[Ge.id]}):Be.push(Ge)}),J=J.concat(Ee),function(Ge,ct,At){ct=ct||[];let Nt=(Ge=Ge||[]).map(Ve),ar=ct.map(Ve),Mr=Ge.reduce(he,{}),zr=ct.reduce(he,{}),Wr=Nt.slice(),ia=Object.create(null),fa,ja,Ka,Wi,gi;for(let qi=0,en=0;qi@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(J,ve,Ee,Be)=>{let Ge=Ee||Be;return R[ve]=!Ge||Ge.toLowerCase(),""}),R["max-age"]){let J=parseInt(R["max-age"],10);isNaN(J)?delete R["max-age"]:R["max-age"]=J}return R},e.ab=function(H,R){let J=[];for(let ve in H)ve in R||J.push(ve);return J},e.ac=w,e.ad=function(H,R,J){var ve=Math.sin(J),Ee=Math.cos(J),Be=R[0],Ge=R[1],ct=R[2],At=R[3],Nt=R[4],ar=R[5],Mr=R[6],zr=R[7];return R!==H&&(H[8]=R[8],H[9]=R[9],H[10]=R[10],H[11]=R[11],H[12]=R[12],H[13]=R[13],H[14]=R[14],H[15]=R[15]),H[0]=Be*Ee+Nt*ve,H[1]=Ge*Ee+ar*ve,H[2]=ct*Ee+Mr*ve,H[3]=At*Ee+zr*ve,H[4]=Nt*Ee-Be*ve,H[5]=ar*Ee-Ge*ve,H[6]=Mr*Ee-ct*ve,H[7]=zr*Ee-At*ve,H},e.ae=function(H){var R=new Qa(16);return R[0]=H[0],R[1]=H[1],R[2]=H[2],R[3]=H[3],R[4]=H[4],R[5]=H[5],R[6]=H[6],R[7]=H[7],R[8]=H[8],R[9]=H[9],R[10]=H[10],R[11]=H[11],R[12]=H[12],R[13]=H[13],R[14]=H[14],R[15]=H[15],R},e.af=hn,e.ag=function(H,R){let J=0,ve=0;if(H.kind==="constant")ve=H.layoutSize;else if(H.kind!=="source"){let{interpolationType:Ee,minZoom:Be,maxZoom:Ge}=H,ct=Ee?w(ao.interpolationFactor(Ee,R,Be,Ge),0,1):0;H.kind==="camera"?ve=kn.number(H.minSize,H.maxSize,ct):J=ct}return{uSizeT:J,uSize:ve}},e.ai=function(H,{uSize:R,uSizeT:J},{lowerSize:ve,upperSize:Ee}){return H.kind==="source"?ve/yd:H.kind==="composite"?kn.number(ve/yd,Ee/yd,J):R},e.aj=z1,e.ak=function(H,R,J,ve){let Ee=R.y-H.y,Be=R.x-H.x,Ge=ve.y-J.y,ct=ve.x-J.x,At=Ge*Be-ct*Ee;if(At===0)return null;let Nt=(ct*(H.y-J.y)-Ge*(H.x-J.x))/At;return new i(H.x+Nt*Be,H.y+Nt*Ee)},e.al=Zx,e.am=_c,e.an=di,e.ao=function(H){let R=1/0,J=1/0,ve=-1/0,Ee=-1/0;for(let Be of H)R=Math.min(R,Be.x),J=Math.min(J,Be.y),ve=Math.max(ve,Be.x),Ee=Math.max(Ee,Be.y);return[R,J,ve,Ee]},e.ap=hu,e.ar=D1,e.as=function(H,R){var J=R[0],ve=R[1],Ee=R[2],Be=R[3],Ge=R[4],ct=R[5],At=R[6],Nt=R[7],ar=R[8],Mr=R[9],zr=R[10],Wr=R[11],ia=R[12],fa=R[13],ja=R[14],Ka=R[15],Wi=J*ct-ve*Ge,gi=J*At-Ee*Ge,qi=J*Nt-Be*Ge,en=ve*At-Ee*ct,jn=ve*Nt-Be*ct,Lo=Ee*Nt-Be*At,xs=ar*fa-Mr*ia,vo=ar*ja-zr*ia,zn=ar*Ka-Wr*ia,is=Mr*ja-zr*fa,qo=Mr*Ka-Wr*fa,Bo=zr*Ka-Wr*ja,xn=Wi*Bo-gi*qo+qi*is+en*zn-jn*vo+Lo*xs;return xn?(H[0]=(ct*Bo-At*qo+Nt*is)*(xn=1/xn),H[1]=(Ee*qo-ve*Bo-Be*is)*xn,H[2]=(fa*Lo-ja*jn+Ka*en)*xn,H[3]=(zr*jn-Mr*Lo-Wr*en)*xn,H[4]=(At*zn-Ge*Bo-Nt*vo)*xn,H[5]=(J*Bo-Ee*zn+Be*vo)*xn,H[6]=(ja*qi-ia*Lo-Ka*gi)*xn,H[7]=(ar*Lo-zr*qi+Wr*gi)*xn,H[8]=(Ge*qo-ct*zn+Nt*xs)*xn,H[9]=(ve*zn-J*qo-Be*xs)*xn,H[10]=(ia*jn-fa*qi+Ka*Wi)*xn,H[11]=(Mr*qi-ar*jn-Wr*Wi)*xn,H[12]=(ct*vo-Ge*is-At*xs)*xn,H[13]=(J*is-ve*vo+Ee*xs)*xn,H[14]=(fa*gi-ia*en-ja*Wi)*xn,H[15]=(ar*en-Mr*gi+zr*Wi)*xn,H):null},e.at=W1,e.au=Mg,e.av=X1,e.aw=function(){let H={},R=te.$version;for(let J in te.$root){let ve=te.$root[J];if(ve.required){let Ee=null;Ee=J==="version"?R:ve.type==="array"?[]:{},Ee!=null&&(H[J]=Ee)}}return H},e.ax=An,e.ay=Y,e.az=function(H){H=H.slice();let R=Object.create(null);for(let J=0;J25||ve<0||ve>=1||J<0||J>=1)},e.bc=function(H,R){return H[0]=R[0],H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=R[1],H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=R[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=de,e.bi=function(H,R){$.REGISTERED_PROTOCOLS[H]=R},e.bj=function(H){delete $.REGISTERED_PROTOCOLS[H]},e.bk=function(H,R){let J={};for(let Ee=0;EeBo*hu)}let vo=Ge?"center":J.get("text-justify").evaluate(Nt,{},H.canonical),zn=J.get("symbol-placement")==="point"?J.get("text-max-width").evaluate(Nt,{},H.canonical)*hu:1/0,is=()=>{H.bucket.allowVerticalPlacement&&yo(qi)&&(ia.vertical=M0(fa,H.glyphMap,H.glyphPositions,H.imagePositions,ar,zn,Be,Lo,"left",jn,Ka,e.ah.vertical,!0,zr,Mr))};if(!Ge&&xs){let qo=new Set;if(vo==="auto")for(let xn=0;xnt(void 0,void 0,void 0,function*(){if(H.byteLength===0)return createImageBitmap(new ImageData(1,1));let R=new Blob([new Uint8Array(H)],{type:"image/png"});try{return createImageBitmap(R)}catch(J){throw new Error(`Could not load image because of ${J.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((R,J)=>{let ve=new Image;ve.onload=()=>{R(ve),URL.revokeObjectURL(ve.src),ve.onload=null,window.requestAnimationFrame(()=>{ve.src=N})},ve.onerror=()=>J(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 Ee=new Blob([new Uint8Array(H)],{type:"image/png"});ve.src=H.byteLength?URL.createObjectURL(Ee):N}),e.g=ue,e.h=(H,R)=>X(E(H,{type:"json"}),R),e.i=P,e.j=j,e.k=ae,e.l=(H,R)=>X(E(H,{type:"arrayBuffer"}),R),e.m=X,e.n=function(H){return new P1(H).readFields(mk,[])},e.o=Rn,e.p=R1,e.q=Oe,e.r=Ci,e.s=Q,e.t=Pi,e.u=li,e.v=te,e.w=y,e.x=function([H,R,J]){return R+=90,R*=Math.PI/180,J*=Math.PI/180,{x:H*Math.cos(R)*Math.sin(J),y:H*Math.sin(R)*Math.sin(J),z:H*Math.cos(J)}},e.y=kn,e.z=Fs}),S("worker",["./shared"],function(e){"use strict";class t{constructor(Fe){this.keyCache={},Fe&&this.replace(Fe)}replace(Fe){this._layerConfigs={},this._layers={},this.update(Fe,[])}update(Fe,Ye){for(let Le of Fe){this._layerConfigs[Le.id]=Le;let We=this._layers[Le.id]=e.aA(Le);We._featureFilter=e.a7(We.filter),this.keyCache[Le.id]&&delete this.keyCache[Le.id]}for(let Le of Ye)delete this.keyCache[Le],delete this._layerConfigs[Le],delete this._layers[Le];this.familiesBySource={};let Ae=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let Le of Ae){let We=Le.map(Pt=>this._layers[Pt.id]),Ke=We[0];if(Ke.visibility==="none")continue;let st=Ke.source||"",ot=this.familiesBySource[st];ot||(ot=this.familiesBySource[st]={});let Ut=Ke.sourceLayer||"_geojsonTileLayer",Ct=ot[Ut];Ct||(Ct=ot[Ut]=[]),Ct.push(We)}}}class r{constructor(Fe){let Ye={},Ae=[];for(let st in Fe){let ot=Fe[st],Ut=Ye[st]={};for(let Ct in ot){let Pt=ot[+Ct];if(!Pt||Pt.bitmap.width===0||Pt.bitmap.height===0)continue;let jt={x:0,y:0,w:Pt.bitmap.width+2,h:Pt.bitmap.height+2};Ae.push(jt),Ut[Ct]={rect:jt,metrics:Pt.metrics}}}let{w:Le,h:We}=e.p(Ae),Ke=new e.o({width:Le||1,height:We||1});for(let st in Fe){let ot=Fe[st];for(let Ut in ot){let Ct=ot[+Ut];if(!Ct||Ct.bitmap.width===0||Ct.bitmap.height===0)continue;let Pt=Ye[st][Ut].rect;e.o.copy(Ct.bitmap,Ke,{x:0,y:0},{x:Pt.x+1,y:Pt.y+1},Ct.bitmap)}}this.image=Ke,this.positions=Ye}}e.bl("GlyphAtlas",r);class o{constructor(Fe){this.tileID=new e.S(Fe.tileID.overscaledZ,Fe.tileID.wrap,Fe.tileID.canonical.z,Fe.tileID.canonical.x,Fe.tileID.canonical.y),this.uid=Fe.uid,this.zoom=Fe.zoom,this.pixelRatio=Fe.pixelRatio,this.tileSize=Fe.tileSize,this.source=Fe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Fe.showCollisionBoxes,this.collectResourceTiming=!!Fe.collectResourceTiming,this.returnDependencies=!!Fe.returnDependencies,this.promoteId=Fe.promoteId,this.inFlightDependencies=[]}parse(Fe,Ye,Ae,Le){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Fe,this.collisionBoxArray=new e.a5;let We=new e.bm(Object.keys(Fe.layers).sort()),Ke=new e.bn(this.tileID,this.promoteId);Ke.bucketLayerIDs=[];let st={},ot={featureIndex:Ke,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ae},Ut=Ye.familiesBySource[this.source];for(let Wa in Ut){let Ca=Fe.layers[Wa];if(!Ca)continue;Ca.version===1&&e.w(`Vector tile source "${this.source}" layer "${Wa}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let hi=We.encode(Wa),wi=[];for(let Yt=0;Yt=Rt.maxzoom||Rt.visibility!=="none"&&(a(Yt,this.zoom,Ae),(st[Rt.id]=Rt.createBucket({index:Ke.bucketLayerIDs.length,layers:Yt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hi,sourceID:this.source})).populate(wi,ot,this.tileID.canonical),Ke.bucketLayerIDs.push(Yt.map(Zt=>Zt.id)))}}let Ct=e.aF(ot.glyphDependencies,Wa=>Object.keys(Wa).map(Number));this.inFlightDependencies.forEach(Wa=>Wa?.abort()),this.inFlightDependencies=[];let Pt=Promise.resolve({});if(Object.keys(Ct).length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),Pt=Le.sendAsync({type:"GG",data:{stacks:Ct,source:this.source,tileID:this.tileID,type:"glyphs"}},Wa)}let jt=Object.keys(ot.iconDependencies),cr=Promise.resolve({});if(jt.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),cr=Le.sendAsync({type:"GI",data:{icons:jt,source:this.source,tileID:this.tileID,type:"icons"}},Wa)}let or=Object.keys(ot.patternDependencies),nr=Promise.resolve({});if(or.length){let Wa=new AbortController;this.inFlightDependencies.push(Wa),nr=Le.sendAsync({type:"GI",data:{icons:or,source:this.source,tileID:this.tileID,type:"patterns"}},Wa)}let[Pr,_a,Fa]=yield Promise.all([Pt,cr,nr]),Ra=new r(Pr),qa=new e.bo(_a,Fa);for(let Wa in st){let Ca=st[Wa];Ca instanceof e.a6?(a(Ca.layers,this.zoom,Ae),e.bp({bucket:Ca,glyphMap:Pr,glyphPositions:Ra.positions,imageMap:_a,imagePositions:qa.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Ca.hasPattern&&(Ca instanceof e.bq||Ca instanceof e.br||Ca instanceof e.bs)&&(a(Ca.layers,this.zoom,Ae),Ca.addFeatures(ot,this.tileID.canonical,qa.patternPositions))}return this.status="done",{buckets:Object.values(st).filter(Wa=>!Wa.isEmpty()),featureIndex:Ke,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ra.image,imageAtlas:qa,glyphMap:this.returnDependencies?Pr:null,iconMap:this.returnDependencies?_a:null,glyphPositions:this.returnDependencies?Ra.positions:null}})}}function a(_t,Fe,Ye){let Ae=new e.z(Fe);for(let Le of _t)Le.recalculate(Ae,Ye)}class i{constructor(Fe,Ye,Ae){this.actor=Fe,this.layerIndex=Ye,this.availableImages=Ae,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=yield e.l(Fe.request,Ye);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Ae.data)),rawData:Ae.data,cacheControl:Ae.cacheControl,expires:Ae.expires}}catch(Le){let We=new Uint8Array(Ae.data),Ke=`Unable to parse the tile at ${Fe.request.url}, `;throw Ke+=We[0]===31&&We[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Le.message}`,new Error(Ke)}})}loadTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=Fe.uid,Ae=!!(Fe&&Fe.request&&Fe.request.collectResourceTiming)&&new e.bv(Fe.request),Le=new o(Fe);this.loading[Ye]=Le;let We=new AbortController;Le.abort=We;try{let Ke=yield this.loadVectorTile(Fe,We);if(delete this.loading[Ye],!Ke)return null;let st=Ke.rawData,ot={};Ke.expires&&(ot.expires=Ke.expires),Ke.cacheControl&&(ot.cacheControl=Ke.cacheControl);let Ut={};if(Ae){let Pt=Ae.finish();Pt&&(Ut.resourceTiming=JSON.parse(JSON.stringify(Pt)))}Le.vectorTile=Ke.vectorTile;let Ct=Le.parse(Ke.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ye]=Le,this.fetching[Ye]={rawTileData:st,cacheControl:ot,resourceTiming:Ut};try{let Pt=yield Ct;return e.e({rawTileData:st.slice(0)},Pt,ot,Ut)}finally{delete this.fetching[Ye]}}catch(Ke){throw delete this.loading[Ye],Le.status="done",this.loaded[Ye]=Le,Ke}})}reloadTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=Fe.uid;if(!this.loaded||!this.loaded[Ye])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ae=this.loaded[Ye];if(Ae.showCollisionBoxes=Fe.showCollisionBoxes,Ae.status==="parsing"){let Le=yield Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor),We;if(this.fetching[Ye]){let{rawTileData:Ke,cacheControl:st,resourceTiming:ot}=this.fetching[Ye];delete this.fetching[Ye],We=e.e({rawTileData:Ke.slice(0)},Le,st,ot)}else We=Le;return We}if(Ae.status==="done"&&Ae.vectorTile)return Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Fe){return e._(this,void 0,void 0,function*(){let Ye=this.loading,Ae=Fe.uid;Ye&&Ye[Ae]&&Ye[Ae].abort&&(Ye[Ae].abort.abort(),delete Ye[Ae])})}removeTile(Fe){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Fe.uid]&&delete this.loaded[Fe.uid]})}}class n{constructor(){this.loaded={}}loadTile(Fe){return e._(this,void 0,void 0,function*(){let{uid:Ye,encoding:Ae,rawImageData:Le,redFactor:We,greenFactor:Ke,blueFactor:st,baseShift:ot}=Fe,Ut=Le.width+2,Ct=Le.height+2,Pt=e.b(Le)?new e.R({width:Ut,height:Ct},yield e.bw(Le,-1,-1,Ut,Ct)):Le,jt=new e.bx(Ye,Pt,Ae,We,Ke,st,ot);return this.loaded=this.loaded||{},this.loaded[Ye]=jt,jt})}removeTile(Fe){let Ye=this.loaded,Ae=Fe.uid;Ye&&Ye[Ae]&&delete Ye[Ae]}}function s(_t,Fe){if(_t.length!==0){h(_t[0],Fe);for(var Ye=1;Ye<_t.length;Ye++)h(_t[Ye],!Fe)}}function h(_t,Fe){for(var Ye=0,Ae=0,Le=0,We=_t.length,Ke=We-1;Le=Math.abs(st)?Ye-ot+st:st-ot+Ye,Ye=ot}Ye+Ae>=0!=!!Fe&&_t.reverse()}var f=e.by(function _t(Fe,Ye){var Ae,Le=Fe&&Fe.type;if(Le==="FeatureCollection")for(Ae=0;Ae>31}function P(_t,Fe){for(var Ye=_t.loadGeometry(),Ae=_t.type,Le=0,We=0,Ke=Ye.length,st=0;st_t},O=Math.fround||(L=new Float32Array(1),_t=>(L[0]=+_t,L[0]));var L;let U=3,B=5,W=6;class ${constructor(Fe){this.options=Object.assign(Object.create(N),Fe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Fe){let{log:Ye,minZoom:Ae,maxZoom:Le}=this.options;Ye&&console.time("total time");let We=`prepare ${Fe.length} points`;Ye&&console.time(We),this.points=Fe;let Ke=[];for(let ot=0;ot=Ae;ot--){let Ut=+Date.now();st=this.trees[ot]=this._createTree(this._cluster(st,ot)),Ye&&console.log("z%d: %d clusters in %dms",ot,st.numItems,+Date.now()-Ut)}return Ye&&console.timeEnd("total time"),this}getClusters(Fe,Ye){let Ae=((Fe[0]+180)%360+360)%360-180,Le=Math.max(-90,Math.min(90,Fe[1])),We=Fe[2]===180?180:((Fe[2]+180)%360+360)%360-180,Ke=Math.max(-90,Math.min(90,Fe[3]));if(Fe[2]-Fe[0]>=360)Ae=-180,We=180;else if(Ae>We){let Pt=this.getClusters([Ae,Le,180,Ke],Ye),jt=this.getClusters([-180,Le,We,Ke],Ye);return Pt.concat(jt)}let st=this.trees[this._limitZoom(Ye)],ot=st.range(de(Ae),Y(Ke),de(We),Y(Le)),Ut=st.data,Ct=[];for(let Pt of ot){let jt=this.stride*Pt;Ct.push(Ut[jt+B]>1?ue(Ut,jt,this.clusterProps):this.points[Ut[jt+U]])}return Ct}getChildren(Fe){let Ye=this._getOriginId(Fe),Ae=this._getOriginZoom(Fe),Le="No cluster with the specified id.",We=this.trees[Ae];if(!We)throw new Error(Le);let Ke=We.data;if(Ye*this.stride>=Ke.length)throw new Error(Le);let st=this.options.radius/(this.options.extent*Math.pow(2,Ae-1)),ot=We.within(Ke[Ye*this.stride],Ke[Ye*this.stride+1],st),Ut=[];for(let Ct of ot){let Pt=Ct*this.stride;Ke[Pt+4]===Fe&&Ut.push(Ke[Pt+B]>1?ue(Ke,Pt,this.clusterProps):this.points[Ke[Pt+U]])}if(Ut.length===0)throw new Error(Le);return Ut}getLeaves(Fe,Ye,Ae){let Le=[];return this._appendLeaves(Le,Fe,Ye=Ye||10,Ae=Ae||0,0),Le}getTile(Fe,Ye,Ae){let Le=this.trees[this._limitZoom(Fe)],We=Math.pow(2,Fe),{extent:Ke,radius:st}=this.options,ot=st/Ke,Ut=(Ae-ot)/We,Ct=(Ae+1+ot)/We,Pt={features:[]};return this._addTileFeatures(Le.range((Ye-ot)/We,Ut,(Ye+1+ot)/We,Ct),Le.data,Ye,Ae,We,Pt),Ye===0&&this._addTileFeatures(Le.range(1-ot/We,Ut,1,Ct),Le.data,We,Ae,We,Pt),Ye===We-1&&this._addTileFeatures(Le.range(0,Ut,ot/We,Ct),Le.data,-1,Ae,We,Pt),Pt.features.length?Pt:null}getClusterExpansionZoom(Fe){let Ye=this._getOriginZoom(Fe)-1;for(;Ye<=this.options.maxZoom;){let Ae=this.getChildren(Fe);if(Ye++,Ae.length!==1)break;Fe=Ae[0].properties.cluster_id}return Ye}_appendLeaves(Fe,Ye,Ae,Le,We){let Ke=this.getChildren(Ye);for(let st of Ke){let ot=st.properties;if(ot&&ot.cluster?We+ot.point_count<=Le?We+=ot.point_count:We=this._appendLeaves(Fe,ot.cluster_id,Ae,Le,We):We1,Ct,Pt,jt;if(Ut)Ct=ce(Ye,ot,this.clusterProps),Pt=Ye[ot],jt=Ye[ot+1];else{let nr=this.points[Ye[ot+U]];Ct=nr.properties;let[Pr,_a]=nr.geometry.coordinates;Pt=de(Pr),jt=Y(_a)}let cr={type:1,geometry:[[Math.round(this.options.extent*(Pt*We-Ae)),Math.round(this.options.extent*(jt*We-Le))]],tags:Ct},or;or=Ut||this.options.generateId?Ye[ot+U]:this.points[Ye[ot+U]].id,or!==void 0&&(cr.id=or),Ke.features.push(cr)}}_limitZoom(Fe){return Math.max(this.options.minZoom,Math.min(Math.floor(+Fe),this.options.maxZoom+1))}_cluster(Fe,Ye){let{radius:Ae,extent:Le,reduce:We,minPoints:Ke}=this.options,st=Ae/(Le*Math.pow(2,Ye)),ot=Fe.data,Ut=[],Ct=this.stride;for(let Pt=0;PtYe&&(Pr+=ot[Fa+B])}if(Pr>nr&&Pr>=Ke){let _a,Fa=jt*nr,Ra=cr*nr,qa=-1,Wa=((Pt/Ct|0)<<5)+(Ye+1)+this.points.length;for(let Ca of or){let hi=Ca*Ct;if(ot[hi+2]<=Ye)continue;ot[hi+2]=Ye;let wi=ot[hi+B];Fa+=ot[hi]*wi,Ra+=ot[hi+1]*wi,ot[hi+4]=Wa,We&&(_a||(_a=this._map(ot,Pt,!0),qa=this.clusterProps.length,this.clusterProps.push(_a)),We(_a,this._map(ot,hi)))}ot[Pt+4]=Wa,Ut.push(Fa/Pr,Ra/Pr,1/0,Wa,-1,Pr),We&&Ut.push(qa)}else{for(let _a=0;_a1)for(let _a of or){let Fa=_a*Ct;if(!(ot[Fa+2]<=Ye)){ot[Fa+2]=Ye;for(let Ra=0;Ra>5}_getOriginZoom(Fe){return(Fe-this.points.length)%32}_map(Fe,Ye,Ae){if(Fe[Ye+B]>1){let Ke=this.clusterProps[Fe[Ye+W]];return Ae?Object.assign({},Ke):Ke}let Le=this.points[Fe[Ye+U]].properties,We=this.options.map(Le);return Ae&&We===Le?Object.assign({},We):We}}function ue(_t,Fe,Ye){return{type:"Feature",id:_t[Fe+U],properties:ce(_t,Fe,Ye),geometry:{type:"Point",coordinates:[(Ae=_t[Fe],360*(Ae-.5)),X(_t[Fe+1])]}};var Ae}function ce(_t,Fe,Ye){let Ae=_t[Fe+B],Le=Ae>=1e4?`${Math.round(Ae/1e3)}k`:Ae>=1e3?Math.round(Ae/100)/10+"k":Ae,We=_t[Fe+W],Ke=We===-1?{}:Object.assign({},Ye[We]);return Object.assign(Ke,{cluster:!0,cluster_id:_t[Fe+U],point_count:Ae,point_count_abbreviated:Le})}function de(_t){return _t/360+.5}function Y(_t){let Fe=Math.sin(_t*Math.PI/180),Ye=.5-.25*Math.log((1+Fe)/(1-Fe))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function X(_t){let Fe=(180-360*_t)*Math.PI/180;return 360*Math.atan(Math.exp(Fe))/Math.PI-90}function Q(_t,Fe,Ye,Ae){let Le=Ae,We=Fe+(Ye-Fe>>1),Ke,st=Ye-Fe,ot=_t[Fe],Ut=_t[Fe+1],Ct=_t[Ye],Pt=_t[Ye+1];for(let jt=Fe+3;jtLe)Ke=jt,Le=cr;else if(cr===Le){let or=Math.abs(jt-We);orAe&&(Ke-Fe>3&&Q(_t,Fe,Ke,Ae),_t[Ke+2]=Le,Ye-Ke>3&&Q(_t,Ke,Ye,Ae))}function V(_t,Fe,Ye,Ae,Le,We){let Ke=Le-Ye,st=We-Ae;if(Ke!==0||st!==0){let ot=((_t-Ye)*Ke+(Fe-Ae)*st)/(Ke*Ke+st*st);ot>1?(Ye=Le,Ae=We):ot>0&&(Ye+=Ke*ot,Ae+=st*ot)}return Ke=_t-Ye,st=Fe-Ae,Ke*Ke+st*st}function le(_t,Fe,Ye,Ae){let Le={id:_t??null,type:Fe,geometry:Ye,tags:Ae,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Fe==="Point"||Fe==="MultiPoint"||Fe==="LineString")ae(Le,Ye);else if(Fe==="Polygon")ae(Le,Ye[0]);else if(Fe==="MultiLineString")for(let We of Ye)ae(Le,We);else if(Fe==="MultiPolygon")for(let We of Ye)ae(Le,We[0]);return Le}function ae(_t,Fe){for(let Ye=0;Ye0&&(Ke+=Ae?(Le*Ct-Ut*We)/2:Math.sqrt(Math.pow(Ut-Le,2)+Math.pow(Ct-We,2))),Le=Ut,We=Ct}let st=Fe.length-3;Fe[2]=1,Q(Fe,0,st,Ye),Fe[st+2]=1,Fe.size=Math.abs(Ke),Fe.start=0,Fe.end=Fe.size}function pe(_t,Fe,Ye,Ae){for(let Le=0;Le<_t.length;Le++){let We=[];te(_t[Le],We,Ye,Ae),Fe.push(We)}}function we(_t){return _t/360+.5}function Se(_t){let Fe=Math.sin(_t*Math.PI/180),Ye=.5-.25*Math.log((1+Fe)/(1-Fe))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function Re(_t,Fe,Ye,Ae,Le,We,Ke,st){if(Ae/=Fe,We>=(Ye/=Fe)&&Ke=Ae)return null;let ot=[];for(let Ut of _t){let Ct=Ut.geometry,Pt=Ut.type,jt=Le===0?Ut.minX:Ut.minY,cr=Le===0?Ut.maxX:Ut.maxY;if(jt>=Ye&&cr=Ae)continue;let or=[];if(Pt==="Point"||Pt==="MultiPoint")Pe(Ct,or,Ye,Ae,Le);else if(Pt==="LineString")je(Ct,or,Ye,Ae,Le,!1,st.lineMetrics);else if(Pt==="MultiLineString")nt(Ct,or,Ye,Ae,Le,!1);else if(Pt==="Polygon")nt(Ct,or,Ye,Ae,Le,!0);else if(Pt==="MultiPolygon")for(let nr of Ct){let Pr=[];nt(nr,Pr,Ye,Ae,Le,!0),Pr.length&&or.push(Pr)}if(or.length){if(st.lineMetrics&&Pt==="LineString"){for(let nr of or)ot.push(le(Ut.id,Pt,nr,Ut.tags));continue}Pt!=="LineString"&&Pt!=="MultiLineString"||(or.length===1?(Pt="LineString",or=or[0]):Pt="MultiLineString"),Pt!=="Point"&&Pt!=="MultiPoint"||(Pt=or.length===3?"Point":"MultiPoint"),ot.push(le(Ut.id,Pt,or,Ut.tags))}}return ot.length?ot:null}function Pe(_t,Fe,Ye,Ae,Le){for(let We=0;We<_t.length;We+=3){let Ke=_t[We+Le];Ke>=Ye&&Ke<=Ae&&tt(Fe,_t[We],_t[We+1],_t[We+2])}}function je(_t,Fe,Ye,Ae,Le,We,Ke){let st=at(_t),ot=Le===0?Ve:he,Ut,Ct,Pt=_t.start;for(let Pr=0;Pr<_t.length-3;Pr+=3){let _a=_t[Pr],Fa=_t[Pr+1],Ra=_t[Pr+2],qa=_t[Pr+3],Wa=_t[Pr+4],Ca=Le===0?_a:Fa,hi=Le===0?qa:Wa,wi=!1;Ke&&(Ut=Math.sqrt(Math.pow(_a-qa,2)+Math.pow(Fa-Wa,2))),CaYe&&(Ct=ot(st,_a,Fa,qa,Wa,Ye),Ke&&(st.start=Pt+Ut*Ct)):Ca>Ae?hi=Ye&&(Ct=ot(st,_a,Fa,qa,Wa,Ye),wi=!0),hi>Ae&&Ca<=Ae&&(Ct=ot(st,_a,Fa,qa,Wa,Ae),wi=!0),!We&&wi&&(Ke&&(st.end=Pt+Ut*Ct),Fe.push(st),st=at(_t)),Ke&&(Pt+=Ut)}let jt=_t.length-3,cr=_t[jt],or=_t[jt+1],nr=Le===0?cr:or;nr>=Ye&&nr<=Ae&&tt(st,cr,or,_t[jt+2]),jt=st.length-3,We&&jt>=3&&(st[jt]!==st[0]||st[jt+1]!==st[1])&&tt(st,st[0],st[1],st[2]),st.length&&Fe.push(st)}function at(_t){let Fe=[];return Fe.size=_t.size,Fe.start=_t.start,Fe.end=_t.end,Fe}function nt(_t,Fe,Ye,Ae,Le,We){for(let Ke of _t)je(Ke,Fe,Ye,Ae,Le,We,!1)}function tt(_t,Fe,Ye,Ae){_t.push(Fe,Ye,Ae)}function Ve(_t,Fe,Ye,Ae,Le,We){let Ke=(We-Fe)/(Ae-Fe);return tt(_t,We,Ye+(Le-Ye)*Ke,1),Ke}function he(_t,Fe,Ye,Ae,Le,We){let Ke=(We-Ye)/(Le-Ye);return tt(_t,Fe+(Ae-Fe)*Ke,We,1),Ke}function se(_t,Fe){let Ye=[];for(let Ae=0;Ae<_t.length;Ae++){let Le=_t[Ae],We=Le.type,Ke;if(We==="Point"||We==="MultiPoint"||We==="LineString")Ke=ne(Le.geometry,Fe);else if(We==="MultiLineString"||We==="Polygon"){Ke=[];for(let st of Le.geometry)Ke.push(ne(st,Fe))}else if(We==="MultiPolygon"){Ke=[];for(let st of Le.geometry){let ot=[];for(let Ut of st)ot.push(ne(Ut,Fe));Ke.push(ot)}}Ye.push(le(Le.id,We,Ke,Le.tags))}return Ye}function ne(_t,Fe){let Ye=[];Ye.size=_t.size,_t.start!==void 0&&(Ye.start=_t.start,Ye.end=_t.end);for(let Ae=0;Ae<_t.length;Ae+=3)Ye.push(_t[Ae]+Fe,_t[Ae+1],_t[Ae+2]);return Ye}function Ce(_t,Fe){if(_t.transformed)return _t;let Ye=1<<_t.z,Ae=_t.x,Le=_t.y;for(let We of _t.features){let Ke=We.geometry,st=We.type;if(We.geometry=[],st===1)for(let ot=0;ot0&&Fe.size<(Le?Ke:Ae))return void(Ye.numPoints+=Fe.length/3);let st=[];for(let ot=0;otKe)&&(Ye.numSimplified++,st.push(Fe[ot],Fe[ot+1])),Ye.numPoints++;Le&&function(ot,Ut){let Ct=0;for(let Pt=0,jt=ot.length,cr=jt-2;Pt0===Ut)for(let Pt=0,jt=ot.length;Pt24)throw new Error("maxZoom should be in the 0-24 range");if(Ye.promoteId&&Ye.generateId)throw new Error("promoteId and generateId cannot be used together.");let Le=function(We,Ke){let st=[];if(We.type==="FeatureCollection")for(let ot=0;ot1&&console.time("creation"),cr=this.tiles[jt]=rt(Fe,Ye,Ae,Le,Ut),this.tileCoords.push({z:Ye,x:Ae,y:Le}),Ct)){Ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ye,Ae,Le,cr.numFeatures,cr.numPoints,cr.numSimplified),console.timeEnd("creation"));let wi=`z${Ye}`;this.stats[wi]=(this.stats[wi]||0)+1,this.total++}if(cr.source=Fe,We==null){if(Ye===Ut.indexMaxZoom||cr.numPoints<=Ut.indexMaxPoints)continue}else{if(Ye===Ut.maxZoom||Ye===We)continue;if(We!=null){let wi=We-Ye;if(Ae!==Ke>>wi||Le!==st>>wi)continue}}if(cr.source=null,Fe.length===0)continue;Ct>1&&console.time("clipping");let or=.5*Ut.buffer/Ut.extent,nr=.5-or,Pr=.5+or,_a=1+or,Fa=null,Ra=null,qa=null,Wa=null,Ca=Re(Fe,Pt,Ae-or,Ae+Pr,0,cr.minX,cr.maxX,Ut),hi=Re(Fe,Pt,Ae+nr,Ae+_a,0,cr.minX,cr.maxX,Ut);Fe=null,Ca&&(Fa=Re(Ca,Pt,Le-or,Le+Pr,1,cr.minY,cr.maxY,Ut),Ra=Re(Ca,Pt,Le+nr,Le+_a,1,cr.minY,cr.maxY,Ut),Ca=null),hi&&(qa=Re(hi,Pt,Le-or,Le+Pr,1,cr.minY,cr.maxY,Ut),Wa=Re(hi,Pt,Le+nr,Le+_a,1,cr.minY,cr.maxY,Ut),hi=null),Ct>1&&console.timeEnd("clipping"),ot.push(Fa||[],Ye+1,2*Ae,2*Le),ot.push(Ra||[],Ye+1,2*Ae,2*Le+1),ot.push(qa||[],Ye+1,2*Ae+1,2*Le),ot.push(Wa||[],Ye+1,2*Ae+1,2*Le+1)}}getTile(Fe,Ye,Ae){Fe=+Fe,Ye=+Ye,Ae=+Ae;let Le=this.options,{extent:We,debug:Ke}=Le;if(Fe<0||Fe>24)return null;let st=1<1&&console.log("drilling down to z%d-%d-%d",Fe,Ye,Ae);let Ut,Ct=Fe,Pt=Ye,jt=Ae;for(;!Ut&&Ct>0;)Ct--,Pt>>=1,jt>>=1,Ut=this.tiles[Vt(Ct,Pt,jt)];return Ut&&Ut.source?(Ke>1&&(console.log("found parent tile z%d-%d-%d",Ct,Pt,jt),console.time("drilling down")),this.splitTile(Ut.source,Ct,Pt,jt,Fe,Ye,Ae),Ke>1&&console.timeEnd("drilling down"),this.tiles[ot]?Ce(this.tiles[ot],We):null):null}}function Vt(_t,Fe,Ye){return 32*((1<<_t)*Ye+Fe)+_t}function Ar(_t,Fe){return Fe?_t.properties[Fe]:_t.id}function vr(_t,Fe){if(_t==null)return!0;if(_t.type==="Feature")return Ar(_t,Fe)!=null;if(_t.type==="FeatureCollection"){let Ye=new Set;for(let Ae of _t.features){let Le=Ar(Ae,Fe);if(Le==null||Ye.has(Le))return!1;Ye.add(Le)}return!0}return!1}function qr(_t,Fe){let Ye=new Map;if(_t!=null)if(_t.type==="Feature")Ye.set(Ar(_t,Fe),_t);else for(let Ae of _t.features)Ye.set(Ar(Ae,Fe),Ae);return Ye}class kr extends i{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=Fe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let Le=this._geoJSONIndex.getTile(Ae.z,Ae.x,Ae.y);if(!Le)return null;let We=new class{constructor(st){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.X,this.length=st.length,this._features=st}feature(st){return new class{constructor(ot){this._feature=ot,this.extent=e.X,this.type=ot.type,this.properties=ot.tags,"id"in ot&&!isNaN(ot.id)&&(this.id=parseInt(ot.id,10))}loadGeometry(){if(this._feature.type===1){let ot=[];for(let Ut of this._feature.geometry)ot.push([new e.P(Ut[0],Ut[1])]);return ot}{let ot=[];for(let Ut of this._feature.geometry){let Ct=[];for(let Pt of Ut)Ct.push(new e.P(Pt[0],Pt[1]));ot.push(Ct)}return ot}}toGeoJSON(ot,Ut,Ct){return m.call(this,ot,Ut,Ct)}}(this._features[st])}}(Le.features),Ke=F(We);return Ke.byteOffset===0&&Ke.byteLength===Ke.buffer.byteLength||(Ke=new Uint8Array(Ke)),{vectorTile:We,rawData:Ke.buffer}})}loadData(Fe){return e._(this,void 0,void 0,function*(){var Ye;(Ye=this._pendingRequest)===null||Ye===void 0||Ye.abort();let Ae=!!(Fe&&Fe.request&&Fe.request.collectResourceTiming)&&new e.bv(Fe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Fe,this._pendingRequest),this._geoJSONIndex=Fe.cluster?new $(function({superclusterOptions:Ke,clusterProperties:st}){if(!st||!Ke)return Ke;let ot={},Ut={},Ct={accumulated:null,zoom:0},Pt={properties:null},jt=Object.keys(st);for(let cr of jt){let[or,nr]=st[cr],Pr=e.bC(nr),_a=e.bC(typeof or=="string"?[or,["accumulated"],["get",cr]]:or);ot[cr]=Pr.value,Ut[cr]=_a.value}return Ke.map=cr=>{Pt.properties=cr;let or={};for(let nr of jt)or[nr]=ot[nr].evaluate(Ct,Pt);return or},Ke.reduce=(cr,or)=>{Pt.properties=or;for(let nr of jt)Ct.accumulated=cr[nr],cr[nr]=Ut[nr].evaluate(Ct,Pt)},Ke}(Fe)).load((yield this._pendingData).features):(Le=yield this._pendingData,new Bt(Le,Fe.geojsonVtOptions)),this.loaded={};let We={};if(Ae){let Ke=Ae.finish();Ke&&(We.resourceTiming={},We.resourceTiming[Fe.source]=JSON.parse(JSON.stringify(Ke)))}return We}catch(We){if(delete this._pendingRequest,e.bB(We))return{abandoned:!0};throw We}var Le})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Fe){let Ye=this.loaded;return Ye&&Ye[Fe.uid]?super.reloadTile(Fe):this.loadTile(Fe)}loadAndProcessGeoJSON(Fe,Ye){return e._(this,void 0,void 0,function*(){let Ae=yield this.loadGeoJSON(Fe,Ye);if(delete this._pendingRequest,typeof Ae!="object")throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`);if(f(Ae,!0),Fe.filter){let Le=e.bC(Fe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Le.result==="error")throw new Error(Le.value.map(Ke=>`${Ke.key}: ${Ke.message}`).join(", "));Ae={type:"FeatureCollection",features:Ae.features.filter(Ke=>Le.value.evaluate({zoom:0},Ke))}}return Ae})}loadGeoJSON(Fe,Ye){return e._(this,void 0,void 0,function*(){let{promoteId:Ae}=Fe;if(Fe.request){let Le=yield e.h(Fe.request,Ye);return this._dataUpdateable=vr(Le.data,Ae)?qr(Le.data,Ae):void 0,Le.data}if(typeof Fe.data=="string")try{let Le=JSON.parse(Fe.data);return this._dataUpdateable=vr(Le,Ae)?qr(Le,Ae):void 0,Le}catch{throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`)}if(!Fe.dataDiff)throw new Error(`Input data given to '${Fe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Fe.source}`);return function(Le,We,Ke){var st,ot,Ut,Ct;if(We.removeAll&&Le.clear(),We.remove)for(let Pt of We.remove)Le.delete(Pt);if(We.add)for(let Pt of We.add){let jt=Ar(Pt,Ke);jt!=null&&Le.set(jt,Pt)}if(We.update)for(let Pt of We.update){let jt=Le.get(Pt.id);if(jt==null)continue;let cr=!Pt.removeAllProperties&&(((st=Pt.removeProperties)===null||st===void 0?void 0:st.length)>0||((ot=Pt.addOrUpdateProperties)===null||ot===void 0?void 0:ot.length)>0);if((Pt.newGeometry||Pt.removeAllProperties||cr)&&(jt=Object.assign({},jt),Le.set(Pt.id,jt),cr&&(jt.properties=Object.assign({},jt.properties))),Pt.newGeometry&&(jt.geometry=Pt.newGeometry),Pt.removeAllProperties)jt.properties={};else if(((Ut=Pt.removeProperties)===null||Ut===void 0?void 0:Ut.length)>0)for(let or of Pt.removeProperties)Object.prototype.hasOwnProperty.call(jt.properties,or)&&delete jt.properties[or];if(((Ct=Pt.addOrUpdateProperties)===null||Ct===void 0?void 0:Ct.length)>0)for(let{key:or,value:nr}of Pt.addOrUpdateProperties)jt.properties[or]=nr}}(this._dataUpdateable,Fe.dataDiff,Ae),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Fe){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Fe){return this._geoJSONIndex.getClusterExpansionZoom(Fe.clusterId)}getClusterChildren(Fe){return this._geoJSONIndex.getChildren(Fe.clusterId)}getClusterLeaves(Fe){return this._geoJSONIndex.getLeaves(Fe.clusterId,Fe.limit,Fe.offset)}}class Ur{constructor(Fe){this.self=Fe,this.actor=new e.F(Fe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ye,Ae)=>{if(this.externalWorkerSourceTypes[Ye])throw new Error(`Worker source with name "${Ye}" already registered.`);this.externalWorkerSourceTypes[Ye]=Ae},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Ye=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Ye)},this.actor.registerMessageHandler("LDT",(Ye,Ae)=>this._getDEMWorkerSource(Ye,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RDT",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ye,Ae.source).removeTile(Ae)})),this.actor.registerMessageHandler("GCEZ",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterExpansionZoom(Ae)})),this.actor.registerMessageHandler("GCC",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterChildren(Ae)})),this.actor.registerMessageHandler("GCL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ae.type,Ae.source).getClusterLeaves(Ae)})),this.actor.registerMessageHandler("LD",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).loadData(Ae)),this.actor.registerMessageHandler("GD",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).getData()),this.actor.registerMessageHandler("LT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).loadTile(Ae)),this.actor.registerMessageHandler("RT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).reloadTile(Ae)),this.actor.registerMessageHandler("AT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).abortTile(Ae)),this.actor.registerMessageHandler("RMT",(Ye,Ae)=>this._getWorkerSource(Ye,Ae.type,Ae.source).removeTile(Ae)),this.actor.registerMessageHandler("RS",(Ye,Ae)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Ye]||!this.workerSources[Ye][Ae.type]||!this.workerSources[Ye][Ae.type][Ae.source])return;let Le=this.workerSources[Ye][Ae.type][Ae.source];delete this.workerSources[Ye][Ae.type][Ae.source],Le.removeSource!==void 0&&Le.removeSource(Ae)})),this.actor.registerMessageHandler("RM",Ye=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Ye],delete this.availableImages[Ye],delete this.workerSources[Ye],delete this.demWorkerSources[Ye]})),this.actor.registerMessageHandler("SR",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this.referrer=Ae})),this.actor.registerMessageHandler("SRPS",(Ye,Ae)=>this._syncRTLPluginState(Ye,Ae)),this.actor.registerMessageHandler("IS",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Ae)})),this.actor.registerMessageHandler("SI",(Ye,Ae)=>this._setImages(Ye,Ae)),this.actor.registerMessageHandler("UL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).update(Ae.layers,Ae.removedIds)})),this.actor.registerMessageHandler("SL",(Ye,Ae)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).replace(Ae)}))}_setImages(Fe,Ye){return e._(this,void 0,void 0,function*(){this.availableImages[Fe]=Ye;for(let Ae in this.workerSources[Fe]){let Le=this.workerSources[Fe][Ae];for(let We in Le)Le[We].availableImages=Ye}})}_syncRTLPluginState(Fe,Ye){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Ye.pluginStatus!=="loading")return e.bD.setState(Ye),Ye;let Ae=Ye.pluginURL;if(this.self.importScripts(Ae),e.bD.isParsed()){let Le={pluginStatus:"loaded",pluginURL:Ae};return e.bD.setState(Le),Le}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ae}`)})}_getAvailableImages(Fe){let Ye=this.availableImages[Fe];return Ye||(Ye=[]),Ye}_getLayerIndex(Fe){let Ye=this.layerIndexes[Fe];return Ye||(Ye=this.layerIndexes[Fe]=new t),Ye}_getWorkerSource(Fe,Ye,Ae){if(this.workerSources[Fe]||(this.workerSources[Fe]={}),this.workerSources[Fe][Ye]||(this.workerSources[Fe][Ye]={}),!this.workerSources[Fe][Ye][Ae]){let Le={sendAsync:(We,Ke)=>(We.targetMapId=Fe,this.actor.sendAsync(We,Ke))};switch(Ye){case"vector":this.workerSources[Fe][Ye][Ae]=new i(Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe));break;case"geojson":this.workerSources[Fe][Ye][Ae]=new kr(Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe));break;default:this.workerSources[Fe][Ye][Ae]=new this.externalWorkerSourceTypes[Ye](Le,this._getLayerIndex(Fe),this._getAvailableImages(Fe))}}return this.workerSources[Fe][Ye][Ae]}_getDEMWorkerSource(Fe,Ye){return this.demWorkerSources[Fe]||(this.demWorkerSources[Fe]={}),this.demWorkerSources[Fe][Ye]||(this.demWorkerSources[Fe][Ye]=new n),this.demWorkerSources[Fe][Ye]}}return e.i(self)&&(self.worker=new Ur(self)),Ur}),S("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:Oe=>new Promise((I,ie)=>{let Te=requestAnimationFrame(I);Oe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Te),ie(t.c())})}),getImageData(Oe,I=0){return this.getImageCanvasContext(Oe).getImageData(-I,-I,Oe.width+2*I,Oe.height+2*I)},getImageCanvasContext(Oe){let I=window.document.createElement("canvas"),ie=I.getContext("2d",{willReadFrequently:!0});if(!ie)throw new Error("failed to create canvas 2d context");return I.width=Oe.width,I.height=Oe.height,ie.drawImage(Oe,0,0,Oe.width,Oe.height),ie},resolveURL:Oe=>(o||(o=document.createElement("a")),o.href=Oe,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(I){if(!n.docStyle)return I[0];for(let ie=0;ie{window.removeEventListener("click",n.suppressClickInternal,!0)},0)}static getScale(I){let ie=I.getBoundingClientRect();return{x:ie.width/I.offsetWidth||1,y:ie.height/I.offsetHeight||1,boundingClientRect:ie}}static getPoint(I,ie,Te){let Me=ie.boundingClientRect;return new t.P((Te.clientX-Me.left)/ie.x-I.clientLeft,(Te.clientY-Me.top)/ie.y-I.clientTop)}static mousePos(I,ie){let Te=n.getScale(I);return n.getPoint(I,Te,ie)}static touchPos(I,ie){let Te=[],Me=n.getScale(I);for(let ze=0;ze{h&&T(h),h=null,c=!0},f.onerror=()=>{m=!0,h=null},f.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Oe){let I,ie,Te,Me;Oe.resetRequestQueue=()=>{I=[],ie=0,Te=0,Me={}},Oe.addThrottleControl=Ot=>{let $t=Te++;return Me[$t]=Ot,$t},Oe.removeThrottleControl=Ot=>{delete Me[Ot],ht()},Oe.getImage=(Ot,$t,Tr=!0)=>new Promise((Sr,Kr)=>{s.supported&&(Ot.headers||(Ot.headers={}),Ot.headers.accept="image/webp,*/*"),t.e(Ot,{type:"image"}),I.push({abortController:$t,requestParameters:Ot,supportImageRefresh:Tr,state:"queued",onError:na=>{Kr(na)},onSuccess:na=>{Sr(na)}}),ht()});let ze=Ot=>t._(this,void 0,void 0,function*(){Ot.state="running";let{requestParameters:$t,supportImageRefresh:Tr,onError:Sr,onSuccess:Kr,abortController:na}=Ot,qe=Tr===!1&&!t.i(self)&&!t.g($t.url)&&(!$t.headers||Object.keys($t.headers).reduce((pt,Et)=>pt&&Et==="accept",!0));ie++;let $e=qe?wt($t,na):t.m($t,na);try{let pt=yield $e;delete Ot.abortController,Ot.state="completed",pt.data instanceof HTMLImageElement||t.b(pt.data)?Kr(pt):pt.data&&Kr({data:yield(lt=pt.data,typeof createImageBitmap=="function"?t.d(lt):t.f(lt)),cacheControl:pt.cacheControl,expires:pt.expires})}catch(pt){delete Ot.abortController,Sr(pt)}finally{ie--,ht()}var lt}),ht=()=>{let Ot=(()=>{for(let $t of Object.keys(Me))if(Me[$t]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let $t=ie;$t0;$t++){let Tr=I.shift();Tr.abortController.signal.aborted?$t--:ze(Tr)}},wt=(Ot,$t)=>new Promise((Tr,Sr)=>{let Kr=new Image,na=Ot.url,qe=Ot.credentials;qe&&qe==="include"?Kr.crossOrigin="use-credentials":(qe&&qe==="same-origin"||!t.s(na))&&(Kr.crossOrigin="anonymous"),$t.signal.addEventListener("abort",()=>{Kr.src="",Sr(t.c())}),Kr.fetchPriority="high",Kr.onload=()=>{Kr.onerror=Kr.onload=null,Tr({data:Kr})},Kr.onerror=()=>{Kr.onerror=Kr.onload=null,$t.signal.aborted||Sr(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."))},Kr.src=na})}(l||(l={})),l.resetRequestQueue();class x{constructor(I){this._transformRequestFn=I}transformRequest(I,ie){return this._transformRequestFn&&this._transformRequestFn(I,ie)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function w(Oe){var I=new t.A(3);return I[0]=Oe[0],I[1]=Oe[1],I[2]=Oe[2],I}var A,E=function(Oe,I,ie){return Oe[0]=I[0]-ie[0],Oe[1]=I[1]-ie[1],Oe[2]=I[2]-ie[2],Oe};A=new t.A(3),t.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var p=function(Oe){var I=Oe[0],ie=Oe[1];return I*I+ie*ie};function b(Oe){let I=[];if(typeof Oe=="string")I.push({id:"default",url:Oe});else if(Oe&&Oe.length>0){let ie=[];for(let{id:Te,url:Me}of Oe){let ze=`${Te}${Me}`;ie.indexOf(ze)===-1&&(ie.push(ze),I.push({id:Te,url:Me}))}}return I}function d(Oe,I,ie){let Te=Oe.split("?");return Te[0]+=`${I}${ie}`,Te.join("?")}(function(){var Oe=new t.A(2);t.A!=Float32Array&&(Oe[0]=0,Oe[1]=0)})();class u{constructor(I,ie,Te,Me){this.context=I,this.format=Te,this.texture=I.gl.createTexture(),this.update(ie,Me)}update(I,ie,Te){let{width:Me,height:ze}=I,ht=!(this.size&&this.size[0]===Me&&this.size[1]===ze||Te),{context:wt}=this,{gl:Ot}=wt;if(this.useMipmap=!!(ie&&ie.useMipmap),Ot.bindTexture(Ot.TEXTURE_2D,this.texture),wt.pixelStoreUnpackFlipY.set(!1),wt.pixelStoreUnpack.set(1),wt.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ot.RGBA&&(!ie||ie.premultiply!==!1)),ht)this.size=[Me,ze],I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Ot.texImage2D(Ot.TEXTURE_2D,0,this.format,this.format,Ot.UNSIGNED_BYTE,I):Ot.texImage2D(Ot.TEXTURE_2D,0,this.format,Me,ze,0,this.format,Ot.UNSIGNED_BYTE,I.data);else{let{x:$t,y:Tr}=Te||{x:0,y:0};I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||t.b(I)?Ot.texSubImage2D(Ot.TEXTURE_2D,0,$t,Tr,Ot.RGBA,Ot.UNSIGNED_BYTE,I):Ot.texSubImage2D(Ot.TEXTURE_2D,0,$t,Tr,Me,ze,Ot.RGBA,Ot.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ot.generateMipmap(Ot.TEXTURE_2D)}bind(I,ie,Te){let{context:Me}=this,{gl:ze}=Me;ze.bindTexture(ze.TEXTURE_2D,this.texture),Te!==ze.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Te=ze.LINEAR),I!==this.filter&&(ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MAG_FILTER,I),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MIN_FILTER,Te||I),this.filter=I),ie!==this.wrap&&(ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_S,ie),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_T,ie),this.wrap=ie)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:I}=this.context;I.deleteTexture(this.texture),this.texture=null}}function g(Oe){let{userImage:I}=Oe;return!!(I&&I.render&&I.render())&&(Oe.data.replace(new Uint8Array(I.data.buffer)),!0)}class y 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(I){if(this.loaded!==I&&(this.loaded=I,I)){for(let{ids:ie,promiseResolve:Te}of this.requestors)Te(this._getImagesForIds(ie));this.requestors=[]}}getImage(I){let ie=this.images[I];if(ie&&!ie.data&&ie.spriteData){let Te=ie.spriteData;ie.data=new t.R({width:Te.width,height:Te.height},Te.context.getImageData(Te.x,Te.y,Te.width,Te.height).data),ie.spriteData=null}return ie}addImage(I,ie){if(this.images[I])throw new Error(`Image id ${I} already exist, use updateImage instead`);this._validate(I,ie)&&(this.images[I]=ie)}_validate(I,ie){let Te=!0,Me=ie.data||ie.spriteData;return this._validateStretch(ie.stretchX,Me&&Me.width)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchX" value`))),Te=!1),this._validateStretch(ie.stretchY,Me&&Me.height)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "stretchY" value`))),Te=!1),this._validateContent(ie.content,ie)||(this.fire(new t.j(new Error(`Image "${I}" has invalid "content" value`))),Te=!1),Te}_validateStretch(I,ie){if(!I)return!0;let Te=0;for(let Me of I){if(Me[0]{let Me=!0;if(!this.isLoaded())for(let ze of I)this.images[ze]||(Me=!1);this.isLoaded()||Me?ie(this._getImagesForIds(I)):this.requestors.push({ids:I,promiseResolve:ie})})}_getImagesForIds(I){let ie={};for(let Te of I){let Me=this.getImage(Te);Me||(this.fire(new t.k("styleimagemissing",{id:Te})),Me=this.getImage(Te)),Me?ie[Te]={data:Me.data.clone(),pixelRatio:Me.pixelRatio,sdf:Me.sdf,version:Me.version,stretchX:Me.stretchX,stretchY:Me.stretchY,content:Me.content,textFitWidth:Me.textFitWidth,textFitHeight:Me.textFitHeight,hasRenderCallback:!!(Me.userImage&&Me.userImage.render)}:t.w(`Image "${Te}" 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 ie}getPixelSize(){let{width:I,height:ie}=this.atlasImage;return{width:I,height:ie}}getPattern(I){let ie=this.patterns[I],Te=this.getImage(I);if(!Te)return null;if(ie&&ie.position.version===Te.version)return ie.position;if(ie)ie.position.version=Te.version;else{let Me={w:Te.data.width+2,h:Te.data.height+2,x:0,y:0},ze=new t.I(Me,Te);this.patterns[I]={bin:Me,position:ze}}return this._updatePatternAtlas(),this.patterns[I].position}bind(I){let ie=I.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new u(I,this.atlasImage,ie.RGBA),this.atlasTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE)}_updatePatternAtlas(){let I=[];for(let ze in this.patterns)I.push(this.patterns[ze].bin);let{w:ie,h:Te}=t.p(I),Me=this.atlasImage;Me.resize({width:ie||1,height:Te||1});for(let ze in this.patterns){let{bin:ht}=this.patterns[ze],wt=ht.x+1,Ot=ht.y+1,$t=this.getImage(ze).data,Tr=$t.width,Sr=$t.height;t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot},{width:Tr,height:Sr}),t.R.copy($t,Me,{x:0,y:Sr-1},{x:wt,y:Ot-1},{width:Tr,height:1}),t.R.copy($t,Me,{x:0,y:0},{x:wt,y:Ot+Sr},{width:Tr,height:1}),t.R.copy($t,Me,{x:Tr-1,y:0},{x:wt-1,y:Ot},{width:1,height:Sr}),t.R.copy($t,Me,{x:0,y:0},{x:wt+Tr,y:Ot},{width:1,height:Sr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(I){for(let ie of I){if(this.callbackDispatchedThisFrame[ie])continue;this.callbackDispatchedThisFrame[ie]=!0;let Te=this.getImage(ie);Te||t.w(`Image with ID: "${ie}" was not found`),g(Te)&&this.updateImage(ie,Te)}}}let D=1e20;function P(Oe,I,ie,Te,Me,ze,ht,wt,Ot){for(let $t=I;$t-1);Ot++,ze[Ot]=wt,ht[Ot]=$t,ht[Ot+1]=D}for(let wt=0,Ot=0;wt65535)throw new Error("glyphs > 65535 not supported");if(Te.ranges[ze])return{stack:I,id:ie,glyph:Me};if(!this.url)throw new Error("glyphsUrl is not set");if(!Te.requests[ze]){let wt=F.loadGlyphRange(I,ze,this.url,this.requestManager);Te.requests[ze]=wt}let ht=yield Te.requests[ze];for(let wt in ht)this._doesCharSupportLocalGlyph(+wt)||(Te.glyphs[+wt]=ht[+wt]);return Te.ranges[ze]=!0,{stack:I,id:ie,glyph:ht[ie]||null}})}_doesCharSupportLocalGlyph(I){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(I))}_tinySDF(I,ie,Te){let Me=this.localIdeographFontFamily;if(!Me||!this._doesCharSupportLocalGlyph(Te))return;let ze=I.tinySDF;if(!ze){let wt="400";/bold/i.test(ie)?wt="900":/medium/i.test(ie)?wt="500":/light/i.test(ie)&&(wt="200"),ze=I.tinySDF=new F.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Me,fontWeight:wt})}let ht=ze.draw(String.fromCharCode(Te));return{id:Te,bitmap:new t.o({width:ht.width||60,height:ht.height||60},ht.data),metrics:{width:ht.glyphWidth/2||24,height:ht.glyphHeight/2||24,left:ht.glyphLeft/2+.5||0,top:ht.glyphTop/2-27.5||-8,advance:ht.glyphAdvance/2||24,isDoubleResolution:!0}}}}F.loadGlyphRange=function(Oe,I,ie,Te){return t._(this,void 0,void 0,function*(){let Me=256*I,ze=Me+255,ht=Te.transformRequest(ie.replace("{fontstack}",Oe).replace("{range}",`${Me}-${ze}`),"Glyphs"),wt=yield t.l(ht,new AbortController);if(!wt||!wt.data)throw new Error(`Could not load glyph range. range: ${I}, ${Me}-${ze}`);let Ot={};for(let $t of t.n(wt.data))Ot[$t.id]=$t;return Ot})},F.TinySDF=class{constructor({fontSize:Oe=24,buffer:I=3,radius:ie=8,cutoff:Te=.25,fontFamily:Me="sans-serif",fontWeight:ze="normal",fontStyle:ht="normal"}={}){this.buffer=I,this.cutoff=Te,this.radius=ie;let wt=this.size=Oe+4*I,Ot=this._createCanvas(wt),$t=this.ctx=Ot.getContext("2d",{willReadFrequently:!0});$t.font=`${ht} ${ze} ${Oe}px ${Me}`,$t.textBaseline="alphabetic",$t.textAlign="left",$t.fillStyle="black",this.gridOuter=new Float64Array(wt*wt),this.gridInner=new Float64Array(wt*wt),this.f=new Float64Array(wt),this.z=new Float64Array(wt+1),this.v=new Uint16Array(wt)}_createCanvas(Oe){let I=document.createElement("canvas");return I.width=I.height=Oe,I}draw(Oe){let{width:I,actualBoundingBoxAscent:ie,actualBoundingBoxDescent:Te,actualBoundingBoxLeft:Me,actualBoundingBoxRight:ze}=this.ctx.measureText(Oe),ht=Math.ceil(ie),wt=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(ze-Me))),Ot=Math.min(this.size-this.buffer,ht+Math.ceil(Te)),$t=wt+2*this.buffer,Tr=Ot+2*this.buffer,Sr=Math.max($t*Tr,0),Kr=new Uint8ClampedArray(Sr),na={data:Kr,width:$t,height:Tr,glyphWidth:wt,glyphHeight:Ot,glyphTop:ht,glyphLeft:0,glyphAdvance:I};if(wt===0||Ot===0)return na;let{ctx:qe,buffer:$e,gridInner:lt,gridOuter:pt}=this;qe.clearRect($e,$e,wt,Ot),qe.fillText(Oe,$e,$e+ht);let Et=qe.getImageData($e,$e,wt,Ot);pt.fill(D,0,Sr),lt.fill(0,0,Sr);for(let bt=0;bt0?Er*Er:0,lt[yr]=Er<0?Er*Er:0}}P(pt,0,0,$t,Tr,$t,this.f,this.v,this.z),P(lt,$e,$e,wt,Ot,$t,this.f,this.v,this.z);for(let bt=0;bt1&&(Ot=I[++wt]);let Tr=Math.abs($t-Ot.left),Sr=Math.abs($t-Ot.right),Kr=Math.min(Tr,Sr),na,qe=ze/Te*(Me+1);if(Ot.isDash){let $e=Me-Math.abs(qe);na=Math.sqrt(Kr*Kr+$e*$e)}else na=Me-Math.sqrt(Kr*Kr+qe*qe);this.data[ht+$t]=Math.max(0,Math.min(255,na+128))}}}addRegularDash(I){for(let wt=I.length-1;wt>=0;--wt){let Ot=I[wt],$t=I[wt+1];Ot.zeroLength?I.splice(wt,1):$t&&$t.isDash===Ot.isDash&&($t.left=Ot.left,I.splice(wt,1))}let ie=I[0],Te=I[I.length-1];ie.isDash===Te.isDash&&(ie.left=Te.left-this.width,Te.right=ie.right+this.width);let Me=this.width*this.nextRow,ze=0,ht=I[ze];for(let wt=0;wt1&&(ht=I[++ze]);let Ot=Math.abs(wt-ht.left),$t=Math.abs(wt-ht.right),Tr=Math.min(Ot,$t);this.data[Me+wt]=Math.max(0,Math.min(255,(ht.isDash?Tr:-Tr)+128))}}addDash(I,ie){let Te=ie?7:0,Me=2*Te+1;if(this.nextRow+Me>this.height)return t.w("LineAtlas out of space"),null;let ze=0;for(let wt=0;wt{ie.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[$]}numActive(){return Object.keys(this.active).length}}let ce=Math.floor(i.hardwareConcurrency/2),de,Y;function X(){return de||(de=new ue),de}ue.workerCount=t.C(globalThis)?Math.max(Math.min(ce,3),1):1;class Q{constructor(I,ie){this.workerPool=I,this.actors=[],this.currentActor=0,this.id=ie;let Te=this.workerPool.acquire(ie);for(let Me=0;Me{ie.remove()}),this.actors=[],I&&this.workerPool.release(this.id)}registerMessageHandler(I,ie){for(let Te of this.actors)Te.registerMessageHandler(I,ie)}}function V(){return Y||(Y=new Q(X(),t.G),Y.registerMessageHandler("GR",(Oe,I,ie)=>t.m(I,ie))),Y}function le(Oe,I){let ie=t.H();return t.J(ie,ie,[1,1,0]),t.K(ie,ie,[.5*Oe.width,.5*Oe.height,1]),t.L(ie,ie,Oe.calculatePosMatrix(I.toUnwrapped()))}function ae(Oe,I,ie,Te,Me,ze){let ht=function(Sr,Kr,na){if(Sr)for(let qe of Sr){let $e=Kr[qe];if($e&&$e.source===na&&$e.type==="fill-extrusion")return!0}else for(let qe in Kr){let $e=Kr[qe];if($e.source===na&&$e.type==="fill-extrusion")return!0}return!1}(Me&&Me.layers,I,Oe.id),wt=ze.maxPitchScaleFactor(),Ot=Oe.tilesIn(Te,wt,ht);Ot.sort(j);let $t=[];for(let Sr of Ot)$t.push({wrappedTileID:Sr.tileID.wrapped().key,queryResults:Sr.tile.queryRenderedFeatures(I,ie,Oe._state,Sr.queryGeometry,Sr.cameraQueryGeometry,Sr.scale,Me,ze,wt,le(Oe.transform,Sr.tileID))});let Tr=function(Sr){let Kr={},na={};for(let qe of Sr){let $e=qe.queryResults,lt=qe.wrappedTileID,pt=na[lt]=na[lt]||{};for(let Et in $e){let bt=$e[Et],Dt=pt[Et]=pt[Et]||{},ur=Kr[Et]=Kr[Et]||[];for(let yr of bt)Dt[yr.featureIndex]||(Dt[yr.featureIndex]=!0,ur.push(yr))}}return Kr}($t);for(let Sr in Tr)Tr[Sr].forEach(Kr=>{let na=Kr.feature,qe=Oe.getFeatureState(na.layer["source-layer"],na.id);na.source=na.layer.source,na.layer["source-layer"]&&(na.sourceLayer=na.layer["source-layer"]),na.state=qe});return Tr}function j(Oe,I){let ie=Oe.tileID,Te=I.tileID;return ie.overscaledZ-Te.overscaledZ||ie.canonical.y-Te.canonical.y||ie.wrap-Te.wrap||ie.canonical.x-Te.canonical.x}function ee(Oe,I,ie){return t._(this,void 0,void 0,function*(){let Te=Oe;if(Oe.url?Te=(yield t.h(I.transformRequest(Oe.url,"Source"),ie)).data:yield i.frameAsync(ie),!Te)return null;let Me=t.M(t.e(Te,Oe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Te&&Te.vector_layers&&(Me.vectorLayerIds=Te.vector_layers.map(ze=>ze.id)),Me})}class te{constructor(I,ie){I&&(ie?this.setSouthWest(I).setNorthEast(ie):Array.isArray(I)&&(I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1])))}setNorthEast(I){return this._ne=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}setSouthWest(I){return this._sw=I instanceof t.N?new t.N(I.lng,I.lat):t.N.convert(I),this}extend(I){let ie=this._sw,Te=this._ne,Me,ze;if(I instanceof t.N)Me=I,ze=I;else{if(!(I instanceof te))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(te.convert(I)):this.extend(t.N.convert(I)):I&&("lng"in I||"lon"in I)&&"lat"in I?this.extend(t.N.convert(I)):this;if(Me=I._sw,ze=I._ne,!Me||!ze)return this}return ie||Te?(ie.lng=Math.min(Me.lng,ie.lng),ie.lat=Math.min(Me.lat,ie.lat),Te.lng=Math.max(ze.lng,Te.lng),Te.lat=Math.max(ze.lat,Te.lat)):(this._sw=new t.N(Me.lng,Me.lat),this._ne=new t.N(ze.lng,ze.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(I){let{lng:ie,lat:Te}=t.N.convert(I),Me=this._sw.lng<=ie&&ie<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Me=this._sw.lng>=ie&&ie>=this._ne.lng),this._sw.lat<=Te&&Te<=this._ne.lat&&Me}static convert(I){return I instanceof te?I:I&&new te(I)}static fromLngLat(I,ie=0){let Te=360*ie/40075017,Me=Te/Math.cos(Math.PI/180*I.lat);return new te(new t.N(I.lng-Me,I.lat-Te),new t.N(I.lng+Me,I.lat+Te))}adjustAntiMeridian(){let I=new t.N(this._sw.lng,this._sw.lat),ie=new t.N(this._ne.lng,this._ne.lat);return new te(I,I.lng>ie.lng?new t.N(ie.lng+360,ie.lat):ie)}}class pe{constructor(I,ie,Te){this.bounds=te.convert(this.validateBounds(I)),this.minzoom=ie||0,this.maxzoom=Te||24}validateBounds(I){return Array.isArray(I)&&I.length===4?[Math.max(-180,I[0]),Math.max(-90,I[1]),Math.min(180,I[2]),Math.min(90,I[3])]:[-180,-90,180,90]}contains(I){let ie=Math.pow(2,I.z),Te=Math.floor(t.O(this.bounds.getWest())*ie),Me=Math.floor(t.Q(this.bounds.getNorth())*ie),ze=Math.ceil(t.O(this.bounds.getEast())*ie),ht=Math.ceil(t.Q(this.bounds.getSouth())*ie);return I.x>=Te&&I.x=Me&&I.y{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Te={request:this.map._requestManager.transformRequest(ie,"Tile"),uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,tileSize:this.tileSize*I.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Te.request.collectResourceTiming=this._collectResourceTiming;let Me="RT";if(I.actor&&I.state!=="expired"){if(I.state==="loading")return new Promise((ze,ht)=>{I.reloadPromise={resolve:ze,reject:ht}})}else I.actor=this.dispatcher.getActor(),Me="LT";I.abortController=new AbortController;try{let ze=yield I.actor.sendAsync({type:Me,data:Te},I.abortController);if(delete I.abortController,I.aborted)return;this._afterTileLoadWorkerResponse(I,ze)}catch(ze){if(delete I.abortController,I.aborted)return;if(ze&&ze.status!==404)throw ze;this._afterTileLoadWorkerResponse(I,null)}})}_afterTileLoadWorkerResponse(I,ie){if(ie&&ie.resourceTiming&&(I.resourceTiming=ie.resourceTiming),ie&&this.map._refreshExpiredTiles&&I.setExpiryData(ie),I.loadVectorData(ie,this.map.painter),I.reloadPromise){let Te=I.reloadPromise;I.reloadPromise=null,this.loadTile(I).then(Te.resolve).catch(Te.reject)}}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.actor&&(yield I.actor.sendAsync({type:"AT",data:{uid:I.uid,type:this.type,source:this.id}}))})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.unloadVectorData(),I.actor&&(yield I.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Se extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.dispatcher=Te,this.setEventedParent(Me),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"},ie),t.e(this,t.M(ie,["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 I=yield ee(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,I&&(t.e(this,I),I.bounds&&(this.tileBounds=new pe(I.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(I){this._tileJSONRequest=null,this.fire(new t.j(I))}})}loaded(){return this._loaded}onAdd(I){this.map=I,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(I){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),I(),this.load()}setTiles(I){return this.setSourceProperty(()=>{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}serialize(){return t.e({},this._options)}hasTile(I){return!this.tileBounds||this.tileBounds.contains(I.canonical)}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);I.abortController=new AbortController;try{let Te=yield l.getImage(this.map._requestManager.transformRequest(ie,"Tile"),I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Te&&Te.data){this.map._refreshExpiredTiles&&Te.cacheControl&&Te.expires&&I.setExpiryData({cacheControl:Te.cacheControl,expires:Te.expires});let Me=this.map.painter.context,ze=Me.gl,ht=Te.data;I.texture=this.map.painter.getTileTexture(ht.width),I.texture?I.texture.update(ht,{useMipmap:!0}):(I.texture=new u(Me,ht,ze.RGBA,{useMipmap:!0}),I.texture.bind(ze.LINEAR,ze.CLAMP_TO_EDGE,ze.LINEAR_MIPMAP_NEAREST)),I.state="loaded"}}catch(Te){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Te)throw I.state="errored",Te}})}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController)})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.texture&&this.map.painter.saveTileTexture(I.texture)})}hasTransition(){return!1}}class Re extends Se{constructor(I,ie,Te,Me){super(I,ie,Te,Me),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},ie),this.encoding=ie.encoding||"mapbox",this.redFactor=ie.redFactor,this.greenFactor=ie.greenFactor,this.blueFactor=ie.blueFactor,this.baseShift=ie.baseShift}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Te=this.map._requestManager.transformRequest(ie,"Tile");I.neighboringTiles=this._getNeighboringTiles(I.tileID),I.abortController=new AbortController;try{let Me=yield l.getImage(Te,I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Me&&Me.data){let ze=Me.data;this.map._refreshExpiredTiles&&Me.cacheControl&&Me.expires&&I.setExpiryData({cacheControl:Me.cacheControl,expires:Me.expires});let ht=t.b(ze)&&t.U()?ze:yield this.readImageNow(ze),wt={type:this.type,uid:I.uid,source:this.id,rawImageData:ht,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!I.actor||I.state==="expired"){I.actor=this.dispatcher.getActor();let Ot=yield I.actor.sendAsync({type:"LDT",data:wt});I.dem=Ot,I.needsHillshadePrepare=!0,I.needsTerrainPrepare=!0,I.state="loaded"}}}catch(Me){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Me)throw I.state="errored",Me}})}readImageNow(I){return t._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&t.V()){let ie=I.width+2,Te=I.height+2;try{return new t.R({width:ie,height:Te},yield t.W(I,-1,-1,ie,Te))}catch{}}return i.getImageData(I,1)})}_getNeighboringTiles(I){let ie=I.canonical,Te=Math.pow(2,ie.z),Me=(ie.x-1+Te)%Te,ze=ie.x===0?I.wrap-1:I.wrap,ht=(ie.x+1+Te)%Te,wt=ie.x+1===Te?I.wrap+1:I.wrap,Ot={};return Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y).key]={backfilled:!1},ie.y>0&&(Ot[new t.S(I.overscaledZ,ze,ie.z,Me,ie.y-1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,I.wrap,ie.z,ie.x,ie.y-1).key]={backfilled:!1},Ot[new t.S(I.overscaledZ,wt,ie.z,ht,ie.y-1).key]={backfilled:!1}),ie.y+10&&t.e(ze,{resourceTiming:Me}),this.fire(new t.k("data",Object.assign(Object.assign({},ze),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},ze),{sourceDataType:"content"})))}catch(Te){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(Te))}})}loaded(){return this._pendingLoads===0}loadTile(I){return t._(this,void 0,void 0,function*(){let ie=I.actor?"RT":"LT";I.actor=this.actor;let Te={type:this.type,uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};I.abortController=new AbortController;let Me=yield this.actor.sendAsync({type:ie,data:Te},I.abortController);delete I.abortController,I.unloadVectorData(),I.aborted||I.loadVectorData(Me,this.map.painter,ie==="RT")})}abortTile(I){return t._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.aborted=!0})}unloadTile(I){return t._(this,void 0,void 0,function*(){I.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:I.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 je=t.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class at extends t.E{constructor(I,ie,Te,Me){super(),this.id=I,this.dispatcher=Te,this.coordinates=ie.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Me),this.options=ie}load(I){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 ie=yield l.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ie&&ie.data&&(this.image=ie.data,I&&(this.coordinates=I),this._finishLoading())}catch(ie){this._request=null,this._loaded=!0,this.fire(new t.j(ie))}})}loaded(){return this._loaded}updateImage(I){return I.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=I.url,this.load(I.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(I){this.map=I,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(I){this.coordinates=I;let ie=I.map(t.Z.fromLngLat);this.tileID=function(Me){let ze=1/0,ht=1/0,wt=-1/0,Ot=-1/0;for(let Kr of Me)ze=Math.min(ze,Kr.x),ht=Math.min(ht,Kr.y),wt=Math.max(wt,Kr.x),Ot=Math.max(Ot,Kr.y);let $t=Math.max(wt-ze,Ot-ht),Tr=Math.max(0,Math.floor(-Math.log($t)/Math.LN2)),Sr=Math.pow(2,Tr);return new t.a1(Tr,Math.floor((ze+wt)/2*Sr),Math.floor((ht+Ot)/2*Sr))}(ie),this.minzoom=this.maxzoom=this.tileID.z;let Te=ie.map(Me=>this.tileID.getTilePoint(Me)._round());return this._boundsArray=new t.$,this._boundsArray.emplaceBack(Te[0].x,Te[0].y,0,0),this._boundsArray.emplaceBack(Te[1].x,Te[1].y,t.X,0),this._boundsArray.emplaceBack(Te[3].x,Te[3].y,0,t.X),this._boundsArray.emplaceBack(Te[2].x,Te[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 I=this.map.painter.context,ie=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,je.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new u(I,this.image,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let Te=!1;for(let Me in this.tiles){let ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,Te=!0)}Te&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(I){return t._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(I.tileID.canonical)?(this.tiles[String(I.tileID.wrap)]=I,I.buckets={}):I.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class nt extends at{constructor(I,ie,Te,Me){super(I,ie,Te,Me),this.roundZoom=!0,this.type="video",this.options=ie}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let I=this.options;this.urls=[];for(let ie of I.urls)this.urls.push(this.map._requestManager.transformRequest(ie,"Source").url);try{let ie=yield t.a3(this.urls);if(this._loaded=!0,!ie)return;this.video=ie,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ie){this.fire(new t.j(ie))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(I){if(this.video){let ie=this.video.seekable;Iie.end(0)?this.fire(new t.j(new t.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ie.start(0)} and ${ie.end(0)}-second mark.`))):this.video.currentTime=I}}getVideo(){return this.video}onAdd(I){this.map||(this.map=I,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 I=this.map.painter.context,ie=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,je.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),ie.texSubImage2D(ie.TEXTURE_2D,0,0,0,ie.RGBA,ie.UNSIGNED_BYTE,this.video)):(this.texture=new u(I,this.video,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let Te=!1;for(let Me in this.tiles){let ze=this.tiles[Me];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,Te=!0)}Te&&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 at{constructor(I,ie,Te,Me){super(I,ie,Te,Me),ie.coordinates?Array.isArray(ie.coordinates)&&ie.coordinates.length===4&&!ie.coordinates.some(ze=>!Array.isArray(ze)||ze.length!==2||ze.some(ht=>typeof ht!="number"))||this.fire(new t.j(new t.a2(`sources.${I}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.j(new t.a2(`sources.${I}`,null,'missing required property "coordinates"'))),ie.animate&&typeof ie.animate!="boolean"&&this.fire(new t.j(new t.a2(`sources.${I}`,null,'optional "animate" property must be a boolean value'))),ie.canvas?typeof ie.canvas=="string"||ie.canvas instanceof HTMLCanvasElement||this.fire(new t.j(new t.a2(`sources.${I}`,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.${I}`,null,'missing required property "canvas"'))),this.options=ie,this.animate=ie.animate===void 0||ie.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(I){this.map=I,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let I=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,I=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,I=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ie=this.map.painter.context,Te=ie.gl;this.boundsBuffer||(this.boundsBuffer=ie.createVertexBuffer(this._boundsArray,je.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?(I||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new u(ie,this.canvas,Te.RGBA,{premultiply:!0});let Me=!1;for(let ze in this.tiles){let ht=this.tiles[ze];ht.state!=="loaded"&&(ht.state="loaded",ht.texture=this.texture,Me=!0)}Me&&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 I of[this.canvas.width,this.canvas.height])if(isNaN(I)||I<=0)return!0;return!1}}let Ve={},he=Oe=>{switch(Oe){case"geojson":return Pe;case"image":return at;case"raster":return Se;case"raster-dem":return Re;case"vector":return we;case"video":return nt;case"canvas":return tt}return Ve[Oe]},se="RTLPluginLoaded";class ne extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=V()}_syncState(I){return this.status=I,this.dispatcher.broadcast("SRPS",{pluginStatus:I,pluginURL:this.url}).catch(ie=>{throw this.status="error",ie})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(I){return t._(this,arguments,void 0,function*(ie,Te=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=i.resolveURL(ie),!this.url)throw new Error(`requested url ${ie} is invalid`);if(this.status==="unavailable"){if(!Te)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(se))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ce=null;function Ze(){return Ce||(Ce=new ne),Ce}class rt{constructor(I,ie){this.timeAdded=0,this.fadeEndTime=0,this.tileID=I,this.uid=t.a4(),this.uses=0,this.tileSize=ie,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(I){let ie=I+this.timeAdded;ieze.getLayer($t)).filter(Boolean);if(Ot.length!==0){wt.layers=Ot,wt.stateDependentLayerIds&&(wt.stateDependentLayers=wt.stateDependentLayerIds.map($t=>Ot.filter(Tr=>Tr.id===$t)[0]));for(let $t of Ot)ht[$t.id]=wt}}return ht}(I.buckets,ie.style),this.hasSymbolBuckets=!1;for(let Me in this.buckets){let ze=this.buckets[Me];if(ze instanceof t.a6){if(this.hasSymbolBuckets=!0,!Te)break;ze.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let Me in this.buckets){let ze=this.buckets[Me];if(ze instanceof t.a6&&ze.hasRTLText){this.hasRTLText=!0,Ze().lazyLoad();break}}this.queryPadding=0;for(let Me in this.buckets){let ze=this.buckets[Me];this.queryPadding=Math.max(this.queryPadding,ie.style.getLayer(Me).queryRadius(ze))}I.imageAtlas&&(this.imageAtlas=I.imageAtlas),I.glyphAtlasImage&&(this.glyphAtlasImage=I.glyphAtlasImage)}else this.collisionBoxArray=new t.a5}unloadVectorData(){for(let I in this.buckets)this.buckets[I].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(I){return this.buckets[I.id]}upload(I){for(let Te in this.buckets){let Me=this.buckets[Te];Me.uploadPending()&&Me.upload(I)}let ie=I.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new u(I,this.imageAtlas.image,ie.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new u(I,this.glyphAtlasImage,ie.ALPHA),this.glyphAtlasImage=null)}prepare(I){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(I,this.imageAtlasTexture)}queryRenderedFeatures(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Me,cameraQueryGeometry:ze,scale:ht,tileSize:this.tileSize,pixelPosMatrix:Tr,transform:Ot,params:wt,queryPadding:this.queryPadding*$t},I,ie,Te):{}}querySourceFeatures(I,ie){let Te=this.latestFeatureIndex;if(!Te||!Te.rawTileData)return;let Me=Te.loadVTLayers(),ze=ie&&ie.sourceLayer?ie.sourceLayer:"",ht=Me._geojsonTileLayer||Me[ze];if(!ht)return;let wt=t.a7(ie&&ie.filter),{z:Ot,x:$t,y:Tr}=this.tileID.canonical,Sr={z:Ot,x:$t,y:Tr};for(let Kr=0;KrTe)Me=!1;else if(ie)if(this.expirationTime{this.remove(I,ze)},Te)),this.data[Me].push(ze),this.order.push(Me),this.order.length>this.max){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}has(I){return I.wrapped().key in this.data}getAndRemove(I){return this.has(I)?this._getAndRemoveByKey(I.wrapped().key):null}_getAndRemoveByKey(I){let ie=this.data[I].shift();return ie.timeout&&clearTimeout(ie.timeout),this.data[I].length===0&&delete this.data[I],this.order.splice(this.order.indexOf(I),1),ie.value}getByKey(I){let ie=this.data[I];return ie?ie[0].value:null}get(I){return this.has(I)?this.data[I.wrapped().key][0].value:null}remove(I,ie){if(!this.has(I))return this;let Te=I.wrapped().key,Me=ie===void 0?0:this.data[Te].indexOf(ie),ze=this.data[Te][Me];return this.data[Te].splice(Me,1),ze.timeout&&clearTimeout(ze.timeout),this.data[Te].length===0&&delete this.data[Te],this.onRemove(ze.value),this.order.splice(this.order.indexOf(Te),1),this}setMaxSize(I){for(this.max=I;this.order.length>this.max;){let ie=this._getAndRemoveByKey(this.order[0]);ie&&this.onRemove(ie)}return this}filter(I){let ie=[];for(let Te in this.data)for(let Me of this.data[Te])I(Me.value)||ie.push(Me);for(let Te of ie)this.remove(Te.value.tileID,Te)}}class St{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(I,ie,Te){let Me=String(ie);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][Me]=this.stateChanges[I][Me]||{},t.e(this.stateChanges[I][Me],Te),this.deletedStates[I]===null){this.deletedStates[I]={};for(let ze in this.state[I])ze!==Me&&(this.deletedStates[I][ze]=null)}else if(this.deletedStates[I]&&this.deletedStates[I][Me]===null){this.deletedStates[I][Me]={};for(let ze in this.state[I][Me])Te[ze]||(this.deletedStates[I][Me][ze]=null)}else for(let ze in Te)this.deletedStates[I]&&this.deletedStates[I][Me]&&this.deletedStates[I][Me][ze]===null&&delete this.deletedStates[I][Me][ze]}removeFeatureState(I,ie,Te){if(this.deletedStates[I]===null)return;let Me=String(ie);if(this.deletedStates[I]=this.deletedStates[I]||{},Te&&ie!==void 0)this.deletedStates[I][Me]!==null&&(this.deletedStates[I][Me]=this.deletedStates[I][Me]||{},this.deletedStates[I][Me][Te]=null);else if(ie!==void 0)if(this.stateChanges[I]&&this.stateChanges[I][Me])for(Te in this.deletedStates[I][Me]={},this.stateChanges[I][Me])this.deletedStates[I][Me][Te]=null;else this.deletedStates[I][Me]=null;else this.deletedStates[I]=null}getState(I,ie){let Te=String(ie),Me=t.e({},(this.state[I]||{})[Te],(this.stateChanges[I]||{})[Te]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){let ze=this.deletedStates[I][ie];if(ze===null)return{};for(let ht in ze)delete Me[ht]}return Me}initializeTileState(I,ie){I.setFeatureState(this.state,ie)}coalesceChanges(I,ie){let Te={};for(let Me in this.stateChanges){this.state[Me]=this.state[Me]||{};let ze={};for(let ht in this.stateChanges[Me])this.state[Me][ht]||(this.state[Me][ht]={}),t.e(this.state[Me][ht],this.stateChanges[Me][ht]),ze[ht]=this.state[Me][ht];Te[Me]=ze}for(let Me in this.deletedStates){this.state[Me]=this.state[Me]||{};let ze={};if(this.deletedStates[Me]===null)for(let ht in this.state[Me])ze[ht]={},this.state[Me][ht]={};else for(let ht in this.deletedStates[Me]){if(this.deletedStates[Me][ht]===null)this.state[Me][ht]={};else for(let wt of Object.keys(this.deletedStates[Me][ht]))delete this.state[Me][ht][wt];ze[ht]=this.state[Me][ht]}Te[Me]=Te[Me]||{},t.e(Te[Me],ze)}if(this.stateChanges={},this.deletedStates={},Object.keys(Te).length!==0)for(let Me in I)I[Me].setFeatureState(Te,ie)}}class kt extends t.E{constructor(I,ie,Te){super(),this.id=I,this.dispatcher=Te,this.on("data",Me=>this._dataHandler(Me)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Me,ze,ht,wt)=>{let Ot=new(he(ze.type))(Me,ze,ht,wt);if(Ot.id!==Me)throw new Error(`Expected Source id to be ${Me} instead of ${Ot.id}`);return Ot})(I,ie,Te,this),this._tiles={},this._cache=new Je(0,Me=>this._unloadTile(Me)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new St,this._didEmitContent=!1,this._updated=!1}onAdd(I){this.map=I,this._maxTileCacheSize=I?I._maxTileCacheSize:null,this._maxTileCacheZoomLevels=I?I._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(I)}onRemove(I){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(I)}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 I in this._tiles){let ie=this._tiles[I];if(ie.state!=="loaded"&&ie.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let I=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,I&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(I,ie,Te){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(I),this._tileLoaded(I,ie,Te)}catch(Me){I.state="errored",Me.status!==404?this._source.fire(new t.j(Me,{tile:I})):this.update(this.transform,this.terrain)}})}_unloadTile(I){this._source.unloadTile&&this._source.unloadTile(I)}_abortTile(I){this._source.abortTile&&this._source.abortTile(I),this._source.fire(new t.k("dataabort",{tile:I,coord:I.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(I){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ie in this._tiles){let Te=this._tiles[ie];Te.upload(I),Te.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(I=>I.tileID).sort(Bt).map(I=>I.key)}getRenderableIds(I){let ie=[];for(let Te in this._tiles)this._isIdRenderable(Te,I)&&ie.push(this._tiles[Te]);return I?ie.sort((Te,Me)=>{let ze=Te.tileID,ht=Me.tileID,wt=new t.P(ze.canonical.x,ze.canonical.y)._rotate(this.transform.angle),Ot=new t.P(ht.canonical.x,ht.canonical.y)._rotate(this.transform.angle);return ze.overscaledZ-ht.overscaledZ||Ot.y-wt.y||Ot.x-wt.x}).map(Te=>Te.tileID.key):ie.map(Te=>Te.tileID).sort(Bt).map(Te=>Te.key)}hasRenderableParent(I){let ie=this.findLoadedParent(I,0);return!!ie&&this._isIdRenderable(ie.tileID.key)}_isIdRenderable(I,ie){return this._tiles[I]&&this._tiles[I].hasData()&&!this._coveredTiles[I]&&(ie||!this._tiles[I].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let I in this._tiles)this._tiles[I].state!=="errored"&&this._reloadTile(I,"reloading")}}_reloadTile(I,ie){return t._(this,void 0,void 0,function*(){let Te=this._tiles[I];Te&&(Te.state!=="loading"&&(Te.state=ie),yield this._loadTile(Te,I,ie))})}_tileLoaded(I,ie,Te){I.timeAdded=i.now(),Te==="expired"&&(I.refreshedUponExpiration=!0),this._setTileReloadTimer(ie,I),this.getSource().type==="raster-dem"&&I.dem&&this._backfillDEM(I),this._state.initializeTileState(I,this.map?this.map.painter:null),I.aborted||this._source.fire(new t.k("data",{dataType:"source",tile:I,coord:I.tileID}))}_backfillDEM(I){let ie=this.getRenderableIds();for(let Me=0;Me1||(Math.abs(ht)>1&&(Math.abs(ht+Ot)===1?ht+=Ot:Math.abs(ht-Ot)===1&&(ht-=Ot)),ze.dem&&Me.dem&&(Me.dem.backfillBorder(ze.dem,ht,wt),Me.neighboringTiles&&Me.neighboringTiles[$t]&&(Me.neighboringTiles[$t].backfilled=!0)))}}getTile(I){return this.getTileByID(I.key)}getTileByID(I){return this._tiles[I]}_retainLoadedChildren(I,ie,Te,Me){for(let ze in this._tiles){let ht=this._tiles[ze];if(Me[ze]||!ht.hasData()||ht.tileID.overscaledZ<=ie||ht.tileID.overscaledZ>Te)continue;let wt=ht.tileID;for(;ht&&ht.tileID.overscaledZ>ie+1;){let $t=ht.tileID.scaledTo(ht.tileID.overscaledZ-1);ht=this._tiles[$t.key],ht&&ht.hasData()&&(wt=$t)}let Ot=wt;for(;Ot.overscaledZ>ie;)if(Ot=Ot.scaledTo(Ot.overscaledZ-1),I[Ot.key]){Me[wt.key]=wt;break}}}findLoadedParent(I,ie){if(I.key in this._loadedParentTiles){let Te=this._loadedParentTiles[I.key];return Te&&Te.tileID.overscaledZ>=ie?Te:null}for(let Te=I.overscaledZ-1;Te>=ie;Te--){let Me=I.scaledTo(Te),ze=this._getLoadedTile(Me);if(ze)return ze}}findLoadedSibling(I){return this._getLoadedTile(I)}_getLoadedTile(I){let ie=this._tiles[I.key];return ie&&ie.hasData()?ie:this._cache.getByKey(I.wrapped().key)}updateCacheSize(I){let ie=Math.ceil(I.width/this._source.tileSize)+1,Te=Math.ceil(I.height/this._source.tileSize)+1,Me=Math.floor(ie*Te*(this._maxTileCacheZoomLevels===null?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),ze=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Me):Me;this._cache.setMaxSize(ze)}handleWrapJump(I){let ie=Math.round((I-(this._prevLng===void 0?I:this._prevLng))/360);if(this._prevLng=I,ie){let Te={};for(let Me in this._tiles){let ze=this._tiles[Me];ze.tileID=ze.tileID.unwrapTo(ze.tileID.wrap+ie),Te[ze.tileID.key]=ze}this._tiles=Te;for(let Me in this._timers)clearTimeout(this._timers[Me]),delete this._timers[Me];for(let Me in this._tiles)this._setTileReloadTimer(Me,this._tiles[Me])}}_updateCoveredAndRetainedTiles(I,ie,Te,Me,ze,ht){let wt={},Ot={},$t=Object.keys(I),Tr=i.now();for(let Sr of $t){let Kr=I[Sr],na=this._tiles[Sr];if(!na||na.fadeEndTime!==0&&na.fadeEndTime<=Tr)continue;let qe=this.findLoadedParent(Kr,ie),$e=this.findLoadedSibling(Kr),lt=qe||$e||null;lt&&(this._addTile(lt.tileID),wt[lt.tileID.key]=lt.tileID),Ot[Sr]=Kr}this._retainLoadedChildren(Ot,Me,Te,I);for(let Sr in wt)I[Sr]||(this._coveredTiles[Sr]=!0,I[Sr]=wt[Sr]);if(ht){let Sr={},Kr={};for(let na of ze)this._tiles[na.key].hasData()?Sr[na.key]=na:Kr[na.key]=na;for(let na in Kr){let qe=Kr[na].children(this._source.maxzoom);this._tiles[qe[0].key]&&this._tiles[qe[1].key]&&this._tiles[qe[2].key]&&this._tiles[qe[3].key]&&(Sr[qe[0].key]=I[qe[0].key]=qe[0],Sr[qe[1].key]=I[qe[1].key]=qe[1],Sr[qe[2].key]=I[qe[2].key]=qe[2],Sr[qe[3].key]=I[qe[3].key]=qe[3],delete Kr[na])}for(let na in Kr){let qe=Kr[na],$e=this.findLoadedParent(qe,this._source.minzoom),lt=this.findLoadedSibling(qe),pt=$e||lt||null;if(pt){Sr[pt.tileID.key]=I[pt.tileID.key]=pt.tileID;for(let Et in Sr)Sr[Et].isChildOf(pt.tileID)&&delete Sr[Et]}}for(let na in this._tiles)Sr[na]||(this._coveredTiles[na]=!0)}}update(I,ie){if(!this._sourceLoaded||this._paused)return;let Te;this.transform=I,this.terrain=ie,this.updateCacheSize(I),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Te=I.getVisibleUnwrappedCoordinates(this._source.tileID).map(Tr=>new t.S(Tr.canonical.z,Tr.wrap,Tr.canonical.z,Tr.canonical.x,Tr.canonical.y)):(Te=I.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:ie}),this._source.hasTile&&(Te=Te.filter(Tr=>this._source.hasTile(Tr)))):Te=[];let Me=I.coveringZoomLevel(this._source),ze=Math.max(Me-kt.maxOverzooming,this._source.minzoom),ht=Math.max(Me+kt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Tr={};for(let Sr of Te)if(Sr.canonical.z>this._source.minzoom){let Kr=Sr.scaledTo(Sr.canonical.z-1);Tr[Kr.key]=Kr;let na=Sr.scaledTo(Math.max(this._source.minzoom,Math.min(Sr.canonical.z,5)));Tr[na.key]=na}Te=Te.concat(Object.values(Tr))}let wt=Te.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,wt&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ot=this._updateRetainedTiles(Te,Me);Vt(this._source.type)&&this._updateCoveredAndRetainedTiles(Ot,ze,ht,Me,Te,ie);for(let Tr in Ot)this._tiles[Tr].clearFadeHold();let $t=t.ab(this._tiles,Ot);for(let Tr of $t){let Sr=this._tiles[Tr];Sr.hasSymbolBuckets&&!Sr.holdingForFade()?Sr.setHoldDuration(this.map._fadeDuration):Sr.hasSymbolBuckets&&!Sr.symbolFadeFinished()||this._removeTile(Tr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let I in this._tiles)this._tiles[I].holdingForFade()&&this._removeTile(I)}_updateRetainedTiles(I,ie){var Te;let Me={},ze={},ht=Math.max(ie-kt.maxOverzooming,this._source.minzoom),wt=Math.max(ie+kt.maxUnderzooming,this._source.minzoom),Ot={};for(let $t of I){let Tr=this._addTile($t);Me[$t.key]=$t,Tr.hasData()||iethis._source.maxzoom){let Kr=$t.children(this._source.maxzoom)[0],na=this.getTile(Kr);if(na&&na.hasData()){Me[Kr.key]=Kr;continue}}else{let Kr=$t.children(this._source.maxzoom);if(Me[Kr[0].key]&&Me[Kr[1].key]&&Me[Kr[2].key]&&Me[Kr[3].key])continue}let Sr=Tr.wasRequested();for(let Kr=$t.overscaledZ-1;Kr>=ht;--Kr){let na=$t.scaledTo(Kr);if(ze[na.key])break;if(ze[na.key]=!0,Tr=this.getTile(na),!Tr&&Sr&&(Tr=this._addTile(na)),Tr){let qe=Tr.hasData();if((qe||!(!((Te=this.map)===null||Te===void 0)&&Te.cancelPendingTileRequestsWhileZooming)||Sr)&&(Me[na.key]=na),Sr=Tr.wasRequested(),qe)break}}}return Me}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let I in this._tiles){let ie=[],Te,Me=this._tiles[I].tileID;for(;Me.overscaledZ>0;){if(Me.key in this._loadedParentTiles){Te=this._loadedParentTiles[Me.key];break}ie.push(Me.key);let ze=Me.scaledTo(Me.overscaledZ-1);if(Te=this._getLoadedTile(ze),Te)break;Me=ze}for(let ze of ie)this._loadedParentTiles[ze]=Te}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let I in this._tiles){let ie=this._tiles[I].tileID,Te=this._getLoadedTile(ie);this._loadedSiblingTiles[ie.key]=Te}}_addTile(I){let ie=this._tiles[I.key];if(ie)return ie;ie=this._cache.getAndRemove(I),ie&&(this._setTileReloadTimer(I.key,ie),ie.tileID=I,this._state.initializeTileState(ie,this.map?this.map.painter:null),this._cacheTimers[I.key]&&(clearTimeout(this._cacheTimers[I.key]),delete this._cacheTimers[I.key],this._setTileReloadTimer(I.key,ie)));let Te=ie;return ie||(ie=new rt(I,this._source.tileSize*I.overscaleFactor()),this._loadTile(ie,I.key,ie.state)),ie.uses++,this._tiles[I.key]=ie,Te||this._source.fire(new t.k("dataloading",{tile:ie,coord:ie.tileID,dataType:"source"})),ie}_setTileReloadTimer(I,ie){I in this._timers&&(clearTimeout(this._timers[I]),delete this._timers[I]);let Te=ie.getExpiryTimeout();Te&&(this._timers[I]=setTimeout(()=>{this._reloadTile(I,"expired"),delete this._timers[I]},Te))}_removeTile(I){let ie=this._tiles[I];ie&&(ie.uses--,delete this._tiles[I],this._timers[I]&&(clearTimeout(this._timers[I]),delete this._timers[I]),ie.uses>0||(ie.hasData()&&ie.state!=="reloading"?this._cache.add(ie.tileID,ie,ie.getExpiryTimeout()):(ie.aborted=!0,this._abortTile(ie),this._unloadTile(ie))))}_dataHandler(I){let ie=I.sourceDataType;I.dataType==="source"&&ie==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&I.dataType==="source"&&ie==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let I in this._tiles)this._removeTile(I);this._cache.reset()}tilesIn(I,ie,Te){let Me=[],ze=this.transform;if(!ze)return Me;let ht=Te?ze.getCameraQueryGeometry(I):I,wt=I.map(qe=>ze.pointCoordinate(qe,this.terrain)),Ot=ht.map(qe=>ze.pointCoordinate(qe,this.terrain)),$t=this.getIds(),Tr=1/0,Sr=1/0,Kr=-1/0,na=-1/0;for(let qe of Ot)Tr=Math.min(Tr,qe.x),Sr=Math.min(Sr,qe.y),Kr=Math.max(Kr,qe.x),na=Math.max(na,qe.y);for(let qe=0;qe<$t.length;qe++){let $e=this._tiles[$t[qe]];if($e.holdingForFade())continue;let lt=$e.tileID,pt=Math.pow(2,ze.zoom-$e.tileID.overscaledZ),Et=ie*$e.queryPadding*t.X/$e.tileSize/pt,bt=[lt.getTilePoint(new t.Z(Tr,Sr)),lt.getTilePoint(new t.Z(Kr,na))];if(bt[0].x-Et=0&&bt[1].y+Et>=0){let Dt=wt.map(yr=>lt.getTilePoint(yr)),ur=Ot.map(yr=>lt.getTilePoint(yr));Me.push({tile:$e,tileID:lt,queryGeometry:Dt,cameraQueryGeometry:ur,scale:pt})}}return Me}getVisibleCoordinates(I){let ie=this.getRenderableIds(I).map(Te=>this._tiles[Te].tileID);for(let Te of ie)Te.posMatrix=this.transform.calculatePosMatrix(Te.toUnwrapped());return ie}hasTransition(){if(this._source.hasTransition())return!0;if(Vt(this._source.type)){let I=i.now();for(let ie in this._tiles)if(this._tiles[ie].fadeEndTime>=I)return!0}return!1}setFeatureState(I,ie,Te){this._state.updateState(I=I||"_geojsonTileLayer",ie,Te)}removeFeatureState(I,ie,Te){this._state.removeFeatureState(I=I||"_geojsonTileLayer",ie,Te)}getFeatureState(I,ie){return this._state.getState(I=I||"_geojsonTileLayer",ie)}setDependencies(I,ie,Te){let Me=this._tiles[I];Me&&Me.setDependencies(ie,Te)}reloadTilesForDependencies(I,ie){for(let Te in this._tiles)this._tiles[Te].hasDependency(I,ie)&&this._reloadTile(Te,"reloading");this._cache.filter(Te=>!Te.hasDependency(I,ie))}}function Bt(Oe,I){let ie=Math.abs(2*Oe.wrap)-+(Oe.wrap<0),Te=Math.abs(2*I.wrap)-+(I.wrap<0);return Oe.overscaledZ-I.overscaledZ||Te-ie||I.canonical.y-Oe.canonical.y||I.canonical.x-Oe.canonical.x}function Vt(Oe){return Oe==="raster"||Oe==="image"||Oe==="video"}kt.maxOverzooming=10,kt.maxUnderzooming=3;class Ar{constructor(I,ie){this.reset(I,ie)}reset(I,ie){this.points=I||[],this._distances=[0];for(let Te=1;Te0?(Me-ht)/wt:0;return this.points[ze].mult(1-Ot).add(this.points[ie].mult(Ot))}}function vr(Oe,I){let ie=!0;return Oe==="always"||Oe!=="never"&&I!=="never"||(ie=!1),ie}class qr{constructor(I,ie,Te){let Me=this.boxCells=[],ze=this.circleCells=[];this.xCellCount=Math.ceil(I/Te),this.yCellCount=Math.ceil(ie/Te);for(let ht=0;htthis.width||Me<0||ie>this.height)return[];let Ot=[];if(I<=0&&ie<=0&&this.width<=Te&&this.height<=Me){if(ze)return[{key:null,x1:I,y1:ie,x2:Te,y2:Me}];for(let $t=0;$t0}hitTestCircle(I,ie,Te,Me,ze){let ht=I-Te,wt=I+Te,Ot=ie-Te,$t=ie+Te;if(wt<0||ht>this.width||$t<0||Ot>this.height)return!1;let Tr=[];return this._forEachCell(ht,Ot,wt,$t,this._queryCellCircle,Tr,{hitTest:!0,overlapMode:Me,circle:{x:I,y:ie,radius:Te},seenUids:{box:{},circle:{}}},ze),Tr.length>0}_queryCell(I,ie,Te,Me,ze,ht,wt,Ot){let{seenUids:$t,hitTest:Tr,overlapMode:Sr}=wt,Kr=this.boxCells[ze];if(Kr!==null){let qe=this.bboxes;for(let $e of Kr)if(!$t.box[$e]){$t.box[$e]=!0;let lt=4*$e,pt=this.boxKeys[$e];if(I<=qe[lt+2]&&ie<=qe[lt+3]&&Te>=qe[lt+0]&&Me>=qe[lt+1]&&(!Ot||Ot(pt))&&(!Tr||!vr(Sr,pt.overlapMode))&&(ht.push({key:pt,x1:qe[lt],y1:qe[lt+1],x2:qe[lt+2],y2:qe[lt+3]}),Tr))return!0}}let na=this.circleCells[ze];if(na!==null){let qe=this.circles;for(let $e of na)if(!$t.circle[$e]){$t.circle[$e]=!0;let lt=3*$e,pt=this.circleKeys[$e];if(this._circleAndRectCollide(qe[lt],qe[lt+1],qe[lt+2],I,ie,Te,Me)&&(!Ot||Ot(pt))&&(!Tr||!vr(Sr,pt.overlapMode))){let Et=qe[lt],bt=qe[lt+1],Dt=qe[lt+2];if(ht.push({key:pt,x1:Et-Dt,y1:bt-Dt,x2:Et+Dt,y2:bt+Dt}),Tr)return!0}}}return!1}_queryCellCircle(I,ie,Te,Me,ze,ht,wt,Ot){let{circle:$t,seenUids:Tr,overlapMode:Sr}=wt,Kr=this.boxCells[ze];if(Kr!==null){let qe=this.bboxes;for(let $e of Kr)if(!Tr.box[$e]){Tr.box[$e]=!0;let lt=4*$e,pt=this.boxKeys[$e];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,qe[lt+0],qe[lt+1],qe[lt+2],qe[lt+3])&&(!Ot||Ot(pt))&&!vr(Sr,pt.overlapMode))return ht.push(!0),!0}}let na=this.circleCells[ze];if(na!==null){let qe=this.circles;for(let $e of na)if(!Tr.circle[$e]){Tr.circle[$e]=!0;let lt=3*$e,pt=this.circleKeys[$e];if(this._circlesCollide(qe[lt],qe[lt+1],qe[lt+2],$t.x,$t.y,$t.radius)&&(!Ot||Ot(pt))&&!vr(Sr,pt.overlapMode))return ht.push(!0),!0}}}_forEachCell(I,ie,Te,Me,ze,ht,wt,Ot){let $t=this._convertToXCellCoord(I),Tr=this._convertToYCellCoord(ie),Sr=this._convertToXCellCoord(Te),Kr=this._convertToYCellCoord(Me);for(let na=$t;na<=Sr;na++)for(let qe=Tr;qe<=Kr;qe++)if(ze.call(this,I,ie,Te,Me,this.xCellCount*qe+na,ht,wt,Ot))return}_convertToXCellCoord(I){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(I*this.xScale)))}_convertToYCellCoord(I){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(I*this.yScale)))}_circlesCollide(I,ie,Te,Me,ze,ht){let wt=Me-I,Ot=ze-ie,$t=Te+ht;return $t*$t>wt*wt+Ot*Ot}_circleAndRectCollide(I,ie,Te,Me,ze,ht,wt){let Ot=(ht-Me)/2,$t=Math.abs(I-(Me+Ot));if($t>Ot+Te)return!1;let Tr=(wt-ze)/2,Sr=Math.abs(ie-(ze+Tr));if(Sr>Tr+Te)return!1;if($t<=Ot||Sr<=Tr)return!0;let Kr=$t-Ot,na=Sr-Tr;return Kr*Kr+na*na<=Te*Te}}function kr(Oe,I,ie,Te,Me){let ze=t.H();return I?(t.K(ze,ze,[1/Me,1/Me,1]),ie||t.ad(ze,ze,Te.angle)):t.L(ze,Te.labelPlaneMatrix,Oe),ze}function Ur(Oe,I,ie,Te,Me){if(I){let ze=t.ae(Oe);return t.K(ze,ze,[Me,Me,1]),ie||t.ad(ze,ze,-Te.angle),ze}return Te.glCoordMatrix}function _t(Oe,I,ie,Te){let Me;Te?(Me=[Oe,I,Te(Oe,I),1],t.af(Me,Me,ie)):(Me=[Oe,I,0,1],nr(Me,Me,ie));let ze=Me[3];return{point:new t.P(Me[0]/ze,Me[1]/ze),signedDistanceFromCamera:ze,isOccluded:!1}}function Fe(Oe,I){return .5+Oe/I*.5}function Ye(Oe,I){return Oe.x>=-I[0]&&Oe.x<=I[0]&&Oe.y>=-I[1]&&Oe.y<=I[1]}function Ae(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe){let $e=Te?Oe.textSizeData:Oe.iconSizeData,lt=t.ag($e,ie.transform.zoom),pt=[256/ie.width*2+1,256/ie.height*2+1],Et=Te?Oe.text.dynamicLayoutVertexArray:Oe.icon.dynamicLayoutVertexArray;Et.clear();let bt=Oe.lineVertexArray,Dt=Te?Oe.text.placedSymbolArray:Oe.icon.placedSymbolArray,ur=ie.transform.width/ie.transform.height,yr=!1;for(let Er=0;ErMath.abs(ie.x-I.x)*Te?{useVertical:!0}:(Oe===t.ah.vertical?I.yie.x)?{needsFlipping:!0}:null}function Ke(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr){let Sr=ie/24,Kr=I.lineOffsetX*Sr,na=I.lineOffsetY*Sr,qe;if(I.numGlyphs>1){let $e=I.glyphStartIndex+I.numGlyphs,lt=I.lineStartIndex,pt=I.lineStartIndex+I.lineLength,Et=Le(Sr,wt,Kr,na,Te,I,Tr,Oe);if(!Et)return{notEnoughRoom:!0};let bt=_t(Et.first.point.x,Et.first.point.y,ht,Oe.getElevation).point,Dt=_t(Et.last.point.x,Et.last.point.y,ht,Oe.getElevation).point;if(Me&&!Te){let ur=We(I.writingMode,bt,Dt,$t);if(ur)return ur}qe=[Et.first];for(let ur=I.glyphStartIndex+1;ur<$e-1;ur++)qe.push(jt(Sr*wt.getoffsetX(ur),Kr,na,Te,I.segment,lt,pt,Oe,Tr));qe.push(Et.last)}else{if(Me&&!Te){let lt=_t(Oe.tileAnchorPoint.x,Oe.tileAnchorPoint.y,ze,Oe.getElevation).point,pt=I.lineStartIndex+I.segment+1,Et=new t.P(Oe.lineVertexArray.getx(pt),Oe.lineVertexArray.gety(pt)),bt=_t(Et.x,Et.y,ze,Oe.getElevation),Dt=bt.signedDistanceFromCamera>0?bt.point:function(yr,Er,jr,Qr,ha,Aa){return st(yr,Er,jr,1,ha,Aa)}(Oe.tileAnchorPoint,Et,lt,0,ze,Oe),ur=We(I.writingMode,lt,Dt,$t);if(ur)return ur}let $e=jt(Sr*wt.getoffsetX(I.glyphStartIndex),Kr,na,Te,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Oe,Tr);if(!$e||Oe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};qe=[$e]}for(let $e of qe)t.aj(Ot,$e.point,$e.angle);return{}}function st(Oe,I,ie,Te,Me,ze){let ht=Oe.add(Oe.sub(I)._unit()),wt=Me!==void 0?_t(ht.x,ht.y,Me,ze.getElevation).point:Ut(ht.x,ht.y,ze).point,Ot=ie.sub(wt);return ie.add(Ot._mult(Te/Ot.mag()))}function ot(Oe,I,ie){let Te=I.projectionCache;if(Te.projections[Oe])return Te.projections[Oe];let Me=new t.P(I.lineVertexArray.getx(Oe),I.lineVertexArray.gety(Oe)),ze=Ut(Me.x,Me.y,I);if(ze.signedDistanceFromCamera>0)return Te.projections[Oe]=ze.point,Te.anyProjectionOccluded=Te.anyProjectionOccluded||ze.isOccluded,ze.point;let ht=Oe-ie.direction;return function(wt,Ot,$t,Tr,Sr){return st(wt,Ot,$t,Tr,void 0,Sr)}(ie.distanceFromAnchor===0?I.tileAnchorPoint:new t.P(I.lineVertexArray.getx(ht),I.lineVertexArray.gety(ht)),Me,ie.previousVertex,ie.absOffsetX-ie.distanceFromAnchor+1,I)}function Ut(Oe,I,ie){let Te=Oe+ie.translation[0],Me=I+ie.translation[1],ze;return!ie.pitchWithMap&&ie.projection.useSpecialProjectionForSymbols?(ze=ie.projection.projectTileCoordinates(Te,Me,ie.unwrappedTileID,ie.getElevation),ze.point.x=(.5*ze.point.x+.5)*ie.width,ze.point.y=(.5*-ze.point.y+.5)*ie.height):(ze=_t(Te,Me,ie.labelPlaneMatrix,ie.getElevation),ze.isOccluded=!1),ze}function Ct(Oe,I,ie){return Oe._unit()._perp()._mult(I*ie)}function Pt(Oe,I,ie,Te,Me,ze,ht,wt,Ot){if(wt.projectionCache.offsets[Oe])return wt.projectionCache.offsets[Oe];let $t=ie.add(I);if(Oe+Ot.direction=Me)return wt.projectionCache.offsets[Oe]=$t,$t;let Tr=ot(Oe+Ot.direction,wt,Ot),Sr=Ct(Tr.sub(ie),ht,Ot.direction),Kr=ie.add(Sr),na=Tr.add(Sr);return wt.projectionCache.offsets[Oe]=t.ak(ze,$t,Kr,na)||$t,wt.projectionCache.offsets[Oe]}function jt(Oe,I,ie,Te,Me,ze,ht,wt,Ot){let $t=Te?Oe-I:Oe+I,Tr=$t>0?1:-1,Sr=0;Te&&(Tr*=-1,Sr=Math.PI),Tr<0&&(Sr+=Math.PI);let Kr,na=Tr>0?ze+Me:ze+Me+1;wt.projectionCache.cachedAnchorPoint?Kr=wt.projectionCache.cachedAnchorPoint:(Kr=Ut(wt.tileAnchorPoint.x,wt.tileAnchorPoint.y,wt).point,wt.projectionCache.cachedAnchorPoint=Kr);let qe,$e,lt=Kr,pt=Kr,Et=0,bt=0,Dt=Math.abs($t),ur=[],yr;for(;Et+bt<=Dt;){if(na+=Tr,na=ht)return null;Et+=bt,pt=lt,$e=qe;let Qr={absOffsetX:Dt,direction:Tr,distanceFromAnchor:Et,previousVertex:pt};if(lt=ot(na,wt,Qr),ie===0)ur.push(pt),yr=lt.sub(pt);else{let ha,Aa=lt.sub(pt);ha=Aa.mag()===0?Ct(ot(na+Tr,wt,Qr).sub(lt),ie,Tr):Ct(Aa,ie,Tr),$e||($e=pt.add(ha)),qe=Pt(na,ha,lt,ze,ht,$e,ie,wt,Qr),ur.push($e),yr=qe.sub($e)}bt=yr.mag()}let Er=yr._mult((Dt-Et)/bt)._add($e||pt),jr=Sr+Math.atan2(lt.y-pt.y,lt.x-pt.x);return ur.push(Er),{point:Er,angle:Ot?jr:0,path:ur}}let cr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function or(Oe,I){for(let ie=0;ie=1;Bn--)on.push(Vi.path[Bn]);for(let Bn=1;BnAo.signedDistanceFromCamera<=0)?[]:Bn.map(Ao=>Ao.point)}let Kn=[];if(on.length>0){let Bn=on[0].clone(),Ao=on[0].clone();for(let ls=1;ls=Aa.x&&Ao.x<=Da.x&&Bn.y>=Aa.y&&Ao.y<=Da.y?[on]:Ao.xDa.x||Ao.yDa.y?[]:t.al([on],Aa.x,Aa.y,Da.x,Da.y)}for(let Bn of Kn){ci.reset(Bn,.25*ha);let Ao=0;Ao=ci.length<=.5*ha?1:Math.ceil(ci.paddedLength/Sn)+1;for(let ls=0;ls_t(Me.x,Me.y,Te,ie.getElevation))}queryRenderedSymbols(I){if(I.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ie=[],Te=1/0,Me=1/0,ze=-1/0,ht=-1/0;for(let Tr of I){let Sr=new t.P(Tr.x+Pr,Tr.y+Pr);Te=Math.min(Te,Sr.x),Me=Math.min(Me,Sr.y),ze=Math.max(ze,Sr.x),ht=Math.max(ht,Sr.y),ie.push(Sr)}let wt=this.grid.query(Te,Me,ze,ht).concat(this.ignoredGrid.query(Te,Me,ze,ht)),Ot={},$t={};for(let Tr of wt){let Sr=Tr.key;if(Ot[Sr.bucketInstanceId]===void 0&&(Ot[Sr.bucketInstanceId]={}),Ot[Sr.bucketInstanceId][Sr.featureIndex])continue;let Kr=[new t.P(Tr.x1,Tr.y1),new t.P(Tr.x2,Tr.y1),new t.P(Tr.x2,Tr.y2),new t.P(Tr.x1,Tr.y2)];t.am(ie,Kr)&&(Ot[Sr.bucketInstanceId][Sr.featureIndex]=!0,$t[Sr.bucketInstanceId]===void 0&&($t[Sr.bucketInstanceId]=[]),$t[Sr.bucketInstanceId].push(Sr.featureIndex))}return $t}insertCollisionBox(I,ie,Te,Me,ze,ht){(Te?this.ignoredGrid:this.grid).insert({bucketInstanceId:Me,featureIndex:ze,collisionGroupID:ht,overlapMode:ie},I[0],I[1],I[2],I[3])}insertCollisionCircles(I,ie,Te,Me,ze,ht){let wt=Te?this.ignoredGrid:this.grid,Ot={bucketInstanceId:Me,featureIndex:ze,collisionGroupID:ht,overlapMode:ie};for(let $t=0;$t=this.screenRightBoundary||Methis.screenBottomBoundary}isInsideGrid(I,ie,Te,Me){return Te>=0&&I=0&&iethis.projectAndGetPerspectiveRatio(Te,ha.x,ha.y,Me,$t));jr=Qr.some(ha=>!ha.isOccluded),Er=Qr.map(ha=>ha.point)}else jr=!0;return{box:t.ao(Er),allPointsOccluded:!jr}}}function Fa(Oe,I,ie){return I*(t.X/(Oe.tileSize*Math.pow(2,ie-Oe.tileID.overscaledZ)))}class Ra{constructor(I,ie,Te,Me){this.opacity=I?Math.max(0,Math.min(1,I.opacity+(I.placed?ie:-ie))):Me&&Te?1:0,this.placed=Te}isHidden(){return this.opacity===0&&!this.placed}}class qa{constructor(I,ie,Te,Me,ze){this.text=new Ra(I?I.text:null,ie,Te,ze),this.icon=new Ra(I?I.icon:null,ie,Me,ze)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Wa{constructor(I,ie,Te){this.text=I,this.icon=ie,this.skipFade=Te}}class Ca{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class hi{constructor(I,ie,Te,Me,ze){this.bucketInstanceId=I,this.featureIndex=ie,this.sourceLayerIndex=Te,this.bucketIndex=Me,this.tileID=ze}}class wi{constructor(I){this.crossSourceCollisions=I,this.maxGroupID=0,this.collisionGroups={}}get(I){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[I]){let ie=++this.maxGroupID;this.collisionGroups[I]={ID:ie,predicate:Te=>Te.collisionGroupID===ie}}return this.collisionGroups[I]}}function Yt(Oe,I,ie,Te,Me){let{horizontalAlign:ze,verticalAlign:ht}=t.au(Oe);return new t.P(-(ze-.5)*I+Te[0]*Me,-(ht-.5)*ie+Te[1]*Me)}class Rt{constructor(I,ie,Te,Me,ze,ht){this.transform=I.clone(),this.terrain=Te,this.collisionIndex=new _a(this.transform,ie),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Me,this.retainedQueryData={},this.collisionGroups=new wi(ze),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ht,ht&&(ht.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(I){let ie=this.terrain;return ie?(Te,Me)=>ie.getElevation(I,Te,Me):null}getBucketParts(I,ie,Te,Me){let ze=Te.getBucket(ie),ht=Te.latestFeatureIndex;if(!ze||!ht||ie.id!==ze.layerIds[0])return;let wt=Te.collisionBoxArray,Ot=ze.layers[0].layout,$t=ze.layers[0].paint,Tr=Math.pow(2,this.transform.zoom-Te.tileID.overscaledZ),Sr=Te.tileSize/t.X,Kr=Te.tileID.toUnwrapped(),na=this.transform.calculatePosMatrix(Kr),qe=Ot.get("text-pitch-alignment")==="map",$e=Ot.get("text-rotation-alignment")==="map",lt=Fa(Te,1,this.transform.zoom),pt=this.collisionIndex.mapProjection.translatePosition(this.transform,Te,$t.get("text-translate"),$t.get("text-translate-anchor")),Et=this.collisionIndex.mapProjection.translatePosition(this.transform,Te,$t.get("icon-translate"),$t.get("icon-translate-anchor")),bt=kr(na,qe,$e,this.transform,lt),Dt=null;if(qe){let yr=Ur(na,qe,$e,this.transform,lt);Dt=t.L([],this.transform.labelPlaneMatrix,yr)}this.retainedQueryData[ze.bucketInstanceId]=new hi(ze.bucketInstanceId,ht,ze.sourceLayerIndex,ze.index,Te.tileID);let ur={bucket:ze,layout:Ot,translationText:pt,translationIcon:Et,posMatrix:na,unwrappedTileID:Kr,textLabelPlaneMatrix:bt,labelToScreenMatrix:Dt,scale:Tr,textPixelRatio:Sr,holdingForFade:Te.holdingForFade(),collisionBoxArray:wt,partiallyEvaluatedTextSize:t.ag(ze.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(ze.sourceID)};if(Me)for(let yr of ze.sortKeyRanges){let{sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr}=yr;I.push({sortKey:Er,symbolInstanceStart:jr,symbolInstanceEnd:Qr,parameters:ur})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:ze.symbolInstances.length,parameters:ur})}attemptAnchorPlacement(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe,$e,lt,pt,Et,bt){let Dt=t.aq[I.textAnchor],ur=[I.textOffset0,I.textOffset1],yr=Yt(Dt,Te,Me,ur,ze),Er=this.collisionIndex.placeCollisionBox(ie,Kr,Ot,$t,Tr,wt,ht,lt,Sr.predicate,bt,yr);if((!Et||this.collisionIndex.placeCollisionBox(Et,Kr,Ot,$t,Tr,wt,ht,pt,Sr.predicate,bt,yr).placeable)&&Er.placeable){let jr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[na.crossTileID]&&this.prevPlacement.placements[na.crossTileID]&&this.prevPlacement.placements[na.crossTileID].text&&(jr=this.prevPlacement.variableOffsets[na.crossTileID].anchor),na.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[na.crossTileID]={textOffset:ur,width:Te,height:Me,anchor:Dt,textBoxScale:ze,prevAnchor:jr},this.markUsedJustification(qe,Dt,na,$e),qe.allowVerticalPlacement&&(this.markUsedOrientation(qe,$e,na),this.placedOrientations[na.crossTileID]=$e),{shift:yr,placedGlyphBoxes:Er}}}placeLayerBucketPart(I,ie,Te){let{bucket:Me,layout:ze,translationText:ht,translationIcon:wt,posMatrix:Ot,unwrappedTileID:$t,textLabelPlaneMatrix:Tr,labelToScreenMatrix:Sr,textPixelRatio:Kr,holdingForFade:na,collisionBoxArray:qe,partiallyEvaluatedTextSize:$e,collisionGroup:lt}=I.parameters,pt=ze.get("text-optional"),Et=ze.get("icon-optional"),bt=t.ar(ze,"text-overlap","text-allow-overlap"),Dt=bt==="always",ur=t.ar(ze,"icon-overlap","icon-allow-overlap"),yr=ur==="always",Er=ze.get("text-rotation-alignment")==="map",jr=ze.get("text-pitch-alignment")==="map",Qr=ze.get("icon-text-fit")!=="none",ha=ze.get("symbol-z-order")==="viewport-y",Aa=Dt&&(yr||!Me.hasIconData()||Et),Da=yr&&(Dt||!Me.hasTextData()||pt);!Me.collisionArrays&&qe&&Me.deserializeCollisionBoxes(qe);let ci=this._getTerrainElevationFunc(this.retainedQueryData[Me.bucketInstanceId].tileID),Vi=(ji,on,Sn)=>{var Kn,Bn;if(ie[ji.crossTileID])return;if(na)return void(this.placements[ji.crossTileID]=new Wa(!1,!1,!1));let Ao=!1,ls=!1,Mo=!0,Yo=null,ds={box:null,placeable:!1,offscreen:null},ul={box:null,placeable:!1,offscreen:null},tl=null,es=null,ts=null,Il=0,tu=0,Ru=0;on.textFeatureIndex?Il=on.textFeatureIndex:ji.useRuntimeCollisionCircles&&(Il=ji.featureIndex),on.verticalTextFeatureIndex&&(tu=on.verticalTextFeatureIndex);let vu=on.textBox;if(vu){let Gl=et=>{let dt=t.ah.horizontal;if(Me.allowVerticalPlacement&&!et&&this.prevPlacement){let yt=this.prevPlacement.placedOrientations[ji.crossTileID];yt&&(this.placedOrientations[ji.crossTileID]=yt,dt=yt,this.markUsedOrientation(Me,dt,ji))}return dt},Hl=(et,dt)=>{if(Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&on.verticalTextBox){for(let yt of Me.writingModes)if(yt===t.ah.vertical?(ds=dt(),ul=ds):ds=et(),ds&&ds.placeable)break}else ds=et()},me=ji.textAnchorOffsetStartIndex,De=ji.textAnchorOffsetEndIndex;if(De===me){let et=(dt,yt)=>{let Tt=this.collisionIndex.placeCollisionBox(dt,bt,Kr,Ot,$t,jr,Er,ht,lt.predicate,ci);return Tt&&Tt.placeable&&(this.markUsedOrientation(Me,yt,ji),this.placedOrientations[ji.crossTileID]=yt),Tt};Hl(()=>et(vu,t.ah.horizontal),()=>{let dt=on.verticalTextBox;return Me.allowVerticalPlacement&&ji.numVerticalGlyphVertices>0&&dt?et(dt,t.ah.vertical):{box:null,offscreen:null}}),Gl(ds&&ds.placeable)}else{let et=t.aq[(Bn=(Kn=this.prevPlacement)===null||Kn===void 0?void 0:Kn.variableOffsets[ji.crossTileID])===null||Bn===void 0?void 0:Bn.anchor],dt=(Tt,tr,zt)=>{let _r=Tt.x2-Tt.x1,Gr=Tt.y2-Tt.y1,Xr=ji.textBoxScale,wa=Qr&&ur==="never"?tr:null,pa=null,Ja=bt==="never"?1:2,ti="never";et&&Ja++;for(let Sa=0;Sadt(vu,on.iconBox,t.ah.horizontal),()=>{let Tt=on.verticalTextBox;return Me.allowVerticalPlacement&&(!ds||!ds.placeable)&&ji.numVerticalGlyphVertices>0&&Tt?dt(Tt,on.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),ds&&(Ao=ds.placeable,Mo=ds.offscreen);let yt=Gl(ds&&ds.placeable);if(!Ao&&this.prevPlacement){let Tt=this.prevPlacement.variableOffsets[ji.crossTileID];Tt&&(this.variableOffsets[ji.crossTileID]=Tt,this.markUsedJustification(Me,Tt.anchor,ji,yt))}}}if(tl=ds,Ao=tl&&tl.placeable,Mo=tl&&tl.offscreen,ji.useRuntimeCollisionCircles){let Gl=Me.text.placedSymbolArray.get(ji.centerJustifiedTextSymbolIndex),Hl=t.ai(Me.textSizeData,$e,Gl),me=ze.get("text-padding");es=this.collisionIndex.placeCollisionCircles(bt,Gl,Me.lineVertexArray,Me.glyphOffsetArray,Hl,Ot,$t,Tr,Sr,Te,jr,lt.predicate,ji.collisionCircleDiameter,me,ht,ci),es.circles.length&&es.collisionDetected&&!Te&&t.w("Collisions detected, but collision boxes are not shown"),Ao=Dt||es.circles.length>0&&!es.collisionDetected,Mo=Mo&&es.offscreen}if(on.iconFeatureIndex&&(Ru=on.iconFeatureIndex),on.iconBox){let Gl=Hl=>this.collisionIndex.placeCollisionBox(Hl,ur,Kr,Ot,$t,jr,Er,wt,lt.predicate,ci,Qr&&Yo?Yo:void 0);ul&&ul.placeable&&on.verticalIconBox?(ts=Gl(on.verticalIconBox),ls=ts.placeable):(ts=Gl(on.iconBox),ls=ts.placeable),Mo=Mo&&ts.offscreen}let wl=pt||ji.numHorizontalGlyphVertices===0&&ji.numVerticalGlyphVertices===0,fu=Et||ji.numIconVertices===0;wl||fu?fu?wl||(ls=ls&&Ao):Ao=ls&&Ao:ls=Ao=ls&&Ao;let uc=ls&&ts.placeable;if(Ao&&tl.placeable&&this.collisionIndex.insertCollisionBox(tl.box,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,ul&&ul.placeable&&tu?tu:Il,lt.ID),uc&&this.collisionIndex.insertCollisionBox(ts.box,ur,ze.get("icon-ignore-placement"),Me.bucketInstanceId,Ru,lt.ID),es&&Ao&&this.collisionIndex.insertCollisionCircles(es.circles,bt,ze.get("text-ignore-placement"),Me.bucketInstanceId,Il,lt.ID),Te&&this.storeCollisionData(Me.bucketInstanceId,Sn,on,tl,ts,es),ji.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Me.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ji.crossTileID]=new Wa(Ao||Aa,ls||Da,Mo||Me.justReloaded),ie[ji.crossTileID]=!0};if(ha){if(I.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ji=Me.getSortedSymbolIndexes(this.transform.angle);for(let on=ji.length-1;on>=0;--on){let Sn=ji[on];Vi(Me.symbolInstances.get(Sn),Me.collisionArrays[Sn],Sn)}}else for(let ji=I.symbolInstanceStart;ji=0&&(I.text.placedSymbolArray.get(wt).crossTileID=ze>=0&&wt!==ze?0:Te.crossTileID)}markUsedOrientation(I,ie,Te){let Me=ie===t.ah.horizontal||ie===t.ah.horizontalOnly?ie:0,ze=ie===t.ah.vertical?ie:0,ht=[Te.leftJustifiedTextSymbolIndex,Te.centerJustifiedTextSymbolIndex,Te.rightJustifiedTextSymbolIndex];for(let wt of ht)I.text.placedSymbolArray.get(wt).placedOrientation=Me;Te.verticalPlacedTextSymbolIndex&&(I.text.placedSymbolArray.get(Te.verticalPlacedTextSymbolIndex).placedOrientation=ze)}commit(I){this.commitTime=I,this.zoomAtLastRecencyCheck=this.transform.zoom;let ie=this.prevPlacement,Te=!1;this.prevZoomAdjustment=ie?ie.zoomAdjustment(this.transform.zoom):0;let Me=ie?ie.symbolFadeChange(I):1,ze=ie?ie.opacities:{},ht=ie?ie.variableOffsets:{},wt=ie?ie.placedOrientations:{};for(let Ot in this.placements){let $t=this.placements[Ot],Tr=ze[Ot];Tr?(this.opacities[Ot]=new qa(Tr,Me,$t.text,$t.icon),Te=Te||$t.text!==Tr.text.placed||$t.icon!==Tr.icon.placed):(this.opacities[Ot]=new qa(null,Me,$t.text,$t.icon,$t.skipFade),Te=Te||$t.text||$t.icon)}for(let Ot in ze){let $t=ze[Ot];if(!this.opacities[Ot]){let Tr=new qa($t,Me,!1,!1);Tr.isHidden()||(this.opacities[Ot]=Tr,Te=Te||$t.text.placed||$t.icon.placed)}}for(let Ot in ht)this.variableOffsets[Ot]||!this.opacities[Ot]||this.opacities[Ot].isHidden()||(this.variableOffsets[Ot]=ht[Ot]);for(let Ot in wt)this.placedOrientations[Ot]||!this.opacities[Ot]||this.opacities[Ot].isHidden()||(this.placedOrientations[Ot]=wt[Ot]);if(ie&&ie.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Te?this.lastPlacementChangeTime=I:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ie?ie.lastPlacementChangeTime:I)}updateLayerOpacities(I,ie){let Te={};for(let Me of ie){let ze=Me.getBucket(I);ze&&Me.latestFeatureIndex&&I.id===ze.layerIds[0]&&this.updateBucketOpacities(ze,Me.tileID,Te,Me.collisionBoxArray)}}updateBucketOpacities(I,ie,Te,Me){I.hasTextData()&&(I.text.opacityVertexArray.clear(),I.text.hasVisibleVertices=!1),I.hasIconData()&&(I.icon.opacityVertexArray.clear(),I.icon.hasVisibleVertices=!1),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexArray.clear(),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexArray.clear();let ze=I.layers[0],ht=ze.layout,wt=new qa(null,0,!1,!1,!0),Ot=ht.get("text-allow-overlap"),$t=ht.get("icon-allow-overlap"),Tr=ze._unevaluatedLayout.hasValue("text-variable-anchor")||ze._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Sr=ht.get("text-rotation-alignment")==="map",Kr=ht.get("text-pitch-alignment")==="map",na=ht.get("icon-text-fit")!=="none",qe=new qa(null,0,Ot&&($t||!I.hasIconData()||ht.get("icon-optional")),$t&&(Ot||!I.hasTextData()||ht.get("text-optional")),!0);!I.collisionArrays&&Me&&(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData())&&I.deserializeCollisionBoxes(Me);let $e=(pt,Et,bt)=>{for(let Dt=0;Dt0,jr=this.placedOrientations[Et.crossTileID],Qr=jr===t.ah.vertical,ha=jr===t.ah.horizontal||jr===t.ah.horizontalOnly;if(bt>0||Dt>0){let Da=Za(yr.text);$e(I.text,bt,Qr?ri:Da),$e(I.text,Dt,ha?ri:Da);let ci=yr.text.isHidden();[Et.rightJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.leftJustifiedTextSymbolIndex].forEach(on=>{on>=0&&(I.text.placedSymbolArray.get(on).hidden=ci||Qr?1:0)}),Et.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).hidden=ci||ha?1:0);let Vi=this.variableOffsets[Et.crossTileID];Vi&&this.markUsedJustification(I,Vi.anchor,Et,jr);let ji=this.placedOrientations[Et.crossTileID];ji&&(this.markUsedJustification(I,"left",Et,ji),this.markUsedOrientation(I,ji,Et))}if(Er){let Da=Za(yr.icon),ci=!(na&&Et.verticalPlacedIconSymbolIndex&&Qr);Et.placedIconSymbolIndex>=0&&($e(I.icon,Et.numIconVertices,ci?Da:ri),I.icon.placedSymbolArray.get(Et.placedIconSymbolIndex).hidden=yr.icon.isHidden()),Et.verticalPlacedIconSymbolIndex>=0&&($e(I.icon,Et.numVerticalIconVertices,ci?ri:Da),I.icon.placedSymbolArray.get(Et.verticalPlacedIconSymbolIndex).hidden=yr.icon.isHidden())}let Aa=lt&<.has(pt)?lt.get(pt):{text:null,icon:null};if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){let Da=I.collisionArrays[pt];if(Da){let ci=new t.P(0,0);if(Da.textBox||Da.verticalTextBox){let Vi=!0;if(Tr){let ji=this.variableOffsets[ur];ji?(ci=Yt(ji.anchor,ji.width,ji.height,ji.textOffset,ji.textBoxScale),Sr&&ci._rotate(Kr?this.transform.angle:-this.transform.angle)):Vi=!1}if(Da.textBox||Da.verticalTextBox){let ji;Da.textBox&&(ji=Qr),Da.verticalTextBox&&(ji=ha),Zt(I.textCollisionBox.collisionVertexArray,yr.text.placed,!Vi||ji,Aa.text,ci.x,ci.y)}}if(Da.iconBox||Da.verticalIconBox){let Vi=!!(!ha&&Da.verticalIconBox),ji;Da.iconBox&&(ji=Vi),Da.verticalIconBox&&(ji=!Vi),Zt(I.iconCollisionBox.collisionVertexArray,yr.icon.placed,ji,Aa.icon,na?ci.x:0,na?ci.y:0)}}}}if(I.sortFeatures(this.transform.angle),this.retainedQueryData[I.bucketInstanceId]&&(this.retainedQueryData[I.bucketInstanceId].featureSortOrder=I.featureSortOrder),I.hasTextData()&&I.text.opacityVertexBuffer&&I.text.opacityVertexBuffer.updateData(I.text.opacityVertexArray),I.hasIconData()&&I.icon.opacityVertexBuffer&&I.icon.opacityVertexBuffer.updateData(I.icon.opacityVertexArray),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexBuffer&&I.iconCollisionBox.collisionVertexBuffer.updateData(I.iconCollisionBox.collisionVertexArray),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexBuffer&&I.textCollisionBox.collisionVertexBuffer.updateData(I.textCollisionBox.collisionVertexArray),I.text.opacityVertexArray.length!==I.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${I.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${I.text.layoutVertexArray.length}) / 4`);if(I.icon.opacityVertexArray.length!==I.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${I.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${I.icon.layoutVertexArray.length}) / 4`);if(I.bucketInstanceId in this.collisionCircleArrays){let pt=this.collisionCircleArrays[I.bucketInstanceId];I.placementInvProjMatrix=pt.invProjMatrix,I.placementViewportMatrix=pt.viewportMatrix,I.collisionCircleArray=pt.circles,delete this.collisionCircleArrays[I.bucketInstanceId]}}symbolFadeChange(I){return this.fadeDuration===0?1:(I-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(I){return Math.max(0,(this.transform.zoom-I)/1.5)}hasTransitions(I){return this.stale||I-this.lastPlacementChangeTimeI}setStale(){this.stale=!0}}function Zt(Oe,I,ie,Te,Me,ze){Te&&Te.length!==0||(Te=[0,0,0,0]);let ht=Te[0]-Pr,wt=Te[1]-Pr,Ot=Te[2]-Pr,$t=Te[3]-Pr;Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,wt),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,wt),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,Ot,$t),Oe.emplaceBack(I?1:0,ie?1:0,Me||0,ze||0,ht,$t)}let Jt=Math.pow(2,25),Fr=Math.pow(2,24),ta=Math.pow(2,17),ra=Math.pow(2,16),ca=Math.pow(2,9),Ba=Math.pow(2,8),$a=Math.pow(2,1);function Za(Oe){if(Oe.opacity===0&&!Oe.placed)return 0;if(Oe.opacity===1&&Oe.placed)return 4294967295;let I=Oe.placed?1:0,ie=Math.floor(127*Oe.opacity);return ie*Jt+I*Fr+ie*ta+I*ra+ie*ca+I*Ba+ie*$a+I}let ri=0;function pi(){return{isOccluded:(Oe,I,ie)=>!1,getPitchedTextCorrection:(Oe,I,ie)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Oe,I,ie,Te){throw new Error("Not implemented.")},translatePosition:(Oe,I,ie,Te)=>function(Me,ze,ht,wt,Ot=!1){if(!ht[0]&&!ht[1])return[0,0];let $t=Ot?wt==="map"?Me.angle:0:wt==="viewport"?-Me.angle:0;if($t){let Tr=Math.sin($t),Sr=Math.cos($t);ht=[ht[0]*Sr-ht[1]*Tr,ht[0]*Tr+ht[1]*Sr]}return[Ot?ht[0]:Fa(ze,ht[0],Me.zoom),Ot?ht[1]:Fa(ze,ht[1],Me.zoom)]}(Oe,I,ie,Te),getCircleRadiusCorrection:Oe=>1}}class Ia{constructor(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&!I.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(I,ie,Te,Me,ze){let ht=this._bucketParts;for(;this._currentTileIndexwt.sortKey-Ot.sortKey));this._currentPartIndex!this._forceFullPlacement&&i.now()-Me>2;for(;this._currentPlacementIndex>=0;){let ht=ie[I[this._currentPlacementIndex]],wt=this.placement.collisionIndex.transform.zoom;if(ht.type==="symbol"&&(!ht.minzoom||ht.minzoom<=wt)&&(!ht.maxzoom||ht.maxzoom>wt)){if(this._inProgressLayer||(this._inProgressLayer=new Ia(ht)),this._inProgressLayer.continuePlacement(Te[ht.source],this.placement,this._showCollisionBoxes,ht,ze))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(I){return this.placement.commit(I),this.placement}}let tn=512/t.X/2;class cn{constructor(I,ie,Te){this.tileID=I,this.bucketInstanceId=Te,this._symbolsByKey={};let Me=new Map;for(let ze=0;ze({x:Math.floor(Ot.anchorX*tn),y:Math.floor(Ot.anchorY*tn)})),crossTileIDs:ht.map(Ot=>Ot.crossTileID)};if(wt.positions.length>128){let Ot=new t.av(wt.positions.length,16,Uint16Array);for(let{x:$t,y:Tr}of wt.positions)Ot.add($t,Tr);Ot.finish(),delete wt.positions,wt.index=Ot}this._symbolsByKey[ze]=wt}}getScaledCoordinates(I,ie){let{x:Te,y:Me,z:ze}=this.tileID.canonical,{x:ht,y:wt,z:Ot}=ie.canonical,$t=tn/Math.pow(2,Ot-ze),Tr=(wt*t.X+I.anchorY)*$t,Sr=Me*t.X*tn;return{x:Math.floor((ht*t.X+I.anchorX)*$t-Te*t.X*tn),y:Math.floor(Tr-Sr)}}findMatches(I,ie,Te){let Me=this.tileID.canonical.zI)}}class xt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ut{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(I){let ie=Math.round((I-this.lng)/360);if(ie!==0)for(let Te in this.indexes){let Me=this.indexes[Te],ze={};for(let ht in Me){let wt=Me[ht];wt.tileID=wt.tileID.unwrapTo(wt.tileID.wrap+ie),ze[wt.tileID.key]=wt}this.indexes[Te]=ze}this.lng=I}addBucket(I,ie,Te){if(this.indexes[I.overscaledZ]&&this.indexes[I.overscaledZ][I.key]){if(this.indexes[I.overscaledZ][I.key].bucketInstanceId===ie.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(I.overscaledZ,this.indexes[I.overscaledZ][I.key])}for(let ze=0;zeI.overscaledZ)for(let wt in ht){let Ot=ht[wt];Ot.tileID.isChildOf(I)&&Ot.findMatches(ie.symbolInstances,I,Me)}else{let wt=ht[I.scaledTo(Number(ze)).key];wt&&wt.findMatches(ie.symbolInstances,I,Me)}}for(let ze=0;ze{ie[Te]=!0});for(let Te in this.layerIndexes)ie[Te]||delete this.layerIndexes[Te]}}let Cr=(Oe,I)=>t.t(Oe,I&&I.filter(ie=>ie.identifier!=="source.canvas")),wr=t.aw();class Rr extends t.E{constructor(I,ie={}){super(),this._rtlPluginLoaded=()=>{for(let Te in this.sourceCaches){let Me=this.sourceCaches[Te].getSource().type;Me!=="vector"&&Me!=="geojson"||this.sourceCaches[Te].reload()}},this.map=I,this.dispatcher=new Q(X(),I._getMapId()),this.dispatcher.registerMessageHandler("GG",(Te,Me)=>this.getGlyphs(Te,Me)),this.dispatcher.registerMessageHandler("GI",(Te,Me)=>this.getImages(Te,Me)),this.imageManager=new y,this.imageManager.setEventedParent(this),this.glyphManager=new F(I._requestManager,ie.localIdeographFontFamily),this.lineAtlas=new W(256,512),this.crossTileSymbolIndex=new Or,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()),Ze().on(se,this._rtlPluginLoaded),this.on("data",Te=>{if(Te.dataType!=="source"||Te.sourceDataType!=="metadata")return;let Me=this.sourceCaches[Te.sourceId];if(!Me)return;let ze=Me.getSource();if(ze&&ze.vectorLayerIds)for(let ht in this._layers){let wt=this._layers[ht];wt.source===ze.id&&this._validateLayer(wt)}})}loadURL(I,ie={},Te){this.fire(new t.k("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate;let Me=this.map._requestManager.transformRequest(I,"Style");this._loadStyleRequest=new AbortController;let ze=this._loadStyleRequest;t.h(Me,this._loadStyleRequest).then(ht=>{this._loadStyleRequest=null,this._load(ht.data,ie,Te)}).catch(ht=>{this._loadStyleRequest=null,ht&&!ze.signal.aborted&&this.fire(new t.j(ht))})}loadJSON(I,ie={},Te){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,i.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ie.validate=ie.validate!==!1,this._load(I,ie,Te)}).catch(()=>{})}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(wr,{validate:!1})}_load(I,ie,Te){var Me;let ze=ie.transformStyle?ie.transformStyle(Te,I):I;if(!ie.validate||!Cr(this,t.u(ze))){this._loaded=!0,this.stylesheet=ze;for(let ht in ze.sources)this.addSource(ht,ze.sources[ht],{validate:!1});ze.sprite?this._loadSprite(ze.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(ze.glyphs),this._createLayers(),this.light=new L(this.stylesheet.light),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((Me=this.stylesheet.terrain)!==null&&Me!==void 0?Me:null),this.fire(new t.k("data",{dataType:"style"})),this.fire(new t.k("style.load"))}}_createLayers(){let I=t.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",I),this._order=I.map(ie=>ie.id),this._layers={},this._serializedLayers=null;for(let ie of I){let Te=t.aA(ie);Te.setEventedParent(this,{layer:{id:ie.id}}),this._layers[ie.id]=Te}}_loadSprite(I,ie=!1,Te=void 0){let Me;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(ze,ht,wt,Ot){return t._(this,void 0,void 0,function*(){let $t=b(ze),Tr=wt>1?"@2x":"",Sr={},Kr={};for(let{id:na,url:qe}of $t){let $e=ht.transformRequest(d(qe,Tr,".json"),"SpriteJSON");Sr[na]=t.h($e,Ot);let lt=ht.transformRequest(d(qe,Tr,".png"),"SpriteImage");Kr[na]=l.getImage(lt,Ot)}return yield Promise.all([...Object.values(Sr),...Object.values(Kr)]),function(na,qe){return t._(this,void 0,void 0,function*(){let $e={};for(let lt in na){$e[lt]={};let pt=i.getImageCanvasContext((yield qe[lt]).data),Et=(yield na[lt]).data;for(let bt in Et){let{width:Dt,height:ur,x:yr,y:Er,sdf:jr,pixelRatio:Qr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi}=Et[bt];$e[lt][bt]={data:null,pixelRatio:Qr,sdf:jr,stretchX:ha,stretchY:Aa,content:Da,textFitWidth:ci,textFitHeight:Vi,spriteData:{width:Dt,height:ur,x:yr,y:Er,context:pt}}}}return $e})}(Sr,Kr)})}(I,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(ze=>{if(this._spriteRequest=null,ze)for(let ht in ze){this._spritesImagesIds[ht]=[];let wt=this._spritesImagesIds[ht]?this._spritesImagesIds[ht].filter(Ot=>!(Ot in ze)):[];for(let Ot of wt)this.imageManager.removeImage(Ot),this._changedImages[Ot]=!0;for(let Ot in ze[ht]){let $t=ht==="default"?Ot:`${ht}:${Ot}`;this._spritesImagesIds[ht].push($t),$t in this.imageManager.images?this.imageManager.updateImage($t,ze[ht][Ot],!1):this.imageManager.addImage($t,ze[ht][Ot]),ie&&(this._changedImages[$t]=!0)}}}).catch(ze=>{this._spriteRequest=null,Me=ze,this.fire(new t.j(Me))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ie&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"})),Te&&Te(Me)})}_unloadSprite(){for(let I of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(I),this._changedImages[I]=!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(I){let ie=this.sourceCaches[I.source];if(!ie)return;let Te=I.sourceLayer;if(!Te)return;let Me=ie.getSource();(Me.type==="geojson"||Me.vectorLayerIds&&Me.vectorLayerIds.indexOf(Te)===-1)&&this.fire(new t.j(new Error(`Source layer "${Te}" does not exist on source "${Me.id}" as specified by style layer "${I.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let I in this.sourceCaches)if(!this.sourceCaches[I].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(I,ie=!1){let Te=this._serializedAllLayers();if(!I||I.length===0)return Object.values(ie?t.aB(Te):Te);let Me=[];for(let ze of I)if(Te[ze]){let ht=ie?t.aB(Te[ze]):Te[ze];Me.push(ht)}return Me}_serializedAllLayers(){let I=this._serializedLayers;if(I)return I;I=this._serializedLayers={};let ie=Object.keys(this._layers);for(let Te of ie){let Me=this._layers[Te];Me.type!=="custom"&&(I[Te]=Me.serialize())}return I}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let I in this.sourceCaches)if(this.sourceCaches[I].hasTransition())return!0;for(let I in this._layers)if(this._layers[I].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(I){if(!this._loaded)return;let ie=this._changed;if(ie){let Me=Object.keys(this._updatedLayers),ze=Object.keys(this._removedLayers);(Me.length||ze.length)&&this._updateWorkerLayers(Me,ze);for(let ht in this._updatedSources){let wt=this._updatedSources[ht];if(wt==="reload")this._reloadSource(ht);else{if(wt!=="clear")throw new Error(`Invalid action ${wt}`);this._clearSource(ht)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ht in this._updatedPaintProps)this._layers[ht].updateTransitions(I);this.light.updateTransitions(I),this.sky.updateTransitions(I),this._resetUpdates()}let Te={};for(let Me in this.sourceCaches){let ze=this.sourceCaches[Me];Te[Me]=ze.used,ze.used=!1}for(let Me of this._order){let ze=this._layers[Me];ze.recalculate(I,this._availableImages),!ze.isHidden(I.zoom)&&ze.source&&(this.sourceCaches[ze.source].used=!0)}for(let Me in Te){let ze=this.sourceCaches[Me];!!Te[Me]!=!!ze.used&&ze.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Me}))}this.light.recalculate(I),this.sky.recalculate(I),this.z=I.zoom,ie&&this.fire(new t.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let I=Object.keys(this._changedImages);if(I.length){for(let ie in this.sourceCaches)this.sourceCaches[ie].reloadTilesForDependencies(["icons","patterns"],I);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let I in this.sourceCaches)this.sourceCaches[I].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(I,ie){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(I,!1),removedIds:ie})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(I,ie={}){var Te;this._checkLoaded();let Me=this.serialize();if(I=ie.transformStyle?ie.transformStyle(Me,I):I,((Te=ie.validate)===null||Te===void 0||Te)&&Cr(this,t.u(I)))return!1;(I=t.aB(I)).layers=t.az(I.layers);let ze=t.aC(Me,I),ht=this._getOperationsToPerform(ze);if(ht.unimplemented.length>0)throw new Error(`Unimplemented: ${ht.unimplemented.join(", ")}.`);if(ht.operations.length===0)return!1;for(let wt of ht.operations)wt();return this.stylesheet=I,this._serializedLayers=null,!0}_getOperationsToPerform(I){let ie=[],Te=[];for(let Me of I)switch(Me.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ie.push(()=>this.addLayer.apply(this,Me.args));break;case"removeLayer":ie.push(()=>this.removeLayer.apply(this,Me.args));break;case"setPaintProperty":ie.push(()=>this.setPaintProperty.apply(this,Me.args));break;case"setLayoutProperty":ie.push(()=>this.setLayoutProperty.apply(this,Me.args));break;case"setFilter":ie.push(()=>this.setFilter.apply(this,Me.args));break;case"addSource":ie.push(()=>this.addSource.apply(this,Me.args));break;case"removeSource":ie.push(()=>this.removeSource.apply(this,Me.args));break;case"setLayerZoomRange":ie.push(()=>this.setLayerZoomRange.apply(this,Me.args));break;case"setLight":ie.push(()=>this.setLight.apply(this,Me.args));break;case"setGeoJSONSourceData":ie.push(()=>this.setGeoJSONSourceData.apply(this,Me.args));break;case"setGlyphs":ie.push(()=>this.setGlyphs.apply(this,Me.args));break;case"setSprite":ie.push(()=>this.setSprite.apply(this,Me.args));break;case"setSky":ie.push(()=>this.setSky.apply(this,Me.args));break;case"setTerrain":ie.push(()=>this.map.setTerrain.apply(this,Me.args));break;case"setTransition":ie.push(()=>{});break;default:Te.push(Me.command)}return{operations:ie,unimplemented:Te}}addImage(I,ie){if(this.getImage(I))return this.fire(new t.j(new Error(`An image named "${I}" already exists.`)));this.imageManager.addImage(I,ie),this._afterImageUpdated(I)}updateImage(I,ie){this.imageManager.updateImage(I,ie)}getImage(I){return this.imageManager.getImage(I)}removeImage(I){if(!this.getImage(I))return this.fire(new t.j(new Error(`An image named "${I}" does not exist.`)));this.imageManager.removeImage(I),this._afterImageUpdated(I)}_afterImageUpdated(I){this._availableImages=this.imageManager.listImages(),this._changedImages[I]=!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(I,ie,Te={}){if(this._checkLoaded(),this.sourceCaches[I]!==void 0)throw new Error(`Source "${I}" already exists.`);if(!ie.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ie).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ie.type)>=0&&this._validate(t.u.source,`sources.${I}`,ie,null,Te))return;this.map&&this.map._collectResourceTiming&&(ie.collectResourceTiming=!0);let Me=this.sourceCaches[I]=new kt(I,ie,this.dispatcher);Me.style=this,Me.setEventedParent(this,()=>({isSourceLoaded:Me.loaded(),source:Me.serialize(),sourceId:I})),Me.onAdd(this.map),this._changed=!0}removeSource(I){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error("There is no source with this ID");for(let Te in this._layers)if(this._layers[Te].source===I)return this.fire(new t.j(new Error(`Source "${I}" cannot be removed while layer "${Te}" is using it.`)));let ie=this.sourceCaches[I];delete this.sourceCaches[I],delete this._updatedSources[I],ie.fire(new t.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:I})),ie.setEventedParent(null),ie.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(I,ie){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error(`There is no source with this ID=${I}`);let Te=this.sourceCaches[I].getSource();if(Te.type!=="geojson")throw new Error(`geojsonSource.type is ${Te.type}, which is !== 'geojson`);Te.setData(ie),this._changed=!0}getSource(I){return this.sourceCaches[I]&&this.sourceCaches[I].getSource()}addLayer(I,ie,Te={}){this._checkLoaded();let Me=I.id;if(this.getLayer(Me))return void this.fire(new t.j(new Error(`Layer "${Me}" already exists on this map.`)));let ze;if(I.type==="custom"){if(Cr(this,t.aD(I)))return;ze=t.aA(I)}else{if("source"in I&&typeof I.source=="object"&&(this.addSource(Me,I.source),I=t.aB(I),I=t.e(I,{source:Me})),this._validate(t.u.layer,`layers.${Me}`,I,{arrayIndex:-1},Te))return;ze=t.aA(I),this._validateLayer(ze),ze.setEventedParent(this,{layer:{id:Me}})}let ht=ie?this._order.indexOf(ie):this._order.length;if(ie&&ht===-1)this.fire(new t.j(new Error(`Cannot add layer "${Me}" before non-existing layer "${ie}".`)));else{if(this._order.splice(ht,0,Me),this._layerOrderChanged=!0,this._layers[Me]=ze,this._removedLayers[Me]&&ze.source&&ze.type!=="custom"){let wt=this._removedLayers[Me];delete this._removedLayers[Me],wt.type!==ze.type?this._updatedSources[ze.source]="clear":(this._updatedSources[ze.source]="reload",this.sourceCaches[ze.source].pause())}this._updateLayer(ze),ze.onAdd&&ze.onAdd(this.map)}}moveLayer(I,ie){if(this._checkLoaded(),this._changed=!0,!this._layers[I])return void this.fire(new t.j(new Error(`The layer '${I}' does not exist in the map's style and cannot be moved.`)));if(I===ie)return;let Te=this._order.indexOf(I);this._order.splice(Te,1);let Me=ie?this._order.indexOf(ie):this._order.length;ie&&Me===-1?this.fire(new t.j(new Error(`Cannot move layer "${I}" before non-existing layer "${ie}".`))):(this._order.splice(Me,0,I),this._layerOrderChanged=!0)}removeLayer(I){this._checkLoaded();let ie=this._layers[I];if(!ie)return void this.fire(new t.j(new Error(`Cannot remove non-existing layer "${I}".`)));ie.setEventedParent(null);let Te=this._order.indexOf(I);this._order.splice(Te,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[I]=ie,delete this._layers[I],this._serializedLayers&&delete this._serializedLayers[I],delete this._updatedLayers[I],delete this._updatedPaintProps[I],ie.onRemove&&ie.onRemove(this.map)}getLayer(I){return this._layers[I]}getLayersOrder(){return[...this._order]}hasLayer(I){return I in this._layers}setLayerZoomRange(I,ie,Te){this._checkLoaded();let Me=this.getLayer(I);Me?Me.minzoom===ie&&Me.maxzoom===Te||(ie!=null&&(Me.minzoom=ie),Te!=null&&(Me.maxzoom=Te),this._updateLayer(Me)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${I}".`)))}setFilter(I,ie,Te={}){this._checkLoaded();let Me=this.getLayer(I);if(Me){if(!t.aE(Me.filter,ie))return ie==null?(Me.filter=void 0,void this._updateLayer(Me)):void(this._validate(t.u.filter,`layers.${Me.id}.filter`,ie,null,Te)||(Me.filter=t.aB(ie),this._updateLayer(Me)))}else this.fire(new t.j(new Error(`Cannot filter non-existing layer "${I}".`)))}getFilter(I){return t.aB(this.getLayer(I).filter)}setLayoutProperty(I,ie,Te,Me={}){this._checkLoaded();let ze=this.getLayer(I);ze?t.aE(ze.getLayoutProperty(ie),Te)||(ze.setLayoutProperty(ie,Te,Me),this._updateLayer(ze)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getLayoutProperty(I,ie){let Te=this.getLayer(I);if(Te)return Te.getLayoutProperty(ie);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${I}".`)))}setPaintProperty(I,ie,Te,Me={}){this._checkLoaded();let ze=this.getLayer(I);ze?t.aE(ze.getPaintProperty(ie),Te)||(ze.setPaintProperty(ie,Te,Me)&&this._updateLayer(ze),this._changed=!0,this._updatedPaintProps[I]=!0,this._serializedLayers=null):this.fire(new t.j(new Error(`Cannot style non-existing layer "${I}".`)))}getPaintProperty(I,ie){return this.getLayer(I).getPaintProperty(ie)}setFeatureState(I,ie){this._checkLoaded();let Te=I.source,Me=I.sourceLayer,ze=this.sourceCaches[Te];if(ze===void 0)return void this.fire(new t.j(new Error(`The source '${Te}' does not exist in the map's style.`)));let ht=ze.getSource().type;ht==="geojson"&&Me?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ht!=="vector"||Me?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),ze.setFeatureState(Me,I.id,ie)):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(I,ie){this._checkLoaded();let Te=I.source,Me=this.sourceCaches[Te];if(Me===void 0)return void this.fire(new t.j(new Error(`The source '${Te}' does not exist in the map's style.`)));let ze=Me.getSource().type,ht=ze==="vector"?I.sourceLayer:void 0;ze!=="vector"||ht?ie&&typeof I.id!="string"&&typeof I.id!="number"?this.fire(new t.j(new Error("A feature id is required to remove its specific state property."))):Me.removeFeatureState(ht,I.id,ie):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(I){this._checkLoaded();let ie=I.source,Te=I.sourceLayer,Me=this.sourceCaches[ie];if(Me!==void 0)return Me.getSource().type!=="vector"||Te?(I.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Me.getFeatureState(Te,I.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 '${ie}' 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 I=t.aF(this.sourceCaches,ze=>ze.serialize()),ie=this._serializeByIds(this._order,!0),Te=this.map.getTerrain()||void 0,Me=this.stylesheet;return t.aG({version:Me.version,name:Me.name,metadata:Me.metadata,light:Me.light,sky:Me.sky,center:Me.center,zoom:Me.zoom,bearing:Me.bearing,pitch:Me.pitch,sprite:Me.sprite,glyphs:Me.glyphs,transition:Me.transition,sources:I,layers:ie,terrain:Te},ze=>ze!==void 0)}_updateLayer(I){this._updatedLayers[I.id]=!0,I.source&&!this._updatedSources[I.source]&&this.sourceCaches[I.source].getSource().type!=="raster"&&(this._updatedSources[I.source]="reload",this.sourceCaches[I.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(I){let ie=ht=>this._layers[ht].type==="fill-extrusion",Te={},Me=[];for(let ht=this._order.length-1;ht>=0;ht--){let wt=this._order[ht];if(ie(wt)){Te[wt]=ht;for(let Ot of I){let $t=Ot[wt];if($t)for(let Tr of $t)Me.push(Tr)}}}Me.sort((ht,wt)=>wt.intersectionZ-ht.intersectionZ);let ze=[];for(let ht=this._order.length-1;ht>=0;ht--){let wt=this._order[ht];if(ie(wt))for(let Ot=Me.length-1;Ot>=0;Ot--){let $t=Me[Ot].feature;if(Te[$t.layer.id]{let jr=pt.featureSortOrder;if(jr){let Qr=jr.indexOf(yr.featureIndex);return jr.indexOf(Er.featureIndex)-Qr}return Er.featureIndex-yr.featureIndex});for(let yr of ur)Dt.push(yr)}}for(let pt in qe)qe[pt].forEach(Et=>{let bt=Et.feature,Dt=$t[wt[pt].source].getFeatureState(bt.layer["source-layer"],bt.id);bt.source=bt.layer.source,bt.layer["source-layer"]&&(bt.sourceLayer=bt.layer["source-layer"]),bt.state=Dt});return qe}(this._layers,ht,this.sourceCaches,I,ie,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(ze)}querySourceFeatures(I,ie){ie&&ie.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",ie.filter,null,ie);let Te=this.sourceCaches[I];return Te?function(Me,ze){let ht=Me.getRenderableIds().map($t=>Me.getTileByID($t)),wt=[],Ot={};for(let $t=0;$tKr.getTileByID(na)).sort((na,qe)=>qe.tileID.overscaledZ-na.tileID.overscaledZ||(na.tileID.isLessThan(qe.tileID)?-1:1))}let Sr=this.crossTileSymbolIndex.addLayer(Tr,Ot[Tr.source],I.center.lng);ht=ht||Sr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((ze=ze||this._layerOrderChanged||Te===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.now(),I.zoom))&&(this.pauseablePlacement=new rn(I,this.map.terrain,this._order,ze,ie,Te,Me,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ot),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(i.now()),wt=!0),ht&&this.pauseablePlacement.placement.setStale()),wt||ht)for(let $t of this._order){let Tr=this._layers[$t];Tr.type==="symbol"&&this.placement.updateLayerOpacities(Tr,Ot[Tr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(i.now())}_releaseSymbolFadeTiles(){for(let I in this.sourceCaches)this.sourceCaches[I].releaseSymbolFadeTiles()}getImages(I,ie){return t._(this,void 0,void 0,function*(){let Te=yield this.imageManager.getImages(ie.icons);this._updateTilesForChangedImages();let Me=this.sourceCaches[ie.source];return Me&&Me.setDependencies(ie.tileID.key,ie.type,ie.icons),Te})}getGlyphs(I,ie){return t._(this,void 0,void 0,function*(){let Te=yield this.glyphManager.getGlyphs(ie.stacks),Me=this.sourceCaches[ie.source];return Me&&Me.setDependencies(ie.tileID.key,ie.type,[""]),Te})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(I,ie={}){this._checkLoaded(),I&&this._validate(t.u.glyphs,"glyphs",I,null,ie)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=I,this.glyphManager.entries={},this.glyphManager.setURL(I))}addSprite(I,ie,Te={},Me){this._checkLoaded();let ze=[{id:I,url:ie}],ht=[...b(this.stylesheet.sprite),...ze];this._validate(t.u.sprite,"sprite",ht,null,Te)||(this.stylesheet.sprite=ht,this._loadSprite(ze,!0,Me))}removeSprite(I){this._checkLoaded();let ie=b(this.stylesheet.sprite);if(ie.find(Te=>Te.id===I)){if(this._spritesImagesIds[I])for(let Te of this._spritesImagesIds[I])this.imageManager.removeImage(Te),this._changedImages[Te]=!0;ie.splice(ie.findIndex(Te=>Te.id===I),1),this.stylesheet.sprite=ie.length>0?ie:void 0,delete this._spritesImagesIds[I],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 "${I}" doesn't exists on this map.`)))}getSprite(){return b(this.stylesheet.sprite)}setSprite(I,ie={},Te){this._checkLoaded(),I&&this._validate(t.u.sprite,"sprite",I,null,ie)||(this.stylesheet.sprite=I,I?this._loadSprite(I,!0,Te):(this._unloadSprite(),Te&&Te(null)))}}var Nr=t.Y([{name:"a_pos",type:"Int16",components:2}]);let Hr={prelude:gt(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -3786,26 +3786,26 @@ uniform ${Tr} ${Sr} u_${Kr}; #endif `}),staticAttributes:Te,staticUniforms:ht}}class Kt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(I,ie,Te,Me,ze,ht,wt,Ot,$t){this.context=I;let Tr=this.boundPaintVertexBuffers.length!==Me.length;for(let Sr=0;!Tr&&Sr({u_matrix:Oe,u_texture:0,u_ele_delta:I,u_fog_matrix:ie,u_fog_color:Te?Te.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:Te?Te.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Te?Te.calculateFogBlendOpacity(Me):0,u_horizon_color:Te?Te.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:Te?Te.properties.get("horizon-fog-blend"):1});function Ir(Oe){let I=[];for(let ie=0;ie({u_depth:new t.aH(yr,Er.u_depth),u_terrain:new t.aH(yr,Er.u_terrain),u_terrain_dim:new t.aI(yr,Er.u_terrain_dim),u_terrain_matrix:new t.aJ(yr,Er.u_terrain_matrix),u_terrain_unpack:new t.aK(yr,Er.u_terrain_unpack),u_terrain_exaggeration:new t.aI(yr,Er.u_terrain_exaggeration)}))(I,ur),this.binderUniforms=Te?Te.getUniforms(I,ur):[]}draw(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe,$e,lt,pt,Et){let bt=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(Te),I.setStencilMode(Me),I.setColorMode(ze),I.setCullFace(ht),Ot){I.activeTexture.set(bt.TEXTURE2),bt.bindTexture(bt.TEXTURE_2D,Ot.depthTexture),I.activeTexture.set(bt.TEXTURE3),bt.bindTexture(bt.TEXTURE_2D,Ot.texture);for(let ur in this.terrainUniforms)this.terrainUniforms[ur].set(Ot[ur])}for(let ur in this.fixedUniforms)this.fixedUniforms[ur].set(wt[ur]);$e&&$e.setUniforms(I,this.binderUniforms,na,{zoom:qe});let Dt=0;switch(ie){case bt.LINES:Dt=2;break;case bt.TRIANGLES:Dt=3;break;case bt.LINE_STRIP:Dt=1}for(let ur of Kr.get()){let yr=ur.vaos||(ur.vaos={});(yr[$t]||(yr[$t]=new Kt)).bind(I,this,Tr,$e?$e.getPaintVertexBuffers():[],Sr,ur.vertexOffset,lt,pt,Et),bt.drawElements(ie,ur.primitiveLength*Dt,bt.UNSIGNED_SHORT,ur.primitiveOffset*Dt*2)}}}function Pa(Oe,I,ie){let Te=1/Fa(ie,1,I.transform.tileZoom),Me=Math.pow(2,ie.tileID.overscaledZ),ze=ie.tileSize*Math.pow(2,I.transform.tileZoom)/Me,ht=ze*(ie.tileID.canonical.x+ie.tileID.wrap*Me),wt=ze*ie.tileID.canonical.y;return{u_image:0,u_texsize:ie.imageAtlasTexture.size,u_scale:[Te,Oe.fromScale,Oe.toScale],u_fade:Oe.t,u_pixel_coord_upper:[ht>>16,wt>>16],u_pixel_coord_lower:[65535&ht,65535&wt]}}let ga=(Oe,I,ie,Te)=>{let Me=I.style.light,ze=Me.properties.get("position"),ht=[ze.x,ze.y,ze.z],wt=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}();Me.properties.get("anchor")==="viewport"&&function($t,Tr){var Sr=Math.sin(Tr),Kr=Math.cos(Tr);$t[0]=Kr,$t[1]=Sr,$t[2]=0,$t[3]=-Sr,$t[4]=Kr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(wt,-I.transform.angle),function($t,Tr,Sr){var Kr=Tr[0],na=Tr[1],qe=Tr[2];$t[0]=Kr*Sr[0]+na*Sr[3]+qe*Sr[6],$t[1]=Kr*Sr[1]+na*Sr[4]+qe*Sr[7],$t[2]=Kr*Sr[2]+na*Sr[5]+qe*Sr[8]}(ht,ht,wt);let Ot=Me.properties.get("color");return{u_matrix:Oe,u_lightpos:ht,u_lightintensity:Me.properties.get("intensity"),u_lightcolor:[Ot.r,Ot.g,Ot.b],u_vertical_gradient:+ie,u_opacity:Te}},la=(Oe,I,ie,Te,Me,ze,ht)=>t.e(ga(Oe,I,ie,Te),Pa(ze,I,ht),{u_height_factor:-Math.pow(2,Me.overscaledZ)/ht.tileSize/8}),ba=Oe=>({u_matrix:Oe}),Ai=(Oe,I,ie,Te)=>t.e(ba(Oe),Pa(ie,I,Te)),ki=(Oe,I)=>({u_matrix:Oe,u_world:I}),Ki=(Oe,I,ie,Te,Me)=>t.e(Ai(Oe,I,ie,Te),{u_world:Me}),Mn=(Oe,I,ie,Te)=>{let Me=Oe.transform,ze,ht;if(Te.paint.get("circle-pitch-alignment")==="map"){let wt=Fa(ie,1,Me.zoom);ze=!0,ht=[wt,wt]}else ze=!1,ht=Me.pixelsToGLUnits;return{u_camera_to_center_distance:Me.cameraToCenterDistance,u_scale_with_map:+(Te.paint.get("circle-pitch-scale")==="map"),u_matrix:Oe.translatePosMatrix(I.posMatrix,ie,Te.paint.get("circle-translate"),Te.paint.get("circle-translate-anchor")),u_pitch_with_map:+ze,u_device_pixel_ratio:Oe.pixelRatio,u_extrude_scale:ht}},wn=(Oe,I,ie)=>({u_matrix:Oe,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),On=(Oe,I,ie=1)=>({u_matrix:Oe,u_color:I,u_overlay:0,u_overlay_scale:ie}),En=Oe=>({u_matrix:Oe}),ao=(Oe,I,ie,Te)=>({u_matrix:Oe,u_extrude_scale:Fa(I,1,ie),u_intensity:Te}),Co=(Oe,I,ie,Te)=>{let Me=t.H();t.aP(Me,0,Oe.width,Oe.height,0,0,1);let ze=Oe.context.gl;return{u_matrix:Me,u_world:[ze.drawingBufferWidth,ze.drawingBufferHeight],u_image:ie,u_color_ramp:Te,u_opacity:I.paint.get("heatmap-opacity")}};function bo(Oe,I){let ie=Math.pow(2,I.canonical.z),Te=I.canonical.y;return[new t.Z(0,Te/ie).toLngLat().lat,new t.Z(0,(Te+1)/ie).toLngLat().lat]}let zs=(Oe,I,ie,Te)=>{let Me=Oe.transform;return{u_matrix:os(Oe,I,ie,Te),u_ratio:1/Fa(I,1,Me.zoom),u_device_pixel_ratio:Oe.pixelRatio,u_units_to_pixels:[1/Me.pixelsToGLUnits[0],1/Me.pixelsToGLUnits[1]]}},kn=(Oe,I,ie,Te,Me)=>t.e(zs(Oe,I,ie,Me),{u_image:0,u_image_height:Te}),wo=(Oe,I,ie,Te,Me)=>{let ze=Oe.transform,ht=go(I,ze);return{u_matrix:os(Oe,I,ie,Me),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Fa(I,1,ze.zoom),u_device_pixel_ratio:Oe.pixelRatio,u_image:0,u_scale:[ht,Te.fromScale,Te.toScale],u_fade:Te.t,u_units_to_pixels:[1/ze.pixelsToGLUnits[0],1/ze.pixelsToGLUnits[1]]}},Zn=(Oe,I,ie,Te,Me,ze)=>{let ht=Oe.lineAtlas,wt=go(I,Oe.transform),Ot=ie.layout.get("line-cap")==="round",$t=ht.getDash(Te.from,Ot),Tr=ht.getDash(Te.to,Ot),Sr=$t.width*Me.fromScale,Kr=Tr.width*Me.toScale;return t.e(zs(Oe,I,ie,ze),{u_patternscale_a:[wt/Sr,-$t.height/2],u_patternscale_b:[wt/Kr,-Tr.height/2],u_sdfgamma:ht.width/(256*Math.min(Sr,Kr)*Oe.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Me.t})};function go(Oe,I){return 1/Fa(Oe,1,I.tileZoom)}function os(Oe,I,ie,Te){return Oe.translatePosMatrix(Te?Te.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let ys=(Oe,I,ie,Te,Me)=>{return{u_matrix:Oe,u_tl_parent:I,u_scale_parent:ie,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:(ht=Me.paint.get("raster-saturation"),ht>0?1-1/(1.001-ht):-ht),u_contrast_factor:(ze=Me.paint.get("raster-contrast"),ze>0?1/(1-ze):1+ze),u_spin_weights:jo(Me.paint.get("raster-hue-rotate"))};var ze,ht};function jo(Oe){Oe*=Math.PI/180;let I=Math.sin(Oe),ie=Math.cos(Oe);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let Yn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na)=>{let qe=ht.transform;return{u_is_size_zoom_constant:+(Oe==="constant"||Oe==="source"),u_is_size_feature_constant:+(Oe==="constant"||Oe==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:qe.cameraToCenterDistance,u_pitch:qe.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:qe.width/qe.height,u_fade_change:ht.options.fadeDuration?ht.symbolFadeChange:1,u_matrix:wt,u_label_plane_matrix:Ot,u_coord_matrix:$t,u_is_text:+Sr,u_pitch_with_map:+Te,u_is_along_line:Me,u_is_variable_anchor:ze,u_texsize:Kr,u_texture:0,u_translation:Tr,u_pitched_scale:na}},Gn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe)=>{let $e=ht.transform;return t.e(Yn(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,qe),{u_gamma_scale:Te?Math.cos($e._pitch)*$e.cameraToCenterDistance:1,u_device_pixel_ratio:ht.pixelRatio,u_is_halo:+na})},Hn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na)=>t.e(Gn(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,!0,Sr,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ss=(Oe,I,ie)=>({u_matrix:Oe,u_opacity:I,u_color:ie}),_s=(Oe,I,ie,Te,Me,ze)=>t.e(function(ht,wt,Ot,$t){let Tr=Ot.imageManager.getPattern(ht.from.toString()),Sr=Ot.imageManager.getPattern(ht.to.toString()),{width:Kr,height:na}=Ot.imageManager.getPixelSize(),qe=Math.pow(2,$t.tileID.overscaledZ),$e=$t.tileSize*Math.pow(2,Ot.transform.tileZoom)/qe,lt=$e*($t.tileID.canonical.x+$t.tileID.wrap*qe),pt=$e*$t.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Tr.tl,u_pattern_br_a:Tr.br,u_pattern_tl_b:Sr.tl,u_pattern_br_b:Sr.br,u_texsize:[Kr,na],u_mix:wt.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Sr.displaySize,u_scale_a:wt.fromScale,u_scale_b:wt.toScale,u_tile_units_to_pixels:1/Fa($t,1,Ot.transform.tileZoom),u_pixel_coord_upper:[lt>>16,pt>>16],u_pixel_coord_lower:[65535<,65535&pt]}}(Te,ze,ie,Me),{u_matrix:Oe,u_opacity:I}),ps={fillExtrusion:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_lightpos:new t.aN(Oe,I.u_lightpos),u_lightintensity:new t.aI(Oe,I.u_lightintensity),u_lightcolor:new t.aN(Oe,I.u_lightcolor),u_vertical_gradient:new t.aI(Oe,I.u_vertical_gradient),u_opacity:new t.aI(Oe,I.u_opacity)}),fillExtrusionPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_lightpos:new t.aN(Oe,I.u_lightpos),u_lightintensity:new t.aI(Oe,I.u_lightintensity),u_lightcolor:new t.aN(Oe,I.u_lightcolor),u_vertical_gradient:new t.aI(Oe,I.u_vertical_gradient),u_height_factor:new t.aI(Oe,I.u_height_factor),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade),u_opacity:new t.aI(Oe,I.u_opacity)}),fill:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix)}),fillPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),fillOutline:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world)}),fillOutlinePattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),circle:(Oe,I)=>({u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Oe,I.u_scale_with_map),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_extrude_scale:new t.aO(Oe,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_matrix:new t.aJ(Oe,I.u_matrix)}),collisionBox:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_pixel_extrude_scale:new t.aO(Oe,I.u_pixel_extrude_scale)}),collisionCircle:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_inv_matrix:new t.aJ(Oe,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Oe,I.u_viewport_size)}),debug:(Oe,I)=>({u_color:new t.aL(Oe,I.u_color),u_matrix:new t.aJ(Oe,I.u_matrix),u_overlay:new t.aH(Oe,I.u_overlay),u_overlay_scale:new t.aI(Oe,I.u_overlay_scale)}),clippingMask:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix)}),heatmap:(Oe,I)=>({u_extrude_scale:new t.aI(Oe,I.u_extrude_scale),u_intensity:new t.aI(Oe,I.u_intensity),u_matrix:new t.aJ(Oe,I.u_matrix)}),heatmapTexture:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world),u_image:new t.aH(Oe,I.u_image),u_color_ramp:new t.aH(Oe,I.u_color_ramp),u_opacity:new t.aI(Oe,I.u_opacity)}),hillshade:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_latrange:new t.aO(Oe,I.u_latrange),u_light:new t.aO(Oe,I.u_light),u_shadow:new t.aL(Oe,I.u_shadow),u_highlight:new t.aL(Oe,I.u_highlight),u_accent:new t.aL(Oe,I.u_accent)}),hillshadePrepare:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_dimension:new t.aO(Oe,I.u_dimension),u_zoom:new t.aI(Oe,I.u_zoom),u_unpack:new t.aK(Oe,I.u_unpack)}),line:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels)}),lineGradient:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_image:new t.aH(Oe,I.u_image),u_image_height:new t.aI(Oe,I.u_image_height)}),linePattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texsize:new t.aO(Oe,I.u_texsize),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_image:new t.aH(Oe,I.u_image),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),lineSDF:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_patternscale_a:new t.aO(Oe,I.u_patternscale_a),u_patternscale_b:new t.aO(Oe,I.u_patternscale_b),u_sdfgamma:new t.aI(Oe,I.u_sdfgamma),u_image:new t.aH(Oe,I.u_image),u_tex_y_a:new t.aI(Oe,I.u_tex_y_a),u_tex_y_b:new t.aI(Oe,I.u_tex_y_b),u_mix:new t.aI(Oe,I.u_mix)}),raster:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_tl_parent:new t.aO(Oe,I.u_tl_parent),u_scale_parent:new t.aI(Oe,I.u_scale_parent),u_buffer_scale:new t.aI(Oe,I.u_buffer_scale),u_fade_t:new t.aI(Oe,I.u_fade_t),u_opacity:new t.aI(Oe,I.u_opacity),u_image0:new t.aH(Oe,I.u_image0),u_image1:new t.aH(Oe,I.u_image1),u_brightness_low:new t.aI(Oe,I.u_brightness_low),u_brightness_high:new t.aI(Oe,I.u_brightness_high),u_saturation_factor:new t.aI(Oe,I.u_saturation_factor),u_contrast_factor:new t.aI(Oe,I.u_contrast_factor),u_spin_weights:new t.aN(Oe,I.u_spin_weights)}),symbolIcon:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texture:new t.aH(Oe,I.u_texture),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),symbolSDF:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texture:new t.aH(Oe,I.u_texture),u_gamma_scale:new t.aI(Oe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Oe,I.u_is_halo),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),symbolTextAndIcon:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texsize_icon:new t.aO(Oe,I.u_texsize_icon),u_texture:new t.aH(Oe,I.u_texture),u_texture_icon:new t.aH(Oe,I.u_texture_icon),u_gamma_scale:new t.aI(Oe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Oe,I.u_is_halo),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),background:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_opacity:new t.aI(Oe,I.u_opacity),u_color:new t.aL(Oe,I.u_color)}),backgroundPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_opacity:new t.aI(Oe,I.u_opacity),u_image:new t.aH(Oe,I.u_image),u_pattern_tl_a:new t.aO(Oe,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Oe,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Oe,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Oe,I.u_pattern_br_b),u_texsize:new t.aO(Oe,I.u_texsize),u_mix:new t.aI(Oe,I.u_mix),u_pattern_size_a:new t.aO(Oe,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Oe,I.u_pattern_size_b),u_scale_a:new t.aI(Oe,I.u_scale_a),u_scale_b:new t.aI(Oe,I.u_scale_b),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Oe,I.u_tile_units_to_pixels)}),terrain:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texture:new t.aH(Oe,I.u_texture),u_ele_delta:new t.aI(Oe,I.u_ele_delta),u_fog_matrix:new t.aJ(Oe,I.u_fog_matrix),u_fog_color:new t.aL(Oe,I.u_fog_color),u_fog_ground_blend:new t.aI(Oe,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Oe,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Oe,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Oe,I.u_horizon_fog_blend)}),terrainDepth:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ele_delta:new t.aI(Oe,I.u_ele_delta)}),terrainCoords:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texture:new t.aH(Oe,I.u_texture),u_terrain_coords_id:new t.aI(Oe,I.u_terrain_coords_id),u_ele_delta:new t.aI(Oe,I.u_ele_delta)}),sky:(Oe,I)=>({u_sky_color:new t.aL(Oe,I.u_sky_color),u_horizon_color:new t.aL(Oe,I.u_horizon_color),u_horizon:new t.aI(Oe,I.u_horizon),u_sky_horizon_blend:new t.aI(Oe,I.u_sky_horizon_blend)})};class Ko{constructor(I,ie,Te){this.context=I;let Me=I.gl;this.buffer=Me.createBuffer(),this.dynamicDraw=!!Te,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),Me.bufferData(Me.ELEMENT_ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Me.DYNAMIC_DRAW:Me.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(I){let ie=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ie.bufferSubData(ie.ELEMENT_ARRAY_BUFFER,0,I.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Gi={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Pn{constructor(I,ie,Te,Me){this.length=ie.length,this.attributes=Te,this.itemSize=ie.bytesPerElement,this.dynamicDraw=Me,this.context=I;let ze=I.gl;this.buffer=ze.createBuffer(),I.bindVertexBuffer.set(this.buffer),ze.bufferData(ze.ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?ze.DYNAMIC_DRAW:ze.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(I){if(I.length!==this.length)throw new Error(`Length of new data is ${I.length}, which doesn't match current length of ${this.length}`);let ie=this.context.gl;this.bind(),ie.bufferSubData(ie.ARRAY_BUFFER,0,I.arrayBuffer)}enableAttributes(I,ie){for(let Te=0;Te0){let yr=t.H();t.aQ(yr,bt.placementInvProjMatrix,Oe.transform.glCoordMatrix),t.aQ(yr,yr,bt.placementViewportMatrix),Ot.push({circleArray:ur,circleOffset:Tr,transform:Et.posMatrix,invTransform:yr,coord:Et}),$t+=ur.length/4,Tr=$t}Dt&&wt.draw(ze,ht.LINES,us.disabled,Ps.disabled,Oe.colorModeForRenderPass(),to.disabled,{u_matrix:Et.posMatrix,u_pixel_extrude_scale:[1/(Sr=Oe.transform).width,1/Sr.height]},Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Et),ie.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,null,Oe.transform.zoom,null,null,Dt.collisionVertexBuffer)}var Sr;if(!Me||!Ot.length)return;let Kr=Oe.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let qe=0;for(let pt of Ot)for(let Et=0;Et=0&&(pt[bt.associatedIconIndex]={shiftedAnchor:An,angle:Kn})}else or(bt.numGlyphs,$e)}if($t){lt.clear();let Et=Oe.icon.placedSymbolArray;for(let bt=0;btOe.style.map.terrain.getElevation(Aa,zt,_r):null,tr=ie.layout.get("text-rotation-alignment")==="map";Ae(ci,Aa.posMatrix,Oe,Me,tu,vu,pt,$t,tr,$e,Aa.toUnwrapped(),qe.width,qe.height,wl,Tt)}let Gl=Aa.posMatrix,Hl=Me&&jr||uc,me=Et||Hl?ql:tu,De=Ru,et=on&&ie.paint.get(Me?"text-halo-width":"icon-halo-width").constantOr(1)!==0,dt;dt=on?ci.iconsInText?Hn(An.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Mo,tl,ha):Gn(An.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Me,Mo,!0,ha):Yn(An.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Me,Mo,ha);let yt={program:Bn,buffers:Vi,uniformValues:dt,atlasTexture:Yo,atlasTextureIcon:es,atlasInterpolation:ds,atlasInterpolationIcon:ul,isSDF:on,hasHalo:et};if(ur&&ci.canOverlap){yr=!0;let Tt=Vi.segments.get();for(let tr of Tt)Qr.push({segments:new t.a0([tr]),sortKey:tr.sortKey,state:yt,terrainData:ls})}else Qr.push({segments:Vi.segments,sortKey:0,state:yt,terrainData:ls})}yr&&Qr.sort((Aa,Da)=>Aa.sortKey-Da.sortKey);for(let Aa of Qr){let Da=Aa.state;if(Kr.activeTexture.set(na.TEXTURE0),Da.atlasTexture.bind(Da.atlasInterpolation,na.CLAMP_TO_EDGE),Da.atlasTextureIcon&&(Kr.activeTexture.set(na.TEXTURE1),Da.atlasTextureIcon&&Da.atlasTextureIcon.bind(Da.atlasInterpolationIcon,na.CLAMP_TO_EDGE)),Da.isSDF){let ci=Da.uniformValues;Da.hasHalo&&(ci.u_is_halo=1,Of(Da.buffers,Aa.segments,ie,Oe,Da.program,Er,Tr,Sr,ci,Aa.terrainData)),ci.u_is_halo=0}Of(Da.buffers,Aa.segments,ie,Oe,Da.program,Er,Tr,Sr,Da.uniformValues,Aa.terrainData)}}function Of(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t){let Tr=Te.context;Me.draw(Tr,Tr.gl.TRIANGLES,ze,ht,wt,to.disabled,Ot,$t,ie.id,Oe.layoutVertexBuffer,Oe.indexBuffer,I,ie.paint,Te.transform.zoom,Oe.programConfigurations.get(ie.id),Oe.dynamicLayoutVertexBuffer,Oe.opacityVertexBuffer)}function of(Oe,I,ie,Te){let Me=Oe.context,ze=Me.gl,ht=Ps.disabled,wt=new fl([ze.ONE,ze.ONE],t.aM.transparent,[!0,!0,!0,!0]),Ot=I.getBucket(ie);if(!Ot)return;let $t=Te.key,Tr=ie.heatmapFbos.get($t);Tr||(Tr=Bf(Me,I.tileSize,I.tileSize),ie.heatmapFbos.set($t,Tr)),Me.bindFramebuffer.set(Tr.framebuffer),Me.viewport.set([0,0,I.tileSize,I.tileSize]),Me.clear({color:t.aM.transparent});let Sr=Ot.programConfigurations.get(ie.id),Kr=Oe.useProgram("heatmap",Sr),na=Oe.style.map.terrain.getTerrainData(Te);Kr.draw(Me,ze.TRIANGLES,us.disabled,ht,wt,to.disabled,ao(Te.posMatrix,I,Oe.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,ie.paint,Oe.transform.zoom,Sr)}function jc(Oe,I,ie){let Te=Oe.context,Me=Te.gl;Te.setColorMode(Oe.colorModeForRenderPass());let ze=Nf(Te,I),ht=ie.key,wt=I.heatmapFbos.get(ht);wt&&(Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,wt.colorAttachment.get()),Te.activeTexture.set(Me.TEXTURE1),ze.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),Oe.useProgram("heatmapTexture").draw(Te,Me.TRIANGLES,us.disabled,Ps.disabled,Oe.colorModeForRenderPass(),to.disabled,Co(Oe,I,0,1),null,I.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments,I.paint,Oe.transform.zoom),wt.destroy(),I.heatmapFbos.delete(ht))}function Bf(Oe,I,ie){var Te,Me;let ze=Oe.gl,ht=ze.createTexture();ze.bindTexture(ze.TEXTURE_2D,ht),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_S,ze.CLAMP_TO_EDGE),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_T,ze.CLAMP_TO_EDGE),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MIN_FILTER,ze.LINEAR),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MAG_FILTER,ze.LINEAR);let wt=(Te=Oe.HALF_FLOAT)!==null&&Te!==void 0?Te:ze.UNSIGNED_BYTE,Ot=(Me=Oe.RGBA16F)!==null&&Me!==void 0?Me:ze.RGBA;ze.texImage2D(ze.TEXTURE_2D,0,Ot,I,ie,0,ze.RGBA,wt,null);let $t=Oe.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(ht),$t}function Nf(Oe,I){return I.colorRampTexture||(I.colorRampTexture=new u(Oe,I.colorRamp,Oe.gl.RGBA)),I.colorRampTexture}function Gu(Oe,I,ie,Te,Me){if(!ie||!Te||!Te.imageAtlas)return;let ze=Te.imageAtlas.patternPositions,ht=ze[ie.to.toString()],wt=ze[ie.from.toString()];if(!ht&&wt&&(ht=wt),!wt&&ht&&(wt=ht),!ht||!wt){let Ot=Me.getPaintProperty(I);ht=ze[Ot],wt=ze[Ot]}ht&&wt&&Oe.setConstantPatternPositions(ht,wt)}function Ef(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context.gl,Ot="fill-pattern",$t=ie.paint.get(Ot),Tr=$t&&$t.constantOr(1),Sr=ie.getCrossfadeParameters(),Kr,na,qe,$e,lt;ht?(na=Tr&&!ie.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Kr=wt.LINES):(na=Tr?"fillPattern":"fill",Kr=wt.TRIANGLES);let pt=$t.constantOr(null);for(let Et of Te){let bt=I.getTile(Et);if(Tr&&!bt.patternsLoaded())continue;let Dt=bt.getBucket(ie);if(!Dt)continue;let ur=Dt.programConfigurations.get(ie.id),yr=Oe.useProgram(na,ur),Er=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Et);Tr&&(Oe.context.activeTexture.set(wt.TEXTURE0),bt.imageAtlasTexture.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),ur.updatePaintBuffers(Sr)),Gu(ur,Ot,pt,bt,ie);let jr=Er?Et:null,Qr=Oe.translatePosMatrix(jr?jr.posMatrix:Et.posMatrix,bt,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(ht){$e=Dt.indexBuffer2,lt=Dt.segments2;let ha=[wt.drawingBufferWidth,wt.drawingBufferHeight];qe=na==="fillOutlinePattern"&&Tr?Ki(Qr,Oe,Sr,bt,ha):ki(Qr,ha)}else $e=Dt.indexBuffer,lt=Dt.segments,qe=Tr?Ai(Qr,Oe,Sr,bt):ba(Qr);yr.draw(Oe.context,Kr,Me,Oe.stencilModeForClipping(Et),ze,to.disabled,qe,Er,ie.id,Dt.layoutVertexBuffer,$e,lt,ie.paint,Oe.transform.zoom,ur)}}function oc(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context,Ot=wt.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Sr=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),qe=Tr.constantOr(null);for(let $e of Te){let lt=I.getTile($e),pt=lt.getBucket(ie);if(!pt)continue;let Et=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData($e),bt=pt.programConfigurations.get(ie.id),Dt=Oe.useProgram(Sr?"fillExtrusionPattern":"fillExtrusion",bt);Sr&&(Oe.context.activeTexture.set(Ot.TEXTURE0),lt.imageAtlasTexture.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),bt.updatePaintBuffers(Kr)),Gu(bt,$t,qe,lt,ie);let ur=Oe.translatePosMatrix($e.posMatrix,lt,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),Er=Sr?la(ur,Oe,yr,na,$e,Kr,lt):ga(ur,Oe,yr,na);Dt.draw(wt,wt.gl.TRIANGLES,Me,ze,ht,to.backCCW,Er,Et,ie.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,ie.paint,Oe.transform.zoom,bt,Oe.style.map.terrain&&pt.centroidVertexBuffer)}}function Zc(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context,Ot=wt.gl,$t=ie.fbo;if(!$t)return;let Tr=Oe.useProgram("hillshade"),Sr=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(I);wt.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,$t.colorAttachment.get()),Tr.draw(wt,Ot.TRIANGLES,Me,ze,ht,to.disabled,((Kr,na,qe,$e)=>{let lt=qe.paint.get("hillshade-shadow-color"),pt=qe.paint.get("hillshade-highlight-color"),Et=qe.paint.get("hillshade-accent-color"),bt=qe.paint.get("hillshade-illumination-direction")*(Math.PI/180);qe.paint.get("hillshade-illumination-anchor")==="viewport"&&(bt-=Kr.transform.angle);let Dt=!Kr.options.moving;return{u_matrix:$e?$e.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),Dt),u_image:0,u_latrange:bo(0,na.tileID),u_light:[qe.paint.get("hillshade-exaggeration"),bt],u_shadow:lt,u_highlight:pt,u_accent:Et}})(Oe,ie,Te,Sr?I:null),Sr,Te.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments)}function eu(Oe,I,ie,Te,Me,ze){let ht=Oe.context,wt=ht.gl,Ot=I.dem;if(Ot&&Ot.data){let $t=Ot.dim,Tr=Ot.stride,Sr=Ot.getPixels();if(ht.activeTexture.set(wt.TEXTURE1),ht.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Oe.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Sr,{premultiply:!1}),na.bind(wt.NEAREST,wt.CLAMP_TO_EDGE)}else I.demTexture=new u(ht,Sr,wt.RGBA,{premultiply:!1}),I.demTexture.bind(wt.NEAREST,wt.CLAMP_TO_EDGE);ht.activeTexture.set(wt.TEXTURE0);let Kr=I.fbo;if(!Kr){let na=new u(ht,{width:$t,height:$t,data:null},wt.RGBA);na.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),Kr=I.fbo=ht.createFramebuffer($t,$t,!0,!1),Kr.colorAttachment.set(na.texture)}ht.bindFramebuffer.set(Kr.framebuffer),ht.viewport.set([0,0,$t,$t]),Oe.useProgram("hillshadePrepare").draw(ht,wt.TRIANGLES,Te,Me,ze,to.disabled,((na,qe)=>{let $e=qe.stride,lt=t.H();return t.aP(lt,0,t.X,-t.X,0,0,1),t.J(lt,lt,[0,-t.X,0]),{u_matrix:lt,u_image:1,u_dimension:[$e,$e],u_zoom:na.overscaledZ,u_unpack:qe.getUnpackVector()}})(I.tileID,Ot),null,ie.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Oe,I,ie,Te,Me,ze){let ht=Te.paint.get("raster-fade-duration");if(!ze&&ht>0){let wt=i.now(),Ot=(wt-Oe.timeAdded)/ht,$t=I?(wt-I.timeAdded)/ht:-1,Tr=ie.getSource(),Sr=Me.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Sr)>Math.abs(Oe.tileID.overscaledZ-Sr),na=Kr&&Oe.refreshedUponExpiration?1:t.ac(Kr?Ot:1-$t,0,1);return Oe.refreshedUponExpiration&&Ot>=1&&(Oe.refreshedUponExpiration=!1),I?{opacity:1,mix:1-na}:{opacity:na,mix:0}}return{opacity:1,mix:0}}let Sc=new t.aM(1,0,0,1),Zs=new t.aM(0,1,0,1),kf=new t.aM(0,0,1,1),fh=new t.aM(1,0,1,1),Uf=new t.aM(0,1,1,1);function Yc(Oe,I,ie,Te){Cu(Oe,0,I+ie/2,Oe.transform.width,ie,Te)}function $f(Oe,I,ie,Te){Cu(Oe,I-ie/2,0,ie,Oe.transform.height,Te)}function Cu(Oe,I,ie,Te,Me,ze){let ht=Oe.context,wt=ht.gl;wt.enable(wt.SCISSOR_TEST),wt.scissor(I*Oe.pixelRatio,ie*Oe.pixelRatio,Te*Oe.pixelRatio,Me*Oe.pixelRatio),ht.clear({color:ze}),wt.disable(wt.SCISSOR_TEST)}function jf(Oe,I,ie){let Te=Oe.context,Me=Te.gl,ze=ie.posMatrix,ht=Oe.useProgram("debug"),wt=us.disabled,Ot=Ps.disabled,$t=Oe.colorModeForRenderPass(),Tr="$debug",Sr=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(ie);Te.activeTexture.set(Me.TEXTURE0);let Kr=I.getTileByID(ie.key).latestRawTileData,na=Math.floor((Kr&&Kr.byteLength||0)/1024),qe=I.getTile(ie).tileSize,$e=512/Math.min(qe,512)*(ie.overscaledZ/Oe.transform.zoom)*.5,lt=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(lt+=` => ${ie.overscaledZ}`),function(pt,Et){pt.initDebugOverlayCanvas();let bt=pt.debugOverlayCanvas,Dt=pt.context.gl,ur=pt.debugOverlayCanvas.getContext("2d");ur.clearRect(0,0,bt.width,bt.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(Et,5,5),ur.strokeText(Et,5,5),pt.debugOverlayTexture.update(bt),pt.debugOverlayTexture.bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE)}(Oe,`${lt} ${na}kB`),ht.draw(Te,Me.TRIANGLES,wt,Ot,fl.alphaBlended,to.disabled,On(ze,t.aM.transparent,$e),null,Tr,Oe.debugBuffer,Oe.quadTriangleIndexBuffer,Oe.debugSegments),ht.draw(Te,Me.LINE_STRIP,wt,Ot,$t,to.disabled,On(ze,t.aM.red),Sr,Tr,Oe.debugBuffer,Oe.tileBorderIndexBuffer,Oe.debugSegments)}function ml(Oe,I,ie){let Te=Oe.context,Me=Te.gl,ze=Oe.colorModeForRenderPass(),ht=new us(Me.LEQUAL,us.ReadWrite,Oe.depthRangeFor3D),wt=Oe.useProgram("terrain"),Ot=I.getTerrainMesh();Te.bindFramebuffer.set(null),Te.viewport.set([0,0,Oe.width,Oe.height]);for(let $t of ie){let Tr=Oe.renderToTexture.getTexture($t),Sr=I.getTerrainData($t.tileID);Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,Tr.texture);let Kr=Oe.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Oe.transform.zoom),qe=Oe.transform.calculateFogMatrix($t.tileID.toUnwrapped()),$e=mr(Kr,na,qe,Oe.style.sky,Oe.transform.pitch);wt.draw(Te,Me.TRIANGLES,ht,Ps.disabled,ze,to.backCCW,$e,Sr,"terrain",Ot.vertexBuffer,Ot.indexBuffer,Ot.segments)}}class Lu{constructor(I,ie,Te){this.vertexBuffer=I,this.indexBuffer=ie,this.segments=Te}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Mc{constructor(I,ie){this.context=new xh(I),this.transform=ie,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 Or}resize(I,ie,Te){if(this.width=Math.floor(I*Te),this.height=Math.floor(ie*Te),this.pixelRatio=Te,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Me of this.style._order)this.style._layers[Me].resize()}setup(){let I=this.context,ie=new t.aX;ie.emplaceBack(0,0),ie.emplaceBack(t.X,0),ie.emplaceBack(0,t.X),ie.emplaceBack(t.X,t.X),this.tileExtentBuffer=I.createVertexBuffer(ie,Nr.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let Te=new t.aX;Te.emplaceBack(0,0),Te.emplaceBack(t.X,0),Te.emplaceBack(0,t.X),Te.emplaceBack(t.X,t.X),this.debugBuffer=I.createVertexBuffer(Te,Nr.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let Me=new t.$;Me.emplaceBack(0,0,0,0),Me.emplaceBack(t.X,0,t.X,0),Me.emplaceBack(0,t.X,0,t.X),Me.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=I.createVertexBuffer(Me,je.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let ze=new t.aX;ze.emplaceBack(0,0),ze.emplaceBack(1,0),ze.emplaceBack(0,1),ze.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(ze,Nr.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let ht=new t.aZ;ht.emplaceBack(0),ht.emplaceBack(1),ht.emplaceBack(3),ht.emplaceBack(2),ht.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(ht);let wt=new t.aY;wt.emplaceBack(0,1,2),wt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(wt);let Ot=this.context.gl;this.stencilClearMode=new Ps({func:Ot.ALWAYS,mask:0},0,255,Ot.ZERO,Ot.ZERO,Ot.ZERO)}clearStencil(){let I=this.context,ie=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Te=t.H();t.aP(Te,0,this.width,this.height,0,0,1),t.K(Te,Te,[ie.drawingBufferWidth,ie.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ie.TRIANGLES,us.disabled,this.stencilClearMode,fl.disabled,to.disabled,En(Te),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(I,ie){if(this.currentStencilSource===I.source||!I.isTileClipped()||!ie||!ie.length)return;this.currentStencilSource=I.source;let Te=this.context,Me=Te.gl;this.nextStencilID+ie.length>256&&this.clearStencil(),Te.setColorMode(fl.disabled),Te.setDepthMode(us.disabled);let ze=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ht of ie){let wt=this._tileClippingMaskIDs[ht.key]=this.nextStencilID++,Ot=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ht);ze.draw(Te,Me.TRIANGLES,us.disabled,new Ps({func:Me.ALWAYS,mask:0},wt,255,Me.KEEP,Me.KEEP,Me.REPLACE),fl.disabled,to.disabled,En(ht.posMatrix),Ot,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let I=this.nextStencilID++,ie=this.context.gl;return new Ps({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new Ps({func:ie.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilConfigForOverlap(I){let ie=this.context.gl,Te=I.sort((ht,wt)=>wt.overscaledZ-ht.overscaledZ),Me=Te[Te.length-1].overscaledZ,ze=Te[0].overscaledZ-Me+1;if(ze>1){this.currentStencilSource=void 0,this.nextStencilID+ze>256&&this.clearStencil();let ht={};for(let wt=0;wt({u_sky_color:pt.properties.get("sky-color"),u_horizon_color:pt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*bt,u_sky_horizon_blend:pt.properties.get("sky-horizon-blend")*Et.height/2*bt}))($t,Ot.style.map.transform,Ot.pixelRatio),na=new us(Sr.LEQUAL,us.ReadWrite,[0,1]),qe=Ps.disabled,$e=Ot.colorModeForRenderPass(),lt=Ot.useProgram("sky");if(!$t.mesh){let pt=new t.aX;pt.emplaceBack(-1,-1),pt.emplaceBack(1,-1),pt.emplaceBack(1,1),pt.emplaceBack(-1,1);let Et=new t.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),$t.mesh=new Lu(Tr.createVertexBuffer(pt,Nr.members),Tr.createIndexBuffer(Et),t.a0.simpleSegment(0,0,pt.length,Et.length))}lt.draw(Tr,Sr.TRIANGLES,na,qe,$e,to.disabled,Kr,void 0,"sky",$t.mesh.vertexBuffer,$t.mesh.indexBuffer,$t.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ie.showOverdrawInspector,this.depthRangeFor3D=[0,1-(I._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Te.length-1;this.currentLayer>=0;this.currentLayer--){let Ot=this.style._layers[Te[this.currentLayer]],$t=Me[Ot.source],Tr=ze[Ot.source];this._renderTileClippingMasks(Ot,Tr),this.renderLayer(this,$t,Ot,Tr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerlt.source&&!lt.isHidden(Tr)?[$t.sourceCaches[lt.source]]:[]),na=Kr.filter(lt=>lt.getSource().type==="vector"),qe=Kr.filter(lt=>lt.getSource().type!=="vector"),$e=lt=>{(!Sr||Sr.getSource().maxzoom$e(lt)),Sr||qe.forEach(lt=>$e(lt)),Sr}(this.style,this.transform.zoom);Ot&&function($t,Tr,Sr){for(let Kr=0;Kr0),Me&&(t.b0(ie,Te),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(ze,ht){let wt=ze.context,Ot=wt.gl,$t=fl.unblended,Tr=new us(Ot.LEQUAL,us.ReadWrite,[0,1]),Sr=ht.getTerrainMesh(),Kr=ht.sourceCache.getRenderableTiles(),na=ze.useProgram("terrainDepth");wt.bindFramebuffer.set(ht.getFramebuffer("depth").framebuffer),wt.viewport.set([0,0,ze.width/devicePixelRatio,ze.height/devicePixelRatio]),wt.clear({color:t.aM.transparent,depth:1});for(let qe of Kr){let $e=ht.getTerrainData(qe.tileID),lt={u_matrix:ze.transform.calculatePosMatrix(qe.tileID.toUnwrapped()),u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};na.draw(wt,Ot.TRIANGLES,Tr,Ps.disabled,$t,to.backCCW,lt,$e,"terrain",Sr.vertexBuffer,Sr.indexBuffer,Sr.segments)}wt.bindFramebuffer.set(null),wt.viewport.set([0,0,ze.width,ze.height])}(this,this.style.map.terrain),function(ze,ht){let wt=ze.context,Ot=wt.gl,$t=fl.unblended,Tr=new us(Ot.LEQUAL,us.ReadWrite,[0,1]),Sr=ht.getTerrainMesh(),Kr=ht.getCoordsTexture(),na=ht.sourceCache.getRenderableTiles(),qe=ze.useProgram("terrainCoords");wt.bindFramebuffer.set(ht.getFramebuffer("coords").framebuffer),wt.viewport.set([0,0,ze.width/devicePixelRatio,ze.height/devicePixelRatio]),wt.clear({color:t.aM.transparent,depth:1}),ht.coordsIndex=[];for(let $e of na){let lt=ht.getTerrainData($e.tileID);wt.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,Kr.texture);let pt={u_matrix:ze.transform.calculatePosMatrix($e.tileID.toUnwrapped()),u_terrain_coords_id:(255-ht.coordsIndex.length)/255,u_texture:0,u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};qe.draw(wt,Ot.TRIANGLES,Tr,Ps.disabled,$t,to.backCCW,pt,lt,"terrain",Sr.vertexBuffer,Sr.indexBuffer,Sr.segments),ht.coordsIndex.push($e.tileID.key)}wt.bindFramebuffer.set(null),wt.viewport.set([0,0,ze.width,ze.height])}(this,this.style.map.terrain))}renderLayer(I,ie,Te,Me){if(!Te.isHidden(this.transform.zoom)&&(Te.type==="background"||Te.type==="custom"||(Me||[]).length))switch(this.id=Te.id,Te.type){case"symbol":(function(ze,ht,wt,Ot,$t){if(ze.renderPass!=="translucent")return;let Tr=Ps.disabled,Sr=ze.colorModeForRenderPass();(wt._unevaluatedLayout.hasValue("text-variable-anchor")||wt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,qe,$e,lt,pt,Et,bt,Dt){let ur=na.transform,yr=pi(),Er=lt==="map",jr=pt==="map";for(let Qr of Kr){let ha=$e.getTile(Qr),Aa=ha.getBucket(qe);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let Da=t.ag(Aa.textSizeData,ur.zoom),ci=Fa(ha,1,na.transform.zoom),Vi=kr(Qr.posMatrix,jr,Er,na.transform,ci),ji=qe.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(Da){let on=Math.pow(2,ur.zoom-ha.tileID.overscaledZ),An=na.style.map.terrain?(Bn,Ao)=>na.style.map.terrain.getElevation(Qr,Bn,Ao):null,Kn=yr.translatePosition(ur,ha,Et,bt);nf(Aa,Er,jr,Dt,ur,Vi,Qr.posMatrix,on,Da,ji,yr,Kn,Qr.toUnwrapped(),An)}}}(Ot,ze,wt,ht,wt.layout.get("text-rotation-alignment"),wt.layout.get("text-pitch-alignment"),wt.paint.get("text-translate"),wt.paint.get("text-translate-anchor"),$t),wt.paint.get("icon-opacity").constantOr(1)!==0&&Jf(ze,ht,wt,Ot,!1,wt.paint.get("icon-translate"),wt.paint.get("icon-translate-anchor"),wt.layout.get("icon-rotation-alignment"),wt.layout.get("icon-pitch-alignment"),wt.layout.get("icon-keep-upright"),Tr,Sr),wt.paint.get("text-opacity").constantOr(1)!==0&&Jf(ze,ht,wt,Ot,!0,wt.paint.get("text-translate"),wt.paint.get("text-translate-anchor"),wt.layout.get("text-rotation-alignment"),wt.layout.get("text-pitch-alignment"),wt.layout.get("text-keep-upright"),Tr,Sr),ht.map.showCollisionBoxes&&(Vu(ze,ht,wt,Ot,!0),Vu(ze,ht,wt,Ot,!1))})(I,ie,Te,Me,this.style.placement.variableOffsets);break;case"circle":(function(ze,ht,wt,Ot){if(ze.renderPass!=="translucent")return;let $t=wt.paint.get("circle-opacity"),Tr=wt.paint.get("circle-stroke-width"),Sr=wt.paint.get("circle-stroke-opacity"),Kr=!wt.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Sr.constantOr(1)===0))return;let na=ze.context,qe=na.gl,$e=ze.depthModeForSublayer(0,us.ReadOnly),lt=Ps.disabled,pt=ze.colorModeForRenderPass(),Et=[];for(let bt=0;btbt.sortKey-Dt.sortKey);for(let bt of Et){let{programConfiguration:Dt,program:ur,layoutVertexBuffer:yr,indexBuffer:Er,uniformValues:jr,terrainData:Qr}=bt.state;ur.draw(na,qe.TRIANGLES,$e,lt,pt,to.disabled,jr,Qr,wt.id,yr,Er,bt.segments,wt.paint,ze.transform.zoom,Dt)}})(I,ie,Te,Me);break;case"heatmap":(function(ze,ht,wt,Ot){if(wt.paint.get("heatmap-opacity")===0)return;let $t=ze.context;if(ze.style.map.terrain){for(let Tr of Ot){let Sr=ht.getTile(Tr);ht.hasRenderableParent(Tr)||(ze.renderPass==="offscreen"?of(ze,Sr,wt,Tr):ze.renderPass==="translucent"&&jc(ze,wt,Tr))}$t.viewport.set([0,0,ze.width,ze.height])}else ze.renderPass==="offscreen"?function(Tr,Sr,Kr,na){let qe=Tr.context,$e=qe.gl,lt=Ps.disabled,pt=new fl([$e.ONE,$e.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Et,bt,Dt){let ur=Et.gl;Et.activeTexture.set(ur.TEXTURE1),Et.viewport.set([0,0,bt.width/4,bt.height/4]);let yr=Dt.heatmapFbos.get(t.aU);yr?(ur.bindTexture(ur.TEXTURE_2D,yr.colorAttachment.get()),Et.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Et,bt.width/4,bt.height/4),Dt.heatmapFbos.set(t.aU,yr))})(qe,Tr,Kr),qe.clear({color:t.aM.transparent});for(let Et=0;Et20&&Tr.texParameterf(Tr.TEXTURE_2D,$t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$t.extTextureFilterAnisotropicMax);let Aa=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Et),Da=Aa?Et:null,ci=Da?Da.posMatrix:ze.transform.calculatePosMatrix(Et.toUnwrapped(),pt),Vi=ys(ci,Qr||[0,0],jr||1,Er,wt);Sr instanceof at?Kr.draw($t,Tr.TRIANGLES,bt,Ps.disabled,na,to.disabled,Vi,Aa,wt.id,Sr.boundsBuffer,ze.quadTriangleIndexBuffer,Sr.boundsSegments):Kr.draw($t,Tr.TRIANGLES,bt,qe[Et.overscaledZ],na,to.disabled,Vi,Aa,wt.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments)}})(I,ie,Te,Me);break;case"background":(function(ze,ht,wt,Ot){let $t=wt.paint.get("background-color"),Tr=wt.paint.get("background-opacity");if(Tr===0)return;let Sr=ze.context,Kr=Sr.gl,na=ze.transform,qe=na.tileSize,$e=wt.paint.get("background-pattern");if(ze.isPatternMissing($e))return;let lt=!$e&&$t.a===1&&Tr===1&&ze.opaquePassEnabledForLayer()?"opaque":"translucent";if(ze.renderPass!==lt)return;let pt=Ps.disabled,Et=ze.depthModeForSublayer(0,lt==="opaque"?us.ReadWrite:us.ReadOnly),bt=ze.colorModeForRenderPass(),Dt=ze.useProgram($e?"backgroundPattern":"background"),ur=Ot||na.coveringTiles({tileSize:qe,terrain:ze.style.map.terrain});$e&&(Sr.activeTexture.set(Kr.TEXTURE0),ze.imageManager.bind(ze.context));let yr=wt.getCrossfadeParameters();for(let Er of ur){let jr=Ot?Er.posMatrix:ze.transform.calculatePosMatrix(Er.toUnwrapped()),Qr=$e?_s(jr,Tr,ze,$e,{tileID:Er,tileSize:qe},yr):ss(jr,Tr,$t),ha=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Er);Dt.draw(Sr,Kr.TRIANGLES,Et,pt,bt,to.disabled,Qr,ha,wt.id,ze.tileExtentBuffer,ze.quadTriangleIndexBuffer,ze.tileExtentSegments)}})(I,0,Te,Me);break;case"custom":(function(ze,ht,wt){let Ot=ze.context,$t=wt.implementation;if(ze.renderPass==="offscreen"){let Tr=$t.prerender;Tr&&(ze.setCustomLayerDefaults(),Ot.setColorMode(ze.colorModeForRenderPass()),Tr.call($t,Ot.gl,ze.transform.customLayerMatrix()),Ot.setDirty(),ze.setBaseState())}else if(ze.renderPass==="translucent"){ze.setCustomLayerDefaults(),Ot.setColorMode(ze.colorModeForRenderPass()),Ot.setStencilMode(Ps.disabled);let Tr=$t.renderingMode==="3d"?new us(ze.context.gl.LEQUAL,us.ReadWrite,ze.depthRangeFor3D):ze.depthModeForSublayer(0,us.ReadOnly);Ot.setDepthMode(Tr),$t.render(Ot.gl,ze.transform.customLayerMatrix(),{farZ:ze.transform.farZ,nearZ:ze.transform.nearZ,fov:ze.transform._fov,modelViewProjectionMatrix:ze.transform.modelViewProjectionMatrix,projectionMatrix:ze.transform.projectionMatrix}),Ot.setDirty(),ze.setBaseState(),Ot.bindFramebuffer.set(null)}})(I,0,Te)}}translatePosMatrix(I,ie,Te,Me,ze){if(!Te[0]&&!Te[1])return I;let ht=ze?Me==="map"?this.transform.angle:0:Me==="viewport"?-this.transform.angle:0;if(ht){let $t=Math.sin(ht),Tr=Math.cos(ht);Te=[Te[0]*Tr-Te[1]*$t,Te[0]*$t+Te[1]*Tr]}let wt=[ze?Te[0]:Fa(ie,Te[0],this.transform.zoom),ze?Te[1]:Fa(ie,Te[1],this.transform.zoom),0],Ot=new Float32Array(16);return t.J(Ot,I,wt),Ot}saveTileTexture(I){let ie=this._tileTextures[I.size[0]];ie?ie.push(I):this._tileTextures[I.size[0]]=[I]}getTileTexture(I){let ie=this._tileTextures[I];return ie&&ie.length>0?ie.pop():null}isPatternMissing(I){if(!I)return!1;if(!I.from||!I.to)return!0;let ie=this.imageManager.getPattern(I.from.toString()),Te=this.imageManager.getPattern(I.to.toString());return!ie||!Te}useProgram(I,ie){this.cache=this.cache||{};let Te=I+(ie?ie.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Te]||(this.cache[Te]=new va(this.context,Hr[I],ie,ps[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Te]}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 I=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(I.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:I,drawingBufferHeight:ie}=this.context.gl;return this.width!==I||this.height!==ie}}class ol{constructor(I,ie){this.points=I,this.planes=ie}static fromInvProjectionMatrix(I,ie,Te){let Me=Math.pow(2,Te),ze=[[-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(wt=>{let Ot=1/(wt=t.af([],wt,I))[3]/ie*Me;return t.b1(wt,wt,[Ot,Ot,1/wt[3],Ot])}),ht=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(wt=>{let Ot=function(Kr,na){var qe=na[0],$e=na[1],lt=na[2],pt=qe*qe+$e*$e+lt*lt;return pt>0&&(pt=1/Math.sqrt(pt)),Kr[0]=na[0]*pt,Kr[1]=na[1]*pt,Kr[2]=na[2]*pt,Kr}([],function(Kr,na,qe){var $e=na[0],lt=na[1],pt=na[2],Et=qe[0],bt=qe[1],Dt=qe[2];return Kr[0]=lt*Dt-pt*bt,Kr[1]=pt*Et-$e*Dt,Kr[2]=$e*bt-lt*Et,Kr}([],E([],ze[wt[0]],ze[wt[1]]),E([],ze[wt[2]],ze[wt[1]]))),$t=-((Tr=Ot)[0]*(Sr=ze[wt[1]])[0]+Tr[1]*Sr[1]+Tr[2]*Sr[2]);var Tr,Sr;return Ot.concat($t)});return new ol(ze,ht)}}class vc{constructor(I,ie){this.min=I,this.max=ie,this.center=function(Te,Me,ze){return Te[0]=.5*Me[0],Te[1]=.5*Me[1],Te[2]=.5*Me[2],Te}([],function(Te,Me,ze){return Te[0]=Me[0]+ze[0],Te[1]=Me[1]+ze[1],Te[2]=Me[2]+ze[2],Te}([],this.min,this.max))}quadrant(I){let ie=[I%2==0,I<2],Te=w(this.min),Me=w(this.max);for(let ze=0;ze=0&&ht++;if(ht===0)return 0;ht!==ie.length&&(Te=!1)}if(Te)return 2;for(let Me=0;Me<3;Me++){let ze=Number.MAX_VALUE,ht=-Number.MAX_VALUE;for(let wt=0;wtthis.max[Me]-this.min[Me])return 0}return 1}}class yu{constructor(I=0,ie=0,Te=0,Me=0){if(isNaN(I)||I<0||isNaN(ie)||ie<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=I,this.bottom=ie,this.left=Te,this.right=Me}interpolate(I,ie,Te){return ie.top!=null&&I.top!=null&&(this.top=t.y.number(I.top,ie.top,Te)),ie.bottom!=null&&I.bottom!=null&&(this.bottom=t.y.number(I.bottom,ie.bottom,Te)),ie.left!=null&&I.left!=null&&(this.left=t.y.number(I.left,ie.left,Te)),ie.right!=null&&I.right!=null&&(this.right=t.y.number(I.right,ie.right,Te)),this}getCenter(I,ie){let Te=t.ac((this.left+I-this.right)/2,0,I),Me=t.ac((this.top+ie-this.bottom)/2,0,ie);return new t.P(Te,Me)}equals(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right}clone(){return new yu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Tu=85.051129;class Ml{constructor(I,ie,Te,Me,ze){this.tileSize=512,this._renderWorldCopies=ze===void 0||!!ze,this._minZoom=I||0,this._maxZoom=ie||22,this._minPitch=Te??0,this._maxPitch=Me??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 yu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let I=new Ml(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.apply(this),I}apply(I){this.tileSize=I.tileSize,this.latRange=I.latRange,this.lngRange=I.lngRange,this.width=I.width,this.height=I.height,this._center=I._center,this._elevation=I._elevation,this.minElevationForCurrentTile=I.minElevationForCurrentTile,this.zoom=I.zoom,this.angle=I.angle,this._fov=I._fov,this._pitch=I._pitch,this._unmodified=I._unmodified,this._edgeInsets=I._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))}get maxZoom(){return this._maxZoom}set maxZoom(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))}get minPitch(){return this._minPitch}set minPitch(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))}get maxPitch(){return this._maxPitch}set maxPitch(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I}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(I){let ie=-t.b3(I,-180,180)*Math.PI/180;this.angle!==ie&&(this._unmodified=!1,this.angle=ie,this._calcMatrices(),this.rotationMatrix=function(){var Te=new t.A(4);return t.A!=Float32Array&&(Te[1]=0,Te[2]=0),Te[0]=1,Te[3]=1,Te}(),function(Te,Me,ze){var ht=Me[0],wt=Me[1],Ot=Me[2],$t=Me[3],Tr=Math.sin(ze),Sr=Math.cos(ze);Te[0]=ht*Sr+Ot*Tr,Te[1]=wt*Sr+$t*Tr,Te[2]=ht*-Tr+Ot*Sr,Te[3]=wt*-Tr+$t*Sr}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(I){let ie=t.ac(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ie&&(this._unmodified=!1,this._pitch=ie,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(I){let ie=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==ie&&(this._unmodified=!1,this._zoom=ie,this.tileZoom=Math.max(0,Math.floor(ie)),this.scale=this.zoomScale(ie),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(I){I!==this._elevation&&(this._elevation=I,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(I){return this._edgeInsets.equals(I)}interpolatePadding(I,ie,Te){this._unmodified=!1,this._edgeInsets.interpolate(I,ie,Te),this._constrain(),this._calcMatrices()}coveringZoomLevel(I){let ie=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,ie)}getVisibleUnwrappedCoordinates(I){let ie=[new t.b4(0,I)];if(this._renderWorldCopies){let Te=this.pointCoordinate(new t.P(0,0)),Me=this.pointCoordinate(new t.P(this.width,0)),ze=this.pointCoordinate(new t.P(this.width,this.height)),ht=this.pointCoordinate(new t.P(0,this.height)),wt=Math.floor(Math.min(Te.x,Me.x,ze.x,ht.x)),Ot=Math.floor(Math.max(Te.x,Me.x,ze.x,ht.x)),$t=1;for(let Tr=wt-$t;Tr<=Ot+$t;Tr++)Tr!==0&&ie.push(new t.b4(Tr,I))}return ie}coveringTiles(I){var ie,Te;let Me=this.coveringZoomLevel(I),ze=Me;if(I.minzoom!==void 0&&MeI.maxzoom&&(Me=I.maxzoom);let ht=this.pointCoordinate(this.getCameraPoint()),wt=t.Z.fromLngLat(this.center),Ot=Math.pow(2,Me),$t=[Ot*ht.x,Ot*ht.y,0],Tr=[Ot*wt.x,Ot*wt.y,0],Sr=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Me),Kr=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Kr=Me);let na=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,qe=bt=>({aabb:new vc([bt*Ot,0,0],[(bt+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:bt,fullyVisible:!1}),$e=[],lt=[],pt=Me,Et=I.reparseOverscaled?ze:Me;if(this._renderWorldCopies)for(let bt=1;bt<=3;bt++)$e.push(qe(-bt)),$e.push(qe(bt));for($e.push(qe(0));$e.length>0;){let bt=$e.pop(),Dt=bt.x,ur=bt.y,yr=bt.fullyVisible;if(!yr){let Aa=bt.aabb.intersects(Sr);if(Aa===0)continue;yr=Aa===2}let Er=I.terrain?$t:Tr,jr=bt.aabb.distanceX(Er),Qr=bt.aabb.distanceY(Er),ha=Math.max(Math.abs(jr),Math.abs(Qr));if(bt.zoom===pt||ha>na+(1<=Kr){let Aa=pt-bt.zoom,Da=$t[0]-.5-(Dt<>1),Vi=bt.zoom+1,ji=bt.aabb.quadrant(Aa);if(I.terrain){let on=new t.S(Vi,bt.wrap,Vi,Da,ci),An=I.terrain.getMinMaxElevation(on),Kn=(ie=An.minElevation)!==null&&ie!==void 0?ie:this.elevation,Bn=(Te=An.maxElevation)!==null&&Te!==void 0?Te:this.elevation;ji=new vc([ji.min[0],ji.min[1],Kn],[ji.max[0],ji.max[1],Bn])}$e.push({aabb:ji,zoom:Vi,x:Da,y:ci,wrap:bt.wrap,fullyVisible:yr})}}return lt.sort((bt,Dt)=>bt.distanceSq-Dt.distanceSq).map(bt=>bt.tileID)}resize(I,ie){this.width=I,this.height=ie,this.pixelsToGLUnits=[2/I,-2/ie],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(I){return Math.pow(2,I)}scaleZoom(I){return Math.log(I)/Math.LN2}project(I){let ie=t.ac(I.lat,-85.051129,Tu);return new t.P(t.O(I.lng)*this.worldSize,t.Q(ie)*this.worldSize)}unproject(I){return new t.Z(I.x/this.worldSize,I.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(I){let ie=this.elevation,Te=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Me=this.pointLocation(this.centerPoint,I),ze=I.getElevationForLngLatZoom(Me,this.tileZoom);if(!(this.elevation-ze))return;let ht=Te+ie-ze,wt=Math.cos(this._pitch)*this.cameraToCenterDistance/ht/t.b5(1,Me.lat),Ot=this.scaleZoom(wt/this.tileSize);this._elevation=ze,this._center=Me,this.zoom=Ot}setLocationAtPoint(I,ie){let Te=this.pointCoordinate(ie),Me=this.pointCoordinate(this.centerPoint),ze=this.locationCoordinate(I),ht=new t.Z(ze.x-(Te.x-Me.x),ze.y-(Te.y-Me.y));this.center=this.coordinateLocation(ht),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(I,ie){return ie?this.coordinatePoint(this.locationCoordinate(I),ie.getElevationForLngLatZoom(I,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(I))}pointLocation(I,ie){return this.coordinateLocation(this.pointCoordinate(I,ie))}locationCoordinate(I){return t.Z.fromLngLat(I)}coordinateLocation(I){return I&&I.toLngLat()}pointCoordinate(I,ie){if(ie){let Kr=ie.pointCoordinate(I);if(Kr!=null)return Kr}let Te=[I.x,I.y,0,1],Me=[I.x,I.y,1,1];t.af(Te,Te,this.pixelMatrixInverse),t.af(Me,Me,this.pixelMatrixInverse);let ze=Te[3],ht=Me[3],wt=Te[1]/ze,Ot=Me[1]/ht,$t=Te[2]/ze,Tr=Me[2]/ht,Sr=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(Te[0]/ze,Me[0]/ht,Sr)/this.worldSize,t.y.number(wt,Ot,Sr)/this.worldSize)}coordinatePoint(I,ie=0,Te=this.pixelMatrix){let Me=[I.x*this.worldSize,I.y*this.worldSize,ie,1];return t.af(Me,Me,Te),new t.P(Me[0]/Me[3],Me[1]/Me[3])}getBounds(){let I=Math.max(0,this.height/2-this.getHorizon());return new te().extend(this.pointLocation(new t.P(0,I))).extend(this.pointLocation(new t.P(this.width,I))).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 te([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(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tu])}calculateTileMatrix(I){let ie=I.canonical,Te=this.worldSize/this.zoomScale(ie.z),Me=ie.x+Math.pow(2,ie.z)*I.wrap,ze=t.an(new Float64Array(16));return t.J(ze,ze,[Me*Te,ie.y*Te,0]),t.K(ze,ze,[Te/t.X,Te/t.X,1]),ze}calculatePosMatrix(I,ie=!1){let Te=I.key,Me=ie?this._alignedPosMatrixCache:this._posMatrixCache;if(Me[Te])return Me[Te];let ze=this.calculateTileMatrix(I);return t.L(ze,ie?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,ze),Me[Te]=new Float32Array(ze),Me[Te]}calculateFogMatrix(I){let ie=I.key,Te=this._fogMatrixCache;if(Te[ie])return Te[ie];let Me=this.calculateTileMatrix(I);return t.L(Me,this.fogMatrix,Me),Te[ie]=new Float32Array(Me),Te[ie]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ie){ie=t.ac(+ie,this.minZoom,this.maxZoom);let Te={center:new t.N(I.lng,I.lat),zoom:ie},Me=this.lngRange;if(!this._renderWorldCopies&&Me===null){let bt=179.9999999999;Me=[-bt,bt]}let ze=this.tileSize*this.zoomScale(Te.zoom),ht=0,wt=ze,Ot=0,$t=ze,Tr=0,Sr=0,{x:Kr,y:na}=this.size;if(this.latRange){let bt=this.latRange;ht=t.Q(bt[1])*ze,wt=t.Q(bt[0])*ze,wt-htwt&&(pt=wt-bt)}if(Me){let bt=(Ot+$t)/2,Dt=qe;this._renderWorldCopies&&(Dt=t.b3(qe,bt-ze/2,bt+ze/2));let ur=Kr/2;Dt-ur$t&&(lt=$t-ur)}if(lt!==void 0||pt!==void 0){let bt=new t.P(lt??qe,pt??$e);Te.center=this.unproject.call({worldSize:ze},bt).wrap()}return Te}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ie,zoom:Te}=this.getConstrained(this.center,this.zoom);this.center=ie,this.zoom=Te,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ie=this.point.x,Te=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Me=t.an(new Float64Array(16));t.K(Me,Me,[this.width/2,-this.height/2,1]),t.J(Me,Me,[1,-1,0]),this.labelPlaneMatrix=Me,Me=t.an(new Float64Array(16)),t.K(Me,Me,[1,-1,1]),t.J(Me,Me,[-1,-1,0]),t.K(Me,Me,[2/this.width,2/this.height,1]),this.glCoordMatrix=Me;let ze=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ht=Math.min(this.elevation,this.minElevationForCurrentTile),wt=ze-ht*this._pixelPerMeter/Math.cos(this._pitch),Ot=ht<0?wt:ze,$t=Math.PI/2+this._pitch,Tr=this._fov*(.5+I.y/this.height),Sr=Math.sin(Tr)*Ot/Math.sin(t.ac(Math.PI-$t-Tr,.01,Math.PI-.01)),Kr=this.getHorizon(),na=2*Math.atan(Kr/this.cameraToCenterDistance)*(.5+I.y/(2*Kr)),qe=Math.sin(na)*Ot/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),$e=Math.min(Sr,qe);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*$e+Ot),this.nearZ=this.height/50,Me=new Float64Array(16),t.b6(Me,this._fov,this.width/this.height,this.nearZ,this.farZ),Me[8]=2*-I.x/this.width,Me[9]=2*I.y/this.height,this.projectionMatrix=t.ae(Me),t.K(Me,Me,[1,-1,1]),t.J(Me,Me,[0,0,-this.cameraToCenterDistance]),t.b7(Me,Me,this._pitch),t.ad(Me,Me,this.angle),t.J(Me,Me,[-ie,-Te,0]),this.mercatorMatrix=t.K([],Me,[this.worldSize,this.worldSize,this.worldSize]),t.K(Me,Me,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Me),t.J(Me,Me,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Me,this.invModelViewProjectionMatrix=t.as([],Me),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,ze,this.farZ),this.fogMatrix[8]=2*-I.x/this.width,this.fogMatrix[9]=2*I.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,[-ie,-Te,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,Me);let lt=this.width%2/2,pt=this.height%2/2,Et=Math.cos(this.angle),bt=Math.sin(this.angle),Dt=ie-Math.round(ie)+Et*lt+bt*pt,ur=Te-Math.round(Te)+Et*pt+bt*lt,yr=new Float64Array(Me);if(t.J(yr,yr,[Dt>.5?Dt-1:Dt,ur>.5?ur-1:ur,0]),this.alignedModelViewProjectionMatrix=yr,Me=t.as(new Float64Array(16),this.pixelMatrix),!Me)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Me,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let I=this.pointCoordinate(new t.P(0,0)),ie=[I.x*this.worldSize,I.y*this.worldSize,0,1];return t.af(ie,ie,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let I=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,I))}getCameraQueryGeometry(I){let ie=this.getCameraPoint();if(I.length===1)return[I[0],ie];{let Te=ie.x,Me=ie.y,ze=ie.x,ht=ie.y;for(let wt of I)Te=Math.min(Te,wt.x),Me=Math.min(Me,wt.y),ze=Math.max(ze,wt.x),ht=Math.max(ht,wt.y);return[new t.P(Te,Me),new t.P(ze,Me),new t.P(ze,ht),new t.P(Te,ht),new t.P(Te,Me)]}}lngLatToCameraDepth(I,ie){let Te=this.locationCoordinate(I),Me=[Te.x*this.worldSize,Te.y*this.worldSize,ie,1];return t.af(Me,Me,this.modelViewProjectionMatrix),Me[2]/Me[3]}}function qf(Oe,I){let ie,Te=!1,Me=null,ze=null,ht=()=>{Me=null,Te&&(Oe.apply(ze,ie),Me=setTimeout(ht,I),Te=!1)};return(...wt)=>(Te=!0,ze=this,ie=wt,Me||ht(),Me)}class Qf{constructor(I){this._getCurrentHash=()=>{let ie=window.location.hash.replace("#","");if(this._hashName){let Te;return ie.split("&").map(Me=>Me.split("=")).forEach(Me=>{Me[0]===this._hashName&&(Te=Me)}),(Te&&Te[1]||"").split("/")}return ie.split("/")},this._onHashChange=()=>{let ie=this._getCurrentHash();if(ie.length>=3&&!ie.some(Te=>isNaN(Te))){let Te=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ie[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ie[2],+ie[1]],zoom:+ie[0],bearing:Te,pitch:+(ie[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ie=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ie)},this._removeHash=()=>{let ie=this._getCurrentHash();if(ie.length===0)return;let Te=ie.join("/"),Me=Te;Me.split("&").length>0&&(Me=Me.split("&")[0]),this._hashName&&(Me=`${this._hashName}=${Te}`);let ze=window.location.hash.replace(Me,"");ze.startsWith("#&")?ze=ze.slice(0,1)+ze.slice(2):ze==="#"&&(ze="");let ht=window.location.href.replace(/(#.+)?$/,ze);ht=ht.replace("&&","&"),window.history.replaceState(window.history.state,null,ht)},this._updateHash=qf(this._updateHashUnthrottled,300),this._hashName=I&&encodeURIComponent(I)}addTo(I){return this._map=I,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(I){let ie=this._map.getCenter(),Te=Math.round(100*this._map.getZoom())/100,Me=Math.ceil((Te*Math.LN2+Math.log(512/360/.5))/Math.LN10),ze=Math.pow(10,Me),ht=Math.round(ie.lng*ze)/ze,wt=Math.round(ie.lat*ze)/ze,Ot=this._map.getBearing(),$t=this._map.getPitch(),Tr="";if(Tr+=I?`/${ht}/${wt}/${Te}`:`${Te}/${wt}/${ht}`,(Ot||$t)&&(Tr+="/"+Math.round(10*Ot)/10),$t&&(Tr+=`/${Math.round($t)}`),this._hashName){let Sr=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(qe=>{let $e=qe.split("=")[0];return $e===Sr?(Kr=!0,`${$e}=${Tr}`):qe}).filter(qe=>qe);return Kr||na.push(`${Sr}=${Tr}`),`#${na.join("&")}`}return`#${Tr}`}}let Bu={linearity:.3,easing:t.b8(0,0,.3,1)},Ec=t.e({deceleration:2500,maxSpeed:1400},Bu),mc=t.e({deceleration:20,maxSpeed:1400},Bu),Lh=t.e({deceleration:1e3,maxSpeed:360},Bu),sf=t.e({deceleration:1e3,maxSpeed:90},Bu);class vf{constructor(I){this._map=I,this.clear()}clear(){this._inertiaBuffer=[]}record(I){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ie=i.now();for(;I.length>0&&ie-I[0].time>160;)I.shift()}_onMoveEnd(I){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ie={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:ze}of this._inertiaBuffer)ie.zoom+=ze.zoomDelta||0,ie.bearing+=ze.bearingDelta||0,ie.pitch+=ze.pitchDelta||0,ze.panDelta&&ie.pan._add(ze.panDelta),ze.around&&(ie.around=ze.around),ze.pinchAround&&(ie.pinchAround=ze.pinchAround);let Te=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Me={};if(ie.pan.mag()){let ze=lf(ie.pan.mag(),Te,t.e({},Ec,I||{}));Me.offset=ie.pan.mult(ze.amount/ie.pan.mag()),Me.center=this._map.transform.center,Nu(Me,ze)}if(ie.zoom){let ze=lf(ie.zoom,Te,mc);Me.zoom=this._map.transform.zoom+ze.amount,Nu(Me,ze)}if(ie.bearing){let ze=lf(ie.bearing,Te,Lh);Me.bearing=this._map.transform.bearing+t.ac(ze.amount,-179,179),Nu(Me,ze)}if(ie.pitch){let ze=lf(ie.pitch,Te,sf);Me.pitch=this._map.transform.pitch+ze.amount,Nu(Me,ze)}if(Me.zoom||Me.bearing){let ze=ie.pinchAround===void 0?ie.around:ie.pinchAround;Me.around=ze?this._map.unproject(ze):this._map.getCenter()}return this.clear(),t.e(Me,{noMoveStart:!0})}}function Nu(Oe,I){(!Oe.duration||Oe.durationie.unproject(Ot)),wt=ze.reduce((Ot,$t,Tr,Sr)=>Ot.add($t.div(Sr.length)),new t.P(0,0));super(I,{points:ze,point:wt,lngLats:ht,lngLat:ie.unproject(wt),originalEvent:Te}),this._defaultPrevented=!1}}class hh extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,Te){super(I,{originalEvent:Te}),this._defaultPrevented=!1}}class mf{constructor(I,ie){this._map=I,this._clickTolerance=ie.clickTolerance}reset(){delete this._mousedownPos}wheel(I){return this._firePreventable(new hh(I.type,this._map,I))}mousedown(I,ie){return this._mousedownPos=ie,this._firePreventable(new iu(I.type,this._map,I))}mouseup(I){this._map.fire(new iu(I.type,this._map,I))}click(I,ie){this._mousedownPos&&this._mousedownPos.dist(ie)>=this._clickTolerance||this._map.fire(new iu(I.type,this._map,I))}dblclick(I){return this._firePreventable(new iu(I.type,this._map,I))}mouseover(I){this._map.fire(new iu(I.type,this._map,I))}mouseout(I){this._map.fire(new iu(I.type,this._map,I))}touchstart(I){return this._firePreventable(new Kc(I.type,this._map,I))}touchmove(I){this._map.fire(new Kc(I.type,this._map,I))}touchend(I){this._map.fire(new Kc(I.type,this._map,I))}touchcancel(I){this._map.fire(new Kc(I.type,this._map,I))}_firePreventable(I){if(this._map.fire(I),I.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class sl{constructor(I){this._map=I}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(I){this._map.fire(new iu(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new iu("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new iu(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _u{constructor(I){this._map=I}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(I){return this.transform.pointLocation(t.P.convert(I),this._map.terrain)}}class Pu{constructor(I,ie){this._map=I,this._tr=new _u(I),this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=ie.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(I,ie){this.isEnabled()&&I.shiftKey&&I.button===0&&(n.disableDrag(),this._startPos=this._lastPos=ie,this._active=!0)}mousemoveWindow(I,ie){if(!this._active)return;let Te=ie;if(this._lastPos.equals(Te)||!this._box&&Te.dist(this._startPos)ze.fitScreenCoordinates(Te,Me,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",I)}keydown(I){this._active&&I.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",I))}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(I,ie){return this._map.fire(new t.k(I,{originalEvent:ie}))}}function Cf(Oe,I){if(Oe.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Oe.length}, points ${I.length}`);let ie={};for(let Te=0;Tethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),Te.length===this.numTouches&&(this.centroid=function(Me){let ze=new t.P(0,0);for(let ht of Me)ze._add(ht);return ze.div(Me.length)}(ie),this.touches=Cf(Te,ie)))}touchmove(I,ie,Te){if(this.aborted||!this.centroid)return;let Me=Cf(Te,ie);for(let ze in this.touches){let ht=Me[ze];(!ht||ht.dist(this.touches[ze])>30)&&(this.aborted=!0)}}touchend(I,ie,Te){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),Te.length===0){let Me=!this.aborted&&this.centroid;if(this.reset(),Me)return Me}}}class uf{constructor(I){this.singleTap=new hl(I),this.numTaps=I.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(I,ie,Te){this.singleTap.touchstart(I,ie,Te)}touchmove(I,ie,Te){this.singleTap.touchmove(I,ie,Te)}touchend(I,ie,Te){let Me=this.singleTap.touchend(I,ie,Te);if(Me){let ze=I.timeStamp-this.lastTime<500,ht=!this.lastTap||this.lastTap.dist(Me)<30;if(ze&&ht||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=Me,this.count===this.numTaps)return this.reset(),Me}}}class kc{constructor(I){this._tr=new _u(I),this._zoomIn=new uf({numTouches:1,numTaps:2}),this._zoomOut=new uf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(I,ie,Te){this._zoomIn.touchstart(I,ie,Te),this._zoomOut.touchstart(I,ie,Te)}touchmove(I,ie,Te){this._zoomIn.touchmove(I,ie,Te),this._zoomOut.touchmove(I,ie,Te)}touchend(I,ie,Te){let Me=this._zoomIn.touchend(I,ie,Te),ze=this._zoomOut.touchend(I,ie,Te),ht=this._tr;return Me?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:wt=>wt.easeTo({duration:300,zoom:ht.zoom+1,around:ht.unproject(Me)},{originalEvent:I})}):ze?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:wt=>wt.easeTo({duration:300,zoom:ht.zoom-1,around:ht.unproject(ze)},{originalEvent:I})}):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(I){this._enabled=!!I.enable,this._moveStateManager=I.moveStateManager,this._clickTolerance=I.clickTolerance||1,this._moveFunction=I.move,this._activateOnStart=!!I.activateOnStart,I.assignEvents(this),this.reset()}reset(I){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(I)}_move(...I){let ie=this._moveFunction(...I);if(ie.bearingDelta||ie.pitchDelta||ie.around||ie.panDelta)return this._active=!0,ie}dragStart(I,ie){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(I)&&(this._moveStateManager.startMove(I),this._lastPoint=ie.length?ie[0]:ie,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(I,ie){if(!this.isEnabled())return;let Te=this._lastPoint;if(!Te)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let Me=ie.length?ie[0]:ie;return!this._moved&&Me.dist(Te){Oe.mousedown=Oe.dragStart,Oe.mousemoveWindow=Oe.dragMove,Oe.mouseup=Oe.dragEnd,Oe.contextmenu=I=>{I.preventDefault()}},nu=({enable:Oe,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let Te=new Wu({checkCorrectEvent:Me=>n.mouseButton(Me)===0&&Me.ctrlKey||n.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({bearingDelta:(ze.x-Me.x)*ie}),moveStateManager:Te,enable:Oe,assignEvents:Lf})},Vf=({enable:Oe,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let Te=new Wu({checkCorrectEvent:Me=>n.mouseButton(Me)===0&&Me.ctrlKey||n.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({pitchDelta:(ze.y-Me.y)*ie}),moveStateManager:Te,enable:Oe,assignEvents:Lf})};class Xu{constructor(I,ie){this._clickTolerance=I.clickTolerance||1,this._map=ie,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(I){return I<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(I,ie,Te){return this._calculateTransform(I,ie,Te)}touchmove(I,ie,Te){if(this._active){if(!this._shouldBePrevented(Te.length))return I.preventDefault(),this._calculateTransform(I,ie,Te);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ie,Te){this._calculateTransform(I,ie,Te),this._active&&this._shouldBePrevented(Te.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ie,Te){Te.length>0&&(this._active=!0);let Me=Cf(Te,ie),ze=new t.P(0,0),ht=new t.P(0,0),wt=0;for(let $t in Me){let Tr=Me[$t],Sr=this._touches[$t];Sr&&(ze._add(Tr),ht._add(Tr.sub(Sr)),wt++,Me[$t]=Tr)}if(this._touches=Me,this._shouldBePrevented(wt)||!ht.mag())return;let Ot=ht.div(wt);return this._sum._add(Ot),this._sum.mag()Math.abs(Oe.x)}class Pc extends Cc{constructor(I){super(),this._currentTouchCount=0,this._map=I}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(I,ie,Te){super.touchstart(I,ie,Te),this._currentTouchCount=Te.length}_start(I){this._lastPoints=I,sc(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ie,Te){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Me=I[0].sub(this._lastPoints[0]),ze=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Me,ze,Te.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(Me.y+ze.y)/2*-.5}):void 0}gestureBeginsVertically(I,ie,Te){if(this._valid!==void 0)return this._valid;let Me=I.mag()>=2,ze=ie.mag()>=2;if(!Me&&!ze)return;if(!Me||!ze)return this._firstMove===void 0&&(this._firstMove=Te),Te-this._firstMove<100&&void 0;let ht=I.y>0==ie.y>0;return sc(I)&&sc(ie)&&ht}}let Qt={panStep:100,bearingStep:15,pitchStep:10};class xr{constructor(I){this._tr=new _u(I);let ie=Qt;this._panStep=ie.panStep,this._bearingStep=ie.bearingStep,this._pitchStep=ie.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(I){if(I.altKey||I.ctrlKey||I.metaKey)return;let ie=0,Te=0,Me=0,ze=0,ht=0;switch(I.keyCode){case 61:case 107:case 171:case 187:ie=1;break;case 189:case 109:case 173:ie=-1;break;case 37:I.shiftKey?Te=-1:(I.preventDefault(),ze=-1);break;case 39:I.shiftKey?Te=1:(I.preventDefault(),ze=1);break;case 38:I.shiftKey?Me=1:(I.preventDefault(),ht=-1);break;case 40:I.shiftKey?Me=-1:(I.preventDefault(),ht=1);break;default:return}return this._rotationDisabled&&(Te=0,Me=0),{cameraAnimation:wt=>{let Ot=this._tr;wt.easeTo({duration:300,easeId:"keyboardHandler",easing:aa,zoom:ie?Math.round(Ot.zoom)+ie*(I.shiftKey?2:1):Ot.zoom,bearing:Ot.bearing+Te*this._bearingStep,pitch:Ot.pitch+Me*this._pitchStep,offset:[-ze*this._panStep,-ht*this._panStep],center:Ot.center},{originalEvent:I})}}}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 aa(Oe){return Oe*(2-Oe)}let $r=4.000244140625;class ka{constructor(I,ie){this._onTimeout=Te=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Te)},this._map=I,this._tr=new _u(I),this._triggerRenderFrame=ie,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(I){this._defaultZoomRate=I}setWheelZoomRate(I){this._wheelZoomRate=I}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!I&&I.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(I){return!!this._map.cooperativeGestures.isEnabled()&&!(I.ctrlKey||this._map.cooperativeGestures.isBypassed(I))}wheel(I){if(!this.isEnabled())return;if(this._shouldBePrevented(I))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",I);let ie=I.deltaMode===WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,Te=i.now(),Me=Te-(this._lastWheelEventTime||0);this._lastWheelEventTime=Te,ie!==0&&ie%$r==0?this._type="wheel":ie!==0&&Math.abs(ie)<4?this._type="trackpad":Me>400?(this._type=null,this._lastValue=ie,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(Me*ie)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ie+=this._lastValue)),I.shiftKey&&ie&&(ie/=4),this._type&&(this._lastWheelEvent=I,this._delta-=ie,this._active||this._start(I)),I.preventDefault()}_start(I){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 ie=n.mousePos(this._map.getCanvas(),I),Te=this._tr;this._around=ie.y>Te.transform.height/2-Te.transform.getHorizon()?t.N.convert(this._aroundCenter?Te.center:Te.unproject(ie)):t.N.convert(Te.center),this._aroundPoint=Te.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let I=this._tr.transform;if(this._delta!==0){let Ot=this._type==="wheel"&&Math.abs(this._delta)>$r?this._wheelZoomRate:this._defaultZoomRate,$t=2/(1+Math.exp(-Math.abs(this._delta*Ot)));this._delta<0&&$t!==0&&($t=1/$t);let Tr=typeof this._targetZoom=="number"?I.zoomScale(this._targetZoom):I.scale;this._targetZoom=Math.min(I.maxZoom,Math.max(I.minZoom,I.scaleZoom(Tr*$t))),this._type==="wheel"&&(this._startZoom=I.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ie=typeof this._targetZoom=="number"?this._targetZoom:I.zoom,Te=this._startZoom,Me=this._easing,ze,ht=!1,wt=i.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Te&&Me&&wt){let Ot=Math.min(wt/200,1),$t=Me(Ot);ze=t.y.number(Te,ie,$t),Ot<1?this._frameId||(this._frameId=!0):ht=!0}else ze=ie,ht=!0;return this._active=!0,ht&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ht,zoomDelta:ze-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ie=t.b9;if(this._prevEase){let Te=this._prevEase,Me=(i.now()-Te.start)/Te.duration,ze=Te.easing(Me+.01)-Te.easing(Me),ht=.27/Math.sqrt(ze*ze+1e-4)*.01,wt=Math.sqrt(.0729-ht*ht);ie=t.b8(ht,wt,.25,1)}return this._prevEase={start:i.now(),duration:I,easing:ie},ie}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class li{constructor(I,ie){this._clickZoom=I,this._tapZoom=ie}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 Ci{constructor(I){this._tr=new _u(I),this.reset()}reset(){this._active=!1}dblclick(I,ie){return I.preventDefault(),{cameraAnimation:Te=>{Te.easeTo({duration:300,zoom:this._tr.zoom+(I.shiftKey?-1:1),around:this._tr.unproject(ie)},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hi{constructor(){this._tap=new uf({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(I,ie,Te){if(!this._swipePoint)if(this._tapTime){let Me=ie[0],ze=I.timeStamp-this._tapTime<500,ht=this._tapPoint.dist(Me)<30;ze&&ht?Te.length>0&&(this._swipePoint=Me,this._swipeTouch=Te[0].identifier):this.reset()}else this._tap.touchstart(I,ie,Te)}touchmove(I,ie,Te){if(this._tapTime){if(this._swipePoint){if(Te[0].identifier!==this._swipeTouch)return;let Me=ie[0],ze=Me.y-this._swipePoint.y;return this._swipePoint=Me,I.preventDefault(),this._active=!0,{zoomDelta:ze/128}}}else this._tap.touchmove(I,ie,Te)}touchend(I,ie,Te){if(this._tapTime)this._swipePoint&&Te.length===0&&this.reset();else{let Me=this._tap.touchend(I,ie,Te);Me&&(this._tapTime=I.timeStamp,this._tapPoint=Me)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Qi{constructor(I,ie,Te){this._el=I,this._mousePan=ie,this._touchPan=Te}enable(I){this._inertiaOptions=I||{},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 pn{constructor(I,ie,Te){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ie,this._mousePitch=Te}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 Pi{constructor(I,ie,Te,Me){this._el=I,this._touchZoom=ie,this._touchRotate=Te,this._tapDragZoom=Me,this._rotationDisabled=!1,this._enabled=!0}enable(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),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 Di{constructor(I,ie){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=I,this._options=ie,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let I=this._map.getCanvasContainer();I.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",I);let ie=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ie=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Te=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Me=document.createElement("div");Me.className="maplibregl-desktop-message",Me.textContent=ie,this._container.appendChild(Me);let ze=document.createElement("div");ze.className="maplibregl-mobile-message",ze.textContent=Te,this._container.appendChild(ze),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(I){return I[this._bypassKey]}notifyGestureBlocked(I,ie){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:I,originalEvent:ie})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Ni=Oe=>Oe.zoom||Oe.drag||Oe.pitch||Oe.rotate;class mi extends t.k{}function Sn(Oe){return Oe.panDelta&&Oe.panDelta.mag()||Oe.zoomDelta||Oe.bearingDelta||Oe.pitchDelta}class Qn{constructor(I,ie){this.handleWindowEvent=Me=>{this.handleEvent(Me,`${Me.type}Window`)},this.handleEvent=(Me,ze)=>{if(Me.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ht=Me.type==="renderFrame"?void 0:Me,wt={needsRenderFrame:!1},Ot={},$t={},Tr=Me.touches,Sr=Tr?this._getMapTouches(Tr):void 0,Kr=Sr?n.touchPos(this._map.getCanvas(),Sr):n.mousePos(this._map.getCanvas(),Me);for(let{handlerName:$e,handler:lt,allowed:pt}of this._handlers){if(!lt.isEnabled())continue;let Et;this._blockedByActive($t,pt,$e)?lt.reset():lt[ze||Me.type]&&(Et=lt[ze||Me.type](Me,Kr,Sr),this.mergeHandlerResult(wt,Ot,Et,$e,ht),Et&&Et.needsRenderFrame&&this._triggerRenderFrame()),(Et||lt.isActive())&&($t[$e]=lt)}let na={};for(let $e in this._previousActiveHandlers)$t[$e]||(na[$e]=ht);this._previousActiveHandlers=$t,(Object.keys(na).length||Sn(wt))&&(this._changes.push([wt,Ot,na]),this._triggerRenderFrame()),(Object.keys($t).length||Sn(wt))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:qe}=wt;qe&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],qe(this._map))},this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new vf(I),this._bearingSnap=ie.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ie);let 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],[document,"mousemove",{capture:!0}],[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],[window,"blur",void 0]];for(let[Me,ze,ht]of this._listeners)n.addEventListener(Me,ze,Me===document?this.handleWindowEvent:this.handleEvent,ht)}destroy(){for(let[I,ie,Te]of this._listeners)n.removeEventListener(I,ie,I===document?this.handleWindowEvent:this.handleEvent,Te)}_addDefaultHandlers(I){let ie=this._map,Te=ie.getCanvasContainer();this._add("mapEvent",new mf(ie,I));let Me=ie.boxZoom=new Pu(ie,I);this._add("boxZoom",Me),I.interactive&&I.boxZoom&&Me.enable();let ze=ie.cooperativeGestures=new Di(ie,I.cooperativeGestures);this._add("cooperativeGestures",ze),I.cooperativeGestures&&ze.enable();let ht=new kc(ie),wt=new Ci(ie);ie.doubleClickZoom=new li(wt,ht),this._add("tapZoom",ht),this._add("clickZoom",wt),I.interactive&&I.doubleClickZoom&&ie.doubleClickZoom.enable();let Ot=new Hi;this._add("tapDragZoom",Ot);let $t=ie.touchPitch=new Pc(ie);this._add("touchPitch",$t),I.interactive&&I.touchPitch&&ie.touchPitch.enable(I.touchPitch);let Tr=nu(I),Sr=Vf(I);ie.dragRotate=new pn(I,Tr,Sr),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Sr,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Et,clickTolerance:bt})=>{let Dt=new Wu({checkCorrectEvent:ur=>n.mouseButton(ur)===0&&!ur.ctrlKey});return new Hu({clickTolerance:bt,move:(ur,yr)=>({around:yr,panDelta:yr.sub(ur)}),activateOnStart:!0,moveStateManager:Dt,enable:Et,assignEvents:Lf})})(I),na=new Xu(I,ie);ie.dragPan=new Qi(Te,Kr,na),this._add("mousePan",Kr),this._add("touchPan",na,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ie.dragPan.enable(I.dragPan);let qe=new $c,$e=new xu;ie.touchZoomRotate=new Pi(Te,$e,qe,Ot),this._add("touchRotate",qe,["touchPan","touchZoom"]),this._add("touchZoom",$e,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ie.touchZoomRotate.enable(I.touchZoomRotate);let lt=ie.scrollZoom=new ka(ie,()=>this._triggerRenderFrame());this._add("scrollZoom",lt,["mousePan"]),I.interactive&&I.scrollZoom&&ie.scrollZoom.enable(I.scrollZoom);let pt=ie.keyboard=new xr(ie);this._add("keyboard",pt),I.interactive&&I.keyboard&&ie.keyboard.enable(),this._add("blockableMapEvent",new sl(ie))}_add(I,ie,Te){this._handlers.push({handlerName:I,handler:ie,allowed:Te}),this._handlersById[I]=ie}stop(I){if(!this._updatingCamera){for(let{handler:ie}of this._handlers)ie.reset();this._inertia.clear(),this._fireEvents({},{},I),this._changes=[]}}isActive(){for(let{handler:I}of this._handlers)if(I.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ni(this._eventsInProgress)||this.isZooming()}_blockedByActive(I,ie,Te){for(let Me in I)if(Me!==Te&&(!ie||ie.indexOf(Me)<0))return!0;return!1}_getMapTouches(I){let ie=[];for(let Te of I)this._el.contains(Te.target)&&ie.push(Te);return ie}mergeHandlerResult(I,ie,Te,Me,ze){if(!Te)return;t.e(I,Te);let ht={handlerName:Me,originalEvent:Te.originalEvent||ze};Te.zoomDelta!==void 0&&(ie.zoom=ht),Te.panDelta!==void 0&&(ie.drag=ht),Te.pitchDelta!==void 0&&(ie.pitch=ht),Te.bearingDelta!==void 0&&(ie.rotate=ht)}_applyChanges(){let I={},ie={},Te={};for(let[Me,ze,ht]of this._changes)Me.panDelta&&(I.panDelta=(I.panDelta||new t.P(0,0))._add(Me.panDelta)),Me.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+Me.zoomDelta),Me.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+Me.bearingDelta),Me.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+Me.pitchDelta),Me.around!==void 0&&(I.around=Me.around),Me.pinchAround!==void 0&&(I.pinchAround=Me.pinchAround),Me.noInertia&&(I.noInertia=Me.noInertia),t.e(ie,ze),t.e(Te,ht);this._updateMapTransform(I,ie,Te),this._changes=[]}_updateMapTransform(I,ie,Te){let Me=this._map,ze=Me._getTransformForUpdate(),ht=Me.terrain;if(!(Sn(I)||ht&&this._terrainMovement))return this._fireEvents(ie,Te,!0);let{panDelta:wt,zoomDelta:Ot,bearingDelta:$t,pitchDelta:Tr,around:Sr,pinchAround:Kr}=I;Kr!==void 0&&(Sr=Kr),Me._stop(!0),Sr=Sr||Me.transform.centerPoint;let na=ze.pointLocation(wt?Sr.sub(wt):Sr);$t&&(ze.bearing+=$t),Tr&&(ze.pitch+=Tr),Ot&&(ze.zoom+=Ot),ht?this._terrainMovement||!ie.drag&&!ie.zoom?ie.drag&&this._terrainMovement?ze.center=ze.pointLocation(ze.centerPoint.sub(wt)):ze.setLocationAtPoint(na,Sr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,ze.setLocationAtPoint(na,Sr)):ze.setLocationAtPoint(na,Sr),Me._applyUpdatedTransform(ze),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ie,Te,!0)}_fireEvents(I,ie,Te){let Me=Ni(this._eventsInProgress),ze=Ni(I),ht={};for(let Sr in I){let{originalEvent:Kr}=I[Sr];this._eventsInProgress[Sr]||(ht[`${Sr}start`]=Kr),this._eventsInProgress[Sr]=I[Sr]}!Me&&ze&&this._fireEvent("movestart",ze.originalEvent);for(let Sr in ht)this._fireEvent(Sr,ht[Sr]);ze&&this._fireEvent("move",ze.originalEvent);for(let Sr in I){let{originalEvent:Kr}=I[Sr];this._fireEvent(Sr,Kr)}let wt={},Ot;for(let Sr in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Sr];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Sr],Ot=ie[Kr]||na,wt[`${Sr}end`]=Ot)}for(let Sr in wt)this._fireEvent(Sr,wt[Sr]);let $t=Ni(this._eventsInProgress),Tr=(Me||ze)&&!$t;if(Tr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Sr=this._map._getTransformForUpdate();Sr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Sr)}if(Te&&Tr){this._updatingCamera=!0;let Sr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Kr=na=>na!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new mi("renderFrame",{timeStamp:I})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class io extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let Te=Math.min((i.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Te)),Te<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=I,this._bearingSnap=ie.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(I,ie){return this.jumpTo({center:I},ie)}panBy(I,ie,Te){return I=t.P.convert(I).mult(-1),this.panTo(this.transform.center,t.e({offset:I},ie),Te)}panTo(I,ie,Te){return this.easeTo(t.e({center:I},ie),Te)}getZoom(){return this.transform.zoom}setZoom(I,ie){return this.jumpTo({zoom:I},ie),this}zoomTo(I,ie,Te){return this.easeTo(t.e({zoom:I},ie),Te)}zoomIn(I,ie){return this.zoomTo(this.getZoom()+1,I,ie),this}zoomOut(I,ie){return this.zoomTo(this.getZoom()-1,I,ie),this}getBearing(){return this.transform.bearing}setBearing(I,ie){return this.jumpTo({bearing:I},ie),this}getPadding(){return this.transform.padding}setPadding(I,ie){return this.jumpTo({padding:I},ie),this}rotateTo(I,ie,Te){return this.easeTo(t.e({bearing:I},ie),Te)}resetNorth(I,ie){return this.rotateTo(0,t.e({duration:1e3},I),ie),this}resetNorthPitch(I,ie){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},I),ie),this}snapToNorth(I,ie){return Math.abs(this.getBearing()){if(this._zooming&&(Me.zoom=t.y.number(ze,lt,Er)),this._rotating&&(Me.bearing=t.y.number(ht,$t,Er)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,Er)),this._padding&&(Me.interpolatePadding(Ot,Sr,Er),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(Er),Dt)Me.setLocationAtPoint(Dt,ur);else{let jr=Me.zoomScale(Me.zoom-ze),Qr=lt>ze?Math.min(2,bt):Math.max(.5,bt),ha=Math.pow(Qr,1-Er),Aa=Me.unproject(pt.add(Et.mult(Er*ha)).mult(jr));Me.setLocationAtPoint(Me.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},Er=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,Er)},I),this}_prepareEase(I,ie,Te={}){this._moving=!0,ie||Te.moving||this.fire(new t.k("movestart",I)),this._zooming&&!Te.zooming&&this.fire(new t.k("zoomstart",I)),this._rotating&&!Te.rotating&&this.fire(new t.k("rotatestart",I)),this._pitching&&!Te.pitching&&this.fire(new t.k("pitchstart",I))}_prepareElevation(I){this._elevationCenter=I,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(I,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(I){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ie=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(I<1&&ie!==this._elevationTarget){let Te=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(Te-(ie-(Te*I+this._elevationStart))/(1-I)),this._elevationTarget=ie}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,I)}_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(I){let ie=I.getCameraPosition(),Te=this.terrain.getElevationForLngLatZoom(ie.lngLat,I.zoom);if(ie.altitudethis._elevateCameraIfInsideTerrain(Me)),this.transformCameraUpdate&&ie.push(Me=>this.transformCameraUpdate(Me)),!ie.length)return;let Te=I.clone();for(let Me of ie){let ze=Te.clone(),{center:ht,zoom:wt,pitch:Ot,bearing:$t,elevation:Tr}=Me(ze);ht&&(ze.center=ht),wt!==void 0&&(ze.zoom=wt),Ot!==void 0&&(ze.pitch=Ot),$t!==void 0&&(ze.bearing=$t),Tr!==void 0&&(ze.elevation=Tr),Te.apply(ze)}this.transform.apply(Te)}_fireMoveEvents(I){this.fire(new t.k("move",I)),this._zooming&&this.fire(new t.k("zoom",I)),this._rotating&&this.fire(new t.k("rotate",I)),this._pitching&&this.fire(new t.k("pitch",I))}_afterEase(I,ie){if(this._easeId&&ie&&this._easeId===ie)return;delete this._easeId;let Te=this._zooming,Me=this._rotating,ze=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Te&&this.fire(new t.k("zoomend",I)),Me&&this.fire(new t.k("rotateend",I)),ze&&this.fire(new t.k("pitchend",I)),this.fire(new t.k("moveend",I))}flyTo(I,ie){var Te;if(!I.essential&&i.prefersReducedMotion){let on=t.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(on,ie)}this.stop(),I=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},I);let Me=this._getTransformForUpdate(),ze=Me.zoom,ht=Me.bearing,wt=Me.pitch,Ot=Me.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,ht):ht,Tr="pitch"in I?+I.pitch:wt,Sr="padding"in I?I.padding:Me.padding,Kr=t.P.convert(I.offset),na=Me.centerPoint.add(Kr),qe=Me.pointLocation(na),{center:$e,zoom:lt}=Me.getConstrained(t.N.convert(I.center||qe),(Te=I.zoom)!==null&&Te!==void 0?Te:ze);this._normalizeCenter($e,Me);let pt=Me.zoomScale(lt-ze),Et=Me.project(qe),bt=Me.project($e).sub(Et),Dt=I.curve,ur=Math.max(Me.width,Me.height),yr=ur/pt,Er=bt.mag();if("minZoom"in I){let on=t.ac(Math.min(I.minZoom,ze,lt),Me.minZoom,Me.maxZoom),An=ur/Me.zoomScale(on-ze);Dt=Math.sqrt(An/Er*2)}let jr=Dt*Dt;function Qr(on){let An=(yr*yr-ur*ur+(on?-1:1)*jr*jr*Er*Er)/(2*(on?yr:ur)*jr*Er);return Math.log(Math.sqrt(An*An+1)-An)}function ha(on){return(Math.exp(on)-Math.exp(-on))/2}function Aa(on){return(Math.exp(on)+Math.exp(-on))/2}let Da=Qr(!1),ci=function(on){return Aa(Da)/Aa(Da+Dt*on)},Vi=function(on){return ur*((Aa(Da)*(ha(An=Da+Dt*on)/Aa(An))-ha(Da))/jr)/Er;var An},ji=(Qr(!0)-Da)/Dt;if(Math.abs(Er)<1e-6||!isFinite(ji)){if(Math.abs(ur-yr)<1e-6)return this.easeTo(I,ie);let on=yr0,ci=An=>Math.exp(on*Dt*An)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/Dt:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=ht!==$t,this._pitching=Tr!==wt,this._padding=!Me.isPaddingEqual(Sr),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation($e),this._ease(on=>{let An=on*ji,Kn=1/ci(An);Me.zoom=on===1?lt:ze+Me.scaleZoom(Kn),this._rotating&&(Me.bearing=t.y.number(ht,$t,on)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,on)),this._padding&&(Me.interpolatePadding(Ot,Sr,on),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(on);let Bn=on===1?$e:Me.unproject(Et.add(bt.mult(Vi(An))).mult(Kn));Me.setLocationAtPoint(Me.renderWorldCopies?Bn.wrap():Bn,na),this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},()=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie)},I),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(I,ie){var Te;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Me=this._onEaseEnd;delete this._onEaseEnd,Me.call(this,ie)}return I||(Te=this.handlers)===null||Te===void 0||Te.stop(!1),this}_ease(I,ie,Te){Te.animate===!1||Te.duration===0?(I(1),ie()):(this._easeStart=i.now(),this._easeOptions=Te,this._onEaseFrame=I,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ie){I=t.b3(I,-180,180);let Te=Math.abs(I-ie);return Math.abs(I-360-ie)180?-360:Te<-180?360:0}queryTerrainElevation(I){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(I),this.transform.tileZoom)-this.transform.elevation:null}}let eo={compact:!0,customAttribution:'MapLibre'};class co{constructor(I=eo){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=ie=>{!ie||ie.sourceDataType!=="metadata"&&ie.sourceDataType!=="visibility"&&ie.dataType!=="style"&&ie.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=I}getDefaultPosition(){return"bottom-right"}onAdd(I){return this._map=I,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(I,ie){let Te=this._map._getUIString(`AttributionControl.${ie}`);I.title=Te,I.setAttribute("aria-label",Te)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(Me=>typeof Me!="string"?"":Me)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let Me=this._map.style.stylesheet;this.styleOwner=Me.owner,this.styleId=Me.id}let ie=this._map.style.sourceCaches;for(let Me in ie){let ze=ie[Me];if(ze.used||ze.usedForTerrain){let ht=ze.getSource();ht.attribution&&I.indexOf(ht.attribution)<0&&I.push(ht.attribution)}}I=I.filter(Me=>String(Me).trim()),I.sort((Me,ze)=>Me.length-ze.length),I=I.filter((Me,ze)=>{for(let ht=ze+1;ht=0)return!1;return!0});let Te=I.join(" | ");Te!==this._attribHTML&&(this._attribHTML=Te,I.length?(this._innerContainer.innerHTML=Te,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Tn{constructor(I={}){this._updateCompact=()=>{let ie=this._container.children;if(ie.length){let Te=ie[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Te.classList.add("maplibregl-compact"):Te.classList.remove("maplibregl-compact")}},this.options=I}getDefaultPosition(){return"bottom-left"}onAdd(I){this._map=I,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");let ie=n.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),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(I){let ie=++this._id;return this._queue.push({callback:I,id:ie,cancelled:!1}),ie}remove(I){let ie=this._currentlyRunning,Te=ie?this._queue.concat(ie):this._queue;for(let Me of Te)if(Me.id===I)return void(Me.cancelled=!0)}run(I=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ie=this._currentlyRunning=this._queue;this._queue=[];for(let Te of ie)if(!Te.cancelled&&(Te.callback(I),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var yo=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Qo extends t.E{constructor(I){super(),this.sourceCache=I,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,I.usedForTerrain=!0,I.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(I,ie){this.sourceCache.update(I,ie),this._renderableTilesKeys=[];let Te={};for(let Me of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ie}))Te[Me.key]=!0,this._renderableTilesKeys.push(Me.key),this._tiles[Me.key]||(Me.posMatrix=new Float64Array(16),t.aP(Me.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Me.key]=new rt(Me,this.tileSize));for(let Me in this._tiles)Te[Me]||delete this._tiles[Me]}freeRtt(I){for(let ie in this._tiles){let Te=this._tiles[ie];(!I||Te.tileID.equals(I)||Te.tileID.isChildOf(I)||I.isChildOf(Te.tileID))&&(Te.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ie={};for(let Te of this._renderableTilesKeys){let Me=this._tiles[Te].tileID;if(Me.canonical.equals(I.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16),t.aP(ze.posMatrix,0,t.X,0,t.X,0,1),ie[Te]=ze}else if(Me.canonical.isChildOf(I.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16);let ht=Me.canonical.z-I.canonical.z,wt=Me.canonical.x-(Me.canonical.x>>ht<>ht<>ht;t.aP(ze.posMatrix,0,$t,0,$t,0,1),t.J(ze.posMatrix,ze.posMatrix,[-wt*$t,-Ot*$t,0]),ie[Te]=ze}else if(I.canonical.isChildOf(Me.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16);let ht=I.canonical.z-Me.canonical.z,wt=I.canonical.x-(I.canonical.x>>ht<>ht<>ht;t.aP(ze.posMatrix,0,t.X,0,t.X,0,1),t.J(ze.posMatrix,ze.posMatrix,[wt*$t,Ot*$t,0]),t.K(ze.posMatrix,ze.posMatrix,[1/2**ht,1/2**ht,0]),ie[Te]=ze}}return ie}getSourceTile(I,ie){let Te=this.sourceCache._source,Me=I.overscaledZ-this.deltaZoom;if(Me>Te.maxzoom&&(Me=Te.maxzoom),Me=Te.minzoom&&(!ze||!ze.dem);)ze=this.sourceCache.getTileByID(I.scaledTo(Me--).key);return ze}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ie=>ie.timeAdded>=I)}}class ks{constructor(I,ie,Te){this.painter=I,this.sourceCache=new Qo(ie),this.options=Te,this.exaggeration=typeof Te.exaggeration=="number"?Te.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ie,Te,Me=t.X){var ze;if(!(ie>=0&&ie=0&&TeI.canonical.z&&(I.canonical.z>=Me?ze=I.canonical.z-Me:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ht=I.canonical.x-(I.canonical.x>>ze<>ze<>8<<4|ze>>8,ie[ht+3]=0;let Te=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ie.buffer)),Me=new u(I,Te,I.gl.RGBA,{premultiply:!1});return Me.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=Me,Me}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ie=new Uint8Array(4),Te=this.painter.context,Me=Te.gl,ze=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),ht=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),wt=Math.round(this.painter.height/devicePixelRatio);Te.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Me.readPixels(ze,wt-ht-1,1,1,Me.RGBA,Me.UNSIGNED_BYTE,ie),Te.bindFramebuffer.set(null);let Ot=ie[0]+(ie[2]>>4<<8),$t=ie[1]+((15&ie[2])<<8),Tr=this.coordsIndex[255-ie[3]],Sr=Tr&&this.sourceCache.getTileByID(Tr);if(!Sr)return null;let Kr=this._coordsTextureSize,na=(1<I.id!==ie),this._recentlyUsed.push(I.id)}stampObject(I){I.stamp=++this._stamp}getOrCreateFreeObject(){for(let ie of this._recentlyUsed)if(!this._objects[ie].inUse)return this._objects[ie];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let I=this._createObject(this._objects.length);return this._objects.push(I),I}freeObject(I){I.inUse=!1}freeAllObjects(){for(let I of this._objects)this.freeObject(I)}isFull(){return!(this._objects.length!I.inUse)===!1}}let Ns={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class el{constructor(I,ie){this.painter=I,this.terrain=ie,this.pool=new rl(I.context,30,ie.sourceCache.tileSize*ie.qualityFactor)}destruct(){this.pool.destruct()}getTexture(I){return this.pool.getObjectForId(I.rtt[this._stacks.length-1].id).texture}prepareForRender(I,ie){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=I._order.filter(Te=>!I._layers[Te].isHidden(ie)),this._coordsDescendingInv={};for(let Te in I.sourceCaches){this._coordsDescendingInv[Te]={};let Me=I.sourceCaches[Te].getVisibleCoordinates();for(let ze of Me){let ht=this.terrain.sourceCache.getTerrainCoords(ze);for(let wt in ht)this._coordsDescendingInv[Te][wt]||(this._coordsDescendingInv[Te][wt]=[]),this._coordsDescendingInv[Te][wt].push(ht[wt])}}this._coordsDescendingInvStr={};for(let Te of I._order){let Me=I._layers[Te],ze=Me.source;if(Ns[Me.type]&&!this._coordsDescendingInvStr[ze]){this._coordsDescendingInvStr[ze]={};for(let ht in this._coordsDescendingInv[ze])this._coordsDescendingInvStr[ze][ht]=this._coordsDescendingInv[ze][ht].map(wt=>wt.key).sort().join()}}for(let Te of this._renderableTiles)for(let Me in this._coordsDescendingInvStr){let ze=this._coordsDescendingInvStr[Me][Te.tileID.key];ze&&ze!==Te.rttCoords[Me]&&(Te.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ie=I.type,Te=this.painter,Me=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Ns[ie]&&(this._prevType&&Ns[this._prevType]||this._stacks.push([]),this._prevType=ie,this._stacks[this._stacks.length-1].push(I.id),!Me))return!0;if(Ns[this._prevType]||Ns[ie]&&Me){this._prevType=ie;let ze=this._stacks.length-1,ht=this._stacks[ze]||[];for(let wt of this._renderableTiles){if(this.pool.isFull()&&(ml(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(wt),wt.rtt[ze]){let $t=this.pool.getObjectForId(wt.rtt[ze].id);if($t.stamp===wt.rtt[ze].stamp){this.pool.useObject($t);continue}}let Ot=this.pool.getOrCreateFreeObject();this.pool.useObject(Ot),this.pool.stampObject(Ot),wt.rtt[ze]={id:Ot.id,stamp:Ot.stamp},Te.context.bindFramebuffer.set(Ot.fbo.framebuffer),Te.context.clear({color:t.aM.transparent,stencil:0}),Te.currentStencilSource=void 0;for(let $t=0;$t{Oe.touchstart=Oe.dragStart,Oe.touchmoveWindow=Oe.dragMove,Oe.touchend=Oe.dragEnd},Un={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ro{constructor(I,ie,Te=!1){this.mousedown=ht=>{this.startMouse(t.e({},ht,{ctrlKey:!0,preventDefault:()=>ht.preventDefault()}),n.mousePos(this.element,ht)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ht=>{this.moveMouse(ht,n.mousePos(this.element,ht))},this.mouseup=ht=>{this.mouseRotate.dragEnd(ht),this.mousePitch&&this.mousePitch.dragEnd(ht),this.offTemp()},this.touchstart=ht=>{ht.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,ht.targetTouches)[0],this.startTouch(ht,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=ht=>{ht.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,ht.targetTouches)[0],this.moveTouch(ht,this._lastPos))},this.touchend=ht=>{ht.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){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 Me=I.dragRotate._mouseRotate.getClickTolerance(),ze=I.dragRotate._mousePitch.getClickTolerance();this.element=ie,this.mouseRotate=nu({clickTolerance:Me,enable:!0}),this.touchRotate=(({enable:ht,clickTolerance:wt,bearingDegreesPerPixelMoved:Ot=.8})=>{let $t=new Jc;return new Hu({clickTolerance:wt,move:(Tr,Sr)=>({bearingDelta:(Sr.x-Tr.x)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:Me,enable:!0}),this.map=I,Te&&(this.mousePitch=Vf({clickTolerance:ze,enable:!0}),this.touchPitch=(({enable:ht,clickTolerance:wt,pitchDegreesPerPixelMoved:Ot=-.5})=>{let $t=new Jc;return new Hu({clickTolerance:wt,move:(Tr,Sr)=>({pitchDelta:(Sr.y-Tr.y)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:ze,enable:!0})),n.addEventListener(ie,"mousedown",this.mousedown),n.addEventListener(ie,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(ie,"touchcancel",this.reset)}startMouse(I,ie){this.mouseRotate.dragStart(I,ie),this.mousePitch&&this.mousePitch.dragStart(I,ie),n.disableDrag()}startTouch(I,ie){this.touchRotate.dragStart(I,ie),this.touchPitch&&this.touchPitch.dragStart(I,ie),n.disableDrag()}moveMouse(I,ie){let Te=this.map,{bearingDelta:Me}=this.mouseRotate.dragMove(I,ie)||{};if(Me&&Te.setBearing(Te.getBearing()+Me),this.mousePitch){let{pitchDelta:ze}=this.mousePitch.dragMove(I,ie)||{};ze&&Te.setPitch(Te.getPitch()+ze)}}moveTouch(I,ie){let Te=this.map,{bearingDelta:Me}=this.touchRotate.dragMove(I,ie)||{};if(Me&&Te.setBearing(Te.getBearing()+Me),this.touchPitch){let{pitchDelta:ze}=this.touchPitch.dragMove(I,ie)||{};ze&&Te.setPitch(Te.getPitch()+ze)}}off(){let I=this.element;n.removeEventListener(I,"mousedown",this.mousedown),n.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(I,"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 Js;function Fs(Oe,I,ie){let Te=new t.N(Oe.lng,Oe.lat);if(Oe=new t.N(Oe.lng,Oe.lat),I){let Me=new t.N(Oe.lng-360,Oe.lat),ze=new t.N(Oe.lng+360,Oe.lat),ht=ie.locationPoint(Oe).distSqr(I);ie.locationPoint(Me).distSqr(I)180;){let Me=ie.locationPoint(Oe);if(Me.x>=0&&Me.y>=0&&Me.x<=ie.width&&Me.y<=ie.height)break;Oe.lng>ie.center.lng?Oe.lng-=360:Oe.lng+=360}return Oe.lng!==Te.lng&&ie.locationPoint(Oe).y>ie.height/2-ie.getHorizon()?Oe:Te}let cu={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(Oe,I,ie){let Te=Oe.classList;for(let Me in cu)Te.remove(`maplibregl-${ie}-anchor-${Me}`);Te.add(`maplibregl-${ie}-anchor-${I}`)}class Zu extends t.E{constructor(I){if(super(),this._onKeyPress=ie=>{let Te=ie.code,Me=ie.charCode||ie.keyCode;Te!=="Space"&&Te!=="Enter"&&Me!==32&&Me!==13||this.togglePopup()},this._onMapClick=ie=>{let Te=ie.originalEvent.target,Me=this._element;this._popup&&(Te===Me||Me.contains(Te))&&this.togglePopup()},this._update=ie=>{var Te;if(!this._map)return;let Me=this._map.loaded()&&!this._map.isMoving();(ie?.type==="terrain"||ie?.type==="render"&&!Me)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Fs(this._lngLat,this._flatPos,this._map.transform):(Te=this._lngLat)===null||Te===void 0?void 0:Te.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 ze="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ze=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(ze=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ht="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ht="rotateX(0deg)":this._pitchAlignment==="map"&&(ht=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ie&&ie.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${cu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ht} ${ze}`),i.frameAsync(new AbortController).then(()=>{this._updateOpacity(ie&&ie.type==="moveend")}).catch(()=>{})},this._onMove=ie=>{if(!this._isDragging){let Te=this._clickTolerance||this._map._clickTolerance;this._isDragging=ie.point.dist(this._pointerdownPos)>=Te}this._isDragging&&(this._pos=ie.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=ie=>{this._element.contains(ie.originalEvent.target)&&(ie.preventDefault(),this._positionDelta=ie.point.sub(this._pos).add(this._offset),this._pointerdownPos=ie.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=I&&I.anchor||"center",this._color=I&&I.color||"#3FB1CE",this._scale=I&&I.scale||1,this._draggable=I&&I.draggable||!1,this._clickTolerance=I&&I.clickTolerance||0,this._subpixelPositioning=I&&I.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=I&&I.rotation||0,this._rotationAlignment=I&&I.rotationAlignment||"auto",this._pitchAlignment=I&&I.pitchAlignment&&I.pitchAlignment!=="auto"?I.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(I?.opacity,I?.opacityWhenCovered),I&&I.element)this._element=I.element,this._offset=t.P.convert(I&&I.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");let ie=n.createNS("http://www.w3.org/2000/svg","svg"),Te=41,Me=27;ie.setAttributeNS(null,"display","block"),ie.setAttributeNS(null,"height",`${Te}px`),ie.setAttributeNS(null,"width",`${Me}px`),ie.setAttributeNS(null,"viewBox",`0 0 ${Me} ${Te}`);let ze=n.createNS("http://www.w3.org/2000/svg","g");ze.setAttributeNS(null,"stroke","none"),ze.setAttributeNS(null,"stroke-width","1"),ze.setAttributeNS(null,"fill","none"),ze.setAttributeNS(null,"fill-rule","evenodd");let ht=n.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"fill-rule","nonzero");let wt=n.createNS("http://www.w3.org/2000/svg","g");wt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),wt.setAttributeNS(null,"fill","#000000");let Ot=[{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 pt of Ot){let Et=n.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",pt.rx),Et.setAttributeNS(null,"ry",pt.ry),wt.appendChild(Et)}let $t=n.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let Tr=n.createNS("http://www.w3.org/2000/svg","path");Tr.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(Tr);let Sr=n.createNS("http://www.w3.org/2000/svg","g");Sr.setAttributeNS(null,"opacity","0.25"),Sr.setAttributeNS(null,"fill","#000000");let Kr=n.createNS("http://www.w3.org/2000/svg","path");Kr.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"),Sr.appendChild(Kr);let na=n.createNS("http://www.w3.org/2000/svg","g");na.setAttributeNS(null,"transform","translate(6.0, 7.0)"),na.setAttributeNS(null,"fill","#FFFFFF");let qe=n.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"transform","translate(8.0, 8.0)");let $e=n.createNS("http://www.w3.org/2000/svg","circle");$e.setAttributeNS(null,"fill","#000000"),$e.setAttributeNS(null,"opacity","0.25"),$e.setAttributeNS(null,"cx","5.5"),$e.setAttributeNS(null,"cy","5.5"),$e.setAttributeNS(null,"r","5.4999962");let lt=n.createNS("http://www.w3.org/2000/svg","circle");lt.setAttributeNS(null,"fill","#FFFFFF"),lt.setAttributeNS(null,"cx","5.5"),lt.setAttributeNS(null,"cy","5.5"),lt.setAttributeNS(null,"r","5.4999962"),qe.appendChild($e),qe.appendChild(lt),ht.appendChild(wt),ht.appendChild($t),ht.appendChild(Sr),ht.appendChild(na),ht.appendChild(qe),ie.appendChild(ht),ie.setAttributeNS(null,"height",Te*this._scale+"px"),ie.setAttributeNS(null,"width",Me*this._scale+"px"),this._element.appendChild(ie),this._offset=t.P.convert(I&&I.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ie=>{ie.preventDefault()}),this._element.addEventListener("mousedown",ie=>{ie.preventDefault()}),Iu(this._element,this._anchor,"marker"),I&&I.className)for(let ie of I.className.split(" "))this._element.classList.add(ie);this._popup=null}addTo(I){return this.remove(),this._map=I,this._element.setAttribute("aria-label",I._getUIString("Marker.Title")),I.getCanvasContainer().appendChild(this._element),I.on("move",this._update),I.on("moveend",this._update),I.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(I){return this._lngLat=t.N.convert(I),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(I){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),I){if(!("offset"in I.options)){let Me=Math.abs(13.5)/Math.SQRT2;I.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Me,-1*(38.1-13.5+Me)],"bottom-right":[-Me,-1*(38.1-13.5+Me)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=I,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(I){return this._subpixelPositioning=I,this}getPopup(){return this._popup}togglePopup(){let I=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:I?(I.isOpen()?I.remove():(I.setLngLat(this._lngLat),I.addTo(this._map)),this):this}_updateOpacity(I=!1){var ie,Te;if(!(!((ie=this._map)===null||ie===void 0)&&ie.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(I)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Me=this._map,ze=Me.terrain.depthAtPoint(this._pos),ht=Me.terrain.getElevationForLngLatZoom(this._lngLat,Me.transform.tileZoom);if(Me.transform.lngLatToCameraDepth(this._lngLat,ht)-ze<.006)return void(this._element.style.opacity=this._opacity);let wt=-this._offset.y/Me.transform._pixelPerMeter,Ot=Math.sin(Me.getPitch()*Math.PI/180)*wt,$t=Me.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),Tr=Me.transform.lngLatToCameraDepth(this._lngLat,ht+Ot)-$t>.006;!((Te=this._popup)===null||Te===void 0)&&Te.isOpen()&&Tr&&this._popup.remove(),this._element.style.opacity=Tr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(I){return this._offset=t.P.convert(I),this._update(),this}addClassName(I){this._element.classList.add(I)}removeClassName(I){this._element.classList.remove(I)}toggleClassName(I){return this._element.classList.toggle(I)}setDraggable(I){return this._draggable=!!I,this._map&&(I?(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(I){return this._rotation=I||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(I){return this._rotationAlignment=I||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(I){return this._pitchAlignment=I&&I!=="auto"?I:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(I,ie){return I===void 0&&ie===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),I!==void 0&&(this._opacity=I),ie!==void 0&&(this._opacityWhenCovered=ie),this._map&&this._updateOpacity(!0),this}}let Ic={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bu=0,Rc=!1,Au={maxWidth:100,unit:"metric"};function yc(Oe,I,ie){let Te=ie&&ie.maxWidth||100,Me=Oe._container.clientHeight/2,ze=Oe.unproject([0,Me]),ht=Oe.unproject([Te,Me]),wt=ze.distanceTo(ht);if(ie&&ie.unit==="imperial"){let Ot=3.2808*wt;Ot>5280?fo(I,Te,Ot/5280,Oe._getUIString("ScaleControl.Miles")):fo(I,Te,Ot,Oe._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?fo(I,Te,wt/1852,Oe._getUIString("ScaleControl.NauticalMiles")):wt>=1e3?fo(I,Te,wt/1e3,Oe._getUIString("ScaleControl.Kilometers")):fo(I,Te,wt,Oe._getUIString("ScaleControl.Meters"))}function fo(Oe,I,ie,Te){let Me=function(ze){let ht=Math.pow(10,`${Math.floor(ze)}`.length-1),wt=ze/ht;return wt=wt>=10?10:wt>=5?5:wt>=3?3:wt>=2?2:wt>=1?1:function(Ot){let $t=Math.pow(10,Math.ceil(-Math.log(Ot)/Math.LN10));return Math.round(Ot*$t)/$t}(wt),ht*wt}(ie);Oe.style.width=I*(Me/ie)+"px",Oe.innerHTML=`${Me} ${Te}`}let Fo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Dc=["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(Oe){if(Oe){if(typeof Oe=="number"){let I=Math.round(Math.abs(Oe)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Oe),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Oe),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Oe,0),right:new t.P(-Oe,0)}}if(Oe instanceof t.P||Array.isArray(Oe)){let I=t.P.convert(Oe);return{center:I,top:I,"top-left":I,"top-right":I,bottom:I,"bottom-left":I,"bottom-right":I,left:I,right:I}}return{center:t.P.convert(Oe.center||[0,0]),top:t.P.convert(Oe.top||[0,0]),"top-left":t.P.convert(Oe["top-left"]||[0,0]),"top-right":t.P.convert(Oe["top-right"]||[0,0]),bottom:t.P.convert(Oe.bottom||[0,0]),"bottom-left":t.P.convert(Oe["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Oe["bottom-right"]||[0,0]),left:t.P.convert(Oe.left||[0,0]),right:t.P.convert(Oe.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=Di,e.DoubleClickZoomHandler=li,e.DragPanHandler=Qi,e.DragRotateHandler=pn,e.EdgeInsets=yu,e.FullscreenControl=class extends t.E{constructor(Oe={}){super(),this._onFullscreenChange=()=>{var I;let ie=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((I=ie?.shadowRoot)===null||I===void 0)&&I.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Oe&&Oe.container&&(Oe.container instanceof HTMLElement?this._container=Oe.container: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(Oe){return this._map=Oe,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 Oe=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",Oe).setAttribute("aria-hidden","true"),Oe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Oe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Oe),this._fullscreenButton.title=Oe}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new 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=Pe,e.GeolocateControl=class extends t.E{constructor(Oe){super(),this._onSuccess=I=>{if(this._map){if(this._isOutOfMapMaxBounds(I))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",I)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=I,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(I),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(I),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",I)),this._finish()}},this._updateCamera=I=>{let ie=new t.N(I.coords.longitude,I.coords.latitude),Te=I.coords.accuracy,Me=this._map.getBearing(),ze=t.e({bearing:Me},this.options.fitBoundsOptions),ht=te.fromLngLat(ie,Te);this._map.fitBounds(ht,ze,{geolocateSource:!0})},this._updateMarker=I=>{if(I){let ie=new t.N(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(ie).addTo(this._map),this._userLocationDotMarker.setLngLat(ie).addTo(this._map),this._accuracy=I.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=I=>{if(this._map){if(this.options.trackUserLocation)if(I.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 ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&Rc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",I)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",I=>I.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=I=>{if(this._map){if(I===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}else{let ie=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}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",ie=>{ie.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ie.originalEvent&&ie.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({},Ic,Oe)}onAdd(Oe){return this._map=Oe,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,function*(I=!1){if(Js!==void 0&&!I)return Js;if(window.navigator.permissions===void 0)return Js=!!window.navigator.geolocation,Js;try{Js=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Js=!!window.navigator.geolocation}return Js})}().then(I=>this._finishSetupUI(I)),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,bu=0,Rc=!1}_isOutOfMapMaxBounds(Oe){let I=this._map.getMaxBounds(),ie=Oe.coords;return I&&(ie.longitudeI.getEast()||ie.latitudeI.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let Oe=this._map.getBounds(),I=Oe.getSouthEast(),ie=Oe.getNorthEast(),Te=I.distanceTo(ie),Me=Math.ceil(this._accuracy/(Te/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Me}px`,this._circleElement.style.height=`${Me}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":bu--,Rc=!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 Oe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Oe={maximumAge:6e5,timeout:0},Rc=!0):(Oe=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Oe)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=Qf,e.ImageSource=at,e.KeyboardHandler=xr,e.LngLatBounds=te,e.LogoControl=Tn,e.Map=class extends io{constructor(Oe){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},yl),Oe);if(I.minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Ml(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new un,this._controls=[],this._mapId=t.a4(),this._contextLost=ie=>{ie.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ie}))},this._contextRestored=ie=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ie}))},this._onMapScroll=ie=>{if(ie.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=I.preserveDrawingBuffer===!0,this._antialias=I.antialias===!0,this._trackResize=I.trackResize===!0,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles===!0,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions===!0,this._collectResourceTiming=I.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ss),I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=I.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new x(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.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 ie=!1,Te=qf(Me=>{this._trackResize&&!this._removed&&(this.resize(Me),this.redraw())},50);this._resizeObserver=new ResizeObserver(Me=>{ie?Te(Me):ie=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Qn(this,I),this._hash=I.hash&&new Qf(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,t.e({},I.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=I.localIdeographFontFamily,this._validateStyle=I.validateStyle,I.style&&this.setStyle(I.style,{localIdeographFontFamily:I.localIdeographFontFamily}),I.attributionControl&&this.addControl(new co(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new Tn,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ie=>{this._update(ie.dataType==="style"),this.fire(new t.k(`${ie.dataType}data`,ie))}),this.on("dataloading",ie=>{this.fire(new t.k(`${ie.dataType}dataloading`,ie))}),this.on("dataabort",ie=>{this.fire(new t.k("sourcedataabort",ie))})}_getMapId(){return this._mapId}addControl(Oe,I){if(I===void 0&&(I=Oe.getDefaultPosition?Oe.getDefaultPosition():"top-right"),!Oe||!Oe.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 ie=Oe.onAdd(this);this._controls.push(Oe);let Te=this._controlPositions[I];return I.indexOf("bottom")!==-1?Te.insertBefore(ie,Te.firstChild):Te.appendChild(ie),this}removeControl(Oe){if(!Oe||!Oe.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 I=this._controls.indexOf(Oe);return I>-1&&this._controls.splice(I,1),Oe.onRemove(this),this}hasControl(Oe){return this._controls.indexOf(Oe)>-1}calculateCameraOptionsFromTo(Oe,I,ie,Te){return Te==null&&this.terrain&&(Te=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Oe,I,ie,Te)}resize(Oe){var I;let ie=this._containerDimensions(),Te=ie[0],Me=ie[1],ze=this._getClampedPixelRatio(Te,Me);if(this._resizeCanvas(Te,Me,ze),this.painter.resize(Te,Me,ze),this.painter.overLimit()){let wt=this.painter.context.gl;this._maxCanvasSize=[wt.drawingBufferWidth,wt.drawingBufferHeight];let Ot=this._getClampedPixelRatio(Te,Me);this._resizeCanvas(Te,Me,Ot),this.painter.resize(Te,Me,Ot)}this.transform.resize(Te,Me),(I=this._requestedCameraState)===null||I===void 0||I.resize(Te,Me);let ht=!this._moving;return ht&&(this.stop(),this.fire(new t.k("movestart",Oe)).fire(new t.k("move",Oe))),this.fire(new t.k("resize",Oe)),ht&&this.fire(new t.k("moveend",Oe)),this}_getClampedPixelRatio(Oe,I){let{0:ie,1:Te}=this._maxCanvasSize,Me=this.getPixelRatio(),ze=Oe*Me,ht=I*Me;return Math.min(ze>ie?ie/ze:1,ht>Te?Te/ht:1)*Me}getPixelRatio(){var Oe;return(Oe=this._overridePixelRatio)!==null&&Oe!==void 0?Oe:devicePixelRatio}setPixelRatio(Oe){this._overridePixelRatio=Oe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Oe){return this.transform.setMaxBounds(te.convert(Oe)),this._update()}setMinZoom(Oe){if((Oe=Oe??-2)>=-2&&Oe<=this.transform.maxZoom)return this.transform.minZoom=Oe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Oe,this._update(),this.getZoom()>Oe&&this.setZoom(Oe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Oe){if((Oe=Oe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Oe>=0&&Oe<=this.transform.maxPitch)return this.transform.minPitch=Oe,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(Oe>=this.transform.minPitch)return this.transform.maxPitch=Oe,this._update(),this.getPitch()>Oe&&this.setPitch(Oe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Oe){return this.transform.renderWorldCopies=Oe,this._update()}project(Oe){return this.transform.locationPoint(t.N.convert(Oe),this.style&&this.terrain)}unproject(Oe){return this.transform.pointLocation(t.P.convert(Oe),this.terrain)}isMoving(){var Oe;return this._moving||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isMoving())}isZooming(){var Oe;return this._zooming||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isZooming())}isRotating(){var Oe;return this._rotating||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isRotating())}_createDelegatedListener(Oe,I,ie){if(Oe==="mouseenter"||Oe==="mouseover"){let Te=!1;return{layers:I,listener:ie,delegates:{mousemove:ze=>{let ht=I.filter(Ot=>this.getLayer(Ot)),wt=ht.length!==0?this.queryRenderedFeatures(ze.point,{layers:ht}):[];wt.length?Te||(Te=!0,ie.call(this,new iu(Oe,this,ze.originalEvent,{features:wt}))):Te=!1},mouseout:()=>{Te=!1}}}}if(Oe==="mouseleave"||Oe==="mouseout"){let Te=!1;return{layers:I,listener:ie,delegates:{mousemove:ht=>{let wt=I.filter(Ot=>this.getLayer(Ot));(wt.length!==0?this.queryRenderedFeatures(ht.point,{layers:wt}):[]).length?Te=!0:Te&&(Te=!1,ie.call(this,new iu(Oe,this,ht.originalEvent)))},mouseout:ht=>{Te&&(Te=!1,ie.call(this,new iu(Oe,this,ht.originalEvent)))}}}}{let Te=Me=>{let ze=I.filter(wt=>this.getLayer(wt)),ht=ze.length!==0?this.queryRenderedFeatures(Me.point,{layers:ze}):[];ht.length&&(Me.features=ht,ie.call(this,Me),delete Me.features)};return{layers:I,listener:ie,delegates:{[Oe]:Te}}}}_saveDelegatedListener(Oe,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Oe]=this._delegatedListeners[Oe]||[],this._delegatedListeners[Oe].push(I)}_removeDelegatedListener(Oe,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Oe])return;let Te=this._delegatedListeners[Oe];for(let Me=0;MeI.includes(ht))){for(let ht in ze.delegates)this.off(ht,ze.delegates[ht]);return void Te.splice(Me,1)}}}on(Oe,I,ie){if(ie===void 0)return super.on(Oe,I);let Te=this._createDelegatedListener(Oe,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Oe,Te);for(let Me in Te.delegates)this.on(Me,Te.delegates[Me]);return this}once(Oe,I,ie){if(ie===void 0)return super.once(Oe,I);let Te=typeof I=="string"?[I]:I,Me=this._createDelegatedListener(Oe,Te,ie);for(let ze in Me.delegates){let ht=Me.delegates[ze];Me.delegates[ze]=(...wt)=>{this._removeDelegatedListener(Oe,Te,ie),ht(...wt)}}this._saveDelegatedListener(Oe,Me);for(let ze in Me.delegates)this.once(ze,Me.delegates[ze]);return this}off(Oe,I,ie){return ie===void 0?super.off(Oe,I):(this._removeDelegatedListener(Oe,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Oe,I){if(!this.style)return[];let ie,Te=Oe instanceof t.P||Array.isArray(Oe),Me=Te?Oe:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(Te?{}:Oe)||{},Me instanceof t.P||typeof Me[0]=="number")ie=[t.P.convert(Me)];else{let ze=t.P.convert(Me[0]),ht=t.P.convert(Me[1]);ie=[ze,new t.P(ht.x,ze.y),ht,new t.P(ze.x,ht.y),ze]}return this.style.queryRenderedFeatures(ie,I,this.transform)}querySourceFeatures(Oe,I){return this.style.querySourceFeatures(Oe,I)}setStyle(Oe,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Oe?(this._diffStyle(Oe,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Oe,I))}setTransformRequest(Oe){return this._requestManager.setTransformRequest(Oe),this}_getUIString(Oe){let I=this._locale[Oe];if(I==null)throw new Error(`Missing UI string '${Oe}'`);return I}_updateStyle(Oe,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Oe,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Oe)),Oe?(this.style=new Rr(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Oe=="string"?this.style.loadURL(Oe,I,ie):this.style.loadJSON(Oe,I,ie),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Rr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Oe,I){if(typeof Oe=="string"){let ie=this._requestManager.transformRequest(Oe,"Style");t.h(ie,new AbortController).then(Te=>{this._updateDiff(Te.data,I)}).catch(Te=>{Te&&this.fire(new t.j(Te))})}else typeof Oe=="object"&&this._updateDiff(Oe,I)}_updateDiff(Oe,I){try{this.style.setState(Oe,I)&&this._update(!0)}catch(ie){t.w(`Unable to perform style diff: ${ie.message||ie.error||ie}. Rebuilding the style from scratch.`),this._updateStyle(Oe,I)}}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(Oe,I){return this._lazyInitEmptyStyle(),this.style.addSource(Oe,I),this._update(!0)}isSourceLoaded(Oe){let I=this.style&&this.style.sourceCaches[Oe];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Oe}'`)))}setTerrain(Oe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Oe){let I=this.style.sourceCaches[Oe.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Oe.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let Te=this.style._layers[ie];Te.type==="hillshade"&&Te.source===Oe.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 ks(this.painter,I,Oe),this.painter.renderToTexture=new el(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=ie=>{ie.dataType==="style"?this.terrain.sourceCache.freeRtt():ie.dataType==="source"&&ie.tile&&(ie.sourceId!==Oe.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ie.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:Oe})),this}getTerrain(){var Oe,I;return(I=(Oe=this.terrain)===null||Oe===void 0?void 0:Oe.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Oe=this.style&&this.style.sourceCaches;for(let I in Oe){let ie=Oe[I]._tiles;for(let Te in ie){let Me=ie[Te];if(Me.state!=="loaded"&&Me.state!=="errored")return!1}}return!0}removeSource(Oe){return this.style.removeSource(Oe),this._update(!0)}getSource(Oe){return this.style.getSource(Oe)}addImage(Oe,I,ie={}){let{pixelRatio:Te=1,sdf:Me=!1,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t}=ie;if(this._lazyInitEmptyStyle(),!(I instanceof HTMLImageElement||t.b(I))){if(I.width===void 0||I.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:Tr,height:Sr,data:Kr}=I,na=I;return this.style.addImage(Oe,{data:new t.R({width:Tr,height:Sr},new Uint8Array(Kr)),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0,userImage:na}),na.onAdd&&na.onAdd(this,Oe),this}}{let{width:Tr,height:Sr,data:Kr}=i.getImageData(I);this.style.addImage(Oe,{data:new t.R({width:Tr,height:Sr},Kr),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0})}}updateImage(Oe,I){let ie=this.style.getImage(Oe);if(!ie)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 Te=I instanceof HTMLImageElement||t.b(I)?i.getImageData(I):I,{width:Me,height:ze,data:ht}=Te;if(Me===void 0||ze===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(Me!==ie.data.width||ze!==ie.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 wt=!(I instanceof HTMLImageElement||t.b(I));return ie.data.replace(ht,wt),this.style.updateImage(Oe,ie),this}getImage(Oe){return this.style.getImage(Oe)}hasImage(Oe){return Oe?!!this.style.getImage(Oe):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Oe){this.style.removeImage(Oe)}loadImage(Oe){return l.getImage(this._requestManager.transformRequest(Oe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Oe,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Oe,I),this._update(!0)}moveLayer(Oe,I){return this.style.moveLayer(Oe,I),this._update(!0)}removeLayer(Oe){return this.style.removeLayer(Oe),this._update(!0)}getLayer(Oe){return this.style.getLayer(Oe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Oe,I,ie){return this.style.setLayerZoomRange(Oe,I,ie),this._update(!0)}setFilter(Oe,I,ie={}){return this.style.setFilter(Oe,I,ie),this._update(!0)}getFilter(Oe){return this.style.getFilter(Oe)}setPaintProperty(Oe,I,ie,Te={}){return this.style.setPaintProperty(Oe,I,ie,Te),this._update(!0)}getPaintProperty(Oe,I){return this.style.getPaintProperty(Oe,I)}setLayoutProperty(Oe,I,ie,Te={}){return this.style.setLayoutProperty(Oe,I,ie,Te),this._update(!0)}getLayoutProperty(Oe,I){return this.style.getLayoutProperty(Oe,I)}setGlyphs(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Oe,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Oe,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Oe,I,ie,Te=>{Te||this._update(!0)}),this}removeSprite(Oe){return this._lazyInitEmptyStyle(),this.style.removeSprite(Oe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Oe,I,ie=>{ie||this._update(!0)}),this}setLight(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Oe,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Oe){return this._lazyInitEmptyStyle(),this.style.setSky(Oe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Oe,I){return this.style.setFeatureState(Oe,I),this._update()}removeFeatureState(Oe,I){return this.style.removeFeatureState(Oe,I),this._update()}getFeatureState(Oe){return this.style.getFeatureState(Oe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Oe=0,I=0;return this._container&&(Oe=this._container.clientWidth||400,I=this._container.clientHeight||300),[Oe,I]}_setupContainer(){let Oe=this._container;Oe.classList.add("maplibregl-map");let I=this._canvasContainer=n.create("div","maplibregl-canvas-container",Oe);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",I),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 ie=this._containerDimensions(),Te=this._getClampedPixelRatio(ie[0],ie[1]);this._resizeCanvas(ie[0],ie[1],Te);let Me=this._controlContainer=n.create("div","maplibregl-control-container",Oe),ze=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ht=>{ze[ht]=n.create("div",`maplibregl-ctrl-${ht} `,Me)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Oe,I,ie){this._canvas.width=Math.floor(ie*Oe),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Oe}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Oe={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",Te=>{I={requestedAttributes:Oe},Te&&(I.statusMessage=Te.statusMessage,I.type=Te.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Oe)||this._canvas.getContext("webgl",Oe);if(!ie){let Te="Failed to initialize WebGL";throw I?(I.message=Te,new Error(JSON.stringify(I))):new Error(Te)}this.painter=new Mc(ie,this.transform),s.testSupport(ie)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Oe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Oe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Oe){return this._update(),this._renderTaskQueue.add(Oe)}_cancelRenderFrame(Oe){this._renderTaskQueue.remove(Oe)}_render(Oe){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Oe),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Me=this.transform.zoom,ze=i.now();this.style.zoomHistory.update(Me,ze);let ht=new t.z(Me,{now:ze,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),wt=ht.crossFadingFactor();wt===1&&wt===this._crossFadingFactor||(ie=!0,this._crossFadingFactor=wt),this.style.update(ht)}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,I,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:I,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()||ie)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Te=this._sourcesDirty||this._styleDirty||this._placementDirty;return Te||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||Te||(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 Oe;this._hash&&this._hash.remove();for(let ie of this._controls)ie.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),(Oe=this._resizeObserver)===null||Oe===void 0||Oe.disconnect();let I=this.painter.context.gl.getExtension("WEBGL_lose_context");I?.loseContext&&I.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(Oe=>{t.bf.frame(Oe),this._frameRequest=null,this._render(Oe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Oe){this._showTileBoundaries!==Oe&&(this._showTileBoundaries=Oe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Oe){this._showPadding!==Oe&&(this._showPadding=Oe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Oe){this._showCollisionBoxes!==Oe&&(this._showCollisionBoxes=Oe,Oe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Oe){this._showOverdrawInspector!==Oe&&(this._showOverdrawInspector=Oe,this._update())}get repaint(){return!!this._repaint}set repaint(Oe){this._repaint!==Oe&&(this._repaint=Oe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Oe){this._vertices=Oe,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=iu,e.MapTouchEvent=Kc,e.MapWheelEvent=hh,e.Marker=Zu,e.NavigationControl=class{constructor(Oe){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ie=I===this._map.getMaxZoom(),Te=I===this._map.getMinZoom();this._zoomInButton.disabled=ie,this._zoomOutButton.disabled=Te,this._zoomInButton.setAttribute("aria-disabled",ie.toString()),this._zoomOutButton.setAttribute("aria-disabled",Te.toString())},this._rotateCompassArrow=()=>{let I=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=I},this._setButtonTitle=(I,ie)=>{let Te=this._map._getUIString(`NavigationControl.${ie}`);I.title=Te,I.setAttribute("aria-label",Te)},this.options=t.e({},Un,Oe),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",I=>I.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",I=>this._map.zoomIn({},{originalEvent:I})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",I=>this._map.zoomOut({},{originalEvent:I})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",I=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:I}):this._map.resetNorth({},{originalEvent:I})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Oe){return this._map=Oe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ro(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(Oe,I){let ie=n.create("button",Oe,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Oe){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=I=>{this._update(I.point)},this._onMouseMove=I=>{this._update(I.point)},this._onDrag=I=>{this._update(I.point)},this._update=I=>{var ie;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 wt of this.options.className.split(" "))this._container.classList.add(wt);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?Fs(this._lngLat,this._flatPos,this._map.transform):(ie=this._lngLat)===null||ie===void 0?void 0:ie.wrap(),this._trackPointer&&!I)return;let Te=this._flatPos=this._pos=this._trackPointer&&I?I:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&I?I:this._map.transform.locationPoint(this._lngLat));let Me=this.options.anchor,ze=lc(this.options.offset);if(!Me){let wt=this._container.offsetWidth,Ot=this._container.offsetHeight,$t;$t=Te.y+ze.bottom.ythis._map.transform.height-Ot?["bottom"]:[],Te.xthis._map.transform.width-wt/2&&$t.push("right"),Me=$t.length===0?"bottom":$t.join("-")}let ht=Te.add(ze[Me]);this.options.subpixelPositioning||(ht=ht.round()),n.setTransform(this._container,`${cu[Me]} translate(${ht.x}px,${ht.y}px)`),Iu(this._container,Me,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Fo),Oe)}addTo(Oe){return this._map&&this.remove(),this._map=Oe,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Oe){return this._lngLat=t.N.convert(Oe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Oe){return this.setDOMContent(document.createTextNode(Oe))}setHTML(Oe){let I=document.createDocumentFragment(),ie=document.createElement("body"),Te;for(ie.innerHTML=Oe;Te=ie.firstChild,Te;)I.appendChild(Te);return this.setDOMContent(I)}getMaxWidth(){var Oe;return(Oe=this._container)===null||Oe===void 0?void 0:Oe.style.maxWidth}setMaxWidth(Oe){return this.options.maxWidth=Oe,this._update(),this}setDOMContent(Oe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Oe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Oe){return this._container&&this._container.classList.add(Oe),this}removeClassName(Oe){return this._container&&this._container.classList.remove(Oe),this}setOffset(Oe){return this.options.offset=Oe,this._update(),this}toggleClassName(Oe){if(this._container)return this._container.classList.toggle(Oe)}setSubpixelPositioning(Oe){this.options.subpixelPositioning=Oe}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Oe=this._container.querySelector(Dc);Oe&&Oe.focus()}},e.RasterDEMTileSource=Re,e.RasterTileSource=Se,e.ScaleControl=class{constructor(Oe){this._onMove=()=>{yc(this._map,this._container,this.options)},this.setUnit=I=>{this.options.unit=I,yc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Au),Oe)}getDefaultPosition(){return"bottom-left"}onAdd(Oe){return this._map=Oe,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Oe.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=ka,e.Style=Rr,e.TerrainControl=class{constructor(Oe){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Oe}onAdd(Oe){return this._map=Oe,this._container=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=Pc,e.TwoFingersTouchRotateHandler=$c,e.TwoFingersTouchZoomHandler=xu,e.TwoFingersTouchZoomRotateHandler=Pi,e.VectorTileSource=we,e.VideoSource=nt,e.addSourceType=(Oe,I)=>t._(void 0,void 0,void 0,function*(){if(he(Oe))throw new Error(`A source type called "${Oe}" already exists.`);((ie,Te)=>{Ve[ie]=Te})(Oe,I)}),e.clearPrewarmedResources=function(){let Oe=de;Oe&&(Oe.isPreloaded()&&Oe.numActive()===1?(Oe.release($),de=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 Ze().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return ue.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Oe){return V().broadcast("IS",Oe)},e.prewarm=function(){X().acquire($)},e.setMaxParallelImageRequests=function(Oe){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Oe},e.setRTLTextPlugin=function(Oe,I){return Ze().setRTLTextPlugin(Oe,I)},e.setWorkerCount=function(Oe){ue.workerCount=Oe},e.setWorkerUrl=function(Oe){t.a.WORKER_URL=Oe}});var M=v;return M})}}),GV=He({"src/plots/map/layers.js"(Z,q){"use strict";var v=sa(),_=su().sanitizeHTML,S=D6(),M=b0();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;s0){for(var s=0;s0}function o(i){var n={},s={};switch(i.type){case"circle":v.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":v.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var h=i.symbol,f=S(h.textposition,h.iconsize);v.extendFlat(n,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":i.color,"text-color":h.textfont.color,"text-opacity":i.opacity});break;case"raster":v.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,h={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",h.tileSize=256):n==="image"&&(f="url",h.coordinates=i.coordinates),h[f]=s,i.sourceattribution&&(h.attribution=_(i.sourceattribution)),h}q.exports=function(n,s,h){var f=new e(n,s);return f.update(h),f}}}),HV=He({"src/plots/map/map.js"(Z,q){"use strict";var v=VV(),_=sa(),S=Ev(),M=so(),e=Wo(),t=Ap(),r=Hc(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,m=b0(),c=GV();function T(p,b){this.id=b,this.gd=p;var d=p._fullLayout,u=p._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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(p,b,d){var u=this,g;u.map?g=new Promise(function(y,D){u.updateMap(p,b,y,D)}):g=new Promise(function(y,D){u.createMap(p,b,y,D)}),d.push(g)},l.createMap=function(p,b,d,u){var g=this,y=b[g.id],D=g.styleObj=w(y.style),P=y.bounds,z=P?[[P.west,P.south],[P.east,P.north]]:null,F=g.map=new v.Map({container:g.div,style:D.style,center:E(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!g.isStatic,preserveDrawingBuffer:g.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0})),N={};F.on("styleimagemissing",function(L){var U=L.id;if(!N[U]&&U.includes("-15")){N[U]=!0;var B=new Image(15,15);B.onload=function(){F.addImage(U,B)},B.crossOrigin="Anonymous",B.src="https://unpkg.com/maki@2.1.0/icons/"+U+".svg"}}),F.setTransformRequest(function(L){return L=L.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),L=L.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),L=L.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:L}}),F._canvas.style.left="0px",F._canvas.style.top="0px",g.rejectOnError(u),g.isStatic||g.initFx(p,b);var O=[];O.push(new Promise(function(L){F.once("load",L)})),O=O.concat(S.fetchTraceGeoData(p)),Promise.all(O).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.updateMap=function(p,b,d,u){var g=this,y=g.map,D=b[this.id];g.rejectOnError(u);var P=[],z=w(D.style);JSON.stringify(g.styleObj)!==JSON.stringify(z)&&(g.styleObj=z,y.setStyle(z.style),g.traceHash={},P.push(new Promise(function(F){y.once("styledata",F)}))),P=P.concat(S.fetchTraceGeoData(p)),Promise.all(P).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(p,b){var d=b[this.id],u=d.layers,g,y,D=this.belowLookup={},P=!1;for(g=0;g1)for(g=0;g-1&&f(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,P),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(p){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function g(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var y=p.dragmode,D;D=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[g([F.xmin,F.ymin]),g([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(g)}};var P=b.dragOptions;b.dragOptions=_.extendDeep(P||{},{dragmode:p.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:p[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:D},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),i(y)||a(y)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){n(z,F,N,b.dragOptions,y)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(p){var b=p[this.id].domain,d=p._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(p){var b=p[this.id],d=b.layers,u=this.layerList,g;if(d.length!==u.length){for(g=0;gd/2){var u=A.split("|").join("
");p.text(u).attr("data-unformatted",u).call(r.convertToTspans,i),b=t.bBox(p.node())}p.attr("transform",v(-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 g=1;b.width+6>d&&(g=d/(b.width+6));var y=[h.l+h.w*c.x[1],h.t+h.h*(1-c.y[0])];E.attr("transform",v(y[0],y[1])+_(g))}},Z.updateFx=function(i){for(var n=i._fullLayout,s=n._subplots[a],h=0;h=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=v(o),h=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,h),o[0].trace._glTrace=i,i}}}),JV=He({"src/traces/choroplethmap/index.js"(Z,q){"use strict";q.exports={attributes:z6(),supplyDefaults:YV(),colorbar:o0(),calc:lT(),plot:KV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(v,_){if(_){var S=_[0].trace;S._glTrace.updateOnSelect(_)}},getBelow:function(v,_){for(var S=_.getMapLayers(),M=S.length-2;M>=0;M--){var e=S[M].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=M+1;t0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var p=M.extractOpts(a),b=p.reversescale?M.flipScale(p.colorscale):p.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),g=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=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 S(t,o.uid),i=a.sourceId,n=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),aG=He({"src/traces/densitymap/hover.js"(Z,q){"use strict";var v=Wo(),_=kT().hoverPoints,S=kT().getExtraText;q.exports=function(e,t,r){var o=_(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 h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),iG=He({"src/traces/densitymap/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_.z=S.z,_}}}),nG=He({"src/traces/densitymap/index.js"(Z,q){"use strict";q.exports={attributes:O6(),supplyDefaults:QV(),colorbar:o0(),formatLabels:R6(),calc:eG(),plot:rG(),hoverPoints:aG(),eventData:iG(),getBelow:function(v,_){for(var S=_.getMapLayers(),M=0;M0;){l=w[w.length-1];var A=_[l];if(r[l]=0&&a[l].push(o[p])}r[l]=E}else{if(e[l]===M[l]){for(var b=[],d=[],u=0,E=x.length-1;E>=0;--E){var g=x[E];if(t[g]=!1,b.push(g),d.push(a[g]),u+=a[g].length,o[g]=s.length,g===l){x.length=E;break}}s.push(b);for(var y=new Array(u),E=0;Ep&&(p=n.source[x]),n.target[x]>p&&(p=n.target[x]);var b=p+1;a.node._count=b;var d,u=a.node.groups,g={};for(x=0;x0&&e(N,b)&&e(O,b)&&!(g.hasOwnProperty(N)&&g.hasOwnProperty(O)&&g[N]===g[O])){g.hasOwnProperty(O)&&(O=g[O]),g.hasOwnProperty(N)&&(N=g[N]),N=+N,O=+O,c[N]=c[O]=!0;var L="";n.label&&n.label[x]&&(L=n.label[x]);var U=null;L&&T.hasOwnProperty(L)&&(U=T[L]),s.push({pointNumber:x,label:L,color:h?n.color[x]:n.color,hovercolor:f?n.hovercolor[x]:n.hovercolor,customdata:m?n.customdata[x]:n.customdata,concentrationscale:U,source:N,target:O,value:+F}),z.source.push(N),z.target.push(O)}}var B=b+u.length,W=M(i.color),$=M(i.customdata),ue=[];for(x=0;xb-1,childrenNodes:[],pointNumber:x,label:ce,color:W?i.color[x]:i.color,customdata:$?i.customdata[x]:i.customdata})}var de=!1;return o(B,z.source,z.target)&&(de=!0),{circular:de,links:s,nodes:ue,groups:u,groupLookup:g}}function o(a,i,n){for(var s=_.init2dArray(a,0),h=0;h1})}q.exports=function(i,n){var s=r(n);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),uG=He({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=v||self,_(v.d3=v.d3||{}))})(Z,function(v){"use strict";function _(b){var d=+this._x.call(null,b),u=+this._y.call(null,b);return S(this.cover(d,u),d,u,b)}function S(b,d,u,g){if(isNaN(d)||isNaN(u))return b;var y,D=b._root,P={data:g},z=b._x0,F=b._y0,N=b._x1,O=b._y1,L,U,B,W,$,ue,ce,de;if(!D)return b._root=P,b;for(;D.length;)if(($=d>=(L=(z+N)/2))?z=L:N=L,(ue=u>=(U=(F+O)/2))?F=U:O=U,y=D,!(D=D[ce=ue<<1|$]))return y[ce]=P,b;if(B=+b._x.call(null,D.data),W=+b._y.call(null,D.data),d===B&&u===W)return P.next=D,y?y[ce]=P:b._root=P,b;do y=y?y[ce]=new Array(4):b._root=new Array(4),($=d>=(L=(z+N)/2))?z=L:N=L,(ue=u>=(U=(F+O)/2))?F=U:O=U;while((ce=ue<<1|$)===(de=(W>=U)<<1|B>=L));return y[de]=D,y[ce]=P,b}function M(b){var d,u,g=b.length,y,D,P=new Array(g),z=new Array(g),F=1/0,N=1/0,O=-1/0,L=-1/0;for(u=0;uO&&(O=y),DL&&(L=D));if(F>O||N>L)return this;for(this.cover(F,N).cover(O,L),u=0;ub||b>=y||g>d||d>=D;)switch(N=(dO||(z=W.y0)>L||(F=W.x1)=ce)<<1|b>=ue)&&(W=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=W)}else{var de=b-+this._x.call(null,B.data),Y=d-+this._y.call(null,B.data),X=de*de+Y*Y;if(X=(U=(P+F)/2))?P=U:F=U,($=L>=(B=(z+N)/2))?z=B:N=B,d=u,!(u=u[ue=$<<1|W]))return this;if(!u.length)break;(d[ue+1&3]||d[ue+2&3]||d[ue+3&3])&&(g=d,ce=ue)}for(;u.data!==b;)if(y=u,!(u=u.next))return this;return(D=u.next)&&delete u.next,y?(D?y.next=D:delete y.next,this):d?(D?d[ue]=D:delete d[ue],(u=d[0]||d[1]||d[2]||d[3])&&u===(d[3]||d[2]||d[1]||d[0])&&!u.length&&(g?g[ce]=u:this._root=u),this):(this._root=D,this)}function n(b){for(var d=0,u=b.length;d=c.length)return l!=null&&p.sort(l),x!=null?x(p):p;for(var g=-1,y=p.length,D=c[b++],P,z,F=M(),N,O=d();++gc.length)return p;var d,u=T[b-1];return x!=null&&b>=c.length?d=p.entries():(d=[],p.each(function(g,y){d.push({key:y,values:E(g,b)})})),u!=null?d.sort(function(g,y){return u(g.key,y.key)}):d}return w={object:function(p){return A(p,0,t,r)},map:function(p){return A(p,0,o,a)},entries:function(p){return E(A(p,0,o,a),0)},key:function(p){return c.push(p),w},sortKeys:function(p){return T[c.length-1]=p,w},sortValues:function(p){return l=p,w},rollup:function(p){return x=p,w}}}function t(){return{}}function r(c,T,l){c[T]=l}function o(){return M()}function a(c,T,l){c.set(T,l)}function i(){}var n=M.prototype;i.prototype=s.prototype={constructor:i,has:n.has,add:function(c){return c+="",this[_+c]=c,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each};function s(c,T){var l=new i;if(c instanceof i)c.each(function(A){l.add(A)});else if(c){var x=-1,w=c.length;if(T==null)for(;++x=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=S.prototype={constructor:M,on:function(o,a){var i=this._,n=e(o+"",i),s,h=-1,f=n.length;if(arguments.length<2){for(;++h0)for(var i=new Array(s),n=0,s,h;n=0&&b._call.call(null,d),b=b._next;--_}function l(){a=(o=n.now())+i,_=S=0;try{T()}finally{_=0,w(),a=0}}function x(){var b=n.now(),d=b-o;d>e&&(i-=d,o=b)}function w(){for(var b,d=t,u,g=1/0;d;)d._call?(g>d._time&&(g=d._time),b=d,d=d._next):(u=d._next,d._next=null,d=b?b._next=u:t=u);r=b,A(g)}function A(b){if(!_){S&&(S=clearTimeout(S));var d=b-a;d>24?(b<1/0&&(S=setTimeout(l,b-n.now()-i)),M&&(M=clearInterval(M))):(M||(o=n.now(),M=setInterval(x,e)),_=1,s(l))}}function E(b,d,u){var g=new m;return d=d==null?0:+d,g.restart(function(y){g.stop(),b(y+d)},d,u),g}function p(b,d,u){var g=new m,y=d;return d==null?(g.restart(b,d,u),g):(d=+d,u=u==null?h():+u,g.restart(function D(P){P+=y,g.restart(D,y+=d,u),b(P)},d,u),g)}v.interval=p,v.now=h,v.timeout=E,v.timer=c,v.timerFlush=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),hG=He({"node_modules/d3-force/dist/d3-force.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,uG(),LT(),cG(),fG()):_(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(Z,function(v,_,S,M,e){"use strict";function t(b,d){var u;b==null&&(b=0),d==null&&(d=0);function g(){var y,D=u.length,P,z=0,F=0;for(y=0;yL.index){var ee=U-le.x-le.vx,te=B-le.y-le.vy,pe=ee*ee+te*te;peU+j||QB+j||VF.r&&(F.r=F[N].r)}function z(){if(d){var F,N=d.length,O;for(u=new Array(N),F=0;F1?($==null?z.remove(W):z.set(W,B($)),d):z.get(W)},find:function(W,$,ue){var ce=0,de=b.length,Y,X,Q,V,le;for(ue==null?ue=1/0:ue*=ue,ce=0;ce1?(N.on(W,$),d):N.on(W)}}}function w(){var b,d,u,g=r(-30),y,D=1,P=1/0,z=.81;function F(U){var B,W=b.length,$=_.quadtree(b,m,c).visitAfter(O);for(u=U,B=0;B=P)return;(U.data!==d||U.next)&&(ue===0&&(ue=o(),Y+=ue*ue),ce===0&&(ce=o(),Y+=ce*ce),YM)if(!(Math.abs(l*m-c*T)>M)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=i-h,A=n-f,E=m*m+c*c,p=w*w+A*A,b=Math.sqrt(E),d=Math.sqrt(x),u=s*Math.tan((_-Math.acos((E+x-p)/(2*b*d)))/2),g=u/d,y=u/b;Math.abs(g-1)>M&&(this._+="L"+(o+g*T)+","+(a+g*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*A)+","+(this._x1=o+y*m)+","+(this._y1=a+y*c)}},arc:function(o,a,i,n,s,h){o=+o,a=+a,i=+i,h=!!h;var f=i*Math.cos(n),m=i*Math.sin(n),c=o+f,T=a+m,l=1^h,x=h?n-s:s-n;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+c+","+T:(Math.abs(this._x1-c)>M||Math.abs(this._y1-T)>M)&&(this._+="L"+c+","+T),i&&(x<0&&(x=x%S+S),x>e?this._+="A"+i+","+i+",0,1,"+l+","+(o-f)+","+(a-m)+"A"+i+","+i+",0,1,"+l+","+(this._x1=c)+","+(this._y1=T):x>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._}},v.path=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),U6=He({"node_modules/d3-shape/dist/d3-shape.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,pG()):(v=v||self,_(v.d3=v.d3||{},v.d3))})(Z,function(v,_){"use strict";function S(gt){return function(){return gt}}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,h=s/2,f=2*s;function m(gt){return gt>1?0:gt<-1?s:Math.acos(gt)}function c(gt){return gt>=1?h:gt<=-1?-h:Math.asin(gt)}function T(gt){return gt.innerRadius}function l(gt){return gt.outerRadius}function x(gt){return gt.startAngle}function w(gt){return gt.endAngle}function A(gt){return gt&>.padAngle}function E(gt,Kt,mr,Ir,va,Pa,ga,la){var ba=mr-gt,Ai=Ir-Kt,ki=ga-va,Ki=la-Pa,Mn=Ki*ba-ki*Ai;if(!(Mn*Mnss*ss+_s*_s&&(os=jo,ys=Yn),{cx:os,cy:ys,x01:-ki,y01:-Ki,x11:os*(va/wo-1),y11:ys*(va/wo-1)}}function b(){var gt=T,Kt=l,mr=S(0),Ir=null,va=x,Pa=w,ga=A,la=null;function ba(){var Ai,ki,Ki=+gt.apply(this,arguments),Mn=+Kt.apply(this,arguments),wn=va.apply(this,arguments)-h,On=Pa.apply(this,arguments)-h,En=M(On-wn),ao=On>wn;if(la||(la=Ai=_.path()),Mnn))la.moveTo(0,0);else if(En>f-n)la.moveTo(Mn*t(wn),Mn*a(wn)),la.arc(0,0,Mn,wn,On,!ao),Ki>n&&(la.moveTo(Ki*t(On),Ki*a(On)),la.arc(0,0,Ki,On,wn,ao));else{var Co=wn,bo=On,zs=wn,kn=On,wo=En,Zn=En,go=ga.apply(this,arguments)/2,os=go>n&&(Ir?+Ir.apply(this,arguments):i(Ki*Ki+Mn*Mn)),ys=o(M(Mn-Ki)/2,+mr.apply(this,arguments)),jo=ys,Yn=ys,Gn,Hn;if(os>n){var ss=c(os/Ki*a(go)),_s=c(os/Mn*a(go));(wo-=ss*2)>n?(ss*=ao?1:-1,zs+=ss,kn-=ss):(wo=0,zs=kn=(wn+On)/2),(Zn-=_s*2)>n?(_s*=ao?1:-1,Co+=_s,bo-=_s):(Zn=0,Co=bo=(wn+On)/2)}var ps=Mn*t(Co),Ko=Mn*a(Co),Gi=Ki*t(kn),Pn=Ki*a(kn);if(ys>n){var qs=Mn*t(bo),bs=Mn*a(bo),lo=Ki*t(zs),Zo=Ki*a(zs),ws;if(Enn?Yn>n?(Gn=p(lo,Zo,ps,Ko,Mn,Yn,ao),Hn=p(qs,bs,Gi,Pn,Mn,Yn,ao),la.moveTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),Ynn)||!(wo>n)?la.lineTo(Gi,Pn):jo>n?(Gn=p(Gi,Pn,qs,bs,Ki,-jo,ao),Hn=p(ps,Ko,lo,Zo,Ki,-jo,ao),la.lineTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),jo=Mn;--wn)la.point(bo[wn],zs[wn]);la.lineEnd(),la.areaEnd()}ao&&(bo[Ki]=+gt(En,Ki,ki),zs[Ki]=+mr(En,Ki,ki),la.point(Kt?+Kt(En,Ki,ki):bo[Ki],Ir?+Ir(En,Ki,ki):zs[Ki]))}if(Co)return la=null,Co+""||null}function Ai(){return D().defined(va).curve(ga).context(Pa)}return ba.x=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),Kt=null,ba):gt},ba.x0=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),ba):gt},ba.x1=function(ki){return arguments.length?(Kt=ki==null?null:typeof ki=="function"?ki:S(+ki),ba):Kt},ba.y=function(ki){return arguments.length?(mr=typeof ki=="function"?ki:S(+ki),Ir=null,ba):mr},ba.y0=function(ki){return arguments.length?(mr=typeof ki=="function"?ki:S(+ki),ba):mr},ba.y1=function(ki){return arguments.length?(Ir=ki==null?null:typeof ki=="function"?ki:S(+ki),ba):Ir},ba.lineX0=ba.lineY0=function(){return Ai().x(gt).y(mr)},ba.lineY1=function(){return Ai().x(gt).y(Ir)},ba.lineX1=function(){return Ai().x(Kt).y(mr)},ba.defined=function(ki){return arguments.length?(va=typeof ki=="function"?ki:S(!!ki),ba):va},ba.curve=function(ki){return arguments.length?(ga=ki,Pa!=null&&(la=ga(Pa)),ba):ga},ba.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ga(Pa=ki),ba):Pa},ba}function z(gt,Kt){return Ktgt?1:Kt>=gt?0:NaN}function F(gt){return gt}function N(){var gt=F,Kt=z,mr=null,Ir=S(0),va=S(f),Pa=S(0);function ga(la){var ba,Ai=la.length,ki,Ki,Mn=0,wn=new Array(Ai),On=new Array(Ai),En=+Ir.apply(this,arguments),ao=Math.min(f,Math.max(-f,va.apply(this,arguments)-En)),Co,bo=Math.min(Math.abs(ao)/Ai,Pa.apply(this,arguments)),zs=bo*(ao<0?-1:1),kn;for(ba=0;ba0&&(Mn+=kn);for(Kt!=null?wn.sort(function(wo,Zn){return Kt(On[wo],On[Zn])}):mr!=null&&wn.sort(function(wo,Zn){return mr(la[wo],la[Zn])}),ba=0,Ki=Mn?(ao-Ai*zs)/Mn:0;ba0?kn*Ki:0)+zs,On[ki]={data:la[ki],index:ba,value:kn,startAngle:En,endAngle:Co,padAngle:bo};return On}return ga.value=function(la){return arguments.length?(gt=typeof la=="function"?la:S(+la),ga):gt},ga.sortValues=function(la){return arguments.length?(Kt=la,mr=null,ga):Kt},ga.sort=function(la){return arguments.length?(mr=la,Kt=null,ga):mr},ga.startAngle=function(la){return arguments.length?(Ir=typeof la=="function"?la:S(+la),ga):Ir},ga.endAngle=function(la){return arguments.length?(va=typeof la=="function"?la:S(+la),ga):va},ga.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ga):Pa},ga}var O=U(u);function L(gt){this._curve=gt}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(gt,Kt){this._curve.point(Kt*Math.sin(gt),Kt*-Math.cos(gt))}};function U(gt){function Kt(mr){return new L(gt(mr))}return Kt._curve=gt,Kt}function B(gt){var Kt=gt.curve;return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt.curve=function(mr){return arguments.length?Kt(U(mr)):Kt()._curve},gt}function W(){return B(D().curve(O))}function $(){var gt=P().curve(O),Kt=gt.curve,mr=gt.lineX0,Ir=gt.lineX1,va=gt.lineY0,Pa=gt.lineY1;return gt.angle=gt.x,delete gt.x,gt.startAngle=gt.x0,delete gt.x0,gt.endAngle=gt.x1,delete gt.x1,gt.radius=gt.y,delete gt.y,gt.innerRadius=gt.y0,delete gt.y0,gt.outerRadius=gt.y1,delete gt.y1,gt.lineStartAngle=function(){return B(mr())},delete gt.lineX0,gt.lineEndAngle=function(){return B(Ir())},delete gt.lineX1,gt.lineInnerRadius=function(){return B(va())},delete gt.lineY0,gt.lineOuterRadius=function(){return B(Pa())},delete gt.lineY1,gt.curve=function(ga){return arguments.length?Kt(U(ga)):Kt()._curve},gt}function ue(gt,Kt){return[(Kt=+Kt)*Math.cos(gt-=Math.PI/2),Kt*Math.sin(gt)]}var ce=Array.prototype.slice;function de(gt){return gt.source}function Y(gt){return gt.target}function X(gt){var Kt=de,mr=Y,Ir=g,va=y,Pa=null;function ga(){var la,ba=ce.call(arguments),Ai=Kt.apply(this,ba),ki=mr.apply(this,ba);if(Pa||(Pa=la=_.path()),gt(Pa,+Ir.apply(this,(ba[0]=Ai,ba)),+va.apply(this,ba),+Ir.apply(this,(ba[0]=ki,ba)),+va.apply(this,ba)),la)return Pa=null,la+""||null}return ga.source=function(la){return arguments.length?(Kt=la,ga):Kt},ga.target=function(la){return arguments.length?(mr=la,ga):mr},ga.x=function(la){return arguments.length?(Ir=typeof la=="function"?la:S(+la),ga):Ir},ga.y=function(la){return arguments.length?(va=typeof la=="function"?la:S(+la),ga):va},ga.context=function(la){return arguments.length?(Pa=la??null,ga):Pa},ga}function Q(gt,Kt,mr,Ir,va){gt.moveTo(Kt,mr),gt.bezierCurveTo(Kt=(Kt+Ir)/2,mr,Kt,va,Ir,va)}function V(gt,Kt,mr,Ir,va){gt.moveTo(Kt,mr),gt.bezierCurveTo(Kt,mr=(mr+va)/2,Ir,mr,Ir,va)}function le(gt,Kt,mr,Ir,va){var Pa=ue(Kt,mr),ga=ue(Kt,mr=(mr+va)/2),la=ue(Ir,mr),ba=ue(Ir,va);gt.moveTo(Pa[0],Pa[1]),gt.bezierCurveTo(ga[0],ga[1],la[0],la[1],ba[0],ba[1])}function ae(){return X(Q)}function j(){return X(V)}function ee(){var gt=X(le);return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt}var te={draw:function(gt,Kt){var mr=Math.sqrt(Kt/s);gt.moveTo(mr,0),gt.arc(0,0,mr,0,f)}},pe={draw:function(gt,Kt){var mr=Math.sqrt(Kt/5)/2;gt.moveTo(-3*mr,-mr),gt.lineTo(-mr,-mr),gt.lineTo(-mr,-3*mr),gt.lineTo(mr,-3*mr),gt.lineTo(mr,-mr),gt.lineTo(3*mr,-mr),gt.lineTo(3*mr,mr),gt.lineTo(mr,mr),gt.lineTo(mr,3*mr),gt.lineTo(-mr,3*mr),gt.lineTo(-mr,mr),gt.lineTo(-3*mr,mr),gt.closePath()}},we=Math.sqrt(1/3),Se=we*2,Re={draw:function(gt,Kt){var mr=Math.sqrt(Kt/Se),Ir=mr*we;gt.moveTo(0,-mr),gt.lineTo(Ir,0),gt.lineTo(0,mr),gt.lineTo(-Ir,0),gt.closePath()}},Pe=.8908130915292852,je=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(f/10)*je,nt=-Math.cos(f/10)*je,tt={draw:function(gt,Kt){var mr=Math.sqrt(Kt*Pe),Ir=at*mr,va=nt*mr;gt.moveTo(0,-mr),gt.lineTo(Ir,va);for(var Pa=1;Pa<5;++Pa){var ga=f*Pa/5,la=Math.cos(ga),ba=Math.sin(ga);gt.lineTo(ba*mr,-la*mr),gt.lineTo(la*Ir-ba*va,ba*Ir+la*va)}gt.closePath()}},Ve={draw:function(gt,Kt){var mr=Math.sqrt(Kt),Ir=-mr/2;gt.rect(Ir,Ir,mr,mr)}},he=Math.sqrt(3),se={draw:function(gt,Kt){var mr=-Math.sqrt(Kt/(he*3));gt.moveTo(0,mr*2),gt.lineTo(-he*mr,-mr),gt.lineTo(he*mr,-mr),gt.closePath()}},ne=-.5,Ce=Math.sqrt(3)/2,Ze=1/Math.sqrt(12),rt=(Ze/2+1)*3,Je={draw:function(gt,Kt){var mr=Math.sqrt(Kt/rt),Ir=mr/2,va=mr*Ze,Pa=Ir,ga=mr*Ze+mr,la=-Pa,ba=ga;gt.moveTo(Ir,va),gt.lineTo(Pa,ga),gt.lineTo(la,ba),gt.lineTo(ne*Ir-Ce*va,Ce*Ir+ne*va),gt.lineTo(ne*Pa-Ce*ga,Ce*Pa+ne*ga),gt.lineTo(ne*la-Ce*ba,Ce*la+ne*ba),gt.lineTo(ne*Ir+Ce*va,ne*va-Ce*Ir),gt.lineTo(ne*Pa+Ce*ga,ne*ga-Ce*Pa),gt.lineTo(ne*la+Ce*ba,ne*ba-Ce*la),gt.closePath()}},St=[te,pe,Re,Ve,tt,se,Je];function kt(){var gt=S(te),Kt=S(64),mr=null;function Ir(){var va;if(mr||(mr=va=_.path()),gt.apply(this,arguments).draw(mr,+Kt.apply(this,arguments)),va)return mr=null,va+""||null}return Ir.type=function(va){return arguments.length?(gt=typeof va=="function"?va:S(va),Ir):gt},Ir.size=function(va){return arguments.length?(Kt=typeof va=="function"?va:S(+va),Ir):Kt},Ir.context=function(va){return arguments.length?(mr=va??null,Ir):mr},Ir}function Bt(){}function Vt(gt,Kt,mr){gt._context.bezierCurveTo((2*gt._x0+gt._x1)/3,(2*gt._y0+gt._y1)/3,(gt._x0+2*gt._x1)/3,(gt._y0+2*gt._y1)/3,(gt._x0+4*gt._x1+Kt)/6,(gt._y0+4*gt._y1+mr)/6)}function Ar(gt){this._context=gt}Ar.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:Vt(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(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);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:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function vr(gt){return new Ar(gt)}function qr(gt){this._context=gt}qr.prototype={areaStart:Bt,areaEnd:Bt,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(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._x2=gt,this._y2=Kt;break;case 1:this._point=2,this._x3=gt,this._y3=Kt;break;case 2:this._point=3,this._x4=gt,this._y4=Kt,this._context.moveTo((this._x0+4*this._x1+gt)/6,(this._y0+4*this._y1+Kt)/6);break;default:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function kr(gt){return new qr(gt)}function Ur(gt){this._context=gt}Ur.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(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var mr=(this._x0+4*this._x1+gt)/6,Ir=(this._y0+4*this._y1+Kt)/6;this._line?this._context.lineTo(mr,Ir):this._context.moveTo(mr,Ir);break;case 3:this._point=4;default:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function _t(gt){return new Ur(gt)}function Fe(gt,Kt){this._basis=new Ar(gt),this._beta=Kt}Fe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var gt=this._x,Kt=this._y,mr=gt.length-1;if(mr>0)for(var Ir=gt[0],va=Kt[0],Pa=gt[mr]-Ir,ga=Kt[mr]-va,la=-1,ba;++la<=mr;)ba=la/mr,this._basis.point(this._beta*gt[la]+(1-this._beta)*(Ir+ba*Pa),this._beta*Kt[la]+(1-this._beta)*(va+ba*ga));this._x=this._y=null,this._basis.lineEnd()},point:function(gt,Kt){this._x.push(+gt),this._y.push(+Kt)}};var Ye=function gt(Kt){function mr(Ir){return Kt===1?new Ar(Ir):new Fe(Ir,Kt)}return mr.beta=function(Ir){return gt(+Ir)},mr}(.85);function Ae(gt,Kt,mr){gt._context.bezierCurveTo(gt._x1+gt._k*(gt._x2-gt._x0),gt._y1+gt._k*(gt._y2-gt._y0),gt._x2+gt._k*(gt._x1-Kt),gt._y2+gt._k*(gt._y1-mr),gt._x2,gt._y2)}function Le(gt,Kt){this._context=gt,this._k=(1-Kt)/6}Le.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:Ae(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2,this._x1=gt,this._y1=Kt;break;case 2:this._point=3;default:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var We=function gt(Kt){function mr(Ir){return new Le(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function Ke(gt,Kt){this._context=gt,this._k=(1-Kt)/6}Ke.prototype={areaStart:Bt,areaEnd:Bt,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(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._x3=gt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Kt);break;case 2:this._point=3,this._x5=gt,this._y5=Kt;break;default:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var st=function gt(Kt){function mr(Ir){return new Ke(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function ot(gt,Kt){this._context=gt,this._k=(1-Kt)/6}ot.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(gt,Kt){switch(gt=+gt,Kt=+Kt,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:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Ut=function gt(Kt){function mr(Ir){return new ot(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function Ct(gt,Kt,mr){var Ir=gt._x1,va=gt._y1,Pa=gt._x2,ga=gt._y2;if(gt._l01_a>n){var la=2*gt._l01_2a+3*gt._l01_a*gt._l12_a+gt._l12_2a,ba=3*gt._l01_a*(gt._l01_a+gt._l12_a);Ir=(Ir*la-gt._x0*gt._l12_2a+gt._x2*gt._l01_2a)/ba,va=(va*la-gt._y0*gt._l12_2a+gt._y2*gt._l01_2a)/ba}if(gt._l23_a>n){var Ai=2*gt._l23_2a+3*gt._l23_a*gt._l12_a+gt._l12_2a,ki=3*gt._l23_a*(gt._l23_a+gt._l12_a);Pa=(Pa*Ai+gt._x1*gt._l23_2a-Kt*gt._l12_2a)/ki,ga=(ga*Ai+gt._y1*gt._l23_2a-mr*gt._l12_2a)/ki}gt._context.bezierCurveTo(Ir,va,Pa,ga,gt._x2,gt._y2)}function Pt(gt,Kt){this._context=gt,this._alpha=Kt}Pt.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(gt,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;break;case 2:this._point=3;default:Ct(this,gt,Kt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var jt=function gt(Kt){function mr(Ir){return Kt?new Pt(Ir,Kt):new Le(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function cr(gt,Kt){this._context=gt,this._alpha=Kt}cr.prototype={areaStart:Bt,areaEnd:Bt,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(gt,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=gt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Kt);break;case 2:this._point=3,this._x5=gt,this._y5=Kt;break;default:Ct(this,gt,Kt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var or=function gt(Kt){function mr(Ir){return Kt?new cr(Ir,Kt):new Ke(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function nr(gt,Kt){this._context=gt,this._alpha=Kt}nr.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(gt,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,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:Ct(this,gt,Kt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Pr=function gt(Kt){function mr(Ir){return Kt?new nr(Ir,Kt):new ot(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function _a(gt){this._context=gt}_a.prototype={areaStart:Bt,areaEnd:Bt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(gt,Kt){gt=+gt,Kt=+Kt,this._point?this._context.lineTo(gt,Kt):(this._point=1,this._context.moveTo(gt,Kt))}};function Fa(gt){return new _a(gt)}function Ra(gt){return gt<0?-1:1}function qa(gt,Kt,mr){var Ir=gt._x1-gt._x0,va=Kt-gt._x1,Pa=(gt._y1-gt._y0)/(Ir||va<0&&-0),ga=(mr-gt._y1)/(va||Ir<0&&-0),la=(Pa*va+ga*Ir)/(Ir+va);return(Ra(Pa)+Ra(ga))*Math.min(Math.abs(Pa),Math.abs(ga),.5*Math.abs(la))||0}function Wa(gt,Kt){var mr=gt._x1-gt._x0;return mr?(3*(gt._y1-gt._y0)/mr-Kt)/2:Kt}function Ca(gt,Kt,mr){var Ir=gt._x0,va=gt._y0,Pa=gt._x1,ga=gt._y1,la=(Pa-Ir)/3;gt._context.bezierCurveTo(Ir+la,va+la*Kt,Pa-la,ga-la*mr,Pa,ga)}function hi(gt){this._context=gt}hi.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:Ca(this,this._t0,Wa(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Kt){var mr=NaN;if(gt=+gt,Kt=+Kt,!(gt===this._x1&&Kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,mr=qa(this,gt,Kt)),mr);break;default:Ca(this,this._t0,mr=qa(this,gt,Kt));break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt,this._t0=mr}}};function wi(gt){this._context=new Yt(gt)}(wi.prototype=Object.create(hi.prototype)).point=function(gt,Kt){hi.prototype.point.call(this,Kt,gt)};function Yt(gt){this._context=gt}Yt.prototype={moveTo:function(gt,Kt){this._context.moveTo(Kt,gt)},closePath:function(){this._context.closePath()},lineTo:function(gt,Kt){this._context.lineTo(Kt,gt)},bezierCurveTo:function(gt,Kt,mr,Ir,va,Pa){this._context.bezierCurveTo(Kt,gt,Ir,mr,Pa,va)}};function Rt(gt){return new hi(gt)}function Zt(gt){return new wi(gt)}function Jt(gt){this._context=gt}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var gt=this._x,Kt=this._y,mr=gt.length;if(mr)if(this._line?this._context.lineTo(gt[0],Kt[0]):this._context.moveTo(gt[0],Kt[0]),mr===2)this._context.lineTo(gt[1],Kt[1]);else for(var Ir=Fr(gt),va=Fr(Kt),Pa=0,ga=1;ga=0;--Kt)va[Kt]=(ga[Kt]-va[Kt+1])/Pa[Kt];for(Pa[mr-1]=(gt[mr]+va[mr-1])/2,Kt=0;Kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Kt),this._context.lineTo(gt,Kt);else{var mr=this._x*(1-this._t)+gt*this._t;this._context.lineTo(mr,this._y),this._context.lineTo(mr,Kt)}break}}this._x=gt,this._y=Kt}};function ca(gt){return new ra(gt,.5)}function Ba(gt){return new ra(gt,0)}function $a(gt){return new ra(gt,1)}function Za(gt,Kt){if((ga=gt.length)>1)for(var mr=1,Ir,va,Pa=gt[Kt[0]],ga,la=Pa.length;mr=0;)mr[Kt]=Kt;return mr}function pi(gt,Kt){return gt[Kt]}function Ia(){var gt=S([]),Kt=ri,mr=Za,Ir=pi;function va(Pa){var ga=gt.apply(this,arguments),la,ba=Pa.length,Ai=ga.length,ki=new Array(Ai),Ki;for(la=0;la0){for(var mr,Ir,va=0,Pa=gt[0].length,ga;va0)for(var mr,Ir=0,va,Pa,ga,la,ba,Ai=gt[Kt[0]].length;Ir0?(va[0]=ga,va[1]=ga+=Pa):Pa<0?(va[1]=la,va[0]=la+=Pa):(va[0]=0,va[1]=Pa)}function cn(gt,Kt){if((va=gt.length)>0){for(var mr=0,Ir=gt[Kt[0]],va,Pa=Ir.length;mr0)||!((Pa=(va=gt[Kt[0]]).length)>0))){for(var mr=0,Ir=1,va,Pa,ga;IrPa&&(Pa=va,mr=Kt);return mr}function Cr(gt){var Kt=gt.map(wr);return ri(gt).sort(function(mr,Ir){return Kt[mr]-Kt[Ir]})}function wr(gt){for(var Kt=0,mr=-1,Ir=gt.length,va;++mr0;--le)ee(V*=.99),te(),j(V),te();function ae(){var pe=_.max(Q,function(Re){return Re.length}),we=B*(D-g)/(pe-1);z>we&&(z=we);var Se=_.min(Q,function(Re){return(D-g-(Re.length-1)*z)/_.sum(Re,f)});Q.forEach(function(Re){Re.forEach(function(Pe,je){Pe.y1=(Pe.y0=je)+Pe.value*Se})}),X.links.forEach(function(Re){Re.width=Re.value*Se})}function j(pe){Q.forEach(function(we){we.forEach(function(Se){if(Se.targetLinks.length){var Re=(_.sum(Se.targetLinks,c)/_.sum(Se.targetLinks,f)-m(Se))*pe;Se.y0+=Re,Se.y1+=Re}})})}function ee(pe){Q.slice().reverse().forEach(function(we){we.forEach(function(Se){if(Se.sourceLinks.length){var Re=(_.sum(Se.sourceLinks,T)/_.sum(Se.sourceLinks,f)-m(Se))*pe;Se.y0+=Re,Se.y1+=Re}})})}function te(){Q.forEach(function(pe){var we,Se,Re=g,Pe=pe.length,je;for(pe.sort(h),je=0;je0&&(we.y0+=Se,we.y1+=Se),Re=we.y1+z;if(Se=Re-z-D,Se>0)for(Re=we.y0-=Se,we.y1-=Se,je=Pe-2;je>=0;--je)we=pe[je],Se=we.y1+z-Re,Se>0&&(we.y0-=Se,we.y1-=Se),Re=we.y0})}}function Y(X){X.nodes.forEach(function(Q){Q.sourceLinks.sort(s),Q.targetLinks.sort(n)}),X.nodes.forEach(function(Q){var V=Q.y0,le=V;Q.sourceLinks.forEach(function(ae){ae.y0=V+ae.width/2,V+=ae.width}),Q.targetLinks.forEach(function(ae){ae.y1=le+ae.width/2,le+=ae.width})})}return W};function p(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var d=function(){return M.linkHorizontal().source(p).target(b)};v.sankey=E,v.sankeyCenter=a,v.sankeyLeft=t,v.sankeyRight=r,v.sankeyJustify=o,v.sankeyLinkHorizontal=d,Object.defineProperty(v,"__esModule",{value:!0})})}}),vG=He({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,q){var v=N6();q.exports=function(S,M){var e=[],t=[],r=[],o={},a=[],i;function n(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(E){delete o[A][E],r[E]&&n(E)})}function s(A){var E=!1;t.push(A),r[A]=!0;var p,b;for(p=0;p=A})}function m(A){f(A);for(var E=S,p=v(E),b=p.components.filter(function(z){return z.length>1}),d=1/0,u,g=0;g"u"?"undefined":s(Le))!=="object"&&(Le=Ye.source=p(Fe,Le)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=Ye.target=p(Fe,We)),Le.sourceLinks.push(Ye),We.targetLinks.push(Ye)}),_t}function Vt(_t){_t.nodes.forEach(function(Fe){Fe.partOfCycle=!1,Fe.value=Math.max(_.sum(Fe.sourceLinks,c),_.sum(Fe.targetLinks,c)),Fe.sourceLinks.forEach(function(Ye){Ye.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=Ye.circularLinkType)}),Fe.targetLinks.forEach(function(Ye){Ye.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=Ye.circularLinkType)})})}function Ar(_t){var Fe=0,Ye=0,Ae=0,Le=0,We=_.max(_t.nodes,function(Ke){return Ke.column});return _t.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?Fe=Fe+Ke.width:Ye=Ye+Ke.width,Ke.target.column==0&&(Le=Le+Ke.width),Ke.source.column==We&&(Ae=Ae+Ke.width))}),Fe=Fe>0?Fe+d+u:Fe,Ye=Ye>0?Ye+d+u:Ye,Ae=Ae>0?Ae+d+u:Ae,Le=Le>0?Le+d+u:Le,{top:Fe,bottom:Ye,left:Le,right:Ae}}function vr(_t,Fe){var Ye=_.max(_t.nodes,function(Ut){return Ut.column}),Ae=at-Pe,Le=nt-je,We=Ae+Fe.right+Fe.left,Ke=Le+Fe.top+Fe.bottom,st=Ae/We,ot=Le/Ke;return Pe=Pe*st+Fe.left,at=Fe.right==0?at:at*st,je=je*ot+Fe.top,nt=nt*ot,_t.nodes.forEach(function(Ut){Ut.x0=Pe+Ut.column*((at-Pe-tt)/Ye),Ut.x1=Ut.x0+tt}),ot}function qr(_t){var Fe,Ye,Ae;for(Fe=_t.nodes,Ye=[],Ae=0;Fe.length;++Ae,Fe=Ye,Ye=[])Fe.forEach(function(Le){Le.depth=Ae,Le.sourceLinks.forEach(function(We){Ye.indexOf(We.target)<0&&!We.circular&&Ye.push(We.target)})});for(Fe=_t.nodes,Ye=[],Ae=0;Fe.length;++Ae,Fe=Ye,Ye=[])Fe.forEach(function(Le){Le.height=Ae,Le.targetLinks.forEach(function(We){Ye.indexOf(We.source)<0&&!We.circular&&Ye.push(We.source)})});_t.nodes.forEach(function(Le){Le.column=Math.floor(se.call(null,Le,Ae))})}function kr(_t,Fe,Ye){var Ae=S.nest().key(function(Ut){return Ut.column}).sortKeys(_.ascending).entries(_t.nodes).map(function(Ut){return Ut.values});Ke(Ye),ot();for(var Le=1,We=Fe;We>0;--We)st(Le*=.99,Ye),ot();function Ke(Ut){if(Je){var Ct=1/0;Ae.forEach(function(or){var nr=nt*Je/(or.length+1);Ct=nr0))if(or==0&&cr==1)Pr=nr.y1-nr.y0,nr.y0=nt/2-Pr/2,nr.y1=nt/2+Pr/2;else if(or==Pt-1&&cr==1)Pr=nr.y1-nr.y0,nr.y0=nt/2-Pr/2,nr.y1=nt/2+Pr/2;else{var _a=0,Fa=_.mean(nr.sourceLinks,x),Ra=_.mean(nr.targetLinks,l);Fa&&Ra?_a=(Fa+Ra)/2:_a=Fa||Ra;var qa=(_a-T(nr))*Ut;nr.y0+=qa,nr.y1+=qa}})})}function ot(){Ae.forEach(function(Ut){var Ct,Pt,jt=je,cr=Ut.length,or;for(Ut.sort(m),or=0;or0&&(Ct.y0+=Pt,Ct.y1+=Pt),jt=Ct.y1+Ve;if(Pt=jt-Ve-nt,Pt>0)for(jt=Ct.y0-=Pt,Ct.y1-=Pt,or=cr-2;or>=0;--or)Ct=Ut[or],Pt=Ct.y1+Ve-jt,Pt>0&&(Ct.y0-=Pt,Ct.y1-=Pt),jt=Ct.y0})}}function Ur(_t){_t.nodes.forEach(function(Fe){Fe.sourceLinks.sort(f),Fe.targetLinks.sort(h)}),_t.nodes.forEach(function(Fe){var Ye=Fe.y0,Ae=Ye,Le=Fe.y1,We=Le;Fe.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Le-Ke.width/2,Le=Le-Ke.width):(Ke.y0=Ye+Ke.width/2,Ye+=Ke.width)}),Fe.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=Ae+Ke.width/2,Ae+=Ke.width)})})}return kt}function D(Pe,je,at){var nt=0;if(at===null){for(var tt=[],Ve=0;Veje.source.column)}function N(Pe,je){var at=0;Pe.sourceLinks.forEach(function(tt){at=tt.circular&&!Se(tt,je)?at+1:at});var nt=0;return Pe.targetLinks.forEach(function(tt){nt=tt.circular&&!Se(tt,je)?nt+1:nt}),at+nt}function O(Pe){var je=Pe.source.sourceLinks,at=0;je.forEach(function(Ve){at=Ve.circular?at+1:at});var nt=Pe.target.targetLinks,tt=0;return nt.forEach(function(Ve){tt=Ve.circular?tt+1:tt}),!(at>1||tt>1)}function L(Pe,je,at){return Pe.sort(W),Pe.forEach(function(nt,tt){var Ve=0;if(Se(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=Ve+nt.width/2;else{var he=0;for(he;heVe?se:Ve}nt.circularPathData.verticalBuffer=Ve+nt.width/2}}),Pe}function U(Pe,je,at,nt){var tt=5,Ve=_.min(Pe.links,function(ne){return ne.source.y0});Pe.links.forEach(function(ne){ne.circular&&(ne.circularPathData={})});var he=Pe.links.filter(function(ne){return ne.circularLinkType=="top"});L(he,je,nt);var se=Pe.links.filter(function(ne){return ne.circularLinkType=="bottom"});L(se,je,nt),Pe.links.forEach(function(ne){if(ne.circular){if(ne.circularPathData.arcRadius=ne.width+u,ne.circularPathData.leftNodeBuffer=tt,ne.circularPathData.rightNodeBuffer=tt,ne.circularPathData.sourceWidth=ne.source.x1-ne.source.x0,ne.circularPathData.sourceX=ne.source.x0+ne.circularPathData.sourceWidth,ne.circularPathData.targetX=ne.target.x0,ne.circularPathData.sourceY=ne.y0,ne.circularPathData.targetY=ne.y1,Se(ne,nt)&&O(ne))ne.circularPathData.leftSmallArcRadius=u+ne.width/2,ne.circularPathData.leftLargeArcRadius=u+ne.width/2,ne.circularPathData.rightSmallArcRadius=u+ne.width/2,ne.circularPathData.rightLargeArcRadius=u+ne.width/2,ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=ne.source.y1+d+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=ne.source.y0-d-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius);else{var Ce=ne.source.column,Ze=ne.circularLinkType,rt=Pe.links.filter(function(kt){return kt.source.column==Ce&&kt.circularLinkType==Ze});ne.circularLinkType=="bottom"?rt.sort(ue):rt.sort($);var Je=0;rt.forEach(function(kt,Bt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.leftSmallArcRadius=u+ne.width/2+Je,ne.circularPathData.leftLargeArcRadius=u+ne.width/2+Bt*je+Je),Je=Je+kt.width}),Ce=ne.target.column,rt=Pe.links.filter(function(kt){return kt.target.column==Ce&&kt.circularLinkType==Ze}),ne.circularLinkType=="bottom"?rt.sort(de):rt.sort(ce),Je=0,rt.forEach(function(kt,Bt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.rightSmallArcRadius=u+ne.width/2+Je,ne.circularPathData.rightLargeArcRadius=u+ne.width/2+Bt*je+Je),Je=Je+kt.width}),ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=Math.max(at,ne.source.y1,ne.target.y1)+d+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=Ve-d-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius)}ne.circularPathData.leftInnerExtent=ne.circularPathData.sourceX+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightInnerExtent=ne.circularPathData.targetX-ne.circularPathData.rightNodeBuffer,ne.circularPathData.leftFullExtent=ne.circularPathData.sourceX+ne.circularPathData.leftLargeArcRadius+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightFullExtent=ne.circularPathData.targetX-ne.circularPathData.rightLargeArcRadius-ne.circularPathData.rightNodeBuffer}if(ne.circular)ne.path=B(ne);else{var St=M.linkHorizontal().source(function(kt){var Bt=kt.source.x0+(kt.source.x1-kt.source.x0),Vt=kt.y0;return[Bt,Vt]}).target(function(kt){var Bt=kt.target.x0,Vt=kt.y1;return[Bt,Vt]});ne.path=St(ne)}})}function B(Pe){var je="";return Pe.circularLinkType=="top"?je="M"+Pe.circularPathData.sourceX+" "+Pe.circularPathData.sourceY+" L"+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.sourceY+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Pe.circularPathData.leftFullExtent+" "+(Pe.circularPathData.sourceY-Pe.circularPathData.leftSmallArcRadius)+" L"+Pe.circularPathData.leftFullExtent+" "+Pe.circularPathData.verticalLeftInnerExtent+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" L"+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Pe.circularPathData.rightFullExtent+" "+Pe.circularPathData.verticalRightInnerExtent+" L"+Pe.circularPathData.rightFullExtent+" "+(Pe.circularPathData.targetY-Pe.circularPathData.rightSmallArcRadius)+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.targetY+" L"+Pe.circularPathData.targetX+" "+Pe.circularPathData.targetY:je="M"+Pe.circularPathData.sourceX+" "+Pe.circularPathData.sourceY+" L"+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.sourceY+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Pe.circularPathData.leftFullExtent+" "+(Pe.circularPathData.sourceY+Pe.circularPathData.leftSmallArcRadius)+" L"+Pe.circularPathData.leftFullExtent+" "+Pe.circularPathData.verticalLeftInnerExtent+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" L"+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Pe.circularPathData.rightFullExtent+" "+Pe.circularPathData.verticalRightInnerExtent+" L"+Pe.circularPathData.rightFullExtent+" "+(Pe.circularPathData.targetY+Pe.circularPathData.rightSmallArcRadius)+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.targetY+" L"+Pe.circularPathData.targetX+" "+Pe.circularPathData.targetY,je}function W(Pe,je){return Y(Pe)==Y(je)?Pe.circularLinkType=="bottom"?ue(Pe,je):$(Pe,je):Y(je)-Y(Pe)}function $(Pe,je){return Pe.y0-je.y0}function ue(Pe,je){return je.y0-Pe.y0}function ce(Pe,je){return Pe.y1-je.y1}function de(Pe,je){return je.y1-Pe.y1}function Y(Pe){return Pe.target.column-Pe.source.column}function X(Pe){return Pe.target.x0-Pe.source.x1}function Q(Pe,je){var at=z(Pe),nt=X(je)/Math.tan(at),tt=we(Pe)=="up"?Pe.y1+nt:Pe.y1-nt;return tt}function V(Pe,je){var at=z(Pe),nt=X(je)/Math.tan(at),tt=we(Pe)=="up"?Pe.y1-nt:Pe.y1+nt;return tt}function le(Pe,je,at,nt){Pe.links.forEach(function(tt){if(!tt.circular&&tt.target.column-tt.source.column>1){var Ve=tt.source.column+1,he=tt.target.column-1,se=1,ne=he-Ve+1;for(se=1;Ve<=he;Ve++,se++)Pe.nodes.forEach(function(Ce){if(Ce.column==Ve){var Ze=se/(ne+1),rt=Math.pow(1-Ze,3),Je=3*Ze*Math.pow(1-Ze,2),St=3*Math.pow(Ze,2)*(1-Ze),kt=Math.pow(Ze,3),Bt=rt*tt.y0+Je*tt.y0+St*tt.y1+kt*tt.y1,Vt=Bt-tt.width/2,Ar=Bt+tt.width/2,vr;Vt>Ce.y0&&VtCe.y0&&ArCe.y1&&j(qr,vr,je,at)})):VtCe.y1&&(vr=Ar-Ce.y0+10,Ce=j(Ce,vr,je,at),Pe.nodes.forEach(function(qr){b(qr,nt)==b(Ce,nt)||qr.column!=Ce.column||qr.y0Ce.y1&&j(qr,vr,je,at)}))}})}})}function ae(Pe,je){return Pe.y0>je.y0&&Pe.y0je.y0&&Pe.y1je.y1}function j(Pe,je,at,nt){return Pe.y0+je>=at&&Pe.y1+je<=nt&&(Pe.y0=Pe.y0+je,Pe.y1=Pe.y1+je,Pe.targetLinks.forEach(function(tt){tt.y1=tt.y1+je}),Pe.sourceLinks.forEach(function(tt){tt.y0=tt.y0+je})),Pe}function ee(Pe,je,at,nt){Pe.nodes.forEach(function(tt){nt&&tt.y+(tt.y1-tt.y0)>je&&(tt.y=tt.y-(tt.y+(tt.y1-tt.y0)-je));var Ve=Pe.links.filter(function(ne){return b(ne.source,at)==b(tt,at)}),he=Ve.length;he>1&&Ve.sort(function(ne,Ce){if(!ne.circular&&!Ce.circular){if(ne.target.column==Ce.target.column)return ne.y1-Ce.y1;if(pe(ne,Ce)){if(ne.target.column>Ce.target.column){var Ze=V(Ce,ne);return ne.y1-Ze}if(Ce.target.column>ne.target.column){var rt=V(ne,Ce);return rt-Ce.y1}}else return ne.y1-Ce.y1}if(ne.circular&&!Ce.circular)return ne.circularLinkType=="top"?-1:1;if(Ce.circular&&!ne.circular)return Ce.circularLinkType=="top"?1:-1;if(ne.circular&&Ce.circular)return ne.circularLinkType===Ce.circularLinkType&&ne.circularLinkType=="top"?ne.target.column===Ce.target.column?ne.target.y1-Ce.target.y1:Ce.target.column-ne.target.column:ne.circularLinkType===Ce.circularLinkType&&ne.circularLinkType=="bottom"?ne.target.column===Ce.target.column?Ce.target.y1-ne.target.y1:ne.target.column-Ce.target.column:ne.circularLinkType=="top"?-1:1});var se=tt.y0;Ve.forEach(function(ne){ne.y0=se+ne.width/2,se=se+ne.width}),Ve.forEach(function(ne,Ce){if(ne.circularLinkType=="bottom"){var Ze=Ce+1,rt=0;for(Ze;Ze1&&tt.sort(function(se,ne){if(!se.circular&&!ne.circular){if(se.source.column==ne.source.column)return se.y0-ne.y0;if(pe(se,ne)){if(ne.source.column0?"up":"down"}function Se(Pe,je){return b(Pe.source,je)==b(Pe.target,je)}function Re(Pe,je,at){var nt=Pe.nodes,tt=Pe.links,Ve=!1,he=!1;if(tt.forEach(function(Je){Je.circularLinkType=="top"?Ve=!0:Je.circularLinkType=="bottom"&&(he=!0)}),Ve==!1||he==!1){var se=_.min(nt,function(Je){return Je.y0}),ne=_.max(nt,function(Je){return Je.y1}),Ce=ne-se,Ze=at-je,rt=Ze/Ce;nt.forEach(function(Je){var St=(Je.y1-Je.y0)*rt;Je.y0=(Je.y0-se)*rt,Je.y1=Je.y0+St}),tt.forEach(function(Je){Je.y0=(Je.y0-se)*rt,Je.y1=(Je.y1-se)*rt,Je.width=Je.width*rt})}}v.sankeyCircular=y,v.sankeyCenter=i,v.sankeyLeft=r,v.sankeyRight=o,v.sankeyJustify=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),j6=He({"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"}}}}),gG=He({"src/traces/sankey/render.js"(Z,q){"use strict";var v=hG(),_=(pg(),zf(d0)).interpolateNumber,S=Vn(),M=dG(),e=mG(),t=j6(),r=Ch(),o=$n(),a=as(),i=sa(),n=i.strTranslate,s=i.strRotate,h=Cv(),f=h.keyFun,m=h.repeat,c=h.unwrap,T=su(),l=so(),x=uh(),w=x.CAP_SHIFT,A=x.LINE_SPACING,E=3;function p(Q,V,le){var ae=c(V),j=ae.trace,ee=j.domain,te=j.orientation==="h",pe=j.node.pad,we=j.node.thickness,Se={justify:M.sankeyJustify,left:M.sankeyLeft,right:M.sankeyRight,center:M.sankeyCenter}[j.node.align],Re=Q.width*(ee.x[1]-ee.x[0]),Pe=Q.height*(ee.y[1]-ee.y[0]),je=ae._nodes,at=ae._links,nt=ae.circular,tt;nt?tt=e.sankeyCircular().circularLinkGap(0):tt=M.sankey(),tt.iterations(t.sankeyIterations).size(te?[Re,Pe]:[Pe,Re]).nodeWidth(we).nodePadding(pe).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Se).nodes(je).links(at);var Ve=tt();tt.nodePadding()=Fe||(_t=Fe-Ur.y0,_t>1e-6&&(Ur.y0+=_t,Ur.y1+=_t)),Fe=Ur.y1+pe})}function Bt(qr){var kr=qr.map(function(We,Ke){return{x0:We.x0,index:Ke}}).sort(function(We,Ke){return We.x0-Ke.x0}),Ur=[],_t=-1,Fe,Ye=-1/0,Ae;for(he=0;heYe+we&&(_t+=1,Fe=Le.x0),Ye=Le.x0,Ur[_t]||(Ur[_t]=[]),Ur[_t].push(Le),Ae=Fe-Le.x0,Le.x0+=Ae,Le.x1+=Ae}return Ur}if(j.node.x.length&&j.node.y.length){for(he=0;he0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(le="M "+(j.targetX-V)+" "+(j.targetY-ae)+" L "+(j.rightInnerExtent-V)+" "+(j.targetY-ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent-ae-V)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ae-V)+" "+j.verticalRightInnerExtent,ee&&te?le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-ae-V)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent+ae-V-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:ee?le+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent-V-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.leftFullExtent+ae+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-V)+" "+(j.verticalFullExtent+ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,le+=" L "+(j.leftFullExtent+ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY+ae)+" L "+j.leftInnerExtent+" "+(j.sourceY+ae)+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ae)+" "+j.verticalLeftInnerExtent,ee&&te?le+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent+ae-V+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent:ee?le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent-V-ae)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent:le+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" L "+(j.rightInnerExtent-V)+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent,le+=" L "+(j.rightFullExtent+ae-V)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightInnerExtent-V)+" "+(j.targetY+ae)+" L "+(j.targetX-V)+" "+(j.targetY+ae)+(V>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),le}function u(){var Q=.5;function V(le){var ae=le.linkArrowLength;if(le.link.circular)return d(le.link,ae);var j=Math.abs((le.link.target.x0-le.link.source.x1)/2);ae>j&&(ae=j);var ee=le.link.source.x1,te=le.link.target.x0-ae,pe=_(ee,te),we=pe(Q),Se=pe(1-Q),Re=le.link.y0-le.link.width/2,Pe=le.link.y0+le.link.width/2,je=le.link.y1-le.link.width/2,at=le.link.y1+le.link.width/2,nt="M"+ee+","+Re,tt="C"+we+","+Re+" "+Se+","+je+" "+te+","+je,Ve="C"+Se+","+at+" "+we+","+Pe+" "+ee+","+Pe,he=ae>0?"L"+(te+ae)+","+(je+le.link.width/2):"";return he+="L"+te+","+at,nt+tt+he+Ve+"Z"}return V}function g(Q,V){var le=r(V.color),ae=t.nodePadAcross,j=Q.nodePad/2;V.dx=V.x1-V.x0,V.dy=V.y1-V.y0;var ee=V.dx,te=Math.max(.5,V.dy),pe="node_"+V.pointNumber;return V.group&&(pe=i.randstr()),V.trace=Q.trace,V.curveNumber=Q.trace.index,{index:V.pointNumber,key:pe,partOfGroup:V.partOfGroup||!1,group:V.group,traceId:Q.key,trace:Q.trace,node:V,nodePad:Q.nodePad,nodeLineColor:Q.nodeLineColor,nodeLineWidth:Q.nodeLineWidth,textFont:Q.textFont,size:Q.horizontal?Q.height:Q.width,visibleWidth:Math.ceil(ee),visibleHeight:te,zoneX:-ae,zoneY:-j,zoneWidth:ee+2*ae,zoneHeight:te+2*j,labelY:Q.horizontal?V.dy/2+1:V.dx/2+1,left:V.originalLayer===1,sizeAcross:Q.width,forceLayouts:Q.forceLayouts,horizontal:Q.horizontal,darkBackground:le.getBrightness()<=128,tinyColorHue:o.tinyRGB(le),tinyColorAlpha:le.getAlpha(),valueFormat:Q.valueFormat,valueSuffix:Q.valueSuffix,sankey:Q.sankey,graph:Q.graph,arrangement:Q.arrangement,uniqueNodeLabelPathId:[Q.guid,Q.key,pe].join("_"),interactionState:Q.interactionState,figure:Q}}function y(Q){Q.attr("transform",function(V){return n(V.node.x0.toFixed(3),V.node.y0.toFixed(3))})}function D(Q){Q.call(y)}function P(Q,V){Q.call(D),V.attr("d",u())}function z(Q){Q.attr("width",function(V){return V.node.x1-V.node.x0}).attr("height",function(V){return V.visibleHeight})}function F(Q){return Q.link.width>1||Q.linkLineWidth>0}function N(Q){var V=n(Q.translateX,Q.translateY);return V+(Q.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(Q,V,le){Q.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.hover(this,ae,V),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.unhover(this,ae,V),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(le.unhover(this,ae,V),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&le.select(this,ae,V)})}function L(Q,V,le,ae){var j=S.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(ae._fullLayout._infolayer,"g","dragcover",function(pe){ae._fullLayout._dragCover=pe}),i.raiseToTop(this),ee.interactionState.dragInProgress=ee.node,ce(ee.node),ee.interactionState.hovered&&(le.nodeEvents.unhover.apply(0,ee.interactionState.hovered),ee.interactionState.hovered=!1),ee.arrangement==="snap")){var te=ee.traceId+"|"+ee.key;ee.forceLayouts[te]?ee.forceLayouts[te].alpha(1):U(Q,te,ee,ae),B(Q,V,ee,te,ae)}}).on("drag",function(ee){if(ee.arrangement!=="fixed"){var te=S.event.x,pe=S.event.y;ee.arrangement==="snap"?(ee.node.x0=te-ee.visibleWidth/2,ee.node.x1=te+ee.visibleWidth/2,ee.node.y0=pe-ee.visibleHeight/2,ee.node.y1=pe+ee.visibleHeight/2):(ee.arrangement==="freeform"&&(ee.node.x0=te-ee.visibleWidth/2,ee.node.x1=te+ee.visibleWidth/2),pe=Math.max(0,Math.min(ee.size-ee.visibleHeight/2,pe)),ee.node.y0=pe-ee.visibleHeight/2,ee.node.y1=pe+ee.visibleHeight/2),ce(ee.node),ee.arrangement!=="snap"&&(ee.sankey.update(ee.graph),P(Q.filter(de(ee)),V))}}).on("dragend",function(ee){if(ee.arrangement!=="fixed"){ee.interactionState.dragInProgress=!1;for(var te=0;te0)window.requestAnimationFrame(ee);else{var we=le.node.originalX;le.node.x0=we-le.visibleWidth/2,le.node.x1=we+le.visibleWidth/2,$(le,j)}})}function W(Q,V,le,ae){return function(){for(var ee=0,te=0;te0&&ae.forceLayouts[V].alpha(0)}}function $(Q,V){for(var le=[],ae=[],j=0;j"),color:x(Y,"bgcolor")||t.addOpacity(ae.color,1),borderColor:x(Y,"bordercolor"),fontFamily:x(Y,"font.family"),fontSize:x(Y,"font.size"),fontColor:x(Y,"font.color"),fontWeight:x(Y,"font.weight"),fontStyle:x(Y,"font.style"),fontVariant:x(Y,"font.variant"),fontTextcase:x(Y,"font.textcase"),fontLineposition:x(Y,"font.lineposition"),fontShadow:x(Y,"font.shadow"),nameLength:x(Y,"namelength"),textAlign:x(Y,"align"),idealAlign:v.event.x"),color:x(Y,"bgcolor")||de.tinyColorHue,borderColor:x(Y,"bordercolor"),fontFamily:x(Y,"font.family"),fontSize:x(Y,"font.size"),fontColor:x(Y,"font.color"),fontWeight:x(Y,"font.weight"),fontStyle:x(Y,"font.style"),fontVariant:x(Y,"font.variant"),fontTextcase:x(Y,"font.textcase"),fontLineposition:x(Y,"font.lineposition"),fontShadow:x(Y,"font.shadow"),nameLength:x(Y,"namelength"),textAlign:x(Y,"align"),idealAlign:"left",hovertemplate:Y.hovertemplate,hovertemplateLabels:ee,eventData:[de.node]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:A});n(we,.85),s(we)}}},ue=function(ce,de,Y){A._fullLayout.hovermode!==!1&&(v.select(ce).call(c,de,Y),de.node.trace.node.hoverinfo!=="skip"&&(de.node.fullData=de.node.trace,A.emit("plotly_unhover",{event:v.event,points:[de.node]})),e.loneUnhover(p._hoverlayer.node()))};M(A,b,E,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:D,follow:L,unhover:U,select:y},nodeEvents:{hover:W,follow:$,unhover:ue,select:B}})}}}),yG=He({"src/traces/sankey/base_plot.js"(Z){"use strict";var q=pc().overrideAll,v=Wh().getModuleCalcData,_=q6(),S=Ym(),M=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=so(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=q({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(n){var s=v(n.calcdata,a)[0];_(n,s),Z.updateFx(n)},Z.clean=function(n,s,h,f){var m=f._has&&f._has(a),c=s._has&&s._has(a);m&&!c&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(n){for(var s=0;s0}q.exports=function(F,N,O,L){var U=F._fullLayout,B;w(O)&&L&&(B=L()),M.makeTraceGroups(U._indicatorlayer,N,"trace").each(function(W){var $=W[0],ue=$.trace,ce=v.select(this),de=ue._hasGauge,Y=ue._isAngular,X=ue._isBullet,Q=ue.domain,V={w:U._size.w*(Q.x[1]-Q.x[0]),h:U._size.h*(Q.y[1]-Q.y[0]),l:U._size.l+U._size.w*Q.x[0],r:U._size.r+U._size.w*(1-Q.x[1]),t:U._size.t+U._size.h*(1-Q.y[1]),b:U._size.b+U._size.h*Q.y[0]},le=V.l+V.w/2,ae=V.t+V.h/2,j=Math.min(V.w/2,V.h),ee=i.innerRadius*j,te,pe,we,Se=ue.align||"center";if(pe=ae,!de)te=V.l+l[Se]*V.w,we=function(ne){return g(ne,V.w,V.h)};else if(Y&&(te=le,pe=ae+j/2,we=function(ne){return y(ne,.9*ee)}),X){var Re=i.bulletPadding,Pe=1-i.bulletNumberDomainSize+Re;te=V.l+(Pe+(1-Pe)*l[Se])*V.w,we=function(ne){return g(ne,(i.bulletNumberDomainSize-Re)*V.w,V.h)}}p(F,ce,W,{numbersX:te,numbersY:pe,numbersScaler:we,transitionOpts:O,onComplete:B});var je,at;de&&(je={range:ue.gauge.axis.range,color:ue.gauge.bgcolor,line:{color:ue.gauge.bordercolor,width:0},thickness:1},at={range:ue.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ue.gauge.bordercolor,width:ue.gauge.borderwidth},thickness:1});var nt=ce.selectAll("g.angular").data(Y?W:[]);nt.exit().remove();var tt=ce.selectAll("g.angularaxis").data(Y?W:[]);tt.exit().remove(),Y&&E(F,ce,W,{radius:j,innerRadius:ee,gauge:nt,layer:tt,size:V,gaugeBg:je,gaugeOutline:at,transitionOpts:O,onComplete:B});var Ve=ce.selectAll("g.bullet").data(X?W:[]);Ve.exit().remove();var he=ce.selectAll("g.bulletaxis").data(X?W:[]);he.exit().remove(),X&&A(F,ce,W,{gauge:Ve,layer:he,size:V,gaugeBg:je,gaugeOutline:at,transitionOpts:O,onComplete:B});var se=ce.selectAll("text.title").data(W);se.exit().remove(),se.enter().append("text").classed("title",!0),se.attr("text-anchor",function(){return X?T.right:T[ue.title.align]}).text(ue.title.text).call(a.font,ue.title.font).call(n.convertToTspans,F),se.attr("transform",function(){var ne=V.l+V.w*l[ue.title.align],Ce,Ze=i.titlePadding,rt=a.bBox(se.node());if(de){if(Y)if(ue.gauge.axis.visible){var Je=a.bBox(tt.node());Ce=Je.top-Ze-rt.bottom}else Ce=V.t+V.h/2-j/2-rt.bottom-Ze;X&&(Ce=pe-(rt.top+rt.bottom)/2,ne=V.l-i.bulletPadding*V.w)}else Ce=ue._numbersTop-Ze-rt.bottom;return t(ne,Ce)})})};function A(z,F,N,O){var L=N[0].trace,U=O.gauge,B=O.layer,W=O.gaugeBg,$=O.gaugeOutline,ue=O.size,ce=L.domain,de=O.transitionOpts,Y=O.onComplete,X,Q,V,le,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(ue.l,ue.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=ue.h,ee=L.gauge.bar.thickness*j,te=ce.x[0],pe=ce.x[0]+(ce.x[1]-ce.x[0])*(L._hasNumber||L._hasDelta?1-i.bulletNumberDomainSize:1);X=u(z,L.gauge.axis),X._id="xbulletaxis",X.domain=[te,pe],X.setScale(),Q=s.calcTicks(X),V=s.makeTransTickFn(X),le=s.getTickSigns(X)[2],ae=ue.t+ue.h,X.visible&&(s.drawTicks(z,X,{vals:X.ticks==="inside"?s.clipEnds(X,Q):Q,layer:B,path:s.makeTickPath(X,ae,le),transFn:V}),s.drawLabels(z,X,{vals:Q,layer:B,transFn:V,labelFns:s.makeLabelFns(X,ae)}));function we(tt){tt.attr("width",function(Ve){return Math.max(0,X.c2p(Ve.range[1])-X.c2p(Ve.range[0]))}).attr("x",function(Ve){return X.c2p(Ve.range[0])}).attr("y",function(Ve){return .5*(1-Ve.thickness)*j}).attr("height",function(Ve){return Ve.thickness*j})}var Se=[W].concat(L.gauge.steps),Re=U.selectAll("g.bg-bullet").data(Se);Re.enter().append("g").classed("bg-bullet",!0).append("rect"),Re.select("rect").call(we).call(b),Re.exit().remove();var Pe=U.selectAll("g.value-bullet").data([L.gauge.bar]);Pe.enter().append("g").classed("value-bullet",!0).append("rect"),Pe.select("rect").attr("height",ee).attr("y",(j-ee)/2).call(b),w(de)?Pe.select("rect").transition().duration(de.duration).ease(de.easing).each("end",function(){Y&&Y()}).each("interrupt",function(){Y&&Y()}).attr("width",Math.max(0,X.c2p(Math.min(L.gauge.axis.range[1],N[0].y)))):Pe.select("rect").attr("width",typeof N[0].y=="number"?Math.max(0,X.c2p(Math.min(L.gauge.axis.range[1],N[0].y))):0),Pe.exit().remove();var je=N.filter(function(){return L.gauge.threshold.value||L.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(je);at.enter().append("g").classed("threshold-bullet",!0).append("line"),at.select("line").attr("x1",X.c2p(L.gauge.threshold.value)).attr("x2",X.c2p(L.gauge.threshold.value)).attr("y1",(1-L.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-L.gauge.threshold.thickness)/2)*j).call(c.stroke,L.gauge.threshold.line.color).style("stroke-width",L.gauge.threshold.line.width),at.exit().remove();var nt=U.selectAll("g.gauge-outline").data([$]);nt.enter().append("g").classed("gauge-outline",!0).append("rect"),nt.select("rect").call(we).call(b),nt.exit().remove()}function E(z,F,N,O){var L=N[0].trace,U=O.size,B=O.radius,W=O.innerRadius,$=O.gaugeBg,ue=O.gaugeOutline,ce=[U.l+U.w/2,U.t+U.h/2+B/2],de=O.gauge,Y=O.layer,X=O.transitionOpts,Q=O.onComplete,V=Math.PI/2;function le(St){var kt=L.gauge.axis.range[0],Bt=L.gauge.axis.range[1],Vt=(St-kt)/(Bt-kt)*Math.PI-V;return Vt<-V?-V:Vt>V?V:Vt}function ae(St){return v.svg.arc().innerRadius((W+B)/2-St/2*(B-W)).outerRadius((W+B)/2+St/2*(B-W)).startAngle(-V)}function j(St){St.attr("d",function(kt){return ae(kt.thickness).startAngle(le(kt.range[0])).endAngle(le(kt.range[1]))()})}var ee,te,pe,we;de.enter().append("g").classed("angular",!0),de.attr("transform",t(ce[0],ce[1])),Y.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),Y.selectAll("g.xangularaxistick,path,text").remove(),ee=u(z,L.gauge.axis),ee.type="linear",ee.range=L.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var Se=function(St){return(ee.range[0]-St.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Re={},Pe=s.makeLabelFns(ee,0),je=Pe.labelStandoff;Re.xFn=function(St){var kt=Se(St);return Math.cos(kt)*je},Re.yFn=function(St){var kt=Se(St),Bt=Math.sin(kt)>0?.2:1;return-Math.sin(kt)*(je+St.fontSize*Bt)+Math.abs(Math.cos(kt))*(St.fontSize*o)},Re.anchorFn=function(St){var kt=Se(St),Bt=Math.cos(kt);return Math.abs(Bt)<.1?"middle":Bt>0?"start":"end"},Re.heightFn=function(St,kt,Bt){var Vt=Se(St);return-.5*(1+Math.sin(Vt))*Bt};var at=function(St){return t(ce[0]+B*Math.cos(St),ce[1]-B*Math.sin(St))};pe=function(St){return at(Se(St))};var nt=function(St){var kt=Se(St);return at(kt)+"rotate("+-r(kt)+")"};if(te=s.calcTicks(ee),we=s.getTickSigns(ee)[2],ee.visible){we=ee.ticks==="inside"?-1:1;var tt=(ee.linewidth||1)/2;s.drawTicks(z,ee,{vals:te,layer:Y,path:"M"+we*tt+",0h"+we*ee.ticklen,transFn:nt}),s.drawLabels(z,ee,{vals:te,layer:Y,transFn:pe,labelFns:Re})}var Ve=[$].concat(L.gauge.steps),he=de.selectAll("g.bg-arc").data(Ve);he.enter().append("g").classed("bg-arc",!0).append("path"),he.select("path").call(j).call(b),he.exit().remove();var se=ae(L.gauge.bar.thickness),ne=de.selectAll("g.value-arc").data([L.gauge.bar]);ne.enter().append("g").classed("value-arc",!0).append("path");var Ce=ne.select("path");w(X)?(Ce.transition().duration(X.duration).ease(X.easing).each("end",function(){Q&&Q()}).each("interrupt",function(){Q&&Q()}).attrTween("d",d(se,le(N[0].lastY),le(N[0].y))),L._lastValue=N[0].y):Ce.attr("d",typeof N[0].y=="number"?se.endAngle(le(N[0].y)):"M0,0Z"),Ce.call(b),ne.exit().remove(),Ve=[];var Ze=L.gauge.threshold.value;(Ze||Ze===0)&&Ve.push({range:[Ze,Ze],color:L.gauge.threshold.color,line:{color:L.gauge.threshold.line.color,width:L.gauge.threshold.line.width},thickness:L.gauge.threshold.thickness});var rt=de.selectAll("g.threshold-arc").data(Ve);rt.enter().append("g").classed("threshold-arc",!0).append("path"),rt.select("path").call(j).call(b),rt.exit().remove();var Je=de.selectAll("g.gauge-outline").data([ue]);Je.enter().append("g").classed("gauge-outline",!0).append("path"),Je.select("path").call(j).call(b),Je.exit().remove()}function p(z,F,N,O){var L=N[0].trace,U=O.numbersX,B=O.numbersY,W=L.align||"center",$=T[W],ue=O.transitionOpts,ce=O.onComplete,de=M.ensureSingle(F,"g","numbers"),Y,X,Q,V=[];L._hasNumber&&V.push("number"),L._hasDelta&&(V.push("delta"),L.delta.position==="left"&&V.reverse());var le=de.selectAll("text").data(V);le.enter().append("text"),le.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),le.exit().remove();function ae(at,nt,tt,Ve){if(at.match("s")&&tt>=0!=Ve>=0&&!nt(tt).slice(-1).match(x)&&!nt(Ve).slice(-1).match(x)){var he=at.slice().replace("s","f").replace(/\d+/,function(ne){return parseInt(ne)-1}),se=u(z,{tickformat:he});return function(ne){return Math.abs(ne)<1?s.tickText(se,ne).text:nt(ne)}}else return nt}function j(){var at=u(z,{tickformat:L.number.valueformat},L._range);at.setScale(),s.prepTicks(at);var nt=function(ne){return s.tickText(at,ne).text},tt=L.number.suffix,Ve=L.number.prefix,he=de.select("text.number");function se(){var ne=typeof N[0].y=="number"?Ve+nt(N[0].y)+tt:"-";he.text(ne).call(a.font,L.number.font).call(n.convertToTspans,z)}return w(ue)?he.transition().duration(ue.duration).ease(ue.easing).each("end",function(){se(),ce&&ce()}).each("interrupt",function(){se(),ce&&ce()}).attrTween("text",function(){var ne=v.select(this),Ce=S(N[0].lastY,N[0].y);L._lastValue=N[0].y;var Ze=ae(L.number.valueformat,nt,N[0].lastY,N[0].y);return function(rt){ne.text(Ve+Ze(Ce(rt))+tt)}}):se(),Y=D(Ve+nt(N[0].y)+tt,L.number.font,$,z),he}function ee(){var at=u(z,{tickformat:L.delta.valueformat},L._range);at.setScale(),s.prepTicks(at);var nt=function(rt){return s.tickText(at,rt).text},tt=L.delta.suffix,Ve=L.delta.prefix,he=function(rt){var Je=L.delta.relative?rt.relativeDelta:rt.delta;return Je},se=function(rt,Je){return rt===0||typeof rt!="number"||isNaN(rt)?"-":(rt>0?L.delta.increasing.symbol:L.delta.decreasing.symbol)+Ve+Je(rt)+tt},ne=function(rt){return rt.delta>=0?L.delta.increasing.color:L.delta.decreasing.color};L._deltaLastValue===void 0&&(L._deltaLastValue=he(N[0]));var Ce=de.select("text.delta");Ce.call(a.font,L.delta.font).call(c.fill,ne({delta:L._deltaLastValue}));function Ze(){Ce.text(se(he(N[0]),nt)).call(c.fill,ne(N[0])).call(n.convertToTspans,z)}return w(ue)?Ce.transition().duration(ue.duration).ease(ue.easing).tween("text",function(){var rt=v.select(this),Je=he(N[0]),St=L._deltaLastValue,kt=ae(L.delta.valueformat,nt,St,Je),Bt=S(St,Je);return L._deltaLastValue=Je,function(Vt){rt.text(se(Bt(Vt),kt)),rt.call(c.fill,ne({delta:Bt(Vt)}))}}).each("end",function(){Ze(),ce&&ce()}).each("interrupt",function(){Ze(),ce&&ce()}):Ze(),X=D(se(he(N[0]),nt),L.delta.font,$,z),Ce}var te=L.mode+L.align,pe;if(L._hasDelta&&(pe=ee(),te+=L.delta.position+L.delta.font.size+L.delta.font.family+L.delta.valueformat,te+=L.delta.increasing.symbol+L.delta.decreasing.symbol,Q=X),L._hasNumber&&(j(),te+=L.number.font.size+L.number.font.family+L.number.valueformat+L.number.suffix+L.number.prefix,Q=Y),L._hasDelta&&L._hasNumber){var we=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],Se=[(X.left+X.right)/2,(X.top+X.bottom)/2],Re,Pe,je=.75*L.delta.font.size;L.delta.position==="left"&&(Re=P(L,"deltaPos",0,-1*(Y.width*l[L.align]+X.width*(1-l[L.align])+je),te,Math.min),Pe=we[1]-Se[1],Q={width:Y.width+X.width+je,height:Math.max(Y.height,X.height),left:X.left+Re,right:Y.right,top:Math.min(Y.top,X.top+Pe),bottom:Math.max(Y.bottom,X.bottom+Pe)}),L.delta.position==="right"&&(Re=P(L,"deltaPos",0,Y.width*(1-l[L.align])+X.width*l[L.align]+je,te,Math.max),Pe=we[1]-Se[1],Q={width:Y.width+X.width+je,height:Math.max(Y.height,X.height),left:Y.left,right:X.right+Re,top:Math.min(Y.top,X.top+Pe),bottom:Math.max(Y.bottom,X.bottom+Pe)}),L.delta.position==="bottom"&&(Re=null,Pe=X.height,Q={width:Math.max(Y.width,X.width),height:Y.height+X.height,left:Math.min(Y.left,X.left),right:Math.max(Y.right,X.right),top:Y.bottom-Y.height,bottom:Y.bottom+X.height}),L.delta.position==="top"&&(Re=null,Pe=Y.top,Q={width:Math.max(Y.width,X.width),height:Y.height+X.height,left:Math.min(Y.left,X.left),right:Math.max(Y.right,X.right),top:Y.bottom-Y.height-X.height,bottom:Y.bottom}),pe.attr({dx:Re,dy:Pe})}(L._hasNumber||L._hasDelta)&&de.attr("transform",function(){var at=O.numbersScaler(Q);te+=at[2];var nt=P(L,"numbersScale",1,at[0],te,Math.min),tt;L._scaleNumbers||(nt=1),L._isAngular?tt=B-nt*Q.bottom:tt=B-nt*(Q.top+Q.bottom)/2,L._numbersTop=nt*Q.top+tt;var Ve=Q[W];W==="center"&&(Ve=(Q.left+Q.right)/2);var he=U-nt*Ve;return he=P(L,"numbersTranslate",0,he,te,Math.max),t(he,tt)+e(nt)})}function b(z){z.each(function(F){c.stroke(v.select(this),F.line.color)}).each(function(F){c.fill(v.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function d(z,F,N){return function(){var O=_(F,N);return function(L){return z.endAngle(O(L))()}}}function u(z,F,N){var O=z._fullLayout,L=M.extendFlat({type:"linear",ticks:"outside",range:N,showline:!0},F),U={type:"linear",_id:"x"+F._id},B={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function W($,ue){return M.coerce(L,U,m,$,ue)}return h(L,U,W,B,O),f(L,U,W,B),U}function g(z,F,N){var O=Math.min(F/z.width,N/z.height);return[O,z,F+"x"+N]}function y(z,F){var N=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/N;return[O,z,F]}function D(z,F,N,O){var L=document.createElementNS("http://www.w3.org/2000/svg","text"),U=v.select(L);return U.text(z).attr("x",0).attr("y",0).attr("text-anchor",N).attr("data-unformatted",z).call(n.convertToTspans,O).call(a.font,F),a.bBox(U.node())}function P(z,F,N,O,L,U){var B="_cache"+F;z[B]&&z[B].key===L||(z[B]={key:L,value:N});var W=M.aggNums(U,null,[z[B].value,O],2);return z[B].value=W,W}}}),MG=He({"src/traces/indicator/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"indicator",basePlotModule:wG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:TG().supplyDefaults,calc:AG().calc,plot:SG(),meta:{}}}}),EG=He({"lib/indicator.js"(Z,q){"use strict";q.exports=MG()}}),H6=He({"src/traces/table/attributes.js"(Z,q){"use strict";var v=$0(),_=rs().extendFlat,S=pc().overrideAll,M=tc(),e=wc().attributes,t=rf().descriptionOnlyNumbers,r=q.exports=S({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:_({},v.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:_({},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:_({},v.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:_({},M({arrayOk:!0}))}},"calc","from-root")}}),kG=He({"src/traces/table/defaults.js"(Z,q){"use strict";var v=sa(),_=H6(),S=wc().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(h,f){return h-f}),n=a.map(function(h){return i.indexOf(h)}),s=n.length;s",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"}}}}),LG=He({"src/traces/table/data_preparation_helper.js"(Z,q){"use strict";var v=W6(),_=rs().extendFlat,S=ns(),M=hp().isTypedArray,e=hp().isArrayOrTypedArray;q.exports=function(m,c){var T=o(c.cells.values),l=function($){return $.slice(c.header.values.length,$.length)},x=o(c.header.values);x.length&&!x[0].length&&(x[0]=[""],x=o(x));var w=x.concat(l(T).map(function(){return a((x[0]||[""]).length)})),A=c.domain,E=Math.floor(m._fullLayout._size.w*(A.x[1]-A.x[0])),p=Math.floor(m._fullLayout._size.h*(A.y[1]-A.y[0])),b=c.header.values.length?w[0].map(function(){return c.header.height}):[v.emptyHeaderHeight],d=T.length?T[0].map(function(){return c.cells.height}):[],u=b.reduce(r,0),g=p-u,y=g+v.uplift,D=s(d,y),P=s(b,u),z=n(P,[]),F=n(D,z),N={},O=c._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,ue){return ue})));var L=w.map(function($,ue){var ce=e(c.columnwidth)?c.columnwidth[Math.min(ue,c.columnwidth.length-1)]:c.columnwidth;return S(ce)?Number(ce):1}),U=L.reduce(r,0);L=L.map(function($){return $/U*E});var B=Math.max(t(c.header.line.width),t(c.cells.line.width)),W={key:c.uid+m._context.staticPlot,translateX:A.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-A.y[1]),size:m._fullLayout._size,width:E,maxLineWidth:B,height:p,columnOrder:O,groupHeight:p,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:_({},c.cells,{values:T}),headerCells:_({},c.header,{values:w}),gdColumns:w.map(function($){return $[0]}),gdColumnsOriginalOrder:w.map(function($){return $[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:w.map(function($,ue){var ce=N[$];N[$]=(ce||0)+1;var de=$+"__"+N[$];return{key:de,label:$,specIndex:ue,xIndex:O[ue],xScale:i,x:void 0,calcdata:void 0,columnWidth:L[ue]}})};return W.columns.forEach(function($){$.calcdata=W,$.x=i($)}),W};function t(f){if(e(f)){for(var m=0,c=0;c=m||p===f.length-1)&&(c[l]=w,w.key=E++,w.firstRowIndex=A,w.lastRowIndex=p,w=h(),l+=x,A=p+1,x=0);return c}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),PG=He({"src/traces/table/data_split_helpers.js"(Z){"use strict";var q=rs().extendFlat;Z.splitToPanels=function(_){var S=[0,0],M=q({},_,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:_.calcdata.headerCells.values[_.specIndex],rowBlocks:_.calcdata.headerRowBlocks,calcdata:q({},_.calcdata,{cells:_.calcdata.headerCells})}),e=q({},_,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:_.calcdata.cells.values[_.specIndex],rowBlocks:_.calcdata.rowBlocks}),t=q({},_,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:_.calcdata.cells.values[_.specIndex],rowBlocks:_.calcdata.rowBlocks});return[e,t,M]},Z.splitToCells=function(_){var S=v(_);return(_.values||[]).slice(S[0],S[1]).map(function(M,e){var t=typeof M=="string"&&M.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:_,calcdata:_.calcdata,page:_.page,rowBlocks:_.rowBlocks,value:M}})};function v(_){var S=_.rowBlocks[_.page],M=S?S.rows[0].rowIndex:0,e=S?M+S.rows.length:0;return[M,e]}}}),X6=He({"src/traces/table/plot.js"(Z,q){"use strict";var v=W6(),_=Vn(),S=sa(),M=S.numberFormat,e=Cv(),t=as(),r=su(),o=sa().raiseToTop,a=sa().strTranslate,i=sa().cancelTransition,n=LG(),s=PG(),h=$n();q.exports=function(te,pe){var we=!te._context.staticPlot,Se=te._fullLayout._paper.selectAll("."+v.cn.table).data(pe.map(function(Je){var St=e.unwrap(Je),kt=St.trace;return n(te,kt)}),e.keyFun);Se.exit().remove(),Se.enter().append("g").classed(v.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"),Se.attr("width",function(Je){return Je.width+Je.size.l+Je.size.r}).attr("height",function(Je){return Je.height+Je.size.t+Je.size.b}).attr("transform",function(Je){return a(Je.translateX,Je.translateY)});var Re=Se.selectAll("."+v.cn.tableControlView).data(e.repeat,e.keyFun),Pe=Re.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(we){var je="onwheel"in document?"wheel":"mousewheel";Pe.on("mousemove",function(Je){Re.filter(function(St){return Je===St}).call(l,te)}).on(je,function(Je){if(!Je.scrollbarState.wheeling){Je.scrollbarState.wheeling=!0;var St=Je.scrollY+_.event.deltaY,kt=$(te,Re,null,St)(Je);kt||(_.event.stopPropagation(),_.event.preventDefault()),Je.scrollbarState.wheeling=!1}}).call(l,te,!0)}Re.attr("transform",function(Je){return a(Je.size.l,Je.size.t)});var at=Re.selectAll("."+v.cn.scrollBackground).data(e.repeat,e.keyFun);at.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),at.attr("width",function(Je){return Je.width}).attr("height",function(Je){return Je.height}),Re.each(function(Je){t.setClipUrl(_.select(this),m(te,Je),te)});var nt=Re.selectAll("."+v.cn.yColumn).data(function(Je){return Je.columns},e.keyFun);nt.enter().append("g").classed(v.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Je){return a(Je.x,0)}),we&&nt.call(_.behavior.drag().origin(function(Je){var St=_.select(this);return N(St,Je,-v.uplift),o(this),Je.calcdata.columnDragInProgress=!0,l(Re.filter(function(kt){return Je.calcdata.key===kt.key}),te),Je}).on("drag",function(Je){var St=_.select(this),kt=function(Ar){return(Je===Ar?_.event.x:Ar.x)+Ar.columnWidth/2};Je.x=Math.max(-v.overdrag,Math.min(Je.calcdata.width+v.overdrag-Je.columnWidth,_.event.x));var Bt=T(nt).filter(function(Ar){return Ar.calcdata.key===Je.calcdata.key}),Vt=Bt.sort(function(Ar,vr){return kt(Ar)-kt(vr)});Vt.forEach(function(Ar,vr){Ar.xIndex=vr,Ar.x=Je===Ar?Ar.x:Ar.xScale(Ar)}),nt.filter(function(Ar){return Je!==Ar}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Ar){return a(Ar.x,0)}),St.call(i).attr("transform",a(Je.x,-v.uplift))}).on("dragend",function(Je){var St=_.select(this),kt=Je.calcdata;Je.x=Je.xScale(Je),Je.calcdata.columnDragInProgress=!1,N(St,Je,0),z(te,kt,kt.columns.map(function(Bt){return Bt.xIndex}))})),nt.each(function(Je){t.setClipUrl(_.select(this),c(te,Je),te)});var tt=nt.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,e.keyFun);tt.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Je){return Je.key}),tt.style("cursor",function(Je){return Je.dragHandle?"ew-resize":Je.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Ve=tt.filter(L),he=tt.filter(O);we&&he.call(_.behavior.drag().origin(function(Je){return _.event.stopPropagation(),Je}).on("drag",$(te,Re,-1)).on("dragend",function(){})),x(te,Re,Ve,tt),x(te,Re,he,tt);var se=Re.selectAll("."+v.cn.scrollAreaClip).data(e.repeat,e.keyFun);se.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Je){return m(te,Je)});var ne=se.selectAll("."+v.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);ne.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),ne.attr("width",function(Je){return Je.width+2*v.overdrag}).attr("height",function(Je){return Je.height+v.uplift});var Ce=nt.selectAll("."+v.cn.columnBoundary).data(e.repeat,e.keyFun);Ce.enter().append("g").classed(v.cn.columnBoundary,!0);var Ze=nt.selectAll("."+v.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);Ze.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),Ze.attr("id",function(Je){return c(te,Je)});var rt=Ze.selectAll("."+v.cn.columnBoundaryRect).data(e.repeat,e.keyFun);rt.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),rt.attr("width",function(Je){return Je.columnWidth+2*f(Je)}).attr("height",function(Je){return Je.calcdata.height+2*f(Je)+v.uplift}).attr("x",function(Je){return-f(Je)}).attr("y",function(Je){return-f(Je)}),W(null,he,Re)};function f(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function m(ee,te){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+te.key}function c(ee,te){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+te.calcdata.key+"_"+te.specIndex}function T(ee){return[].concat.apply([],ee.map(function(te){return te})).map(function(te){return te.__data__})}function l(ee,te,pe){function we(nt){var tt=nt.rowBlocks;return Q(tt,tt.length-1)+(tt.length?V(tt[tt.length-1],1/0):1)}var Se=ee.selectAll("."+v.cn.scrollbarKit).data(e.repeat,e.keyFun);Se.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Se.each(function(nt){var tt=nt.scrollbarState;tt.totalHeight=we(nt),tt.scrollableAreaHeight=nt.groupHeight-U(nt),tt.currentlyVisibleHeight=Math.min(tt.totalHeight,tt.scrollableAreaHeight),tt.ratio=tt.currentlyVisibleHeight/tt.totalHeight,tt.barLength=Math.max(tt.ratio*tt.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),tt.barWiggleRoom=tt.currentlyVisibleHeight-tt.barLength,tt.wiggleRoom=Math.max(0,tt.totalHeight-tt.scrollableAreaHeight),tt.topY=tt.barWiggleRoom===0?0:nt.scrollY/tt.wiggleRoom*tt.barWiggleRoom,tt.bottomY=tt.topY+tt.barLength,tt.dragMultiplier=tt.wiggleRoom/tt.barWiggleRoom}).attr("transform",function(nt){var tt=nt.width+v.scrollbarWidth/2+v.scrollbarOffset;return a(tt,U(nt))});var Re=Se.selectAll("."+v.cn.scrollbar).data(e.repeat,e.keyFun);Re.enter().append("g").classed(v.cn.scrollbar,!0);var Pe=Re.selectAll("."+v.cn.scrollbarSlider).data(e.repeat,e.keyFun);Pe.enter().append("g").classed(v.cn.scrollbarSlider,!0),Pe.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var je=Pe.selectAll("."+v.cn.scrollbarGlyph).data(e.repeat,e.keyFun);je.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),je.attr("y2",function(nt){return nt.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||pe?0:.4}),je.transition().delay(0).duration(0),je.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var at=Re.selectAll("."+v.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);at.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(nt){var tt=_.event.y,Ve=this.getBoundingClientRect(),he=nt.scrollbarState,se=tt-Ve.top,ne=_.scale.linear().domain([0,he.scrollableAreaHeight]).range([0,he.totalHeight]).clamp(!0);he.topY<=se&&se<=he.bottomY||$(te,ee,null,ne(se-he.barLength/2))(nt)}).call(_.behavior.drag().origin(function(nt){return _.event.stopPropagation(),nt.scrollbarState.scrollbarScrollInProgress=!0,nt}).on("drag",$(te,ee)).on("dragend",function(){})),at.attr("y2",function(nt){return nt.scrollbarState.scrollableAreaHeight}),te._context.staticPlot&&(je.remove(),at.remove())}function x(ee,te,pe,we){var Se=w(pe),Re=A(Se);d(Re);var Pe=E(Re);g(Pe);var je=b(Re),at=p(je);u(at),y(at,te,we,ee),X(Re)}function w(ee){var te=ee.selectAll("."+v.cn.columnCells).data(e.repeat,e.keyFun);return te.enter().append("g").classed(v.cn.columnCells,!0),te.exit().remove(),te}function A(ee){var te=ee.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(pe){return pe.keyWithinBlock});return te.enter().append("g").classed(v.cn.columnCell,!0),te.exit().remove(),te}function E(ee){var te=ee.selectAll("."+v.cn.cellRect).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("rect").classed(v.cn.cellRect,!0),te}function p(ee){var te=ee.selectAll("."+v.cn.cellText).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){_.event.stopPropagation()}),te}function b(ee){var te=ee.selectAll("."+v.cn.cellTextHolder).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),te}function d(ee){ee.each(function(te,pe){var we=te.calcdata.cells.font,Se=te.column.specIndex,Re={size:F(we.size,Se,pe),color:F(we.color,Se,pe),family:F(we.family,Se,pe),weight:F(we.weight,Se,pe),style:F(we.style,Se,pe),variant:F(we.variant,Se,pe),textcase:F(we.textcase,Se,pe),lineposition:F(we.lineposition,Se,pe),shadow:F(we.shadow,Se,pe)};te.rowNumber=te.key,te.align=F(te.calcdata.cells.align,Se,pe),te.cellBorderWidth=F(te.calcdata.cells.line.width,Se,pe),te.font=Re})}function u(ee){ee.each(function(te){t.font(_.select(this),te.font)})}function g(ee){ee.attr("width",function(te){return te.column.columnWidth}).attr("stroke-width",function(te){return te.cellBorderWidth}).each(function(te){var pe=_.select(this);h.stroke(pe,F(te.calcdata.cells.line.color,te.column.specIndex,te.rowNumber)),h.fill(pe,F(te.calcdata.cells.fill.color,te.column.specIndex,te.rowNumber))})}function y(ee,te,pe,we){ee.text(function(Se){var Re=Se.column.specIndex,Pe=Se.rowNumber,je=Se.value,at=typeof je=="string",nt=at&&je.match(/
/i),tt=!at||nt;Se.mayHaveMarkup=at&&je.match(/[<&>]/);var Ve=D(je);Se.latex=Ve;var he=Ve?"":F(Se.calcdata.cells.prefix,Re,Pe)||"",se=Ve?"":F(Se.calcdata.cells.suffix,Re,Pe)||"",ne=Ve?null:F(Se.calcdata.cells.format,Re,Pe)||null,Ce=he+(ne?M(ne)(Se.value):Se.value)+se,Ze;Se.wrappingNeeded=!Se.wrapped&&!tt&&!Ve&&(Ze=P(Ce)),Se.cellHeightMayIncrease=nt||Ve||Se.mayHaveMarkup||(Ze===void 0?P(Ce):Ze),Se.needsConvertToTspans=Se.mayHaveMarkup||Se.wrappingNeeded||Se.latex;var rt;if(Se.wrappingNeeded){var Je=v.wrapSplitCharacter===" "?Ce.replace(/Se&&we.push(Re),Se+=at}return we}function W(ee,te,pe){var we=T(te)[0];if(we!==void 0){var Se=we.rowBlocks,Re=we.calcdata,Pe=Q(Se,Se.length),je=we.calcdata.groupHeight-U(we),at=Re.scrollY=Math.max(0,Math.min(Pe-je,Re.scrollY)),nt=B(Se,at,je);nt.length===1&&(nt[0]===Se.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),te.each(function(tt,Ve){tt.page=nt[Ve],tt.scrollY=at}),te.attr("transform",function(tt){var Ve=Q(tt.rowBlocks,tt.page)-tt.scrollY;return a(0,Ve)}),ee&&(ue(ee,pe,te,nt,we.prevPages,we,0),ue(ee,pe,te,nt,we.prevPages,we,1),l(pe,ee))}}function $(ee,te,pe,we){return function(Re){var Pe=Re.calcdata?Re.calcdata:Re,je=te.filter(function(Ve){return Pe.key===Ve.key}),at=pe||Pe.scrollbarState.dragMultiplier,nt=Pe.scrollY;Pe.scrollY=we===void 0?Pe.scrollY+at*_.event.dy:we;var tt=je.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(O);return W(ee,tt,je),Pe.scrollY===nt}}function ue(ee,te,pe,we,Se,Re,Pe){var je=we[Pe]!==Se[Pe];je&&(clearTimeout(Re.currentRepaint[Pe]),Re.currentRepaint[Pe]=setTimeout(function(){var at=pe.filter(function(nt,tt){return tt===Pe&&we[tt]!==Se[tt]});x(ee,te,at,pe),Se[Pe]=we[Pe]}))}function ce(ee,te,pe,we){return function(){var Re=_.select(te.parentNode);Re.each(function(Pe){var je=Pe.fragments;Re.selectAll("tspan.line").each(function(Ce,Ze){je[Ze].width=this.getComputedTextLength()});var at=je[je.length-1].width,nt=je.slice(0,-1),tt=[],Ve,he,se=0,ne=Pe.column.columnWidth-2*v.cellPad;for(Pe.value="";nt.length;)Ve=nt.shift(),he=Ve.width+at,se+he>ne&&(Pe.value+=tt.join(v.wrapSpacer)+v.lineBreaker,tt=[],se=0),tt.push(Ve.text),se+=he;se&&(Pe.value+=tt.join(v.wrapSpacer)),Pe.wrapped=!0}),Re.selectAll("tspan.line").remove(),y(Re.select("."+v.cn.cellText),pe,ee,we),_.select(te.parentNode.parentNode).call(X)}}function de(ee,te,pe,we,Se){return function(){if(!Se.settledY){var Pe=_.select(te.parentNode),je=ae(Se),at=Se.key-je.firstRowIndex,nt=je.rows[at].rowHeight,tt=Se.cellHeightMayIncrease?te.parentNode.getBoundingClientRect().height+2*v.cellPad:nt,Ve=Math.max(tt,nt),he=Ve-je.rows[at].rowHeight;he&&(je.rows[at].rowHeight=Ve,ee.selectAll("."+v.cn.columnCell).call(X),W(null,ee.filter(O),0),l(pe,we,!0)),Pe.attr("transform",function(){var se=this,ne=se.parentNode,Ce=ne.getBoundingClientRect(),Ze=_.select(se.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),rt=se.transform.baseVal.consolidate(),Je=Ze.top-Ce.top+(rt?rt.matrix.f:v.cellPad);return a(Y(Se,_.select(se.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Je)}),Se.settledY=!0}}}function Y(ee,te){switch(ee.align){case"left":return v.cellPad;case"right":return ee.column.columnWidth-(te||0)-v.cellPad;case"center":return(ee.column.columnWidth-(te||0))/2;default:return v.cellPad}}function X(ee){ee.attr("transform",function(te){var pe=te.rowBlocks[0].auxiliaryBlocks.reduce(function(Pe,je){return Pe+V(je,1/0)},0),we=ae(te),Se=V(we,te.key),Re=Se+pe;return a(0,Re)}).selectAll("."+v.cn.cellRect).attr("height",function(te){return j(ae(te),te.key).rowHeight})}function Q(ee,te){for(var pe=0,we=te-1;we>=0;we--)pe+=le(ee[we]);return pe}function V(ee,te){for(var pe=0,we=0;weM.length&&(S=S.slice(0,M.length)):S=[],t=0;t90&&(m-=180,i=-i),{angle:m,flip:i,p:_.c2p(e,S,M),offsetMultplier:n}}}}),jG=He({"src/traces/carpet/plot.js"(Z,q){"use strict";var v=Vn(),_=as(),S=Z6(),M=Y6(),e=UG(),t=su(),r=sa(),o=r.strRotate,a=r.strTranslate,i=uh();q.exports=function(x,w,A,E){var p=x._context.staticPlot,b=w.xaxis,d=w.yaxis,u=x._fullLayout,g=u._clips;r.makeTraceGroups(E,A,"trace").each(function(y){var D=v.select(this),P=y[0],z=P.trace,F=z.aaxis,N=z.baxis,O=r.ensureSingle(D,"g","minorlayer"),L=r.ensureSingle(D,"g","majorlayer"),U=r.ensureSingle(D,"g","boundarylayer"),B=r.ensureSingle(D,"g","labellayer");D.style("opacity",z.opacity),s(b,d,L,F,"a",F._gridlines,!0,p),s(b,d,L,N,"b",N._gridlines,!0,p),s(b,d,O,F,"a",F._minorgridlines,!0,p),s(b,d,O,N,"b",N._minorgridlines,!0,p),s(b,d,U,F,"a-boundary",F._boundarylines,p),s(b,d,U,N,"b-boundary",N._boundarylines,p);var W=h(x,b,d,z,P,B,F._labels,"a-label"),$=h(x,b,d,z,P,B,N._labels,"b-label");f(x,B,z,P,b,d,W,$),n(z,P,g,b,d)})};function n(l,x,w,A,E){var p,b,d,u,g=w.select("#"+l._clipPathId);g.size()||(g=w.append("clipPath").classed("carpetclip",!0));var y=r.ensureSingle(g,"path","carpetboundary"),D=x.clipsegments,P=[];for(u=0;u0?"start":"end","data-notex":1}).call(_.font,D.font).text(D.text).call(t.convertToTspans,l),L=_.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(D.axis.labelpadding*N,L.height*.3)),g=Math.max(g,L.width+D.axis.labelpadding)}),u.exit().remove(),y.maxExtent=g,y}function f(l,x,w,A,E,p,b,d){var u,g,y,D,P=r.aggNums(Math.min,null,w.a),z=r.aggNums(Math.max,null,w.a),F=r.aggNums(Math.min,null,w.b),N=r.aggNums(Math.max,null,w.b);u=.5*(P+z),g=F,y=w.ab2xy(u,g,!0),D=w.dxyda_rough(u,g),b.angle===void 0&&r.extendFlat(b,e(w,E,p,y,w.dxydb_rough(u,g))),T(l,x,w,A,y,D,w.aaxis,E,p,b,"a-title"),u=P,g=.5*(F+N),y=w.ab2xy(u,g,!0),D=w.dxydb_rough(u,g),d.angle===void 0&&r.extendFlat(d,e(w,E,p,y,w.dxyda_rough(u,g))),T(l,x,w,A,y,D,w.baxis,E,p,d,"b-title")}var m=i.LINE_SPACING,c=(1-i.MID_SHIFT)/m+1;function T(l,x,w,A,E,p,b,d,u,g,y){var D=[];b.title.text&&D.push(b.title.text);var P=x.selectAll("text."+y).data(D),z=g.maxExtent;P.enter().append("text").classed(y,!0),P.each(function(){var F=e(w,d,u,E,p);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var N=b.title.font.size;z+=N+b.title.offset;var O=g.angle+(g.flip<0?180:0),L=(O-F.angle+450)%360,U=L>90&&L<270,B=v.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+c)*m*N-z),B.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(_.font,b.title.font)}),P.exit().remove()}}}),qG=He({"src/traces/carpet/cheater_basis.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray;q.exports=function(_,S,M){var e,t,r,o,a,i,n=[],s=v(_)?_.length:_,h=v(S)?S.length:S,f=v(_)?_:null,m=v(S)?S:null;f&&(r=(f.length-1)/(f[f.length-1]-f[0])/(s-1)),m&&(o=(m.length-1)/(m[m.length-1]-m[0])/(h-1));var c,T=1/0,l=-1/0;for(t=0;t=10)return null;for(var e=1/0,t=-1/0,r=S.length,o=0;o0&&(V=M.dxydi([],W-1,ue,0,ce),ee.push(de[0]+V[0]/3),te.push(de[1]+V[1]/3),le=M.dxydi([],W-1,ue,1,ce),ee.push(Q[0]-le[0]/3),te.push(Q[1]-le[1]/3)),ee.push(Q[0]),te.push(Q[1]),de=Q;else for(W=M.a2i(B),Y=Math.floor(Math.max(0,Math.min(F-2,W))),X=W-Y,pe.length=F,pe.crossLength=N,pe.xy=function(we){return M.evalxy([],W,we)},pe.dxy=function(we,Se){return M.dxydj([],Y,we,X,Se)},$=0;$0&&(ae=M.dxydj([],Y,$-1,X,0),ee.push(de[0]+ae[0]/3),te.push(de[1]+ae[1]/3),j=M.dxydj([],Y,$-1,X,1),ee.push(Q[0]-j[0]/3),te.push(Q[1]-j[1]/3)),ee.push(Q[0]),te.push(Q[1]),de=Q;return pe.axisLetter=e,pe.axis=E,pe.crossAxis=g,pe.value=B,pe.constvar=t,pe.index=f,pe.x=ee,pe.y=te,pe.smoothing=g.smoothing,pe}function U(B){var W,$,ue,ce,de,Y=[],X=[],Q={};if(Q.length=A.length,Q.crossLength=u.length,e==="b")for(ue=Math.max(0,Math.min(N-2,B)),de=Math.min(1,Math.max(0,B-ue)),Q.xy=function(V){return M.evalxy([],V,B)},Q.dxy=function(V,le){return M.dxydi([],V,ue,le,de)},W=0;WA.length-1)&&p.push(_(U(o),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s;fA.length-1)&&!(T<0||T>A.length-1))for(l=A[a],x=A[T],r=0;rA[A.length-1])&&b.push(_(L(c),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&d.push(_(U(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&d.push(_(U(A.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(i=5e-15,n=[Math.floor((A[A.length-1]-E.tick0)/E.dtick*(1+i)),Math.ceil((A[0]-E.tick0)/E.dtick/(1+i))].sort(function(B,W){return B-W}),s=n[0],h=n[1],f=s;f<=h;f++)m=E.tick0+E.dtick*f,p.push(_(L(m),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s-1;fA[A.length-1])&&b.push(_(L(c),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&d.push(_(L(A[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&d.push(_(L(A[A.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}}}),HG=He({"src/traces/carpet/calc_labels.js"(Z,q){"use strict";var v=Wo(),_=rs().extendFlat;q.exports=function(M,e){var t,r,o,a,i,n=e._labels=[],s=e._gridlines;for(t=0;t=0;t--)r[s-t]=_[h][t],o[s-t]=S[h][t];for(a.push({x:r,y:o,bicubic:i}),t=h,r=[],o=[];t>=0;t--)r[h-t]=_[t][0],o[h-t]=S[t][0];return a.push({x:r,y:o,bicubic:n}),a}}}),XG=He({"src/traces/carpet/smooth_fill_2d_array.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M,e){var t,r,o,a=[],i=[],n=S[0].length,s=S.length;function h($,ue){var ce=0,de,Y=0;return $>0&&(de=S[ue][$-1])!==void 0&&(Y++,ce+=de),$0&&(de=S[ue-1][$])!==void 0&&(Y++,ce+=de),ue0&&r0&&tu);return v.log("Smoother converged to",g,"after",D,"iterations"),S}}}),ZG=He({"src/traces/carpet/constants.js"(Z,q){"use strict";q.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),YG=He({"src/traces/carpet/catmull_rom.js"(Z,q){"use strict";var v=.5;q.exports=function(S,M,e,t){var r=S[0]-M[0],o=S[1]-M[1],a=e[0]-M[0],i=e[1]-M[1],n=Math.pow(r*r+o*o,v/2),s=Math.pow(a*a+i*i,v/2),h=(s*s*r-n*n*a)*t,f=(s*s*o-n*n*i)*t,m=s*(n+s)*3,c=n*(n+s)*3;return[[M[0]+(m&&h/m),M[1]+(m&&f/m)],[M[0]-(c&&h/c),M[1]-(c&&f/c)]]}}}),KG=He({"src/traces/carpet/compute_control_points.js"(Z,q){"use strict";var v=YG(),_=sa().ensureArray;function S(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,h,f,m,c,T,l,x,w,A=r[0].length,E=r.length,p=a?3*A-2:A,b=i?3*E-2:E;for(e=_(e,b),t=_(t,b),h=0;hm&&pT&&bc||bl},o.setScale=function(){var p=o._x,b=o._y,d=S(o._xctrl,o._yctrl,p,b,h.smoothing,f.smoothing);o._xctrl=d[0],o._yctrl=d[1],o.evalxy=M([o._xctrl,o._yctrl],n,s,h.smoothing,f.smoothing),o.dxydi=e([o._xctrl,o._yctrl],h.smoothing,f.smoothing),o.dxydj=t([o._xctrl,o._yctrl],h.smoothing,f.smoothing)},o.i2a=function(p){var b=Math.max(0,Math.floor(p[0]),n-2),d=p[0]-b;return(1-d)*a[b]+d*a[b+1]},o.j2b=function(p){var b=Math.max(0,Math.floor(p[1]),n-2),d=p[1]-b;return(1-d)*i[b]+d*i[b+1]},o.ij2ab=function(p){return[o.i2a(p[0]),o.j2b(p[1])]},o.a2i=function(p){var b=Math.max(0,Math.min(_(p,a),n-2)),d=a[b],u=a[b+1];return Math.max(0,Math.min(n-1,b+(p-d)/(u-d)))},o.b2j=function(p){var b=Math.max(0,Math.min(_(p,i),s-2)),d=i[b],u=i[b+1];return Math.max(0,Math.min(s-1,b+(p-d)/(u-d)))},o.ab2ij=function(p){return[o.a2i(p[0]),o.b2j(p[1])]},o.i2c=function(p,b){return o.evalxy([],p,b)},o.ab2xy=function(p,b,d){if(!d&&(pa[n-1]|bi[s-1]))return[!1,!1];var u=o.a2i(p),g=o.b2j(b),y=o.evalxy([],u,g);if(d){var D=0,P=0,z=[],F,N,O,L;pa[n-1]?(F=n-2,N=1,D=(p-a[n-1])/(a[n-1]-a[n-2])):(F=Math.max(0,Math.min(n-2,Math.floor(u))),N=u-F),bi[s-1]?(O=s-2,L=1,P=(b-i[s-1])/(i[s-1]-i[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(g))),L=g-O),D&&(o.dxydi(z,F,O,N,L),y[0]+=z[0]*D,y[1]+=z[1]*D),P&&(o.dxydj(z,F,O,N,L),y[0]+=z[0]*P,y[1]+=z[1]*P)}return y},o.c2p=function(p,b,d){return[b.c2p(p[0]),d.c2p(p[1])]},o.p2x=function(p,b,d){return[b.p2c(p[0]),d.p2c(p[1])]},o.dadi=function(p){var b=Math.max(0,Math.min(a.length-2,p));return a[b+1]-a[b]},o.dbdj=function(p){var b=Math.max(0,Math.min(i.length-2,p));return i[b+1]-i[b]},o.dxyda=function(p,b,d,u){var g=o.dxydi(null,p,b,d,u),y=o.dadi(p,d);return[g[0]/y,g[1]/y]},o.dxydb=function(p,b,d,u){var g=o.dxydj(null,p,b,d,u),y=o.dbdj(b,u);return[g[0]/y,g[1]/y]},o.dxyda_rough=function(p,b,d){var u=x*(d||.1),g=o.ab2xy(p+u,b,!0),y=o.ab2xy(p-u,b,!0);return[(g[0]-y[0])*.5/u,(g[1]-y[1])*.5/u]},o.dxydb_rough=function(p,b,d){var u=w*(d||.1),g=o.ab2xy(p,b+u,!0),y=o.ab2xy(p,b-u,!0);return[(g[0]-y[0])*.5/u,(g[1]-y[1])*.5/u]},o.dpdx=function(p){return p._m},o.dpdy=function(p){return p._m}}}}),tH=He({"src/traces/carpet/calc.js"(Z,q){"use strict";var v=Wo(),_=sa().isArray1D,S=qG(),M=VG(),e=GG(),t=HG(),r=WG(),o=Y2(),a=XG(),i=Z2(),n=eH();q.exports=function(h,f){var m=v.getFromId(h,f.xaxis),c=v.getFromId(h,f.yaxis),T=f.aaxis,l=f.baxis,x=f.x,w=f.y,A=[];x&&_(x)&&A.push("x"),w&&_(w)&&A.push("y"),A.length&&i(f,T,l,"a","b",A);var E=f._a=f._a||f.a,p=f._b=f._b||f.b;x=f._x||f.x,w=f._y||f.y;var b={};if(f._cheater){var d=T.cheatertype==="index"?E.length:E,u=l.cheatertype==="index"?p.length:p;x=S(d,u,f.cheaterslope)}f._x=x=o(x),f._y=w=o(w),a(x,E,p),a(w,E,p),n(f),f.setScale();var g=M(x),y=M(w),D=.5*(g[1]-g[0]),P=.5*(g[1]+g[0]),z=.5*(y[1]-y[0]),F=.5*(y[1]+y[0]),N=1.3;return g=[P-D*N,P+D*N],y=[F-z*N,F+z*N],f._extremes[m._id]=v.findExtremes(m,g,{padded:!0}),f._extremes[c._id]=v.findExtremes(c,y,{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=x,b.y=w,b.a=E,b.b=p,[b]}}}),rH=He({"src/traces/carpet/index.js"(Z,q){"use strict";q.exports={attributes:PT(),supplyDefaults:NG(),plot:jG(),calc:tH(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),aH=He({"lib/carpet.js"(Z,q){"use strict";q.exports=rH()}}),K6=He({"src/traces/scattercarpet/attributes.js"(Z,q){"use strict";var v=$d(),_=af(),S=au(),{hovertemplateAttrs:M,texttemplateAttrs:e,templatefallbackAttrs:t}=$l(),r=ku(),o=rs().extendFlat,a=_.marker,i=_.line,n=a.line;q.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},_.mode,{dflt:"markers"}),text:o({},_.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},_.hovertext,{}),line:{color:i.color,width:i.width,dash:i.dash,backoff:i.backoff,shape:o({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:_.connectgaps,fill:o({},_.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),marker:o({symbol:a.symbol,opacity:a.opacity,maxdisplayed:a.maxdisplayed,angle:a.angle,angleref:a.angleref,standoff:a.standoff,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:o({width:n.width,dash:n.dash,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:_.textfont,textposition:_.textposition,selected:_.selected,unselected:_.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:_.hoveron,hovertemplate:M(),hovertemplatefallback:t(),zorder:_.zorder}}}),iH=He({"src/traces/scattercarpet/defaults.js"(Z,q){"use strict";var v=sa(),_=Tv(),S=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();q.exports=function(n,s,h,f){function m(E,p){return v.coerce(n,s,a,E,p)}m("carpet"),s.xaxis="x",s.yaxis="y";var c=m("a"),T=m("b"),l=Math.min(c.length,T.length);if(!l){s.visible=!1;return}s._length=l,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var x=l<_.PTS_LINESONLY?"lines+markers":"lines";m("mode",x),S.hasMarkers(s)&&M(n,s,h,f,m,{gradient:!0}),S.hasLines(s)&&(e(n,s,h,f,m,{backoff:!0}),t(n,s,m),m("connectgaps")),S.hasText(s)&&r(n,s,f,m);var w=[];(S.hasMarkers(s)||S.hasText(s))&&(m("marker.maxdisplayed"),w.push("points")),m("fill"),s.fill!=="none"&&(o(n,s,h,m),S.hasLines(s)||t(n,s,m)),(s.fill==="tonext"||s.fill==="toself")&&w.push("fills");var A=m("hoveron",w.join("+")||"points");A!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),m("zorder"),v.coerceSelectionMarkerOpacity(s,m)}}}),nH=He({"src/traces/scattercarpet/format_labels.js"(Z,q){"use strict";q.exports=function(_,S){var M={},e=S._carpet,t=e.ab2ij([_.a,_.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=He({"src/traces/carpet/lookup_carpetid.js"(Z,q){"use strict";q.exports=function(v,_){for(var S=v._fullData.length,M,e=0;e0?b=E.labelprefix.replace(/ = $/,""):b=E._hovertitle,l.push(b+": "+p.toFixed(3)+E.labelsuffix)}if(!m.hovertemplate){var w=f.hi||m.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&x(c.aaxis,f.a),A.indexOf("b")!==-1&&x(c.baxis,f.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&_(f,m,l),a.extraText=l.join("
")}return o}}}),uH=He({"src/traces/scattercarpet/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){var r=e[t];return _.a=r.a,_.b=r.b,_.y=r.y,_}}}),cH=He({"src/traces/scattercarpet/index.js"(Z,q){"use strict";q.exports={attributes:K6(),supplyDefaults:iH(),colorbar:dp(),formatLabels:nH(),calc:oH(),plot:sH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:lH(),selectPoints:c1(),eventData:uH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),fH=He({"lib/scattercarpet.js"(Z,q){"use strict";q.exports=cH()}}),J6=He({"src/traces/contourcarpet/attributes.js"(Z,q){"use strict";var v=p1(),_=V_(),S=ku(),M=rs().extendFlat,e=_.contours;q.exports=M({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:_.fillcolor,autocontour:_.autocontour,ncontours:_.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:_.line.color,width:_.line.width,dash:_.line.dash,smoothing:_.line.smoothing,editType:"plot"},zorder:_.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),$6=He({"src/traces/contourcarpet/defaults.js"(Z,q){"use strict";var v=sa(),_=X2(),S=J6(),M=TS(),e=s3(),t=l3();q.exports=function(o,a,i,n){function s(c,T){return v.coerce(o,a,S,c,T)}function h(c){return v.coerce2(o,a,S,c)}if(s("carpet"),o.a&&o.b){var f=_(o,a,s,n,"a","b");if(!f){a.visible=!1;return}s("text");var m=s("contours.type")==="constraint";m?M(o,a,s,n,i,{hasHover:!1}):(e(o,a,s,h),t(o,a,s,n,{hasHover:!1}))}else a._defaultColor=i,a._length=null;s("zorder")}}}),hH=He({"src/traces/contourcarpet/calc.js"(Z,q){"use strict";var v=Tp(),_=sa(),S=Z2(),M=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),i=dS();q.exports=function(h,f){var m=f._carpetTrace=a(h,f);if(!(!m||!m.visible||m.visible==="legendonly")){if(!f.a||!f.b){var c=h.data[m.index],T=h.data[f.index];T.a||(T.a=c.a),T.b||(T.b=c.b),o(T,f,f._defaultColor,h._fullLayout)}var l=n(h,f);return i(f,f._z),l}};function n(s,h){var f=h._carpetTrace,m=f.aaxis,c=f.baxis,T,l,x,w,A,E,p;m._minDtick=0,c._minDtick=0,_.isArray1D(h.z)&&S(h,m,c,"a","b",["z"]),T=h._a=h._a||h.a,w=h._b=h._b||h.b,T=T?m.makeCalcdata(h,"_a"):[],w=w?c.makeCalcdata(h,"_b"):[],l=h.a0||0,x=h.da||1,A=h.b0||0,E=h.db||1,p=h._z=M(h._z||h.z,h.transpose),h._emptypoints=t(p),e(p,h._emptypoints);var b=_.maxRowLength(p),d=h.xtype==="scaled"?"":T,u=r(h,d,l,x,b,m),g=h.ytype==="scaled"?"":w,y=r(h,g,A,E,p.length,c),D={a:u,b:y,z:p};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&v(s,h,{vals:p,containerStr:"",cLetter:"z"}),[D]}}}),pH=He({"src/traces/carpet/axis_aligned_line.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray;q.exports=function(_,S,M,e){var t,r,o,a,i,n,s,h,f,m,c,T,l,x=v(M)?"a":"b",w=x==="a"?_.aaxis:_.baxis,A=w.smoothing,E=x==="a"?_.a2i:_.b2j,p=x==="a"?M:e,b=x==="a"?e:M,d=x==="a"?S.a.length:S.b.length,u=x==="a"?S.b.length:S.a.length,g=Math.floor(x==="a"?_.b2j(b):_.a2i(b)),y=x==="a"?function(ue){return _.evalxy([],ue,g)}:function(ue){return _.evalxy([],g,ue)};A&&(o=Math.max(0,Math.min(u-2,g)),a=g-o,r=x==="a"?function(ue,ce){return _.dxydi([],ue,o,ce,a)}:function(ue,ce){return _.dxydj([],o,ue,a,ce)});var D=E(p[0]),P=E(p[1]),z=D0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,L=z>0?Math.min:Math.max,U=z>0?Math.max:Math.min,B=N(D+F),W=O(P-F);s=y(D);var $=[[s]];for(t=B;t*z=0;pe--)j=U.clipsegments[pe],ee=_([],j.x,D.c2p),te=_([],j.y,P.c2p),ee.reverse(),te.reverse(),we.push(S(ee,te,j.bicubic));var Se="M"+we.join("L")+"Z";A(F,U.clipsegments,D,P,ce,Y),E(O,F,D,P,ae,Q,X,L,U,Y,Se),c(F,ue,d,N,$,u,L),M.setClipUrl(F,L._clipPathId,d)})};function m(b,d){var u,g,y,D,P,z,F,N,O;for(u=0;uue&&(g.max=ue),g.len=g.max-g.min}function l(b,d,u){var g=b.getPointAtLength(d),y=b.getPointAtLength(u),D=y.x-g.x,P=y.y-g.y,z=Math.sqrt(D*D+P*P);return[D/z,P/z]}function x(b){var d=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/d,b[1]/d]}function w(b,d){var u=Math.abs(b[0]*d[0]+b[1]*d[1]),g=Math.sqrt(1-u*u);return g/u}function A(b,d,u,g,y,D){var P,z,F,N,O=e.ensureSingle(b,"g","contourbg"),L=O.selectAll("path").data(D==="fill"&&!y?[0]:[]);L.enter().append("path"),L.exit().remove();var U=[];for(N=0;N=0&&(B=ee,$=ue):Math.abs(U[1]-B[1])=0&&(B=ee,$=ue):e.log("endpt to newendpt is not vert. or horz.",U,B,ee)}if($>=0)break;N+=ae(U,B),U=B}if($===d.edgepaths.length){e.log("unclosed perimeter path");break}F=$,L=O.indexOf(F)===-1,L&&(F=O[0],N+=ae(U,B)+"Z",U=null)}for(F=0;Fp):E=z>y,p=z;var F=m(y,D,P,z);F.pos=g,F.yc=(y+z)/2,F.i=u,F.dir=E?"increasing":"decreasing",F.x=F.pos,F.y=[P,D],b&&(F.orig_p=s[u]),w&&(F.tx=n.text[u]),A&&(F.htx=n.hovertext[u]),d.push(F)}else d.push({pos:g,empty:!0})}return n._extremes[f._id]=S.findExtremes(f,v.concat(l,T),{padded:!0}),d.length&&(d[0].t={labels:{open:_(i,"open:")+" ",high:_(i,"high:")+" ",low:_(i,"low:")+" ",close:_(i,"close:")+" "}}),d}function a(i,n,s){var h=s._minDiff;if(!h){var f=i._fullData,m=[];h=1/0;var c;for(c=0;c"+x.labels[g]+v.hoverLabelText(T,y,l.yhoverformat)):(P=_.extendFlat({},A),P.y0=P.y1=D,P.yLabelVal=y,P.yLabel=x.labels[g]+v.hoverLabelText(T,y,l.yhoverformat),P.name="",w.push(P),d[y]=P)}return w}function n(s,h,f,m){var c=s.cd,T=s.ya,l=c[0].trace,x=c[0].t,w=a(s,h,f,m);if(!w)return[];var A=w.index,E=c[A],p=w.index=E.i,b=E.dir;function d(F){return x.labels[F]+v.hoverLabelText(T,l[F][p],l.yhoverformat)}var u=E.hi||l.hoverinfo||"",g=u.split("+"),y=u==="all",D=y||g.indexOf("y")!==-1,P=y||g.indexOf("text")!==-1,z=D?[d("open"),d("high"),d("low"),d("close")+" "+r[b]]:[];return P&&e(E,l,z),w.extraText=z.join("
"),w.y0=w.y1=T.c2p(E.yc,!0),[w]}q.exports={hoverPoints:o,hoverSplit:i,hoverOnPoints:n}}}),rk=He({"src/traces/ohlc/select.js"(Z,q){"use strict";q.exports=function(_,S){var M=_.cd,e=_.xaxis,t=_.yaxis,r=[],o,a=M[0].t.bPos||0;if(S===!1)for(o=0;oh?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var x=a.c2l(l)-s;return(T(x)?x:0)+c},a.g2c=function(l){return a.l2c(l+s-c)},a.g2p=function(l){return l*m},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,i){return i==="degrees"?S(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,h=a.c2d;a.d2c=function(f,m){return t(s(f),m)},a.c2d=function(f,m){return h(r(f,m))}}a.makeCalcdata=function(f,m){var c=f[m],T=f._length,l,x,w=function(d){return a.d2c(d,f.thetaunit)};if(c)for(l=new Array(T),x=0;x0?d:1/0},E=S(w,A),p=v.mod(E+1,w.length);return[w[E],w[p]]}function m(x){return Math.abs(x)>1e-10?x:0}function c(x,w,A){w=w||0,A=A||0;for(var E=x.length,p=new Array(E),b=0;b0?1:0}function _(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 S(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=S(r,_([a,o])),s=n[0],h=n[1],f=S(r,_([i,o])),m=f[0],c=f[1];if(o===0)return["M"+s+","+h,"L"+m+","+c].join(" ");var T=M(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+m+","+c].join(" ")}function t(r,o,a,i){var n=M(r,1/(o+1)),s=S(r,_([o,a])),h=s[0],f=s[1],m=S(r,_([o,i])),c=m[0],T=m[1];if(v(a)!==v(i)){var l=S(r,_([o,0])),x=l[0],w=l[1];return["M"+h+","+f,"A"+n+","+n+" 0 0,"+(0at?(nt=te,tt=te*at,se=(pe-tt)/V.h/2,Ve=[j[0],j[1]],he=[ee[0]+se,ee[1]-se]):(nt=pe/at,tt=pe,se=(te-nt)/V.w/2,Ve=[j[0]+se,j[1]-se],he=[ee[0],ee[1]]),X.xLength2=nt,X.yLength2=tt,X.xDomain2=Ve,X.yDomain2=he;var ne=X.xOffset2=V.l+V.w*Ve[0],Ce=X.yOffset2=V.t+V.h*(1-he[1]),Ze=X.radius=nt/Re,rt=X.innerRadius=X.getHole(Y)*Ze,Je=X.cx=ne-Ze*Se[0],St=X.cy=Ce+Ze*Se[3],kt=X.cxx=Je-ne,Bt=X.cyy=St-Ce,Vt=le.side,Ar;Vt==="counterclockwise"?(Ar=Vt,Vt="top"):Vt==="clockwise"&&(Ar=Vt,Vt="bottom"),X.radialAxis=X.mockAxis(de,Y,le,{_id:"x",side:Vt,_trueSide:Ar,domain:[rt/V.w,Ze/V.w]}),X.angularAxis=X.mockAxis(de,Y,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(de,Y),X.updateAngularAxis(de,Y),X.updateRadialAxis(de,Y),X.updateRadialAxisTitle(de,Y),X.xaxis=X.mockCartesianAxis(de,Y,{_id:"x",domain:Ve}),X.yaxis=X.mockCartesianAxis(de,Y,{_id:"y",domain:he});var vr=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",vr).attr("transform",t(kt,Bt)),Q.frontplot.attr("transform",t(ne,Ce)).call(o.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),Q.bg.attr("d",vr).attr("transform",t(Je,St)).call(r.fill,Y.bgcolor)},B.mockAxis=function(de,Y,X,Q){var V=M.extendFlat({},X,Q);return s(V,Y,de),V},B.mockCartesianAxis=function(de,Y,X){var Q=this,V=Q.isSmith,le=X._id,ae=M.extendFlat({type:"linear"},X);n(ae,de);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var ee=Q.sectorBBox,te=j[le],pe=Q.radialAxis._rl,we=(pe[1]-pe[0])/(1-Q.getHole(Y));ae.range=[ee[te[0]]*we,ee[te[1]]*we]},ae.isPtWithinRange=le==="x"&&!V?function(ee){return Q.isPtInside(ee)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(de,Y){var X=this,Q=X.gd,V=X.radialAxis,le=X.getRadial(Y);h(Q,V);var ae=V.range;if(le.range=ae.slice(),le._input.range=ae.slice(),V._rl=[V.r2l(ae[0],null,"gregorian"),V.r2l(ae[1],null,"gregorian")],V.minallowed!==void 0){var j=V.r2l(V.minallowed);V._rl[0]>V._rl[1]?V._rl[1]=Math.max(V._rl[1],j):V._rl[0]=Math.max(V._rl[0],j)}if(V.maxallowed!==void 0){var ee=V.r2l(V.maxallowed);V._rl[0]90&&pe<=270&&(we.tickangle=180);var Pe=Re?function(Ze){var rt=z(X,y([Ze.x,0]));return t(rt[0]-j,rt[1]-ee)}:function(Ze){return t(we.l2p(Ze.x)+ae,0)},je=Re?function(Ze){return P(X,Ze.x,-1/0,1/0)}:function(Ze){return X.pathArc(we.r2p(Ze.x)+ae)},at=W(te);if(X.radialTickLayout!==at&&(V["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=at),Se){we.setScale();var nt=0,tt=Re?(we.tickvals||[]).filter(function(Ze){return Ze>=0}).map(function(Ze){return i.tickText(we,Ze,!0,!1)}):i.calcTicks(we),Ve=Re?tt:i.clipEnds(we,tt),he=i.getTickSigns(we)[2];Re&&((we.ticks==="top"&&we.side==="bottom"||we.ticks==="bottom"&&we.side==="top")&&(he=-he),we.ticks==="top"&&we.side==="top"&&(nt=-we.ticklen),we.ticks==="bottom"&&we.side==="bottom"&&(nt=we.ticklen)),i.drawTicks(Q,we,{vals:tt,layer:V["radial-axis"],path:i.makeTickPath(we,0,he),transFn:Pe,crisp:!1}),i.drawGrid(Q,we,{vals:Ve,layer:V["radial-grid"],path:je,transFn:M.noop,crisp:!1}),i.drawLabels(Q,we,{vals:tt,layer:V["radial-axis"],transFn:Pe,labelFns:i.makeLabelFns(we,nt)})}var se=X.radialAxisAngle=X.vangles?L(ue(O(te.angle),X.vangles)):te.angle,ne=t(j,ee),Ce=ne+e(-se);ce(V["radial-axis"],Se&&(te.showticklabels||te.ticks),{transform:Ce}),ce(V["radial-grid"],Se&&te.showgrid,{transform:Re?"":ne}),ce(V["radial-line"].select("line"),Se&&te.showline,{x1:Re?-le:ae,y1:0,x2:le,y2:0,transform:Ce}).attr("stroke-width",te.linewidth).call(r.stroke,te.linecolor)},B.updateRadialAxisTitle=function(de,Y,X){if(!this.isSmith){var Q=this,V=Q.gd,le=Q.radius,ae=Q.cx,j=Q.cy,ee=Q.getRadial(Y),te=Q.id+"title",pe=0;if(ee.title){var we=o.bBox(Q.layers["radial-axis"].node()).height,Se=ee.title.font.size,Re=ee.side;pe=Re==="top"?Se:Re==="counterclockwise"?-(we+Se*.4):we+Se*.8}var Pe=X!==void 0?X:Q.radialAxisAngle,je=O(Pe),at=Math.cos(je),nt=Math.sin(je),tt=ae+le/2*at+pe*nt,Ve=j-le/2*nt+pe*at;Q.layers["radial-axis-title"]=T.draw(V,te,{propContainer:ee,propName:Q.id+".radialaxis.title.text",placeholder:F(V,"Click to enter radial axis title"),attributes:{x:tt,y:Ve,"text-anchor":"middle"},transform:{rotate:-Pe}})}},B.updateAngularAxis=function(de,Y){var X=this,Q=X.gd,V=X.layers,le=X.radius,ae=X.innerRadius,j=X.cx,ee=X.cy,te=X.getAngular(Y),pe=X.angularAxis,we=X.isSmith;we||(X.fillViewInitialKey("angularaxis.rotation",te.rotation),pe.setGeometry(),pe.setScale());var Se=we?function(rt){var Je=z(X,y([0,rt.x]));return Math.atan2(Je[0]-j,Je[1]-ee)-Math.PI/2}:function(rt){return pe.t2g(rt.x)};pe.type==="linear"&&pe.thetaunit==="radians"&&(pe.tick0=L(pe.tick0),pe.dtick=L(pe.dtick));var Re=function(rt){return t(j+le*Math.cos(rt),ee-le*Math.sin(rt))},Pe=we?function(rt){var Je=z(X,y([0,rt.x]));return t(Je[0],Je[1])}:function(rt){return Re(Se(rt))},je=we?function(rt){var Je=z(X,y([0,rt.x])),St=Math.atan2(Je[0]-j,Je[1]-ee)-Math.PI/2;return t(Je[0],Je[1])+e(-L(St))}:function(rt){var Je=Se(rt);return Re(Je)+e(-L(Je))},at=we?function(rt){return D(X,rt.x,0,1/0)}:function(rt){var Je=Se(rt),St=Math.cos(Je),kt=Math.sin(Je);return"M"+[j+ae*St,ee-ae*kt]+"L"+[j+le*St,ee-le*kt]},nt=i.makeLabelFns(pe,0),tt=nt.labelStandoff,Ve={};Ve.xFn=function(rt){var Je=Se(rt);return Math.cos(Je)*tt},Ve.yFn=function(rt){var Je=Se(rt),St=Math.sin(Je)>0?.2:1;return-Math.sin(Je)*(tt+rt.fontSize*St)+Math.abs(Math.cos(Je))*(rt.fontSize*b)},Ve.anchorFn=function(rt){var Je=Se(rt),St=Math.cos(Je);return Math.abs(St)<.1?"middle":St>0?"start":"end"},Ve.heightFn=function(rt,Je,St){var kt=Se(rt);return-.5*(1+Math.sin(kt))*St};var he=W(te);X.angularTickLayout!==he&&(V["angular-axis"].selectAll("."+pe._id+"tick").remove(),X.angularTickLayout=he);var se=we?[1/0].concat(pe.tickvals||[]).map(function(rt){return i.tickText(pe,rt,!0,!1)}):i.calcTicks(pe);we&&(se[0].text="\u221E",se[0].fontSize*=1.75);var ne;if(Y.gridshape==="linear"?(ne=se.map(Se),M.angleDelta(ne[0],ne[1])<0&&(ne=ne.slice().reverse())):ne=null,X.vangles=ne,pe.type==="category"&&(se=se.filter(function(rt){return M.isAngleInsideSector(Se(rt),X.sectorInRad)})),pe.visible){var Ce=pe.ticks==="inside"?-1:1,Ze=(pe.linewidth||1)/2;i.drawTicks(Q,pe,{vals:se,layer:V["angular-axis"],path:"M"+Ce*Ze+",0h"+Ce*pe.ticklen,transFn:je,crisp:!1}),i.drawGrid(Q,pe,{vals:se,layer:V["angular-grid"],path:at,transFn:M.noop,crisp:!1}),i.drawLabels(Q,pe,{vals:se,layer:V["angular-axis"],repositionOnUpdate:!0,transFn:Pe,labelFns:Ve})}ce(V["angular-line"].select("path"),te.showline,{d:X.pathSubplot(),transform:t(j,ee)}).attr("stroke-width",te.linewidth).call(r.stroke,te.linecolor)},B.updateFx=function(de,Y){if(!this.gd._context.staticPlot){var X=!this.isSmith;X&&(this.updateAngularDrag(de),this.updateRadialDrag(de,Y,0),this.updateRadialDrag(de,Y,1)),this.updateHoverAndMainDrag(de)}},B.updateHoverAndMainDrag=function(de){var Y=this,X=Y.isSmith,Q=Y.gd,V=Y.layers,le=de._zoomlayer,ae=d.MINZOOM,j=d.OFFEDGE,ee=Y.radius,te=Y.innerRadius,pe=Y.cx,we=Y.cy,Se=Y.cxx,Re=Y.cyy,Pe=Y.sectorInRad,je=Y.vangles,at=Y.radialAxis,nt=u.clampTiny,tt=u.findXYatLength,Ve=u.findEnclosingVertexAngles,he=d.cornerHalfWidth,se=d.cornerLen/2,ne,Ce,Ze=f.makeDragger(V,"path","maindrag",de.dragmode===!1?"none":"crosshair");v.select(Ze).attr("d",Y.pathSubplot()).attr("transform",t(pe,we)),Ze.onmousemove=function(or){c.hover(Q,or,Y.id),Q._fullLayout._lasthover=Ze,Q._fullLayout._hoversubplot=Y.id},Ze.onmouseout=function(or){Q._dragging||m.unhover(Q,or)};var rt={element:Ze,gd:Q,subplot:Y.id,plotinfo:{id:Y.id,xaxis:Y.xaxis,yaxis:Y.yaxis},xaxes:[Y.xaxis],yaxes:[Y.yaxis]},Je,St,kt,Bt,Vt,Ar,vr,qr,kr;function Ur(or,nr){return Math.sqrt(or*or+nr*nr)}function _t(or,nr){return Ur(or-Se,nr-Re)}function Fe(or,nr){return Math.atan2(Re-nr,or-Se)}function Ye(or,nr){return[or*Math.cos(nr),or*Math.sin(-nr)]}function Ae(or,nr){if(or===0)return Y.pathSector(2*he);var Pr=se/or,_a=nr-Pr,Fa=nr+Pr,Ra=Math.max(0,Math.min(or,ee)),qa=Ra-he,Wa=Ra+he;return"M"+Ye(qa,_a)+"A"+[qa,qa]+" 0,0,0 "+Ye(qa,Fa)+"L"+Ye(Wa,Fa)+"A"+[Wa,Wa]+" 0,0,1 "+Ye(Wa,_a)+"Z"}function Le(or,nr,Pr){if(or===0)return Y.pathSector(2*he);var _a=Ye(or,nr),Fa=Ye(or,Pr),Ra=nt((_a[0]+Fa[0])/2),qa=nt((_a[1]+Fa[1])/2),Wa,Ca;if(Ra&&qa){var hi=qa/Ra,wi=-1/hi,Yt=tt(he,hi,Ra,qa);Wa=tt(se,wi,Yt[0][0],Yt[0][1]),Ca=tt(se,wi,Yt[1][0],Yt[1][1])}else{var Rt,Zt;qa?(Rt=se,Zt=he):(Rt=he,Zt=se),Wa=[[Ra-Rt,qa-Zt],[Ra+Rt,qa-Zt]],Ca=[[Ra-Rt,qa+Zt],[Ra+Rt,qa+Zt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function We(){kt=null,Bt=null,Vt=Y.pathSubplot(),Ar=!1;var or=Q._fullLayout[Y.id];vr=_(or.bgcolor).getLuminance(),qr=f.makeZoombox(le,vr,pe,we,Vt),qr.attr("fill-rule","evenodd"),kr=f.makeCorners(le,pe,we),w(Q)}function Ke(or,nr){return nr=Math.max(Math.min(nr,ee),te),orae?(or-1&&or===1&&x(nr,Q,[Y.xaxis],[Y.yaxis],Y.id,rt),Pr.indexOf("event")>-1&&c.click(Q,nr,Y.id)}rt.prepFn=function(or,nr,Pr){var _a=Q._fullLayout.dragmode,Fa=Ze.getBoundingClientRect();Q._fullLayout._calcInverseTransform(Q);var Ra=Q._fullLayout._invTransform;ne=Q._fullLayout._invScaleX,Ce=Q._fullLayout._invScaleY;var qa=M.apply3DTransform(Ra)(nr-Fa.left,Pr-Fa.top);if(Je=qa[0],St=qa[1],je){var Wa=u.findPolygonOffset(ee,Pe[0],Pe[1],je);Je+=Se+Wa[0],St+=Re+Wa[1]}switch(_a){case"zoom":rt.clickFn=cr,X||(je?rt.moveFn=Ct:rt.moveFn=ot,rt.doneFn=Pt,We(or,nr,Pr));break;case"select":case"lasso":l(or,nr,Pr,rt,_a);break}},m.init(rt)},B.updateRadialDrag=function(de,Y,X){var Q=this,V=Q.gd,le=Q.layers,ae=Q.radius,j=Q.innerRadius,ee=Q.cx,te=Q.cy,pe=Q.radialAxis,we=d.radialDragBoxSize,Se=we/2;if(!pe.visible)return;var Re=O(Q.radialAxisAngle),Pe=pe._rl,je=Pe[0],at=Pe[1],nt=Pe[X],tt=.75*(Pe[1]-Pe[0])/(1-Q.getHole(Y))/ae,Ve,he,se;X?(Ve=ee+(ae+Se)*Math.cos(Re),he=te-(ae+Se)*Math.sin(Re),se="radialdrag"):(Ve=ee+(j-Se)*Math.cos(Re),he=te-(j-Se)*Math.sin(Re),se="radialdrag-inner");var ne=f.makeRectDragger(le,se,"crosshair",-Se,-Se,we,we),Ce={element:ne,gd:V};de.dragmode===!1&&(Ce.dragmode=!1),ce(v.select(ne),pe.visible&&j0!=(X?Je>je:Je=90||V>90&&le>=450?Re=1:j<=0&&te<=0?Re=0:Re=Math.max(j,te),V<=180&&le>=180||V>180&&le>=540?pe=-1:ae>=0&&ee>=0?pe=0:pe=Math.min(ae,ee),V<=270&&le>=270||V>270&&le>=630?we=-1:j>=0&&te>=0?we=0:we=Math.min(j,te),le>=360?Se=1:ae<=0&&ee<=0?Se=0:Se=Math.max(ae,ee),[pe,we,Se,Re]}function ue(de,Y){var X=function(V){return M.angleDist(de,V)},Q=M.findIndexOfMin(Y,X);return Y[Q]}function ce(de,Y,X){return Y?(de.attr("display",null),de.attr(X)):de&&de.attr("display","none"),de}}}),sk=He({"src/plots/polar/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=Xh(),S=wc().attributes,M=sa().extendFlat,e=pc().overrideAll,t=e({color:_.color,showline:M({},_.showline,{dflt:!0}),linecolor:_.linecolor,linewidth:_.linewidth,showgrid:M({},_.showgrid,{dflt:!0}),gridcolor:_.gridcolor,gridwidth:_.gridwidth,griddash:_.griddash},"plot","from-root"),r=e({tickmode:_.minor.tickmode,nticks:_.nticks,tick0:_.tick0,dtick:_.dtick,tickvals:_.tickvals,ticktext:_.ticktext,ticks:_.ticks,ticklen:_.ticklen,tickwidth:_.tickwidth,tickcolor:_.tickcolor,ticklabelstep:_.ticklabelstep,showticklabels:_.showticklabels,labelalias:_.labelalias,minorloglabels:_.minorloglabels,showtickprefix:_.showtickprefix,tickprefix:_.tickprefix,showticksuffix:_.showticksuffix,ticksuffix:_.ticksuffix,showexponent:_.showexponent,exponentformat:_.exponentformat,minexponent:_.minexponent,separatethousands:_.separatethousands,tickfont:_.tickfont,tickangle:_.tickangle,tickformat:_.tickformat,tickformatstops:_.tickformatstops,layer:_.layer},"plot","from-root"),o={visible:M({},_.visible,{dflt:!0}),type:M({},_.type,{values:["-","linear","log","date","category"]}),autotypenumbers:_.autotypenumbers,autorangeoptions:{minallowed:_.autorangeoptions.minallowed,maxallowed:_.autorangeoptions.maxallowed,clipmin:_.autorangeoptions.clipmin,clipmax:_.autorangeoptions.clipmax,include:_.autorangeoptions.include,editType:"plot"},autorange:M({},_.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:M({},_.minallowed,{editType:"plot"}),maxallowed:M({},_.maxallowed,{editType:"plot"}),range:M({},_.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:_.categoryorder,categoryarray:_.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:_.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:M({},_.title.text,{editType:"plot",dflt:""}),font:M({},_.title.font,{editType:"plot"}),editType:"plot"},hoverformat:_.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(o,t,r);var a={visible:M({},_.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:_.autotypenumbers,categoryorder:_.categoryorder,categoryarray:_.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:_.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(a,t,r),q.exports={domain:S({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:v.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),MH=He({"src/plots/polar/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=zl(),M=s0(),e=Wh().getSubplotData,t=Y0(),r=t1(),o=e0(),a=t0(),i=I2(),n=z_(),s=f5(),h=a1(),f=sk(),m=ik(),c=DT(),T=c.axisNames;function l(w,A,E,p){var b=E("bgcolor");p.bgColor=_.combine(b,p.paper_bgcolor);var d=E("sector");E("hole");var u=e(p.fullData,c.name,p.id),g=p.layoutOut,y;function D(we,Se){return E(y+"."+we,Se)}for(var P=0;P")}}q.exports={hoverPoints:_,makeHoverPointText:S}}}),CH=He({"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:dp(),formatLabels:BT(),calc:EH(),plot:kH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),LH=He({"lib/scatterpolar.js"(Z,q){"use strict";q.exports=CH()}}),lk=He({"src/traces/scatterpolargl/attributes.js"(Z,q){"use strict";var v=Cx(),{cliponaxis:_,hoveron:S}=v,M=Qs(v,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:i,marker:n,textfont:s,textposition:h}=xx();q.exports=vs(So({},M),{connectgaps:e,fill:a,fillcolor:i,line:{color:t,dash:r,editType:"calc",width:o},marker:n,textfont:s,textposition:h})}}),PH=He({"src/traces/scatterpolargl/defaults.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=OT().handleRThetaDefaults,M=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();q.exports=function(n,s,h,f){function m(T,l){return v.coerce(n,s,a,T,l)}var c=S(n,s,f,m);if(!c){s.visible=!1;return}m("thetaunit"),m("mode",c=r&&(p.marker.cluster=x.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=g),p.line&&g.length>1&&t.extendFlat(p.line,e.linePositions(i,l,g)),p.text&&(t.extendFlat(p.text,{positions:g},e.textPosition(i,l,p.text,p.marker)),t.extendFlat(p.textSel,{positions:g},e.textPosition(i,l,p.text,p.markerSel)),t.extendFlat(p.textUnsel,{positions:g},e.textPosition(i,l,p.text,p.markerUnsel))),p.fill&&!m.fill2d&&(m.fill2d=!0),p.marker&&!m.scatter2d&&(m.scatter2d=!0),p.line&&!m.line2d&&(m.line2d=!0),p.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(p.line),m.fillOptions.push(p.fill),m.markerOptions.push(p.marker),m.markerSelectedOptions.push(p.markerSel),m.markerUnselectedOptions.push(p.markerUnsel),m.textOptions.push(p.text),m.textSelectedOptions.push(p.textSel),m.textUnselectedOptions.push(p.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),x.x=y,x.y=D,x.rawx=y,x.rawy=D,x.r=A,x.theta=E,x.positions=g,x._scene=m,x.index=m.count,m.count++}}),S(i,n,s)}},q.exports.reglPrecompiled=o}}),OH=He({"src/traces/scatterpolargl/index.js"(Z,q){"use strict";var v=zH();v.plot=FH(),q.exports=v}}),BH=He({"lib/scatterpolargl.js"(Z,q){"use strict";q.exports=OH()}}),uk=He({"src/traces/barpolar/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:_}=$l(),S=rs().extendFlat,M=Cx(),e=Sv();q.exports={r:M.r,theta:M.theta,r0:M.r0,dr:M.dr,theta0:M.theta0,dtheta:M.dtheta,thetaunit:M.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:M.hoverinfo,hovertemplate:v(),hovertemplatefallback:_(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),ck=He({"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"}}}}),NH=He({"src/traces/barpolar/defaults.js"(Z,q){"use strict";var v=sa(),_=OT().handleRThetaDefaults,S=j2(),M=uk();q.exports=function(t,r,o,a){function i(s,h){return v.coerce(t,r,M,s,h)}var n=_(t,r,a,i);if(!n){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),S(t,r,i,o,a),v.coerceSelectionMarkerOpacity(r,i)}}}),UH=He({"src/traces/barpolar/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=ck();q.exports=function(S,M,e){var t={},r;function o(n,s){return v.coerce(S[r]||{},M[r],_,n,s)}for(var a=0;a0?(f=s,m=h):(f=h,m=s);var c=e.findEnclosingVertexAngles(f,r.vangles)[0],T=e.findEnclosingVertexAngles(m,r.vangles)[1],l=[c,(f+m)/2,T];return e.pathPolygonAnnulus(i,n,f,m,l,o,a)}:function(i,n,s,h){return S.pathAnnulus(i,n,s,h,o,a)}}}}),qH=He({"src/traces/barpolar/hover.js"(Z,q){"use strict";var v=Hc(),_=sa(),S=f1().getTraceColor,M=_.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;q.exports=function(o,a,i){var n=o.cd,s=n[0].trace,h=o.subplot,f=h.radialAxis,m=h.angularAxis,c=h.vangles,T=c?t:_.isPtInsideSector,l=o.maxHoverDistance,x=m._period||2*Math.PI,w=Math.abs(f.g2p(Math.sqrt(a*a+i*i))),A=Math.atan2(i,a);f.range[0]>f.range[1]&&(A+=Math.PI);var E=function(u){return T(w,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],c)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/x)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(n,E,o),o.index!==!1){var p=o.index,b=n[p];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var d=_.extendFlat({},b,{r:b.s,theta:b.p});return M(b,s,o),e(d,s,h,o),o.hovertemplate=s.hovertemplate,o.color=S(s,b),o.xLabelVal=o.yLabelVal=void 0,b.s<0&&(o.idealAlign="left"),[o]}}}}),VH=He({"src/traces/barpolar/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:NH(),supplyLayoutDefaults:UH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:jH(),colorbar:dp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:qH(),selectPoints:h1(),meta:{}}}}),GH=He({"lib/barpolar.js"(Z,q){"use strict";q.exports=VH()}}),hk=He({"src/plots/smith/constants.js"(Z,q){"use strict";q.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=He({"src/plots/smith/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=Xh(),S=wc().attributes,M=sa().extendFlat,e=pc().overrideAll,t=e({color:_.color,showline:M({},_.showline,{dflt:!0}),linecolor:_.linecolor,linewidth:_.linewidth,showgrid:M({},_.showgrid,{dflt:!0}),gridcolor:_.gridcolor,gridwidth:_.gridwidth,griddash:_.griddash},"plot","from-root"),r=e({ticklen:_.ticklen,tickwidth:M({},_.tickwidth,{dflt:2}),tickcolor:_.tickcolor,showticklabels:_.showticklabels,labelalias:_.labelalias,showtickprefix:_.showtickprefix,tickprefix:_.tickprefix,showticksuffix:_.showticksuffix,ticksuffix:_.ticksuffix,tickfont:_.tickfont,tickformat:_.tickformat,hoverformat:_.hoverformat,layer:_.layer},"plot","from-root"),o=M({visible:M({},_.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:M({},_.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({},_.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:_.ticks,editType:"calc"},t,r);q.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),HH=He({"src/plots/smith/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=zl(),M=s0(),e=Wh().getSubplotData,t=t0(),r=e0(),o=z_(),a=wv(),i=pk(),n=hk(),s=n.axisNames,h=m(function(c){return v.isTypedArray(c)&&(c=Array.from(c)),c.slice().reverse().map(function(T){return-T}).concat([0]).concat(c)},String);function f(c,T,l,x){var w=l("bgcolor");x.bgColor=_.combine(w,x.paper_bgcolor);var A=e(x.fullData,n.name,x.id),E=x.layoutOut,p;function b(B,W){return l(p+"."+B,W)}for(var d=0;d")}}q.exports={hoverPoints:_,makeHoverPointText:S}}}),$H=He({"src/traces/scattersmith/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scattersmith",basePlotModule:WH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:XH(),colorbar:dp(),formatLabels:ZH(),calc:YH(),plot:KH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:JH().hoverPoints,selectPoints:c1(),meta:{}}}}),QH=He({"lib/scattersmith.js"(Z,q){"use strict";q.exports=$H()}}),Mp=He({"node_modules/world-calendars/dist/main.js"(Z,q){var v=ch();function _(){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={}}v(_.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 h=i%10;n=(h===0?"":o[h]+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 S(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}v(S.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"}v(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 S(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 h=o.year()+(i==="y"?a:0),f=o.monthOfYear()+(i==="m"?a:0),s=o.day(),m=function(l){for(;fx-1+l.minMonth;)h++,f-=x,x=l.monthsInYear(h)};i==="y"?(o.month()!==this.fromMonthOfYear(h,f)&&(f=this.newDate(h,o.month(),this.minDay).monthOfYear()),f=Math.min(f,this.monthsInYear(h)),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,f)))):i==="m"&&(m(this),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,f))));var c=[h,this.fromMonthOfYear(h,f),s];return this._validateLevel--,c}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],h=i<0?-1:1;a=this._add(o,i*s[0]+h*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(),h=i==="d"?a:o.day();return(i==="y"||i==="m")&&(h=Math.min(h,this.daysInMonth(n,s))),o.date(n,s,h)},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.minDay&&i-this.minDay13.5?13:1),T=s-(c>2.5?4716:4715);return T<=0&&T--,this.newDate(T,c,m)},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 _;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),eW=He({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),q=Mp();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(v,_){return typeof v!="string"&&(_=v,v=""),this._calendar.formatDate(v||"",this,_)}}),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(v,_,S){if(typeof v!="string"&&(S=_,_=v,v=""),!_)return"";if(_.calendar()!==this)throw q.local.invalidFormat||q.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,S=S||{};for(var M=S.dayNamesShort||this.local.dayNamesShort,e=S.dayNames||this.local.dayNames,t=S.monthNumbers||this.local.monthNumbers,r=S.monthNamesShort||this.local.monthNamesShort,o=S.monthNames||this.local.monthNames,a=S.calculateWeek||this.local.calculateWeek,i=function(A,E){for(var p=1;w+p1},n=function(A,E,p,b){var d=""+E;if(i(A,b))for(;d.length1},x=function(D,P){var z=l(D,P),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],N=new RegExp("^-?\\d{1,"+F+"}"),O=_.substring(d).match(N);if(!O)throw(q.local.missingNumberAt||q.regionalOptions[""].missingNumberAt).replace(/\{0\}/,d);return d+=O[0].length,parseInt(O[0],10)},w=this,A=function(){if(typeof o=="function"){l("m");var D=o.call(w,_.substring(d));return d+=D.length,D}return x("m")},E=function(D,P,z,F){for(var N=l(D,F)?z:P,O=0;O-1){h=1,f=m;for(var y=this.daysInMonth(s,h);f>y;y=this.daysInMonth(s,h))h++,f-=y}return n>-1?this.fromJD(n):this.newDate(s,h,f)},determineDate:function(v,_,S,M,e){S&&typeof S!="object"&&(e=M,M=S,S=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/)&&S?S.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 _=_?_.newDate():null,v=v==null?_:typeof v=="string"?r(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?_:t.today().add(v,"d"):t.newDate(v),v}})}}),tW=He({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 h=n.match(M);return h?h[0]:""}var f=this._validateYear(n),m=n.month(),c=""+this.toChineseMonth(f,m);return s&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(f,m)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var s=n.match(e);return s?s[0]:""}var h=this._validateYear(n),f=n.month(),m=this.toChineseMonth(h,f),c=["\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"][m-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},monthNamesShort:function(n){if(typeof n=="string"){var s=n.match(t);return s?s[0]:""}var h=this._validateYear(n),f=n.month(),m=this.toChineseMonth(h,f),c=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},parseMonth:function(n,s){n=this._validateYear(n);var h=parseInt(s),f;if(isNaN(h))s[0]==="\u95F0"&&(f=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),h=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var m=s[s.length-1];f=m==="i"||m==="I"}var c=this.toMonthIndex(n,h,f);return c},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,h){var f=this.intercalaryMonth(n),m=h&&s!==f;if(m||s<1||s>12)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c;return f?!h&&s<=f?c=s-1:c=s:c=s-1,c},toChineseMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var h=this.intercalaryMonth(n),f=h?12:11;if(s<0||s>f)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?s>13;return h},isIntercalaryMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var h=this.intercalaryMonth(n);return!!h&&h===s},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,s,h){var f=this._validateYear(n,Z.local.invalidyear),m=o[f-o[0]],c=m>>9&4095,T=m>>5&15,l=m&31,x;x=v.newDate(c,T,l),x.add(4-(x.dayOfWeek()||7),"d");var w=this.toJD(n,s,h)-x.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 h=r[n-r[0]],f=h>>13,m=f?12:11;if(s>m)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c=h&1<<12-s?30:29;return c},weekDay:function(n,s,h){return(this.dayOfWeek(n,s,h)||7)<6},toJD:function(n,s,h){var f=this._validate(n,c,h,Z.local.invalidDate);n=this._validateYear(f.year()),s=f.month(),h=f.day();var m=this.isIntercalaryMonth(n,s),c=this.toChineseMonth(n,s),T=i(n,c,h,m);return v.toJD(T.year,T.month,T.day)},fromJD:function(n){var s=v.fromJD(n),h=a(s.year(),s.month(),s.day()),f=this.toMonthIndex(h.year,h.month,h.isIntercalary);return this.newDate(h.year,f,h.day)},fromString:function(n){var s=n.match(S),h=this._validateYear(+s[1]),f=+s[2],m=!!s[3],c=this.toMonthIndex(h,f,m),T=+s[4];return this.newDate(h,c,T)},add:function(n,s,h){var f=n.year(),m=n.month(),c=this.isIntercalaryMonth(f,m),T=this.toChineseMonth(f,m),l=Object.getPrototypeOf(_.prototype).add.call(this,n,s,h);if(h==="y"){var x=l.year(),w=l.month(),A=this.isIntercalaryMonth(x,T),E=c&&A?this.toMonthIndex(x,T,!0):this.toMonthIndex(x,T,!1);E!==w&&l.month(E)}return l}});var S=/^\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=_;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,h,f){var m,c;if(typeof n=="object")m=n,c=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 x=typeof h=="number"&&h>=1&&h<=31;if(!x)throw new Error("Solar day outside range 1 - 31");m={year:n,month:s,day:h},c=f||{}}var w=o[m.year-o[0]],A=m.year<<9|m.month<<5|m.day;c.year=A>=w?m.year:m.year-1,w=o[c.year-o[0]];var E=w>>9&4095,p=w>>5&15,b=w&31,d,u=new Date(E,p-1,b),g=new Date(m.year,m.month-1,m.day);d=Math.round((g-u)/(24*3600*1e3));var y=r[c.year-r[0]],D;for(D=0;D<13;D++){var P=y&1<<12-D?30:29;if(d>13;return!z||D=1888&&n<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var x=typeof s=="number"&&s>=1&&s<=12;if(!x)throw new Error("Lunar month outside range 1 - 12");var w=typeof h=="number"&&h>=1&&h<=30;if(!w)throw new Error("Lunar day outside range 1 - 30");var A;typeof f=="object"?(A=!1,c=f):(A=!!f,c=m||{}),T={year:n,month:s,day:h,isIntercalary:A}}var E;E=T.day-1;var p=r[T.year-r[0]],b=p>>13,d;b&&(T.month>b||T.isIntercalary)?d=T.month:d=T.month-1;for(var u=0;u>9&4095,P=y>>5&15,z=y&31,F=new Date(D,P-1,z+E);return c.year=F.getFullYear(),c.month=1+F.getMonth(),c.day=F.getDate(),c}}}),rW=He({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()+(S.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),_<0&&_++,e.day()+(e.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var S=Math.floor(_)+.5-this.jdEpoch,M=Math.floor((S-Math.floor((S+366)/1461))/365)+1;M<=0&&M--,S=Math.floor(_)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.coptic=v}}),aW=He({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),!1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),13},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),400},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,M,e){var t=this.dayOfWeek(S,M,e);return t>=2&&t<=6},extraInfo:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return{century:_[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return S=t.year()+(t.year()<0?1:0),M=t.month(),e=t.day(),e+(M>1?16:0)+(M>2?(M-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var M=Math.floor(S/400)+1;S-=(M-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(M<=0?M-1:M,e,t)}});var _={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=v}}),iW=He({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()+(S.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),_<0&&_++,e.day()+(e.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var S=Math.floor(_)+.5-this.jdEpoch,M=Math.floor((S-Math.floor((S+366)/1461))/365)+1;M<=0&&M--,S=Math.floor(_)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.ethiopian=v}}),nW=He({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(M.year())},_leapYear:function(S){return S=S<0?S+1:S,_(S*7+1,19)<7},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),this._leapYear(S.year?S.year():S)?13:12},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return S=M.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,M){return S.year&&(M=S.month(),S=S.year()),this._validate(S,M,this.minDay,Z.local.invalidMonth),M===12&&this.leapYear(S)||M===8&&_(this.daysInYear(S),10)===5?30:M===9&&_(this.daysInYear(S),10)===3?29:this.daysPerMonth[M-1]},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==6},extraInfo:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);S=t.year(),M=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(M<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a=this.toJD(M===-1?1:M+1,7,1);)M++;for(var e=Sthis.toJD(M,e,this.daysInMonth(M,e));)e++;var t=S-this.toJD(M,e,1)+1;return this.newDate(M,e,t)}});function _(S,M){return S-M*Math.floor(S/M)}Z.calendars.hebrew=v}}),oW=He({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(_){var S=this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(_){return this.leapYear(_)?355:354},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===12&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return this.dayOfWeek(_,S,M)!==5},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),S=e.month(),M=e.day(),_=_<=0?_+1:_,M+Math.ceil(29.5*(S-1))+(_-1)*354+Math.floor((3+11*_)/30)+this.jdEpoch-1},fromJD:function(_){_=Math.floor(_)+.5;var S=Math.floor((30*(_-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var M=Math.min(12,Math.ceil((_-29-this.toJD(S,1,1))/29.5)+1),e=_-this.toJD(S,M,1)+1;return this.newDate(S,M,e)}}),Z.calendars.islamic=v}}),sW=He({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()<0?S.year()+1:S.year();return M%4===0},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===2&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),S=e.month(),M=e.day(),_<0&&_++,S<=2&&(_--,S+=12),Math.floor(365.25*(_+4716))+Math.floor(30.6001*(S+1))+M-1524.5},fromJD:function(_){var S=Math.floor(_+.5),M=S+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=v}}),lW=He({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),q=ch();function v(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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;t19||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=_(M+8+17*20,365);return[Math.floor(e/20)+1,_(e,20)]},_toTzolkin:function(M){return M-=this.jdEpoch,[S(M+20,20),S(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 _(M,e){return M-e*Math.floor(M/e)}function S(M,e){return _(M-1,e)+1}Z.calendars.mayan=v}}),uW=He({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar;var _=Z.instance("gregorian");q(v.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(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return _.leapYear(M.year()+(M.year()<1?1:0)+1469)},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,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=this.toJD(M+1,1,1);)M++;for(var e=S-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=v}}),cW=He({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(_){return this.daysInYear(_)!==this.daysPerYear},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(_){var S=this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear);if(_=S.year(),typeof this.NEPALI_CALENDAR_DATA[_]>"u")return this.daysPerYear;for(var M=0,e=this.minMonth;e<=12;e++)M+=this.NEPALI_CALENDAR_DATA[_][e];return M},daysInMonth:function(_,S){return _.year&&(S=_.month(),_=_.year()),this._validate(_,S,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[_]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[_][S]},weekDay:function(_,S,M){return this.dayOfWeek(_,S,M)!==6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);_=e.year(),S=e.month(),M=e.day();var t=Z.instance(),r=0,o=S,a=_;this._createMissingCalendarData(_);var i=_-(o>9||o===9&&M>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=M,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===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(_){var S=Z.instance(),M=S.fromJD(_),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(_){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var M=_-1;M<_+2;M++)typeof this.NEPALI_CALENDAR_DATA[M]>"u"&&(this.NEPALI_CALENDAR_DATA[M]=S)},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=v}}),fW=He({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function _(S){var M=S-475;S<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}v.prototype=new Z.baseCalendar,q(v.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(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return _(M.year())},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==5},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);S=t.year(),M=t.month(),e=t.day();var r=0;if(S>0)for(var o=1;o0?S-1:S)*365+r+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var M=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(M);e<=0&&e--,S>this.toJD(e,12,_(e)?30:29)&&(e++,e===0&&e++);var t=S-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=S-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Z.calendars.persian=v,Z.calendars.jalali=v}}),hW=He({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 v.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 v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,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 v.toJD(r,t.month(),t.day())},fromJD:function(S){var M=v.fromJD(S),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.day())},_t2gYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)},_g2tYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)}}),Z.calendars.taiwan=_}}),pW=He({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 v.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 v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,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 v.toJD(r,t.month(),t.day())},fromJD:function(S){var M=v.fromJD(S),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.day())},_t2gYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)},_g2tYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)}}),Z.calendars.thai=_}}),dW=He({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(M.year())===355},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var M=0,e=1;e<=12;e++)M+=this.daysInMonth(S,e);return M},daysInMonth:function(S,M){for(var e=this._validate(S,M,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<_.length;o++){if(_[o]>t)return _[r]-_[r-1];r++}return 30},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==5},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+_[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var M=S-24e5+.5,e=0,t=0;t<_.length&&!(_[t]>M);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,i=r-12*o,n=M-_[e-1]+1;return this.newDate(a,i,n)},isValid:function(S,M,e){var t=Z.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(S=S.year!=null?S.year:S,t=S>=1276&&S<=1500),t},_validate:function(S,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=v;var _=[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]}}),vW=He({"src/components/calendars/calendars.js"(Z,q){"use strict";q.exports=Mp(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW(),pW(),dW()}}),mW=He({"src/components/calendars/index.js"(Z,q){"use strict";var v=vW(),_=sa(),S=Gs(),M=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:_.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},r=function(p,b,d,u){var g={};return g[d]=t,_.coerce(p,b,g,d,u)},o=function(p,b,d,u){for(var g=0;g0){if(++_e>=VZ)return arguments[0]}else _e=0;return fe.apply(void 0,arguments)}}var Pb=WZ;var XZ=Pb(Ab),Ib=XZ;var ZZ=/\{\n\/\* \[wrapped with (.+)\] \*/,YZ=/,? & /;function KZ(fe){var _e=fe.match(ZZ);return _e?_e[1].split(YZ):[]}var cC=KZ;var JZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function $Z(fe,_e){var Xe=_e.length;if(!Xe)return fe;var Lt=Xe-1;return _e[Lt]=(Xe>1?"& ":"")+_e[Lt],_e=_e.join(Xe>2?", ":" "),fe.replace(JZ,`{ +`),bt=wt.createShader(wt.FRAGMENT_SHADER);if(wt.isContextLost())return void(this.failedToCreate=!0);if(wt.shaderSource(bt,pt),wt.compileShader(bt),!wt.getShaderParameter(bt,wt.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${wt.getShaderInfoLog(bt)}`);wt.attachShader(this.program,bt);let Dt=wt.createShader(wt.VERTEX_SHADER);if(wt.isContextLost())return void(this.failedToCreate=!0);if(wt.shaderSource(Dt,Et),wt.compileShader(Dt),!wt.getShaderParameter(Dt,wt.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${wt.getShaderInfoLog(Dt)}`);wt.attachShader(this.program,Dt),this.attributes={};let ur={};this.numAttributes=Tr.length;for(let yr=0;yr({u_depth:new t.aH(yr,Er.u_depth),u_terrain:new t.aH(yr,Er.u_terrain),u_terrain_dim:new t.aI(yr,Er.u_terrain_dim),u_terrain_matrix:new t.aJ(yr,Er.u_terrain_matrix),u_terrain_unpack:new t.aK(yr,Er.u_terrain_unpack),u_terrain_exaggeration:new t.aI(yr,Er.u_terrain_exaggeration)}))(I,ur),this.binderUniforms=Te?Te.getUniforms(I,ur):[]}draw(I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe,$e,lt,pt,Et){let bt=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(Te),I.setStencilMode(Me),I.setColorMode(ze),I.setCullFace(ht),Ot){I.activeTexture.set(bt.TEXTURE2),bt.bindTexture(bt.TEXTURE_2D,Ot.depthTexture),I.activeTexture.set(bt.TEXTURE3),bt.bindTexture(bt.TEXTURE_2D,Ot.texture);for(let ur in this.terrainUniforms)this.terrainUniforms[ur].set(Ot[ur])}for(let ur in this.fixedUniforms)this.fixedUniforms[ur].set(wt[ur]);$e&&$e.setUniforms(I,this.binderUniforms,na,{zoom:qe});let Dt=0;switch(ie){case bt.LINES:Dt=2;break;case bt.TRIANGLES:Dt=3;break;case bt.LINE_STRIP:Dt=1}for(let ur of Kr.get()){let yr=ur.vaos||(ur.vaos={});(yr[$t]||(yr[$t]=new Kt)).bind(I,this,Tr,$e?$e.getPaintVertexBuffers():[],Sr,ur.vertexOffset,lt,pt,Et),bt.drawElements(ie,ur.primitiveLength*Dt,bt.UNSIGNED_SHORT,ur.primitiveOffset*Dt*2)}}}function Pa(Oe,I,ie){let Te=1/Fa(ie,1,I.transform.tileZoom),Me=Math.pow(2,ie.tileID.overscaledZ),ze=ie.tileSize*Math.pow(2,I.transform.tileZoom)/Me,ht=ze*(ie.tileID.canonical.x+ie.tileID.wrap*Me),wt=ze*ie.tileID.canonical.y;return{u_image:0,u_texsize:ie.imageAtlasTexture.size,u_scale:[Te,Oe.fromScale,Oe.toScale],u_fade:Oe.t,u_pixel_coord_upper:[ht>>16,wt>>16],u_pixel_coord_lower:[65535&ht,65535&wt]}}let ga=(Oe,I,ie,Te)=>{let Me=I.style.light,ze=Me.properties.get("position"),ht=[ze.x,ze.y,ze.z],wt=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}();Me.properties.get("anchor")==="viewport"&&function($t,Tr){var Sr=Math.sin(Tr),Kr=Math.cos(Tr);$t[0]=Kr,$t[1]=Sr,$t[2]=0,$t[3]=-Sr,$t[4]=Kr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(wt,-I.transform.angle),function($t,Tr,Sr){var Kr=Tr[0],na=Tr[1],qe=Tr[2];$t[0]=Kr*Sr[0]+na*Sr[3]+qe*Sr[6],$t[1]=Kr*Sr[1]+na*Sr[4]+qe*Sr[7],$t[2]=Kr*Sr[2]+na*Sr[5]+qe*Sr[8]}(ht,ht,wt);let Ot=Me.properties.get("color");return{u_matrix:Oe,u_lightpos:ht,u_lightintensity:Me.properties.get("intensity"),u_lightcolor:[Ot.r,Ot.g,Ot.b],u_vertical_gradient:+ie,u_opacity:Te}},la=(Oe,I,ie,Te,Me,ze,ht)=>t.e(ga(Oe,I,ie,Te),Pa(ze,I,ht),{u_height_factor:-Math.pow(2,Me.overscaledZ)/ht.tileSize/8}),ba=Oe=>({u_matrix:Oe}),Ai=(Oe,I,ie,Te)=>t.e(ba(Oe),Pa(ie,I,Te)),ki=(Oe,I)=>({u_matrix:Oe,u_world:I}),Ki=(Oe,I,ie,Te,Me)=>t.e(Ai(Oe,I,ie,Te),{u_world:Me}),En=(Oe,I,ie,Te)=>{let Me=Oe.transform,ze,ht;if(Te.paint.get("circle-pitch-alignment")==="map"){let wt=Fa(ie,1,Me.zoom);ze=!0,ht=[wt,wt]}else ze=!1,ht=Me.pixelsToGLUnits;return{u_camera_to_center_distance:Me.cameraToCenterDistance,u_scale_with_map:+(Te.paint.get("circle-pitch-scale")==="map"),u_matrix:Oe.translatePosMatrix(I.posMatrix,ie,Te.paint.get("circle-translate"),Te.paint.get("circle-translate-anchor")),u_pitch_with_map:+ze,u_device_pixel_ratio:Oe.pixelRatio,u_extrude_scale:ht}},Tn=(Oe,I,ie)=>({u_matrix:Oe,u_inv_matrix:I,u_camera_to_center_distance:ie.cameraToCenterDistance,u_viewport_size:[ie.width,ie.height]}),On=(Oe,I,ie=1)=>({u_matrix:Oe,u_color:I,u_overlay:0,u_overlay_scale:ie}),kn=Oe=>({u_matrix:Oe}),ao=(Oe,I,ie,Te)=>({u_matrix:Oe,u_extrude_scale:Fa(I,1,ie),u_intensity:Te}),Co=(Oe,I,ie,Te)=>{let Me=t.H();t.aP(Me,0,Oe.width,Oe.height,0,0,1);let ze=Oe.context.gl;return{u_matrix:Me,u_world:[ze.drawingBufferWidth,ze.drawingBufferHeight],u_image:ie,u_color_ramp:Te,u_opacity:I.paint.get("heatmap-opacity")}};function bo(Oe,I){let ie=Math.pow(2,I.canonical.z),Te=I.canonical.y;return[new t.Z(0,Te/ie).toLngLat().lat,new t.Z(0,(Te+1)/ie).toLngLat().lat]}let zs=(Oe,I,ie,Te)=>{let Me=Oe.transform;return{u_matrix:os(Oe,I,ie,Te),u_ratio:1/Fa(I,1,Me.zoom),u_device_pixel_ratio:Oe.pixelRatio,u_units_to_pixels:[1/Me.pixelsToGLUnits[0],1/Me.pixelsToGLUnits[1]]}},Cn=(Oe,I,ie,Te,Me)=>t.e(zs(Oe,I,ie,Me),{u_image:0,u_image_height:Te}),wo=(Oe,I,ie,Te,Me)=>{let ze=Oe.transform,ht=go(I,ze);return{u_matrix:os(Oe,I,ie,Me),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Fa(I,1,ze.zoom),u_device_pixel_ratio:Oe.pixelRatio,u_image:0,u_scale:[ht,Te.fromScale,Te.toScale],u_fade:Te.t,u_units_to_pixels:[1/ze.pixelsToGLUnits[0],1/ze.pixelsToGLUnits[1]]}},Zn=(Oe,I,ie,Te,Me,ze)=>{let ht=Oe.lineAtlas,wt=go(I,Oe.transform),Ot=ie.layout.get("line-cap")==="round",$t=ht.getDash(Te.from,Ot),Tr=ht.getDash(Te.to,Ot),Sr=$t.width*Me.fromScale,Kr=Tr.width*Me.toScale;return t.e(zs(Oe,I,ie,ze),{u_patternscale_a:[wt/Sr,-$t.height/2],u_patternscale_b:[wt/Kr,-Tr.height/2],u_sdfgamma:ht.width/(256*Math.min(Sr,Kr)*Oe.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:Tr.y,u_mix:Me.t})};function go(Oe,I){return 1/Fa(Oe,1,I.tileZoom)}function os(Oe,I,ie,Te){return Oe.translatePosMatrix(Te?Te.posMatrix:I.tileID.posMatrix,I,ie.paint.get("line-translate"),ie.paint.get("line-translate-anchor"))}let ys=(Oe,I,ie,Te,Me)=>{return{u_matrix:Oe,u_tl_parent:I,u_scale_parent:ie,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:(ht=Me.paint.get("raster-saturation"),ht>0?1-1/(1.001-ht):-ht),u_contrast_factor:(ze=Me.paint.get("raster-contrast"),ze>0?1/(1-ze):1+ze),u_spin_weights:jo(Me.paint.get("raster-hue-rotate"))};var ze,ht};function jo(Oe){Oe*=Math.PI/180;let I=Math.sin(Oe),ie=Math.cos(Oe);return[(2*ie+1)/3,(-Math.sqrt(3)*I-ie+1)/3,(Math.sqrt(3)*I-ie+1)/3]}let Yn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na)=>{let qe=ht.transform;return{u_is_size_zoom_constant:+(Oe==="constant"||Oe==="source"),u_is_size_feature_constant:+(Oe==="constant"||Oe==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:qe.cameraToCenterDistance,u_pitch:qe.pitch/360*2*Math.PI,u_rotate_symbol:+ie,u_aspect_ratio:qe.width/qe.height,u_fade_change:ht.options.fadeDuration?ht.symbolFadeChange:1,u_matrix:wt,u_label_plane_matrix:Ot,u_coord_matrix:$t,u_is_text:+Sr,u_pitch_with_map:+Te,u_is_along_line:Me,u_is_variable_anchor:ze,u_texsize:Kr,u_texture:0,u_translation:Tr,u_pitched_scale:na}},Gn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na,qe)=>{let $e=ht.transform;return t.e(Yn(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,qe),{u_gamma_scale:Te?Math.cos($e._pitch)*$e.cameraToCenterDistance:1,u_device_pixel_ratio:ht.pixelRatio,u_is_halo:+na})},Hn=(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,Sr,Kr,na)=>t.e(Gn(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t,Tr,!0,Sr,!0,na),{u_texsize_icon:Kr,u_texture_icon:1}),ss=(Oe,I,ie)=>({u_matrix:Oe,u_opacity:I,u_color:ie}),_s=(Oe,I,ie,Te,Me,ze)=>t.e(function(ht,wt,Ot,$t){let Tr=Ot.imageManager.getPattern(ht.from.toString()),Sr=Ot.imageManager.getPattern(ht.to.toString()),{width:Kr,height:na}=Ot.imageManager.getPixelSize(),qe=Math.pow(2,$t.tileID.overscaledZ),$e=$t.tileSize*Math.pow(2,Ot.transform.tileZoom)/qe,lt=$e*($t.tileID.canonical.x+$t.tileID.wrap*qe),pt=$e*$t.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Tr.tl,u_pattern_br_a:Tr.br,u_pattern_tl_b:Sr.tl,u_pattern_br_b:Sr.br,u_texsize:[Kr,na],u_mix:wt.t,u_pattern_size_a:Tr.displaySize,u_pattern_size_b:Sr.displaySize,u_scale_a:wt.fromScale,u_scale_b:wt.toScale,u_tile_units_to_pixels:1/Fa($t,1,Ot.transform.tileZoom),u_pixel_coord_upper:[lt>>16,pt>>16],u_pixel_coord_lower:[65535<,65535&pt]}}(Te,ze,ie,Me),{u_matrix:Oe,u_opacity:I}),ps={fillExtrusion:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_lightpos:new t.aN(Oe,I.u_lightpos),u_lightintensity:new t.aI(Oe,I.u_lightintensity),u_lightcolor:new t.aN(Oe,I.u_lightcolor),u_vertical_gradient:new t.aI(Oe,I.u_vertical_gradient),u_opacity:new t.aI(Oe,I.u_opacity)}),fillExtrusionPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_lightpos:new t.aN(Oe,I.u_lightpos),u_lightintensity:new t.aI(Oe,I.u_lightintensity),u_lightcolor:new t.aN(Oe,I.u_lightcolor),u_vertical_gradient:new t.aI(Oe,I.u_vertical_gradient),u_height_factor:new t.aI(Oe,I.u_height_factor),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade),u_opacity:new t.aI(Oe,I.u_opacity)}),fill:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix)}),fillPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),fillOutline:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world)}),fillOutlinePattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world),u_image:new t.aH(Oe,I.u_image),u_texsize:new t.aO(Oe,I.u_texsize),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),circle:(Oe,I)=>({u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_scale_with_map:new t.aH(Oe,I.u_scale_with_map),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_extrude_scale:new t.aO(Oe,I.u_extrude_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_matrix:new t.aJ(Oe,I.u_matrix)}),collisionBox:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_pixel_extrude_scale:new t.aO(Oe,I.u_pixel_extrude_scale)}),collisionCircle:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_inv_matrix:new t.aJ(Oe,I.u_inv_matrix),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_viewport_size:new t.aO(Oe,I.u_viewport_size)}),debug:(Oe,I)=>({u_color:new t.aL(Oe,I.u_color),u_matrix:new t.aJ(Oe,I.u_matrix),u_overlay:new t.aH(Oe,I.u_overlay),u_overlay_scale:new t.aI(Oe,I.u_overlay_scale)}),clippingMask:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix)}),heatmap:(Oe,I)=>({u_extrude_scale:new t.aI(Oe,I.u_extrude_scale),u_intensity:new t.aI(Oe,I.u_intensity),u_matrix:new t.aJ(Oe,I.u_matrix)}),heatmapTexture:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_world:new t.aO(Oe,I.u_world),u_image:new t.aH(Oe,I.u_image),u_color_ramp:new t.aH(Oe,I.u_color_ramp),u_opacity:new t.aI(Oe,I.u_opacity)}),hillshade:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_latrange:new t.aO(Oe,I.u_latrange),u_light:new t.aO(Oe,I.u_light),u_shadow:new t.aL(Oe,I.u_shadow),u_highlight:new t.aL(Oe,I.u_highlight),u_accent:new t.aL(Oe,I.u_accent)}),hillshadePrepare:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_image:new t.aH(Oe,I.u_image),u_dimension:new t.aO(Oe,I.u_dimension),u_zoom:new t.aI(Oe,I.u_zoom),u_unpack:new t.aK(Oe,I.u_unpack)}),line:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels)}),lineGradient:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_image:new t.aH(Oe,I.u_image),u_image_height:new t.aI(Oe,I.u_image_height)}),linePattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texsize:new t.aO(Oe,I.u_texsize),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_image:new t.aH(Oe,I.u_image),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_scale:new t.aN(Oe,I.u_scale),u_fade:new t.aI(Oe,I.u_fade)}),lineSDF:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ratio:new t.aI(Oe,I.u_ratio),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Oe,I.u_units_to_pixels),u_patternscale_a:new t.aO(Oe,I.u_patternscale_a),u_patternscale_b:new t.aO(Oe,I.u_patternscale_b),u_sdfgamma:new t.aI(Oe,I.u_sdfgamma),u_image:new t.aH(Oe,I.u_image),u_tex_y_a:new t.aI(Oe,I.u_tex_y_a),u_tex_y_b:new t.aI(Oe,I.u_tex_y_b),u_mix:new t.aI(Oe,I.u_mix)}),raster:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_tl_parent:new t.aO(Oe,I.u_tl_parent),u_scale_parent:new t.aI(Oe,I.u_scale_parent),u_buffer_scale:new t.aI(Oe,I.u_buffer_scale),u_fade_t:new t.aI(Oe,I.u_fade_t),u_opacity:new t.aI(Oe,I.u_opacity),u_image0:new t.aH(Oe,I.u_image0),u_image1:new t.aH(Oe,I.u_image1),u_brightness_low:new t.aI(Oe,I.u_brightness_low),u_brightness_high:new t.aI(Oe,I.u_brightness_high),u_saturation_factor:new t.aI(Oe,I.u_saturation_factor),u_contrast_factor:new t.aI(Oe,I.u_contrast_factor),u_spin_weights:new t.aN(Oe,I.u_spin_weights)}),symbolIcon:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texture:new t.aH(Oe,I.u_texture),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),symbolSDF:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texture:new t.aH(Oe,I.u_texture),u_gamma_scale:new t.aI(Oe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Oe,I.u_is_halo),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),symbolTextAndIcon:(Oe,I)=>({u_is_size_zoom_constant:new t.aH(Oe,I.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Oe,I.u_is_size_feature_constant),u_size_t:new t.aI(Oe,I.u_size_t),u_size:new t.aI(Oe,I.u_size),u_camera_to_center_distance:new t.aI(Oe,I.u_camera_to_center_distance),u_pitch:new t.aI(Oe,I.u_pitch),u_rotate_symbol:new t.aH(Oe,I.u_rotate_symbol),u_aspect_ratio:new t.aI(Oe,I.u_aspect_ratio),u_fade_change:new t.aI(Oe,I.u_fade_change),u_matrix:new t.aJ(Oe,I.u_matrix),u_label_plane_matrix:new t.aJ(Oe,I.u_label_plane_matrix),u_coord_matrix:new t.aJ(Oe,I.u_coord_matrix),u_is_text:new t.aH(Oe,I.u_is_text),u_pitch_with_map:new t.aH(Oe,I.u_pitch_with_map),u_is_along_line:new t.aH(Oe,I.u_is_along_line),u_is_variable_anchor:new t.aH(Oe,I.u_is_variable_anchor),u_texsize:new t.aO(Oe,I.u_texsize),u_texsize_icon:new t.aO(Oe,I.u_texsize_icon),u_texture:new t.aH(Oe,I.u_texture),u_texture_icon:new t.aH(Oe,I.u_texture_icon),u_gamma_scale:new t.aI(Oe,I.u_gamma_scale),u_device_pixel_ratio:new t.aI(Oe,I.u_device_pixel_ratio),u_is_halo:new t.aH(Oe,I.u_is_halo),u_translation:new t.aO(Oe,I.u_translation),u_pitched_scale:new t.aI(Oe,I.u_pitched_scale)}),background:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_opacity:new t.aI(Oe,I.u_opacity),u_color:new t.aL(Oe,I.u_color)}),backgroundPattern:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_opacity:new t.aI(Oe,I.u_opacity),u_image:new t.aH(Oe,I.u_image),u_pattern_tl_a:new t.aO(Oe,I.u_pattern_tl_a),u_pattern_br_a:new t.aO(Oe,I.u_pattern_br_a),u_pattern_tl_b:new t.aO(Oe,I.u_pattern_tl_b),u_pattern_br_b:new t.aO(Oe,I.u_pattern_br_b),u_texsize:new t.aO(Oe,I.u_texsize),u_mix:new t.aI(Oe,I.u_mix),u_pattern_size_a:new t.aO(Oe,I.u_pattern_size_a),u_pattern_size_b:new t.aO(Oe,I.u_pattern_size_b),u_scale_a:new t.aI(Oe,I.u_scale_a),u_scale_b:new t.aI(Oe,I.u_scale_b),u_pixel_coord_upper:new t.aO(Oe,I.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Oe,I.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Oe,I.u_tile_units_to_pixels)}),terrain:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texture:new t.aH(Oe,I.u_texture),u_ele_delta:new t.aI(Oe,I.u_ele_delta),u_fog_matrix:new t.aJ(Oe,I.u_fog_matrix),u_fog_color:new t.aL(Oe,I.u_fog_color),u_fog_ground_blend:new t.aI(Oe,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Oe,I.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Oe,I.u_horizon_color),u_horizon_fog_blend:new t.aI(Oe,I.u_horizon_fog_blend)}),terrainDepth:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_ele_delta:new t.aI(Oe,I.u_ele_delta)}),terrainCoords:(Oe,I)=>({u_matrix:new t.aJ(Oe,I.u_matrix),u_texture:new t.aH(Oe,I.u_texture),u_terrain_coords_id:new t.aI(Oe,I.u_terrain_coords_id),u_ele_delta:new t.aI(Oe,I.u_ele_delta)}),sky:(Oe,I)=>({u_sky_color:new t.aL(Oe,I.u_sky_color),u_horizon_color:new t.aL(Oe,I.u_horizon_color),u_horizon:new t.aI(Oe,I.u_horizon),u_sky_horizon_blend:new t.aI(Oe,I.u_sky_horizon_blend)})};class Ko{constructor(I,ie,Te){this.context=I;let Me=I.gl;this.buffer=Me.createBuffer(),this.dynamicDraw=!!Te,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),Me.bufferData(Me.ELEMENT_ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?Me.DYNAMIC_DRAW:Me.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(I){let ie=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ie.bufferSubData(ie.ELEMENT_ARRAY_BUFFER,0,I.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Gi={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Pn{constructor(I,ie,Te,Me){this.length=ie.length,this.attributes=Te,this.itemSize=ie.bytesPerElement,this.dynamicDraw=Me,this.context=I;let ze=I.gl;this.buffer=ze.createBuffer(),I.bindVertexBuffer.set(this.buffer),ze.bufferData(ze.ARRAY_BUFFER,ie.arrayBuffer,this.dynamicDraw?ze.DYNAMIC_DRAW:ze.STATIC_DRAW),this.dynamicDraw||delete ie.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(I){if(I.length!==this.length)throw new Error(`Length of new data is ${I.length}, which doesn't match current length of ${this.length}`);let ie=this.context.gl;this.bind(),ie.bufferSubData(ie.ARRAY_BUFFER,0,I.arrayBuffer)}enableAttributes(I,ie){for(let Te=0;Te0){let yr=t.H();t.aQ(yr,bt.placementInvProjMatrix,Oe.transform.glCoordMatrix),t.aQ(yr,yr,bt.placementViewportMatrix),Ot.push({circleArray:ur,circleOffset:Tr,transform:Et.posMatrix,invTransform:yr,coord:Et}),$t+=ur.length/4,Tr=$t}Dt&&wt.draw(ze,ht.LINES,us.disabled,Ps.disabled,Oe.colorModeForRenderPass(),to.disabled,{u_matrix:Et.posMatrix,u_pixel_extrude_scale:[1/(Sr=Oe.transform).width,1/Sr.height]},Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Et),ie.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,null,Oe.transform.zoom,null,null,Dt.collisionVertexBuffer)}var Sr;if(!Me||!Ot.length)return;let Kr=Oe.useProgram("collisionCircle"),na=new t.aR;na.resize(4*$t),na._trim();let qe=0;for(let pt of Ot)for(let Et=0;Et=0&&(pt[bt.associatedIconIndex]={shiftedAnchor:Sn,angle:Kn})}else or(bt.numGlyphs,$e)}if($t){lt.clear();let Et=Oe.icon.placedSymbolArray;for(let bt=0;btOe.style.map.terrain.getElevation(Aa,zt,_r):null,tr=ie.layout.get("text-rotation-alignment")==="map";Ae(ci,Aa.posMatrix,Oe,Me,tu,vu,pt,$t,tr,$e,Aa.toUnwrapped(),qe.width,qe.height,wl,Tt)}let Gl=Aa.posMatrix,Hl=Me&&jr||uc,me=Et||Hl?ql:tu,De=Ru,et=on&&ie.paint.get(Me?"text-halo-width":"icon-halo-width").constantOr(1)!==0,dt;dt=on?ci.iconsInText?Hn(Sn.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Mo,tl,ha):Gn(Sn.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Me,Mo,!0,ha):Yn(Sn.kind,Ao,bt,pt,Et,Hl,Oe,Gl,me,De,wl,Me,Mo,ha);let yt={program:Bn,buffers:Vi,uniformValues:dt,atlasTexture:Yo,atlasTextureIcon:es,atlasInterpolation:ds,atlasInterpolationIcon:ul,isSDF:on,hasHalo:et};if(ur&&ci.canOverlap){yr=!0;let Tt=Vi.segments.get();for(let tr of Tt)Qr.push({segments:new t.a0([tr]),sortKey:tr.sortKey,state:yt,terrainData:ls})}else Qr.push({segments:Vi.segments,sortKey:0,state:yt,terrainData:ls})}yr&&Qr.sort((Aa,Da)=>Aa.sortKey-Da.sortKey);for(let Aa of Qr){let Da=Aa.state;if(Kr.activeTexture.set(na.TEXTURE0),Da.atlasTexture.bind(Da.atlasInterpolation,na.CLAMP_TO_EDGE),Da.atlasTextureIcon&&(Kr.activeTexture.set(na.TEXTURE1),Da.atlasTextureIcon&&Da.atlasTextureIcon.bind(Da.atlasInterpolationIcon,na.CLAMP_TO_EDGE)),Da.isSDF){let ci=Da.uniformValues;Da.hasHalo&&(ci.u_is_halo=1,Of(Da.buffers,Aa.segments,ie,Oe,Da.program,Er,Tr,Sr,ci,Aa.terrainData)),ci.u_is_halo=0}Of(Da.buffers,Aa.segments,ie,Oe,Da.program,Er,Tr,Sr,Da.uniformValues,Aa.terrainData)}}function Of(Oe,I,ie,Te,Me,ze,ht,wt,Ot,$t){let Tr=Te.context;Me.draw(Tr,Tr.gl.TRIANGLES,ze,ht,wt,to.disabled,Ot,$t,ie.id,Oe.layoutVertexBuffer,Oe.indexBuffer,I,ie.paint,Te.transform.zoom,Oe.programConfigurations.get(ie.id),Oe.dynamicLayoutVertexBuffer,Oe.opacityVertexBuffer)}function of(Oe,I,ie,Te){let Me=Oe.context,ze=Me.gl,ht=Ps.disabled,wt=new fl([ze.ONE,ze.ONE],t.aM.transparent,[!0,!0,!0,!0]),Ot=I.getBucket(ie);if(!Ot)return;let $t=Te.key,Tr=ie.heatmapFbos.get($t);Tr||(Tr=Bf(Me,I.tileSize,I.tileSize),ie.heatmapFbos.set($t,Tr)),Me.bindFramebuffer.set(Tr.framebuffer),Me.viewport.set([0,0,I.tileSize,I.tileSize]),Me.clear({color:t.aM.transparent});let Sr=Ot.programConfigurations.get(ie.id),Kr=Oe.useProgram("heatmap",Sr),na=Oe.style.map.terrain.getTerrainData(Te);Kr.draw(Me,ze.TRIANGLES,us.disabled,ht,wt,to.disabled,ao(Te.posMatrix,I,Oe.transform.zoom,ie.paint.get("heatmap-intensity")),na,ie.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,ie.paint,Oe.transform.zoom,Sr)}function jc(Oe,I,ie){let Te=Oe.context,Me=Te.gl;Te.setColorMode(Oe.colorModeForRenderPass());let ze=Nf(Te,I),ht=ie.key,wt=I.heatmapFbos.get(ht);wt&&(Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,wt.colorAttachment.get()),Te.activeTexture.set(Me.TEXTURE1),ze.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),Oe.useProgram("heatmapTexture").draw(Te,Me.TRIANGLES,us.disabled,Ps.disabled,Oe.colorModeForRenderPass(),to.disabled,Co(Oe,I,0,1),null,I.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments,I.paint,Oe.transform.zoom),wt.destroy(),I.heatmapFbos.delete(ht))}function Bf(Oe,I,ie){var Te,Me;let ze=Oe.gl,ht=ze.createTexture();ze.bindTexture(ze.TEXTURE_2D,ht),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_S,ze.CLAMP_TO_EDGE),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_WRAP_T,ze.CLAMP_TO_EDGE),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MIN_FILTER,ze.LINEAR),ze.texParameteri(ze.TEXTURE_2D,ze.TEXTURE_MAG_FILTER,ze.LINEAR);let wt=(Te=Oe.HALF_FLOAT)!==null&&Te!==void 0?Te:ze.UNSIGNED_BYTE,Ot=(Me=Oe.RGBA16F)!==null&&Me!==void 0?Me:ze.RGBA;ze.texImage2D(ze.TEXTURE_2D,0,Ot,I,ie,0,ze.RGBA,wt,null);let $t=Oe.createFramebuffer(I,ie,!1,!1);return $t.colorAttachment.set(ht),$t}function Nf(Oe,I){return I.colorRampTexture||(I.colorRampTexture=new u(Oe,I.colorRamp,Oe.gl.RGBA)),I.colorRampTexture}function Gu(Oe,I,ie,Te,Me){if(!ie||!Te||!Te.imageAtlas)return;let ze=Te.imageAtlas.patternPositions,ht=ze[ie.to.toString()],wt=ze[ie.from.toString()];if(!ht&&wt&&(ht=wt),!wt&&ht&&(wt=ht),!ht||!wt){let Ot=Me.getPaintProperty(I);ht=ze[Ot],wt=ze[Ot]}ht&&wt&&Oe.setConstantPatternPositions(ht,wt)}function Ef(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context.gl,Ot="fill-pattern",$t=ie.paint.get(Ot),Tr=$t&&$t.constantOr(1),Sr=ie.getCrossfadeParameters(),Kr,na,qe,$e,lt;ht?(na=Tr&&!ie.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Kr=wt.LINES):(na=Tr?"fillPattern":"fill",Kr=wt.TRIANGLES);let pt=$t.constantOr(null);for(let Et of Te){let bt=I.getTile(Et);if(Tr&&!bt.patternsLoaded())continue;let Dt=bt.getBucket(ie);if(!Dt)continue;let ur=Dt.programConfigurations.get(ie.id),yr=Oe.useProgram(na,ur),Er=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Et);Tr&&(Oe.context.activeTexture.set(wt.TEXTURE0),bt.imageAtlasTexture.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),ur.updatePaintBuffers(Sr)),Gu(ur,Ot,pt,bt,ie);let jr=Er?Et:null,Qr=Oe.translatePosMatrix(jr?jr.posMatrix:Et.posMatrix,bt,ie.paint.get("fill-translate"),ie.paint.get("fill-translate-anchor"));if(ht){$e=Dt.indexBuffer2,lt=Dt.segments2;let ha=[wt.drawingBufferWidth,wt.drawingBufferHeight];qe=na==="fillOutlinePattern"&&Tr?Ki(Qr,Oe,Sr,bt,ha):ki(Qr,ha)}else $e=Dt.indexBuffer,lt=Dt.segments,qe=Tr?Ai(Qr,Oe,Sr,bt):ba(Qr);yr.draw(Oe.context,Kr,Me,Oe.stencilModeForClipping(Et),ze,to.disabled,qe,Er,ie.id,Dt.layoutVertexBuffer,$e,lt,ie.paint,Oe.transform.zoom,ur)}}function oc(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context,Ot=wt.gl,$t="fill-extrusion-pattern",Tr=ie.paint.get($t),Sr=Tr.constantOr(1),Kr=ie.getCrossfadeParameters(),na=ie.paint.get("fill-extrusion-opacity"),qe=Tr.constantOr(null);for(let $e of Te){let lt=I.getTile($e),pt=lt.getBucket(ie);if(!pt)continue;let Et=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData($e),bt=pt.programConfigurations.get(ie.id),Dt=Oe.useProgram(Sr?"fillExtrusionPattern":"fillExtrusion",bt);Sr&&(Oe.context.activeTexture.set(Ot.TEXTURE0),lt.imageAtlasTexture.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),bt.updatePaintBuffers(Kr)),Gu(bt,$t,qe,lt,ie);let ur=Oe.translatePosMatrix($e.posMatrix,lt,ie.paint.get("fill-extrusion-translate"),ie.paint.get("fill-extrusion-translate-anchor")),yr=ie.paint.get("fill-extrusion-vertical-gradient"),Er=Sr?la(ur,Oe,yr,na,$e,Kr,lt):ga(ur,Oe,yr,na);Dt.draw(wt,wt.gl.TRIANGLES,Me,ze,ht,to.backCCW,Er,Et,ie.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,ie.paint,Oe.transform.zoom,bt,Oe.style.map.terrain&&pt.centroidVertexBuffer)}}function Zc(Oe,I,ie,Te,Me,ze,ht){let wt=Oe.context,Ot=wt.gl,$t=ie.fbo;if(!$t)return;let Tr=Oe.useProgram("hillshade"),Sr=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(I);wt.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,$t.colorAttachment.get()),Tr.draw(wt,Ot.TRIANGLES,Me,ze,ht,to.disabled,((Kr,na,qe,$e)=>{let lt=qe.paint.get("hillshade-shadow-color"),pt=qe.paint.get("hillshade-highlight-color"),Et=qe.paint.get("hillshade-accent-color"),bt=qe.paint.get("hillshade-illumination-direction")*(Math.PI/180);qe.paint.get("hillshade-illumination-anchor")==="viewport"&&(bt-=Kr.transform.angle);let Dt=!Kr.options.moving;return{u_matrix:$e?$e.posMatrix:Kr.transform.calculatePosMatrix(na.tileID.toUnwrapped(),Dt),u_image:0,u_latrange:bo(0,na.tileID),u_light:[qe.paint.get("hillshade-exaggeration"),bt],u_shadow:lt,u_highlight:pt,u_accent:Et}})(Oe,ie,Te,Sr?I:null),Sr,Te.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments)}function eu(Oe,I,ie,Te,Me,ze){let ht=Oe.context,wt=ht.gl,Ot=I.dem;if(Ot&&Ot.data){let $t=Ot.dim,Tr=Ot.stride,Sr=Ot.getPixels();if(ht.activeTexture.set(wt.TEXTURE1),ht.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||Oe.getTileTexture(Tr),I.demTexture){let na=I.demTexture;na.update(Sr,{premultiply:!1}),na.bind(wt.NEAREST,wt.CLAMP_TO_EDGE)}else I.demTexture=new u(ht,Sr,wt.RGBA,{premultiply:!1}),I.demTexture.bind(wt.NEAREST,wt.CLAMP_TO_EDGE);ht.activeTexture.set(wt.TEXTURE0);let Kr=I.fbo;if(!Kr){let na=new u(ht,{width:$t,height:$t,data:null},wt.RGBA);na.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),Kr=I.fbo=ht.createFramebuffer($t,$t,!0,!1),Kr.colorAttachment.set(na.texture)}ht.bindFramebuffer.set(Kr.framebuffer),ht.viewport.set([0,0,$t,$t]),Oe.useProgram("hillshadePrepare").draw(ht,wt.TRIANGLES,Te,Me,ze,to.disabled,((na,qe)=>{let $e=qe.stride,lt=t.H();return t.aP(lt,0,t.X,-t.X,0,0,1),t.J(lt,lt,[0,-t.X,0]),{u_matrix:lt,u_image:1,u_dimension:[$e,$e],u_zoom:na.overscaledZ,u_unpack:qe.getUnpackVector()}})(I.tileID,Ot),null,ie.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function qc(Oe,I,ie,Te,Me,ze){let ht=Te.paint.get("raster-fade-duration");if(!ze&&ht>0){let wt=i.now(),Ot=(wt-Oe.timeAdded)/ht,$t=I?(wt-I.timeAdded)/ht:-1,Tr=ie.getSource(),Sr=Me.coveringZoomLevel({tileSize:Tr.tileSize,roundZoom:Tr.roundZoom}),Kr=!I||Math.abs(I.tileID.overscaledZ-Sr)>Math.abs(Oe.tileID.overscaledZ-Sr),na=Kr&&Oe.refreshedUponExpiration?1:t.ac(Kr?Ot:1-$t,0,1);return Oe.refreshedUponExpiration&&Ot>=1&&(Oe.refreshedUponExpiration=!1),I?{opacity:1,mix:1-na}:{opacity:na,mix:0}}return{opacity:1,mix:0}}let Sc=new t.aM(1,0,0,1),Zs=new t.aM(0,1,0,1),kf=new t.aM(0,0,1,1),fh=new t.aM(1,0,1,1),Uf=new t.aM(0,1,1,1);function Yc(Oe,I,ie,Te){Cu(Oe,0,I+ie/2,Oe.transform.width,ie,Te)}function $f(Oe,I,ie,Te){Cu(Oe,I-ie/2,0,ie,Oe.transform.height,Te)}function Cu(Oe,I,ie,Te,Me,ze){let ht=Oe.context,wt=ht.gl;wt.enable(wt.SCISSOR_TEST),wt.scissor(I*Oe.pixelRatio,ie*Oe.pixelRatio,Te*Oe.pixelRatio,Me*Oe.pixelRatio),ht.clear({color:ze}),wt.disable(wt.SCISSOR_TEST)}function jf(Oe,I,ie){let Te=Oe.context,Me=Te.gl,ze=ie.posMatrix,ht=Oe.useProgram("debug"),wt=us.disabled,Ot=Ps.disabled,$t=Oe.colorModeForRenderPass(),Tr="$debug",Sr=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(ie);Te.activeTexture.set(Me.TEXTURE0);let Kr=I.getTileByID(ie.key).latestRawTileData,na=Math.floor((Kr&&Kr.byteLength||0)/1024),qe=I.getTile(ie).tileSize,$e=512/Math.min(qe,512)*(ie.overscaledZ/Oe.transform.zoom)*.5,lt=ie.canonical.toString();ie.overscaledZ!==ie.canonical.z&&(lt+=` => ${ie.overscaledZ}`),function(pt,Et){pt.initDebugOverlayCanvas();let bt=pt.debugOverlayCanvas,Dt=pt.context.gl,ur=pt.debugOverlayCanvas.getContext("2d");ur.clearRect(0,0,bt.width,bt.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(Et,5,5),ur.strokeText(Et,5,5),pt.debugOverlayTexture.update(bt),pt.debugOverlayTexture.bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE)}(Oe,`${lt} ${na}kB`),ht.draw(Te,Me.TRIANGLES,wt,Ot,fl.alphaBlended,to.disabled,On(ze,t.aM.transparent,$e),null,Tr,Oe.debugBuffer,Oe.quadTriangleIndexBuffer,Oe.debugSegments),ht.draw(Te,Me.LINE_STRIP,wt,Ot,$t,to.disabled,On(ze,t.aM.red),Sr,Tr,Oe.debugBuffer,Oe.tileBorderIndexBuffer,Oe.debugSegments)}function ml(Oe,I,ie){let Te=Oe.context,Me=Te.gl,ze=Oe.colorModeForRenderPass(),ht=new us(Me.LEQUAL,us.ReadWrite,Oe.depthRangeFor3D),wt=Oe.useProgram("terrain"),Ot=I.getTerrainMesh();Te.bindFramebuffer.set(null),Te.viewport.set([0,0,Oe.width,Oe.height]);for(let $t of ie){let Tr=Oe.renderToTexture.getTexture($t),Sr=I.getTerrainData($t.tileID);Te.activeTexture.set(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,Tr.texture);let Kr=Oe.transform.calculatePosMatrix($t.tileID.toUnwrapped()),na=I.getMeshFrameDelta(Oe.transform.zoom),qe=Oe.transform.calculateFogMatrix($t.tileID.toUnwrapped()),$e=mr(Kr,na,qe,Oe.style.sky,Oe.transform.pitch);wt.draw(Te,Me.TRIANGLES,ht,Ps.disabled,ze,to.backCCW,$e,Sr,"terrain",Ot.vertexBuffer,Ot.indexBuffer,Ot.segments)}}class Lu{constructor(I,ie,Te){this.vertexBuffer=I,this.indexBuffer=ie,this.segments=Te}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Mc{constructor(I,ie){this.context=new xh(I),this.transform=ie,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 Or}resize(I,ie,Te){if(this.width=Math.floor(I*Te),this.height=Math.floor(ie*Te),this.pixelRatio=Te,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Me of this.style._order)this.style._layers[Me].resize()}setup(){let I=this.context,ie=new t.aX;ie.emplaceBack(0,0),ie.emplaceBack(t.X,0),ie.emplaceBack(0,t.X),ie.emplaceBack(t.X,t.X),this.tileExtentBuffer=I.createVertexBuffer(ie,Nr.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let Te=new t.aX;Te.emplaceBack(0,0),Te.emplaceBack(t.X,0),Te.emplaceBack(0,t.X),Te.emplaceBack(t.X,t.X),this.debugBuffer=I.createVertexBuffer(Te,Nr.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let Me=new t.$;Me.emplaceBack(0,0,0,0),Me.emplaceBack(t.X,0,t.X,0),Me.emplaceBack(0,t.X,0,t.X),Me.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=I.createVertexBuffer(Me,je.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let ze=new t.aX;ze.emplaceBack(0,0),ze.emplaceBack(1,0),ze.emplaceBack(0,1),ze.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(ze,Nr.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let ht=new t.aZ;ht.emplaceBack(0),ht.emplaceBack(1),ht.emplaceBack(3),ht.emplaceBack(2),ht.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(ht);let wt=new t.aY;wt.emplaceBack(0,1,2),wt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(wt);let Ot=this.context.gl;this.stencilClearMode=new Ps({func:Ot.ALWAYS,mask:0},0,255,Ot.ZERO,Ot.ZERO,Ot.ZERO)}clearStencil(){let I=this.context,ie=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Te=t.H();t.aP(Te,0,this.width,this.height,0,0,1),t.K(Te,Te,[ie.drawingBufferWidth,ie.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ie.TRIANGLES,us.disabled,this.stencilClearMode,fl.disabled,to.disabled,kn(Te),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(I,ie){if(this.currentStencilSource===I.source||!I.isTileClipped()||!ie||!ie.length)return;this.currentStencilSource=I.source;let Te=this.context,Me=Te.gl;this.nextStencilID+ie.length>256&&this.clearStencil(),Te.setColorMode(fl.disabled),Te.setDepthMode(us.disabled);let ze=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ht of ie){let wt=this._tileClippingMaskIDs[ht.key]=this.nextStencilID++,Ot=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ht);ze.draw(Te,Me.TRIANGLES,us.disabled,new Ps({func:Me.ALWAYS,mask:0},wt,255,Me.KEEP,Me.KEEP,Me.REPLACE),fl.disabled,to.disabled,kn(ht.posMatrix),Ot,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let I=this.nextStencilID++,ie=this.context.gl;return new Ps({func:ie.NOTEQUAL,mask:255},I,255,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilModeForClipping(I){let ie=this.context.gl;return new Ps({func:ie.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ie.KEEP,ie.KEEP,ie.REPLACE)}stencilConfigForOverlap(I){let ie=this.context.gl,Te=I.sort((ht,wt)=>wt.overscaledZ-ht.overscaledZ),Me=Te[Te.length-1].overscaledZ,ze=Te[0].overscaledZ-Me+1;if(ze>1){this.currentStencilSource=void 0,this.nextStencilID+ze>256&&this.clearStencil();let ht={};for(let wt=0;wt({u_sky_color:pt.properties.get("sky-color"),u_horizon_color:pt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*bt,u_sky_horizon_blend:pt.properties.get("sky-horizon-blend")*Et.height/2*bt}))($t,Ot.style.map.transform,Ot.pixelRatio),na=new us(Sr.LEQUAL,us.ReadWrite,[0,1]),qe=Ps.disabled,$e=Ot.colorModeForRenderPass(),lt=Ot.useProgram("sky");if(!$t.mesh){let pt=new t.aX;pt.emplaceBack(-1,-1),pt.emplaceBack(1,-1),pt.emplaceBack(1,1),pt.emplaceBack(-1,1);let Et=new t.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),$t.mesh=new Lu(Tr.createVertexBuffer(pt,Nr.members),Tr.createIndexBuffer(Et),t.a0.simpleSegment(0,0,pt.length,Et.length))}lt.draw(Tr,Sr.TRIANGLES,na,qe,$e,to.disabled,Kr,void 0,"sky",$t.mesh.vertexBuffer,$t.mesh.indexBuffer,$t.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ie.showOverdrawInspector,this.depthRangeFor3D=[0,1-(I._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Te.length-1;this.currentLayer>=0;this.currentLayer--){let Ot=this.style._layers[Te[this.currentLayer]],$t=Me[Ot.source],Tr=ze[Ot.source];this._renderTileClippingMasks(Ot,Tr),this.renderLayer(this,$t,Ot,Tr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerlt.source&&!lt.isHidden(Tr)?[$t.sourceCaches[lt.source]]:[]),na=Kr.filter(lt=>lt.getSource().type==="vector"),qe=Kr.filter(lt=>lt.getSource().type!=="vector"),$e=lt=>{(!Sr||Sr.getSource().maxzoom$e(lt)),Sr||qe.forEach(lt=>$e(lt)),Sr}(this.style,this.transform.zoom);Ot&&function($t,Tr,Sr){for(let Kr=0;Kr0),Me&&(t.b0(ie,Te),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(ze,ht){let wt=ze.context,Ot=wt.gl,$t=fl.unblended,Tr=new us(Ot.LEQUAL,us.ReadWrite,[0,1]),Sr=ht.getTerrainMesh(),Kr=ht.sourceCache.getRenderableTiles(),na=ze.useProgram("terrainDepth");wt.bindFramebuffer.set(ht.getFramebuffer("depth").framebuffer),wt.viewport.set([0,0,ze.width/devicePixelRatio,ze.height/devicePixelRatio]),wt.clear({color:t.aM.transparent,depth:1});for(let qe of Kr){let $e=ht.getTerrainData(qe.tileID),lt={u_matrix:ze.transform.calculatePosMatrix(qe.tileID.toUnwrapped()),u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};na.draw(wt,Ot.TRIANGLES,Tr,Ps.disabled,$t,to.backCCW,lt,$e,"terrain",Sr.vertexBuffer,Sr.indexBuffer,Sr.segments)}wt.bindFramebuffer.set(null),wt.viewport.set([0,0,ze.width,ze.height])}(this,this.style.map.terrain),function(ze,ht){let wt=ze.context,Ot=wt.gl,$t=fl.unblended,Tr=new us(Ot.LEQUAL,us.ReadWrite,[0,1]),Sr=ht.getTerrainMesh(),Kr=ht.getCoordsTexture(),na=ht.sourceCache.getRenderableTiles(),qe=ze.useProgram("terrainCoords");wt.bindFramebuffer.set(ht.getFramebuffer("coords").framebuffer),wt.viewport.set([0,0,ze.width/devicePixelRatio,ze.height/devicePixelRatio]),wt.clear({color:t.aM.transparent,depth:1}),ht.coordsIndex=[];for(let $e of na){let lt=ht.getTerrainData($e.tileID);wt.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,Kr.texture);let pt={u_matrix:ze.transform.calculatePosMatrix($e.tileID.toUnwrapped()),u_terrain_coords_id:(255-ht.coordsIndex.length)/255,u_texture:0,u_ele_delta:ht.getMeshFrameDelta(ze.transform.zoom)};qe.draw(wt,Ot.TRIANGLES,Tr,Ps.disabled,$t,to.backCCW,pt,lt,"terrain",Sr.vertexBuffer,Sr.indexBuffer,Sr.segments),ht.coordsIndex.push($e.tileID.key)}wt.bindFramebuffer.set(null),wt.viewport.set([0,0,ze.width,ze.height])}(this,this.style.map.terrain))}renderLayer(I,ie,Te,Me){if(!Te.isHidden(this.transform.zoom)&&(Te.type==="background"||Te.type==="custom"||(Me||[]).length))switch(this.id=Te.id,Te.type){case"symbol":(function(ze,ht,wt,Ot,$t){if(ze.renderPass!=="translucent")return;let Tr=Ps.disabled,Sr=ze.colorModeForRenderPass();(wt._unevaluatedLayout.hasValue("text-variable-anchor")||wt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Kr,na,qe,$e,lt,pt,Et,bt,Dt){let ur=na.transform,yr=pi(),Er=lt==="map",jr=pt==="map";for(let Qr of Kr){let ha=$e.getTile(Qr),Aa=ha.getBucket(qe);if(!Aa||!Aa.text||!Aa.text.segments.get().length)continue;let Da=t.ag(Aa.textSizeData,ur.zoom),ci=Fa(ha,1,na.transform.zoom),Vi=kr(Qr.posMatrix,jr,Er,na.transform,ci),ji=qe.layout.get("icon-text-fit")!=="none"&&Aa.hasIconData();if(Da){let on=Math.pow(2,ur.zoom-ha.tileID.overscaledZ),Sn=na.style.map.terrain?(Bn,Ao)=>na.style.map.terrain.getElevation(Qr,Bn,Ao):null,Kn=yr.translatePosition(ur,ha,Et,bt);nf(Aa,Er,jr,Dt,ur,Vi,Qr.posMatrix,on,Da,ji,yr,Kn,Qr.toUnwrapped(),Sn)}}}(Ot,ze,wt,ht,wt.layout.get("text-rotation-alignment"),wt.layout.get("text-pitch-alignment"),wt.paint.get("text-translate"),wt.paint.get("text-translate-anchor"),$t),wt.paint.get("icon-opacity").constantOr(1)!==0&&Jf(ze,ht,wt,Ot,!1,wt.paint.get("icon-translate"),wt.paint.get("icon-translate-anchor"),wt.layout.get("icon-rotation-alignment"),wt.layout.get("icon-pitch-alignment"),wt.layout.get("icon-keep-upright"),Tr,Sr),wt.paint.get("text-opacity").constantOr(1)!==0&&Jf(ze,ht,wt,Ot,!0,wt.paint.get("text-translate"),wt.paint.get("text-translate-anchor"),wt.layout.get("text-rotation-alignment"),wt.layout.get("text-pitch-alignment"),wt.layout.get("text-keep-upright"),Tr,Sr),ht.map.showCollisionBoxes&&(Vu(ze,ht,wt,Ot,!0),Vu(ze,ht,wt,Ot,!1))})(I,ie,Te,Me,this.style.placement.variableOffsets);break;case"circle":(function(ze,ht,wt,Ot){if(ze.renderPass!=="translucent")return;let $t=wt.paint.get("circle-opacity"),Tr=wt.paint.get("circle-stroke-width"),Sr=wt.paint.get("circle-stroke-opacity"),Kr=!wt.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(Tr.constantOr(1)===0||Sr.constantOr(1)===0))return;let na=ze.context,qe=na.gl,$e=ze.depthModeForSublayer(0,us.ReadOnly),lt=Ps.disabled,pt=ze.colorModeForRenderPass(),Et=[];for(let bt=0;btbt.sortKey-Dt.sortKey);for(let bt of Et){let{programConfiguration:Dt,program:ur,layoutVertexBuffer:yr,indexBuffer:Er,uniformValues:jr,terrainData:Qr}=bt.state;ur.draw(na,qe.TRIANGLES,$e,lt,pt,to.disabled,jr,Qr,wt.id,yr,Er,bt.segments,wt.paint,ze.transform.zoom,Dt)}})(I,ie,Te,Me);break;case"heatmap":(function(ze,ht,wt,Ot){if(wt.paint.get("heatmap-opacity")===0)return;let $t=ze.context;if(ze.style.map.terrain){for(let Tr of Ot){let Sr=ht.getTile(Tr);ht.hasRenderableParent(Tr)||(ze.renderPass==="offscreen"?of(ze,Sr,wt,Tr):ze.renderPass==="translucent"&&jc(ze,wt,Tr))}$t.viewport.set([0,0,ze.width,ze.height])}else ze.renderPass==="offscreen"?function(Tr,Sr,Kr,na){let qe=Tr.context,$e=qe.gl,lt=Ps.disabled,pt=new fl([$e.ONE,$e.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Et,bt,Dt){let ur=Et.gl;Et.activeTexture.set(ur.TEXTURE1),Et.viewport.set([0,0,bt.width/4,bt.height/4]);let yr=Dt.heatmapFbos.get(t.aU);yr?(ur.bindTexture(ur.TEXTURE_2D,yr.colorAttachment.get()),Et.bindFramebuffer.set(yr.framebuffer)):(yr=Bf(Et,bt.width/4,bt.height/4),Dt.heatmapFbos.set(t.aU,yr))})(qe,Tr,Kr),qe.clear({color:t.aM.transparent});for(let Et=0;Et20&&Tr.texParameterf(Tr.TEXTURE_2D,$t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$t.extTextureFilterAnisotropicMax);let Aa=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Et),Da=Aa?Et:null,ci=Da?Da.posMatrix:ze.transform.calculatePosMatrix(Et.toUnwrapped(),pt),Vi=ys(ci,Qr||[0,0],jr||1,Er,wt);Sr instanceof at?Kr.draw($t,Tr.TRIANGLES,bt,Ps.disabled,na,to.disabled,Vi,Aa,wt.id,Sr.boundsBuffer,ze.quadTriangleIndexBuffer,Sr.boundsSegments):Kr.draw($t,Tr.TRIANGLES,bt,qe[Et.overscaledZ],na,to.disabled,Vi,Aa,wt.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments)}})(I,ie,Te,Me);break;case"background":(function(ze,ht,wt,Ot){let $t=wt.paint.get("background-color"),Tr=wt.paint.get("background-opacity");if(Tr===0)return;let Sr=ze.context,Kr=Sr.gl,na=ze.transform,qe=na.tileSize,$e=wt.paint.get("background-pattern");if(ze.isPatternMissing($e))return;let lt=!$e&&$t.a===1&&Tr===1&&ze.opaquePassEnabledForLayer()?"opaque":"translucent";if(ze.renderPass!==lt)return;let pt=Ps.disabled,Et=ze.depthModeForSublayer(0,lt==="opaque"?us.ReadWrite:us.ReadOnly),bt=ze.colorModeForRenderPass(),Dt=ze.useProgram($e?"backgroundPattern":"background"),ur=Ot||na.coveringTiles({tileSize:qe,terrain:ze.style.map.terrain});$e&&(Sr.activeTexture.set(Kr.TEXTURE0),ze.imageManager.bind(ze.context));let yr=wt.getCrossfadeParameters();for(let Er of ur){let jr=Ot?Er.posMatrix:ze.transform.calculatePosMatrix(Er.toUnwrapped()),Qr=$e?_s(jr,Tr,ze,$e,{tileID:Er,tileSize:qe},yr):ss(jr,Tr,$t),ha=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Er);Dt.draw(Sr,Kr.TRIANGLES,Et,pt,bt,to.disabled,Qr,ha,wt.id,ze.tileExtentBuffer,ze.quadTriangleIndexBuffer,ze.tileExtentSegments)}})(I,0,Te,Me);break;case"custom":(function(ze,ht,wt){let Ot=ze.context,$t=wt.implementation;if(ze.renderPass==="offscreen"){let Tr=$t.prerender;Tr&&(ze.setCustomLayerDefaults(),Ot.setColorMode(ze.colorModeForRenderPass()),Tr.call($t,Ot.gl,ze.transform.customLayerMatrix()),Ot.setDirty(),ze.setBaseState())}else if(ze.renderPass==="translucent"){ze.setCustomLayerDefaults(),Ot.setColorMode(ze.colorModeForRenderPass()),Ot.setStencilMode(Ps.disabled);let Tr=$t.renderingMode==="3d"?new us(ze.context.gl.LEQUAL,us.ReadWrite,ze.depthRangeFor3D):ze.depthModeForSublayer(0,us.ReadOnly);Ot.setDepthMode(Tr),$t.render(Ot.gl,ze.transform.customLayerMatrix(),{farZ:ze.transform.farZ,nearZ:ze.transform.nearZ,fov:ze.transform._fov,modelViewProjectionMatrix:ze.transform.modelViewProjectionMatrix,projectionMatrix:ze.transform.projectionMatrix}),Ot.setDirty(),ze.setBaseState(),Ot.bindFramebuffer.set(null)}})(I,0,Te)}}translatePosMatrix(I,ie,Te,Me,ze){if(!Te[0]&&!Te[1])return I;let ht=ze?Me==="map"?this.transform.angle:0:Me==="viewport"?-this.transform.angle:0;if(ht){let $t=Math.sin(ht),Tr=Math.cos(ht);Te=[Te[0]*Tr-Te[1]*$t,Te[0]*$t+Te[1]*Tr]}let wt=[ze?Te[0]:Fa(ie,Te[0],this.transform.zoom),ze?Te[1]:Fa(ie,Te[1],this.transform.zoom),0],Ot=new Float32Array(16);return t.J(Ot,I,wt),Ot}saveTileTexture(I){let ie=this._tileTextures[I.size[0]];ie?ie.push(I):this._tileTextures[I.size[0]]=[I]}getTileTexture(I){let ie=this._tileTextures[I];return ie&&ie.length>0?ie.pop():null}isPatternMissing(I){if(!I)return!1;if(!I.from||!I.to)return!0;let ie=this.imageManager.getPattern(I.from.toString()),Te=this.imageManager.getPattern(I.to.toString());return!ie||!Te}useProgram(I,ie){this.cache=this.cache||{};let Te=I+(ie?ie.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Te]||(this.cache[Te]=new va(this.context,Hr[I],ie,ps[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Te]}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 I=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(I.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:I,drawingBufferHeight:ie}=this.context.gl;return this.width!==I||this.height!==ie}}class ol{constructor(I,ie){this.points=I,this.planes=ie}static fromInvProjectionMatrix(I,ie,Te){let Me=Math.pow(2,Te),ze=[[-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(wt=>{let Ot=1/(wt=t.af([],wt,I))[3]/ie*Me;return t.b1(wt,wt,[Ot,Ot,1/wt[3],Ot])}),ht=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(wt=>{let Ot=function(Kr,na){var qe=na[0],$e=na[1],lt=na[2],pt=qe*qe+$e*$e+lt*lt;return pt>0&&(pt=1/Math.sqrt(pt)),Kr[0]=na[0]*pt,Kr[1]=na[1]*pt,Kr[2]=na[2]*pt,Kr}([],function(Kr,na,qe){var $e=na[0],lt=na[1],pt=na[2],Et=qe[0],bt=qe[1],Dt=qe[2];return Kr[0]=lt*Dt-pt*bt,Kr[1]=pt*Et-$e*Dt,Kr[2]=$e*bt-lt*Et,Kr}([],E([],ze[wt[0]],ze[wt[1]]),E([],ze[wt[2]],ze[wt[1]]))),$t=-((Tr=Ot)[0]*(Sr=ze[wt[1]])[0]+Tr[1]*Sr[1]+Tr[2]*Sr[2]);var Tr,Sr;return Ot.concat($t)});return new ol(ze,ht)}}class vc{constructor(I,ie){this.min=I,this.max=ie,this.center=function(Te,Me,ze){return Te[0]=.5*Me[0],Te[1]=.5*Me[1],Te[2]=.5*Me[2],Te}([],function(Te,Me,ze){return Te[0]=Me[0]+ze[0],Te[1]=Me[1]+ze[1],Te[2]=Me[2]+ze[2],Te}([],this.min,this.max))}quadrant(I){let ie=[I%2==0,I<2],Te=w(this.min),Me=w(this.max);for(let ze=0;ze=0&&ht++;if(ht===0)return 0;ht!==ie.length&&(Te=!1)}if(Te)return 2;for(let Me=0;Me<3;Me++){let ze=Number.MAX_VALUE,ht=-Number.MAX_VALUE;for(let wt=0;wtthis.max[Me]-this.min[Me])return 0}return 1}}class yu{constructor(I=0,ie=0,Te=0,Me=0){if(isNaN(I)||I<0||isNaN(ie)||ie<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=I,this.bottom=ie,this.left=Te,this.right=Me}interpolate(I,ie,Te){return ie.top!=null&&I.top!=null&&(this.top=t.y.number(I.top,ie.top,Te)),ie.bottom!=null&&I.bottom!=null&&(this.bottom=t.y.number(I.bottom,ie.bottom,Te)),ie.left!=null&&I.left!=null&&(this.left=t.y.number(I.left,ie.left,Te)),ie.right!=null&&I.right!=null&&(this.right=t.y.number(I.right,ie.right,Te)),this}getCenter(I,ie){let Te=t.ac((this.left+I-this.right)/2,0,I),Me=t.ac((this.top+ie-this.bottom)/2,0,ie);return new t.P(Te,Me)}equals(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right}clone(){return new yu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Tu=85.051129;class Ml{constructor(I,ie,Te,Me,ze){this.tileSize=512,this._renderWorldCopies=ze===void 0||!!ze,this._minZoom=I||0,this._maxZoom=ie||22,this._minPitch=Te??0,this._maxPitch=Me??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 yu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let I=new Ml(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.apply(this),I}apply(I){this.tileSize=I.tileSize,this.latRange=I.latRange,this.lngRange=I.lngRange,this.width=I.width,this.height=I.height,this._center=I._center,this._elevation=I._elevation,this.minElevationForCurrentTile=I.minElevationForCurrentTile,this.zoom=I.zoom,this.angle=I.angle,this._fov=I._fov,this._pitch=I._pitch,this._unmodified=I._unmodified,this._edgeInsets=I._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))}get maxZoom(){return this._maxZoom}set maxZoom(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))}get minPitch(){return this._minPitch}set minPitch(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))}get maxPitch(){return this._maxPitch}set maxPitch(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I}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(I){let ie=-t.b3(I,-180,180)*Math.PI/180;this.angle!==ie&&(this._unmodified=!1,this.angle=ie,this._calcMatrices(),this.rotationMatrix=function(){var Te=new t.A(4);return t.A!=Float32Array&&(Te[1]=0,Te[2]=0),Te[0]=1,Te[3]=1,Te}(),function(Te,Me,ze){var ht=Me[0],wt=Me[1],Ot=Me[2],$t=Me[3],Tr=Math.sin(ze),Sr=Math.cos(ze);Te[0]=ht*Sr+Ot*Tr,Te[1]=wt*Sr+$t*Tr,Te[2]=ht*-Tr+Ot*Sr,Te[3]=wt*-Tr+$t*Sr}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(I){let ie=t.ac(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ie&&(this._unmodified=!1,this._pitch=ie,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(I){let ie=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==ie&&(this._unmodified=!1,this._zoom=ie,this.tileZoom=Math.max(0,Math.floor(ie)),this.scale=this.zoomScale(ie),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(I){I!==this._elevation&&(this._elevation=I,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(I){return this._edgeInsets.equals(I)}interpolatePadding(I,ie,Te){this._unmodified=!1,this._edgeInsets.interpolate(I,ie,Te),this._constrain(),this._calcMatrices()}coveringZoomLevel(I){let ie=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,ie)}getVisibleUnwrappedCoordinates(I){let ie=[new t.b4(0,I)];if(this._renderWorldCopies){let Te=this.pointCoordinate(new t.P(0,0)),Me=this.pointCoordinate(new t.P(this.width,0)),ze=this.pointCoordinate(new t.P(this.width,this.height)),ht=this.pointCoordinate(new t.P(0,this.height)),wt=Math.floor(Math.min(Te.x,Me.x,ze.x,ht.x)),Ot=Math.floor(Math.max(Te.x,Me.x,ze.x,ht.x)),$t=1;for(let Tr=wt-$t;Tr<=Ot+$t;Tr++)Tr!==0&&ie.push(new t.b4(Tr,I))}return ie}coveringTiles(I){var ie,Te;let Me=this.coveringZoomLevel(I),ze=Me;if(I.minzoom!==void 0&&MeI.maxzoom&&(Me=I.maxzoom);let ht=this.pointCoordinate(this.getCameraPoint()),wt=t.Z.fromLngLat(this.center),Ot=Math.pow(2,Me),$t=[Ot*ht.x,Ot*ht.y,0],Tr=[Ot*wt.x,Ot*wt.y,0],Sr=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Me),Kr=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Kr=Me);let na=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,qe=bt=>({aabb:new vc([bt*Ot,0,0],[(bt+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:bt,fullyVisible:!1}),$e=[],lt=[],pt=Me,Et=I.reparseOverscaled?ze:Me;if(this._renderWorldCopies)for(let bt=1;bt<=3;bt++)$e.push(qe(-bt)),$e.push(qe(bt));for($e.push(qe(0));$e.length>0;){let bt=$e.pop(),Dt=bt.x,ur=bt.y,yr=bt.fullyVisible;if(!yr){let Aa=bt.aabb.intersects(Sr);if(Aa===0)continue;yr=Aa===2}let Er=I.terrain?$t:Tr,jr=bt.aabb.distanceX(Er),Qr=bt.aabb.distanceY(Er),ha=Math.max(Math.abs(jr),Math.abs(Qr));if(bt.zoom===pt||ha>na+(1<=Kr){let Aa=pt-bt.zoom,Da=$t[0]-.5-(Dt<>1),Vi=bt.zoom+1,ji=bt.aabb.quadrant(Aa);if(I.terrain){let on=new t.S(Vi,bt.wrap,Vi,Da,ci),Sn=I.terrain.getMinMaxElevation(on),Kn=(ie=Sn.minElevation)!==null&&ie!==void 0?ie:this.elevation,Bn=(Te=Sn.maxElevation)!==null&&Te!==void 0?Te:this.elevation;ji=new vc([ji.min[0],ji.min[1],Kn],[ji.max[0],ji.max[1],Bn])}$e.push({aabb:ji,zoom:Vi,x:Da,y:ci,wrap:bt.wrap,fullyVisible:yr})}}return lt.sort((bt,Dt)=>bt.distanceSq-Dt.distanceSq).map(bt=>bt.tileID)}resize(I,ie){this.width=I,this.height=ie,this.pixelsToGLUnits=[2/I,-2/ie],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(I){return Math.pow(2,I)}scaleZoom(I){return Math.log(I)/Math.LN2}project(I){let ie=t.ac(I.lat,-85.051129,Tu);return new t.P(t.O(I.lng)*this.worldSize,t.Q(ie)*this.worldSize)}unproject(I){return new t.Z(I.x/this.worldSize,I.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(I){let ie=this.elevation,Te=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Me=this.pointLocation(this.centerPoint,I),ze=I.getElevationForLngLatZoom(Me,this.tileZoom);if(!(this.elevation-ze))return;let ht=Te+ie-ze,wt=Math.cos(this._pitch)*this.cameraToCenterDistance/ht/t.b5(1,Me.lat),Ot=this.scaleZoom(wt/this.tileSize);this._elevation=ze,this._center=Me,this.zoom=Ot}setLocationAtPoint(I,ie){let Te=this.pointCoordinate(ie),Me=this.pointCoordinate(this.centerPoint),ze=this.locationCoordinate(I),ht=new t.Z(ze.x-(Te.x-Me.x),ze.y-(Te.y-Me.y));this.center=this.coordinateLocation(ht),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(I,ie){return ie?this.coordinatePoint(this.locationCoordinate(I),ie.getElevationForLngLatZoom(I,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(I))}pointLocation(I,ie){return this.coordinateLocation(this.pointCoordinate(I,ie))}locationCoordinate(I){return t.Z.fromLngLat(I)}coordinateLocation(I){return I&&I.toLngLat()}pointCoordinate(I,ie){if(ie){let Kr=ie.pointCoordinate(I);if(Kr!=null)return Kr}let Te=[I.x,I.y,0,1],Me=[I.x,I.y,1,1];t.af(Te,Te,this.pixelMatrixInverse),t.af(Me,Me,this.pixelMatrixInverse);let ze=Te[3],ht=Me[3],wt=Te[1]/ze,Ot=Me[1]/ht,$t=Te[2]/ze,Tr=Me[2]/ht,Sr=$t===Tr?0:(0-$t)/(Tr-$t);return new t.Z(t.y.number(Te[0]/ze,Me[0]/ht,Sr)/this.worldSize,t.y.number(wt,Ot,Sr)/this.worldSize)}coordinatePoint(I,ie=0,Te=this.pixelMatrix){let Me=[I.x*this.worldSize,I.y*this.worldSize,ie,1];return t.af(Me,Me,Te),new t.P(Me[0]/Me[3],Me[1]/Me[3])}getBounds(){let I=Math.max(0,this.height/2-this.getHorizon());return new te().extend(this.pointLocation(new t.P(0,I))).extend(this.pointLocation(new t.P(this.width,I))).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 te([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(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tu])}calculateTileMatrix(I){let ie=I.canonical,Te=this.worldSize/this.zoomScale(ie.z),Me=ie.x+Math.pow(2,ie.z)*I.wrap,ze=t.an(new Float64Array(16));return t.J(ze,ze,[Me*Te,ie.y*Te,0]),t.K(ze,ze,[Te/t.X,Te/t.X,1]),ze}calculatePosMatrix(I,ie=!1){let Te=I.key,Me=ie?this._alignedPosMatrixCache:this._posMatrixCache;if(Me[Te])return Me[Te];let ze=this.calculateTileMatrix(I);return t.L(ze,ie?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,ze),Me[Te]=new Float32Array(ze),Me[Te]}calculateFogMatrix(I){let ie=I.key,Te=this._fogMatrixCache;if(Te[ie])return Te[ie];let Me=this.calculateTileMatrix(I);return t.L(Me,this.fogMatrix,Me),Te[ie]=new Float32Array(Me),Te[ie]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ie){ie=t.ac(+ie,this.minZoom,this.maxZoom);let Te={center:new t.N(I.lng,I.lat),zoom:ie},Me=this.lngRange;if(!this._renderWorldCopies&&Me===null){let bt=179.9999999999;Me=[-bt,bt]}let ze=this.tileSize*this.zoomScale(Te.zoom),ht=0,wt=ze,Ot=0,$t=ze,Tr=0,Sr=0,{x:Kr,y:na}=this.size;if(this.latRange){let bt=this.latRange;ht=t.Q(bt[1])*ze,wt=t.Q(bt[0])*ze,wt-htwt&&(pt=wt-bt)}if(Me){let bt=(Ot+$t)/2,Dt=qe;this._renderWorldCopies&&(Dt=t.b3(qe,bt-ze/2,bt+ze/2));let ur=Kr/2;Dt-ur$t&&(lt=$t-ur)}if(lt!==void 0||pt!==void 0){let bt=new t.P(lt??qe,pt??$e);Te.center=this.unproject.call({worldSize:ze},bt).wrap()}return Te}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ie,zoom:Te}=this.getConstrained(this.center,this.zoom);this.center=ie,this.zoom=Te,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ie=this.point.x,Te=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Me=t.an(new Float64Array(16));t.K(Me,Me,[this.width/2,-this.height/2,1]),t.J(Me,Me,[1,-1,0]),this.labelPlaneMatrix=Me,Me=t.an(new Float64Array(16)),t.K(Me,Me,[1,-1,1]),t.J(Me,Me,[-1,-1,0]),t.K(Me,Me,[2/this.width,2/this.height,1]),this.glCoordMatrix=Me;let ze=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ht=Math.min(this.elevation,this.minElevationForCurrentTile),wt=ze-ht*this._pixelPerMeter/Math.cos(this._pitch),Ot=ht<0?wt:ze,$t=Math.PI/2+this._pitch,Tr=this._fov*(.5+I.y/this.height),Sr=Math.sin(Tr)*Ot/Math.sin(t.ac(Math.PI-$t-Tr,.01,Math.PI-.01)),Kr=this.getHorizon(),na=2*Math.atan(Kr/this.cameraToCenterDistance)*(.5+I.y/(2*Kr)),qe=Math.sin(na)*Ot/Math.sin(t.ac(Math.PI-$t-na,.01,Math.PI-.01)),$e=Math.min(Sr,qe);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*$e+Ot),this.nearZ=this.height/50,Me=new Float64Array(16),t.b6(Me,this._fov,this.width/this.height,this.nearZ,this.farZ),Me[8]=2*-I.x/this.width,Me[9]=2*I.y/this.height,this.projectionMatrix=t.ae(Me),t.K(Me,Me,[1,-1,1]),t.J(Me,Me,[0,0,-this.cameraToCenterDistance]),t.b7(Me,Me,this._pitch),t.ad(Me,Me,this.angle),t.J(Me,Me,[-ie,-Te,0]),this.mercatorMatrix=t.K([],Me,[this.worldSize,this.worldSize,this.worldSize]),t.K(Me,Me,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Me),t.J(Me,Me,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Me,this.invModelViewProjectionMatrix=t.as([],Me),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,ze,this.farZ),this.fogMatrix[8]=2*-I.x/this.width,this.fogMatrix[9]=2*I.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,[-ie,-Te,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,Me);let lt=this.width%2/2,pt=this.height%2/2,Et=Math.cos(this.angle),bt=Math.sin(this.angle),Dt=ie-Math.round(ie)+Et*lt+bt*pt,ur=Te-Math.round(Te)+Et*pt+bt*lt,yr=new Float64Array(Me);if(t.J(yr,yr,[Dt>.5?Dt-1:Dt,ur>.5?ur-1:ur,0]),this.alignedModelViewProjectionMatrix=yr,Me=t.as(new Float64Array(16),this.pixelMatrix),!Me)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Me,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let I=this.pointCoordinate(new t.P(0,0)),ie=[I.x*this.worldSize,I.y*this.worldSize,0,1];return t.af(ie,ie,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let I=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,I))}getCameraQueryGeometry(I){let ie=this.getCameraPoint();if(I.length===1)return[I[0],ie];{let Te=ie.x,Me=ie.y,ze=ie.x,ht=ie.y;for(let wt of I)Te=Math.min(Te,wt.x),Me=Math.min(Me,wt.y),ze=Math.max(ze,wt.x),ht=Math.max(ht,wt.y);return[new t.P(Te,Me),new t.P(ze,Me),new t.P(ze,ht),new t.P(Te,ht),new t.P(Te,Me)]}}lngLatToCameraDepth(I,ie){let Te=this.locationCoordinate(I),Me=[Te.x*this.worldSize,Te.y*this.worldSize,ie,1];return t.af(Me,Me,this.modelViewProjectionMatrix),Me[2]/Me[3]}}function qf(Oe,I){let ie,Te=!1,Me=null,ze=null,ht=()=>{Me=null,Te&&(Oe.apply(ze,ie),Me=setTimeout(ht,I),Te=!1)};return(...wt)=>(Te=!0,ze=this,ie=wt,Me||ht(),Me)}class Qf{constructor(I){this._getCurrentHash=()=>{let ie=window.location.hash.replace("#","");if(this._hashName){let Te;return ie.split("&").map(Me=>Me.split("=")).forEach(Me=>{Me[0]===this._hashName&&(Te=Me)}),(Te&&Te[1]||"").split("/")}return ie.split("/")},this._onHashChange=()=>{let ie=this._getCurrentHash();if(ie.length>=3&&!ie.some(Te=>isNaN(Te))){let Te=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ie[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ie[2],+ie[1]],zoom:+ie[0],bearing:Te,pitch:+(ie[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ie=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ie)},this._removeHash=()=>{let ie=this._getCurrentHash();if(ie.length===0)return;let Te=ie.join("/"),Me=Te;Me.split("&").length>0&&(Me=Me.split("&")[0]),this._hashName&&(Me=`${this._hashName}=${Te}`);let ze=window.location.hash.replace(Me,"");ze.startsWith("#&")?ze=ze.slice(0,1)+ze.slice(2):ze==="#"&&(ze="");let ht=window.location.href.replace(/(#.+)?$/,ze);ht=ht.replace("&&","&"),window.history.replaceState(window.history.state,null,ht)},this._updateHash=qf(this._updateHashUnthrottled,300),this._hashName=I&&encodeURIComponent(I)}addTo(I){return this._map=I,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(I){let ie=this._map.getCenter(),Te=Math.round(100*this._map.getZoom())/100,Me=Math.ceil((Te*Math.LN2+Math.log(512/360/.5))/Math.LN10),ze=Math.pow(10,Me),ht=Math.round(ie.lng*ze)/ze,wt=Math.round(ie.lat*ze)/ze,Ot=this._map.getBearing(),$t=this._map.getPitch(),Tr="";if(Tr+=I?`/${ht}/${wt}/${Te}`:`${Te}/${wt}/${ht}`,(Ot||$t)&&(Tr+="/"+Math.round(10*Ot)/10),$t&&(Tr+=`/${Math.round($t)}`),this._hashName){let Sr=this._hashName,Kr=!1,na=window.location.hash.slice(1).split("&").map(qe=>{let $e=qe.split("=")[0];return $e===Sr?(Kr=!0,`${$e}=${Tr}`):qe}).filter(qe=>qe);return Kr||na.push(`${Sr}=${Tr}`),`#${na.join("&")}`}return`#${Tr}`}}let Bu={linearity:.3,easing:t.b8(0,0,.3,1)},Ec=t.e({deceleration:2500,maxSpeed:1400},Bu),mc=t.e({deceleration:20,maxSpeed:1400},Bu),Lh=t.e({deceleration:1e3,maxSpeed:360},Bu),sf=t.e({deceleration:1e3,maxSpeed:90},Bu);class vf{constructor(I){this._map=I,this.clear()}clear(){this._inertiaBuffer=[]}record(I){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ie=i.now();for(;I.length>0&&ie-I[0].time>160;)I.shift()}_onMoveEnd(I){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ie={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:ze}of this._inertiaBuffer)ie.zoom+=ze.zoomDelta||0,ie.bearing+=ze.bearingDelta||0,ie.pitch+=ze.pitchDelta||0,ze.panDelta&&ie.pan._add(ze.panDelta),ze.around&&(ie.around=ze.around),ze.pinchAround&&(ie.pinchAround=ze.pinchAround);let Te=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Me={};if(ie.pan.mag()){let ze=lf(ie.pan.mag(),Te,t.e({},Ec,I||{}));Me.offset=ie.pan.mult(ze.amount/ie.pan.mag()),Me.center=this._map.transform.center,Nu(Me,ze)}if(ie.zoom){let ze=lf(ie.zoom,Te,mc);Me.zoom=this._map.transform.zoom+ze.amount,Nu(Me,ze)}if(ie.bearing){let ze=lf(ie.bearing,Te,Lh);Me.bearing=this._map.transform.bearing+t.ac(ze.amount,-179,179),Nu(Me,ze)}if(ie.pitch){let ze=lf(ie.pitch,Te,sf);Me.pitch=this._map.transform.pitch+ze.amount,Nu(Me,ze)}if(Me.zoom||Me.bearing){let ze=ie.pinchAround===void 0?ie.around:ie.pinchAround;Me.around=ze?this._map.unproject(ze):this._map.getCenter()}return this.clear(),t.e(Me,{noMoveStart:!0})}}function Nu(Oe,I){(!Oe.duration||Oe.durationie.unproject(Ot)),wt=ze.reduce((Ot,$t,Tr,Sr)=>Ot.add($t.div(Sr.length)),new t.P(0,0));super(I,{points:ze,point:wt,lngLats:ht,lngLat:ie.unproject(wt),originalEvent:Te}),this._defaultPrevented=!1}}class hh extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ie,Te){super(I,{originalEvent:Te}),this._defaultPrevented=!1}}class mf{constructor(I,ie){this._map=I,this._clickTolerance=ie.clickTolerance}reset(){delete this._mousedownPos}wheel(I){return this._firePreventable(new hh(I.type,this._map,I))}mousedown(I,ie){return this._mousedownPos=ie,this._firePreventable(new iu(I.type,this._map,I))}mouseup(I){this._map.fire(new iu(I.type,this._map,I))}click(I,ie){this._mousedownPos&&this._mousedownPos.dist(ie)>=this._clickTolerance||this._map.fire(new iu(I.type,this._map,I))}dblclick(I){return this._firePreventable(new iu(I.type,this._map,I))}mouseover(I){this._map.fire(new iu(I.type,this._map,I))}mouseout(I){this._map.fire(new iu(I.type,this._map,I))}touchstart(I){return this._firePreventable(new Kc(I.type,this._map,I))}touchmove(I){this._map.fire(new Kc(I.type,this._map,I))}touchend(I){this._map.fire(new Kc(I.type,this._map,I))}touchcancel(I){this._map.fire(new Kc(I.type,this._map,I))}_firePreventable(I){if(this._map.fire(I),I.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class sl{constructor(I){this._map=I}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(I){this._map.fire(new iu(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new iu("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new iu(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _u{constructor(I){this._map=I}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(I){return this.transform.pointLocation(t.P.convert(I),this._map.terrain)}}class Pu{constructor(I,ie){this._map=I,this._tr=new _u(I),this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=ie.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(I,ie){this.isEnabled()&&I.shiftKey&&I.button===0&&(n.disableDrag(),this._startPos=this._lastPos=ie,this._active=!0)}mousemoveWindow(I,ie){if(!this._active)return;let Te=ie;if(this._lastPos.equals(Te)||!this._box&&Te.dist(this._startPos)ze.fitScreenCoordinates(Te,Me,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",I)}keydown(I){this._active&&I.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",I))}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(I,ie){return this._map.fire(new t.k(I,{originalEvent:ie}))}}function Cf(Oe,I){if(Oe.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${Oe.length}, points ${I.length}`);let ie={};for(let Te=0;Tethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),Te.length===this.numTouches&&(this.centroid=function(Me){let ze=new t.P(0,0);for(let ht of Me)ze._add(ht);return ze.div(Me.length)}(ie),this.touches=Cf(Te,ie)))}touchmove(I,ie,Te){if(this.aborted||!this.centroid)return;let Me=Cf(Te,ie);for(let ze in this.touches){let ht=Me[ze];(!ht||ht.dist(this.touches[ze])>30)&&(this.aborted=!0)}}touchend(I,ie,Te){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),Te.length===0){let Me=!this.aborted&&this.centroid;if(this.reset(),Me)return Me}}}class uf{constructor(I){this.singleTap=new hl(I),this.numTaps=I.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(I,ie,Te){this.singleTap.touchstart(I,ie,Te)}touchmove(I,ie,Te){this.singleTap.touchmove(I,ie,Te)}touchend(I,ie,Te){let Me=this.singleTap.touchend(I,ie,Te);if(Me){let ze=I.timeStamp-this.lastTime<500,ht=!this.lastTap||this.lastTap.dist(Me)<30;if(ze&&ht||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=Me,this.count===this.numTaps)return this.reset(),Me}}}class kc{constructor(I){this._tr=new _u(I),this._zoomIn=new uf({numTouches:1,numTaps:2}),this._zoomOut=new uf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(I,ie,Te){this._zoomIn.touchstart(I,ie,Te),this._zoomOut.touchstart(I,ie,Te)}touchmove(I,ie,Te){this._zoomIn.touchmove(I,ie,Te),this._zoomOut.touchmove(I,ie,Te)}touchend(I,ie,Te){let Me=this._zoomIn.touchend(I,ie,Te),ze=this._zoomOut.touchend(I,ie,Te),ht=this._tr;return Me?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:wt=>wt.easeTo({duration:300,zoom:ht.zoom+1,around:ht.unproject(Me)},{originalEvent:I})}):ze?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:wt=>wt.easeTo({duration:300,zoom:ht.zoom-1,around:ht.unproject(ze)},{originalEvent:I})}):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(I){this._enabled=!!I.enable,this._moveStateManager=I.moveStateManager,this._clickTolerance=I.clickTolerance||1,this._moveFunction=I.move,this._activateOnStart=!!I.activateOnStart,I.assignEvents(this),this.reset()}reset(I){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(I)}_move(...I){let ie=this._moveFunction(...I);if(ie.bearingDelta||ie.pitchDelta||ie.around||ie.panDelta)return this._active=!0,ie}dragStart(I,ie){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(I)&&(this._moveStateManager.startMove(I),this._lastPoint=ie.length?ie[0]:ie,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(I,ie){if(!this.isEnabled())return;let Te=this._lastPoint;if(!Te)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let Me=ie.length?ie[0]:ie;return!this._moved&&Me.dist(Te){Oe.mousedown=Oe.dragStart,Oe.mousemoveWindow=Oe.dragMove,Oe.mouseup=Oe.dragEnd,Oe.contextmenu=I=>{I.preventDefault()}},nu=({enable:Oe,clickTolerance:I,bearingDegreesPerPixelMoved:ie=.8})=>{let Te=new Wu({checkCorrectEvent:Me=>n.mouseButton(Me)===0&&Me.ctrlKey||n.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({bearingDelta:(ze.x-Me.x)*ie}),moveStateManager:Te,enable:Oe,assignEvents:Lf})},Vf=({enable:Oe,clickTolerance:I,pitchDegreesPerPixelMoved:ie=-.5})=>{let Te=new Wu({checkCorrectEvent:Me=>n.mouseButton(Me)===0&&Me.ctrlKey||n.mouseButton(Me)===2});return new Hu({clickTolerance:I,move:(Me,ze)=>({pitchDelta:(ze.y-Me.y)*ie}),moveStateManager:Te,enable:Oe,assignEvents:Lf})};class Xu{constructor(I,ie){this._clickTolerance=I.clickTolerance||1,this._map=ie,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(I){return I<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(I,ie,Te){return this._calculateTransform(I,ie,Te)}touchmove(I,ie,Te){if(this._active){if(!this._shouldBePrevented(Te.length))return I.preventDefault(),this._calculateTransform(I,ie,Te);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ie,Te){this._calculateTransform(I,ie,Te),this._active&&this._shouldBePrevented(Te.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ie,Te){Te.length>0&&(this._active=!0);let Me=Cf(Te,ie),ze=new t.P(0,0),ht=new t.P(0,0),wt=0;for(let $t in Me){let Tr=Me[$t],Sr=this._touches[$t];Sr&&(ze._add(Tr),ht._add(Tr.sub(Sr)),wt++,Me[$t]=Tr)}if(this._touches=Me,this._shouldBePrevented(wt)||!ht.mag())return;let Ot=ht.div(wt);return this._sum._add(Ot),this._sum.mag()Math.abs(Oe.x)}class Pc extends Cc{constructor(I){super(),this._currentTouchCount=0,this._map=I}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(I,ie,Te){super.touchstart(I,ie,Te),this._currentTouchCount=Te.length}_start(I){this._lastPoints=I,sc(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ie,Te){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Me=I[0].sub(this._lastPoints[0]),ze=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Me,ze,Te.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(Me.y+ze.y)/2*-.5}):void 0}gestureBeginsVertically(I,ie,Te){if(this._valid!==void 0)return this._valid;let Me=I.mag()>=2,ze=ie.mag()>=2;if(!Me&&!ze)return;if(!Me||!ze)return this._firstMove===void 0&&(this._firstMove=Te),Te-this._firstMove<100&&void 0;let ht=I.y>0==ie.y>0;return sc(I)&&sc(ie)&&ht}}let Qt={panStep:100,bearingStep:15,pitchStep:10};class xr{constructor(I){this._tr=new _u(I);let ie=Qt;this._panStep=ie.panStep,this._bearingStep=ie.bearingStep,this._pitchStep=ie.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(I){if(I.altKey||I.ctrlKey||I.metaKey)return;let ie=0,Te=0,Me=0,ze=0,ht=0;switch(I.keyCode){case 61:case 107:case 171:case 187:ie=1;break;case 189:case 109:case 173:ie=-1;break;case 37:I.shiftKey?Te=-1:(I.preventDefault(),ze=-1);break;case 39:I.shiftKey?Te=1:(I.preventDefault(),ze=1);break;case 38:I.shiftKey?Me=1:(I.preventDefault(),ht=-1);break;case 40:I.shiftKey?Me=-1:(I.preventDefault(),ht=1);break;default:return}return this._rotationDisabled&&(Te=0,Me=0),{cameraAnimation:wt=>{let Ot=this._tr;wt.easeTo({duration:300,easeId:"keyboardHandler",easing:aa,zoom:ie?Math.round(Ot.zoom)+ie*(I.shiftKey?2:1):Ot.zoom,bearing:Ot.bearing+Te*this._bearingStep,pitch:Ot.pitch+Me*this._pitchStep,offset:[-ze*this._panStep,-ht*this._panStep],center:Ot.center},{originalEvent:I})}}}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 aa(Oe){return Oe*(2-Oe)}let $r=4.000244140625;class ka{constructor(I,ie){this._onTimeout=Te=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Te)},this._map=I,this._tr=new _u(I),this._triggerRenderFrame=ie,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(I){this._defaultZoomRate=I}setWheelZoomRate(I){this._wheelZoomRate=I}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!I&&I.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(I){return!!this._map.cooperativeGestures.isEnabled()&&!(I.ctrlKey||this._map.cooperativeGestures.isBypassed(I))}wheel(I){if(!this.isEnabled())return;if(this._shouldBePrevented(I))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",I);let ie=I.deltaMode===WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,Te=i.now(),Me=Te-(this._lastWheelEventTime||0);this._lastWheelEventTime=Te,ie!==0&&ie%$r==0?this._type="wheel":ie!==0&&Math.abs(ie)<4?this._type="trackpad":Me>400?(this._type=null,this._lastValue=ie,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(Me*ie)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ie+=this._lastValue)),I.shiftKey&&ie&&(ie/=4),this._type&&(this._lastWheelEvent=I,this._delta-=ie,this._active||this._start(I)),I.preventDefault()}_start(I){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 ie=n.mousePos(this._map.getCanvas(),I),Te=this._tr;this._around=ie.y>Te.transform.height/2-Te.transform.getHorizon()?t.N.convert(this._aroundCenter?Te.center:Te.unproject(ie)):t.N.convert(Te.center),this._aroundPoint=Te.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let I=this._tr.transform;if(this._delta!==0){let Ot=this._type==="wheel"&&Math.abs(this._delta)>$r?this._wheelZoomRate:this._defaultZoomRate,$t=2/(1+Math.exp(-Math.abs(this._delta*Ot)));this._delta<0&&$t!==0&&($t=1/$t);let Tr=typeof this._targetZoom=="number"?I.zoomScale(this._targetZoom):I.scale;this._targetZoom=Math.min(I.maxZoom,Math.max(I.minZoom,I.scaleZoom(Tr*$t))),this._type==="wheel"&&(this._startZoom=I.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ie=typeof this._targetZoom=="number"?this._targetZoom:I.zoom,Te=this._startZoom,Me=this._easing,ze,ht=!1,wt=i.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Te&&Me&&wt){let Ot=Math.min(wt/200,1),$t=Me(Ot);ze=t.y.number(Te,ie,$t),Ot<1?this._frameId||(this._frameId=!0):ht=!0}else ze=ie,ht=!0;return this._active=!0,ht&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ht,zoomDelta:ze-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ie=t.b9;if(this._prevEase){let Te=this._prevEase,Me=(i.now()-Te.start)/Te.duration,ze=Te.easing(Me+.01)-Te.easing(Me),ht=.27/Math.sqrt(ze*ze+1e-4)*.01,wt=Math.sqrt(.0729-ht*ht);ie=t.b8(ht,wt,.25,1)}return this._prevEase={start:i.now(),duration:I,easing:ie},ie}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class li{constructor(I,ie){this._clickZoom=I,this._tapZoom=ie}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 Ci{constructor(I){this._tr=new _u(I),this.reset()}reset(){this._active=!1}dblclick(I,ie){return I.preventDefault(),{cameraAnimation:Te=>{Te.easeTo({duration:300,zoom:this._tr.zoom+(I.shiftKey?-1:1),around:this._tr.unproject(ie)},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hi{constructor(){this._tap=new uf({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(I,ie,Te){if(!this._swipePoint)if(this._tapTime){let Me=ie[0],ze=I.timeStamp-this._tapTime<500,ht=this._tapPoint.dist(Me)<30;ze&&ht?Te.length>0&&(this._swipePoint=Me,this._swipeTouch=Te[0].identifier):this.reset()}else this._tap.touchstart(I,ie,Te)}touchmove(I,ie,Te){if(this._tapTime){if(this._swipePoint){if(Te[0].identifier!==this._swipeTouch)return;let Me=ie[0],ze=Me.y-this._swipePoint.y;return this._swipePoint=Me,I.preventDefault(),this._active=!0,{zoomDelta:ze/128}}}else this._tap.touchmove(I,ie,Te)}touchend(I,ie,Te){if(this._tapTime)this._swipePoint&&Te.length===0&&this.reset();else{let Me=this._tap.touchend(I,ie,Te);Me&&(this._tapTime=I.timeStamp,this._tapPoint=Me)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Qi{constructor(I,ie,Te){this._el=I,this._mousePan=ie,this._touchPan=Te}enable(I){this._inertiaOptions=I||{},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 pn{constructor(I,ie,Te){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ie,this._mousePitch=Te}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 Pi{constructor(I,ie,Te,Me){this._el=I,this._touchZoom=ie,this._touchRotate=Te,this._tapDragZoom=Me,this._rotationDisabled=!1,this._enabled=!0}enable(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),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 Di{constructor(I,ie){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=I,this._options=ie,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let I=this._map.getCanvasContainer();I.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",I);let ie=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ie=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Te=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Me=document.createElement("div");Me.className="maplibregl-desktop-message",Me.textContent=ie,this._container.appendChild(Me);let ze=document.createElement("div");ze.className="maplibregl-mobile-message",ze.textContent=Te,this._container.appendChild(ze),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(I){return I[this._bypassKey]}notifyGestureBlocked(I,ie){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:I,originalEvent:ie})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Ni=Oe=>Oe.zoom||Oe.drag||Oe.pitch||Oe.rotate;class mi extends t.k{}function Mn(Oe){return Oe.panDelta&&Oe.panDelta.mag()||Oe.zoomDelta||Oe.bearingDelta||Oe.pitchDelta}class Qn{constructor(I,ie){this.handleWindowEvent=Me=>{this.handleEvent(Me,`${Me.type}Window`)},this.handleEvent=(Me,ze)=>{if(Me.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ht=Me.type==="renderFrame"?void 0:Me,wt={needsRenderFrame:!1},Ot={},$t={},Tr=Me.touches,Sr=Tr?this._getMapTouches(Tr):void 0,Kr=Sr?n.touchPos(this._map.getCanvas(),Sr):n.mousePos(this._map.getCanvas(),Me);for(let{handlerName:$e,handler:lt,allowed:pt}of this._handlers){if(!lt.isEnabled())continue;let Et;this._blockedByActive($t,pt,$e)?lt.reset():lt[ze||Me.type]&&(Et=lt[ze||Me.type](Me,Kr,Sr),this.mergeHandlerResult(wt,Ot,Et,$e,ht),Et&&Et.needsRenderFrame&&this._triggerRenderFrame()),(Et||lt.isActive())&&($t[$e]=lt)}let na={};for(let $e in this._previousActiveHandlers)$t[$e]||(na[$e]=ht);this._previousActiveHandlers=$t,(Object.keys(na).length||Mn(wt))&&(this._changes.push([wt,Ot,na]),this._triggerRenderFrame()),(Object.keys($t).length||Mn(wt))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:qe}=wt;qe&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],qe(this._map))},this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new vf(I),this._bearingSnap=ie.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ie);let 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],[document,"mousemove",{capture:!0}],[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],[window,"blur",void 0]];for(let[Me,ze,ht]of this._listeners)n.addEventListener(Me,ze,Me===document?this.handleWindowEvent:this.handleEvent,ht)}destroy(){for(let[I,ie,Te]of this._listeners)n.removeEventListener(I,ie,I===document?this.handleWindowEvent:this.handleEvent,Te)}_addDefaultHandlers(I){let ie=this._map,Te=ie.getCanvasContainer();this._add("mapEvent",new mf(ie,I));let Me=ie.boxZoom=new Pu(ie,I);this._add("boxZoom",Me),I.interactive&&I.boxZoom&&Me.enable();let ze=ie.cooperativeGestures=new Di(ie,I.cooperativeGestures);this._add("cooperativeGestures",ze),I.cooperativeGestures&&ze.enable();let ht=new kc(ie),wt=new Ci(ie);ie.doubleClickZoom=new li(wt,ht),this._add("tapZoom",ht),this._add("clickZoom",wt),I.interactive&&I.doubleClickZoom&&ie.doubleClickZoom.enable();let Ot=new Hi;this._add("tapDragZoom",Ot);let $t=ie.touchPitch=new Pc(ie);this._add("touchPitch",$t),I.interactive&&I.touchPitch&&ie.touchPitch.enable(I.touchPitch);let Tr=nu(I),Sr=Vf(I);ie.dragRotate=new pn(I,Tr,Sr),this._add("mouseRotate",Tr,["mousePitch"]),this._add("mousePitch",Sr,["mouseRotate"]),I.interactive&&I.dragRotate&&ie.dragRotate.enable();let Kr=(({enable:Et,clickTolerance:bt})=>{let Dt=new Wu({checkCorrectEvent:ur=>n.mouseButton(ur)===0&&!ur.ctrlKey});return new Hu({clickTolerance:bt,move:(ur,yr)=>({around:yr,panDelta:yr.sub(ur)}),activateOnStart:!0,moveStateManager:Dt,enable:Et,assignEvents:Lf})})(I),na=new Xu(I,ie);ie.dragPan=new Qi(Te,Kr,na),this._add("mousePan",Kr),this._add("touchPan",na,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ie.dragPan.enable(I.dragPan);let qe=new $c,$e=new xu;ie.touchZoomRotate=new Pi(Te,$e,qe,Ot),this._add("touchRotate",qe,["touchPan","touchZoom"]),this._add("touchZoom",$e,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ie.touchZoomRotate.enable(I.touchZoomRotate);let lt=ie.scrollZoom=new ka(ie,()=>this._triggerRenderFrame());this._add("scrollZoom",lt,["mousePan"]),I.interactive&&I.scrollZoom&&ie.scrollZoom.enable(I.scrollZoom);let pt=ie.keyboard=new xr(ie);this._add("keyboard",pt),I.interactive&&I.keyboard&&ie.keyboard.enable(),this._add("blockableMapEvent",new sl(ie))}_add(I,ie,Te){this._handlers.push({handlerName:I,handler:ie,allowed:Te}),this._handlersById[I]=ie}stop(I){if(!this._updatingCamera){for(let{handler:ie}of this._handlers)ie.reset();this._inertia.clear(),this._fireEvents({},{},I),this._changes=[]}}isActive(){for(let{handler:I}of this._handlers)if(I.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ni(this._eventsInProgress)||this.isZooming()}_blockedByActive(I,ie,Te){for(let Me in I)if(Me!==Te&&(!ie||ie.indexOf(Me)<0))return!0;return!1}_getMapTouches(I){let ie=[];for(let Te of I)this._el.contains(Te.target)&&ie.push(Te);return ie}mergeHandlerResult(I,ie,Te,Me,ze){if(!Te)return;t.e(I,Te);let ht={handlerName:Me,originalEvent:Te.originalEvent||ze};Te.zoomDelta!==void 0&&(ie.zoom=ht),Te.panDelta!==void 0&&(ie.drag=ht),Te.pitchDelta!==void 0&&(ie.pitch=ht),Te.bearingDelta!==void 0&&(ie.rotate=ht)}_applyChanges(){let I={},ie={},Te={};for(let[Me,ze,ht]of this._changes)Me.panDelta&&(I.panDelta=(I.panDelta||new t.P(0,0))._add(Me.panDelta)),Me.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+Me.zoomDelta),Me.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+Me.bearingDelta),Me.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+Me.pitchDelta),Me.around!==void 0&&(I.around=Me.around),Me.pinchAround!==void 0&&(I.pinchAround=Me.pinchAround),Me.noInertia&&(I.noInertia=Me.noInertia),t.e(ie,ze),t.e(Te,ht);this._updateMapTransform(I,ie,Te),this._changes=[]}_updateMapTransform(I,ie,Te){let Me=this._map,ze=Me._getTransformForUpdate(),ht=Me.terrain;if(!(Mn(I)||ht&&this._terrainMovement))return this._fireEvents(ie,Te,!0);let{panDelta:wt,zoomDelta:Ot,bearingDelta:$t,pitchDelta:Tr,around:Sr,pinchAround:Kr}=I;Kr!==void 0&&(Sr=Kr),Me._stop(!0),Sr=Sr||Me.transform.centerPoint;let na=ze.pointLocation(wt?Sr.sub(wt):Sr);$t&&(ze.bearing+=$t),Tr&&(ze.pitch+=Tr),Ot&&(ze.zoom+=Ot),ht?this._terrainMovement||!ie.drag&&!ie.zoom?ie.drag&&this._terrainMovement?ze.center=ze.pointLocation(ze.centerPoint.sub(wt)):ze.setLocationAtPoint(na,Sr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,ze.setLocationAtPoint(na,Sr)):ze.setLocationAtPoint(na,Sr),Me._applyUpdatedTransform(ze),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ie,Te,!0)}_fireEvents(I,ie,Te){let Me=Ni(this._eventsInProgress),ze=Ni(I),ht={};for(let Sr in I){let{originalEvent:Kr}=I[Sr];this._eventsInProgress[Sr]||(ht[`${Sr}start`]=Kr),this._eventsInProgress[Sr]=I[Sr]}!Me&&ze&&this._fireEvent("movestart",ze.originalEvent);for(let Sr in ht)this._fireEvent(Sr,ht[Sr]);ze&&this._fireEvent("move",ze.originalEvent);for(let Sr in I){let{originalEvent:Kr}=I[Sr];this._fireEvent(Sr,Kr)}let wt={},Ot;for(let Sr in this._eventsInProgress){let{handlerName:Kr,originalEvent:na}=this._eventsInProgress[Sr];this._handlersById[Kr].isActive()||(delete this._eventsInProgress[Sr],Ot=ie[Kr]||na,wt[`${Sr}end`]=Ot)}for(let Sr in wt)this._fireEvent(Sr,wt[Sr]);let $t=Ni(this._eventsInProgress),Tr=(Me||ze)&&!$t;if(Tr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Sr=this._map._getTransformForUpdate();Sr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Sr)}if(Te&&Tr){this._updatingCamera=!0;let Sr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Kr=na=>na!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new mi("renderFrame",{timeStamp:I})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class io extends t.E{constructor(I,ie){super(),this._renderFrameCallback=()=>{let Te=Math.min((i.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Te)),Te<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=I,this._bearingSnap=ie.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(I,ie){return this.jumpTo({center:I},ie)}panBy(I,ie,Te){return I=t.P.convert(I).mult(-1),this.panTo(this.transform.center,t.e({offset:I},ie),Te)}panTo(I,ie,Te){return this.easeTo(t.e({center:I},ie),Te)}getZoom(){return this.transform.zoom}setZoom(I,ie){return this.jumpTo({zoom:I},ie),this}zoomTo(I,ie,Te){return this.easeTo(t.e({zoom:I},ie),Te)}zoomIn(I,ie){return this.zoomTo(this.getZoom()+1,I,ie),this}zoomOut(I,ie){return this.zoomTo(this.getZoom()-1,I,ie),this}getBearing(){return this.transform.bearing}setBearing(I,ie){return this.jumpTo({bearing:I},ie),this}getPadding(){return this.transform.padding}setPadding(I,ie){return this.jumpTo({padding:I},ie),this}rotateTo(I,ie,Te){return this.easeTo(t.e({bearing:I},ie),Te)}resetNorth(I,ie){return this.rotateTo(0,t.e({duration:1e3},I),ie),this}resetNorthPitch(I,ie){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},I),ie),this}snapToNorth(I,ie){return Math.abs(this.getBearing()){if(this._zooming&&(Me.zoom=t.y.number(ze,lt,Er)),this._rotating&&(Me.bearing=t.y.number(ht,$t,Er)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,Er)),this._padding&&(Me.interpolatePadding(Ot,Sr,Er),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(Er),Dt)Me.setLocationAtPoint(Dt,ur);else{let jr=Me.zoomScale(Me.zoom-ze),Qr=lt>ze?Math.min(2,bt):Math.max(.5,bt),ha=Math.pow(Qr,1-Er),Aa=Me.unproject(pt.add(Et.mult(Er*ha)).mult(jr));Me.setLocationAtPoint(Me.renderWorldCopies?Aa.wrap():Aa,na)}this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},Er=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie,Er)},I),this}_prepareEase(I,ie,Te={}){this._moving=!0,ie||Te.moving||this.fire(new t.k("movestart",I)),this._zooming&&!Te.zooming&&this.fire(new t.k("zoomstart",I)),this._rotating&&!Te.rotating&&this.fire(new t.k("rotatestart",I)),this._pitching&&!Te.pitching&&this.fire(new t.k("pitchstart",I))}_prepareElevation(I){this._elevationCenter=I,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(I,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(I){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ie=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(I<1&&ie!==this._elevationTarget){let Te=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(Te-(ie-(Te*I+this._elevationStart))/(1-I)),this._elevationTarget=ie}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,I)}_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(I){let ie=I.getCameraPosition(),Te=this.terrain.getElevationForLngLatZoom(ie.lngLat,I.zoom);if(ie.altitudethis._elevateCameraIfInsideTerrain(Me)),this.transformCameraUpdate&&ie.push(Me=>this.transformCameraUpdate(Me)),!ie.length)return;let Te=I.clone();for(let Me of ie){let ze=Te.clone(),{center:ht,zoom:wt,pitch:Ot,bearing:$t,elevation:Tr}=Me(ze);ht&&(ze.center=ht),wt!==void 0&&(ze.zoom=wt),Ot!==void 0&&(ze.pitch=Ot),$t!==void 0&&(ze.bearing=$t),Tr!==void 0&&(ze.elevation=Tr),Te.apply(ze)}this.transform.apply(Te)}_fireMoveEvents(I){this.fire(new t.k("move",I)),this._zooming&&this.fire(new t.k("zoom",I)),this._rotating&&this.fire(new t.k("rotate",I)),this._pitching&&this.fire(new t.k("pitch",I))}_afterEase(I,ie){if(this._easeId&&ie&&this._easeId===ie)return;delete this._easeId;let Te=this._zooming,Me=this._rotating,ze=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Te&&this.fire(new t.k("zoomend",I)),Me&&this.fire(new t.k("rotateend",I)),ze&&this.fire(new t.k("pitchend",I)),this.fire(new t.k("moveend",I))}flyTo(I,ie){var Te;if(!I.essential&&i.prefersReducedMotion){let on=t.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(on,ie)}this.stop(),I=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},I);let Me=this._getTransformForUpdate(),ze=Me.zoom,ht=Me.bearing,wt=Me.pitch,Ot=Me.padding,$t="bearing"in I?this._normalizeBearing(I.bearing,ht):ht,Tr="pitch"in I?+I.pitch:wt,Sr="padding"in I?I.padding:Me.padding,Kr=t.P.convert(I.offset),na=Me.centerPoint.add(Kr),qe=Me.pointLocation(na),{center:$e,zoom:lt}=Me.getConstrained(t.N.convert(I.center||qe),(Te=I.zoom)!==null&&Te!==void 0?Te:ze);this._normalizeCenter($e,Me);let pt=Me.zoomScale(lt-ze),Et=Me.project(qe),bt=Me.project($e).sub(Et),Dt=I.curve,ur=Math.max(Me.width,Me.height),yr=ur/pt,Er=bt.mag();if("minZoom"in I){let on=t.ac(Math.min(I.minZoom,ze,lt),Me.minZoom,Me.maxZoom),Sn=ur/Me.zoomScale(on-ze);Dt=Math.sqrt(Sn/Er*2)}let jr=Dt*Dt;function Qr(on){let Sn=(yr*yr-ur*ur+(on?-1:1)*jr*jr*Er*Er)/(2*(on?yr:ur)*jr*Er);return Math.log(Math.sqrt(Sn*Sn+1)-Sn)}function ha(on){return(Math.exp(on)-Math.exp(-on))/2}function Aa(on){return(Math.exp(on)+Math.exp(-on))/2}let Da=Qr(!1),ci=function(on){return Aa(Da)/Aa(Da+Dt*on)},Vi=function(on){return ur*((Aa(Da)*(ha(Sn=Da+Dt*on)/Aa(Sn))-ha(Da))/jr)/Er;var Sn},ji=(Qr(!0)-Da)/Dt;if(Math.abs(Er)<1e-6||!isFinite(ji)){if(Math.abs(ur-yr)<1e-6)return this.easeTo(I,ie);let on=yr0,ci=Sn=>Math.exp(on*Dt*Sn)}return I.duration="duration"in I?+I.duration:1e3*ji/("screenSpeed"in I?+I.screenSpeed/Dt:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=ht!==$t,this._pitching=Tr!==wt,this._padding=!Me.isPaddingEqual(Sr),this._prepareEase(ie,!1),this.terrain&&this._prepareElevation($e),this._ease(on=>{let Sn=on*ji,Kn=1/ci(Sn);Me.zoom=on===1?lt:ze+Me.scaleZoom(Kn),this._rotating&&(Me.bearing=t.y.number(ht,$t,on)),this._pitching&&(Me.pitch=t.y.number(wt,Tr,on)),this._padding&&(Me.interpolatePadding(Ot,Sr,on),na=Me.centerPoint.add(Kr)),this.terrain&&!I.freezeElevation&&this._updateElevation(on);let Bn=on===1?$e:Me.unproject(Et.add(bt.mult(Vi(Sn))).mult(Kn));Me.setLocationAtPoint(Me.renderWorldCopies?Bn.wrap():Bn,na),this._applyUpdatedTransform(Me),this._fireMoveEvents(ie)},()=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ie)},I),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(I,ie){var Te;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Me=this._onEaseEnd;delete this._onEaseEnd,Me.call(this,ie)}return I||(Te=this.handlers)===null||Te===void 0||Te.stop(!1),this}_ease(I,ie,Te){Te.animate===!1||Te.duration===0?(I(1),ie()):(this._easeStart=i.now(),this._easeOptions=Te,this._onEaseFrame=I,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ie){I=t.b3(I,-180,180);let Te=Math.abs(I-ie);return Math.abs(I-360-ie)180?-360:Te<-180?360:0}queryTerrainElevation(I){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(I),this.transform.tileZoom)-this.transform.elevation:null}}let eo={compact:!0,customAttribution:'
MapLibre'};class co{constructor(I=eo){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=ie=>{!ie||ie.sourceDataType!=="metadata"&&ie.sourceDataType!=="visibility"&&ie.dataType!=="style"&&ie.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=I}getDefaultPosition(){return"bottom-right"}onAdd(I){return this._map=I,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(I,ie){let Te=this._map._getUIString(`AttributionControl.${ie}`);I.title=Te,I.setAttribute("aria-label",Te)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(Me=>typeof Me!="string"?"":Me)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let Me=this._map.style.stylesheet;this.styleOwner=Me.owner,this.styleId=Me.id}let ie=this._map.style.sourceCaches;for(let Me in ie){let ze=ie[Me];if(ze.used||ze.usedForTerrain){let ht=ze.getSource();ht.attribution&&I.indexOf(ht.attribution)<0&&I.push(ht.attribution)}}I=I.filter(Me=>String(Me).trim()),I.sort((Me,ze)=>Me.length-ze.length),I=I.filter((Me,ze)=>{for(let ht=ze+1;ht=0)return!1;return!0});let Te=I.join(" | ");Te!==this._attribHTML&&(this._attribHTML=Te,I.length?(this._innerContainer.innerHTML=Te,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class An{constructor(I={}){this._updateCompact=()=>{let ie=this._container.children;if(ie.length){let Te=ie[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Te.classList.add("maplibregl-compact"):Te.classList.remove("maplibregl-compact")}},this.options=I}getDefaultPosition(){return"bottom-left"}onAdd(I){this._map=I,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");let ie=n.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),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(I){let ie=++this._id;return this._queue.push({callback:I,id:ie,cancelled:!1}),ie}remove(I){let ie=this._currentlyRunning,Te=ie?this._queue.concat(ie):this._queue;for(let Me of Te)if(Me.id===I)return void(Me.cancelled=!0)}run(I=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ie=this._currentlyRunning=this._queue;this._queue=[];for(let Te of ie)if(!Te.cancelled&&(Te.callback(I),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var yo=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Qo extends t.E{constructor(I){super(),this.sourceCache=I,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,I.usedForTerrain=!0,I.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(I,ie){this.sourceCache.update(I,ie),this._renderableTilesKeys=[];let Te={};for(let Me of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ie}))Te[Me.key]=!0,this._renderableTilesKeys.push(Me.key),this._tiles[Me.key]||(Me.posMatrix=new Float64Array(16),t.aP(Me.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Me.key]=new rt(Me,this.tileSize));for(let Me in this._tiles)Te[Me]||delete this._tiles[Me]}freeRtt(I){for(let ie in this._tiles){let Te=this._tiles[ie];(!I||Te.tileID.equals(I)||Te.tileID.isChildOf(I)||I.isChildOf(Te.tileID))&&(Te.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ie={};for(let Te of this._renderableTilesKeys){let Me=this._tiles[Te].tileID;if(Me.canonical.equals(I.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16),t.aP(ze.posMatrix,0,t.X,0,t.X,0,1),ie[Te]=ze}else if(Me.canonical.isChildOf(I.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16);let ht=Me.canonical.z-I.canonical.z,wt=Me.canonical.x-(Me.canonical.x>>ht<>ht<>ht;t.aP(ze.posMatrix,0,$t,0,$t,0,1),t.J(ze.posMatrix,ze.posMatrix,[-wt*$t,-Ot*$t,0]),ie[Te]=ze}else if(I.canonical.isChildOf(Me.canonical)){let ze=I.clone();ze.posMatrix=new Float64Array(16);let ht=I.canonical.z-Me.canonical.z,wt=I.canonical.x-(I.canonical.x>>ht<>ht<>ht;t.aP(ze.posMatrix,0,t.X,0,t.X,0,1),t.J(ze.posMatrix,ze.posMatrix,[wt*$t,Ot*$t,0]),t.K(ze.posMatrix,ze.posMatrix,[1/2**ht,1/2**ht,0]),ie[Te]=ze}}return ie}getSourceTile(I,ie){let Te=this.sourceCache._source,Me=I.overscaledZ-this.deltaZoom;if(Me>Te.maxzoom&&(Me=Te.maxzoom),Me=Te.minzoom&&(!ze||!ze.dem);)ze=this.sourceCache.getTileByID(I.scaledTo(Me--).key);return ze}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ie=>ie.timeAdded>=I)}}class ks{constructor(I,ie,Te){this.painter=I,this.sourceCache=new Qo(ie),this.options=Te,this.exaggeration=typeof Te.exaggeration=="number"?Te.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ie,Te,Me=t.X){var ze;if(!(ie>=0&&ie=0&&TeI.canonical.z&&(I.canonical.z>=Me?ze=I.canonical.z-Me:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ht=I.canonical.x-(I.canonical.x>>ze<>ze<>8<<4|ze>>8,ie[ht+3]=0;let Te=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ie.buffer)),Me=new u(I,Te,I.gl.RGBA,{premultiply:!1});return Me.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=Me,Me}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ie=new Uint8Array(4),Te=this.painter.context,Me=Te.gl,ze=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),ht=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),wt=Math.round(this.painter.height/devicePixelRatio);Te.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Me.readPixels(ze,wt-ht-1,1,1,Me.RGBA,Me.UNSIGNED_BYTE,ie),Te.bindFramebuffer.set(null);let Ot=ie[0]+(ie[2]>>4<<8),$t=ie[1]+((15&ie[2])<<8),Tr=this.coordsIndex[255-ie[3]],Sr=Tr&&this.sourceCache.getTileByID(Tr);if(!Sr)return null;let Kr=this._coordsTextureSize,na=(1<I.id!==ie),this._recentlyUsed.push(I.id)}stampObject(I){I.stamp=++this._stamp}getOrCreateFreeObject(){for(let ie of this._recentlyUsed)if(!this._objects[ie].inUse)return this._objects[ie];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let I=this._createObject(this._objects.length);return this._objects.push(I),I}freeObject(I){I.inUse=!1}freeAllObjects(){for(let I of this._objects)this.freeObject(I)}isFull(){return!(this._objects.length!I.inUse)===!1}}let Ns={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class el{constructor(I,ie){this.painter=I,this.terrain=ie,this.pool=new rl(I.context,30,ie.sourceCache.tileSize*ie.qualityFactor)}destruct(){this.pool.destruct()}getTexture(I){return this.pool.getObjectForId(I.rtt[this._stacks.length-1].id).texture}prepareForRender(I,ie){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=I._order.filter(Te=>!I._layers[Te].isHidden(ie)),this._coordsDescendingInv={};for(let Te in I.sourceCaches){this._coordsDescendingInv[Te]={};let Me=I.sourceCaches[Te].getVisibleCoordinates();for(let ze of Me){let ht=this.terrain.sourceCache.getTerrainCoords(ze);for(let wt in ht)this._coordsDescendingInv[Te][wt]||(this._coordsDescendingInv[Te][wt]=[]),this._coordsDescendingInv[Te][wt].push(ht[wt])}}this._coordsDescendingInvStr={};for(let Te of I._order){let Me=I._layers[Te],ze=Me.source;if(Ns[Me.type]&&!this._coordsDescendingInvStr[ze]){this._coordsDescendingInvStr[ze]={};for(let ht in this._coordsDescendingInv[ze])this._coordsDescendingInvStr[ze][ht]=this._coordsDescendingInv[ze][ht].map(wt=>wt.key).sort().join()}}for(let Te of this._renderableTiles)for(let Me in this._coordsDescendingInvStr){let ze=this._coordsDescendingInvStr[Me][Te.tileID.key];ze&&ze!==Te.rttCoords[Me]&&(Te.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ie=I.type,Te=this.painter,Me=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Ns[ie]&&(this._prevType&&Ns[this._prevType]||this._stacks.push([]),this._prevType=ie,this._stacks[this._stacks.length-1].push(I.id),!Me))return!0;if(Ns[this._prevType]||Ns[ie]&&Me){this._prevType=ie;let ze=this._stacks.length-1,ht=this._stacks[ze]||[];for(let wt of this._renderableTiles){if(this.pool.isFull()&&(ml(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(wt),wt.rtt[ze]){let $t=this.pool.getObjectForId(wt.rtt[ze].id);if($t.stamp===wt.rtt[ze].stamp){this.pool.useObject($t);continue}}let Ot=this.pool.getOrCreateFreeObject();this.pool.useObject(Ot),this.pool.stampObject(Ot),wt.rtt[ze]={id:Ot.id,stamp:Ot.stamp},Te.context.bindFramebuffer.set(Ot.fbo.framebuffer),Te.context.clear({color:t.aM.transparent,stencil:0}),Te.currentStencilSource=void 0;for(let $t=0;$t{Oe.touchstart=Oe.dragStart,Oe.touchmoveWindow=Oe.dragMove,Oe.touchend=Oe.dragEnd},Un={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ro{constructor(I,ie,Te=!1){this.mousedown=ht=>{this.startMouse(t.e({},ht,{ctrlKey:!0,preventDefault:()=>ht.preventDefault()}),n.mousePos(this.element,ht)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ht=>{this.moveMouse(ht,n.mousePos(this.element,ht))},this.mouseup=ht=>{this.mouseRotate.dragEnd(ht),this.mousePitch&&this.mousePitch.dragEnd(ht),this.offTemp()},this.touchstart=ht=>{ht.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,ht.targetTouches)[0],this.startTouch(ht,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=ht=>{ht.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,ht.targetTouches)[0],this.moveTouch(ht,this._lastPos))},this.touchend=ht=>{ht.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){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 Me=I.dragRotate._mouseRotate.getClickTolerance(),ze=I.dragRotate._mousePitch.getClickTolerance();this.element=ie,this.mouseRotate=nu({clickTolerance:Me,enable:!0}),this.touchRotate=(({enable:ht,clickTolerance:wt,bearingDegreesPerPixelMoved:Ot=.8})=>{let $t=new Jc;return new Hu({clickTolerance:wt,move:(Tr,Sr)=>({bearingDelta:(Sr.x-Tr.x)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:Me,enable:!0}),this.map=I,Te&&(this.mousePitch=Vf({clickTolerance:ze,enable:!0}),this.touchPitch=(({enable:ht,clickTolerance:wt,pitchDegreesPerPixelMoved:Ot=-.5})=>{let $t=new Jc;return new Hu({clickTolerance:wt,move:(Tr,Sr)=>({pitchDelta:(Sr.y-Tr.y)*Ot}),moveStateManager:$t,enable:ht,assignEvents:ll})})({clickTolerance:ze,enable:!0})),n.addEventListener(ie,"mousedown",this.mousedown),n.addEventListener(ie,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(ie,"touchcancel",this.reset)}startMouse(I,ie){this.mouseRotate.dragStart(I,ie),this.mousePitch&&this.mousePitch.dragStart(I,ie),n.disableDrag()}startTouch(I,ie){this.touchRotate.dragStart(I,ie),this.touchPitch&&this.touchPitch.dragStart(I,ie),n.disableDrag()}moveMouse(I,ie){let Te=this.map,{bearingDelta:Me}=this.mouseRotate.dragMove(I,ie)||{};if(Me&&Te.setBearing(Te.getBearing()+Me),this.mousePitch){let{pitchDelta:ze}=this.mousePitch.dragMove(I,ie)||{};ze&&Te.setPitch(Te.getPitch()+ze)}}moveTouch(I,ie){let Te=this.map,{bearingDelta:Me}=this.touchRotate.dragMove(I,ie)||{};if(Me&&Te.setBearing(Te.getBearing()+Me),this.touchPitch){let{pitchDelta:ze}=this.touchPitch.dragMove(I,ie)||{};ze&&Te.setPitch(Te.getPitch()+ze)}}off(){let I=this.element;n.removeEventListener(I,"mousedown",this.mousedown),n.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(I,"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 Js;function Fs(Oe,I,ie){let Te=new t.N(Oe.lng,Oe.lat);if(Oe=new t.N(Oe.lng,Oe.lat),I){let Me=new t.N(Oe.lng-360,Oe.lat),ze=new t.N(Oe.lng+360,Oe.lat),ht=ie.locationPoint(Oe).distSqr(I);ie.locationPoint(Me).distSqr(I)180;){let Me=ie.locationPoint(Oe);if(Me.x>=0&&Me.y>=0&&Me.x<=ie.width&&Me.y<=ie.height)break;Oe.lng>ie.center.lng?Oe.lng-=360:Oe.lng+=360}return Oe.lng!==Te.lng&&ie.locationPoint(Oe).y>ie.height/2-ie.getHorizon()?Oe:Te}let cu={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(Oe,I,ie){let Te=Oe.classList;for(let Me in cu)Te.remove(`maplibregl-${ie}-anchor-${Me}`);Te.add(`maplibregl-${ie}-anchor-${I}`)}class Zu extends t.E{constructor(I){if(super(),this._onKeyPress=ie=>{let Te=ie.code,Me=ie.charCode||ie.keyCode;Te!=="Space"&&Te!=="Enter"&&Me!==32&&Me!==13||this.togglePopup()},this._onMapClick=ie=>{let Te=ie.originalEvent.target,Me=this._element;this._popup&&(Te===Me||Me.contains(Te))&&this.togglePopup()},this._update=ie=>{var Te;if(!this._map)return;let Me=this._map.loaded()&&!this._map.isMoving();(ie?.type==="terrain"||ie?.type==="render"&&!Me)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Fs(this._lngLat,this._flatPos,this._map.transform):(Te=this._lngLat)===null||Te===void 0?void 0:Te.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 ze="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ze=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(ze=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ht="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ht="rotateX(0deg)":this._pitchAlignment==="map"&&(ht=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ie&&ie.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${cu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ht} ${ze}`),i.frameAsync(new AbortController).then(()=>{this._updateOpacity(ie&&ie.type==="moveend")}).catch(()=>{})},this._onMove=ie=>{if(!this._isDragging){let Te=this._clickTolerance||this._map._clickTolerance;this._isDragging=ie.point.dist(this._pointerdownPos)>=Te}this._isDragging&&(this._pos=ie.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=ie=>{this._element.contains(ie.originalEvent.target)&&(ie.preventDefault(),this._positionDelta=ie.point.sub(this._pos).add(this._offset),this._pointerdownPos=ie.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=I&&I.anchor||"center",this._color=I&&I.color||"#3FB1CE",this._scale=I&&I.scale||1,this._draggable=I&&I.draggable||!1,this._clickTolerance=I&&I.clickTolerance||0,this._subpixelPositioning=I&&I.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=I&&I.rotation||0,this._rotationAlignment=I&&I.rotationAlignment||"auto",this._pitchAlignment=I&&I.pitchAlignment&&I.pitchAlignment!=="auto"?I.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(I?.opacity,I?.opacityWhenCovered),I&&I.element)this._element=I.element,this._offset=t.P.convert(I&&I.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");let ie=n.createNS("http://www.w3.org/2000/svg","svg"),Te=41,Me=27;ie.setAttributeNS(null,"display","block"),ie.setAttributeNS(null,"height",`${Te}px`),ie.setAttributeNS(null,"width",`${Me}px`),ie.setAttributeNS(null,"viewBox",`0 0 ${Me} ${Te}`);let ze=n.createNS("http://www.w3.org/2000/svg","g");ze.setAttributeNS(null,"stroke","none"),ze.setAttributeNS(null,"stroke-width","1"),ze.setAttributeNS(null,"fill","none"),ze.setAttributeNS(null,"fill-rule","evenodd");let ht=n.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"fill-rule","nonzero");let wt=n.createNS("http://www.w3.org/2000/svg","g");wt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),wt.setAttributeNS(null,"fill","#000000");let Ot=[{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 pt of Ot){let Et=n.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",pt.rx),Et.setAttributeNS(null,"ry",pt.ry),wt.appendChild(Et)}let $t=n.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let Tr=n.createNS("http://www.w3.org/2000/svg","path");Tr.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(Tr);let Sr=n.createNS("http://www.w3.org/2000/svg","g");Sr.setAttributeNS(null,"opacity","0.25"),Sr.setAttributeNS(null,"fill","#000000");let Kr=n.createNS("http://www.w3.org/2000/svg","path");Kr.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"),Sr.appendChild(Kr);let na=n.createNS("http://www.w3.org/2000/svg","g");na.setAttributeNS(null,"transform","translate(6.0, 7.0)"),na.setAttributeNS(null,"fill","#FFFFFF");let qe=n.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"transform","translate(8.0, 8.0)");let $e=n.createNS("http://www.w3.org/2000/svg","circle");$e.setAttributeNS(null,"fill","#000000"),$e.setAttributeNS(null,"opacity","0.25"),$e.setAttributeNS(null,"cx","5.5"),$e.setAttributeNS(null,"cy","5.5"),$e.setAttributeNS(null,"r","5.4999962");let lt=n.createNS("http://www.w3.org/2000/svg","circle");lt.setAttributeNS(null,"fill","#FFFFFF"),lt.setAttributeNS(null,"cx","5.5"),lt.setAttributeNS(null,"cy","5.5"),lt.setAttributeNS(null,"r","5.4999962"),qe.appendChild($e),qe.appendChild(lt),ht.appendChild(wt),ht.appendChild($t),ht.appendChild(Sr),ht.appendChild(na),ht.appendChild(qe),ie.appendChild(ht),ie.setAttributeNS(null,"height",Te*this._scale+"px"),ie.setAttributeNS(null,"width",Me*this._scale+"px"),this._element.appendChild(ie),this._offset=t.P.convert(I&&I.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ie=>{ie.preventDefault()}),this._element.addEventListener("mousedown",ie=>{ie.preventDefault()}),Iu(this._element,this._anchor,"marker"),I&&I.className)for(let ie of I.className.split(" "))this._element.classList.add(ie);this._popup=null}addTo(I){return this.remove(),this._map=I,this._element.setAttribute("aria-label",I._getUIString("Marker.Title")),I.getCanvasContainer().appendChild(this._element),I.on("move",this._update),I.on("moveend",this._update),I.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(I){return this._lngLat=t.N.convert(I),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(I){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),I){if(!("offset"in I.options)){let Me=Math.abs(13.5)/Math.SQRT2;I.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Me,-1*(38.1-13.5+Me)],"bottom-right":[-Me,-1*(38.1-13.5+Me)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=I,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(I){return this._subpixelPositioning=I,this}getPopup(){return this._popup}togglePopup(){let I=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:I?(I.isOpen()?I.remove():(I.setLngLat(this._lngLat),I.addTo(this._map)),this):this}_updateOpacity(I=!1){var ie,Te;if(!(!((ie=this._map)===null||ie===void 0)&&ie.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(I)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Me=this._map,ze=Me.terrain.depthAtPoint(this._pos),ht=Me.terrain.getElevationForLngLatZoom(this._lngLat,Me.transform.tileZoom);if(Me.transform.lngLatToCameraDepth(this._lngLat,ht)-ze<.006)return void(this._element.style.opacity=this._opacity);let wt=-this._offset.y/Me.transform._pixelPerMeter,Ot=Math.sin(Me.getPitch()*Math.PI/180)*wt,$t=Me.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),Tr=Me.transform.lngLatToCameraDepth(this._lngLat,ht+Ot)-$t>.006;!((Te=this._popup)===null||Te===void 0)&&Te.isOpen()&&Tr&&this._popup.remove(),this._element.style.opacity=Tr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(I){return this._offset=t.P.convert(I),this._update(),this}addClassName(I){this._element.classList.add(I)}removeClassName(I){this._element.classList.remove(I)}toggleClassName(I){return this._element.classList.toggle(I)}setDraggable(I){return this._draggable=!!I,this._map&&(I?(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(I){return this._rotation=I||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(I){return this._rotationAlignment=I||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(I){return this._pitchAlignment=I&&I!=="auto"?I:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(I,ie){return I===void 0&&ie===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),I!==void 0&&(this._opacity=I),ie!==void 0&&(this._opacityWhenCovered=ie),this._map&&this._updateOpacity(!0),this}}let Ic={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bu=0,Rc=!1,Au={maxWidth:100,unit:"metric"};function yc(Oe,I,ie){let Te=ie&&ie.maxWidth||100,Me=Oe._container.clientHeight/2,ze=Oe.unproject([0,Me]),ht=Oe.unproject([Te,Me]),wt=ze.distanceTo(ht);if(ie&&ie.unit==="imperial"){let Ot=3.2808*wt;Ot>5280?fo(I,Te,Ot/5280,Oe._getUIString("ScaleControl.Miles")):fo(I,Te,Ot,Oe._getUIString("ScaleControl.Feet"))}else ie&&ie.unit==="nautical"?fo(I,Te,wt/1852,Oe._getUIString("ScaleControl.NauticalMiles")):wt>=1e3?fo(I,Te,wt/1e3,Oe._getUIString("ScaleControl.Kilometers")):fo(I,Te,wt,Oe._getUIString("ScaleControl.Meters"))}function fo(Oe,I,ie,Te){let Me=function(ze){let ht=Math.pow(10,`${Math.floor(ze)}`.length-1),wt=ze/ht;return wt=wt>=10?10:wt>=5?5:wt>=3?3:wt>=2?2:wt>=1?1:function(Ot){let $t=Math.pow(10,Math.ceil(-Math.log(Ot)/Math.LN10));return Math.round(Ot*$t)/$t}(wt),ht*wt}(ie);Oe.style.width=I*(Me/ie)+"px",Oe.innerHTML=`${Me} ${Te}`}let Fo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Dc=["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(Oe){if(Oe){if(typeof Oe=="number"){let I=Math.round(Math.abs(Oe)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Oe),"top-left":new t.P(I,I),"top-right":new t.P(-I,I),bottom:new t.P(0,-Oe),"bottom-left":new t.P(I,-I),"bottom-right":new t.P(-I,-I),left:new t.P(Oe,0),right:new t.P(-Oe,0)}}if(Oe instanceof t.P||Array.isArray(Oe)){let I=t.P.convert(Oe);return{center:I,top:I,"top-left":I,"top-right":I,bottom:I,"bottom-left":I,"bottom-right":I,left:I,right:I}}return{center:t.P.convert(Oe.center||[0,0]),top:t.P.convert(Oe.top||[0,0]),"top-left":t.P.convert(Oe["top-left"]||[0,0]),"top-right":t.P.convert(Oe["top-right"]||[0,0]),bottom:t.P.convert(Oe.bottom||[0,0]),"bottom-left":t.P.convert(Oe["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Oe["bottom-right"]||[0,0]),left:t.P.convert(Oe.left||[0,0]),right:t.P.convert(Oe.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=Di,e.DoubleClickZoomHandler=li,e.DragPanHandler=Qi,e.DragRotateHandler=pn,e.EdgeInsets=yu,e.FullscreenControl=class extends t.E{constructor(Oe={}){super(),this._onFullscreenChange=()=>{var I;let ie=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((I=ie?.shadowRoot)===null||I===void 0)&&I.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Oe&&Oe.container&&(Oe.container instanceof HTMLElement?this._container=Oe.container: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(Oe){return this._map=Oe,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 Oe=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",Oe).setAttribute("aria-hidden","true"),Oe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Oe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Oe),this._fullscreenButton.title=Oe}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new 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=Pe,e.GeolocateControl=class extends t.E{constructor(Oe){super(),this._onSuccess=I=>{if(this._map){if(this._isOutOfMapMaxBounds(I))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",I)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=I,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(I),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(I),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",I)),this._finish()}},this._updateCamera=I=>{let ie=new t.N(I.coords.longitude,I.coords.latitude),Te=I.coords.accuracy,Me=this._map.getBearing(),ze=t.e({bearing:Me},this.options.fitBoundsOptions),ht=te.fromLngLat(ie,Te);this._map.fitBounds(ht,ze,{geolocateSource:!0})},this._updateMarker=I=>{if(I){let ie=new t.N(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(ie).addTo(this._map),this._userLocationDotMarker.setLngLat(ie).addTo(this._map),this._accuracy=I.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=I=>{if(this._map){if(this.options.trackUserLocation)if(I.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 ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&Rc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",I)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",I=>I.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=I=>{if(this._map){if(I===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}else{let ie=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}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",ie=>{ie.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ie.originalEvent&&ie.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({},Ic,Oe)}onAdd(Oe){return this._map=Oe,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,function*(I=!1){if(Js!==void 0&&!I)return Js;if(window.navigator.permissions===void 0)return Js=!!window.navigator.geolocation,Js;try{Js=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Js=!!window.navigator.geolocation}return Js})}().then(I=>this._finishSetupUI(I)),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,bu=0,Rc=!1}_isOutOfMapMaxBounds(Oe){let I=this._map.getMaxBounds(),ie=Oe.coords;return I&&(ie.longitudeI.getEast()||ie.latitudeI.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let Oe=this._map.getBounds(),I=Oe.getSouthEast(),ie=Oe.getNorthEast(),Te=I.distanceTo(ie),Me=Math.ceil(this._accuracy/(Te/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Me}px`,this._circleElement.style.height=`${Me}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":bu--,Rc=!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 Oe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(Oe={maximumAge:6e5,timeout:0},Rc=!0):(Oe=this.options.positionOptions,Rc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Oe)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=Qf,e.ImageSource=at,e.KeyboardHandler=xr,e.LngLatBounds=te,e.LogoControl=An,e.Map=class extends io{constructor(Oe){t.bf.mark(t.bg.create);let I=Object.assign(Object.assign({},yl),Oe);if(I.minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Ml(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new un,this._controls=[],this._mapId=t.a4(),this._contextLost=ie=>{ie.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ie}))},this._contextRestored=ie=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ie}))},this._onMapScroll=ie=>{if(ie.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=I.preserveDrawingBuffer===!0,this._antialias=I.antialias===!0,this._trackResize=I.trackResize===!0,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles===!0,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions===!0,this._collectResourceTiming=I.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ss),I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=I.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new x(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.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 ie=!1,Te=qf(Me=>{this._trackResize&&!this._removed&&(this.resize(Me),this.redraw())},50);this._resizeObserver=new ResizeObserver(Me=>{ie?Te(Me):ie=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Qn(this,I),this._hash=I.hash&&new Qf(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,t.e({},I.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=I.localIdeographFontFamily,this._validateStyle=I.validateStyle,I.style&&this.setStyle(I.style,{localIdeographFontFamily:I.localIdeographFontFamily}),I.attributionControl&&this.addControl(new co(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new An,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ie=>{this._update(ie.dataType==="style"),this.fire(new t.k(`${ie.dataType}data`,ie))}),this.on("dataloading",ie=>{this.fire(new t.k(`${ie.dataType}dataloading`,ie))}),this.on("dataabort",ie=>{this.fire(new t.k("sourcedataabort",ie))})}_getMapId(){return this._mapId}addControl(Oe,I){if(I===void 0&&(I=Oe.getDefaultPosition?Oe.getDefaultPosition():"top-right"),!Oe||!Oe.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 ie=Oe.onAdd(this);this._controls.push(Oe);let Te=this._controlPositions[I];return I.indexOf("bottom")!==-1?Te.insertBefore(ie,Te.firstChild):Te.appendChild(ie),this}removeControl(Oe){if(!Oe||!Oe.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 I=this._controls.indexOf(Oe);return I>-1&&this._controls.splice(I,1),Oe.onRemove(this),this}hasControl(Oe){return this._controls.indexOf(Oe)>-1}calculateCameraOptionsFromTo(Oe,I,ie,Te){return Te==null&&this.terrain&&(Te=this.terrain.getElevationForLngLatZoom(ie,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Oe,I,ie,Te)}resize(Oe){var I;let ie=this._containerDimensions(),Te=ie[0],Me=ie[1],ze=this._getClampedPixelRatio(Te,Me);if(this._resizeCanvas(Te,Me,ze),this.painter.resize(Te,Me,ze),this.painter.overLimit()){let wt=this.painter.context.gl;this._maxCanvasSize=[wt.drawingBufferWidth,wt.drawingBufferHeight];let Ot=this._getClampedPixelRatio(Te,Me);this._resizeCanvas(Te,Me,Ot),this.painter.resize(Te,Me,Ot)}this.transform.resize(Te,Me),(I=this._requestedCameraState)===null||I===void 0||I.resize(Te,Me);let ht=!this._moving;return ht&&(this.stop(),this.fire(new t.k("movestart",Oe)).fire(new t.k("move",Oe))),this.fire(new t.k("resize",Oe)),ht&&this.fire(new t.k("moveend",Oe)),this}_getClampedPixelRatio(Oe,I){let{0:ie,1:Te}=this._maxCanvasSize,Me=this.getPixelRatio(),ze=Oe*Me,ht=I*Me;return Math.min(ze>ie?ie/ze:1,ht>Te?Te/ht:1)*Me}getPixelRatio(){var Oe;return(Oe=this._overridePixelRatio)!==null&&Oe!==void 0?Oe:devicePixelRatio}setPixelRatio(Oe){this._overridePixelRatio=Oe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Oe){return this.transform.setMaxBounds(te.convert(Oe)),this._update()}setMinZoom(Oe){if((Oe=Oe??-2)>=-2&&Oe<=this.transform.maxZoom)return this.transform.minZoom=Oe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Oe,this._update(),this.getZoom()>Oe&&this.setZoom(Oe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Oe){if((Oe=Oe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Oe>=0&&Oe<=this.transform.maxPitch)return this.transform.minPitch=Oe,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(Oe>=this.transform.minPitch)return this.transform.maxPitch=Oe,this._update(),this.getPitch()>Oe&&this.setPitch(Oe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Oe){return this.transform.renderWorldCopies=Oe,this._update()}project(Oe){return this.transform.locationPoint(t.N.convert(Oe),this.style&&this.terrain)}unproject(Oe){return this.transform.pointLocation(t.P.convert(Oe),this.terrain)}isMoving(){var Oe;return this._moving||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isMoving())}isZooming(){var Oe;return this._zooming||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isZooming())}isRotating(){var Oe;return this._rotating||((Oe=this.handlers)===null||Oe===void 0?void 0:Oe.isRotating())}_createDelegatedListener(Oe,I,ie){if(Oe==="mouseenter"||Oe==="mouseover"){let Te=!1;return{layers:I,listener:ie,delegates:{mousemove:ze=>{let ht=I.filter(Ot=>this.getLayer(Ot)),wt=ht.length!==0?this.queryRenderedFeatures(ze.point,{layers:ht}):[];wt.length?Te||(Te=!0,ie.call(this,new iu(Oe,this,ze.originalEvent,{features:wt}))):Te=!1},mouseout:()=>{Te=!1}}}}if(Oe==="mouseleave"||Oe==="mouseout"){let Te=!1;return{layers:I,listener:ie,delegates:{mousemove:ht=>{let wt=I.filter(Ot=>this.getLayer(Ot));(wt.length!==0?this.queryRenderedFeatures(ht.point,{layers:wt}):[]).length?Te=!0:Te&&(Te=!1,ie.call(this,new iu(Oe,this,ht.originalEvent)))},mouseout:ht=>{Te&&(Te=!1,ie.call(this,new iu(Oe,this,ht.originalEvent)))}}}}{let Te=Me=>{let ze=I.filter(wt=>this.getLayer(wt)),ht=ze.length!==0?this.queryRenderedFeatures(Me.point,{layers:ze}):[];ht.length&&(Me.features=ht,ie.call(this,Me),delete Me.features)};return{layers:I,listener:ie,delegates:{[Oe]:Te}}}}_saveDelegatedListener(Oe,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Oe]=this._delegatedListeners[Oe]||[],this._delegatedListeners[Oe].push(I)}_removeDelegatedListener(Oe,I,ie){if(!this._delegatedListeners||!this._delegatedListeners[Oe])return;let Te=this._delegatedListeners[Oe];for(let Me=0;MeI.includes(ht))){for(let ht in ze.delegates)this.off(ht,ze.delegates[ht]);return void Te.splice(Me,1)}}}on(Oe,I,ie){if(ie===void 0)return super.on(Oe,I);let Te=this._createDelegatedListener(Oe,typeof I=="string"?[I]:I,ie);this._saveDelegatedListener(Oe,Te);for(let Me in Te.delegates)this.on(Me,Te.delegates[Me]);return this}once(Oe,I,ie){if(ie===void 0)return super.once(Oe,I);let Te=typeof I=="string"?[I]:I,Me=this._createDelegatedListener(Oe,Te,ie);for(let ze in Me.delegates){let ht=Me.delegates[ze];Me.delegates[ze]=(...wt)=>{this._removeDelegatedListener(Oe,Te,ie),ht(...wt)}}this._saveDelegatedListener(Oe,Me);for(let ze in Me.delegates)this.once(ze,Me.delegates[ze]);return this}off(Oe,I,ie){return ie===void 0?super.off(Oe,I):(this._removeDelegatedListener(Oe,typeof I=="string"?[I]:I,ie),this)}queryRenderedFeatures(Oe,I){if(!this.style)return[];let ie,Te=Oe instanceof t.P||Array.isArray(Oe),Me=Te?Oe:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(Te?{}:Oe)||{},Me instanceof t.P||typeof Me[0]=="number")ie=[t.P.convert(Me)];else{let ze=t.P.convert(Me[0]),ht=t.P.convert(Me[1]);ie=[ze,new t.P(ht.x,ze.y),ht,new t.P(ze.x,ht.y),ze]}return this.style.queryRenderedFeatures(ie,I,this.transform)}querySourceFeatures(Oe,I){return this.style.querySourceFeatures(Oe,I)}setStyle(Oe,I){return(I=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Oe?(this._diffStyle(Oe,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(Oe,I))}setTransformRequest(Oe){return this._requestManager.setTransformRequest(Oe),this}_getUIString(Oe){let I=this._locale[Oe];if(I==null)throw new Error(`Missing UI string '${Oe}'`);return I}_updateStyle(Oe,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Oe,I));let ie=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Oe)),Oe?(this.style=new Rr(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof Oe=="string"?this.style.loadURL(Oe,I,ie):this.style.loadJSON(Oe,I,ie),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Rr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Oe,I){if(typeof Oe=="string"){let ie=this._requestManager.transformRequest(Oe,"Style");t.h(ie,new AbortController).then(Te=>{this._updateDiff(Te.data,I)}).catch(Te=>{Te&&this.fire(new t.j(Te))})}else typeof Oe=="object"&&this._updateDiff(Oe,I)}_updateDiff(Oe,I){try{this.style.setState(Oe,I)&&this._update(!0)}catch(ie){t.w(`Unable to perform style diff: ${ie.message||ie.error||ie}. Rebuilding the style from scratch.`),this._updateStyle(Oe,I)}}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(Oe,I){return this._lazyInitEmptyStyle(),this.style.addSource(Oe,I),this._update(!0)}isSourceLoaded(Oe){let I=this.style&&this.style.sourceCaches[Oe];if(I!==void 0)return I.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Oe}'`)))}setTerrain(Oe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Oe){let I=this.style.sourceCaches[Oe.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${Oe.source}`);this.terrain===null&&I.reload();for(let ie in this.style._layers){let Te=this.style._layers[ie];Te.type==="hillshade"&&Te.source===Oe.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 ks(this.painter,I,Oe),this.painter.renderToTexture=new el(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=ie=>{ie.dataType==="style"?this.terrain.sourceCache.freeRtt():ie.dataType==="source"&&ie.tile&&(ie.sourceId!==Oe.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ie.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:Oe})),this}getTerrain(){var Oe,I;return(I=(Oe=this.terrain)===null||Oe===void 0?void 0:Oe.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let Oe=this.style&&this.style.sourceCaches;for(let I in Oe){let ie=Oe[I]._tiles;for(let Te in ie){let Me=ie[Te];if(Me.state!=="loaded"&&Me.state!=="errored")return!1}}return!0}removeSource(Oe){return this.style.removeSource(Oe),this._update(!0)}getSource(Oe){return this.style.getSource(Oe)}addImage(Oe,I,ie={}){let{pixelRatio:Te=1,sdf:Me=!1,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t}=ie;if(this._lazyInitEmptyStyle(),!(I instanceof HTMLImageElement||t.b(I))){if(I.width===void 0||I.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:Tr,height:Sr,data:Kr}=I,na=I;return this.style.addImage(Oe,{data:new t.R({width:Tr,height:Sr},new Uint8Array(Kr)),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0,userImage:na}),na.onAdd&&na.onAdd(this,Oe),this}}{let{width:Tr,height:Sr,data:Kr}=i.getImageData(I);this.style.addImage(Oe,{data:new t.R({width:Tr,height:Sr},Kr),pixelRatio:Te,stretchX:ze,stretchY:ht,content:wt,textFitWidth:Ot,textFitHeight:$t,sdf:Me,version:0})}}updateImage(Oe,I){let ie=this.style.getImage(Oe);if(!ie)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 Te=I instanceof HTMLImageElement||t.b(I)?i.getImageData(I):I,{width:Me,height:ze,data:ht}=Te;if(Me===void 0||ze===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(Me!==ie.data.width||ze!==ie.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 wt=!(I instanceof HTMLImageElement||t.b(I));return ie.data.replace(ht,wt),this.style.updateImage(Oe,ie),this}getImage(Oe){return this.style.getImage(Oe)}hasImage(Oe){return Oe?!!this.style.getImage(Oe):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Oe){this.style.removeImage(Oe)}loadImage(Oe){return l.getImage(this._requestManager.transformRequest(Oe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Oe,I){return this._lazyInitEmptyStyle(),this.style.addLayer(Oe,I),this._update(!0)}moveLayer(Oe,I){return this.style.moveLayer(Oe,I),this._update(!0)}removeLayer(Oe){return this.style.removeLayer(Oe),this._update(!0)}getLayer(Oe){return this.style.getLayer(Oe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Oe,I,ie){return this.style.setLayerZoomRange(Oe,I,ie),this._update(!0)}setFilter(Oe,I,ie={}){return this.style.setFilter(Oe,I,ie),this._update(!0)}getFilter(Oe){return this.style.getFilter(Oe)}setPaintProperty(Oe,I,ie,Te={}){return this.style.setPaintProperty(Oe,I,ie,Te),this._update(!0)}getPaintProperty(Oe,I){return this.style.getPaintProperty(Oe,I)}setLayoutProperty(Oe,I,ie,Te={}){return this.style.setLayoutProperty(Oe,I,ie,Te),this._update(!0)}getLayoutProperty(Oe,I){return this.style.getLayoutProperty(Oe,I)}setGlyphs(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Oe,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Oe,I,ie={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Oe,I,ie,Te=>{Te||this._update(!0)}),this}removeSprite(Oe){return this._lazyInitEmptyStyle(),this.style.removeSprite(Oe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Oe,I,ie=>{ie||this._update(!0)}),this}setLight(Oe,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(Oe,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(Oe){return this._lazyInitEmptyStyle(),this.style.setSky(Oe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Oe,I){return this.style.setFeatureState(Oe,I),this._update()}removeFeatureState(Oe,I){return this.style.removeFeatureState(Oe,I),this._update()}getFeatureState(Oe){return this.style.getFeatureState(Oe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Oe=0,I=0;return this._container&&(Oe=this._container.clientWidth||400,I=this._container.clientHeight||300),[Oe,I]}_setupContainer(){let Oe=this._container;Oe.classList.add("maplibregl-map");let I=this._canvasContainer=n.create("div","maplibregl-canvas-container",Oe);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",I),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 ie=this._containerDimensions(),Te=this._getClampedPixelRatio(ie[0],ie[1]);this._resizeCanvas(ie[0],ie[1],Te);let Me=this._controlContainer=n.create("div","maplibregl-control-container",Oe),ze=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ht=>{ze[ht]=n.create("div",`maplibregl-ctrl-${ht} `,Me)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Oe,I,ie){this._canvas.width=Math.floor(ie*Oe),this._canvas.height=Math.floor(ie*I),this._canvas.style.width=`${Oe}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let Oe={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",Te=>{I={requestedAttributes:Oe},Te&&(I.statusMessage=Te.statusMessage,I.type=Te.type)},{once:!0});let ie=this._canvas.getContext("webgl2",Oe)||this._canvas.getContext("webgl",Oe);if(!ie){let Te="Failed to initialize WebGL";throw I?(I.message=Te,new Error(JSON.stringify(I))):new Error(Te)}this.painter=new Mc(ie,this.transform),s.testSupport(ie)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Oe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Oe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Oe){return this._update(),this._renderTaskQueue.add(Oe)}_cancelRenderFrame(Oe){this._renderTaskQueue.remove(Oe)}_render(Oe){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Oe),this._removed)return;let ie=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Me=this.transform.zoom,ze=i.now();this.style.zoomHistory.update(Me,ze);let ht=new t.z(Me,{now:ze,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),wt=ht.crossFadingFactor();wt===1&&wt===this._crossFadingFactor||(ie=!0,this._crossFadingFactor=wt),this.style.update(ht)}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,I,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:I,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()||ie)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Te=this._sourcesDirty||this._styleDirty||this._placementDirty;return Te||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||Te||(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 Oe;this._hash&&this._hash.remove();for(let ie of this._controls)ie.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),(Oe=this._resizeObserver)===null||Oe===void 0||Oe.disconnect();let I=this.painter.context.gl.getExtension("WEBGL_lose_context");I?.loseContext&&I.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(Oe=>{t.bf.frame(Oe),this._frameRequest=null,this._render(Oe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Oe){this._showTileBoundaries!==Oe&&(this._showTileBoundaries=Oe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Oe){this._showPadding!==Oe&&(this._showPadding=Oe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Oe){this._showCollisionBoxes!==Oe&&(this._showCollisionBoxes=Oe,Oe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Oe){this._showOverdrawInspector!==Oe&&(this._showOverdrawInspector=Oe,this._update())}get repaint(){return!!this._repaint}set repaint(Oe){this._repaint!==Oe&&(this._repaint=Oe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Oe){this._vertices=Oe,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=iu,e.MapTouchEvent=Kc,e.MapWheelEvent=hh,e.Marker=Zu,e.NavigationControl=class{constructor(Oe){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ie=I===this._map.getMaxZoom(),Te=I===this._map.getMinZoom();this._zoomInButton.disabled=ie,this._zoomOutButton.disabled=Te,this._zoomInButton.setAttribute("aria-disabled",ie.toString()),this._zoomOutButton.setAttribute("aria-disabled",Te.toString())},this._rotateCompassArrow=()=>{let I=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=I},this._setButtonTitle=(I,ie)=>{let Te=this._map._getUIString(`NavigationControl.${ie}`);I.title=Te,I.setAttribute("aria-label",Te)},this.options=t.e({},Un,Oe),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",I=>I.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",I=>this._map.zoomIn({},{originalEvent:I})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",I=>this._map.zoomOut({},{originalEvent:I})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",I=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:I}):this._map.resetNorth({},{originalEvent:I})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Oe){return this._map=Oe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ro(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(Oe,I){let ie=n.create("button",Oe,this._container);return ie.type="button",ie.addEventListener("click",I),ie}},e.Popup=class extends t.E{constructor(Oe){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=I=>{this._update(I.point)},this._onMouseMove=I=>{this._update(I.point)},this._onDrag=I=>{this._update(I.point)},this._update=I=>{var ie;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 wt of this.options.className.split(" "))this._container.classList.add(wt);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?Fs(this._lngLat,this._flatPos,this._map.transform):(ie=this._lngLat)===null||ie===void 0?void 0:ie.wrap(),this._trackPointer&&!I)return;let Te=this._flatPos=this._pos=this._trackPointer&&I?I:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&I?I:this._map.transform.locationPoint(this._lngLat));let Me=this.options.anchor,ze=lc(this.options.offset);if(!Me){let wt=this._container.offsetWidth,Ot=this._container.offsetHeight,$t;$t=Te.y+ze.bottom.ythis._map.transform.height-Ot?["bottom"]:[],Te.xthis._map.transform.width-wt/2&&$t.push("right"),Me=$t.length===0?"bottom":$t.join("-")}let ht=Te.add(ze[Me]);this.options.subpixelPositioning||(ht=ht.round()),n.setTransform(this._container,`${cu[Me]} translate(${ht.x}px,${ht.y}px)`),Iu(this._container,Me,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Fo),Oe)}addTo(Oe){return this._map&&this.remove(),this._map=Oe,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Oe){return this._lngLat=t.N.convert(Oe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Oe){return this.setDOMContent(document.createTextNode(Oe))}setHTML(Oe){let I=document.createDocumentFragment(),ie=document.createElement("body"),Te;for(ie.innerHTML=Oe;Te=ie.firstChild,Te;)I.appendChild(Te);return this.setDOMContent(I)}getMaxWidth(){var Oe;return(Oe=this._container)===null||Oe===void 0?void 0:Oe.style.maxWidth}setMaxWidth(Oe){return this.options.maxWidth=Oe,this._update(),this}setDOMContent(Oe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Oe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Oe){return this._container&&this._container.classList.add(Oe),this}removeClassName(Oe){return this._container&&this._container.classList.remove(Oe),this}setOffset(Oe){return this.options.offset=Oe,this._update(),this}toggleClassName(Oe){if(this._container)return this._container.classList.toggle(Oe)}setSubpixelPositioning(Oe){this.options.subpixelPositioning=Oe}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Oe=this._container.querySelector(Dc);Oe&&Oe.focus()}},e.RasterDEMTileSource=Re,e.RasterTileSource=Se,e.ScaleControl=class{constructor(Oe){this._onMove=()=>{yc(this._map,this._container,this.options)},this.setUnit=I=>{this.options.unit=I,yc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Au),Oe)}getDefaultPosition(){return"bottom-left"}onAdd(Oe){return this._map=Oe,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Oe.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=ka,e.Style=Rr,e.TerrainControl=class{constructor(Oe){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Oe}onAdd(Oe){return this._map=Oe,this._container=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=Pc,e.TwoFingersTouchRotateHandler=$c,e.TwoFingersTouchZoomHandler=xu,e.TwoFingersTouchZoomRotateHandler=Pi,e.VectorTileSource=we,e.VideoSource=nt,e.addSourceType=(Oe,I)=>t._(void 0,void 0,void 0,function*(){if(he(Oe))throw new Error(`A source type called "${Oe}" already exists.`);((ie,Te)=>{Ve[ie]=Te})(Oe,I)}),e.clearPrewarmedResources=function(){let Oe=de;Oe&&(Oe.isPreloaded()&&Oe.numActive()===1?(Oe.release($),de=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 Ze().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return ue.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Oe){return V().broadcast("IS",Oe)},e.prewarm=function(){X().acquire($)},e.setMaxParallelImageRequests=function(Oe){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Oe},e.setRTLTextPlugin=function(Oe,I){return Ze().setRTLTextPlugin(Oe,I)},e.setWorkerCount=function(Oe){ue.workerCount=Oe},e.setWorkerUrl=function(Oe){t.a.WORKER_URL=Oe}});var M=v;return M})}}),GV=He({"src/plots/map/layers.js"(Z,q){"use strict";var v=sa(),_=su().sanitizeHTML,S=D6(),M=b0();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;s0){for(var s=0;s0}function o(i){var n={},s={};switch(i.type){case"circle":v.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":v.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var h=i.symbol,f=S(h.textposition,h.iconsize);v.extendFlat(n,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":h.placement}),v.extendFlat(s,{"icon-color":i.color,"text-color":h.textfont.color,"text-opacity":i.opacity});break;case"raster":v.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,h={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",h.tileSize=256):n==="image"&&(f="url",h.coordinates=i.coordinates),h[f]=s,i.sourceattribution&&(h.attribution=_(i.sourceattribution)),h}q.exports=function(n,s,h){var f=new e(n,s);return f.update(h),f}}}),HV=He({"src/plots/map/map.js"(Z,q){"use strict";var v=VV(),_=sa(),S=Ev(),M=so(),e=Wo(),t=Ap(),r=Hc(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,f=Af().selectOnClick,m=b0(),c=GV();function T(p,b){this.id=b,this.gd=p;var d=p._fullLayout,u=p._context;this.container=d._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=d._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(d),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(p,b,d){var u=this,g;u.map?g=new Promise(function(y,D){u.updateMap(p,b,y,D)}):g=new Promise(function(y,D){u.createMap(p,b,y,D)}),d.push(g)},l.createMap=function(p,b,d,u){var g=this,y=b[g.id],D=g.styleObj=w(y.style),P=y.bounds,z=P?[[P.west,P.south],[P.east,P.north]]:null,F=g.map=new v.Map({container:g.div,style:D.style,center:E(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!g.isStatic,preserveDrawingBuffer:g.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0})),N={};F.on("styleimagemissing",function(L){var U=L.id;if(!N[U]&&U.includes("-15")){N[U]=!0;var B=new Image(15,15);B.onload=function(){F.addImage(U,B)},B.crossOrigin="Anonymous",B.src="https://unpkg.com/maki@2.1.0/icons/"+U+".svg"}}),F.setTransformRequest(function(L){return L=L.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),L=L.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),L=L.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:L}}),F._canvas.style.left="0px",F._canvas.style.top="0px",g.rejectOnError(u),g.isStatic||g.initFx(p,b);var O=[];O.push(new Promise(function(L){F.once("load",L)})),O=O.concat(S.fetchTraceGeoData(p)),Promise.all(O).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.updateMap=function(p,b,d,u){var g=this,y=g.map,D=b[this.id];g.rejectOnError(u);var P=[],z=w(D.style);JSON.stringify(g.styleObj)!==JSON.stringify(z)&&(g.styleObj=z,y.setStyle(z.style),g.traceHash={},P.push(new Promise(function(F){y.once("styledata",F)}))),P=P.concat(S.fetchTraceGeoData(p)),Promise.all(P).then(function(){g.fillBelowLookup(p,b),g.updateData(p),g.updateLayout(b),g.resolveOnRender(d)}).catch(u)},l.fillBelowLookup=function(p,b){var d=b[this.id],u=d.layers,g,y,D=this.belowLookup={},P=!1;for(g=0;g1)for(g=0;g-1&&f(z.originalEvent,u,[d.xaxis],[d.yaxis],d.id,P),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(p){var b=this,d=b.map,u=b.gd;if(b.isStatic)return;function g(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var y=p.dragmode,D;D=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[g([F.xmin,F.ymin]),g([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(g)}};var P=b.dragOptions;b.dragOptions=_.extendDeep(P||{},{dragmode:p.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:p[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:D},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),d.off("click",b.onClickInPanHandler),i(y)||a(y)?(d.dragPan.disable(),d.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){n(z,F,N,b.dragOptions,y)},t.init(b.dragOptions)):(d.dragPan.enable(),d.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),d.on("click",b.onClickInPanHandler))},l.updateFramework=function(p){var b=p[this.id].domain,d=p._size,u=this.div.style;u.width=d.w*(b.x[1]-b.x[0])+"px",u.height=d.h*(b.y[1]-b.y[0])+"px",u.left=d.l+b.x[0]*d.w+"px",u.top=d.t+(1-b.y[1])*d.h+"px",this.xaxis._offset=d.l+b.x[0]*d.w,this.xaxis._length=d.w*(b.x[1]-b.x[0]),this.yaxis._offset=d.t+(1-b.y[1])*d.h,this.yaxis._length=d.h*(b.y[1]-b.y[0])},l.updateLayers=function(p){var b=p[this.id],d=b.layers,u=this.layerList,g;if(d.length!==u.length){for(g=0;gd/2){var u=A.split("|").join("
");p.text(u).attr("data-unformatted",u).call(r.convertToTspans,i),b=t.bBox(p.node())}p.attr("transform",v(-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 g=1;b.width+6>d&&(g=d/(b.width+6));var y=[h.l+h.w*c.x[1],h.t+h.h*(1-c.y[0])];E.attr("transform",v(y[0],y[1])+_(g))}},Z.updateFx=function(i){for(var n=i._fullLayout,s=n._subplots[a],h=0;h=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=v(o),h=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,h),o[0].trace._glTrace=i,i}}}),JV=He({"src/traces/choroplethmap/index.js"(Z,q){"use strict";q.exports={attributes:z6(),supplyDefaults:YV(),colorbar:o0(),calc:lT(),plot:KV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(v,_){if(_){var S=_[0].trace;S._glTrace.updateOnSelect(_)}},getBelow:function(v,_){for(var S=_.getMapLayers(),M=S.length-2;M>=0;M--){var e=S[M].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=M+1;t0?+c[f]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var p=M.extractOpts(a),b=p.reversescale?M.flipScale(p.colorscale):p.colorscale,d=b[0][1],u=S.opacity(d)<1?d:S.addOpacity(d,0),g=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f=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 S(t,o.uid),i=a.sourceId,n=v(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),aG=He({"src/traces/densitymap/hover.js"(Z,q){"use strict";var v=Wo(),_=kT().hoverPoints,S=kT().getExtraText;q.exports=function(e,t,r){var o=_(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 h=a.subplot.mockAxis;a.z=s.z,a.zLabel=v.tickText(h,h.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),iG=He({"src/traces/densitymap/event_data.js"(Z,q){"use strict";q.exports=function(_,S){return _.lon=S.lon,_.lat=S.lat,_.z=S.z,_}}}),nG=He({"src/traces/densitymap/index.js"(Z,q){"use strict";q.exports={attributes:O6(),supplyDefaults:QV(),colorbar:o0(),formatLabels:R6(),calc:eG(),plot:rG(),hoverPoints:aG(),eventData:iG(),getBelow:function(v,_){for(var S=_.getMapLayers(),M=0;M0;){l=w[w.length-1];var A=_[l];if(r[l]=0&&a[l].push(o[p])}r[l]=E}else{if(e[l]===M[l]){for(var b=[],d=[],u=0,E=x.length-1;E>=0;--E){var g=x[E];if(t[g]=!1,b.push(g),d.push(a[g]),u+=a[g].length,o[g]=s.length,g===l){x.length=E;break}}s.push(b);for(var y=new Array(u),E=0;Ep&&(p=n.source[x]),n.target[x]>p&&(p=n.target[x]);var b=p+1;a.node._count=b;var d,u=a.node.groups,g={};for(x=0;x0&&e(N,b)&&e(O,b)&&!(g.hasOwnProperty(N)&&g.hasOwnProperty(O)&&g[N]===g[O])){g.hasOwnProperty(O)&&(O=g[O]),g.hasOwnProperty(N)&&(N=g[N]),N=+N,O=+O,c[N]=c[O]=!0;var L="";n.label&&n.label[x]&&(L=n.label[x]);var U=null;L&&T.hasOwnProperty(L)&&(U=T[L]),s.push({pointNumber:x,label:L,color:h?n.color[x]:n.color,hovercolor:f?n.hovercolor[x]:n.hovercolor,customdata:m?n.customdata[x]:n.customdata,concentrationscale:U,source:N,target:O,value:+F}),z.source.push(N),z.target.push(O)}}var B=b+u.length,W=M(i.color),$=M(i.customdata),ue=[];for(x=0;xb-1,childrenNodes:[],pointNumber:x,label:ce,color:W?i.color[x]:i.color,customdata:$?i.customdata[x]:i.customdata})}var de=!1;return o(B,z.source,z.target)&&(de=!0),{circular:de,links:s,nodes:ue,groups:u,groupLookup:g}}function o(a,i,n){for(var s=_.init2dArray(a,0),h=0;h1})}q.exports=function(i,n){var s=r(n);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),uG=He({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z):(v=v||self,_(v.d3=v.d3||{}))})(Z,function(v){"use strict";function _(b){var d=+this._x.call(null,b),u=+this._y.call(null,b);return S(this.cover(d,u),d,u,b)}function S(b,d,u,g){if(isNaN(d)||isNaN(u))return b;var y,D=b._root,P={data:g},z=b._x0,F=b._y0,N=b._x1,O=b._y1,L,U,B,W,$,ue,ce,de;if(!D)return b._root=P,b;for(;D.length;)if(($=d>=(L=(z+N)/2))?z=L:N=L,(ue=u>=(U=(F+O)/2))?F=U:O=U,y=D,!(D=D[ce=ue<<1|$]))return y[ce]=P,b;if(B=+b._x.call(null,D.data),W=+b._y.call(null,D.data),d===B&&u===W)return P.next=D,y?y[ce]=P:b._root=P,b;do y=y?y[ce]=new Array(4):b._root=new Array(4),($=d>=(L=(z+N)/2))?z=L:N=L,(ue=u>=(U=(F+O)/2))?F=U:O=U;while((ce=ue<<1|$)===(de=(W>=U)<<1|B>=L));return y[de]=D,y[ce]=P,b}function M(b){var d,u,g=b.length,y,D,P=new Array(g),z=new Array(g),F=1/0,N=1/0,O=-1/0,L=-1/0;for(u=0;uO&&(O=y),DL&&(L=D));if(F>O||N>L)return this;for(this.cover(F,N).cover(O,L),u=0;ub||b>=y||g>d||d>=D;)switch(N=(dO||(z=W.y0)>L||(F=W.x1)=ce)<<1|b>=ue)&&(W=U[U.length-1],U[U.length-1]=U[U.length-1-$],U[U.length-1-$]=W)}else{var de=b-+this._x.call(null,B.data),Y=d-+this._y.call(null,B.data),X=de*de+Y*Y;if(X=(U=(P+F)/2))?P=U:F=U,($=L>=(B=(z+N)/2))?z=B:N=B,d=u,!(u=u[ue=$<<1|W]))return this;if(!u.length)break;(d[ue+1&3]||d[ue+2&3]||d[ue+3&3])&&(g=d,ce=ue)}for(;u.data!==b;)if(y=u,!(u=u.next))return this;return(D=u.next)&&delete u.next,y?(D?y.next=D:delete y.next,this):d?(D?d[ue]=D:delete d[ue],(u=d[0]||d[1]||d[2]||d[3])&&u===(d[3]||d[2]||d[1]||d[0])&&!u.length&&(g?g[ce]=u:this._root=u),this):(this._root=D,this)}function n(b){for(var d=0,u=b.length;d=c.length)return l!=null&&p.sort(l),x!=null?x(p):p;for(var g=-1,y=p.length,D=c[b++],P,z,F=M(),N,O=d();++gc.length)return p;var d,u=T[b-1];return x!=null&&b>=c.length?d=p.entries():(d=[],p.each(function(g,y){d.push({key:y,values:E(g,b)})})),u!=null?d.sort(function(g,y){return u(g.key,y.key)}):d}return w={object:function(p){return A(p,0,t,r)},map:function(p){return A(p,0,o,a)},entries:function(p){return E(A(p,0,o,a),0)},key:function(p){return c.push(p),w},sortKeys:function(p){return T[c.length-1]=p,w},sortValues:function(p){return l=p,w},rollup:function(p){return x=p,w}}}function t(){return{}}function r(c,T,l){c[T]=l}function o(){return M()}function a(c,T,l){c.set(T,l)}function i(){}var n=M.prototype;i.prototype=s.prototype={constructor:i,has:n.has,add:function(c){return c+="",this[_+c]=c,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each};function s(c,T){var l=new i;if(c instanceof i)c.each(function(A){l.add(A)});else if(c){var x=-1,w=c.length;if(T==null)for(;++x=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=S.prototype={constructor:M,on:function(o,a){var i=this._,n=e(o+"",i),s,h=-1,f=n.length;if(arguments.length<2){for(;++h0)for(var i=new Array(s),n=0,s,h;n=0&&b._call.call(null,d),b=b._next;--_}function l(){a=(o=n.now())+i,_=S=0;try{T()}finally{_=0,w(),a=0}}function x(){var b=n.now(),d=b-o;d>e&&(i-=d,o=b)}function w(){for(var b,d=t,u,g=1/0;d;)d._call?(g>d._time&&(g=d._time),b=d,d=d._next):(u=d._next,d._next=null,d=b?b._next=u:t=u);r=b,A(g)}function A(b){if(!_){S&&(S=clearTimeout(S));var d=b-a;d>24?(b<1/0&&(S=setTimeout(l,b-n.now()-i)),M&&(M=clearInterval(M))):(M||(o=n.now(),M=setInterval(x,e)),_=1,s(l))}}function E(b,d,u){var g=new m;return d=d==null?0:+d,g.restart(function(y){g.stop(),b(y+d)},d,u),g}function p(b,d,u){var g=new m,y=d;return d==null?(g.restart(b,d,u),g):(d=+d,u=u==null?h():+u,g.restart(function D(P){P+=y,g.restart(D,y+=d,u),b(P)},d,u),g)}v.interval=p,v.now=h,v.timeout=E,v.timer=c,v.timerFlush=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),hG=He({"node_modules/d3-force/dist/d3-force.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,uG(),LT(),cG(),fG()):_(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(Z,function(v,_,S,M,e){"use strict";function t(b,d){var u;b==null&&(b=0),d==null&&(d=0);function g(){var y,D=u.length,P,z=0,F=0;for(y=0;yL.index){var ee=U-le.x-le.vx,te=B-le.y-le.vy,pe=ee*ee+te*te;peU+j||QB+j||VF.r&&(F.r=F[N].r)}function z(){if(d){var F,N=d.length,O;for(u=new Array(N),F=0;F1?($==null?z.remove(W):z.set(W,B($)),d):z.get(W)},find:function(W,$,ue){var ce=0,de=b.length,Y,X,Q,V,le;for(ue==null?ue=1/0:ue*=ue,ce=0;ce1?(N.on(W,$),d):N.on(W)}}}function w(){var b,d,u,g=r(-30),y,D=1,P=1/0,z=.81;function F(U){var B,W=b.length,$=_.quadtree(b,m,c).visitAfter(O);for(u=U,B=0;B=P)return;(U.data!==d||U.next)&&(ue===0&&(ue=o(),Y+=ue*ue),ce===0&&(ce=o(),Y+=ce*ce),YM)if(!(Math.abs(l*m-c*T)>M)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=i-h,A=n-f,E=m*m+c*c,p=w*w+A*A,b=Math.sqrt(E),d=Math.sqrt(x),u=s*Math.tan((_-Math.acos((E+x-p)/(2*b*d)))/2),g=u/d,y=u/b;Math.abs(g-1)>M&&(this._+="L"+(o+g*T)+","+(a+g*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*A)+","+(this._x1=o+y*m)+","+(this._y1=a+y*c)}},arc:function(o,a,i,n,s,h){o=+o,a=+a,i=+i,h=!!h;var f=i*Math.cos(n),m=i*Math.sin(n),c=o+f,T=a+m,l=1^h,x=h?n-s:s-n;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+c+","+T:(Math.abs(this._x1-c)>M||Math.abs(this._y1-T)>M)&&(this._+="L"+c+","+T),i&&(x<0&&(x=x%S+S),x>e?this._+="A"+i+","+i+",0,1,"+l+","+(o-f)+","+(a-m)+"A"+i+","+i+",0,1,"+l+","+(this._x1=c)+","+(this._y1=T):x>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._}},v.path=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),U6=He({"node_modules/d3-shape/dist/d3-shape.js"(Z,q){(function(v,_){typeof Z=="object"&&typeof q<"u"?_(Z,pG()):(v=v||self,_(v.d3=v.d3||{},v.d3))})(Z,function(v,_){"use strict";function S(gt){return function(){return gt}}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,h=s/2,f=2*s;function m(gt){return gt>1?0:gt<-1?s:Math.acos(gt)}function c(gt){return gt>=1?h:gt<=-1?-h:Math.asin(gt)}function T(gt){return gt.innerRadius}function l(gt){return gt.outerRadius}function x(gt){return gt.startAngle}function w(gt){return gt.endAngle}function A(gt){return gt&>.padAngle}function E(gt,Kt,mr,Ir,va,Pa,ga,la){var ba=mr-gt,Ai=Ir-Kt,ki=ga-va,Ki=la-Pa,En=Ki*ba-ki*Ai;if(!(En*Enss*ss+_s*_s&&(os=jo,ys=Yn),{cx:os,cy:ys,x01:-ki,y01:-Ki,x11:os*(va/wo-1),y11:ys*(va/wo-1)}}function b(){var gt=T,Kt=l,mr=S(0),Ir=null,va=x,Pa=w,ga=A,la=null;function ba(){var Ai,ki,Ki=+gt.apply(this,arguments),En=+Kt.apply(this,arguments),Tn=va.apply(this,arguments)-h,On=Pa.apply(this,arguments)-h,kn=M(On-Tn),ao=On>Tn;if(la||(la=Ai=_.path()),Enn))la.moveTo(0,0);else if(kn>f-n)la.moveTo(En*t(Tn),En*a(Tn)),la.arc(0,0,En,Tn,On,!ao),Ki>n&&(la.moveTo(Ki*t(On),Ki*a(On)),la.arc(0,0,Ki,On,Tn,ao));else{var Co=Tn,bo=On,zs=Tn,Cn=On,wo=kn,Zn=kn,go=ga.apply(this,arguments)/2,os=go>n&&(Ir?+Ir.apply(this,arguments):i(Ki*Ki+En*En)),ys=o(M(En-Ki)/2,+mr.apply(this,arguments)),jo=ys,Yn=ys,Gn,Hn;if(os>n){var ss=c(os/Ki*a(go)),_s=c(os/En*a(go));(wo-=ss*2)>n?(ss*=ao?1:-1,zs+=ss,Cn-=ss):(wo=0,zs=Cn=(Tn+On)/2),(Zn-=_s*2)>n?(_s*=ao?1:-1,Co+=_s,bo-=_s):(Zn=0,Co=bo=(Tn+On)/2)}var ps=En*t(Co),Ko=En*a(Co),Gi=Ki*t(Cn),Pn=Ki*a(Cn);if(ys>n){var qs=En*t(bo),bs=En*a(bo),lo=Ki*t(zs),Zo=Ki*a(zs),ws;if(knn?Yn>n?(Gn=p(lo,Zo,ps,Ko,En,Yn,ao),Hn=p(qs,bs,Gi,Pn,En,Yn,ao),la.moveTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),Ynn)||!(wo>n)?la.lineTo(Gi,Pn):jo>n?(Gn=p(Gi,Pn,qs,bs,Ki,-jo,ao),Hn=p(ps,Ko,lo,Zo,Ki,-jo,ao),la.lineTo(Gn.cx+Gn.x01,Gn.cy+Gn.y01),jo=En;--Tn)la.point(bo[Tn],zs[Tn]);la.lineEnd(),la.areaEnd()}ao&&(bo[Ki]=+gt(kn,Ki,ki),zs[Ki]=+mr(kn,Ki,ki),la.point(Kt?+Kt(kn,Ki,ki):bo[Ki],Ir?+Ir(kn,Ki,ki):zs[Ki]))}if(Co)return la=null,Co+""||null}function Ai(){return D().defined(va).curve(ga).context(Pa)}return ba.x=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),Kt=null,ba):gt},ba.x0=function(ki){return arguments.length?(gt=typeof ki=="function"?ki:S(+ki),ba):gt},ba.x1=function(ki){return arguments.length?(Kt=ki==null?null:typeof ki=="function"?ki:S(+ki),ba):Kt},ba.y=function(ki){return arguments.length?(mr=typeof ki=="function"?ki:S(+ki),Ir=null,ba):mr},ba.y0=function(ki){return arguments.length?(mr=typeof ki=="function"?ki:S(+ki),ba):mr},ba.y1=function(ki){return arguments.length?(Ir=ki==null?null:typeof ki=="function"?ki:S(+ki),ba):Ir},ba.lineX0=ba.lineY0=function(){return Ai().x(gt).y(mr)},ba.lineY1=function(){return Ai().x(gt).y(Ir)},ba.lineX1=function(){return Ai().x(Kt).y(mr)},ba.defined=function(ki){return arguments.length?(va=typeof ki=="function"?ki:S(!!ki),ba):va},ba.curve=function(ki){return arguments.length?(ga=ki,Pa!=null&&(la=ga(Pa)),ba):ga},ba.context=function(ki){return arguments.length?(ki==null?Pa=la=null:la=ga(Pa=ki),ba):Pa},ba}function z(gt,Kt){return Ktgt?1:Kt>=gt?0:NaN}function F(gt){return gt}function N(){var gt=F,Kt=z,mr=null,Ir=S(0),va=S(f),Pa=S(0);function ga(la){var ba,Ai=la.length,ki,Ki,En=0,Tn=new Array(Ai),On=new Array(Ai),kn=+Ir.apply(this,arguments),ao=Math.min(f,Math.max(-f,va.apply(this,arguments)-kn)),Co,bo=Math.min(Math.abs(ao)/Ai,Pa.apply(this,arguments)),zs=bo*(ao<0?-1:1),Cn;for(ba=0;ba0&&(En+=Cn);for(Kt!=null?Tn.sort(function(wo,Zn){return Kt(On[wo],On[Zn])}):mr!=null&&Tn.sort(function(wo,Zn){return mr(la[wo],la[Zn])}),ba=0,Ki=En?(ao-Ai*zs)/En:0;ba0?Cn*Ki:0)+zs,On[ki]={data:la[ki],index:ba,value:Cn,startAngle:kn,endAngle:Co,padAngle:bo};return On}return ga.value=function(la){return arguments.length?(gt=typeof la=="function"?la:S(+la),ga):gt},ga.sortValues=function(la){return arguments.length?(Kt=la,mr=null,ga):Kt},ga.sort=function(la){return arguments.length?(mr=la,Kt=null,ga):mr},ga.startAngle=function(la){return arguments.length?(Ir=typeof la=="function"?la:S(+la),ga):Ir},ga.endAngle=function(la){return arguments.length?(va=typeof la=="function"?la:S(+la),ga):va},ga.padAngle=function(la){return arguments.length?(Pa=typeof la=="function"?la:S(+la),ga):Pa},ga}var O=U(u);function L(gt){this._curve=gt}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(gt,Kt){this._curve.point(Kt*Math.sin(gt),Kt*-Math.cos(gt))}};function U(gt){function Kt(mr){return new L(gt(mr))}return Kt._curve=gt,Kt}function B(gt){var Kt=gt.curve;return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt.curve=function(mr){return arguments.length?Kt(U(mr)):Kt()._curve},gt}function W(){return B(D().curve(O))}function $(){var gt=P().curve(O),Kt=gt.curve,mr=gt.lineX0,Ir=gt.lineX1,va=gt.lineY0,Pa=gt.lineY1;return gt.angle=gt.x,delete gt.x,gt.startAngle=gt.x0,delete gt.x0,gt.endAngle=gt.x1,delete gt.x1,gt.radius=gt.y,delete gt.y,gt.innerRadius=gt.y0,delete gt.y0,gt.outerRadius=gt.y1,delete gt.y1,gt.lineStartAngle=function(){return B(mr())},delete gt.lineX0,gt.lineEndAngle=function(){return B(Ir())},delete gt.lineX1,gt.lineInnerRadius=function(){return B(va())},delete gt.lineY0,gt.lineOuterRadius=function(){return B(Pa())},delete gt.lineY1,gt.curve=function(ga){return arguments.length?Kt(U(ga)):Kt()._curve},gt}function ue(gt,Kt){return[(Kt=+Kt)*Math.cos(gt-=Math.PI/2),Kt*Math.sin(gt)]}var ce=Array.prototype.slice;function de(gt){return gt.source}function Y(gt){return gt.target}function X(gt){var Kt=de,mr=Y,Ir=g,va=y,Pa=null;function ga(){var la,ba=ce.call(arguments),Ai=Kt.apply(this,ba),ki=mr.apply(this,ba);if(Pa||(Pa=la=_.path()),gt(Pa,+Ir.apply(this,(ba[0]=Ai,ba)),+va.apply(this,ba),+Ir.apply(this,(ba[0]=ki,ba)),+va.apply(this,ba)),la)return Pa=null,la+""||null}return ga.source=function(la){return arguments.length?(Kt=la,ga):Kt},ga.target=function(la){return arguments.length?(mr=la,ga):mr},ga.x=function(la){return arguments.length?(Ir=typeof la=="function"?la:S(+la),ga):Ir},ga.y=function(la){return arguments.length?(va=typeof la=="function"?la:S(+la),ga):va},ga.context=function(la){return arguments.length?(Pa=la??null,ga):Pa},ga}function Q(gt,Kt,mr,Ir,va){gt.moveTo(Kt,mr),gt.bezierCurveTo(Kt=(Kt+Ir)/2,mr,Kt,va,Ir,va)}function V(gt,Kt,mr,Ir,va){gt.moveTo(Kt,mr),gt.bezierCurveTo(Kt,mr=(mr+va)/2,Ir,mr,Ir,va)}function le(gt,Kt,mr,Ir,va){var Pa=ue(Kt,mr),ga=ue(Kt,mr=(mr+va)/2),la=ue(Ir,mr),ba=ue(Ir,va);gt.moveTo(Pa[0],Pa[1]),gt.bezierCurveTo(ga[0],ga[1],la[0],la[1],ba[0],ba[1])}function ae(){return X(Q)}function j(){return X(V)}function ee(){var gt=X(le);return gt.angle=gt.x,delete gt.x,gt.radius=gt.y,delete gt.y,gt}var te={draw:function(gt,Kt){var mr=Math.sqrt(Kt/s);gt.moveTo(mr,0),gt.arc(0,0,mr,0,f)}},pe={draw:function(gt,Kt){var mr=Math.sqrt(Kt/5)/2;gt.moveTo(-3*mr,-mr),gt.lineTo(-mr,-mr),gt.lineTo(-mr,-3*mr),gt.lineTo(mr,-3*mr),gt.lineTo(mr,-mr),gt.lineTo(3*mr,-mr),gt.lineTo(3*mr,mr),gt.lineTo(mr,mr),gt.lineTo(mr,3*mr),gt.lineTo(-mr,3*mr),gt.lineTo(-mr,mr),gt.lineTo(-3*mr,mr),gt.closePath()}},we=Math.sqrt(1/3),Se=we*2,Re={draw:function(gt,Kt){var mr=Math.sqrt(Kt/Se),Ir=mr*we;gt.moveTo(0,-mr),gt.lineTo(Ir,0),gt.lineTo(0,mr),gt.lineTo(-Ir,0),gt.closePath()}},Pe=.8908130915292852,je=Math.sin(s/10)/Math.sin(7*s/10),at=Math.sin(f/10)*je,nt=-Math.cos(f/10)*je,tt={draw:function(gt,Kt){var mr=Math.sqrt(Kt*Pe),Ir=at*mr,va=nt*mr;gt.moveTo(0,-mr),gt.lineTo(Ir,va);for(var Pa=1;Pa<5;++Pa){var ga=f*Pa/5,la=Math.cos(ga),ba=Math.sin(ga);gt.lineTo(ba*mr,-la*mr),gt.lineTo(la*Ir-ba*va,ba*Ir+la*va)}gt.closePath()}},Ve={draw:function(gt,Kt){var mr=Math.sqrt(Kt),Ir=-mr/2;gt.rect(Ir,Ir,mr,mr)}},he=Math.sqrt(3),se={draw:function(gt,Kt){var mr=-Math.sqrt(Kt/(he*3));gt.moveTo(0,mr*2),gt.lineTo(-he*mr,-mr),gt.lineTo(he*mr,-mr),gt.closePath()}},ne=-.5,Ce=Math.sqrt(3)/2,Ze=1/Math.sqrt(12),rt=(Ze/2+1)*3,Je={draw:function(gt,Kt){var mr=Math.sqrt(Kt/rt),Ir=mr/2,va=mr*Ze,Pa=Ir,ga=mr*Ze+mr,la=-Pa,ba=ga;gt.moveTo(Ir,va),gt.lineTo(Pa,ga),gt.lineTo(la,ba),gt.lineTo(ne*Ir-Ce*va,Ce*Ir+ne*va),gt.lineTo(ne*Pa-Ce*ga,Ce*Pa+ne*ga),gt.lineTo(ne*la-Ce*ba,Ce*la+ne*ba),gt.lineTo(ne*Ir+Ce*va,ne*va-Ce*Ir),gt.lineTo(ne*Pa+Ce*ga,ne*ga-Ce*Pa),gt.lineTo(ne*la+Ce*ba,ne*ba-Ce*la),gt.closePath()}},St=[te,pe,Re,Ve,tt,se,Je];function kt(){var gt=S(te),Kt=S(64),mr=null;function Ir(){var va;if(mr||(mr=va=_.path()),gt.apply(this,arguments).draw(mr,+Kt.apply(this,arguments)),va)return mr=null,va+""||null}return Ir.type=function(va){return arguments.length?(gt=typeof va=="function"?va:S(va),Ir):gt},Ir.size=function(va){return arguments.length?(Kt=typeof va=="function"?va:S(+va),Ir):Kt},Ir.context=function(va){return arguments.length?(mr=va??null,Ir):mr},Ir}function Bt(){}function Vt(gt,Kt,mr){gt._context.bezierCurveTo((2*gt._x0+gt._x1)/3,(2*gt._y0+gt._y1)/3,(gt._x0+2*gt._x1)/3,(gt._y0+2*gt._y1)/3,(gt._x0+4*gt._x1+Kt)/6,(gt._y0+4*gt._y1+mr)/6)}function Ar(gt){this._context=gt}Ar.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:Vt(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(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);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:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function vr(gt){return new Ar(gt)}function qr(gt){this._context=gt}qr.prototype={areaStart:Bt,areaEnd:Bt,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(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._x2=gt,this._y2=Kt;break;case 1:this._point=2,this._x3=gt,this._y3=Kt;break;case 2:this._point=3,this._x4=gt,this._y4=Kt,this._context.moveTo((this._x0+4*this._x1+gt)/6,(this._y0+4*this._y1+Kt)/6);break;default:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function kr(gt){return new qr(gt)}function Ur(gt){this._context=gt}Ur.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(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var mr=(this._x0+4*this._x1+gt)/6,Ir=(this._y0+4*this._y1+Kt)/6;this._line?this._context.lineTo(mr,Ir):this._context.moveTo(mr,Ir);break;case 3:this._point=4;default:Vt(this,gt,Kt);break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt}};function _t(gt){return new Ur(gt)}function Fe(gt,Kt){this._basis=new Ar(gt),this._beta=Kt}Fe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var gt=this._x,Kt=this._y,mr=gt.length-1;if(mr>0)for(var Ir=gt[0],va=Kt[0],Pa=gt[mr]-Ir,ga=Kt[mr]-va,la=-1,ba;++la<=mr;)ba=la/mr,this._basis.point(this._beta*gt[la]+(1-this._beta)*(Ir+ba*Pa),this._beta*Kt[la]+(1-this._beta)*(va+ba*ga));this._x=this._y=null,this._basis.lineEnd()},point:function(gt,Kt){this._x.push(+gt),this._y.push(+Kt)}};var Ye=function gt(Kt){function mr(Ir){return Kt===1?new Ar(Ir):new Fe(Ir,Kt)}return mr.beta=function(Ir){return gt(+Ir)},mr}(.85);function Ae(gt,Kt,mr){gt._context.bezierCurveTo(gt._x1+gt._k*(gt._x2-gt._x0),gt._y1+gt._k*(gt._y2-gt._y0),gt._x2+gt._k*(gt._x1-Kt),gt._y2+gt._k*(gt._y1-mr),gt._x2,gt._y2)}function Le(gt,Kt){this._context=gt,this._k=(1-Kt)/6}Le.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:Ae(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2,this._x1=gt,this._y1=Kt;break;case 2:this._point=3;default:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var We=function gt(Kt){function mr(Ir){return new Le(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function Ke(gt,Kt){this._context=gt,this._k=(1-Kt)/6}Ke.prototype={areaStart:Bt,areaEnd:Bt,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(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._x3=gt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Kt);break;case 2:this._point=3,this._x5=gt,this._y5=Kt;break;default:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var st=function gt(Kt){function mr(Ir){return new Ke(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function ot(gt,Kt){this._context=gt,this._k=(1-Kt)/6}ot.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(gt,Kt){switch(gt=+gt,Kt=+Kt,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:Ae(this,gt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Ut=function gt(Kt){function mr(Ir){return new ot(Ir,Kt)}return mr.tension=function(Ir){return gt(+Ir)},mr}(0);function Ct(gt,Kt,mr){var Ir=gt._x1,va=gt._y1,Pa=gt._x2,ga=gt._y2;if(gt._l01_a>n){var la=2*gt._l01_2a+3*gt._l01_a*gt._l12_a+gt._l12_2a,ba=3*gt._l01_a*(gt._l01_a+gt._l12_a);Ir=(Ir*la-gt._x0*gt._l12_2a+gt._x2*gt._l01_2a)/ba,va=(va*la-gt._y0*gt._l12_2a+gt._y2*gt._l01_2a)/ba}if(gt._l23_a>n){var Ai=2*gt._l23_2a+3*gt._l23_a*gt._l12_a+gt._l12_2a,ki=3*gt._l23_a*(gt._l23_a+gt._l12_a);Pa=(Pa*Ai+gt._x1*gt._l23_2a-Kt*gt._l12_2a)/ki,ga=(ga*Ai+gt._y1*gt._l23_2a-mr*gt._l12_2a)/ki}gt._context.bezierCurveTo(Ir,va,Pa,ga,gt._x2,gt._y2)}function Pt(gt,Kt){this._context=gt,this._alpha=Kt}Pt.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(gt,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;break;case 2:this._point=3;default:Ct(this,gt,Kt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var jt=function gt(Kt){function mr(Ir){return Kt?new Pt(Ir,Kt):new Le(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function cr(gt,Kt){this._context=gt,this._alpha=Kt}cr.prototype={areaStart:Bt,areaEnd:Bt,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(gt,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=gt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=gt,this._y4=Kt);break;case 2:this._point=3,this._x5=gt,this._y5=Kt;break;default:Ct(this,gt,Kt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var or=function gt(Kt){function mr(Ir){return Kt?new cr(Ir,Kt):new Ke(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function nr(gt,Kt){this._context=gt,this._alpha=Kt}nr.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(gt,Kt){if(gt=+gt,Kt=+Kt,this._point){var mr=this._x2-gt,Ir=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(mr*mr+Ir*Ir,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:Ct(this,gt,Kt);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=gt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Pr=function gt(Kt){function mr(Ir){return Kt?new nr(Ir,Kt):new ot(Ir,0)}return mr.alpha=function(Ir){return gt(+Ir)},mr}(.5);function _a(gt){this._context=gt}_a.prototype={areaStart:Bt,areaEnd:Bt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(gt,Kt){gt=+gt,Kt=+Kt,this._point?this._context.lineTo(gt,Kt):(this._point=1,this._context.moveTo(gt,Kt))}};function Fa(gt){return new _a(gt)}function Ra(gt){return gt<0?-1:1}function qa(gt,Kt,mr){var Ir=gt._x1-gt._x0,va=Kt-gt._x1,Pa=(gt._y1-gt._y0)/(Ir||va<0&&-0),ga=(mr-gt._y1)/(va||Ir<0&&-0),la=(Pa*va+ga*Ir)/(Ir+va);return(Ra(Pa)+Ra(ga))*Math.min(Math.abs(Pa),Math.abs(ga),.5*Math.abs(la))||0}function Wa(gt,Kt){var mr=gt._x1-gt._x0;return mr?(3*(gt._y1-gt._y0)/mr-Kt)/2:Kt}function Ca(gt,Kt,mr){var Ir=gt._x0,va=gt._y0,Pa=gt._x1,ga=gt._y1,la=(Pa-Ir)/3;gt._context.bezierCurveTo(Ir+la,va+la*Kt,Pa-la,ga-la*mr,Pa,ga)}function hi(gt){this._context=gt}hi.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:Ca(this,this._t0,Wa(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(gt,Kt){var mr=NaN;if(gt=+gt,Kt=+Kt,!(gt===this._x1&&Kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;break;case 2:this._point=3,Ca(this,Wa(this,mr=qa(this,gt,Kt)),mr);break;default:Ca(this,this._t0,mr=qa(this,gt,Kt));break}this._x0=this._x1,this._x1=gt,this._y0=this._y1,this._y1=Kt,this._t0=mr}}};function wi(gt){this._context=new Yt(gt)}(wi.prototype=Object.create(hi.prototype)).point=function(gt,Kt){hi.prototype.point.call(this,Kt,gt)};function Yt(gt){this._context=gt}Yt.prototype={moveTo:function(gt,Kt){this._context.moveTo(Kt,gt)},closePath:function(){this._context.closePath()},lineTo:function(gt,Kt){this._context.lineTo(Kt,gt)},bezierCurveTo:function(gt,Kt,mr,Ir,va,Pa){this._context.bezierCurveTo(Kt,gt,Ir,mr,Pa,va)}};function Rt(gt){return new hi(gt)}function Zt(gt){return new wi(gt)}function Jt(gt){this._context=gt}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var gt=this._x,Kt=this._y,mr=gt.length;if(mr)if(this._line?this._context.lineTo(gt[0],Kt[0]):this._context.moveTo(gt[0],Kt[0]),mr===2)this._context.lineTo(gt[1],Kt[1]);else for(var Ir=Fr(gt),va=Fr(Kt),Pa=0,ga=1;ga=0;--Kt)va[Kt]=(ga[Kt]-va[Kt+1])/Pa[Kt];for(Pa[mr-1]=(gt[mr]+va[mr-1])/2,Kt=0;Kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(gt,Kt){switch(gt=+gt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(gt,Kt):this._context.moveTo(gt,Kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Kt),this._context.lineTo(gt,Kt);else{var mr=this._x*(1-this._t)+gt*this._t;this._context.lineTo(mr,this._y),this._context.lineTo(mr,Kt)}break}}this._x=gt,this._y=Kt}};function ca(gt){return new ra(gt,.5)}function Ba(gt){return new ra(gt,0)}function $a(gt){return new ra(gt,1)}function Za(gt,Kt){if((ga=gt.length)>1)for(var mr=1,Ir,va,Pa=gt[Kt[0]],ga,la=Pa.length;mr=0;)mr[Kt]=Kt;return mr}function pi(gt,Kt){return gt[Kt]}function Ia(){var gt=S([]),Kt=ri,mr=Za,Ir=pi;function va(Pa){var ga=gt.apply(this,arguments),la,ba=Pa.length,Ai=ga.length,ki=new Array(Ai),Ki;for(la=0;la0){for(var mr,Ir,va=0,Pa=gt[0].length,ga;va0)for(var mr,Ir=0,va,Pa,ga,la,ba,Ai=gt[Kt[0]].length;Ir0?(va[0]=ga,va[1]=ga+=Pa):Pa<0?(va[1]=la,va[0]=la+=Pa):(va[0]=0,va[1]=Pa)}function cn(gt,Kt){if((va=gt.length)>0){for(var mr=0,Ir=gt[Kt[0]],va,Pa=Ir.length;mr0)||!((Pa=(va=gt[Kt[0]]).length)>0))){for(var mr=0,Ir=1,va,Pa,ga;IrPa&&(Pa=va,mr=Kt);return mr}function Cr(gt){var Kt=gt.map(wr);return ri(gt).sort(function(mr,Ir){return Kt[mr]-Kt[Ir]})}function wr(gt){for(var Kt=0,mr=-1,Ir=gt.length,va;++mr0;--le)ee(V*=.99),te(),j(V),te();function ae(){var pe=_.max(Q,function(Re){return Re.length}),we=B*(D-g)/(pe-1);z>we&&(z=we);var Se=_.min(Q,function(Re){return(D-g-(Re.length-1)*z)/_.sum(Re,f)});Q.forEach(function(Re){Re.forEach(function(Pe,je){Pe.y1=(Pe.y0=je)+Pe.value*Se})}),X.links.forEach(function(Re){Re.width=Re.value*Se})}function j(pe){Q.forEach(function(we){we.forEach(function(Se){if(Se.targetLinks.length){var Re=(_.sum(Se.targetLinks,c)/_.sum(Se.targetLinks,f)-m(Se))*pe;Se.y0+=Re,Se.y1+=Re}})})}function ee(pe){Q.slice().reverse().forEach(function(we){we.forEach(function(Se){if(Se.sourceLinks.length){var Re=(_.sum(Se.sourceLinks,T)/_.sum(Se.sourceLinks,f)-m(Se))*pe;Se.y0+=Re,Se.y1+=Re}})})}function te(){Q.forEach(function(pe){var we,Se,Re=g,Pe=pe.length,je;for(pe.sort(h),je=0;je0&&(we.y0+=Se,we.y1+=Se),Re=we.y1+z;if(Se=Re-z-D,Se>0)for(Re=we.y0-=Se,we.y1-=Se,je=Pe-2;je>=0;--je)we=pe[je],Se=we.y1+z-Re,Se>0&&(we.y0-=Se,we.y1-=Se),Re=we.y0})}}function Y(X){X.nodes.forEach(function(Q){Q.sourceLinks.sort(s),Q.targetLinks.sort(n)}),X.nodes.forEach(function(Q){var V=Q.y0,le=V;Q.sourceLinks.forEach(function(ae){ae.y0=V+ae.width/2,V+=ae.width}),Q.targetLinks.forEach(function(ae){ae.y1=le+ae.width/2,le+=ae.width})})}return W};function p(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var d=function(){return M.linkHorizontal().source(p).target(b)};v.sankey=E,v.sankeyCenter=a,v.sankeyLeft=t,v.sankeyRight=r,v.sankeyJustify=o,v.sankeyLinkHorizontal=d,Object.defineProperty(v,"__esModule",{value:!0})})}}),vG=He({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,q){var v=N6();q.exports=function(S,M){var e=[],t=[],r=[],o={},a=[],i;function n(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(E){delete o[A][E],r[E]&&n(E)})}function s(A){var E=!1;t.push(A),r[A]=!0;var p,b;for(p=0;p=A})}function m(A){f(A);for(var E=S,p=v(E),b=p.components.filter(function(z){return z.length>1}),d=1/0,u,g=0;g"u"?"undefined":s(Le))!=="object"&&(Le=Ye.source=p(Fe,Le)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=Ye.target=p(Fe,We)),Le.sourceLinks.push(Ye),We.targetLinks.push(Ye)}),_t}function Vt(_t){_t.nodes.forEach(function(Fe){Fe.partOfCycle=!1,Fe.value=Math.max(_.sum(Fe.sourceLinks,c),_.sum(Fe.targetLinks,c)),Fe.sourceLinks.forEach(function(Ye){Ye.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=Ye.circularLinkType)}),Fe.targetLinks.forEach(function(Ye){Ye.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=Ye.circularLinkType)})})}function Ar(_t){var Fe=0,Ye=0,Ae=0,Le=0,We=_.max(_t.nodes,function(Ke){return Ke.column});return _t.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?Fe=Fe+Ke.width:Ye=Ye+Ke.width,Ke.target.column==0&&(Le=Le+Ke.width),Ke.source.column==We&&(Ae=Ae+Ke.width))}),Fe=Fe>0?Fe+d+u:Fe,Ye=Ye>0?Ye+d+u:Ye,Ae=Ae>0?Ae+d+u:Ae,Le=Le>0?Le+d+u:Le,{top:Fe,bottom:Ye,left:Le,right:Ae}}function vr(_t,Fe){var Ye=_.max(_t.nodes,function(Ut){return Ut.column}),Ae=at-Pe,Le=nt-je,We=Ae+Fe.right+Fe.left,Ke=Le+Fe.top+Fe.bottom,st=Ae/We,ot=Le/Ke;return Pe=Pe*st+Fe.left,at=Fe.right==0?at:at*st,je=je*ot+Fe.top,nt=nt*ot,_t.nodes.forEach(function(Ut){Ut.x0=Pe+Ut.column*((at-Pe-tt)/Ye),Ut.x1=Ut.x0+tt}),ot}function qr(_t){var Fe,Ye,Ae;for(Fe=_t.nodes,Ye=[],Ae=0;Fe.length;++Ae,Fe=Ye,Ye=[])Fe.forEach(function(Le){Le.depth=Ae,Le.sourceLinks.forEach(function(We){Ye.indexOf(We.target)<0&&!We.circular&&Ye.push(We.target)})});for(Fe=_t.nodes,Ye=[],Ae=0;Fe.length;++Ae,Fe=Ye,Ye=[])Fe.forEach(function(Le){Le.height=Ae,Le.targetLinks.forEach(function(We){Ye.indexOf(We.source)<0&&!We.circular&&Ye.push(We.source)})});_t.nodes.forEach(function(Le){Le.column=Math.floor(se.call(null,Le,Ae))})}function kr(_t,Fe,Ye){var Ae=S.nest().key(function(Ut){return Ut.column}).sortKeys(_.ascending).entries(_t.nodes).map(function(Ut){return Ut.values});Ke(Ye),ot();for(var Le=1,We=Fe;We>0;--We)st(Le*=.99,Ye),ot();function Ke(Ut){if(Je){var Ct=1/0;Ae.forEach(function(or){var nr=nt*Je/(or.length+1);Ct=nr0))if(or==0&&cr==1)Pr=nr.y1-nr.y0,nr.y0=nt/2-Pr/2,nr.y1=nt/2+Pr/2;else if(or==Pt-1&&cr==1)Pr=nr.y1-nr.y0,nr.y0=nt/2-Pr/2,nr.y1=nt/2+Pr/2;else{var _a=0,Fa=_.mean(nr.sourceLinks,x),Ra=_.mean(nr.targetLinks,l);Fa&&Ra?_a=(Fa+Ra)/2:_a=Fa||Ra;var qa=(_a-T(nr))*Ut;nr.y0+=qa,nr.y1+=qa}})})}function ot(){Ae.forEach(function(Ut){var Ct,Pt,jt=je,cr=Ut.length,or;for(Ut.sort(m),or=0;or0&&(Ct.y0+=Pt,Ct.y1+=Pt),jt=Ct.y1+Ve;if(Pt=jt-Ve-nt,Pt>0)for(jt=Ct.y0-=Pt,Ct.y1-=Pt,or=cr-2;or>=0;--or)Ct=Ut[or],Pt=Ct.y1+Ve-jt,Pt>0&&(Ct.y0-=Pt,Ct.y1-=Pt),jt=Ct.y0})}}function Ur(_t){_t.nodes.forEach(function(Fe){Fe.sourceLinks.sort(f),Fe.targetLinks.sort(h)}),_t.nodes.forEach(function(Fe){var Ye=Fe.y0,Ae=Ye,Le=Fe.y1,We=Le;Fe.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Le-Ke.width/2,Le=Le-Ke.width):(Ke.y0=Ye+Ke.width/2,Ye+=Ke.width)}),Fe.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=Ae+Ke.width/2,Ae+=Ke.width)})})}return kt}function D(Pe,je,at){var nt=0;if(at===null){for(var tt=[],Ve=0;Veje.source.column)}function N(Pe,je){var at=0;Pe.sourceLinks.forEach(function(tt){at=tt.circular&&!Se(tt,je)?at+1:at});var nt=0;return Pe.targetLinks.forEach(function(tt){nt=tt.circular&&!Se(tt,je)?nt+1:nt}),at+nt}function O(Pe){var je=Pe.source.sourceLinks,at=0;je.forEach(function(Ve){at=Ve.circular?at+1:at});var nt=Pe.target.targetLinks,tt=0;return nt.forEach(function(Ve){tt=Ve.circular?tt+1:tt}),!(at>1||tt>1)}function L(Pe,je,at){return Pe.sort(W),Pe.forEach(function(nt,tt){var Ve=0;if(Se(nt,at)&&O(nt))nt.circularPathData.verticalBuffer=Ve+nt.width/2;else{var he=0;for(he;heVe?se:Ve}nt.circularPathData.verticalBuffer=Ve+nt.width/2}}),Pe}function U(Pe,je,at,nt){var tt=5,Ve=_.min(Pe.links,function(ne){return ne.source.y0});Pe.links.forEach(function(ne){ne.circular&&(ne.circularPathData={})});var he=Pe.links.filter(function(ne){return ne.circularLinkType=="top"});L(he,je,nt);var se=Pe.links.filter(function(ne){return ne.circularLinkType=="bottom"});L(se,je,nt),Pe.links.forEach(function(ne){if(ne.circular){if(ne.circularPathData.arcRadius=ne.width+u,ne.circularPathData.leftNodeBuffer=tt,ne.circularPathData.rightNodeBuffer=tt,ne.circularPathData.sourceWidth=ne.source.x1-ne.source.x0,ne.circularPathData.sourceX=ne.source.x0+ne.circularPathData.sourceWidth,ne.circularPathData.targetX=ne.target.x0,ne.circularPathData.sourceY=ne.y0,ne.circularPathData.targetY=ne.y1,Se(ne,nt)&&O(ne))ne.circularPathData.leftSmallArcRadius=u+ne.width/2,ne.circularPathData.leftLargeArcRadius=u+ne.width/2,ne.circularPathData.rightSmallArcRadius=u+ne.width/2,ne.circularPathData.rightLargeArcRadius=u+ne.width/2,ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=ne.source.y1+d+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=ne.source.y0-d-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius);else{var Ce=ne.source.column,Ze=ne.circularLinkType,rt=Pe.links.filter(function(kt){return kt.source.column==Ce&&kt.circularLinkType==Ze});ne.circularLinkType=="bottom"?rt.sort(ue):rt.sort($);var Je=0;rt.forEach(function(kt,Bt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.leftSmallArcRadius=u+ne.width/2+Je,ne.circularPathData.leftLargeArcRadius=u+ne.width/2+Bt*je+Je),Je=Je+kt.width}),Ce=ne.target.column,rt=Pe.links.filter(function(kt){return kt.target.column==Ce&&kt.circularLinkType==Ze}),ne.circularLinkType=="bottom"?rt.sort(de):rt.sort(ce),Je=0,rt.forEach(function(kt,Bt){kt.circularLinkID==ne.circularLinkID&&(ne.circularPathData.rightSmallArcRadius=u+ne.width/2+Je,ne.circularPathData.rightLargeArcRadius=u+ne.width/2+Bt*je+Je),Je=Je+kt.width}),ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=Math.max(at,ne.source.y1,ne.target.y1)+d+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=Ve-d-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius)}ne.circularPathData.leftInnerExtent=ne.circularPathData.sourceX+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightInnerExtent=ne.circularPathData.targetX-ne.circularPathData.rightNodeBuffer,ne.circularPathData.leftFullExtent=ne.circularPathData.sourceX+ne.circularPathData.leftLargeArcRadius+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightFullExtent=ne.circularPathData.targetX-ne.circularPathData.rightLargeArcRadius-ne.circularPathData.rightNodeBuffer}if(ne.circular)ne.path=B(ne);else{var St=M.linkHorizontal().source(function(kt){var Bt=kt.source.x0+(kt.source.x1-kt.source.x0),Vt=kt.y0;return[Bt,Vt]}).target(function(kt){var Bt=kt.target.x0,Vt=kt.y1;return[Bt,Vt]});ne.path=St(ne)}})}function B(Pe){var je="";return Pe.circularLinkType=="top"?je="M"+Pe.circularPathData.sourceX+" "+Pe.circularPathData.sourceY+" L"+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.sourceY+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Pe.circularPathData.leftFullExtent+" "+(Pe.circularPathData.sourceY-Pe.circularPathData.leftSmallArcRadius)+" L"+Pe.circularPathData.leftFullExtent+" "+Pe.circularPathData.verticalLeftInnerExtent+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" L"+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Pe.circularPathData.rightFullExtent+" "+Pe.circularPathData.verticalRightInnerExtent+" L"+Pe.circularPathData.rightFullExtent+" "+(Pe.circularPathData.targetY-Pe.circularPathData.rightSmallArcRadius)+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.targetY+" L"+Pe.circularPathData.targetX+" "+Pe.circularPathData.targetY:je="M"+Pe.circularPathData.sourceX+" "+Pe.circularPathData.sourceY+" L"+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.sourceY+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Pe.circularPathData.leftFullExtent+" "+(Pe.circularPathData.sourceY+Pe.circularPathData.leftSmallArcRadius)+" L"+Pe.circularPathData.leftFullExtent+" "+Pe.circularPathData.verticalLeftInnerExtent+" A"+Pe.circularPathData.leftLargeArcRadius+" "+Pe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Pe.circularPathData.leftInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" L"+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.verticalFullExtent+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Pe.circularPathData.rightFullExtent+" "+Pe.circularPathData.verticalRightInnerExtent+" L"+Pe.circularPathData.rightFullExtent+" "+(Pe.circularPathData.targetY+Pe.circularPathData.rightSmallArcRadius)+" A"+Pe.circularPathData.rightLargeArcRadius+" "+Pe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Pe.circularPathData.rightInnerExtent+" "+Pe.circularPathData.targetY+" L"+Pe.circularPathData.targetX+" "+Pe.circularPathData.targetY,je}function W(Pe,je){return Y(Pe)==Y(je)?Pe.circularLinkType=="bottom"?ue(Pe,je):$(Pe,je):Y(je)-Y(Pe)}function $(Pe,je){return Pe.y0-je.y0}function ue(Pe,je){return je.y0-Pe.y0}function ce(Pe,je){return Pe.y1-je.y1}function de(Pe,je){return je.y1-Pe.y1}function Y(Pe){return Pe.target.column-Pe.source.column}function X(Pe){return Pe.target.x0-Pe.source.x1}function Q(Pe,je){var at=z(Pe),nt=X(je)/Math.tan(at),tt=we(Pe)=="up"?Pe.y1+nt:Pe.y1-nt;return tt}function V(Pe,je){var at=z(Pe),nt=X(je)/Math.tan(at),tt=we(Pe)=="up"?Pe.y1-nt:Pe.y1+nt;return tt}function le(Pe,je,at,nt){Pe.links.forEach(function(tt){if(!tt.circular&&tt.target.column-tt.source.column>1){var Ve=tt.source.column+1,he=tt.target.column-1,se=1,ne=he-Ve+1;for(se=1;Ve<=he;Ve++,se++)Pe.nodes.forEach(function(Ce){if(Ce.column==Ve){var Ze=se/(ne+1),rt=Math.pow(1-Ze,3),Je=3*Ze*Math.pow(1-Ze,2),St=3*Math.pow(Ze,2)*(1-Ze),kt=Math.pow(Ze,3),Bt=rt*tt.y0+Je*tt.y0+St*tt.y1+kt*tt.y1,Vt=Bt-tt.width/2,Ar=Bt+tt.width/2,vr;Vt>Ce.y0&&VtCe.y0&&ArCe.y1&&j(qr,vr,je,at)})):VtCe.y1&&(vr=Ar-Ce.y0+10,Ce=j(Ce,vr,je,at),Pe.nodes.forEach(function(qr){b(qr,nt)==b(Ce,nt)||qr.column!=Ce.column||qr.y0Ce.y1&&j(qr,vr,je,at)}))}})}})}function ae(Pe,je){return Pe.y0>je.y0&&Pe.y0je.y0&&Pe.y1je.y1}function j(Pe,je,at,nt){return Pe.y0+je>=at&&Pe.y1+je<=nt&&(Pe.y0=Pe.y0+je,Pe.y1=Pe.y1+je,Pe.targetLinks.forEach(function(tt){tt.y1=tt.y1+je}),Pe.sourceLinks.forEach(function(tt){tt.y0=tt.y0+je})),Pe}function ee(Pe,je,at,nt){Pe.nodes.forEach(function(tt){nt&&tt.y+(tt.y1-tt.y0)>je&&(tt.y=tt.y-(tt.y+(tt.y1-tt.y0)-je));var Ve=Pe.links.filter(function(ne){return b(ne.source,at)==b(tt,at)}),he=Ve.length;he>1&&Ve.sort(function(ne,Ce){if(!ne.circular&&!Ce.circular){if(ne.target.column==Ce.target.column)return ne.y1-Ce.y1;if(pe(ne,Ce)){if(ne.target.column>Ce.target.column){var Ze=V(Ce,ne);return ne.y1-Ze}if(Ce.target.column>ne.target.column){var rt=V(ne,Ce);return rt-Ce.y1}}else return ne.y1-Ce.y1}if(ne.circular&&!Ce.circular)return ne.circularLinkType=="top"?-1:1;if(Ce.circular&&!ne.circular)return Ce.circularLinkType=="top"?1:-1;if(ne.circular&&Ce.circular)return ne.circularLinkType===Ce.circularLinkType&&ne.circularLinkType=="top"?ne.target.column===Ce.target.column?ne.target.y1-Ce.target.y1:Ce.target.column-ne.target.column:ne.circularLinkType===Ce.circularLinkType&&ne.circularLinkType=="bottom"?ne.target.column===Ce.target.column?Ce.target.y1-ne.target.y1:ne.target.column-Ce.target.column:ne.circularLinkType=="top"?-1:1});var se=tt.y0;Ve.forEach(function(ne){ne.y0=se+ne.width/2,se=se+ne.width}),Ve.forEach(function(ne,Ce){if(ne.circularLinkType=="bottom"){var Ze=Ce+1,rt=0;for(Ze;Ze1&&tt.sort(function(se,ne){if(!se.circular&&!ne.circular){if(se.source.column==ne.source.column)return se.y0-ne.y0;if(pe(se,ne)){if(ne.source.column0?"up":"down"}function Se(Pe,je){return b(Pe.source,je)==b(Pe.target,je)}function Re(Pe,je,at){var nt=Pe.nodes,tt=Pe.links,Ve=!1,he=!1;if(tt.forEach(function(Je){Je.circularLinkType=="top"?Ve=!0:Je.circularLinkType=="bottom"&&(he=!0)}),Ve==!1||he==!1){var se=_.min(nt,function(Je){return Je.y0}),ne=_.max(nt,function(Je){return Je.y1}),Ce=ne-se,Ze=at-je,rt=Ze/Ce;nt.forEach(function(Je){var St=(Je.y1-Je.y0)*rt;Je.y0=(Je.y0-se)*rt,Je.y1=Je.y0+St}),tt.forEach(function(Je){Je.y0=(Je.y0-se)*rt,Je.y1=(Je.y1-se)*rt,Je.width=Je.width*rt})}}v.sankeyCircular=y,v.sankeyCenter=i,v.sankeyLeft=r,v.sankeyRight=o,v.sankeyJustify=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),j6=He({"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"}}}}),gG=He({"src/traces/sankey/render.js"(Z,q){"use strict";var v=hG(),_=(pg(),zf(d0)).interpolateNumber,S=Vn(),M=dG(),e=mG(),t=j6(),r=Ch(),o=$n(),a=as(),i=sa(),n=i.strTranslate,s=i.strRotate,h=Cv(),f=h.keyFun,m=h.repeat,c=h.unwrap,T=su(),l=so(),x=uh(),w=x.CAP_SHIFT,A=x.LINE_SPACING,E=3;function p(Q,V,le){var ae=c(V),j=ae.trace,ee=j.domain,te=j.orientation==="h",pe=j.node.pad,we=j.node.thickness,Se={justify:M.sankeyJustify,left:M.sankeyLeft,right:M.sankeyRight,center:M.sankeyCenter}[j.node.align],Re=Q.width*(ee.x[1]-ee.x[0]),Pe=Q.height*(ee.y[1]-ee.y[0]),je=ae._nodes,at=ae._links,nt=ae.circular,tt;nt?tt=e.sankeyCircular().circularLinkGap(0):tt=M.sankey(),tt.iterations(t.sankeyIterations).size(te?[Re,Pe]:[Pe,Re]).nodeWidth(we).nodePadding(pe).nodeId(function(qr){return qr.pointNumber}).nodeAlign(Se).nodes(je).links(at);var Ve=tt();tt.nodePadding()=Fe||(_t=Fe-Ur.y0,_t>1e-6&&(Ur.y0+=_t,Ur.y1+=_t)),Fe=Ur.y1+pe})}function Bt(qr){var kr=qr.map(function(We,Ke){return{x0:We.x0,index:Ke}}).sort(function(We,Ke){return We.x0-Ke.x0}),Ur=[],_t=-1,Fe,Ye=-1/0,Ae;for(he=0;heYe+we&&(_t+=1,Fe=Le.x0),Ye=Le.x0,Ur[_t]||(Ur[_t]=[]),Ur[_t].push(Le),Ae=Fe-Le.x0,Le.x0+=Ae,Le.x1+=Ae}return Ur}if(j.node.x.length&&j.node.y.length){for(he=0;he0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(le="M "+(j.targetX-V)+" "+(j.targetY-ae)+" L "+(j.rightInnerExtent-V)+" "+(j.targetY-ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightSmallArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent-ae-V)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ae-V)+" "+j.verticalRightInnerExtent,ee&&te?le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-ae-V)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent+ae-V-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:ee?le+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent-V-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.leftFullExtent+ae+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent:le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightInnerExtent-V)+" "+(j.verticalFullExtent+ae)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ae)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+j.verticalLeftInnerExtent,le+=" L "+(j.leftFullExtent+ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ae)+" "+(j.leftSmallArcRadius+ae)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY-ae)+" L "+j.sourceX+" "+(j.sourceY+ae)+" L "+j.leftInnerExtent+" "+(j.sourceY+ae)+" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ae)+" "+j.verticalLeftInnerExtent,ee&&te?le+=" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.leftFullExtent-ae-(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" L "+(j.rightFullExtent+ae-V+(j.rightLargeArcRadius-ae))+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent:ee?le+=" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.leftFullExtent+ae)+" "+(j.verticalFullExtent+ae)+" L "+(j.rightFullExtent-V-ae)+" "+(j.verticalFullExtent+ae)+" A "+(j.rightLargeArcRadius+ae)+" "+(j.rightLargeArcRadius+ae)+" 0 0 0 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent:le+=" A "+(j.leftLargeArcRadius-ae)+" "+(j.leftLargeArcRadius-ae)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ae)+" L "+(j.rightInnerExtent-V)+" "+(j.verticalFullExtent-ae)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightLargeArcRadius-ae)+" 0 0 1 "+(j.rightFullExtent+ae-V)+" "+j.verticalRightInnerExtent,le+=" L "+(j.rightFullExtent+ae-V)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ae)+" "+(j.rightSmallArcRadius-ae)+" 0 0 1 "+(j.rightInnerExtent-V)+" "+(j.targetY+ae)+" L "+(j.targetX-V)+" "+(j.targetY+ae)+(V>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),le}function u(){var Q=.5;function V(le){var ae=le.linkArrowLength;if(le.link.circular)return d(le.link,ae);var j=Math.abs((le.link.target.x0-le.link.source.x1)/2);ae>j&&(ae=j);var ee=le.link.source.x1,te=le.link.target.x0-ae,pe=_(ee,te),we=pe(Q),Se=pe(1-Q),Re=le.link.y0-le.link.width/2,Pe=le.link.y0+le.link.width/2,je=le.link.y1-le.link.width/2,at=le.link.y1+le.link.width/2,nt="M"+ee+","+Re,tt="C"+we+","+Re+" "+Se+","+je+" "+te+","+je,Ve="C"+Se+","+at+" "+we+","+Pe+" "+ee+","+Pe,he=ae>0?"L"+(te+ae)+","+(je+le.link.width/2):"";return he+="L"+te+","+at,nt+tt+he+Ve+"Z"}return V}function g(Q,V){var le=r(V.color),ae=t.nodePadAcross,j=Q.nodePad/2;V.dx=V.x1-V.x0,V.dy=V.y1-V.y0;var ee=V.dx,te=Math.max(.5,V.dy),pe="node_"+V.pointNumber;return V.group&&(pe=i.randstr()),V.trace=Q.trace,V.curveNumber=Q.trace.index,{index:V.pointNumber,key:pe,partOfGroup:V.partOfGroup||!1,group:V.group,traceId:Q.key,trace:Q.trace,node:V,nodePad:Q.nodePad,nodeLineColor:Q.nodeLineColor,nodeLineWidth:Q.nodeLineWidth,textFont:Q.textFont,size:Q.horizontal?Q.height:Q.width,visibleWidth:Math.ceil(ee),visibleHeight:te,zoneX:-ae,zoneY:-j,zoneWidth:ee+2*ae,zoneHeight:te+2*j,labelY:Q.horizontal?V.dy/2+1:V.dx/2+1,left:V.originalLayer===1,sizeAcross:Q.width,forceLayouts:Q.forceLayouts,horizontal:Q.horizontal,darkBackground:le.getBrightness()<=128,tinyColorHue:o.tinyRGB(le),tinyColorAlpha:le.getAlpha(),valueFormat:Q.valueFormat,valueSuffix:Q.valueSuffix,sankey:Q.sankey,graph:Q.graph,arrangement:Q.arrangement,uniqueNodeLabelPathId:[Q.guid,Q.key,pe].join("_"),interactionState:Q.interactionState,figure:Q}}function y(Q){Q.attr("transform",function(V){return n(V.node.x0.toFixed(3),V.node.y0.toFixed(3))})}function D(Q){Q.call(y)}function P(Q,V){Q.call(D),V.attr("d",u())}function z(Q){Q.attr("width",function(V){return V.node.x1-V.node.x0}).attr("height",function(V){return V.visibleHeight})}function F(Q){return Q.link.width>1||Q.linkLineWidth>0}function N(Q){var V=n(Q.translateX,Q.translateY);return V+(Q.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(Q,V,le){Q.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.hover(this,ae,V),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(le.unhover(this,ae,V),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(le.unhover(this,ae,V),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&le.select(this,ae,V)})}function L(Q,V,le,ae){var j=S.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(ae._fullLayout._infolayer,"g","dragcover",function(pe){ae._fullLayout._dragCover=pe}),i.raiseToTop(this),ee.interactionState.dragInProgress=ee.node,ce(ee.node),ee.interactionState.hovered&&(le.nodeEvents.unhover.apply(0,ee.interactionState.hovered),ee.interactionState.hovered=!1),ee.arrangement==="snap")){var te=ee.traceId+"|"+ee.key;ee.forceLayouts[te]?ee.forceLayouts[te].alpha(1):U(Q,te,ee,ae),B(Q,V,ee,te,ae)}}).on("drag",function(ee){if(ee.arrangement!=="fixed"){var te=S.event.x,pe=S.event.y;ee.arrangement==="snap"?(ee.node.x0=te-ee.visibleWidth/2,ee.node.x1=te+ee.visibleWidth/2,ee.node.y0=pe-ee.visibleHeight/2,ee.node.y1=pe+ee.visibleHeight/2):(ee.arrangement==="freeform"&&(ee.node.x0=te-ee.visibleWidth/2,ee.node.x1=te+ee.visibleWidth/2),pe=Math.max(0,Math.min(ee.size-ee.visibleHeight/2,pe)),ee.node.y0=pe-ee.visibleHeight/2,ee.node.y1=pe+ee.visibleHeight/2),ce(ee.node),ee.arrangement!=="snap"&&(ee.sankey.update(ee.graph),P(Q.filter(de(ee)),V))}}).on("dragend",function(ee){if(ee.arrangement!=="fixed"){ee.interactionState.dragInProgress=!1;for(var te=0;te0)window.requestAnimationFrame(ee);else{var we=le.node.originalX;le.node.x0=we-le.visibleWidth/2,le.node.x1=we+le.visibleWidth/2,$(le,j)}})}function W(Q,V,le,ae){return function(){for(var ee=0,te=0;te0&&ae.forceLayouts[V].alpha(0)}}function $(Q,V){for(var le=[],ae=[],j=0;j"),color:x(Y,"bgcolor")||t.addOpacity(ae.color,1),borderColor:x(Y,"bordercolor"),fontFamily:x(Y,"font.family"),fontSize:x(Y,"font.size"),fontColor:x(Y,"font.color"),fontWeight:x(Y,"font.weight"),fontStyle:x(Y,"font.style"),fontVariant:x(Y,"font.variant"),fontTextcase:x(Y,"font.textcase"),fontLineposition:x(Y,"font.lineposition"),fontShadow:x(Y,"font.shadow"),nameLength:x(Y,"namelength"),textAlign:x(Y,"align"),idealAlign:v.event.x"),color:x(Y,"bgcolor")||de.tinyColorHue,borderColor:x(Y,"bordercolor"),fontFamily:x(Y,"font.family"),fontSize:x(Y,"font.size"),fontColor:x(Y,"font.color"),fontWeight:x(Y,"font.weight"),fontStyle:x(Y,"font.style"),fontVariant:x(Y,"font.variant"),fontTextcase:x(Y,"font.textcase"),fontLineposition:x(Y,"font.lineposition"),fontShadow:x(Y,"font.shadow"),nameLength:x(Y,"namelength"),textAlign:x(Y,"align"),idealAlign:"left",hovertemplate:Y.hovertemplate,hovertemplateLabels:ee,eventData:[de.node]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:A});n(we,.85),s(we)}}},ue=function(ce,de,Y){A._fullLayout.hovermode!==!1&&(v.select(ce).call(c,de,Y),de.node.trace.node.hoverinfo!=="skip"&&(de.node.fullData=de.node.trace,A.emit("plotly_unhover",{event:v.event,points:[de.node]})),e.loneUnhover(p._hoverlayer.node()))};M(A,b,E,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:D,follow:L,unhover:U,select:y},nodeEvents:{hover:W,follow:$,unhover:ue,select:B}})}}}),yG=He({"src/traces/sankey/base_plot.js"(Z){"use strict";var q=pc().overrideAll,v=Wh().getModuleCalcData,_=q6(),S=Ym(),M=Kd(),e=Ap(),t=Af().prepSelect,r=sa(),o=so(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=q({hoverlabel:S.hoverlabel},"plot","nested"),Z.plot=function(n){var s=v(n.calcdata,a)[0];_(n,s),Z.updateFx(n)},Z.clean=function(n,s,h,f){var m=f._has&&f._has(a),c=s._has&&s._has(a);m&&!c&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(n){for(var s=0;s0}q.exports=function(F,N,O,L){var U=F._fullLayout,B;w(O)&&L&&(B=L()),M.makeTraceGroups(U._indicatorlayer,N,"trace").each(function(W){var $=W[0],ue=$.trace,ce=v.select(this),de=ue._hasGauge,Y=ue._isAngular,X=ue._isBullet,Q=ue.domain,V={w:U._size.w*(Q.x[1]-Q.x[0]),h:U._size.h*(Q.y[1]-Q.y[0]),l:U._size.l+U._size.w*Q.x[0],r:U._size.r+U._size.w*(1-Q.x[1]),t:U._size.t+U._size.h*(1-Q.y[1]),b:U._size.b+U._size.h*Q.y[0]},le=V.l+V.w/2,ae=V.t+V.h/2,j=Math.min(V.w/2,V.h),ee=i.innerRadius*j,te,pe,we,Se=ue.align||"center";if(pe=ae,!de)te=V.l+l[Se]*V.w,we=function(ne){return g(ne,V.w,V.h)};else if(Y&&(te=le,pe=ae+j/2,we=function(ne){return y(ne,.9*ee)}),X){var Re=i.bulletPadding,Pe=1-i.bulletNumberDomainSize+Re;te=V.l+(Pe+(1-Pe)*l[Se])*V.w,we=function(ne){return g(ne,(i.bulletNumberDomainSize-Re)*V.w,V.h)}}p(F,ce,W,{numbersX:te,numbersY:pe,numbersScaler:we,transitionOpts:O,onComplete:B});var je,at;de&&(je={range:ue.gauge.axis.range,color:ue.gauge.bgcolor,line:{color:ue.gauge.bordercolor,width:0},thickness:1},at={range:ue.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ue.gauge.bordercolor,width:ue.gauge.borderwidth},thickness:1});var nt=ce.selectAll("g.angular").data(Y?W:[]);nt.exit().remove();var tt=ce.selectAll("g.angularaxis").data(Y?W:[]);tt.exit().remove(),Y&&E(F,ce,W,{radius:j,innerRadius:ee,gauge:nt,layer:tt,size:V,gaugeBg:je,gaugeOutline:at,transitionOpts:O,onComplete:B});var Ve=ce.selectAll("g.bullet").data(X?W:[]);Ve.exit().remove();var he=ce.selectAll("g.bulletaxis").data(X?W:[]);he.exit().remove(),X&&A(F,ce,W,{gauge:Ve,layer:he,size:V,gaugeBg:je,gaugeOutline:at,transitionOpts:O,onComplete:B});var se=ce.selectAll("text.title").data(W);se.exit().remove(),se.enter().append("text").classed("title",!0),se.attr("text-anchor",function(){return X?T.right:T[ue.title.align]}).text(ue.title.text).call(a.font,ue.title.font).call(n.convertToTspans,F),se.attr("transform",function(){var ne=V.l+V.w*l[ue.title.align],Ce,Ze=i.titlePadding,rt=a.bBox(se.node());if(de){if(Y)if(ue.gauge.axis.visible){var Je=a.bBox(tt.node());Ce=Je.top-Ze-rt.bottom}else Ce=V.t+V.h/2-j/2-rt.bottom-Ze;X&&(Ce=pe-(rt.top+rt.bottom)/2,ne=V.l-i.bulletPadding*V.w)}else Ce=ue._numbersTop-Ze-rt.bottom;return t(ne,Ce)})})};function A(z,F,N,O){var L=N[0].trace,U=O.gauge,B=O.layer,W=O.gaugeBg,$=O.gaugeOutline,ue=O.size,ce=L.domain,de=O.transitionOpts,Y=O.onComplete,X,Q,V,le,ae;U.enter().append("g").classed("bullet",!0),U.attr("transform",t(ue.l,ue.t)),B.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),B.selectAll("g.xbulletaxistick,path,text").remove();var j=ue.h,ee=L.gauge.bar.thickness*j,te=ce.x[0],pe=ce.x[0]+(ce.x[1]-ce.x[0])*(L._hasNumber||L._hasDelta?1-i.bulletNumberDomainSize:1);X=u(z,L.gauge.axis),X._id="xbulletaxis",X.domain=[te,pe],X.setScale(),Q=s.calcTicks(X),V=s.makeTransTickFn(X),le=s.getTickSigns(X)[2],ae=ue.t+ue.h,X.visible&&(s.drawTicks(z,X,{vals:X.ticks==="inside"?s.clipEnds(X,Q):Q,layer:B,path:s.makeTickPath(X,ae,le),transFn:V}),s.drawLabels(z,X,{vals:Q,layer:B,transFn:V,labelFns:s.makeLabelFns(X,ae)}));function we(tt){tt.attr("width",function(Ve){return Math.max(0,X.c2p(Ve.range[1])-X.c2p(Ve.range[0]))}).attr("x",function(Ve){return X.c2p(Ve.range[0])}).attr("y",function(Ve){return .5*(1-Ve.thickness)*j}).attr("height",function(Ve){return Ve.thickness*j})}var Se=[W].concat(L.gauge.steps),Re=U.selectAll("g.bg-bullet").data(Se);Re.enter().append("g").classed("bg-bullet",!0).append("rect"),Re.select("rect").call(we).call(b),Re.exit().remove();var Pe=U.selectAll("g.value-bullet").data([L.gauge.bar]);Pe.enter().append("g").classed("value-bullet",!0).append("rect"),Pe.select("rect").attr("height",ee).attr("y",(j-ee)/2).call(b),w(de)?Pe.select("rect").transition().duration(de.duration).ease(de.easing).each("end",function(){Y&&Y()}).each("interrupt",function(){Y&&Y()}).attr("width",Math.max(0,X.c2p(Math.min(L.gauge.axis.range[1],N[0].y)))):Pe.select("rect").attr("width",typeof N[0].y=="number"?Math.max(0,X.c2p(Math.min(L.gauge.axis.range[1],N[0].y))):0),Pe.exit().remove();var je=N.filter(function(){return L.gauge.threshold.value||L.gauge.threshold.value===0}),at=U.selectAll("g.threshold-bullet").data(je);at.enter().append("g").classed("threshold-bullet",!0).append("line"),at.select("line").attr("x1",X.c2p(L.gauge.threshold.value)).attr("x2",X.c2p(L.gauge.threshold.value)).attr("y1",(1-L.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-L.gauge.threshold.thickness)/2)*j).call(c.stroke,L.gauge.threshold.line.color).style("stroke-width",L.gauge.threshold.line.width),at.exit().remove();var nt=U.selectAll("g.gauge-outline").data([$]);nt.enter().append("g").classed("gauge-outline",!0).append("rect"),nt.select("rect").call(we).call(b),nt.exit().remove()}function E(z,F,N,O){var L=N[0].trace,U=O.size,B=O.radius,W=O.innerRadius,$=O.gaugeBg,ue=O.gaugeOutline,ce=[U.l+U.w/2,U.t+U.h/2+B/2],de=O.gauge,Y=O.layer,X=O.transitionOpts,Q=O.onComplete,V=Math.PI/2;function le(St){var kt=L.gauge.axis.range[0],Bt=L.gauge.axis.range[1],Vt=(St-kt)/(Bt-kt)*Math.PI-V;return Vt<-V?-V:Vt>V?V:Vt}function ae(St){return v.svg.arc().innerRadius((W+B)/2-St/2*(B-W)).outerRadius((W+B)/2+St/2*(B-W)).startAngle(-V)}function j(St){St.attr("d",function(kt){return ae(kt.thickness).startAngle(le(kt.range[0])).endAngle(le(kt.range[1]))()})}var ee,te,pe,we;de.enter().append("g").classed("angular",!0),de.attr("transform",t(ce[0],ce[1])),Y.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),Y.selectAll("g.xangularaxistick,path,text").remove(),ee=u(z,L.gauge.axis),ee.type="linear",ee.range=L.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var Se=function(St){return(ee.range[0]-St.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Re={},Pe=s.makeLabelFns(ee,0),je=Pe.labelStandoff;Re.xFn=function(St){var kt=Se(St);return Math.cos(kt)*je},Re.yFn=function(St){var kt=Se(St),Bt=Math.sin(kt)>0?.2:1;return-Math.sin(kt)*(je+St.fontSize*Bt)+Math.abs(Math.cos(kt))*(St.fontSize*o)},Re.anchorFn=function(St){var kt=Se(St),Bt=Math.cos(kt);return Math.abs(Bt)<.1?"middle":Bt>0?"start":"end"},Re.heightFn=function(St,kt,Bt){var Vt=Se(St);return-.5*(1+Math.sin(Vt))*Bt};var at=function(St){return t(ce[0]+B*Math.cos(St),ce[1]-B*Math.sin(St))};pe=function(St){return at(Se(St))};var nt=function(St){var kt=Se(St);return at(kt)+"rotate("+-r(kt)+")"};if(te=s.calcTicks(ee),we=s.getTickSigns(ee)[2],ee.visible){we=ee.ticks==="inside"?-1:1;var tt=(ee.linewidth||1)/2;s.drawTicks(z,ee,{vals:te,layer:Y,path:"M"+we*tt+",0h"+we*ee.ticklen,transFn:nt}),s.drawLabels(z,ee,{vals:te,layer:Y,transFn:pe,labelFns:Re})}var Ve=[$].concat(L.gauge.steps),he=de.selectAll("g.bg-arc").data(Ve);he.enter().append("g").classed("bg-arc",!0).append("path"),he.select("path").call(j).call(b),he.exit().remove();var se=ae(L.gauge.bar.thickness),ne=de.selectAll("g.value-arc").data([L.gauge.bar]);ne.enter().append("g").classed("value-arc",!0).append("path");var Ce=ne.select("path");w(X)?(Ce.transition().duration(X.duration).ease(X.easing).each("end",function(){Q&&Q()}).each("interrupt",function(){Q&&Q()}).attrTween("d",d(se,le(N[0].lastY),le(N[0].y))),L._lastValue=N[0].y):Ce.attr("d",typeof N[0].y=="number"?se.endAngle(le(N[0].y)):"M0,0Z"),Ce.call(b),ne.exit().remove(),Ve=[];var Ze=L.gauge.threshold.value;(Ze||Ze===0)&&Ve.push({range:[Ze,Ze],color:L.gauge.threshold.color,line:{color:L.gauge.threshold.line.color,width:L.gauge.threshold.line.width},thickness:L.gauge.threshold.thickness});var rt=de.selectAll("g.threshold-arc").data(Ve);rt.enter().append("g").classed("threshold-arc",!0).append("path"),rt.select("path").call(j).call(b),rt.exit().remove();var Je=de.selectAll("g.gauge-outline").data([ue]);Je.enter().append("g").classed("gauge-outline",!0).append("path"),Je.select("path").call(j).call(b),Je.exit().remove()}function p(z,F,N,O){var L=N[0].trace,U=O.numbersX,B=O.numbersY,W=L.align||"center",$=T[W],ue=O.transitionOpts,ce=O.onComplete,de=M.ensureSingle(F,"g","numbers"),Y,X,Q,V=[];L._hasNumber&&V.push("number"),L._hasDelta&&(V.push("delta"),L.delta.position==="left"&&V.reverse());var le=de.selectAll("text").data(V);le.enter().append("text"),le.attr("text-anchor",function(){return $}).attr("class",function(at){return at}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),le.exit().remove();function ae(at,nt,tt,Ve){if(at.match("s")&&tt>=0!=Ve>=0&&!nt(tt).slice(-1).match(x)&&!nt(Ve).slice(-1).match(x)){var he=at.slice().replace("s","f").replace(/\d+/,function(ne){return parseInt(ne)-1}),se=u(z,{tickformat:he});return function(ne){return Math.abs(ne)<1?s.tickText(se,ne).text:nt(ne)}}else return nt}function j(){var at=u(z,{tickformat:L.number.valueformat},L._range);at.setScale(),s.prepTicks(at);var nt=function(ne){return s.tickText(at,ne).text},tt=L.number.suffix,Ve=L.number.prefix,he=de.select("text.number");function se(){var ne=typeof N[0].y=="number"?Ve+nt(N[0].y)+tt:"-";he.text(ne).call(a.font,L.number.font).call(n.convertToTspans,z)}return w(ue)?he.transition().duration(ue.duration).ease(ue.easing).each("end",function(){se(),ce&&ce()}).each("interrupt",function(){se(),ce&&ce()}).attrTween("text",function(){var ne=v.select(this),Ce=S(N[0].lastY,N[0].y);L._lastValue=N[0].y;var Ze=ae(L.number.valueformat,nt,N[0].lastY,N[0].y);return function(rt){ne.text(Ve+Ze(Ce(rt))+tt)}}):se(),Y=D(Ve+nt(N[0].y)+tt,L.number.font,$,z),he}function ee(){var at=u(z,{tickformat:L.delta.valueformat},L._range);at.setScale(),s.prepTicks(at);var nt=function(rt){return s.tickText(at,rt).text},tt=L.delta.suffix,Ve=L.delta.prefix,he=function(rt){var Je=L.delta.relative?rt.relativeDelta:rt.delta;return Je},se=function(rt,Je){return rt===0||typeof rt!="number"||isNaN(rt)?"-":(rt>0?L.delta.increasing.symbol:L.delta.decreasing.symbol)+Ve+Je(rt)+tt},ne=function(rt){return rt.delta>=0?L.delta.increasing.color:L.delta.decreasing.color};L._deltaLastValue===void 0&&(L._deltaLastValue=he(N[0]));var Ce=de.select("text.delta");Ce.call(a.font,L.delta.font).call(c.fill,ne({delta:L._deltaLastValue}));function Ze(){Ce.text(se(he(N[0]),nt)).call(c.fill,ne(N[0])).call(n.convertToTspans,z)}return w(ue)?Ce.transition().duration(ue.duration).ease(ue.easing).tween("text",function(){var rt=v.select(this),Je=he(N[0]),St=L._deltaLastValue,kt=ae(L.delta.valueformat,nt,St,Je),Bt=S(St,Je);return L._deltaLastValue=Je,function(Vt){rt.text(se(Bt(Vt),kt)),rt.call(c.fill,ne({delta:Bt(Vt)}))}}).each("end",function(){Ze(),ce&&ce()}).each("interrupt",function(){Ze(),ce&&ce()}):Ze(),X=D(se(he(N[0]),nt),L.delta.font,$,z),Ce}var te=L.mode+L.align,pe;if(L._hasDelta&&(pe=ee(),te+=L.delta.position+L.delta.font.size+L.delta.font.family+L.delta.valueformat,te+=L.delta.increasing.symbol+L.delta.decreasing.symbol,Q=X),L._hasNumber&&(j(),te+=L.number.font.size+L.number.font.family+L.number.valueformat+L.number.suffix+L.number.prefix,Q=Y),L._hasDelta&&L._hasNumber){var we=[(Y.left+Y.right)/2,(Y.top+Y.bottom)/2],Se=[(X.left+X.right)/2,(X.top+X.bottom)/2],Re,Pe,je=.75*L.delta.font.size;L.delta.position==="left"&&(Re=P(L,"deltaPos",0,-1*(Y.width*l[L.align]+X.width*(1-l[L.align])+je),te,Math.min),Pe=we[1]-Se[1],Q={width:Y.width+X.width+je,height:Math.max(Y.height,X.height),left:X.left+Re,right:Y.right,top:Math.min(Y.top,X.top+Pe),bottom:Math.max(Y.bottom,X.bottom+Pe)}),L.delta.position==="right"&&(Re=P(L,"deltaPos",0,Y.width*(1-l[L.align])+X.width*l[L.align]+je,te,Math.max),Pe=we[1]-Se[1],Q={width:Y.width+X.width+je,height:Math.max(Y.height,X.height),left:Y.left,right:X.right+Re,top:Math.min(Y.top,X.top+Pe),bottom:Math.max(Y.bottom,X.bottom+Pe)}),L.delta.position==="bottom"&&(Re=null,Pe=X.height,Q={width:Math.max(Y.width,X.width),height:Y.height+X.height,left:Math.min(Y.left,X.left),right:Math.max(Y.right,X.right),top:Y.bottom-Y.height,bottom:Y.bottom+X.height}),L.delta.position==="top"&&(Re=null,Pe=Y.top,Q={width:Math.max(Y.width,X.width),height:Y.height+X.height,left:Math.min(Y.left,X.left),right:Math.max(Y.right,X.right),top:Y.bottom-Y.height-X.height,bottom:Y.bottom}),pe.attr({dx:Re,dy:Pe})}(L._hasNumber||L._hasDelta)&&de.attr("transform",function(){var at=O.numbersScaler(Q);te+=at[2];var nt=P(L,"numbersScale",1,at[0],te,Math.min),tt;L._scaleNumbers||(nt=1),L._isAngular?tt=B-nt*Q.bottom:tt=B-nt*(Q.top+Q.bottom)/2,L._numbersTop=nt*Q.top+tt;var Ve=Q[W];W==="center"&&(Ve=(Q.left+Q.right)/2);var he=U-nt*Ve;return he=P(L,"numbersTranslate",0,he,te,Math.max),t(he,tt)+e(nt)})}function b(z){z.each(function(F){c.stroke(v.select(this),F.line.color)}).each(function(F){c.fill(v.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function d(z,F,N){return function(){var O=_(F,N);return function(L){return z.endAngle(O(L))()}}}function u(z,F,N){var O=z._fullLayout,L=M.extendFlat({type:"linear",ticks:"outside",range:N,showline:!0},F),U={type:"linear",_id:"x"+F._id},B={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function W($,ue){return M.coerce(L,U,m,$,ue)}return h(L,U,W,B,O),f(L,U,W,B),U}function g(z,F,N){var O=Math.min(F/z.width,N/z.height);return[O,z,F+"x"+N]}function y(z,F){var N=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/N;return[O,z,F]}function D(z,F,N,O){var L=document.createElementNS("http://www.w3.org/2000/svg","text"),U=v.select(L);return U.text(z).attr("x",0).attr("y",0).attr("text-anchor",N).attr("data-unformatted",z).call(n.convertToTspans,O).call(a.font,F),a.bBox(U.node())}function P(z,F,N,O,L,U){var B="_cache"+F;z[B]&&z[B].key===L||(z[B]={key:L,value:N});var W=M.aggNums(U,null,[z[B].value,O],2);return z[B].value=W,W}}}),MG=He({"src/traces/indicator/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"indicator",basePlotModule:wG(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:V6(),supplyDefaults:TG().supplyDefaults,calc:AG().calc,plot:SG(),meta:{}}}}),EG=He({"lib/indicator.js"(Z,q){"use strict";q.exports=MG()}}),H6=He({"src/traces/table/attributes.js"(Z,q){"use strict";var v=$0(),_=rs().extendFlat,S=pc().overrideAll,M=tc(),e=wc().attributes,t=rf().descriptionOnlyNumbers,r=q.exports=S({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:_({},v.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:_({},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:_({},v.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:_({},M({arrayOk:!0}))}},"calc","from-root")}}),kG=He({"src/traces/table/defaults.js"(Z,q){"use strict";var v=sa(),_=H6(),S=wc().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(h,f){return h-f}),n=a.map(function(h){return i.indexOf(h)}),s=n.length;s",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"}}}}),LG=He({"src/traces/table/data_preparation_helper.js"(Z,q){"use strict";var v=W6(),_=rs().extendFlat,S=ns(),M=hp().isTypedArray,e=hp().isArrayOrTypedArray;q.exports=function(m,c){var T=o(c.cells.values),l=function($){return $.slice(c.header.values.length,$.length)},x=o(c.header.values);x.length&&!x[0].length&&(x[0]=[""],x=o(x));var w=x.concat(l(T).map(function(){return a((x[0]||[""]).length)})),A=c.domain,E=Math.floor(m._fullLayout._size.w*(A.x[1]-A.x[0])),p=Math.floor(m._fullLayout._size.h*(A.y[1]-A.y[0])),b=c.header.values.length?w[0].map(function(){return c.header.height}):[v.emptyHeaderHeight],d=T.length?T[0].map(function(){return c.cells.height}):[],u=b.reduce(r,0),g=p-u,y=g+v.uplift,D=s(d,y),P=s(b,u),z=n(P,[]),F=n(D,z),N={},O=c._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function($,ue){return ue})));var L=w.map(function($,ue){var ce=e(c.columnwidth)?c.columnwidth[Math.min(ue,c.columnwidth.length-1)]:c.columnwidth;return S(ce)?Number(ce):1}),U=L.reduce(r,0);L=L.map(function($){return $/U*E});var B=Math.max(t(c.header.line.width),t(c.cells.line.width)),W={key:c.uid+m._context.staticPlot,translateX:A.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-A.y[1]),size:m._fullLayout._size,width:E,maxLineWidth:B,height:p,columnOrder:O,groupHeight:p,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:_({},c.cells,{values:T}),headerCells:_({},c.header,{values:w}),gdColumns:w.map(function($){return $[0]}),gdColumnsOriginalOrder:w.map(function($){return $[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:w.map(function($,ue){var ce=N[$];N[$]=(ce||0)+1;var de=$+"__"+N[$];return{key:de,label:$,specIndex:ue,xIndex:O[ue],xScale:i,x:void 0,calcdata:void 0,columnWidth:L[ue]}})};return W.columns.forEach(function($){$.calcdata=W,$.x=i($)}),W};function t(f){if(e(f)){for(var m=0,c=0;c=m||p===f.length-1)&&(c[l]=w,w.key=E++,w.firstRowIndex=A,w.lastRowIndex=p,w=h(),l+=x,A=p+1,x=0);return c}function h(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),PG=He({"src/traces/table/data_split_helpers.js"(Z){"use strict";var q=rs().extendFlat;Z.splitToPanels=function(_){var S=[0,0],M=q({},_,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:_.calcdata.headerCells.values[_.specIndex],rowBlocks:_.calcdata.headerRowBlocks,calcdata:q({},_.calcdata,{cells:_.calcdata.headerCells})}),e=q({},_,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:_.calcdata.cells.values[_.specIndex],rowBlocks:_.calcdata.rowBlocks}),t=q({},_,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:_.calcdata.cells.values[_.specIndex],rowBlocks:_.calcdata.rowBlocks});return[e,t,M]},Z.splitToCells=function(_){var S=v(_);return(_.values||[]).slice(S[0],S[1]).map(function(M,e){var t=typeof M=="string"&&M.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:_,calcdata:_.calcdata,page:_.page,rowBlocks:_.rowBlocks,value:M}})};function v(_){var S=_.rowBlocks[_.page],M=S?S.rows[0].rowIndex:0,e=S?M+S.rows.length:0;return[M,e]}}}),X6=He({"src/traces/table/plot.js"(Z,q){"use strict";var v=W6(),_=Vn(),S=sa(),M=S.numberFormat,e=Cv(),t=as(),r=su(),o=sa().raiseToTop,a=sa().strTranslate,i=sa().cancelTransition,n=LG(),s=PG(),h=$n();q.exports=function(te,pe){var we=!te._context.staticPlot,Se=te._fullLayout._paper.selectAll("."+v.cn.table).data(pe.map(function(Je){var St=e.unwrap(Je),kt=St.trace;return n(te,kt)}),e.keyFun);Se.exit().remove(),Se.enter().append("g").classed(v.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"),Se.attr("width",function(Je){return Je.width+Je.size.l+Je.size.r}).attr("height",function(Je){return Je.height+Je.size.t+Je.size.b}).attr("transform",function(Je){return a(Je.translateX,Je.translateY)});var Re=Se.selectAll("."+v.cn.tableControlView).data(e.repeat,e.keyFun),Pe=Re.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(we){var je="onwheel"in document?"wheel":"mousewheel";Pe.on("mousemove",function(Je){Re.filter(function(St){return Je===St}).call(l,te)}).on(je,function(Je){if(!Je.scrollbarState.wheeling){Je.scrollbarState.wheeling=!0;var St=Je.scrollY+_.event.deltaY,kt=$(te,Re,null,St)(Je);kt||(_.event.stopPropagation(),_.event.preventDefault()),Je.scrollbarState.wheeling=!1}}).call(l,te,!0)}Re.attr("transform",function(Je){return a(Je.size.l,Je.size.t)});var at=Re.selectAll("."+v.cn.scrollBackground).data(e.repeat,e.keyFun);at.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),at.attr("width",function(Je){return Je.width}).attr("height",function(Je){return Je.height}),Re.each(function(Je){t.setClipUrl(_.select(this),m(te,Je),te)});var nt=Re.selectAll("."+v.cn.yColumn).data(function(Je){return Je.columns},e.keyFun);nt.enter().append("g").classed(v.cn.yColumn,!0),nt.exit().remove(),nt.attr("transform",function(Je){return a(Je.x,0)}),we&&nt.call(_.behavior.drag().origin(function(Je){var St=_.select(this);return N(St,Je,-v.uplift),o(this),Je.calcdata.columnDragInProgress=!0,l(Re.filter(function(kt){return Je.calcdata.key===kt.key}),te),Je}).on("drag",function(Je){var St=_.select(this),kt=function(Ar){return(Je===Ar?_.event.x:Ar.x)+Ar.columnWidth/2};Je.x=Math.max(-v.overdrag,Math.min(Je.calcdata.width+v.overdrag-Je.columnWidth,_.event.x));var Bt=T(nt).filter(function(Ar){return Ar.calcdata.key===Je.calcdata.key}),Vt=Bt.sort(function(Ar,vr){return kt(Ar)-kt(vr)});Vt.forEach(function(Ar,vr){Ar.xIndex=vr,Ar.x=Je===Ar?Ar.x:Ar.xScale(Ar)}),nt.filter(function(Ar){return Je!==Ar}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Ar){return a(Ar.x,0)}),St.call(i).attr("transform",a(Je.x,-v.uplift))}).on("dragend",function(Je){var St=_.select(this),kt=Je.calcdata;Je.x=Je.xScale(Je),Je.calcdata.columnDragInProgress=!1,N(St,Je,0),z(te,kt,kt.columns.map(function(Bt){return Bt.xIndex}))})),nt.each(function(Je){t.setClipUrl(_.select(this),c(te,Je),te)});var tt=nt.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,e.keyFun);tt.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Je){return Je.key}),tt.style("cursor",function(Je){return Je.dragHandle?"ew-resize":Je.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Ve=tt.filter(L),he=tt.filter(O);we&&he.call(_.behavior.drag().origin(function(Je){return _.event.stopPropagation(),Je}).on("drag",$(te,Re,-1)).on("dragend",function(){})),x(te,Re,Ve,tt),x(te,Re,he,tt);var se=Re.selectAll("."+v.cn.scrollAreaClip).data(e.repeat,e.keyFun);se.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Je){return m(te,Je)});var ne=se.selectAll("."+v.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);ne.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),ne.attr("width",function(Je){return Je.width+2*v.overdrag}).attr("height",function(Je){return Je.height+v.uplift});var Ce=nt.selectAll("."+v.cn.columnBoundary).data(e.repeat,e.keyFun);Ce.enter().append("g").classed(v.cn.columnBoundary,!0);var Ze=nt.selectAll("."+v.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);Ze.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),Ze.attr("id",function(Je){return c(te,Je)});var rt=Ze.selectAll("."+v.cn.columnBoundaryRect).data(e.repeat,e.keyFun);rt.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),rt.attr("width",function(Je){return Je.columnWidth+2*f(Je)}).attr("height",function(Je){return Je.calcdata.height+2*f(Je)+v.uplift}).attr("x",function(Je){return-f(Je)}).attr("y",function(Je){return-f(Je)}),W(null,he,Re)};function f(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function m(ee,te){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+te.key}function c(ee,te){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+te.calcdata.key+"_"+te.specIndex}function T(ee){return[].concat.apply([],ee.map(function(te){return te})).map(function(te){return te.__data__})}function l(ee,te,pe){function we(nt){var tt=nt.rowBlocks;return Q(tt,tt.length-1)+(tt.length?V(tt[tt.length-1],1/0):1)}var Se=ee.selectAll("."+v.cn.scrollbarKit).data(e.repeat,e.keyFun);Se.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Se.each(function(nt){var tt=nt.scrollbarState;tt.totalHeight=we(nt),tt.scrollableAreaHeight=nt.groupHeight-U(nt),tt.currentlyVisibleHeight=Math.min(tt.totalHeight,tt.scrollableAreaHeight),tt.ratio=tt.currentlyVisibleHeight/tt.totalHeight,tt.barLength=Math.max(tt.ratio*tt.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),tt.barWiggleRoom=tt.currentlyVisibleHeight-tt.barLength,tt.wiggleRoom=Math.max(0,tt.totalHeight-tt.scrollableAreaHeight),tt.topY=tt.barWiggleRoom===0?0:nt.scrollY/tt.wiggleRoom*tt.barWiggleRoom,tt.bottomY=tt.topY+tt.barLength,tt.dragMultiplier=tt.wiggleRoom/tt.barWiggleRoom}).attr("transform",function(nt){var tt=nt.width+v.scrollbarWidth/2+v.scrollbarOffset;return a(tt,U(nt))});var Re=Se.selectAll("."+v.cn.scrollbar).data(e.repeat,e.keyFun);Re.enter().append("g").classed(v.cn.scrollbar,!0);var Pe=Re.selectAll("."+v.cn.scrollbarSlider).data(e.repeat,e.keyFun);Pe.enter().append("g").classed(v.cn.scrollbarSlider,!0),Pe.attr("transform",function(nt){return a(0,nt.scrollbarState.topY||0)});var je=Pe.selectAll("."+v.cn.scrollbarGlyph).data(e.repeat,e.keyFun);je.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),je.attr("y2",function(nt){return nt.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(nt){return nt.columnDragInProgress||!nt.scrollbarState.barWiggleRoom||pe?0:.4}),je.transition().delay(0).duration(0),je.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var at=Re.selectAll("."+v.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);at.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(nt){var tt=_.event.y,Ve=this.getBoundingClientRect(),he=nt.scrollbarState,se=tt-Ve.top,ne=_.scale.linear().domain([0,he.scrollableAreaHeight]).range([0,he.totalHeight]).clamp(!0);he.topY<=se&&se<=he.bottomY||$(te,ee,null,ne(se-he.barLength/2))(nt)}).call(_.behavior.drag().origin(function(nt){return _.event.stopPropagation(),nt.scrollbarState.scrollbarScrollInProgress=!0,nt}).on("drag",$(te,ee)).on("dragend",function(){})),at.attr("y2",function(nt){return nt.scrollbarState.scrollableAreaHeight}),te._context.staticPlot&&(je.remove(),at.remove())}function x(ee,te,pe,we){var Se=w(pe),Re=A(Se);d(Re);var Pe=E(Re);g(Pe);var je=b(Re),at=p(je);u(at),y(at,te,we,ee),X(Re)}function w(ee){var te=ee.selectAll("."+v.cn.columnCells).data(e.repeat,e.keyFun);return te.enter().append("g").classed(v.cn.columnCells,!0),te.exit().remove(),te}function A(ee){var te=ee.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(pe){return pe.keyWithinBlock});return te.enter().append("g").classed(v.cn.columnCell,!0),te.exit().remove(),te}function E(ee){var te=ee.selectAll("."+v.cn.cellRect).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("rect").classed(v.cn.cellRect,!0),te}function p(ee){var te=ee.selectAll("."+v.cn.cellText).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){_.event.stopPropagation()}),te}function b(ee){var te=ee.selectAll("."+v.cn.cellTextHolder).data(e.repeat,function(pe){return pe.keyWithinBlock});return te.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),te}function d(ee){ee.each(function(te,pe){var we=te.calcdata.cells.font,Se=te.column.specIndex,Re={size:F(we.size,Se,pe),color:F(we.color,Se,pe),family:F(we.family,Se,pe),weight:F(we.weight,Se,pe),style:F(we.style,Se,pe),variant:F(we.variant,Se,pe),textcase:F(we.textcase,Se,pe),lineposition:F(we.lineposition,Se,pe),shadow:F(we.shadow,Se,pe)};te.rowNumber=te.key,te.align=F(te.calcdata.cells.align,Se,pe),te.cellBorderWidth=F(te.calcdata.cells.line.width,Se,pe),te.font=Re})}function u(ee){ee.each(function(te){t.font(_.select(this),te.font)})}function g(ee){ee.attr("width",function(te){return te.column.columnWidth}).attr("stroke-width",function(te){return te.cellBorderWidth}).each(function(te){var pe=_.select(this);h.stroke(pe,F(te.calcdata.cells.line.color,te.column.specIndex,te.rowNumber)),h.fill(pe,F(te.calcdata.cells.fill.color,te.column.specIndex,te.rowNumber))})}function y(ee,te,pe,we){ee.text(function(Se){var Re=Se.column.specIndex,Pe=Se.rowNumber,je=Se.value,at=typeof je=="string",nt=at&&je.match(/
/i),tt=!at||nt;Se.mayHaveMarkup=at&&je.match(/[<&>]/);var Ve=D(je);Se.latex=Ve;var he=Ve?"":F(Se.calcdata.cells.prefix,Re,Pe)||"",se=Ve?"":F(Se.calcdata.cells.suffix,Re,Pe)||"",ne=Ve?null:F(Se.calcdata.cells.format,Re,Pe)||null,Ce=he+(ne?M(ne)(Se.value):Se.value)+se,Ze;Se.wrappingNeeded=!Se.wrapped&&!tt&&!Ve&&(Ze=P(Ce)),Se.cellHeightMayIncrease=nt||Ve||Se.mayHaveMarkup||(Ze===void 0?P(Ce):Ze),Se.needsConvertToTspans=Se.mayHaveMarkup||Se.wrappingNeeded||Se.latex;var rt;if(Se.wrappingNeeded){var Je=v.wrapSplitCharacter===" "?Ce.replace(/Se&&we.push(Re),Se+=at}return we}function W(ee,te,pe){var we=T(te)[0];if(we!==void 0){var Se=we.rowBlocks,Re=we.calcdata,Pe=Q(Se,Se.length),je=we.calcdata.groupHeight-U(we),at=Re.scrollY=Math.max(0,Math.min(Pe-je,Re.scrollY)),nt=B(Se,at,je);nt.length===1&&(nt[0]===Se.length-1?nt.unshift(nt[0]-1):nt.push(nt[0]+1)),nt[0]%2&&nt.reverse(),te.each(function(tt,Ve){tt.page=nt[Ve],tt.scrollY=at}),te.attr("transform",function(tt){var Ve=Q(tt.rowBlocks,tt.page)-tt.scrollY;return a(0,Ve)}),ee&&(ue(ee,pe,te,nt,we.prevPages,we,0),ue(ee,pe,te,nt,we.prevPages,we,1),l(pe,ee))}}function $(ee,te,pe,we){return function(Re){var Pe=Re.calcdata?Re.calcdata:Re,je=te.filter(function(Ve){return Pe.key===Ve.key}),at=pe||Pe.scrollbarState.dragMultiplier,nt=Pe.scrollY;Pe.scrollY=we===void 0?Pe.scrollY+at*_.event.dy:we;var tt=je.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(O);return W(ee,tt,je),Pe.scrollY===nt}}function ue(ee,te,pe,we,Se,Re,Pe){var je=we[Pe]!==Se[Pe];je&&(clearTimeout(Re.currentRepaint[Pe]),Re.currentRepaint[Pe]=setTimeout(function(){var at=pe.filter(function(nt,tt){return tt===Pe&&we[tt]!==Se[tt]});x(ee,te,at,pe),Se[Pe]=we[Pe]}))}function ce(ee,te,pe,we){return function(){var Re=_.select(te.parentNode);Re.each(function(Pe){var je=Pe.fragments;Re.selectAll("tspan.line").each(function(Ce,Ze){je[Ze].width=this.getComputedTextLength()});var at=je[je.length-1].width,nt=je.slice(0,-1),tt=[],Ve,he,se=0,ne=Pe.column.columnWidth-2*v.cellPad;for(Pe.value="";nt.length;)Ve=nt.shift(),he=Ve.width+at,se+he>ne&&(Pe.value+=tt.join(v.wrapSpacer)+v.lineBreaker,tt=[],se=0),tt.push(Ve.text),se+=he;se&&(Pe.value+=tt.join(v.wrapSpacer)),Pe.wrapped=!0}),Re.selectAll("tspan.line").remove(),y(Re.select("."+v.cn.cellText),pe,ee,we),_.select(te.parentNode.parentNode).call(X)}}function de(ee,te,pe,we,Se){return function(){if(!Se.settledY){var Pe=_.select(te.parentNode),je=ae(Se),at=Se.key-je.firstRowIndex,nt=je.rows[at].rowHeight,tt=Se.cellHeightMayIncrease?te.parentNode.getBoundingClientRect().height+2*v.cellPad:nt,Ve=Math.max(tt,nt),he=Ve-je.rows[at].rowHeight;he&&(je.rows[at].rowHeight=Ve,ee.selectAll("."+v.cn.columnCell).call(X),W(null,ee.filter(O),0),l(pe,we,!0)),Pe.attr("transform",function(){var se=this,ne=se.parentNode,Ce=ne.getBoundingClientRect(),Ze=_.select(se.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),rt=se.transform.baseVal.consolidate(),Je=Ze.top-Ce.top+(rt?rt.matrix.f:v.cellPad);return a(Y(Se,_.select(se.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Je)}),Se.settledY=!0}}}function Y(ee,te){switch(ee.align){case"left":return v.cellPad;case"right":return ee.column.columnWidth-(te||0)-v.cellPad;case"center":return(ee.column.columnWidth-(te||0))/2;default:return v.cellPad}}function X(ee){ee.attr("transform",function(te){var pe=te.rowBlocks[0].auxiliaryBlocks.reduce(function(Pe,je){return Pe+V(je,1/0)},0),we=ae(te),Se=V(we,te.key),Re=Se+pe;return a(0,Re)}).selectAll("."+v.cn.cellRect).attr("height",function(te){return j(ae(te),te.key).rowHeight})}function Q(ee,te){for(var pe=0,we=te-1;we>=0;we--)pe+=le(ee[we]);return pe}function V(ee,te){for(var pe=0,we=0;weM.length&&(S=S.slice(0,M.length)):S=[],t=0;t90&&(m-=180,i=-i),{angle:m,flip:i,p:_.c2p(e,S,M),offsetMultplier:n}}}}),jG=He({"src/traces/carpet/plot.js"(Z,q){"use strict";var v=Vn(),_=as(),S=Z6(),M=Y6(),e=UG(),t=su(),r=sa(),o=r.strRotate,a=r.strTranslate,i=uh();q.exports=function(x,w,A,E){var p=x._context.staticPlot,b=w.xaxis,d=w.yaxis,u=x._fullLayout,g=u._clips;r.makeTraceGroups(E,A,"trace").each(function(y){var D=v.select(this),P=y[0],z=P.trace,F=z.aaxis,N=z.baxis,O=r.ensureSingle(D,"g","minorlayer"),L=r.ensureSingle(D,"g","majorlayer"),U=r.ensureSingle(D,"g","boundarylayer"),B=r.ensureSingle(D,"g","labellayer");D.style("opacity",z.opacity),s(b,d,L,F,"a",F._gridlines,!0,p),s(b,d,L,N,"b",N._gridlines,!0,p),s(b,d,O,F,"a",F._minorgridlines,!0,p),s(b,d,O,N,"b",N._minorgridlines,!0,p),s(b,d,U,F,"a-boundary",F._boundarylines,p),s(b,d,U,N,"b-boundary",N._boundarylines,p);var W=h(x,b,d,z,P,B,F._labels,"a-label"),$=h(x,b,d,z,P,B,N._labels,"b-label");f(x,B,z,P,b,d,W,$),n(z,P,g,b,d)})};function n(l,x,w,A,E){var p,b,d,u,g=w.select("#"+l._clipPathId);g.size()||(g=w.append("clipPath").classed("carpetclip",!0));var y=r.ensureSingle(g,"path","carpetboundary"),D=x.clipsegments,P=[];for(u=0;u0?"start":"end","data-notex":1}).call(_.font,D.font).text(D.text).call(t.convertToTspans,l),L=_.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(D.axis.labelpadding*N,L.height*.3)),g=Math.max(g,L.width+D.axis.labelpadding)}),u.exit().remove(),y.maxExtent=g,y}function f(l,x,w,A,E,p,b,d){var u,g,y,D,P=r.aggNums(Math.min,null,w.a),z=r.aggNums(Math.max,null,w.a),F=r.aggNums(Math.min,null,w.b),N=r.aggNums(Math.max,null,w.b);u=.5*(P+z),g=F,y=w.ab2xy(u,g,!0),D=w.dxyda_rough(u,g),b.angle===void 0&&r.extendFlat(b,e(w,E,p,y,w.dxydb_rough(u,g))),T(l,x,w,A,y,D,w.aaxis,E,p,b,"a-title"),u=P,g=.5*(F+N),y=w.ab2xy(u,g,!0),D=w.dxydb_rough(u,g),d.angle===void 0&&r.extendFlat(d,e(w,E,p,y,w.dxyda_rough(u,g))),T(l,x,w,A,y,D,w.baxis,E,p,d,"b-title")}var m=i.LINE_SPACING,c=(1-i.MID_SHIFT)/m+1;function T(l,x,w,A,E,p,b,d,u,g,y){var D=[];b.title.text&&D.push(b.title.text);var P=x.selectAll("text."+y).data(D),z=g.maxExtent;P.enter().append("text").classed(y,!0),P.each(function(){var F=e(w,d,u,E,p);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var N=b.title.font.size;z+=N+b.title.offset;var O=g.angle+(g.flip<0?180:0),L=(O-F.angle+450)%360,U=L>90&&L<270,B=v.select(this);B.text(b.title.text).call(t.convertToTspans,l),U&&(z=(-t.lineCount(B)+c)*m*N-z),B.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(_.font,b.title.font)}),P.exit().remove()}}}),qG=He({"src/traces/carpet/cheater_basis.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray;q.exports=function(_,S,M){var e,t,r,o,a,i,n=[],s=v(_)?_.length:_,h=v(S)?S.length:S,f=v(_)?_:null,m=v(S)?S:null;f&&(r=(f.length-1)/(f[f.length-1]-f[0])/(s-1)),m&&(o=(m.length-1)/(m[m.length-1]-m[0])/(h-1));var c,T=1/0,l=-1/0;for(t=0;t=10)return null;for(var e=1/0,t=-1/0,r=S.length,o=0;o0&&(V=M.dxydi([],W-1,ue,0,ce),ee.push(de[0]+V[0]/3),te.push(de[1]+V[1]/3),le=M.dxydi([],W-1,ue,1,ce),ee.push(Q[0]-le[0]/3),te.push(Q[1]-le[1]/3)),ee.push(Q[0]),te.push(Q[1]),de=Q;else for(W=M.a2i(B),Y=Math.floor(Math.max(0,Math.min(F-2,W))),X=W-Y,pe.length=F,pe.crossLength=N,pe.xy=function(we){return M.evalxy([],W,we)},pe.dxy=function(we,Se){return M.dxydj([],Y,we,X,Se)},$=0;$0&&(ae=M.dxydj([],Y,$-1,X,0),ee.push(de[0]+ae[0]/3),te.push(de[1]+ae[1]/3),j=M.dxydj([],Y,$-1,X,1),ee.push(Q[0]-j[0]/3),te.push(Q[1]-j[1]/3)),ee.push(Q[0]),te.push(Q[1]),de=Q;return pe.axisLetter=e,pe.axis=E,pe.crossAxis=g,pe.value=B,pe.constvar=t,pe.index=f,pe.x=ee,pe.y=te,pe.smoothing=g.smoothing,pe}function U(B){var W,$,ue,ce,de,Y=[],X=[],Q={};if(Q.length=A.length,Q.crossLength=u.length,e==="b")for(ue=Math.max(0,Math.min(N-2,B)),de=Math.min(1,Math.max(0,B-ue)),Q.xy=function(V){return M.evalxy([],V,B)},Q.dxy=function(V,le){return M.dxydi([],V,ue,le,de)},W=0;WA.length-1)&&p.push(_(U(o),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s;fA.length-1)&&!(T<0||T>A.length-1))for(l=A[a],x=A[T],r=0;rA[A.length-1])&&b.push(_(L(c),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&d.push(_(U(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&d.push(_(U(A.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(i=5e-15,n=[Math.floor((A[A.length-1]-E.tick0)/E.dtick*(1+i)),Math.ceil((A[0]-E.tick0)/E.dtick/(1+i))].sort(function(B,W){return B-W}),s=n[0],h=n[1],f=s;f<=h;f++)m=E.tick0+E.dtick*f,p.push(_(L(m),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s-1;fA[A.length-1])&&b.push(_(L(c),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&d.push(_(L(A[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&d.push(_(L(A[A.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}}}),HG=He({"src/traces/carpet/calc_labels.js"(Z,q){"use strict";var v=Wo(),_=rs().extendFlat;q.exports=function(M,e){var t,r,o,a,i,n=e._labels=[],s=e._gridlines;for(t=0;t=0;t--)r[s-t]=_[h][t],o[s-t]=S[h][t];for(a.push({x:r,y:o,bicubic:i}),t=h,r=[],o=[];t>=0;t--)r[h-t]=_[t][0],o[h-t]=S[t][0];return a.push({x:r,y:o,bicubic:n}),a}}}),XG=He({"src/traces/carpet/smooth_fill_2d_array.js"(Z,q){"use strict";var v=sa();q.exports=function(S,M,e){var t,r,o,a=[],i=[],n=S[0].length,s=S.length;function h($,ue){var ce=0,de,Y=0;return $>0&&(de=S[ue][$-1])!==void 0&&(Y++,ce+=de),$0&&(de=S[ue-1][$])!==void 0&&(Y++,ce+=de),ue0&&r0&&tu);return v.log("Smoother converged to",g,"after",D,"iterations"),S}}}),ZG=He({"src/traces/carpet/constants.js"(Z,q){"use strict";q.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),YG=He({"src/traces/carpet/catmull_rom.js"(Z,q){"use strict";var v=.5;q.exports=function(S,M,e,t){var r=S[0]-M[0],o=S[1]-M[1],a=e[0]-M[0],i=e[1]-M[1],n=Math.pow(r*r+o*o,v/2),s=Math.pow(a*a+i*i,v/2),h=(s*s*r-n*n*a)*t,f=(s*s*o-n*n*i)*t,m=s*(n+s)*3,c=n*(n+s)*3;return[[M[0]+(m&&h/m),M[1]+(m&&f/m)],[M[0]-(c&&h/c),M[1]-(c&&f/c)]]}}}),KG=He({"src/traces/carpet/compute_control_points.js"(Z,q){"use strict";var v=YG(),_=sa().ensureArray;function S(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,h,f,m,c,T,l,x,w,A=r[0].length,E=r.length,p=a?3*A-2:A,b=i?3*E-2:E;for(e=_(e,b),t=_(t,b),h=0;hm&&pT&&bc||bl},o.setScale=function(){var p=o._x,b=o._y,d=S(o._xctrl,o._yctrl,p,b,h.smoothing,f.smoothing);o._xctrl=d[0],o._yctrl=d[1],o.evalxy=M([o._xctrl,o._yctrl],n,s,h.smoothing,f.smoothing),o.dxydi=e([o._xctrl,o._yctrl],h.smoothing,f.smoothing),o.dxydj=t([o._xctrl,o._yctrl],h.smoothing,f.smoothing)},o.i2a=function(p){var b=Math.max(0,Math.floor(p[0]),n-2),d=p[0]-b;return(1-d)*a[b]+d*a[b+1]},o.j2b=function(p){var b=Math.max(0,Math.floor(p[1]),n-2),d=p[1]-b;return(1-d)*i[b]+d*i[b+1]},o.ij2ab=function(p){return[o.i2a(p[0]),o.j2b(p[1])]},o.a2i=function(p){var b=Math.max(0,Math.min(_(p,a),n-2)),d=a[b],u=a[b+1];return Math.max(0,Math.min(n-1,b+(p-d)/(u-d)))},o.b2j=function(p){var b=Math.max(0,Math.min(_(p,i),s-2)),d=i[b],u=i[b+1];return Math.max(0,Math.min(s-1,b+(p-d)/(u-d)))},o.ab2ij=function(p){return[o.a2i(p[0]),o.b2j(p[1])]},o.i2c=function(p,b){return o.evalxy([],p,b)},o.ab2xy=function(p,b,d){if(!d&&(pa[n-1]|bi[s-1]))return[!1,!1];var u=o.a2i(p),g=o.b2j(b),y=o.evalxy([],u,g);if(d){var D=0,P=0,z=[],F,N,O,L;pa[n-1]?(F=n-2,N=1,D=(p-a[n-1])/(a[n-1]-a[n-2])):(F=Math.max(0,Math.min(n-2,Math.floor(u))),N=u-F),bi[s-1]?(O=s-2,L=1,P=(b-i[s-1])/(i[s-1]-i[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(g))),L=g-O),D&&(o.dxydi(z,F,O,N,L),y[0]+=z[0]*D,y[1]+=z[1]*D),P&&(o.dxydj(z,F,O,N,L),y[0]+=z[0]*P,y[1]+=z[1]*P)}return y},o.c2p=function(p,b,d){return[b.c2p(p[0]),d.c2p(p[1])]},o.p2x=function(p,b,d){return[b.p2c(p[0]),d.p2c(p[1])]},o.dadi=function(p){var b=Math.max(0,Math.min(a.length-2,p));return a[b+1]-a[b]},o.dbdj=function(p){var b=Math.max(0,Math.min(i.length-2,p));return i[b+1]-i[b]},o.dxyda=function(p,b,d,u){var g=o.dxydi(null,p,b,d,u),y=o.dadi(p,d);return[g[0]/y,g[1]/y]},o.dxydb=function(p,b,d,u){var g=o.dxydj(null,p,b,d,u),y=o.dbdj(b,u);return[g[0]/y,g[1]/y]},o.dxyda_rough=function(p,b,d){var u=x*(d||.1),g=o.ab2xy(p+u,b,!0),y=o.ab2xy(p-u,b,!0);return[(g[0]-y[0])*.5/u,(g[1]-y[1])*.5/u]},o.dxydb_rough=function(p,b,d){var u=w*(d||.1),g=o.ab2xy(p,b+u,!0),y=o.ab2xy(p,b-u,!0);return[(g[0]-y[0])*.5/u,(g[1]-y[1])*.5/u]},o.dpdx=function(p){return p._m},o.dpdy=function(p){return p._m}}}}),tH=He({"src/traces/carpet/calc.js"(Z,q){"use strict";var v=Wo(),_=sa().isArray1D,S=qG(),M=VG(),e=GG(),t=HG(),r=WG(),o=Y2(),a=XG(),i=Z2(),n=eH();q.exports=function(h,f){var m=v.getFromId(h,f.xaxis),c=v.getFromId(h,f.yaxis),T=f.aaxis,l=f.baxis,x=f.x,w=f.y,A=[];x&&_(x)&&A.push("x"),w&&_(w)&&A.push("y"),A.length&&i(f,T,l,"a","b",A);var E=f._a=f._a||f.a,p=f._b=f._b||f.b;x=f._x||f.x,w=f._y||f.y;var b={};if(f._cheater){var d=T.cheatertype==="index"?E.length:E,u=l.cheatertype==="index"?p.length:p;x=S(d,u,f.cheaterslope)}f._x=x=o(x),f._y=w=o(w),a(x,E,p),a(w,E,p),n(f),f.setScale();var g=M(x),y=M(w),D=.5*(g[1]-g[0]),P=.5*(g[1]+g[0]),z=.5*(y[1]-y[0]),F=.5*(y[1]+y[0]),N=1.3;return g=[P-D*N,P+D*N],y=[F-z*N,F+z*N],f._extremes[m._id]=v.findExtremes(m,g,{padded:!0}),f._extremes[c._id]=v.findExtremes(c,y,{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=x,b.y=w,b.a=E,b.b=p,[b]}}}),rH=He({"src/traces/carpet/index.js"(Z,q){"use strict";q.exports={attributes:PT(),supplyDefaults:NG(),plot:jG(),calc:tH(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Kf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),aH=He({"lib/carpet.js"(Z,q){"use strict";q.exports=rH()}}),K6=He({"src/traces/scattercarpet/attributes.js"(Z,q){"use strict";var v=$d(),_=af(),S=au(),{hovertemplateAttrs:M,texttemplateAttrs:e,templatefallbackAttrs:t}=$l(),r=ku(),o=rs().extendFlat,a=_.marker,i=_.line,n=a.line;q.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},_.mode,{dflt:"markers"}),text:o({},_.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},_.hovertext,{}),line:{color:i.color,width:i.width,dash:i.dash,backoff:i.backoff,shape:o({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:_.connectgaps,fill:o({},_.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),marker:o({symbol:a.symbol,opacity:a.opacity,maxdisplayed:a.maxdisplayed,angle:a.angle,angleref:a.angleref,standoff:a.standoff,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:o({width:n.width,dash:n.dash,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:_.textfont,textposition:_.textposition,selected:_.selected,unselected:_.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:_.hoveron,hovertemplate:M(),hovertemplatefallback:t(),zorder:_.zorder}}}),iH=He({"src/traces/scattercarpet/defaults.js"(Z,q){"use strict";var v=sa(),_=Tv(),S=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=K6();q.exports=function(n,s,h,f){function m(E,p){return v.coerce(n,s,a,E,p)}m("carpet"),s.xaxis="x",s.yaxis="y";var c=m("a"),T=m("b"),l=Math.min(c.length,T.length);if(!l){s.visible=!1;return}s._length=l,m("text"),m("texttemplate"),m("texttemplatefallback"),m("hovertext");var x=l<_.PTS_LINESONLY?"lines+markers":"lines";m("mode",x),S.hasMarkers(s)&&M(n,s,h,f,m,{gradient:!0}),S.hasLines(s)&&(e(n,s,h,f,m,{backoff:!0}),t(n,s,m),m("connectgaps")),S.hasText(s)&&r(n,s,f,m);var w=[];(S.hasMarkers(s)||S.hasText(s))&&(m("marker.maxdisplayed"),w.push("points")),m("fill"),s.fill!=="none"&&(o(n,s,h,m),S.hasLines(s)||t(n,s,m)),(s.fill==="tonext"||s.fill==="toself")&&w.push("fills");var A=m("hoveron",w.join("+")||"points");A!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),m("zorder"),v.coerceSelectionMarkerOpacity(s,m)}}}),nH=He({"src/traces/scattercarpet/format_labels.js"(Z,q){"use strict";q.exports=function(_,S){var M={},e=S._carpet,t=e.ab2ij([_.a,_.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=He({"src/traces/carpet/lookup_carpetid.js"(Z,q){"use strict";q.exports=function(v,_){for(var S=v._fullData.length,M,e=0;e0?b=E.labelprefix.replace(/ = $/,""):b=E._hovertitle,l.push(b+": "+p.toFixed(3)+E.labelsuffix)}if(!m.hovertemplate){var w=f.hi||m.hoverinfo,A=w.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&x(c.aaxis,f.a),A.indexOf("b")!==-1&&x(c.baxis,f.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&_(f,m,l),a.extraText=l.join("
")}return o}}}),uH=He({"src/traces/scattercarpet/event_data.js"(Z,q){"use strict";q.exports=function(_,S,M,e,t){var r=e[t];return _.a=r.a,_.b=r.b,_.y=r.y,_}}}),cH=He({"src/traces/scattercarpet/index.js"(Z,q){"use strict";q.exports={attributes:K6(),supplyDefaults:iH(),colorbar:dp(),formatLabels:nH(),calc:oH(),plot:sH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:lH(),selectPoints:c1(),eventData:uH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Kf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),fH=He({"lib/scattercarpet.js"(Z,q){"use strict";q.exports=cH()}}),J6=He({"src/traces/contourcarpet/attributes.js"(Z,q){"use strict";var v=p1(),_=V_(),S=ku(),M=rs().extendFlat,e=_.contours;q.exports=M({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:_.fillcolor,autocontour:_.autocontour,ncontours:_.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:_.line.color,width:_.line.width,dash:_.line.dash,smoothing:_.line.smoothing,editType:"plot"},zorder:_.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),$6=He({"src/traces/contourcarpet/defaults.js"(Z,q){"use strict";var v=sa(),_=X2(),S=J6(),M=TS(),e=s3(),t=l3();q.exports=function(o,a,i,n){function s(c,T){return v.coerce(o,a,S,c,T)}function h(c){return v.coerce2(o,a,S,c)}if(s("carpet"),o.a&&o.b){var f=_(o,a,s,n,"a","b");if(!f){a.visible=!1;return}s("text");var m=s("contours.type")==="constraint";m?M(o,a,s,n,i,{hasHover:!1}):(e(o,a,s,h),t(o,a,s,n,{hasHover:!1}))}else a._defaultColor=i,a._length=null;s("zorder")}}}),hH=He({"src/traces/contourcarpet/calc.js"(Z,q){"use strict";var v=Tp(),_=sa(),S=Z2(),M=Y2(),e=K2(),t=J2(),r=sS(),o=$6(),a=IT(),i=dS();q.exports=function(h,f){var m=f._carpetTrace=a(h,f);if(!(!m||!m.visible||m.visible==="legendonly")){if(!f.a||!f.b){var c=h.data[m.index],T=h.data[f.index];T.a||(T.a=c.a),T.b||(T.b=c.b),o(T,f,f._defaultColor,h._fullLayout)}var l=n(h,f);return i(f,f._z),l}};function n(s,h){var f=h._carpetTrace,m=f.aaxis,c=f.baxis,T,l,x,w,A,E,p;m._minDtick=0,c._minDtick=0,_.isArray1D(h.z)&&S(h,m,c,"a","b",["z"]),T=h._a=h._a||h.a,w=h._b=h._b||h.b,T=T?m.makeCalcdata(h,"_a"):[],w=w?c.makeCalcdata(h,"_b"):[],l=h.a0||0,x=h.da||1,A=h.b0||0,E=h.db||1,p=h._z=M(h._z||h.z,h.transpose),h._emptypoints=t(p),e(p,h._emptypoints);var b=_.maxRowLength(p),d=h.xtype==="scaled"?"":T,u=r(h,d,l,x,b,m),g=h.ytype==="scaled"?"":w,y=r(h,g,A,E,p.length,c),D={a:u,b:y,z:p};return h.contours.type==="levels"&&h.contours.coloring!=="none"&&v(s,h,{vals:p,containerStr:"",cLetter:"z"}),[D]}}}),pH=He({"src/traces/carpet/axis_aligned_line.js"(Z,q){"use strict";var v=sa().isArrayOrTypedArray;q.exports=function(_,S,M,e){var t,r,o,a,i,n,s,h,f,m,c,T,l,x=v(M)?"a":"b",w=x==="a"?_.aaxis:_.baxis,A=w.smoothing,E=x==="a"?_.a2i:_.b2j,p=x==="a"?M:e,b=x==="a"?e:M,d=x==="a"?S.a.length:S.b.length,u=x==="a"?S.b.length:S.a.length,g=Math.floor(x==="a"?_.b2j(b):_.a2i(b)),y=x==="a"?function(ue){return _.evalxy([],ue,g)}:function(ue){return _.evalxy([],g,ue)};A&&(o=Math.max(0,Math.min(u-2,g)),a=g-o,r=x==="a"?function(ue,ce){return _.dxydi([],ue,o,ce,a)}:function(ue,ce){return _.dxydj([],o,ue,a,ce)});var D=E(p[0]),P=E(p[1]),z=D0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,L=z>0?Math.min:Math.max,U=z>0?Math.max:Math.min,B=N(D+F),W=O(P-F);s=y(D);var $=[[s]];for(t=B;t*z=0;pe--)j=U.clipsegments[pe],ee=_([],j.x,D.c2p),te=_([],j.y,P.c2p),ee.reverse(),te.reverse(),we.push(S(ee,te,j.bicubic));var Se="M"+we.join("L")+"Z";A(F,U.clipsegments,D,P,ce,Y),E(O,F,D,P,ae,Q,X,L,U,Y,Se),c(F,ue,d,N,$,u,L),M.setClipUrl(F,L._clipPathId,d)})};function m(b,d){var u,g,y,D,P,z,F,N,O;for(u=0;uue&&(g.max=ue),g.len=g.max-g.min}function l(b,d,u){var g=b.getPointAtLength(d),y=b.getPointAtLength(u),D=y.x-g.x,P=y.y-g.y,z=Math.sqrt(D*D+P*P);return[D/z,P/z]}function x(b){var d=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/d,b[1]/d]}function w(b,d){var u=Math.abs(b[0]*d[0]+b[1]*d[1]),g=Math.sqrt(1-u*u);return g/u}function A(b,d,u,g,y,D){var P,z,F,N,O=e.ensureSingle(b,"g","contourbg"),L=O.selectAll("path").data(D==="fill"&&!y?[0]:[]);L.enter().append("path"),L.exit().remove();var U=[];for(N=0;N=0&&(B=ee,$=ue):Math.abs(U[1]-B[1])=0&&(B=ee,$=ue):e.log("endpt to newendpt is not vert. or horz.",U,B,ee)}if($>=0)break;N+=ae(U,B),U=B}if($===d.edgepaths.length){e.log("unclosed perimeter path");break}F=$,L=O.indexOf(F)===-1,L&&(F=O[0],N+=ae(U,B)+"Z",U=null)}for(F=0;Fp):E=z>y,p=z;var F=m(y,D,P,z);F.pos=g,F.yc=(y+z)/2,F.i=u,F.dir=E?"increasing":"decreasing",F.x=F.pos,F.y=[P,D],b&&(F.orig_p=s[u]),w&&(F.tx=n.text[u]),A&&(F.htx=n.hovertext[u]),d.push(F)}else d.push({pos:g,empty:!0})}return n._extremes[f._id]=S.findExtremes(f,v.concat(l,T),{padded:!0}),d.length&&(d[0].t={labels:{open:_(i,"open:")+" ",high:_(i,"high:")+" ",low:_(i,"low:")+" ",close:_(i,"close:")+" "}}),d}function a(i,n,s){var h=s._minDiff;if(!h){var f=i._fullData,m=[];h=1/0;var c;for(c=0;c"+x.labels[g]+v.hoverLabelText(T,y,l.yhoverformat)):(P=_.extendFlat({},A),P.y0=P.y1=D,P.yLabelVal=y,P.yLabel=x.labels[g]+v.hoverLabelText(T,y,l.yhoverformat),P.name="",w.push(P),d[y]=P)}return w}function n(s,h,f,m){var c=s.cd,T=s.ya,l=c[0].trace,x=c[0].t,w=a(s,h,f,m);if(!w)return[];var A=w.index,E=c[A],p=w.index=E.i,b=E.dir;function d(F){return x.labels[F]+v.hoverLabelText(T,l[F][p],l.yhoverformat)}var u=E.hi||l.hoverinfo||"",g=u.split("+"),y=u==="all",D=y||g.indexOf("y")!==-1,P=y||g.indexOf("text")!==-1,z=D?[d("open"),d("high"),d("low"),d("close")+" "+r[b]]:[];return P&&e(E,l,z),w.extraText=z.join("
"),w.y0=w.y1=T.c2p(E.yc,!0),[w]}q.exports={hoverPoints:o,hoverSplit:i,hoverOnPoints:n}}}),rk=He({"src/traces/ohlc/select.js"(Z,q){"use strict";q.exports=function(_,S){var M=_.cd,e=_.xaxis,t=_.yaxis,r=[],o,a=M[0].t.bPos||0;if(S===!1)for(o=0;oh?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var x=a.c2l(l)-s;return(T(x)?x:0)+c},a.g2c=function(l){return a.l2c(l+s-c)},a.g2p=function(l){return l*m},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,i){return i==="degrees"?S(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,h=a.c2d;a.d2c=function(f,m){return t(s(f),m)},a.c2d=function(f,m){return h(r(f,m))}}a.makeCalcdata=function(f,m){var c=f[m],T=f._length,l,x,w=function(d){return a.d2c(d,f.thetaunit)};if(c)for(l=new Array(T),x=0;x0?d:1/0},E=S(w,A),p=v.mod(E+1,w.length);return[w[E],w[p]]}function m(x){return Math.abs(x)>1e-10?x:0}function c(x,w,A){w=w||0,A=A||0;for(var E=x.length,p=new Array(E),b=0;b0?1:0}function _(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 S(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=S(r,_([a,o])),s=n[0],h=n[1],f=S(r,_([i,o])),m=f[0],c=f[1];if(o===0)return["M"+s+","+h,"L"+m+","+c].join(" ");var T=M(r,1/Math.abs(o));return["M"+s+","+h,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+m+","+c].join(" ")}function t(r,o,a,i){var n=M(r,1/(o+1)),s=S(r,_([o,a])),h=s[0],f=s[1],m=S(r,_([o,i])),c=m[0],T=m[1];if(v(a)!==v(i)){var l=S(r,_([o,0])),x=l[0],w=l[1];return["M"+h+","+f,"A"+n+","+n+" 0 0,"+(0at?(nt=te,tt=te*at,se=(pe-tt)/V.h/2,Ve=[j[0],j[1]],he=[ee[0]+se,ee[1]-se]):(nt=pe/at,tt=pe,se=(te-nt)/V.w/2,Ve=[j[0]+se,j[1]-se],he=[ee[0],ee[1]]),X.xLength2=nt,X.yLength2=tt,X.xDomain2=Ve,X.yDomain2=he;var ne=X.xOffset2=V.l+V.w*Ve[0],Ce=X.yOffset2=V.t+V.h*(1-he[1]),Ze=X.radius=nt/Re,rt=X.innerRadius=X.getHole(Y)*Ze,Je=X.cx=ne-Ze*Se[0],St=X.cy=Ce+Ze*Se[3],kt=X.cxx=Je-ne,Bt=X.cyy=St-Ce,Vt=le.side,Ar;Vt==="counterclockwise"?(Ar=Vt,Vt="top"):Vt==="clockwise"&&(Ar=Vt,Vt="bottom"),X.radialAxis=X.mockAxis(de,Y,le,{_id:"x",side:Vt,_trueSide:Ar,domain:[rt/V.w,Ze/V.w]}),X.angularAxis=X.mockAxis(de,Y,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(de,Y),X.updateAngularAxis(de,Y),X.updateRadialAxis(de,Y),X.updateRadialAxisTitle(de,Y),X.xaxis=X.mockCartesianAxis(de,Y,{_id:"x",domain:Ve}),X.yaxis=X.mockCartesianAxis(de,Y,{_id:"y",domain:he});var vr=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",vr).attr("transform",t(kt,Bt)),Q.frontplot.attr("transform",t(ne,Ce)).call(o.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),Q.bg.attr("d",vr).attr("transform",t(Je,St)).call(r.fill,Y.bgcolor)},B.mockAxis=function(de,Y,X,Q){var V=M.extendFlat({},X,Q);return s(V,Y,de),V},B.mockCartesianAxis=function(de,Y,X){var Q=this,V=Q.isSmith,le=X._id,ae=M.extendFlat({type:"linear"},X);n(ae,de);var j={x:[0,2],y:[1,3]};return ae.setRange=function(){var ee=Q.sectorBBox,te=j[le],pe=Q.radialAxis._rl,we=(pe[1]-pe[0])/(1-Q.getHole(Y));ae.range=[ee[te[0]]*we,ee[te[1]]*we]},ae.isPtWithinRange=le==="x"&&!V?function(ee){return Q.isPtInside(ee)}:function(){return!0},ae.setRange(),ae.setScale(),ae},B.doAutoRange=function(de,Y){var X=this,Q=X.gd,V=X.radialAxis,le=X.getRadial(Y);h(Q,V);var ae=V.range;if(le.range=ae.slice(),le._input.range=ae.slice(),V._rl=[V.r2l(ae[0],null,"gregorian"),V.r2l(ae[1],null,"gregorian")],V.minallowed!==void 0){var j=V.r2l(V.minallowed);V._rl[0]>V._rl[1]?V._rl[1]=Math.max(V._rl[1],j):V._rl[0]=Math.max(V._rl[0],j)}if(V.maxallowed!==void 0){var ee=V.r2l(V.maxallowed);V._rl[0]90&&pe<=270&&(we.tickangle=180);var Pe=Re?function(Ze){var rt=z(X,y([Ze.x,0]));return t(rt[0]-j,rt[1]-ee)}:function(Ze){return t(we.l2p(Ze.x)+ae,0)},je=Re?function(Ze){return P(X,Ze.x,-1/0,1/0)}:function(Ze){return X.pathArc(we.r2p(Ze.x)+ae)},at=W(te);if(X.radialTickLayout!==at&&(V["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=at),Se){we.setScale();var nt=0,tt=Re?(we.tickvals||[]).filter(function(Ze){return Ze>=0}).map(function(Ze){return i.tickText(we,Ze,!0,!1)}):i.calcTicks(we),Ve=Re?tt:i.clipEnds(we,tt),he=i.getTickSigns(we)[2];Re&&((we.ticks==="top"&&we.side==="bottom"||we.ticks==="bottom"&&we.side==="top")&&(he=-he),we.ticks==="top"&&we.side==="top"&&(nt=-we.ticklen),we.ticks==="bottom"&&we.side==="bottom"&&(nt=we.ticklen)),i.drawTicks(Q,we,{vals:tt,layer:V["radial-axis"],path:i.makeTickPath(we,0,he),transFn:Pe,crisp:!1}),i.drawGrid(Q,we,{vals:Ve,layer:V["radial-grid"],path:je,transFn:M.noop,crisp:!1}),i.drawLabels(Q,we,{vals:tt,layer:V["radial-axis"],transFn:Pe,labelFns:i.makeLabelFns(we,nt)})}var se=X.radialAxisAngle=X.vangles?L(ue(O(te.angle),X.vangles)):te.angle,ne=t(j,ee),Ce=ne+e(-se);ce(V["radial-axis"],Se&&(te.showticklabels||te.ticks),{transform:Ce}),ce(V["radial-grid"],Se&&te.showgrid,{transform:Re?"":ne}),ce(V["radial-line"].select("line"),Se&&te.showline,{x1:Re?-le:ae,y1:0,x2:le,y2:0,transform:Ce}).attr("stroke-width",te.linewidth).call(r.stroke,te.linecolor)},B.updateRadialAxisTitle=function(de,Y,X){if(!this.isSmith){var Q=this,V=Q.gd,le=Q.radius,ae=Q.cx,j=Q.cy,ee=Q.getRadial(Y),te=Q.id+"title",pe=0;if(ee.title){var we=o.bBox(Q.layers["radial-axis"].node()).height,Se=ee.title.font.size,Re=ee.side;pe=Re==="top"?Se:Re==="counterclockwise"?-(we+Se*.4):we+Se*.8}var Pe=X!==void 0?X:Q.radialAxisAngle,je=O(Pe),at=Math.cos(je),nt=Math.sin(je),tt=ae+le/2*at+pe*nt,Ve=j-le/2*nt+pe*at;Q.layers["radial-axis-title"]=T.draw(V,te,{propContainer:ee,propName:Q.id+".radialaxis.title.text",placeholder:F(V,"Click to enter radial axis title"),attributes:{x:tt,y:Ve,"text-anchor":"middle"},transform:{rotate:-Pe}})}},B.updateAngularAxis=function(de,Y){var X=this,Q=X.gd,V=X.layers,le=X.radius,ae=X.innerRadius,j=X.cx,ee=X.cy,te=X.getAngular(Y),pe=X.angularAxis,we=X.isSmith;we||(X.fillViewInitialKey("angularaxis.rotation",te.rotation),pe.setGeometry(),pe.setScale());var Se=we?function(rt){var Je=z(X,y([0,rt.x]));return Math.atan2(Je[0]-j,Je[1]-ee)-Math.PI/2}:function(rt){return pe.t2g(rt.x)};pe.type==="linear"&&pe.thetaunit==="radians"&&(pe.tick0=L(pe.tick0),pe.dtick=L(pe.dtick));var Re=function(rt){return t(j+le*Math.cos(rt),ee-le*Math.sin(rt))},Pe=we?function(rt){var Je=z(X,y([0,rt.x]));return t(Je[0],Je[1])}:function(rt){return Re(Se(rt))},je=we?function(rt){var Je=z(X,y([0,rt.x])),St=Math.atan2(Je[0]-j,Je[1]-ee)-Math.PI/2;return t(Je[0],Je[1])+e(-L(St))}:function(rt){var Je=Se(rt);return Re(Je)+e(-L(Je))},at=we?function(rt){return D(X,rt.x,0,1/0)}:function(rt){var Je=Se(rt),St=Math.cos(Je),kt=Math.sin(Je);return"M"+[j+ae*St,ee-ae*kt]+"L"+[j+le*St,ee-le*kt]},nt=i.makeLabelFns(pe,0),tt=nt.labelStandoff,Ve={};Ve.xFn=function(rt){var Je=Se(rt);return Math.cos(Je)*tt},Ve.yFn=function(rt){var Je=Se(rt),St=Math.sin(Je)>0?.2:1;return-Math.sin(Je)*(tt+rt.fontSize*St)+Math.abs(Math.cos(Je))*(rt.fontSize*b)},Ve.anchorFn=function(rt){var Je=Se(rt),St=Math.cos(Je);return Math.abs(St)<.1?"middle":St>0?"start":"end"},Ve.heightFn=function(rt,Je,St){var kt=Se(rt);return-.5*(1+Math.sin(kt))*St};var he=W(te);X.angularTickLayout!==he&&(V["angular-axis"].selectAll("."+pe._id+"tick").remove(),X.angularTickLayout=he);var se=we?[1/0].concat(pe.tickvals||[]).map(function(rt){return i.tickText(pe,rt,!0,!1)}):i.calcTicks(pe);we&&(se[0].text="\u221E",se[0].fontSize*=1.75);var ne;if(Y.gridshape==="linear"?(ne=se.map(Se),M.angleDelta(ne[0],ne[1])<0&&(ne=ne.slice().reverse())):ne=null,X.vangles=ne,pe.type==="category"&&(se=se.filter(function(rt){return M.isAngleInsideSector(Se(rt),X.sectorInRad)})),pe.visible){var Ce=pe.ticks==="inside"?-1:1,Ze=(pe.linewidth||1)/2;i.drawTicks(Q,pe,{vals:se,layer:V["angular-axis"],path:"M"+Ce*Ze+",0h"+Ce*pe.ticklen,transFn:je,crisp:!1}),i.drawGrid(Q,pe,{vals:se,layer:V["angular-grid"],path:at,transFn:M.noop,crisp:!1}),i.drawLabels(Q,pe,{vals:se,layer:V["angular-axis"],repositionOnUpdate:!0,transFn:Pe,labelFns:Ve})}ce(V["angular-line"].select("path"),te.showline,{d:X.pathSubplot(),transform:t(j,ee)}).attr("stroke-width",te.linewidth).call(r.stroke,te.linecolor)},B.updateFx=function(de,Y){if(!this.gd._context.staticPlot){var X=!this.isSmith;X&&(this.updateAngularDrag(de),this.updateRadialDrag(de,Y,0),this.updateRadialDrag(de,Y,1)),this.updateHoverAndMainDrag(de)}},B.updateHoverAndMainDrag=function(de){var Y=this,X=Y.isSmith,Q=Y.gd,V=Y.layers,le=de._zoomlayer,ae=d.MINZOOM,j=d.OFFEDGE,ee=Y.radius,te=Y.innerRadius,pe=Y.cx,we=Y.cy,Se=Y.cxx,Re=Y.cyy,Pe=Y.sectorInRad,je=Y.vangles,at=Y.radialAxis,nt=u.clampTiny,tt=u.findXYatLength,Ve=u.findEnclosingVertexAngles,he=d.cornerHalfWidth,se=d.cornerLen/2,ne,Ce,Ze=f.makeDragger(V,"path","maindrag",de.dragmode===!1?"none":"crosshair");v.select(Ze).attr("d",Y.pathSubplot()).attr("transform",t(pe,we)),Ze.onmousemove=function(or){c.hover(Q,or,Y.id),Q._fullLayout._lasthover=Ze,Q._fullLayout._hoversubplot=Y.id},Ze.onmouseout=function(or){Q._dragging||m.unhover(Q,or)};var rt={element:Ze,gd:Q,subplot:Y.id,plotinfo:{id:Y.id,xaxis:Y.xaxis,yaxis:Y.yaxis},xaxes:[Y.xaxis],yaxes:[Y.yaxis]},Je,St,kt,Bt,Vt,Ar,vr,qr,kr;function Ur(or,nr){return Math.sqrt(or*or+nr*nr)}function _t(or,nr){return Ur(or-Se,nr-Re)}function Fe(or,nr){return Math.atan2(Re-nr,or-Se)}function Ye(or,nr){return[or*Math.cos(nr),or*Math.sin(-nr)]}function Ae(or,nr){if(or===0)return Y.pathSector(2*he);var Pr=se/or,_a=nr-Pr,Fa=nr+Pr,Ra=Math.max(0,Math.min(or,ee)),qa=Ra-he,Wa=Ra+he;return"M"+Ye(qa,_a)+"A"+[qa,qa]+" 0,0,0 "+Ye(qa,Fa)+"L"+Ye(Wa,Fa)+"A"+[Wa,Wa]+" 0,0,1 "+Ye(Wa,_a)+"Z"}function Le(or,nr,Pr){if(or===0)return Y.pathSector(2*he);var _a=Ye(or,nr),Fa=Ye(or,Pr),Ra=nt((_a[0]+Fa[0])/2),qa=nt((_a[1]+Fa[1])/2),Wa,Ca;if(Ra&&qa){var hi=qa/Ra,wi=-1/hi,Yt=tt(he,hi,Ra,qa);Wa=tt(se,wi,Yt[0][0],Yt[0][1]),Ca=tt(se,wi,Yt[1][0],Yt[1][1])}else{var Rt,Zt;qa?(Rt=se,Zt=he):(Rt=he,Zt=se),Wa=[[Ra-Rt,qa-Zt],[Ra+Rt,qa-Zt]],Ca=[[Ra-Rt,qa+Zt],[Ra+Rt,qa+Zt]]}return"M"+Wa.join("L")+"L"+Ca.reverse().join("L")+"Z"}function We(){kt=null,Bt=null,Vt=Y.pathSubplot(),Ar=!1;var or=Q._fullLayout[Y.id];vr=_(or.bgcolor).getLuminance(),qr=f.makeZoombox(le,vr,pe,we,Vt),qr.attr("fill-rule","evenodd"),kr=f.makeCorners(le,pe,we),w(Q)}function Ke(or,nr){return nr=Math.max(Math.min(nr,ee),te),orae?(or-1&&or===1&&x(nr,Q,[Y.xaxis],[Y.yaxis],Y.id,rt),Pr.indexOf("event")>-1&&c.click(Q,nr,Y.id)}rt.prepFn=function(or,nr,Pr){var _a=Q._fullLayout.dragmode,Fa=Ze.getBoundingClientRect();Q._fullLayout._calcInverseTransform(Q);var Ra=Q._fullLayout._invTransform;ne=Q._fullLayout._invScaleX,Ce=Q._fullLayout._invScaleY;var qa=M.apply3DTransform(Ra)(nr-Fa.left,Pr-Fa.top);if(Je=qa[0],St=qa[1],je){var Wa=u.findPolygonOffset(ee,Pe[0],Pe[1],je);Je+=Se+Wa[0],St+=Re+Wa[1]}switch(_a){case"zoom":rt.clickFn=cr,X||(je?rt.moveFn=Ct:rt.moveFn=ot,rt.doneFn=Pt,We(or,nr,Pr));break;case"select":case"lasso":l(or,nr,Pr,rt,_a);break}},m.init(rt)},B.updateRadialDrag=function(de,Y,X){var Q=this,V=Q.gd,le=Q.layers,ae=Q.radius,j=Q.innerRadius,ee=Q.cx,te=Q.cy,pe=Q.radialAxis,we=d.radialDragBoxSize,Se=we/2;if(!pe.visible)return;var Re=O(Q.radialAxisAngle),Pe=pe._rl,je=Pe[0],at=Pe[1],nt=Pe[X],tt=.75*(Pe[1]-Pe[0])/(1-Q.getHole(Y))/ae,Ve,he,se;X?(Ve=ee+(ae+Se)*Math.cos(Re),he=te-(ae+Se)*Math.sin(Re),se="radialdrag"):(Ve=ee+(j-Se)*Math.cos(Re),he=te-(j-Se)*Math.sin(Re),se="radialdrag-inner");var ne=f.makeRectDragger(le,se,"crosshair",-Se,-Se,we,we),Ce={element:ne,gd:V};de.dragmode===!1&&(Ce.dragmode=!1),ce(v.select(ne),pe.visible&&j0!=(X?Je>je:Je=90||V>90&&le>=450?Re=1:j<=0&&te<=0?Re=0:Re=Math.max(j,te),V<=180&&le>=180||V>180&&le>=540?pe=-1:ae>=0&&ee>=0?pe=0:pe=Math.min(ae,ee),V<=270&&le>=270||V>270&&le>=630?we=-1:j>=0&&te>=0?we=0:we=Math.min(j,te),le>=360?Se=1:ae<=0&&ee<=0?Se=0:Se=Math.max(ae,ee),[pe,we,Se,Re]}function ue(de,Y){var X=function(V){return M.angleDist(de,V)},Q=M.findIndexOfMin(Y,X);return Y[Q]}function ce(de,Y,X){return Y?(de.attr("display",null),de.attr(X)):de&&de.attr("display","none"),de}}}),sk=He({"src/plots/polar/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=Xh(),S=wc().attributes,M=sa().extendFlat,e=pc().overrideAll,t=e({color:_.color,showline:M({},_.showline,{dflt:!0}),linecolor:_.linecolor,linewidth:_.linewidth,showgrid:M({},_.showgrid,{dflt:!0}),gridcolor:_.gridcolor,gridwidth:_.gridwidth,griddash:_.griddash},"plot","from-root"),r=e({tickmode:_.minor.tickmode,nticks:_.nticks,tick0:_.tick0,dtick:_.dtick,tickvals:_.tickvals,ticktext:_.ticktext,ticks:_.ticks,ticklen:_.ticklen,tickwidth:_.tickwidth,tickcolor:_.tickcolor,ticklabelstep:_.ticklabelstep,showticklabels:_.showticklabels,labelalias:_.labelalias,minorloglabels:_.minorloglabels,showtickprefix:_.showtickprefix,tickprefix:_.tickprefix,showticksuffix:_.showticksuffix,ticksuffix:_.ticksuffix,showexponent:_.showexponent,exponentformat:_.exponentformat,minexponent:_.minexponent,separatethousands:_.separatethousands,tickfont:_.tickfont,tickangle:_.tickangle,tickformat:_.tickformat,tickformatstops:_.tickformatstops,layer:_.layer},"plot","from-root"),o={visible:M({},_.visible,{dflt:!0}),type:M({},_.type,{values:["-","linear","log","date","category"]}),autotypenumbers:_.autotypenumbers,autorangeoptions:{minallowed:_.autorangeoptions.minallowed,maxallowed:_.autorangeoptions.maxallowed,clipmin:_.autorangeoptions.clipmin,clipmax:_.autorangeoptions.clipmax,include:_.autorangeoptions.include,editType:"plot"},autorange:M({},_.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:M({},_.minallowed,{editType:"plot"}),maxallowed:M({},_.maxallowed,{editType:"plot"}),range:M({},_.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:_.categoryorder,categoryarray:_.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:_.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:M({},_.title.text,{editType:"plot",dflt:""}),font:M({},_.title.font,{editType:"plot"}),editType:"plot"},hoverformat:_.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(o,t,r);var a={visible:M({},_.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:_.autotypenumbers,categoryorder:_.categoryorder,categoryarray:_.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:_.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(a,t,r),q.exports={domain:S({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:v.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),MH=He({"src/plots/polar/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=zl(),M=s0(),e=Wh().getSubplotData,t=Y0(),r=t1(),o=e0(),a=t0(),i=I2(),n=z_(),s=f5(),h=a1(),f=sk(),m=ik(),c=DT(),T=c.axisNames;function l(w,A,E,p){var b=E("bgcolor");p.bgColor=_.combine(b,p.paper_bgcolor);var d=E("sector");E("hole");var u=e(p.fullData,c.name,p.id),g=p.layoutOut,y;function D(we,Se){return E(y+"."+we,Se)}for(var P=0;P")}}q.exports={hoverPoints:_,makeHoverPointText:S}}}),CH=He({"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:dp(),formatLabels:BT(),calc:EH(),plot:kH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),LH=He({"lib/scatterpolar.js"(Z,q){"use strict";q.exports=CH()}}),lk=He({"src/traces/scatterpolargl/attributes.js"(Z,q){"use strict";var v=Cx(),{cliponaxis:_,hoveron:S}=v,M=Qs(v,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:i,marker:n,textfont:s,textposition:h}=xx();q.exports=vs(So({},M),{connectgaps:e,fill:a,fillcolor:i,line:{color:t,dash:r,editType:"calc",width:o},marker:n,textfont:s,textposition:h})}}),PH=He({"src/traces/scatterpolargl/defaults.js"(Z,q){"use strict";var v=sa(),_=Fu(),S=OT().handleRThetaDefaults,M=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=lk();q.exports=function(n,s,h,f){function m(T,l){return v.coerce(n,s,a,T,l)}var c=S(n,s,f,m);if(!c){s.visible=!1;return}m("thetaunit"),m("mode",c=r&&(p.marker.cluster=x.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=g),p.line&&g.length>1&&t.extendFlat(p.line,e.linePositions(i,l,g)),p.text&&(t.extendFlat(p.text,{positions:g},e.textPosition(i,l,p.text,p.marker)),t.extendFlat(p.textSel,{positions:g},e.textPosition(i,l,p.text,p.markerSel)),t.extendFlat(p.textUnsel,{positions:g},e.textPosition(i,l,p.text,p.markerUnsel))),p.fill&&!m.fill2d&&(m.fill2d=!0),p.marker&&!m.scatter2d&&(m.scatter2d=!0),p.line&&!m.line2d&&(m.line2d=!0),p.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(p.line),m.fillOptions.push(p.fill),m.markerOptions.push(p.marker),m.markerSelectedOptions.push(p.markerSel),m.markerUnselectedOptions.push(p.markerUnsel),m.textOptions.push(p.text),m.textSelectedOptions.push(p.textSel),m.textUnselectedOptions.push(p.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),x.x=y,x.y=D,x.rawx=y,x.rawy=D,x.r=A,x.theta=E,x.positions=g,x._scene=m,x.index=m.count,m.count++}}),S(i,n,s)}},q.exports.reglPrecompiled=o}}),OH=He({"src/traces/scatterpolargl/index.js"(Z,q){"use strict";var v=zH();v.plot=FH(),q.exports=v}}),BH=He({"lib/scatterpolargl.js"(Z,q){"use strict";q.exports=OH()}}),uk=He({"src/traces/barpolar/attributes.js"(Z,q){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:_}=$l(),S=rs().extendFlat,M=Cx(),e=Sv();q.exports={r:M.r,theta:M.theta,r0:M.r0,dr:M.dr,theta0:M.theta0,dtheta:M.dtheta,thetaunit:M.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:M.hoverinfo,hovertemplate:v(),hovertemplatefallback:_(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),ck=He({"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"}}}}),NH=He({"src/traces/barpolar/defaults.js"(Z,q){"use strict";var v=sa(),_=OT().handleRThetaDefaults,S=j2(),M=uk();q.exports=function(t,r,o,a){function i(s,h){return v.coerce(t,r,M,s,h)}var n=_(t,r,a,i);if(!n){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),S(t,r,i,o,a),v.coerceSelectionMarkerOpacity(r,i)}}}),UH=He({"src/traces/barpolar/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=ck();q.exports=function(S,M,e){var t={},r;function o(n,s){return v.coerce(S[r]||{},M[r],_,n,s)}for(var a=0;a0?(f=s,m=h):(f=h,m=s);var c=e.findEnclosingVertexAngles(f,r.vangles)[0],T=e.findEnclosingVertexAngles(m,r.vangles)[1],l=[c,(f+m)/2,T];return e.pathPolygonAnnulus(i,n,f,m,l,o,a)}:function(i,n,s,h){return S.pathAnnulus(i,n,s,h,o,a)}}}}),qH=He({"src/traces/barpolar/hover.js"(Z,q){"use strict";var v=Hc(),_=sa(),S=f1().getTraceColor,M=_.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;q.exports=function(o,a,i){var n=o.cd,s=n[0].trace,h=o.subplot,f=h.radialAxis,m=h.angularAxis,c=h.vangles,T=c?t:_.isPtInsideSector,l=o.maxHoverDistance,x=m._period||2*Math.PI,w=Math.abs(f.g2p(Math.sqrt(a*a+i*i))),A=Math.atan2(i,a);f.range[0]>f.range[1]&&(A+=Math.PI);var E=function(u){return T(w,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],c)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/x)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(n,E,o),o.index!==!1){var p=o.index,b=n[p];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var d=_.extendFlat({},b,{r:b.s,theta:b.p});return M(b,s,o),e(d,s,h,o),o.hovertemplate=s.hovertemplate,o.color=S(s,b),o.xLabelVal=o.yLabelVal=void 0,b.s<0&&(o.idealAlign="left"),[o]}}}}),VH=He({"src/traces/barpolar/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:uk(),layoutAttributes:ck(),supplyDefaults:NH(),supplyLayoutDefaults:UH(),calc:fk().calc,crossTraceCalc:fk().crossTraceCalc,plot:jH(),colorbar:dp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:qH(),selectPoints:h1(),meta:{}}}}),GH=He({"lib/barpolar.js"(Z,q){"use strict";q.exports=VH()}}),hk=He({"src/plots/smith/constants.js"(Z,q){"use strict";q.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),pk=He({"src/plots/smith/layout_attributes.js"(Z,q){"use strict";var v=sh(),_=Xh(),S=wc().attributes,M=sa().extendFlat,e=pc().overrideAll,t=e({color:_.color,showline:M({},_.showline,{dflt:!0}),linecolor:_.linecolor,linewidth:_.linewidth,showgrid:M({},_.showgrid,{dflt:!0}),gridcolor:_.gridcolor,gridwidth:_.gridwidth,griddash:_.griddash},"plot","from-root"),r=e({ticklen:_.ticklen,tickwidth:M({},_.tickwidth,{dflt:2}),tickcolor:_.tickcolor,showticklabels:_.showticklabels,labelalias:_.labelalias,showtickprefix:_.showtickprefix,tickprefix:_.tickprefix,showticksuffix:_.showticksuffix,ticksuffix:_.ticksuffix,tickfont:_.tickfont,tickformat:_.tickformat,hoverformat:_.hoverformat,layer:_.layer},"plot","from-root"),o=M({visible:M({},_.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:M({},_.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({},_.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:_.ticks,editType:"calc"},t,r);q.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),HH=He({"src/plots/smith/layout_defaults.js"(Z,q){"use strict";var v=sa(),_=$n(),S=zl(),M=s0(),e=Wh().getSubplotData,t=t0(),r=e0(),o=z_(),a=wv(),i=pk(),n=hk(),s=n.axisNames,h=m(function(c){return v.isTypedArray(c)&&(c=Array.from(c)),c.slice().reverse().map(function(T){return-T}).concat([0]).concat(c)},String);function f(c,T,l,x){var w=l("bgcolor");x.bgColor=_.combine(w,x.paper_bgcolor);var A=e(x.fullData,n.name,x.id),E=x.layoutOut,p;function b(B,W){return l(p+"."+B,W)}for(var d=0;d")}}q.exports={hoverPoints:_,makeHoverPointText:S}}}),$H=He({"src/traces/scattersmith/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scattersmith",basePlotModule:WH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:dk(),supplyDefaults:XH(),colorbar:dp(),formatLabels:ZH(),calc:YH(),plot:KH(),style:Qp().style,styleOnSelect:Qp().styleOnSelect,hoverPoints:JH().hoverPoints,selectPoints:c1(),meta:{}}}}),QH=He({"lib/scattersmith.js"(Z,q){"use strict";q.exports=$H()}}),Mp=He({"node_modules/world-calendars/dist/main.js"(Z,q){var v=ch();function _(){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={}}v(_.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 h=i%10;n=(h===0?"":o[h]+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 S(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}v(S.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"}v(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 S(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 h=o.year()+(i==="y"?a:0),f=o.monthOfYear()+(i==="m"?a:0),s=o.day(),m=function(l){for(;fx-1+l.minMonth;)h++,f-=x,x=l.monthsInYear(h)};i==="y"?(o.month()!==this.fromMonthOfYear(h,f)&&(f=this.newDate(h,o.month(),this.minDay).monthOfYear()),f=Math.min(f,this.monthsInYear(h)),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,f)))):i==="m"&&(m(this),s=Math.min(s,this.daysInMonth(h,this.fromMonthOfYear(h,f))));var c=[h,this.fromMonthOfYear(h,f),s];return this._validateLevel--,c}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],h=i<0?-1:1;a=this._add(o,i*s[0]+h*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(),h=i==="d"?a:o.day();return(i==="y"||i==="m")&&(h=Math.min(h,this.daysInMonth(n,s))),o.date(n,s,h)},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.minDay&&i-this.minDay13.5?13:1),T=s-(c>2.5?4716:4715);return T<=0&&T--,this.newDate(T,c,m)},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 _;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),eW=He({"node_modules/world-calendars/dist/plus.js"(){var Z=ch(),q=Mp();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(v,_){return typeof v!="string"&&(_=v,v=""),this._calendar.formatDate(v||"",this,_)}}),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(v,_,S){if(typeof v!="string"&&(S=_,_=v,v=""),!_)return"";if(_.calendar()!==this)throw q.local.invalidFormat||q.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,S=S||{};for(var M=S.dayNamesShort||this.local.dayNamesShort,e=S.dayNames||this.local.dayNames,t=S.monthNumbers||this.local.monthNumbers,r=S.monthNamesShort||this.local.monthNamesShort,o=S.monthNames||this.local.monthNames,a=S.calculateWeek||this.local.calculateWeek,i=function(A,E){for(var p=1;w+p1},n=function(A,E,p,b){var d=""+E;if(i(A,b))for(;d.length1},x=function(D,P){var z=l(D,P),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],N=new RegExp("^-?\\d{1,"+F+"}"),O=_.substring(d).match(N);if(!O)throw(q.local.missingNumberAt||q.regionalOptions[""].missingNumberAt).replace(/\{0\}/,d);return d+=O[0].length,parseInt(O[0],10)},w=this,A=function(){if(typeof o=="function"){l("m");var D=o.call(w,_.substring(d));return d+=D.length,D}return x("m")},E=function(D,P,z,F){for(var N=l(D,F)?z:P,O=0;O-1){h=1,f=m;for(var y=this.daysInMonth(s,h);f>y;y=this.daysInMonth(s,h))h++,f-=y}return n>-1?this.fromJD(n):this.newDate(s,h,f)},determineDate:function(v,_,S,M,e){S&&typeof S!="object"&&(e=M,M=S,S=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/)&&S?S.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 _=_?_.newDate():null,v=v==null?_:typeof v=="string"?r(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?_:t.today().add(v,"d"):t.newDate(v),v}})}}),tW=He({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 h=n.match(M);return h?h[0]:""}var f=this._validateYear(n),m=n.month(),c=""+this.toChineseMonth(f,m);return s&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(f,m)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var s=n.match(e);return s?s[0]:""}var h=this._validateYear(n),f=n.month(),m=this.toChineseMonth(h,f),c=["\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"][m-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},monthNamesShort:function(n){if(typeof n=="string"){var s=n.match(t);return s?s[0]:""}var h=this._validateYear(n),f=n.month(),m=this.toChineseMonth(h,f),c=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][m-1];return this.isIntercalaryMonth(h,f)&&(c="\u95F0"+c),c},parseMonth:function(n,s){n=this._validateYear(n);var h=parseInt(s),f;if(isNaN(h))s[0]==="\u95F0"&&(f=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),h=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var m=s[s.length-1];f=m==="i"||m==="I"}var c=this.toMonthIndex(n,h,f);return c},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,h){var f=this.intercalaryMonth(n),m=h&&s!==f;if(m||s<1||s>12)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c;return f?!h&&s<=f?c=s-1:c=s:c=s-1,c},toChineseMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var h=this.intercalaryMonth(n),f=h?12:11;if(s<0||s>f)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?s>13;return h},isIntercalaryMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var h=this.intercalaryMonth(n);return!!h&&h===s},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,s,h){var f=this._validateYear(n,Z.local.invalidyear),m=o[f-o[0]],c=m>>9&4095,T=m>>5&15,l=m&31,x;x=v.newDate(c,T,l),x.add(4-(x.dayOfWeek()||7),"d");var w=this.toJD(n,s,h)-x.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 h=r[n-r[0]],f=h>>13,m=f?12:11;if(s>m)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var c=h&1<<12-s?30:29;return c},weekDay:function(n,s,h){return(this.dayOfWeek(n,s,h)||7)<6},toJD:function(n,s,h){var f=this._validate(n,c,h,Z.local.invalidDate);n=this._validateYear(f.year()),s=f.month(),h=f.day();var m=this.isIntercalaryMonth(n,s),c=this.toChineseMonth(n,s),T=i(n,c,h,m);return v.toJD(T.year,T.month,T.day)},fromJD:function(n){var s=v.fromJD(n),h=a(s.year(),s.month(),s.day()),f=this.toMonthIndex(h.year,h.month,h.isIntercalary);return this.newDate(h.year,f,h.day)},fromString:function(n){var s=n.match(S),h=this._validateYear(+s[1]),f=+s[2],m=!!s[3],c=this.toMonthIndex(h,f,m),T=+s[4];return this.newDate(h,c,T)},add:function(n,s,h){var f=n.year(),m=n.month(),c=this.isIntercalaryMonth(f,m),T=this.toChineseMonth(f,m),l=Object.getPrototypeOf(_.prototype).add.call(this,n,s,h);if(h==="y"){var x=l.year(),w=l.month(),A=this.isIntercalaryMonth(x,T),E=c&&A?this.toMonthIndex(x,T,!0):this.toMonthIndex(x,T,!1);E!==w&&l.month(E)}return l}});var S=/^\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=_;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,h,f){var m,c;if(typeof n=="object")m=n,c=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 x=typeof h=="number"&&h>=1&&h<=31;if(!x)throw new Error("Solar day outside range 1 - 31");m={year:n,month:s,day:h},c=f||{}}var w=o[m.year-o[0]],A=m.year<<9|m.month<<5|m.day;c.year=A>=w?m.year:m.year-1,w=o[c.year-o[0]];var E=w>>9&4095,p=w>>5&15,b=w&31,d,u=new Date(E,p-1,b),g=new Date(m.year,m.month-1,m.day);d=Math.round((g-u)/(24*3600*1e3));var y=r[c.year-r[0]],D;for(D=0;D<13;D++){var P=y&1<<12-D?30:29;if(d>13;return!z||D=1888&&n<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var x=typeof s=="number"&&s>=1&&s<=12;if(!x)throw new Error("Lunar month outside range 1 - 12");var w=typeof h=="number"&&h>=1&&h<=30;if(!w)throw new Error("Lunar day outside range 1 - 30");var A;typeof f=="object"?(A=!1,c=f):(A=!!f,c=m||{}),T={year:n,month:s,day:h,isIntercalary:A}}var E;E=T.day-1;var p=r[T.year-r[0]],b=p>>13,d;b&&(T.month>b||T.isIntercalary)?d=T.month:d=T.month-1;for(var u=0;u>9&4095,P=y>>5&15,z=y&31,F=new Date(D,P-1,z+E);return c.year=F.getFullYear(),c.month=1+F.getMonth(),c.day=F.getDate(),c}}}),rW=He({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()+(S.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),_<0&&_++,e.day()+(e.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var S=Math.floor(_)+.5-this.jdEpoch,M=Math.floor((S-Math.floor((S+366)/1461))/365)+1;M<=0&&M--,S=Math.floor(_)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.coptic=v}}),aW=He({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),!1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),13},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),400},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,M,e){var t=this.dayOfWeek(S,M,e);return t>=2&&t<=6},extraInfo:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return{century:_[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return S=t.year()+(t.year()<0?1:0),M=t.month(),e=t.day(),e+(M>1?16:0)+(M>2?(M-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var M=Math.floor(S/400)+1;S-=(M-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(M<=0?M-1:M,e,t)}});var _={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=v}}),iW=He({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()+(S.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(_){return this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),_<0&&_++,e.day()+(e.month()-1)*30+(_-1)*365+Math.floor(_/4)+this.jdEpoch-1},fromJD:function(_){var S=Math.floor(_)+.5-this.jdEpoch,M=Math.floor((S-Math.floor((S+366)/1461))/365)+1;M<=0&&M--,S=Math.floor(_)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.ethiopian=v}}),nW=He({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(M.year())},_leapYear:function(S){return S=S<0?S+1:S,_(S*7+1,19)<7},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear),this._leapYear(S.year?S.year():S)?13:12},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return S=M.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,M){return S.year&&(M=S.month(),S=S.year()),this._validate(S,M,this.minDay,Z.local.invalidMonth),M===12&&this.leapYear(S)||M===8&&_(this.daysInYear(S),10)===5?30:M===9&&_(this.daysInYear(S),10)===3?29:this.daysPerMonth[M-1]},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==6},extraInfo:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);S=t.year(),M=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(M<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a=this.toJD(M===-1?1:M+1,7,1);)M++;for(var e=Sthis.toJD(M,e,this.daysInMonth(M,e));)e++;var t=S-this.toJD(M,e,1)+1;return this.newDate(M,e,t)}});function _(S,M){return S-M*Math.floor(S/M)}Z.calendars.hebrew=v}}),oW=He({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(_){var S=this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(_){return this.leapYear(_)?355:354},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===12&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return this.dayOfWeek(_,S,M)!==5},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),S=e.month(),M=e.day(),_=_<=0?_+1:_,M+Math.ceil(29.5*(S-1))+(_-1)*354+Math.floor((3+11*_)/30)+this.jdEpoch-1},fromJD:function(_){_=Math.floor(_)+.5;var S=Math.floor((30*(_-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var M=Math.min(12,Math.ceil((_-29-this.toJD(S,1,1))/29.5)+1),e=_-this.toJD(S,M,1)+1;return this.newDate(S,M,e)}}),Z.calendars.islamic=v}}),sW=He({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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 S=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=S.year()<0?S.year()+1:S.year();return M%4===0},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(_,S){var M=this._validate(_,S,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===2&&this.leapYear(M.year())?1:0)},weekDay:function(_,S,M){return(this.dayOfWeek(_,S,M)||7)<6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);return _=e.year(),S=e.month(),M=e.day(),_<0&&_++,S<=2&&(_--,S+=12),Math.floor(365.25*(_+4716))+Math.floor(30.6001*(S+1))+M-1524.5},fromJD:function(_){var S=Math.floor(_+.5),M=S+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=v}}),lW=He({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Mp(),q=ch();function v(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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;t19||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=_(M+8+17*20,365);return[Math.floor(e/20)+1,_(e,20)]},_toTzolkin:function(M){return M-=this.jdEpoch,[S(M+20,20),S(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 _(M,e){return M-e*Math.floor(M/e)}function S(M,e){return _(M-1,e)+1}Z.calendars.mayan=v}}),uW=He({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar;var _=Z.instance("gregorian");q(v.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(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return _.leapYear(M.year()+(M.year()<1?1:0)+1469)},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,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=this.toJD(M+1,1,1);)M++;for(var e=S-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=v}}),cW=He({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Mp(),q=ch();function v(_){this.local=this.regionalOptions[_||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(_){return this.daysInYear(_)!==this.daysPerYear},weekOfYear:function(_,S,M){var e=this.newDate(_,S,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(_){var S=this._validate(_,this.minMonth,this.minDay,Z.local.invalidYear);if(_=S.year(),typeof this.NEPALI_CALENDAR_DATA[_]>"u")return this.daysPerYear;for(var M=0,e=this.minMonth;e<=12;e++)M+=this.NEPALI_CALENDAR_DATA[_][e];return M},daysInMonth:function(_,S){return _.year&&(S=_.month(),_=_.year()),this._validate(_,S,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[_]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[_][S]},weekDay:function(_,S,M){return this.dayOfWeek(_,S,M)!==6},toJD:function(_,S,M){var e=this._validate(_,S,M,Z.local.invalidDate);_=e.year(),S=e.month(),M=e.day();var t=Z.instance(),r=0,o=S,a=_;this._createMissingCalendarData(_);var i=_-(o>9||o===9&&M>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=M,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===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(_){var S=Z.instance(),M=S.fromJD(_),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(_){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var M=_-1;M<_+2;M++)typeof this.NEPALI_CALENDAR_DATA[M]>"u"&&(this.NEPALI_CALENDAR_DATA[M]=S)},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=v}}),fW=He({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function _(S){var M=S-475;S<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}v.prototype=new Z.baseCalendar,q(v.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(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return _(M.year())},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==5},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate);S=t.year(),M=t.month(),e=t.day();var r=0;if(S>0)for(var o=1;o0?S-1:S)*365+r+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var M=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(M);e<=0&&e--,S>this.toJD(e,12,_(e)?30:29)&&(e++,e===0&&e++);var t=S-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=S-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Z.calendars.persian=v,Z.calendars.jalali=v}}),hW=He({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 v.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 v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,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 v.toJD(r,t.month(),t.day())},fromJD:function(S){var M=v.fromJD(S),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.day())},_t2gYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)},_g2tYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)}}),Z.calendars.taiwan=_}}),pW=He({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Mp(),q=ch(),v=Z.instance();function _(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}_.prototype=new Z.baseCalendar,q(_.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 v.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 v.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,M){var e=this._validate(S,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,M,e){return(this.dayOfWeek(S,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 v.toJD(r,t.month(),t.day())},fromJD:function(S){var M=v.fromJD(S),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.day())},_t2gYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)},_g2tYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)}}),Z.calendars.thai=_}}),dW=He({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Mp(),q=ch();function v(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}v.prototype=new Z.baseCalendar,q(v.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(S){var M=this._validate(S,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(M.year())===355},weekOfYear:function(S,M,e){var t=this.newDate(S,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var M=0,e=1;e<=12;e++)M+=this.daysInMonth(S,e);return M},daysInMonth:function(S,M){for(var e=this._validate(S,M,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<_.length;o++){if(_[o]>t)return _[r]-_[r-1];r++}return 30},weekDay:function(S,M,e){return this.dayOfWeek(S,M,e)!==5},toJD:function(S,M,e){var t=this._validate(S,M,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+_[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var M=S-24e5+.5,e=0,t=0;t<_.length&&!(_[t]>M);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,i=r-12*o,n=M-_[e-1]+1;return this.newDate(a,i,n)},isValid:function(S,M,e){var t=Z.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(S=S.year!=null?S.year:S,t=S>=1276&&S<=1500),t},_validate:function(S,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=v;var _=[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]}}),vW=He({"src/components/calendars/calendars.js"(Z,q){"use strict";q.exports=Mp(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW(),hW(),pW(),dW()}}),mW=He({"src/components/calendars/index.js"(Z,q){"use strict";var v=vW(),_=sa(),S=Gs(),M=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:_.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},r=function(p,b,d,u){var g={};return g[d]=t,_.coerce(p,b,g,d,u)},o=function(p,b,d,u){for(var g=0;g0){if(++_e>=VZ)return arguments[0]}else _e=0;return fe.apply(void 0,arguments)}}var Pb=WZ;var XZ=Pb(Ab),Ib=XZ;var ZZ=/\{\n\/\* \[wrapped with (.+)\] \*/,YZ=/,? & /;function KZ(fe){var _e=fe.match(ZZ);return _e?_e[1].split(YZ):[]}var cC=KZ;var JZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function $Z(fe,_e){var Xe=_e.length;if(!Xe)return fe;var Lt=Xe-1;return _e[Lt]=(Xe>1?"& ":"")+_e[Lt],_e=_e.join(Xe>2?", ":" "),fe.replace(JZ,`{ /* [wrapped with `+_e+`] */ -`)}var fC=$Z;function QZ(fe){return function(){return fe}}var Qg=QZ;var eY=function(){try{var fe=sd(Object,"defineProperty");return fe({},"",{}),fe}catch{}}(),ey=eY;var tY=ey?function(fe,_e){return ey(fe,"toString",{configurable:!0,enumerable:!1,value:Qg(_e),writable:!0})}:Bc,hC=tY;var rY=Pb(hC),ty=rY;function aY(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xe-1}var Em=lY;var uY=1,cY=2,fY=8,hY=16,pY=32,dY=64,vY=128,mY=256,gY=512,yY=[["ary",vY],["bind",uY],["bindKey",cY],["curry",fY],["curryRight",hY],["flip",gY],["partial",pY],["partialRight",dY],["rearg",mY]];function _Y(fe,_e){return Nh(yY,function(Xe){var Lt="_."+Xe[0];_e&Xe[1]&&!Em(fe,Lt)&&fe.push(Lt)}),fe.sort()}var dC=_Y;function xY(fe,_e,Xe){var Lt=_e+"";return ty(fe,fC(Lt,dC(cC(Lt),Xe)))}var Db=xY;var bY=1,wY=2,TY=4,AY=8,vC=32,mC=64;function SY(fe,_e,Xe,Lt,gr,Yr,Ea,ei,oi,Ln){var _n=_e&AY,Fn=_n?Ea:void 0,So=_n?void 0:Ea,vs=_n?Yr:void 0,Qs=_n?void 0:Yr;_e|=_n?vC:mC,_e&=~(_n?mC:vC),_e&TY||(_e&=~(bY|wY));var Ho=[fe,_e,gr,vs,Fn,Qs,So,ei,oi,Ln],He=Xe.apply(void 0,Ho);return i_(fe)&&Ib(He,Ho),He.placeholder=Lt,Db(He,fe,_e)}var zb=SY;function MY(fe){var _e=fe;return _e.placeholder}var Sd=MY;var EY=9007199254740991,kY=/^(?:0|[1-9]\d*)$/;function CY(fe,_e){var Xe=typeof fe;return _e=_e??EY,!!_e&&(Xe=="number"||Xe!="symbol"&&kY.test(fe))&&fe>-1&&fe%1==0&&fe<_e}var np=CY;var LY=Math.min;function PY(fe,_e){for(var Xe=fe.length,Lt=LY(_e.length,Xe),gr=pf(fe);Lt--;){var Yr=_e[Lt];fe[Lt]=np(Yr,Xe)?gr[Yr]:void 0}return fe}var gC=PY;var yC="__lodash_placeholder__";function IY(fe,_e){for(var Xe=-1,Lt=fe.length,gr=0,Yr=[];++Xe1&&ou.reverse(),_n&&oi-1&&fe%1==0&&fe<=nK}var km=oK;function sK(fe){return fe!=null&&km(fe.length)&&!ip(fe)}var Vc=sK;function lK(fe,_e,Xe){if(!Cl(Xe))return!1;var Lt=typeof _e;return(Lt=="number"?Vc(Xe)&&np(_e,Xe.length):Lt=="string"&&_e in Xe)?oh(Xe[_e],fe):!1}var Nc=lK;function uK(fe){return Go(function(_e,Xe){var Lt=-1,gr=Xe.length,Yr=gr>1?Xe[gr-1]:void 0,Ea=gr>2?Xe[2]:void 0;for(Yr=fe.length>3&&typeof Yr=="function"?(gr--,Yr):void 0,Ea&&Nc(Xe[0],Xe[1],Ea)&&(Yr=gr<3?void 0:Yr,gr=1),_e=Object(_e);++Lt-1}var KC=BJ;function NJ(fe,_e){var Xe=this.__data__,Lt=Lm(Xe,fe);return Lt<0?(++this.size,Xe.push([fe,_e])):Xe[Lt][1]=_e,this}var JC=NJ;function ly(fe){var _e=-1,Xe=fe==null?0:fe.length;for(this.clear();++_e0&&Xe(ei)?_e>1?sL(ei,_e-1,Xe,Lt,gr):Op(gr,ei):Lt||(gr[gr.length]=ei)}return gr}var Qu=sL;function u$(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,1):[]}var qb=u$;function c$(fe){return ty(Ob(fe,void 0,qb),fe+"")}var up=c$;var f$=up(fy),lL=f$;var h$=Nb(Object.getPrototypeOf,Object),Dm=h$;var p$="[object Object]",d$=Function.prototype,v$=Object.prototype,uL=d$.toString,m$=v$.hasOwnProperty,g$=uL.call(Object);function y$(fe){if(!Dl(fe)||Oc(fe)!=p$)return!1;var _e=Dm(fe);if(_e===null)return!0;var Xe=m$.call(_e,"constructor")&&_e.constructor;return typeof Xe=="function"&&Xe instanceof Xe&&uL.call(Xe)==g$}var gv=y$;var _$="[object DOMException]",x$="[object Error]";function b$(fe){if(!Dl(fe))return!1;var _e=Oc(fe);return _e==x$||_e==_$||typeof fe.message=="string"&&typeof fe.name=="string"&&!gv(fe)}var hy=b$;var w$=Go(function(fe,_e){try{return xf(fe,void 0,_e)}catch(Xe){return hy(Xe)?Xe:new Error(Xe)}}),Vb=w$;var T$="Expected a function";function A$(fe,_e){var Xe;if(typeof _e!="function")throw new TypeError(T$);return fe=Vo(fe),function(){return--fe>0&&(Xe=_e.apply(this,arguments)),fe<=1&&(_e=void 0),Xe}}var Gb=A$;var S$=1,M$=32,PA=Go(function(fe,_e,Xe){var Lt=S$;if(Xe.length){var gr=Yp(Xe,Sd(PA));Lt|=M$}return op(fe,Lt,_e,Xe,gr)});PA.placeholder={};var Hb=PA;var E$=up(function(fe,_e){return Nh(_e,function(Xe){Xe=Eh(Xe),sp(fe,Xe,Hb(fe[Xe],fe))}),fe}),cL=E$;var k$=1,C$=2,L$=32,IA=Go(function(fe,_e,Xe){var Lt=k$|C$;if(Xe.length){var gr=Yp(Xe,Sd(IA));Lt|=L$}return op(_e,Lt,fe,Xe,gr)});IA.placeholder={};var fL=IA;function P$(fe,_e,Xe){var Lt=-1,gr=fe.length;_e<0&&(_e=-_e>gr?0:gr+_e),Xe=Xe>gr?gr:Xe,Xe<0&&(Xe+=gr),gr=_e>Xe?0:Xe-_e>>>0,_e>>>=0;for(var Yr=Array(gr);++Lt=Lt?fe:Yf(fe,_e,Xe)}var Bp=I$;var R$="\\ud800-\\udfff",D$="\\u0300-\\u036f",z$="\\ufe20-\\ufe2f",F$="\\u20d0-\\u20ff",O$=D$+z$+F$,B$="\\ufe0e\\ufe0f",N$="\\u200d",U$=RegExp("["+N$+R$+O$+B$+"]");function j$(fe){return U$.test(fe)}var kd=j$;function q$(fe){return fe.split("")}var hL=q$;var pL="\\ud800-\\udfff",V$="\\u0300-\\u036f",G$="\\ufe20-\\ufe2f",H$="\\u20d0-\\u20ff",W$=V$+G$+H$,X$="\\ufe0e\\ufe0f",Z$="["+pL+"]",RA="["+W$+"]",DA="\\ud83c[\\udffb-\\udfff]",Y$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",K$="\\u200d",gL=Y$+"?",yL="["+X$+"]?",J$="(?:"+K$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",$$=yL+gL+J$,Q$="(?:"+[dL+RA+"?",RA,vL,mL,Z$].join("|")+")",eQ=RegExp(DA+"(?="+DA+")|"+Q$+$$,"g");function tQ(fe){return fe.match(eQ)||[]}var _L=tQ;function rQ(fe){return kd(fe)?_L(fe):hL(fe)}var Uh=rQ;function aQ(fe){return function(_e){_e=Us(_e);var Xe=kd(_e)?Uh(_e):void 0,Lt=Xe?Xe[0]:_e.charAt(0),gr=Xe?Bp(Xe,1).join(""):_e.slice(1);return Lt[fe]()+gr}}var Wb=aQ;var iQ=Wb("toUpperCase"),py=iQ;function nQ(fe){return py(Us(fe).toLowerCase())}var Xb=nQ;function oQ(fe,_e,Xe,Lt){var gr=-1,Yr=fe==null?0:fe.length;for(Lt&&Yr&&(Xe=fe[++gr]);++gr=_e?fe:_e)),fe}var ud=nee;function oee(fe,_e,Xe){return Xe===void 0&&(Xe=_e,_e=void 0),Xe!==void 0&&(Xe=Sh(Xe),Xe=Xe===Xe?Xe:0),_e!==void 0&&(_e=Sh(_e),_e=_e===_e?_e:0),ud(Sh(fe),_e,Xe)}var HL=oee;function see(){this.__data__=new Pm,this.size=0}var WL=see;function lee(fe){var _e=this.__data__,Xe=_e.delete(fe);return this.size=_e.size,Xe}var XL=lee;function uee(fe){return this.__data__.get(fe)}var ZL=uee;function cee(fe){return this.__data__.has(fe)}var YL=cee;var fee=200;function hee(fe,_e){var Xe=this.__data__;if(Xe instanceof Pm){var Lt=Xe.__data__;if(!Im||Lt.lengthei))return!1;var Ln=Yr.get(fe),_n=Yr.get(_e);if(Ln&&_n)return Ln==_e&&_n==fe;var Fn=-1,So=!0,vs=Xe&hre?new Fm:void 0;for(Yr.set(fe,_e),Yr.set(_e,fe);++Fn=_e||Vn<0||Fn&&dd>=Yr}function Jl(){var Ff=Py();if(He(Ff))return ou(Ff);ei=setTimeout(Jl,Ho(Ff))}function ou(Ff){return ei=void 0,So&&Lt?vs(Ff):(Lt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),Ln=0,Lt=oi=gr=ei=void 0}function zf(){return ei===void 0?Ea:ou(Py())}function Gh(){var Ff=Py(),Vn=He(Ff);if(Lt=arguments,gr=this,oi=Ff,Vn){if(ei===void 0)return Qs(oi);if(Fn)return clearTimeout(ei),ei=setTimeout(Jl,_e),vs(oi)}return ei===void 0&&(ei=setTimeout(Jl,_e)),Ea}return Gh.cancel=jp,Gh.flush=zf,Gh}var xw=Sae;function Mae(fe,_e){return fe==null||fe!==fe?_e:fe}var QP=Mae;var eI=Object.prototype,Eae=eI.hasOwnProperty,kae=Go(function(fe,_e){fe=Object(fe);var Xe=-1,Lt=_e.length,gr=Lt>2?_e[2]:void 0;for(gr&&Nc(_e[0],_e[1],gr)&&(Lt=1);++Xe=jae&&(Yr=Hv,Ea=!1,_e=new Fm(_e));e:for(;++gr=0&&fe.slice(Xe,gr)==_e}var yI=oie;function sie(fe,_e){return Sl(_e,function(Xe){return[Xe,fe[Xe]]})}var _I=sie;function lie(fe){var _e=-1,Xe=Array(fe.size);return fe.forEach(function(Lt){Xe[++_e]=[Lt,Lt]}),Xe}var xI=lie;var uie="[object Map]",cie="[object Set]";function fie(fe){return function(_e){var Xe=jh(_e);return Xe==uie?Sy(_e):Xe==cie?xI(_e):_I(_e,fe(_e))}}var Mw=fie;var hie=Mw(gu),p_=hie;var pie=Mw(Gc),d_=pie;var die={"&":"&","<":"<",">":">",'"':""","'":"'"},vie=vy(die),bI=vie;var wI=/[&<>"']/g,mie=RegExp(wI.source);function gie(fe){return fe=Us(fe),fe&&mie.test(fe)?fe.replace(wI,bI):fe}var Ew=gie;var TI=/[\\^$.*+?()[\]{}|]/g,yie=RegExp(TI.source);function _ie(fe){return fe=Us(fe),fe&&yie.test(fe)?fe.replace(TI,"\\$&"):fe}var AI=_ie;function xie(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xegr?0:gr+Xe),Lt=Lt===void 0||Lt>gr?gr:Vo(Lt),Lt<0&&(Lt+=gr),Lt=Xe>Lt?0:Cw(Lt);Xe-1?gr[Yr?_e[Ea]:Ea]:void 0}}var Pw=Cie;var Lie=Math.max;function Pie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:Vo(Xe);return gr<0&&(gr=Lie(Lt+gr,0)),Mm(fe,xo(_e,3),gr)}var Iw=Pie;var Iie=Pw(Iw),LI=Iie;function Rie(fe,_e,Xe){var Lt;return Xe(fe,function(gr,Yr,Ea){if(_e(gr,Yr,Ea))return Lt=Yr,!1}),Lt}var Rw=Rie;function Die(fe,_e){return Rw(fe,xo(_e,3),fp)}var PI=Die;var zie=Math.max,Fie=Math.min;function Oie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt-1;return Xe!==void 0&&(gr=Vo(Xe),gr=Xe<0?zie(Lt+gr,0):Fie(gr,Lt-1)),Mm(fe,xo(_e,3),gr,!0)}var Dw=Oie;var Bie=Pw(Dw),II=Bie;function Nie(fe,_e){return Rw(fe,xo(_e,3),Dy)}var RI=Nie;function Uie(fe){return fe&&fe.length?fe[0]:void 0}var v_=Uie;function jie(fe,_e){var Xe=-1,Lt=Vc(fe)?Array(fe.length):[];return Up(fe,function(gr,Yr,Ea){Lt[++Xe]=_e(gr,Yr,Ea)}),Lt}var zw=jie;function qie(fe,_e){var Xe=zo(fe)?Sl:zw;return Xe(fe,xo(_e,3))}var jm=qie;function Vie(fe,_e){return Qu(jm(fe,_e),1)}var DI=Vie;var Gie=1/0;function Hie(fe,_e){return Qu(jm(fe,_e),Gie)}var zI=Hie;function Wie(fe,_e,Xe){return Xe=Xe===void 0?1:Vo(Xe),Qu(jm(fe,_e),Xe)}var FI=Wie;var Xie=1/0;function Zie(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,Xie):[]}var OI=Zie;function Yie(fe,_e){var Xe=fe==null?0:fe.length;return Xe?(_e=_e===void 0?1:Vo(_e),Qu(fe,_e)):[]}var BI=Yie;var Kie=512;function Jie(fe){return op(fe,Kie)}var NI=Jie;var $ie=gy("floor"),UI=$ie;var Qie="Expected a function",ene=8,tne=32,rne=128,ane=256;function ine(fe){return up(function(_e){var Xe=_e.length,Lt=Xe,gr=zp.prototype.thru;for(fe&&_e.reverse();Lt--;){var Yr=_e[Lt];if(typeof Yr!="function")throw new TypeError(Qie);if(gr&&!Ea&&$g(Yr)=="wrapper")var Ea=new zp([],!0)}for(Lt=Ea?Lt:Xe;++Lt_e}var zy=yne;function _ne(fe){return function(_e,Xe){return typeof _e=="string"&&typeof Xe=="string"||(_e=Sh(_e),Xe=Sh(Xe)),fe(_e,Xe)}}var Vm=_ne;var xne=Vm(zy),JI=xne;var bne=Vm(function(fe,_e){return fe>=_e}),$I=bne;var wne=Object.prototype,Tne=wne.hasOwnProperty;function Ane(fe,_e){return fe!=null&&Tne.call(fe,_e)}var QI=Ane;function Sne(fe,_e){return fe!=null&&dw(fe,_e,QI)}var e8=Sne;var Mne=Math.max,Ene=Math.min;function kne(fe,_e,Xe){return fe>=Ene(_e,Xe)&&fe-1:!!gr&&Ad(fe,_e,Xe)>-1}var a8=zne;var Fne=Math.max;function One(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:Vo(Xe);return gr<0&&(gr=Fne(Lt+gr,0)),Ad(fe,_e,gr)}var i8=One;function Bne(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,0,-1):[]}var n8=Bne;var Nne=Math.min;function Une(fe,_e,Xe){for(var Lt=Xe?Ry:Em,gr=fe[0].length,Yr=fe.length,Ea=Yr,ei=Array(Yr),oi=1/0,Ln=[];Ea--;){var _n=fe[Ea];Ea&&_e&&(_n=Sl(_n,wf(_e))),oi=Nne(_n.length,oi),ei[Ea]=!Xe&&(_e||gr>=120&&_n.length>=120)?new Fm(Ea&&_n):void 0}_n=fe[0];var Fn=-1,So=ei[0];e:for(;++Fn=-F8&&fe<=F8}var O8=zoe;function Foe(fe){return fe===void 0}var B8=Foe;var Ooe="[object WeakMap]";function Boe(fe){return Dl(fe)&&jh(fe)==Ooe}var N8=Boe;var Noe="[object WeakSet]";function Uoe(fe){return Dl(fe)&&Oc(fe)==Noe}var U8=Uoe;var joe=1;function qoe(fe){return xo(typeof fe=="function"?fe:cp(fe,joe))}var j8=qoe;var Voe=Array.prototype,Goe=Voe.join;function Hoe(fe,_e){return fe==null?"":Goe.call(fe,_e)}var q8=Hoe;var Woe=Cd(function(fe,_e,Xe){return fe+(Xe?"-":"")+_e.toLowerCase()}),V8=Woe;var Xoe=Nm(function(fe,_e,Xe){sp(fe,Xe,_e)}),G8=Xoe;function Zoe(fe,_e,Xe){for(var Lt=Xe+1;Lt--;)if(fe[Lt]===_e)return Lt;return Lt}var H8=Zoe;var Yoe=Math.max,Koe=Math.min;function Joe(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt;return Xe!==void 0&&(gr=Vo(Xe),gr=gr<0?Yoe(Lt+gr,0):Koe(gr,Lt-1)),_e===_e?H8(fe,_e,gr):Mm(fe,Rb,gr,!0)}var W8=Joe;var $oe=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+_e.toLowerCase()}),X8=$oe;var Qoe=Wb("toLowerCase"),Z8=Qoe;function ese(fe,_e){return fe<_e}var Uy=ese;var tse=Vm(Uy),Y8=tse;var rse=Vm(function(fe,_e){return fe<=_e}),K8=rse;function ase(fe,_e){var Xe={};return _e=xo(_e,3),fp(fe,function(Lt,gr,Yr){sp(Xe,_e(Lt,gr,Yr),Lt)}),Xe}var J8=ase;function ise(fe,_e){var Xe={};return _e=xo(_e,3),fp(fe,function(Lt,gr,Yr){sp(Xe,gr,_e(Lt,gr,Yr))}),Xe}var $8=ise;var nse=1;function ose(fe){return pw(cp(fe,nse))}var Q8=ose;var sse=1;function lse(fe,_e){return vw(fe,cp(_e,sse))}var eR=lse;function use(fe,_e,Xe){for(var Lt=-1,gr=fe.length;++Lt=this.__values__.length,_e=fe?void 0:this.__values__[this.__index__++];return{done:fe,value:_e}}var hR=Lse;function Pse(fe,_e){var Xe=fe.length;if(Xe)return _e+=_e<0?Xe:0,np(_e,Xe)?fe[_e]:void 0}var Gw=Pse;function Ise(fe,_e){return fe&&fe.length?Gw(fe,Vo(_e)):void 0}var pR=Ise;function Rse(fe){return fe=Vo(fe),Go(function(_e){return Gw(_e,fe)})}var dR=Rse;function Dse(fe,_e){return _e=Fp(_e,fe),fe=Bw(fe,_e),fe==null||delete fe[Eh(Tf(_e))]}var qy=Dse;function zse(fe){return gv(fe)?void 0:fe}var vR=zse;var Fse=1,Ose=2,Bse=4,Nse=up(function(fe,_e){var Xe={};if(fe==null)return Xe;var Lt=!1;_e=Sl(_e,function(Yr){return Yr=Fp(Yr,fe),Lt||(Lt=Yr.length>1),Yr}),Mh(fe,by(fe),Xe),Lt&&(Xe=cp(Xe,Fse|Ose|Bse,vR));for(var gr=_e.length;gr--;)qy(Xe,_e[gr]);return Xe}),mR=Nse;function Use(fe,_e,Xe,Lt){if(!Cl(fe))return fe;_e=Fp(_e,fe);for(var gr=-1,Yr=_e.length,Ea=Yr-1,ei=fe;ei!=null&&++gr_e||Yr&&Ea&&oi&&!ei&&!Ln||Lt&&Ea&&oi||!Xe&&oi||!gr)return 1;if(!Lt&&!Yr&&!Ln&&fe<_e||Ln&&Xe&&gr&&!Lt&&!Yr||ei&&Xe&&gr||!Ea&&gr||!oi)return-1}return 0}var Xw=Wse;function Xse(fe,_e,Xe){for(var Lt=-1,gr=fe.criteria,Yr=_e.criteria,Ea=gr.length,ei=Xe.length;++Lt=ei)return oi;var Ln=Xe[Lt];return oi*(Ln=="desc"?-1:1)}}return fe.index-_e.index}var xR=Xse;function Zse(fe,_e,Xe){_e.length?_e=Sl(_e,function(Yr){return zo(Yr)?function(Ea){return ld(Ea,Yr.length===1?Yr[0]:Yr)}:Yr}):_e=[Bc];var Lt=-1;_e=Sl(_e,wf(xo));var gr=zw(fe,function(Yr,Ea,ei){var oi=Sl(_e,function(Ln){return Ln(Yr)});return{criteria:oi,index:++Lt,value:Yr}});return _R(gr,function(Yr,Ea){return xR(Yr,Ea,Xe)})}var Zw=Zse;function Yse(fe,_e,Xe,Lt){return fe==null?[]:(zo(_e)||(_e=_e==null?[]:[_e]),Xe=Lt?void 0:Xe,zo(Xe)||(Xe=Xe==null?[]:[Xe]),Zw(fe,_e,Xe))}var bR=Yse;function Kse(fe){return up(function(_e){return _e=Sl(_e,wf(xo)),Go(function(Xe){var Lt=this;return fe(_e,function(gr){return xf(gr,Lt,Xe)})})})}var Vy=Kse;var Jse=Vy(Sl),wR=Jse;var $se=Go,TR=$se;var Qse=Math.min,ele=TR(function(fe,_e){_e=_e.length==1&&zo(_e[0])?Sl(_e[0],wf(xo)):Sl(Qu(_e,1),wf(xo));var Xe=_e.length;return Go(function(Lt){for(var gr=-1,Yr=Qse(Lt.length,Xe);++grale)return Xe;do _e%2&&(Xe+=fe),_e=ile(_e/2),_e&&(fe+=fe);while(_e);return Xe}var m_=nle;var ole=Cy("length"),ER=ole;var CR="\\ud800-\\udfff",sle="\\u0300-\\u036f",lle="\\ufe20-\\ufe2f",ule="\\u20d0-\\u20ff",cle=sle+lle+ule,fle="\\ufe0e\\ufe0f",hle="["+CR+"]",NA="["+cle+"]",UA="\\ud83c[\\udffb-\\udfff]",ple="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",dle="\\u200d",RR=ple+"?",DR="["+fle+"]?",vle="(?:"+dle+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",mle=DR+RR+vle,gle="(?:"+[LR+NA+"?",NA,PR,IR,hle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+gle+mle,"g");function yle(fe){for(var _e=kR.lastIndex=0;kR.test(fe);)++_e;return _e}var zR=yle;function _le(fe){return kd(fe)?zR(fe):ER(fe)}var Pd=_le;var xle=Math.ceil;function ble(fe,_e){_e=_e===void 0?" ":nh(_e);var Xe=_e.length;if(Xe<2)return Xe?m_(_e,fe):_e;var Lt=m_(_e,xle(fe/Pd(_e)));return kd(_e)?Bp(Uh(Lt),0,fe).join(""):Lt.slice(0,fe)}var H0=ble;var wle=Math.ceil,Tle=Math.floor;function Ale(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;if(!_e||Lt>=_e)return fe;var gr=(_e-Lt)/2;return H0(Tle(gr),Xe)+fe+H0(wle(gr),Xe)}var FR=Ale;function Sle(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?fe+H0(_e-Lt,Xe):fe}var OR=Sle;function Mle(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?H0(_e-Lt,Xe)+fe:fe}var BR=Mle;var Ele=/^\s+/,kle=wu.parseInt;function Cle(fe,_e,Xe){return Xe||_e==null?_e=0:_e&&(_e=+_e),kle(Us(fe).replace(Ele,""),_e||0)}var NR=Cle;var Lle=32,jA=Go(function(fe,_e){var Xe=Yp(_e,Sd(jA));return op(fe,Lle,void 0,_e,Xe)});jA.placeholder={};var Yw=jA;var Ple=64,qA=Go(function(fe,_e){var Xe=Yp(_e,Sd(qA));return op(fe,Ple,void 0,_e,Xe)});qA.placeholder={};var UR=qA;var Ile=Nm(function(fe,_e,Xe){fe[Xe?0:1].push(_e)},function(){return[[],[]]}),jR=Ile;function Rle(fe,_e){return Hw(fe,_e,function(Xe,Lt){return ky(fe,Lt)})}var qR=Rle;var Dle=up(function(fe,_e){return fe==null?{}:qR(fe,_e)}),VR=Dle;function zle(fe){for(var _e,Xe=this;Xe instanceof Am;){var Lt=Cb(Xe);Lt.__index__=0,Lt.__values__=void 0,_e?gr.__wrapped__=Lt:_e=Lt;var gr=Lt;Xe=Xe.__wrapped__}return gr.__wrapped__=fe,_e}var GR=zle;function Fle(fe){return function(_e){return fe==null?void 0:ld(fe,_e)}}var HR=Fle;function Ole(fe,_e,Xe,Lt){for(var gr=Xe-1,Yr=fe.length;++gr-1;)ei!==fe&&XR.call(ei,oi,1),XR.call(fe,oi,1);return fe}var Gy=Nle;function Ule(fe,_e){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e):fe}var Kw=Ule;var jle=Go(Kw),ZR=jle;function qle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,xo(Xe,2)):fe}var YR=qle;function Vle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,void 0,Xe):fe}var KR=Vle;var Gle=Array.prototype,Hle=Gle.splice;function Wle(fe,_e){for(var Xe=fe?_e.length:0,Lt=Xe-1;Xe--;){var gr=_e[Xe];if(Xe==Lt||gr!==Yr){var Yr=gr;np(gr)?Hle.call(fe,gr,1):qy(fe,gr)}}return fe}var Jw=Wle;var Xle=up(function(fe,_e){var Xe=fe==null?0:fe.length,Lt=fy(fe,_e);return Jw(fe,Sl(_e,function(gr){return np(gr,Xe)?+gr:gr}).sort(Xw)),Lt}),JR=Xle;var Zle=Math.floor,Yle=Math.random;function Kle(fe,_e){return fe+Zle(Yle()*(_e-fe+1))}var Hy=Kle;var Jle=parseFloat,$le=Math.min,Qle=Math.random;function eue(fe,_e,Xe){if(Xe&&typeof Xe!="boolean"&&Nc(fe,_e,Xe)&&(_e=Xe=void 0),Xe===void 0&&(typeof _e=="boolean"?(Xe=_e,_e=void 0):typeof fe=="boolean"&&(Xe=fe,fe=void 0)),fe===void 0&&_e===void 0?(fe=0,_e=1):(fe=od(fe),_e===void 0?(_e=fe,fe=0):_e=od(_e)),fe>_e){var Lt=fe;fe=_e,_e=Lt}if(Xe||fe%1||_e%1){var gr=Qle();return $le(fe+gr*(_e-fe+Jle("1e-"+((gr+"").length-1))),_e)}return Hy(fe,_e)}var $R=eue;var tue=Math.ceil,rue=Math.max;function aue(fe,_e,Xe,Lt){for(var gr=-1,Yr=rue(tue((_e-fe)/(Xe||1)),0),Ea=Array(Yr);Yr--;)Ea[Lt?Yr:++gr]=fe,fe+=Xe;return Ea}var QR=aue;function iue(fe){return function(_e,Xe,Lt){return Lt&&typeof Lt!="number"&&Nc(_e,Xe,Lt)&&(Xe=Lt=void 0),_e=od(_e),Xe===void 0?(Xe=_e,_e=0):Xe=od(Xe),Lt=Lt===void 0?_e1&&Nc(fe,_e[0],_e[1])?_e=[]:Xe>2&&Nc(_e[0],_e[1],_e[2])&&(_e=[_e[0]]),Zw(fe,Qu(_e,1),[])}),k4=Vue;var Gue=4294967295,Hue=Gue-1,Wue=Math.floor,Xue=Math.min;function Zue(fe,_e,Xe,Lt){var gr=0,Yr=fe==null?0:fe.length;if(Yr===0)return 0;_e=Xe(_e);for(var Ea=_e!==_e,ei=_e===null,oi=Rf(_e),Ln=_e===void 0;gr>>1;function Jue(fe,_e,Xe){var Lt=0,gr=fe==null?Lt:fe.length;if(typeof _e=="number"&&_e===_e&&gr<=Kue){for(;Lt>>1,Ea=fe[Yr];Ea!==null&&!Rf(Ea)&&(Xe?Ea<=_e:Ea<_e)?Lt=Yr+1:gr=Yr}return gr}return Wy(fe,_e,Bc,Xe)}var Xm=Jue;function $ue(fe,_e){return Xm(fe,_e)}var C4=$ue;function Que(fe,_e,Xe){return Wy(fe,_e,xo(Xe,2))}var L4=Que;function ece(fe,_e){var Xe=fe==null?0:fe.length;if(Xe){var Lt=Xm(fe,_e);if(Lt>>0,Xe?(fe=Us(fe),fe&&(typeof _e=="string"||_e!=null&&!Ny(_e))&&(_e=nh(_e),!_e&&kd(fe))?Bp(Uh(fe),0,Xe):fe.split(_e,Xe)):[]}var O4=lce;var uce="Expected a function",cce=Math.max;function fce(fe,_e){if(typeof fe!="function")throw new TypeError(uce);return _e=_e==null?0:cce(Vo(_e),0),Go(function(Xe){var Lt=Xe[_e],gr=Bp(Xe,0,_e);return Lt&&Op(gr,Lt),xf(fe,this,gr)})}var B4=fce;var hce=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+py(_e)}),N4=hce;function pce(fe,_e,Xe){return fe=Us(fe),Xe=Xe==null?0:ud(Vo(Xe),0,fe.length),_e=nh(_e),fe.slice(Xe,Xe+_e.length)==_e}var U4=pce;function dce(){return{}}var j4=dce;function vce(){return""}var q4=vce;function mce(){return!0}var V4=mce;var gce=Tm(function(fe,_e){return fe-_e},0),G4=gce;function yce(fe){return fe&&fe.length?jy(fe,Bc):0}var H4=yce;function _ce(fe,_e){return fe&&fe.length?jy(fe,xo(_e,2)):0}var W4=_ce;function xce(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,1,_e):[]}var X4=xce;function bce(fe,_e,Xe){return fe&&fe.length?(_e=Xe||_e===void 0?1:Vo(_e),Yf(fe,0,_e<0?0:_e)):[]}var Z4=bce;function wce(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(_e=Xe||_e===void 0?1:Vo(_e),_e=Lt-_e,Yf(fe,_e<0?0:_e,Lt)):[]}var Y4=wce;function Tce(fe,_e){return fe&&fe.length?Um(fe,xo(_e,3),!1,!0):[]}var K4=Tce;function Ace(fe,_e){return fe&&fe.length?Um(fe,xo(_e,3)):[]}var J4=Ace;function Sce(fe,_e){return _e(fe),fe}var $4=Sce;var Q4=Object.prototype,Mce=Q4.hasOwnProperty;function Ece(fe,_e,Xe,Lt){return fe===void 0||oh(fe,Q4[Xe])&&!Mce.call(Lt,Xe)?_e:fe}var VA=Ece;var kce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Cce(fe){return"\\"+kce[fe]}var eD=Cce;var Lce=/<%=([\s\S]+?)%>/g,r2=Lce;var Pce=/<%-([\s\S]+?)%>/g,tD=Pce;var Ice=/<%([\s\S]+?)%>/g,rD=Ice;var Rce={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Rce;var Dce="Invalid `variable` option passed into `_.template`",zce=/\b__p \+= '';/g,Fce=/\b(__p \+=) '' \+/g,Oce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bce=/[()=,{}\[\]\/\s]/,Nce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Uce=/['\n\r\u2028\u2029\\]/g,jce=Object.prototype,aD=jce.hasOwnProperty;function qce(fe,_e,Xe){var Lt=y_.imports._.templateSettings||y_;Xe&&Nc(fe,_e,Xe)&&(_e=void 0),fe=Us(fe),_e=Cm({},_e,Lt,VA);var gr=Cm({},_e.imports,Lt.imports,VA),Yr=gu(gr),Ea=Fy(gr,Yr),ei,oi,Ln=0,_n=_e.interpolate||a2,Fn="__p += '",So=RegExp((_e.escape||a2).source+"|"+_n.source+"|"+(_n===r2?Nce:a2).source+"|"+(_e.evaluate||a2).source+"|$","g"),vs=aD.call(_e,"sourceURL")?"//# sourceURL="+(_e.sourceURL+"").replace(/\s/g," ")+` -`:"";fe.replace(So,function(He,Jl,ou,jp,zf,Gh){return ou||(ou=jp),Fn+=fe.slice(Ln,Gh).replace(Uce,eD),Jl&&(ei=!0,Fn+=`' + +`)}var fC=$Z;function QZ(fe){return function(){return fe}}var Qg=QZ;var eY=function(){try{var fe=sd(Object,"defineProperty");return fe({},"",{}),fe}catch{}}(),ey=eY;var tY=ey?function(fe,_e){return ey(fe,"toString",{configurable:!0,enumerable:!1,value:Qg(_e),writable:!0})}:Bc,hC=tY;var rY=Pb(hC),ty=rY;function aY(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xe-1}var Em=lY;var uY=1,cY=2,fY=8,hY=16,pY=32,dY=64,vY=128,mY=256,gY=512,yY=[["ary",vY],["bind",uY],["bindKey",cY],["curry",fY],["curryRight",hY],["flip",gY],["partial",pY],["partialRight",dY],["rearg",mY]];function _Y(fe,_e){return Nh(yY,function(Xe){var Lt="_."+Xe[0];_e&Xe[1]&&!Em(fe,Lt)&&fe.push(Lt)}),fe.sort()}var dC=_Y;function xY(fe,_e,Xe){var Lt=_e+"";return ty(fe,fC(Lt,dC(cC(Lt),Xe)))}var Db=xY;var bY=1,wY=2,TY=4,AY=8,vC=32,mC=64;function SY(fe,_e,Xe,Lt,gr,Zr,Ea,ei,ai,wn){var _n=_e&AY,Fn=_n?Ea:void 0,So=_n?void 0:Ea,vs=_n?Zr:void 0,Qs=_n?void 0:Zr;_e|=_n?vC:mC,_e&=~(_n?mC:vC),_e&TY||(_e&=~(bY|wY));var Ho=[fe,_e,gr,vs,Fn,Qs,So,ei,ai,wn],He=Xe.apply(void 0,Ho);return i_(fe)&&Ib(He,Ho),He.placeholder=Lt,Db(He,fe,_e)}var zb=SY;function MY(fe){var _e=fe;return _e.placeholder}var Sd=MY;var EY=9007199254740991,kY=/^(?:0|[1-9]\d*)$/;function CY(fe,_e){var Xe=typeof fe;return _e=_e??EY,!!_e&&(Xe=="number"||Xe!="symbol"&&kY.test(fe))&&fe>-1&&fe%1==0&&fe<_e}var np=CY;var LY=Math.min;function PY(fe,_e){for(var Xe=fe.length,Lt=LY(_e.length,Xe),gr=pf(fe);Lt--;){var Zr=_e[Lt];fe[Lt]=np(Zr,Xe)?gr[Zr]:void 0}return fe}var gC=PY;var yC="__lodash_placeholder__";function IY(fe,_e){for(var Xe=-1,Lt=fe.length,gr=0,Zr=[];++Xe1&&ou.reverse(),_n&&ai-1&&fe%1==0&&fe<=nK}var km=oK;function sK(fe){return fe!=null&&km(fe.length)&&!ip(fe)}var Vc=sK;function lK(fe,_e,Xe){if(!Cl(Xe))return!1;var Lt=typeof _e;return(Lt=="number"?Vc(Xe)&&np(_e,Xe.length):Lt=="string"&&_e in Xe)?oh(Xe[_e],fe):!1}var Nc=lK;function uK(fe){return Go(function(_e,Xe){var Lt=-1,gr=Xe.length,Zr=gr>1?Xe[gr-1]:void 0,Ea=gr>2?Xe[2]:void 0;for(Zr=fe.length>3&&typeof Zr=="function"?(gr--,Zr):void 0,Ea&&Nc(Xe[0],Xe[1],Ea)&&(Zr=gr<3?void 0:Zr,gr=1),_e=Object(_e);++Lt-1}var KC=BJ;function NJ(fe,_e){var Xe=this.__data__,Lt=Lm(Xe,fe);return Lt<0?(++this.size,Xe.push([fe,_e])):Xe[Lt][1]=_e,this}var JC=NJ;function ly(fe){var _e=-1,Xe=fe==null?0:fe.length;for(this.clear();++_e0&&Xe(ei)?_e>1?sL(ei,_e-1,Xe,Lt,gr):Op(gr,ei):Lt||(gr[gr.length]=ei)}return gr}var Qu=sL;function u$(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,1):[]}var qb=u$;function c$(fe){return ty(Ob(fe,void 0,qb),fe+"")}var up=c$;var f$=up(fy),lL=f$;var h$=Nb(Object.getPrototypeOf,Object),Dm=h$;var p$="[object Object]",d$=Function.prototype,v$=Object.prototype,uL=d$.toString,m$=v$.hasOwnProperty,g$=uL.call(Object);function y$(fe){if(!Dl(fe)||Oc(fe)!=p$)return!1;var _e=Dm(fe);if(_e===null)return!0;var Xe=m$.call(_e,"constructor")&&_e.constructor;return typeof Xe=="function"&&Xe instanceof Xe&&uL.call(Xe)==g$}var gv=y$;var _$="[object DOMException]",x$="[object Error]";function b$(fe){if(!Dl(fe))return!1;var _e=Oc(fe);return _e==x$||_e==_$||typeof fe.message=="string"&&typeof fe.name=="string"&&!gv(fe)}var hy=b$;var w$=Go(function(fe,_e){try{return xf(fe,void 0,_e)}catch(Xe){return hy(Xe)?Xe:new Error(Xe)}}),Vb=w$;var T$="Expected a function";function A$(fe,_e){var Xe;if(typeof _e!="function")throw new TypeError(T$);return fe=Vo(fe),function(){return--fe>0&&(Xe=_e.apply(this,arguments)),fe<=1&&(_e=void 0),Xe}}var Gb=A$;var S$=1,M$=32,PA=Go(function(fe,_e,Xe){var Lt=S$;if(Xe.length){var gr=Yp(Xe,Sd(PA));Lt|=M$}return op(fe,Lt,_e,Xe,gr)});PA.placeholder={};var Hb=PA;var E$=up(function(fe,_e){return Nh(_e,function(Xe){Xe=Eh(Xe),sp(fe,Xe,Hb(fe[Xe],fe))}),fe}),cL=E$;var k$=1,C$=2,L$=32,IA=Go(function(fe,_e,Xe){var Lt=k$|C$;if(Xe.length){var gr=Yp(Xe,Sd(IA));Lt|=L$}return op(_e,Lt,fe,Xe,gr)});IA.placeholder={};var fL=IA;function P$(fe,_e,Xe){var Lt=-1,gr=fe.length;_e<0&&(_e=-_e>gr?0:gr+_e),Xe=Xe>gr?gr:Xe,Xe<0&&(Xe+=gr),gr=_e>Xe?0:Xe-_e>>>0,_e>>>=0;for(var Zr=Array(gr);++Lt=Lt?fe:Yf(fe,_e,Xe)}var Bp=I$;var R$="\\ud800-\\udfff",D$="\\u0300-\\u036f",z$="\\ufe20-\\ufe2f",F$="\\u20d0-\\u20ff",O$=D$+z$+F$,B$="\\ufe0e\\ufe0f",N$="\\u200d",U$=RegExp("["+N$+R$+O$+B$+"]");function j$(fe){return U$.test(fe)}var kd=j$;function q$(fe){return fe.split("")}var hL=q$;var pL="\\ud800-\\udfff",V$="\\u0300-\\u036f",G$="\\ufe20-\\ufe2f",H$="\\u20d0-\\u20ff",W$=V$+G$+H$,X$="\\ufe0e\\ufe0f",Z$="["+pL+"]",RA="["+W$+"]",DA="\\ud83c[\\udffb-\\udfff]",Y$="(?:"+RA+"|"+DA+")",dL="[^"+pL+"]",vL="(?:\\ud83c[\\udde6-\\uddff]){2}",mL="[\\ud800-\\udbff][\\udc00-\\udfff]",K$="\\u200d",gL=Y$+"?",yL="["+X$+"]?",J$="(?:"+K$+"(?:"+[dL,vL,mL].join("|")+")"+yL+gL+")*",$$=yL+gL+J$,Q$="(?:"+[dL+RA+"?",RA,vL,mL,Z$].join("|")+")",eQ=RegExp(DA+"(?="+DA+")|"+Q$+$$,"g");function tQ(fe){return fe.match(eQ)||[]}var _L=tQ;function rQ(fe){return kd(fe)?_L(fe):hL(fe)}var Uh=rQ;function aQ(fe){return function(_e){_e=Us(_e);var Xe=kd(_e)?Uh(_e):void 0,Lt=Xe?Xe[0]:_e.charAt(0),gr=Xe?Bp(Xe,1).join(""):_e.slice(1);return Lt[fe]()+gr}}var Wb=aQ;var iQ=Wb("toUpperCase"),py=iQ;function nQ(fe){return py(Us(fe).toLowerCase())}var Xb=nQ;function oQ(fe,_e,Xe,Lt){var gr=-1,Zr=fe==null?0:fe.length;for(Lt&&Zr&&(Xe=fe[++gr]);++gr=_e?fe:_e)),fe}var ud=nee;function oee(fe,_e,Xe){return Xe===void 0&&(Xe=_e,_e=void 0),Xe!==void 0&&(Xe=Sh(Xe),Xe=Xe===Xe?Xe:0),_e!==void 0&&(_e=Sh(_e),_e=_e===_e?_e:0),ud(Sh(fe),_e,Xe)}var HL=oee;function see(){this.__data__=new Pm,this.size=0}var WL=see;function lee(fe){var _e=this.__data__,Xe=_e.delete(fe);return this.size=_e.size,Xe}var XL=lee;function uee(fe){return this.__data__.get(fe)}var ZL=uee;function cee(fe){return this.__data__.has(fe)}var YL=cee;var fee=200;function hee(fe,_e){var Xe=this.__data__;if(Xe instanceof Pm){var Lt=Xe.__data__;if(!Im||Lt.lengthei))return!1;var wn=Zr.get(fe),_n=Zr.get(_e);if(wn&&_n)return wn==_e&&_n==fe;var Fn=-1,So=!0,vs=Xe&hre?new Fm:void 0;for(Zr.set(fe,_e),Zr.set(_e,fe);++Fn=_e||Vn<0||Fn&&dd>=Zr}function Jl(){var Ff=Py();if(He(Ff))return ou(Ff);ei=setTimeout(Jl,Ho(Ff))}function ou(Ff){return ei=void 0,So&&Lt?vs(Ff):(Lt=gr=void 0,Ea)}function jp(){ei!==void 0&&clearTimeout(ei),wn=0,Lt=ai=gr=ei=void 0}function zf(){return ei===void 0?Ea:ou(Py())}function Gh(){var Ff=Py(),Vn=He(Ff);if(Lt=arguments,gr=this,ai=Ff,Vn){if(ei===void 0)return Qs(ai);if(Fn)return clearTimeout(ei),ei=setTimeout(Jl,_e),vs(ai)}return ei===void 0&&(ei=setTimeout(Jl,_e)),Ea}return Gh.cancel=jp,Gh.flush=zf,Gh}var xw=Sae;function Mae(fe,_e){return fe==null||fe!==fe?_e:fe}var QP=Mae;var eI=Object.prototype,Eae=eI.hasOwnProperty,kae=Go(function(fe,_e){fe=Object(fe);var Xe=-1,Lt=_e.length,gr=Lt>2?_e[2]:void 0;for(gr&&Nc(_e[0],_e[1],gr)&&(Lt=1);++Xe=jae&&(Zr=Hv,Ea=!1,_e=new Fm(_e));e:for(;++gr=0&&fe.slice(Xe,gr)==_e}var yI=oie;function sie(fe,_e){return Sl(_e,function(Xe){return[Xe,fe[Xe]]})}var _I=sie;function lie(fe){var _e=-1,Xe=Array(fe.size);return fe.forEach(function(Lt){Xe[++_e]=[Lt,Lt]}),Xe}var xI=lie;var uie="[object Map]",cie="[object Set]";function fie(fe){return function(_e){var Xe=jh(_e);return Xe==uie?Sy(_e):Xe==cie?xI(_e):_I(_e,fe(_e))}}var Mw=fie;var hie=Mw(gu),p_=hie;var pie=Mw(Gc),d_=pie;var die={"&":"&","<":"<",">":">",'"':""","'":"'"},vie=vy(die),bI=vie;var wI=/[&<>"']/g,mie=RegExp(wI.source);function gie(fe){return fe=Us(fe),fe&&mie.test(fe)?fe.replace(wI,bI):fe}var Ew=gie;var TI=/[\\^$.*+?()[\]{}|]/g,yie=RegExp(TI.source);function _ie(fe){return fe=Us(fe),fe&&yie.test(fe)?fe.replace(TI,"\\$&"):fe}var AI=_ie;function xie(fe,_e){for(var Xe=-1,Lt=fe==null?0:fe.length;++Xegr?0:gr+Xe),Lt=Lt===void 0||Lt>gr?gr:Vo(Lt),Lt<0&&(Lt+=gr),Lt=Xe>Lt?0:Cw(Lt);Xe-1?gr[Zr?_e[Ea]:Ea]:void 0}}var Pw=Cie;var Lie=Math.max;function Pie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:Vo(Xe);return gr<0&&(gr=Lie(Lt+gr,0)),Mm(fe,xo(_e,3),gr)}var Iw=Pie;var Iie=Pw(Iw),LI=Iie;function Rie(fe,_e,Xe){var Lt;return Xe(fe,function(gr,Zr,Ea){if(_e(gr,Zr,Ea))return Lt=Zr,!1}),Lt}var Rw=Rie;function Die(fe,_e){return Rw(fe,xo(_e,3),fp)}var PI=Die;var zie=Math.max,Fie=Math.min;function Oie(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt-1;return Xe!==void 0&&(gr=Vo(Xe),gr=Xe<0?zie(Lt+gr,0):Fie(gr,Lt-1)),Mm(fe,xo(_e,3),gr,!0)}var Dw=Oie;var Bie=Pw(Dw),II=Bie;function Nie(fe,_e){return Rw(fe,xo(_e,3),Dy)}var RI=Nie;function Uie(fe){return fe&&fe.length?fe[0]:void 0}var v_=Uie;function jie(fe,_e){var Xe=-1,Lt=Vc(fe)?Array(fe.length):[];return Up(fe,function(gr,Zr,Ea){Lt[++Xe]=_e(gr,Zr,Ea)}),Lt}var zw=jie;function qie(fe,_e){var Xe=zo(fe)?Sl:zw;return Xe(fe,xo(_e,3))}var jm=qie;function Vie(fe,_e){return Qu(jm(fe,_e),1)}var DI=Vie;var Gie=1/0;function Hie(fe,_e){return Qu(jm(fe,_e),Gie)}var zI=Hie;function Wie(fe,_e,Xe){return Xe=Xe===void 0?1:Vo(Xe),Qu(jm(fe,_e),Xe)}var FI=Wie;var Xie=1/0;function Zie(fe){var _e=fe==null?0:fe.length;return _e?Qu(fe,Xie):[]}var OI=Zie;function Yie(fe,_e){var Xe=fe==null?0:fe.length;return Xe?(_e=_e===void 0?1:Vo(_e),Qu(fe,_e)):[]}var BI=Yie;var Kie=512;function Jie(fe){return op(fe,Kie)}var NI=Jie;var $ie=gy("floor"),UI=$ie;var Qie="Expected a function",ene=8,tne=32,rne=128,ane=256;function ine(fe){return up(function(_e){var Xe=_e.length,Lt=Xe,gr=zp.prototype.thru;for(fe&&_e.reverse();Lt--;){var Zr=_e[Lt];if(typeof Zr!="function")throw new TypeError(Qie);if(gr&&!Ea&&$g(Zr)=="wrapper")var Ea=new zp([],!0)}for(Lt=Ea?Lt:Xe;++Lt_e}var zy=yne;function _ne(fe){return function(_e,Xe){return typeof _e=="string"&&typeof Xe=="string"||(_e=Sh(_e),Xe=Sh(Xe)),fe(_e,Xe)}}var Vm=_ne;var xne=Vm(zy),JI=xne;var bne=Vm(function(fe,_e){return fe>=_e}),$I=bne;var wne=Object.prototype,Tne=wne.hasOwnProperty;function Ane(fe,_e){return fe!=null&&Tne.call(fe,_e)}var QI=Ane;function Sne(fe,_e){return fe!=null&&dw(fe,_e,QI)}var e8=Sne;var Mne=Math.max,Ene=Math.min;function kne(fe,_e,Xe){return fe>=Ene(_e,Xe)&&fe-1:!!gr&&Ad(fe,_e,Xe)>-1}var a8=zne;var Fne=Math.max;function One(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Xe==null?0:Vo(Xe);return gr<0&&(gr=Fne(Lt+gr,0)),Ad(fe,_e,gr)}var i8=One;function Bne(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,0,-1):[]}var n8=Bne;var Nne=Math.min;function Une(fe,_e,Xe){for(var Lt=Xe?Ry:Em,gr=fe[0].length,Zr=fe.length,Ea=Zr,ei=Array(Zr),ai=1/0,wn=[];Ea--;){var _n=fe[Ea];Ea&&_e&&(_n=Sl(_n,wf(_e))),ai=Nne(_n.length,ai),ei[Ea]=!Xe&&(_e||gr>=120&&_n.length>=120)?new Fm(Ea&&_n):void 0}_n=fe[0];var Fn=-1,So=ei[0];e:for(;++Fn=-F8&&fe<=F8}var O8=zoe;function Foe(fe){return fe===void 0}var B8=Foe;var Ooe="[object WeakMap]";function Boe(fe){return Dl(fe)&&jh(fe)==Ooe}var N8=Boe;var Noe="[object WeakSet]";function Uoe(fe){return Dl(fe)&&Oc(fe)==Noe}var U8=Uoe;var joe=1;function qoe(fe){return xo(typeof fe=="function"?fe:cp(fe,joe))}var j8=qoe;var Voe=Array.prototype,Goe=Voe.join;function Hoe(fe,_e){return fe==null?"":Goe.call(fe,_e)}var q8=Hoe;var Woe=Cd(function(fe,_e,Xe){return fe+(Xe?"-":"")+_e.toLowerCase()}),V8=Woe;var Xoe=Nm(function(fe,_e,Xe){sp(fe,Xe,_e)}),G8=Xoe;function Zoe(fe,_e,Xe){for(var Lt=Xe+1;Lt--;)if(fe[Lt]===_e)return Lt;return Lt}var H8=Zoe;var Yoe=Math.max,Koe=Math.min;function Joe(fe,_e,Xe){var Lt=fe==null?0:fe.length;if(!Lt)return-1;var gr=Lt;return Xe!==void 0&&(gr=Vo(Xe),gr=gr<0?Yoe(Lt+gr,0):Koe(gr,Lt-1)),_e===_e?H8(fe,_e,gr):Mm(fe,Rb,gr,!0)}var W8=Joe;var $oe=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+_e.toLowerCase()}),X8=$oe;var Qoe=Wb("toLowerCase"),Z8=Qoe;function ese(fe,_e){return fe<_e}var Uy=ese;var tse=Vm(Uy),Y8=tse;var rse=Vm(function(fe,_e){return fe<=_e}),K8=rse;function ase(fe,_e){var Xe={};return _e=xo(_e,3),fp(fe,function(Lt,gr,Zr){sp(Xe,_e(Lt,gr,Zr),Lt)}),Xe}var J8=ase;function ise(fe,_e){var Xe={};return _e=xo(_e,3),fp(fe,function(Lt,gr,Zr){sp(Xe,gr,_e(Lt,gr,Zr))}),Xe}var $8=ise;var nse=1;function ose(fe){return pw(cp(fe,nse))}var Q8=ose;var sse=1;function lse(fe,_e){return vw(fe,cp(_e,sse))}var eR=lse;function use(fe,_e,Xe){for(var Lt=-1,gr=fe.length;++Lt=this.__values__.length,_e=fe?void 0:this.__values__[this.__index__++];return{done:fe,value:_e}}var hR=Lse;function Pse(fe,_e){var Xe=fe.length;if(Xe)return _e+=_e<0?Xe:0,np(_e,Xe)?fe[_e]:void 0}var Gw=Pse;function Ise(fe,_e){return fe&&fe.length?Gw(fe,Vo(_e)):void 0}var pR=Ise;function Rse(fe){return fe=Vo(fe),Go(function(_e){return Gw(_e,fe)})}var dR=Rse;function Dse(fe,_e){return _e=Fp(_e,fe),fe=Bw(fe,_e),fe==null||delete fe[Eh(Tf(_e))]}var qy=Dse;function zse(fe){return gv(fe)?void 0:fe}var vR=zse;var Fse=1,Ose=2,Bse=4,Nse=up(function(fe,_e){var Xe={};if(fe==null)return Xe;var Lt=!1;_e=Sl(_e,function(Zr){return Zr=Fp(Zr,fe),Lt||(Lt=Zr.length>1),Zr}),Mh(fe,by(fe),Xe),Lt&&(Xe=cp(Xe,Fse|Ose|Bse,vR));for(var gr=_e.length;gr--;)qy(Xe,_e[gr]);return Xe}),mR=Nse;function Use(fe,_e,Xe,Lt){if(!Cl(fe))return fe;_e=Fp(_e,fe);for(var gr=-1,Zr=_e.length,Ea=Zr-1,ei=fe;ei!=null&&++gr_e||Zr&&Ea&&ai&&!ei&&!wn||Lt&&Ea&&ai||!Xe&&ai||!gr)return 1;if(!Lt&&!Zr&&!wn&&fe<_e||wn&&Xe&&gr&&!Lt&&!Zr||ei&&Xe&&gr||!Ea&&gr||!ai)return-1}return 0}var Xw=Wse;function Xse(fe,_e,Xe){for(var Lt=-1,gr=fe.criteria,Zr=_e.criteria,Ea=gr.length,ei=Xe.length;++Lt=ei)return ai;var wn=Xe[Lt];return ai*(wn=="desc"?-1:1)}}return fe.index-_e.index}var xR=Xse;function Zse(fe,_e,Xe){_e.length?_e=Sl(_e,function(Zr){return zo(Zr)?function(Ea){return ld(Ea,Zr.length===1?Zr[0]:Zr)}:Zr}):_e=[Bc];var Lt=-1;_e=Sl(_e,wf(xo));var gr=zw(fe,function(Zr,Ea,ei){var ai=Sl(_e,function(wn){return wn(Zr)});return{criteria:ai,index:++Lt,value:Zr}});return _R(gr,function(Zr,Ea){return xR(Zr,Ea,Xe)})}var Zw=Zse;function Yse(fe,_e,Xe,Lt){return fe==null?[]:(zo(_e)||(_e=_e==null?[]:[_e]),Xe=Lt?void 0:Xe,zo(Xe)||(Xe=Xe==null?[]:[Xe]),Zw(fe,_e,Xe))}var bR=Yse;function Kse(fe){return up(function(_e){return _e=Sl(_e,wf(xo)),Go(function(Xe){var Lt=this;return fe(_e,function(gr){return xf(gr,Lt,Xe)})})})}var Vy=Kse;var Jse=Vy(Sl),wR=Jse;var $se=Go,TR=$se;var Qse=Math.min,ele=TR(function(fe,_e){_e=_e.length==1&&zo(_e[0])?Sl(_e[0],wf(xo)):Sl(Qu(_e,1),wf(xo));var Xe=_e.length;return Go(function(Lt){for(var gr=-1,Zr=Qse(Lt.length,Xe);++grale)return Xe;do _e%2&&(Xe+=fe),_e=ile(_e/2),_e&&(fe+=fe);while(_e);return Xe}var m_=nle;var ole=Cy("length"),ER=ole;var CR="\\ud800-\\udfff",sle="\\u0300-\\u036f",lle="\\ufe20-\\ufe2f",ule="\\u20d0-\\u20ff",cle=sle+lle+ule,fle="\\ufe0e\\ufe0f",hle="["+CR+"]",NA="["+cle+"]",UA="\\ud83c[\\udffb-\\udfff]",ple="(?:"+NA+"|"+UA+")",LR="[^"+CR+"]",PR="(?:\\ud83c[\\udde6-\\uddff]){2}",IR="[\\ud800-\\udbff][\\udc00-\\udfff]",dle="\\u200d",RR=ple+"?",DR="["+fle+"]?",vle="(?:"+dle+"(?:"+[LR,PR,IR].join("|")+")"+DR+RR+")*",mle=DR+RR+vle,gle="(?:"+[LR+NA+"?",NA,PR,IR,hle].join("|")+")",kR=RegExp(UA+"(?="+UA+")|"+gle+mle,"g");function yle(fe){for(var _e=kR.lastIndex=0;kR.test(fe);)++_e;return _e}var zR=yle;function _le(fe){return kd(fe)?zR(fe):ER(fe)}var Pd=_le;var xle=Math.ceil;function ble(fe,_e){_e=_e===void 0?" ":nh(_e);var Xe=_e.length;if(Xe<2)return Xe?m_(_e,fe):_e;var Lt=m_(_e,xle(fe/Pd(_e)));return kd(_e)?Bp(Uh(Lt),0,fe).join(""):Lt.slice(0,fe)}var H0=ble;var wle=Math.ceil,Tle=Math.floor;function Ale(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;if(!_e||Lt>=_e)return fe;var gr=(_e-Lt)/2;return H0(Tle(gr),Xe)+fe+H0(wle(gr),Xe)}var FR=Ale;function Sle(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?fe+H0(_e-Lt,Xe):fe}var OR=Sle;function Mle(fe,_e,Xe){fe=Us(fe),_e=Vo(_e);var Lt=_e?Pd(fe):0;return _e&&Lt<_e?H0(_e-Lt,Xe)+fe:fe}var BR=Mle;var Ele=/^\s+/,kle=wu.parseInt;function Cle(fe,_e,Xe){return Xe||_e==null?_e=0:_e&&(_e=+_e),kle(Us(fe).replace(Ele,""),_e||0)}var NR=Cle;var Lle=32,jA=Go(function(fe,_e){var Xe=Yp(_e,Sd(jA));return op(fe,Lle,void 0,_e,Xe)});jA.placeholder={};var Yw=jA;var Ple=64,qA=Go(function(fe,_e){var Xe=Yp(_e,Sd(qA));return op(fe,Ple,void 0,_e,Xe)});qA.placeholder={};var UR=qA;var Ile=Nm(function(fe,_e,Xe){fe[Xe?0:1].push(_e)},function(){return[[],[]]}),jR=Ile;function Rle(fe,_e){return Hw(fe,_e,function(Xe,Lt){return ky(fe,Lt)})}var qR=Rle;var Dle=up(function(fe,_e){return fe==null?{}:qR(fe,_e)}),VR=Dle;function zle(fe){for(var _e,Xe=this;Xe instanceof Am;){var Lt=Cb(Xe);Lt.__index__=0,Lt.__values__=void 0,_e?gr.__wrapped__=Lt:_e=Lt;var gr=Lt;Xe=Xe.__wrapped__}return gr.__wrapped__=fe,_e}var GR=zle;function Fle(fe){return function(_e){return fe==null?void 0:ld(fe,_e)}}var HR=Fle;function Ole(fe,_e,Xe,Lt){for(var gr=Xe-1,Zr=fe.length;++gr-1;)ei!==fe&&XR.call(ei,ai,1),XR.call(fe,ai,1);return fe}var Gy=Nle;function Ule(fe,_e){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e):fe}var Kw=Ule;var jle=Go(Kw),ZR=jle;function qle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,xo(Xe,2)):fe}var YR=qle;function Vle(fe,_e,Xe){return fe&&fe.length&&_e&&_e.length?Gy(fe,_e,void 0,Xe):fe}var KR=Vle;var Gle=Array.prototype,Hle=Gle.splice;function Wle(fe,_e){for(var Xe=fe?_e.length:0,Lt=Xe-1;Xe--;){var gr=_e[Xe];if(Xe==Lt||gr!==Zr){var Zr=gr;np(gr)?Hle.call(fe,gr,1):qy(fe,gr)}}return fe}var Jw=Wle;var Xle=up(function(fe,_e){var Xe=fe==null?0:fe.length,Lt=fy(fe,_e);return Jw(fe,Sl(_e,function(gr){return np(gr,Xe)?+gr:gr}).sort(Xw)),Lt}),JR=Xle;var Zle=Math.floor,Yle=Math.random;function Kle(fe,_e){return fe+Zle(Yle()*(_e-fe+1))}var Hy=Kle;var Jle=parseFloat,$le=Math.min,Qle=Math.random;function eue(fe,_e,Xe){if(Xe&&typeof Xe!="boolean"&&Nc(fe,_e,Xe)&&(_e=Xe=void 0),Xe===void 0&&(typeof _e=="boolean"?(Xe=_e,_e=void 0):typeof fe=="boolean"&&(Xe=fe,fe=void 0)),fe===void 0&&_e===void 0?(fe=0,_e=1):(fe=od(fe),_e===void 0?(_e=fe,fe=0):_e=od(_e)),fe>_e){var Lt=fe;fe=_e,_e=Lt}if(Xe||fe%1||_e%1){var gr=Qle();return $le(fe+gr*(_e-fe+Jle("1e-"+((gr+"").length-1))),_e)}return Hy(fe,_e)}var $R=eue;var tue=Math.ceil,rue=Math.max;function aue(fe,_e,Xe,Lt){for(var gr=-1,Zr=rue(tue((_e-fe)/(Xe||1)),0),Ea=Array(Zr);Zr--;)Ea[Lt?Zr:++gr]=fe,fe+=Xe;return Ea}var QR=aue;function iue(fe){return function(_e,Xe,Lt){return Lt&&typeof Lt!="number"&&Nc(_e,Xe,Lt)&&(Xe=Lt=void 0),_e=od(_e),Xe===void 0?(Xe=_e,_e=0):Xe=od(Xe),Lt=Lt===void 0?_e1&&Nc(fe,_e[0],_e[1])?_e=[]:Xe>2&&Nc(_e[0],_e[1],_e[2])&&(_e=[_e[0]]),Zw(fe,Qu(_e,1),[])}),k4=Vue;var Gue=4294967295,Hue=Gue-1,Wue=Math.floor,Xue=Math.min;function Zue(fe,_e,Xe,Lt){var gr=0,Zr=fe==null?0:fe.length;if(Zr===0)return 0;_e=Xe(_e);for(var Ea=_e!==_e,ei=_e===null,ai=Rf(_e),wn=_e===void 0;gr>>1;function Jue(fe,_e,Xe){var Lt=0,gr=fe==null?Lt:fe.length;if(typeof _e=="number"&&_e===_e&&gr<=Kue){for(;Lt>>1,Ea=fe[Zr];Ea!==null&&!Rf(Ea)&&(Xe?Ea<=_e:Ea<_e)?Lt=Zr+1:gr=Zr}return gr}return Wy(fe,_e,Bc,Xe)}var Xm=Jue;function $ue(fe,_e){return Xm(fe,_e)}var C4=$ue;function Que(fe,_e,Xe){return Wy(fe,_e,xo(Xe,2))}var L4=Que;function ece(fe,_e){var Xe=fe==null?0:fe.length;if(Xe){var Lt=Xm(fe,_e);if(Lt>>0,Xe?(fe=Us(fe),fe&&(typeof _e=="string"||_e!=null&&!Ny(_e))&&(_e=nh(_e),!_e&&kd(fe))?Bp(Uh(fe),0,Xe):fe.split(_e,Xe)):[]}var O4=lce;var uce="Expected a function",cce=Math.max;function fce(fe,_e){if(typeof fe!="function")throw new TypeError(uce);return _e=_e==null?0:cce(Vo(_e),0),Go(function(Xe){var Lt=Xe[_e],gr=Bp(Xe,0,_e);return Lt&&Op(gr,Lt),xf(fe,this,gr)})}var B4=fce;var hce=Cd(function(fe,_e,Xe){return fe+(Xe?" ":"")+py(_e)}),N4=hce;function pce(fe,_e,Xe){return fe=Us(fe),Xe=Xe==null?0:ud(Vo(Xe),0,fe.length),_e=nh(_e),fe.slice(Xe,Xe+_e.length)==_e}var U4=pce;function dce(){return{}}var j4=dce;function vce(){return""}var q4=vce;function mce(){return!0}var V4=mce;var gce=Tm(function(fe,_e){return fe-_e},0),G4=gce;function yce(fe){return fe&&fe.length?jy(fe,Bc):0}var H4=yce;function _ce(fe,_e){return fe&&fe.length?jy(fe,xo(_e,2)):0}var W4=_ce;function xce(fe){var _e=fe==null?0:fe.length;return _e?Yf(fe,1,_e):[]}var X4=xce;function bce(fe,_e,Xe){return fe&&fe.length?(_e=Xe||_e===void 0?1:Vo(_e),Yf(fe,0,_e<0?0:_e)):[]}var Z4=bce;function wce(fe,_e,Xe){var Lt=fe==null?0:fe.length;return Lt?(_e=Xe||_e===void 0?1:Vo(_e),_e=Lt-_e,Yf(fe,_e<0?0:_e,Lt)):[]}var Y4=wce;function Tce(fe,_e){return fe&&fe.length?Um(fe,xo(_e,3),!1,!0):[]}var K4=Tce;function Ace(fe,_e){return fe&&fe.length?Um(fe,xo(_e,3)):[]}var J4=Ace;function Sce(fe,_e){return _e(fe),fe}var $4=Sce;var Q4=Object.prototype,Mce=Q4.hasOwnProperty;function Ece(fe,_e,Xe,Lt){return fe===void 0||oh(fe,Q4[Xe])&&!Mce.call(Lt,Xe)?_e:fe}var VA=Ece;var kce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Cce(fe){return"\\"+kce[fe]}var eD=Cce;var Lce=/<%=([\s\S]+?)%>/g,r2=Lce;var Pce=/<%-([\s\S]+?)%>/g,tD=Pce;var Ice=/<%([\s\S]+?)%>/g,rD=Ice;var Rce={escape:tD,evaluate:rD,interpolate:r2,variable:"",imports:{_:{escape:Ew}}},y_=Rce;var Dce="Invalid `variable` option passed into `_.template`",zce=/\b__p \+= '';/g,Fce=/\b(__p \+=) '' \+/g,Oce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bce=/[()=,{}\[\]\/\s]/,Nce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,a2=/($^)/,Uce=/['\n\r\u2028\u2029\\]/g,jce=Object.prototype,aD=jce.hasOwnProperty;function qce(fe,_e,Xe){var Lt=y_.imports._.templateSettings||y_;Xe&&Nc(fe,_e,Xe)&&(_e=void 0),fe=Us(fe),_e=Cm({},_e,Lt,VA);var gr=Cm({},_e.imports,Lt.imports,VA),Zr=gu(gr),Ea=Fy(gr,Zr),ei,ai,wn=0,_n=_e.interpolate||a2,Fn="__p += '",So=RegExp((_e.escape||a2).source+"|"+_n.source+"|"+(_n===r2?Nce:a2).source+"|"+(_e.evaluate||a2).source+"|$","g"),vs=aD.call(_e,"sourceURL")?"//# sourceURL="+(_e.sourceURL+"").replace(/\s/g," ")+` +`:"";fe.replace(So,function(He,Jl,ou,jp,zf,Gh){return ou||(ou=jp),Fn+=fe.slice(wn,Gh).replace(Uce,eD),Jl&&(ei=!0,Fn+=`' + __e(`+Jl+`) + -'`),zf&&(oi=!0,Fn+=`'; +'`),zf&&(ai=!0,Fn+=`'; `+zf+`; __p += '`),ou&&(Fn+=`' + ((__t = (`+ou+`)) == null ? '' : __t) + -'`),Ln=Gh+He.length,He}),Fn+=`'; +'`),wn=Gh+He.length,He}),Fn+=`'; `;var Qs=aD.call(_e,"variable")&&_e.variable;if(!Qs)Fn=`with (obj) { `+Fn+` } -`;else if(Bce.test(Qs))throw new Error(Dce);Fn=(oi?Fn.replace(zce,""):Fn).replace(Fce,"$1").replace(Oce,"$1;"),Fn="function("+(Qs||"obj")+`) { +`;else if(Bce.test(Qs))throw new Error(Dce);Fn=(ai?Fn.replace(zce,""):Fn).replace(Fce,"$1").replace(Oce,"$1;"),Fn="function("+(Qs||"obj")+`) { `+(Qs?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ei?", __e = _.escape":"")+(oi?`, __j = Array.prototype.join; +`)+"var __t, __p = ''"+(ei?", __e = _.escape":"")+(ai?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Fn+`return __p -}`;var Ho=Vb(function(){return Function(Yr,vs+"return "+Fn).apply(void 0,Ea)});if(Ho.source=Fn,hy(Ho))throw Ho;return Ho}var iD=qce;var Vce="Expected a function";function Gce(fe,_e,Xe){var Lt=!0,gr=!0;if(typeof fe!="function")throw new TypeError(Vce);return Cl(Xe)&&(Lt="leading"in Xe?!!Xe.leading:Lt,gr="trailing"in Xe?!!Xe.trailing:gr),xw(fe,_e,{leading:Lt,maxWait:_e,trailing:gr})}var nD=Gce;function Hce(fe,_e){return _e(fe)}var Xv=Hce;var Wce=9007199254740991,GA=4294967295,Xce=Math.min;function Zce(fe,_e){if(fe=Vo(fe),fe<1||fe>Wce)return[];var Xe=GA,Lt=Xce(fe,GA);_e=kh(_e),fe-=GA;for(var gr=ay(Lt,_e);++Xe-1;);return Xe}var n2=afe;function ife(fe,_e){for(var Xe=-1,Lt=fe.length;++Xe-1;);return Xe}var o2=ife;function nfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return wb(fe);if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=Uh(_e),Yr=o2(Lt,gr),Ea=n2(Lt,gr)+1;return Bp(Lt,Yr,Ea).join("")}var dD=nfe;function ofe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.slice(0,bb(fe)+1);if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=n2(Lt,Uh(_e))+1;return Bp(Lt,0,gr).join("")}var vD=ofe;var sfe=/^\s+/;function lfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.replace(sfe,"");if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=o2(Lt,Uh(_e));return Bp(Lt,gr).join("")}var mD=lfe;var ufe=30,cfe="...",ffe=/\w*$/;function hfe(fe,_e){var Xe=ufe,Lt=cfe;if(Cl(_e)){var gr="separator"in _e?_e.separator:gr;Xe="length"in _e?Vo(_e.length):Xe,Lt="omission"in _e?nh(_e.omission):Lt}fe=Us(fe);var Yr=fe.length;if(kd(fe)){var Ea=Uh(fe);Yr=Ea.length}if(Xe>=Yr)return fe;var ei=Xe-Pd(Lt);if(ei<1)return Lt;var oi=Ea?Bp(Ea,0,ei).join(""):fe.slice(0,ei);if(gr===void 0)return oi+Lt;if(Ea&&(ei+=oi.length-ei),Ny(gr)){if(fe.slice(ei).search(gr)){var Ln,_n=oi;for(gr.global||(gr=RegExp(gr.source,Us(ffe.exec(gr))+"g")),gr.lastIndex=0;Ln=gr.exec(_n);)var Fn=Ln.index;oi=oi.slice(0,Fn===void 0?ei:Fn)}}else if(fe.indexOf(nh(gr),ei)!=ei){var So=oi.lastIndexOf(gr);So>-1&&(oi=oi.slice(0,So))}return oi+Lt}var gD=hfe;function pfe(fe){return Fb(fe,1)}var yD=pfe;var dfe={"&":"&","<":"<",">":">",""":'"',"'":"'"},vfe=vy(dfe),_D=vfe;var xD=/&(?:amp|lt|gt|quot|#39);/g,mfe=RegExp(xD.source);function gfe(fe){return fe=Us(fe),fe&&mfe.test(fe)?fe.replace(xD,_D):fe}var bD=gfe;var yfe=1/0,_fe=zm&&1/Om(new zm([,-0]))[1]==yfe?function(fe){return new zm(fe)}:Kg,wD=_fe;var xfe=200;function bfe(fe,_e,Xe){var Lt=-1,gr=Em,Yr=fe.length,Ea=!0,ei=[],oi=ei;if(Xe)Ea=!1,gr=Ry;else if(Yr>=xfe){var Ln=_e?null:wD(fe);if(Ln)return Om(Ln);Ea=!1,gr=Hv,oi=new Fm}else oi=_e?[]:ei;e:for(;++Lt1||this.__actions__.length||!(Lt instanceof Bl)||!np(Xe)?this.thru(gr):(Lt=Lt.slice(Xe,+Xe+(_e?1:0)),Lt.__actions__.push({func:Xv,args:[gr],thisArg:void 0}),new zp(Lt,this.__chain__).thru(function(Yr){return _e&&!Yr.length&&Yr.push(void 0),Yr}))}),OD=jfe;function qfe(){return Kb(this)}var BD=qfe;function Vfe(){var fe=this.__wrapped__;if(fe instanceof Bl){var _e=fe;return this.__actions__.length&&(_e=new Bl(this)),_e=_e.reverse(),_e.__actions__.push({func:Xv,args:[g_],thisArg:void 0}),new zp(_e,this.__chain__)}return this.thru(g_)}var ND=Vfe;function Gfe(fe,_e,Xe){var Lt=fe.length;if(Lt<2)return Lt?Jp(fe[0]):[];for(var gr=-1,Yr=Array(Lt);++gr1?fe[_e-1]:void 0;return Xe=typeof Xe=="function"?(fe.pop(),Xe):void 0,s2(fe,Xe)}),WD=$fe;var gs={chunk:GL,compact:CP,concat:LP,difference:uI,differenceBy:cI,differenceWith:fI,drop:pI,dropRight:dI,dropRightWhile:vI,dropWhile:mI,fill:kI,findIndex:Iw,findLastIndex:Dw,first:v_,flatten:qb,flattenDeep:OI,flattenDepth:BI,fromPairs:XI,head:v_,indexOf:i8,initial:n8,intersection:o8,intersectionBy:s8,intersectionWith:l8,join:q8,last:Tf,lastIndexOf:W8,nth:pR,pull:ZR,pullAll:Kw,pullAllBy:YR,pullAllWith:KR,pullAt:JR,remove:s4,reverse:g_,slice:A4,sortedIndex:C4,sortedIndexBy:L4,sortedIndexOf:P4,sortedLastIndex:I4,sortedLastIndexBy:R4,sortedLastIndexOf:D4,sortedUniq:z4,sortedUniqBy:F4,tail:X4,take:Z4,takeRight:Y4,takeRightWhile:K4,takeWhile:J4,union:TD,unionBy:AD,unionWith:SD,uniq:MD,uniqBy:ED,uniqWith:kD,unzip:Xy,unzipWith:s2,without:zD,xor:UD,xorBy:jD,xorWith:qD,zip:VD,zipObject:GD,zipObjectDeep:HD,zipWith:WD};var xc={countBy:YP,each:f_,eachRight:h_,every:MI,filter:CI,find:LI,findLast:II,flatMap:DI,flatMapDeep:zI,flatMapDepth:FI,forEach:f_,forEachRight:h_,groupBy:KI,includes:a8,invokeMap:d8,keyBy:G8,map:jm,orderBy:bR,partition:jR,reduce:a4,reduceRight:n4,reject:o4,sample:d4,sampleSize:g4,shuffle:w4,size:T4,some:E4,sortBy:k4};var HA={now:Py};var Df={after:aC,ary:Fb,before:Gb,bind:Hb,bindKey:fL,curry:JP,curryRight:$P,debounce:xw,defer:sI,delay:lI,flip:NI,memoize:Ub,negate:Wv,once:yR,overArgs:AR,partial:Yw,partialRight:UR,rearg:r4,rest:c4,spread:B4,throttle:nD,unary:yD,wrap:FD};var Vs={castArray:qL,clone:AP,cloneDeep:SP,cloneDeepWith:MP,cloneWith:EP,conformsTo:WP,eq:oh,gt:JI,gte:$I,isArguments:pd,isArray:zo,isArrayBuffer:g8,isArrayLike:Vc,isArrayLikeObject:Eu,isBoolean:y8,isBuffer:Kp,isDate:b8,isElement:w8,isEmpty:T8,isEqual:A8,isEqualWith:S8,isError:hy,isFinite:M8,isFunction:ip,isInteger:Nw,isLength:km,isMap:nw,isMatch:E8,isMatchWith:k8,isNaN:C8,isNative:P8,isNil:I8,isNull:R8,isNumber:Uw,isObject:Cl,isObjectLike:Dl,isPlainObject:gv,isRegExp:Ny,isSafeInteger:O8,isSet:ow,isString:Gm,isSymbol:Rf,isTypedArray:Ed,isUndefined:B8,isWeakMap:N8,isWeakSet:U8,lt:Y8,lte:K8,toArray:Vw,toFinite:od,toInteger:Vo,toLength:Cw,toNumber:Sh,toPlainObject:bw,toSafeInteger:fD,toString:Us};var bp={add:eC,ceil:VL,divide:hI,floor:UI,max:tR,maxBy:rR,mean:aR,meanBy:iR,min:lR,minBy:uR,multiply:cR,round:h4,subtract:G4,sum:H4,sumBy:W4};var __={clamp:HL,inRange:r8,random:$R};var dl={assign:BC,assignIn:s_,assignInWith:Cm,assignWith:jC,at:lL,create:KP,defaults:tI,defaultsDeep:oI,entries:p_,entriesIn:d_,extend:s_,extendWith:Cm,findKey:PI,findLastKey:RI,forIn:VI,forInRight:GI,forOwn:HI,forOwnRight:WI,functions:ZI,functionsIn:YI,get:cy,has:e8,hasIn:ky,invert:c8,invertBy:h8,invoke:p8,keys:gu,keysIn:Gc,mapKeys:J8,mapValues:$8,merge:nR,mergeWith:ww,omit:mR,omitBy:gR,pick:VR,pickBy:Ww,result:f4,set:y4,setWith:_4,toPairs:p_,toPairsIn:d_,transform:pD,unset:LD,update:PD,updateWith:ID,values:Ld,valuesIn:DD};var Id={at:OD,chain:Kb,commit:kP,lodash:da,next:hR,plant:GR,reverse:ND,tap:$4,thru:Xv,toIterator:sD,toJSON:Zm,value:Zm,valueOf:Zm,wrapperChain:BD};var ju={camelCase:jL,capitalize:Xb,deburr:Zb,endsWith:yI,escape:Ew,escapeRegExp:AI,kebabCase:V8,lowerCase:X8,lowerFirst:Z8,pad:FR,padEnd:OR,padStart:BR,parseInt:NR,repeat:l4,replace:u4,snakeCase:S4,split:O4,startCase:N4,startsWith:U4,template:iD,templateSettings:y_,toLower:lD,toUpper:hD,trim:dD,trimEnd:vD,trimStart:mD,truncate:gD,unescape:bD,upperCase:RD,upperFirst:py,words:Yb};var ec={attempt:Vb,bindAll:cL,cond:VP,conforms:HP,constant:Qg,defaultTo:QP,flow:jI,flowRight:qI,identity:Bc,iteratee:j8,matches:Q8,matchesProperty:eR,method:oR,methodOf:sR,mixin:qw,noop:Kg,nthArg:dR,over:wR,overEvery:SR,overSome:MR,property:mw,propertyOf:HR,range:e4,rangeRight:t4,stubArray:_y,stubFalse:iy,stubObject:j4,stubString:q4,stubTrue:V4,times:oD,toPath:uD,uniqueId:CD};function Qfe(){var fe=new Bl(this.__wrapped__);return fe.__actions__=pf(this.__actions__),fe.__dir__=this.__dir__,fe.__filtered__=this.__filtered__,fe.__iteratees__=pf(this.__iteratees__),fe.__takeCount__=this.__takeCount__,fe.__views__=pf(this.__views__),fe}var XD=Qfe;function ehe(){if(this.__filtered__){var fe=new Bl(this);fe.__dir__=-1,fe.__filtered__=!0}else fe=this.clone(),fe.__dir__*=-1;return fe}var ZD=ehe;var the=Math.max,rhe=Math.min;function ahe(fe,_e,Xe){for(var Lt=-1,gr=Xe.length;++Lt0||_e<0)?new Bl(Xe):(fe<0?Xe=Xe.takeRight(-fe):fe&&(Xe=Xe.drop(fe)),_e!==void 0&&(_e=Vo(_e),Xe=_e<0?Xe.dropRight(-_e):Xe.take(_e-fe)),Xe)};Bl.prototype.takeRightWhile=function(fe){return this.reverse().takeWhile(fe).reverse()};Bl.prototype.toArray=function(){return this.take(QD)};fp(Bl.prototype,function(fe,_e){var Xe=/^(?:filter|find|map|reject)|While$/.test(_e),Lt=/^(?:head|last)$/.test(_e),gr=da[Lt?"take"+(_e=="last"?"Right":""):_e],Yr=Lt||/^find/.test(_e);gr&&(da.prototype[_e]=function(){var Ea=this.__wrapped__,ei=Lt?[1]:arguments,oi=Ea instanceof Bl,Ln=ei[0],_n=oi||zo(Ea),Fn=function(Jl){var ou=gr.apply(da,Op([Jl],ei));return Lt&&So?ou[0]:ou};_n&&Xe&&typeof Ln=="function"&&Ln.length!=1&&(oi=_n=!1);var So=this.__chain__,vs=!!this.__actions__.length,Qs=Yr&&!So,Ho=oi&&!vs;if(!Yr&&_n){Ea=Ho?Ea:new Bl(this);var He=fe.apply(Ea,ei);return He.__actions__.push({func:Xv,args:[Fn],thisArg:void 0}),new zp(He,So)}return Qs&&Ho?fe.apply(this,ei):(He=this.thru(Fn),Qs?Lt?He.value()[0]:He.value():He)})});Nh(["pop","push","shift","sort","splice","unshift"],function(fe){var _e=hhe[fe],Xe=/^(?:push|sort|unshift)$/.test(fe)?"tap":"thru",Lt=/^(?:pop|shift)$/.test(fe);da.prototype[fe]=function(){var gr=arguments;if(Lt&&!this.__chain__){var Yr=this.value();return _e.apply(zo(Yr)?Yr:[],gr)}return this[Xe](function(Ea){return _e.apply(zo(Ea)?Ea:[],gr)})}});fp(Bl.prototype,function(fe,_e){var Xe=da[_e];if(Xe){var Lt=Xe.name+"";e7.call(Sm,Lt)||(Sm[Lt]=[]),Sm[Lt].push({name:_e,func:Xe})}});Sm[ry(void 0,uhe).name]=[{name:"wrapper",func:void 0}];Bl.prototype.clone=XD;Bl.prototype.reverse=ZD;Bl.prototype.value=KD;da.prototype.at=Id.at;da.prototype.chain=Id.wrapperChain;da.prototype.commit=Id.commit;da.prototype.next=Id.next;da.prototype.plant=Id.plant;da.prototype.reverse=Id.reverse;da.prototype.toJSON=da.prototype.valueOf=da.prototype.value=Id.value;da.prototype.first=da.prototype.head;JD&&(da.prototype[JD]=Id.toIterator);var ef=da;var Rd=fX(a7());window.PlotlyConfig={MathJaxConfig:"local"};var XA=class{constructor(_e,Xe){this.model=_e,this.serializers=Xe}get(_e){let Xe=this.serializers[_e],Lt=this.model.get(_e);return Xe?.deserialize?Xe.deserialize(Lt):Lt}set(_e,Xe){let Lt=this.serializers[_e];Lt?.serialize&&(Xe=Lt.serialize(Xe)),this.model.set(_e,Xe)}on(_e,Xe){this.model.on(_e,Xe)}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(_e){if(_e==null){var Xe=this.model.get("_widget_data").length;_e=ef.range(Xe)}return Array.isArray(_e)||(_e=[_e]),_e}do_data(){}do_layout(){}do_addTraces(){var _e=this.model.get("_py2js_addTraces");if(_e!==null){var Xe=this.model.get("_widget_data"),Lt=_e.trace_data;ef.forEach(Lt,function(gr){Xe.push(gr)})}}do_deleteTraces(){var _e=this.model.get("_py2js_deleteTraces");if(_e!==null){var Xe=_e.delete_inds,Lt=this.model.get("_widget_data");Xe.slice().reverse().forEach(function(gr){Lt.splice(gr,1)})}}do_moveTraces(){var _e=this.model.get("_py2js_moveTraces");if(_e!==null){var Xe=this.model.get("_widget_data"),Lt=_e.current_trace_inds,gr=_e.new_trace_inds;_he(Xe,Lt,gr)}}do_restyle(){var _e=this.model.get("_py2js_restyle");if(_e!==null){var Xe=_e.restyle_data,Lt=this._normalize_trace_indexes(_e.restyle_traces);n7(this.model.get("_widget_data"),Xe,Lt)}}do_relayout(){var _e=this.model.get("_py2js_relayout");_e!==null&&f2(this.model.get("_widget_layout"),_e.relayout_data)}do_update(){var _e=this.model.get("_py2js_update");if(_e!==null){var Xe=_e.style_data,Lt=_e.layout_data,gr=this._normalize_trace_indexes(_e.style_traces);n7(this.model.get("_widget_data"),Xe,gr),f2(this.model.get("_widget_layout"),Lt)}}do_animate(){var _e=this.model.get("_py2js_animate");if(_e!==null){for(var Xe=_e.style_data,Lt=_e.layout_data,gr=this._normalize_trace_indexes(_e.style_traces),Yr=0;Yrthis.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 Xe=this.model.get("_last_layout_edit_id"),Lt=this.model.get("_last_trace_edit_id");this.viewID=s7();var gr=ef.cloneDeep(this.model.get("_widget_data")),Yr=ef.cloneDeep(this.model.get("_widget_layout"));Yr.height||(Yr.height=360);var Ea=this.model.get("_config");Ea.editSelection=!1,Rd.default.newPlot(_e.el,gr,Yr,Ea).then(function(){_e._sendTraceDeltas(Lt),_e._sendLayoutDelta(Xe),_e.el.on("plotly_restyle",function(oi){_e.handle_plotly_restyle(oi)}),_e.el.on("plotly_relayout",function(oi){_e.handle_plotly_relayout(oi)}),_e.el.on("plotly_update",function(oi){_e.handle_plotly_update(oi)}),_e.el.on("plotly_click",function(oi){_e.handle_plotly_click(oi)}),_e.el.on("plotly_hover",function(oi){_e.handle_plotly_hover(oi)}),_e.el.on("plotly_unhover",function(oi){_e.handle_plotly_unhover(oi)}),_e.el.on("plotly_selected",function(oi){_e.handle_plotly_selected(oi)}),_e.el.on("plotly_deselect",function(oi){_e.handle_plotly_deselect(oi)}),_e.el.on("plotly_doubleclick",function(oi){_e.handle_plotly_doubleclick(oi)});var ei=new CustomEvent("plotlywidget-after-render",{detail:{element:_e.el,viewID:_e.viewID}});document.dispatchEvent(ei)})}_processLuminoMessage(_e,Xe){Xe.apply(this,arguments);var Lt=this;switch(_e.type){case"before-attach":var gr={showgrid:!1,showline:!1,tickvals:[]};Rd.default.newPlot(Lt.el,[],{xaxis:gr,yaxis:gr}),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 _e=this,Xe=_e.model.get("_widget_layout");(ef.isNil(Xe)||ef.isNil(Xe.width))&&Rd.default.Plots.resize(_e.el).then(function(){var Lt=_e.model.get("_last_layout_edit_id");_e._sendLayoutDelta(Lt)})}remove(){Rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return ef.mergeWith({},this.el._fullData,this.el.data,i7)}getFullLayout(){return ef.mergeWith({},this.el._fullLayout,this.el.layout,i7)}buildPointsObject(_e){var Xe;if(_e.hasOwnProperty("points")){var Lt=_e.points,gr=Lt.length,Yr=!0;for(let _n=0;_n=0;gr--)Lt.splice(0,0,fe[_e[gr]]),fe.splice(_e[gr],1);var Yr=ef(Xe).zip(Lt).sortBy(0).unzip().value();Xe=Yr[0],Lt=Yr[1];for(var Ea=0;Ea0&&typeof Yr[0]=="object"){Xe[Lt]=new Array(Yr.length);for(var Ea=0;Ea0&&(Xe[Lt]=ei)}else typeof Yr=="object"&&!Array.isArray(Yr)?Xe[Lt]=x_(Yr,{}):Yr!==void 0&&typeof Yr!="function"&&(Xe[Lt]=Yr)}}return Xe}function s7(fe,_e,Xe,Lt){if(Xe||(Xe=16),_e===void 0&&(_e=24),_e<=0)return"0";var gr=Math.log(Math.pow(2,_e))/Math.log(Xe),Yr="",Ea,ei,oi;for(Ea=2;gr===1/0;Ea*=2)gr=Math.log(Math.pow(2,_e/Ea))/Math.log(Xe)*Ea;var Ln=gr-Math.floor(gr);for(Ea=0;Ea=Math.pow(2,_e)?Lt>10?(console.warn("randstr failed uniqueness"),Yr):s7(fe,_e,Xe,(Lt||0)+1):Yr}var kHe=()=>{let fe;return{initialize(_e){fe=new XA(_e.model,vhe),fe.initialize()},render({el:_e}){let Xe=new ZA(fe,_e);return Xe.perform_render(),()=>Xe.remove()}}};export{XA as FigureModel,ZA as FigureView,kHe as default}; +}`;var Ho=Vb(function(){return Function(Zr,vs+"return "+Fn).apply(void 0,Ea)});if(Ho.source=Fn,hy(Ho))throw Ho;return Ho}var iD=qce;var Vce="Expected a function";function Gce(fe,_e,Xe){var Lt=!0,gr=!0;if(typeof fe!="function")throw new TypeError(Vce);return Cl(Xe)&&(Lt="leading"in Xe?!!Xe.leading:Lt,gr="trailing"in Xe?!!Xe.trailing:gr),xw(fe,_e,{leading:Lt,maxWait:_e,trailing:gr})}var nD=Gce;function Hce(fe,_e){return _e(fe)}var Xv=Hce;var Wce=9007199254740991,GA=4294967295,Xce=Math.min;function Zce(fe,_e){if(fe=Vo(fe),fe<1||fe>Wce)return[];var Xe=GA,Lt=Xce(fe,GA);_e=kh(_e),fe-=GA;for(var gr=ay(Lt,_e);++Xe-1;);return Xe}var n2=afe;function ife(fe,_e){for(var Xe=-1,Lt=fe.length;++Xe-1;);return Xe}var o2=ife;function nfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return wb(fe);if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=Uh(_e),Zr=o2(Lt,gr),Ea=n2(Lt,gr)+1;return Bp(Lt,Zr,Ea).join("")}var dD=nfe;function ofe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.slice(0,bb(fe)+1);if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=n2(Lt,Uh(_e))+1;return Bp(Lt,0,gr).join("")}var vD=ofe;var sfe=/^\s+/;function lfe(fe,_e,Xe){if(fe=Us(fe),fe&&(Xe||_e===void 0))return fe.replace(sfe,"");if(!fe||!(_e=nh(_e)))return fe;var Lt=Uh(fe),gr=o2(Lt,Uh(_e));return Bp(Lt,gr).join("")}var mD=lfe;var ufe=30,cfe="...",ffe=/\w*$/;function hfe(fe,_e){var Xe=ufe,Lt=cfe;if(Cl(_e)){var gr="separator"in _e?_e.separator:gr;Xe="length"in _e?Vo(_e.length):Xe,Lt="omission"in _e?nh(_e.omission):Lt}fe=Us(fe);var Zr=fe.length;if(kd(fe)){var Ea=Uh(fe);Zr=Ea.length}if(Xe>=Zr)return fe;var ei=Xe-Pd(Lt);if(ei<1)return Lt;var ai=Ea?Bp(Ea,0,ei).join(""):fe.slice(0,ei);if(gr===void 0)return ai+Lt;if(Ea&&(ei+=ai.length-ei),Ny(gr)){if(fe.slice(ei).search(gr)){var wn,_n=ai;for(gr.global||(gr=RegExp(gr.source,Us(ffe.exec(gr))+"g")),gr.lastIndex=0;wn=gr.exec(_n);)var Fn=wn.index;ai=ai.slice(0,Fn===void 0?ei:Fn)}}else if(fe.indexOf(nh(gr),ei)!=ei){var So=ai.lastIndexOf(gr);So>-1&&(ai=ai.slice(0,So))}return ai+Lt}var gD=hfe;function pfe(fe){return Fb(fe,1)}var yD=pfe;var dfe={"&":"&","<":"<",">":">",""":'"',"'":"'"},vfe=vy(dfe),_D=vfe;var xD=/&(?:amp|lt|gt|quot|#39);/g,mfe=RegExp(xD.source);function gfe(fe){return fe=Us(fe),fe&&mfe.test(fe)?fe.replace(xD,_D):fe}var bD=gfe;var yfe=1/0,_fe=zm&&1/Om(new zm([,-0]))[1]==yfe?function(fe){return new zm(fe)}:Kg,wD=_fe;var xfe=200;function bfe(fe,_e,Xe){var Lt=-1,gr=Em,Zr=fe.length,Ea=!0,ei=[],ai=ei;if(Xe)Ea=!1,gr=Ry;else if(Zr>=xfe){var wn=_e?null:wD(fe);if(wn)return Om(wn);Ea=!1,gr=Hv,ai=new Fm}else ai=_e?[]:ei;e:for(;++Lt1||this.__actions__.length||!(Lt instanceof Bl)||!np(Xe)?this.thru(gr):(Lt=Lt.slice(Xe,+Xe+(_e?1:0)),Lt.__actions__.push({func:Xv,args:[gr],thisArg:void 0}),new zp(Lt,this.__chain__).thru(function(Zr){return _e&&!Zr.length&&Zr.push(void 0),Zr}))}),OD=jfe;function qfe(){return Kb(this)}var BD=qfe;function Vfe(){var fe=this.__wrapped__;if(fe instanceof Bl){var _e=fe;return this.__actions__.length&&(_e=new Bl(this)),_e=_e.reverse(),_e.__actions__.push({func:Xv,args:[g_],thisArg:void 0}),new zp(_e,this.__chain__)}return this.thru(g_)}var ND=Vfe;function Gfe(fe,_e,Xe){var Lt=fe.length;if(Lt<2)return Lt?Jp(fe[0]):[];for(var gr=-1,Zr=Array(Lt);++gr1?fe[_e-1]:void 0;return Xe=typeof Xe=="function"?(fe.pop(),Xe):void 0,s2(fe,Xe)}),WD=$fe;var gs={chunk:GL,compact:CP,concat:LP,difference:uI,differenceBy:cI,differenceWith:fI,drop:pI,dropRight:dI,dropRightWhile:vI,dropWhile:mI,fill:kI,findIndex:Iw,findLastIndex:Dw,first:v_,flatten:qb,flattenDeep:OI,flattenDepth:BI,fromPairs:XI,head:v_,indexOf:i8,initial:n8,intersection:o8,intersectionBy:s8,intersectionWith:l8,join:q8,last:Tf,lastIndexOf:W8,nth:pR,pull:ZR,pullAll:Kw,pullAllBy:YR,pullAllWith:KR,pullAt:JR,remove:s4,reverse:g_,slice:A4,sortedIndex:C4,sortedIndexBy:L4,sortedIndexOf:P4,sortedLastIndex:I4,sortedLastIndexBy:R4,sortedLastIndexOf:D4,sortedUniq:z4,sortedUniqBy:F4,tail:X4,take:Z4,takeRight:Y4,takeRightWhile:K4,takeWhile:J4,union:TD,unionBy:AD,unionWith:SD,uniq:MD,uniqBy:ED,uniqWith:kD,unzip:Xy,unzipWith:s2,without:zD,xor:UD,xorBy:jD,xorWith:qD,zip:VD,zipObject:GD,zipObjectDeep:HD,zipWith:WD};var xc={countBy:YP,each:f_,eachRight:h_,every:MI,filter:CI,find:LI,findLast:II,flatMap:DI,flatMapDeep:zI,flatMapDepth:FI,forEach:f_,forEachRight:h_,groupBy:KI,includes:a8,invokeMap:d8,keyBy:G8,map:jm,orderBy:bR,partition:jR,reduce:a4,reduceRight:n4,reject:o4,sample:d4,sampleSize:g4,shuffle:w4,size:T4,some:E4,sortBy:k4};var HA={now:Py};var Df={after:aC,ary:Fb,before:Gb,bind:Hb,bindKey:fL,curry:JP,curryRight:$P,debounce:xw,defer:sI,delay:lI,flip:NI,memoize:Ub,negate:Wv,once:yR,overArgs:AR,partial:Yw,partialRight:UR,rearg:r4,rest:c4,spread:B4,throttle:nD,unary:yD,wrap:FD};var Vs={castArray:qL,clone:AP,cloneDeep:SP,cloneDeepWith:MP,cloneWith:EP,conformsTo:WP,eq:oh,gt:JI,gte:$I,isArguments:pd,isArray:zo,isArrayBuffer:g8,isArrayLike:Vc,isArrayLikeObject:Eu,isBoolean:y8,isBuffer:Kp,isDate:b8,isElement:w8,isEmpty:T8,isEqual:A8,isEqualWith:S8,isError:hy,isFinite:M8,isFunction:ip,isInteger:Nw,isLength:km,isMap:nw,isMatch:E8,isMatchWith:k8,isNaN:C8,isNative:P8,isNil:I8,isNull:R8,isNumber:Uw,isObject:Cl,isObjectLike:Dl,isPlainObject:gv,isRegExp:Ny,isSafeInteger:O8,isSet:ow,isString:Gm,isSymbol:Rf,isTypedArray:Ed,isUndefined:B8,isWeakMap:N8,isWeakSet:U8,lt:Y8,lte:K8,toArray:Vw,toFinite:od,toInteger:Vo,toLength:Cw,toNumber:Sh,toPlainObject:bw,toSafeInteger:fD,toString:Us};var bp={add:eC,ceil:VL,divide:hI,floor:UI,max:tR,maxBy:rR,mean:aR,meanBy:iR,min:lR,minBy:uR,multiply:cR,round:h4,subtract:G4,sum:H4,sumBy:W4};var __={clamp:HL,inRange:r8,random:$R};var dl={assign:BC,assignIn:s_,assignInWith:Cm,assignWith:jC,at:lL,create:KP,defaults:tI,defaultsDeep:oI,entries:p_,entriesIn:d_,extend:s_,extendWith:Cm,findKey:PI,findLastKey:RI,forIn:VI,forInRight:GI,forOwn:HI,forOwnRight:WI,functions:ZI,functionsIn:YI,get:cy,has:e8,hasIn:ky,invert:c8,invertBy:h8,invoke:p8,keys:gu,keysIn:Gc,mapKeys:J8,mapValues:$8,merge:nR,mergeWith:ww,omit:mR,omitBy:gR,pick:VR,pickBy:Ww,result:f4,set:y4,setWith:_4,toPairs:p_,toPairsIn:d_,transform:pD,unset:LD,update:PD,updateWith:ID,values:Ld,valuesIn:DD};var Id={at:OD,chain:Kb,commit:kP,lodash:da,next:hR,plant:GR,reverse:ND,tap:$4,thru:Xv,toIterator:sD,toJSON:Zm,value:Zm,valueOf:Zm,wrapperChain:BD};var ju={camelCase:jL,capitalize:Xb,deburr:Zb,endsWith:yI,escape:Ew,escapeRegExp:AI,kebabCase:V8,lowerCase:X8,lowerFirst:Z8,pad:FR,padEnd:OR,padStart:BR,parseInt:NR,repeat:l4,replace:u4,snakeCase:S4,split:O4,startCase:N4,startsWith:U4,template:iD,templateSettings:y_,toLower:lD,toUpper:hD,trim:dD,trimEnd:vD,trimStart:mD,truncate:gD,unescape:bD,upperCase:RD,upperFirst:py,words:Yb};var ec={attempt:Vb,bindAll:cL,cond:VP,conforms:HP,constant:Qg,defaultTo:QP,flow:jI,flowRight:qI,identity:Bc,iteratee:j8,matches:Q8,matchesProperty:eR,method:oR,methodOf:sR,mixin:qw,noop:Kg,nthArg:dR,over:wR,overEvery:SR,overSome:MR,property:mw,propertyOf:HR,range:e4,rangeRight:t4,stubArray:_y,stubFalse:iy,stubObject:j4,stubString:q4,stubTrue:V4,times:oD,toPath:uD,uniqueId:CD};function Qfe(){var fe=new Bl(this.__wrapped__);return fe.__actions__=pf(this.__actions__),fe.__dir__=this.__dir__,fe.__filtered__=this.__filtered__,fe.__iteratees__=pf(this.__iteratees__),fe.__takeCount__=this.__takeCount__,fe.__views__=pf(this.__views__),fe}var XD=Qfe;function ehe(){if(this.__filtered__){var fe=new Bl(this);fe.__dir__=-1,fe.__filtered__=!0}else fe=this.clone(),fe.__dir__*=-1;return fe}var ZD=ehe;var the=Math.max,rhe=Math.min;function ahe(fe,_e,Xe){for(var Lt=-1,gr=Xe.length;++Lt0||_e<0)?new Bl(Xe):(fe<0?Xe=Xe.takeRight(-fe):fe&&(Xe=Xe.drop(fe)),_e!==void 0&&(_e=Vo(_e),Xe=_e<0?Xe.dropRight(-_e):Xe.take(_e-fe)),Xe)};Bl.prototype.takeRightWhile=function(fe){return this.reverse().takeWhile(fe).reverse()};Bl.prototype.toArray=function(){return this.take(QD)};fp(Bl.prototype,function(fe,_e){var Xe=/^(?:filter|find|map|reject)|While$/.test(_e),Lt=/^(?:head|last)$/.test(_e),gr=da[Lt?"take"+(_e=="last"?"Right":""):_e],Zr=Lt||/^find/.test(_e);gr&&(da.prototype[_e]=function(){var Ea=this.__wrapped__,ei=Lt?[1]:arguments,ai=Ea instanceof Bl,wn=ei[0],_n=ai||zo(Ea),Fn=function(Jl){var ou=gr.apply(da,Op([Jl],ei));return Lt&&So?ou[0]:ou};_n&&Xe&&typeof wn=="function"&&wn.length!=1&&(ai=_n=!1);var So=this.__chain__,vs=!!this.__actions__.length,Qs=Zr&&!So,Ho=ai&&!vs;if(!Zr&&_n){Ea=Ho?Ea:new Bl(this);var He=fe.apply(Ea,ei);return He.__actions__.push({func:Xv,args:[Fn],thisArg:void 0}),new zp(He,So)}return Qs&&Ho?fe.apply(this,ei):(He=this.thru(Fn),Qs?Lt?He.value()[0]:He.value():He)})});Nh(["pop","push","shift","sort","splice","unshift"],function(fe){var _e=hhe[fe],Xe=/^(?:push|sort|unshift)$/.test(fe)?"tap":"thru",Lt=/^(?:pop|shift)$/.test(fe);da.prototype[fe]=function(){var gr=arguments;if(Lt&&!this.__chain__){var Zr=this.value();return _e.apply(zo(Zr)?Zr:[],gr)}return this[Xe](function(Ea){return _e.apply(zo(Ea)?Ea:[],gr)})}});fp(Bl.prototype,function(fe,_e){var Xe=da[_e];if(Xe){var Lt=Xe.name+"";e7.call(Sm,Lt)||(Sm[Lt]=[]),Sm[Lt].push({name:_e,func:Xe})}});Sm[ry(void 0,uhe).name]=[{name:"wrapper",func:void 0}];Bl.prototype.clone=XD;Bl.prototype.reverse=ZD;Bl.prototype.value=KD;da.prototype.at=Id.at;da.prototype.chain=Id.wrapperChain;da.prototype.commit=Id.commit;da.prototype.next=Id.next;da.prototype.plant=Id.plant;da.prototype.reverse=Id.reverse;da.prototype.toJSON=da.prototype.valueOf=da.prototype.value=Id.value;da.prototype.first=da.prototype.head;JD&&(da.prototype[JD]=Id.toIterator);var ef=da;var Rd=fX(a7());window.PlotlyConfig={MathJaxConfig:"local"};var XA=class{constructor(_e,Xe){this.model=_e,this.serializers=Xe}get(_e){let Xe=this.serializers[_e],Lt=this.model.get(_e);return Xe?.deserialize?Xe.deserialize(Lt):Lt}set(_e,Xe){let Lt=this.serializers[_e];Lt?.serialize&&(Xe=Lt.serialize(Xe)),this.model.set(_e,Xe)}on(_e,Xe){this.model.on(_e,Xe)}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(_e){if(_e==null){var Xe=this.model.get("_widget_data").length;_e=ef.range(Xe)}return Array.isArray(_e)||(_e=[_e]),_e}do_data(){}do_layout(){}do_addTraces(){var _e=this.model.get("_py2js_addTraces");if(_e!==null){var Xe=this.model.get("_widget_data"),Lt=_e.trace_data;ef.forEach(Lt,function(gr){Xe.push(gr)})}}do_deleteTraces(){var _e=this.model.get("_py2js_deleteTraces");if(_e!==null){var Xe=_e.delete_inds,Lt=this.model.get("_widget_data");Xe.slice().reverse().forEach(function(gr){Lt.splice(gr,1)})}}do_moveTraces(){var _e=this.model.get("_py2js_moveTraces");if(_e!==null){var Xe=this.model.get("_widget_data"),Lt=_e.current_trace_inds,gr=_e.new_trace_inds;_he(Xe,Lt,gr)}}do_restyle(){var _e=this.model.get("_py2js_restyle");if(_e!==null){var Xe=_e.restyle_data,Lt=this._normalize_trace_indexes(_e.restyle_traces);n7(this.model.get("_widget_data"),Xe,Lt)}}do_relayout(){var _e=this.model.get("_py2js_relayout");_e!==null&&f2(this.model.get("_widget_layout"),_e.relayout_data)}do_update(){var _e=this.model.get("_py2js_update");if(_e!==null){var Xe=_e.style_data,Lt=_e.layout_data,gr=this._normalize_trace_indexes(_e.style_traces);n7(this.model.get("_widget_data"),Xe,gr),f2(this.model.get("_widget_layout"),Lt)}}do_animate(){var _e=this.model.get("_py2js_animate");if(_e!==null){for(var Xe=_e.style_data,Lt=_e.layout_data,gr=this._normalize_trace_indexes(_e.style_traces),Zr=0;Zrthis.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 Xe=this.model.get("_last_layout_edit_id"),Lt=this.model.get("_last_trace_edit_id");this.viewID=s7();var gr=ef.cloneDeep(this.model.get("_widget_data")),Zr=ef.cloneDeep(this.model.get("_widget_layout"));Zr.height||(Zr.height=360);var Ea=this.model.get("_config");Ea.editSelection=!1,Rd.default.newPlot(_e.el,gr,Zr,Ea).then(function(){_e._sendTraceDeltas(Lt),_e._sendLayoutDelta(Xe),_e.el.on("plotly_restyle",function(ai){_e.handle_plotly_restyle(ai)}),_e.el.on("plotly_relayout",function(ai){_e.handle_plotly_relayout(ai)}),_e.el.on("plotly_update",function(ai){_e.handle_plotly_update(ai)}),_e.el.on("plotly_click",function(ai){_e.handle_plotly_click(ai)}),_e.el.on("plotly_hover",function(ai){_e.handle_plotly_hover(ai)}),_e.el.on("plotly_unhover",function(ai){_e.handle_plotly_unhover(ai)}),_e.el.on("plotly_selected",function(ai){_e.handle_plotly_selected(ai)}),_e.el.on("plotly_deselect",function(ai){_e.handle_plotly_deselect(ai)}),_e.el.on("plotly_doubleclick",function(ai){_e.handle_plotly_doubleclick(ai)});var ei=new CustomEvent("plotlywidget-after-render",{detail:{element:_e.el,viewID:_e.viewID}});document.dispatchEvent(ei)})}_processLuminoMessage(_e,Xe){Xe.apply(this,arguments);var Lt=this;switch(_e.type){case"before-attach":var gr={showgrid:!1,showline:!1,tickvals:[]};Rd.default.newPlot(Lt.el,[],{xaxis:gr,yaxis:gr}),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 _e=this,Xe=_e.model.get("_widget_layout");(ef.isNil(Xe)||ef.isNil(Xe.width))&&Rd.default.Plots.resize(_e.el).then(function(){var Lt=_e.model.get("_last_layout_edit_id");_e._sendLayoutDelta(Lt)})}remove(){Rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return ef.mergeWith({},this.el._fullData,this.el.data,i7)}getFullLayout(){return ef.mergeWith({},this.el._fullLayout,this.el.layout,i7)}buildPointsObject(_e){var Xe;if(_e.hasOwnProperty("points")){var Lt=_e.points,gr=Lt.length,Zr=!0;for(let _n=0;_n/^x\d*$/.test(wn)),Zr=Object.keys(Lt||{}).some(wn=>/^y\d*$/.test(wn));if(!gr||!Zr)return null;Xe={type:"box",selector_state:Lt}}else if(_e.hasOwnProperty("lassoPoints")){var Ea=_e.lassoPoints,ei=Object.keys(Ea||{}).some(wn=>/^x\d*$/.test(wn)),ai=Object.keys(Ea||{}).some(wn=>/^y\d*$/.test(wn));if(!ei||!ai)return null;Xe={type:"lasso",selector_state:Ea}}else Xe=null;return Xe}handle_plotly_restyle(_e){if(_e!=null&&!(_e[0]&&_e[0].hasOwnProperty("_doNotReportToPy"))){var Xe=_e[0],Lt=_e[1],gr={style_data:Xe,style_traces:Lt,source_view_id:this.viewID};this.model.set("_js2py_restyle",gr),this.touch()}}touch(){this.model.save_changes()}handle_plotly_relayout(_e){if(_e!=null&&!_e.hasOwnProperty("_doNotReportToPy")){var Xe={relayout_data:_e,source_view_id:this.viewID};this.model.set("_js2py_relayout",Xe),this.touch()}}handle_plotly_update(_e){if(_e!=null&&!(_e.data&&_e.data[0].hasOwnProperty("_doNotReportToPy"))){var Xe={style_data:_e.data[0],style_traces:_e.data[1],layout_data:_e.layout,source_view_id:this.viewID};this.model.set("_js2py_update",Xe),this.touch()}}handle_plotly_click(_e){this._send_points_callback_message(_e,"plotly_click")}handle_plotly_hover(_e){this._send_points_callback_message(_e,"plotly_hover")}handle_plotly_unhover(_e){this._send_points_callback_message(_e,"plotly_unhover")}handle_plotly_selected(_e){this._send_points_callback_message(_e,"plotly_selected")}handle_plotly_deselect(_e){_e={points:[]},this._send_points_callback_message(_e,"plotly_deselect")}_send_points_callback_message(_e,Xe){if(_e!=null){var Lt={event_type:Xe,points:this.buildPointsObject(_e),device_state:this.buildInputDeviceStateObject(_e),selector:this.buildSelectorObject(_e)};Lt.points!==null&&Lt.points!==void 0&&(this.model.set("_js2py_pointsCallback",Lt),this.touch())}}handle_plotly_doubleclick(_e){}do_addTraces(){var _e=this.model.get("_py2js_addTraces");if(_e!==null){var Xe=this;Rd.default.addTraces(this.el,_e.trace_data).then(function(){Xe._sendTraceDeltas(_e.trace_edit_id);var Lt=_e.layout_edit_id;Xe._sendLayoutDelta(Lt)})}}do_deleteTraces(){var _e=this.model.get("_py2js_deleteTraces");if(_e!==null){var Xe=_e.delete_inds,Lt=this;Rd.default.deleteTraces(this.el,Xe).then(function(){var gr=_e.trace_edit_id;Lt._sendTraceDeltas(gr);var Zr=_e.layout_edit_id;Lt._sendLayoutDelta(Zr)})}}do_moveTraces(){var _e=this.model.get("_py2js_moveTraces");if(_e!==null){var Xe=_e.current_trace_inds,Lt=_e.new_trace_inds,gr=ef.isEqual(Xe,Lt);gr||Rd.default.moveTraces(this.el,Xe,Lt)}}do_restyle(){var _e=this.model.get("_py2js_restyle");if(_e!==null){var Xe=_e.restyle_data,Lt=this.model._normalize_trace_indexes(_e.restyle_traces);Xe._doNotReportToPy=!0,Rd.default.restyle(this.el,Xe,Lt),this._sendTraceDeltas(_e.trace_edit_id);var gr=_e.layout_edit_id;this._sendLayoutDelta(gr)}}do_relayout(){var _e=this.model.get("_py2js_relayout");if(_e!==null){if(_e.source_view_id!==this.viewID){var Xe=_e.relayout_data;Xe._doNotReportToPy=!0,Rd.default.relayout(this.el,_e.relayout_data)}var Lt=_e.layout_edit_id;this._sendLayoutDelta(Lt)}}do_update(){var _e=this.model.get("_py2js_update");if(_e!==null){var Xe=_e.style_data||{},Lt=_e.layout_data||{},gr=this.model._normalize_trace_indexes(_e.style_traces);Xe._doNotReportToPy=!0,Rd.default.update(this.el,Xe,Lt,gr),this._sendTraceDeltas(_e.trace_edit_id);var Zr=_e.layout_edit_id;this._sendLayoutDelta(Zr)}}do_animate(){var _e=this.model.get("_py2js_animate");if(_e!==null){var Xe=_e.animation_opts,Lt=_e.style_data,gr=_e.layout_data,Zr=this.model._normalize_trace_indexes(_e.style_traces),Ea={data:Lt,layout:gr,traces:Zr};Ea._doNotReportToPy=!0;var ei=this;Rd.default.animate(this.el,Ea,Xe).then(function(){ei._sendTraceDeltas(_e.trace_edit_id);var ai=_e.layout_edit_id;ei._sendLayoutDelta(ai)})}}_sendLayoutDelta(_e){var Xe=x_(this.getFullLayout(),this.model.get("_widget_layout")),Lt={layout_delta:Xe,layout_edit_id:_e};this.model.set("_js2py_widget_layoutDelta",Lt),this.touch()}_sendTraceDeltas(_e){for(var Xe=this.model.get("_widget_data"),Lt=ef.range(Xe.length),gr=new Array(Lt.length),Zr=this.getFullData(),Ea=0;Ea=0;gr--)Lt.splice(0,0,fe[_e[gr]]),fe.splice(_e[gr],1);var Zr=ef(Xe).zip(Lt).sortBy(0).unzip().value();Xe=Zr[0],Lt=Zr[1];for(var Ea=0;Ea0&&typeof Zr[0]=="object"){Xe[Lt]=new Array(Zr.length);for(var Ea=0;Ea0&&(Xe[Lt]=ei)}else typeof Zr=="object"&&!Array.isArray(Zr)?Xe[Lt]=x_(Zr,{}):Zr!==void 0&&typeof Zr!="function"&&(Xe[Lt]=Zr)}}return Xe}function s7(fe,_e,Xe,Lt){if(Xe||(Xe=16),_e===void 0&&(_e=24),_e<=0)return"0";var gr=Math.log(Math.pow(2,_e))/Math.log(Xe),Zr="",Ea,ei,ai;for(Ea=2;gr===1/0;Ea*=2)gr=Math.log(Math.pow(2,_e/Ea))/Math.log(Xe)*Ea;var wn=gr-Math.floor(gr);for(Ea=0;Ea=Math.pow(2,_e)?Lt>10?(console.warn("randstr failed uniqueness"),Zr):s7(fe,_e,Xe,(Lt||0)+1):Zr}var kHe=()=>{let fe;return{initialize(_e){fe=new XA(_e.model,vhe),fe.initialize()},render({el:_e}){let Xe=new ZA(fe,_e);return Xe.perform_render(),()=>Xe.remove()}}};export{XA as FigureModel,ZA as FigureView,kHe as default}; /*! Bundled license information: plotly.js/dist/plotly.js: From 72a5906299625d09e49c0cd5e2057ad165a84342 Mon Sep 17 00:00:00 2001 From: Florian Pix Date: Thu, 3 Sep 2026 09:54:37 +0200 Subject: [PATCH 2/2] fix: rebuild widgetbundle.js --- plotly/package_data/widgetbundle.js | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/plotly/package_data/widgetbundle.js b/plotly/package_data/widgetbundle.js index 72d8f8e2df4..9d42379fded 100644 --- a/plotly/package_data/widgetbundle.js +++ b/plotly/package_data/widgetbundle.js @@ -1,10 +1,10 @@ -var _X=Object.create;var yE=Object.defineProperty;var xX=Object.getOwnPropertyDescriptor;var bX=Object.getOwnPropertyNames;var wX=Object.getPrototypeOf,TX=Object.prototype.hasOwnProperty;var AX=(oe,ye)=>()=>(ye||oe((ye={exports:{}}).exports,ye),ye.exports);var MX=(oe,ye,Fe,dt)=>{if(ye&&typeof ye=="object"||typeof ye=="function")for(let Zt of bX(ye))!TX.call(oe,Zt)&&Zt!==Fe&&yE(oe,Zt,{get:()=>ye[Zt],enumerable:!(dt=xX(ye,Zt))||dt.enumerable});return oe};var SX=(oe,ye,Fe)=>(Fe=oe!=null?_X(wX(oe)):{},MX(ye||!oe||!oe.__esModule?yE(Fe,"default",{value:oe,enumerable:!0}):Fe,oe));var CR=AX((kR,bx)=>{(function(oe,ye){typeof bx=="object"&&bx.exports?bx.exports=ye():oe.moduleName=ye()})(typeof self<"u"?self:kR,()=>{"use strict";var oe=(()=>{var ye=Object.create,Fe=Object.defineProperty,dt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,Xr=Object.getOwnPropertyNames,ga=Object.getOwnPropertySymbols,ya=Object.getPrototypeOf,Cn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,On=(J,V)=>(V=Symbol[J])?V:Symbol.for("Symbol."+J),Fi=J=>{throw TypeError(J)},ho=(J,V,p)=>V in J?Fe(J,V,{enumerable:!0,configurable:!0,writable:!0,value:p}):J[V]=p,Li=(J,V)=>{for(var p in V||(V={}))Cn.call(V,p)&&ho(J,p,V[p]);if(ga)for(var p of ga(V))xn.call(V,p)&&ho(J,p,V[p]);return J},lo=(J,V)=>dt(J,yr(V)),Lo=(J,V)=>{var p={};for(var b in J)Cn.call(J,b)&&V.indexOf(b)<0&&(p[b]=J[b]);if(J!=null&&ga)for(var b of ga(J))V.indexOf(b)<0&&xn.call(J,b)&&(p[b]=J[b]);return p},zi=(J,V,p)=>function(){if(p)throw p[0];try{return J&&(V=(0,J[Xr(J)[0]])(J=0)),V}catch(E){throw p=[E],E}},ze=(J,V)=>function(){try{return V||(0,J[Xr(J)[0]])((V={exports:{}}).exports,V),V.exports}catch(b){throw V=0,b}},bu=(J,V)=>{for(var p in V)Fe(J,p,{get:V[p],enumerable:!0})},uf=(J,V,p,b)=>{if(V&&typeof V=="object"||typeof V=="function")for(let E of Xr(V))!Cn.call(J,E)&&E!==p&&Fe(J,E,{get:()=>V[E],enumerable:!(b=Zt(V,E))||b.enumerable});return J},Yl=(J,V,p)=>(p=J!=null?ye(ya(J)):{},uf(V||!J||!J.__esModule?Fe(p,"default",{value:J,enumerable:!0}):p,J)),Po=J=>uf(Fe({},"__esModule",{value:!0}),J),Oh=function(J,V){this[0]=J,this[1]=V},ad=J=>{var V=J[On("asyncIterator")],p=!1,b,E={};return V==null?(V=J[On("iterator")](),b=k=>E[k]=l=>V[k](l)):(V=V.call(J),b=k=>E[k]=l=>{if(p){if(p=!1,k==="throw")throw l;return l}return p=!0,{done:!1,value:new Oh(new Promise(e=>{var t=V[k](l);t instanceof Object||Fi("Object expected"),e(t)}),1)}}),E[On("iterator")]=()=>E,b("next"),"throw"in V?b("throw"):E.throw=k=>{throw k},"return"in V&&b("return"),E},ev=ze({"src/version.js"(J){"use strict";J.version="4.0.0"}}),DR=ze({"node_modules/native-promise-only/lib/npo.src.js"(J,V){(function(b,E,k){E[b]=E[b]||k(),typeof V<"u"&&V.exports&&(V.exports=E[b])})("Promise",typeof window<"u"?window:J,function(){"use strict";var b,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(w,S,M,C){return Object.defineProperty(w,S,{value:M,writable:!0,configurable:C!==!1})}}catch{b=function(S,M,C){return S[M]=C,S}}k=function(){var w,S,M;function C(_,T){this.fn=_,this.self=T,this.next=void 0}return{add:function(T,f){M=new C(T,f),S?S.next=M:w=M,S=M,M=void 0},drain:function(){var T=w;for(w=S=E=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(i,w){k.add(i,w),E||(E=e(k.drain))}function n(i){var w,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(w=i.then),typeof w=="function"?w:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new m(S),M)}}}function s(i){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=i,w.state=2,w.chain.length>0&&t(r,w))}function c(i,w,S,M){for(var C=0;CEe?1:de>=Ee?0:NaN}p.descending=function(de,Ee){return Eede?1:Ee>=de?0:NaN},p.min=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}return at},p.max=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}return at},p.extent=function(de,Ee){var qe=-1,tt=de.length,at,ct,Nt;if(arguments.length===1){for(;++qe=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt1)return Nt/(Jt-1)},p.deviation=function(){var de=p.variance.apply(this,arguments);return de&&Math.sqrt(de)};function h(de){return{left:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)<0?tt=ct+1:at=ct}return tt},right:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)>0?at=ct:tt=ct+1}return tt}}}var v=h(s);p.bisectLeft=v.left,p.bisect=p.bisectRight=v.right,p.bisector=function(de){return h(de.length===1?function(Ee,qe){return s(de(Ee),qe)}:de)},p.shuffle=function(de,Ee,qe){(tt=arguments.length)<3&&(qe=de.length,tt<2&&(Ee=0));for(var tt=qe-Ee,at,ct;tt;)ct=Math.random()*tt--|0,at=de[tt+Ee],de[tt+Ee]=de[ct+Ee],de[ct+Ee]=at;return de},p.permute=function(de,Ee){for(var qe=Ee.length,tt=new Array(qe);qe--;)tt[qe]=de[Ee[qe]];return tt},p.pairs=function(de){for(var Ee=0,qe=de.length-1,tt,at=de[0],ct=new Array(qe<0?0:qe);Ee=0;)for(Nt=de[Ee],qe=Nt.length;--qe>=0;)ct[--at]=Nt[qe];return ct};var i=Math.abs;p.range=function(de,Ee,qe){if(arguments.length<3&&(qe=1,arguments.length<2&&(Ee=de,de=0)),(Ee-de)/qe===1/0)throw new Error("infinite range");var tt=[],at=w(i(qe)),ct=-1,Nt;if(de*=at,Ee*=at,qe*=at,qe<0)for(;(Nt=de+qe*++ct)>Ee;)tt.push(Nt/at);else for(;(Nt=de+qe*++ct)=Ee.length)return at?at.call(de,Jt):tt?Jt.sort(tt):Jt;for(var gr=-1,Hr=Jt.length,Vr=Ee[mr++],ca,Aa,Yr,oa=new M,fa;++gr=Ee.length)return St;var mr=[],gr=qe[Jt++];return St.forEach(function(Hr,Vr){mr.push({key:Hr,values:Nt(Vr,Jt)})}),gr?mr.sort(function(Hr,Vr){return gr(Hr.key,Vr.key)}):mr}return de.map=function(St,Jt){return ct(Jt,St,0)},de.entries=function(St){return Nt(ct(p.map,St,0),0)},de.key=function(St){return Ee.push(St),de},de.sortKeys=function(St){return qe[Ee.length-1]=St,de},de.sortValues=function(St){return tt=St,de},de.rollup=function(St){return at=St,de},de},p.set=function(de){var Ee=new O;if(de)for(var qe=0,tt=de.length;qe=0&&(tt=de.slice(qe+1),de=de.slice(0,qe)),de)return arguments.length<2?this[de].on(tt):this[de].on(tt,Ee);if(arguments.length===2){if(Ee==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(tt,null);return this}};function $(de){var Ee=[],qe=new M;function tt(){for(var at=Ee,ct=-1,Nt=at.length,St;++ct=0&&(qe=de.slice(0,Ee))!=="xmlns"&&(de=de.slice(Ee+1)),he.hasOwnProperty(qe)?{space:he[qe],local:de}:de}},q.attr=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node();return de=p.ns.qualify(de),de.local?qe.getAttributeNS(de.space,de.local):qe.getAttribute(de)}for(Ee in de)this.each(xe(Ee,de[Ee]));return this}return this.each(xe(de,Ee))};function xe(de,Ee){de=p.ns.qualify(de);function qe(){this.removeAttribute(de)}function tt(){this.removeAttributeNS(de.space,de.local)}function at(){this.setAttribute(de,Ee)}function ct(){this.setAttributeNS(de.space,de.local,Ee)}function Nt(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttribute(de):this.setAttribute(de,Jt)}function St(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,Jt)}return Ee==null?de.local?tt:qe:typeof Ee=="function"?de.local?St:Nt:de.local?ct:at}function we(de){return de.trim().replace(/\s+/g," ")}q.classed=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node(),tt=(de=Se(de)).length,at=-1;if(Ee=qe.classList){for(;++at=0;)(ct=qe[tt])&&(at&&at!==ct.nextSibling&&at.parentNode.insertBefore(ct,at),at=ct);return this},q.sort=function(de){de=Ae.apply(this,arguments);for(var Ee=-1,qe=this.length;++Ee=Ee&&(Ee=at+1);!(Jt=Nt[Ee])&&++Ee0&&(de=de.slice(0,at));var Nt=Tt.get(de);Nt&&(de=Nt,ct=$t);function St(){var gr=this[tt];gr&&(this.removeEventListener(de,gr,gr.$),delete this[tt])}function Jt(){var gr=ct(Ee,E(arguments));St.call(this),this.addEventListener(de,this[tt]=gr,gr.$=qe),gr._=Ee}function mr(){var gr=new RegExp("^__on([^.]+)"+p.requote(de)+"$"),Hr;for(var Vr in this)if(Hr=Vr.match(gr)){var ca=this[Vr];this.removeEventListener(Hr[1],ca,ca.$),delete this[Vr]}}return at?Ee?Jt:St:Ee?j:mr}var Tt=p.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(de){"on"+de in k&&Tt.remove(de)});function At(de,Ee){return function(qe){var tt=p.event;p.event=qe,Ee[0]=this.__data__;try{de.apply(this,Ee)}finally{p.event=tt}}}function $t(de,Ee){var qe=At(de,Ee);return function(tt){var at=this,ct=tt.relatedTarget;(!ct||ct!==at&&!(ct.compareDocumentPosition(at)&8))&&qe.call(at,tt)}}var rr,_r=0;function Xt(de){var Ee=".dragsuppress-"+ ++_r,qe="click"+Ee,tt=p.select(e(de)).on("touchmove"+Ee,Q).on("dragstart"+Ee,Q).on("selectstart"+Ee,Q);if(rr==null&&(rr="onselectstart"in de?!1:F(de.style,"userSelect")),rr){var at=l(de).style,ct=at[rr];at[rr]="none"}return function(Nt){if(tt.on(Ee,null),rr&&(at[rr]=ct),Nt){var St=function(){tt.on(qe,null)};tt.on(qe,function(){Q(),St()},!0),setTimeout(St,0)}}}p.mouse=function(de){return Ot(de,re())};var or=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(de,Ee){Ee.changedTouches&&(Ee=Ee.changedTouches[0]);var qe=de.ownerSVGElement||de;if(qe.createSVGPoint){var tt=qe.createSVGPoint();if(or<0){var at=e(de);if(at.scrollX||at.scrollY){qe=p.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ct=qe[0][0].getScreenCTM();or=!(ct.f||ct.e),qe.remove()}}return or?(tt.x=Ee.pageX,tt.y=Ee.pageY):(tt.x=Ee.clientX,tt.y=Ee.clientY),tt=tt.matrixTransform(de.getScreenCTM().inverse()),[tt.x,tt.y]}var Nt=de.getBoundingClientRect();return[Ee.clientX-Nt.left-de.clientLeft,Ee.clientY-Nt.top-de.clientTop]}p.touch=function(de,Ee,qe){if(arguments.length<3&&(qe=Ee,Ee=re().changedTouches),Ee){for(var tt=0,at=Ee.length,ct;tt0?1:de<0?-1:0}function Pt(de,Ee,qe){return(Ee[0]-de[0])*(qe[1]-de[1])-(Ee[1]-de[1])*(qe[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ne:Math.acos(de)}function qt(de){return de>1?Je:de<-1?-Je:Math.asin(de)}function Vt(de){return((de=Math.exp(de))-1/de)/2}function Ht(de){return((de=Math.exp(de))+1/de)/2}function Sr(de){return((de=Math.exp(2*de))-1)/(de+1)}function Kr(de){return(de=Math.sin(de/2))*de}var Yt=Math.SQRT2,Rt=2,nr=4;p.interpolateZoom=function(de,Ee){var qe=de[0],tt=de[1],at=de[2],ct=Ee[0],Nt=Ee[1],St=Ee[2],Jt=ct-qe,mr=Nt-tt,gr=Jt*Jt+mr*mr,Hr,Vr;if(gr0&&(be=be.transition().duration(Nt)),be.call(Ma.event)}function xi(){oa&&oa.domain(Yr.range().map(function(be){return(be-de.x)/de.k}).map(Yr.invert)),Ea&&Ea.domain(fa.range().map(function(be){return(be-de.y)/de.k}).map(fa.invert))}function di(be){St++||be({type:"zoomstart"})}function uo(be){xi(),be({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function pe(be){--St||(be({type:"zoomend"}),qe=null)}function y(){var be=this,Re=Aa.of(be,arguments),je=0,Ze=p.select(e(be)).on(mr,Dt).on(gr,Gt),ut=sa(p.mouse(be)),ft=Xt(be);Qi.call(be),di(Re);function Dt(){je=1,zn(p.mouse(be),ut),uo(Re)}function Gt(){Ze.on(mr,null).on(gr,null),ft(je),pe(Re)}}function N(){var be=this,Re=Aa.of(be,arguments),je={},Ze=0,ut,ft=".zoom-"+p.event.changedTouches[0].identifier,Dt="touchmove"+ft,Gt="touchend"+ft,Kt=[],st=p.select(be),It=Xt(be);ir(),di(Re),st.on(Jt,null).on(Vr,ir);function Ut(){var hr=p.touches(be);return ut=de.k,hr.forEach(function(vr){vr.identifier in je&&(je[vr.identifier]=sa(vr))}),hr}function ir(){var hr=p.event.target;p.select(hr).on(Dt,dr).on(Gt,Ar),Kt.push(hr);for(var vr=p.event.changedTouches,Or=0,Cr=vr.length;Or1){var Ta=ta[0],Ra=ta[1],ua=Ta[0]-Ra[0],ia=Ta[1]-Ra[1];Ze=ua*ua+ia*ia}}function dr(){var hr=p.touches(be),vr,Or,Cr,ta;Qi.call(be);for(var ka=0,Ta=hr.length;ka1?1:Ee,qe=qe<0?0:qe>1?1:qe,at=qe<=.5?qe*(1+Ee):qe+Ee-qe*Ee,tt=2*qe-at;function ct(St){return St>360?St-=360:St<0&&(St+=360),St<60?tt+(at-tt)*St/60:St<180?at:St<240?tt+(at-tt)*(240-St)/60:tt}function Nt(St){return Math.round(ct(St)*255)}return new Oa(Nt(de+120),Nt(de),Nt(de-120))}p.hcl=La;function La(de,Ee,qe){return this instanceof La?(this.h=+de,this.c=+Ee,void(this.l=+qe)):arguments.length<2?de instanceof La?new La(de.h,de.c,de.l):de instanceof ja?en(de.l,de.a,de.b):en((de=Dr((de=p.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new La(de,Ee,qe)}var un=La.prototype=new Qr;un.brighter=function(de){return new La(this.h,this.c,Math.min(100,this.l+Nn*(arguments.length?de:1)))},un.darker=function(de){return new La(this.h,this.c,Math.max(0,this.l-Nn*(arguments.length?de:1)))},un.rgb=function(){return Xa(this.h,this.c,this.l).rgb()};function Xa(de,Ee,qe){return isNaN(de)&&(de=0),isNaN(Ee)&&(Ee=0),new ja(qe,Math.cos(de*=et)*Ee,Math.sin(de)*Ee)}p.lab=ja;function ja(de,Ee,qe){return this instanceof ja?(this.l=+de,this.a=+Ee,void(this.b=+qe)):arguments.length<2?de instanceof ja?new ja(de.l,de.a,de.b):de instanceof La?Xa(de.h,de.c,de.l):Dr((de=Oa(de)).r,de.g,de.b):new ja(de,Ee,qe)}var Nn=18,yn=.95047,Un=1,li=1.08883,Yn=ja.prototype=new Qr;Yn.brighter=function(de){return new ja(Math.min(100,this.l+Nn*(arguments.length?de:1)),this.a,this.b)},Yn.darker=function(de){return new ja(Math.max(0,this.l-Nn*(arguments.length?de:1)),this.a,this.b)},Yn.rgb=function(){return on(this.l,this.a,this.b)};function on(de,Ee,qe){var tt=(de+16)/116,at=tt+Ee/500,ct=tt-qe/200;return at=vi(at)*yn,tt=vi(tt)*Un,ct=vi(ct)*li,new Oa(Ja(3.2404542*at-1.5371385*tt-.4985314*ct),Ja(-.969266*at+1.8760108*tt+.041556*ct),Ja(.0556434*at-.2040259*tt+1.0572252*ct))}function en(de,Ee,qe){return de>0?new La(Math.atan2(qe,Ee)*Mt,Math.sqrt(Ee*Ee+qe*qe),de):new La(NaN,NaN,de)}function vi(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function Yi(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function Ja(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}p.rgb=Oa;function Oa(de,Ee,qe){return this instanceof Oa?(this.r=~~de,this.g=~~Ee,void(this.b=~~qe)):arguments.length<2?de instanceof Oa?new Oa(de.r,de.g,de.b):Tr(""+de,Oa,Pa):new Oa(de,Ee,qe)}function lt(de){return new Oa(de>>16,de>>8&255,de&255)}function rt(de){return lt(de)+""}var fr=Oa.prototype=new Qr;fr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Ee=this.r,qe=this.g,tt=this.b,at=30;return!Ee&&!qe&&!tt?new Oa(at,at,at):(Ee&&Ee>4,tt=tt>>4|tt,at=Jt&240,at=at>>4|at,ct=Jt&15,ct=ct<<4|ct):de.length===7&&(tt=(Jt&16711680)>>16,at=(Jt&65280)>>8,ct=Jt&255)),Ee(tt,at,ct))}function Ir(de,Ee,qe){var tt=Math.min(de/=255,Ee/=255,qe/=255),at=Math.max(de,Ee,qe),ct=at-tt,Nt,St,Jt=(at+tt)/2;return ct?(St=Jt<.5?ct/(at+tt):ct/(2-at-tt),de==at?Nt=(Ee-qe)/ct+(Ee0&&Jt<1?0:Nt),new Zr(Nt,St,Jt)}function Dr(de,Ee,qe){de=ot(de),Ee=ot(Ee),qe=ot(qe);var tt=Yi((.4124564*de+.3575761*Ee+.1804375*qe)/yn),at=Yi((.2126729*de+.7151522*Ee+.072175*qe)/Un),ct=Yi((.0193339*de+.119192*Ee+.9503041*qe)/li);return ja(116*at-16,500*(tt-at),200*(at-ct))}function ot(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function kt(de){var Ee=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Ee*2.55):Ee}var jt=p.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});jt.forEach(function(de,Ee){jt.set(de,lt(Ee))});function ar(de){return typeof de=="function"?de:function(){return de}}p.functor=ar,p.xhr=Er(D);function Er(de){return function(Ee,qe,tt){return arguments.length===2&&typeof qe=="function"&&(tt=qe,qe=null),xr(Ee,qe,de,tt)}}function xr(de,Ee,qe,tt){var at={},ct=p.dispatch("beforesend","progress","load","error"),Nt={},St=new XMLHttpRequest,Jt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(de)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=mr:St.onreadystatechange=function(){St.readyState>3&&mr()};function mr(){var gr=St.status,Hr;if(!gr&&Lr(St)||gr>=200&&gr<300||gr===304){try{Hr=qe.call(at,St)}catch(Vr){ct.error.call(at,Vr);return}ct.load.call(at,Hr)}else ct.error.call(at,St)}return St.onprogress=function(gr){var Hr=p.event;p.event=gr;try{ct.progress.call(at,St)}finally{p.event=Hr}},at.header=function(gr,Hr){return gr=(gr+"").toLowerCase(),arguments.length<2?Nt[gr]:(Hr==null?delete Nt[gr]:Nt[gr]=Hr+"",at)},at.mimeType=function(gr){return arguments.length?(Ee=gr==null?null:gr+"",at):Ee},at.responseType=function(gr){return arguments.length?(Jt=gr,at):Jt},at.response=function(gr){return qe=gr,at},["get","post"].forEach(function(gr){at[gr]=function(){return at.send.apply(at,[gr].concat(E(arguments)))}}),at.send=function(gr,Hr,Vr){if(arguments.length===2&&typeof Hr=="function"&&(Vr=Hr,Hr=null),St.open(gr,de,!0),Ee!=null&&!("accept"in Nt)&&(Nt.accept=Ee+",*/*"),St.setRequestHeader)for(var ca in Nt)St.setRequestHeader(ca,Nt[ca]);return Ee!=null&&St.overrideMimeType&&St.overrideMimeType(Ee),Jt!=null&&(St.responseType=Jt),Vr!=null&&at.on("error",Vr).on("load",function(Aa){Vr(null,Aa)}),ct.beforesend.call(at,St),St.send(Hr??null),at},at.abort=function(){return St.abort(),at},p.rebind(at,ct,"on"),tt==null?at:at.get(zr(tt))}function zr(de){return de.length===1?function(Ee,qe){de(Ee==null?qe:null)}:de}function Lr(de){var Ee=de.responseType;return Ee&&Ee!=="text"?de.response:de.responseText}p.dsv=function(de,Ee){var qe=new RegExp('["'+de+` -]`),tt=de.charCodeAt(0);function at(mr,gr,Hr){arguments.length<3&&(Hr=gr,gr=null);var Vr=xr(mr,Ee,gr==null?ct:Nt(gr),Hr);return Vr.row=function(ca){return arguments.length?Vr.response((gr=ca)==null?ct:Nt(ca)):gr},Vr}function ct(mr){return at.parse(mr.responseText)}function Nt(mr){return function(gr){return at.parse(gr.responseText,mr)}}at.parse=function(mr,gr){var Hr;return at.parseRows(mr,function(Vr,ca){if(Hr)return Hr(Vr,ca-1);var Aa=function(Yr){for(var oa={},fa=Vr.length,Ea=0;Ea=Aa)return Vr;if(Ea)return Ea=!1,Hr;var hn=Yr;if(mr.charCodeAt(hn)===34){for(var Tn=hn;Tn++()=>(ye||oe((ye={exports:{}}).exports,ye),ye.exports);var MX=(oe,ye,Fe,dt)=>{if(ye&&typeof ye=="object"||typeof ye=="function")for(let Zt of bX(ye))!TX.call(oe,Zt)&&Zt!==Fe&&yE(oe,Zt,{get:()=>ye[Zt],enumerable:!(dt=xX(ye,Zt))||dt.enumerable});return oe};var SX=(oe,ye,Fe)=>(Fe=oe!=null?_X(wX(oe)):{},MX(ye||!oe||!oe.__esModule?yE(Fe,"default",{value:oe,enumerable:!0}):Fe,oe));var CR=AX((kR,bx)=>{(function(oe,ye){typeof bx=="object"&&bx.exports?bx.exports=ye():oe.moduleName=ye()})(typeof self<"u"?self:kR,()=>{"use strict";var oe=(()=>{var ye=Object.create,Fe=Object.defineProperty,dt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,Yr=Object.getOwnPropertyNames,ma=Object.getOwnPropertySymbols,ya=Object.getPrototypeOf,wn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,On=(J,V)=>(V=Symbol[J])?V:Symbol.for("Symbol."+J),Fi=J=>{throw TypeError(J)},ho=(J,V,p)=>V in J?Fe(J,V,{enumerable:!0,configurable:!0,writable:!0,value:p}):J[V]=p,Li=(J,V)=>{for(var p in V||(V={}))wn.call(V,p)&&ho(J,p,V[p]);if(ma)for(var p of ma(V))xn.call(V,p)&&ho(J,p,V[p]);return J},lo=(J,V)=>dt(J,yr(V)),Lo=(J,V)=>{var p={};for(var b in J)wn.call(J,b)&&V.indexOf(b)<0&&(p[b]=J[b]);if(J!=null&&ma)for(var b of ma(J))V.indexOf(b)<0&&xn.call(J,b)&&(p[b]=J[b]);return p},zi=(J,V,p)=>function(){if(p)throw p[0];try{return J&&(V=(0,J[Yr(J)[0]])(J=0)),V}catch(E){throw p=[E],E}},ze=(J,V)=>function(){try{return V||(0,J[Yr(J)[0]])((V={exports:{}}).exports,V),V.exports}catch(b){throw V=0,b}},bu=(J,V)=>{for(var p in V)Fe(J,p,{get:V[p],enumerable:!0})},uf=(J,V,p,b)=>{if(V&&typeof V=="object"||typeof V=="function")for(let E of Yr(V))!wn.call(J,E)&&E!==p&&Fe(J,E,{get:()=>V[E],enumerable:!(b=Zt(V,E))||b.enumerable});return J},Yl=(J,V,p)=>(p=J!=null?ye(ya(J)):{},uf(V||!J||!J.__esModule?Fe(p,"default",{value:J,enumerable:!0}):p,J)),Po=J=>uf(Fe({},"__esModule",{value:!0}),J),Oh=function(J,V){this[0]=J,this[1]=V},ad=J=>{var V=J[On("asyncIterator")],p=!1,b,E={};return V==null?(V=J[On("iterator")](),b=k=>E[k]=l=>V[k](l)):(V=V.call(J),b=k=>E[k]=l=>{if(p){if(p=!1,k==="throw")throw l;return l}return p=!0,{done:!1,value:new Oh(new Promise(e=>{var t=V[k](l);t instanceof Object||Fi("Object expected"),e(t)}),1)}}),E[On("iterator")]=()=>E,b("next"),"throw"in V?b("throw"):E.throw=k=>{throw k},"return"in V&&b("return"),E},ev=ze({"src/version.js"(J){"use strict";J.version="4.0.0"}}),DR=ze({"node_modules/native-promise-only/lib/npo.src.js"(J,V){(function(b,E,k){E[b]=E[b]||k(),typeof V<"u"&&V.exports&&(V.exports=E[b])})("Promise",typeof window<"u"?window:J,function(){"use strict";var b,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(w,S,M,C){return Object.defineProperty(w,S,{value:M,writable:!0,configurable:C!==!1})}}catch{b=function(S,M,C){return S[M]=C,S}}k=function(){var w,S,M;function C(_,T){this.fn=_,this.self=T,this.next=void 0}return{add:function(T,f){M=new C(T,f),S?S.next=M:w=M,S=M,M=void 0},drain:function(){var T=w;for(w=S=E=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(i,w){k.add(i,w),E||(E=e(k.drain))}function n(i){var w,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(w=i.then),typeof w=="function"?w:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new m(S),M)}}}function s(i){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=i,w.state=2,w.chain.length>0&&t(r,w))}function c(i,w,S,M){for(var C=0;CEe?1:de>=Ee?0:NaN}p.descending=function(de,Ee){return Eede?1:Ee>=de?0:NaN},p.min=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}return at},p.max=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}return at},p.extent=function(de,Ee){var qe=-1,tt=de.length,at,ct,Nt;if(arguments.length===1){for(;++qe=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt1)return Nt/(Jt-1)},p.deviation=function(){var de=p.variance.apply(this,arguments);return de&&Math.sqrt(de)};function h(de){return{left:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)<0?tt=ct+1:at=ct}return tt},right:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)>0?at=ct:tt=ct+1}return tt}}}var v=h(s);p.bisectLeft=v.left,p.bisect=p.bisectRight=v.right,p.bisector=function(de){return h(de.length===1?function(Ee,qe){return s(de(Ee),qe)}:de)},p.shuffle=function(de,Ee,qe){(tt=arguments.length)<3&&(qe=de.length,tt<2&&(Ee=0));for(var tt=qe-Ee,at,ct;tt;)ct=Math.random()*tt--|0,at=de[tt+Ee],de[tt+Ee]=de[ct+Ee],de[ct+Ee]=at;return de},p.permute=function(de,Ee){for(var qe=Ee.length,tt=new Array(qe);qe--;)tt[qe]=de[Ee[qe]];return tt},p.pairs=function(de){for(var Ee=0,qe=de.length-1,tt,at=de[0],ct=new Array(qe<0?0:qe);Ee=0;)for(Nt=de[Ee],qe=Nt.length;--qe>=0;)ct[--at]=Nt[qe];return ct};var i=Math.abs;p.range=function(de,Ee,qe){if(arguments.length<3&&(qe=1,arguments.length<2&&(Ee=de,de=0)),(Ee-de)/qe===1/0)throw new Error("infinite range");var tt=[],at=w(i(qe)),ct=-1,Nt;if(de*=at,Ee*=at,qe*=at,qe<0)for(;(Nt=de+qe*++ct)>Ee;)tt.push(Nt/at);else for(;(Nt=de+qe*++ct)=Ee.length)return at?at.call(de,Jt):tt?Jt.sort(tt):Jt;for(var gr=-1,Hr=Jt.length,Vr=Ee[mr++],ca,Aa,Xr,oa=new M,fa;++gr=Ee.length)return St;var mr=[],gr=qe[Jt++];return St.forEach(function(Hr,Vr){mr.push({key:Hr,values:Nt(Vr,Jt)})}),gr?mr.sort(function(Hr,Vr){return gr(Hr.key,Vr.key)}):mr}return de.map=function(St,Jt){return ct(Jt,St,0)},de.entries=function(St){return Nt(ct(p.map,St,0),0)},de.key=function(St){return Ee.push(St),de},de.sortKeys=function(St){return qe[Ee.length-1]=St,de},de.sortValues=function(St){return tt=St,de},de.rollup=function(St){return at=St,de},de},p.set=function(de){var Ee=new O;if(de)for(var qe=0,tt=de.length;qe=0&&(tt=de.slice(qe+1),de=de.slice(0,qe)),de)return arguments.length<2?this[de].on(tt):this[de].on(tt,Ee);if(arguments.length===2){if(Ee==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(tt,null);return this}};function $(de){var Ee=[],qe=new M;function tt(){for(var at=Ee,ct=-1,Nt=at.length,St;++ct=0&&(qe=de.slice(0,Ee))!=="xmlns"&&(de=de.slice(Ee+1)),he.hasOwnProperty(qe)?{space:he[qe],local:de}:de}},q.attr=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node();return de=p.ns.qualify(de),de.local?qe.getAttributeNS(de.space,de.local):qe.getAttribute(de)}for(Ee in de)this.each(xe(Ee,de[Ee]));return this}return this.each(xe(de,Ee))};function xe(de,Ee){de=p.ns.qualify(de);function qe(){this.removeAttribute(de)}function tt(){this.removeAttributeNS(de.space,de.local)}function at(){this.setAttribute(de,Ee)}function ct(){this.setAttributeNS(de.space,de.local,Ee)}function Nt(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttribute(de):this.setAttribute(de,Jt)}function St(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,Jt)}return Ee==null?de.local?tt:qe:typeof Ee=="function"?de.local?St:Nt:de.local?ct:at}function we(de){return de.trim().replace(/\s+/g," ")}q.classed=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node(),tt=(de=Se(de)).length,at=-1;if(Ee=qe.classList){for(;++at=0;)(ct=qe[tt])&&(at&&at!==ct.nextSibling&&at.parentNode.insertBefore(ct,at),at=ct);return this},q.sort=function(de){de=Ae.apply(this,arguments);for(var Ee=-1,qe=this.length;++Ee=Ee&&(Ee=at+1);!(Jt=Nt[Ee])&&++Ee0&&(de=de.slice(0,at));var Nt=Tt.get(de);Nt&&(de=Nt,ct=$t);function St(){var gr=this[tt];gr&&(this.removeEventListener(de,gr,gr.$),delete this[tt])}function Jt(){var gr=ct(Ee,E(arguments));St.call(this),this.addEventListener(de,this[tt]=gr,gr.$=qe),gr._=Ee}function mr(){var gr=new RegExp("^__on([^.]+)"+p.requote(de)+"$"),Hr;for(var Vr in this)if(Hr=Vr.match(gr)){var ca=this[Vr];this.removeEventListener(Hr[1],ca,ca.$),delete this[Vr]}}return at?Ee?Jt:St:Ee?j:mr}var Tt=p.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(de){"on"+de in k&&Tt.remove(de)});function At(de,Ee){return function(qe){var tt=p.event;p.event=qe,Ee[0]=this.__data__;try{de.apply(this,Ee)}finally{p.event=tt}}}function $t(de,Ee){var qe=At(de,Ee);return function(tt){var at=this,ct=tt.relatedTarget;(!ct||ct!==at&&!(ct.compareDocumentPosition(at)&8))&&qe.call(at,tt)}}var rr,_r=0;function Xt(de){var Ee=".dragsuppress-"+ ++_r,qe="click"+Ee,tt=p.select(e(de)).on("touchmove"+Ee,Q).on("dragstart"+Ee,Q).on("selectstart"+Ee,Q);if(rr==null&&(rr="onselectstart"in de?!1:F(de.style,"userSelect")),rr){var at=l(de).style,ct=at[rr];at[rr]="none"}return function(Nt){if(tt.on(Ee,null),rr&&(at[rr]=ct),Nt){var St=function(){tt.on(qe,null)};tt.on(qe,function(){Q(),St()},!0),setTimeout(St,0)}}}p.mouse=function(de){return Ot(de,re())};var or=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(de,Ee){Ee.changedTouches&&(Ee=Ee.changedTouches[0]);var qe=de.ownerSVGElement||de;if(qe.createSVGPoint){var tt=qe.createSVGPoint();if(or<0){var at=e(de);if(at.scrollX||at.scrollY){qe=p.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ct=qe[0][0].getScreenCTM();or=!(ct.f||ct.e),qe.remove()}}return or?(tt.x=Ee.pageX,tt.y=Ee.pageY):(tt.x=Ee.clientX,tt.y=Ee.clientY),tt=tt.matrixTransform(de.getScreenCTM().inverse()),[tt.x,tt.y]}var Nt=de.getBoundingClientRect();return[Ee.clientX-Nt.left-de.clientLeft,Ee.clientY-Nt.top-de.clientTop]}p.touch=function(de,Ee,qe){if(arguments.length<3&&(qe=Ee,Ee=re().changedTouches),Ee){for(var tt=0,at=Ee.length,ct;tt0?1:de<0?-1:0}function Pt(de,Ee,qe){return(Ee[0]-de[0])*(qe[1]-de[1])-(Ee[1]-de[1])*(qe[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ne:Math.acos(de)}function qt(de){return de>1?Je:de<-1?-Je:Math.asin(de)}function Vt(de){return((de=Math.exp(de))-1/de)/2}function Ht(de){return((de=Math.exp(de))+1/de)/2}function Sr(de){return((de=Math.exp(2*de))-1)/(de+1)}function Kr(de){return(de=Math.sin(de/2))*de}var Yt=Math.SQRT2,Rt=2,nr=4;p.interpolateZoom=function(de,Ee){var qe=de[0],tt=de[1],at=de[2],ct=Ee[0],Nt=Ee[1],St=Ee[2],Jt=ct-qe,mr=Nt-tt,gr=Jt*Jt+mr*mr,Hr,Vr;if(gr0&&(be=be.transition().duration(Nt)),be.call(Ma.event)}function xi(){oa&&oa.domain(Xr.range().map(function(be){return(be-de.x)/de.k}).map(Xr.invert)),Ea&&Ea.domain(fa.range().map(function(be){return(be-de.y)/de.k}).map(fa.invert))}function di(be){St++||be({type:"zoomstart"})}function uo(be){xi(),be({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function pe(be){--St||(be({type:"zoomend"}),qe=null)}function y(){var be=this,Re=Aa.of(be,arguments),je=0,Ze=p.select(e(be)).on(mr,Dt).on(gr,Gt),ut=sa(p.mouse(be)),ft=Xt(be);Qi.call(be),di(Re);function Dt(){je=1,zn(p.mouse(be),ut),uo(Re)}function Gt(){Ze.on(mr,null).on(gr,null),ft(je),pe(Re)}}function N(){var be=this,Re=Aa.of(be,arguments),je={},Ze=0,ut,ft=".zoom-"+p.event.changedTouches[0].identifier,Dt="touchmove"+ft,Gt="touchend"+ft,Kt=[],st=p.select(be),It=Xt(be);ir(),di(Re),st.on(Jt,null).on(Vr,ir);function Ut(){var hr=p.touches(be);return ut=de.k,hr.forEach(function(vr){vr.identifier in je&&(je[vr.identifier]=sa(vr))}),hr}function ir(){var hr=p.event.target;p.select(hr).on(Dt,dr).on(Gt,Ar),Kt.push(hr);for(var vr=p.event.changedTouches,Or=0,Cr=vr.length;Or1){var Ta=ta[0],Ra=ta[1],ua=Ta[0]-Ra[0],ia=Ta[1]-Ra[1];Ze=ua*ua+ia*ia}}function dr(){var hr=p.touches(be),vr,Or,Cr,ta;Qi.call(be);for(var ka=0,Ta=hr.length;ka1?1:Ee,qe=qe<0?0:qe>1?1:qe,at=qe<=.5?qe*(1+Ee):qe+Ee-qe*Ee,tt=2*qe-at;function ct(St){return St>360?St-=360:St<0&&(St+=360),St<60?tt+(at-tt)*St/60:St<180?at:St<240?tt+(at-tt)*(240-St)/60:tt}function Nt(St){return Math.round(ct(St)*255)}return new Oa(Nt(de+120),Nt(de),Nt(de-120))}p.hcl=La;function La(de,Ee,qe){return this instanceof La?(this.h=+de,this.c=+Ee,void(this.l=+qe)):arguments.length<2?de instanceof La?new La(de.h,de.c,de.l):de instanceof ja?en(de.l,de.a,de.b):en((de=Dr((de=p.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new La(de,Ee,qe)}var un=La.prototype=new Qr;un.brighter=function(de){return new La(this.h,this.c,Math.min(100,this.l+Nn*(arguments.length?de:1)))},un.darker=function(de){return new La(this.h,this.c,Math.max(0,this.l-Nn*(arguments.length?de:1)))},un.rgb=function(){return Xa(this.h,this.c,this.l).rgb()};function Xa(de,Ee,qe){return isNaN(de)&&(de=0),isNaN(Ee)&&(Ee=0),new ja(qe,Math.cos(de*=et)*Ee,Math.sin(de)*Ee)}p.lab=ja;function ja(de,Ee,qe){return this instanceof ja?(this.l=+de,this.a=+Ee,void(this.b=+qe)):arguments.length<2?de instanceof ja?new ja(de.l,de.a,de.b):de instanceof La?Xa(de.h,de.c,de.l):Dr((de=Oa(de)).r,de.g,de.b):new ja(de,Ee,qe)}var Nn=18,yn=.95047,Un=1,li=1.08883,Yn=ja.prototype=new Qr;Yn.brighter=function(de){return new ja(Math.min(100,this.l+Nn*(arguments.length?de:1)),this.a,this.b)},Yn.darker=function(de){return new ja(Math.max(0,this.l-Nn*(arguments.length?de:1)),this.a,this.b)},Yn.rgb=function(){return on(this.l,this.a,this.b)};function on(de,Ee,qe){var tt=(de+16)/116,at=tt+Ee/500,ct=tt-qe/200;return at=vi(at)*yn,tt=vi(tt)*Un,ct=vi(ct)*li,new Oa(Ja(3.2404542*at-1.5371385*tt-.4985314*ct),Ja(-.969266*at+1.8760108*tt+.041556*ct),Ja(.0556434*at-.2040259*tt+1.0572252*ct))}function en(de,Ee,qe){return de>0?new La(Math.atan2(qe,Ee)*Mt,Math.sqrt(Ee*Ee+qe*qe),de):new La(NaN,NaN,de)}function vi(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function Yi(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function Ja(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}p.rgb=Oa;function Oa(de,Ee,qe){return this instanceof Oa?(this.r=~~de,this.g=~~Ee,void(this.b=~~qe)):arguments.length<2?de instanceof Oa?new Oa(de.r,de.g,de.b):Tr(""+de,Oa,Pa):new Oa(de,Ee,qe)}function lt(de){return new Oa(de>>16,de>>8&255,de&255)}function rt(de){return lt(de)+""}var fr=Oa.prototype=new Qr;fr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Ee=this.r,qe=this.g,tt=this.b,at=30;return!Ee&&!qe&&!tt?new Oa(at,at,at):(Ee&&Ee>4,tt=tt>>4|tt,at=Jt&240,at=at>>4|at,ct=Jt&15,ct=ct<<4|ct):de.length===7&&(tt=(Jt&16711680)>>16,at=(Jt&65280)>>8,ct=Jt&255)),Ee(tt,at,ct))}function Ir(de,Ee,qe){var tt=Math.min(de/=255,Ee/=255,qe/=255),at=Math.max(de,Ee,qe),ct=at-tt,Nt,St,Jt=(at+tt)/2;return ct?(St=Jt<.5?ct/(at+tt):ct/(2-at-tt),de==at?Nt=(Ee-qe)/ct+(Ee0&&Jt<1?0:Nt),new Zr(Nt,St,Jt)}function Dr(de,Ee,qe){de=ot(de),Ee=ot(Ee),qe=ot(qe);var tt=Yi((.4124564*de+.3575761*Ee+.1804375*qe)/yn),at=Yi((.2126729*de+.7151522*Ee+.072175*qe)/Un),ct=Yi((.0193339*de+.119192*Ee+.9503041*qe)/li);return ja(116*at-16,500*(tt-at),200*(at-ct))}function ot(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function kt(de){var Ee=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Ee*2.55):Ee}var jt=p.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});jt.forEach(function(de,Ee){jt.set(de,lt(Ee))});function ar(de){return typeof de=="function"?de:function(){return de}}p.functor=ar,p.xhr=Er(D);function Er(de){return function(Ee,qe,tt){return arguments.length===2&&typeof qe=="function"&&(tt=qe,qe=null),xr(Ee,qe,de,tt)}}function xr(de,Ee,qe,tt){var at={},ct=p.dispatch("beforesend","progress","load","error"),Nt={},St=new XMLHttpRequest,Jt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(de)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=mr:St.onreadystatechange=function(){St.readyState>3&&mr()};function mr(){var gr=St.status,Hr;if(!gr&&Lr(St)||gr>=200&&gr<300||gr===304){try{Hr=qe.call(at,St)}catch(Vr){ct.error.call(at,Vr);return}ct.load.call(at,Hr)}else ct.error.call(at,St)}return St.onprogress=function(gr){var Hr=p.event;p.event=gr;try{ct.progress.call(at,St)}finally{p.event=Hr}},at.header=function(gr,Hr){return gr=(gr+"").toLowerCase(),arguments.length<2?Nt[gr]:(Hr==null?delete Nt[gr]:Nt[gr]=Hr+"",at)},at.mimeType=function(gr){return arguments.length?(Ee=gr==null?null:gr+"",at):Ee},at.responseType=function(gr){return arguments.length?(Jt=gr,at):Jt},at.response=function(gr){return qe=gr,at},["get","post"].forEach(function(gr){at[gr]=function(){return at.send.apply(at,[gr].concat(E(arguments)))}}),at.send=function(gr,Hr,Vr){if(arguments.length===2&&typeof Hr=="function"&&(Vr=Hr,Hr=null),St.open(gr,de,!0),Ee!=null&&!("accept"in Nt)&&(Nt.accept=Ee+",*/*"),St.setRequestHeader)for(var ca in Nt)St.setRequestHeader(ca,Nt[ca]);return Ee!=null&&St.overrideMimeType&&St.overrideMimeType(Ee),Jt!=null&&(St.responseType=Jt),Vr!=null&&at.on("error",Vr).on("load",function(Aa){Vr(null,Aa)}),ct.beforesend.call(at,St),St.send(Hr??null),at},at.abort=function(){return St.abort(),at},p.rebind(at,ct,"on"),tt==null?at:at.get(zr(tt))}function zr(de){return de.length===1?function(Ee,qe){de(Ee==null?qe:null)}:de}function Lr(de){var Ee=de.responseType;return Ee&&Ee!=="text"?de.response:de.responseText}p.dsv=function(de,Ee){var qe=new RegExp('["'+de+` +]`),tt=de.charCodeAt(0);function at(mr,gr,Hr){arguments.length<3&&(Hr=gr,gr=null);var Vr=xr(mr,Ee,gr==null?ct:Nt(gr),Hr);return Vr.row=function(ca){return arguments.length?Vr.response((gr=ca)==null?ct:Nt(ca)):gr},Vr}function ct(mr){return at.parse(mr.responseText)}function Nt(mr){return function(gr){return at.parse(gr.responseText,mr)}}at.parse=function(mr,gr){var Hr;return at.parseRows(mr,function(Vr,ca){if(Hr)return Hr(Vr,ca-1);var Aa=function(Xr){for(var oa={},fa=Vr.length,Ea=0;Ea=Aa)return Vr;if(Ea)return Ea=!1,Hr;var hn=Xr;if(mr.charCodeAt(hn)===34){for(var An=hn;An++24?(isFinite(Ee)&&(clearTimeout(pn),pn=setTimeout(rn,Ee)),wa=0):(wa=1,tn(rn))}p.timer.flush=function(){Ri(),Gn()};function Ri(){for(var de=Date.now(),Ee=aa;Ee;)de>=Ee.t&&Ee.c(de-Ee.t)&&(Ee.c=null),Ee=Ee.n;return de}function Gn(){for(var de,Ee=aa,qe=1/0;Ee;)Ee.c?(Ee.t=0;--St)Yr.push(at[mr[Hr[St]][2]]);for(St=+ca;St1&&Pt(de[qe[tt-2]],de[qe[tt-1]],de[at])<=0;)--tt;qe[tt++]=at}return qe.slice(0,tt)}function Ai(de,Ee){return de[0]-Ee[0]||de[1]-Ee[1]}p.geom.polygon=function(de){return G(de,jn),de};var jn=p.geom.polygon.prototype=[];jn.area=function(){for(var de=-1,Ee=this.length,qe,tt=this[Ee-1],at=0;++deht)St=St.L;else if(Nt=Ee-Wo(St,qe),Nt>ht){if(!St.R){tt=St;break}St=St.R}else{ct>-ht?(tt=St.P,at=St):Nt>-ht?(tt=St,at=St.N):tt=at=St;break}var Jt=go(de);if(oo.insert(tt,Jt),!(!tt&&!at)){if(tt===at){Xi(tt),at=go(tt.site),oo.insert(Jt,at),Jt.edge=at.edge=Vo(tt.site,Jt.site),Io(tt),Io(at);return}if(!at){Jt.edge=Vo(tt.site,Jt.site);return}Xi(tt),Xi(at);var mr=tt.site,gr=mr.x,Hr=mr.y,Vr=de.x-gr,ca=de.y-Hr,Aa=at.site,Yr=Aa.x-gr,oa=Aa.y-Hr,fa=2*(Vr*oa-ca*Yr),Ea=Vr*Vr+ca*ca,Ma=Yr*Yr+oa*oa,sa={x:(oa*Ea-ca*Ma)/fa+gr,y:(Vr*Ma-Yr*Ea)/fa+Hr};Ts(at.edge,mr,Aa,sa),Jt.edge=Vo(mr,de,null,sa),at.edge=Vo(de,Aa,null,sa),Io(tt),Io(at)}}function jo(de,Ee){var qe=de.site,tt=qe.x,at=qe.y,ct=at-Ee;if(!ct)return tt;var Nt=de.P;if(!Nt)return-1/0;qe=Nt.site;var St=qe.x,Jt=qe.y,mr=Jt-Ee;if(!mr)return St;var gr=St-tt,Hr=1/ct-1/mr,Vr=gr/mr;return Hr?(-Vr+Math.sqrt(Vr*Vr-2*Hr*(gr*gr/(-2*mr)-Jt+mr/2+at-ct/2)))/Hr+tt:(tt+St)/2}function Wo(de,Ee){var qe=de.N;if(qe)return jo(qe,Ee);var tt=de.site;return tt.y===Ee?tt.x:1/0}function to(de){this.site=de,this.edges=[]}to.prototype.prepare=function(){for(var de=this.edges,Ee=de.length,qe;Ee--;)qe=de[Ee].edge,(!qe.b||!qe.a)&&de.splice(Ee,1);return de.sort(pi),de.length};function wo(de){for(var Ee=de[0][0],qe=de[1][0],tt=de[0][1],at=de[1][1],ct,Nt,St,Jt,mr=io,gr=mr.length,Hr,Vr,ca,Aa,Yr,oa;gr--;)if(Hr=mr[gr],!(!Hr||!Hr.prepare()))for(ca=Hr.edges,Aa=ca.length,Vr=0;Vrht||i(Jt-Nt)>ht)&&(ca.splice(Vr,0,new Bo(Vs(Hr.site,oa,i(St-Ee)ht?{x:Ee,y:i(ct-Ee)ht?{x:i(Nt-at)ht?{x:qe,y:i(ct-qe)ht?{x:i(Nt-tt)=-De)){var Vr=Jt*Jt+mr*mr,ca=gr*gr+oa*oa,Aa=(oa*Vr-mr*ca)/Hr,Yr=(Jt*ca-gr*Vr)/Hr,oa=Yr+St,fa=Mi.pop()||new Vi;fa.arc=de,fa.site=at,fa.x=Aa+Nt,fa.y=oa+Math.sqrt(Aa*Aa+Yr*Yr),fa.cy=oa,de.circle=fa;for(var Ea=null,Ma=Hi._;Ma;)if(fa.y0)){if(Yr/=ca,ca<0){if(Yr0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}if(Yr=qe-St,!(!ca&&Yr<0)){if(Yr/=ca,ca<0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}else if(ca>0){if(Yr0)){if(Yr/=Aa,Aa<0){if(Yr0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}if(Yr=tt-Jt,!(!Aa&&Yr<0)){if(Yr/=Aa,Aa<0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}else if(Aa>0){if(Yr0&&(at.a={x:St+Hr*ca,y:Jt+Hr*Aa}),Vr<1&&(at.b={x:St+Vr*ca,y:Jt+Vr*Aa}),at}}}}}}function Uo(de){for(var Ee=qi,qe=Ko(de[0][0],de[0][1],de[1][0],de[1][1]),tt=Ee.length,at;tt--;)at=Ee[tt],(!Ls(at,de)||!qe(at)||i(at.a.x-at.b.x)=ct)return;if(gr>Vr){if(!tt)tt={x:Aa,y:Nt};else if(tt.y>=St)return;qe={x:Aa,y:St}}else{if(!tt)tt={x:Aa,y:St};else if(tt.y1)if(gr>Vr){if(!tt)tt={x:(Nt-fa)/oa,y:Nt};else if(tt.y>=St)return;qe={x:(St-fa)/oa,y:St}}else{if(!tt)tt={x:(St-fa)/oa,y:St};else if(tt.y=ct)return;qe={x:ct,y:oa*ct+fa}}else{if(!tt)tt={x:ct,y:oa*ct+fa};else if(tt.x=gr&&fa.x<=Vr&&fa.y>=Hr&&fa.y<=ca?[[gr,ca],[Vr,ca],[Vr,Hr],[gr,Hr]]:[];Ea.point=Jt[Yr]}),mr}function St(Jt){return Jt.map(function(mr,gr){return{x:Math.round(tt(mr,gr)/ht)*ht,y:Math.round(at(mr,gr)/ht)*ht,i:gr}})}return Nt.links=function(Jt){return hl(St(Jt)).edges.filter(function(mr){return mr.l&&mr.r}).map(function(mr){return{source:Jt[mr.l.i],target:Jt[mr.r.i]}})},Nt.triangles=function(Jt){var mr=[];return hl(St(Jt)).cells.forEach(function(gr,Hr){for(var Vr=gr.site,ca=gr.edges.sort(pi),Aa=-1,Yr=ca.length,oa,fa,Ea=ca[Yr-1].edge,Ma=Ea.l===Vr?Ea.r:Ea.l;++AaMa&&(Ma=gr.x),gr.y>sa&&(sa=gr.y),ca.push(gr.x),Aa.push(gr.y);else for(Yr=0;YrMa&&(Ma=hn),Tn>sa&&(sa=Tn),ca.push(hn),Aa.push(Tn)}var zn=Ma-fa,$n=sa-Ea;zn>$n?sa=Ea+zn:Ma=fa+$n;function xi(pe,y,N,ie,fe,be,Re,je){if(!(isNaN(N)||isNaN(ie)))if(pe.leaf){var Ze=pe.x,ut=pe.y;if(Ze!=null)if(i(Ze-N)+i(ut-ie)<.01)di(pe,y,N,ie,fe,be,Re,je);else{var ft=pe.point;pe.x=pe.y=pe.point=null,di(pe,ft,Ze,ut,fe,be,Re,je),di(pe,y,N,ie,fe,be,Re,je)}else pe.x=N,pe.y=ie,pe.point=y}else di(pe,y,N,ie,fe,be,Re,je)}function di(pe,y,N,ie,fe,be,Re,je){var Ze=(fe+Re)*.5,ut=(be+je)*.5,ft=N>=Ze,Dt=ie>=ut,Gt=Dt<<1|ft;pe.leaf=!1,pe=pe.nodes[Gt]||(pe.nodes[Gt]=Fl()),ft?fe=Ze:Re=Ze,Dt?be=ut:je=ut,xi(pe,y,N,ie,fe,be,Re,je)}var uo=Fl();if(uo.add=function(pe){xi(uo,pe,+Hr(pe,++Yr),+Vr(pe,Yr),fa,Ea,Ma,sa)},uo.visit=function(pe){pl(pe,uo,fa,Ea,Ma,sa)},uo.find=function(pe){return $u(uo,pe[0],pe[1],fa,Ea,Ma,sa)},Yr=-1,Ee==null){for(;++Yrct||Vr>Nt||ca=hn,$n=qe>=Tn,xi=$n<<1|zn,di=xi+4;xiqe&&(ct=Ee.slice(qe,ct),St[Nt]?St[Nt]+=ct:St[++Nt]=ct),(tt=tt[0])===(at=at[0])?St[Nt]?St[Nt]+=at:St[++Nt]=at:(St[++Nt]=null,Jt.push({i:Nt,x:vs(tt,at)})),qe=rl.lastIndex;return qe=0&&!(tt=p.interpolators[qe](de,Ee)););return tt}p.interpolators=[function(de,Ee){var qe=typeof Ee;return(qe==="string"?jt.has(Ee.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ee)?uu:os:Ee instanceof Qr?uu:Array.isArray(Ee)?zu:qe==="object"&&isNaN(Ee)?tl:vs)(de,Ee)}],p.interpolateArray=zu;function zu(de,Ee){var qe=[],tt=[],at=de.length,ct=Ee.length,Nt=Math.min(de.length,Ee.length),St;for(St=0;St=0?de.slice(0,Ee):de,tt=Ee>=0?de.slice(Ee+1):"in";return qe=bc.get(qe)||Ku,tt=Lh.get(tt)||D,rh(tt(qe.apply(null,b.call(arguments,1))))};function rh(de){return function(Ee){return Ee<=0?0:Ee>=1?1:de(Ee)}}function Ju(de){return function(Ee){return 1-de(1-Ee)}}function ss(de){return function(Ee){return .5*(Ee<.5?de(2*Ee):2-de(2-2*Ee))}}function ah(de){return de*de}function wc(de){return de*de*de}function pc(de){if(de<=0)return 0;if(de>=1)return 1;var Ee=de*de,qe=Ee*de;return 4*(de<.5?qe:3*(de-Ee)+qe-.75)}function Nf(de){return function(Ee){return Math.pow(Ee,de)}}function Bu(de){return 1-Math.cos(de*Je)}function Tc(de){return Math.pow(2,10*(de-1))}function Ou(de){return 1-Math.sqrt(1-de*de)}function Gc(de,Ee){var qe;return arguments.length<2&&(Ee=.45),arguments.length?qe=Ee/We*Math.asin(1/de):(de=1,qe=Ee/4),function(tt){return 1+de*Math.pow(2,-10*tt)*Math.sin((tt-qe)*We/Ee)}}function pf(de){return de||(de=1.70158),function(Ee){return Ee*Ee*((de+1)*Ee-de)}}function $l(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}p.interpolateHcl=jf;function jf(de,Ee){de=p.hcl(de),Ee=p.hcl(Ee);var qe=de.h,tt=de.c,at=de.l,ct=Ee.h-qe,Nt=Ee.c-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.c:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Xa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateHsl=Hc;function Hc(de,Ee){de=p.hsl(de),Ee=p.hsl(Ee);var qe=de.h,tt=de.s,at=de.l,ct=Ee.h-qe,Nt=Ee.s-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.s:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Pa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateLab=Wc;function Wc(de,Ee){de=p.lab(de),Ee=p.lab(Ee);var qe=de.l,tt=de.a,at=de.b,ct=Ee.l-qe,Nt=Ee.a-tt,St=Ee.b-at;return function(Jt){return on(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateRound=Qu;function Qu(de,Ee){return Ee-=de,function(qe){return Math.round(de+Ee*qe)}}p.transform=function(de){var Ee=k.createElementNS(p.ns.prefix.svg,"g");return(p.transform=function(qe){if(qe!=null){Ee.setAttribute("transform",qe);var tt=Ee.transform.baseVal.consolidate()}return new Yc(tt?tt.matrix:Xc)})(de)};function Yc(de){var Ee=[de.a,de.b],qe=[de.c,de.d],tt=Uf(Ee),at=Nu(Ee,qe),ct=Uf(al(qe,Ee,-at))||0;Ee[0]*qe[1]180?Ee+=360:Ee-de>180&&(de+=360),tt.push({i:qe.push(ju(qe)+"rotate(",null,")")-2,x:vs(de,Ee)})):Ee&&qe.push(ju(qe)+"rotate("+Ee+")")}function ec(de,Ee,qe,tt){de!==Ee?tt.push({i:qe.push(ju(qe)+"skewX(",null,")")-2,x:vs(de,Ee)}):Ee&&qe.push(ju(qe)+"skewX("+Ee+")")}function cu(de,Ee,qe,tt){if(de[0]!==Ee[0]||de[1]!==Ee[1]){var at=qe.push(ju(qe)+"scale(",null,",",null,")");tt.push({i:at-4,x:vs(de[0],Ee[0])},{i:at-2,x:vs(de[1],Ee[1])})}else(Ee[0]!==1||Ee[1]!==1)&&qe.push(ju(qe)+"scale("+Ee+")")}function tc(de,Ee){var qe=[],tt=[];return de=p.transform(de),Ee=p.transform(Ee),Ac(de.translate,Ee.translate,qe,tt),Zc(de.rotate,Ee.rotate,qe,tt),ec(de.skew,Ee.skew,qe,tt),cu(de.scale,Ee.scale,qe,tt),de=Ee=null,function(at){for(var ct=-1,Nt=tt.length,St;++ct0?ct=sa:(qe.c=null,qe.t=NaN,qe=null,Ee.end({type:"end",alpha:ct=0})):sa>0&&(Ee.start({type:"start",alpha:ct=sa}),qe=ai(de.tick)),de):ct},de.start=function(){var sa,hn=ca.length,Tn=Aa.length,zn=tt[0],$n=tt[1],xi,di;for(sa=0;sa=0;)ct.push(gr=mr[Jt]),gr.parent=St,gr.depth=St.depth+1;qe&&(St.value=0),St.children=mr}else qe&&(St.value=+qe.call(tt,St,St.depth)||0),delete St.children;return El(at,function(Hr){var Vr,ca;de&&(Vr=Hr.children)&&Vr.sort(de),qe&&(ca=Hr.parent)&&(ca.value+=Hr.value)}),Nt}return tt.sort=function(at){return arguments.length?(de=at,tt):de},tt.children=function(at){return arguments.length?(Ee=at,tt):Ee},tt.value=function(at){return arguments.length?(qe=at,tt):qe},tt.revalue=function(at){return qe&&(Sl(at,function(ct){ct.children&&(ct.value=0)}),El(at,function(ct){var Nt;ct.children||(ct.value=+qe.call(tt,ct,ct.depth)||0),(Nt=ct.parent)&&(Nt.value+=ct.value)})),at},tt};function fu(de,Ee){return p.rebind(de,Ee,"sort","children","value"),de.nodes=de,de.links=_l,de}function Sl(de,Ee){for(var qe=[de];(de=qe.pop())!=null;)if(Ee(de),(at=de.children)&&(tt=at.length))for(var tt,at;--tt>=0;)qe.push(at[tt])}function El(de,Ee){for(var qe=[de],tt=[];(de=qe.pop())!=null;)if(tt.push(de),(Nt=de.children)&&(ct=Nt.length))for(var at=-1,ct,Nt;++atat&&(at=St),tt.push(St)}for(Nt=0;Nttt&&(qe=Ee,tt=at);return qe}function _f(de){return de.reduce(Mu,0)}function Mu(de,Ee){return de+Ee[1]}p.layout.histogram=function(){var de=!0,Ee=Number,qe=Vu,tt=ic;function at(ct,Vr){for(var St=[],Jt=ct.map(Ee,this),mr=qe.call(this,Jt,Vr),gr=tt.call(this,mr,Jt,Vr),Hr,Vr=-1,ca=Jt.length,Aa=gr.length-1,Yr=de?1:1/ca,oa;++Vr0)for(Vr=-1;++Vr=mr[0]&&oa<=mr[1]&&(Hr=St[p.bisect(gr,oa,1,Aa)-1],Hr.y+=Yr,Hr.push(ct[Vr]));return St}return at.value=function(ct){return arguments.length?(Ee=ct,at):Ee},at.range=function(ct){return arguments.length?(qe=ar(ct),at):qe},at.bins=function(ct){return arguments.length?(tt=typeof ct=="number"?function(Nt){return Sc(Nt,ct)}:ar(ct),at):tt},at.frequency=function(ct){return arguments.length?(de=!!ct,at):de},at};function ic(de,Ee){return Sc(de,Math.ceil(Math.log(Ee.length)/Math.LN2+1))}function Sc(de,Ee){for(var qe=-1,tt=+de[0],at=(de[1]-tt)/Ee,ct=[];++qe<=Ee;)ct[qe]=at*qe+tt;return ct}function Vu(de){return[p.min(de),p.max(de)]}p.layout.pack=function(){var de=p.layout.hierarchy().sort(xo),Ee=0,qe=[1,1],tt;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr=qe[0],gr=qe[1],Hr=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Jt.x=Jt.y=0,El(Jt,function(ca){ca.r=+Hr(ca.value)}),El(Jt,xf),Ee){var Vr=Ee*(tt?1:Math.max(2*Jt.r/mr,2*Jt.r/gr))/2;El(Jt,function(ca){ca.r+=Vr}),El(Jt,xf),El(Jt,function(ca){ca.r-=Vr})}return Hf(Jt,mr/2,gr/2,tt?1:1/Math.max(2*Jt.r/mr,2*Jt.r/gr)),St}return at.size=function(ct){return arguments.length?(qe=ct,at):qe},at.radius=function(ct){return arguments.length?(tt=ct==null||typeof ct=="function"?ct:+ct,at):tt},at.padding=function(ct){return arguments.length?(Ee=+ct,at):Ee},fu(at,de)};function xo(de,Ee){return de.value-Ee.value}function Ec(de,Ee){var qe=de._pack_next;de._pack_next=Ee,Ee._pack_prev=de,Ee._pack_next=qe,qe._pack_prev=Ee}function xh(de,Ee){de._pack_next=Ee,Ee._pack_prev=de}function Vf(de,Ee){var qe=Ee.x-de.x,tt=Ee.y-de.y,at=de.r+Ee.r;return .999*at*at>qe*qe+tt*tt}function xf(de){if(!(Ee=de.children)||!(Vr=Ee.length))return;var Ee,qe=1/0,tt=-1/0,at=1/0,ct=-1/0,Nt,St,Jt,mr,gr,Hr,Vr;function ca(sa){qe=Math.min(sa.x-sa.r,qe),tt=Math.max(sa.x+sa.r,tt),at=Math.min(sa.y-sa.r,at),ct=Math.max(sa.y+sa.r,ct)}if(Ee.forEach(Gf),Nt=Ee[0],Nt.x=-Nt.r,Nt.y=0,ca(Nt),Vr>1&&(St=Ee[1],St.x=St.r,St.y=0,ca(St),Vr>2))for(Jt=Ee[2],il(Nt,St,Jt),ca(Jt),Ec(Nt,Jt),Nt._pack_prev=Jt,Ec(Jt,St),St=Nt._pack_next,mr=3;mroa.x&&(oa=hn),hn.depth>fa.depth&&(fa=hn)});var Ea=Ee(Yr,oa)/2-Yr.x,Ma=qe[0]/(oa.x+Ee(oa,Yr)/2+Ea),sa=qe[1]/(fa.depth||1);Sl(ca,function(hn){hn.x=(hn.x+Ea)*Ma,hn.y=hn.depth*sa})}return Vr}function ct(gr){for(var Hr={A:null,children:[gr]},Vr=[Hr],ca;(ca=Vr.pop())!=null;)for(var Aa=ca.children,Yr,oa=0,fa=Aa.length;oa0&&(Lc(Ft(Yr,gr,Vr),gr,hn),fa+=hn,Ea+=hn),Ma+=Yr.m,fa+=ca.m,sa+=oa.m,Ea+=Aa.m;Yr&&!Cc(Aa)&&(Aa.t=Yr,Aa.m+=Ma-Ea),ca&&!kc(oa)&&(oa.t=ca,oa.m+=fa-sa,Vr=gr)}return Vr}function mr(gr){gr.x*=qe[0],gr.y=gr.depth*qe[1]}return at.separation=function(gr){return arguments.length?(Ee=gr,at):Ee},at.size=function(gr){return arguments.length?(tt=(qe=gr)==null?mr:null,at):tt?null:qe},at.nodeSize=function(gr){return arguments.length?(tt=(qe=gr)==null?null:mr,at):tt?qe:null},fu(at,de)};function kl(de,Ee){return de.parent==Ee.parent?1:2}function kc(de){var Ee=de.children;return Ee.length?Ee[0]:de.t}function Cc(de){var Ee=de.children,qe;return(qe=Ee.length)?Ee[qe-1]:de.t}function Lc(de,Ee,qe){var tt=qe/(Ee.i-de.i);Ee.c-=tt,Ee.s+=qe,de.c+=tt,Ee.z+=qe,Ee.m+=qe}function vc(de){for(var Ee=0,qe=0,tt=de.children,at=tt.length,ct;--at>=0;)ct=tt[at],ct.z+=Ee,ct.m+=Ee,Ee+=ct.s+(qe+=ct.c)}function Ft(de,Ee,qe){return de.a.parent===Ee.parent?de.a:qe}p.layout.cluster=function(){var de=p.layout.hierarchy().sort(null).value(null),Ee=kl,qe=[1,1],tt=!1;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr,gr=0;El(Jt,function(Yr){var oa=Yr.children;oa&&oa.length?(Yr.x=Fr(oa),Yr.y=tr(oa)):(Yr.x=mr?gr+=Ee(Yr,mr):0,Yr.y=0,mr=Yr)});var Hr=wr(Jt),Vr=ea(Jt),ca=Hr.x-Ee(Hr,Vr)/2,Aa=Vr.x+Ee(Vr,Hr)/2;return El(Jt,tt?function(Yr){Yr.x=(Yr.x-Jt.x)*qe[0],Yr.y=(Jt.y-Yr.y)*qe[1]}:function(Yr){Yr.x=(Yr.x-ca)/(Aa-ca)*qe[0],Yr.y=(1-(Jt.y?Yr.y/Jt.y:1))*qe[1]}),St}return at.separation=function(ct){return arguments.length?(Ee=ct,at):Ee},at.size=function(ct){return arguments.length?(tt=(qe=ct)==null,at):tt?null:qe},at.nodeSize=function(ct){return arguments.length?(tt=(qe=ct)!=null,at):tt?qe:null},fu(at,de)};function tr(de){return 1+p.max(de,function(Ee){return Ee.y})}function Fr(de){return de.reduce(function(Ee,qe){return Ee+qe.x},0)/de.length}function wr(de){var Ee=de.children;return Ee&&Ee.length?wr(Ee[0]):de}function ea(de){var Ee=de.children,qe;return Ee&&(qe=Ee.length)?ea(Ee[qe-1]):de}p.layout.treemap=function(){var de=p.layout.hierarchy(),Ee=Math.round,qe=[1,1],tt=null,at=ba,ct=!1,Nt,St="squarify",Jt=.5*(1+Math.sqrt(5));function mr(Yr,oa){for(var fa=-1,Ea=Yr.length,Ma,sa;++fa0;)Ea.push(sa=Ma[$n-1]),Ea.area+=sa.area,St!=="squarify"||(Tn=Vr(Ea,zn))<=hn?(Ma.pop(),hn=Tn):(Ea.area-=Ea.pop().area,ca(Ea,zn,fa,!1),zn=Math.min(fa.dx,fa.dy),Ea.length=Ea.area=0,hn=1/0);Ea.length&&(ca(Ea,zn,fa,!0),Ea.length=Ea.area=0),oa.forEach(gr)}}function Hr(Yr){var oa=Yr.children;if(oa&&oa.length){var fa=at(Yr),Ea=oa.slice(),Ma,sa=[];for(mr(Ea,fa.dx*fa.dy/Yr.value),sa.area=0;Ma=Ea.pop();)sa.push(Ma),sa.area+=Ma.area,Ma.z!=null&&(ca(sa,Ma.z?fa.dx:fa.dy,fa,!Ea.length),sa.length=sa.area=0);oa.forEach(Hr)}}function Vr(Yr,oa){for(var fa=Yr.area,Ea,Ma=0,sa=1/0,hn=-1,Tn=Yr.length;++hnMa&&(Ma=Ea));return fa*=fa,oa*=oa,fa?Math.max(oa*Ma*Jt/fa,fa/(oa*sa*Jt)):1/0}function ca(Yr,oa,fa,Ea){var Ma=-1,sa=Yr.length,hn=fa.x,Tn=fa.y,zn=oa?Ee(Yr.area/oa):0,$n;if(oa==fa.dx){for((Ea||zn>fa.dy)&&(zn=fa.dy);++Mafa.dx)&&(zn=fa.dx);++Ma1);return de+Ee*tt*Math.sqrt(-2*Math.log(ct)/ct)}},logNormal:function(){var de=p.random.normal.apply(p,arguments);return function(){return Math.exp(de())}},bates:function(de){var Ee=p.random.irwinHall(de);return function(){return Ee()/de}},irwinHall:function(de){return function(){for(var Ee=0,qe=0;qe2?vn:mn,mr=tt?Tu:vf;return at=Jt(de,Ee,mr,qe),ct=Jt(Ee,de,mr,Fu),St}function St(Jt){return at(Jt)}return St.invert=function(Jt){return ct(Jt)},St.domain=function(Jt){return arguments.length?(de=Jt.map(Number),Nt()):de},St.range=function(Jt){return arguments.length?(Ee=Jt,Nt()):Ee},St.rangeRound=function(Jt){return St.range(Jt).interpolate(Qu)},St.clamp=function(Jt){return arguments.length?(tt=Jt,Nt()):tt},St.interpolate=function(Jt){return arguments.length?(qe=Jt,Nt()):qe},St.ticks=function(Jt){return ri(de,Jt)},St.tickFormat=function(Jt,mr){return d3_scale_linearTickFormat(de,Jt,mr)},St.nice=function(Jt){return _i(de,Jt),Nt()},St.copy=function(){return Sn(de,Ee,qe,tt)},Nt()}function yi(de,Ee){return p.rebind(de,Ee,"range","rangeRound","interpolate","clamp")}function _i(de,Ee){return Da(de,Ha(ki(de,Ee)[2])),Da(de,Ha(ki(de,Ee)[2])),de}function ki(de,Ee){Ee==null&&(Ee=10);var qe=Na(de),tt=qe[1]-qe[0],at=Math.pow(10,Math.floor(Math.log(tt/Ee)/Math.LN10)),ct=Ee/tt*at;return ct<=.15?at*=10:ct<=.35?at*=5:ct<=.75&&(at*=2),qe[0]=Math.ceil(qe[0]/at)*at,qe[1]=Math.floor(qe[1]/at)*at+at*.5,qe[2]=at,qe}function ri(de,Ee){return p.range.apply(p,ki(de,Ee))}var En={s:1,g:1,p:1,r:1,e:1};function Ln(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function Ni(de,Ee){var qe=Ln(Ee[2]);return de in En?Math.abs(qe-Ln(Math.max(i(Ee[0]),i(Ee[1]))))+ +(de!=="e"):qe-(de==="%")*2}p.scale.log=function(){return Zi(p.scale.linear().domain([0,1]),10,!0,[1,10])};function Zi(de,Ee,qe,tt){function at(St){return(qe?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Ee)}function ct(St){return qe?Math.pow(Ee,St):-Math.pow(Ee,-St)}function Nt(St){return de(at(St))}return Nt.invert=function(St){return ct(de.invert(St))},Nt.domain=function(St){return arguments.length?(qe=St[0]>=0,de.domain((tt=St.map(Number)).map(at)),Nt):tt},Nt.base=function(St){return arguments.length?(Ee=+St,de.domain(tt.map(at)),Nt):Ee},Nt.nice=function(){var St=Da(tt.map(at),qe?Math:Co);return de.domain(St),tt=St.map(ct),Nt},Nt.ticks=function(){var St=Na(tt),Jt=[],mr=St[0],gr=St[1],Hr=Math.floor(at(mr)),Vr=Math.ceil(at(gr)),ca=Ee%1?2:Ee;if(isFinite(Vr-Hr)){if(qe){for(;Hr0;Aa--)Jt.push(ct(Hr)*Aa);for(Hr=0;Jt[Hr]gr;Vr--);Jt=Jt.slice(Hr,Vr)}return Jt},Nt.copy=function(){return Zi(de.copy(),Ee,qe,tt)},yi(Nt,de)}var Co={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};p.scale.pow=function(){return Do(p.scale.linear(),1,[0,1])};function Do(de,Ee,qe){var tt=Fo(Ee),at=Fo(1/Ee);function ct(Nt){return de(tt(Nt))}return ct.invert=function(Nt){return at(de.invert(Nt))},ct.domain=function(Nt){return arguments.length?(de.domain((qe=Nt.map(Number)).map(tt)),ct):qe},ct.ticks=function(Nt){return ri(qe,Nt)},ct.tickFormat=function(Nt,St){return d3_scale_linearTickFormat(qe,Nt,St)},ct.nice=function(Nt){return ct.domain(_i(qe,Nt))},ct.exponent=function(Nt){return arguments.length?(tt=Fo(Ee=Nt),at=Fo(1/Ee),de.domain(qe.map(tt)),ct):Ee},ct.copy=function(){return Do(de.copy(),Ee,qe)},yi(ct,de)}function Fo(de){return function(Ee){return Ee<0?-Math.pow(-Ee,de):Math.pow(Ee,de)}}p.scale.sqrt=function(){return p.scale.pow().exponent(.5)},p.scale.ordinal=function(){return Yo([],{t:"range",a:[[]]})};function Yo(de,Ee){var qe,tt,at;function ct(St){return tt[((qe.get(St)||(Ee.t==="range"?qe.set(St,de.push(St)):NaN))-1)%tt.length]}function Nt(St,Jt){return p.range(de.length).map(function(mr){return St+Jt*mr})}return ct.domain=function(St){if(!arguments.length)return de;de=[],qe=new M;for(var Jt=-1,mr=St.length,gr;++Jt0?qe[ct-1]:de[0],ctVr?0:1;if(gr=Ke)return Jt(gr,Aa)+(mr?Jt(mr,1-Aa):"")+"Z";var Yr,oa,fa,Ea,Ma=0,sa=0,hn,Tn,zn,$n,xi,di,uo,pe,y=[];if((Ea=(+Nt.apply(this,arguments)||0)/2)&&(fa=tt===zl?Math.sqrt(mr*mr+gr*gr):+tt.apply(this,arguments),Aa||(sa*=-1),gr&&(sa=qt(fa/gr*Math.sin(Ea))),mr&&(Ma=qt(fa/mr*Math.sin(Ea)))),gr){hn=gr*Math.cos(Hr+sa),Tn=gr*Math.sin(Hr+sa),zn=gr*Math.cos(Vr-sa),$n=gr*Math.sin(Vr-sa);var N=Math.abs(Vr-Hr-2*sa)<=Ne?0:1;if(sa&&mc(hn,Tn,zn,$n)===Aa^N){var ie=(Hr+Vr)/2;hn=gr*Math.cos(ie),Tn=gr*Math.sin(ie),zn=$n=null}}else hn=Tn=0;if(mr){xi=mr*Math.cos(Vr-Ma),di=mr*Math.sin(Vr-Ma),uo=mr*Math.cos(Hr+Ma),pe=mr*Math.sin(Hr+Ma);var fe=Math.abs(Hr-Vr+2*Ma)<=Ne?0:1;if(Ma&&mc(xi,di,uo,pe)===1-Aa^fe){var be=(Hr+Vr)/2;xi=mr*Math.cos(be),di=mr*Math.sin(be),uo=pe=null}}else xi=di=0;if(ca>ht&&(Yr=Math.min(Math.abs(gr-mr)/2,+qe.apply(this,arguments)))>.001){oa=mr0?0:1}function Jc(de,Ee,qe,tt,at){var ct=de[0]-Ee[0],Nt=de[1]-Ee[1],St=(at?tt:-tt)/Math.sqrt(ct*ct+Nt*Nt),Jt=St*Nt,mr=-St*ct,gr=de[0]+Jt,Hr=de[1]+mr,Vr=Ee[0]+Jt,ca=Ee[1]+mr,Aa=(gr+Vr)/2,Yr=(Hr+ca)/2,oa=Vr-gr,fa=ca-Hr,Ea=oa*oa+fa*fa,Ma=qe-tt,sa=gr*ca-Vr*Hr,hn=(fa<0?-1:1)*Math.sqrt(Math.max(0,Ma*Ma*Ea-sa*sa)),Tn=(sa*fa-oa*hn)/Ea,zn=(-sa*oa-fa*hn)/Ea,$n=(sa*fa+oa*hn)/Ea,xi=(-sa*oa+fa*hn)/Ea,di=Tn-Aa,uo=zn-Yr,pe=$n-Aa,y=xi-Yr;return di*di+uo*uo>pe*pe+y*y&&(Tn=$n,zn=xi),[[Tn-Jt,zn-mr],[Tn*qe/Ma,zn*qe/Ma]]}function oc(){return!0}function du(de){var Ee=no,qe=Di,tt=oc,at=Ql,ct=at.key,Nt=.7;function St(Jt){var mr=[],gr=[],Hr=-1,Vr=Jt.length,ca,Aa=ar(Ee),Yr=ar(qe);function oa(){mr.push("M",at(de(gr),Nt))}for(;++Hr1?de.join("L"):de+"Z"}function Eu(de){return de.join("L")+"Z"}function bf(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1&&at.push("H",tt[0]),at.join("")}function lh(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1){St=Ee[1],ct=de[Jt],Jt++,tt+="C"+(at[0]+Nt[0])+","+(at[1]+Nt[1])+","+(ct[0]-St[0])+","+(ct[1]-St[1])+","+ct[0]+","+ct[1];for(var mr=2;mr9&&(ct=qe*3/Math.sqrt(ct),Nt[St]=ct*tt,Nt[St+1]=ct*at));for(St=-1;++St<=Jt;)ct=(de[Math.min(Jt,St+1)][0]-de[Math.max(0,St-1)][0])/(6*(1+Nt[St]*Nt[St])),Ee.push([ct||0,Nt[St]*ct||0]);return Ee}function Pr(de){return de.length<3?Ql(de):de[0]+wf(de,Wt(de))}p.svg.line.radial=function(){var de=du(Br);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function Br(de){for(var Ee,qe=-1,tt=de.length,at,ct;++qeNe)+",1 "+Hr}function mr(gr,Hr,Vr,ca){return"Q 0,0 "+ca}return ct.radius=function(gr){return arguments.length?(qe=ar(gr),ct):qe},ct.source=function(gr){return arguments.length?(de=ar(gr),ct):de},ct.target=function(gr){return arguments.length?(Ee=ar(gr),ct):Ee},ct.startAngle=function(gr){return arguments.length?(tt=ar(gr),ct):tt},ct.endAngle=function(gr){return arguments.length?(at=ar(gr),ct):at},ct};function la(de){return de.radius}p.svg.diagonal=function(){var de=jr,Ee=Jr,qe=xa;function tt(at,ct){var Nt=de.call(this,at,ct),St=Ee.call(this,at,ct),Jt=(Nt.y+St.y)/2,mr=[Nt,{x:Nt.x,y:Jt},{x:St.x,y:Jt},St];return mr=mr.map(qe),"M"+mr[0]+"C"+mr[1]+" "+mr[2]+" "+mr[3]}return tt.source=function(at){return arguments.length?(de=ar(at),tt):de},tt.target=function(at){return arguments.length?(Ee=ar(at),tt):Ee},tt.projection=function(at){return arguments.length?(qe=at,tt):qe},tt};function xa(de){return[de.x,de.y]}p.svg.diagonal.radial=function(){var de=p.svg.diagonal(),Ee=xa,qe=de.projection;return de.projection=function(tt){return arguments.length?qe(Ba(Ee=tt)):Ee},de};function Ba(de){return function(){var Ee=de.apply(this,arguments),qe=Ee[0],tt=Ee[1]-Je;return[qe*Math.cos(tt),qe*Math.sin(tt)]}}p.svg.symbol=function(){var de=wn,Ee=an;function qe(tt,at){return(Si.get(de.call(this,tt,at))||ii)(Ee.call(this,tt,at))}return qe.type=function(tt){return arguments.length?(de=ar(tt),qe):de},qe.size=function(tt){return arguments.length?(Ee=ar(tt),qe):Ee},qe};function an(){return 64}function wn(){return"circle"}function ii(de){var Ee=Math.sqrt(de/Ne);return"M0,"+Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+-Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+Ee+"Z"}var Si=p.map({circle:ii,cross:function(de){var Ee=Math.sqrt(de/5)/2;return"M"+-3*Ee+","+-Ee+"H"+-Ee+"V"+-3*Ee+"H"+Ee+"V"+-Ee+"H"+3*Ee+"V"+Ee+"H"+Ee+"V"+3*Ee+"H"+-Ee+"V"+Ee+"H"+-3*Ee+"Z"},diamond:function(de){var Ee=Math.sqrt(de/(2*Ji)),qe=Ee*Ji;return"M0,"+-Ee+"L"+qe+",0 0,"+Ee+" "+-qe+",0Z"},square:function(de){var Ee=Math.sqrt(de)/2;return"M"+-Ee+","+-Ee+"L"+Ee+","+-Ee+" "+Ee+","+Ee+" "+-Ee+","+Ee+"Z"},"triangle-down":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+qe+"L"+Ee+","+-qe+" "+-Ee+","+-qe+"Z"},"triangle-up":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+-qe+"L"+Ee+","+qe+" "+-Ee+","+qe+"Z"}});p.svg.symbolTypes=Si.keys();var oi=Math.sqrt(3),Ji=Math.tan(30*et);q.transition=function(de){for(var Ee=ol||++ys,qe=hi(de),tt=[],at,ct,Nt=jl||{time:Date.now(),ease:pc,delay:0,duration:250},St=-1,Jt=this.length;++St0;)Hr[--Ea].call(de,fa);if(oa>=1)return Nt.event&&Nt.event.end.call(de,de.__data__,Ee),--ct.count?delete ct[tt]:delete de[qe],1}Nt||(St=at.time,Jt=ai(Vr,0,St),Nt=ct[tt]={tween:new M,time:St,timer:Jt,delay:at.delay,duration:at.duration,ease:at.ease,index:Ee},at=null,++ct.count)}p.svg.axis=function(){var de=p.scale.linear(),Ee=sl,qe=6,tt=6,at=3,ct=[10],Nt=null,St;function Jt(mr){mr.each(function(){var gr=p.select(this),Hr=this.__chart__||de,Vr=this.__chart__=de.copy(),ca=Nt??(Vr.ticks?Vr.ticks.apply(Vr,ct):Vr.domain()),Aa=St??(Vr.tickFormat?Vr.tickFormat.apply(Vr,ct):D),Yr=gr.selectAll(".tick").data(ca,Vr),oa=Yr.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),fa=p.transition(Yr.exit()).style("opacity",ht).remove(),Ea=p.transition(Yr.order()).style("opacity",1),Ma=Math.max(qe,0)+at,sa,hn=Za(Vr),Tn=gr.selectAll(".domain").data([0]),zn=(Tn.enter().append("path").attr("class","domain"),p.transition(Tn));oa.append("line"),oa.append("text");var $n=oa.select("line"),xi=Ea.select("line"),di=Yr.select("text").text(Aa),uo=oa.select("text"),pe=Ea.select("text"),y=Ee==="top"||Ee==="left"?-1:1,N,ie,fe,be;if(Ee==="bottom"||Ee==="top"?(sa=tu,N="x",fe="y",ie="x2",be="y2",di.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),zn.attr("d","M"+hn[0]+","+y*tt+"V0H"+hn[1]+"V"+y*tt)):(sa=Ps,N="y",fe="x",ie="y2",be="x2",di.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),zn.attr("d","M"+y*tt+","+hn[0]+"H0V"+hn[1]+"H"+y*tt)),$n.attr(be,y*qe),uo.attr(fe,y*Ma),xi.attr(ie,0).attr(be,y*qe),pe.attr(N,0).attr(fe,y*Ma),Vr.rangeBand){var Re=Vr,je=Re.rangeBand()/2;Hr=Vr=function(Ze){return Re(Ze)+je}}else Hr.rangeBand?Hr=Vr:fa.call(sa,Vr,Hr);oa.call(sa,Hr,Vr),Ea.call(sa,Vr,Vr)})}return Jt.scale=function(mr){return arguments.length?(de=mr,Jt):de},Jt.orient=function(mr){return arguments.length?(Ee=mr in sc?mr+"":sl,Jt):Ee},Jt.ticks=function(){return arguments.length?(ct=E(arguments),Jt):ct},Jt.tickValues=function(mr){return arguments.length?(Nt=mr,Jt):Nt},Jt.tickFormat=function(mr){return arguments.length?(St=mr,Jt):St},Jt.tickSize=function(mr){var gr=arguments.length;return gr?(qe=+mr,tt=+arguments[gr-1],Jt):qe},Jt.innerTickSize=function(mr){return arguments.length?(qe=+mr,Jt):qe},Jt.outerTickSize=function(mr){return arguments.length?(tt=+mr,Jt):tt},Jt.tickPadding=function(mr){return arguments.length?(at=+mr,Jt):at},Jt.tickSubdivide=function(){return arguments.length&&Jt},Jt};var sl="bottom",sc={top:1,right:1,bottom:1,left:1};function tu(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate("+(isFinite(at)?at:qe(tt))+",0)"})}function Ps(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate(0,"+(isFinite(at)?at:qe(tt))+")"})}p.svg.brush=function(){var de=ne(gr,"brushstart","brush","brushend"),Ee=null,qe=null,tt=[0,0],at=[0,0],ct,Nt,St=!0,Jt=!0,mr=pu[0];function gr(Yr){Yr.each(function(){var oa=p.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Aa).on("touchstart.brush",Aa),fa=oa.selectAll(".background").data([0]);fa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ea=oa.selectAll(".resize").data(mr,D);Ea.exit().remove(),Ea.enter().append("g").attr("class",function(Tn){return"resize "+Tn}).style("cursor",function(Tn){return gc[Tn]}).append("rect").attr("x",function(Tn){return/[ew]$/.test(Tn)?-3:null}).attr("y",function(Tn){return/^[ns]/.test(Tn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ea.style("display",gr.empty()?"none":null);var Ma=p.transition(oa),sa=p.transition(fa),hn;Ee&&(hn=Za(Ee),sa.attr("x",hn[0]).attr("width",hn[1]-hn[0]),Vr(Ma)),qe&&(hn=Za(qe),sa.attr("y",hn[0]).attr("height",hn[1]-hn[0]),ca(Ma)),Hr(Ma)})}gr.event=function(Yr){Yr.each(function(){var oa=de.of(this,arguments),fa={x:tt,y:at,i:ct,j:Nt},Ea=this.__chart__||fa;this.__chart__=fa,ol?p.select(this).transition().each("start.brush",function(){ct=Ea.i,Nt=Ea.j,tt=Ea.x,at=Ea.y,oa({type:"brushstart"})}).tween("brush:brush",function(){var Ma=zu(tt,fa.x),sa=zu(at,fa.y);return ct=Nt=null,function(hn){tt=fa.x=Ma(hn),at=fa.y=sa(hn),oa({type:"brush",mode:"resize"})}}).each("end.brush",function(){ct=fa.i,Nt=fa.j,oa({type:"brush",mode:"resize"}),oa({type:"brushend"})}):(oa({type:"brushstart"}),oa({type:"brush",mode:"resize"}),oa({type:"brushend"}))})};function Hr(Yr){Yr.selectAll(".resize").attr("transform",function(oa){return"translate("+tt[+/e$/.test(oa)]+","+at[+/^s/.test(oa)]+")"})}function Vr(Yr){Yr.select(".extent").attr("x",tt[0]),Yr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function ca(Yr){Yr.select(".extent").attr("y",at[0]),Yr.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function Aa(){var Yr=this,oa=p.select(p.event.target),fa=de.of(Yr,arguments),Ea=p.select(Yr),Ma=oa.datum(),sa=!/^(n|s)$/.test(Ma)&&Ee,hn=!/^(e|w)$/.test(Ma)&&qe,Tn=oa.classed("extent"),zn=Xt(Yr),$n,xi=p.mouse(Yr),di,uo=p.select(e(Yr)).on("keydown.brush",N).on("keyup.brush",ie);if(p.event.changedTouches?uo.on("touchmove.brush",fe).on("touchend.brush",Re):uo.on("mousemove.brush",fe).on("mouseup.brush",Re),Ea.interrupt().selectAll("*").interrupt(),Tn)xi[0]=tt[0]-xi[0],xi[1]=at[0]-xi[1];else if(Ma){var pe=+/w$/.test(Ma),y=+/^n/.test(Ma);di=[tt[1-pe]-xi[0],at[1-y]-xi[1]],xi[0]=tt[pe],xi[1]=at[y]}else p.event.altKey&&($n=xi.slice());Ea.style("pointer-events","none").selectAll(".resize").style("display",null),p.select("body").style("cursor",oa.style("cursor")),fa({type:"brushstart"}),fe();function N(){p.event.keyCode==32&&(Tn||($n=null,xi[0]-=tt[1],xi[1]-=at[1],Tn=2),Q())}function ie(){p.event.keyCode==32&&Tn==2&&(xi[0]+=tt[1],xi[1]+=at[1],Tn=0,Q())}function fe(){var je=p.mouse(Yr),Ze=!1;di&&(je[0]+=di[0],je[1]+=di[1]),Tn||(p.event.altKey?($n||($n=[(tt[0]+tt[1])/2,(at[0]+at[1])/2]),xi[0]=tt[+(je[0]<$n[0])],xi[1]=at[+(je[1]<$n[1])]):$n=null),sa&&be(je,Ee,0)&&(Vr(Ea),Ze=!0),hn&&be(je,qe,1)&&(ca(Ea),Ze=!0),Ze&&(Hr(Ea),fa({type:"brush",mode:Tn?"move":"resize"}))}function be(je,Ze,ut){var ft=Za(Ze),Dt=ft[0],Gt=ft[1],Kt=xi[ut],st=ut?at:tt,It=st[1]-st[0],Ut,ir;if(Tn&&(Dt-=Kt,Gt-=It+Kt),Ut=(ut?Jt:St)?Math.max(Dt,Math.min(Gt,je[ut])):je[ut],Tn?ir=(Ut+=Kt)+It:($n&&(Kt=Math.max(Dt,Math.min(Gt,2*$n[ut]-Ut))),Kt0))return At;do At.push($t=new Date(+yt)),Ae(yt,Tt),le(yt);while($t=gt)for(;le(gt),!yt(gt);)gt.setTime(gt-1)},function(gt,Tt){if(gt>=gt)if(Tt<0)for(;++Tt<=0;)for(;Ae(gt,-1),!yt(gt););else for(;--Tt>=0;)for(;Ae(gt,1),!yt(gt););})},Be&&(Ye.count=function(yt,gt){return b.setTime(+yt),E.setTime(+gt),le(b),le(E),Math.floor(Be(b,E))},Ye.every=function(yt){return yt=Math.floor(yt),!isFinite(yt)||!(yt>0)?null:yt>1?Ye.filter(Xe?function(gt){return Xe(gt)%yt===0}:function(gt){return Ye.count(0,gt)%yt===0}):Ye}),Ye}var l=k(function(){},function(le,Ae){le.setTime(+le+Ae)},function(le,Ae){return Ae-le});l.every=function(le){return le=Math.floor(le),!isFinite(le)||!(le>0)?null:le>1?k(function(Ae){Ae.setTime(Math.floor(Ae/le)*le)},function(Ae,Be){Ae.setTime(+Ae+Be*le)},function(Ae,Be){return(Be-Ae)/le}):l};var e=l.range,t=1e3,n=6e4,r=36e5,a=864e5,o=6048e5,s=k(function(le){le.setTime(le-le.getMilliseconds())},function(le,Ae){le.setTime(+le+Ae*t)},function(le,Ae){return(Ae-le)/t},function(le){return le.getUTCSeconds()}),c=s.range,m=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getMinutes()}),h=m.range,v=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t-le.getMinutes()*n)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getHours()}),g=v.range,i=k(function(le){le.setHours(0,0,0,0)},function(le,Ae){le.setDate(le.getDate()+Ae)},function(le,Ae){return(Ae-le-(Ae.getTimezoneOffset()-le.getTimezoneOffset())*n)/a},function(le){return le.getDate()-1}),w=i.range;function S(le){return k(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-le)%7),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setDate(Ae.getDate()+Be*7)},function(Ae,Be){return(Be-Ae-(Be.getTimezoneOffset()-Ae.getTimezoneOffset())*n)/o})}var M=S(0),C=S(1),_=S(2),T=S(3),f=S(4),u=S(5),A=S(6),x=M.range,z=C.range,I=_.range,O=T.range,D=f.range,B=u.range,F=A.range,P=k(function(le){le.setDate(1),le.setHours(0,0,0,0)},function(le,Ae){le.setMonth(le.getMonth()+Ae)},function(le,Ae){return Ae.getMonth()-le.getMonth()+(Ae.getFullYear()-le.getFullYear())*12},function(le){return le.getMonth()}),j=P.range,U=k(function(le){le.setMonth(0,1),le.setHours(0,0,0,0)},function(le,Ae){le.setFullYear(le.getFullYear()+Ae)},function(le,Ae){return Ae.getFullYear()-le.getFullYear()},function(le){return le.getFullYear()});U.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/le)*le),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setFullYear(Ae.getFullYear()+Be*le)})};var $=U.range,Q=k(function(le){le.setUTCSeconds(0,0)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getUTCMinutes()}),re=Q.range,ne=k(function(le){le.setUTCMinutes(0,0,0)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getUTCHours()}),se=ne.range,G=k(function(le){le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCDate(le.getUTCDate()+Ae)},function(le,Ae){return(Ae-le)/a},function(le){return le.getUTCDate()-1}),X=G.range;function K(le){return k(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-le)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCDate(Ae.getUTCDate()+Be*7)},function(Ae,Be){return(Be-Ae)/o})}var H=K(0),Y=K(1),q=K(2),Z=K(3),ee=K(4),ae=K(5),he=K(6),xe=H.range,we=Y.range,Me=q.range,Se=Z.range,Ie=ee.range,Ve=ae.range,Ge=he.range,ke=k(function(le){le.setUTCDate(1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCMonth(le.getUTCMonth()+Ae)},function(le,Ae){return Ae.getUTCMonth()-le.getUTCMonth()+(Ae.getUTCFullYear()-le.getUTCFullYear())*12},function(le){return le.getUTCMonth()}),_e=ke.range,ce=k(function(le){le.setUTCMonth(0,1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCFullYear(le.getUTCFullYear()+Ae)},function(le,Ae){return Ae.getUTCFullYear()-le.getUTCFullYear()},function(le){return le.getUTCFullYear()});ce.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/le)*le),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCFullYear(Ae.getUTCFullYear()+Be*le)})};var ve=ce.range;p.timeDay=i,p.timeDays=w,p.timeFriday=u,p.timeFridays=B,p.timeHour=v,p.timeHours=g,p.timeInterval=k,p.timeMillisecond=l,p.timeMilliseconds=e,p.timeMinute=m,p.timeMinutes=h,p.timeMonday=C,p.timeMondays=z,p.timeMonth=P,p.timeMonths=j,p.timeSaturday=A,p.timeSaturdays=F,p.timeSecond=s,p.timeSeconds=c,p.timeSunday=M,p.timeSundays=x,p.timeThursday=f,p.timeThursdays=D,p.timeTuesday=_,p.timeTuesdays=I,p.timeWednesday=T,p.timeWednesdays=O,p.timeWeek=M,p.timeWeeks=x,p.timeYear=U,p.timeYears=$,p.utcDay=G,p.utcDays=X,p.utcFriday=ae,p.utcFridays=Ve,p.utcHour=ne,p.utcHours=se,p.utcMillisecond=l,p.utcMilliseconds=e,p.utcMinute=Q,p.utcMinutes=re,p.utcMonday=Y,p.utcMondays=we,p.utcMonth=ke,p.utcMonths=_e,p.utcSaturday=he,p.utcSaturdays=Ge,p.utcSecond=s,p.utcSeconds=c,p.utcSunday=H,p.utcSundays=xe,p.utcThursday=ee,p.utcThursdays=Ie,p.utcTuesday=q,p.utcTuesdays=Me,p.utcWednesday=Z,p.utcWednesdays=Se,p.utcWeek=H,p.utcWeeks=xe,p.utcYear=ce,p.utcYears=ve,Object.defineProperty(p,"__esModule",{value:!0})})}}),jm=ze({"node_modules/d3-time-format/dist/d3-time-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kw()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(Je){if(0<=Je.y&&Je.y<100){var et=new Date(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L);return et.setFullYear(Je.y),et}return new Date(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L)}function k(Je){if(0<=Je.y&&Je.y<100){var et=new Date(Date.UTC(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L));return et.setUTCFullYear(Je.y),et}return new Date(Date.UTC(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L))}function l(Je,et,Mt){return{y:Je,m:et,d:Mt,H:0,M:0,S:0,L:0}}function e(Je){var et=Je.dateTime,Mt=Je.date,pt=Je.time,Pt=Je.periods,Ct=Je.days,qt=Je.shortDays,Vt=Je.months,Ht=Je.shortMonths,Sr=c(Pt),Kr=m(Pt),Yt=c(Ct),Rt=m(Ct),nr=c(qt),ur=m(qt),cr=c(Vt),Rr=m(Vt),Qr=c(Ht),Zr=m(Ht),ha={a:Yi,A:Ja,b:Oa,B:lt,c:null,d:P,e:P,f:re,g:ae,G:xe,H:j,I:U,j:$,L:Q,m:ne,M:se,p:rt,q:fr,Q:Xt,s:or,S:G,u:X,U:K,V:Y,w:q,W:Z,x:null,X:null,y:ee,Y:he,Z:we,"%":_r},Pa={a:lr,A:Tr,b:Ir,B:Dr,c:null,d:Me,e:Me,f:ke,g:Tt,G:$t,H:Se,I:Ie,j:Ve,L:Ge,m:_e,M:ce,p:ot,q:kt,Q:Xt,s:or,S:ve,u:le,U:Ae,V:Xe,w:Ye,W:yt,x:null,X:null,y:gt,Y:At,Z:rr,"%":_r},La={a:yn,A:Un,b:li,B:Yn,c:on,d:f,e:f,f:O,g:M,G:S,H:A,I:A,j:u,L:I,m:T,M:x,p:Nn,q:_,Q:B,s:F,S:z,u:v,U:g,V:i,w:h,W:w,x:en,X:vi,y:M,Y:S,Z:C,"%":D};ha.x=un(Mt,ha),ha.X=un(pt,ha),ha.c=un(et,ha),Pa.x=un(Mt,Pa),Pa.X=un(pt,Pa),Pa.c=un(et,Pa);function un(jt,ar){return function(Er){var xr=[],zr=-1,Lr=0,aa=jt.length,Sa,wa,pn;for(Er instanceof Date||(Er=new Date(+Er));++zr53)return null;"w"in xr||(xr.w=1),"Z"in xr?(Lr=k(l(xr.y,0,1)),aa=Lr.getUTCDay(),Lr=aa>4||aa===0?b.utcMonday.ceil(Lr):b.utcMonday(Lr),Lr=b.utcDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getUTCFullYear(),xr.m=Lr.getUTCMonth(),xr.d=Lr.getUTCDate()+(xr.w+6)%7):(Lr=E(l(xr.y,0,1)),aa=Lr.getDay(),Lr=aa>4||aa===0?b.timeMonday.ceil(Lr):b.timeMonday(Lr),Lr=b.timeDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getFullYear(),xr.m=Lr.getMonth(),xr.d=Lr.getDate()+(xr.w+6)%7)}else("W"in xr||"U"in xr)&&("w"in xr||(xr.w="u"in xr?xr.u%7:"W"in xr?1:0),aa="Z"in xr?k(l(xr.y,0,1)).getUTCDay():E(l(xr.y,0,1)).getDay(),xr.m=0,xr.d="W"in xr?(xr.w+6)%7+xr.W*7-(aa+5)%7:xr.w+xr.U*7-(aa+6)%7);return"Z"in xr?(xr.H+=xr.Z/100|0,xr.M+=xr.Z%100,k(xr)):E(xr)}}function ja(jt,ar,Er,xr){for(var zr=0,Lr=ar.length,aa=Er.length,Sa,wa;zr=aa)return-1;if(Sa=ar.charCodeAt(zr++),Sa===37){if(Sa=ar.charAt(zr++),wa=La[Sa in t?ar.charAt(zr++):Sa],!wa||(xr=wa(jt,Er,xr))<0)return-1}else if(Sa!=Er.charCodeAt(xr++))return-1}return xr}function Nn(jt,ar,Er){var xr=Sr.exec(ar.slice(Er));return xr?(jt.p=Kr[xr[0].toLowerCase()],Er+xr[0].length):-1}function yn(jt,ar,Er){var xr=nr.exec(ar.slice(Er));return xr?(jt.w=ur[xr[0].toLowerCase()],Er+xr[0].length):-1}function Un(jt,ar,Er){var xr=Yt.exec(ar.slice(Er));return xr?(jt.w=Rt[xr[0].toLowerCase()],Er+xr[0].length):-1}function li(jt,ar,Er){var xr=Qr.exec(ar.slice(Er));return xr?(jt.m=Zr[xr[0].toLowerCase()],Er+xr[0].length):-1}function Yn(jt,ar,Er){var xr=cr.exec(ar.slice(Er));return xr?(jt.m=Rr[xr[0].toLowerCase()],Er+xr[0].length):-1}function on(jt,ar,Er){return ja(jt,et,ar,Er)}function en(jt,ar,Er){return ja(jt,Mt,ar,Er)}function vi(jt,ar,Er){return ja(jt,pt,ar,Er)}function Yi(jt){return qt[jt.getDay()]}function Ja(jt){return Ct[jt.getDay()]}function Oa(jt){return Ht[jt.getMonth()]}function lt(jt){return Vt[jt.getMonth()]}function rt(jt){return Pt[+(jt.getHours()>=12)]}function fr(jt){return 1+~~(jt.getMonth()/3)}function lr(jt){return qt[jt.getUTCDay()]}function Tr(jt){return Ct[jt.getUTCDay()]}function Ir(jt){return Ht[jt.getUTCMonth()]}function Dr(jt){return Vt[jt.getUTCMonth()]}function ot(jt){return Pt[+(jt.getUTCHours()>=12)]}function kt(jt){return 1+~~(jt.getUTCMonth()/3)}return{format:function(jt){var ar=un(jt+="",ha);return ar.toString=function(){return jt},ar},parse:function(jt){var ar=Xa(jt+="",!1);return ar.toString=function(){return jt},ar},utcFormat:function(jt){var ar=un(jt+="",Pa);return ar.toString=function(){return jt},ar},utcParse:function(jt){var ar=Xa(jt+="",!0);return ar.toString=function(){return jt},ar}}}var t={"-":"",_:" ",0:"0"},n=/^\s*\d+/,r=/^%/,a=/[\\^$*+?|[\]().{}]/g;function o(Je,et,Mt){var pt=Je<0?"-":"",Pt=(pt?-Je:Je)+"",Ct=Pt.length;return pt+(Ct68?1900:2e3),Mt+pt[0].length):-1}function C(Je,et,Mt){var pt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Mt,Mt+6));return pt?(Je.Z=pt[1]?0:-(pt[2]+(pt[3]||"00")),Mt+pt[0].length):-1}function _(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+1));return pt?(Je.q=pt[0]*3-3,Mt+pt[0].length):-1}function T(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.m=pt[0]-1,Mt+pt[0].length):-1}function f(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.d=+pt[0],Mt+pt[0].length):-1}function u(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.m=0,Je.d=+pt[0],Mt+pt[0].length):-1}function A(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.H=+pt[0],Mt+pt[0].length):-1}function x(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.M=+pt[0],Mt+pt[0].length):-1}function z(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.S=+pt[0],Mt+pt[0].length):-1}function I(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.L=+pt[0],Mt+pt[0].length):-1}function O(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+6));return pt?(Je.L=Math.floor(pt[0]/1e3),Mt+pt[0].length):-1}function D(Je,et,Mt){var pt=r.exec(et.slice(Mt,Mt+1));return pt?Mt+pt[0].length:-1}function B(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.Q=+pt[0],Mt+pt[0].length):-1}function F(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.s=+pt[0],Mt+pt[0].length):-1}function P(Je,et){return o(Je.getDate(),et,2)}function j(Je,et){return o(Je.getHours(),et,2)}function U(Je,et){return o(Je.getHours()%12||12,et,2)}function $(Je,et){return o(1+b.timeDay.count(b.timeYear(Je),Je),et,3)}function Q(Je,et){return o(Je.getMilliseconds(),et,3)}function re(Je,et){return Q(Je,et)+"000"}function ne(Je,et){return o(Je.getMonth()+1,et,2)}function se(Je,et){return o(Je.getMinutes(),et,2)}function G(Je,et){return o(Je.getSeconds(),et,2)}function X(Je){var et=Je.getDay();return et===0?7:et}function K(Je,et){return o(b.timeSunday.count(b.timeYear(Je)-1,Je),et,2)}function H(Je){var et=Je.getDay();return et>=4||et===0?b.timeThursday(Je):b.timeThursday.ceil(Je)}function Y(Je,et){return Je=H(Je),o(b.timeThursday.count(b.timeYear(Je),Je)+(b.timeYear(Je).getDay()===4),et,2)}function q(Je){return Je.getDay()}function Z(Je,et){return o(b.timeMonday.count(b.timeYear(Je)-1,Je),et,2)}function ee(Je,et){return o(Je.getFullYear()%100,et,2)}function ae(Je,et){return Je=H(Je),o(Je.getFullYear()%100,et,2)}function he(Je,et){return o(Je.getFullYear()%1e4,et,4)}function xe(Je,et){var Mt=Je.getDay();return Je=Mt>=4||Mt===0?b.timeThursday(Je):b.timeThursday.ceil(Je),o(Je.getFullYear()%1e4,et,4)}function we(Je){var et=Je.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+o(et/60|0,"0",2)+o(et%60,"0",2)}function Me(Je,et){return o(Je.getUTCDate(),et,2)}function Se(Je,et){return o(Je.getUTCHours(),et,2)}function Ie(Je,et){return o(Je.getUTCHours()%12||12,et,2)}function Ve(Je,et){return o(1+b.utcDay.count(b.utcYear(Je),Je),et,3)}function Ge(Je,et){return o(Je.getUTCMilliseconds(),et,3)}function ke(Je,et){return Ge(Je,et)+"000"}function _e(Je,et){return o(Je.getUTCMonth()+1,et,2)}function ce(Je,et){return o(Je.getUTCMinutes(),et,2)}function ve(Je,et){return o(Je.getUTCSeconds(),et,2)}function le(Je){var et=Je.getUTCDay();return et===0?7:et}function Ae(Je,et){return o(b.utcSunday.count(b.utcYear(Je)-1,Je),et,2)}function Be(Je){var et=Je.getUTCDay();return et>=4||et===0?b.utcThursday(Je):b.utcThursday.ceil(Je)}function Xe(Je,et){return Je=Be(Je),o(b.utcThursday.count(b.utcYear(Je),Je)+(b.utcYear(Je).getUTCDay()===4),et,2)}function Ye(Je){return Je.getUTCDay()}function yt(Je,et){return o(b.utcMonday.count(b.utcYear(Je)-1,Je),et,2)}function gt(Je,et){return o(Je.getUTCFullYear()%100,et,2)}function Tt(Je,et){return Je=Be(Je),o(Je.getUTCFullYear()%100,et,2)}function At(Je,et){return o(Je.getUTCFullYear()%1e4,et,4)}function $t(Je,et){var Mt=Je.getUTCDay();return Je=Mt>=4||Mt===0?b.utcThursday(Je):b.utcThursday.ceil(Je),o(Je.getUTCFullYear()%1e4,et,4)}function rr(){return"+0000"}function _r(){return"%"}function Xt(Je){return+Je}function or(Je){return Math.floor(+Je/1e3)}var Ot;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(Je){return Ot=e(Je),p.timeFormat=Ot.format,p.timeParse=Ot.parse,p.utcFormat=Ot.utcFormat,p.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function De(Je){return Je.toISOString()}var Ne=Date.prototype.toISOString?De:p.utcFormat(ht);function We(Je){var et=new Date(Je);return isNaN(et)?null:et}var Ke=+new Date("2000-01-01T00:00:00.000Z")?We:p.utcParse(ht);p.isoFormat=Ne,p.isoParse=Ke,p.timeFormatDefaultLocale=vt,p.timeFormatLocale=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),Cw=ze({"node_modules/d3-format/dist/d3-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function E(T,f){if((u=(T=f?T.toExponential(f-1):T.toExponential()).indexOf("e"))<0)return null;var u,A=T.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+T.slice(u+1)]}function k(T){return T=E(Math.abs(T)),T?T[1]:NaN}function l(T,f){return function(u,A){for(var x=u.length,z=[],I=0,O=T[0],D=0;x>0&&O>0&&(D+O+1>A&&(O=Math.max(1,A-D)),z.push(u.substring(x-=O,x+O)),!((D+=O+1)>A));)O=T[I=(I+1)%T.length];return z.reverse().join(f)}}function e(T){return function(f){return f.replace(/[0-9]/g,function(u){return T[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(T){if(!(f=t.exec(T)))throw new Error("invalid format: "+T);var f;return new r({fill:f[1],align:f[2],sign:f[3],symbol:f[4],zero:f[5],width:f[6],comma:f[7],precision:f[8]&&f[8].slice(1),trim:f[9],type:f[10]})}n.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.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 a(T){e:for(var f=T.length,u=1,A=-1,x;u0&&(A=0);break}return A>0?T.slice(0,A)+T.slice(x+1):T}var o;function s(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1],z=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(T,Math.max(0,f+z-1))[0]}function c(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1];return x<0?"0."+new Array(-x).join("0")+A:A.length>x+1?A.slice(0,x+1)+"."+A.slice(x+1):A+new Array(x-A.length+2).join("0")}var m={"%":function(T,f){return(T*100).toFixed(f)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:b,e:function(T,f){return T.toExponential(f)},f:function(T,f){return T.toFixed(f)},g:function(T,f){return T.toPrecision(f)},o:function(T){return Math.round(T).toString(8)},p:function(T,f){return c(T*100,f)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function h(T){return T}var v=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(T){var f=T.grouping===void 0||T.thousands===void 0?h:l(v.call(T.grouping,Number),T.thousands+""),u=T.currency===void 0?"":T.currency[0]+"",A=T.currency===void 0?"":T.currency[1]+"",x=T.decimal===void 0?".":T.decimal+"",z=T.numerals===void 0?h:e(v.call(T.numerals,String)),I=T.percent===void 0?"%":T.percent+"",O=T.minus===void 0?"-":T.minus+"",D=T.nan===void 0?"NaN":T.nan+"";function B(P){P=n(P);var j=P.fill,U=P.align,$=P.sign,Q=P.symbol,re=P.zero,ne=P.width,se=P.comma,G=P.precision,X=P.trim,K=P.type;K==="n"?(se=!0,K="g"):m[K]||(G===void 0&&(G=12),X=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var H=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Y=Q==="$"?A:/[%p]/.test(K)?I:"",q=m[K],Z=/[defgprs%]/.test(K);G=G===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function ee(ae){var he=H,xe=Y,we,Me,Se;if(K==="c")xe=q(ae)+xe,ae="";else{ae=+ae;var Ie=ae<0||1/ae<0;if(ae=isNaN(ae)?D:q(Math.abs(ae),G),X&&(ae=a(ae)),Ie&&+ae==0&&$!=="+"&&(Ie=!1),he=(Ie?$==="("?$:O:$==="-"||$==="("?"":$)+he,xe=(K==="s"?g[8+o/3]:"")+xe+(Ie&&$==="("?")":""),Z){for(we=-1,Me=ae.length;++weSe||Se>57){xe=(Se===46?x+ae.slice(we+1):ae.slice(we))+xe,ae=ae.slice(0,we);break}}}se&&!re&&(ae=f(ae,1/0));var Ve=he.length+ae.length+xe.length,Ge=Ve>1)+he+ae+xe+Ge.slice(Ve);break;default:ae=Ge+he+ae+xe;break}return z(ae)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=n(P),P.type="f",P)),$=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-$),re=g[8+$/3];return function(ne){return U(Q*ne)+re}}return{format:B,formatPrefix:F}}var w;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(T){return w=i(T),p.format=w.format,p.formatPrefix=w.formatPrefix,w}function M(T){return Math.max(0,-k(Math.abs(T)))}function C(T,f){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(f)/3)))*3-k(Math.abs(T)))}function _(T,f){return T=Math.abs(T),f=Math.abs(f)-T,Math.max(0,k(f)-k(T))+1}p.FormatSpecifier=r,p.formatDefaultLocale=S,p.formatLocale=i,p.formatSpecifier=n,p.precisionFixed=M,p.precisionPrefix=C,p.precisionRound=_,Object.defineProperty(p,"__esModule",{value:!0})})}}),FR=ze({"node_modules/is-string-blank/index.js"(J,V){"use strict";V.exports=function(p){for(var b=p.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),ao=ze({"node_modules/fast-isnumeric/index.js"(J,V){"use strict";var p=FR();V.exports=function(b){var E=typeof b;if(E==="string"){var k=b;if(b=+b,b===0&&p(k))return!1}else if(E!=="number")return!1;return b-b<1}}}),No=ze({"src/constants/numerical.js"(J,V){"use strict";V.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"}}}),Lw=ze({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p["base64-arraybuffer"]={}))})(J,function(p){"use strict";for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=b[(n[r]&3)<<4|n[r+1]>>4],o+=b[(n[r+1]&15)<<2|n[r+2]>>6],o+=b[n[r+2]&63];return a%3===2?o=o.substring(0,o.length-1)+"=":a%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var n=t.length*.75,r=t.length,a,o=0,s,c,m,h;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);var v=new ArrayBuffer(n),g=new Uint8Array(v);for(a=0;a>4,g[o++]=(c&15)<<4|m>>2,g[o++]=(m&3)<<6|h&63;return v};p.decode=e,p.encode=l,Object.defineProperty(p,"__esModule",{value:!0})})}}),tv=ze({"src/lib/is_plain_object.js"(J,V){"use strict";V.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),Ff=ze({"src/lib/array.js"(J){"use strict";var V=Lw().decode,p=tv(),b=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return b(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return b(s)||(s=[]),s.length=c,s};var n={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};n.uint8c=n.u1c,n.uint8=n.u1,n.int8=n.i1,n.uint16=n.u2,n.int16=n.i2,n.uint32=n.u4,n.int32=n.i4,n.float32=n.f4,n.float64=n.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],m=a(s),h=m.dtype,v=n[h];if(!v)throw new Error('Error in dtype: "'+h+'"');var g=v.BYTES_PER_ELEMENT,i=m.bdata;r(i)||(i=V(i));var w=m.shape===void 0?[i.byteLength/g]:(""+m.shape).split(",");w.reverse();var S=w.length,M,C,_=+w[0],T=g*_,f=0;if(S===1)c=new v(i);else if(S===2)for(M=+w[1],C=0;C2)return v[M]=v[M]|l,w.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return p(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),OR=ze({"src/lib/relink_private.js"(J,V){"use strict";var p=Ff().isArrayOrTypedArray,b=tv();V.exports=function E(k,l){for(var e in l){var t=l[e],n=k[e];if(n!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(p(t)&&p(n)&&b(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,n.length),a=0;aNR,modHalf:()=>jR});function NR(J,V){let p=J%V;return p<0?p+V:p}function jR(J,V){return Math.abs(J)>V/2?J-Math.round(J/V)*V:J}var Um=zi({"src/lib/mod.ts"(){"use strict"}}),Ki=ze({"src/lib/extend.js"(J){"use strict";var V=tv(),p=Array.isArray;function b(k,l){var e,t;for(e=0;e{for(var Qe in Ue)p(Le,Qe,{get:Ue[Qe],enumerable:!0})},e=(Le,Ue,Qe,_t)=>{if(Ue&&typeof Ue=="object"||typeof Ue=="function")for(let wt of E(Ue))!k.call(Le,wt)&&wt!==Qe&&p(Le,wt,{get:()=>Ue[wt],enumerable:!(_t=b(Ue,wt))||_t.enumerable});return Le},t=Le=>e(p({},"__esModule",{value:!0}),Le),n={};l(n,{a98:()=>So,average:()=>Tr,averageAngle:()=>rt,averageNumber:()=>fr,blend:()=>ll,blerp:()=>Ye,clampChroma:()=>dr,clampGamut:()=>ir,clampRgb:()=>Ut,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>Nn,convertDlchToLab65:()=>oo,convertHsiToRgb:()=>ds,convertHslToRgb:()=>wo,convertHsvToRgb:()=>Ts,convertHwbToRgb:()=>yo,convertItpToXyz65:()=>ms,convertJabToJch:()=>Nu,convertJabToRgb:()=>Hc,convertJabToXyz65:()=>Gc,convertJchToJab:()=>al,convertLab65ToDlch:()=>qn,convertLab65ToRgb:()=>rn,convertLab65ToXyz65:()=>tn,convertLabToLch:()=>kt,convertLabToRgb:()=>vl,convertLabToXyz50:()=>tc,convertLchToLab:()=>ar,convertLchuvToLuv:()=>qu,convertLrgbToOklab:()=>tr,convertLrgbToRgb:()=>Pt,convertLuvToLchuv:()=>hu,convertLuvToXyz50:()=>Gf,convertOkhslToOklab:()=>_i,convertOkhsvToOklab:()=>Ln,convertOklabToLrgb:()=>ba,convertOklabToOkhsl:()=>yi,convertOklabToOkhsv:()=>En,convertOklabToRgb:()=>Na,convertP3ToXyz65:()=>zo,convertProphotoToXyz50:()=>mc,convertRec2020ToXyz65:()=>Wu,convertRgbToCubehelix:()=>Xa,convertRgbToHsi:()=>jo,convertRgbToHsl:()=>pi,convertRgbToHsv:()=>Bo,convertRgbToHwb:()=>bs,convertRgbToJab:()=>$l,convertRgbToLab:()=>mf,convertRgbToLab65:()=>fn,convertRgbToLrgb:()=>Ke,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>rc,convertRgbToXyz65:()=>et,convertRgbToYiq:()=>Ba,convertXybToRgb:()=>mt,convertXyz50ToLab:()=>ac,convertXyz50ToLuv:()=>Vu,convertXyz50ToProphoto:()=>xl,convertXyz50ToRgb:()=>Tu,convertXyz50ToXyz65:()=>jr,convertXyz65ToA98:()=>De,convertXyz65ToItp:()=>zu,convertXyz65ToJab:()=>wc,convertXyz65ToLab65:()=>no,convertXyz65ToP3:()=>js,convertXyz65ToRec2020:()=>bf,convertXyz65ToRgb:()=>qt,convertXyz65ToXyz50:()=>Br,convertYiqToRgb:()=>wn,converter:()=>P,cubehelix:()=>Ws,differenceCie76:()=>on,differenceCie94:()=>en,differenceCiede2000:()=>vi,differenceCmc:()=>Yi,differenceEuclidean:()=>Yn,differenceHueChroma:()=>li,differenceHueNaive:()=>Un,differenceHueSaturation:()=>yn,differenceHyab:()=>Ja,differenceItp:()=>lt,differenceKotsarenkoRamos:()=>Oa,displayable:()=>st,dlab:()=>Zo,dlch:()=>es,easingGamma:()=>je,easingInOutSine:()=>Mo,easingMidpoint:()=>Hr,easingSmootherstep:()=>Wi,easingSmoothstep:()=>so,easingSmoothstepInverse:()=>ti,filterBrightness:()=>ma,filterContrast:()=>da,filterDeficiencyDeuter:()=>Jn,filterDeficiencyProt:()=>In,filterDeficiencyTrit:()=>Ei,filterGrayscale:()=>kn,filterHueRotate:()=>ui,filterInvert:()=>Dn,filterSaturate:()=>za,filterSepia:()=>Fa,fixupAlpha:()=>$t,fixupHueDecreasing:()=>cr,fixupHueIncreasing:()=>ur,fixupHueLonger:()=>nr,fixupHueShorter:()=>Rt,formatCss:()=>wi,formatHex:()=>sl,formatHex8:()=>sc,formatHsl:()=>Ps,formatRgb:()=>tu,getMode:()=>se,hsi:()=>$o,hsl:()=>_s,hsv:()=>Go,hwb:()=>Ys,inGamut:()=>It,interpolate:()=>oa,interpolateWith:()=>fa,interpolateWithPremultipliedAlpha:()=>Ea,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>hn,interpolatorSplineBasisClosed:()=>Tn,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>fe,interpolatorSplineMonotoneClosed:()=>be,interpolatorSplineNatural:()=>$n,interpolatorSplineNaturalClosed:()=>xi,itp:()=>Ll,jab:()=>mo,jch:()=>ru,lab:()=>Rs,lab65:()=>Yu,lch:()=>Ul,lch65:()=>ql,lchuv:()=>fo,lerp:()=>Be,lrgb:()=>Xo,luv:()=>Os,mapAlphaDivide:()=>ct,mapAlphaMultiply:()=>at,mapTransferGamma:()=>St,mapTransferLinear:()=>Nt,mapper:()=>tt,modeA98:()=>Ht,modeCubehelix:()=>Dr,modeDlab:()=>go,modeDlch:()=>Ao,modeHsi:()=>to,modeHsl:()=>Vs,modeHsv:()=>Pi,modeHwb:()=>dl,modeItp:()=>bc,modeJab:()=>Qu,modeJch:()=>ju,modeLab:()=>Sl,modeLab65:()=>oh,modeLch:()=>nl,modeLch65:()=>Kc,modeLchuv:()=>kl,modeLrgb:()=>Cc,modeLuv:()=>vc,modeOkhsl:()=>ri,modeOkhsv:()=>Zi,modeOklab:()=>Yo,modeOklch:()=>ns,modeP3:()=>zl,modeProphoto:()=>oc,modeRec2020:()=>Qc,modeRgb:()=>_r,modeXyb:()=>Bt,modeXyz50:()=>Wt,modeXyz65:()=>la,modeYiq:()=>Si,nearest:()=>vr,okhsl:()=>ra,okhsv:()=>Ya,oklab:()=>Ka,oklch:()=>Bi,p3:()=>rs,parse:()=>_e,parseHex:()=>g,parseHsl:()=>Ss,parseHslLegacy:()=>Uo,parseHwb:()=>hl,parseLab:()=>ih,parseLch:()=>$c,parseNamed:()=>m,parseOklab:()=>Do,parseOklch:()=>Gs,parseRgb:()=>ve,parseRgbLegacy:()=>O,parseTransparent:()=>Ae,prophoto:()=>Is,random:()=>qe,rec2020:()=>Oi,removeParser:()=>X,rgb:()=>Wr,round:()=>Qi,samples:()=>ut,serializeHex:()=>jl,serializeHex8:()=>Hs,serializeHsl:()=>hi,serializeRgb:()=>Cu,toGamut:()=>Ar,trilerp:()=>yt,unlerp:()=>Xe,useMode:()=>ne,useParser:()=>G,wcagContrast:()=>Bs,wcagLuminance:()=>zs,xyb:()=>na,xyz50:()=>pa,xyz65:()=>Wa,yiq:()=>ln}),V.exports=t(n);var r=(Le,Ue)=>{if(typeof Le=="number"){if(Ue===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Ue===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Ue===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Ue===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},a=r,o={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},s=o,c=Le=>a(s[Le.toLowerCase()],6),m=c,h=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,v=Le=>{let Ue;return(Ue=Le.match(h))?a(parseInt(Ue[1],16),Ue[1].length):void 0},g=v,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",w=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,T=`(?:${i}(deg|grad|rad|turn)|${i})`,f=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),x=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Ue={mode:"rgb"},Qe;if(Qe=Le.match(x))Qe[1]!==void 0&&(Ue.r=Qe[1]/255),Qe[2]!==void 0&&(Ue.g=Qe[2]/255),Qe[3]!==void 0&&(Ue.b=Qe[3]/255);else if(Qe=Le.match(z))Qe[1]!==void 0&&(Ue.r=Qe[1]/100),Qe[2]!==void 0&&(Ue.g=Qe[2]/100),Qe[3]!==void 0&&(Ue.b=Qe[3]/100);else return;return Qe[4]!==void 0?Ue.alpha=Math.max(0,Math.min(1,Qe[4]/100)):Qe[5]!==void 0&&(Ue.alpha=Math.max(0,Math.min(1,+Qe[5]))),Ue},O=I,D=(Le,Ue)=>Le===void 0?void 0:typeof Le!="object"?_e(Le):Le.mode!==void 0?Le:Ue?lo(Li({},Le),{mode:Ue}):void 0,B=D,F=(Le="rgb")=>Ue=>(Ue=B(Ue,Le))!==void 0?Ue.mode===Le?Ue:j[Ue.mode][Le]?j[Ue.mode][Le](Ue):Le==="rgb"?j[Ue.mode].rgb(Ue):j.rgb[Le](j[Ue.mode].rgb(Ue)):void 0,P=F,j={},U={},$=[],Q={},re=Le=>Le,ne=Le=>(j[Le.mode]=Li(Li({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Ue=>{j[Ue]||(j[Ue]={}),j[Ue][Le.mode]=Le.fromMode[Ue]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Ue=>{if(Le.ranges[Ue]===void 0&&(Le.ranges[Ue]=[0,1]),!Le.interpolate[Ue])throw new Error(`Missing interpolator for: ${Ue}`);typeof Le.interpolate[Ue]=="function"&&(Le.interpolate[Ue]={use:Le.interpolate[Ue]}),Le.interpolate[Ue].fixup||(Le.interpolate[Ue].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Ue=>{G(Ue,Le.mode)}),P(Le.mode)),se=Le=>U[Le],G=(Le,Ue)=>{if(typeof Le=="string"){if(!Ue)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Ue}else typeof Le=="function"&&$.indexOf(Le)<0&&$.push(Le)},X=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Ue=$.indexOf(Le);Ue>0&&$.splice(Ue,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,H=/[^\x00-\x7F]|[-\w]/,Y={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function Z(Le){let Ue=Le[q],Qe=Le[q+1];return Ue==="-"||Ue==="+"?/\d/.test(Qe)||Qe==="."&&/\d/.test(Le[q+2]):Ue==="."?/\d/.test(Qe):/\d/.test(Ue)}function ee(Le){if(q>=Le.length)return!1;let Ue=Le[q];if(K.test(Ue))return!0;if(Ue==="-"){if(Le.length-q<2)return!1;let Qe=Le[q+1];return!!(Qe==="-"||K.test(Qe))}return!1}var ae={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(Le){let Ue="";if((Le[q]==="-"||Le[q]==="+")&&(Ue+=Le[q++]),Ue+=xe(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Ue+=Le[q++]+Le[q++]+xe(Le):/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le))),ee(Le)){let Qe=we(Le);return Qe==="deg"||Qe==="rad"||Qe==="turn"||Qe==="grad"?{type:Y.Hue,value:Ue*ae[Qe]}:void 0}return Le[q]==="%"?(q++,{type:Y.Percentage,value:+Ue}):{type:Y.Number,value:+Ue}}function xe(Le){let Ue="";for(;/\d/.test(Le[q]);)Ue+=Le[q++];return Ue}function we(Le){let Ue="";for(;q24?(isFinite(Ee)&&(clearTimeout(pn),pn=setTimeout(rn,Ee)),wa=0):(wa=1,tn(rn))}p.timer.flush=function(){Ri(),Gn()};function Ri(){for(var de=Date.now(),Ee=aa;Ee;)de>=Ee.t&&Ee.c(de-Ee.t)&&(Ee.c=null),Ee=Ee.n;return de}function Gn(){for(var de,Ee=aa,qe=1/0;Ee;)Ee.c?(Ee.t=0;--St)Xr.push(at[mr[Hr[St]][2]]);for(St=+ca;St1&&Pt(de[qe[tt-2]],de[qe[tt-1]],de[at])<=0;)--tt;qe[tt++]=at}return qe.slice(0,tt)}function Ai(de,Ee){return de[0]-Ee[0]||de[1]-Ee[1]}p.geom.polygon=function(de){return G(de,jn),de};var jn=p.geom.polygon.prototype=[];jn.area=function(){for(var de=-1,Ee=this.length,qe,tt=this[Ee-1],at=0;++deht)St=St.L;else if(Nt=Ee-Wo(St,qe),Nt>ht){if(!St.R){tt=St;break}St=St.R}else{ct>-ht?(tt=St.P,at=St):Nt>-ht?(tt=St,at=St.N):tt=at=St;break}var Jt=go(de);if(oo.insert(tt,Jt),!(!tt&&!at)){if(tt===at){Xi(tt),at=go(tt.site),oo.insert(Jt,at),Jt.edge=at.edge=Vo(tt.site,Jt.site),Io(tt),Io(at);return}if(!at){Jt.edge=Vo(tt.site,Jt.site);return}Xi(tt),Xi(at);var mr=tt.site,gr=mr.x,Hr=mr.y,Vr=de.x-gr,ca=de.y-Hr,Aa=at.site,Xr=Aa.x-gr,oa=Aa.y-Hr,fa=2*(Vr*oa-ca*Xr),Ea=Vr*Vr+ca*ca,Ma=Xr*Xr+oa*oa,sa={x:(oa*Ea-ca*Ma)/fa+gr,y:(Vr*Ma-Xr*Ea)/fa+Hr};Ts(at.edge,mr,Aa,sa),Jt.edge=Vo(mr,de,null,sa),at.edge=Vo(de,Aa,null,sa),Io(tt),Io(at)}}function jo(de,Ee){var qe=de.site,tt=qe.x,at=qe.y,ct=at-Ee;if(!ct)return tt;var Nt=de.P;if(!Nt)return-1/0;qe=Nt.site;var St=qe.x,Jt=qe.y,mr=Jt-Ee;if(!mr)return St;var gr=St-tt,Hr=1/ct-1/mr,Vr=gr/mr;return Hr?(-Vr+Math.sqrt(Vr*Vr-2*Hr*(gr*gr/(-2*mr)-Jt+mr/2+at-ct/2)))/Hr+tt:(tt+St)/2}function Wo(de,Ee){var qe=de.N;if(qe)return jo(qe,Ee);var tt=de.site;return tt.y===Ee?tt.x:1/0}function to(de){this.site=de,this.edges=[]}to.prototype.prepare=function(){for(var de=this.edges,Ee=de.length,qe;Ee--;)qe=de[Ee].edge,(!qe.b||!qe.a)&&de.splice(Ee,1);return de.sort(pi),de.length};function wo(de){for(var Ee=de[0][0],qe=de[1][0],tt=de[0][1],at=de[1][1],ct,Nt,St,Jt,mr=io,gr=mr.length,Hr,Vr,ca,Aa,Xr,oa;gr--;)if(Hr=mr[gr],!(!Hr||!Hr.prepare()))for(ca=Hr.edges,Aa=ca.length,Vr=0;Vrht||i(Jt-Nt)>ht)&&(ca.splice(Vr,0,new Bo(Vs(Hr.site,oa,i(St-Ee)ht?{x:Ee,y:i(ct-Ee)ht?{x:i(Nt-at)ht?{x:qe,y:i(ct-qe)ht?{x:i(Nt-tt)=-De)){var Vr=Jt*Jt+mr*mr,ca=gr*gr+oa*oa,Aa=(oa*Vr-mr*ca)/Hr,Xr=(Jt*ca-gr*Vr)/Hr,oa=Xr+St,fa=Mi.pop()||new Vi;fa.arc=de,fa.site=at,fa.x=Aa+Nt,fa.y=oa+Math.sqrt(Aa*Aa+Xr*Xr),fa.cy=oa,de.circle=fa;for(var Ea=null,Ma=Hi._;Ma;)if(fa.y0)){if(Xr/=ca,ca<0){if(Xr0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}if(Xr=qe-St,!(!ca&&Xr<0)){if(Xr/=ca,ca<0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}else if(ca>0){if(Xr0)){if(Xr/=Aa,Aa<0){if(Xr0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}if(Xr=tt-Jt,!(!Aa&&Xr<0)){if(Xr/=Aa,Aa<0){if(Xr>Vr)return;Xr>Hr&&(Hr=Xr)}else if(Aa>0){if(Xr0&&(at.a={x:St+Hr*ca,y:Jt+Hr*Aa}),Vr<1&&(at.b={x:St+Vr*ca,y:Jt+Vr*Aa}),at}}}}}}function Uo(de){for(var Ee=qi,qe=Ko(de[0][0],de[0][1],de[1][0],de[1][1]),tt=Ee.length,at;tt--;)at=Ee[tt],(!Ls(at,de)||!qe(at)||i(at.a.x-at.b.x)=ct)return;if(gr>Vr){if(!tt)tt={x:Aa,y:Nt};else if(tt.y>=St)return;qe={x:Aa,y:St}}else{if(!tt)tt={x:Aa,y:St};else if(tt.y1)if(gr>Vr){if(!tt)tt={x:(Nt-fa)/oa,y:Nt};else if(tt.y>=St)return;qe={x:(St-fa)/oa,y:St}}else{if(!tt)tt={x:(St-fa)/oa,y:St};else if(tt.y=ct)return;qe={x:ct,y:oa*ct+fa}}else{if(!tt)tt={x:ct,y:oa*ct+fa};else if(tt.x=gr&&fa.x<=Vr&&fa.y>=Hr&&fa.y<=ca?[[gr,ca],[Vr,ca],[Vr,Hr],[gr,Hr]]:[];Ea.point=Jt[Xr]}),mr}function St(Jt){return Jt.map(function(mr,gr){return{x:Math.round(tt(mr,gr)/ht)*ht,y:Math.round(at(mr,gr)/ht)*ht,i:gr}})}return Nt.links=function(Jt){return hl(St(Jt)).edges.filter(function(mr){return mr.l&&mr.r}).map(function(mr){return{source:Jt[mr.l.i],target:Jt[mr.r.i]}})},Nt.triangles=function(Jt){var mr=[];return hl(St(Jt)).cells.forEach(function(gr,Hr){for(var Vr=gr.site,ca=gr.edges.sort(pi),Aa=-1,Xr=ca.length,oa,fa,Ea=ca[Xr-1].edge,Ma=Ea.l===Vr?Ea.r:Ea.l;++AaMa&&(Ma=gr.x),gr.y>sa&&(sa=gr.y),ca.push(gr.x),Aa.push(gr.y);else for(Xr=0;XrMa&&(Ma=hn),An>sa&&(sa=An),ca.push(hn),Aa.push(An)}var zn=Ma-fa,$n=sa-Ea;zn>$n?sa=Ea+zn:Ma=fa+$n;function xi(pe,y,N,ie,fe,be,Re,je){if(!(isNaN(N)||isNaN(ie)))if(pe.leaf){var Ze=pe.x,ut=pe.y;if(Ze!=null)if(i(Ze-N)+i(ut-ie)<.01)di(pe,y,N,ie,fe,be,Re,je);else{var ft=pe.point;pe.x=pe.y=pe.point=null,di(pe,ft,Ze,ut,fe,be,Re,je),di(pe,y,N,ie,fe,be,Re,je)}else pe.x=N,pe.y=ie,pe.point=y}else di(pe,y,N,ie,fe,be,Re,je)}function di(pe,y,N,ie,fe,be,Re,je){var Ze=(fe+Re)*.5,ut=(be+je)*.5,ft=N>=Ze,Dt=ie>=ut,Gt=Dt<<1|ft;pe.leaf=!1,pe=pe.nodes[Gt]||(pe.nodes[Gt]=Fl()),ft?fe=Ze:Re=Ze,Dt?be=ut:je=ut,xi(pe,y,N,ie,fe,be,Re,je)}var uo=Fl();if(uo.add=function(pe){xi(uo,pe,+Hr(pe,++Xr),+Vr(pe,Xr),fa,Ea,Ma,sa)},uo.visit=function(pe){pl(pe,uo,fa,Ea,Ma,sa)},uo.find=function(pe){return $u(uo,pe[0],pe[1],fa,Ea,Ma,sa)},Xr=-1,Ee==null){for(;++Xrct||Vr>Nt||ca=hn,$n=qe>=An,xi=$n<<1|zn,di=xi+4;xiqe&&(ct=Ee.slice(qe,ct),St[Nt]?St[Nt]+=ct:St[++Nt]=ct),(tt=tt[0])===(at=at[0])?St[Nt]?St[Nt]+=at:St[++Nt]=at:(St[++Nt]=null,Jt.push({i:Nt,x:vs(tt,at)})),qe=rl.lastIndex;return qe=0&&!(tt=p.interpolators[qe](de,Ee)););return tt}p.interpolators=[function(de,Ee){var qe=typeof Ee;return(qe==="string"?jt.has(Ee.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ee)?uu:os:Ee instanceof Qr?uu:Array.isArray(Ee)?zu:qe==="object"&&isNaN(Ee)?tl:vs)(de,Ee)}],p.interpolateArray=zu;function zu(de,Ee){var qe=[],tt=[],at=de.length,ct=Ee.length,Nt=Math.min(de.length,Ee.length),St;for(St=0;St=0?de.slice(0,Ee):de,tt=Ee>=0?de.slice(Ee+1):"in";return qe=bc.get(qe)||Ku,tt=Lh.get(tt)||D,rh(tt(qe.apply(null,b.call(arguments,1))))};function rh(de){return function(Ee){return Ee<=0?0:Ee>=1?1:de(Ee)}}function Ju(de){return function(Ee){return 1-de(1-Ee)}}function ss(de){return function(Ee){return .5*(Ee<.5?de(2*Ee):2-de(2-2*Ee))}}function ah(de){return de*de}function wc(de){return de*de*de}function pc(de){if(de<=0)return 0;if(de>=1)return 1;var Ee=de*de,qe=Ee*de;return 4*(de<.5?qe:3*(de-Ee)+qe-.75)}function Nf(de){return function(Ee){return Math.pow(Ee,de)}}function Bu(de){return 1-Math.cos(de*Je)}function Tc(de){return Math.pow(2,10*(de-1))}function Ou(de){return 1-Math.sqrt(1-de*de)}function Gc(de,Ee){var qe;return arguments.length<2&&(Ee=.45),arguments.length?qe=Ee/We*Math.asin(1/de):(de=1,qe=Ee/4),function(tt){return 1+de*Math.pow(2,-10*tt)*Math.sin((tt-qe)*We/Ee)}}function pf(de){return de||(de=1.70158),function(Ee){return Ee*Ee*((de+1)*Ee-de)}}function $l(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}p.interpolateHcl=jf;function jf(de,Ee){de=p.hcl(de),Ee=p.hcl(Ee);var qe=de.h,tt=de.c,at=de.l,ct=Ee.h-qe,Nt=Ee.c-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.c:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Xa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateHsl=Hc;function Hc(de,Ee){de=p.hsl(de),Ee=p.hsl(Ee);var qe=de.h,tt=de.s,at=de.l,ct=Ee.h-qe,Nt=Ee.s-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.s:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Pa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateLab=Wc;function Wc(de,Ee){de=p.lab(de),Ee=p.lab(Ee);var qe=de.l,tt=de.a,at=de.b,ct=Ee.l-qe,Nt=Ee.a-tt,St=Ee.b-at;return function(Jt){return on(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateRound=Qu;function Qu(de,Ee){return Ee-=de,function(qe){return Math.round(de+Ee*qe)}}p.transform=function(de){var Ee=k.createElementNS(p.ns.prefix.svg,"g");return(p.transform=function(qe){if(qe!=null){Ee.setAttribute("transform",qe);var tt=Ee.transform.baseVal.consolidate()}return new Yc(tt?tt.matrix:Xc)})(de)};function Yc(de){var Ee=[de.a,de.b],qe=[de.c,de.d],tt=Uf(Ee),at=Nu(Ee,qe),ct=Uf(al(qe,Ee,-at))||0;Ee[0]*qe[1]180?Ee+=360:Ee-de>180&&(de+=360),tt.push({i:qe.push(ju(qe)+"rotate(",null,")")-2,x:vs(de,Ee)})):Ee&&qe.push(ju(qe)+"rotate("+Ee+")")}function ec(de,Ee,qe,tt){de!==Ee?tt.push({i:qe.push(ju(qe)+"skewX(",null,")")-2,x:vs(de,Ee)}):Ee&&qe.push(ju(qe)+"skewX("+Ee+")")}function cu(de,Ee,qe,tt){if(de[0]!==Ee[0]||de[1]!==Ee[1]){var at=qe.push(ju(qe)+"scale(",null,",",null,")");tt.push({i:at-4,x:vs(de[0],Ee[0])},{i:at-2,x:vs(de[1],Ee[1])})}else(Ee[0]!==1||Ee[1]!==1)&&qe.push(ju(qe)+"scale("+Ee+")")}function tc(de,Ee){var qe=[],tt=[];return de=p.transform(de),Ee=p.transform(Ee),Ac(de.translate,Ee.translate,qe,tt),Zc(de.rotate,Ee.rotate,qe,tt),ec(de.skew,Ee.skew,qe,tt),cu(de.scale,Ee.scale,qe,tt),de=Ee=null,function(at){for(var ct=-1,Nt=tt.length,St;++ct0?ct=sa:(qe.c=null,qe.t=NaN,qe=null,Ee.end({type:"end",alpha:ct=0})):sa>0&&(Ee.start({type:"start",alpha:ct=sa}),qe=ai(de.tick)),de):ct},de.start=function(){var sa,hn=ca.length,An=Aa.length,zn=tt[0],$n=tt[1],xi,di;for(sa=0;sa=0;)ct.push(gr=mr[Jt]),gr.parent=St,gr.depth=St.depth+1;qe&&(St.value=0),St.children=mr}else qe&&(St.value=+qe.call(tt,St,St.depth)||0),delete St.children;return El(at,function(Hr){var Vr,ca;de&&(Vr=Hr.children)&&Vr.sort(de),qe&&(ca=Hr.parent)&&(ca.value+=Hr.value)}),Nt}return tt.sort=function(at){return arguments.length?(de=at,tt):de},tt.children=function(at){return arguments.length?(Ee=at,tt):Ee},tt.value=function(at){return arguments.length?(qe=at,tt):qe},tt.revalue=function(at){return qe&&(Sl(at,function(ct){ct.children&&(ct.value=0)}),El(at,function(ct){var Nt;ct.children||(ct.value=+qe.call(tt,ct,ct.depth)||0),(Nt=ct.parent)&&(Nt.value+=ct.value)})),at},tt};function fu(de,Ee){return p.rebind(de,Ee,"sort","children","value"),de.nodes=de,de.links=_l,de}function Sl(de,Ee){for(var qe=[de];(de=qe.pop())!=null;)if(Ee(de),(at=de.children)&&(tt=at.length))for(var tt,at;--tt>=0;)qe.push(at[tt])}function El(de,Ee){for(var qe=[de],tt=[];(de=qe.pop())!=null;)if(tt.push(de),(Nt=de.children)&&(ct=Nt.length))for(var at=-1,ct,Nt;++atat&&(at=St),tt.push(St)}for(Nt=0;Nttt&&(qe=Ee,tt=at);return qe}function _f(de){return de.reduce(Mu,0)}function Mu(de,Ee){return de+Ee[1]}p.layout.histogram=function(){var de=!0,Ee=Number,qe=Vu,tt=ic;function at(ct,Vr){for(var St=[],Jt=ct.map(Ee,this),mr=qe.call(this,Jt,Vr),gr=tt.call(this,mr,Jt,Vr),Hr,Vr=-1,ca=Jt.length,Aa=gr.length-1,Xr=de?1:1/ca,oa;++Vr0)for(Vr=-1;++Vr=mr[0]&&oa<=mr[1]&&(Hr=St[p.bisect(gr,oa,1,Aa)-1],Hr.y+=Xr,Hr.push(ct[Vr]));return St}return at.value=function(ct){return arguments.length?(Ee=ct,at):Ee},at.range=function(ct){return arguments.length?(qe=ar(ct),at):qe},at.bins=function(ct){return arguments.length?(tt=typeof ct=="number"?function(Nt){return Sc(Nt,ct)}:ar(ct),at):tt},at.frequency=function(ct){return arguments.length?(de=!!ct,at):de},at};function ic(de,Ee){return Sc(de,Math.ceil(Math.log(Ee.length)/Math.LN2+1))}function Sc(de,Ee){for(var qe=-1,tt=+de[0],at=(de[1]-tt)/Ee,ct=[];++qe<=Ee;)ct[qe]=at*qe+tt;return ct}function Vu(de){return[p.min(de),p.max(de)]}p.layout.pack=function(){var de=p.layout.hierarchy().sort(xo),Ee=0,qe=[1,1],tt;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr=qe[0],gr=qe[1],Hr=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Jt.x=Jt.y=0,El(Jt,function(ca){ca.r=+Hr(ca.value)}),El(Jt,xf),Ee){var Vr=Ee*(tt?1:Math.max(2*Jt.r/mr,2*Jt.r/gr))/2;El(Jt,function(ca){ca.r+=Vr}),El(Jt,xf),El(Jt,function(ca){ca.r-=Vr})}return Hf(Jt,mr/2,gr/2,tt?1:1/Math.max(2*Jt.r/mr,2*Jt.r/gr)),St}return at.size=function(ct){return arguments.length?(qe=ct,at):qe},at.radius=function(ct){return arguments.length?(tt=ct==null||typeof ct=="function"?ct:+ct,at):tt},at.padding=function(ct){return arguments.length?(Ee=+ct,at):Ee},fu(at,de)};function xo(de,Ee){return de.value-Ee.value}function Ec(de,Ee){var qe=de._pack_next;de._pack_next=Ee,Ee._pack_prev=de,Ee._pack_next=qe,qe._pack_prev=Ee}function xh(de,Ee){de._pack_next=Ee,Ee._pack_prev=de}function Vf(de,Ee){var qe=Ee.x-de.x,tt=Ee.y-de.y,at=de.r+Ee.r;return .999*at*at>qe*qe+tt*tt}function xf(de){if(!(Ee=de.children)||!(Vr=Ee.length))return;var Ee,qe=1/0,tt=-1/0,at=1/0,ct=-1/0,Nt,St,Jt,mr,gr,Hr,Vr;function ca(sa){qe=Math.min(sa.x-sa.r,qe),tt=Math.max(sa.x+sa.r,tt),at=Math.min(sa.y-sa.r,at),ct=Math.max(sa.y+sa.r,ct)}if(Ee.forEach(Gf),Nt=Ee[0],Nt.x=-Nt.r,Nt.y=0,ca(Nt),Vr>1&&(St=Ee[1],St.x=St.r,St.y=0,ca(St),Vr>2))for(Jt=Ee[2],il(Nt,St,Jt),ca(Jt),Ec(Nt,Jt),Nt._pack_prev=Jt,Ec(Jt,St),St=Nt._pack_next,mr=3;mroa.x&&(oa=hn),hn.depth>fa.depth&&(fa=hn)});var Ea=Ee(Xr,oa)/2-Xr.x,Ma=qe[0]/(oa.x+Ee(oa,Xr)/2+Ea),sa=qe[1]/(fa.depth||1);Sl(ca,function(hn){hn.x=(hn.x+Ea)*Ma,hn.y=hn.depth*sa})}return Vr}function ct(gr){for(var Hr={A:null,children:[gr]},Vr=[Hr],ca;(ca=Vr.pop())!=null;)for(var Aa=ca.children,Xr,oa=0,fa=Aa.length;oa0&&(Lc(Ft(Xr,gr,Vr),gr,hn),fa+=hn,Ea+=hn),Ma+=Xr.m,fa+=ca.m,sa+=oa.m,Ea+=Aa.m;Xr&&!Cc(Aa)&&(Aa.t=Xr,Aa.m+=Ma-Ea),ca&&!kc(oa)&&(oa.t=ca,oa.m+=fa-sa,Vr=gr)}return Vr}function mr(gr){gr.x*=qe[0],gr.y=gr.depth*qe[1]}return at.separation=function(gr){return arguments.length?(Ee=gr,at):Ee},at.size=function(gr){return arguments.length?(tt=(qe=gr)==null?mr:null,at):tt?null:qe},at.nodeSize=function(gr){return arguments.length?(tt=(qe=gr)==null?null:mr,at):tt?qe:null},fu(at,de)};function kl(de,Ee){return de.parent==Ee.parent?1:2}function kc(de){var Ee=de.children;return Ee.length?Ee[0]:de.t}function Cc(de){var Ee=de.children,qe;return(qe=Ee.length)?Ee[qe-1]:de.t}function Lc(de,Ee,qe){var tt=qe/(Ee.i-de.i);Ee.c-=tt,Ee.s+=qe,de.c+=tt,Ee.z+=qe,Ee.m+=qe}function vc(de){for(var Ee=0,qe=0,tt=de.children,at=tt.length,ct;--at>=0;)ct=tt[at],ct.z+=Ee,ct.m+=Ee,Ee+=ct.s+(qe+=ct.c)}function Ft(de,Ee,qe){return de.a.parent===Ee.parent?de.a:qe}p.layout.cluster=function(){var de=p.layout.hierarchy().sort(null).value(null),Ee=kl,qe=[1,1],tt=!1;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr,gr=0;El(Jt,function(Xr){var oa=Xr.children;oa&&oa.length?(Xr.x=Fr(oa),Xr.y=tr(oa)):(Xr.x=mr?gr+=Ee(Xr,mr):0,Xr.y=0,mr=Xr)});var Hr=wr(Jt),Vr=ea(Jt),ca=Hr.x-Ee(Hr,Vr)/2,Aa=Vr.x+Ee(Vr,Hr)/2;return El(Jt,tt?function(Xr){Xr.x=(Xr.x-Jt.x)*qe[0],Xr.y=(Jt.y-Xr.y)*qe[1]}:function(Xr){Xr.x=(Xr.x-ca)/(Aa-ca)*qe[0],Xr.y=(1-(Jt.y?Xr.y/Jt.y:1))*qe[1]}),St}return at.separation=function(ct){return arguments.length?(Ee=ct,at):Ee},at.size=function(ct){return arguments.length?(tt=(qe=ct)==null,at):tt?null:qe},at.nodeSize=function(ct){return arguments.length?(tt=(qe=ct)!=null,at):tt?qe:null},fu(at,de)};function tr(de){return 1+p.max(de,function(Ee){return Ee.y})}function Fr(de){return de.reduce(function(Ee,qe){return Ee+qe.x},0)/de.length}function wr(de){var Ee=de.children;return Ee&&Ee.length?wr(Ee[0]):de}function ea(de){var Ee=de.children,qe;return Ee&&(qe=Ee.length)?ea(Ee[qe-1]):de}p.layout.treemap=function(){var de=p.layout.hierarchy(),Ee=Math.round,qe=[1,1],tt=null,at=ba,ct=!1,Nt,St="squarify",Jt=.5*(1+Math.sqrt(5));function mr(Xr,oa){for(var fa=-1,Ea=Xr.length,Ma,sa;++fa0;)Ea.push(sa=Ma[$n-1]),Ea.area+=sa.area,St!=="squarify"||(An=Vr(Ea,zn))<=hn?(Ma.pop(),hn=An):(Ea.area-=Ea.pop().area,ca(Ea,zn,fa,!1),zn=Math.min(fa.dx,fa.dy),Ea.length=Ea.area=0,hn=1/0);Ea.length&&(ca(Ea,zn,fa,!0),Ea.length=Ea.area=0),oa.forEach(gr)}}function Hr(Xr){var oa=Xr.children;if(oa&&oa.length){var fa=at(Xr),Ea=oa.slice(),Ma,sa=[];for(mr(Ea,fa.dx*fa.dy/Xr.value),sa.area=0;Ma=Ea.pop();)sa.push(Ma),sa.area+=Ma.area,Ma.z!=null&&(ca(sa,Ma.z?fa.dx:fa.dy,fa,!Ea.length),sa.length=sa.area=0);oa.forEach(Hr)}}function Vr(Xr,oa){for(var fa=Xr.area,Ea,Ma=0,sa=1/0,hn=-1,An=Xr.length;++hnMa&&(Ma=Ea));return fa*=fa,oa*=oa,fa?Math.max(oa*Ma*Jt/fa,fa/(oa*sa*Jt)):1/0}function ca(Xr,oa,fa,Ea){var Ma=-1,sa=Xr.length,hn=fa.x,An=fa.y,zn=oa?Ee(Xr.area/oa):0,$n;if(oa==fa.dx){for((Ea||zn>fa.dy)&&(zn=fa.dy);++Mafa.dx)&&(zn=fa.dx);++Ma1);return de+Ee*tt*Math.sqrt(-2*Math.log(ct)/ct)}},logNormal:function(){var de=p.random.normal.apply(p,arguments);return function(){return Math.exp(de())}},bates:function(de){var Ee=p.random.irwinHall(de);return function(){return Ee()/de}},irwinHall:function(de){return function(){for(var Ee=0,qe=0;qe2?vn:mn,mr=tt?Tu:vf;return at=Jt(de,Ee,mr,qe),ct=Jt(Ee,de,mr,Fu),St}function St(Jt){return at(Jt)}return St.invert=function(Jt){return ct(Jt)},St.domain=function(Jt){return arguments.length?(de=Jt.map(Number),Nt()):de},St.range=function(Jt){return arguments.length?(Ee=Jt,Nt()):Ee},St.rangeRound=function(Jt){return St.range(Jt).interpolate(Qu)},St.clamp=function(Jt){return arguments.length?(tt=Jt,Nt()):tt},St.interpolate=function(Jt){return arguments.length?(qe=Jt,Nt()):qe},St.ticks=function(Jt){return ri(de,Jt)},St.tickFormat=function(Jt,mr){return d3_scale_linearTickFormat(de,Jt,mr)},St.nice=function(Jt){return _i(de,Jt),Nt()},St.copy=function(){return En(de,Ee,qe,tt)},Nt()}function yi(de,Ee){return p.rebind(de,Ee,"range","rangeRound","interpolate","clamp")}function _i(de,Ee){return Da(de,Ha(ki(de,Ee)[2])),Da(de,Ha(ki(de,Ee)[2])),de}function ki(de,Ee){Ee==null&&(Ee=10);var qe=Na(de),tt=qe[1]-qe[0],at=Math.pow(10,Math.floor(Math.log(tt/Ee)/Math.LN10)),ct=Ee/tt*at;return ct<=.15?at*=10:ct<=.35?at*=5:ct<=.75&&(at*=2),qe[0]=Math.ceil(qe[0]/at)*at,qe[1]=Math.floor(qe[1]/at)*at+at*.5,qe[2]=at,qe}function ri(de,Ee){return p.range.apply(p,ki(de,Ee))}var kn={s:1,g:1,p:1,r:1,e:1};function Ln(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function Ni(de,Ee){var qe=Ln(Ee[2]);return de in kn?Math.abs(qe-Ln(Math.max(i(Ee[0]),i(Ee[1]))))+ +(de!=="e"):qe-(de==="%")*2}p.scale.log=function(){return Zi(p.scale.linear().domain([0,1]),10,!0,[1,10])};function Zi(de,Ee,qe,tt){function at(St){return(qe?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Ee)}function ct(St){return qe?Math.pow(Ee,St):-Math.pow(Ee,-St)}function Nt(St){return de(at(St))}return Nt.invert=function(St){return ct(de.invert(St))},Nt.domain=function(St){return arguments.length?(qe=St[0]>=0,de.domain((tt=St.map(Number)).map(at)),Nt):tt},Nt.base=function(St){return arguments.length?(Ee=+St,de.domain(tt.map(at)),Nt):Ee},Nt.nice=function(){var St=Da(tt.map(at),qe?Math:Co);return de.domain(St),tt=St.map(ct),Nt},Nt.ticks=function(){var St=Na(tt),Jt=[],mr=St[0],gr=St[1],Hr=Math.floor(at(mr)),Vr=Math.ceil(at(gr)),ca=Ee%1?2:Ee;if(isFinite(Vr-Hr)){if(qe){for(;Hr0;Aa--)Jt.push(ct(Hr)*Aa);for(Hr=0;Jt[Hr]gr;Vr--);Jt=Jt.slice(Hr,Vr)}return Jt},Nt.copy=function(){return Zi(de.copy(),Ee,qe,tt)},yi(Nt,de)}var Co={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};p.scale.pow=function(){return Do(p.scale.linear(),1,[0,1])};function Do(de,Ee,qe){var tt=Fo(Ee),at=Fo(1/Ee);function ct(Nt){return de(tt(Nt))}return ct.invert=function(Nt){return at(de.invert(Nt))},ct.domain=function(Nt){return arguments.length?(de.domain((qe=Nt.map(Number)).map(tt)),ct):qe},ct.ticks=function(Nt){return ri(qe,Nt)},ct.tickFormat=function(Nt,St){return d3_scale_linearTickFormat(qe,Nt,St)},ct.nice=function(Nt){return ct.domain(_i(qe,Nt))},ct.exponent=function(Nt){return arguments.length?(tt=Fo(Ee=Nt),at=Fo(1/Ee),de.domain(qe.map(tt)),ct):Ee},ct.copy=function(){return Do(de.copy(),Ee,qe)},yi(ct,de)}function Fo(de){return function(Ee){return Ee<0?-Math.pow(-Ee,de):Math.pow(Ee,de)}}p.scale.sqrt=function(){return p.scale.pow().exponent(.5)},p.scale.ordinal=function(){return Yo([],{t:"range",a:[[]]})};function Yo(de,Ee){var qe,tt,at;function ct(St){return tt[((qe.get(St)||(Ee.t==="range"?qe.set(St,de.push(St)):NaN))-1)%tt.length]}function Nt(St,Jt){return p.range(de.length).map(function(mr){return St+Jt*mr})}return ct.domain=function(St){if(!arguments.length)return de;de=[],qe=new M;for(var Jt=-1,mr=St.length,gr;++Jt0?qe[ct-1]:de[0],ctVr?0:1;if(gr=Ke)return Jt(gr,Aa)+(mr?Jt(mr,1-Aa):"")+"Z";var Xr,oa,fa,Ea,Ma=0,sa=0,hn,An,zn,$n,xi,di,uo,pe,y=[];if((Ea=(+Nt.apply(this,arguments)||0)/2)&&(fa=tt===zl?Math.sqrt(mr*mr+gr*gr):+tt.apply(this,arguments),Aa||(sa*=-1),gr&&(sa=qt(fa/gr*Math.sin(Ea))),mr&&(Ma=qt(fa/mr*Math.sin(Ea)))),gr){hn=gr*Math.cos(Hr+sa),An=gr*Math.sin(Hr+sa),zn=gr*Math.cos(Vr-sa),$n=gr*Math.sin(Vr-sa);var N=Math.abs(Vr-Hr-2*sa)<=Ne?0:1;if(sa&&mc(hn,An,zn,$n)===Aa^N){var ie=(Hr+Vr)/2;hn=gr*Math.cos(ie),An=gr*Math.sin(ie),zn=$n=null}}else hn=An=0;if(mr){xi=mr*Math.cos(Vr-Ma),di=mr*Math.sin(Vr-Ma),uo=mr*Math.cos(Hr+Ma),pe=mr*Math.sin(Hr+Ma);var fe=Math.abs(Hr-Vr+2*Ma)<=Ne?0:1;if(Ma&&mc(xi,di,uo,pe)===1-Aa^fe){var be=(Hr+Vr)/2;xi=mr*Math.cos(be),di=mr*Math.sin(be),uo=pe=null}}else xi=di=0;if(ca>ht&&(Xr=Math.min(Math.abs(gr-mr)/2,+qe.apply(this,arguments)))>.001){oa=mr0?0:1}function Jc(de,Ee,qe,tt,at){var ct=de[0]-Ee[0],Nt=de[1]-Ee[1],St=(at?tt:-tt)/Math.sqrt(ct*ct+Nt*Nt),Jt=St*Nt,mr=-St*ct,gr=de[0]+Jt,Hr=de[1]+mr,Vr=Ee[0]+Jt,ca=Ee[1]+mr,Aa=(gr+Vr)/2,Xr=(Hr+ca)/2,oa=Vr-gr,fa=ca-Hr,Ea=oa*oa+fa*fa,Ma=qe-tt,sa=gr*ca-Vr*Hr,hn=(fa<0?-1:1)*Math.sqrt(Math.max(0,Ma*Ma*Ea-sa*sa)),An=(sa*fa-oa*hn)/Ea,zn=(-sa*oa-fa*hn)/Ea,$n=(sa*fa+oa*hn)/Ea,xi=(-sa*oa+fa*hn)/Ea,di=An-Aa,uo=zn-Xr,pe=$n-Aa,y=xi-Xr;return di*di+uo*uo>pe*pe+y*y&&(An=$n,zn=xi),[[An-Jt,zn-mr],[An*qe/Ma,zn*qe/Ma]]}function oc(){return!0}function du(de){var Ee=no,qe=Di,tt=oc,at=Ql,ct=at.key,Nt=.7;function St(Jt){var mr=[],gr=[],Hr=-1,Vr=Jt.length,ca,Aa=ar(Ee),Xr=ar(qe);function oa(){mr.push("M",at(de(gr),Nt))}for(;++Hr1?de.join("L"):de+"Z"}function Eu(de){return de.join("L")+"Z"}function bf(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1&&at.push("H",tt[0]),at.join("")}function lh(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1){St=Ee[1],ct=de[Jt],Jt++,tt+="C"+(at[0]+Nt[0])+","+(at[1]+Nt[1])+","+(ct[0]-St[0])+","+(ct[1]-St[1])+","+ct[0]+","+ct[1];for(var mr=2;mr9&&(ct=qe*3/Math.sqrt(ct),Nt[St]=ct*tt,Nt[St+1]=ct*at));for(St=-1;++St<=Jt;)ct=(de[Math.min(Jt,St+1)][0]-de[Math.max(0,St-1)][0])/(6*(1+Nt[St]*Nt[St])),Ee.push([ct||0,Nt[St]*ct||0]);return Ee}function Pr(de){return de.length<3?Ql(de):de[0]+wf(de,Wt(de))}p.svg.line.radial=function(){var de=du(Br);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function Br(de){for(var Ee,qe=-1,tt=de.length,at,ct;++qeNe)+",1 "+Hr}function mr(gr,Hr,Vr,ca){return"Q 0,0 "+ca}return ct.radius=function(gr){return arguments.length?(qe=ar(gr),ct):qe},ct.source=function(gr){return arguments.length?(de=ar(gr),ct):de},ct.target=function(gr){return arguments.length?(Ee=ar(gr),ct):Ee},ct.startAngle=function(gr){return arguments.length?(tt=ar(gr),ct):tt},ct.endAngle=function(gr){return arguments.length?(at=ar(gr),ct):at},ct};function la(de){return de.radius}p.svg.diagonal=function(){var de=jr,Ee=Jr,qe=xa;function tt(at,ct){var Nt=de.call(this,at,ct),St=Ee.call(this,at,ct),Jt=(Nt.y+St.y)/2,mr=[Nt,{x:Nt.x,y:Jt},{x:St.x,y:Jt},St];return mr=mr.map(qe),"M"+mr[0]+"C"+mr[1]+" "+mr[2]+" "+mr[3]}return tt.source=function(at){return arguments.length?(de=ar(at),tt):de},tt.target=function(at){return arguments.length?(Ee=ar(at),tt):Ee},tt.projection=function(at){return arguments.length?(qe=at,tt):qe},tt};function xa(de){return[de.x,de.y]}p.svg.diagonal.radial=function(){var de=p.svg.diagonal(),Ee=xa,qe=de.projection;return de.projection=function(tt){return arguments.length?qe(Ba(Ee=tt)):Ee},de};function Ba(de){return function(){var Ee=de.apply(this,arguments),qe=Ee[0],tt=Ee[1]-Je;return[qe*Math.cos(tt),qe*Math.sin(tt)]}}p.svg.symbol=function(){var de=Tn,Ee=an;function qe(tt,at){return(Si.get(de.call(this,tt,at))||ii)(Ee.call(this,tt,at))}return qe.type=function(tt){return arguments.length?(de=ar(tt),qe):de},qe.size=function(tt){return arguments.length?(Ee=ar(tt),qe):Ee},qe};function an(){return 64}function Tn(){return"circle"}function ii(de){var Ee=Math.sqrt(de/Ne);return"M0,"+Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+-Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+Ee+"Z"}var Si=p.map({circle:ii,cross:function(de){var Ee=Math.sqrt(de/5)/2;return"M"+-3*Ee+","+-Ee+"H"+-Ee+"V"+-3*Ee+"H"+Ee+"V"+-Ee+"H"+3*Ee+"V"+Ee+"H"+Ee+"V"+3*Ee+"H"+-Ee+"V"+Ee+"H"+-3*Ee+"Z"},diamond:function(de){var Ee=Math.sqrt(de/(2*Ji)),qe=Ee*Ji;return"M0,"+-Ee+"L"+qe+",0 0,"+Ee+" "+-qe+",0Z"},square:function(de){var Ee=Math.sqrt(de)/2;return"M"+-Ee+","+-Ee+"L"+Ee+","+-Ee+" "+Ee+","+Ee+" "+-Ee+","+Ee+"Z"},"triangle-down":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+qe+"L"+Ee+","+-qe+" "+-Ee+","+-qe+"Z"},"triangle-up":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+-qe+"L"+Ee+","+qe+" "+-Ee+","+qe+"Z"}});p.svg.symbolTypes=Si.keys();var oi=Math.sqrt(3),Ji=Math.tan(30*et);q.transition=function(de){for(var Ee=ol||++ys,qe=hi(de),tt=[],at,ct,Nt=jl||{time:Date.now(),ease:pc,delay:0,duration:250},St=-1,Jt=this.length;++St0;)Hr[--Ea].call(de,fa);if(oa>=1)return Nt.event&&Nt.event.end.call(de,de.__data__,Ee),--ct.count?delete ct[tt]:delete de[qe],1}Nt||(St=at.time,Jt=ai(Vr,0,St),Nt=ct[tt]={tween:new M,time:St,timer:Jt,delay:at.delay,duration:at.duration,ease:at.ease,index:Ee},at=null,++ct.count)}p.svg.axis=function(){var de=p.scale.linear(),Ee=sl,qe=6,tt=6,at=3,ct=[10],Nt=null,St;function Jt(mr){mr.each(function(){var gr=p.select(this),Hr=this.__chart__||de,Vr=this.__chart__=de.copy(),ca=Nt??(Vr.ticks?Vr.ticks.apply(Vr,ct):Vr.domain()),Aa=St??(Vr.tickFormat?Vr.tickFormat.apply(Vr,ct):D),Xr=gr.selectAll(".tick").data(ca,Vr),oa=Xr.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),fa=p.transition(Xr.exit()).style("opacity",ht).remove(),Ea=p.transition(Xr.order()).style("opacity",1),Ma=Math.max(qe,0)+at,sa,hn=Za(Vr),An=gr.selectAll(".domain").data([0]),zn=(An.enter().append("path").attr("class","domain"),p.transition(An));oa.append("line"),oa.append("text");var $n=oa.select("line"),xi=Ea.select("line"),di=Xr.select("text").text(Aa),uo=oa.select("text"),pe=Ea.select("text"),y=Ee==="top"||Ee==="left"?-1:1,N,ie,fe,be;if(Ee==="bottom"||Ee==="top"?(sa=tu,N="x",fe="y",ie="x2",be="y2",di.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),zn.attr("d","M"+hn[0]+","+y*tt+"V0H"+hn[1]+"V"+y*tt)):(sa=Ps,N="y",fe="x",ie="y2",be="x2",di.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),zn.attr("d","M"+y*tt+","+hn[0]+"H0V"+hn[1]+"H"+y*tt)),$n.attr(be,y*qe),uo.attr(fe,y*Ma),xi.attr(ie,0).attr(be,y*qe),pe.attr(N,0).attr(fe,y*Ma),Vr.rangeBand){var Re=Vr,je=Re.rangeBand()/2;Hr=Vr=function(Ze){return Re(Ze)+je}}else Hr.rangeBand?Hr=Vr:fa.call(sa,Vr,Hr);oa.call(sa,Hr,Vr),Ea.call(sa,Vr,Vr)})}return Jt.scale=function(mr){return arguments.length?(de=mr,Jt):de},Jt.orient=function(mr){return arguments.length?(Ee=mr in sc?mr+"":sl,Jt):Ee},Jt.ticks=function(){return arguments.length?(ct=E(arguments),Jt):ct},Jt.tickValues=function(mr){return arguments.length?(Nt=mr,Jt):Nt},Jt.tickFormat=function(mr){return arguments.length?(St=mr,Jt):St},Jt.tickSize=function(mr){var gr=arguments.length;return gr?(qe=+mr,tt=+arguments[gr-1],Jt):qe},Jt.innerTickSize=function(mr){return arguments.length?(qe=+mr,Jt):qe},Jt.outerTickSize=function(mr){return arguments.length?(tt=+mr,Jt):tt},Jt.tickPadding=function(mr){return arguments.length?(at=+mr,Jt):at},Jt.tickSubdivide=function(){return arguments.length&&Jt},Jt};var sl="bottom",sc={top:1,right:1,bottom:1,left:1};function tu(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate("+(isFinite(at)?at:qe(tt))+",0)"})}function Ps(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate(0,"+(isFinite(at)?at:qe(tt))+")"})}p.svg.brush=function(){var de=ne(gr,"brushstart","brush","brushend"),Ee=null,qe=null,tt=[0,0],at=[0,0],ct,Nt,St=!0,Jt=!0,mr=pu[0];function gr(Xr){Xr.each(function(){var oa=p.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Aa).on("touchstart.brush",Aa),fa=oa.selectAll(".background").data([0]);fa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ea=oa.selectAll(".resize").data(mr,D);Ea.exit().remove(),Ea.enter().append("g").attr("class",function(An){return"resize "+An}).style("cursor",function(An){return gc[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"),Ea.style("display",gr.empty()?"none":null);var Ma=p.transition(oa),sa=p.transition(fa),hn;Ee&&(hn=Za(Ee),sa.attr("x",hn[0]).attr("width",hn[1]-hn[0]),Vr(Ma)),qe&&(hn=Za(qe),sa.attr("y",hn[0]).attr("height",hn[1]-hn[0]),ca(Ma)),Hr(Ma)})}gr.event=function(Xr){Xr.each(function(){var oa=de.of(this,arguments),fa={x:tt,y:at,i:ct,j:Nt},Ea=this.__chart__||fa;this.__chart__=fa,ol?p.select(this).transition().each("start.brush",function(){ct=Ea.i,Nt=Ea.j,tt=Ea.x,at=Ea.y,oa({type:"brushstart"})}).tween("brush:brush",function(){var Ma=zu(tt,fa.x),sa=zu(at,fa.y);return ct=Nt=null,function(hn){tt=fa.x=Ma(hn),at=fa.y=sa(hn),oa({type:"brush",mode:"resize"})}}).each("end.brush",function(){ct=fa.i,Nt=fa.j,oa({type:"brush",mode:"resize"}),oa({type:"brushend"})}):(oa({type:"brushstart"}),oa({type:"brush",mode:"resize"}),oa({type:"brushend"}))})};function Hr(Xr){Xr.selectAll(".resize").attr("transform",function(oa){return"translate("+tt[+/e$/.test(oa)]+","+at[+/^s/.test(oa)]+")"})}function Vr(Xr){Xr.select(".extent").attr("x",tt[0]),Xr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function ca(Xr){Xr.select(".extent").attr("y",at[0]),Xr.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function Aa(){var Xr=this,oa=p.select(p.event.target),fa=de.of(Xr,arguments),Ea=p.select(Xr),Ma=oa.datum(),sa=!/^(n|s)$/.test(Ma)&&Ee,hn=!/^(e|w)$/.test(Ma)&&qe,An=oa.classed("extent"),zn=Xt(Xr),$n,xi=p.mouse(Xr),di,uo=p.select(e(Xr)).on("keydown.brush",N).on("keyup.brush",ie);if(p.event.changedTouches?uo.on("touchmove.brush",fe).on("touchend.brush",Re):uo.on("mousemove.brush",fe).on("mouseup.brush",Re),Ea.interrupt().selectAll("*").interrupt(),An)xi[0]=tt[0]-xi[0],xi[1]=at[0]-xi[1];else if(Ma){var pe=+/w$/.test(Ma),y=+/^n/.test(Ma);di=[tt[1-pe]-xi[0],at[1-y]-xi[1]],xi[0]=tt[pe],xi[1]=at[y]}else p.event.altKey&&($n=xi.slice());Ea.style("pointer-events","none").selectAll(".resize").style("display",null),p.select("body").style("cursor",oa.style("cursor")),fa({type:"brushstart"}),fe();function N(){p.event.keyCode==32&&(An||($n=null,xi[0]-=tt[1],xi[1]-=at[1],An=2),Q())}function ie(){p.event.keyCode==32&&An==2&&(xi[0]+=tt[1],xi[1]+=at[1],An=0,Q())}function fe(){var je=p.mouse(Xr),Ze=!1;di&&(je[0]+=di[0],je[1]+=di[1]),An||(p.event.altKey?($n||($n=[(tt[0]+tt[1])/2,(at[0]+at[1])/2]),xi[0]=tt[+(je[0]<$n[0])],xi[1]=at[+(je[1]<$n[1])]):$n=null),sa&&be(je,Ee,0)&&(Vr(Ea),Ze=!0),hn&&be(je,qe,1)&&(ca(Ea),Ze=!0),Ze&&(Hr(Ea),fa({type:"brush",mode:An?"move":"resize"}))}function be(je,Ze,ut){var ft=Za(Ze),Dt=ft[0],Gt=ft[1],Kt=xi[ut],st=ut?at:tt,It=st[1]-st[0],Ut,ir;if(An&&(Dt-=Kt,Gt-=It+Kt),Ut=(ut?Jt:St)?Math.max(Dt,Math.min(Gt,je[ut])):je[ut],An?ir=(Ut+=Kt)+It:($n&&(Kt=Math.max(Dt,Math.min(Gt,2*$n[ut]-Ut))),Kt0))return At;do At.push($t=new Date(+yt)),Ae(yt,Tt),le(yt);while($t=gt)for(;le(gt),!yt(gt);)gt.setTime(gt-1)},function(gt,Tt){if(gt>=gt)if(Tt<0)for(;++Tt<=0;)for(;Ae(gt,-1),!yt(gt););else for(;--Tt>=0;)for(;Ae(gt,1),!yt(gt););})},Be&&(Ye.count=function(yt,gt){return b.setTime(+yt),E.setTime(+gt),le(b),le(E),Math.floor(Be(b,E))},Ye.every=function(yt){return yt=Math.floor(yt),!isFinite(yt)||!(yt>0)?null:yt>1?Ye.filter(Xe?function(gt){return Xe(gt)%yt===0}:function(gt){return Ye.count(0,gt)%yt===0}):Ye}),Ye}var l=k(function(){},function(le,Ae){le.setTime(+le+Ae)},function(le,Ae){return Ae-le});l.every=function(le){return le=Math.floor(le),!isFinite(le)||!(le>0)?null:le>1?k(function(Ae){Ae.setTime(Math.floor(Ae/le)*le)},function(Ae,Be){Ae.setTime(+Ae+Be*le)},function(Ae,Be){return(Be-Ae)/le}):l};var e=l.range,t=1e3,n=6e4,r=36e5,a=864e5,o=6048e5,s=k(function(le){le.setTime(le-le.getMilliseconds())},function(le,Ae){le.setTime(+le+Ae*t)},function(le,Ae){return(Ae-le)/t},function(le){return le.getUTCSeconds()}),c=s.range,m=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getMinutes()}),h=m.range,v=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t-le.getMinutes()*n)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getHours()}),g=v.range,i=k(function(le){le.setHours(0,0,0,0)},function(le,Ae){le.setDate(le.getDate()+Ae)},function(le,Ae){return(Ae-le-(Ae.getTimezoneOffset()-le.getTimezoneOffset())*n)/a},function(le){return le.getDate()-1}),w=i.range;function S(le){return k(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-le)%7),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setDate(Ae.getDate()+Be*7)},function(Ae,Be){return(Be-Ae-(Be.getTimezoneOffset()-Ae.getTimezoneOffset())*n)/o})}var M=S(0),C=S(1),_=S(2),T=S(3),f=S(4),u=S(5),A=S(6),x=M.range,z=C.range,I=_.range,O=T.range,D=f.range,B=u.range,F=A.range,P=k(function(le){le.setDate(1),le.setHours(0,0,0,0)},function(le,Ae){le.setMonth(le.getMonth()+Ae)},function(le,Ae){return Ae.getMonth()-le.getMonth()+(Ae.getFullYear()-le.getFullYear())*12},function(le){return le.getMonth()}),j=P.range,U=k(function(le){le.setMonth(0,1),le.setHours(0,0,0,0)},function(le,Ae){le.setFullYear(le.getFullYear()+Ae)},function(le,Ae){return Ae.getFullYear()-le.getFullYear()},function(le){return le.getFullYear()});U.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/le)*le),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setFullYear(Ae.getFullYear()+Be*le)})};var $=U.range,Q=k(function(le){le.setUTCSeconds(0,0)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getUTCMinutes()}),re=Q.range,ne=k(function(le){le.setUTCMinutes(0,0,0)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getUTCHours()}),se=ne.range,G=k(function(le){le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCDate(le.getUTCDate()+Ae)},function(le,Ae){return(Ae-le)/a},function(le){return le.getUTCDate()-1}),X=G.range;function K(le){return k(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-le)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCDate(Ae.getUTCDate()+Be*7)},function(Ae,Be){return(Be-Ae)/o})}var H=K(0),Y=K(1),q=K(2),Z=K(3),ee=K(4),ae=K(5),he=K(6),xe=H.range,we=Y.range,Me=q.range,Se=Z.range,Ie=ee.range,Ve=ae.range,Ge=he.range,ke=k(function(le){le.setUTCDate(1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCMonth(le.getUTCMonth()+Ae)},function(le,Ae){return Ae.getUTCMonth()-le.getUTCMonth()+(Ae.getUTCFullYear()-le.getUTCFullYear())*12},function(le){return le.getUTCMonth()}),_e=ke.range,ce=k(function(le){le.setUTCMonth(0,1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCFullYear(le.getUTCFullYear()+Ae)},function(le,Ae){return Ae.getUTCFullYear()-le.getUTCFullYear()},function(le){return le.getUTCFullYear()});ce.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/le)*le),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCFullYear(Ae.getUTCFullYear()+Be*le)})};var ve=ce.range;p.timeDay=i,p.timeDays=w,p.timeFriday=u,p.timeFridays=B,p.timeHour=v,p.timeHours=g,p.timeInterval=k,p.timeMillisecond=l,p.timeMilliseconds=e,p.timeMinute=m,p.timeMinutes=h,p.timeMonday=C,p.timeMondays=z,p.timeMonth=P,p.timeMonths=j,p.timeSaturday=A,p.timeSaturdays=F,p.timeSecond=s,p.timeSeconds=c,p.timeSunday=M,p.timeSundays=x,p.timeThursday=f,p.timeThursdays=D,p.timeTuesday=_,p.timeTuesdays=I,p.timeWednesday=T,p.timeWednesdays=O,p.timeWeek=M,p.timeWeeks=x,p.timeYear=U,p.timeYears=$,p.utcDay=G,p.utcDays=X,p.utcFriday=ae,p.utcFridays=Ve,p.utcHour=ne,p.utcHours=se,p.utcMillisecond=l,p.utcMilliseconds=e,p.utcMinute=Q,p.utcMinutes=re,p.utcMonday=Y,p.utcMondays=we,p.utcMonth=ke,p.utcMonths=_e,p.utcSaturday=he,p.utcSaturdays=Ge,p.utcSecond=s,p.utcSeconds=c,p.utcSunday=H,p.utcSundays=xe,p.utcThursday=ee,p.utcThursdays=Ie,p.utcTuesday=q,p.utcTuesdays=Me,p.utcWednesday=Z,p.utcWednesdays=Se,p.utcWeek=H,p.utcWeeks=xe,p.utcYear=ce,p.utcYears=ve,Object.defineProperty(p,"__esModule",{value:!0})})}}),jm=ze({"node_modules/d3-time-format/dist/d3-time-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kw()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(Je){if(0<=Je.y&&Je.y<100){var et=new Date(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L);return et.setFullYear(Je.y),et}return new Date(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L)}function k(Je){if(0<=Je.y&&Je.y<100){var et=new Date(Date.UTC(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L));return et.setUTCFullYear(Je.y),et}return new Date(Date.UTC(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L))}function l(Je,et,Mt){return{y:Je,m:et,d:Mt,H:0,M:0,S:0,L:0}}function e(Je){var et=Je.dateTime,Mt=Je.date,pt=Je.time,Pt=Je.periods,Ct=Je.days,qt=Je.shortDays,Vt=Je.months,Ht=Je.shortMonths,Sr=c(Pt),Kr=m(Pt),Yt=c(Ct),Rt=m(Ct),nr=c(qt),ur=m(qt),cr=c(Vt),Rr=m(Vt),Qr=c(Ht),Zr=m(Ht),ha={a:Yi,A:Ja,b:Oa,B:lt,c:null,d:P,e:P,f:re,g:ae,G:xe,H:j,I:U,j:$,L:Q,m:ne,M:se,p:rt,q:fr,Q:Xt,s:or,S:G,u:X,U:K,V:Y,w:q,W:Z,x:null,X:null,y:ee,Y:he,Z:we,"%":_r},Pa={a:lr,A:Tr,b:Ir,B:Dr,c:null,d:Me,e:Me,f:ke,g:Tt,G:$t,H:Se,I:Ie,j:Ve,L:Ge,m:_e,M:ce,p:ot,q:kt,Q:Xt,s:or,S:ve,u:le,U:Ae,V:Xe,w:Ye,W:yt,x:null,X:null,y:gt,Y:At,Z:rr,"%":_r},La={a:yn,A:Un,b:li,B:Yn,c:on,d:f,e:f,f:O,g:M,G:S,H:A,I:A,j:u,L:I,m:T,M:x,p:Nn,q:_,Q:B,s:F,S:z,u:v,U:g,V:i,w:h,W:w,x:en,X:vi,y:M,Y:S,Z:C,"%":D};ha.x=un(Mt,ha),ha.X=un(pt,ha),ha.c=un(et,ha),Pa.x=un(Mt,Pa),Pa.X=un(pt,Pa),Pa.c=un(et,Pa);function un(jt,ar){return function(Er){var xr=[],zr=-1,Lr=0,aa=jt.length,Sa,wa,pn;for(Er instanceof Date||(Er=new Date(+Er));++zr53)return null;"w"in xr||(xr.w=1),"Z"in xr?(Lr=k(l(xr.y,0,1)),aa=Lr.getUTCDay(),Lr=aa>4||aa===0?b.utcMonday.ceil(Lr):b.utcMonday(Lr),Lr=b.utcDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getUTCFullYear(),xr.m=Lr.getUTCMonth(),xr.d=Lr.getUTCDate()+(xr.w+6)%7):(Lr=E(l(xr.y,0,1)),aa=Lr.getDay(),Lr=aa>4||aa===0?b.timeMonday.ceil(Lr):b.timeMonday(Lr),Lr=b.timeDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getFullYear(),xr.m=Lr.getMonth(),xr.d=Lr.getDate()+(xr.w+6)%7)}else("W"in xr||"U"in xr)&&("w"in xr||(xr.w="u"in xr?xr.u%7:"W"in xr?1:0),aa="Z"in xr?k(l(xr.y,0,1)).getUTCDay():E(l(xr.y,0,1)).getDay(),xr.m=0,xr.d="W"in xr?(xr.w+6)%7+xr.W*7-(aa+5)%7:xr.w+xr.U*7-(aa+6)%7);return"Z"in xr?(xr.H+=xr.Z/100|0,xr.M+=xr.Z%100,k(xr)):E(xr)}}function ja(jt,ar,Er,xr){for(var zr=0,Lr=ar.length,aa=Er.length,Sa,wa;zr=aa)return-1;if(Sa=ar.charCodeAt(zr++),Sa===37){if(Sa=ar.charAt(zr++),wa=La[Sa in t?ar.charAt(zr++):Sa],!wa||(xr=wa(jt,Er,xr))<0)return-1}else if(Sa!=Er.charCodeAt(xr++))return-1}return xr}function Nn(jt,ar,Er){var xr=Sr.exec(ar.slice(Er));return xr?(jt.p=Kr[xr[0].toLowerCase()],Er+xr[0].length):-1}function yn(jt,ar,Er){var xr=nr.exec(ar.slice(Er));return xr?(jt.w=ur[xr[0].toLowerCase()],Er+xr[0].length):-1}function Un(jt,ar,Er){var xr=Yt.exec(ar.slice(Er));return xr?(jt.w=Rt[xr[0].toLowerCase()],Er+xr[0].length):-1}function li(jt,ar,Er){var xr=Qr.exec(ar.slice(Er));return xr?(jt.m=Zr[xr[0].toLowerCase()],Er+xr[0].length):-1}function Yn(jt,ar,Er){var xr=cr.exec(ar.slice(Er));return xr?(jt.m=Rr[xr[0].toLowerCase()],Er+xr[0].length):-1}function on(jt,ar,Er){return ja(jt,et,ar,Er)}function en(jt,ar,Er){return ja(jt,Mt,ar,Er)}function vi(jt,ar,Er){return ja(jt,pt,ar,Er)}function Yi(jt){return qt[jt.getDay()]}function Ja(jt){return Ct[jt.getDay()]}function Oa(jt){return Ht[jt.getMonth()]}function lt(jt){return Vt[jt.getMonth()]}function rt(jt){return Pt[+(jt.getHours()>=12)]}function fr(jt){return 1+~~(jt.getMonth()/3)}function lr(jt){return qt[jt.getUTCDay()]}function Tr(jt){return Ct[jt.getUTCDay()]}function Ir(jt){return Ht[jt.getUTCMonth()]}function Dr(jt){return Vt[jt.getUTCMonth()]}function ot(jt){return Pt[+(jt.getUTCHours()>=12)]}function kt(jt){return 1+~~(jt.getUTCMonth()/3)}return{format:function(jt){var ar=un(jt+="",ha);return ar.toString=function(){return jt},ar},parse:function(jt){var ar=Xa(jt+="",!1);return ar.toString=function(){return jt},ar},utcFormat:function(jt){var ar=un(jt+="",Pa);return ar.toString=function(){return jt},ar},utcParse:function(jt){var ar=Xa(jt+="",!0);return ar.toString=function(){return jt},ar}}}var t={"-":"",_:" ",0:"0"},n=/^\s*\d+/,r=/^%/,a=/[\\^$*+?|[\]().{}]/g;function o(Je,et,Mt){var pt=Je<0?"-":"",Pt=(pt?-Je:Je)+"",Ct=Pt.length;return pt+(Ct68?1900:2e3),Mt+pt[0].length):-1}function C(Je,et,Mt){var pt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Mt,Mt+6));return pt?(Je.Z=pt[1]?0:-(pt[2]+(pt[3]||"00")),Mt+pt[0].length):-1}function _(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+1));return pt?(Je.q=pt[0]*3-3,Mt+pt[0].length):-1}function T(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.m=pt[0]-1,Mt+pt[0].length):-1}function f(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.d=+pt[0],Mt+pt[0].length):-1}function u(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.m=0,Je.d=+pt[0],Mt+pt[0].length):-1}function A(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.H=+pt[0],Mt+pt[0].length):-1}function x(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.M=+pt[0],Mt+pt[0].length):-1}function z(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.S=+pt[0],Mt+pt[0].length):-1}function I(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.L=+pt[0],Mt+pt[0].length):-1}function O(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+6));return pt?(Je.L=Math.floor(pt[0]/1e3),Mt+pt[0].length):-1}function D(Je,et,Mt){var pt=r.exec(et.slice(Mt,Mt+1));return pt?Mt+pt[0].length:-1}function B(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.Q=+pt[0],Mt+pt[0].length):-1}function F(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.s=+pt[0],Mt+pt[0].length):-1}function P(Je,et){return o(Je.getDate(),et,2)}function j(Je,et){return o(Je.getHours(),et,2)}function U(Je,et){return o(Je.getHours()%12||12,et,2)}function $(Je,et){return o(1+b.timeDay.count(b.timeYear(Je),Je),et,3)}function Q(Je,et){return o(Je.getMilliseconds(),et,3)}function re(Je,et){return Q(Je,et)+"000"}function ne(Je,et){return o(Je.getMonth()+1,et,2)}function se(Je,et){return o(Je.getMinutes(),et,2)}function G(Je,et){return o(Je.getSeconds(),et,2)}function X(Je){var et=Je.getDay();return et===0?7:et}function K(Je,et){return o(b.timeSunday.count(b.timeYear(Je)-1,Je),et,2)}function H(Je){var et=Je.getDay();return et>=4||et===0?b.timeThursday(Je):b.timeThursday.ceil(Je)}function Y(Je,et){return Je=H(Je),o(b.timeThursday.count(b.timeYear(Je),Je)+(b.timeYear(Je).getDay()===4),et,2)}function q(Je){return Je.getDay()}function Z(Je,et){return o(b.timeMonday.count(b.timeYear(Je)-1,Je),et,2)}function ee(Je,et){return o(Je.getFullYear()%100,et,2)}function ae(Je,et){return Je=H(Je),o(Je.getFullYear()%100,et,2)}function he(Je,et){return o(Je.getFullYear()%1e4,et,4)}function xe(Je,et){var Mt=Je.getDay();return Je=Mt>=4||Mt===0?b.timeThursday(Je):b.timeThursday.ceil(Je),o(Je.getFullYear()%1e4,et,4)}function we(Je){var et=Je.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+o(et/60|0,"0",2)+o(et%60,"0",2)}function Me(Je,et){return o(Je.getUTCDate(),et,2)}function Se(Je,et){return o(Je.getUTCHours(),et,2)}function Ie(Je,et){return o(Je.getUTCHours()%12||12,et,2)}function Ve(Je,et){return o(1+b.utcDay.count(b.utcYear(Je),Je),et,3)}function Ge(Je,et){return o(Je.getUTCMilliseconds(),et,3)}function ke(Je,et){return Ge(Je,et)+"000"}function _e(Je,et){return o(Je.getUTCMonth()+1,et,2)}function ce(Je,et){return o(Je.getUTCMinutes(),et,2)}function ve(Je,et){return o(Je.getUTCSeconds(),et,2)}function le(Je){var et=Je.getUTCDay();return et===0?7:et}function Ae(Je,et){return o(b.utcSunday.count(b.utcYear(Je)-1,Je),et,2)}function Be(Je){var et=Je.getUTCDay();return et>=4||et===0?b.utcThursday(Je):b.utcThursday.ceil(Je)}function Xe(Je,et){return Je=Be(Je),o(b.utcThursday.count(b.utcYear(Je),Je)+(b.utcYear(Je).getUTCDay()===4),et,2)}function Ye(Je){return Je.getUTCDay()}function yt(Je,et){return o(b.utcMonday.count(b.utcYear(Je)-1,Je),et,2)}function gt(Je,et){return o(Je.getUTCFullYear()%100,et,2)}function Tt(Je,et){return Je=Be(Je),o(Je.getUTCFullYear()%100,et,2)}function At(Je,et){return o(Je.getUTCFullYear()%1e4,et,4)}function $t(Je,et){var Mt=Je.getUTCDay();return Je=Mt>=4||Mt===0?b.utcThursday(Je):b.utcThursday.ceil(Je),o(Je.getUTCFullYear()%1e4,et,4)}function rr(){return"+0000"}function _r(){return"%"}function Xt(Je){return+Je}function or(Je){return Math.floor(+Je/1e3)}var Ot;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(Je){return Ot=e(Je),p.timeFormat=Ot.format,p.timeParse=Ot.parse,p.utcFormat=Ot.utcFormat,p.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function De(Je){return Je.toISOString()}var Ne=Date.prototype.toISOString?De:p.utcFormat(ht);function We(Je){var et=new Date(Je);return isNaN(et)?null:et}var Ke=+new Date("2000-01-01T00:00:00.000Z")?We:p.utcParse(ht);p.isoFormat=Ne,p.isoParse=Ke,p.timeFormatDefaultLocale=vt,p.timeFormatLocale=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),Cw=ze({"node_modules/d3-format/dist/d3-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function E(T,f){if((u=(T=f?T.toExponential(f-1):T.toExponential()).indexOf("e"))<0)return null;var u,A=T.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+T.slice(u+1)]}function k(T){return T=E(Math.abs(T)),T?T[1]:NaN}function l(T,f){return function(u,A){for(var x=u.length,z=[],I=0,O=T[0],D=0;x>0&&O>0&&(D+O+1>A&&(O=Math.max(1,A-D)),z.push(u.substring(x-=O,x+O)),!((D+=O+1)>A));)O=T[I=(I+1)%T.length];return z.reverse().join(f)}}function e(T){return function(f){return f.replace(/[0-9]/g,function(u){return T[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(T){if(!(f=t.exec(T)))throw new Error("invalid format: "+T);var f;return new r({fill:f[1],align:f[2],sign:f[3],symbol:f[4],zero:f[5],width:f[6],comma:f[7],precision:f[8]&&f[8].slice(1),trim:f[9],type:f[10]})}n.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.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 a(T){e:for(var f=T.length,u=1,A=-1,x;u0&&(A=0);break}return A>0?T.slice(0,A)+T.slice(x+1):T}var o;function s(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1],z=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(T,Math.max(0,f+z-1))[0]}function c(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1];return x<0?"0."+new Array(-x).join("0")+A:A.length>x+1?A.slice(0,x+1)+"."+A.slice(x+1):A+new Array(x-A.length+2).join("0")}var m={"%":function(T,f){return(T*100).toFixed(f)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:b,e:function(T,f){return T.toExponential(f)},f:function(T,f){return T.toFixed(f)},g:function(T,f){return T.toPrecision(f)},o:function(T){return Math.round(T).toString(8)},p:function(T,f){return c(T*100,f)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function h(T){return T}var v=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(T){var f=T.grouping===void 0||T.thousands===void 0?h:l(v.call(T.grouping,Number),T.thousands+""),u=T.currency===void 0?"":T.currency[0]+"",A=T.currency===void 0?"":T.currency[1]+"",x=T.decimal===void 0?".":T.decimal+"",z=T.numerals===void 0?h:e(v.call(T.numerals,String)),I=T.percent===void 0?"%":T.percent+"",O=T.minus===void 0?"-":T.minus+"",D=T.nan===void 0?"NaN":T.nan+"";function B(P){P=n(P);var j=P.fill,U=P.align,$=P.sign,Q=P.symbol,re=P.zero,ne=P.width,se=P.comma,G=P.precision,X=P.trim,K=P.type;K==="n"?(se=!0,K="g"):m[K]||(G===void 0&&(G=12),X=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var H=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Y=Q==="$"?A:/[%p]/.test(K)?I:"",q=m[K],Z=/[defgprs%]/.test(K);G=G===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function ee(ae){var he=H,xe=Y,we,Me,Se;if(K==="c")xe=q(ae)+xe,ae="";else{ae=+ae;var Ie=ae<0||1/ae<0;if(ae=isNaN(ae)?D:q(Math.abs(ae),G),X&&(ae=a(ae)),Ie&&+ae==0&&$!=="+"&&(Ie=!1),he=(Ie?$==="("?$:O:$==="-"||$==="("?"":$)+he,xe=(K==="s"?g[8+o/3]:"")+xe+(Ie&&$==="("?")":""),Z){for(we=-1,Me=ae.length;++weSe||Se>57){xe=(Se===46?x+ae.slice(we+1):ae.slice(we))+xe,ae=ae.slice(0,we);break}}}se&&!re&&(ae=f(ae,1/0));var Ve=he.length+ae.length+xe.length,Ge=Ve>1)+he+ae+xe+Ge.slice(Ve);break;default:ae=Ge+he+ae+xe;break}return z(ae)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=n(P),P.type="f",P)),$=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-$),re=g[8+$/3];return function(ne){return U(Q*ne)+re}}return{format:B,formatPrefix:F}}var w;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(T){return w=i(T),p.format=w.format,p.formatPrefix=w.formatPrefix,w}function M(T){return Math.max(0,-k(Math.abs(T)))}function C(T,f){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(f)/3)))*3-k(Math.abs(T)))}function _(T,f){return T=Math.abs(T),f=Math.abs(f)-T,Math.max(0,k(f)-k(T))+1}p.FormatSpecifier=r,p.formatDefaultLocale=S,p.formatLocale=i,p.formatSpecifier=n,p.precisionFixed=M,p.precisionPrefix=C,p.precisionRound=_,Object.defineProperty(p,"__esModule",{value:!0})})}}),FR=ze({"node_modules/is-string-blank/index.js"(J,V){"use strict";V.exports=function(p){for(var b=p.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),ao=ze({"node_modules/fast-isnumeric/index.js"(J,V){"use strict";var p=FR();V.exports=function(b){var E=typeof b;if(E==="string"){var k=b;if(b=+b,b===0&&p(k))return!1}else if(E!=="number")return!1;return b-b<1}}}),No=ze({"src/constants/numerical.js"(J,V){"use strict";V.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"}}}),Lw=ze({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p["base64-arraybuffer"]={}))})(J,function(p){"use strict";for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=b[(n[r]&3)<<4|n[r+1]>>4],o+=b[(n[r+1]&15)<<2|n[r+2]>>6],o+=b[n[r+2]&63];return a%3===2?o=o.substring(0,o.length-1)+"=":a%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var n=t.length*.75,r=t.length,a,o=0,s,c,m,h;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);var v=new ArrayBuffer(n),g=new Uint8Array(v);for(a=0;a>4,g[o++]=(c&15)<<4|m>>2,g[o++]=(m&3)<<6|h&63;return v};p.decode=e,p.encode=l,Object.defineProperty(p,"__esModule",{value:!0})})}}),tv=ze({"src/lib/is_plain_object.js"(J,V){"use strict";V.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),Ff=ze({"src/lib/array.js"(J){"use strict";var V=Lw().decode,p=tv(),b=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return b(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return b(s)||(s=[]),s.length=c,s};var n={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};n.uint8c=n.u1c,n.uint8=n.u1,n.int8=n.i1,n.uint16=n.u2,n.int16=n.i2,n.uint32=n.u4,n.int32=n.i4,n.float32=n.f4,n.float64=n.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],m=a(s),h=m.dtype,v=n[h];if(!v)throw new Error('Error in dtype: "'+h+'"');var g=v.BYTES_PER_ELEMENT,i=m.bdata;r(i)||(i=V(i));var w=m.shape===void 0?[i.byteLength/g]:(""+m.shape).split(",");w.reverse();var S=w.length,M,C,_=+w[0],T=g*_,f=0;if(S===1)c=new v(i);else if(S===2)for(M=+w[1],C=0;C2)return v[M]=v[M]|l,w.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return p(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),OR=ze({"src/lib/relink_private.js"(J,V){"use strict";var p=Ff().isArrayOrTypedArray,b=tv();V.exports=function E(k,l){for(var e in l){var t=l[e],n=k[e];if(n!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(p(t)&&p(n)&&b(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,n.length),a=0;aNR,modHalf:()=>jR});function NR(J,V){let p=J%V;return p<0?p+V:p}function jR(J,V){return Math.abs(J)>V/2?J-Math.round(J/V)*V:J}var Um=zi({"src/lib/mod.ts"(){"use strict"}}),Ki=ze({"src/lib/extend.js"(J){"use strict";var V=tv(),p=Array.isArray;function b(k,l){var e,t;for(e=0;e{for(var Qe in Ue)p(Le,Qe,{get:Ue[Qe],enumerable:!0})},e=(Le,Ue,Qe,_t)=>{if(Ue&&typeof Ue=="object"||typeof Ue=="function")for(let wt of E(Ue))!k.call(Le,wt)&&wt!==Qe&&p(Le,wt,{get:()=>Ue[wt],enumerable:!(_t=b(Ue,wt))||_t.enumerable});return Le},t=Le=>e(p({},"__esModule",{value:!0}),Le),n={};l(n,{a98:()=>So,average:()=>Tr,averageAngle:()=>rt,averageNumber:()=>fr,blend:()=>ll,blerp:()=>Ye,clampChroma:()=>dr,clampGamut:()=>ir,clampRgb:()=>Ut,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>Nn,convertDlchToLab65:()=>oo,convertHsiToRgb:()=>ds,convertHslToRgb:()=>wo,convertHsvToRgb:()=>Ts,convertHwbToRgb:()=>yo,convertItpToXyz65:()=>ms,convertJabToJch:()=>Nu,convertJabToRgb:()=>Hc,convertJabToXyz65:()=>Gc,convertJchToJab:()=>al,convertLab65ToDlch:()=>qn,convertLab65ToRgb:()=>rn,convertLab65ToXyz65:()=>tn,convertLabToLch:()=>kt,convertLabToRgb:()=>vl,convertLabToXyz50:()=>tc,convertLchToLab:()=>ar,convertLchuvToLuv:()=>qu,convertLrgbToOklab:()=>tr,convertLrgbToRgb:()=>Pt,convertLuvToLchuv:()=>hu,convertLuvToXyz50:()=>Gf,convertOkhslToOklab:()=>_i,convertOkhsvToOklab:()=>Ln,convertOklabToLrgb:()=>ba,convertOklabToOkhsl:()=>yi,convertOklabToOkhsv:()=>kn,convertOklabToRgb:()=>Na,convertP3ToXyz65:()=>zo,convertProphotoToXyz50:()=>mc,convertRec2020ToXyz65:()=>Wu,convertRgbToCubehelix:()=>Xa,convertRgbToHsi:()=>jo,convertRgbToHsl:()=>pi,convertRgbToHsv:()=>Bo,convertRgbToHwb:()=>bs,convertRgbToJab:()=>$l,convertRgbToLab:()=>mf,convertRgbToLab65:()=>fn,convertRgbToLrgb:()=>Ke,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>rc,convertRgbToXyz65:()=>et,convertRgbToYiq:()=>Ba,convertXybToRgb:()=>mt,convertXyz50ToLab:()=>ac,convertXyz50ToLuv:()=>Vu,convertXyz50ToProphoto:()=>xl,convertXyz50ToRgb:()=>Tu,convertXyz50ToXyz65:()=>jr,convertXyz65ToA98:()=>De,convertXyz65ToItp:()=>zu,convertXyz65ToJab:()=>wc,convertXyz65ToLab65:()=>no,convertXyz65ToP3:()=>js,convertXyz65ToRec2020:()=>bf,convertXyz65ToRgb:()=>qt,convertXyz65ToXyz50:()=>Br,convertYiqToRgb:()=>Tn,converter:()=>P,cubehelix:()=>Ws,differenceCie76:()=>on,differenceCie94:()=>en,differenceCiede2000:()=>vi,differenceCmc:()=>Yi,differenceEuclidean:()=>Yn,differenceHueChroma:()=>li,differenceHueNaive:()=>Un,differenceHueSaturation:()=>yn,differenceHyab:()=>Ja,differenceItp:()=>lt,differenceKotsarenkoRamos:()=>Oa,displayable:()=>st,dlab:()=>Zo,dlch:()=>es,easingGamma:()=>je,easingInOutSine:()=>Mo,easingMidpoint:()=>Hr,easingSmootherstep:()=>Wi,easingSmoothstep:()=>so,easingSmoothstepInverse:()=>ti,filterBrightness:()=>ga,filterContrast:()=>da,filterDeficiencyDeuter:()=>Jn,filterDeficiencyProt:()=>In,filterDeficiencyTrit:()=>Ei,filterGrayscale:()=>Cn,filterHueRotate:()=>ui,filterInvert:()=>Dn,filterSaturate:()=>za,filterSepia:()=>Fa,fixupAlpha:()=>$t,fixupHueDecreasing:()=>cr,fixupHueIncreasing:()=>ur,fixupHueLonger:()=>nr,fixupHueShorter:()=>Rt,formatCss:()=>wi,formatHex:()=>sl,formatHex8:()=>sc,formatHsl:()=>Ps,formatRgb:()=>tu,getMode:()=>se,hsi:()=>$o,hsl:()=>_s,hsv:()=>Go,hwb:()=>Ys,inGamut:()=>It,interpolate:()=>oa,interpolateWith:()=>fa,interpolateWithPremultipliedAlpha:()=>Ea,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>hn,interpolatorSplineBasisClosed:()=>An,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>fe,interpolatorSplineMonotoneClosed:()=>be,interpolatorSplineNatural:()=>$n,interpolatorSplineNaturalClosed:()=>xi,itp:()=>Ll,jab:()=>mo,jch:()=>ru,lab:()=>Rs,lab65:()=>Yu,lch:()=>Ul,lch65:()=>ql,lchuv:()=>fo,lerp:()=>Be,lrgb:()=>Xo,luv:()=>Os,mapAlphaDivide:()=>ct,mapAlphaMultiply:()=>at,mapTransferGamma:()=>St,mapTransferLinear:()=>Nt,mapper:()=>tt,modeA98:()=>Ht,modeCubehelix:()=>Dr,modeDlab:()=>go,modeDlch:()=>Ao,modeHsi:()=>to,modeHsl:()=>Vs,modeHsv:()=>Pi,modeHwb:()=>dl,modeItp:()=>bc,modeJab:()=>Qu,modeJch:()=>ju,modeLab:()=>Sl,modeLab65:()=>oh,modeLch:()=>nl,modeLch65:()=>Kc,modeLchuv:()=>kl,modeLrgb:()=>Cc,modeLuv:()=>vc,modeOkhsl:()=>ri,modeOkhsv:()=>Zi,modeOklab:()=>Yo,modeOklch:()=>ns,modeP3:()=>zl,modeProphoto:()=>oc,modeRec2020:()=>Qc,modeRgb:()=>_r,modeXyb:()=>Bt,modeXyz50:()=>Wt,modeXyz65:()=>la,modeYiq:()=>Si,nearest:()=>vr,okhsl:()=>ra,okhsv:()=>Ya,oklab:()=>Ka,oklch:()=>Bi,p3:()=>rs,parse:()=>_e,parseHex:()=>g,parseHsl:()=>Ss,parseHslLegacy:()=>Uo,parseHwb:()=>hl,parseLab:()=>ih,parseLch:()=>$c,parseNamed:()=>m,parseOklab:()=>Do,parseOklch:()=>Gs,parseRgb:()=>ve,parseRgbLegacy:()=>O,parseTransparent:()=>Ae,prophoto:()=>Is,random:()=>qe,rec2020:()=>Oi,removeParser:()=>X,rgb:()=>Wr,round:()=>Qi,samples:()=>ut,serializeHex:()=>jl,serializeHex8:()=>Hs,serializeHsl:()=>hi,serializeRgb:()=>Cu,toGamut:()=>Ar,trilerp:()=>yt,unlerp:()=>Xe,useMode:()=>ne,useParser:()=>G,wcagContrast:()=>Bs,wcagLuminance:()=>zs,xyb:()=>na,xyz50:()=>pa,xyz65:()=>Wa,yiq:()=>ln}),V.exports=t(n);var r=(Le,Ue)=>{if(typeof Le=="number"){if(Ue===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Ue===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Ue===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Ue===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},a=r,o={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},s=o,c=Le=>a(s[Le.toLowerCase()],6),m=c,h=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,v=Le=>{let Ue;return(Ue=Le.match(h))?a(parseInt(Ue[1],16),Ue[1].length):void 0},g=v,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",w=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,T=`(?:${i}(deg|grad|rad|turn)|${i})`,f=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),x=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Ue={mode:"rgb"},Qe;if(Qe=Le.match(x))Qe[1]!==void 0&&(Ue.r=Qe[1]/255),Qe[2]!==void 0&&(Ue.g=Qe[2]/255),Qe[3]!==void 0&&(Ue.b=Qe[3]/255);else if(Qe=Le.match(z))Qe[1]!==void 0&&(Ue.r=Qe[1]/100),Qe[2]!==void 0&&(Ue.g=Qe[2]/100),Qe[3]!==void 0&&(Ue.b=Qe[3]/100);else return;return Qe[4]!==void 0?Ue.alpha=Math.max(0,Math.min(1,Qe[4]/100)):Qe[5]!==void 0&&(Ue.alpha=Math.max(0,Math.min(1,+Qe[5]))),Ue},O=I,D=(Le,Ue)=>Le===void 0?void 0:typeof Le!="object"?_e(Le):Le.mode!==void 0?Le:Ue?lo(Li({},Le),{mode:Ue}):void 0,B=D,F=(Le="rgb")=>Ue=>(Ue=B(Ue,Le))!==void 0?Ue.mode===Le?Ue:j[Ue.mode][Le]?j[Ue.mode][Le](Ue):Le==="rgb"?j[Ue.mode].rgb(Ue):j.rgb[Le](j[Ue.mode].rgb(Ue)):void 0,P=F,j={},U={},$=[],Q={},re=Le=>Le,ne=Le=>(j[Le.mode]=Li(Li({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Ue=>{j[Ue]||(j[Ue]={}),j[Ue][Le.mode]=Le.fromMode[Ue]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Ue=>{if(Le.ranges[Ue]===void 0&&(Le.ranges[Ue]=[0,1]),!Le.interpolate[Ue])throw new Error(`Missing interpolator for: ${Ue}`);typeof Le.interpolate[Ue]=="function"&&(Le.interpolate[Ue]={use:Le.interpolate[Ue]}),Le.interpolate[Ue].fixup||(Le.interpolate[Ue].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Ue=>{G(Ue,Le.mode)}),P(Le.mode)),se=Le=>U[Le],G=(Le,Ue)=>{if(typeof Le=="string"){if(!Ue)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Ue}else typeof Le=="function"&&$.indexOf(Le)<0&&$.push(Le)},X=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Ue=$.indexOf(Le);Ue>0&&$.splice(Ue,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,H=/[^\x00-\x7F]|[-\w]/,Y={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function Z(Le){let Ue=Le[q],Qe=Le[q+1];return Ue==="-"||Ue==="+"?/\d/.test(Qe)||Qe==="."&&/\d/.test(Le[q+2]):Ue==="."?/\d/.test(Qe):/\d/.test(Ue)}function ee(Le){if(q>=Le.length)return!1;let Ue=Le[q];if(K.test(Ue))return!0;if(Ue==="-"){if(Le.length-q<2)return!1;let Qe=Le[q+1];return!!(Qe==="-"||K.test(Qe))}return!1}var ae={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(Le){let Ue="";if((Le[q]==="-"||Le[q]==="+")&&(Ue+=Le[q++]),Ue+=xe(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Ue+=Le[q++]+Le[q++]+xe(Le):/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le))),ee(Le)){let Qe=we(Le);return Qe==="deg"||Qe==="rad"||Qe==="turn"||Qe==="grad"?{type:Y.Hue,value:Ue*ae[Qe]}:void 0}return Le[q]==="%"?(q++,{type:Y.Percentage,value:+Ue}):{type:Y.Number,value:+Ue}}function xe(Le){let Ue="";for(;/\d/.test(Le[q]);)Ue+=Le[q++];return Ue}function we(Le){let Ue="";for(;q4)){if(Qe.length===4){if(Qe[3].type!==Y.Alpha)return;Qe[3]=Qe[3].value}return Qe.length===3&&Qe.push({type:Y.None,value:void 0}),Qe.every(wt=>wt.type!==Y.Alpha)?Qe:void 0}}function Ge(Le,Ue){Le._i=0;let Qe=Le[Le._i++];if(!Qe||Qe.type!==Y.Function)return;let _t=Ve(Le,Ue);if(_t)return _t.unshift(Qe.value),_t}var ke=Le=>{if(typeof Le!="string")return;let Ue=Se(Le),Qe=Ue?Ge(Ue,!0):void 0,_t,wt=0,Lt=$.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ae=le,Be=(Le,Ue,Qe)=>Le+Qe*(Ue-Le),Xe=(Le,Ue,Qe)=>(Qe-Le)/(Ue-Le),Ye=(Le,Ue,Qe,_t,wt,Lt)=>Be(Be(Le,Ue,wt),Be(Qe,_t,wt),Lt),yt=(Le,Ue,Qe,_t,wt,Lt,pr,Gr,va,Qa,Ga)=>Be(Ye(Le,Ue,Qe,_t,va,Qa),Ye(wt,Lt,pr,Gr,va,Qa),Ga),gt=Le=>{let Ue=[];for(let Qe=0;QeUe=>{let Qe=gt(Ue);return _t=>{let wt=_t*Qe.length,Lt=_t>=1?Qe.length-1:Math.max(Math.floor(wt),0),pr=Qe[Lt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Lt)}},At=Tt(Be),$t=Le=>{let Ue=!1,Qe=Le.map(_t=>_t!==void 0?(Ue=!0,_t):1);return Ue?Qe:Le},rr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,g,O,m,Ae,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:$t}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=rr,Xt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),or=Le=>{let Ue=Xt(Le.r),Qe=Xt(Le.g),_t=Xt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Ue+.1855582379065463*Qe+.1882286462349947*_t,y:.297344975250536*Ue+.6273635662554661*Qe+.0752914584939979*_t,z:.0270313613864123*Ue+.0706888525358272*Qe+.9913375368376386*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=or,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Ue*.5650069742788597-.3447313507783297*Qe),g:vt(Le*-.9692436362808798+Ue*1.8759675015077206+.0415550574071756*Qe),b:vt(Le*.0134442806320312-Ue*.1183623922310184+1.0151749943912058*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},De=ht,Ne=(Le=0)=>{let Ue=Math.abs(Le);return Ue<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Ue+.055)/1.055,2.4)},We=({r:Le,g:Ue,b:Qe,alpha:_t})=>{let wt={mode:"lrgb",r:Ne(Le),g:Ne(Ue),b:Ne(Qe)};return _t!==void 0&&(wt.alpha=_t),wt},Ke=We,Je=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.4123907992659593*Ue+.357584339383878*Qe+.1804807884018343*_t,y:.2126390058715102*Ue+.715168678767756*Qe+.0721923153607337*_t,z:.0193308187155918*Ue+.119194779794626*Qe+.9505321522496607*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},et=Je,Mt=(Le=0)=>{let Ue=Math.abs(Le);return Ue>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Ue,1/2.4)-.055):Le*12.92},pt=({r:Le,g:Ue,b:Qe,alpha:_t},wt="rgb")=>{let Lt={mode:wt,r:Mt(Le),g:Mt(Ue),b:Mt(Qe)};return _t!==void 0&&(Lt.alpha=_t),Lt},Pt=pt,Ct=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.2409699419045226-Ue*1.537383177570094-.4986107602930034*Qe,g:Le*-.9692436362808796+Ue*1.8759675015077204+.0415550574071756*Qe,b:Le*.0556300796969936-Ue*.2039769588889765+1.0569715142428784*Qe});return _t!==void 0&&(wt.alpha=_t),wt},qt=Ct,Vt=lo(Li({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>De(et(Le)),xyz65:De},toMode:{rgb:Le=>qt(Ot(Le)),xyz65:Ot}}),Ht=Vt,Sr=Le=>(Le=Le%360)<0?Le+360:Le,Kr=Sr,Yt=(Le,Ue)=>Le.map((Qe,_t,wt)=>{if(Qe===void 0)return Qe;let Lt=Kr(Qe);return _t===0||Le[_t-1]===void 0?Lt:Ue(Lt-Kr(wt[_t-1]))}).reduce((Qe,_t)=>!Qe.length||_t===void 0||Qe[Qe.length-1]===void 0?(Qe.push(_t),Qe):(Qe.push(_t+Qe[Qe.length-1]),Qe),[]),Rt=Le=>Yt(Le,Ue=>Math.abs(Ue)<=180?Ue:Ue-360*Math.sign(Ue)),nr=Le=>Yt(Le,Ue=>Math.abs(Ue)>=180||Ue===0?Ue:Ue-360*Math.sign(Ue)),ur=Le=>Yt(Le,Ue=>Ue>=0?Ue:Ue+360),cr=Le=>Yt(Le,Ue=>Ue<=0?Ue:Ue-360),Rr=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Qr=Math.PI/180,Zr=180/Math.PI,ha=Rr[3]*Rr[4],Pa=Rr[1]*Rr[4],La=Rr[1]*Rr[2]-Rr[0]*Rr[3],un=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(La*Qe+Le*ha-Ue*Pa)/(La+ha-Pa),Lt=Qe-wt,pr=(Rr[4]*(Ue-wt)-Rr[2]*Lt)/Rr[3],Gr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Lt*Lt+pr*pr)/(Rr[4]*wt*(1-wt))};return Gr.s&&(Gr.h=Math.atan2(pr,Lt)*Zr-120),_t!==void 0&&(Gr.alpha=_t),Gr},Xa=un,ja=({h:Le,s:Ue,l:Qe,alpha:_t})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*Qr,Qe===void 0&&(Qe=0);let Lt=Ue===void 0?0:Ue*Qe*(1-Qe),pr=Math.cos(Le),Gr=Math.sin(Le);return wt.r=Qe+Lt*(Rr[0]*pr+Rr[1]*Gr),wt.g=Qe+Lt*(Rr[2]*pr+Rr[3]*Gr),wt.b=Qe+Lt*(Rr[4]*pr+Rr[5]*Gr),_t!==void 0&&(wt.alpha=_t),wt},Nn=ja,yn=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.s||!Ue.s)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Ue.s)*wt},Un=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h);return Math.abs(_t-Qe)>180?Qe-(_t-360*Math.sign(_t-Qe)):_t-Qe},li=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.c||!Ue.c)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Ue.c)*wt},Yn=(Le="rgb",Ue=[1,1,1,0])=>{let Qe=se(Le),_t=Qe.channels,wt=Qe.difference,Lt=P(Le);return(pr,Gr)=>{let va=Lt(pr),Qa=Lt(Gr);return Math.sqrt(_t.reduce((Ga,Ua,An)=>{let dn=wt[Ua]?wt[Ua](va,Qa):va[Ua]-Qa[Ua];return Ga+(Ue[An]||0)*Math.pow(isNaN(dn)?0:dn,2)},0))}},on=()=>Yn("lab65"),en=(Le=1,Ue=.045,Qe=.015)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),An=Gr.l,dn=Gr.a,_n=Gr.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(va-An,2),Zn=Math.pow(Ua-Mn,2),Ci=Math.pow(Qa-dn,2)+Math.pow(Ga-_n,2)-Zn;return Math.sqrt(Bn/Math.pow(Le,2)+Zn/Math.pow(1+Ue*Ua,2)+Ci/Math.pow(1+Qe*Ua,2))}},vi=(Le=1,Ue=1,Qe=1)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),An=Gr.l,dn=Gr.a,_n=Gr.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=(Ua+Mn)/2,Zn=.5*(1-Math.sqrt(Math.pow(Bn,7)/(Math.pow(Bn,7)+Math.pow(25,7)))),Ci=Qa*(1+Zn),qo=dn*(1+Zn),As=Math.sqrt(Ci*Ci+Ga*Ga),ls=Math.sqrt(qo*qo+_n*_n),Vl=Math.abs(Ci)+Math.abs(Ga)===0?0:Math.atan2(Ga,Ci);Vl+=(Vl<0)*2*Math.PI;let au=Math.abs(qo)+Math.abs(_n)===0?0:Math.atan2(_n,qo);au+=(au<0)*2*Math.PI;let Lu=An-va,uh=ls-As,wh=As*ls===0?0:au-Vl;wh-=(wh>Math.PI)*2*Math.PI,wh+=(wh<-Math.PI)*2*Math.PI;let Gh=2*Math.sqrt(As*ls)*Math.sin(wh/2),Gd=(va+An)/2,Ad=(As+ls)/2,ch;As*ls===0?ch=Vl+au:(ch=(Vl+au)/2,ch-=(Math.abs(Vl-au)>Math.PI)*Math.PI,ch+=(ch<0)*2*Math.PI);let Mv=Math.pow(Gd-50,2),vp=1-.17*Math.cos(ch-Math.PI/6)+.24*Math.cos(2*ch)+.32*Math.cos(3*ch+Math.PI/30)-.2*Math.cos(4*ch-63*Math.PI/180),mp=1+.015*Mv/Math.sqrt(20+Mv),gp=1+.045*Ad,yp=1+.015*Ad*vp,xg=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ch-275)/25,2)),p0=2*Math.sqrt(Math.pow(Ad,7)/(Math.pow(Ad,7)+Math.pow(25,7))),Md=-1*Math.sin(2*xg)*p0;return Math.sqrt(Math.pow(Lu/(Le*mp),2)+Math.pow(uh/(Ue*gp),2)+Math.pow(Gh/(Qe*yp),2)+Md*uh/(Ue*gp)*Gh/(Qe*yp))}},Yi=(Le=1,Ue=1)=>{let Qe=P("lab65");return(_t,wt)=>{let Lt=Qe(_t),pr=Lt.l,Gr=Lt.a,va=Lt.b,Qa=Math.sqrt(Gr*Gr+va*va),Ga=Math.atan2(va,Gr);Ga=Ga+2*Math.PI*(Ga<0);let Ua=Qe(wt),An=Ua.l,dn=Ua.a,_n=Ua.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(pr-An,2),Zn=Math.pow(Qa-Mn,2),Ci=Math.pow(Gr-dn,2)+Math.pow(va-_n,2)-Zn,qo=Math.sqrt(Math.pow(Qa,4)/(Math.pow(Qa,4)+1900)),As=Ga>=164/180*Math.PI&&Ga<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Ga+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Ga+35/180*Math.PI)),ls=pr<16?.511:.040975*pr/(1+.01765*pr),Vl=.0638*Qa/(1+.0131*Qa)+.638,au=Vl*(qo*As+1-qo);return Math.sqrt(Bn/Math.pow(Le*ls,2)+Zn/Math.pow(Ue*Vl,2)+Ci/Math.pow(au,2))}},Ja=()=>{let Le=P("lab65");return(Ue,Qe)=>{let _t=Le(Ue),wt=Le(Qe),Lt=_t.l-wt.l,pr=_t.a-wt.a,Gr=_t.b-wt.b;return Math.abs(Lt)+Math.sqrt(pr*pr+Gr*Gr)}},Oa=()=>Yn("yiq",[.5053,.299,.1957]),lt=()=>Yn("itp",[518400,129600,518400]),rt=Le=>{let Ue=Le.reduce((_t,wt)=>{if(wt!==void 0){let Lt=wt*Math.PI/180;_t.sin+=Math.sin(Lt),_t.cos+=Math.cos(Lt)}return _t},{sin:0,cos:0}),Qe=Math.atan2(Ue.sin,Ue.cos)*180/Math.PI;return Qe<0?360+Qe:Qe},fr=Le=>{let Ue=Le.filter(Qe=>Qe!==void 0);return Ue.length?Ue.reduce((Qe,_t)=>Qe+_t,0)/Ue.length:void 0},lr=Le=>typeof Le=="function";function Tr(Le,Ue="rgb",Qe){let _t=se(Ue),wt=Le.map(P(Ue));return _t.channels.reduce((Lt,pr)=>{let Gr=wt.map(va=>va[pr]).filter(va=>va!==void 0);if(Gr.length){let va;lr(Qe)?va=Qe:Qe&&lr(Qe[pr])?va=Qe[pr]:_t.average&&lr(_t.average[pr])?va=_t.average[pr]:va=fr,Lt[pr]=va(Gr,pr)}return Lt},{mode:Ue})}var Ir={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Xa},toMode:{rgb:Nn},interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Dr=Ir,ot=({l:Le,a:Ue,b:Qe,alpha:_t},wt="lch")=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let Lt=Math.sqrt(Ue*Ue+Qe*Qe),pr={mode:wt,l:Le,c:Lt};return Lt&&(pr.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(pr.alpha=_t),pr},kt=ot,jt=({l:Le,c:Ue,h:Qe,alpha:_t},wt="lab")=>{Qe===void 0&&(Qe=0);let Lt={mode:wt,l:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(Lt.alpha=_t),Lt},ar=jt,Er=Math.pow(29,3)/Math.pow(3,3),xr=Math.pow(6,3)/Math.pow(29,3),zr={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Lr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},aa=Math.pow(29,3)/Math.pow(3,3),Sa=Math.pow(6,3)/Math.pow(29,3),wa=Le=>Math.pow(Le,3)>xr?Math.pow(Le,3):(116*Le-16)/Er,pn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz65",x:wa(Lt)*Lr.X,y:wa(wt)*Lr.Y,z:wa(pr)*Lr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tn=pn,ai=Le=>qt(tn(Le)),rn=ai,Ri=Le=>Le>xr?Math.cbrt(Le):(Er*Le+16)/116,Gn=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ri(Le/Lr.X),Lt=Ri(Ue/Lr.Y),pr=Ri(Qe/Lr.Z),Gr={mode:"lab65",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},no=Gn,Di=Le=>{let Ue=no(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},fn=Di,Ai=1,jn=1,Xn=26/180*Math.PI,eo=Math.cos(Xn),gi=Math.sin(Xn),qi=100/Math.log(139/100),io=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"lab65",l:(Math.exp(Le*Ai/qi)-1)/.0039},Lt=(Math.exp(.0435*Ue*jn*Ai)-1)/.075,pr=Lt*Math.cos(Qe/180*Math.PI-Xn),Gr=Lt*Math.sin(Qe/180*Math.PI-Xn);return wt.a=pr*eo-Gr/.83*gi,wt.b=pr*gi+Gr/.83*eo,_t!==void 0&&(wt.alpha=_t),wt},oo=io,Vn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue*eo+Qe*gi,Lt=.83*(Qe*eo-Ue*gi),pr=Math.sqrt(wt*wt+Lt*Lt),Gr={mode:"dlch",l:qi/Ai*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*jn*Ai)};return Gr.c&&(Gr.h=Kr((Math.atan2(Lt,wt)+Xn)/Math.PI*180)),_t!==void 0&&(Gr.alpha=_t),Gr},qn=Vn,Hi=Le=>oo(kt(Le,"dlch")),Mi=Le=>ar(qn(Le),"dlab"),Ro={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:Le=>rn(Hi(Le))},fromMode:{lab65:Mi,rgb:Le=>Mi(fn(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},go=Ro,Eo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:oo,dlab:Le=>ar(Le,"dlab"),rgb:Le=>rn(oo(Le))},fromMode:{lab65:qn,dlab:Le=>kt(Le,"dlch"),rgb:Le=>qn(fn(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:Rt},alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},Ao=Eo;function ds({h:Le,s:Ue,i:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 4:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 5:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function jo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsi",s:Le+Ue+Qe===0?0:1-3*Lt/(Le+Ue+Qe),i:(Le+Ue+Qe)/3};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue{switch(Ue){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Io=Vi,Xi=new RegExp(`^hsla?\\(\\s*${T}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),Ko=Le=>{let Ue=Le.match(Xi);if(!Ue)return;let Qe={mode:"hsl"};return Ue[3]!==void 0?Qe.h=+Ue[3]:Ue[1]!==void 0&&Ue[2]!==void 0&&(Qe.h=Io(Ue[1],Ue[2])),Ue[4]!==void 0&&(Qe.s=Math.min(Math.max(0,Ue[4]/100),1)),Ue[5]!==void 0&&(Qe.l=Math.min(Math.max(0,Ue[5]/100),1)),Ue[6]!==void 0?Qe.alpha=Math.max(0,Math.min(1,Ue[6]/100)):Ue[7]!==void 0&&(Qe.alpha=Math.max(0,Math.min(1,+Ue[7]))),Qe},Uo=Ko;function Ls(Le,Ue){if(!Ue||Ue[0]!=="hsl"&&Ue[0]!=="hsla")return;let Qe={mode:"hsl"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.s=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.l=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Ss=Ls,Vo={mode:"hsl",toMode:{rgb:wo},fromMode:{rgb:pi},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Ss,Uo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Vs=Vo;function Ts({h:Le,s:Ue,v:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe,g:Qe*(1-Ue*wt),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1-Ue*wt),g:Qe,b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe,b:Qe*(1-Ue*wt)};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue*wt),b:Qe};break;case 4:Lt={r:Qe*(1-Ue*wt),g:Qe*(1-Ue),b:Qe};break;case 5:Lt={r:Qe,g:Qe*(1-Ue),b:Qe*(1-Ue*wt)};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function Bo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsv",s:wt===0?0:1-Lt/wt,v:wt};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue1){let wt=Ue+Qe;Ue/=wt,Qe/=wt}return Ts({h:Le,s:Qe===1?1:1-Ue/(1-Qe),v:1-Qe,alpha:_t})}function bs(Le){let Ue=Bo(Le);if(Ue===void 0)return;let Qe=Ue.s!==void 0?Ue.s:0,_t=Ue.v!==void 0?Ue.v:0,wt={mode:"hwb",w:(1-Qe)*_t,b:1-_t};return Ue.h!==void 0&&(wt.h=Ue.h),Ue.alpha!==void 0&&(wt.alpha=Ue.alpha),wt}function Dl(Le,Ue){if(!Ue||Ue[0]!=="hwb")return;let Qe={mode:"hwb"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.w=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.b=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var hl=Dl,ps={mode:"hwb",toMode:{rgb:yo},fromMode:{rgb:bs},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[hl],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},w:At,b:At,alpha:{use:At,fixup:$t}},difference:{h:Un},average:{h:rt}},dl=ps,wu=203,lu=.1593017578125,xc=78.84375,Fl=.8359375,pl=18.8515625,$u=18.6875;function uu(Le){if(Le<0)return 0;let Ue=Math.pow(Le,1/xc);return 1e4*Math.pow(Math.max(0,Ue-Fl)/(pl-$u*Ue),1/lu)}function tl(Le){if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),xc)}var vs=Le=>Math.max(Le/wu,0),os=({i:Le,t:Ue,p:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=uu(Le+.008609037037932761*Ue+.11102962500302593*Qe),Lt=uu(Le-.00860903703793275*Ue-.11102962500302599*Qe),pr=uu(Le+.5600313357106791*Ue-.32062717498731885*Qe),Gr={mode:"xyz65",x:vs(2.070152218389422*wt-1.3263473389671556*Lt+.2066510476294051*pr),y:vs(.3647385209748074*wt+.680566024947227*Lt-.0453045459220346*pr),z:vs(-.049747207535812*wt-.0492609666966138*Lt+1.1880659249923042*pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ms=os,rl=(Le=0)=>Math.max(Le*wu,0),Fu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{let wt=rl(Le),Lt=rl(Ue),pr=rl(Qe),Gr=tl(.3592832590121217*wt+.6976051147779502*Lt-.0358915932320289*pr),va=tl(-.1920808463704995*wt+1.1004767970374323*Lt+.0753748658519118*pr),Qa=tl(.0070797844607477*wt+.0748396662186366*Lt+.8433265453898765*pr),Ga=.5*Gr+.5*va,Ua=1.61376953125*Gr-3.323486328125*va+1.709716796875*Qa,An=4.378173828125*Gr-4.24560546875*va-.132568359375*Qa,dn={mode:"itp",i:Ga,t:Ua,p:An};return _t!==void 0&&(dn.alpha=_t),dn},zu=Fu,Ku={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ms,rgb:Le=>qt(ms(Le))},fromMode:{xyz65:zu,rgb:Le=>zu(et(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:$t}}},bc=Ku,Lh=134.03437499999998,rh=16295499532821565e-27,Ju=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),Lh)},ss=(Le=0)=>Math.max(Le*203,0),ah=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le=ss(Le),Ue=ss(Ue),Qe=ss(Qe);let wt=1.15*Le-.15*Qe,Lt=.66*Ue+.34*Le,pr=Ju(.41478972*wt+.579999*Lt+.014648*Qe),Gr=Ju(-.20151*wt+1.120649*Lt+.0531008*Qe),va=Ju(-.0166008*wt+.2648*Lt+.6684799*Qe),Qa=(pr+Gr)/2,Ga={mode:"jab",j:.44*Qa/(1-.56*Qa)-rh,a:3.524*pr-4.066708*Gr+.542708*va,b:.199076*pr+1.096799*Gr-1.295875*va};return _t!==void 0&&(Ga.alpha=_t),Ga},wc=ah,pc=134.03437499999998,Nf=16295499532821565e-27,Bu=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le,1/pc);return 1e4*Math.pow((Fl-Ue)/($u*Ue-pl),1/lu)},Tc=Le=>Le/203,Ou=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+Nf)/(.44+.56*(Le+Nf)),Lt=Bu(wt+.13860504*Ue+.058047316*Qe),pr=Bu(wt-.13860504*Ue-.058047316*Qe),Gr=Bu(wt-.096019242*Ue-.8118919*Qe),va={mode:"xyz65",x:Tc(1.661373024652174*Lt-.914523081304348*pr+.23136208173913045*Gr),y:Tc(-.3250758611844533*Lt+1.571847026732543*pr-.21825383453227928*Gr),z:Tc(-.090982811*Lt-.31272829*pr+1.5227666*Gr)};return _t!==void 0&&(va.alpha=_t),va},Gc=Ou,pf=Le=>{let Ue=wc(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},$l=pf,jf=Le=>qt(Gc(Le)),Hc=jf,Wc={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:$l,xyz65:wc},toMode:{rgb:Hc,xyz65:Gc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Qu=Wc,Yc=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"jch",j:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},Nu=Yc,Uf=({j:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"jab",j:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},al=Uf,Xc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:al,rgb:Le=>Hc(al(Le))},fromMode:{rgb:Le=>Nu($l(Le)),jab:Nu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,j:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},ju=Xc,Ac=Math.pow(29,3)/Math.pow(3,3),Zc=Math.pow(6,3)/Math.pow(29,3),ec=Le=>Math.pow(Le,3)>Zc?Math.pow(Le,3):(116*Le-16)/Ac,cu=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz50",x:ec(Lt)*zr.X,y:ec(wt)*zr.Y,z:ec(pr)*zr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tc=cu,vf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.1341359569958707-Ue*1.6173863321612538-.4906619460083532*Qe,g:Le*-.978795502912089+Ue*1.916254567259524+.03344273116131949*Qe,b:Le*.07195537988411677-Ue*.2289768264158322+1.405386058324125*Qe});return _t!==void 0&&(wt.alpha=_t),wt},Tu=vf,nh=Le=>Tu(tc(Le)),vl=nh,ml=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz50",x:.436065742824811*Ue+.3851514688337912*Qe+.14307845442264197*_t,y:.22249319175623702*Ue+.7168870538238823*Qe+.06061979053616537*_t,z:.013923904500943465*Ue+.09708128566574634*Qe+.7140993584005155*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},rc=ml,yl=Le=>Le>Zc?Math.cbrt(Le):(Ac*Le+16)/116,qf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=yl(Le/zr.X),Lt=yl(Ue/zr.Y),pr=yl(Qe/zr.Z),Gr={mode:"lab",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ac=qf,Mc=Le=>{let Ue=ac(rc(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},mf=Mc;function Jo(Le,Ue){if(!Ue||Ue[0]!=="lab")return;let Qe={mode:"lab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.value),100)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*125/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*125/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var ih=Jo,fu={mode:"lab",toMode:{xyz50:tc,rgb:vl},fromMode:{xyz50:ac,rgb:mf},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ih],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Sl=fu,El=lo(Li({},Sl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:tn,rgb:rn},fromMode:{xyz65:no,rgb:fn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),oh=El;function Au(Le,Ue){if(!Ue||Ue[0]!=="lch")return;let Qe={mode:"lch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.value),100)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*150/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var $c=Au,_l={mode:"lch",toMode:{lab:ar,rgb:Le=>vl(ar(Le))},fromMode:{rgb:Le=>kt(mf(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$c],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},nl=_l,gf=lo(Li({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>rn(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(fn(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kc=gf,sh=({l:Le,u:Ue,v:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"lchuv",l:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},hu=sh,Uu=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"luv",l:Le,u:Ue?Ue*Math.cos(Qe/180*Math.PI):0,v:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},qu=Uu,nc=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),yf=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),_f=nc(zr.X,zr.Y,zr.Z),Mu=yf(zr.X,zr.Y,zr.Z),ic=Le=>Le<=Zc?Ac*Le:116*Math.cbrt(Le)-16,Sc=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=ic(Ue/zr.Y),Lt=nc(Le,Ue,Qe),pr=yf(Le,Ue,Qe);!isFinite(Lt)||!isFinite(pr)?wt=Lt=pr=0:(Lt=13*wt*(Lt-_f),pr=13*wt*(pr-Mu));let Gr={mode:"luv",l:wt,u:Lt,v:pr};return _t!==void 0&&(Gr.alpha=_t),Gr},Vu=Sc,xo=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),Ec=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),xh=xo(zr.X,zr.Y,zr.Z),Vf=Ec(zr.X,zr.Y,zr.Z),xf=({l:Le,u:Ue,v:Qe,alpha:_t})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue/(13*Le)+xh,Lt=Qe/(13*Le)+Vf,pr=zr.Y*(Le<=8?Le/Ac:Math.pow((Le+16)/116,3)),Gr=pr*(9*wt)/(4*Lt),va=pr*(12-3*wt-20*Lt)/(4*Lt),Qa={mode:"xyz50",x:Gr,y:pr,z:va};return _t!==void 0&&(Qa.alpha=_t),Qa},Gf=xf,bh=Le=>hu(Vu(rc(Le))),Hf=Le=>Tu(Gf(qu(Le))),il={mode:"lchuv",toMode:{luv:qu,rgb:Hf},fromMode:{rgb:bh,luv:hu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},kl=il,kc=lo(Li({},_r),{mode:"lrgb",toMode:{rgb:Pt},fromMode:{rgb:Ke},parse:["srgb-linear"],serialize:"srgb-linear"}),Cc=kc,Lc={mode:"luv",toMode:{xyz50:Gf,rgb:Le=>Tu(Gf(Le))},fromMode:{xyz50:Vu,rgb:Le=>Vu(rc(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:$t}}},vc=Lc,Ft=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Ue+.0514459932675022*Qe),Lt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Ue+.1073969535369406*Qe),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Ue+.6299787016738222*Qe),Gr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Lt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Lt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Lt-.8086757549230774*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},tr=Ft,Fr=Le=>{let Ue=tr(Ke(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},wr=Fr,ea=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.pow(Le+.3963377773761749*Ue+.2158037573099136*Qe,3),Lt=Math.pow(Le-.1055613458156586*Ue-.0638541728258133*Qe,3),pr=Math.pow(Le-.0894841775298119*Ue-1.2914855480194092*Qe,3),Gr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Lt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Lt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Lt+1.7076146940746117*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},ba=ea,Ia=Le=>Pt(ba(Le)),Na=Ia;function Za(Le){let _t=1.170873786407767;return .5*(_t*Le-.206+Math.sqrt((_t*Le-.206)*(_t*Le-.206)+4*.03*_t*Le))}function mn(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Da(Le,Ue){let Qe,_t,wt,Lt,pr,Gr,va,Qa;-1.88170328*Le-.80936493*Ue>1?(Qe=1.19086277,_t=1.76576728,wt=.59662641,Lt=.75515197,pr=.56771245,Gr=4.0767416621,va=-3.3077115913,Qa=.2309699292):1.81444104*Le-1.19445276*Ue>1?(Qe=.73956515,_t=-.45954404,wt=.08285427,Lt=.1254107,pr=.14503204,Gr=-1.2684380046,va=2.6097574011,Qa=-.3413193965):(Qe=1.35733652,_t=-.00915799,wt=-1.1513021,Lt=-.50559606,pr=.00692167,Gr=-.0041960863,va=-.7034186147,Qa=1.707614701);let Ga=Qe+_t*Le+wt*Ue+Lt*Le*Le+pr*Le*Ue,Ua=.3963377774*Le+.2158037573*Ue,An=-.1055613458*Le-.0638541728*Ue,dn=-.0894841775*Le-1.291485548*Ue;{let _n=1+Ga*Ua,Mn=1+Ga*An,Bn=1+Ga*dn,Zn=_n*_n*_n,Ci=Mn*Mn*Mn,qo=Bn*Bn*Bn,As=3*Ua*_n*_n,ls=3*An*Mn*Mn,Vl=3*dn*Bn*Bn,au=6*Ua*Ua*_n,Lu=6*An*An*Mn,uh=6*dn*dn*Bn,wh=Gr*Zn+va*Ci+Qa*qo,Gh=Gr*As+va*ls+Qa*Vl,Gd=Gr*au+va*Lu+Qa*uh;Ga=Ga-wh*Gh/(Gh*Gh-.5*wh*Gd)}return Ga}function Ha(Le,Ue){let Qe=Da(Le,Ue),_t=ba({l:1,a:Qe*Le,b:Qe*Ue}),wt=Math.cbrt(1/Math.max(_t.r,_t.g,_t.b)),Lt=wt*Qe;return[wt,Lt]}function $a(Le,Ue,Qe,_t,wt,Lt=null){Lt||(Lt=Ha(Le,Ue));let pr;if((Qe-wt)*Lt[1]-(Lt[0]-wt)*_t<=0)pr=Lt[1]*wt/(_t*Lt[0]+Lt[1]*(wt-Qe));else{pr=Lt[1]*(wt-1)/(_t*(Lt[0]-1)+Lt[1]*(wt-Qe));{let Gr=Qe-wt,va=_t,Qa=.3963377774*Le+.2158037573*Ue,Ga=-.1055613458*Le-.0638541728*Ue,Ua=-.0894841775*Le-1.291485548*Ue,An=Gr+va*Qa,dn=Gr+va*Ga,_n=Gr+va*Ua;{let Mn=wt*(1-pr)+pr*Qe,Bn=pr*_t,Zn=Mn+Bn*Qa,Ci=Mn+Bn*Ga,qo=Mn+Bn*Ua,As=Zn*Zn*Zn,ls=Ci*Ci*Ci,Vl=qo*qo*qo,au=3*An*Zn*Zn,Lu=3*dn*Ci*Ci,uh=3*_n*qo*qo,wh=6*An*An*Zn,Gh=6*dn*dn*Ci,Gd=6*_n*_n*qo,Ad=4.0767416621*As-3.3077115913*ls+.2309699292*Vl-1,ch=4.0767416621*au-3.3077115913*Lu+.2309699292*uh,Mv=4.0767416621*wh-3.3077115913*Gh+.2309699292*Gd,vp=ch/(ch*ch-.5*Ad*Mv),mp=-Ad*vp,gp=-1.2684380046*As+2.6097574011*ls-.3413193965*Vl-1,yp=-1.2684380046*au+2.6097574011*Lu-.3413193965*uh,xg=-1.2684380046*wh+2.6097574011*Gh-.3413193965*Gd,p0=yp/(yp*yp-.5*gp*xg),Md=-gp*p0,v0=-.0041960863*As-.7034186147*ls+1.707614701*Vl-1,m0=-.0041960863*au-.7034186147*Lu+1.707614701*uh,Hd=-.0041960863*wh-.7034186147*Gh+1.707614701*Gd,_p=m0/(m0*m0-.5*v0*Hd),bg=-v0*_p;mp=vp>=0?mp:1e6,Md=p0>=0?Md:1e6,bg=_p>=0?bg:1e6,pr+=Math.min(mp,Math.min(Md,bg))}}}return pr}function vn(Le,Ue,Qe=null){Qe||(Qe=Ha(Le,Ue));let _t=Qe[0],wt=Qe[1];return[wt/_t,wt/(1-_t)]}function Sn(Le,Ue,Qe){let _t=Ha(Ue,Qe),wt=$a(Ue,Qe,Le,1,Le,_t),Lt=vn(Ue,Qe,_t),pr=.11516993+1/(7.4477897+4.1590124*Qe+Ue*(-2.19557347+1.75198401*Qe+Ue*(-2.13704948-10.02301043*Qe+Ue*(-4.24894561+5.38770819*Qe+4.69891013*Ue)))),Gr=.11239642+1/(1.6132032-.68124379*Qe+Ue*(.40370612+.90148123*Qe+Ue*(-.27087943+.6122399*Qe+Ue*(.00299215-.45399568*Qe-.14661872*Ue)))),va=wt/Math.min(Le*Lt[0],(1-Le)*Lt[1]),Qa=Le*pr,Ga=(1-Le)*Gr,Ua=.9*va*Math.sqrt(Math.sqrt(1/(1/(Qa*Qa*Qa*Qa)+1/(Ga*Ga*Ga*Ga))));return Qa=Le*.4,Ga=(1-Le)*.8,[Math.sqrt(1/(1/(Qa*Qa)+1/(Ga*Ga))),Ua,wt]}function yi(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:Za(Ue)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Lt=Math.sqrt(Qe*Qe+_t*_t);if(!Lt)return wt.s=0,wt;let[pr,Gr,va]=Sn(Ue,Qe/Lt,_t/Lt),Qa;if(Ltyi(wr(Le))},toMode:{oklab:_i,rgb:Le=>Na(_i(Le))}}),ri=ki;function En(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Qe*Qe+_t*_t),Lt=wt?Qe/wt:1,pr=wt?_t/wt:1,[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=va/(wt+Ue*va),An=Ua*Ue,dn=Ua*wt,_n=mn(An),Mn=dn*_n/An,Bn=ba({l:_n,a:Lt*Mn,b:pr*Mn}),Zn=Math.cbrt(1/Math.max(Bn.r,Bn.g,Bn.b,0));Ue=Ue/Zn,wt=wt/Zn*Za(Ue)/Ue,Ue=Za(Ue);let Ci={mode:"okhsv",s:wt?(Qa+va)*dn/(va*Qa+va*Ga*dn):0,v:Ue?Ue/An:0};return Ci.s&&(Ci.h=Kr(Math.atan2(_t,Qe)*180/Math.PI)),Le.alpha!==void 0&&(Ci.alpha=Le.alpha),Ci}function Ln(Le){let Ue={mode:"oklab"};Le.alpha!==void 0&&(Ue.alpha=Le.alpha);let Qe=Le.h!==void 0?Le.h:0,_t=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Lt=Math.cos(Qe/180*Math.PI),pr=Math.sin(Qe/180*Math.PI),[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=1-_t*Qa/(Qa+va-va*Ga*_t),An=_t*va*Qa/(Qa+va-va*Ga*_t),dn=mn(Ua),_n=An*dn/Ua,Mn=ba({l:dn,a:Lt*_n,b:pr*_n}),Bn=Math.cbrt(1/Math.max(Mn.r,Mn.g,Mn.b,0)),Zn=mn(wt*Ua),Ci=An*Zn/Ua;return Ue.l=Zn*Bn,Ue.a=Ci*Lt*Bn,Ue.b=Ci*pr*Bn,Ue}var Ni=lo(Li({},Pi),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:En,rgb:Le=>En(wr(Le))},toMode:{oklab:Ln,rgb:Le=>Na(Ln(Le))}}),Zi=Ni;function Co(Le,Ue){if(!Ue||Ue[0]!=="oklab")return;let Qe={mode:"oklab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*.4/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*.4/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Do=Co,Fo=lo(Li({},Sl),{mode:"oklab",toMode:{lrgb:ba,rgb:Na},fromMode:{lrgb:tr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Do],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),Yo=Fo;function bo(Le,Ue){if(!Ue||Ue[0]!=="oklch")return;let Qe={mode:"oklch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*.4/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Gs=bo,Es=lo(Li({},nl),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Na(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Gs],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ns=Es,Kn=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.486570948648216*Ue+.265667693169093*Qe+.1982172852343625*_t,y:.2289745640697487*Ue+.6917385218365062*Qe+.079286914093745*_t,z:0*Ue+.0451133818589026*Qe+1.043944368900976*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},zo=Kn,gs=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*2.4934969119414263-Ue*.9313836179191242-.402710784450717*Qe,g:Le*-.8294889695615749+Ue*1.7626640603183465+.0236246858419436*Qe,b:Le*.0358458302437845-Ue*.0761723892680418+.9568845240076871*Qe},"p3");return _t!==void 0&&(wt.alpha=_t),wt},js=gs,Cl=lo(Li({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>js(et(Le)),xyz65:js},toMode:{rgb:Le=>qt(zo(Le)),xyz65:zo}}),zl=Cl,Kl=Le=>{let Ue=Math.abs(Le);return Ue>=1/512?Math.sign(Le)*Math.pow(Ue,1/1.8):16*Le},Gu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Ue*.2555720873797946-.0511018649755453*Qe),g:Kl(Le*-.5446307051249019+Ue*1.5082477428451466+.0205274474364214*Qe),b:Kl(Le*0+Ue*0+1.2119675456389452*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},xl=Gu,Hu=(Le=0)=>{let Ue=Math.abs(Le);return Ue>=16/512?Math.sign(Le)*Math.pow(Ue,1.8):Le/16},Su=Le=>{let Ue=Hu(Le.r),Qe=Hu(Le.g),_t=Hu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Ue+.1351812974005331*Qe+.0313477341283922*_t,y:.2880748288194013*Ue+.7118352342418731*Qe+899369387256e-16*_t,z:0*Ue+0*Qe+.8251046025104602*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},mc=Su,Jc=lo(Li({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:xl,rgb:Le=>xl(rc(Le))},toMode:{xyz50:mc,rgb:Le=>Tu(mc(Le))}}),oc=Jc,du=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Ue=Math.abs(Le);return Ue>Jl?(Math.sign(Le)||1)*(du*Math.pow(Ue,.45)-(du-1)):4.5*Le},Eu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Ue*.3556707837763925-.2533662813736599*Qe),g:Ql(Le*-.6666843518324893+Ue*1.6164812366349395+.0157685458139111*Qe),b:Ql(Le*.0176398574453108-Ue*.0427706132578085+.9421031212354739*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},bf=Eu,lh=1.09929682680944,Pc=.018053968510807,Ks=(Le=0)=>{let Ue=Math.abs(Le);return Ue{let Ue=Ks(Le.r),Qe=Ks(Le.g),_t=Ks(Le.b),wt={mode:"xyz65",x:.6369580483012911*Ue+.1446169035862083*Qe+.1688809751641721*_t,y:.262700212011267*Ue+.6779980715188708*Qe+.059301716469862*_t,z:0*Ue+.0280726930490874*Qe+1.0609850577107909*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Wu=Bl,wf=lo(Li({},_r),{mode:"rec2020",fromMode:{xyz65:bf,rgb:Le=>bf(et(Le))},toMode:{xyz65:Wu,rgb:Le=>qt(Wu(Le))},parse:["rec2020"],serialize:"rec2020"}),Qc=wf,ku=.0037930732552754493,Ol=Math.cbrt(ku),Nl=Le=>Math.cbrt(Le)-Ol,fi=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt=Nl(.3*Ue+.622*Qe+.078*_t+ku),pr=Nl(.23*Ue+.692*Qe+.078*_t+ku),Gr=Nl(.2434226892454782*Ue+.2047674442449682*Qe+.5518098665095535*_t+ku),va={mode:"xyb",x:(Lt-pr)/2,y:(Lt+pr)/2,b:Gr-(Lt+pr)/2};return wt!==void 0&&(va.alpha=wt),va},eu=fi,$e=Le=>Math.pow(Le+Ol,3),nt=({x:Le,y:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=$e(Le+Ue)-ku,Lt=$e(Ue-Le)-ku,pr=$e(Qe+Ue)-ku,Gr=Pt({r:11.031566904639861*wt-9.866943908131562*Lt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Lt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Lt+1.9459282407775895*pr});return _t!==void 0&&(Gr.alpha=_t),Gr},mt=nt,xt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:mt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:$t}}},Bt=xt,zt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Tu,lab:ac},fromMode:{rgb:rc,lab:tc},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},Wt=zt,Pr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz50",x:1.0479298208405488*Ue+.0229467933410191*Qe-.0501922295431356*_t,y:.0296278156881593*Ue+.990434484573249*Qe-.0170738250293851*_t,z:-.0092430581525912*Ue+.0150551448965779*Qe+.7518742899580008*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},Br=Pr,kr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz65",x:.9554734527042182*Ue-.0230985368742614*Qe+.0632593086610217*_t,y:-.0283697069632081*Ue+1.0099954580058226*Qe+.021041398966943*_t,z:.0123140016883199*Ue-.0205076964334779*Qe+1.3303659366080753*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},jr=kr,Jr={mode:"xyz65",toMode:{rgb:qt,xyz50:Br},fromMode:{rgb:et,xyz50:jr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},la=Jr,xa=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Ue+.11448223*Qe,i:.59597799*Le-.2741761*Ue-.32180189*Qe,q:.21147017*Le-.52261711*Ue+.31114694*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Ba=xa,an=({y:Le,i:Ue,q:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rgb",r:Le+.95608445*Ue+.6208885*Qe,g:Le-.27137664*Ue-.6486059*Qe,b:Le-1.10561724*Ue+1.70250126*Qe};return _t!==void 0&&(wt.alpha=_t),wt},wn=an,ii={mode:"yiq",toMode:{rgb:wn},fromMode:{rgb:Ba},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:$t}}},Si=ii,oi=(Le,Ue)=>Math.round(Le*(Ue=Math.pow(10,Ue)))/Ue,Ji=(Le=4)=>Ue=>typeof Ue=="number"?oi(Ue,Le):Ue,Qi=Ji,Oo=Qi(2),Qo=Le=>Math.max(0,Math.min(1,Le||0)),vo=Le=>Math.round(Qo(Le)*255),ys=P("rgb"),ol=P("hsl"),jl=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return"#"+(1<<24|Ue<<16|Qe<<8|_t).toString(16).slice(1)},Hs=Le=>{if(Le===void 0)return;let Ue=vo(Le.alpha!==void 0?Le.alpha:1);return jl(Le)+(256|Ue).toString(16).slice(1)},Cu=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Ue}, ${Qe}, ${_t})`:`rgba(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},hi=Le=>{if(Le===void 0)return;let Ue=Oo(Le.h||0),Qe=Oo(Qo(Le.s)*100)+"%",_t=Oo(Qo(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Ue}, ${Qe}, ${_t})`:`hsla(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},wi=Le=>{let Ue=B(Le);if(!Ue)return;let Qe=se(Ue.mode);if(!Qe.serialize||typeof Qe.serialize=="string"){let _t=`color(${Qe.serialize||`--${Ue.mode}`} `;return Qe.channels.forEach((wt,Lt)=>{wt!=="alpha"&&(_t+=(Lt?" ":"")+(Ue[wt]!==void 0?Ue[wt]:"none"))}),Ue.alpha!==void 0&&Ue.alpha<1&&(_t+=` / ${Ue.alpha}`),_t+")"}if(typeof Qe.serialize=="function")return Qe.serialize(Ue)},sl=Le=>jl(ys(Le)),sc=Le=>Hs(ys(Le)),tu=Le=>Cu(ys(Le)),Ps=Le=>hi(ol(Le)),gc={normal:(Le,Ue)=>Ue,multiply:(Le,Ue)=>Le*Ue,screen:(Le,Ue)=>Le+Ue-Le*Ue,"hard-light":(Le,Ue)=>Ue<.5?Le*2*Ue:2*Ue*(1-Le)-1,overlay:(Le,Ue)=>Le<.5?Ue*2*Le:2*Le*(1-Ue)-1,darken:(Le,Ue)=>Math.min(Le,Ue),lighten:(Le,Ue)=>Math.max(Le,Ue),"color-dodge":(Le,Ue)=>Le===0?0:Ue===1?1:Math.min(1,Le/(1-Ue)),"color-burn":(Le,Ue)=>Le===1?1:Ue===0?0:1-Math.min(1,(1-Le)/Ue),"soft-light":(Le,Ue)=>Ue<.5?Le-(1-2*Ue)*Le*(1-Le):Le+(2*Ue-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Ue)=>Math.abs(Le-Ue),exclusion:(Le,Ue)=>Le+Ue-2*Le*Ue},pu=(Le,Ue="normal",Qe="rgb")=>{let _t=typeof Ue=="function"?Ue:gc[Ue],wt=P(Qe),Lt=se(Qe).channels;return Le.map(Gr=>{let va=wt(Gr);return va.alpha===void 0&&(va.alpha=1),va}).reduce((Gr,va)=>{if(Gr===void 0)return va;let Qa=va.alpha+Gr.alpha*(1-va.alpha);return Lt.reduce((Ga,Ua)=>(Ua!=="alpha"&&(Qa===0?Ga[Ua]=0:(Ga[Ua]=va.alpha*(1-Gr.alpha)*va[Ua]+va.alpha*Gr.alpha*_t(Gr[Ua],va[Ua])+(1-va.alpha)*Gr.alpha*Gr[Ua],Ga[Ua]=Math.max(0,Math.min(1,Ga[Ua]/Qa)))),Ga),{mode:Qe,alpha:Qa})})},ll=pu,ef=([Le,Ue])=>Le+Math.random()*(Ue-Le),de=Le=>Object.keys(Le).reduce((Ue,Qe)=>{let _t=Le[Qe];return Ue[Qe]=Array.isArray(_t)?_t:[_t,_t],Ue},{}),Ee=(Le="rgb",Ue={})=>{let Qe=se(Le),_t=de(Ue);return Qe.channels.reduce((wt,Lt)=>((_t.alpha||Lt!=="alpha")&&(wt[Lt]=ef(_t[Lt]||Qe.ranges[Lt])),wt),{mode:Le})},qe=Ee,tt=(Le,Ue="rgb",Qe=!1)=>{let _t=Ue?se(Ue).channels:null,wt=Ue?P(Ue):B;return Lt=>{let pr=wt(Lt);if(!pr)return;let Gr=(_t||se(pr.mode).channels).reduce((Qa,Ga)=>{let Ua=Le(pr[Ga],Ga,pr,Ue);return Ua!==void 0&&!isNaN(Ua)&&(Qa[Ga]=Ua),Qa},{mode:pr.mode});if(!Qe)return Gr;let va=B(Lt);return va&&va.mode!==Gr.mode?P(va.mode)(Gr):Gr}},at=(Le,Ue,Qe)=>Ue!=="alpha"?(Le||0)*(Qe.alpha!==void 0?Qe.alpha:1):Le,ct=(Le,Ue,Qe)=>Ue!=="alpha"&&Qe.alpha!==0?(Le||0)/(Qe.alpha!==void 0?Qe.alpha:1):Le,Nt=(Le=1,Ue=0)=>(Qe,_t)=>_t!=="alpha"?Qe*Le+Ue:Qe,St=(Le=1,Ue=1,Qe=0)=>(_t,wt)=>wt!=="alpha"?Le*Math.pow(_t,Ue)+Qe:_t,Jt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Ue=1,Qe,_t,wt,Lt;for(;UeUe=>Le<=0?1:Le>=1?0:Math.pow(Ue,Math.log(.5)/Math.log(Le)),Hr=gr,Vr=Le=>typeof Le=="function",ca=Le=>Le&&typeof Le=="object",Aa=Le=>typeof Le=="number",Yr=(Le,Ue="rgb",Qe,_t)=>{let wt=se(Ue),Lt=P(Ue),pr=[],Gr=[],va={};Le.forEach(An=>{Array.isArray(An)?(pr.push(Lt(An[0])),Gr.push(An[1])):Aa(An)||Vr(An)?va[Gr.length]=An:(pr.push(Lt(An)),Gr.push(void 0))}),mr(Gr);let Qa=wt.channels.reduce((An,dn)=>{let _n;return ca(Qe)&&ca(Qe[dn])&&Qe[dn].fixup?_n=Qe[dn].fixup:ca(wt.interpolate[dn])&&wt.interpolate[dn].fixup?_n=wt.interpolate[dn].fixup:_n=Mn=>Mn,An[dn]=_n(pr.map(Mn=>Mn[dn])),An},{});if(_t){let An=pr.map((dn,_n)=>wt.channels.reduce((Mn,Bn)=>(Mn[Bn]=Qa[Bn][_n],Mn),{mode:Ue}));Qa=wt.channels.reduce((dn,_n)=>(dn[_n]=An.map(Mn=>{let Bn=_t(Mn[_n],_n,Mn,Ue);return isNaN(Bn)?void 0:Bn}),dn),{})}let Ga=wt.channels.reduce((An,dn)=>{let _n;return Vr(Qe)?_n=Qe:ca(Qe)&&Vr(Qe[dn])?_n=Qe[dn]:ca(Qe)&&ca(Qe[dn])&&Qe[dn].use?_n=Qe[dn].use:Vr(wt.interpolate[dn])?_n=wt.interpolate[dn]:ca(wt.interpolate[dn])&&(_n=wt.interpolate[dn].use),An[dn]=_n(Qa[dn]),An},{}),Ua=pr.length-1;return An=>{if(An=Math.min(Math.max(0,An),1),An<=Gr[0])return pr[0];if(An>Gr[Ua])return pr[Ua];let dn=0;for(;Gr[dn]{let ls=Ga[As](Ci);return ls!==void 0&&(qo[As]=ls),qo},{mode:Ue})}},oa=(Le,Ue="rgb",Qe)=>Yr(Le,Ue,Qe),fa=(Le,Ue)=>(Qe,_t="rgb",wt)=>{let Lt=Ue?tt(Ue,_t):void 0,pr=Yr(Qe,_t,wt,Le);return Lt?Gr=>Lt(pr(Gr)):pr},Ea=fa(at,ct),Ma=(Le,Ue)=>(Le+Ue)%Ue,sa=(Le,Ue,Qe,_t,wt)=>{let Lt=wt*wt,pr=Lt*wt;return((1-3*wt+3*Lt-pr)*Le+(4-6*Lt+3*pr)*Ue+(1+3*wt+3*Lt-3*pr)*Qe+pr*_t)/6},hn=Le=>Ue=>{let Qe=Le.length-1,_t=Ue>=1?Qe-1:Math.max(0,Math.floor(Ue*Qe));return sa(_t>0?Le[_t-1]:2*Le[_t]-Le[_t+1],Le[_t],Le[_t+1],_tUe=>{let Qe=Le.length-1,_t=Math.floor(Ue*Qe);return sa(Le[Ma(_t-1,Le.length)],Le[Ma(_t,Le.length)],Le[Ma(_t+1,Le.length)],Le[Ma(_t+2,Le.length)],(Ue-_t/Qe)*Qe)},zn=Le=>{let Ue,Qe=Le.length-1,_t=new Array(Qe),wt=new Array(Qe),Lt=new Array(Qe);for(_t[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Ue=2;Ue0&&(Lt[Qe-1]=wt[Qe-1]),Ue=Qe-2;Ue>0;--Ue)Lt[Ue]=wt[Ue]-_t[Ue]*Lt[Ue+1];return Lt},$n=Le=>hn(zn(Le)),xi=Le=>Tn(zn(Le)),di=Math.sign,uo=Math.min,pe=Math.abs,y=Le=>{let Ue=Le.length-1,Qe=[],_t=[],wt=[];for(let Lt=0;Lt0?.5*(Le[Lt+1]-Le[Lt-1])*Ue:void 0),wt.push(Lt>0?(di(Qe[Lt-1])+di(Qe[Lt]))*uo(pe(Qe[Lt-1]),pe(Qe[Lt]),.5*pe(_t[Lt])):void 0);return[Qe,_t,wt]},N=(Le,Ue,Qe)=>{let _t=Le.length-1,wt=_t*_t;return Lt=>{let pr;Lt>=1?pr=_t-1:pr=Math.max(0,Math.floor(Lt*_t));let Gr=Lt-pr/_t,va=Gr*Gr,Qa=va*Gr;return(Ue[pr]+Ue[pr+1]-2*Qe[pr])*wt*Qa+(3*Qe[pr]-2*Ue[pr]-Ue[pr+1])*_t*va+Ue[pr]*Gr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,,_t]=y(Le);return _t[0]=Qe[0],_t[Ue]=Qe[Ue-1],N(Le,_t,Qe)},fe=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,_t,wt]=y(Le);return _t[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Ue,_t[Ue]=(Le[Ue]*1.5-Le[Ue-1]*2+Le[Ue-2]*.5)*Ue,wt[0]=_t[0]*Qe[0]<=0?0:pe(_t[0])>2*pe(Qe[0])?2*Qe[0]:_t[0],wt[Ue]=_t[Ue]*Qe[Ue-1]<=0?0:pe(_t[Ue])>2*pe(Qe[Ue-1])?2*Qe[Ue-1]:_t[Ue],N(Le,wt,Qe)},be=Le=>{let Ue=Le.length-1,[Qe,_t,wt]=y(Le);_t[0]=.5*(Le[1]-Le[Ue])*Ue,_t[Ue]=.5*(Le[0]-Le[Ue-1])*Ue;let Lt=(Le[0]-Le[Ue])*Ue,pr=Lt;return wt[0]=(di(Lt)+di(Qe[0]))*uo(pe(Lt),pe(Qe[0]),.5*pe(_t[0])),wt[Ue]=(di(Qe[Ue-1])+di(pr))*uo(pe(Qe[Ue-1]),pe(pr),.5*pe(_t[Ue])),N(Le,wt,Qe)},Re=(Le=1)=>Le===1?Ue=>Ue:Ue=>Math.pow(Ue,Le),je=Re,Ze=(Le=2,Ue=1)=>{let Qe=je(Ue);if(Le<2)return Le<1?[]:[Qe(.5)];let _t=[];for(let wt=0;wt{let Ue={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Ue.alpha=Le.alpha),Ue},Gt=Le=>Dt(ft(Le)),Kt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function st(Le){return Kt(ft(Le))}function It(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return _t=>!0;let Qe=P(typeof Ue=="string"?Ue:Le);return _t=>Kt(Qe(_t))}function Ut(Le){return Le=B(Le),Le===void 0||st(Le)?Le:P(Le.mode)(Gt(Le))}function ir(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return Lt=>B(Lt);let Qe=typeof Ue=="string"?Ue:Le,_t=P(Qe),wt=It(Qe);return Lt=>{let pr=B(Lt);if(!pr)return;let Gr=_t(pr);if(wt(Gr))return pr;let va=Dt(Gr);return pr.mode===va.mode?va:P(pr.mode)(va)}}function dr(Le,Ue="lch",Qe="rgb"){Le=B(Le);let _t=Qe==="rgb"?st:It(Qe),wt=Qe==="rgb"?Gt:ir(Qe);if(Le===void 0||_t(Le))return Le;let Lt=P(Le.mode);Le=P(Ue)(Le);let pr=lo(Li({},Le),{c:0});if(!_t(pr))return Lt(wt(pr));let Gr=0,va=Le.c!==void 0?Le.c:0,Qa=se(Ue).ranges.c,Ga=(Qa[1]-Qa[0])/Math.pow(2,13),Ua=pr.c;for(;va-Gr>Ga;)pr.c=Gr+(va-Gr)*.5,_t(pr)?(Ua=pr.c,Gr=pr.c):va=pr.c;return Lt(_t(pr)?pr:lo(Li({},pr),{c:Ua}))}function Ar(Le="rgb",Ue="oklch",Qe=Yn("oklch"),_t=.02){let wt=P(Le),Lt=se(Le);if(!Lt.gamut)return Ga=>wt(Ga);let pr=It(Le),Gr=ir(Le),va=P(Ue),{ranges:Qa}=se(Ue);if(!Qa.l||!Qa.c)throw new Error("LCH-like space expected");return Ga=>{if(Ga=B(Ga),Ga===void 0)return;let Ua=Li({},va(Ga));if(Ua.l===void 0&&(Ua.l=0),Ua.c===void 0&&(Ua.c=0),Ua.l>=Qa.l[1]){let Bn=lo(Li({},Lt.white),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(Ua.l<=Qa.l[0]){let Bn=lo(Li({},Lt.black),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(pr(Ua))return wt(Ua);let An=0,dn=Ua.c,_n=(Qa.c[1]-Qa.c[0])/4e3,Mn=Gr(Ua);for(;dn-An>_n;)Ua.c=(An+dn)*.5,Mn=Gr(Ua),pr(Ua)||Qe&&_t>0&&Qe(Ua,Mn)<=_t?An=Ua.c:dn=Ua.c;return wt(pr(Ua)?Ua:Mn)}}var hr=(Le,Ue=Yn(),Qe=_t=>_t)=>{let _t=Le.map((wt,Lt)=>({color:Qe(wt),i:Lt}));return(wt,Lt=1,pr=1/0)=>(isFinite(Lt)&&(Lt=Math.max(1,Math.min(Lt,_t.length-1))),_t.forEach(Gr=>{Gr.d=Ue(wt,Gr.color)}),_t.sort((Gr,va)=>Gr.d-va.d).slice(0,Lt).filter(Gr=>Gr.dLe[Gr.i]))},vr=hr,Or=Le=>Math.max(Le,0),Cr=Le=>Math.max(Math.min(Le,1),0),ta=(Le,Ue,Qe)=>Le===void 0||Ue===void 0?void 0:Le+Qe*(Ue-Le),ka=Le=>{let Ue=1-Cr(Le);return[.393+.607*Ue,.769-.769*Ue,.189-.189*Ue,0,.349-.349*Ue,.686+.314*Ue,.168-.168*Ue,0,.272-.272*Ue,.534-.534*Ue,.131+.869*Ue,0,0,0,0,1]},Ta=Le=>{let Ue=Or(Le);return[.213+.787*Ue,.715-.715*Ue,.072-.072*Ue,0,.213-.213*Ue,.715+.285*Ue,.072-.072*Ue,0,.213-.213*Ue,.715-.715*Ue,.072+.928*Ue,0,0,0,0,1]},Ra=Le=>{let Ue=1-Cr(Le);return[.2126+.7874*Ue,.7152-.7152*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152+.2848*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152-.7152*Ue,.0722+.9278*Ue,0,0,0,0,1]},ua=Le=>{let Ue=Math.PI*Le/180,Qe=Math.cos(Ue),_t=Math.sin(Ue);return[.213+Qe*.787-_t*.213,.715-Qe*.715-_t*.715,.072-Qe*.072+_t*.928,0,.213-Qe*.213+_t*.143,.715+Qe*.285+_t*.14,.072-Qe*.072-_t*.283,0,.213-Qe*.213-_t*.787,.715-Qe*.715+_t*.715,.072+Qe*.928+_t*.072,0,0,0,0,1]},ia=(Le,Ue,Qe=!1)=>{let _t=P(Ue),wt=se(Ue).channels;return Lt=>{let pr=_t(Lt);if(!pr)return;let Gr={mode:Ue},va,Qa=wt.length;for(let Ua=0;Ua{let Qe=Or(Le);return tt(Nt(Qe),Ue,!0)},da=(Le=1,Ue="rgb")=>{let Qe=Or(Le);return tt(Nt(Qe,(1-Qe)/2),Ue,!0)},Fa=(Le=1,Ue="rgb")=>ia(ka(Le),Ue,!0),za=(Le=1,Ue="rgb")=>ia(Ta(Le),Ue,!0),kn=(Le=1,Ue="rgb")=>ia(Ra(Le),Ue,!0),Dn=(Le=1,Ue="rgb")=>{let Qe=Cr(Le);return tt((_t,wt)=>wt==="alpha"?_t:ta(Qe,1-Qe,_t),Ue,!0)},ui=(Le=0,Ue="rgb")=>ia(ua(Le),Ue,!0),cn=P("rgb"),sn=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],ei=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],Pn=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],Rn=(Le,Ue)=>{let Qe=Math.max(0,Math.min(1,Ue)),_t=Math.round(Qe/.1),wt=Math.round(Qe%.1),Lt=Le[_t];if(wt>0&&_tBe(Lt[va],pr[va],wt))}return pr=>{let Gr=B(pr);if(Gr===void 0)return;let{r:va,g:Qa,b:Ga}=cn(Gr),Ua={mode:"rgb",r:Lt[0]*va+Lt[1]*Qa+Lt[2]*Ga,g:Lt[3]*va+Lt[4]*Qa+Lt[5]*Ga,b:Lt[6]*va+Lt[7]*Qa+Lt[8]*Ga};return Gr.alpha!==void 0&&(Ua.alpha=Gr.alpha),P(Gr.mode)(Ua)}},In=(Le=1)=>Rn(sn,Le),Jn=(Le=1)=>Rn(ei,Le),Ei=(Le=1)=>Rn(Pn,Le),so=Le=>Le*Le*(3-2*Le),ti=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),bi=Le=>Le*Le*Le*(Le*(Le*6-15)+10),Wi=bi,ro=Le=>(1-Math.cos(Le*Math.PI))/2,Mo=ro;function zs(Le){let Ue=P("lrgb")(Le);return .2126*Ue.r+.7152*Ue.g+.0722*Ue.b}function Bs(Le,Ue){let Qe=zs(Le),_t=zs(Ue);return(Math.max(Qe,_t)+.05)/(Math.min(Qe,_t)+.05)}var So=ne(Ht),Ws=ne(Dr),Zo=ne(go),es=ne(Ao),$o=ne(to),_s=ne(Vs),Go=ne(Pi),Ys=ne(dl),Ll=ne(bc),mo=ne(Qu),ru=ne(ju),Rs=ne(Sl),Yu=ne(oh),Ul=ne(nl),ql=ne(Kc),fo=ne(kl),Xo=ne(Cc),Os=ne(vc),ra=ne(ri),Ya=ne(Zi),Ka=ne(Yo),Bi=ne(ns),rs=ne(zl),Is=ne(oc),Oi=ne(Qc),Wr=ne(_r),na=ne(Bt),pa=ne(Wt),Wa=ne(la),ln=ne(Si)}}),av=ze({"src/plot_api/plot_config.js"(J,V){"use strict";var p={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},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","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},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/"},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:{}}},b={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(p,b),V.exports={configAttributes:p,dfltConfig:b}}}),Pw=ze({"src/lib/notifier.js"(J,V){"use strict";var p=ci(),b=ao(),E=[];V.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var n=1e3;b(l)?n=l:l==="long"&&(n=3e3);var r=p.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var m=E.indexOf(c);m!==-1&&E.splice(m,1),p.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=p.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var m=c.append("p"),h=s.split(//g),v=0;v1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(p.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(p.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),fc=ze({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qn=ze({"src/components/color/index.js"(J,V){"use strict";var{converter:p,formatHex:b,formatRgb:E,wcagContrast:k,wcagLuminance:l}=UR(),{isArrayOrTypedArray:e}=Ff(),{warn:t}=ap(),{background:n,defaultLine:r,defaults:a,lightLine:o}=fc(),s=p("rgb"),c=p("hsl"),m=q=>{if(typeof q!="string")return;let Z=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(Z))try{return s(Z)}catch{return}},h=q=>q>0?q>1?1:q:0,v={mode:"rgb",r:0,g:0,b:0,alpha:1},g=q=>Math.round(q*255e6)/255e6,i=q=>lo(Li({},q),{r:g(q.r),g:g(q.g),b:g(q.b)}),w=q=>E(i(q)),S=q=>b(i(q)),M=(q,Z)=>{var ee;let ae=m(q);return ae?((ee=ae.alpha)!=null||(ae.alpha=1),ae):(!Z&&q!=null&&t(`Invalid color specifier: "${q}". Defaulting to "#000"`),v)},C=q=>w(lo(Li({},M(q)),{alpha:1})),_=q=>q?M(q).alpha:0,T=q=>e(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),f=q=>{let[Z,ee,ae,he]=q,xe=Math.max(Z,ee,ae)>1?1/255:1,we=he??1;return{mode:"rgb",r:Z*xe,g:ee*xe,b:ae*xe,alpha:we>1?we/255:we}},u=(q,Z)=>{let ee=T(q)?f(q):M(q,!0),ae=[h(ee.r),h(ee.g),h(ee.b),h(ee.alpha)];return Z==="uint8"||Z==="uint8_clamped"?Uint8Array.from(ae,he=>Math.round(he*255)):Z==="float32"?Float32Array.from(ae):Z==="float64"?Float64Array.from(ae):ae},A=(q,Z)=>w(lo(Li({},M(q)),{alpha:h(Z)})),x=(q,Z)=>{let ee=M(q),ae=ee.alpha;if(ae===1)return w(ee);let he=M(Z||n),xe=he.alpha,we=(Me,Se)=>(xe===1?Se:1-xe+Se*xe)*(1-ae)+Me*ae;return w({mode:"rgb",r:we(ee.r,he.r),g:we(ee.g,he.g),b:we(ee.b,he.b)})},z=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=(we,Me)=>ee*we+(1-ee)*Me;return w({mode:"rgb",r:xe(ae.r,he.r),g:xe(ae.g,he.g),b:xe(ae.b,he.b)})},I=(q,Z)=>{let ee=M(q),ae=c(ee)||{mode:"hsl",h:0,s:0,l:0};return w(s(lo(Li({},ae),{l:h((ae.l*100+Z)/100),alpha:ee.alpha})))},O=(q,Z)=>k(M(q),M(Z)),D=q=>O(q,n)>O(q,r),B=w(M(n)),F=w(M(r)),P=(q,Z,ee)=>(M(q).alpha!==1&&(q=x(q,n)),D(q)?Z?I(q,Z):B:ee?I(q,-ee):F),j=(q,Z)=>{q.style({stroke:C(Z),"stroke-opacity":M(Z).alpha})},U=(q,Z)=>{q.style({fill:C(Z),"fill-opacity":M(Z).alpha})},$=(q,Z)=>!!(q&&Z&&C(q)===C(Z)),Q=q=>m(q)!==void 0,re=(q,Z)=>{Z=Z===0?0:Z||10;let ee=M(q),ae=Z/100;return w(lo(Li({},ee),{r:h(ee.r+ae),g:h(ee.g+ae),b:h(ee.b+ae)}))},ne=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=ee/100,we=he.alpha-ae.alpha,Me=2*xe-1,Se=((Me*we===-1?Me:(Me+we)/(1+Me*we))+1)/2,Ie=1-Se,Ve=(Ge,ke)=>Ie*Ge+Se*ke;return w({mode:"rgb",r:Ve(ae.r,he.r),g:Ve(ae.g,he.g),b:Ve(ae.b,he.b),alpha:ae.alpha*(1-xe)+he.alpha*xe})},se=(q,Z=["#000","#fff"])=>{let ee,ae=-1/0;for(let he of Z){let xe=O(q,he);xe>ae&&(ae=xe,ee=w(M(he)))}return ee},G=q=>w(M(q)),X=q=>S(M(q)).toUpperCase(),K=q=>{let Z=M(q);return[h(Z.r)*255,h(Z.g)*255,h(Z.b)*255,h(Z.alpha)]},H=([q,Z,ee,ae])=>w({mode:"rgb",r:q/255,g:Z/255,b:ee/255,alpha:ae}),Y=q=>{let Z=M(q);return l({mode:"rgb",r:h(Z.r),g:h(Z.g),b:h(Z.b)})};V.exports={addOpacity:A,adjustLightness:I,background:n,brighten:re,combine:x,contrast:P,defaultLine:r,defaults:a,equals:$,fill:U,hexString:X,interpolate:z,isChannelArray:T,isDark:D,isValid:Q,lightLine:o,luminosity:Y,mix:ne,mostReadable:se,normalize:u,opacity:_,parse:M,rgb:C,rgbaArray:K,rgbaArrayToString:H,rgbaString:G,stroke:j,wcagContrast:O}}}),Bv=ze({"src/components/colorscale/scales.js"(J,V){"use strict";var p=Qn(),b={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)"]]},E=b.RdBu;function k(t,n){if(n||(n=E),!t)return n;function r(){try{t=b[t]||JSON.parse(t)}catch{t=n}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:n}function l(t){var n=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rqR});function qR(J,V="",p,b){let E=V+(p?"":"$"),k=b===!1?"":"^";return J==="xy"?new RegExp(k+"x"+n1+"y"+n1+E):new RegExp(k+J+n1+E)}var n1,Vm=zi({"src/lib/regex.ts"(){"use strict";n1="([2-9]|[1-9][0-9]+)?"}}),VR=ze({"src/lib/coerce.js"(J){"use strict";var V=ao(),p=Ki().extendFlat,b=ws(),E=Bv(),k=Qn(),l=np().DESELECTDIM,e=r1(),t=(Vm(),Po(Ov)).counter,n=(Um(),Po(zv)).modHalf,r=Ff().isArrayOrTypedArray,a=Ff().isTypedArraySpec,o=Ff().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,m,h){m.set(r(c)?c:a(c)?o(c):h)}},enumerated:{coerceFunction:function(c,m,h,v){v.coerceNumber&&(c=+c),v.values.indexOf(c)===-1?m.set(h):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var h=m.values,v=0;vi===!0||i===!1;g(c)||v.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(g)?m.set(c):m.set(h)}},number:{coerceFunction:function(c,m,h,v){a(c)&&(c=o(c)),!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},integer:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}a(c)&&(c=o(c)),c%1||!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},string:{coerceFunction:function(c,m,h,v){if(typeof c!="string"){var g=typeof c=="number";v.strict===!0||!g?m.set(h):m.set(String(c))}else v.noBlank&&!c?m.set(h):m.set(c)}},color:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),k.isValid(c)?m.set(c):m.set(h)}},colorlist:{coerceFunction:function(c,m,h){!Array.isArray(c)||!c.length?m.set(h):c.every(v=>k.isValid(v))?m.set(c):m.set(h)}},colorscale:{coerceFunction:function(c,m,h){m.set(E.get(c,h))}},angle:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),c==="auto"?m.set("auto"):V(c)?m.set(n(+c,360)):m.set(h)}},subplotid:{coerceFunction:function(c,m,h,v){var g=v.regex||t(h);let i=w=>typeof w=="string"&&g.test(w);i(c)||v.arrayOk&&r(c)&&c.length>0&&c.every(i)?m.set(c):m.set(h)},validateFunction:function(c,m){var h=m.dflt;return c===h?!0:typeof c!="string"?!1:!!t(h).test(c)}},flaglist:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(h);return}for(var g=c.split("+"),i=0;iLi({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Li({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Sx=ze({"src/components/shapes/label_texttemplate.js"(J,V){"use strict";function p(M,C){return C?C.d2l(M):M}function b(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function n(M){return M.x1shift||0}function r(M){return M.y0shift||0}function a(M){return M.y1shift||0}function o(M,C){return p(M.x1,C)+n(M)-p(M.x0,C)-t(M)}function s(M,C,_){return p(M.y1,_)+a(M)-p(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function m(M,C,_){return Math.abs(s(M,C,_))}function h(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function v(M,C){return b((p(M.x1,C)+n(M)+p(M.x0,C)+t(M))/2,C)}function g(M,C,_){return b((p(M.y1,_)+a(M)+p(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var w=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:m,length:h,xcenter:v,ycenter:g,simpleXVariables:w,simpleYVariables:S}}}),yI=ze({"src/components/shapes/draw_newshape/attributes.js"(J,V){"use strict";var p=Al().overrideAll,b=ws(),E=Qs(),k=Uc().dash,l=Ki().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Sx();V.exports=p({newshape:{visible:l({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},b.legend,{}),legendgroup:l({},b.legendgroup,{}),legendgrouptitle:{text:l({},b.legendgrouptitle.text,{}),font:E({})},legendrank:l({},b.legendrank,{}),legendwidth:l({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{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:l({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(n)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),_I=ze({"src/components/selections/draw_newselection/attributes.js"(J,V){"use strict";var p=Uc().dash,b=Ki().extendFlat;V.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:b({},p,{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"}}}}),Ex=ze({"src/plots/pad_attributes.js"(J,V){"use strict";V.exports=function(p){var b=p.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),Gm=ze({"src/plots/layout_attributes.js"(J,V){"use strict";var p=Qs(),b=o1(),E=fc(),k=yI(),l=_I(),e=Ex(),t=Ki().extendFlat,n=p({editType:"calc"});n.family.dflt='"Open Sans", verdana, arial, sans-serif',n.size.dflt=12,n.color.dflt=E.defaultLine,V.exports={font:n,title:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:p({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:t(e({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:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.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:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},b.transition,{editType:"none"})}}}),xI=ze({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.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}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.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-globe .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='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-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='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%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:rgba(0,0,0,.05)}.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;white-space:nowrap}.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}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.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:rgba(0,0,0,.05)}.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}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@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),(pointer:coarse){.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(J)}})()}}),mi=ze({"src/registry.js"(J){"use strict";var V=ap(),p=Ax(),b=Rw(),E=i1().addStyleRule,k=Ki(),l=ws(),e=Gm(),t=k.extendFlat,n=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w=i&&D<=w?D:l}if(typeof D!="string"&&typeof D!="number")return l;D=String(D);var U=v(B),$=D.charAt(0);U&&($==="G"||$==="g")&&(D=D.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=D.match(Q?m:c);if(!re)return l;var ne=re[1],se=re[3]||"1",G=Number(re[5]||1),X=Number(re[7]||0),K=Number(re[9]||0),H=Number(re[11]||0);if(U){if(ne.length===2)return l;ne=Number(ne);var Y;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var Z=se.charAt(se.length-1)==="i";se=parseInt(se,10),Y=q.newDate(ne,q.toMonthIndex(ne,se,Z),G)}else Y=q.newDate(ne,Number(se),G)}catch{return l}return Y?(Y.toJD()-a)*e+X*t+K*n+H*r:l}ne.length===2?ne=(Number(ne)+2e3-h)%100+h:ne=Number(ne),se-=1;var ee=new Date(Date.UTC(2e3,se,G,X,K));return ee.setUTCFullYear(ne),ee.getUTCMonth()!==se||ee.getUTCDate()!==G?l:ee.getTime()+H*r},i=J.MIN_MS=J.dateTime2ms("-9999"),w=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(D,B){return J.dateTime2ms(D,B)!==l};function S(D,B){return String(D+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*n;J.ms2DateTime=function(D,B,F){if(typeof D!="number"||!(D>=i&&D<=w))return l;B||(B=0);var P=Math.floor(E(D+.05,1)*10),j=Math.round(D-P/10),U,$,Q,re,ne,se;if(v(F)){var G=Math.floor(j/e)+a,X=Math.floor(E(D,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(G).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;$=B=i+e&&D<=w-e))return l;var B=Math.floor(E(D+.05,1)*10),F=new Date(Math.round(D-B/10)),P=V("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),$=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return T(P,j,U,$,Q)};function T(D,B,F,P,j){if((B||F||P||j)&&(D+=" "+S(B,2)+":"+S(F,2),(P||j)&&(D+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;D+="."+S(j,U)}return D}J.cleanDate=function(D,B,F){if(D===l)return B;if(J.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(v(F))return b.error("JS Dates and milliseconds are incompatible with world calendars",D),B;if(D=J.ms2DateTimeLocal(+D),!D&&B!==void 0)return B}else if(!J.isDateTime(D,F))return b.error("unrecognized date",D),B;return D};var f=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function x(D,B,F,P){D=D.replace(f,function(U){var $=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed($).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(D=D.replace(u,function(){return A[F("%q")(j)]}),v(P))try{D=o.getComponentMethod("calendars","worldCalFmt")(D,B,P)}catch{return"Invalid"}return F(D)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(D,B){var F=E(D+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/n),60),2);if(B!=="M"){p(B)||(B=0);var j=Math.min(E(D/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(D,B,F,P,j,U){if(j=v(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` +`||Ue[q]===" "||Ue[q]===" ");)q++;let wt;if(Z(Ue)&&(wt=he(Ue),wt.type!==Y.Hue)){Qe.push({type:Y.Alpha,value:wt});continue}if(ee(Ue)&&we(Ue)==="none"){Qe.push({type:Y.Alpha,value:{type:Y.None,value:void 0}});continue}return}if(/\d/.test(_t)){q--,Qe.push(he(Ue));continue}if(K.test(_t)){q--,Qe.push(Me(Ue));continue}return}return Qe}function Ie(Le){Le._i=0;let Ue=Le[Le._i++];if(!Ue||Ue.type!==Y.Function||Ue.value!=="color"||(Ue=Le[Le._i++],Ue.type!==Y.Ident))return;let Qe=Q[Ue.value];if(!Qe)return;let _t={mode:Qe},wt=Ve(Le,!1);if(!wt)return;let Lt=se(Qe).channels;for(let pr=0,Gr,va;pr4)){if(Qe.length===4){if(Qe[3].type!==Y.Alpha)return;Qe[3]=Qe[3].value}return Qe.length===3&&Qe.push({type:Y.None,value:void 0}),Qe.every(wt=>wt.type!==Y.Alpha)?Qe:void 0}}function Ge(Le,Ue){Le._i=0;let Qe=Le[Le._i++];if(!Qe||Qe.type!==Y.Function)return;let _t=Ve(Le,Ue);if(_t)return _t.unshift(Qe.value),_t}var ke=Le=>{if(typeof Le!="string")return;let Ue=Se(Le),Qe=Ue?Ge(Ue,!0):void 0,_t,wt=0,Lt=$.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ae=le,Be=(Le,Ue,Qe)=>Le+Qe*(Ue-Le),Xe=(Le,Ue,Qe)=>(Qe-Le)/(Ue-Le),Ye=(Le,Ue,Qe,_t,wt,Lt)=>Be(Be(Le,Ue,wt),Be(Qe,_t,wt),Lt),yt=(Le,Ue,Qe,_t,wt,Lt,pr,Gr,va,Qa,Ga)=>Be(Ye(Le,Ue,Qe,_t,va,Qa),Ye(wt,Lt,pr,Gr,va,Qa),Ga),gt=Le=>{let Ue=[];for(let Qe=0;QeUe=>{let Qe=gt(Ue);return _t=>{let wt=_t*Qe.length,Lt=_t>=1?Qe.length-1:Math.max(Math.floor(wt),0),pr=Qe[Lt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Lt)}},At=Tt(Be),$t=Le=>{let Ue=!1,Qe=Le.map(_t=>_t!==void 0?(Ue=!0,_t):1);return Ue?Qe:Le},rr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,g,O,m,Ae,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:$t}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=rr,Xt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),or=Le=>{let Ue=Xt(Le.r),Qe=Xt(Le.g),_t=Xt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Ue+.1855582379065463*Qe+.1882286462349947*_t,y:.297344975250536*Ue+.6273635662554661*Qe+.0752914584939979*_t,z:.0270313613864123*Ue+.0706888525358272*Qe+.9913375368376386*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=or,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Ue*.5650069742788597-.3447313507783297*Qe),g:vt(Le*-.9692436362808798+Ue*1.8759675015077206+.0415550574071756*Qe),b:vt(Le*.0134442806320312-Ue*.1183623922310184+1.0151749943912058*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},De=ht,Ne=(Le=0)=>{let Ue=Math.abs(Le);return Ue<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Ue+.055)/1.055,2.4)},We=({r:Le,g:Ue,b:Qe,alpha:_t})=>{let wt={mode:"lrgb",r:Ne(Le),g:Ne(Ue),b:Ne(Qe)};return _t!==void 0&&(wt.alpha=_t),wt},Ke=We,Je=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.4123907992659593*Ue+.357584339383878*Qe+.1804807884018343*_t,y:.2126390058715102*Ue+.715168678767756*Qe+.0721923153607337*_t,z:.0193308187155918*Ue+.119194779794626*Qe+.9505321522496607*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},et=Je,Mt=(Le=0)=>{let Ue=Math.abs(Le);return Ue>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Ue,1/2.4)-.055):Le*12.92},pt=({r:Le,g:Ue,b:Qe,alpha:_t},wt="rgb")=>{let Lt={mode:wt,r:Mt(Le),g:Mt(Ue),b:Mt(Qe)};return _t!==void 0&&(Lt.alpha=_t),Lt},Pt=pt,Ct=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.2409699419045226-Ue*1.537383177570094-.4986107602930034*Qe,g:Le*-.9692436362808796+Ue*1.8759675015077204+.0415550574071756*Qe,b:Le*.0556300796969936-Ue*.2039769588889765+1.0569715142428784*Qe});return _t!==void 0&&(wt.alpha=_t),wt},qt=Ct,Vt=lo(Li({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>De(et(Le)),xyz65:De},toMode:{rgb:Le=>qt(Ot(Le)),xyz65:Ot}}),Ht=Vt,Sr=Le=>(Le=Le%360)<0?Le+360:Le,Kr=Sr,Yt=(Le,Ue)=>Le.map((Qe,_t,wt)=>{if(Qe===void 0)return Qe;let Lt=Kr(Qe);return _t===0||Le[_t-1]===void 0?Lt:Ue(Lt-Kr(wt[_t-1]))}).reduce((Qe,_t)=>!Qe.length||_t===void 0||Qe[Qe.length-1]===void 0?(Qe.push(_t),Qe):(Qe.push(_t+Qe[Qe.length-1]),Qe),[]),Rt=Le=>Yt(Le,Ue=>Math.abs(Ue)<=180?Ue:Ue-360*Math.sign(Ue)),nr=Le=>Yt(Le,Ue=>Math.abs(Ue)>=180||Ue===0?Ue:Ue-360*Math.sign(Ue)),ur=Le=>Yt(Le,Ue=>Ue>=0?Ue:Ue+360),cr=Le=>Yt(Le,Ue=>Ue<=0?Ue:Ue-360),Rr=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Qr=Math.PI/180,Zr=180/Math.PI,ha=Rr[3]*Rr[4],Pa=Rr[1]*Rr[4],La=Rr[1]*Rr[2]-Rr[0]*Rr[3],un=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(La*Qe+Le*ha-Ue*Pa)/(La+ha-Pa),Lt=Qe-wt,pr=(Rr[4]*(Ue-wt)-Rr[2]*Lt)/Rr[3],Gr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Lt*Lt+pr*pr)/(Rr[4]*wt*(1-wt))};return Gr.s&&(Gr.h=Math.atan2(pr,Lt)*Zr-120),_t!==void 0&&(Gr.alpha=_t),Gr},Xa=un,ja=({h:Le,s:Ue,l:Qe,alpha:_t})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*Qr,Qe===void 0&&(Qe=0);let Lt=Ue===void 0?0:Ue*Qe*(1-Qe),pr=Math.cos(Le),Gr=Math.sin(Le);return wt.r=Qe+Lt*(Rr[0]*pr+Rr[1]*Gr),wt.g=Qe+Lt*(Rr[2]*pr+Rr[3]*Gr),wt.b=Qe+Lt*(Rr[4]*pr+Rr[5]*Gr),_t!==void 0&&(wt.alpha=_t),wt},Nn=ja,yn=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.s||!Ue.s)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Ue.s)*wt},Un=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h);return Math.abs(_t-Qe)>180?Qe-(_t-360*Math.sign(_t-Qe)):_t-Qe},li=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.c||!Ue.c)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Ue.c)*wt},Yn=(Le="rgb",Ue=[1,1,1,0])=>{let Qe=se(Le),_t=Qe.channels,wt=Qe.difference,Lt=P(Le);return(pr,Gr)=>{let va=Lt(pr),Qa=Lt(Gr);return Math.sqrt(_t.reduce((Ga,Ua,Mn)=>{let dn=wt[Ua]?wt[Ua](va,Qa):va[Ua]-Qa[Ua];return Ga+(Ue[Mn]||0)*Math.pow(isNaN(dn)?0:dn,2)},0))}},on=()=>Yn("lab65"),en=(Le=1,Ue=.045,Qe=.015)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),Mn=Gr.l,dn=Gr.a,_n=Gr.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(va-Mn,2),Zn=Math.pow(Ua-Sn,2),Ci=Math.pow(Qa-dn,2)+Math.pow(Ga-_n,2)-Zn;return Math.sqrt(Bn/Math.pow(Le,2)+Zn/Math.pow(1+Ue*Ua,2)+Ci/Math.pow(1+Qe*Ua,2))}},vi=(Le=1,Ue=1,Qe=1)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),Mn=Gr.l,dn=Gr.a,_n=Gr.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=(Ua+Sn)/2,Zn=.5*(1-Math.sqrt(Math.pow(Bn,7)/(Math.pow(Bn,7)+Math.pow(25,7)))),Ci=Qa*(1+Zn),qo=dn*(1+Zn),As=Math.sqrt(Ci*Ci+Ga*Ga),ls=Math.sqrt(qo*qo+_n*_n),Vl=Math.abs(Ci)+Math.abs(Ga)===0?0:Math.atan2(Ga,Ci);Vl+=(Vl<0)*2*Math.PI;let au=Math.abs(qo)+Math.abs(_n)===0?0:Math.atan2(_n,qo);au+=(au<0)*2*Math.PI;let Lu=Mn-va,uh=ls-As,wh=As*ls===0?0:au-Vl;wh-=(wh>Math.PI)*2*Math.PI,wh+=(wh<-Math.PI)*2*Math.PI;let Gh=2*Math.sqrt(As*ls)*Math.sin(wh/2),Gd=(va+Mn)/2,Ad=(As+ls)/2,ch;As*ls===0?ch=Vl+au:(ch=(Vl+au)/2,ch-=(Math.abs(Vl-au)>Math.PI)*Math.PI,ch+=(ch<0)*2*Math.PI);let Mv=Math.pow(Gd-50,2),vp=1-.17*Math.cos(ch-Math.PI/6)+.24*Math.cos(2*ch)+.32*Math.cos(3*ch+Math.PI/30)-.2*Math.cos(4*ch-63*Math.PI/180),mp=1+.015*Mv/Math.sqrt(20+Mv),gp=1+.045*Ad,yp=1+.015*Ad*vp,xg=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ch-275)/25,2)),p0=2*Math.sqrt(Math.pow(Ad,7)/(Math.pow(Ad,7)+Math.pow(25,7))),Md=-1*Math.sin(2*xg)*p0;return Math.sqrt(Math.pow(Lu/(Le*mp),2)+Math.pow(uh/(Ue*gp),2)+Math.pow(Gh/(Qe*yp),2)+Md*uh/(Ue*gp)*Gh/(Qe*yp))}},Yi=(Le=1,Ue=1)=>{let Qe=P("lab65");return(_t,wt)=>{let Lt=Qe(_t),pr=Lt.l,Gr=Lt.a,va=Lt.b,Qa=Math.sqrt(Gr*Gr+va*va),Ga=Math.atan2(va,Gr);Ga=Ga+2*Math.PI*(Ga<0);let Ua=Qe(wt),Mn=Ua.l,dn=Ua.a,_n=Ua.b,Sn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(pr-Mn,2),Zn=Math.pow(Qa-Sn,2),Ci=Math.pow(Gr-dn,2)+Math.pow(va-_n,2)-Zn,qo=Math.sqrt(Math.pow(Qa,4)/(Math.pow(Qa,4)+1900)),As=Ga>=164/180*Math.PI&&Ga<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Ga+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Ga+35/180*Math.PI)),ls=pr<16?.511:.040975*pr/(1+.01765*pr),Vl=.0638*Qa/(1+.0131*Qa)+.638,au=Vl*(qo*As+1-qo);return Math.sqrt(Bn/Math.pow(Le*ls,2)+Zn/Math.pow(Ue*Vl,2)+Ci/Math.pow(au,2))}},Ja=()=>{let Le=P("lab65");return(Ue,Qe)=>{let _t=Le(Ue),wt=Le(Qe),Lt=_t.l-wt.l,pr=_t.a-wt.a,Gr=_t.b-wt.b;return Math.abs(Lt)+Math.sqrt(pr*pr+Gr*Gr)}},Oa=()=>Yn("yiq",[.5053,.299,.1957]),lt=()=>Yn("itp",[518400,129600,518400]),rt=Le=>{let Ue=Le.reduce((_t,wt)=>{if(wt!==void 0){let Lt=wt*Math.PI/180;_t.sin+=Math.sin(Lt),_t.cos+=Math.cos(Lt)}return _t},{sin:0,cos:0}),Qe=Math.atan2(Ue.sin,Ue.cos)*180/Math.PI;return Qe<0?360+Qe:Qe},fr=Le=>{let Ue=Le.filter(Qe=>Qe!==void 0);return Ue.length?Ue.reduce((Qe,_t)=>Qe+_t,0)/Ue.length:void 0},lr=Le=>typeof Le=="function";function Tr(Le,Ue="rgb",Qe){let _t=se(Ue),wt=Le.map(P(Ue));return _t.channels.reduce((Lt,pr)=>{let Gr=wt.map(va=>va[pr]).filter(va=>va!==void 0);if(Gr.length){let va;lr(Qe)?va=Qe:Qe&&lr(Qe[pr])?va=Qe[pr]:_t.average&&lr(_t.average[pr])?va=_t.average[pr]:va=fr,Lt[pr]=va(Gr,pr)}return Lt},{mode:Ue})}var Ir={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Xa},toMode:{rgb:Nn},interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Dr=Ir,ot=({l:Le,a:Ue,b:Qe,alpha:_t},wt="lch")=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let Lt=Math.sqrt(Ue*Ue+Qe*Qe),pr={mode:wt,l:Le,c:Lt};return Lt&&(pr.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(pr.alpha=_t),pr},kt=ot,jt=({l:Le,c:Ue,h:Qe,alpha:_t},wt="lab")=>{Qe===void 0&&(Qe=0);let Lt={mode:wt,l:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(Lt.alpha=_t),Lt},ar=jt,Er=Math.pow(29,3)/Math.pow(3,3),xr=Math.pow(6,3)/Math.pow(29,3),zr={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Lr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},aa=Math.pow(29,3)/Math.pow(3,3),Sa=Math.pow(6,3)/Math.pow(29,3),wa=Le=>Math.pow(Le,3)>xr?Math.pow(Le,3):(116*Le-16)/Er,pn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz65",x:wa(Lt)*Lr.X,y:wa(wt)*Lr.Y,z:wa(pr)*Lr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tn=pn,ai=Le=>qt(tn(Le)),rn=ai,Ri=Le=>Le>xr?Math.cbrt(Le):(Er*Le+16)/116,Gn=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ri(Le/Lr.X),Lt=Ri(Ue/Lr.Y),pr=Ri(Qe/Lr.Z),Gr={mode:"lab65",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},no=Gn,Di=Le=>{let Ue=no(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},fn=Di,Ai=1,jn=1,Xn=26/180*Math.PI,eo=Math.cos(Xn),gi=Math.sin(Xn),qi=100/Math.log(139/100),io=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"lab65",l:(Math.exp(Le*Ai/qi)-1)/.0039},Lt=(Math.exp(.0435*Ue*jn*Ai)-1)/.075,pr=Lt*Math.cos(Qe/180*Math.PI-Xn),Gr=Lt*Math.sin(Qe/180*Math.PI-Xn);return wt.a=pr*eo-Gr/.83*gi,wt.b=pr*gi+Gr/.83*eo,_t!==void 0&&(wt.alpha=_t),wt},oo=io,Vn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue*eo+Qe*gi,Lt=.83*(Qe*eo-Ue*gi),pr=Math.sqrt(wt*wt+Lt*Lt),Gr={mode:"dlch",l:qi/Ai*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*jn*Ai)};return Gr.c&&(Gr.h=Kr((Math.atan2(Lt,wt)+Xn)/Math.PI*180)),_t!==void 0&&(Gr.alpha=_t),Gr},qn=Vn,Hi=Le=>oo(kt(Le,"dlch")),Mi=Le=>ar(qn(Le),"dlab"),Ro={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:Le=>rn(Hi(Le))},fromMode:{lab65:Mi,rgb:Le=>Mi(fn(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},go=Ro,Eo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:oo,dlab:Le=>ar(Le,"dlab"),rgb:Le=>rn(oo(Le))},fromMode:{lab65:qn,dlab:Le=>kt(Le,"dlch"),rgb:Le=>qn(fn(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:Rt},alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},Ao=Eo;function ds({h:Le,s:Ue,i:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 4:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 5:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function jo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsi",s:Le+Ue+Qe===0?0:1-3*Lt/(Le+Ue+Qe),i:(Le+Ue+Qe)/3};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue{switch(Ue){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Io=Vi,Xi=new RegExp(`^hsla?\\(\\s*${T}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),Ko=Le=>{let Ue=Le.match(Xi);if(!Ue)return;let Qe={mode:"hsl"};return Ue[3]!==void 0?Qe.h=+Ue[3]:Ue[1]!==void 0&&Ue[2]!==void 0&&(Qe.h=Io(Ue[1],Ue[2])),Ue[4]!==void 0&&(Qe.s=Math.min(Math.max(0,Ue[4]/100),1)),Ue[5]!==void 0&&(Qe.l=Math.min(Math.max(0,Ue[5]/100),1)),Ue[6]!==void 0?Qe.alpha=Math.max(0,Math.min(1,Ue[6]/100)):Ue[7]!==void 0&&(Qe.alpha=Math.max(0,Math.min(1,+Ue[7]))),Qe},Uo=Ko;function Ls(Le,Ue){if(!Ue||Ue[0]!=="hsl"&&Ue[0]!=="hsla")return;let Qe={mode:"hsl"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.s=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.l=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Ss=Ls,Vo={mode:"hsl",toMode:{rgb:wo},fromMode:{rgb:pi},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Ss,Uo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Vs=Vo;function Ts({h:Le,s:Ue,v:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe,g:Qe*(1-Ue*wt),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1-Ue*wt),g:Qe,b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe,b:Qe*(1-Ue*wt)};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue*wt),b:Qe};break;case 4:Lt={r:Qe*(1-Ue*wt),g:Qe*(1-Ue),b:Qe};break;case 5:Lt={r:Qe,g:Qe*(1-Ue),b:Qe*(1-Ue*wt)};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function Bo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsv",s:wt===0?0:1-Lt/wt,v:wt};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue1){let wt=Ue+Qe;Ue/=wt,Qe/=wt}return Ts({h:Le,s:Qe===1?1:1-Ue/(1-Qe),v:1-Qe,alpha:_t})}function bs(Le){let Ue=Bo(Le);if(Ue===void 0)return;let Qe=Ue.s!==void 0?Ue.s:0,_t=Ue.v!==void 0?Ue.v:0,wt={mode:"hwb",w:(1-Qe)*_t,b:1-_t};return Ue.h!==void 0&&(wt.h=Ue.h),Ue.alpha!==void 0&&(wt.alpha=Ue.alpha),wt}function Dl(Le,Ue){if(!Ue||Ue[0]!=="hwb")return;let Qe={mode:"hwb"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.w=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.b=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var hl=Dl,ps={mode:"hwb",toMode:{rgb:yo},fromMode:{rgb:bs},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[hl],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},w:At,b:At,alpha:{use:At,fixup:$t}},difference:{h:Un},average:{h:rt}},dl=ps,wu=203,lu=.1593017578125,xc=78.84375,Fl=.8359375,pl=18.8515625,$u=18.6875;function uu(Le){if(Le<0)return 0;let Ue=Math.pow(Le,1/xc);return 1e4*Math.pow(Math.max(0,Ue-Fl)/(pl-$u*Ue),1/lu)}function tl(Le){if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),xc)}var vs=Le=>Math.max(Le/wu,0),os=({i:Le,t:Ue,p:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=uu(Le+.008609037037932761*Ue+.11102962500302593*Qe),Lt=uu(Le-.00860903703793275*Ue-.11102962500302599*Qe),pr=uu(Le+.5600313357106791*Ue-.32062717498731885*Qe),Gr={mode:"xyz65",x:vs(2.070152218389422*wt-1.3263473389671556*Lt+.2066510476294051*pr),y:vs(.3647385209748074*wt+.680566024947227*Lt-.0453045459220346*pr),z:vs(-.049747207535812*wt-.0492609666966138*Lt+1.1880659249923042*pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ms=os,rl=(Le=0)=>Math.max(Le*wu,0),Fu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{let wt=rl(Le),Lt=rl(Ue),pr=rl(Qe),Gr=tl(.3592832590121217*wt+.6976051147779502*Lt-.0358915932320289*pr),va=tl(-.1920808463704995*wt+1.1004767970374323*Lt+.0753748658519118*pr),Qa=tl(.0070797844607477*wt+.0748396662186366*Lt+.8433265453898765*pr),Ga=.5*Gr+.5*va,Ua=1.61376953125*Gr-3.323486328125*va+1.709716796875*Qa,Mn=4.378173828125*Gr-4.24560546875*va-.132568359375*Qa,dn={mode:"itp",i:Ga,t:Ua,p:Mn};return _t!==void 0&&(dn.alpha=_t),dn},zu=Fu,Ku={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ms,rgb:Le=>qt(ms(Le))},fromMode:{xyz65:zu,rgb:Le=>zu(et(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:$t}}},bc=Ku,Lh=134.03437499999998,rh=16295499532821565e-27,Ju=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),Lh)},ss=(Le=0)=>Math.max(Le*203,0),ah=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le=ss(Le),Ue=ss(Ue),Qe=ss(Qe);let wt=1.15*Le-.15*Qe,Lt=.66*Ue+.34*Le,pr=Ju(.41478972*wt+.579999*Lt+.014648*Qe),Gr=Ju(-.20151*wt+1.120649*Lt+.0531008*Qe),va=Ju(-.0166008*wt+.2648*Lt+.6684799*Qe),Qa=(pr+Gr)/2,Ga={mode:"jab",j:.44*Qa/(1-.56*Qa)-rh,a:3.524*pr-4.066708*Gr+.542708*va,b:.199076*pr+1.096799*Gr-1.295875*va};return _t!==void 0&&(Ga.alpha=_t),Ga},wc=ah,pc=134.03437499999998,Nf=16295499532821565e-27,Bu=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le,1/pc);return 1e4*Math.pow((Fl-Ue)/($u*Ue-pl),1/lu)},Tc=Le=>Le/203,Ou=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+Nf)/(.44+.56*(Le+Nf)),Lt=Bu(wt+.13860504*Ue+.058047316*Qe),pr=Bu(wt-.13860504*Ue-.058047316*Qe),Gr=Bu(wt-.096019242*Ue-.8118919*Qe),va={mode:"xyz65",x:Tc(1.661373024652174*Lt-.914523081304348*pr+.23136208173913045*Gr),y:Tc(-.3250758611844533*Lt+1.571847026732543*pr-.21825383453227928*Gr),z:Tc(-.090982811*Lt-.31272829*pr+1.5227666*Gr)};return _t!==void 0&&(va.alpha=_t),va},Gc=Ou,pf=Le=>{let Ue=wc(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},$l=pf,jf=Le=>qt(Gc(Le)),Hc=jf,Wc={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:$l,xyz65:wc},toMode:{rgb:Hc,xyz65:Gc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Qu=Wc,Yc=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"jch",j:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},Nu=Yc,Uf=({j:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"jab",j:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},al=Uf,Xc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:al,rgb:Le=>Hc(al(Le))},fromMode:{rgb:Le=>Nu($l(Le)),jab:Nu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,j:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},ju=Xc,Ac=Math.pow(29,3)/Math.pow(3,3),Zc=Math.pow(6,3)/Math.pow(29,3),ec=Le=>Math.pow(Le,3)>Zc?Math.pow(Le,3):(116*Le-16)/Ac,cu=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz50",x:ec(Lt)*zr.X,y:ec(wt)*zr.Y,z:ec(pr)*zr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tc=cu,vf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.1341359569958707-Ue*1.6173863321612538-.4906619460083532*Qe,g:Le*-.978795502912089+Ue*1.916254567259524+.03344273116131949*Qe,b:Le*.07195537988411677-Ue*.2289768264158322+1.405386058324125*Qe});return _t!==void 0&&(wt.alpha=_t),wt},Tu=vf,nh=Le=>Tu(tc(Le)),vl=nh,ml=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz50",x:.436065742824811*Ue+.3851514688337912*Qe+.14307845442264197*_t,y:.22249319175623702*Ue+.7168870538238823*Qe+.06061979053616537*_t,z:.013923904500943465*Ue+.09708128566574634*Qe+.7140993584005155*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},rc=ml,yl=Le=>Le>Zc?Math.cbrt(Le):(Ac*Le+16)/116,qf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=yl(Le/zr.X),Lt=yl(Ue/zr.Y),pr=yl(Qe/zr.Z),Gr={mode:"lab",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ac=qf,Mc=Le=>{let Ue=ac(rc(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},mf=Mc;function Jo(Le,Ue){if(!Ue||Ue[0]!=="lab")return;let Qe={mode:"lab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.value),100)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*125/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*125/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var ih=Jo,fu={mode:"lab",toMode:{xyz50:tc,rgb:vl},fromMode:{xyz50:ac,rgb:mf},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ih],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Sl=fu,El=lo(Li({},Sl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:tn,rgb:rn},fromMode:{xyz65:no,rgb:fn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),oh=El;function Au(Le,Ue){if(!Ue||Ue[0]!=="lch")return;let Qe={mode:"lch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.value),100)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*150/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var $c=Au,_l={mode:"lch",toMode:{lab:ar,rgb:Le=>vl(ar(Le))},fromMode:{rgb:Le=>kt(mf(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$c],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},nl=_l,gf=lo(Li({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>rn(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(fn(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kc=gf,sh=({l:Le,u:Ue,v:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"lchuv",l:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},hu=sh,Uu=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"luv",l:Le,u:Ue?Ue*Math.cos(Qe/180*Math.PI):0,v:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},qu=Uu,nc=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),yf=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),_f=nc(zr.X,zr.Y,zr.Z),Mu=yf(zr.X,zr.Y,zr.Z),ic=Le=>Le<=Zc?Ac*Le:116*Math.cbrt(Le)-16,Sc=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=ic(Ue/zr.Y),Lt=nc(Le,Ue,Qe),pr=yf(Le,Ue,Qe);!isFinite(Lt)||!isFinite(pr)?wt=Lt=pr=0:(Lt=13*wt*(Lt-_f),pr=13*wt*(pr-Mu));let Gr={mode:"luv",l:wt,u:Lt,v:pr};return _t!==void 0&&(Gr.alpha=_t),Gr},Vu=Sc,xo=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),Ec=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),xh=xo(zr.X,zr.Y,zr.Z),Vf=Ec(zr.X,zr.Y,zr.Z),xf=({l:Le,u:Ue,v:Qe,alpha:_t})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue/(13*Le)+xh,Lt=Qe/(13*Le)+Vf,pr=zr.Y*(Le<=8?Le/Ac:Math.pow((Le+16)/116,3)),Gr=pr*(9*wt)/(4*Lt),va=pr*(12-3*wt-20*Lt)/(4*Lt),Qa={mode:"xyz50",x:Gr,y:pr,z:va};return _t!==void 0&&(Qa.alpha=_t),Qa},Gf=xf,bh=Le=>hu(Vu(rc(Le))),Hf=Le=>Tu(Gf(qu(Le))),il={mode:"lchuv",toMode:{luv:qu,rgb:Hf},fromMode:{rgb:bh,luv:hu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},kl=il,kc=lo(Li({},_r),{mode:"lrgb",toMode:{rgb:Pt},fromMode:{rgb:Ke},parse:["srgb-linear"],serialize:"srgb-linear"}),Cc=kc,Lc={mode:"luv",toMode:{xyz50:Gf,rgb:Le=>Tu(Gf(Le))},fromMode:{xyz50:Vu,rgb:Le=>Vu(rc(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:$t}}},vc=Lc,Ft=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Ue+.0514459932675022*Qe),Lt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Ue+.1073969535369406*Qe),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Ue+.6299787016738222*Qe),Gr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Lt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Lt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Lt-.8086757549230774*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},tr=Ft,Fr=Le=>{let Ue=tr(Ke(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},wr=Fr,ea=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.pow(Le+.3963377773761749*Ue+.2158037573099136*Qe,3),Lt=Math.pow(Le-.1055613458156586*Ue-.0638541728258133*Qe,3),pr=Math.pow(Le-.0894841775298119*Ue-1.2914855480194092*Qe,3),Gr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Lt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Lt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Lt+1.7076146940746117*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},ba=ea,Ia=Le=>Pt(ba(Le)),Na=Ia;function Za(Le){let _t=1.170873786407767;return .5*(_t*Le-.206+Math.sqrt((_t*Le-.206)*(_t*Le-.206)+4*.03*_t*Le))}function mn(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Da(Le,Ue){let Qe,_t,wt,Lt,pr,Gr,va,Qa;-1.88170328*Le-.80936493*Ue>1?(Qe=1.19086277,_t=1.76576728,wt=.59662641,Lt=.75515197,pr=.56771245,Gr=4.0767416621,va=-3.3077115913,Qa=.2309699292):1.81444104*Le-1.19445276*Ue>1?(Qe=.73956515,_t=-.45954404,wt=.08285427,Lt=.1254107,pr=.14503204,Gr=-1.2684380046,va=2.6097574011,Qa=-.3413193965):(Qe=1.35733652,_t=-.00915799,wt=-1.1513021,Lt=-.50559606,pr=.00692167,Gr=-.0041960863,va=-.7034186147,Qa=1.707614701);let Ga=Qe+_t*Le+wt*Ue+Lt*Le*Le+pr*Le*Ue,Ua=.3963377774*Le+.2158037573*Ue,Mn=-.1055613458*Le-.0638541728*Ue,dn=-.0894841775*Le-1.291485548*Ue;{let _n=1+Ga*Ua,Sn=1+Ga*Mn,Bn=1+Ga*dn,Zn=_n*_n*_n,Ci=Sn*Sn*Sn,qo=Bn*Bn*Bn,As=3*Ua*_n*_n,ls=3*Mn*Sn*Sn,Vl=3*dn*Bn*Bn,au=6*Ua*Ua*_n,Lu=6*Mn*Mn*Sn,uh=6*dn*dn*Bn,wh=Gr*Zn+va*Ci+Qa*qo,Gh=Gr*As+va*ls+Qa*Vl,Gd=Gr*au+va*Lu+Qa*uh;Ga=Ga-wh*Gh/(Gh*Gh-.5*wh*Gd)}return Ga}function Ha(Le,Ue){let Qe=Da(Le,Ue),_t=ba({l:1,a:Qe*Le,b:Qe*Ue}),wt=Math.cbrt(1/Math.max(_t.r,_t.g,_t.b)),Lt=wt*Qe;return[wt,Lt]}function $a(Le,Ue,Qe,_t,wt,Lt=null){Lt||(Lt=Ha(Le,Ue));let pr;if((Qe-wt)*Lt[1]-(Lt[0]-wt)*_t<=0)pr=Lt[1]*wt/(_t*Lt[0]+Lt[1]*(wt-Qe));else{pr=Lt[1]*(wt-1)/(_t*(Lt[0]-1)+Lt[1]*(wt-Qe));{let Gr=Qe-wt,va=_t,Qa=.3963377774*Le+.2158037573*Ue,Ga=-.1055613458*Le-.0638541728*Ue,Ua=-.0894841775*Le-1.291485548*Ue,Mn=Gr+va*Qa,dn=Gr+va*Ga,_n=Gr+va*Ua;{let Sn=wt*(1-pr)+pr*Qe,Bn=pr*_t,Zn=Sn+Bn*Qa,Ci=Sn+Bn*Ga,qo=Sn+Bn*Ua,As=Zn*Zn*Zn,ls=Ci*Ci*Ci,Vl=qo*qo*qo,au=3*Mn*Zn*Zn,Lu=3*dn*Ci*Ci,uh=3*_n*qo*qo,wh=6*Mn*Mn*Zn,Gh=6*dn*dn*Ci,Gd=6*_n*_n*qo,Ad=4.0767416621*As-3.3077115913*ls+.2309699292*Vl-1,ch=4.0767416621*au-3.3077115913*Lu+.2309699292*uh,Mv=4.0767416621*wh-3.3077115913*Gh+.2309699292*Gd,vp=ch/(ch*ch-.5*Ad*Mv),mp=-Ad*vp,gp=-1.2684380046*As+2.6097574011*ls-.3413193965*Vl-1,yp=-1.2684380046*au+2.6097574011*Lu-.3413193965*uh,xg=-1.2684380046*wh+2.6097574011*Gh-.3413193965*Gd,p0=yp/(yp*yp-.5*gp*xg),Md=-gp*p0,v0=-.0041960863*As-.7034186147*ls+1.707614701*Vl-1,m0=-.0041960863*au-.7034186147*Lu+1.707614701*uh,Hd=-.0041960863*wh-.7034186147*Gh+1.707614701*Gd,_p=m0/(m0*m0-.5*v0*Hd),bg=-v0*_p;mp=vp>=0?mp:1e6,Md=p0>=0?Md:1e6,bg=_p>=0?bg:1e6,pr+=Math.min(mp,Math.min(Md,bg))}}}return pr}function vn(Le,Ue,Qe=null){Qe||(Qe=Ha(Le,Ue));let _t=Qe[0],wt=Qe[1];return[wt/_t,wt/(1-_t)]}function En(Le,Ue,Qe){let _t=Ha(Ue,Qe),wt=$a(Ue,Qe,Le,1,Le,_t),Lt=vn(Ue,Qe,_t),pr=.11516993+1/(7.4477897+4.1590124*Qe+Ue*(-2.19557347+1.75198401*Qe+Ue*(-2.13704948-10.02301043*Qe+Ue*(-4.24894561+5.38770819*Qe+4.69891013*Ue)))),Gr=.11239642+1/(1.6132032-.68124379*Qe+Ue*(.40370612+.90148123*Qe+Ue*(-.27087943+.6122399*Qe+Ue*(.00299215-.45399568*Qe-.14661872*Ue)))),va=wt/Math.min(Le*Lt[0],(1-Le)*Lt[1]),Qa=Le*pr,Ga=(1-Le)*Gr,Ua=.9*va*Math.sqrt(Math.sqrt(1/(1/(Qa*Qa*Qa*Qa)+1/(Ga*Ga*Ga*Ga))));return Qa=Le*.4,Ga=(1-Le)*.8,[Math.sqrt(1/(1/(Qa*Qa)+1/(Ga*Ga))),Ua,wt]}function yi(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:Za(Ue)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Lt=Math.sqrt(Qe*Qe+_t*_t);if(!Lt)return wt.s=0,wt;let[pr,Gr,va]=En(Ue,Qe/Lt,_t/Lt),Qa;if(Ltyi(wr(Le))},toMode:{oklab:_i,rgb:Le=>Na(_i(Le))}}),ri=ki;function kn(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Qe*Qe+_t*_t),Lt=wt?Qe/wt:1,pr=wt?_t/wt:1,[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=va/(wt+Ue*va),Mn=Ua*Ue,dn=Ua*wt,_n=mn(Mn),Sn=dn*_n/Mn,Bn=ba({l:_n,a:Lt*Sn,b:pr*Sn}),Zn=Math.cbrt(1/Math.max(Bn.r,Bn.g,Bn.b,0));Ue=Ue/Zn,wt=wt/Zn*Za(Ue)/Ue,Ue=Za(Ue);let Ci={mode:"okhsv",s:wt?(Qa+va)*dn/(va*Qa+va*Ga*dn):0,v:Ue?Ue/Mn:0};return Ci.s&&(Ci.h=Kr(Math.atan2(_t,Qe)*180/Math.PI)),Le.alpha!==void 0&&(Ci.alpha=Le.alpha),Ci}function Ln(Le){let Ue={mode:"oklab"};Le.alpha!==void 0&&(Ue.alpha=Le.alpha);let Qe=Le.h!==void 0?Le.h:0,_t=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Lt=Math.cos(Qe/180*Math.PI),pr=Math.sin(Qe/180*Math.PI),[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=1-_t*Qa/(Qa+va-va*Ga*_t),Mn=_t*va*Qa/(Qa+va-va*Ga*_t),dn=mn(Ua),_n=Mn*dn/Ua,Sn=ba({l:dn,a:Lt*_n,b:pr*_n}),Bn=Math.cbrt(1/Math.max(Sn.r,Sn.g,Sn.b,0)),Zn=mn(wt*Ua),Ci=Mn*Zn/Ua;return Ue.l=Zn*Bn,Ue.a=Ci*Lt*Bn,Ue.b=Ci*pr*Bn,Ue}var Ni=lo(Li({},Pi),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:kn,rgb:Le=>kn(wr(Le))},toMode:{oklab:Ln,rgb:Le=>Na(Ln(Le))}}),Zi=Ni;function Co(Le,Ue){if(!Ue||Ue[0]!=="oklab")return;let Qe={mode:"oklab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*.4/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*.4/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Do=Co,Fo=lo(Li({},Sl),{mode:"oklab",toMode:{lrgb:ba,rgb:Na},fromMode:{lrgb:tr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Do],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),Yo=Fo;function bo(Le,Ue){if(!Ue||Ue[0]!=="oklch")return;let Qe={mode:"oklch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*.4/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Gs=bo,Es=lo(Li({},nl),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Na(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Gs],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ns=Es,Kn=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.486570948648216*Ue+.265667693169093*Qe+.1982172852343625*_t,y:.2289745640697487*Ue+.6917385218365062*Qe+.079286914093745*_t,z:0*Ue+.0451133818589026*Qe+1.043944368900976*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},zo=Kn,gs=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*2.4934969119414263-Ue*.9313836179191242-.402710784450717*Qe,g:Le*-.8294889695615749+Ue*1.7626640603183465+.0236246858419436*Qe,b:Le*.0358458302437845-Ue*.0761723892680418+.9568845240076871*Qe},"p3");return _t!==void 0&&(wt.alpha=_t),wt},js=gs,Cl=lo(Li({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>js(et(Le)),xyz65:js},toMode:{rgb:Le=>qt(zo(Le)),xyz65:zo}}),zl=Cl,Kl=Le=>{let Ue=Math.abs(Le);return Ue>=1/512?Math.sign(Le)*Math.pow(Ue,1/1.8):16*Le},Gu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Ue*.2555720873797946-.0511018649755453*Qe),g:Kl(Le*-.5446307051249019+Ue*1.5082477428451466+.0205274474364214*Qe),b:Kl(Le*0+Ue*0+1.2119675456389452*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},xl=Gu,Hu=(Le=0)=>{let Ue=Math.abs(Le);return Ue>=16/512?Math.sign(Le)*Math.pow(Ue,1.8):Le/16},Su=Le=>{let Ue=Hu(Le.r),Qe=Hu(Le.g),_t=Hu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Ue+.1351812974005331*Qe+.0313477341283922*_t,y:.2880748288194013*Ue+.7118352342418731*Qe+899369387256e-16*_t,z:0*Ue+0*Qe+.8251046025104602*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},mc=Su,Jc=lo(Li({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:xl,rgb:Le=>xl(rc(Le))},toMode:{xyz50:mc,rgb:Le=>Tu(mc(Le))}}),oc=Jc,du=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Ue=Math.abs(Le);return Ue>Jl?(Math.sign(Le)||1)*(du*Math.pow(Ue,.45)-(du-1)):4.5*Le},Eu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Ue*.3556707837763925-.2533662813736599*Qe),g:Ql(Le*-.6666843518324893+Ue*1.6164812366349395+.0157685458139111*Qe),b:Ql(Le*.0176398574453108-Ue*.0427706132578085+.9421031212354739*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},bf=Eu,lh=1.09929682680944,Pc=.018053968510807,Ks=(Le=0)=>{let Ue=Math.abs(Le);return Ue{let Ue=Ks(Le.r),Qe=Ks(Le.g),_t=Ks(Le.b),wt={mode:"xyz65",x:.6369580483012911*Ue+.1446169035862083*Qe+.1688809751641721*_t,y:.262700212011267*Ue+.6779980715188708*Qe+.059301716469862*_t,z:0*Ue+.0280726930490874*Qe+1.0609850577107909*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Wu=Bl,wf=lo(Li({},_r),{mode:"rec2020",fromMode:{xyz65:bf,rgb:Le=>bf(et(Le))},toMode:{xyz65:Wu,rgb:Le=>qt(Wu(Le))},parse:["rec2020"],serialize:"rec2020"}),Qc=wf,ku=.0037930732552754493,Ol=Math.cbrt(ku),Nl=Le=>Math.cbrt(Le)-Ol,fi=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt=Nl(.3*Ue+.622*Qe+.078*_t+ku),pr=Nl(.23*Ue+.692*Qe+.078*_t+ku),Gr=Nl(.2434226892454782*Ue+.2047674442449682*Qe+.5518098665095535*_t+ku),va={mode:"xyb",x:(Lt-pr)/2,y:(Lt+pr)/2,b:Gr-(Lt+pr)/2};return wt!==void 0&&(va.alpha=wt),va},eu=fi,$e=Le=>Math.pow(Le+Ol,3),nt=({x:Le,y:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=$e(Le+Ue)-ku,Lt=$e(Ue-Le)-ku,pr=$e(Qe+Ue)-ku,Gr=Pt({r:11.031566904639861*wt-9.866943908131562*Lt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Lt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Lt+1.9459282407775895*pr});return _t!==void 0&&(Gr.alpha=_t),Gr},mt=nt,xt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:mt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:$t}}},Bt=xt,zt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Tu,lab:ac},fromMode:{rgb:rc,lab:tc},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},Wt=zt,Pr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz50",x:1.0479298208405488*Ue+.0229467933410191*Qe-.0501922295431356*_t,y:.0296278156881593*Ue+.990434484573249*Qe-.0170738250293851*_t,z:-.0092430581525912*Ue+.0150551448965779*Qe+.7518742899580008*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},Br=Pr,kr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz65",x:.9554734527042182*Ue-.0230985368742614*Qe+.0632593086610217*_t,y:-.0283697069632081*Ue+1.0099954580058226*Qe+.021041398966943*_t,z:.0123140016883199*Ue-.0205076964334779*Qe+1.3303659366080753*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},jr=kr,Jr={mode:"xyz65",toMode:{rgb:qt,xyz50:Br},fromMode:{rgb:et,xyz50:jr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},la=Jr,xa=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Ue+.11448223*Qe,i:.59597799*Le-.2741761*Ue-.32180189*Qe,q:.21147017*Le-.52261711*Ue+.31114694*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Ba=xa,an=({y:Le,i:Ue,q:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rgb",r:Le+.95608445*Ue+.6208885*Qe,g:Le-.27137664*Ue-.6486059*Qe,b:Le-1.10561724*Ue+1.70250126*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Tn=an,ii={mode:"yiq",toMode:{rgb:Tn},fromMode:{rgb:Ba},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:$t}}},Si=ii,oi=(Le,Ue)=>Math.round(Le*(Ue=Math.pow(10,Ue)))/Ue,Ji=(Le=4)=>Ue=>typeof Ue=="number"?oi(Ue,Le):Ue,Qi=Ji,Oo=Qi(2),Qo=Le=>Math.max(0,Math.min(1,Le||0)),vo=Le=>Math.round(Qo(Le)*255),ys=P("rgb"),ol=P("hsl"),jl=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return"#"+(1<<24|Ue<<16|Qe<<8|_t).toString(16).slice(1)},Hs=Le=>{if(Le===void 0)return;let Ue=vo(Le.alpha!==void 0?Le.alpha:1);return jl(Le)+(256|Ue).toString(16).slice(1)},Cu=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Ue}, ${Qe}, ${_t})`:`rgba(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},hi=Le=>{if(Le===void 0)return;let Ue=Oo(Le.h||0),Qe=Oo(Qo(Le.s)*100)+"%",_t=Oo(Qo(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Ue}, ${Qe}, ${_t})`:`hsla(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},wi=Le=>{let Ue=B(Le);if(!Ue)return;let Qe=se(Ue.mode);if(!Qe.serialize||typeof Qe.serialize=="string"){let _t=`color(${Qe.serialize||`--${Ue.mode}`} `;return Qe.channels.forEach((wt,Lt)=>{wt!=="alpha"&&(_t+=(Lt?" ":"")+(Ue[wt]!==void 0?Ue[wt]:"none"))}),Ue.alpha!==void 0&&Ue.alpha<1&&(_t+=` / ${Ue.alpha}`),_t+")"}if(typeof Qe.serialize=="function")return Qe.serialize(Ue)},sl=Le=>jl(ys(Le)),sc=Le=>Hs(ys(Le)),tu=Le=>Cu(ys(Le)),Ps=Le=>hi(ol(Le)),gc={normal:(Le,Ue)=>Ue,multiply:(Le,Ue)=>Le*Ue,screen:(Le,Ue)=>Le+Ue-Le*Ue,"hard-light":(Le,Ue)=>Ue<.5?Le*2*Ue:2*Ue*(1-Le)-1,overlay:(Le,Ue)=>Le<.5?Ue*2*Le:2*Le*(1-Ue)-1,darken:(Le,Ue)=>Math.min(Le,Ue),lighten:(Le,Ue)=>Math.max(Le,Ue),"color-dodge":(Le,Ue)=>Le===0?0:Ue===1?1:Math.min(1,Le/(1-Ue)),"color-burn":(Le,Ue)=>Le===1?1:Ue===0?0:1-Math.min(1,(1-Le)/Ue),"soft-light":(Le,Ue)=>Ue<.5?Le-(1-2*Ue)*Le*(1-Le):Le+(2*Ue-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Ue)=>Math.abs(Le-Ue),exclusion:(Le,Ue)=>Le+Ue-2*Le*Ue},pu=(Le,Ue="normal",Qe="rgb")=>{let _t=typeof Ue=="function"?Ue:gc[Ue],wt=P(Qe),Lt=se(Qe).channels;return Le.map(Gr=>{let va=wt(Gr);return va.alpha===void 0&&(va.alpha=1),va}).reduce((Gr,va)=>{if(Gr===void 0)return va;let Qa=va.alpha+Gr.alpha*(1-va.alpha);return Lt.reduce((Ga,Ua)=>(Ua!=="alpha"&&(Qa===0?Ga[Ua]=0:(Ga[Ua]=va.alpha*(1-Gr.alpha)*va[Ua]+va.alpha*Gr.alpha*_t(Gr[Ua],va[Ua])+(1-va.alpha)*Gr.alpha*Gr[Ua],Ga[Ua]=Math.max(0,Math.min(1,Ga[Ua]/Qa)))),Ga),{mode:Qe,alpha:Qa})})},ll=pu,ef=([Le,Ue])=>Le+Math.random()*(Ue-Le),de=Le=>Object.keys(Le).reduce((Ue,Qe)=>{let _t=Le[Qe];return Ue[Qe]=Array.isArray(_t)?_t:[_t,_t],Ue},{}),Ee=(Le="rgb",Ue={})=>{let Qe=se(Le),_t=de(Ue);return Qe.channels.reduce((wt,Lt)=>((_t.alpha||Lt!=="alpha")&&(wt[Lt]=ef(_t[Lt]||Qe.ranges[Lt])),wt),{mode:Le})},qe=Ee,tt=(Le,Ue="rgb",Qe=!1)=>{let _t=Ue?se(Ue).channels:null,wt=Ue?P(Ue):B;return Lt=>{let pr=wt(Lt);if(!pr)return;let Gr=(_t||se(pr.mode).channels).reduce((Qa,Ga)=>{let Ua=Le(pr[Ga],Ga,pr,Ue);return Ua!==void 0&&!isNaN(Ua)&&(Qa[Ga]=Ua),Qa},{mode:pr.mode});if(!Qe)return Gr;let va=B(Lt);return va&&va.mode!==Gr.mode?P(va.mode)(Gr):Gr}},at=(Le,Ue,Qe)=>Ue!=="alpha"?(Le||0)*(Qe.alpha!==void 0?Qe.alpha:1):Le,ct=(Le,Ue,Qe)=>Ue!=="alpha"&&Qe.alpha!==0?(Le||0)/(Qe.alpha!==void 0?Qe.alpha:1):Le,Nt=(Le=1,Ue=0)=>(Qe,_t)=>_t!=="alpha"?Qe*Le+Ue:Qe,St=(Le=1,Ue=1,Qe=0)=>(_t,wt)=>wt!=="alpha"?Le*Math.pow(_t,Ue)+Qe:_t,Jt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Ue=1,Qe,_t,wt,Lt;for(;UeUe=>Le<=0?1:Le>=1?0:Math.pow(Ue,Math.log(.5)/Math.log(Le)),Hr=gr,Vr=Le=>typeof Le=="function",ca=Le=>Le&&typeof Le=="object",Aa=Le=>typeof Le=="number",Xr=(Le,Ue="rgb",Qe,_t)=>{let wt=se(Ue),Lt=P(Ue),pr=[],Gr=[],va={};Le.forEach(Mn=>{Array.isArray(Mn)?(pr.push(Lt(Mn[0])),Gr.push(Mn[1])):Aa(Mn)||Vr(Mn)?va[Gr.length]=Mn:(pr.push(Lt(Mn)),Gr.push(void 0))}),mr(Gr);let Qa=wt.channels.reduce((Mn,dn)=>{let _n;return ca(Qe)&&ca(Qe[dn])&&Qe[dn].fixup?_n=Qe[dn].fixup:ca(wt.interpolate[dn])&&wt.interpolate[dn].fixup?_n=wt.interpolate[dn].fixup:_n=Sn=>Sn,Mn[dn]=_n(pr.map(Sn=>Sn[dn])),Mn},{});if(_t){let Mn=pr.map((dn,_n)=>wt.channels.reduce((Sn,Bn)=>(Sn[Bn]=Qa[Bn][_n],Sn),{mode:Ue}));Qa=wt.channels.reduce((dn,_n)=>(dn[_n]=Mn.map(Sn=>{let Bn=_t(Sn[_n],_n,Sn,Ue);return isNaN(Bn)?void 0:Bn}),dn),{})}let Ga=wt.channels.reduce((Mn,dn)=>{let _n;return Vr(Qe)?_n=Qe:ca(Qe)&&Vr(Qe[dn])?_n=Qe[dn]:ca(Qe)&&ca(Qe[dn])&&Qe[dn].use?_n=Qe[dn].use:Vr(wt.interpolate[dn])?_n=wt.interpolate[dn]:ca(wt.interpolate[dn])&&(_n=wt.interpolate[dn].use),Mn[dn]=_n(Qa[dn]),Mn},{}),Ua=pr.length-1;return Mn=>{if(Mn=Math.min(Math.max(0,Mn),1),Mn<=Gr[0])return pr[0];if(Mn>Gr[Ua])return pr[Ua];let dn=0;for(;Gr[dn]{let ls=Ga[As](Ci);return ls!==void 0&&(qo[As]=ls),qo},{mode:Ue})}},oa=(Le,Ue="rgb",Qe)=>Xr(Le,Ue,Qe),fa=(Le,Ue)=>(Qe,_t="rgb",wt)=>{let Lt=Ue?tt(Ue,_t):void 0,pr=Xr(Qe,_t,wt,Le);return Lt?Gr=>Lt(pr(Gr)):pr},Ea=fa(at,ct),Ma=(Le,Ue)=>(Le+Ue)%Ue,sa=(Le,Ue,Qe,_t,wt)=>{let Lt=wt*wt,pr=Lt*wt;return((1-3*wt+3*Lt-pr)*Le+(4-6*Lt+3*pr)*Ue+(1+3*wt+3*Lt-3*pr)*Qe+pr*_t)/6},hn=Le=>Ue=>{let Qe=Le.length-1,_t=Ue>=1?Qe-1:Math.max(0,Math.floor(Ue*Qe));return sa(_t>0?Le[_t-1]:2*Le[_t]-Le[_t+1],Le[_t],Le[_t+1],_tUe=>{let Qe=Le.length-1,_t=Math.floor(Ue*Qe);return sa(Le[Ma(_t-1,Le.length)],Le[Ma(_t,Le.length)],Le[Ma(_t+1,Le.length)],Le[Ma(_t+2,Le.length)],(Ue-_t/Qe)*Qe)},zn=Le=>{let Ue,Qe=Le.length-1,_t=new Array(Qe),wt=new Array(Qe),Lt=new Array(Qe);for(_t[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Ue=2;Ue0&&(Lt[Qe-1]=wt[Qe-1]),Ue=Qe-2;Ue>0;--Ue)Lt[Ue]=wt[Ue]-_t[Ue]*Lt[Ue+1];return Lt},$n=Le=>hn(zn(Le)),xi=Le=>An(zn(Le)),di=Math.sign,uo=Math.min,pe=Math.abs,y=Le=>{let Ue=Le.length-1,Qe=[],_t=[],wt=[];for(let Lt=0;Lt0?.5*(Le[Lt+1]-Le[Lt-1])*Ue:void 0),wt.push(Lt>0?(di(Qe[Lt-1])+di(Qe[Lt]))*uo(pe(Qe[Lt-1]),pe(Qe[Lt]),.5*pe(_t[Lt])):void 0);return[Qe,_t,wt]},N=(Le,Ue,Qe)=>{let _t=Le.length-1,wt=_t*_t;return Lt=>{let pr;Lt>=1?pr=_t-1:pr=Math.max(0,Math.floor(Lt*_t));let Gr=Lt-pr/_t,va=Gr*Gr,Qa=va*Gr;return(Ue[pr]+Ue[pr+1]-2*Qe[pr])*wt*Qa+(3*Qe[pr]-2*Ue[pr]-Ue[pr+1])*_t*va+Ue[pr]*Gr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,,_t]=y(Le);return _t[0]=Qe[0],_t[Ue]=Qe[Ue-1],N(Le,_t,Qe)},fe=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,_t,wt]=y(Le);return _t[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Ue,_t[Ue]=(Le[Ue]*1.5-Le[Ue-1]*2+Le[Ue-2]*.5)*Ue,wt[0]=_t[0]*Qe[0]<=0?0:pe(_t[0])>2*pe(Qe[0])?2*Qe[0]:_t[0],wt[Ue]=_t[Ue]*Qe[Ue-1]<=0?0:pe(_t[Ue])>2*pe(Qe[Ue-1])?2*Qe[Ue-1]:_t[Ue],N(Le,wt,Qe)},be=Le=>{let Ue=Le.length-1,[Qe,_t,wt]=y(Le);_t[0]=.5*(Le[1]-Le[Ue])*Ue,_t[Ue]=.5*(Le[0]-Le[Ue-1])*Ue;let Lt=(Le[0]-Le[Ue])*Ue,pr=Lt;return wt[0]=(di(Lt)+di(Qe[0]))*uo(pe(Lt),pe(Qe[0]),.5*pe(_t[0])),wt[Ue]=(di(Qe[Ue-1])+di(pr))*uo(pe(Qe[Ue-1]),pe(pr),.5*pe(_t[Ue])),N(Le,wt,Qe)},Re=(Le=1)=>Le===1?Ue=>Ue:Ue=>Math.pow(Ue,Le),je=Re,Ze=(Le=2,Ue=1)=>{let Qe=je(Ue);if(Le<2)return Le<1?[]:[Qe(.5)];let _t=[];for(let wt=0;wt{let Ue={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Ue.alpha=Le.alpha),Ue},Gt=Le=>Dt(ft(Le)),Kt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function st(Le){return Kt(ft(Le))}function It(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return _t=>!0;let Qe=P(typeof Ue=="string"?Ue:Le);return _t=>Kt(Qe(_t))}function Ut(Le){return Le=B(Le),Le===void 0||st(Le)?Le:P(Le.mode)(Gt(Le))}function ir(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return Lt=>B(Lt);let Qe=typeof Ue=="string"?Ue:Le,_t=P(Qe),wt=It(Qe);return Lt=>{let pr=B(Lt);if(!pr)return;let Gr=_t(pr);if(wt(Gr))return pr;let va=Dt(Gr);return pr.mode===va.mode?va:P(pr.mode)(va)}}function dr(Le,Ue="lch",Qe="rgb"){Le=B(Le);let _t=Qe==="rgb"?st:It(Qe),wt=Qe==="rgb"?Gt:ir(Qe);if(Le===void 0||_t(Le))return Le;let Lt=P(Le.mode);Le=P(Ue)(Le);let pr=lo(Li({},Le),{c:0});if(!_t(pr))return Lt(wt(pr));let Gr=0,va=Le.c!==void 0?Le.c:0,Qa=se(Ue).ranges.c,Ga=(Qa[1]-Qa[0])/Math.pow(2,13),Ua=pr.c;for(;va-Gr>Ga;)pr.c=Gr+(va-Gr)*.5,_t(pr)?(Ua=pr.c,Gr=pr.c):va=pr.c;return Lt(_t(pr)?pr:lo(Li({},pr),{c:Ua}))}function Ar(Le="rgb",Ue="oklch",Qe=Yn("oklch"),_t=.02){let wt=P(Le),Lt=se(Le);if(!Lt.gamut)return Ga=>wt(Ga);let pr=It(Le),Gr=ir(Le),va=P(Ue),{ranges:Qa}=se(Ue);if(!Qa.l||!Qa.c)throw new Error("LCH-like space expected");return Ga=>{if(Ga=B(Ga),Ga===void 0)return;let Ua=Li({},va(Ga));if(Ua.l===void 0&&(Ua.l=0),Ua.c===void 0&&(Ua.c=0),Ua.l>=Qa.l[1]){let Bn=lo(Li({},Lt.white),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(Ua.l<=Qa.l[0]){let Bn=lo(Li({},Lt.black),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(pr(Ua))return wt(Ua);let Mn=0,dn=Ua.c,_n=(Qa.c[1]-Qa.c[0])/4e3,Sn=Gr(Ua);for(;dn-Mn>_n;)Ua.c=(Mn+dn)*.5,Sn=Gr(Ua),pr(Ua)||Qe&&_t>0&&Qe(Ua,Sn)<=_t?Mn=Ua.c:dn=Ua.c;return wt(pr(Ua)?Ua:Sn)}}var hr=(Le,Ue=Yn(),Qe=_t=>_t)=>{let _t=Le.map((wt,Lt)=>({color:Qe(wt),i:Lt}));return(wt,Lt=1,pr=1/0)=>(isFinite(Lt)&&(Lt=Math.max(1,Math.min(Lt,_t.length-1))),_t.forEach(Gr=>{Gr.d=Ue(wt,Gr.color)}),_t.sort((Gr,va)=>Gr.d-va.d).slice(0,Lt).filter(Gr=>Gr.dLe[Gr.i]))},vr=hr,Or=Le=>Math.max(Le,0),Cr=Le=>Math.max(Math.min(Le,1),0),ta=(Le,Ue,Qe)=>Le===void 0||Ue===void 0?void 0:Le+Qe*(Ue-Le),ka=Le=>{let Ue=1-Cr(Le);return[.393+.607*Ue,.769-.769*Ue,.189-.189*Ue,0,.349-.349*Ue,.686+.314*Ue,.168-.168*Ue,0,.272-.272*Ue,.534-.534*Ue,.131+.869*Ue,0,0,0,0,1]},Ta=Le=>{let Ue=Or(Le);return[.213+.787*Ue,.715-.715*Ue,.072-.072*Ue,0,.213-.213*Ue,.715+.285*Ue,.072-.072*Ue,0,.213-.213*Ue,.715-.715*Ue,.072+.928*Ue,0,0,0,0,1]},Ra=Le=>{let Ue=1-Cr(Le);return[.2126+.7874*Ue,.7152-.7152*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152+.2848*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152-.7152*Ue,.0722+.9278*Ue,0,0,0,0,1]},ua=Le=>{let Ue=Math.PI*Le/180,Qe=Math.cos(Ue),_t=Math.sin(Ue);return[.213+Qe*.787-_t*.213,.715-Qe*.715-_t*.715,.072-Qe*.072+_t*.928,0,.213-Qe*.213+_t*.143,.715+Qe*.285+_t*.14,.072-Qe*.072-_t*.283,0,.213-Qe*.213-_t*.787,.715-Qe*.715+_t*.715,.072+Qe*.928+_t*.072,0,0,0,0,1]},ia=(Le,Ue,Qe=!1)=>{let _t=P(Ue),wt=se(Ue).channels;return Lt=>{let pr=_t(Lt);if(!pr)return;let Gr={mode:Ue},va,Qa=wt.length;for(let Ua=0;Ua{let Qe=Or(Le);return tt(Nt(Qe),Ue,!0)},da=(Le=1,Ue="rgb")=>{let Qe=Or(Le);return tt(Nt(Qe,(1-Qe)/2),Ue,!0)},Fa=(Le=1,Ue="rgb")=>ia(ka(Le),Ue,!0),za=(Le=1,Ue="rgb")=>ia(Ta(Le),Ue,!0),Cn=(Le=1,Ue="rgb")=>ia(Ra(Le),Ue,!0),Dn=(Le=1,Ue="rgb")=>{let Qe=Cr(Le);return tt((_t,wt)=>wt==="alpha"?_t:ta(Qe,1-Qe,_t),Ue,!0)},ui=(Le=0,Ue="rgb")=>ia(ua(Le),Ue,!0),cn=P("rgb"),sn=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],ei=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],Pn=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],Rn=(Le,Ue)=>{let Qe=Math.max(0,Math.min(1,Ue)),_t=Math.round(Qe/.1),wt=Math.round(Qe%.1),Lt=Le[_t];if(wt>0&&_tBe(Lt[va],pr[va],wt))}return pr=>{let Gr=B(pr);if(Gr===void 0)return;let{r:va,g:Qa,b:Ga}=cn(Gr),Ua={mode:"rgb",r:Lt[0]*va+Lt[1]*Qa+Lt[2]*Ga,g:Lt[3]*va+Lt[4]*Qa+Lt[5]*Ga,b:Lt[6]*va+Lt[7]*Qa+Lt[8]*Ga};return Gr.alpha!==void 0&&(Ua.alpha=Gr.alpha),P(Gr.mode)(Ua)}},In=(Le=1)=>Rn(sn,Le),Jn=(Le=1)=>Rn(ei,Le),Ei=(Le=1)=>Rn(Pn,Le),so=Le=>Le*Le*(3-2*Le),ti=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),bi=Le=>Le*Le*Le*(Le*(Le*6-15)+10),Wi=bi,ro=Le=>(1-Math.cos(Le*Math.PI))/2,Mo=ro;function zs(Le){let Ue=P("lrgb")(Le);return .2126*Ue.r+.7152*Ue.g+.0722*Ue.b}function Bs(Le,Ue){let Qe=zs(Le),_t=zs(Ue);return(Math.max(Qe,_t)+.05)/(Math.min(Qe,_t)+.05)}var So=ne(Ht),Ws=ne(Dr),Zo=ne(go),es=ne(Ao),$o=ne(to),_s=ne(Vs),Go=ne(Pi),Ys=ne(dl),Ll=ne(bc),mo=ne(Qu),ru=ne(ju),Rs=ne(Sl),Yu=ne(oh),Ul=ne(nl),ql=ne(Kc),fo=ne(kl),Xo=ne(Cc),Os=ne(vc),ra=ne(ri),Ya=ne(Zi),Ka=ne(Yo),Bi=ne(ns),rs=ne(zl),Is=ne(oc),Oi=ne(Qc),Wr=ne(_r),na=ne(Bt),pa=ne(Wt),Wa=ne(la),ln=ne(Si)}}),av=ze({"src/plot_api/plot_config.js"(J,V){"use strict";var p={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},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","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},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/"},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:{}}},b={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(p,b),V.exports={configAttributes:p,dfltConfig:b}}}),Pw=ze({"src/lib/notifier.js"(J,V){"use strict";var p=ci(),b=ao(),E=[];V.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var n=1e3;b(l)?n=l:l==="long"&&(n=3e3);var r=p.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var m=E.indexOf(c);m!==-1&&E.splice(m,1),p.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=p.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var m=c.append("p"),h=s.split(//g),v=0;v1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(p.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(p.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),fc=ze({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qn=ze({"src/components/color/index.js"(J,V){"use strict";var{converter:p,formatHex:b,formatRgb:E,wcagContrast:k,wcagLuminance:l}=UR(),{isArrayOrTypedArray:e}=Ff(),{warn:t}=ap(),{background:n,defaultLine:r,defaults:a,lightLine:o}=fc(),s=p("rgb"),c=p("hsl"),m=q=>{if(typeof q!="string")return;let Z=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(Z))try{return s(Z)}catch{return}},h=q=>q>0?q>1?1:q:0,v={mode:"rgb",r:0,g:0,b:0,alpha:1},g=q=>Math.round(q*255e6)/255e6,i=q=>lo(Li({},q),{r:g(q.r),g:g(q.g),b:g(q.b)}),w=q=>E(i(q)),S=q=>b(i(q)),M=(q,Z)=>{var ee;let ae=m(q);return ae?((ee=ae.alpha)!=null||(ae.alpha=1),ae):(!Z&&q!=null&&t(`Invalid color specifier: "${q}". Defaulting to "#000"`),v)},C=q=>w(lo(Li({},M(q)),{alpha:1})),_=q=>q?M(q).alpha:0,T=q=>e(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),f=q=>{let[Z,ee,ae,he]=q,xe=Math.max(Z,ee,ae)>1?1/255:1,we=he??1;return{mode:"rgb",r:Z*xe,g:ee*xe,b:ae*xe,alpha:we>1?we/255:we}},u=(q,Z)=>{let ee=T(q)?f(q):M(q,!0),ae=[h(ee.r),h(ee.g),h(ee.b),h(ee.alpha)];return Z==="uint8"||Z==="uint8_clamped"?Uint8Array.from(ae,he=>Math.round(he*255)):Z==="float32"?Float32Array.from(ae):Z==="float64"?Float64Array.from(ae):ae},A=(q,Z)=>w(lo(Li({},M(q)),{alpha:h(Z)})),x=(q,Z)=>{let ee=M(q),ae=ee.alpha;if(ae===1)return w(ee);let he=M(Z||n),xe=he.alpha,we=(Me,Se)=>(xe===1?Se:1-xe+Se*xe)*(1-ae)+Me*ae;return w({mode:"rgb",r:we(ee.r,he.r),g:we(ee.g,he.g),b:we(ee.b,he.b)})},z=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=(we,Me)=>ee*we+(1-ee)*Me;return w({mode:"rgb",r:xe(ae.r,he.r),g:xe(ae.g,he.g),b:xe(ae.b,he.b)})},I=(q,Z)=>{let ee=M(q),ae=c(ee)||{mode:"hsl",h:0,s:0,l:0};return w(s(lo(Li({},ae),{l:h((ae.l*100+Z)/100),alpha:ee.alpha})))},O=(q,Z)=>k(M(q),M(Z)),D=q=>O(q,n)>O(q,r),B=w(M(n)),F=w(M(r)),P=(q,Z,ee)=>(M(q).alpha!==1&&(q=x(q,n)),D(q)?Z?I(q,Z):B:ee?I(q,-ee):F),j=(q,Z)=>{q.style({stroke:C(Z),"stroke-opacity":M(Z).alpha})},U=(q,Z)=>{q.style({fill:C(Z),"fill-opacity":M(Z).alpha})},$=(q,Z)=>!!(q&&Z&&C(q)===C(Z)),Q=q=>m(q)!==void 0,re=(q,Z)=>{Z=Z===0?0:Z||10;let ee=M(q),ae=Z/100;return w(lo(Li({},ee),{r:h(ee.r+ae),g:h(ee.g+ae),b:h(ee.b+ae)}))},ne=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=ee/100,we=he.alpha-ae.alpha,Me=2*xe-1,Se=((Me*we===-1?Me:(Me+we)/(1+Me*we))+1)/2,Ie=1-Se,Ve=(Ge,ke)=>Ie*Ge+Se*ke;return w({mode:"rgb",r:Ve(ae.r,he.r),g:Ve(ae.g,he.g),b:Ve(ae.b,he.b),alpha:ae.alpha*(1-xe)+he.alpha*xe})},se=(q,Z=["#000","#fff"])=>{let ee,ae=-1/0;for(let he of Z){let xe=O(q,he);xe>ae&&(ae=xe,ee=w(M(he)))}return ee},G=q=>w(M(q)),X=q=>S(M(q)).toUpperCase(),K=q=>{let Z=M(q);return[h(Z.r)*255,h(Z.g)*255,h(Z.b)*255,h(Z.alpha)]},H=([q,Z,ee,ae])=>w({mode:"rgb",r:q/255,g:Z/255,b:ee/255,alpha:ae}),Y=q=>{let Z=M(q);return l({mode:"rgb",r:h(Z.r),g:h(Z.g),b:h(Z.b)})};V.exports={addOpacity:A,adjustLightness:I,background:n,brighten:re,combine:x,contrast:P,defaultLine:r,defaults:a,equals:$,fill:U,hexString:X,interpolate:z,isChannelArray:T,isDark:D,isValid:Q,lightLine:o,luminosity:Y,mix:ne,mostReadable:se,normalize:u,opacity:_,parse:M,rgb:C,rgbaArray:K,rgbaArrayToString:H,rgbaString:G,stroke:j,wcagContrast:O}}}),Bv=ze({"src/components/colorscale/scales.js"(J,V){"use strict";var p=Qn(),b={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)"]]},E=b.RdBu;function k(t,n){if(n||(n=E),!t)return n;function r(){try{t=b[t]||JSON.parse(t)}catch{t=n}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:n}function l(t){var n=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rqR});function qR(J,V="",p,b){let E=V+(p?"":"$"),k=b===!1?"":"^";return J==="xy"?new RegExp(k+"x"+n1+"y"+n1+E):new RegExp(k+J+n1+E)}var n1,Vm=zi({"src/lib/regex.ts"(){"use strict";n1="([2-9]|[1-9][0-9]+)?"}}),VR=ze({"src/lib/coerce.js"(J){"use strict";var V=ao(),p=Ki().extendFlat,b=ws(),E=Bv(),k=Qn(),l=np().DESELECTDIM,e=r1(),t=(Vm(),Po(Ov)).counter,n=(Um(),Po(zv)).modHalf,r=Ff().isArrayOrTypedArray,a=Ff().isTypedArraySpec,o=Ff().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,m,h){m.set(r(c)?c:a(c)?o(c):h)}},enumerated:{coerceFunction:function(c,m,h,v){v.coerceNumber&&(c=+c),v.values.indexOf(c)===-1?m.set(h):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var h=m.values,v=0;vi===!0||i===!1;g(c)||v.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(g)?m.set(c):m.set(h)}},number:{coerceFunction:function(c,m,h,v){a(c)&&(c=o(c)),!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},integer:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}a(c)&&(c=o(c)),c%1||!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},string:{coerceFunction:function(c,m,h,v){if(typeof c!="string"){var g=typeof c=="number";v.strict===!0||!g?m.set(h):m.set(String(c))}else v.noBlank&&!c?m.set(h):m.set(c)}},color:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),k.isValid(c)?m.set(c):m.set(h)}},colorlist:{coerceFunction:function(c,m,h){!Array.isArray(c)||!c.length?m.set(h):c.every(v=>k.isValid(v))?m.set(c):m.set(h)}},colorscale:{coerceFunction:function(c,m,h){m.set(E.get(c,h))}},angle:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),c==="auto"?m.set("auto"):V(c)?m.set(n(+c,360)):m.set(h)}},subplotid:{coerceFunction:function(c,m,h,v){var g=v.regex||t(h);let i=w=>typeof w=="string"&&g.test(w);i(c)||v.arrayOk&&r(c)&&c.length>0&&c.every(i)?m.set(c):m.set(h)},validateFunction:function(c,m){var h=m.dflt;return c===h?!0:typeof c!="string"?!1:!!t(h).test(c)}},flaglist:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(h);return}for(var g=c.split("+"),i=0;iLi({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Li({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Sx=ze({"src/components/shapes/label_texttemplate.js"(J,V){"use strict";function p(M,C){return C?C.d2l(M):M}function b(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function n(M){return M.x1shift||0}function r(M){return M.y0shift||0}function a(M){return M.y1shift||0}function o(M,C){return p(M.x1,C)+n(M)-p(M.x0,C)-t(M)}function s(M,C,_){return p(M.y1,_)+a(M)-p(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function m(M,C,_){return Math.abs(s(M,C,_))}function h(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function v(M,C){return b((p(M.x1,C)+n(M)+p(M.x0,C)+t(M))/2,C)}function g(M,C,_){return b((p(M.y1,_)+a(M)+p(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var w=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:m,length:h,xcenter:v,ycenter:g,simpleXVariables:w,simpleYVariables:S}}}),yI=ze({"src/components/shapes/draw_newshape/attributes.js"(J,V){"use strict";var p=Al().overrideAll,b=ws(),E=Qs(),k=Uc().dash,l=Ki().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Sx();V.exports=p({newshape:{visible:l({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},b.legend,{}),legendgroup:l({},b.legendgroup,{}),legendgrouptitle:{text:l({},b.legendgrouptitle.text,{}),font:E({})},legendrank:l({},b.legendrank,{}),legendwidth:l({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{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:l({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(n)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),_I=ze({"src/components/selections/draw_newselection/attributes.js"(J,V){"use strict";var p=Uc().dash,b=Ki().extendFlat;V.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:b({},p,{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"}}}}),Ex=ze({"src/plots/pad_attributes.js"(J,V){"use strict";V.exports=function(p){var b=p.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),Gm=ze({"src/plots/layout_attributes.js"(J,V){"use strict";var p=Qs(),b=o1(),E=fc(),k=yI(),l=_I(),e=Ex(),t=Ki().extendFlat,n=p({editType:"calc"});n.family.dflt='"Open Sans", verdana, arial, sans-serif',n.size.dflt=12,n.color.dflt=E.defaultLine,V.exports={font:n,title:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:p({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:t(e({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:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.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:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},b.transition,{editType:"none"})}}}),xI=ze({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.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}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.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-globe .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='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-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='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%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:rgba(0,0,0,.05)}.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;white-space:nowrap}.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}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.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:rgba(0,0,0,.05)}.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}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@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),(pointer:coarse){.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(J)}})()}}),mi=ze({"src/registry.js"(J){"use strict";var V=ap(),p=Ax(),b=Rw(),E=i1().addStyleRule,k=Ki(),l=ws(),e=Gm(),t=k.extendFlat,n=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w=i&&D<=w?D:l}if(typeof D!="string"&&typeof D!="number")return l;D=String(D);var U=v(B),$=D.charAt(0);U&&($==="G"||$==="g")&&(D=D.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=D.match(Q?m:c);if(!re)return l;var ne=re[1],se=re[3]||"1",G=Number(re[5]||1),X=Number(re[7]||0),K=Number(re[9]||0),H=Number(re[11]||0);if(U){if(ne.length===2)return l;ne=Number(ne);var Y;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var Z=se.charAt(se.length-1)==="i";se=parseInt(se,10),Y=q.newDate(ne,q.toMonthIndex(ne,se,Z),G)}else Y=q.newDate(ne,Number(se),G)}catch{return l}return Y?(Y.toJD()-a)*e+X*t+K*n+H*r:l}ne.length===2?ne=(Number(ne)+2e3-h)%100+h:ne=Number(ne),se-=1;var ee=new Date(Date.UTC(2e3,se,G,X,K));return ee.setUTCFullYear(ne),ee.getUTCMonth()!==se||ee.getUTCDate()!==G?l:ee.getTime()+H*r},i=J.MIN_MS=J.dateTime2ms("-9999"),w=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(D,B){return J.dateTime2ms(D,B)!==l};function S(D,B){return String(D+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*n;J.ms2DateTime=function(D,B,F){if(typeof D!="number"||!(D>=i&&D<=w))return l;B||(B=0);var P=Math.floor(E(D+.05,1)*10),j=Math.round(D-P/10),U,$,Q,re,ne,se;if(v(F)){var G=Math.floor(j/e)+a,X=Math.floor(E(D,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(G).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;$=B=i+e&&D<=w-e))return l;var B=Math.floor(E(D+.05,1)*10),F=new Date(Math.round(D-B/10)),P=V("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),$=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return T(P,j,U,$,Q)};function T(D,B,F,P,j){if((B||F||P||j)&&(D+=" "+S(B,2)+":"+S(F,2),(P||j)&&(D+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;D+="."+S(j,U)}return D}J.cleanDate=function(D,B,F){if(D===l)return B;if(J.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(v(F))return b.error("JS Dates and milliseconds are incompatible with world calendars",D),B;if(D=J.ms2DateTimeLocal(+D),!D&&B!==void 0)return B}else if(!J.isDateTime(D,F))return b.error("unrecognized date",D),B;return D};var f=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function x(D,B,F,P){D=D.replace(f,function(U){var $=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed($).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(D=D.replace(u,function(){return A[F("%q")(j)]}),v(P))try{D=o.getComponentMethod("calendars","worldCalFmt")(D,B,P)}catch{return"Invalid"}return F(D)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(D,B){var F=E(D+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/n),60),2);if(B!=="M"){p(B)||(B=0);var j=Math.min(E(D/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(D,B,F,P,j,U){if(j=v(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` `+U.year;else return I(D,F)+` `+x(U.dayMonthYear,D,P,j);return x(B,D,P,j)};var O=3*e;J.incrementMonth=function(D,B,F){F=v(F)&&F;var P=E(D,e);if(D=Math.round(D-P),F)try{var j=Math.round(D/e)+a,U=o.getComponentMethod("calendars","getCal")(F),$=U.fromJD(j);return B%12?U.add($,B,"m"):U.add($,B/12,"y"),($.toJD()-a)*e+P}catch{b.error("invalid ms "+D+" in calendar "+F)}var Q=new Date(D+O);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-O},J.findExactDates=function(D,B){for(var F=0,P=0,j=0,U=0,$,Q,re=v(B)&&o.getComponentMethod("calendars","getCal")(B),ne=0;ne1?(a[c-1]-a[0])/(c-1):1,v,g;for(h>=0?g=o?l:e:g=o?n:t,r+=h*k*(o?-1:1)*(h>=0?1:-1);s90&&p.log("Long binary search..."),s-1};function l(r,a){return ra}function n(r,a){return r>=a}J.sorterAsc=function(r,a){return r-a},J.sorterDes=function(r,a){return a-r},J.distinctVals=function(r){var a=r.slice();a.sort(J.sorterAsc);var o;for(o=a.length-1;o>-1&&a[o]===E;o--);for(var s=a[o]-a[0]||1,c=s/(o||1)/1e4,m=[],h,v=0;v<=o;v++){var g=a[v],i=g-h;h===void 0?(m.push(g),h=g):i>c&&(s=Math.min(s,i),m.push(g),h=g)}return{vals:m,minDiff:s}},J.roundUp=function(r,a,o){for(var s=0,c=a.length-1,m,h=0,v=o?0:1,g=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(a)}return s?r:r.reverse()},J.findIndexOfMin=function(r,a){a=a||b;for(var o=1/0,s,c=0;czw});function wI(J){return Object.keys(J).sort()}var zw,Nv=zi({"src/lib/sort_object_keys.ts"(){"use strict";zw=wI}}),TI=ze({"src/lib/stats.js"(J){"use strict";var V=ao(),p=Ff().isArrayOrTypedArray;J.aggNums=function(b,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),V(E)||(E=!1),p(k[0])){for(t=new Array(l),e=0;eb.length-1)return b[b.length-1];var k=E%1;return k*b[Math.ceil(E)]+(1-k)*b[Math.floor(E)]}}}),AI=ze({"src/lib/angles.js"(J,V){"use strict";var p=(Um(),Po(zv)),b=p.mod,E=p.modHalf,k=Math.PI,l=2*k;function e(g){return g/180*k}function t(g){return g/k*180}function n(g){return Math.abs(g[1]-g[0])>l-1e-14}function r(g,i){return E(i-g,l)}function a(g,i){return Math.abs(r(g,i))}function o(g,i){if(n(i))return!0;var w,S;i[0]S&&(S+=l);var M=b(g,l),C=M+l;return M>=w&&M<=S||C>=w&&C<=S}function s(g,i,w,S){if(!o(i,S))return!1;var M,C;return w[0]=M&&g<=C}function c(g,i,w,S,M,C,_){M=M||0,C=C||0;var T=n([w,S]),f,u,A,x,z;T?(f=0,u=k,A=l):w1/3&&p.x<2/3},J.isRightAnchor=function(p){return p.xanchor==="right"||p.xanchor==="auto"&&p.x>=2/3},J.isTopAnchor=function(p){return p.yanchor==="top"||p.yanchor==="auto"&&p.y>=2/3},J.isMiddleAnchor=function(p){return p.yanchor==="middle"||p.yanchor==="auto"&&p.y>1/3&&p.y<2/3},J.isBottomAnchor=function(p){return p.yanchor==="bottom"||p.yanchor==="auto"&&p.y<=1/3}}}),SI=ze({"src/lib/geometry2d.js"(J){"use strict";var V=(Um(),Po(zv)).mod;J.segmentsIntersect=p;function p(e,t,n,r,a,o,s,c){var m=n-e,h=a-e,v=s-a,g=r-t,i=o-t,w=c-o,S=m*w-v*g;if(S===0)return null;var M=(h*w-v*i)/S,C=(h*g-m*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+m*M,y:t+g*M}}J.segmentDistance=function(t,n,r,a,o,s,c,m){if(p(t,n,r,a,o,s,c,m))return 0;var h=r-t,v=a-n,g=c-o,i=m-s,w=h*h+v*v,S=g*g+i*i,M=Math.min(b(h,v,w,o-t,s-n),b(h,v,w,c-t,m-n),b(g,i,S,t-o,n-s),b(g,i,S,r-o,a-s));return Math.sqrt(M)};function b(e,t,n,r,a){var o=r*e+a*t;if(o<0)return r*r+a*a;if(o>n){var s=r-e,c=a-t;return s*s+c*c}else{var m=r*t-a*e;return m*m/n}}var E,k,l;J.getTextLocation=function(t,n,r,a){if((t!==k||a!==l)&&(E={},k=t,l=a),E[r])return E[r];var o=t.getPointAtLength(V(r-a/2,n)),s=t.getPointAtLength(V(r+a/2,n)),c=Math.atan((s.y-o.y)/(s.x-o.x)),m=t.getPointAtLength(V(r,n)),h=(m.x*4+o.x+s.x)/6,v=(m.y*4+o.y+s.y)/6,g={x:h,y:v,theta:c};return E[r]=g,g},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,n,r){var a=n.left,o=n.right,s=n.top,c=n.bottom,m=0,h=t.getTotalLength(),v=h,g,i;function w(M){var C=t.getPointAtLength(M);M===0?g=C:M===h&&(i=C);var _=C.xo?C.x-o:0,T=C.yc?C.y-c:0;return Math.sqrt(_*_+T*T)}for(var S=w(m);S;){if(m+=S+r,m>v)return;S=w(m)}for(S=w(v);S;){if(v-=S+r,m>v)return;S=w(v)}return{min:m,max:v,len:v-m,total:h,isClosed:m===0&&v===h&&Math.abs(g.x-i.x)<.1&&Math.abs(g.y-i.y)<.1}},J.findPointOnPath=function(t,n,r,a){a=a||{};for(var o=a.pathLength||t.getTotalLength(),s=a.tolerance||.001,c=a.iterationLimit||30,m=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,h=0,v=0,g=o,i,w,S;h0?g=i:v=i,h++}return w}}}),Cx=ze({"src/lib/throttle.js"(J){"use strict";var V={};J.throttle=function(E,k,l){var e=V[E],t=Date.now();if(!e){for(var n in V)V[n].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(b){var E=V[b];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(b){if(b)p(V[b]),delete V[b];else for(var E in V)J.clear(E)};function p(b){b&&b.timer!==null&&(clearTimeout(b.timer),b.timer=null)}}}),EI=ze({"src/lib/clear_responsive.js"(J,V){"use strict";V.exports=function(b){b._responsiveChartHandler&&(window.removeEventListener("resize",b._responsiveChartHandler),delete b._responsiveChartHandler)}}}),kI=ze({"node_modules/is-mobile/index.js"(J,V){"use strict";V.exports=k,V.exports.isMobile=k,V.exports.default=k;var p=/(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|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,b=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=p.test(e)&&!b.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),CI=ze({"src/lib/preserve_drawing_buffer.js"(J,V){"use strict";var p=ao(),b=kI();V.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=b({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var n=e.split(" "),r=1;r-1;o--){var s=n[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(p(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),LI=ze({"src/lib/make_trace_groups.js"(J,V){"use strict";var p=ci();V.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(n){return n[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(n){n[0][t]=p.select(this)}),e}}}),PI=ze({"src/lib/localize.js"(J,V){"use strict";var p=mi();V.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,n=0;n<2;n++){var r=(t[l]||{}).dictionary;if(r){var a=r[k];if(a)return a}t=p.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),Bw=ze({"src/lib/filter_unique.js"(J,V){"use strict";V.exports=function(b){for(var E={},k=[],l=0,e=0;e1?(k*b+k*E)/k:b+E,e=String(l).length;if(e>16){var t=String(E).length,n=String(b).length;if(e>=n+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),Ow={};bu(Ow,{default:()=>qw});function DI(J){return typeof J=="string"&&(J=J.replace(Uw,"")),(0,Nw.default)(J)?Number(J):jw.BADNUM}var Nw,jw,Uw,qw,FI=zi({"src/lib/clean_number.ts"(){"use strict";Nw=Yl(ao()),jw=Yl(No()),Uw=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,qw=DI}}),zI=ze({"src/lib/slugify.js"(J,V){"use strict";var p=/<[^>]*>/g,b=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),a=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}V.exports=function(c,m=a){var h=o(c??"").replace(k,"").replace(p," ").replace(b,v=>v===e?v:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(n,e);return h.length<=m?h:Array.from(h).slice(0,m).join("").replace(r,"")}}}),Nr=ze({"src/lib/index.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Cw().format,k=ao(),l=No(),e=l.FP_SAFE,t=-e,n=l.BADNUM,r=V.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var Z=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice(Z.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?Z+"~"+ee:q};var a={};r.warnBadFormat=function(Y){var q=String(Y);a[q]||(a[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(Y){return String(Y)},r.numberFormat=function(Y){var q;try{q=E(r.adjustFormat(Y))}catch{return r.warnBadFormat(Y),r.noFormat}return q},r.nestedProperty=r1(),r.keyedContainer=zR(),r.relativeAttr=BR(),r.isPlainObject=tv(),r.toLogRange=Tx(),r.relinkPrivateKeys=OR();var o=Ff();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Um(),Po(zv));r.mod=s.mod,r.modHalf=s.modHalf;var c=VR();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var m=bI();r.dateTime2ms=m.dateTime2ms,r.isDateTime=m.isDateTime,r.ms2DateTime=m.ms2DateTime,r.ms2DateTimeLocal=m.ms2DateTimeLocal,r.cleanDate=m.cleanDate,r.isJSDate=m.isJSDate,r.formatDate=m.formatDate,r.incrementMonth=m.incrementMonth,r.dateTick0=m.dateTick0,r.dfltRange=m.dfltRange,r.findExactDates=m.findExactDates,r.MIN_MS=m.MIN_MS,r.MAX_MS=m.MAX_MS;var h=kx();r.findBin=h.findBin,r.sorterAsc=h.sorterAsc,r.sorterDes=h.sorterDes,r.distinctVals=h.distinctVals,r.roundUp=h.roundUp,r.sort=h.sort,r.findIndexOfMin=h.findIndexOfMin,r.sortObjectKeys=(Nv(),Po(nv)).default;var v=TI();r.aggNums=v.aggNums,r.len=v.len,r.mean=v.mean,r.geometricMean=v.geometricMean,r.median=v.median,r.midRange=v.midRange,r.variance=v.variance,r.stdev=v.stdev,r.interp=v.interp;var g=Mx();r.init2dArray=g.init2dArray,r.transposeRagged=g.transposeRagged,r.dot=g.dot,r.translationMatrix=g.translationMatrix,r.rotationMatrix=g.rotationMatrix,r.rotationXYMatrix=g.rotationXYMatrix,r.apply3DTransform=g.apply3DTransform,r.apply2DTransform=g.apply2DTransform,r.apply2DTransform2=g.apply2DTransform2,r.convertCssMatrix=g.convertCssMatrix,r.inverseTransformMatrix=g.inverseTransformMatrix;var i=AI();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var w=MI();r.isLeftAnchor=w.isLeftAnchor,r.isCenterAnchor=w.isCenterAnchor,r.isRightAnchor=w.isRightAnchor,r.isTopAnchor=w.isTopAnchor,r.isMiddleAnchor=w.isMiddleAnchor,r.isBottomAnchor=w.isBottomAnchor;var S=SI();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=Ki();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=ap();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Vm(),Po(Ov));r.counterRegex=_.counter;var T=Cx();r.throttle=T.throttle,r.throttleDone=T.done,r.clearThrottle=T.clear;var f=i1();r.getGraphDiv=f.getGraphDiv,r.isPlotDiv=f.isPlotDiv,r.removeElement=f.removeElement,r.addStyleRule=f.addStyleRule,r.addRelatedStyleRule=f.addRelatedStyleRule,r.deleteRelatedStyleRule=f.deleteRelatedStyleRule,r.setStyleOnHover=f.setStyleOnHover,r.getFullTransformMatrix=f.getFullTransformMatrix,r.getElementTransformMatrix=f.getElementTransformMatrix,r.getElementAndAncestors=f.getElementAndAncestors,r.equalDomRects=f.equalDomRects,r.clearResponsive=EI(),r.preserveDrawingBuffer=CI(),r.makeTraceGroups=LI(),r._=PI(),r.notifier=Pw(),r.filterUnique=Bw(),r.filterVisible=RI(),r.pushUnique=Rw(),r.increment=II(),r.cleanNumber=(FI(),Po(Ow)).default,r.slugify=zI(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(Y)&&Y>=0&&Y%1===0},r.noop=Ax(),r.identity=s1(),r.repeat=function(Y,q){for(var Z=new Array(q),ee=0;eeZ?Math.max(Z,Math.min(q,Y)):Math.max(q,Math.min(Z,Y))},r.bBoxIntersect=function(Y,q,Z){return Z=Z||0,Y.left<=q.right+Z&&q.left<=Y.right+Z&&Y.top<=q.bottom+Z&&q.top<=Y.bottom+Z},r.simpleMap=function(Y,q,Z,ee,ae){for(var he=Y.length,xe=new Array(he),we=0;we=Math.pow(2,Z)?ae>10?(r.warn("randstr failed uniqueness"),xe):Y(q,Z,ee,(ae||0)+1):xe},r.OptionControl=function(Y,q){Y||(Y={}),q||(q="opt");var Z={};return Z.optionList=[],Z._newoption=function(ee){ee[q]=Y,Z[ee.name]=ee,Z.optionList.push(ee)},Z["_"+q]=Y,Z},r.smooth=function(Y,q){if(q=Math.round(q)||0,q<2)return Y;var Z=Y.length,ee=2*Z,ae=2*q-1,he=new Array(ae),xe=new Array(Z),we,Me,Se,Ie;for(we=0;we=ee&&(Se-=ee*Math.floor(Se/ee)),Se<0?Se=-1-Se:Se>=Z&&(Se=ee-1-Se),Ie+=Y[Se]*he[Me];xe[we]=Ie}return xe},r.syncOrAsync=function(Y,q,Z){var ee,ae;function he(){return r.syncOrAsync(Y,q,Z)}for(;Y.length;)if(ae=Y.splice(0,1)[0],ee=ae(q),ee&&ee.then)return ee.then(he);return Z&&Z(q)},r.stripTrailingSlash=function(Y){return Y.slice(-1)==="/"?Y.slice(0,-1):Y},r.noneOrAll=function(Y,q,Z){if(Y){var ee=!1,ae=!0,he,xe;for(he=0;he0?ae:0})},r.fillArray=function(Y,q,Z,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(Y))for(var ae=0;aez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var Y=I.exec(window.navigator.userAgent);if(Y&&Y.length===2){var q=parseInt(Y[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(Y){return Y instanceof p.selection},r.ensureSingle=function(Y,q,Z,ee){var ae=Y.select(q+(Z?"."+Z:""));if(ae.size())return ae;var he=Y.append(q);return Z&&he.classed(Z,!0),ee&&he.call(ee),he},r.ensureSingleById=function(Y,q,Z,ee){var ae=Y.select(q+"#"+Z);if(ae.size())return ae;var he=Y.append(q).attr("id",Z);return ee&&he.call(ee),he},r.objectFromPath=function(Y,q){for(var Z=Y.split("."),ee,ae=ee={},he=0;he1?ae+xe[1]:"";if(he&&(xe.length>1||we.length>4||Z))for(;ee.test(we);)we=we.replace(ee,"$1"+he+"$2");return we+Me},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(Y,q){var Z={};return Y.replace(r.TEMPLATE_STRING_REGEX,function(ee,ae){var he;return F.test(ae)?he=q[ae]:(Z[ae]=Z[ae]||r.nestedProperty(q,ae).get,he=Z[ae](!0)),he!==void 0?he:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=Y=>ne(lo(Li({},Y),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=Y=>ne(lo(Li({},Y),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(Y){var q=Y.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:Y,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=Y=>ne(lo(Li({},Y),{opts:Q}));var re=/^[:|\|]/;function ne({data:Y=[],locale:q,fallback:Z,labels:ee={},opts:ae,template:he}){return he.replace(r.TEMPLATE_STRING_REGEX,(xe,we,Me)=>{let Se=["xother","yother"].includes(we),Ie=["_xother","_yother"].includes(we),Ve=["_xother_","_yother_"].includes(we),Ge=["xother_","yother_"].includes(we),ke=Se||Ie||Ge||Ve;(Ie||Ve)&&(we=we.substring(1)),(Ge||Ve)&&(we=we.substring(0,we.length-1));let _e=null,ce=null;if(ae.parseMultDiv){var ve=$(we);we=ve.key,_e=ve.op,ce=ve.number}let le;if(ke){if(ee[we]===void 0)return"";le=ee[we]}else for(let Ye of Y)if(Ye){if(Ye.hasOwnProperty(we)){le=Ye[we];break}if(F.test(we)||(le=r.nestedProperty(Ye,we).get(!0)),le!==void 0)break}if(le===void 0){let{count:Ye,max:yt,name:gt}=ae,Tt=Z===!1?xe:Z;return Ye=se&&xe<=G,Se=we>=se&&we<=G;if(Me&&(ee=10*ee+xe-se),Se&&(ae=10*ae+we-se),!Me||!Se){if(ee!==ae)return ee-ae;if(xe!==we)return xe-we}}return ae-ee};var X=2e9;r.seedPseudoRandom=function(){X=2e9},r.pseudoRandom=function(){var Y=X;return X=(69069*X+1)%4294967296,Math.abs(X-Y)<429496729?r.pseudoRandom():X/4294967296},r.fillText=function(Y,q,Z){var ee=Array.isArray(Z)?function(xe){Z.push(xe)}:function(xe){Z.text=xe},ae=r.extractOption(Y,q,"htx","hovertext");if(r.isValidTextValue(ae))return ee(ae);var he=r.extractOption(Y,q,"tx","text");if(r.isValidTextValue(he))return ee(he)},r.isValidTextValue=function(Y){return Y||Y===0},r.formatPercent=function(Y,q){q=q||0;for(var Z=(Math.round(100*Y*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Se=1):Se=0,r.strTranslate(ae-Se*(Z+xe),he-Se*(ee+we))+r.strScale(Se)+(Me?"rotate("+Me+(q?"":" "+Z+" "+ee)+")":"")},r.setTransormAndDisplay=function(Y,q){Y.attr("transform",r.getTextTransform(q)),Y.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(Y,q){var Z=r.extendFlat({},q);return Z.size=Math.max(q.size,Y._fullLayout.uniformtext.minsize||0),Z},r.join2=function(Y,q,Z){var ee=Y.length;return ee>1?Y.slice(0,-1).join(q)+Z+Y[ee-1]:Y.join(q)},r.bigFont=function(Y){return Math.round(1.2*Y)};var K=r.getFirefoxVersion(),H=K!==null&&K<86;r.getPositionFromD3Event=function(){return H?[p.event.layerX,p.event.layerY]:[p.event.offsetX,p.event.offsetY]}}}),BI=ze({"build/plotcss.js"(){"use strict";var J=Nr(),V={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",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(b in V)p=b.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(p,V[b]);var p,b}}),Vw=ze({"node_modules/is-browser/client.js"(J,V){V.exports=!0}}),Gw=ze({"node_modules/has-hover/index.js"(J,V){"use strict";var p=Vw(),b;typeof window.matchMedia=="function"?b=!window.matchMedia("(hover: none)").matches:b=p,V.exports=b}}),jv=ze({"node_modules/events/events.js"(J,V){"use strict";var p=typeof Reflect=="object"?Reflect:null,b=p&&typeof p.apply=="function"?p.apply:function(C,_,T){return Function.prototype.apply.call(C,_,T)},E;p&&typeof p.ownKeys=="function"?E=p.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}V.exports=e,V.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function n(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.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},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],T=1;T0&&(A=_[0]),A instanceof Error)throw A;var x=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw x.context=A,x}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")b(z,this,_);else for(var I=z.length,O=h(z,I),T=0;T0&&A.length>f&&!A.warned){A.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=M,x.type=C,x.count=A.length,k(x)}return M}e.prototype.addListener=function(C,_){return a(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return a(this,C,_,!0)};function o(){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(M,C,_){var T={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},f=o.bind(T);return f.listener=_,T.wrapFn=f,f}e.prototype.once=function(C,_){return n(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return n(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var T,f,u,A,x;if(n(_),f=this._events,f===void 0)return this;if(T=f[C],T===void 0)return this;if(T===_||T.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete f[C],f.removeListener&&this.emit("removeListener",C,T.listener||_));else if(typeof T!="function"){for(u=-1,A=T.length-1;A>=0;A--)if(T[A]===_||T[A].listener===_){x=T[A].listener,u=A;break}if(u<0)return this;u===0?T.shift():v(T,u),T.length===1&&(f[C]=T[0]),f.removeListener!==void 0&&this.emit("removeListener",C,x||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,T,f;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[C]),this;if(arguments.length===0){var u=Object.keys(T),A;for(f=0;f=0;f--)this.removeListener(C,_[f]);return this};function c(M,C,_){var T=M._events;if(T===void 0)return[];var f=T[C];return f===void 0?[]:typeof f=="function"?_?[f.listener||f]:[f]:_?g(f):h(f,f.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):m.call(M,C)},e.prototype.listenerCount=m;function m(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function h(M,C){for(var _=new Array(C),T=0;T{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var n=t._events[k];if(!n)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}n=Array.isArray(n)?n:[n];var a;for(a=0;ab.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,n;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=P.length)return!1;if(I.dimensions===2){if(D++,O.length===D)return I;var j=O[D];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var O,D;O=V.modules[I]._module,D=O.basePlotModule;var B={};B.type=null;var F=n({},b),P=n({},O.attributes);J.crawl(P,function($,Q,re,ne,se){o(F,se).set(void 0),$===void 0&&o(P,se).set(void 0)}),n(B,F),V.traceIs(I,"noOpacity")&&delete B.opacity,V.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),V.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),O.selectPoints||delete B.selectedpoints,n(B,P),D.attributes&&n(B,D.attributes),B.type=I;var j={meta:O.meta||{},categories:O.categories||{},animatable:!!O.animatable,type:I,attributes:T(B)};if(O.layoutAttributes){var U={};n(U,O.layoutAttributes),j.layoutAttributes=T(U)}return O.animatable||J.crawl(j,function($){J.isValObject($)&&"anim"in $&&delete $.anim}),j}function C(){var I={},O,D;n(I,E);for(O in V.subplotsRegistry)if(D=V.subplotsRegistry[O],!!D.layoutAttributes)if(Array.isArray(D.attr))for(var B=0;B=r&&(n._input||{})._templateitemname;o&&(a=r);var s=t+"["+a+"]",c;function m(){c={},o&&(c[s]={},c[s][b]=o)}m();function h(w,S){c[w]=S}function v(w,S){o?V.nestedProperty(c[s],w).set(S):c[s+"."+w]=S}function g(){var w=c;return m(),w}function i(w,S){w&&v(w,S);var M=g();for(var C in M)V.nestedProperty(e,C).set(M[C])}return{modifyBase:h,modifyItem:v,getUpdateObj:g,applyUpdate:i}}}}),hc=ze({"src/plots/cartesian/constants.js"(J,V){"use strict";var p=(Vm(),Po(Ov)).counter;V.exports={idRegex:{x:p("x","( domain)?"),y:p("y","( domain)?")},attrRegex:p("[xy]axis"),xAxisMatch:p("xaxis"),yAxisMatch:p("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"}}}),Xl=ze({"src/plots/cartesian/axis_ids.js"(J){"use strict";var V=mi(),p=hc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(p.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var n=k.split(" ")[0].slice(1).replace(/^0+/,"");return n==="1"&&(n=""),k.charAt(0)+n+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),n=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function b(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;p.isPlainObject(s)?e(s,n,c,a+1):n(c,o,s)}})}}}),cl=ze({"src/plots/plots.js"(J,V){"use strict";var p=ci(),b=jm().timeFormatLocale,E=Cw().formatLocale,k=ao(),l=Lw(),e=ev().version,t=mi(),n=Wm(),r=hs(),a=Nr(),o=Qn(),s=No().BADNUM,c=Xl(),m=iv().clearOutline,h=Lx(),v=o1(),g=Hw(),i=zf().getModuleCalcData,w=a.relinkPrivateKeys,S=a._,M=V.exports={};a.extendFlat(M,t),M.attributes=ws(),M.attributes.type.values=M.allTypes,M.fontAttrs=Qs(),M.layoutAttributes=Gm();var C=NI();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(G){return G=a.getGraphDiv(G),new Promise(function(X){setTimeout(function(){G._fullLayout&&(t.getComponentMethod("annotations","draw")(G),t.getComponentMethod("legend","draw")(G),t.getComponentMethod("colorbar","draw")(G),X(M.previousPromises(G)))},300)})},M.resize=function(G){G=a.getGraphDiv(G);var X,K=new Promise(function(H,Y){(!G||a.isHidden(G))&&Y(new Error("Resize must be passed a displayed plot div element.")),G._redrawTimer&&clearTimeout(G._redrawTimer),G._resolveResize&&(X=G._resolveResize),G._resolveResize=H,G._redrawTimer=setTimeout(function(){if(!G.layout||G.layout.width&&G.layout.height||a.isHidden(G)){H(G);return}delete G.layout.width,delete G.layout.height;var q=G.changed;G.autoplay=!0,t.call("relayout",G,{autosize:!0}).then(function(){G.changed=q,G._resolveResize===H&&(delete G._resolveResize,H(G))})},100)});return X&&X(K),K},M.previousPromises=function(G){if((G._promises||[]).length)return Promise.all(G._promises).then(function(){G._promises=[]})},M.sendDataToCloud=function(G,X){G.emit("plotly_beforeexport");let K=new URL(X).origin;var H=M.graphJson(G,!1,"object");H.version=e;var Y=new URL(X);Y.searchParams.set("origin",window.location.origin);var q=window.open(Y.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),G.emit("plotly_exportfail");return}var Z=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:H},K),window.removeEventListener("message",Z),G.emit("plotly_afterexport"))};return window.addEventListener("message",Z),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(G,X){var K=X&&X.skipUpdateCalc,H=G._fullLayout||{};if(H._skipDefaults){delete H._skipDefaults;return}var Y=G._fullLayout={},q=G.layout||{},Z=G._fullData||[],ee=G._fullData=[],ae=G.data||[],he=G.calcdata||[],xe=G._context||{},we;G._transitionData||M.createTransitionData(G),Y._dfltTitle={plot:S(G,"Click to enter Plot title"),subtitle:S(G,"Click to enter Plot subtitle"),x:S(G,"Click to enter X axis title"),y:S(G,"Click to enter Y axis title"),colorbar:S(G,"Click to enter Colorscale title"),annotation:S(G,"new text")},Y._traceWord=S(G,"trace");var Me=A(G,_);if(H._initialAutoSizeIsDone){var Se=H.width,Ie=H.height;M.supplyLayoutGlobalDefaults(q,Y,Me),q.width||(Y.width=Se),q.height||(Y.height=Ie),M.sanitizeMargins(Y)}else{M.supplyLayoutGlobalDefaults(q,Y,Me);var Ve=!q.width||!q.height,Ge=Y.autosize,ke=xe.autosizable,_e=Ve&&(Ge||ke);_e?M.plotAutoSize(G,q,Y):Ve&&M.sanitizeMargins(Y),!Ge&&Ve&&(q.width=Y.width,q.height=Y.height)}Y._d3locale=x(Me,Y.separators),Y._extraFormat=A(G,T),Y._initialAutoSizeIsDone=!0,Y._dataLength=ae.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var ce=Y._subplots=u(),ve=Y._splomAxes={x:{},y:{}},le=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=f(Z,ae),M.supplyDataDefaults(ae,ee,q,Y);var Ae=Object.keys(ve.x),Be=Object.keys(ve.y);if(Ae.length>1&&Be.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,Y),we=0;we15&&Be.length>15&&Y.shapes.length===0&&Y.images.length===0,M.linkSubplots(ee,Y,Z,H),M.cleanPlot(ee,Y,Z,H);var Tt=!!(H._has&&H._has("cartesian")),At=!!(Y._has&&Y._has("cartesian")),$t=Tt,rr=At;$t&&!rr?H._bgLayer.remove():rr&&!$t&&(Y._shouldCreateBgLayer=!0),H._zoomlayer&&!G._dragging&&m({_fullLayout:H}),z(ee,Y),w(Y,H),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var _r=Y._tracePreGUI,Xt={},or;for(or in _r)Xt[or]="old";for(we=0;we0){var xe=1-2*q;Z=Math.round(xe*Z),ee=Math.round(xe*ee)}}var we=M.layoutAttributes.width.min,Me=M.layoutAttributes.height.min;Z1,Ie=!K.height&&Math.abs(H.height-ee)>1;(Ie||Se)&&(Se&&(H.width=Z),Ie&&(H.height=ee)),X._initialAutoSize||(X._initialAutoSize={width:Z,height:ee}),M.sanitizeMargins(H)},M.supplyLayoutModuleDefaults=function(G,X,K,H){var Y=t.componentsRegistry,q=X._basePlotModules,Z,ee,ae,he=t.subplotsRegistry.cartesian;for(Z in Y)ae=Y[Z],ae.includeBasePlot&&ae.includeBasePlot(G,X);q.length||q.push(he),X._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(G,X),he.finalizeSubplots(G,X));for(var xe in X._subplots)X._subplots[xe].sort(a.subplotSort);for(ee=0;ee1&&(K.l/=Ge,K.r/=Ge)}if(Me){var ke=(K.t+K.b)/Me;ke>1&&(K.t/=ke,K.b/=ke)}var _e=K.xl!==void 0?K.xl:K.x,ce=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,le=K.yb!==void 0?K.yb:K.y;Se[X]={l:{val:_e,size:K.l+Ve},r:{val:ce,size:K.r+Ve},b:{val:le,size:K.b+Ve},t:{val:ve,size:K.t+Ve}},Ie[X]=1}if(!H._replotting)return M.doAutoMargin(G)}};function P(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var X=c.list(G,"",!0);for(var K in X)if(X[K].autoshift||X[K].shift)return!0;return!1}M.doAutoMargin=function(G){var X=G._fullLayout,K=X.width,H=X.height;X._size||(X._size={}),D(X);var Y=X._size,q=X.margin,Z={t:0,b:0,l:0,r:0},ee=a.extendFlat({},Y),ae=q.l,he=q.r,xe=q.t,we=q.b,Me=X._pushmargin,Se=X._pushmarginIds,Ie=X.minreducedwidth,Ve=X.minreducedheight;if(q.autoexpand!==!1){for(var Ge in Me)Se[Ge]||delete Me[Ge];var ke=G._fullLayout._reservedMargin;for(var _e in ke)for(var ce in ke[_e]){var ve=ke[_e][ce];Z[ce]=Math.max(Z[ce],ve)}Me.base={l:{val:0,size:ae},r:{val:1,size:he},t:{val:1,size:xe},b:{val:0,size:we}};for(var le in Z){var Ae=0;for(var Be in Me)Be!=="base"&&k(Me[Be][le].size)&&(Ae=Me[Be][le].size>Ae?Me[Be][le].size:Ae);var Xe=Math.max(0,q[le]-Ae);Z[le]=Math.max(0,Z[le]-Xe)}for(var Ye in Me){var yt=Me[Ye].l||{},gt=Me[Ye].b||{},Tt=yt.val,At=yt.size,$t=gt.val,rr=gt.size,_r=K-Z.r-Z.l,Xt=H-Z.t-Z.b;for(var or in Me){if(k(At)&&Me[or].r){var Ot=Me[or].r.val,vt=Me[or].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),De=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+De>ae+he&&(ae=ht,he=De)}}if(k(rr)&&Me[or].t){var Ne=Me[or].t.val,We=Me[or].t.size;if(Ne>$t){var Ke=(rr*Ne+(We-Xt)*$t)/(Ne-$t),Je=(We*(1-$t)+(rr-Xt)*(1-Ne))/(Ne-$t);Ke+Je>we+xe&&(we=Ke,xe=Je)}}}}}var et=a.constrain(K-q.l-q.r,B,Ie),Mt=a.constrain(H-q.t-q.b,F,Ve),pt=Math.max(0,K-et),Pt=Math.max(0,H-Mt);if(pt){var Ct=(ae+he)/pt;Ct>1&&(ae/=Ct,he/=Ct)}if(Pt){var qt=(we+xe)/Pt;qt>1&&(we/=qt,xe/=qt)}if(Y.l=Math.round(ae)+Z.l,Y.r=Math.round(he)+Z.r,Y.t=Math.round(xe)+Z.t,Y.b=Math.round(we)+Z.b,Y.p=Math.round(q.pad),Y.w=Math.round(K)-Y.l-Y.r,Y.h=Math.round(H)-Y.t-Y.b,!X._replotting&&(M.didMarginChange(ee,Y)||P(G))){"_redrawFromAutoMarginCount"in X?X._redrawFromAutoMarginCount++:X._redrawFromAutoMarginCount=1;var Vt=3*(1+Object.keys(Se).length);if(X._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(G,X=!1,K="json",H=!1,Y=!1){(H&&X&&!G._fullData||H&&!X&&!G._fullLayout)&&M.supplyDefaults(G);var q=H?G._fullData:G.data,Z=H?G._fullLayout:G.layout,ee=(G._transitionData||{})._frames;function ae(we,Me){if(typeof we=="function")return Me?"_function_":null;if(a.isPlainObject(we)){var Se={};return Object.keys(we).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof we[ke]=="function"){Me&&(Se[ke]="_function");return}Se[ke]=ae(we[ke],Me)}}),Se}var Ie=Array.isArray(we),Ve=a.isTypedArray(we);if((Ie||Ve)&&we.dtype&&we.shape){var Ge=we.bdata;return ae({dtype:we.dtype,shape:we.shape,bdata:a.isArrayBuffer(Ge)?l.encode(Ge):Ge},Me)}return Ie?we.map(function(ke){return ae(ke,Me)}):Ve?a.simpleMap(we,a.identity):a.isJSDate(we)?a.ms2DateTimeLocal(+we):we}var he={data:(q||[]).map(function(we){var Me=ae(we);return X&&delete Me.fit,Me})};if(!X&&(he.layout=ae(Z),H)){var xe=Z._size;he.layout.computed={margin:{b:xe.b,l:xe.l,r:xe.r,t:xe.t}}}return ee&&(he.frames=ae(ee)),Y&&(he.config=ae(G._context,!0)),K==="object"?he:JSON.stringify(he)},M.modifyFrames=function(G,X){var K,H,Y,q=G._transitionData._frames,Z=G._transitionData._frameHash;for(K=0;K0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){H=!0}),K.redraw&&G._transitionData._interruptCallbacks.push(function(){return t.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var Me=0,Se=0;function Ie(){return Me++,function(){Se++,!H&&Se===Me&&ee(we)}}K.runFn(Ie),setTimeout(Ie())})}function ee(we){if(G._transitionData)return q(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(we)}function ae(){if(G._transitionData)return G._transitioning=!1,Y(G._transitionData._interruptCallbacks)}var he=[M.previousPromises,ae,K.prepareFn,M.rehover,M.reselect,Z],xe=a.syncOrAsync(he,G);return(!xe||!xe.then)&&(xe=Promise.resolve()),xe.then(function(){return G})}M.doCalcdata=function(G,X){var K=c.list(G),H=G._fullData,Y=G._fullLayout,q,Z,ee,ae=new Array(H.length),he=(G.calcdata||[]).slice();for(G.calcdata=ae,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ne){var se=Q.text(),G=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(se);G&&!m()&&(G=null);var X=V.select(Q.node().parentNode);if(X.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":se,"data-math":"N"});function H(){X.empty()||(K=Q.attr("class")+"-math",X.select("svg."+K).remove()),Q.text("").style("white-space","pre");var Y=P(Q.node(),se);Y&&Q.style("pointer-events","all"),J.positionText(Q),ne&&ne.call(Q)}return G?(re&&re._promises||[]).push(new Promise(function(Y){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),Z={fontSize:q},ee=Q.attr("text-anchor");h(G[2],Z,function(ae,he,xe){X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove();var we=ae&&ae.select("svg");if(!we||!we.node()){H(),Y();return}Q.style("display","none");var Me=X.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":se,"data-math":"Y"});Me.node().appendChild(we.node()),he&&he.node()&&we.node().insertBefore(he.node().cloneNode(!0),we.node().firstChild);var Se=xe.width,Ie=xe.height;we.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":Z.fontSize+"px"});var Ve=Q.node().style.fill||"black",Ge=we.select("g");Ge.attr({fill:Ve,stroke:Ve});var ke=Ge.node().getBoundingClientRect(),_e=ke.width,ce=ke.height;(_e>Se||ce>Ie)&&(we.style("overflow","hidden"),ke=we.node().getBoundingClientRect(),_e=ke.width,ce=ke.height);var ve=+Q.attr("x"),le=+Q.attr("y"),Ae=q||Q.node().getBoundingClientRect().height,Be=-Ae/4;K[0]==="y"?Me.attr({transform:"rotate("+[-90,ve,le]+")"+b(-_e/2,Be-ce/2)}):K[0]==="l"?le=Be-ce/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,le=Be):(ve=ve-_e*(ee==="middle"?.5:ee==="end"?1:0),le=le+Be-ce/2),we.attr({x:ve,y:le}),ne&&ne.call(Q,Me),Y(Me)})})):H(),Q};var t=/(<|<|<)/g,n=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(n,"\\gt ")}var a=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function m(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,p.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,p.warn("Unsupported MathJax version:",MathJax.version)),!1)}function h(Q,re,ne){let se=o();var G;let X=function(){if(!a){let q=MathJax._.output.svg_ts.SVG,Z=p.extendFlat({},MathJax.config.svg,{fontCache:"local"});se===4&&(Z.linebreaks=p.extendFlat({},Z.linebreaks,{inline:!1})),a=MathJax._.mathjax.mathjax.document(document,p.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q(Z)}))}let H="math-output-"+p.randstr({},64);G=V.select("body").append("div").attr({id:H}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let Y=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return a.convert(Y,{display:!1})}).then(function(q){G.node().appendChild(q)})},K=function(){let H=G.select(".MathJax"),Y=!H.empty()&&G.select("svg").node();if(!Y)p.log("There was an error in the tex syntax.",Q),ne();else{let q=Y.getBoundingClientRect(),Z=H.select("defs");ne(H,Z,q)}G.remove()};Promise.resolve().then(X).then(K).catch(H=>{p.log("MathJax typesetting failed.",Q,H),G&&G.remove(),ne()})}var v={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"},g={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},w="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,T=//i;J.BR_TAG_ALL=//gi;var f=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,x=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ne=Q.match(re),se=ne&&(ne[3]||ne[4]);return se&&B(se)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ne=re.len!==void 0&&re.len!==-1?re.len:1/0,se=re.allowedTags!==void 0?re.allowedTags:["br"],G="...",X=G.length,K=Q.split(C),H=[],Y="",q=0,Z=0;ZX?H.push(ee.slice(0,Math.max(0,we-X))+G):H.push(ee.slice(0,we));break}Y=""}}return H.join("")};var O={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},D=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(D,function(re,ne){var se;return ne.charAt(0)==="#"?se=F(ne.charAt(1)==="x"?parseInt(ne.slice(2),16):parseInt(ne.slice(1),10)):se=O[ne],se||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ne=String.fromCharCode;return Q<=65535?ne(Q):ne((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ne=!1,se=[],G,X=-1;function K(){X++;var _e=document.createElementNS(E.svg,"tspan");V.select(_e).attr({class:"line",dy:X*k+"em"}),Q.appendChild(_e),G=_e;var ce=se;if(se=[{node:_e}],ce.length>1)for(var ve=1;ve.",re);return}var ce=se.pop();_e!==ce.type&&p.log("Start tag <"+ce.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",re),G=se[se.length-1].node}var Z=T.test(re);Z?K():(G=Q,se=[{node:Q}]);for(var ee=re.split(C),ae=0;ae=0;g--,i++){var w=m[g];v[i]=[1-w[0],w[1]]}return v}function s(m,h){h=h||{};for(var v=m.domain,g=m.range,i=g.length,w=new Array(i),S=0;Sv-m?m=v-(h-v):h-v=0?w=n.colorscale.sequential:w=n.colorscale.sequentialminus,s._sync("colorscale",w)}}}}),fl=ze({"src/components/colorscale/index.js"(J,V){"use strict";var p=Bv(),b=Bf();V.exports={moduleType:"component",name:"colorscale",attributes:qs(),layoutAttributes:Ww(),supplyLayoutDefaults:jI(),handleDefaults:qc(),crossTraceDefaults:UI(),calc:Qf(),scales:p.scales,defaultScale:p.defaultScale,getScale:p.get,isValidScale:p.isValid,hasColorscale:b.hasColorscale,extractOpts:b.extractOpts,extractScale:b.extractScale,flipScale:b.flipScale,makeColorScaleFunc:b.makeColorScaleFunc,makeColorScaleFuncFromTrace:b.makeColorScaleFuncFromTrace}}}),el=ze({"src/traces/scatter/subtypes.js"(J,V){"use strict";var p=Nr(),b=Ff().isTypedArraySpec;V.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return p.isPlainObject(k)&&(p.isArrayOrTypedArray(k.size)||b(k.size))}}}}),l1=ze({"src/traces/scatter/make_bubble_size_func.js"(J,V){"use strict";var p=ao();V.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,n=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var a=n(r/k);return p(a)&&a>0?Math.max(a,t):0}}}}),kh=ze({"src/components/fx/helpers.js"(J){"use strict";var V=Nr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var n=e.xaxes||[],r=e.yaxes||[],a=0;a=0&&n.index{let o=r.toLowerCase(),s=r,c=l(a);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===p[o])return t.push([s,...c]),"";if(c.length0&&(ce=100,_e=_e.replace("-open","")),_e.indexOf("-dot")>0&&(ce+=200,_e=_e.replace("-dot","")),_e=g.symbolNames.indexOf(_e),_e>=0&&(_e+=ce)}return _e%100>=T||_e>=400?0:Math.floor(Math.max(_e,0))};function u(_e,ce,ve,le){var Ae=_e%100;return g.symbolFuncs[Ae](ce,ve,le)+(_e>=200?f:"")}var A=E("~f"),x={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}};g.gradient=function(_e,ce,ve,le,Ae,Be){var Xe=x[le];return z(_e,ce,ve,Xe.type,Ae,Be,Xe.start,Xe.stop,!1,Xe.reversed)};function z(_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt){var Tt=Ae.length,At;le==="linear"?At={node:"linearGradient",attrs:{x1:Xe.x,y1:Xe.y,x2:Ye.x,y2:Ye.y,gradientUnits:yt?"userSpaceOnUse":"objectBoundingBox"},reversed:gt}:le==="radial"&&(At={node:"radialGradient",reversed:gt});for(var $t=new Array(Tt),rr=0;rr=0&&_e.i===void 0&&(_e.i=Be.i),ce.style("opacity",le.selectedOpacityFn?le.selectedOpacityFn(_e):_e.mo===void 0?Xe.opacity:_e.mo),le.ms2mrc){var yt;_e.ms==="various"||Xe.size==="various"?yt=3:yt=le.ms2mrc(_e.ms),_e.mrc=yt,le.selectedSizeFn&&(yt=_e.mrc=le.selectedSizeFn(_e));var gt=g.symbolNumber(_e.mx||Xe.symbol)||0;_e.om=gt%200>=100;var Tt=ke(_e,ve),At=Z(_e,ve);ce.attr("d",u(gt,yt,Tt,At))}var $t=!1,rr,_r,Xt;if(_e.so)Xt=Ye.outlierwidth,_r=Ye.outliercolor,rr=Xe.outliercolor;else{var or=(Ye||{}).width;Xt=(_e.mlw+1||or+1||(_e.trace?(_e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in _e?_r=_e.mlcc=le.lineScale(_e.mlc):b.isArrayOrTypedArray(Ye.color)?_r=e.defaultLine:_r=Ye.color,b.isArrayOrTypedArray(Xe.color)&&(rr=e.defaultLine,$t=!0),"mc"in _e?rr=_e.mcc=le.markerScale(_e.mc):rr=Xe.color||Xe.colors||"rgba(0,0,0,0)",le.selectedColorFn&&(rr=le.selectedColorFn(_e))}let Ot=_e.mld||(Ye||{}).dash;if(Ot&&g.dashLine(ce,Ot,Xt),_e.om)ce.call(e.stroke,rr).style({"stroke-width":(Xt||1)+"px",fill:"none"});else{ce.style("stroke-width",(_e.isBlank?0:Xt)+"px");var vt=Xe.gradient,ht=_e.mgt;ht?$t=!0:ht=vt&&vt.type,b.isArrayOrTypedArray(ht)&&(ht=ht[0],x[ht]||(ht=0));var De=Xe.pattern,Ne=g.getPatternAttr,We=De&&(Ne(De.shape,_e.i,"")||Ne(De.path,_e.i,""));if(ht&&ht!=="none"){var Ke=_e.mgc;Ke?$t=!0:Ke=vt.color;var Je=ve.uid;$t&&(Je+="-"+_e.i),g.gradient(ce,Ae,Je,ht,[[0,Ke],[1,rr]],"fill")}else if(We){var et=!1,Mt=De.fgcolor;!Mt&&Be&&Be.color&&(Mt=Be.color,et=!0);var pt=Ne(Mt,_e.i,Be&&Be.color||null),Pt=Ne(De.bgcolor,_e.i,null),Ct=De.fgopacity,qt=Ne(De.size,_e.i,8),Vt=Ne(De.solidity,_e.i,.3);et=et||_e.mcc||b.isArrayOrTypedArray(De.shape)||b.isArrayOrTypedArray(De.path)||b.isArrayOrTypedArray(De.bgcolor)||b.isArrayOrTypedArray(De.fgcolor)||b.isArrayOrTypedArray(De.size)||b.isArrayOrTypedArray(De.solidity);var Ht=ve.uid;et&&(Ht+="-"+_e.i),g.pattern(ce,"point",Ae,Ht,We,qt,Vt,_e.mcc,De.fillmode,Pt,pt,Ct)}else b.isArrayOrTypedArray(rr)?e.fill(ce,rr[_e.i]):e.fill(ce,rr);Xt&&e.stroke(ce,_r)}},g.makePointStyleFns=function(_e){var ce={},ve=_e.marker;return ce.markerScale=g.tryColorscale(ve,""),ce.lineScale=g.tryColorscale(ve,"line"),l.traceIs(_e,"symbols")&&(ce.ms2mrc=m.isBubble(_e)?h(_e):function(){return(ve.size||6)/2}),_e.selectedpoints&&b.extendFlat(ce,g.makeSelectedPointStyleFns(_e)),ce},g.makeSelectedPointStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.marker||{},Be=ve.marker||{},Xe=le.marker||{},Ye=Ae.opacity,yt=Be.opacity,gt=Xe.opacity,Tt=yt!==void 0,At=gt!==void 0;(b.isArrayOrTypedArray(Ye)||Tt||At)&&(ce.selectedOpacityFn=function(De){var Ne=De.mo===void 0?Ae.opacity:De.mo;return De.selected?Tt?yt:Ne:At?gt:c*Ne});var $t=Ae.color,rr=Be.color,_r=Xe.color;(rr||_r)&&(ce.selectedColorFn=function(De){var Ne=De.mcc||$t;return De.selected?rr||Ne:_r||Ne});var Xt=Ae.size,or=Be.size,Ot=Xe.size,vt=or!==void 0,ht=Ot!==void 0;return l.traceIs(_e,"symbols")&&(vt||ht)&&(ce.selectedSizeFn=function(De){var Ne=De.mrc||Xt/2;return De.selected?vt?or/2:Ne:ht?Ot/2:Ne}),ce},g.makeSelectedTextStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.textfont||{},Be=ve.textfont||{},Xe=le.textfont||{},Ye=Ae.color,yt=Be.color,gt=Xe.color;return ce.selectedTextColorFn=function(Tt){var At=Tt.tc||Ye;return Tt.selected?yt||At:gt||(yt?At:e.addOpacity(At,c))},ce},g.selectedPointStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedPointStyleFns(ce),le=ce.marker||{},Ae=[];ve.selectedOpacityFn&&Ae.push(function(Be,Xe){Be.style("opacity",ve.selectedOpacityFn(Xe))}),ve.selectedColorFn&&Ae.push(function(Be,Xe){e.fill(Be,ve.selectedColorFn(Xe))}),ve.selectedSizeFn&&Ae.push(function(Be,Xe){var Ye=Xe.mx||le.symbol||0,yt=ve.selectedSizeFn(Xe);Be.attr("d",u(g.symbolNumber(Ye),yt,ke(Xe,ce),Z(Xe,ce))),Xe.mrc2=yt}),Ae.length&&_e.each(function(Be){for(var Xe=p.select(this),Ye=0;Ye0?ve:0}g.textPointStyle=function(_e,ce,ve){if(_e.size()){var le;if(ce.selectedpoints){var Ae=g.makeSelectedTextStyleFns(ce);le=Ae.selectedTextColorFn}var Be=ce.texttemplate,Xe=ve._fullLayout;_e.each(function(Ye){var yt=p.select(this),gt=Be?b.extractOption(Ye,ce,"txt","texttemplate"):b.extractOption(Ye,ce,"tx","text");if(!gt&>!==0){yt.remove();return}if(Be){var Tt=ce._module.formatLabels,At=Tt?Tt(Ye,ce,Xe):{},$t={};v($t,ce,Ye.i),gt=b.texttemplateString({data:[$t,Ye,ce._meta],fallback:ce.texttemplatefallback,labels:At,locale:Xe._d3locale,template:gt})}var rr=Ye.tp||ce.textposition,_r=D(Ye,ce),Xt=le?le(Ye):Ye.tc||ce.textfont.color;yt.call(g.font,{family:Ye.tf||ce.textfont.family,weight:Ye.tw||ce.textfont.weight,style:Ye.ty||ce.textfont.style,variant:Ye.tv||ce.textfont.variant,textcase:Ye.tC||ce.textfont.textcase,lineposition:Ye.tE||ce.textfont.lineposition,shadow:Ye.tS||ce.textfont.shadow,size:_r,color:Xt}).text(gt).call(r.convertToTspans,ve).call(O,rr,_r,Ye.mrc)})}},g.selectedTextStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedTextStyleFns(ce);_e.each(function(le){var Ae=p.select(this),Be=ve.selectedTextColorFn(le),Xe=le.tp||ce.textposition,Ye=D(le,ce);e.fill(Ae,Be);var yt=l.traceIs(ce,"bar-like");O(Ae,Xe,Ye,le.mrc2||le.mrc,yt)})}};var B=.5;g.smoothopen=function(_e,ce){if(_e.length<3)return"M"+_e.join("L");var ve="M"+_e[0],le=[],Ae;for(Ae=1;Ae<_e.length-1;Ae++)le.push(Q(_e[Ae-1],_e[Ae],_e[Ae+1],ce));for(ve+="Q"+le[0][0]+" "+_e[1],Ae=2;Ae<_e.length-1;Ae++)ve+="C"+le[Ae-2][1]+" "+le[Ae-1][0]+" "+_e[Ae];return ve+="Q"+le[_e.length-3][1]+" "+_e[_e.length-1],ve},g.smoothclosed=function(_e,ce){if(_e.length<3)return"M"+_e.join("L")+"Z";var ve="M"+_e[0],le=_e.length-1,Ae=[Q(_e[le],_e[0],_e[1],ce)],Be;for(Be=1;Be=yt||De>=Tt&&De<=yt)&&(Ne<=At&&Ne>=gt||Ne>=At&&Ne<=gt)&&(_e=[De,Ne])}return _e}g.applyBackoff=se,g.makeTester=function(){var _e=b.ensureSingleById(p.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ce=b.ensureSingle(_e,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});g.tester=_e,g.testref=ce},g.savedBBoxes={};var G=0,X=1e4;g.bBox=function(_e,ce,ve){ve||(ve=K(_e));var le;if(ve){if(le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}else if(_e.childNodes.length===1){var Ae=_e.childNodes[0];if(ve=K(Ae),ve){var Be=+Ae.getAttribute("x")||0,Xe=+Ae.getAttribute("y")||0,Ye=Ae.getAttribute("transform");if(!Ye){var yt=g.bBox(Ae,!1,ve);return Be&&(yt.left+=Be,yt.right+=Be),Xe&&(yt.top+=Xe,yt.bottom+=Xe),yt}if(ve+="~"+Be+"~"+Xe+"~"+Ye,le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}}var gt,Tt;ce?gt=_e:(Tt=g.tester.node(),gt=_e.cloneNode(!0),Tt.appendChild(gt)),p.select(gt).attr("transform",null).call(r.positionText,0,0);var At=gt.getBoundingClientRect(),$t=g.testref.node().getBoundingClientRect();ce||Tt.removeChild(gt);var rr={height:At.height,width:At.width,left:At.left-$t.left,top:At.top-$t.top,right:At.right-$t.left,bottom:At.bottom-$t.top};return G>=X&&(g.savedBBoxes={},G=0),ve&&(g.savedBBoxes[ve]=rr),G++,b.extendFlat({},rr)};function K(_e){var ce=_e.getAttribute("data-unformatted");if(ce!==null)return ce+_e.getAttribute("data-math")+_e.getAttribute("text-anchor")+_e.getAttribute("style")}g.setClipUrl=function(_e,ce,ve){_e.attr("clip-path",H(ce,ve))};function H(_e,ce){if(!_e)return null;var ve=ce._context,le=ve._exportedPlot?"":ve._baseUrl||"";return le?"url('"+le+"#"+_e+"')":"url(#"+_e+")"}g.getTranslate=function(_e){var ce=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},g.setTranslate=function(_e,ce,ve){var le=/(\btranslate\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||0,ve=ve||0,Xe=Xe.replace(le,"").trim(),Xe+=n(ce,ve),Xe=Xe.trim(),_e[Be]("transform",Xe),Xe},g.getScale=function(_e){var ce=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},g.setScale=function(_e,ce,ve){var le=/(\bscale\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||1,ve=ve||1,Xe=Xe.replace(le,"").trim(),Xe+="scale("+ce+","+ve+")",Xe=Xe.trim(),_e[Be]("transform",Xe),Xe};var Y=/\s*sc.*/;g.setPointGroupScale=function(_e,ce,ve){if(ce=ce||1,ve=ve||1,!!_e){var le=ce===1&&ve===1?"":"scale("+ce+","+ve+")";_e.each(function(){var Ae=(this.getAttribute("transform")||"").replace(Y,"");Ae+=le,Ae=Ae.trim(),this.setAttribute("transform",Ae)})}};var q=/translate\([^)]*\)\s*$/;g.setTextPointsScale=function(_e,ce,ve){_e&&_e.each(function(){var le,Ae=p.select(this),Be=Ae.select("text");if(Be.node()){var Xe=parseFloat(Be.attr("x")||0),Ye=parseFloat(Be.attr("y")||0),yt=(Ae.attr("transform")||"").match(q);ce===1&&ve===1?le=[]:le=[n(Xe,Ye),"scale("+ce+","+ve+")",n(-Xe,-Ye)],yt&&le.push(yt),Ae.attr("transform",le.join(""))}})};function Z(_e,ce){var ve;return _e&&(ve=_e.mf),ve===void 0&&(ve=ce.marker&&ce.marker.standoff||0),!ce._geo&&!ce._xA?-ve:ve}g.getMarkerStandoff=Z;var ee=Math.atan2,ae=Math.cos,he=Math.sin;function xe(_e,ce){var ve=ce[0],le=ce[1];return[ve*ae(_e)-le*he(_e),ve*he(_e)+le*ae(_e)]}var we,Me,Se,Ie,Ve,Ge;function ke(_e,ce){var ve=_e.ma;ve===void 0&&(ve=ce.marker.angle,(!k(ve)||b.isArrayOrTypedArray(ve))&&(ve=0));var le,Ae,Be=ce.marker.angleref;if(Be==="previous"||Be==="north"){if(ce._geo){var Xe=ce._geo.project(_e.lonlat);le=Xe[0],Ae=Xe[1]}else{var Ye=ce._xA,yt=ce._yA;if(Ye&&yt)le=Ye.c2p(_e.x),Ae=yt.c2p(_e.y);else return 90}if(ce._geo){var gt=_e.lonlat[0],Tt=_e.lonlat[1],At=ce._geo.project([gt,Tt+1e-5]),$t=ce._geo.project([gt+1e-5,Tt]),rr=ee($t[1]-Ae,$t[0]-le),_r=ee(At[1]-Ae,At[0]-le),Xt;if(Be==="north")Xt=ve/180*Math.PI;else if(Be==="previous"){var or=gt/180*Math.PI,Ot=Tt/180*Math.PI,vt=we/180*Math.PI,ht=Me/180*Math.PI,De=vt-or,Ne=ae(ht)*he(De),We=he(ht)*ae(Ot)-ae(ht)*he(Ot)*ae(De);Xt=-ee(Ne,We)-Math.PI,we=gt,Me=Tt}var Ke=xe(rr,[ae(Xt),0]),Je=xe(_r,[he(Xt),0]);ve=ee(Ke[1]+Je[1],Ke[0]+Je[0])/Math.PI*180,Be==="previous"&&!(Ge===ce.uid&&_e.i===Ve+1)&&(ve=null)}if(Be==="previous"&&!ce._geo)if(Ge===ce.uid&&_e.i===Ve+1&&k(le)&&k(Ae)){var et=le-Se,Mt=Ae-Ie,pt=ce.line&&ce.line.shape||"",Pt=pt.slice(pt.length-1);Pt==="h"&&(Mt=0),Pt==="v"&&(et=0),ve+=ee(Mt,et)/Math.PI*180+90}else ve=null}return Se=le,Ie=Ae,Ve=_e.i,Ge=ce.uid,ve}g.getMarkerAngle=ke}}),qv=ze({"src/components/titles/index.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=$i(),n=Qn(),r=Cs(),a=np(),o=dc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,m=1.6;function h(v,g,i){var w=v._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,T=i.avoid||{},f=i.attributes,u=i.transform,A=i.containerGroup,x=1,z=S.title,I=(z&&z.text?z.text:"").trim(),O=!1,D=z&&z.font?z.font:{},B=D.family,F=D.size,P=D.color,j=D.weight,U=D.style,$=D.variant,Q=D.textcase,re=D.lineposition,ne=D.shadow,se=i.subtitlePropName,G=!!se,X=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},H=(K.text||"").trim(),Y=!1,q=1,Z=K.font,ee=Z.family,ae=Z.size,he=Z.color,xe=Z.weight,we=Z.style,Me=Z.variant,Se=Z.textcase,Ie=Z.lineposition,Ve=Z.shadow,Ge;M==="title.text"?Ge="titleText":M.indexOf("axis")!==-1?Ge="axisTitleText":M.indexOf("colorbar")!==-1&&(Ge="colorbarTitleText");var ke=v._context.edits[Ge];function _e(rr,_r){return rr===void 0||_r===void 0?!1:rr.replace(s," % ")===_r.replace(s," % ")}I===""?x=0:_e(I,C)&&(ke||(I=""),x=.2,O=!0),G&&(H===""?q=0:_e(H,X)&&(ke||(H=""),q=.2,Y=!0)),i._meta?I=l.templateString(I,i._meta):w._meta&&(I=l.templateString(I,w._meta));var ce=I||H||ke,ve;A||(A=l.ensureSingle(w._infolayer,"g","g-"+g),ve=w._hColorbarMoveTitle);var le=A.selectAll("text."+g).data(ce?[0]:[]);le.enter().append("text"),le.text(I).attr("class",g),le.exit().remove();var Ae=null,Be=g+"-subtitle",Xe=H||ke;if(G&&(Ae=A.selectAll("text."+Be).data(Xe?[0]:[]),Ae.enter().append("text"),Ae.text(H).attr("class",Be),Ae.exit().remove()),!ce)return A;function Ye(rr,_r){l.syncOrAsync([yt,gt],{title:rr,subtitle:_r})}function yt(rr){var _r=rr.title,Xt=rr.subtitle,or;!u&&ve&&(u={}),u?(or="",u.rotate&&(or+="rotate("+[u.rotate,f.x,f.y]+")"),(u.offset||ve)&&(or+=e(0,(u.offset||0)-(ve||0)))):or=null,_r.attr("transform",or);function Ot(Ke){if(Ke){var Je=p.select(Ke.node().parentNode).select("."+Be);if(!Je.empty()){var et=Ke.node().getBBox();if(et.height){var Mt=et.y+et.height+c*ae;Je.attr("y",Mt)}}}}if(_r.style("opacity",x*n.opacity(P)).call(t.font,{color:n.rgb(P),size:p.round(F,2),family:B,weight:j,style:U,variant:$,textcase:Q,shadow:ne,lineposition:re}).attr(f).call(r.convertToTspans,v,Ot),Xt&&!Xt.empty()){var vt=A.select("."+g+"-math-group"),ht=_r.node().getBBox(),De=vt.node()?vt.node().getBBox():void 0,Ne=De?De.y+De.height+c*ae:ht.y+ht.height+m*ae,We=l.extendFlat({},f,{y:Ne});Xt.attr("transform",or),Xt.style("opacity",q*n.opacity(he)).call(t.font,{color:n.rgb(he),size:p.round(ae,2),family:ee,weight:xe,style:we,variant:Me,textcase:Se,shadow:Ve,lineposition:Ie}).attr(We).call(r.convertToTspans,v)}return E.previousPromises(v)}function gt(rr){var _r=rr.title,Xt=p.select(_r.node().parentNode);if(T&&T.selection&&T.side&&I){Xt.attr("transform",null);var or=o[T.side],Ot=T.side==="left"||T.side==="top"?-1:1,vt=b(T.pad)?T.pad:2,ht=t.bBox(Xt.node()),De={t:0,b:0,l:0,r:0},Ne=v._fullLayout._reservedMargin;for(var We in Ne)for(var Ke in Ne[We]){var Je=Ne[We][Ke];De[Ke]=Math.max(De[Ke],Je)}var et={left:De.l,top:De.t,right:w.width-De.r,bottom:w.height-De.b},Mt=T.maxShift||Ot*(et[T.side]-ht[T.side]),pt=0;if(Mt<0)pt=Mt;else{var Pt=T.offsetLeft||0,Ct=T.offsetTop||0;ht.left-=Pt,ht.right-=Pt,ht.top-=Ct,ht.bottom-=Ct,T.selection.each(function(){var Vt=t.bBox(this);l.bBoxIntersect(ht,Vt,vt)&&(pt=Math.max(pt,Ot*(Vt[T.side]-ht[or])+vt))}),pt=Math.min(Mt,pt),S._titleScoot=Math.abs(pt)}if(pt>0||Mt<0){var qt={left:[-pt,0],right:[pt,0],top:[0,-pt],bottom:[0,pt]}[T.side];Xt.attr("transform",e(qt[0],qt[1]))}}}le.call(Ye,Ae);function Tt(rr,_r){rr.text(_r).on("mouseover.opacity",function(){p.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){p.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?le.on(".opacity",null):(Tt(le,C),O=!0),le.call(r.makeEditable,{gd:v}).on("edit",function(rr){_!==void 0?k.call("_guiRestyle",v,M,rr,_):k.call("_guiRelayout",v,M,rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,f.x,f.y)}),G)){if(G&&!I){var At=le.node().getBBox(),$t=At.y+At.height+m*ae;Ae.attr("y",$t)}H?Ae.on(".opacity",null):(Tt(Ae,X),Y=!0),Ae.call(r.makeEditable,{gd:v}).on("edit",function(rr){k.call("_guiRelayout",v,"title.subtitle.text",rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,Ae.attr("x"),Ae.attr("y"))})}return le.classed("js-placeholder",O),Ae&&!Ae.empty()&&Ae.classed("js-placeholder",Y),A}V.exports={draw:h,SUBTITLE_PADDING_EM:m,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Dd=ze({"src/plots/cartesian/set_convert.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Nr(),k=E.numberFormat,l=ao(),e=E.cleanNumber,t=E.ms2DateTime,n=E.dateTime2ms,r=E.ensureNumber,a=E.isArrayOrTypedArray,o=No(),s=o.FP_SAFE,c=o.BADNUM,m=o.LOG_CLIP,h=o.ONEWEEK,v=o.ONEDAY,g=o.ONEHOUR,i=o.ONEMIN,w=o.ONESEC,S=Xl(),M=hc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function T(u){return Math.pow(10,u)}function f(u){return u!=null}V.exports=function(A,x){x=x||{};var z=A._id||"x",I=z.charAt(0);function O(H,Y){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&Y&&A.range&&A.range.length===2){var q=A.range[0],Z=A.range[1];return .5*(q+Z-2*m*Math.abs(q-Z))}else return c}function D(H,Y,q,Z){if((Z||{}).msUTC&&l(H))return+H;var ee=n(H,q||A.calendar);if(ee===c)if(l(H)){H=+H;var ae=Math.floor(E.mod(H+.05,1)*10),he=Math.round(H-ae/10);ee=n(new Date(he))+ae/10}else return c;return ee}function B(H,Y,q){return t(H,Y,q||A.calendar)}function F(H){return A._categories[Math.round(H)]}function P(H){if(f(H)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[H]!==void 0)return A._categoriesMap[H];A._categories.push(typeof H=="number"?String(H):H);var Y=A._categories.length-1;return A._categoriesMap[H]=Y,Y}return c}function j(H,Y){for(var q=new Array(Y),Z=0;ZA.range[1]&&(q=!q);for(var Z=q?-1:1,ee=Z*H,ae=0,he=0;hewe)ae=he+1;else{ae=ee<(xe+we)/2?he:he+1;break}}var Me=A._B[ae]||0;return isFinite(Me)?re(H,A._m2,Me):0},G=function(H){var Y=A._rangebreaks.length;if(!Y)return ne(H,A._m,A._b);for(var q=0,Z=0;ZA._rangebreaks[Z].pmax&&(q=Z+1);return ne(H,A._m2,A._B[q])}}A.c2l=A.type==="log"?O:r,A.l2c=A.type==="log"?T:r,A.l2p=se,A.p2l=G,A.c2p=A.type==="log"?function(H,Y){return se(O(H,Y))}:se,A.p2c=A.type==="log"?function(H){return T(G(H))}:G,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(H){return A.l2p(e(H))},A.p2d=A.p2r=G,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(H,Y){return O(e(H),Y)},A.r2d=A.r2c=function(H){return T(e(H))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=O,A.l2d=T,A.d2p=function(H,Y){return A.l2p(A.d2r(H,Y))},A.p2d=function(H){return T(G(H))},A.r2p=function(H){return A.l2p(e(H))},A.p2r=G,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=D,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(H,Y,q){return A.l2p(D(H,0,q))},A.p2d=A.p2r=function(H,Y,q){return B(G(H),Y,q)},A.cleanPos=function(H){return E.cleanDate(H,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=Q(H);return Y!==void 0?Y:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return typeof H=="string"&&H!==""?H:r(H)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=$(H);return Y!==void 0?Y:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=$,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:r(H)},A.setupMultiCategory=function(H){var Y=A._traceIndices,q,Z,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ae in ee)if(ae!==z){var he=x[S.id2name(ae)];Y=Y.concat(he._traceIndices)}}var xe=[[0,{}],[0,{}]],we=[];for(q=0;qhe[1]&&(Z[ae?0:1]=q,ee[1]=he[1]),ee[0]>=ee[1])if(Y!==void 0){var xe=he[0]+1;q!==void 0&&(xe=Math.min(xe,he[1])),Z[ae?0:1]=A.l2r(xe)}else q!==void 0&&(Z[ae?1:0]=A.l2r(he[1]-1))}},A.cleanRange=function(H,Y){A._cleanRange(H,Y),A.limitRange(H)},A._cleanRange=function(H,Y){Y||(Y={}),H||(H="range");var q=E.nestedProperty(A,H).get(),Z,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=Y.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,H).set(ee);return}var ae=q[0]===null,he=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),Z=0;Z<2;Z++)if(A.type==="date"){if(!E.isDateTime(q[Z],A.calendar)){A[H]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var xe=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(xe-1e3),q[1]=A.l2r(xe+1e3);break}}else{if(!l(q[Z]))if(!(ae||he)&&l(q[1-Z]))q[Z]=q[1-Z]*(Z?10:.1);else{A[H]=ee;break}if(q[Z]<-s?q[Z]=-s:q[Z]>s&&(q[Z]=s),q[0]===q[1]){var we=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=we,q[1]+=we}}},A.setScale=function(H){var Y=x._size;if(A.overlaying){var q=S.getFromId({_fullLayout:x},A.overlaying);A.domain=q.domain}var Z=H&&A._r?"_r":"range",ee=A.calendar;A.cleanRange(Z);var ae=A.r2l(A[Z][0],ee),he=A.r2l(A[Z][1],ee),xe=I==="y";if(xe?(A._offset=Y.t+(1-A.domain[1])*Y.h,A._length=Y.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ae-he),A._b=-A._m*he):(A._offset=Y.l+A.domain[0]*Y.w,A._length=Y.w*(A.domain[1]-A.domain[0]),A._m=A._length/(he-ae),A._b=-A._m*ae),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var we,Me;if(A._rangebreaks=A.locateBreaks(Math.min(ae,he),Math.max(ae,he)),A._rangebreaks.length){for(we=0;wehe&&(Se=!Se),Se&&A._rangebreaks.reverse();var Ie=Se?-1:1;for(A._m2=Ie*A._length/(Math.abs(he-ae)-A._lBreaks),A._B.push(-A._m2*(xe?he:ae)),we=0;weee&&(ee+=7,aeee&&(ee+=24,ae=Z&&ae=Z&&H=Ye.min&&(leYe.max&&(Ye.max=Ae),Be=!1)}Be&&he.push({min:le,max:Ae})}};for(q=0;qw*2}function o(m){return Math.max(1,(m-1)/1e3)}function s(m,h){for(var v=m.length,g=o(v),i=0,w=0,S={},M=0;Mi*2}function c(m){return k(m[0])&&k(m[1])}}}),md=ze({"src/plots/cartesian/autorange.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=No().FP_SAFE,l=mi(),e=$i(),t=Xl(),n=t.getFromId,r=t.isLinked;V.exports={applyAutorangeOptions:A,getAutoRange:a,makePadFn:s,doAutoRange:v,findExtremes:g,concatExtremes:h};function a(x,z){var I,O,D=[],B=x._fullLayout,F=s(B,z,0),P=s(B,z,1),j=h(x,z),U=j.min,$=j.max;if(U.length===0||$.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=$[0].val;for(I=1;I0&&(we=Y-F(ee)-P(ae),we>q?Me/we>Z&&(he=ee,xe=ae,Z=Me/we):Me/Y>Z&&(he={val:ee.val,nopad:1},xe={val:ae.val,nopad:1},Z=Me/Y));function Se(_e,ce){return Math.max(_e,P(ce))}if(Q===re){var Ie=Q-1,Ve=Q+1;if(K)if(Q===0)D=[0,1];else{var Ge=(Q>0?$:U).reduce(Se,0),ke=Q/(1-Math.min(.5,Ge/Y));D=Q>0?[0,ke]:[ke,0]}else H?D=[Math.max(0,Ie),Math.max(1,Ve)]:D=[Ie,Ve]}else K?(he.val>=0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:0,nopad:1})):H&&(he.val-Z*F(he)<0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:1,nopad:1})),Z=(xe.val-he.val-o(z,ee.val,ae.val))/(Y-F(he)-P(xe)),D=[he.val-Z*F(he),xe.val+Z*P(xe)];return D=A(D,z),z.limitRange&&z.limitRange(),se&&D.reverse(),E.simpleMap(D,z.l2r||Number)}function o(x,z,I){var O=0;if(x.rangebreaks)for(var D=x.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((x._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ae=q(I.vpadplus||I.vpad),he=q(I.vpadminus||I.vpad);if(!U){if(H=1/0,Y=-1/0,j)for(Q=0;Q0&&(H=re),re>Y&&re-k&&(H=re),re>Y&&re=Me;Q--)we(Q);return{min:O,max:D,opts:I}}function i(x,z,I,O){S(x,z,I,O,C)}function w(x,z,I,O){S(x,z,I,O,_)}function S(x,z,I,O,D){for(var B=O.tozero,F=O.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else D(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(x.splice(j,1),j--)}if(P){var $=B&&z===0;x.push({val:z,pad:$?0:I,extrapad:$?!1:F})}}function M(x){return b(x)&&Math.abs(x)=z}function T(x,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(x,z.d2l(I.clipmin)):x}function f(x,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(x,z.d2l(I.clipmax)):x}function u(x,z,I){return z!==void 0&&I!==void 0?(z=x.d2l(z),I=x.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,O=j)}}return I=T(I,z),O=f(O,z),[I,O]}}}),Gi=ze({"src/plots/cartesian/axes.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=Cs(),n=qv(),r=Qn(),a=$i(),o=cf(),s=Xw(),c=hc(),m=No(),h=m.ONEMAXYEAR,v=m.ONEAVGYEAR,g=m.ONEMINYEAR,i=m.ONEMAXQUARTER,w=m.ONEAVGQUARTER,S=m.ONEMINQUARTER,M=m.ONEMAXMONTH,C=m.ONEAVGMONTH,_=m.ONEMINMONTH,T=m.ONEWEEK,f=m.ONEDAY,u=f/2,A=m.ONEHOUR,x=m.ONEMIN,z=m.ONESEC,I=m.ONEMILLI,O=m.ONEMICROSEC,D=m.MINUS_SIGN,B=m.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},$={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=dc(),ne=re.MID_SHIFT,se=re.CAP_SHIFT,G=re.LINE_SPACING,X=re.OPPOSITE_SIDE,K=3,H=V.exports={};H.setConvert=Dd();var Y=Xm(),q=Xl(),Z=q.idSort,ee=q.isLinked;H.id2name=q.id2name,H.name2id=q.name2id,H.cleanId=q.cleanId,H.list=q.list,H.listIds=q.listIds,H.getFromId=q.getFromId,H.getFromTrace=q.getFromTrace;var ae=md();H.getAutoRange=ae.getAutoRange,H.findExtremes=ae.findExtremes;var he=1e-4;function xe(lt){var rt=(lt[1]-lt[0])*he;return[lt[0]-rt,lt[1]+rt]}function we(lt,rt,fr){if(![fr,lt,rt].every(b)||fr===0)return lt;let lr=Math.round((lt-rt)/fr),Tr=rt+lr*fr;return lt!==Tr&&Math.abs(lt-Tr)xr+" domain")),kt=kt.concat(Ir||[]),ar.length>Dr?(l.warn("Array attribute "+jt+" has more entries than expected, truncating to "+Dr),ar=ar.slice(0,Dr)):ar.length2e-6||((fr-lt._forceTick0)/lt._minDtick%1+1.000001)%1>2e-6)&&(lt._minDtick=0))},H.saveRangeInitial=function(lt,rt){for(var fr=H.list(lt,"",!0),lr=!1,Tr=0;TrEr*.3||jt(lr)||jt(Tr))){var xr=fr.dtick/2;lt+=lt+xrDr){var ot=Number(fr.slice(1));Ir.exactYears>Dr&&ot%12===0?lt=H.tickIncrement(lt,"M6","reverse")+f*1.5:Ir.exactMonths>Dr?lt=H.tickIncrement(lt,"M1","reverse")+f*15.5:lt-=u;var kt=H.tickIncrement(lt,fr);if(kt<=lr)return kt}return lt}H.prepMinorTicks=function(lt,rt,fr){var lr,Tr;if(!((lr=rt.minor)!=null&&lr.dtick)){delete lt.dtick;var Ir=rt.dtick&&b(rt._tmin),Dr;if(Ir){var ot=H.tickIncrement(rt._tmin,rt.dtick,!0);Dr=[rt._tmin,ot*.99+rt._tmin*.01]}else{var kt=l.simpleMap(rt.range,rt.r2l);Dr=[kt[0],.8*kt[0]+.2*kt[1]]}if(lt.range=l.simpleMap(Dr,rt.l2r),lt._isMinor=!0,H.prepTicks(lt,fr),Ir){var jt=b(rt.dtick),ar=b(lt.dtick),Er=jt?rt.dtick:+rt.dtick.substring(1),xr=ar?lt.dtick:+lt.dtick.substring(1);jt&&ar?ke(Er,xr)?Er===2*T&&xr===2*f&&(lt.dtick=T):Er===2*T&&xr===3*f?lt.dtick=T:Er===T&&!(rt._input.minor||{}).nticks?lt.dtick=f:_e(Er/xr,2.5)?lt.dtick=Er/2:lt.dtick=Er:String(rt.dtick).charAt(0)==="M"?ar?lt.dtick="M1":ke(Er,xr)?Er>=12&&xr===2&&(lt.dtick="M3"):lt.dtick=rt.dtick:String(lt.dtick).charAt(0)==="L"?String(rt.dtick).charAt(0)==="L"?ke(Er,xr)||(lt.dtick=_e(Er/xr,2.5)?rt.dtick/2:rt.dtick):lt.dtick="D1":lt.dtick==="D2"&&+rt.dtick>1&&(lt.dtick=1)}lt.range=rt.range}((Tr=rt.minor)==null?void 0:Tr._tick0Init)===void 0&&(lt.tick0=rt.tick0)};function ke(lt,rt){return Math.abs((lt/rt+.5)%1-.5)<.001}function _e(lt,rt){return Math.abs(lt/rt-1)<.001}H.prepTicks=function(lt,rt){var fr=l.simpleMap(lt.range,lt.r2l,void 0,void 0,rt);if(lt.tickmode==="auto"||!lt.dtick){var lr=lt.nticks,Tr;lr||(lt.type==="category"||lt.type==="multicategory"?(Tr=lt.tickfont?l.bigFont(lt.tickfont.size||12):15,lr=lt._length/Tr):(Tr=lt._id.charAt(0)==="y"?40:80,lr=l.constrain(lt._length/Tr,4,9)+1),lt._name==="radialaxis"&&(lr*=2)),lt.minor&<.minor.tickmode!=="array"||lt.tickmode==="array"&&(lr*=100),lt._roughDTick=Math.abs(fr[1]-fr[0])/lr,H.autoTicks(lt,lt._roughDTick),lt._minDtick>0&<.dtick0?(Ir=lr-1,Dr=lr):(Ir=lr,Dr=lr);var ot=lt[Ir].value,kt=lt[Dr].value,jt=Math.abs(kt-ot),ar=fr||jt,Er=0;ar>=g?jt>=g&&jt<=h?Er=jt:Er=v:fr===w&&ar>=S?jt>=S&&jt<=i?Er=jt:Er=w:ar>=_?jt>=_&&jt<=M?Er=jt:Er=C:fr===T&&ar>=T?Er=T:ar>=f?Er=f:fr===u&&ar>=u?Er=u:fr===A&&ar>=A&&(Er=A);var xr;Er>=jt&&(Er=jt,xr=!0);var zr=Tr+Er;if(rt.rangebreaks&&Er>0){for(var Lr=84,aa=0,Sa=0;SaT&&(Er=jt)}(Er>0||lr===0)&&(lt[lr].periodX=Tr+Er/2)}}H.calcTicks=function(rt,fr){for(var lr=rt.type,Tr=rt.calendar,Ir=rt.ticklabelstep,Dr=rt.ticklabelmode==="period",ot=rt.range[0]>rt.range[1],kt=!rt.ticklabelindex||l.isArrayOrTypedArray(rt.ticklabelindex)?rt.ticklabelindex:[rt.ticklabelindex],jt=l.simpleMap(rt.range,rt.r2l,void 0,void 0,fr),ar=jt[1]=(ai?0:1);rn--){var Ri=!rn;rn?(rt._dtickInit=rt.dtick,rt._tick0Init=rt.tick0):ai&&(rt.minor._dtickInit=rt.minor.dtick,rt.minor._tick0Init=rt.minor.tick0);var Gn=rn?rt:l.extendFlat({},rt,ai?rt.minor:{minor:{}});if(Ri?H.prepMinorTicks(Gn,rt,fr):H.prepTicks(Gn,fr),Gn.tickmode==="array"){rn?(Sa=[],Lr=Xe(rt,!Ri)):(wa=[],aa=Xe(rt,!Ri));continue}if(Gn.tickmode==="sync"){Sa=[],Lr=Be(rt);continue}var no=xe(jt),Di=no[0],fn=no[1],Ai=b(Gn.dtick),jn=lr==="log"&&!(Ai||Gn.dtick.charAt(0)==="L"),Xn=H.tickFirst(Gn,fr);if(rn){if(rt._tmin=Xn,Xn=fn:gi<=fn;gi=H.tickIncrement(gi,oo,ar,Tr)){if(rn&&qi++,Gn.rangebreaks&&!ar){if(gi=xr)break}if(Sa.length>zr||gi===eo)break;eo=gi;var qn={value:we(gi,Vn,oo)};rn?(gi===Xn&&(qn.first=!0),jn&&gi!==(gi|0)&&(qn.simpleLabel=!0),Ir>1&&qi%Ir&&(qn.skipLabel=!0),Sa.push(qn)):(qn.minor=!0,wa.push(qn))}}if(!wa||wa.length<3)kt=!1;else{var Hi=(wa[2].value-wa[1].value)*(ot?-1:1);Oa(Hi,rt.tickformat)||(kt=!1,wa=wa.slice(1))}if(!kt)pn=Sa;else{var Mi=Sa.concat(wa);Dr&&Sa.length&&(Mi=Mi.slice(1)),Mi=Mi.sort(function(Bo,_o){return Bo.value-_o.value}).filter(function(Bo,_o,Pi){return _o===0||Bo.value!==Pi[_o-1].value});var Ro=Mi.map(function(Bo,_o){return Bo.minor===void 0&&!Bo.skipLabel?_o:null}).filter(function(Bo){return Bo!==null});Ro.forEach(function(Bo){kt.map(function(_o){var Pi=Bo+_o;Pi>=0&&Pi-1;pi--){if(Sa[pi].drop){Sa.splice(pi,1);continue}Sa[pi].value=on(Sa[pi].value,rt);var Ko=rt.c2p(Sa[pi].value);(Vi?Xi>Ko-Io:Xixr||yoxr&&(Pi.periodX=xr),yoTr&&LrTr&&Sav)rt/=v,lr=Tr(10),lt.dtick="M"+12*_r(rt,lr,Ye);else if(Ir>C)rt/=C,lt.dtick="M"+_r(rt,1,yt);else if(Ir>f){if(lt.dtick=_r(rt,f,lt._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!fr){var Dr=H.getTickFormat(lt),ot=lt.ticklabelmode==="period";ot&&(lt._rawTick0=lt.tick0),/%[uVW]/.test(Dr)?lt.tick0=l.dateTick0(lt.calendar,2):lt.tick0=l.dateTick0(lt.calendar,1),ot&&(lt._dowTick0=lt.tick0)}}else Ir>A?lt.dtick=_r(rt,A,yt):Ir>x?lt.dtick=_r(rt,x,gt):Ir>z?lt.dtick=_r(rt,z,gt):(lr=Tr(10),lt.dtick=_r(rt,lr,Ye))}else if(lt.type==="log"){lt.tick0=0;var kt=l.simpleMap(lt.range,lt.r2l);if(lt._isMinor&&(rt*=1.5),rt>.7)lt.dtick=Math.ceil(rt);else if(Math.abs(kt[1]-kt[0])<1){var jt=1.5*Math.abs((kt[1]-kt[0])/rt);rt=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/jt,lr=Tr(10),lt.dtick="L"+_r(rt,lr,Ye)}else lt.dtick=rt>.3?"D2":"D1"}else lt.type==="category"||lt.type==="multicategory"?(lt.tick0=0,lt.dtick=Math.ceil(Math.max(rt,1))):Yn(lt)?(lt.tick0=0,lr=1,lt.dtick=_r(rt,lr,rr)):(lt.tick0=0,lr=Tr(10),lt.dtick=_r(rt,lr,Ye));if(lt.dtick===0&&(lt.dtick=1),!b(lt.dtick)&&typeof lt.dtick!="string"){var ar=lt.dtick;throw lt.dtick=1,"ax.dtick error: "+String(ar)}};function Xt(lt){var rt=lt.dtick;if(lt._tickexponent=0,!b(rt)&&typeof rt!="string"&&(rt=1),(lt.type==="category"||lt.type==="multicategory")&&(lt._tickround=null),lt.type==="date"){var fr=lt.r2l(lt.tick0),lr=lt.l2r(fr).replace(/(^-|i)/g,""),Tr=lr.length;if(String(rt).charAt(0)==="M")Tr>10||lr.slice(5)!=="01-01"?lt._tickround="d":lt._tickround=+rt.slice(1)%12===0?"y":"m";else if(rt>=f&&Tr<=10||rt>=f*15)lt._tickround="d";else if(rt>=x&&Tr<=16||rt>=A)lt._tickround="M";else if(rt>=z&&Tr<=19||rt>=x)lt._tickround="S";else{var Ir=lt.l2r(fr+rt).replace(/^-/,"").length;lt._tickround=Math.max(Tr,Ir)-20,lt._tickround<0&&(lt._tickround=4)}}else if(b(rt)||rt.charAt(0)==="L"){var Dr=lt.range.map(lt.r2d||Number);b(rt)||(rt=Number(rt.slice(1))),lt._tickround=2-Math.floor(Math.log(rt)/Math.LN10+.01);var ot=Math.max(Math.abs(Dr[0]),Math.abs(Dr[1])),kt=Math.floor(Math.log(ot)/Math.LN10+.01),jt=lt.minexponent===void 0?3:lt.minexponent;Math.abs(kt)>jt&&(Mt(lt.exponentformat)&<.exponentformat!=="SI extended"&&!pt(kt)||Mt(lt.exponentformat)&<.exponentformat==="SI extended"&&!Pt(kt)?lt._tickexponent=3*Math.round((kt-1)/3):lt._tickexponent=kt)}else lt._tickround=null}H.tickIncrement=function(lt,rt,fr,lr){var Tr=fr?-1:1;if(b(rt))return l.increment(lt,Tr*rt);var Ir=rt.charAt(0),Dr=Tr*Number(rt.slice(1));if(Ir==="M")return l.incrementMonth(lt,Dr,lr);if(Ir==="L")return Math.log(Math.pow(10,lt)+Dr)/Math.LN10;if(Ir==="D"){var ot=rt==="D2"?$t:At,kt=lt+Tr*.01,jt=l.roundUp(l.mod(kt,1),ot,fr);return Math.floor(kt)+Math.log(p.round(Math.pow(10,jt),1))/Math.LN10}throw"unrecognized dtick "+String(rt)},H.tickFirst=function(lt,rt){var fr=lt.r2l||Number,lr=l.simpleMap(lt.range,fr,void 0,void 0,rt),Tr=lr[1]=0&&ai<=lt._length?tn:null};if(kt&&l.isArrayOrTypedArray(lt.ticktext)){var Lr=l.simpleMap(lt.range,lt.r2l),aa=(Math.abs(Lr[1]-Lr[0])-(lt._lBreaks||0))/1e4;for(xr=0;xr"+ot;else{var jt=en(lt),ar=lt._trueSide||lt.side;(!jt&&ar==="top"||jt&&ar==="bottom")&&(Dr+="
")}rt.text=Dr}function vt(lt,rt,fr,lr,Tr){var Ir=lt.dtick,Dr=rt.x,ot=lt.tickformat,kt=typeof Ir=="string"&&Ir.charAt(0);if(Tr==="never"&&(Tr=""),lr&&kt!=="L"&&(Ir="L3",kt="L"),ot||kt==="L")rt.text=qt(Math.pow(10,Dr),lt,Tr,lr);else if(b(Ir)||kt==="D"&&(lt.minorloglabels==="complete"||l.mod(Dr+.01,1)<.1)){var jt;lt.minorloglabels==="complete"&&!(l.mod(Dr+.01,1)<.1)&&(jt=!0,rt.fontSize*=.75);var ar=Math.pow(10,Dr).toExponential(0),Er=ar.split("e"),xr=+Er[1],zr=Math.abs(xr),Lr=lt.exponentformat;Lr==="power"||Mt(Lr)&&Lr!=="SI extended"&&pt(xr)||Mt(Lr)&&Lr==="SI extended"&&Pt(xr)?(rt.text=Er[0],zr>0&&(rt.text+="x10"),rt.text==="1x10"&&(rt.text="10"),xr!==0&&xr!==1&&(rt.text+=""+(xr>0?"":D)+zr+""),rt.fontSize*=1.25):(Lr==="e"||Lr==="E")&&zr>2?rt.text=Er[0]+Lr+(xr>0?"+":D)+zr:(rt.text=qt(Math.pow(10,Dr),lt,"","fakehover"),Ir==="D1"&<._id.charAt(0)==="y"&&(rt.dy-=rt.fontSize/6))}else if(kt==="D")rt.text=lt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Dr,1)))),rt.fontSize*=.75;else throw"unrecognized dtick "+String(Ir);if(lt.dtick==="D1"){var aa=String(rt.text).charAt(0);(aa==="0"||aa==="1")&&(lt._id.charAt(0)==="y"?rt.dx-=rt.fontSize/4:(rt.dy+=rt.fontSize/2,rt.dx+=(lt.range[1]>lt.range[0]?1:-1)*rt.fontSize*(Dr<0?.5:.25)))}}function ht(lt,rt){var fr=lt._categories[Math.round(rt.x)];fr===void 0&&(fr=""),rt.text=String(fr)}function De(lt,rt,fr){var lr=Math.round(rt.x),Tr=lt._categories[lr]||[],Ir=Tr[1]===void 0?"":String(Tr[1]),Dr=Tr[0]===void 0?"":String(Tr[0]);fr?rt.text=Dr+" - "+Ir:(rt.text=Ir,rt.text2=Dr)}function Ne(lt,rt,fr,lr,Tr){Tr==="never"?Tr="":lt.showexponent==="all"&&Math.abs(rt.x/lt.dtick)<1e-6&&(Tr="hide"),rt.text=qt(rt.x,lt,Tr,lr)}function We(lt,rt,fr,lr,Tr){if(lt.thetaunit==="radians"&&!fr){var Ir=rt.x/180;if(Ir===0)rt.text="0";else{var Dr=Ke(Ir);if(Dr[1]>=100)rt.text=qt(l.deg2rad(rt.x),lt,Tr,lr);else{var ot=rt.x<0;Dr[1]===1?Dr[0]===1?rt.text="\u03C0":rt.text=Dr[0]+"\u03C0":rt.text=["",Dr[0],"","\u2044","",Dr[1],"","\u03C0"].join(""),ot&&(rt.text=D+rt.text)}}}else rt.text=qt(rt.x,lt,Tr,lr)}function Ke(lt){function rt(ot,kt){return Math.abs(ot-kt)<=1e-6}function fr(ot,kt){return rt(kt,0)?ot:fr(kt,ot%kt)}function lr(ot){for(var kt=1;!rt(Math.round(ot*kt)/kt,ot);)kt*=10;return kt}var Tr=lr(lt),Ir=lt*Tr,Dr=Math.abs(fr(Ir,Tr));return[Math.round(Ir/Dr),Math.round(Tr/Dr)]}var Je=["f","p","n","\u03BC","m","","k","M","G","T"],et=["q","r","y","z","a",...Je,"P","E","Z","Y","R","Q"],Mt=lt=>["SI","SI extended","B"].includes(lt);function pt(lt){return lt>14||lt<-15}function Pt(lt){return lt>32||lt<-30}function Ct(lt,rt){return Mt(rt)?!!(rt==="SI extended"&&Pt(lt)||rt!=="SI extended"&&pt(lt)):!1}function qt(lt,rt,fr,lr){var Tr=lt<0,Ir=rt._tickround,Dr=fr||rt.exponentformat||"B",ot=rt._tickexponent,kt=H.getTickFormat(rt),jt=rt.separatethousands;if(lr){var ar={exponentformat:Dr,minexponent:rt.minexponent,dtick:rt.showexponent==="none"?rt.dtick:b(lt)&&Math.abs(lt)||1,range:rt.showexponent==="none"?rt.range.map(rt.r2d):[0,lt||1]};Xt(ar),Ir=(Number(ar._tickround)||0)+4,ot=ar._tickexponent,rt.hoverformat&&(kt=rt.hoverformat)}if(kt)return rt._numFormat(kt)(lt).replace(/-/g,D);Dr==="none"&&(ot=0),lt=Math.abs(lt);let Er=Math.pow(10,-Ir)/2;if(lt"+xr+"":Dr==="B"&&ot===9?lt+="B":Mt(Dr)&&(lt+=Dr==="SI extended"?et[ot/3+10]:Je[ot/3+5])}return Tr?D+lt:lt}H.getTickFormat=function(lt){var rt;function fr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function lr(kt,jt){var ar=["L","D"];if(typeof kt==typeof jt){if(typeof kt=="number")return kt-jt;var Er=ar.indexOf(kt.charAt(0)),xr=ar.indexOf(jt.charAt(0));return Er===xr?Number(kt.replace(/(L|D)/g,""))-Number(jt.replace(/(L|D)/g,"")):Er-xr}else return typeof kt=="number"?1:-1}function Tr(kt,jt,ar){var Er=ar||function(Lr){return Lr},xr=jt[0],zr=jt[1];return(!xr&&typeof xr!="number"||Er(xr)<=Er(kt))&&(!zr&&typeof zr!="number"||Er(zr)>=Er(kt))}function Ir(kt,jt){var ar=jt[0]===null,Er=jt[1]===null,xr=lr(kt,jt[0])>=0,zr=lr(kt,jt[1])<=0;return(ar||xr)&&(Er||zr)}var Dr,ot;if(lt.tickformatstops&<.tickformatstops.length>0)switch(lt.type){case"date":case"linear":{for(rt=0;rt=0&&Tr.unshift(Tr.splice(ar,1).shift())}});var ot={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var jt=H.getFromId(lt,kt);fr||(fr={}),fr.axShifts=ot,fr.overlayingShiftedAx=Dr;var ar=H.drawOne(lt,jt,fr);return jt._shiftPusher&&Yi(jt,jt._fullDepth||0,ot,!0),jt._r=jt.range.slice(),jt._rl=l.simpleMap(jt._r,jt.r2l),ar}}}))},H.drawOne=function(lt,rt,fr){fr=fr||{};var lr=fr.axShifts||{},Tr=fr.overlayingShiftedAx||[],Ir,Dr,ot;rt.setScale();var kt=lt._fullLayout,jt=rt._id,ar=jt.charAt(0),Er=H.counterLetter(jt),xr=kt._plots[rt._mainSubplot],zr=rt.zerolinelayer==="above traces";if(!xr)return;if(rt._shiftPusher=rt.autoshift||Tr.indexOf(rt._id)!==-1||Tr.indexOf(rt.overlaying)!==-1,rt._shiftPusher&rt.anchor==="free"){var Lr=rt.linewidth/2||0;rt.ticks==="inside"&&(Lr+=rt.ticklen),Yi(rt,Lr,lr,!0),Yi(rt,rt.shift||0,lr,!1)}(fr.skipTitle!==!0||rt._shift===void 0)&&(rt._shift=Ja(rt,lr));var aa=xr[ar+"axislayer"],Sa=rt._mainLinePosition,wa=Sa+=rt._shift,pn=rt._mainMirrorPosition,tn=rt._vals=H.calcTicks(rt),ai=[rt.mirror,wa,pn].join("_");for(Ir=0;Ir0?_o.bottom-Ts:0,Bo))));var Dl=0,hl=0;if(rt._shiftPusher&&(Dl=Math.max(Bo,_o.height>0?Vo==="l"?Ts-_o.left:_o.right-Ts:0),rt.title.text!==kt._dfltTitle[ar]&&(hl=(rt._titleStandoff||0)+(rt._titleScoot||0),Vo==="l"&&(hl+=Rr(rt))),rt._fullDepth=Math.max(Dl,hl)),rt.automargin){Pi={x:0,y:0,r:0,l:0,t:0,b:0};var ps=[0,1],dl=typeof rt._shift=="number"?rt._shift:0;if(ar==="x"){if(Vo==="b"?Pi[Vo]=rt._depth:(Pi[Vo]=rt._depth=Math.max(_o.width>0?Ts-_o.top:0,Bo),ps.reverse()),_o.width>0){var wu=_o.right-(rt._offset+rt._length);wu>0&&(Pi.xr=1,Pi.r=wu);var lu=rt._offset-_o.left;lu>0&&(Pi.xl=0,Pi.l=lu)}}else if(Vo==="l"?(rt._depth=Math.max(_o.height>0?Ts-_o.left:0,Bo),Pi[Vo]=rt._depth-dl):(rt._depth=Math.max(_o.height>0?_o.right-Ts:0,Bo),Pi[Vo]=rt._depth+dl,ps.reverse()),_o.height>0){var xc=_o.bottom-(rt._offset+rt._length);xc>0&&(Pi.yb=0,Pi.b=xc);var Fl=rt._offset-_o.top;Fl>0&&(Pi.yt=1,Pi.t=Fl)}Pi[Er]=rt.anchor==="free"?rt.position:rt._anchorAxis.domain[ps[0]],rt.title.text!==kt._dfltTitle[ar]&&(Pi[Vo]+=Rr(rt)+(rt.title.standoff||0)),rt.mirror&&rt.anchor!=="free"&&(yo={x:0,y:0,r:0,l:0,t:0,b:0},yo[Vs]=rt.linewidth,rt.mirror&&rt.mirror!==!0&&(yo[Vs]+=Bo),rt.mirror===!0||rt.mirror==="ticks"?yo[Er]=rt._anchorAxis.domain[ps[1]]:(rt.mirror==="all"||rt.mirror==="allticks")&&(yo[Er]=[rt._counterDomainMin,rt._counterDomainMax][ps[1]]))}Ss&&(bs=k.getComponentMethod("rangeslider","autoMarginOpts")(lt,rt)),typeof rt.automargin=="string"&&(Vt(Pi,rt.automargin),Vt(yo,rt.automargin)),E.autoMargin(lt,un(rt),Pi),E.autoMargin(lt,Xa(rt),yo),E.autoMargin(lt,ja(rt),bs)}),l.syncOrAsync(Uo)}};function Vt(lt,rt){if(lt){var fr=Object.keys(Q).reduce(function(lr,Tr){return rt.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Ir){lr[Ir]=1}),lr},{});Object.keys(lt).forEach(function(lr){fr[lr]||(lr.length===1?lt[lr]=0:delete lt[lr])})}}function Ht(lt,rt){var fr=[],lr,Tr=function(Ir,Dr){var ot=Ir.xbnd[Dr];ot!==null&&fr.push(l.extendFlat({},Ir,{x:ot}))};if(rt.length){for(lr=0;lrlt.range[1],ot=lt.ticklabelposition&<.ticklabelposition.indexOf("inside")!==-1,kt=!ot;if(fr){var jt=Dr?-1:1;fr=fr*jt}if(lr){var ar=lt.side,Er=ot&&(ar==="top"||ar==="left")||kt&&(ar==="bottom"||ar==="right")?1:-1;lr=lr*Er}return lt._id.charAt(0)==="x"?function(xr){return e(Tr+lt._offset+lt.l2p(Rt(xr))+fr,Ir+lr)}:function(xr){return e(Ir+lr,Tr+lt._offset+lt.l2p(Rt(xr))+fr)}};function Rt(lt){return lt.periodX!==void 0?lt.periodX:lt.x}function nr(lt){var rt=lt.ticklabelposition||"",fr=lt.tickson||"",lr=function(Lr){return rt.indexOf(Lr)!==-1},Tr=lr("top"),Ir=lr("left"),Dr=lr("right"),ot=lr("bottom"),kt=lr("inside"),jt=fr!=="boundaries"&&(ot||Ir||Tr||Dr);if(!jt&&!kt)return[0,0];var ar=lt.side,Er=jt?(lt.tickwidth||0)/2:0,xr=K,zr=lt.tickfont?lt.tickfont.size:12;return(ot||Tr)&&(Er+=zr*se,xr+=(lt.linewidth||0)/2),(Ir||Dr)&&(Er+=(lt.linewidth||0)/2,xr+=K),kt&&ar==="top"&&(xr-=zr*(1-se)),(Ir||Tr)&&(Er=-Er),(ar==="bottom"||ar==="right")&&(xr=-xr),[jt?Er:0,kt?xr:0]}H.makeTickPath=function(lt,rt,fr,lr){lr||(lr={});var Tr=lr.minor;if(Tr&&!lt.minor)return"";var Ir=lr.len!==void 0?lr.len:Tr?lt.minor.ticklen:lt.ticklen,Dr=lt._id.charAt(0),ot=(lt.linewidth||1)/2;return Dr==="x"?"M0,"+(rt+ot*fr)+"v"+Ir*fr:"M"+(rt+ot*fr)+",0h"+Ir*fr},H.makeLabelFns=function(lt,rt,fr){var lr=lt.ticklabelposition||"",Tr=lt.tickson||"",Ir=function(Xn){return lr.indexOf(Xn)!==-1},Dr=Ir("top"),ot=Ir("left"),kt=Ir("right"),jt=Ir("bottom"),ar=Tr!=="boundaries"&&(jt||ot||Dr||kt),Er=Ir("inside"),xr=lr==="inside"&<.ticks==="inside"||!Er&<.ticks==="outside"&&Tr!=="boundaries",zr=0,Lr=0,aa=xr?lt.ticklen:0;if(Er?aa*=-1:ar&&(aa=0),xr&&(zr+=aa,fr)){var Sa=l.deg2rad(fr);zr=aa*Math.cos(Sa)+1,Lr=aa*Math.sin(Sa)}lt.showticklabels&&(xr||lt.showline)&&(zr+=.2*lt.tickfont.size),zr+=(lt.linewidth||1)/2*(Er?-1:1);var wa={labelStandoff:zr,labelShift:Lr},pn,tn,ai,rn,Ri=0,Gn=lt.side,no=lt._id.charAt(0),Di=lt.tickangle,fn;if(no==="x")fn=!Er&&Gn==="bottom"||Er&&Gn==="top",rn=fn?1:-1,Er&&(rn*=-1),pn=Lr*rn,tn=rt+zr*rn,ai=fn?1:-.2,Math.abs(Di)===90&&(Er?ai+=ne:Di===-90&&Gn==="bottom"?ai=se:Di===90&&Gn==="top"?ai=ne:ai=.5,Ri=ne/2*(Di/90)),wa.xFn=function(Xn){return Xn.dx+pn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ai},wa.anchorFn=function(Xn,eo){if(ar){if(ot)return"end";if(kt)return"start"}return!b(eo)||eo===0||eo===180?"middle":eo*rn<0!==Er?"end":"start"},wa.heightFn=function(Xn,eo,gi){return eo<-60||eo>60?-.5*gi:lt.side==="top"!==Er?-gi:0};else if(no==="y"){if(fn=!Er&&Gn==="left"||Er&&Gn==="right",rn=fn?1:-1,Er&&(rn*=-1),pn=zr,tn=Lr*rn,ai=0,!Er&&Math.abs(Di)===90&&(Di===-90&&Gn==="left"||Di===90&&Gn==="right"?ai=se:ai=.5),Er){var Ai=b(Di)?+Di:0;if(Ai!==0){var jn=l.deg2rad(Ai);Ri=Math.abs(Math.sin(jn))*se*rn,ai=0}}wa.xFn=function(Xn){return Xn.dx+rt-(pn+Xn.fontSize*ai)*rn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ne},wa.anchorFn=function(Xn,eo){return b(eo)&&Math.abs(eo)===90?"middle":fn?"end":"start"},wa.heightFn=function(Xn,eo,gi){return lt.side==="right"&&(eo*=-1),eo<-30?-gi:eo<30?-.5*gi:0}}return wa};function ur(lt){return[lt.text,lt.x,lt.axInfo,lt.font,lt.fontSize,lt.fontColor].join("_")}H.drawTicks=function(lt,rt,fr){fr=fr||{};var lr=rt._id+"tick",Tr=[].concat(rt.minor&&rt.minor.ticks?fr.vals.filter(function(Dr){return Dr.minor&&!Dr.noTick}):[]).concat(rt.ticks?fr.vals.filter(function(Dr){return!Dr.minor&&!Dr.noTick}):[]),Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("ticks",1).classed("crisp",fr.crisp!==!1).each(function(Dr){return r.stroke(p.select(this),Dr.minor?rt.minor.tickcolor:rt.tickcolor)}).style("stroke-width",function(Dr){return a.crispRound(lt,Dr.minor?rt.minor.tickwidth:rt.tickwidth,1)+"px"}).attr("d",fr.path).style("display",null),vi(rt,[U]),Ir.attr("transform",fr.transFn)},H.drawGrid=function(lt,rt,fr){if(fr=fr||{},rt.tickmode!=="sync"){var lr=rt._id+"grid",Tr=rt.minor&&rt.minor.showgrid,Ir=Tr?fr.vals.filter(function(wa){return wa.minor}):[],Dr=rt.showgrid?fr.vals.filter(function(wa){return!wa.minor}):[],ot=fr.counterAxis;if(ot&&H.shouldShowZeroLine(lt,rt,ot))for(var kt=rt.tickmode==="array",jt=0;jt=0;Lr--){var aa=Lr?xr:zr;if(aa){var Sa=aa.selectAll("path."+lr).data(Lr?Dr:Ir,ur);Sa.exit().remove(),Sa.enter().append("path").classed(lr,1).classed("crisp",fr.crisp!==!1),Sa.attr("transform",fr.transFn).attr("d",fr.path).each(function(wa){return r.stroke(p.select(this),wa.minor?rt.minor.gridcolor:rt.gridcolor||"#ddd")}).style("stroke-dasharray",function(wa){return a.dashStyle(wa.minor?rt.minor.griddash:rt.griddash,wa.minor?rt.minor.gridwidth:rt.gridwidth)}).style("stroke-width",function(wa){return(wa.minor?Er:rt._gw)+"px"}).style("display",null),typeof fr.path=="function"&&Sa.attr("d",fr.path)}}vi(rt,[P,j])}},H.drawZeroLine=function(lt,rt,fr){fr=fr||fr;var lr=rt._id+"zl",Tr=H.shouldShowZeroLine(lt,rt,fr.counterAxis),Ir=fr.layer.selectAll("path."+lr).data(Tr?[{x:0,id:rt._id}]:[]);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("zl",1).classed("crisp",fr.crisp!==!1).each(function(){fr.layer.selectAll("path").sort(function(Dr,ot){return Z(Dr.id,ot.id)})}),Ir.attr("transform",fr.transFn).attr("d",fr.path).call(r.stroke,rt.zerolinecolor||r.defaultLine).style("stroke-width",a.crispRound(lt,rt.zerolinewidth,rt._gw||1)+"px").style("display",null),vi(rt,[F])},H.drawLabels=function(lt,rt,fr){fr=fr||{};var lr=lt._fullLayout,Tr=rt._id,Ir=rt.zerolinelayer==="above traces",Dr=fr.cls||Tr+"tick",ot=fr.vals.filter(function(Vn){return Vn.text}),kt=fr.labelFns,jt=fr.secondary?0:rt.tickangle,ar=(rt._prevTickAngles||{})[Dr],Er=fr.layer.selectAll("g."+Dr).data(rt.showticklabels?ot:[],ur),xr=[];Er.enter().append("g").classed(Dr,1).append("text").attr("text-anchor","middle").each(function(Vn){var qn=p.select(this),Hi=lt._promises.length;qn.call(t.positionText,kt.xFn(Vn),kt.yFn(Vn)).call(a.font,{family:Vn.font,size:Vn.fontSize,color:Vn.fontColor,weight:Vn.fontWeight,style:Vn.fontStyle,variant:Vn.fontVariant,textcase:Vn.fontTextcase,lineposition:Vn.fontLineposition,shadow:Vn.fontShadow}).text(Vn.text).call(t.convertToTspans,lt),lt._promises[Hi]?xr.push(lt._promises.pop().then(function(){zr(qn,jt)})):zr(qn,jt)}),vi(rt,[$]),Er.exit().remove(),fr.repositionOnUpdate&&Er.each(function(Vn){p.select(this).select("text").call(t.positionText,kt.xFn(Vn),kt.yFn(Vn))});function zr(Vn,qn){Vn.each(function(Hi){var Mi=p.select(this),Ro=Mi.select(".text-math-group"),go=kt.anchorFn(Hi,qn),Eo=fr.transFn.call(Mi.node(),Hi)+(b(qn)&&+qn!=0?" rotate("+qn+","+kt.xFn(Hi)+","+(kt.yFn(Hi)-Hi.fontSize/2)+")":""),Ao=t.lineCount(Mi),ds=G*Hi.fontSize,jo=kt.heightFn(Hi,b(qn)?+qn:0,(Ao-1)*ds);if(jo&&(Eo+=e(0,jo)),Ro.empty()){var Wo=Mi.select("text");Wo.attr({transform:Eo,"text-anchor":go}),Wo.style("display",null),rt._adjustTickLabelsOverflow&&rt._adjustTickLabelsOverflow()}else{var to=a.bBox(Ro.node()).width,wo=to*{end:-.5,start:.5}[go];Ro.attr("transform",Eo+e(wo,0))}})}rt._adjustTickLabelsOverflow=function(){var Vn=rt.ticklabeloverflow;if(!(!Vn||Vn==="allow")){var qn=Vn.indexOf("hide")!==-1,Hi=rt._id.charAt(0)==="x",Mi=0,Ro=Hi?lt._fullLayout.width:lt._fullLayout.height;if(Vn.indexOf("domain")!==-1){var go=l.simpleMap(rt.range,rt.r2l);Mi=rt.l2p(go[0])+rt._offset,Ro=rt.l2p(go[1])+rt._offset}var Eo=Math.min(Mi,Ro),Ao=Math.max(Mi,Ro),ds=rt.side,jo=1/0,Wo=-1/0;Er.each(function(Vi){var Io=p.select(this),Xi=Io.select(".text-math-group");if(Xi.empty()){var Ko=a.bBox(Io.node()),Uo=0;Hi?(Ko.right>Ao||Ko.leftAo||Ko.top+(rt.tickangle?0:Vi.fontSize/4)rt["_visibleLabelMin_"+go._id]?Io.style("display","none"):Ao.K==="tick"&&!Eo&&Io.node().style.display!=="none"&&Io.style("display",null)})})})})},zr(Er,ar+1?ar:jt);function Lr(){return xr.length&&Promise.all(xr)}var aa=null;function Sa(){if(zr(Er,jt),ot.length&&rt.autotickangles&&(rt.type!=="log"||String(rt.dtick).charAt(0)!=="D")){aa=rt.autotickangles[0];var Vn=0,qn=[],Hi,Mi=1;Er.each(function(Pi){Vn=Math.max(Vn,Pi.fontSize);var yo=rt.l2p(Pi.x),bs=La(this),Dl=a.bBox(bs.node());Mi=Math.max(Mi,t.lineCount(bs)),qn.push({top:0,bottom:10,height:10,left:yo-Dl.width/2,right:yo+Dl.width/2+2,width:Dl.width+2})});var Ro=(rt.tickson==="boundaries"||rt.showdividers)&&!fr.secondary,go=ot.length,Eo=Math.abs((ot[go-1].x-ot[0].x)*rt._m)/(go-1),Ao=Ro?Eo/2:Eo,ds=Ro?rt.ticklen:Vn*1.25*Mi,jo=Math.sqrt(Math.pow(Ao,2)+Math.pow(ds,2)),Wo=Ao/jo,to=rt.autotickangles.map(function(Pi){return Pi*Math.PI/180}),wo=to.find(function(Pi){return Math.abs(Math.cos(Pi))<=Wo});wo===void 0&&(wo=to.reduce(function(Pi,yo){return Math.abs(Math.cos(Pi))qi*gi&&(jn=gi,Di[no]=fn[no]=Xn[no])}var io=Math.abs(jn-Ai);io-rn>0?(io-=rn,rn*=1+rn/io):rn=0,rt._id.charAt(0)!=="y"&&(rn=-rn),Di[Gn]=tn.p2r(tn.r2p(fn[Gn])+Ri*rn),tn.autorange==="min"||tn.autorange==="max reversed"?(Di[0]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0):(tn.autorange==="max"||tn.autorange==="min reversed")&&(Di[1]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0),lr._insideTickLabelsUpdaterange[tn._name+".range"]=Di}var oo=l.syncOrAsync(wa);return oo&&oo.then&<._promises.push(oo),oo};function cr(lt,rt,fr){var lr=rt._id+"divider",Tr=fr.vals,Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().insert("path",":first-child").classed(lr,1).classed("crisp",1).call(r.stroke,rt.dividercolor).style("stroke-width",a.crispRound(lt,rt.dividerwidth,1)+"px"),Ir.attr("transform",fr.transFn).attr("d",fr.path)}H.getPxPosition=function(lt,rt){var fr=lt._fullLayout._size,lr=rt._id.charAt(0),Tr=rt.side,Ir;if(rt.anchor!=="free"?Ir=rt._anchorAxis:lr==="x"?Ir={_offset:fr.t+(1-(rt.position||0))*fr.h,_length:0}:lr==="y"&&(Ir={_offset:fr.l+(rt.position||0)*fr.w+rt._shift,_length:0}),Tr==="top"||Tr==="left")return Ir._offset;if(Tr==="bottom"||Tr==="right")return Ir._offset+Ir._length};function Rr(lt){var rt=lt.title.font.size,fr=(lt.title.text.match(t.BR_TAG_ALL)||[]).length;return lt.title.hasOwnProperty("standoff")?rt*(se+fr*G):fr?rt*(fr+1)*G:rt}function Qr(lt,rt){var fr=lt._fullLayout,lr=rt._id,Tr=lr.charAt(0),Ir=rt.title.font.size,Dr,ot=(rt.title.text.match(t.BR_TAG_ALL)||[]).length;if(rt.title.hasOwnProperty("standoff"))rt.side==="bottom"||rt.side==="right"?Dr=rt._depth+rt.title.standoff+Ir*se:(rt.side==="top"||rt.side==="left")&&(Dr=rt._depth+rt.title.standoff+Ir*(ne+ot*G));else{var kt=en(rt);if(rt.type==="multicategory")Dr=rt._depth;else{var jt=1.5*Ir;kt&&(jt=.5*Ir,rt.ticks==="outside"&&(jt+=rt.ticklen)),Dr=10+jt+(rt.linewidth?rt.linewidth-1:0)}kt||(Tr==="x"?Dr+=rt.side==="top"?Ir*(rt.showticklabels?1:0):Ir*(rt.showticklabels?1.5:.5):Dr+=rt.side==="right"?Ir*(rt.showticklabels?1:.5):Ir*(rt.showticklabels?.5:0))}var ar=H.getPxPosition(lt,rt),Er,xr,zr;Tr==="x"?(xr=rt._offset+rt._length/2,zr=rt.side==="top"?ar-Dr:ar+Dr):(zr=rt._offset+rt._length/2,xr=rt.side==="right"?ar+Dr:ar-Dr,Er={rotate:"-90",offset:0});var Lr;if(rt.type!=="multicategory"){var aa=rt._selections[rt._id+"tick"];if(Lr={selection:aa,side:rt.side},aa&&aa.node()&&aa.node().parentNode){var Sa=a.getTranslate(aa.node().parentNode);Lr.offsetLeft=Sa.x,Lr.offsetTop=Sa.y}rt.title.hasOwnProperty("standoff")&&(Lr.pad=0)}return rt._titleStandoff=Dr,n.draw(lt,lr+"title",{propContainer:rt,propName:rt._name+".title.text",placeholder:fr._dfltTitle[Tr],avoid:Lr,transform:Er,attributes:{x:xr,y:zr,"text-anchor":"middle"}})}H.shouldShowZeroLine=function(lt,rt,fr){var lr=l.simpleMap(rt.range,rt.r2l);return lr[0]*lr[1]<=0&&rt.zeroline&&(rt.type==="linear"||rt.type==="-")&&!(rt.rangebreaks&&rt.maskBreaks(0)===B)&&(Zr(rt,0)||!ha(lt,rt,fr,lr)||Pa(lt,rt))},H.clipEnds=function(lt,rt){return rt.filter(function(fr){return Zr(lt,fr.x)})};function Zr(lt,rt){var fr=lt.l2p(rt);return fr>1&&fr1)for(Tr=1;Tr=Tr.min&<=O:/%L/.test(rt)?lt>=I:/%[SX]/.test(rt)?lt>=z:/%M/.test(rt)?lt>=x:/%[HI]/.test(rt)?lt>=A:/%p/.test(rt)?lt>=u:/%[Aadejuwx]/.test(rt)?lt>=f:/%[UVW]/.test(rt)?lt>=T:/%[Bbm]/.test(rt)?lt>=_:/%[q]/.test(rt)?lt>=S:/%[Yy]/.test(rt)?lt>=g:!0}}}),Jw=ze({"src/plots/cartesian/autorange_options_defaults.js"(J,V){"use strict";V.exports=function(b,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var n=b("autorangeoptions.minallowed",e===null?l:void 0),r=b("autorangeoptions.maxallowed",l===null?e:void 0);n===void 0&&b("autorangeoptions.clipmin"),r===void 0&&b("autorangeoptions.clipmax"),b("autorangeoptions.include")}}}),Qw=ze({"src/plots/cartesian/range_defaults.js"(J,V){"use strict";var p=Jw();V.exports=function(E,k,l,e){var t=k._template||{},n=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var a;!e.noInsiderange&&n!=="log"&&(a=l("insiderange"),a&&(a[0]===null||a[1]===null)&&(k.insiderange=!1,a=void 0),a&&(r=l("range",a)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(p(l,s,r),(n==="linear"||n==="-")&&l("rangemode")),k.cleanRange()}}}),VI=ze({"node_modules/mouse-event-offset/index.js"(J,V){var p={left:0,top:0};V.exports=b;function b(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,n=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=n-r.top,e}function E(k){return k===window||k===document||k===document.body?p:k.getBoundingClientRect()}}}),Rx=ze({"node_modules/has-passive-events/index.js"(J,V){"use strict";var p=Vw();function b(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}V.exports=p&&b()}}),GI=ze({"src/components/dragelement/align.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=(b-k)/(l-k),n=t+E/(l-k),r=(t+n)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?n:t<2/3-r?t:n>4/3-r?n:r}}}),HI=ze({"src/components/dragelement/cursor.js"(J,V){"use strict";var p=Nr(),b=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=p.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=p.constrain(Math.floor(l*3),0,2),b[l][k]}}}),WI=ze({"src/components/dragelement/unhover.js"(J,V){"use strict";var p=Hm(),b=Cx(),E=i1().getGraphDiv,k=a1(),l=V.exports={};l.wrapped=function(e,t,n){var r;e=E(e),e._fullLayout&&b.clear(e._fullLayout._uid+k.HOVERID);let a=e._hoverdata;l.raw(e,t,n)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!a&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,n){var r=t._fullLayout,a=t._hoverdata;return n||(n={}),n.target&&!t._dragged&&p.triggerHandler(t,"plotly_beforehover",n)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,n.target&&a&&t.emit("plotly_unhover",{event:n,points:a}),!0)}}}),_h=ze({"src/components/dragelement/index.js"(J,V){"use strict";var p=VI(),b=Gw(),E=Rx(),k=Nr().removeElement,l=hc(),e=V.exports={};e.align=GI(),e.getCursor=HI();var t=WI();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,m=s._context.doubleClickDelay,h=o.element,v,g,i,w,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),h.style.pointerEvents="all",h.onmousedown=u,E?(h._ontouchstart&&h.removeEventListener("touchstart",h._ontouchstart),h._ontouchstart=u,h.addEventListener("touchstart",u,{passive:!1})):h.ontouchstart=u;function T(z,I,O){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=v,z.clientY=g),i=new Date().getTime(),i-s._mouseDownTimem&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(O=>{var D=M[O];!I[O]&&typeof D!="function"&&(I[O]=D)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function n(){var a=document.createElement("div");a.className="dragcover";var o=a.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(a),a}e.coverSlip=n;function r(a){return p(a.changedTouches?a.changedTouches[0]:a,document.body)}}}),gd=ze({"src/lib/setcursor.js"(J,V){"use strict";V.exports=function(b,E){(b.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&b.classed(k,!1)}),E&&b.classed("cursor-"+E,!0)}}}),YI=ze({"src/lib/override_cursor.js"(J,V){"use strict";var p=gd(),b="data-savedcursor",E="!!";V.exports=function(l,e){var t=l.attr(b);if(e){if(!t){for(var n=(l.attr("class")||"").split(" "),r=0;rX.legend.length)for(var Y=X.legend.length;Y(r==="legend"?1:0));if(O===!1&&(o[r]=void 0),!(O===!1&&!m.uirevision)&&(v("uirevision",o.uirevision),O!==!1)){v("borderwidth");var D=v("orientation"),B=v("yref"),F=v("xref"),P=D==="h",j=B==="paper",U=F==="paper",$,Q,re,ne="left";P?($=0,p.getComponentMethod("rangeslider","isVisible")(a.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?$=1.02:($=1,ne="right")),b.coerce(m,h,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"x"),b.coerce(m,h,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),v("traceorder",f),t.isGrouped(o[r])&&v("tracegroupgap"),v("entrywidth"),v("entrywidthmode"),v("indentation"),v("itemsizing"),v("itemwidth"),v("itemclick"),v("itemdoubleclick"),v("groupclick"),v("xanchor",ne),v("yanchor",re),v("maxheight"),v("valign"),b.noneOrAll(m,h,["x","y"]);var se=v("title.text");if(se){v("title.side",P?"left":"top");var G=b.extendFlat({},g,{size:b.bigFont(g.size)});b.coerceFont(v,"title.font",G);let X=c>1;v("titleclick",X?"toggle":!1),v("titledoubleclick",X?"toggleothers":!1)}}}V.exports=function(a,o,s){var c,m=s.slice(),h=o.shapes;if(h)for(c=0;cVe.showlegend||Ve.legendgroup);var g=h.concat(v),i=o.trace;i._isShape&&(i=a.shapes[i.index]);var w=i.legendgroup,S,M,C,_,T,f,u={},A=[],x=[],z=[];function I(Ve,Ge){var ke=A.indexOf(Ve),_e=u.visible;return _e||(_e=u.visible=[]),A.indexOf(Ve)===-1&&(A.push(Ve),ke=A.length-1),_e[ke]=Ge,ke}var O=(a.shapes||[]).map(function(Ve){return Ve._input}),D=!1;function B(Ve,Ge){O[Ve].visible=Ge,D=!0}function F(Ve,Ge){if(!(o.groupTitle&&!c)){var ke=Ve._isShape,_e=Ve.index;_e===void 0&&(_e=Ve._index);var ce=Ve.visible===!1?!1:Ge;ke?B(_e,ce):I(_e,ce)}}var P=i.legend;if(!i._isShape&&V.traceIs(i,"pie-like")){var j=o.label,U=m.indexOf(j);if(r==="toggle")U===-1?m.push(j):m.splice(U,1);else if(r==="toggleothers"){var $=U!==-1,Q=[];for(S=0;SC.showlegend||C.legendgroup),c=a.concat(s);function m(C){return(C.legend||"legend")===o}var h,v;if(n==="toggle")h=!c.some(function(_){return m(_)&&_.visible===!0}),v=!1;else{let C=c.some(function(_){return!m(_)&&_.visible===!0&&_.showlegend!==!1});h=!0,v=!C}let g={visible:[]},i=[],w=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(O=B)}z[g][0]._groupMinRank=O,z[g][0]._preGroupSort=g}var F=function(re,ne){return re[0]._groupMinRank-ne[0]._groupMinRank||re[0]._preGroupSort-ne[0]._preGroupSort},P=function(re,ne){var se=p(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,G=p(ne.trace.legendrank)?ne.trace.legendrank[ne.i]:ne.trace.legendrank;return se-G||re._preSort-ne._preSort};for(z.forEach(function(re,ne){re[0]._preGroupSort=ne}),z.sort(F),g=0;g0)Y=X.width;else return 0;return f?H:Math.min(Y,K)};M.each(function(G){var X=p.select(this),K=E.ensureSingle(X,"g","layers");K.style("opacity",G[0].trace.opacity);var H=_.indentation,Y=_.valign,q=G[0].lineHeight,Z=G[0].height;if(Y==="middle"&&H===0||!q||!Z)K.attr("transform",null);else{var ee={top:1,bottom:-1}[Y],ae=ee*(.5*(q-Z+3))||0,he=_.indentation;K.attr("transform",k(he,ae))}var xe=K.selectAll("g.legendfill").data([G]);xe.enter().append("g").classed("legendfill",!0);var we=K.selectAll("g.legendlines").data([G]);we.enter().append("g").classed("legendlines",!0);var Me=K.selectAll("g.legendsymbols").data([G]);Me.enter().append("g").classed("legendsymbols",!0),Me.selectAll("g.legendpoints").data([G]).enter().append("g").classed("legendpoints",!0)}).each(se).each(D).each(F).each(B).each(j).each(re).each(Q).each(I).each(O).each(U).each($);function I(G){var X=i(G),K=X.showFill,H=X.showLine,Y=X.showGradientLine,q=X.showGradientFill,Z=X.anyFill,ee=X.anyLine,ae=G[0],he=ae.trace,xe,we,Me=t(he),Se=Me.colorscale,Ie=Me.reversescale,Ve=function(Ae){if(Ae.size())if(K)l.fillGroupStyle(Ae,C,!0);else{var Be="legendfill-"+he.uid;l.gradient(Ae,C,Be,g(Ie),Se,"fill")}},Ge=function(Ae){if(Ae.size()){var Be="legendline-"+he.uid;l.lineGroupStyle(Ae),l.gradient(Ae,C,Be,g(Ie),Se,"stroke")}},ke=n.hasMarkers(he)||!Z?"M5,0":ee?"M5,-2":"M5,-3",_e=p.select(this),ce=_e.select(".legendfill").selectAll("path").data(K||q?[G]:[]);if(ce.enter().append("path").classed("js-fill",!0),ce.exit().remove(),ce.attr("d",ke+"h"+u+"v6h-"+u+"z").call(Ve),H||Y){var ve=z(void 0,he.line,h,c);we=E.minExtend(he,{line:{width:ve}}),xe=[E.minExtend(ae,{trace:we})]}var le=_e.select(".legendlines").selectAll("path").data(H||Y?[xe]:[]);le.enter().append("path").classed("js-line",!0),le.exit().remove(),le.attr("d",ke+(Y?"l"+u+",0.0001":"h"+u)).call(H?l.lineGroupStyle:Ge)}function O(G){var X=i(G),K=X.anyFill,H=X.anyLine,Y=X.showLine,q=X.showMarker,Z=G[0],ee=Z.trace,ae=!q&&!H&&!K&&n.hasText(ee),he,xe;function we(ve,le,Ae,Be){var Xe=E.nestedProperty(ee,ve).get(),Ye=E.isArrayOrTypedArray(Xe)&&le?le(Xe):Xe;if(f&&Ye&&Be!==void 0&&(Ye=Be),Ae){if(YeAe[1])return Ae[1]}return Ye}function Me(ve){return Z._distinct&&Z.index&&ve[Z.index]?ve[Z.index]:ve[0]}if(q||ae||Y){var Se={},Ie={};if(q){Se.mc=we("marker.color",Me);var Ve=ee.type==="scattermap";Se.mx=Ve?"circle":we("marker.symbol",Me),Se.mo=we("marker.opacity",E.mean,[.2,1]),Se.mlc=we("marker.line.color",Me),Se.mlw=we("marker.line.width",E.mean,[0,5],m),Se.mld=we("marker.line.dash",Me),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ge=we("marker.size",E.mean,[2,16],s);Se.ms=Ge,Ie.marker.size=Ge}Y&&(Ie.line={width:we("line.width",Me,[0,10],c)}),ae&&(Se.tx="Aa",Se.tp=we("textposition",Me),Se.ts=10,Se.tc=we("textfont.color",Me),Se.tf=we("textfont.family",Me),Se.tw=we("textfont.weight",Me),Se.ty=we("textfont.style",Me),Se.tv=we("textfont.variant",Me),Se.tC=we("textfont.textcase",Me),Se.tE=we("textfont.lineposition",Me),Se.tS=we("textfont.shadow",Me)),he=[E.minExtend(Z,Se)],xe=E.minExtend(ee,Ie),xe.selectedpoints=null,xe.texttemplate=null}var ke=p.select(this).select("g.legendpoints"),_e=ke.selectAll("path.scatterpts").data(q?he:[]);_e.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),_e.exit().remove(),_e.call(l.pointStyle,xe,C),q&&(he[0].mrc=3);var ce=ke.selectAll("g.pointtext").data(ae?he:[]);ce.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),ce.exit().remove(),ce.selectAll("text").call(l.textPointStyle,xe,C)}function D(G){var X=G[0].trace,K=X.type==="waterfall";if(G[0]._distinct&&K){var H=G[0].trace[G[0].dir].marker;return G[0].mc=H.color,G[0].mlw=H.line.width,G[0].mlc=H.line.color,P(G,this,"waterfall")}var Y=[];X.visible&&K&&(Y=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 q=p.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Y);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(Z){var ee=p.select(this),ae=X[Z[0]].marker,he=z(void 0,ae.line,v,m);ee.attr("d",Z[1]).style("stroke-width",he+"px").call(e.fill,ae.color),he&&ee.call(e.stroke,ae.line.color)})}function B(G){P(G,this)}function F(G){P(G,this,"funnel")}function P(G,X,K){var H=G[0].trace,Y=H.marker||{},q=Y.line||{},Z=Y.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=K?H.visible&&H.type===K:b.traceIs(H,"bar"),ae=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[G]:[]);ae.enter().append("path").classed("legend"+K,!0).attr("d",Z).attr("transform",x),ae.exit().remove(),ae.each(function(he){var xe=p.select(this),we=he[0],Me=z(we.mlw,Y.line,v,m);xe.style("stroke-width",Me+"px");var Se=we.mcc;if(!_._inHover&&"mc"in we){var Ie=t(Y),Ve=Ie.mid;Ve===void 0&&(Ve=(Ie.max+Ie.min)/2),Se=l.tryColorscale(Y,"")(Ve)}var Ge=Se||we.mc||Y.color,ke=Y.pattern,_e=l.getPatternAttr,ce=ke&&(_e(ke.shape,0,"")||_e(ke.path,0,""));if(ce){var ve=_e(ke.bgcolor,0,null),le=_e(ke.fgcolor,0,null),Ae=ke.fgopacity,Be=w(ke.size,8,10),Xe=w(ke.solidity,.5,1),Ye="legend-"+H.uid;xe.call(l.pattern,"legend",C,Ye,ce,Be,Xe,Se,ke.fillmode,ve,le,Ae)}else xe.call(e.fill,Ge);Me&&e.stroke(xe,we.mlc||q.color)})}function j(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&b.traceIs(X,"box-violin")?[G]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),K.exit().remove(),K.each(function(){var H=p.select(this);if((X.boxpoints==="all"||X.points==="all")&&e.opacity(X.fillcolor)===0&&e.opacity((X.line||{}).color)===0){var Y=E.minExtend(X,{marker:{size:f?s:E.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,Y,C)}else{var q=z(void 0,X.line,v,m);H.style("stroke-width",q+"px").call(e.fill,X.fillcolor),q&&e.stroke(H,X.line.color)}})}function U(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[G,G]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(H,Y){return Y?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("stroke-width",ee+"px").call(e.fill,Z.fillcolor),ee&&e.stroke(q,Z.line.color)})}function $(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[G,G]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(H,Y){return Y?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("fill","none").call(l.dashLine,Z.line.dash,ee),ee&&e.stroke(q,Z.line.color)})}function Q(G){ne(G,this,"pie")}function re(G){ne(G,this,"funnelarea")}function ne(G,X,K){var H=G[0],Y=H.trace,q=K?Y.visible&&Y.type===K:b.traceIs(Y,K),Z=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(q?[G]:[]);if(Z.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),Z.exit().remove(),Z.size()){var ee=Y.marker||{},ae=z(a(ee.line.width,H.pts),ee.line,v,m),he="pieLike",xe=E.minExtend(Y,{marker:{line:{width:ae}}},he),we=E.minExtend(H,{trace:xe},he);r(Z,we,xe,C)}}function se(G){var X=G[0].trace,K,H=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":H=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":H=[["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"]],K=!1;break;case"streamtube":H=[["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"]],K=!1;break;case"surface":H=[["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"]],K=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var Y=p.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);Y.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(q,Z){var ee=p.select(this),ae=t(X),he=ae.colorscale,xe=ae.reversescale,we=function(Ve){if(Ve.size()){var Ge="legendfill-"+X.uid;l.gradient(Ve,C,Ge,g(xe,K==="radial"),he,"fill")}},Me;if(he){if(!K){var Ie=he.length;Me=Z===0?he[xe?Ie-1:0][1]:Z===1?he[xe?0:Ie-1][1]:he[Math.floor((Ie-1)/2)][1]}}else{var Se=X.vertexcolor||X.facecolor||X.color;Me=E.isArrayOrTypedArray(Se)?Se[Z]||Se[0]:Se}ee.attr("d",q[0]),Me?ee.call(e.fill,Me):ee.call(we)})}};function g(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=n.hasLines(M)||M.visible&&M.type==="quiver",T=n.hasMarkers(M),f=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var x=C.coloring;x==="lines"?u=!0:_=x==="none"||x==="heatmap"||C.showlines,C.type==="constraint"?f=C._operation!=="=":(x==="fill"||x==="heatmap")&&(A=!0)}return{showMarker:T,showLine:_,showFill:f,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:f||A}}function w(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),i5=ze({"src/components/legend/draw.js"(J,V){"use strict";var p=ci(),b=Nr(),E=cl(),k=mi(),l=Hm(),e=_h(),t=$i(),n=Qn(),r=Cs(),a=r5().handleItemClick,o=r5().handleTitleClick,s=a5(),c=dc(),m=c.LINE_SPACING,h=c.FROM_TL,v=c.FROM_BR,g=XI(),i=n5(),w=u1(),S=1,M=/^legend[0-9]*$/;V.exports=function($,Q){if(Q)_($,Q);else{var re=$._fullLayout,ne=re._legends,se=re._infolayer.selectAll('[class^="legend"]');se.each(function(){var H=p.select(this),Y=H.attr("class"),q=Y.split(" ")[0];q.match(M)&&ne.indexOf(q)===-1&&H.remove()});for(var G=0;G1)}var ae=re.hiddenlabels||[];if(!X&&(!re.showlegend||!K.length))return G.selectAll("."+ne).remove(),re._topdefs.select("#"+se).remove(),E.autoMargin(U,ne);var he=b.ensureSingle(G,"g",ne,function(_e){X||_e.attr("pointer-events","all")}),xe=b.ensureSingleById(re._topdefs,"clipPath",se,function(_e){_e.append("rect")}),we=b.ensureSingle(he,"rect","bg",function(_e){_e.attr("shape-rendering","crispEdges")});we.call(n.stroke,Q.bordercolor).call(n.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Me=b.ensureSingle(he,"g","scrollbox"),Se=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Se.text?(Ie=b.ensureSingle(Me,"text",ne+"titletext"),Ie.attr("text-anchor","start").call(t.font,Se.font).text(Se.text),I(Ie,Me,U,Q,S),!X&&(Q.titleclick||Q.titledoubleclick)&&z(Me,U,Q,ne)):(Me.selectAll("."+ne+"titletext").remove(),Me.selectAll("."+ne+"titletoggle").remove());var Ve=b.ensureSingle(he,"rect","scrollbar",function(_e){_e.attr(s.scrollBarEnterAttrs).call(n.fill,s.scrollBarColor)}),Ge=Me.selectAll("g.groups").data(K);Ge.enter().append("g").attr("class","groups"),Ge.exit().remove();var ke=Ge.selectAll("g.traces").data(b.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(_e){let ce=_e[0],ve=ce.trace;if(ce.groupTitle){let le=ve.legendgroup,Ae=(re.shapes||[]).filter(function(Xe){return Xe.showlegend});return U._fullData.concat(Ae).some(function(Xe){return Xe.legendgroup===le&&(Xe.legend||"legend")===ne&&Xe.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ae.indexOf(_e[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){p.select(this).call(u,U,Q)}).call(i,U,Q).each(function(_e){X||_e[0].groupTitle&&Q.groupclick==="toggleitem"||p.select(this).call(x,U,ne)}),b.syncOrAsync([E.previousPromises,function(){return B(U,Ge,ke,Q,Me)},function(){var _e=re._size,ce=Q.borderwidth,ve=Q.xref==="paper",le=Q.yref==="paper";if(Se.text){let pt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Pt=U._fullData.concat(pt).some(function(Ct){let qt=Ct.legend||"legend";var Vt=Array.isArray(qt)?qt.includes(ne):qt===ne;return Vt&&Ct.visible===!0});Ie.style("opacity",Pt?1:.5)}if(!X){var Ae,Be;ve?Ae=_e.l+_e.w*Q.x-h[P(Q)]*Q._width:Ae=re.width*Q.x-h[P(Q)]*Q._width,le?Be=_e.t+_e.h*(1-Q.y)-h[j(Q)]*Q._effHeight:Be=re.height*(1-Q.y)-h[j(Q)]*Q._effHeight;var Xe=F(U,ne,Ae,Be);if(Xe)return;if(re.margin.autoexpand){var Ye=Ae,yt=Be;Ae=ve?b.constrain(Ae,0,re.width-Q._width):Ye,Be=le?b.constrain(Be,0,re.height-Q._effHeight):yt,Ae!==Ye&&b.log("Constrain "+ne+".x to make legend fit inside graph"),Be!==yt&&b.log("Constrain "+ne+".y to make legend fit inside graph")}t.setTranslate(he,Ae,Be)}if(Ve.on(".drag",null),he.on("wheel",null),X||Q._height<=Q._maxHeight||U._context.staticPlot){var gt=Q._effHeight;X&&(gt=Q._height),we.attr({width:Q._width-ce,height:gt-ce,x:ce/2,y:ce/2}),t.setTranslate(Me,0,0),xe.select("rect").attr({width:Q._width-2*ce,height:gt-2*ce,x:ce,y:ce}),t.setClipUrl(Me,se,U),t.setRect(Ve,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,$t=Q._height-Q._effHeight,rr=At/$t,_r=Math.min(Q._scrollY||0,$t);we.attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-ce,x:ce/2,y:ce/2}),xe.select("rect").attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*ce,x:ce,y:ce+_r}),t.setClipUrl(Me,se,U),We(_r,Tt,rr),he.on("wheel",function(){_r=b.constrain(Q._scrollY+p.event.deltaY/$t*At,0,$t),We(_r,Tt,rr),_r!==0&&_r!==$t&&p.event.preventDefault()});var Xt,or,Ot,vt=function(pt,Pt,Ct){var qt=(Ct-Pt)/rr+pt;return b.constrain(qt,0,$t)},ht=function(pt,Pt,Ct){var qt=(Pt-Ct)/rr+pt;return b.constrain(qt,0,$t)},De=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"?Xt=pt.changedTouches[0].clientY:Xt=pt.clientY,Ot=_r}).on("drag",function(){var pt=p.event.sourceEvent;pt.buttons===2||pt.ctrlKey||(pt.type==="touchmove"?or=pt.changedTouches[0].clientY:or=pt.clientY,_r=vt(Ot,Xt,or),We(_r,Tt,rr))});Ve.call(De);var Ne=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"&&(Xt=pt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var pt=p.event.sourceEvent;pt.type==="touchmove"&&(or=pt.changedTouches[0].clientY,_r=ht(Ot,Xt,or),We(_r,Tt,rr))});Me.call(Ne)}function We(pt,Pt,Ct){Q._scrollY=U._fullLayout[ne]._scrollY=pt,t.setTranslate(Me,0,-pt),t.setRect(Ve,Q._width,s.scrollBarMargin+pt*Ct,s.scrollBarWidth,Pt),xe.select("rect").attr("y",ce+pt)}if(U._context.edits.legendPosition){var Ke,Je,et,Mt;he.classed("cursor-move",!0),e.init({element:he.node(),gd:U,prepFn:function(pt){if(pt.target!==Ve.node()){var Pt=t.getTranslate(he);et=Pt.x,Mt=Pt.y}},moveFn:function(pt,Pt){if(et!==void 0&&Mt!==void 0){var Ct=et+pt,qt=Mt+Pt;t.setTranslate(he,Ct,qt),Ke=e.align(Ct,Q._width,_e.l,_e.l+_e.w,Q.xanchor),Je=e.align(qt+Q._height,-Q._height,_e.t+_e.h,_e.t,Q.yanchor)}},doneFn:function(){if(Ke!==void 0&&Je!==void 0){var pt={};pt[ne+".x"]=Ke,pt[ne+".y"]=Je,k.call("_guiRelayout",U,pt)}},clickFn:function(pt,Pt){var Ct=G.selectAll("g.traces").filter(function(){var qt=this.getBoundingClientRect();return Pt.clientX>=qt.left&&Pt.clientX<=qt.right&&Pt.clientY>=qt.top&&Pt.clientY<=qt.bottom});Ct.size()>0&&f(U,Q,Ct,pt,Pt)}})}}],U)}}function T(U,$,Q){var re=U[0],ne=re.width,se=$.entrywidthmode,G=re.trace.legendwidth||$.entrywidth;return se==="fraction"?$._maxWidth*G:Q+(G||ne)}function f(U,$,Q,re,ne){var se=U._fullLayout,G=Q.data()[0][0].trace,X=$.itemclick,K=$.itemdoubleclick,H={event:ne,node:Q.node(),curveNumber:G.index,expandedIndex:G.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:se};G._group&&(H.group=G._group),k.traceIs(G,"pie-like")&&(H.label=Q.datum()[0].label);var Y=l.triggerHandler(U,"plotly_legendclick",H);if(re===1){if(Y===!1)return;$._clickTimeout=setTimeout(function(){U._fullLayout&&X&&a(Q,U,$,X)},U._context.doubleClickDelay)}else if(re===2){$._clickTimeout&&clearTimeout($._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",H);q!==!1&&Y!==!1&&K&&a(Q,U,$,K)}}function u(U,$,Q){var re=w.getId(Q),ne=U.data()[0][0],se=ne.trace,G=k.traceIs(se,"pie-like"),X=!Q._inHover&&$._context.edits.legendText&&!G,K=Q._maxNameLength,H,Y;ne.groupTitle?(H=ne.groupTitle.text,Y=ne.groupTitle.font):(Y=Q.font,Q.entries?H=ne.text:(H=G?ne.label:se.name,se._meta&&(H=b.templateString(H,se._meta))));var q=b.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,Y).text(X?A(H,K):H);var Z=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,Z,0),X?q.call(r.makeEditable,{gd:$,text:H}).call(I,U,$,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,$,Q);var ae={};return ae.name=ee,ne.trace._isShape?k.call("_guiRelayout",$,"shapes["+se.index+"].name",ae.name):k.call("_guiRestyle",$,ae,se.index)}):I(q,U,$,Q)}function A(U,$){var Q=Math.max(4,$);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function x(U,$,Q){var re=$._context.doubleClickDelay,ne,se=1,G=b.ensureSingle(U,"rect",Q+"toggle",function(X){$._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(G.on("mousedown",function(){ne=new Date().getTime(),ne-$._legendMouseDownTimere&&(se=Math.max(se-1,1)),f($,X,U,se,p.event)}}))}function z(U,$,Q,re){if($._fullData.some(function(H){let Y=H.legend||"legend";return(Array.isArray(Y)?Y.includes(re):Y===re)&&k.traceIs(H,"pie-like")}))return;let se=$._context.doubleClickDelay;var G,X=1;let K=b.ensureSingle(U,"rect",re+"titletoggle",function(H){$._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(K.on("mousedown",function(){G=new Date().getTime(),G-$._legendMouseDownTimese&&(X=Math.max(X-1,1));let H={event:p.event,legendId:re,data:$.data,layout:$.layout,fullData:$._fullData,fullLayout:$._fullLayout};if(X===1&&Q.titleclick){if(l.triggerHandler($,"plotly_legendtitleclick",H)===!1)return;Q._titleClickTimeout=setTimeout(function(){$._fullLayout&&o($,Q,Q.titleclick)},se)}else X===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),$._legendMouseDownTime=0,l.triggerHandler($,"plotly_legendtitledoubleclick",H)!==!1&&Q.titledoubleclick&&o($,Q,Q.titledoubleclick))}))}function I(U,$,Q,re,ne){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){O($,Q,re,ne)})}function O(U,$,Q,re){var ne=U.data()[0][0],se=ne&&ne.trace.showlegend;if(Array.isArray(se)&&(se=se[ne.i]!==!1),!Q._inHover&&ne&&!se){U.remove();return}var G=U.select("g[class*=math-group]"),X=G.node(),K=w.getId(Q);Q||(Q=$._fullLayout[K]);var H=Q.borderwidth,Y;re===S?Y=Q.title.font:ne.groupTitle?Y=ne.groupTitle.font:Y=Q.font;var q=Y.size*m,Z,ee;if(X){var ae=t.bBox(X);Z=ae.height,ee=ae.width,re===S?t.setTranslate(G,H,H+Z*.75):t.setTranslate(G,0,Z*.25)}else{var he="."+K+(re===S?"title":"")+"text",xe=U.select(he),we=r.lineCount(xe),Me=xe.node();if(Z=q*we,ee=Me?t.bBox(Me).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(xe,H+s.titlePad,H+q);else{var Se=s.itemGap*2+Q.indentation+Q.itemwidth;ne.groupTitle&&(Se=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(xe,Se,-q*((we-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=Z):(ne.lineHeight=q,ne.height=Math.max(Z,16)+3,ne.width=ee)}function D(U){var $=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&($=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[$,Q]}function B(U,$,Q,re,ne){var se=U._fullLayout,G=w.getId(re);re||(re=se[G]);var X=se._size,K=w.isVertical(re),H=w.isGrouped(re),Y=re.entrywidthmode==="fraction",q=re.borderwidth,Z=2*q,ee=s.itemGap,ae=re.indentation+re.itemwidth+ee*2,he=2*(q+ee),xe=j(re),we=re.y<0||re.y===0&&xe==="top",Me=re.y>1||re.y===1&&xe==="bottom",Se=re.tracegroupgap,Ie={};let{orientation:Ve,yref:Ge}=re,{maxheight:ke}=re,_e=we||Me||Ve!=="v"||Ge!=="paper";ke||(ke=_e?.5:1);let ce=_e?se.height:X.h;re._maxHeight=Math.max(ke>1?ke:ke*ce,30);var ve=0;re._width=0,re._height=0;var le=D(re);if(K)Q.each(function(pt){var Pt=pt[0].height;t.setTranslate(this,q+le[0],q+le[1]+re._height+Pt/2+ee),re._height+=Pt,re._width=Math.max(re._width,pt[0].width)}),ve=ae+re._width,re._width+=ee+ae+Z,re._height+=he,H&&($.each(function(pt,Pt){t.setTranslate(this,0,Pt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Ae=P(re),Be=re.x<0||re.x===0&&Ae==="right",Xe=re.x>1||re.x===1&&Ae==="left",Ye=Me||we,yt=se.width/2;re._maxWidth=Math.max(Be?Ye&&Ae==="left"?X.l+X.w:yt:Xe?Ye&&Ae==="right"?X.r+X.w:yt:X.w,2*ae);var gt=0,Tt=0;Q.each(function(pt){var Pt=T(pt,re,ae);gt=Math.max(gt,Pt),Tt+=Pt}),ve=null;var At=0;if(H){var $t=0,rr=0,_r=0;$.each(function(){var pt=0,Pt=0;p.select(this).selectAll("g.traces").each(function(qt){var Vt=T(qt,re,ae),Ht=qt[0].height;t.setTranslate(this,le[0],le[1]+q+ee+Ht/2+Pt),Pt+=Ht,pt=Math.max(pt,Vt),Ie[qt[0].trace.legendgroup]=pt});var Ct=pt+ee;rr>0&&Ct+q+rr>re._maxWidth?(At=Math.max(At,rr),rr=0,_r+=$t+Se,$t=Pt):$t=Math.max($t,Pt),t.setTranslate(this,rr,_r),rr+=Ct}),re._width=Math.max(At,rr)+q,re._height=_r+$t+he}else{var Xt=Q.size(),or=Tt+Z+(Xt-1)*ee=re._maxWidth&&(At=Math.max(At,De),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,le[0]+q+vt,le[1]+q+ht+Pt/2+ee),De=vt+Ct+ee,vt+=qt,Ot=Math.max(Ot,Pt)}),or?(re._width=vt+Z,re._height=Ot+he):(re._width=Math.max(At,De)+Z,re._height+=Ot+he)}}re._width=Math.ceil(Math.max(re._width+le[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+le[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Ne=U._context.edits,We=Ne.legendText||Ne.legendPosition;Q.each(function(pt){var Pt=p.select(this).select("."+G+"toggle"),Ct=pt[0].height,qt=pt[0].trace.legendgroup,Vt=T(pt,re,ae);H&&qt!==""&&(Vt=Ie[qt]);var Ht=We?ae:ve||Vt;!K&&!Y&&(Ht+=ee/2),t.setRect(Pt,0,-Ct/2,Ht,Ct)});var Ke=ne.select("."+G+"titletext");Ke.node()&&C(Ke,re,q);var Je=ne.select("."+G+"titletoggle");if(Je.size()&&Ke.node()){var et=Ke.attr("x")||0,Mt=s.titlePad;t.setRect(Je,et-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,$,Q,re){var ne=U._fullLayout,se=ne[$],G=P(se),X=j(se),K=se.xref==="paper",H=se.yref==="paper";U._fullLayout._reservedMargin[$]={};var Y=se.y<.5?"b":"t",q=se.x<.5?"l":"r",Z={r:ne.width-Q,l:Q+se._width,b:ne.height-re,t:re+se._effHeight};if(K&&H)return E.autoMargin(U,$,{x:se.x,y:se.y,l:se._width*h[G],r:se._width*v[G],b:se._effHeight*v[X],t:se._effHeight*h[X]});K?U._fullLayout._reservedMargin[$][Y]=Z[Y]:H||se.orientation==="v"?U._fullLayout._reservedMargin[$][q]=Z[q]:U._fullLayout._reservedMargin[$][Y]=Z[Y]}function P(U){return b.isRightAnchor(U)?"right":b.isCenterAnchor(U)?"center":"left"}function j(U){return b.isBottomAnchor(U)?"bottom":b.isMiddleAnchor(U)?"middle":"top"}}}),o5=ze({"src/components/fx/hover.js"(J){"use strict";var V=ci(),p=ao(),b=Nr(),E=b.pushUnique,k=b.strTranslate,l=b.strRotate,e=Hm(),t=Cs(),n=YI(),r=$i(),a=Qn(),o=_h(),s=Gi(),c=hc().zindexSeparator,m=mi(),h=kh(),v=a1(),g=t5(),i=i5(),w=v.YANGLE,S=Math.PI*w/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),T=v.HOVERARROWSIZE,f=v.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function x(q,Z){return q.distance-Z.distance}J.hover=function(Z,ee,ae,he){Z=b.getGraphDiv(Z);var xe=ee.target;b.throttle(Z._fullLayout._uid+v.HOVERID,v.HOVERMINTIME,function(){z(Z,ee,ae,he,xe)})},J.loneHover=function(Z,ee){var ae=!0;Array.isArray(Z)||(ae=!1,Z=[Z]);var he=ee.gd,xe=K(he),we=H(he),Me=Z.map(function(le){var Ae=le._x0||le.x0||le.x||0,Be=le._x1||le.x1||le.x||0,Xe=le._y0||le.y0||le.y||0,Ye=le._y1||le.y1||le.y||0,yt=le.eventData;if(yt){var gt=Math.min(Ae,Be),Tt=Math.max(Ae,Be),At=Math.min(Xe,Ye),$t=Math.max(Xe,Ye),rr=le.trace;if(m.traceIs(rr,"gl3d")){var _r=he._fullLayout[rr.scene]._scene.container,Xt=_r.offsetLeft,or=_r.offsetTop;gt+=Xt,Tt+=Xt,At+=or,$t+=or}yt.bbox={x0:gt+we,x1:Tt+we,y0:At+xe,y1:$t+xe},yt.xPixel=(Ae+Be)/2,yt.yPixel=(Xe+Ye)/2,ee.inOut_bbox&&ee.inOut_bbox.push(yt.bbox)}else yt=!1;return{color:le.color||a.defaultLine,x0:le.x0||le.x||0,x1:le.x1||le.x||0,y0:le.y0||le.y||0,y1:le.y1||le.y||0,xLabel:le.xLabel,yLabel:le.yLabel,zLabel:le.zLabel,text:le.text,name:le.name,idealAlign:le.idealAlign,borderColor:le.borderColor,fontFamily:le.fontFamily,fontSize:le.fontSize,fontColor:le.fontColor,fontWeight:le.fontWeight,fontStyle:le.fontStyle,fontVariant:le.fontVariant,nameLength:le.nameLength,textAlign:le.textAlign,trace:le.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:le.hovertemplate||!1,hovertemplateLabels:le.hovertemplateLabels||!1,eventData:yt}}),Se=!1,Ie=D(Me,{gd:he,hovermode:"closest",rotateLabels:Se,bgColor:ee.bgColor||a.background,container:V.select(ee.container),outerContainer:ee.outerContainer||ee.container}),Ve=Ie.hoverLabels,Ge=5,ke=0,_e=0;Ve.sort(function(le,Ae){return le.y0-Ae.y0}).each(function(le,Ae){var Be=le.y0-le.by/2;Be-GeTt[0]._length||nr<0||nr>At[0]._length)return o.unhoverRaw(q,Z)}if(Z.pointerX=Rt+Tt[0]._offset,Z.pointerY=nr+At[0]._offset,"xval"in Z?ht=h.flat(xe,Z.xval):ht=h.p2c(Tt,Rt),"yval"in Z?De=h.flat(xe,Z.yval):De=h.p2c(At,nr),q._hoverPointerX=Z.pointerX,q._hoverPointerY=Z.pointerY,!p(ht[0])||!p(De[0]))return b.warn("Fx.hover failed",Z,q),o.unhoverRaw(q,Z)}Me.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=De,q._hoverXAxes=Tt,q._hoverYAxes=At);var Rr=1/0;function Qr(fn,Ai){for(We=0;WeVt&&(Ot.splice(0,Vt),Rr=Ot[0].distance),Ge&&or!==0&&Ot.length===0){qt.distance=or,qt.index=!1;var qi=Je._module.hoverPoints(qt,Pt,Ct,"closest",{hoverLayer:Me._hoverlayer});if(qi&&(qi=qi.filter(function(Mi){return Mi.spikeDistance<=or})),qi&&qi.length){var io,oo=qi.filter(function(Mi){return Mi.xa.showspikes&&Mi.xa.spikesnap!=="hovered data"});if(oo.length){var Vn=oo[0];p(Vn.x0)&&p(Vn.y0)&&(io=ha(Vn),(!Ht.vLinePoint||Ht.vLinePoint.spikeDistance>io.spikeDistance)&&(Ht.vLinePoint=io))}var qn=qi.filter(function(Mi){return Mi.ya.showspikes&&Mi.ya.spikesnap!=="hovered data"});if(qn.length){var Hi=qn[0];p(Hi.x0)&&p(Hi.y0)&&(io=ha(Hi),(!Ht.hLinePoint||Ht.hLinePoint.spikeDistance>io.spikeDistance)&&(Ht.hLinePoint=io))}}}}}Qr();function Zr(fn,Ai,jn){for(var Xn=null,eo=1/0,gi,qi=0;qifn.trace.index===vi.trace.index):Ot=[vi];var Yi=Ot.length,Ja=X("x",vi,Me),Oa=X("y",vi,Me);Qr(Ja,Oa);var lt=[],rt={},fr=0,lr=function(fn){var Ai=u[fn.trace.type]?I(fn):fn.trace.index;if(!rt[Ai])fr++,rt[Ai]=fr,lt.push(fn);else{var jn=rt[Ai]-1,Xn=lt[jn];jn>0&&Math.abs(fn.distance)Yi-1;Tr--)lr(Ot[Tr]);Ot=lt,Xa()}var Ir=q._hoverdata,Dr=[],ot=K(q),kt=H(q);for(let fn of Ot){var jt=h.makeEventData(fn,fn.trace,fn.cd);if(fn.hovertemplate!==!1){var ar=!1;fn.cd[fn.index]&&fn.cd[fn.index].ht&&(ar=fn.cd[fn.index].ht),fn.hovertemplate=ar||fn.trace.hovertemplate||!1}if(fn.xa&&fn.ya){var Er=fn.x0+fn.xa._offset,xr=fn.x1+fn.xa._offset,zr=fn.y0+fn.ya._offset,Lr=fn.y1+fn.ya._offset,aa=Math.min(Er,xr),Sa=Math.max(Er,xr),wa=Math.min(zr,Lr),pn=Math.max(zr,Lr);jt.bbox={x0:aa+kt,x1:Sa+kt,y0:wa+ot,y1:pn+ot},jt.xPixel=(Er+xr)/2,jt.yPixel=(zr+Lr)/2}fn.eventData=[jt],Dr.push(jt)}q._hoverdata=Dr;var tn=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,ai=a.combine(Me.plot_bgcolor||a.background,Me.paper_bgcolor),rn=D(Ot,{gd:q,hovermode:ke,rotateLabels:tn,bgColor:ai,container:Me._hoverlayer,outerContainer:Me._paper.node(),commonLabelOpts:Me.hoverlabel,hoverdistance:Me.hoverdistance}),Ri=rn.hoverLabels;if(h.isUnifiedHover(ke)||(F(Ri,tn,Me,rn.commonLabelBoundingBox),U(Ri,tn,Me._invScaleX,Me._invScaleY)),he&&he.tagName){var Gn=m.getComponentMethod("annotations","hasClickToShow")(q,Dr);n(V.select(he),Gn?"pointer":"")}var no=re(q,Z,Ir);if(!he||ae||!no&&!Me.hoveranywhere)return;Ir&&no&&q.emit("plotly_unhover",{event:Z,points:Ir}),Di(q._hoverdata);function Di(fn){q.emit("plotly_hover",{event:Z,points:fn,xaxes:Tt,yaxes:At,xvals:h.c2dApply(Tt,ht),yvals:h.c2dApply(At,De),xPixel:Z.pointerX,yPixel:Z.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var O=/([\s\S]*)<\/extra>/;function D(q,Z){var ee=Z.gd,ae=ee._fullLayout,he=Z.hovermode,xe=Z.rotateLabels,we=Z.bgColor,Me=Z.container,Se=Z.outerContainer,Ie=Z.commonLabelOpts||{};if(q.length===0)return[[]];var Ve=Z.fontFamily||v.HOVERFONT,Ge=Z.fontSize||v.HOVERFONTSIZE,ke=Z.fontWeight||ae.font.weight,_e=Z.fontStyle||ae.font.style,ce=Z.fontVariant||ae.font.variant,ve=Z.fontTextcase||ae.font.textcase,le=Z.fontLineposition||ae.font.lineposition,Ae=Z.fontShadow||ae.font.shadow,Be=q[0],Xe=Be.xa,Ye=Be.ya,yt=he.charAt(0),gt=yt+"Label",Tt=Be[gt];if(Tt===void 0&&Xe.type==="multicategory")for(var At=0;Atae.width-Dr&&(ot=ae.width-Dr),en.attr("d","M"+(lr-ot)+",0L"+(lr-ot+T)+","+Ir+T+"H"+Dr+"v"+Ir+(f*2+fr.height)+"H"+-Dr+"V"+Ir+T+"H"+(lr-ot-T)+"Z"),lr=ot,We.minX=lr-Dr,We.maxX=lr+Dr,Xe.side==="top"?(We.minY=Tr-(f*2+fr.height),We.maxY=Tr-f):(We.minY=Tr+f,We.maxY=Tr+(f*2+fr.height))}else{var kt,jt,ar;Ye.side==="right"?(kt="start",jt=1,ar="",lr=Xe._offset+Xe._length):(kt="end",jt=-1,ar="-",lr=Xe._offset),Tr=Ye._offset+(Be.y0+Be.y1)/2,vi.attr("text-anchor",kt),en.attr("d","M0,0L"+ar+T+","+T+"V"+(f+fr.height/2)+"h"+ar+(f*2+fr.width)+"V-"+(f+fr.height/2)+"H"+ar+T+"V-"+T+"Z"),We.minY=Tr-(f+fr.height/2),We.maxY=Tr+(f+fr.height/2),Ye.side==="right"?(We.minX=lr+T,We.maxX=lr+T+(f*2+fr.width)):(We.minX=lr-T-(f*2+fr.width),We.maxX=lr-T);var Er=fr.height/2,xr=rr-fr.top-Er,zr="clip"+ae._uid+"commonlabel"+Ye._id,Lr;if(lren.hoverinfo!=="none");if(on.length===0)return[];var Ke=ae.hoverlabel,Je=Ke.font,et=on[0],Mt=((he==="x unified"?et.xa:et.ya).unifiedhovertitle||{}).text,pt=Mt?b.hovertemplateString({data:he==="x unified"?[{xa:et.xa,x:et.xVal}]:[{ya:et.ya,y:et.yVal}],fallback:et.trace.hovertemplatefallback,locale:ae._d3locale,template:Mt}):Tt,Pt={showlegend:!0,legend:{title:{text:pt,font:Je},font:Je,bgcolor:Ke.bgcolor,bordercolor:Ke.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ae.legend?ae.legend.traceorder:void 0,orientation:"v"}},Ct={font:Je};g(Pt,Ct,ee._fullData);var qt=Ct.legend;qt.entries=[];for(var Vt=0;Vt=0?Un=Xa:ja+cr<_r&&ja>=0?Un=ja:Nn+cr<_r?Un=Nn:Xa-Zr=0?li=La:un+Rr=0?li=un:yn+Rr=0,(on.idealAlign==="top"||!wa)&&pn?(ar-=xr/2,on.anchor="end"):wa?(ar+=xr/2,on.anchor="start"):on.anchor="middle",on.crossPos=ar;else{if(on.pos=ar,wa=jt+Er/2+Sa<=_r,pn=jt-Er/2-Sa>=0,(on.idealAlign==="left"||!wa)&&pn)jt-=Er/2,on.anchor="end";else if(wa)jt+=Er/2,on.anchor="start";else{on.anchor="middle";var tn=Sa/2,ai=jt+tn-_r,rn=jt-tn;ai>0&&(jt-=ai),rn<0&&(jt+=-rn)}on.crossPos=jt}Tr.attr("text-anchor",on.anchor),Dr&&Ir.attr("text-anchor",on.anchor),en.attr("transform",k(jt,ar)+(xe?l(w):""))}),{hoverLabels:Yn,commonLabelBoundingBox:We}}function B(q,Z,ee,ae,he,xe){var we,Me,Se="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=b.templateString(q.name,q.trace._meta)),Se=se(q.name,q.nameLength));var Ve=ee.charAt(0),Ge=Ve==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):Z&&q[Ve+"Label"]===he?Ie=q[Ge+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),xe&&Ie===""&&!q.hovertemplate&&(Se===""&&xe.remove(),Ie=Se),(Me=(we=q.trace)==null?void 0:we.hoverlabel)!=null&&Me.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let _e=q.hovertemplateLabels||q;q[Ve+"Label"]!==he&&(_e[Ve+"other"]=_e[Ve+"Val"],_e[Ve+"otherLabel"]=_e[Ve+"Label"]),Ie=b.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:_e,locale:ae._d3locale,template:ke}),Ie=Ie.replace(O,(ce,ve)=>(Se=se(ve,q.nameLength),""))}return[Ie,Se]}function F(q,Z,ee,ae){var he=Z?"xa":"ya",xe=Z?"ya":"xa",we=0,Me=1,Se=q.size(),Ie=new Array(Se),Ve=0,Ge=ae.minX,ke=ae.maxX,_e=ae.minY,ce=ae.maxY,ve=function(ht){return ht*ee._invScaleX},le=function(ht){return ht*ee._invScaleY};q.each(function(ht){var De=ht[he],Ne=ht[xe],We=De._id.charAt(0)==="x",Ke=De.range;Ve===0&&Ke&&Ke[0]>Ke[1]!==We&&(Me=-1);var Je=0,et=We?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,Z),pt=ht.anchor,Pt=pt==="end"?-1:1,Ct,qt;if(pt==="middle")Ct=ht.crossPos+(We?le(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),qt=Ct+(We?le(ht.by):ve(ht.bx));else if(We)Ct=ht.crossPos+le(T+Mt.y)-le(ht.by/2-T),qt=Ct+le(ht.by);else{var Vt=ve(Pt*T+Mt.x),Ht=Vt+ve(Pt*ht.bx);Ct=ht.crossPos+Math.min(Vt,Ht),qt=ht.crossPos+Math.max(Vt,Ht)}We?_e!==void 0&&ce!==void 0&&Math.min(qt,ce)-Math.max(Ct,_e)>1&&(Ne.side==="left"?(Je=Ne._mainLinePosition,et=ee.width):et=Ne._mainLinePosition):Ge!==void 0&&ke!==void 0&&Math.min(qt,ke)-Math.max(Ct,Ge)>1&&(Ne.side==="top"?(Je=Ne._mainLinePosition,et=ee.height):et=Ne._mainLinePosition)}Ie[Ve++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(We?M:1)/2,pmin:Je,pmax:et}]}),Ie.sort(function(ht,De){return ht[0].posref-De[0].posref||Me*(De[0].traceIndex-ht[0].traceIndex)});var Ae,Be,Xe,Ye,yt,gt,Tt;function At(ht){var De=ht[0],Ne=ht[ht.length-1];if(Be=De.pmin-De.pos-De.dp+De.size,Xe=Ne.pos+Ne.dp+Ne.size-De.pmax,Be>.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp+=Be;Ae=!1}if(!(Xe<.01)){if(Be<-.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp-=Xe;Ae=!1}if(Ae){var We=0;for(Ye=0;YeDe.pmax&&We++;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos>De.pmax-1&&(gt.del=!0,We--);for(Ye=0;Ye=0;yt--)ht[yt].dp-=Xe;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos+gt.dp+gt.size>De.pmax&&(gt.del=!0,We--)}}}for(;!Ae&&we<=Se;){for(we++,Ae=!0,Ye=0;Ye.01){for(yt=rr.length-1;yt>=0;yt--)rr[yt].dp+=Be;for($t.push.apply($t,rr),Ie.splice(Ye+1,1),Tt=0,yt=$t.length-1;yt>=0;yt--)Tt+=$t[yt].dp;for(Xe=Tt/$t.length,yt=$t.length-1;yt>=0;yt--)$t[yt].dp-=Xe;Ae=!1}else Ye++}Ie.forEach(At)}for(Ye=Ie.length-1;Ye>=0;Ye--){var or=Ie[Ye];for(yt=or.length-1;yt>=0;yt--){var Ot=or[yt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,Z){var ee=0,ae=q.offset;return Z&&(ae*=-_,ee=q.offset*C),{x:ee,y:ae}}function j(q){var Z={start:1,end:-1,middle:0}[q.anchor],ee=Z*(T+f),ae=ee+Z*(q.txwidth+f),he=q.anchor==="middle";return he&&(ee-=q.tx2width/2,ae+=q.txwidth/2+f),{alignShift:Z,textShiftX:ee,text2ShiftX:ae}}function U(q,Z,ee,ae){var he=function(we){return we*ee},xe=function(we){return we*ae};q.each(function(we){var Me=V.select(this);if(we.del)return Me.remove();var Se=Me.select("text.nums"),Ie=we.anchor,Ve=Ie==="end"?-1:1,Ge=j(we),ke=P(we,Z),_e=ke.x,ce=ke.y,ve=Ie==="middle",le="hoverlabel"in we.trace?we.trace.hoverlabel.showarrow:!0,Ae;ve?Ae="M-"+he(we.bx/2+we.tx2width/2)+","+xe(ce-we.by/2)+"h"+he(we.bx)+"v"+xe(we.by)+"h-"+he(we.bx)+"Z":le?Ae="M0,0L"+he(Ve*T+_e)+","+xe(T+ce)+"v"+xe(we.by/2-T)+"h"+he(Ve*we.bx)+"v-"+xe(we.by)+"H"+he(Ve*T+_e)+"V"+xe(ce-T)+"Z":Ae="M"+he(Ve*T+_e)+","+xe(ce-we.by/2)+"h"+he(Ve*we.bx)+"v"+xe(we.by)+"h"+he(-Ve*we.bx)+"Z",Me.select("path").attr("d",Ae);var Be=_e+Ge.textShiftX,Xe=ce+we.ty0-we.by/2+f,Ye=we.textAlign||"auto";Ye!=="auto"&&(Ye==="left"&&Ie!=="start"?(Se.attr("text-anchor","start"),Be=ve?-we.bx/2-we.tx2width/2+f:-we.bx-f):Ye==="right"&&Ie!=="end"&&(Se.attr("text-anchor","end"),Be=ve?we.bx/2-we.tx2width/2-f:we.bx+f)),Se.call(t.positionText,he(Be),xe(Xe)),we.tx2width&&(Me.select("text.name").call(t.positionText,he(Ge.text2ShiftX+Ge.alignShift*f+_e),xe(ce+we.ty0-we.by/2+f)),Me.select("rect").call(r.setRect,he(Ge.text2ShiftX+(Ge.alignShift-1)*we.tx2width/2+_e),xe(ce-we.by/2-1),he(we.tx2width),xe(we.by+2)))})}function $(q,Z){var ee=q.index,ae=q.trace||{},he=q.cd[0],xe=q.cd[ee]||{};function we(ke){return ke||p(ke)&&ke===0}var Me=Array.isArray(ee)?function(ke,_e){var ce=b.castOption(he,ee,ke);return we(ce)?ce:b.extractOption({},ae,"",_e)}:function(ke,_e){return b.extractOption(xe,ae,ke,_e)};function Se(ke,_e,ce){var ve=Me(_e,ce);we(ve)&&(q[ke]=ve)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("fontWeight","htw","hoverlabel.font.weight"),Se("fontStyle","hty","hoverlabel.font.style"),Se("fontVariant","htv","hoverlabel.font.variant"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),q.posref=Z==="y"||Z==="closest"&&ae.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=b.constrain(q.x0,0,q.xa._length),q.x1=b.constrain(q.x1,0,q.xa._length),q.y0=b.constrain(q.y0,0,q.ya._length),q.y1=b.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ae.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ae.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,Z==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var Ve=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+Ve+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+Ve,Z==="y"&&(q.distance+=1)}var Ge=q.hoverinfo||q.trace.hoverinfo;return Ge&&Ge!=="all"&&(Ge=Array.isArray(Ge)?Ge:Ge.split("+"),Ge.indexOf("x")===-1&&(q.xLabel=void 0),Ge.indexOf("y")===-1&&(q.yLabel=void 0),Ge.indexOf("z")===-1&&(q.zLabel=void 0),Ge.indexOf("text")===-1&&(q.text=void 0),Ge.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,Z,ee){var ae=ee.container,he=ee.fullLayout,xe=he._size,we=ee.event,Me=!!Z.hLinePoint,Se=!!Z.vLinePoint,Ie,Ve;if(ae.selectAll(".spikeline").remove(),!!(Se||Me)){var Ge=a.combine(he.plot_bgcolor,he.paper_bgcolor);if(Me){var ke=Z.hLinePoint,_e,ce;Ie=ke&&ke.xa,Ve=ke&&ke.ya;var ve=Ve.spikesnap;ve==="cursor"?(_e=we.pointerX,ce=we.pointerY):(_e=Ie._offset+ke.x,ce=Ve._offset+ke.y);var le=a.wcagContrast(ke.color,Ge)<1.5?a.contrast(Ge):ke.color,Ae=Ve.spikemode,Be=Ve.spikethickness,Xe=Ve.spikecolor||le,Ye=s.getPxPosition(q,Ve),yt,gt;if(Ae.indexOf("toaxis")!==-1||Ae.indexOf("across")!==-1){if(Ae.indexOf("toaxis")!==-1&&(yt=Ye,gt=_e),Ae.indexOf("across")!==-1){var Tt=Ve._counterDomainMin,At=Ve._counterDomainMax;Ve.anchor==="free"&&(Tt=Math.min(Tt,Ve.position),At=Math.max(At,Ve.position)),yt=xe.l+Tt*xe.w,gt=xe.l+At*xe.w}ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be,stroke:Xe,"stroke-dasharray":r.dashStyle(Ve.spikedash,Be)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ae.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:Ye+(Ve.side!=="right"?Be:-Be),cy:ce,r:Be,fill:Xe}).classed("spikeline",!0)}if(Se){var $t=Z.vLinePoint,rr,_r;Ie=$t&&$t.xa,Ve=$t&&$t.ya;var Xt=Ie.spikesnap;Xt==="cursor"?(rr=we.pointerX,_r=we.pointerY):(rr=Ie._offset+$t.x,_r=Ve._offset+$t.y);var or=a.wcagContrast($t.color,Ge)<1.5?a.contrast(Ge):$t.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||or,De=s.getPxPosition(q,Ie),Ne,We;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Ne=De,We=_r),Ot.indexOf("across")!==-1){var Ke=Ie._counterDomainMin,Je=Ie._counterDomainMax;Ie.anchor==="free"&&(Ke=Math.min(Ke,Ie.position),Je=Math.max(Je,Ie.position)),Ne=xe.t+(1-Je)*xe.h,We=xe.t+(1-Ke)*xe.h}ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:rr,cy:De-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,Z,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ae=ee.length-1;ae>=0;ae--){var he=ee[ae],xe=q._hoverdata[ae];if(he.curveNumber!==xe.curveNumber||String(he.pointNumber)!==String(xe.pointNumber)||String(he.pointNumbers)!==String(xe.pointNumbers)||he.binNumber!==xe.binNumber)return!0}return!1}function ne(q,Z){return!Z||Z.vLinePoint!==q._spikepoints.vLinePoint||Z.hLinePoint!==q._spikepoints.hLinePoint}function se(q,Z){return t.plainText(q||"",{len:Z,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function G(q,Z){for(var ee=Z.charAt(0),ae=[],he=[],xe=[],we=0;weq.offsetTop+q.clientTop,H=q=>q.offsetLeft+q.clientLeft;function Y(q,Z){var ee=q._fullLayout,ae=Z.getBoundingClientRect(),he=ae.left,xe=ae.top,we=he+ae.width,Me=xe+ae.height,Se=b.apply3DTransform(ee._invTransform)(he,xe),Ie=b.apply3DTransform(ee._invTransform)(we,Me),Ve=Se[0],Ge=Se[1],ke=Ie[0],_e=Ie[1];return{x:Ve,y:Ge,width:ke-Ve,height:_e-Ge,top:Math.min(Ge,_e),left:Math.min(Ve,ke),right:Math.max(Ve,ke),bottom:Math.max(Ge,_e)}}}}),c1=ze({"src/components/fx/hoverlabel_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover;V.exports=function(l,e,t,n){n=n||{};var r=e.legend;function a(o){n.font[o]||(n.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(n.font||(n.font={}),a("size"),a("family"),a("color"),a("weight"),a("style"),a("variant"),r?(n.bgcolor||(n.bgcolor=b.combine(e.legend.bgcolor,e.paper_bgcolor)),n.bordercolor||(n.bordercolor=e.legend.bordercolor)):n.bgcolor||(n.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",n.bgcolor),t("hoverlabel.bordercolor",n.bordercolor),t("hoverlabel.namelength",n.namelength),t("hoverlabel.showarrow",n.showarrow),p.coerceFont(t,"hoverlabel.font",n.font),t("hoverlabel.align",n.align)}}}),$I=ze({"src/components/fx/layout_global_defaults.js"(J,V){"use strict";var p=Nr(),b=c1(),E=rv();V.exports=function(l,e){function t(n,r){return p.coerce(l,e,E,n,r)}b(l,e,t)}}}),KI=ze({"src/components/fx/defaults.js"(J,V){"use strict";var p=Nr(),b=qm(),E=c1();V.exports=function(l,e,t,n){function r(o,s){return p.coerce(l,e,b,o,s)}var a=p.extendFlat({},n.hoverlabel);e.hovertemplate&&(a.namelength=-1),E(l,e,r,a)}}}),s5=ze({"src/components/fx/hovermode_defaults.js"(J,V){"use strict";var p=Nr(),b=rv();V.exports=function(k,l){function e(t,n){return l[t]!==void 0?l[t]:p.coerce(k,l,b,t,n)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),JI=ze({"src/components/fx/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=rv(),E=s5(),k=c1();V.exports=function(e,t){function n(m,h){return p.coerce(e,t,b,m,h)}var r=E(e,t);r&&(n("hoverdistance"),n("spikedistance"),r.indexOf("unified")!==-1&&n("hoversort"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,n),p.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),QI=ze({"src/components/fx/calc.js"(J,V){"use strict";var p=Nr(),b=mi();V.exports=function(l){var e=l.calcdata,t=l._fullLayout;function n(c){return function(m){return p.coerceHoverinfo({hoverinfo:m},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Dx=ze({"src/components/shapes/draw_newshape/constants.js"(J,V){"use strict";var p=32;V.exports={CIRCLE_SIDES:p,i000:0,i090:p/4,i180:p/2,i270:p/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Fx=ze({"src/components/selections/helpers.js"(J,V){"use strict";var p=Nr().strTranslate;function b(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(n){return b(e,n[t])}}function l(e){return p(e.xaxis._offset,e.yaxis._offset)}V.exports={p2r:b,r2p:E,axValue:k,getTransform:l}}}),uv=ze({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var V=Kw(),p=Dx(),b=p.CIRCLE_SIDES,E=p.SQRT2,k=Fx(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],n=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",m=0;m0&&w{let s=o.charAt(0),c=r[s].drawn!==void 0;return a+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,n,r){var a=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(n?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var m=k(e,t);return e._offset+e.r2p(s(c,!0))+m},e.type==="date"&&(o=J.decodeDate(o))}else n?o=function(c){return a.t+a.h*(1-c)}:o=function(c){return a.l+a.w*c};return o},J.getPixelToData=function(l,e,t,n){var r=l._fullLayout._size,a;if(e)if(n==="domain")a=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);a=function(s){return o(e.p2r(s-e._offset))}}else t?a=function(s){return 1-(s-r.t)/r.h}:a=function(s){return(s-r.l)/r.w};return a},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,n=Math.round(l);return t?n+.5:n},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&t.xref!=="paper"&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(n.yaxis=l._fullLayout[t.yref+"axis"])),n.xsizemode=t.xsizemode,n.ysizemode=t.ysizemode,n.xanchor=t.xanchor,n.yanchor=t.yanchor,{options:t,plotinfo:n}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(n.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:n}},J.getPathString=function(l,e){let t=e.type,n=b.getRefType(e.xref),r=b.getRefType(e.yref),a=l._fullLayout._size;var o,s,c,m,h,v,g,i,w,S,M,C;function _(O,D,B,F){var P;if(O)if(D==="domain")F?P=function(j){return O._offset+O._length*(1-j)}:P=function(j){return O._offset+O._length*j};else{let j=J.shapePositionToRange(O);P=function(U){return O._offset+O.r2p(j(U,!0))},B==="path"&&O.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return a.t+a.h*(1-j)}:P=function(j){return a.l+a.w*j};return P}if(n==="array"?(g=[],o=e.xref.map(function(O){return b.getFromId(l,O)}),g=e.xref.map(function(O,D){return _(o[D],b.getRefType(O),t,!1)})):(o=b.getFromId(l,e.xref),g=_(o,n,t,!1)),r==="array"?(i=[],s=e.yref.map(function(O){return b.getFromId(l,O)}),i=e.yref.map(function(O,D){return _(s[D],b.getRefType(O),t,!0)})):(s=b.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,g,i);if(n==="array")c=k(o[0],e.x0shift),m=k(o[1],e.x1shift),w=g[0](e.x0)+c,S=g[1](e.x1)+m;else if(c=k(o,e.x0shift),m=k(o,e.x1shift),e.xsizemode==="pixel"){let O=g(e.xanchor);w=O+e.x0+c,S=O+e.x1+m}else w=g(e.x0)+c,S=g(e.x1)+m;if(r==="array")h=k(s[0],e.y0shift),v=k(s[1],e.y1shift),M=i[0](e.y0)+h,C=i[1](e.y1)+v;else if(h=k(s,e.y0shift),v=k(s,e.y1shift),e.ysizemode==="pixel"){let O=i(e.yanchor);M=O-e.y0+h,C=O-e.y1+v}else M=i(e.y0)+h,C=i(e.y1)+v;if(t==="line")return"M"+w+","+M+"L"+S+","+C;if(t==="rect")return"M"+w+","+M+"H"+S+"V"+C+"H"+w+"Z";var T=(w+S)/2,f=(M+C)/2,u=Math.abs(T-w),A=Math.abs(f-M),x="A"+u+","+A,z=T+u+","+f,I=T+","+(f-A);return"M"+z+x+" 0 1,1 "+I+x+" 0 0,1 "+z+"Z"};function E(l,e,t){let n=l.path,r=l.xsizemode,a=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),m=Array.isArray(l.yref);var h=0,v=0;return n.replace(V.segmentRE,function(g){var i=0,w=g.charAt(0),S=V.paramIsX[w],M=V.paramIsY[w],C=V.numParams[w];let _=S.drawn!==void 0,T=M.drawn!==void 0,f=c?e[h]:e,u=m?t[v]:t;var A=g.slice(1).replace(V.paramRE,function(x){return S[i]?r==="pixel"?x=f(o)+Number(x):x=f(x):M[i]&&(a==="pixel"?x=u(s)-Number(x):x=u(x)),i++,i>C&&(x="X"),x});return i>C&&(A=A.replace(/[\s,]*X.*/,""),p.log("Ignoring extra params in segment "+g)),_&&h++,T&&v++,w+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),u5=ze({"src/components/shapes/display_labels.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Cs(),k=$i(),l=uv().readPaths,e=cv(),t=e.getPathString,n=Sx(),r=dc().FROM_TL;V.exports=function(c,m,h,v){if(v.selectAll(".shape-label").remove(),!!(h.label.text||h.label.texttemplate)){var g;if(h.label.texttemplate){var i={};if(h.type!=="path"){var w=b.getFromId(c,h.xref),S=b.getFromId(c,h.yref);let Z=Array.isArray(h.xref),ee=Array.isArray(h.yref);for(var M in n){var C=typeof n[M]=="function",_=!Z||n.simpleXVariables.includes(M),T=!ee||n.simpleYVariables.includes(M);if(C&&_&&T){var f=n[M](h,w,S);f!==void 0&&(i[M]=f)}}}g=p.texttemplateStringForShapes({data:[i],fallback:h.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:h.label.texttemplate})}else g=h.label.text;var u={"data-index":m},A=h.label.font,x={"data-notex":1},z=v.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(x).classed("shape-label-text",!0).text(g),O,D,B,F;if(h.path){var P=t(c,h),j=l(P,c);O=1/0,B=1/0,D=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,ce,!1,le)(_e),ke=(_e,ce,ve,le)=>e.getDataToPixel(c,ve,ce,!0,le)(_e);if(h.xsizemode==="pixel"){let _e=Ge(h.xanchor,void 0,ae,Me),ce=e.getPixelShift(ae,h.x0shift),ve=e.getPixelShift(ae,h.x1shift);O=_e+h.x0+ce,D=_e+h.x1+ve}else O=Ge(h.x0,h.x0shift,ae,Me),D=Ge(h.x1,h.x1shift,he,Se);if(h.ysizemode==="pixel"){let _e=ke(h.yanchor,void 0,xe,Ie),ce=e.getPixelShift(xe,h.y0shift),ve=e.getPixelShift(xe,h.y1shift);B=_e-h.y0+ce,F=_e-h.y1+ve}else B=ke(h.y0,h.y0shift,xe,Ie),F=ke(h.y1,h.y1shift,we,Ve)}var G=h.label.textangle;G==="auto"&&(h.type==="line"?G=a(O,B,D,F):G=0),I.call(function(Z){return Z.call(k.font,A).attr({}),E.convertToTspans(Z,c),Z});var X=k.bBox(I.node()),K=o(O,B,D,F,h,G,X),H=K.textx,Y=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:Y,x:H,transform:"rotate("+G+","+H+","+Y+")"}).call(E.positionText,H,Y)}};function a(s,c,m,h){var v,g;return g=Math.abs(m-s),m>=s?v=c-h:v=h-c,-180/Math.PI*Math.atan2(v,g)}function o(s,c,m,h,v,g,i){var w=v.label.textposition,S=v.label.textangle,M=v.label.padding,C=v.type,_=Math.PI/180*g,T=Math.sin(_),f=Math.cos(_),u=v.label.xanchor,A=v.label.yanchor,x,z,I,O;if(C==="line"){w==="start"?(x=s,z=c):w==="end"?(x=m,z=h):(x=(s+m)/2,z=(c+h)/2),u==="auto"&&(w==="start"?S==="auto"?m>s?u="left":ms?u="right":ms?u="right":ms?u="left":m1&&!(ke.length===2&&ke[1][0]==="Z")&&(G===0&&(ke[0][0]="M"),x[se]=ke,B(),F())}}function he(ke,_e){if(ke===2){se=+_e.srcElement.getAttribute("data-i"),G=+_e.srcElement.getAttribute("data-j");var ce=x[se];!g(ce)&&!i(ce)&&ae()}}function xe(ke){re=[];for(var _e=0;_e{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,D.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,D.id)}})}function _(I,O,D){let B=D.xref,F=D.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+O._fullLayout._uid+"shape"+D._index,j=T(O,B,F);E.ensureSingleById(O._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),a.setClipUrl(I,P,O)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");a.setClipUrl(I,P?"clip"+O._fullLayout._uid+P:null,O)}}function T(I,O,D){let B=I._fullLayout._size;function F(U,$){let Q=(Array.isArray(U)?U:[U]).map(se=>k.getFromId(I,se)).filter(Boolean);if(!Q.length)return $?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(se){return se._offset}),ne=Q.map(function(se){return se._offset+se._length});return[Math.min(...re),Math.max(...ne)]}let P=F(O,!1),j=F(D,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function f(I,O,D,B,F,P){var j=10,U=10,$=D.xsizemode==="pixel",Q=D.ysizemode==="pixel",re=D.type==="line",ne=D.type==="path",se=P.modifyItem,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve=p.select(O.node().parentNode),Ge=k.getFromId(I,D.xref),ke=k.getRefType(D.xref),_e=k.getFromId(I,D.yref),ce=k.getRefType(D.yref),ve=D.x0shift,le=D.x1shift,Ae=D.y0shift,Be=D.y1shift,Xe=function(Je,et){var Mt=v.getDataToPixel(I,Ge,et,!1,ke);return Mt(Je)},Ye=function(Je,et){var Mt=v.getDataToPixel(I,_e,et,!0,ce);return Mt(Je)},yt=v.getPixelToData(I,Ge,!1,ke),gt=v.getPixelToData(I,_e,!0,ce),Tt=rr(),At={element:Tt.node(),gd:I,prepFn:or,doneFn:Ot,clickFn:vt},$t;s.init(At),Tt.node().onmousemove=Xt;function rr(){return re?_r():O}function _r(){var Je=10,et=Math.max(D.line.width,Je),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",O.attr("d")).style({cursor:"move","stroke-width":et,"stroke-opacity":"0"});var pt={"fill-opacity":"0"},Pt=Math.max(et/2,Je);return Mt.append("circle").attr({"data-line-point":"start-point",cx:$?Xe(D.xanchor)+D.x0:Xe(D.x0,ve),cy:Q?Ye(D.yanchor)-D.y0:Ye(D.y0,Ae),r:Pt}).style(pt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:$?Xe(D.xanchor)+D.x1:Xe(D.x1,le),cy:Q?Ye(D.yanchor)-D.y1:Ye(D.y1,Be),r:Pt}).style(pt).classed("cursor-grab",!0),Mt}function Xt(Je){if(w(I)){$t=null;return}if(re)Je.target.tagName==="path"?$t="move":$t=Je.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var et=At.element.getBoundingClientRect(),Mt=et.right-et.left,pt=et.bottom-et.top,Pt=Je.clientX-et.left,Ct=Je.clientY-et.top,qt=!ne&&Mt>j&&pt>U&&!Je.shiftKey?s.getCursor(Pt/Mt,1-Ct/pt):"move";m(O,qt),$t=qt.split("-")[0]}}function or(Je){w(I)||($&&(Y=Xe(D.xanchor)),Q&&(q=Ye(D.yanchor)),D.type==="path"?Ie=D.path:(G=$?D.x0:Xe(D.x0),X=Q?D.y0:Ye(D.y0),K=$?D.x1:Xe(D.x1),H=Q?D.y1:Ye(D.y1)),GH?(Z=X,xe="y0",ee=H,we="y1"):(Z=H,xe="y1",ee=X,we="y0"),Xt(Je),Ne(F,D),Ke(O,D,I),At.moveFn=$t==="move"?ht:De,At.altKey=Je.altKey)}function Ot(){w(I)||(m(O),We(F),_(O,I,D),b.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){w(I)||We(F)}function ht(Je,et){if(D.type==="path"){var Mt=function(Ct){return Ct},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(qt){return yt(Xe(qt)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(qt){return gt(Ye(qt)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else $?se("xanchor",D.xanchor=yt(Y+Je)):(se("x0",D.x0=yt(G+Je)),se("x1",D.x1=yt(K+Je))),Q?se("yanchor",D.yanchor=gt(q+et)):(se("y0",D.y0=gt(X+et)),se("y1",D.y1=gt(H+et)));O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function De(Je,et){if(ne){var Mt=function(Zr){return Zr},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(ha){return yt(Xe(ha)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(ha){return gt(Ye(ha)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else if(re){if($t==="resize-over-start-point"){var Ct=G+Je,qt=Q?X-et:X+et;se("x0",D.x0=$?Ct:yt(Ct)),se("y0",D.y0=Q?qt:gt(qt))}else if($t==="resize-over-end-point"){var Vt=K+Je,Ht=Q?H-et:H+et;se("x1",D.x1=$?Vt:yt(Vt)),se("y1",D.y1=Q?Ht:gt(Ht))}}else{var Sr=function(Zr){return $t.indexOf(Zr)!==-1},Kr=Sr("n"),Yt=Sr("s"),Rt=Sr("w"),nr=Sr("e"),ur=Kr?Z+et:Z,cr=Yt?ee+et:ee,Rr=Rt?ae+Je:ae,Qr=nr?he+Je:he;Q&&(Kr&&(ur=Z-et),Yt&&(cr=ee-et)),(!Q&&cr-ur>U||Q&&ur-cr>U)&&(se(xe,D[xe]=Q?ur:gt(ur)),se(we,D[we]=Q?cr:gt(cr))),Qr-Rr>j&&(se(Me,D[Me]=$?Rr:yt(Rr)),se(Se,D[Se]=$?Qr:yt(Qr)))}O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function Ne(Je,et){($||Q)&&Mt();function Mt(){var pt=et.type!=="path",Pt=Je.selectAll(".visual-cue").data([0]),Ct=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var qt=Xe($?et.xanchor:E.midRange(pt?[et.x0,et.x1]:v.extractPathCoords(et.path,h.paramIsX))),Vt=Ye(Q?et.yanchor:E.midRange(pt?[et.y0,et.y1]:v.extractPathCoords(et.path,h.paramIsY)));if(qt=v.roundPositionForSharpStrokeRendering(qt,Ct),Vt=v.roundPositionForSharpStrokeRendering(Vt,Ct),$&&Q){var Ht="M"+(qt-1-Ct)+","+(Vt-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",Ht)}else if($){var Sr="M"+(qt-1-Ct)+","+(Vt-9-Ct)+"v18 h2 v-18 Z";Pt.attr("d",Sr)}else{var Kr="M"+(qt-9-Ct)+","+(Vt-1-Ct)+"h18 v2 h-18 Z";Pt.attr("d",Kr)}}}function We(Je){Je.selectAll(".visual-cue").remove()}function Ke(Je,et,Mt){var pt=et.xref,Pt=et.yref,Ct=k.getFromId(Mt,pt),qt=k.getFromId(Mt,Pt),Vt="";pt!=="paper"&&!Ct.autorange&&(Vt+=pt),Pt!=="paper"&&!qt.autorange&&(Vt+=Pt),a.setClipUrl(Je,Vt?"clip"+Mt._fullLayout._uid+Vt:null,Mt)}}function u(I,O,D){return I.replace(h.segmentRE,function(B){var F=0,P=B.charAt(0),j=h.paramIsX[P],U=h.paramIsY[P],$=h.numParams[P],Q=B.slice(1).replace(h.paramRE,function(re){return F>=$||(j[F]?re=O(re):U[F]&&(re=D(re)),F++),re});return P+Q})}function A(I,O){if(S(I)){var D=O.node(),B=+D.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){x(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=x,i(I)}}}function x(I){if(S(I)){var O=I._fullLayout._activeShapeIndex;O>=0&&(n(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){n(I);var O=I._fullLayout._activeShapeIndex,D=(I.layout||{}).shapes||[];if(O{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),n===b.plotlyServerURL){let m=s.append("div").classed("plotly-cloud-dialog-message",!0),h=new URL(n).origin,v=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),g=v[0],i=v[2],w=v[4];m.append("span").text(g),m.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",h).attr("target","_blank").text(i),m.append("span").text(w),m.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let m=new URL(n),h=m.hostname,v=m.origin,g=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=g[0],w=g[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",v).attr("target","_blank").text(h),S.append("span").text(w)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",a),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,n)=>{let r=p.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let a=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{a.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),a.on("click",()=>{p.event.target===a.node()&&o()}),k(e,a,t,()=>{o(),n()},o)};V.exports=l}}),c5=ze({"src/components/modebar/buttons.js"(J,V){"use strict";var p=mi(),b=cl(),E=Xl(),k=Ix(),l=Ox().eraseActiveShape,e=rD(),t=Nr(),n=t._,r=V.exports={};r.toImage={name:"toImage",title:function(_){var T=_._context.toImageButtonOptions||{},f=T.format||"png";return f==="png"?n(_,"Download plot as a PNG"):n(_,"Download plot")},icon:k.camera,click:function(_){var T=_._context.toImageButtonOptions,f={format:T.format||"png"};t.notifier(n(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in T&&(f[u]=T[u])}),p.call("downloadImage",_,f).then(function(u){t.notifier(n(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return n(_,"Share chart...")},icon:k.cloudupload,click:function(_){var T=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!T){console.error("No destination URL provided (plotlyServerURL is empty)");return}var f;try{f=new URL(T)}catch{console.error("Invalid plotlyServerURL: "+T);return}let u=["http:","https:"];if(!u.includes(f.protocol)){console.error(`Invalid protocol '${f.protocol}' in plotlyServerURL '${T}'. Must be one of: ${u.join(", ")}`);return}e(_,T,function(){b.sendDataToCloud(_,T)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return n(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:a},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return n(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:a},r.select2d={name:"select2d",_cat:"select",title:function(_){return n(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:a},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return n(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:a},r.drawclosedpath={name:"drawclosedpath",title:function(_){return n(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:a},r.drawopenpath={name:"drawopenpath",title:function(_){return n(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:a},r.drawline={name:"drawline",title:function(_){return n(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:a},r.drawrect={name:"drawrect",title:function(_){return n(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:a},r.drawcircle={name:"drawcircle",title:function(_){return n(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:a},r.eraseshape={name:"eraseshape",title:function(_){return n(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return n(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:a},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return n(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:a},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return n(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:a},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return n(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:a},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return n(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:a},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return n(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:a};function a(_,T){var f=T.currentTarget,u=f.getAttribute("data-attr"),A=f.getAttribute("data-val")||!0,x=_._fullLayout,z={},I=E.list(_,null,!0),O=x._cartesianSpikesEnabled,D,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,$;for(B=0;B-K),[$,Q]=F.invert(B.midPt),{minscale:re}=D.projection,ne=(f=D.projection.maxscale)!=null?f:1/0,se=Math.min(re,ne),G=Math.max(re,ne),X=x==="in"?h*P:1/h*P;X>G?X=G:Xd5});var jx,h5,d5,p5=zi({"src/components/modebar/attributes.ts"(){"use strict";jx=Yl(f5()),h5={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${jx.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${jx.default.foreButtons.join("*, *")}*.`].join(" ")}},d5=h5}}),aD=ze({"src/components/modebar/defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=(p5(),Po(Nx)).default;V.exports=function(e,t){var n=e.modebar||{},r=E.newContainer(t,"modebar");function a(s,c){return p.coerce(n,r,k,s,c)}a("orientation"),a("bgcolor",b.addOpacity(t.paper_bgcolor,.5));var o=b.contrast(b.rgb(t.modebar.bgcolor));a("color",b.addOpacity(o,.3)),a("activecolor",b.addOpacity(o,.7)),a("uirevision",t.uirevision),a("add"),a("remove")}}}),nD=ze({"src/components/modebar/modebar.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Ix(),l=ev().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var n=t.prototype;n.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,m=this.graphInfo._fullLayout,h="modebar-"+m._uid;this.element.setAttribute("id",h),this.element.setAttribute("role","toolbar"),this._uid=h,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),m.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=m.modebar,g="#"+h+" .modebar-group";document.querySelectorAll(g).forEach(function(C){C.style.backgroundColor=v.bgcolor});var i=!this.hasButtons(s),w=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||w||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.watermark&&(M.className=M.className+" watermark"),m.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),E.setStyleOnHover("#"+h+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},n.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var m=s.createGroup();c.forEach(function(h){var v=h.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 g=s.createButton(h);s.buttonElements.push(g),m.appendChild(g)}),s.element.appendChild(m)})},n.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},n.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var m=o.title;m===void 0?m=o.name:typeof m=="function"&&(m=m(this.graphInfo)),(m||m===0)&&(c.setAttribute("data-title",m),c.setAttribute("aria-label",m)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var h=o.val;h!==void 0&&(typeof h=="function"&&(h=h(this.graphInfo)),c.setAttribute("data-val",h));var v=o.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&p.select(c).classed("active",!0);var g=o.icon;return typeof g=="function"?c.appendChild(g()):c.appendChild(this.createIcon(g||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},n.createIcon=function(o){var s=b(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",m;if(o.path){m=document.createElementNS(c,"svg"),m.setAttribute("viewBox",[0,0,o.width,s].join(" ")),m.setAttribute("class","icon");var h=document.createElementNS(c,"path");h.setAttribute("d",o.path),o.transform?h.setAttribute("transform",o.transform):o.ascent!==void 0&&h.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),m.appendChild(h)}if(o.svg){var v=e.parseFromString(o.svg,"application/xml");m=v.childNodes[0]}return m.setAttribute("height","1em"),m.setAttribute("width","1em"),m},n.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(m){var h=m.getAttribute("data-val")||!0,v=m.getAttribute("data-attr"),g=m.getAttribute("data-toggle")==="true",i=p.select(m),w=function(C,_){var T=s.modebar,f=C.querySelector(".icon path");f&&(_||C.matches(":hover")?f.style.fill=T.activecolor:f.style.fill=T.color)};if(g){if(v===c){var S=!i.classed("active");i.classed("active",S),w(m,S)}}else{var M=v===null?v:E.nestedProperty(s,v).get();i.classed("active",M===h),w(m,M===h)}})},n.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ne=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ne=["resetGeo"]):f?(re=["hoverClosest3d"],ne=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ne=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ne=["resetViewSankey"]):re=["toggleHover"],T&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(g)||P)&&(re=[]),T&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ne[0]!=="resetViews"&&(ne=["resetScale2d"])),f?se=["zoom3d","pan3d","orbitRotation","tableRotation"]:T&&!F||z?se=["zoom2d","pan2d"]:I||u?se=["pan2d"]:O&&(se=["zoom2d"]),o(g)&&se.push("select2d","lasso2d");var G=[],X=function(q){G.indexOf(q)===-1&&re.indexOf(q)!==-1&&G.push(q)};if(Array.isArray(C)){for(var K=[],H=0;HS?g.slice(S):i.slice(w))+M}function c(h,v){for(var g=v._size,i=g.h/g.w,w={},S=Object.keys(h),M=0;Me*z&&!B)){for(S=0;SG&&aene&&(ne=ae);var xe=(ne-re)/(2*se);u/=xe,re=_.l2r(re),ne=_.l2r(ne),_.range=_._input.range=U<$?[re,ne]:[ne,re]}m(_,u)}}}},J.getAxisGroup=function(v,g){for(var i=v._axisMatchGroups,w=0;w=F[1]||$[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,$=a.list(F,"",!0),Q,re,ne,se,G,X;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return b.previousPromises(F);function K(De,Ne,We){var Ke=De._lw/2;if(De._id.charAt(0)==="x"){if(Ne){if(We==="top")return Ne._offset-U-Ke}else return j.t+j.h*(1-(De.position||0))+Ke%1;return Ne._offset+Ne._length+U+Ke}if(Ne){if(We==="right")return Ne._offset+Ne._length+U+Ke}else return j.l+j.w*(De.position||0)+Ke%1;return Ne._offset-U-Ke}for(Q=0;Q<$.length;Q++){se=$[Q];var H=se._anchorAxis;se._linepositions={},se._lw=t.crispRound(F,se.linewidth,1),se._mainLinePosition=K(se,H,se.side),se._mainMirrorPosition=se.mirror&&H?K(se,H,o.OPPOSITE_SIDE[se.side]):null}var Y=[],q=[],Z=[],ee=e.opacity(P.paper_bgcolor)===1&&e.opacity(P.plot_bgcolor)===1&&P.paper_bgcolor===P.plot_bgcolor;for(re in P._plots)if(ne=P._plots[re],ne.mainplot)ne.bg&&ne.bg.remove(),ne.bg=void 0;else{var ae=ne.xaxis.domain,he=ne.yaxis.domain,xe=ne.plotgroup;if(S(ae,he,Z)&&re.indexOf(w)===-1){var we=xe.node(),Me=ne.bg=E.ensureSingle(xe,"rect","bg");we.insertBefore(Me.node(),we.childNodes[0]),q.push(re)}else xe.select("rect.bg").remove(),Z.push([ae,he]),ee||(Y.push(re),q.push(re))}var Se=P._bgLayer.selectAll(".bg").data(Y);for(Se.enter().append("rect").classed("bg",!0),Se.exit().remove(),Se.each(function(De){P._plots[De].bg=V.select(this)}),Q=0;Q0){x(F,Q,G,se),ne.attr({x:re,y:Q,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Q);var X=(P.text.match(k.BR_TAG_ALL)||[]).length;if(X){var K=o.LINE_SPACING*X+o.MID_SHIFT;P.y===0&&(K=-K),ne.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var H=V.select(F).selectAll(".gtitle-subtitle");if(H.node()){var Y=ne.node().getBBox(),q=Y.y+Y.height,Z=q+n.SUBTITLE_PADDING_EM*P.subtitle.font.size;H.attr({x:re,y:Z,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Z)}}}};function f(F,P,j,U,$){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-$,ne=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ne<$}function u(F,P,j,U,$){var Q=0;return j==="middle"&&(Q+=$/2),F==="t"?(j==="top"&&(Q+=$),Q+=U-P*U):(j==="bottom"&&(Q+=$),Q+=P*U),Q}function A(F,P,j){var U=P.y,$=P.yanchor,Q=U>.5?"t":"b",re=F._fullLayout.margin[Q],ne=0;return P.yref==="paper"?ne=j+P.pad.t+P.pad.b:P.yref==="container"&&(ne=u(Q,U,$,F._fullLayout.height,j)+P.pad.t+P.pad.b),ne>re?ne:0}function x(F,P,j,U){var $="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ne={x:Q.x,y:Q.y,t:0,b:0},se={};Q.yref==="paper"&&f(F,Q,re,P,U)?ne[re]=j:Q.yref==="container"&&(se[re]=j,F._fullLayout._reservedMargin[$]=se),b.allowAutoMargin(F,$),b.autoMargin(F,$,ne)}function z(F,P){var j=F.title,U=F._size,$=0;switch(P===v?$=j.pad.l:P===i&&($=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+$;case"container":default:return F.width*j.x+$}}function I(F,P){var j=F.title,U=F._size,$=0;if(P==="0em"||!P?$=-j.pad.b:P===o.CAP_SHIFT+"em"&&($=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+$;case"container":default:return F.height-F.height*j.y+$}}function O(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function D(F){var P=F.title,j=g;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=v),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;D--){var B=C.append("path").attr(T).style("opacity",D?.1:f).call(k.stroke,A).call(k.fill,u).call(l.dashLine,D?"solid":z,D?4+x:x);if(s(B,v,w),I){var F=e(v.layout,"selections",w);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:v,editHelpers:F,isActiveSelection:!0},j=p(_,v);b(j,B,P)}else B.style("pointer-events",D?"all":"none");O[D]=B}var U=O[0],$=O[1];$.node().addEventListener("click",function(){return c(v,U)})}}function s(v,g,i){var w=i.xref+i.yref;l.setClipUrl(v,"clip"+g._fullLayout._uid+w,g)}function c(v,g){if(a(v)){var i=g.node(),w=+i.getAttribute("data-index");if(w>=0){if(w===v._fullLayout._activeSelectionIndex){h(v);return}v._fullLayout._activeSelectionIndex=w,v._fullLayout._deactivateSelection=h,r(v)}}}function m(v){if(a(v)){var g=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=g,v._fullLayout._deactivateSelection=h,r(v)}}function h(v){if(a(v)){var g=v._fullLayout._activeSelectionIndex;g>=0&&(E(v),delete v._fullLayout._activeSelectionIndex,r(v))}}}}),oD=ze({"node_modules/polybooljs/lib/build-log.js"(J,V){function p(){var b,E=0,k=!1;function l(e,t){return b.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),b}return b={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,n){return l("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,n){return l("status",{seg:e,above:t,below:n})},vert:function(e){return e===k?b:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},b}V.exports=p}}),sD=ze({"node_modules/polybooljs/lib/epsilon.js"(J,V){function p(b){typeof b!="number"&&(b=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(b=k),b},pointAboveOrOnLine:function(k,l,e){var t=l[0],n=l[1],r=e[0],a=e[1],o=k[0],s=k[1];return(r-t)*(s-n)-(a-n)*(o-t)>=-b},pointBetween:function(k,l,e){var t=k[1]-l[1],n=e[0]-l[0],r=k[0]-l[0],a=e[1]-l[1],o=r*n+t*a;if(o-b)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])b!=r-t>b&&(n-s)*(t-c)/(r-c)+s-e>b&&(a=!a),n=s,r=c}return a}};return E}V.exports=p}}),lD=ze({"node_modules/polybooljs/lib/linked-list.js"(J,V){var p={create:function(){var b={root:{root:!0,next:null},exists:function(E){return!(E===null||E===b.root)},isEmpty:function(){return b.root.next===null},getHead:function(){return b.root.next},insertBefore:function(E,k){for(var l=b.root,e=b.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=b.root,l=b.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===b.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return b},node:function(b){return b.prev=null,b.next=null,b.remove=function(){b.prev.next=b.next,b.next&&(b.next.prev=b.prev),b.prev=null,b.next=null},b}};V.exports=p}}),uD=ze({"node_modules/polybooljs/lib/intersecter.js"(J,V){var p=lD();function b(E,k,l){function e(g,i){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:null,below:null},otherFill:null}}function t(g,i,w){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:w.myFill.above,below:w.myFill.below},otherFill:null}}var n=p.create();function r(g,i,w,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(w,C)?0:g!==S?g?1:-1:k.pointAboveOrOnLine(w,S?M:C,S?C:M)?1:-1}function a(g,i){n.insertBefore(g,function(w){var S=r(g.isStart,g.pt,i,w.isStart,w.pt,w.other.pt);return S<0})}function o(g,i){var w=p.node({isStart:!0,pt:g.start,seg:g,primary:i,other:null,status:null});return a(w,g.end),w}function s(g,i,w){var S=p.node({isStart:!1,pt:i.end,seg:i,primary:w,other:g,status:null});g.other=S,a(S,g.pt)}function c(g,i){var w=o(g,i);return s(w,g,i),w}function m(g,i){l&&l.segmentChop(g.seg,i),g.other.remove(),g.seg.end=i,g.other.pt=i,a(g.other,g.pt)}function h(g,i){var w=t(i,g.seg.end,g.seg);return m(g,i),c(w,g.primary)}function v(g,i){var w=p.create();function S(F,P){var j=F.seg.start,U=F.seg.end,$=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,$,Q)?k.pointsCollinear(U,$,Q)||k.pointAboveOrOnLine(U,$,Q)?1:-1:k.pointAboveOrOnLine(j,$,Q)?1:-1}function M(F){return w.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,$=j.start,Q=j.end,re=U.start,ne=U.end;l&&l.checkIntersection(j,U);var se=k.linesIntersect($,Q,re,ne);if(se===!1){if(!k.pointsCollinear($,Q,re)||k.pointsSame($,ne)||k.pointsSame(Q,re))return!1;var G=k.pointsSame($,re),X=k.pointsSame(Q,ne);if(G&&X)return P;var K=!G&&k.pointBetween($,re,ne),H=!X&&k.pointBetween(Q,re,ne);if(G)return H?h(P,Q):h(F,ne),P;K&&(X||(H?h(P,Q):h(F,ne)),h(P,$))}else se.alongA===0&&(se.alongB===-1?h(F,re):se.alongB===0?h(F,se.pt):se.alongB===1&&h(F,ne)),se.alongB===0&&(se.alongA===-1?h(P,$):se.alongA===0?h(P,se.pt):se.alongA===1&&h(P,Q));return!1}for(var _=[];!n.isEmpty();){var T=n.getHead();if(l&&l.vert(T.pt[0]),T.isStart){let F=function(){if(A){var P=C(T,A);if(P)return P}return x?C(T,x):!1};var f=F;l&&l.segmentNew(T.seg,T.primary);var u=M(T),A=u.before?u.before.ev:null,x=u.after?u.after.ev:null;l&&l.tempStatus(T.seg,A?A.seg:!1,x?x.seg:!1);var z=F();if(z){if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=T.seg.myFill;l&&l.segmentUpdate(z.seg),T.other.remove(),T.remove()}if(n.getHead()!==T){l&&l.rewind(T.seg);continue}if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,x?T.seg.myFill.below=x.seg.myFill.above:T.seg.myFill.below=g,I?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var O;x?T.primary===x.primary?O=x.seg.otherFill.above:O=x.seg.myFill.above:O=T.primary?i:g,T.seg.otherFill={above:O,below:O}}l&&l.status(T.seg,A?A.seg:!1,x?x.seg:!1),T.other.status=u.insert(p.node({ev:T}))}else{var D=T.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(w.exists(D.prev)&&w.exists(D.next)&&C(D.prev.ev,D.next.ev),l&&l.statusRemove(D.ev.seg),D.remove(),!T.primary){var B=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=B}_.push(T.seg)}n.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(g){for(var i,w=g[g.length-1],S=0;St!=h>t&&e<(m-s)*(t-c)/(h-c)+s;v&&(n=!n)}return n}}}),p1=ze({"src/lib/polygon.js"(J,V){"use strict";var p=Mx().dot,b=No().BADNUM,E=V.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],n=t,r=e[0][1],a=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;on||M===b||Ma||w&&c(i))}function h(i,w){var S=i[0],M=i[1];if(S===b||Sn||M===b||Ma)return!1;var C=e.length,_=e[0][0],T=e[0][1],f=0,u,A,x,z,I;for(u=1;uMath.max(A,_)||M>Math.max(x,T)))if(Mo||Math.abs(p(h,c))>n)return!0;return!1},E.filter=function(l,e){var t=[l[0]],n=0,r=0;function a(s){l.push(s);var c=t.length,m=n;t.splice(r+1);for(var h=m+1;h1){var o=l.pop();a(o)}return{addPt:a,raw:l,filtered:t}}}}),vD=ze({"src/components/selections/constants.js"(J,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),mD=ze({"src/components/selections/select.js"(J,V){"use strict";var p=dD(),b=pD(),E=mi(),k=$i().dashStyle,l=Qn(),e=Zl(),t=kh().makeEventData,n=Fd(),r=n.freeMode,a=n.rectMode,o=n.drawMode,s=n.openMode,c=n.selectMode,m=cv(),h=h1(),v=Bx(),g=iv().clearOutline,i=uv(),w=i.handleEllipse,S=i.readPaths,M=zx().newShapes,C=l5(),_=g5().activateLastSelection,T=Nr(),f=T.sorterAsc,u=p1(),A=Cx(),x=Xl().getFromId,z=f1(),I=d1().redrawReglTraces,O=vD(),D=O.MINSELECT,B=u.filter,F=u.tester,P=Fx(),j=P.p2r,U=P.axValue,$=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,De,Ne,We){var Ke=!Q(Ne),Je=r(We),et=a(We),Mt=s(We),pt=o(We),Pt=c(We),Ct=We==="drawline",qt=We==="drawcircle",Vt=Ct||qt,Ht=Ne.gd,Sr=Ht._fullLayout,Kr=Pt&&Sr.newselection.mode==="immediate"&&Ke,Yt=Sr._zoomlayer,Rt=Ne.element.getBoundingClientRect(),nr=Ne.plotinfo,ur=$(nr),cr=ht-Rt.left,Rr=De-Rt.top;Sr._calcInverseTransform(Ht);var Qr=T.apply3DTransform(Sr._invTransform)(cr,Rr);cr=Qr[0],Rr=Qr[1];var Zr=Sr._invScaleX,ha=Sr._invScaleY,Pa=cr,La=Rr,un="M"+cr+","+Rr,Xa=Ne.xaxes[0],ja=Ne.yaxes[0],Nn=Xa._length,yn=ja._length,Un=vt.altKey&&!(o(We)&&Mt),li,Yn,on,en,vi,Yi,Ja;H(vt,Ht,Ne),Je&&(li=B([[cr,Rr]],O.BENDPX));var Oa=Yt.selectAll("path.select-outline-"+nr.id).data([1]),lt=pt?Sr.newshape:Sr.newselection;pt&&(Ne.hasText=lt.label.text||lt.label.texttemplate);var rt=pt&&!Mt?lt.fillcolor:"rgba(0,0,0,0)",fr=lt.line.color||(Ke?l.contrast(Ht._fullLayout.plot_bgcolor):"#7f7f7f");Oa.enter().append("path").attr("class","select-outline select-outline-"+nr.id).style({opacity:pt?lt.opacity/2:1,"stroke-dasharray":k(lt.line.dash,lt.line.width),"stroke-width":lt.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,fr).call(l.fill,rt).attr("fill-rule","evenodd").classed("cursor-move",!!pt).attr("transform",ur).attr("d",un+"Z");var lr=Yt.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",ur).attr("d","M0,0Z");if(pt&&Ne.hasText){var Tr=Yt.select(".label-temp");Tr.empty()&&(Tr=Yt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ir=Sr._uid+O.SELECTID,Dr=[],ot=ae(Ht,Ne.xaxes,Ne.yaxes,Ne.subplot);Kr&&!vt.shiftKey&&(Ne._clearSubplotSelections=function(){if(Ke){var jt=Xa._id,ar=ja._id;Xe(Ht,jt,ar,ot);for(var Er=(Ht.layout||{}).selections||[],xr=[],zr=!1,Lr=0;Lr=0){Ht._fullLayout._deactivateShape(Ht);return}if(!pt){var Er=Sr.clickmode;A.done(Ir).then(function(){if(A.clear(Ir),jt===2){for(Oa.remove(),vi=0;vi-1&&ne(ar,Ht,Ne.xaxes,Ne.yaxes,Ne.subplot,Ne,Oa),Er==="event"&&or(Ht,void 0);e.click(Ht,ar,nr.id)}).catch(T.error)}},Ne.doneFn=function(){lr.remove(),A.done(Ir).then(function(){A.clear(Ir),!Kr&&en&&Ne.selectionDefs&&(en.subtract=Un,Ne.selectionDefs.push(en),Ne.mergedPolygons.length=0,[].push.apply(Ne.mergedPolygons,on)),(Kr||pt)&&Z(Ne,Kr),Ne.doneFnCompleted&&Ne.doneFnCompleted(Dr),Pt&&or(Ht,Ja)}).catch(T.error)}}function ne(vt,ht,De,Ne,We,Ke,Je){var et=ht._hoverdata,Mt=ht._fullLayout,pt=Mt.clickmode,Pt=pt.indexOf("event")>-1,Ct=[],qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;if(xe(et)){H(vt,ht,Ke),qt=ae(ht,De,Ne,We);var Rr=we(et,qt),Qr=Rr.pointNumbers.length>0;if(Qr?Se(qt,Rr):Ie(qt)&&(Rt=Me(Rr))){for(Je&&Je.remove(),cr=0;cr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function Z(vt,ht){var De=vt.dragmode,Ne=vt.plotinfo,We=vt.gd;Y(We)&&We._fullLayout._deactivateShape(We),q(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,Je=Ke._zoomlayer,et=o(De),Mt=c(De);if(et||Mt){var pt=Je.selectAll(".select-outline-"+Ne.id);if(pt&&We._fullLayout._outlining){var Pt;et&&(Pt=M(pt,vt)),Pt&&E.call("_guiRelayout",We,{shapes:Pt});var Ct;Mt&&!Q(vt)&&(Ct=C(pt,vt)),Ct&&(We._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",We,{selections:Ct}).then(function(){ht&&_(We)})),We._fullLayout._outlining=!1}}Ne.selection={},Ne.selection.selectionDefs=vt.selectionDefs=[],Ne.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ae(vt,ht,De,Ne){if(!vt.calcdata)return[];var We=[],Ke=ht.map(ee),Je=De.map(ee),et,Mt,pt;for(pt=0;pt0,Ke=We?Ne[0]:De;return ht.selectedpoints?ht.selectedpoints.indexOf(Ke)>-1:!1}function Se(vt,ht){var De=[],Ne,We,Ke,Je;for(Je=0;Je0&&De.push(Ne);if(De.length===1&&(Ke=De[0]===ht.searchInfo,Ke&&(We=ht.searchInfo.cd[0].trace,We.selectedpoints.length===ht.pointNumbers.length))){for(Je=0;Je1||(ht+=Ne.selectedpoints.length,ht>1)))return!1;return ht===1}function Ve(vt,ht,De){var Ne,We;for(Ne=0;Ne-1&&ht;if(!Je&&ht){var jt=yt(vt,!0);if(jt.length){var ar=jt[0].xref,Er=jt[0].yref;if(ar&&Er){var xr=At(jt),zr=rr([x(vt,ar,"x"),x(vt,Er,"y")]);zr(Dr,xr)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&or(vt,Dr),qt._reselect=!1}if(!Je&&qt._deselect){var Lr=qt._deselect;et=Lr.xref,Mt=Lr.yref,Be(et,Mt,Pt)||Xe(vt,et,Mt,Ne),kt&&(Dr.points.length?or(vt,Dr):Ot(vt)),qt._deselect=!1}return{eventData:Dr,selectionTesters:De}}function Ae(vt){var ht=vt.calcdata;if(ht)for(var De=0;De=0){lt._fullLayout._deactivateShape(lt);return}var rt=lt._fullLayout.clickmode;if(G(lt),Ja===2&&!_e&&li(),ke)rt.indexOf("select")>-1&&T(Oa,lt,Be,Xe,he.id,pt),rt.indexOf("event")>-1&&a.click(lt,Oa,he.id);else if(Ja===1&&_e){var fr=Ie?ve:ce,lr=Ie==="s"||Ve==="w"?0:1,Tr=fr._name+".range["+lr+"]",Ir=F(fr,lr),Dr="left",ot="middle";if(fr.fixedrange)return;Ie?(ot=Ie==="n"?"top":"bottom",fr.side==="right"&&(Dr="right")):Ve==="e"&&(Dr="right"),lt._context.showAxisRangeEntryBoxes&&p.select(Mt).call(t.makeEditable,{gd:lt,immediate:!0,background:lt._fullLayout.paper_bgcolor,text:String(Ir),fill:fr.tickfont?fr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:ot}).on("edit",function(kt){var jt=fr.d2r(kt);jt!==void 0&&l.call("_guiRelayout",lt,Tr,jt)})}}c.init(pt);var qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;function Rr(Ja,Oa,lt){var rt=Mt.getBoundingClientRect();qt=Oa-rt.left,Vt=lt-rt.top,ae._fullLayout._calcInverseTransform(ae);var fr=b.apply3DTransform(ae._fullLayout._invTransform)(qt,Vt);qt=fr[0],Vt=fr[1],Ht={l:qt,r:qt,w:0,t:Vt,b:Vt,h:0},Sr=ae._hmpixcount?ae._hmlumcount/ae._hmpixcount:n.luminosity(ae._fullLayout.plot_bgcolor),Kr="M0,0H"+gt+"V"+Tt+"H0V0",Yt=!1,Rt="xy",cr=!1,nr=Q(Ge,Sr,Ye,yt,Kr),ur=re(Ge,Ye,yt)}function Qr(Ja,Oa){if(ae._transitioningWithDuration)return!1;var lt=Math.max(0,Math.min(gt,We*Ja+qt)),rt=Math.max(0,Math.min(Tt,Ke*Oa+Vt)),fr=Math.abs(lt-qt),lr=Math.abs(rt-Vt);Ht.l=Math.min(qt,lt),Ht.r=Math.max(qt,lt),Ht.t=Math.min(Vt,rt),Ht.b=Math.max(Vt,rt);function Tr(){Rt="",Ht.r=Ht.l,Ht.t=Ht.b,ur.attr("d","M0,0Z")}if(At.isSubplotConstrained)fr>x||lr>x?(Rt="xy",fr/gt>lr/Tt?(lr=fr*Tt/gt,Vt>rt?Ht.t=Vt-lr:Ht.b=Vt+lr):(fr=lr*gt/Tt,qt>lt?Ht.l=qt-fr:Ht.r=qt+fr),ur.attr("d",Y(Ht))):Tr();else if($t.isSubplotConstrained)if(fr>x||lr>x){Rt="xy";var Ir=Math.min(Ht.l/gt,(Tt-Ht.b)/Tt),Dr=Math.max(Ht.r/gt,(Tt-Ht.t)/Tt);Ht.l=Ir*gt,Ht.r=Dr*gt,Ht.b=(1-Ir)*Tt,Ht.t=(1-Dr)*Tt,ur.attr("d",Y(Ht))}else Tr();else!_r||lr0){var kt;if($t.isSubplotConstrained||!rr&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&or===(Tr.range[0]1&&(Ir.maxallowed!==void 0&&Ot===(Ir.range[0]=0?Math.min(ae,.9):1/(1/Math.max(ae,-.3)+3.222))}function $(ae,he,xe){return ae?ae==="nsew"?xe?"":he==="pan"?"move":"crosshair":ae.toLowerCase()+"-resize":"pointer"}function Q(ae,he,xe,we,Me){return ae.append("path").attr("class","zoombox").style({fill:he>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(xe,we)).attr("d",Me+"Z")}function re(ae,he,xe){return ae.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(he,xe)).attr("d","M0,0Z")}function ne(ae,he,xe,we,Me,Se){ae.attr("d",we+"M"+xe.l+","+xe.t+"v"+xe.h+"h"+xe.w+"v-"+xe.h+"h-"+xe.w+"Z"),se(ae,he,Me,Se)}function se(ae,he,xe,we){xe||(ae.transition().style("fill",we>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),he.transition().style("opacity",1).duration(200))}function G(ae){p.select(ae).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(ae){z&&ae.data&&ae._context.showTips&&(b.notifier(b._(ae,"Double-click to zoom back out"),"long",ae),z=!1)}function K(ae,he){return"M"+(ae.l-.5)+","+(he-x-.5)+"h-3v"+(2*x+1)+"h3ZM"+(ae.r+.5)+","+(he-x-.5)+"h3v"+(2*x+1)+"h-3Z"}function H(ae,he){return"M"+(he-x-.5)+","+(ae.t-.5)+"v-3h"+(2*x+1)+"v3ZM"+(he-x-.5)+","+(ae.b+.5)+"v3h"+(2*x+1)+"v-3Z"}function Y(ae){var he=Math.floor(Math.min(ae.b-ae.t,ae.r-ae.l,x)/2);return"M"+(ae.l-3.5)+","+(ae.t-.5+he)+"h3v"+-he+"h"+he+"v-3h-"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.t-.5+he)+"h-3v"+-he+"h"+-he+"v-3h"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.b+.5-he)+"h-3v"+he+"h"+-he+"v3h"+(he+3)+"ZM"+(ae.l-3.5)+","+(ae.b+.5-he)+"h3v"+he+"h"+he+"v3h-"+(he+3)+"Z"}function q(ae,he,xe,we,Me){for(var Se=!1,Ie={},Ve={},Ge,ke,_e,ce,ve=(Me||{}).xaHash,le=(Me||{}).yaHash,Ae=0;Ae1&&b.warn("Full array edits are incompatible with other edits",c);var S=a[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return b.warn("Unrecognized full array edit value",c,S),!0;return g?!1:(m(i,w),h(n),!0)}var M=Object.keys(a).map(Number).sort(E),C=r.get(),_=C||[],T=s(w,c).get(),f=[],u=-1,A=_.length,x,z,I,O,D,B,F,P;for(x=0;x_.length-(F?0:1)){b.warn("index out of range",c,I);continue}if(B!==void 0)D.length>1&&b.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?f.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),T&&T.splice(I,0,{})):b.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;x--)_.splice(f[x],1),T&&T.splice(f[x],1);if(_.length?C||r.set(_):r.set(null),g)return!1;if(m(i,w),v!==p){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],x=0;x=u));x++)j.push(I);for(x=u;x0&&b.log("Clearing previous rejected promises from queue."),g._promises=[]},J.cleanLayout=function(g){var i,w;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,T=Object.keys(g);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),g.dragmode==="rotate"&&(g.dragmode="orbit"),g.template&&g.template.layout&&J.cleanLayout(g.template.layout),g};function r(g,i,w=!1){var S=g[i],M=i.charAt(0);w&&Array.isArray(S)||S&&S!=="paper"&&(g[i]=l(S,M,!0))}J.cleanData=function(g){for(var i=0;i0)return g.slice(0,i)}J.hasParent=function(g,i){for(var w=h(i);w;){if(w in g)return!0;w=h(w)}return!1},J.clearAxisTypes=function(g,i,w){for(var S=0;S{let w=(...S)=>S.every(M=>b.isPlainObject(M))||S.every(M=>Array.isArray(M));if([g,i].every(S=>Array.isArray(S))){if(g.length!==i.length)return!1;for(let S=0;Sb.isPlainObject(S))){if(Object.keys(g).length!==Object.keys(i).length)return!1;for(let S in g){if(S.startsWith("_"))continue;let M=g[S],C=i[S];if(M!==C&&!(w(M,C)?v(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=v}}),Ux=ze({"src/plot_api/plot_api.js"(J){"use strict";var V=ci(),p=ao(),b=Gw(),E=Nr(),k=E.nestedProperty,l=Hm(),e=OI(),t=mi(),n=Wm(),r=cl(),a=Gi(),o=Qw(),s=cf(),c=$i(),m=Qn(),h=b5().initInteractions,v=nd(),g=_c().clearOutline,i=av().dfltConfig,w=xD(),S=bD(),M=d1(),C=Al(),_=hc().AX_NAME_PATTERN,T=0,f=5;function u(De,Ne,We,Ke){var Je;if(De=E.getGraphDiv(De),l.init(De),E.isPlainObject(Ne)){var et=Ne;Ne=et.data,We=et.layout,Ke=et.config,Je=et.frames}var Mt=l.triggerHandler(De,"plotly_beforeplot",[Ne,We,Ke]);if(Mt===!1)return Promise.reject();!Ne&&!We&&!E.isPlotDiv(De)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",De);function pt(){if(Je)return J.addFrames(De,Je)}O(De,Ke),We||(We={}),V.select(De).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(De._promises)||(De._promises=[]);var Pt=(De.data||[]).length===0&&Array.isArray(Ne);Array.isArray(Ne)&&(S.cleanData(Ne),Pt?De.data=Ne:De.data.push.apply(De.data,Ne),De.empty=!1),(!De.layout||Pt)&&(De.layout=S.cleanLayout(We)),r.supplyDefaults(De);var Ct=De._fullLayout,qt=Ct._has("cartesian");Ct._replotting=!0,(Pt||Ct._shouldCreateBgLayer)&&(ht(De),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(De),c.initPatterns(De),Pt&&a.saveShowSpikeInitial(De);var Vt=!De.calcdata||De.calcdata.length!==(De._fullData||[]).length;Vt&&r.doCalcdata(De);for(var Ht=0;Ht=De.data.length||Je<-De.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Ne.indexOf(Je,Ke+1)>-1||Je>=0&&Ne.indexOf(-De.data.length+Je)>-1||Je<0&&Ne.indexOf(De.data.length+Je)>-1)throw new Error("each index in "+We+" must be unique.")}}function j(De,Ne,We){if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&P(De,We,"newIndices"),typeof We<"u"&&Ne.length!==We.length)throw new Error("current and new indices must be of equal length.")}function U(De,Ne,We){var Ke,Je;if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("traces must be defined.");for(Array.isArray(Ne)||(Ne=[Ne]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");P(De,We,"indices");for(var et in Ne){if(!Array.isArray(Ne[et])||Ne[et].length!==We.length)throw new Error("attribute "+et+" must be an array of length equal to indices array length");if(Je&&(!(et in Ke)||!Array.isArray(Ke[et])||Ke[et].length!==Ne[et].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(De,Ne,We,Ke){var Je=E.isPlainObject(Ke),et=[],Mt,pt,Pt,Ct,qt;Array.isArray(We)||(We=[We]),We=F(We,De.data.length-1);for(var Vt in Ne)for(var Ht=0;Ht=0&&qt=0&&qt"u")return Ct=J.redraw(De),e.add(De,Je,Mt,et,pt),Ct;Array.isArray(We)||(We=[We]);try{j(De,Ke,We)}catch(qt){throw De.data.splice(De.data.length-Ne.length,Ne.length),qt}return e.startSequence(De),e.add(De,Je,Mt,et,pt),Ct=J.moveTraces(De,Ke,We),e.stopSequence(De),Ct}function K(De,Ne){De=E.getGraphDiv(De);var We=[],Ke=J.addTraces,Je=K,et=[De,We,Ne],Mt=[De,Ne],pt,Pt;if(typeof Ne>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"indices"),Ne=F(Ne,De.data.length-1),Ne.sort(E.sorterDes),pt=0;pt"u")for(We=[],Ct=0;Ct0&&typeof Pa.parts[Xa]!="string";)Xa--;var ja=Pa.parts[Xa],Nn=Pa.parts[Xa-1]+"."+ja,yn=Pa.parts.slice(0,Xa).join("."),Un=k(De.layout,yn).get(),li=k(Ke,yn).get(),Yn=Pa.get();if(La!==void 0){nr[ha]=La,ur[ha]=ja==="reverse"?La:q(Yn);var on=n.getLayoutValObject(Ke,Pa.parts);if(on&&on.impliedEdits&&La!==null)for(var en in on.impliedEdits)cr(E.relativeAttr(ha,en),on.impliedEdits[en]);if(["width","height"].indexOf(ha)!==-1)if(La){cr("autosize",null);var vi=ha==="height"?"width":"height";cr(vi,Ke[vi])}else Ke[ha]=De._initialAutoSize[ha];else if(ha==="autosize")cr("width",La?null:Ke.width),cr("height",La?null:Ke.height);else if(Nn.match(Se))Zr(Nn),k(Ke,yn+"._inputRange").set(null);else if(Nn.match(Ie)){Zr(Nn),k(Ke,yn+"._inputRange").set(null);var Yi=k(Ke,yn).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Nn.match(Ve)&&k(Ke,yn+"._inputDomain").set(null);if(ja==="type"){Qr=Un;var Ja=li.type==="linear"&&La==="log",Oa=li.type==="log"&&La==="linear";if(Ja||Oa){if(!Qr||!Qr.range)cr(yn+".autorange",!0);else if(li.autorange)Ja&&(Qr.range=Qr.range[1]>Qr.range[0]?[1,2]:[2,1]);else{var lt=Qr.range[0],rt=Qr.range[1];Ja?(lt<=0&&rt<=0&&cr(yn+".autorange",!0),lt<=0?lt=rt/1e6:rt<=0&&(rt=lt/1e6),cr(yn+".range[0]",Math.log(lt)/Math.LN10),cr(yn+".range[1]",Math.log(rt)/Math.LN10)):(cr(yn+".range[0]",Math.pow(10,lt)),cr(yn+".range[1]",Math.pow(10,rt)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Pa.parts[0]]&&Pa.parts[1]==="radialaxis"&&delete Ke[Pa.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(De,li,La,cr),t.getComponentMethod("images","convertCoords")(De,li,La,cr)}else cr(yn+".autorange",!0),cr(yn+".range",null);k(Ke,yn+"._inputRange").set(null)}else if(ja.match(_)){var fr=k(Ke,ha).get(),lr=(La||{}).type;(!lr||lr==="-")&&(lr="linear"),t.getComponentMethod("annotations","convertCoords")(De,fr,lr,cr),t.getComponentMethod("images","convertCoords")(De,fr,lr,cr)}var Tr=w.containerArrayMatch(ha);if(Tr){qt=Tr.array,Vt=Tr.index;var Ir=Tr.property,Dr=on||{editType:"calc"};Vt!==""&&Ir===""&&(w.isAddVal(La)?ur[ha]=null:w.isRemoveVal(La)?ur[ha]=(k(We,qt).get()||[])[Vt]:E.warn("unrecognized full object value",Ne)),C.update(Rt,Dr),Ct[qt]||(Ct[qt]={});var ot=Ct[qt][Vt];ot||(ot=Ct[qt][Vt]={}),ot[Ir]=La,delete Ne[ha]}else ja==="reverse"?(Un.range?Un.range.reverse():(cr(yn+".autorange",!0),Un.range=[1,0]),li.autorange?Rt.calc=!0:Rt.plot=!0):(ha==="dragmode"&&(La===!1&&Yn!==!1||La!==!1&&Yn===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&ha==="dragmode"&&(La==="lasso"||La==="select")&&!(Yn==="lasso"||Yn==="select")?Rt.plot=!0:on?C.update(Rt,on):Rt.calc=!0,Pa.set(La))}}for(qt in Ct){var kt=w.applyContainerArrayChanges(De,et(We,qt),Ct[qt],Rt,et);kt||(Rt.plot=!0)}for(var jt in Rr){Qr=a.getFromId(De,jt);var ar=Qr&&Qr._constraintGroup;if(ar){Rt.calc=!0;for(var Er in ar)Rr[Er]||(a.getFromId(De,Er)._constraintShrinkable=!0)}}(ke(De)||Ne.height||Ne.width)&&(Rt.plot=!0);var xr=Ke.shapes;for(Vt=0;Vt1;)if(Ke.pop(),We=k(Ne,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Ne.uirevision}function Xe(De,Ne){for(var We=0;We[yn,De._ev.listeners(yn)]);et=J.newPlot(De,Ne,We,Ke).then(()=>{for(let[yn,Un]of Nn)Un.forEach(li=>De.on(yn,li));return J.react(De,Ne,We,Ke)})}else{De.data=Ne||[],S.cleanData(De.data),De.layout=We||{},S.cleanLayout(De.layout),gt(De.data,De.layout,pt,Pt),r.supplyDefaults(De,{skipUpdateCalc:!0});var Vt=De._fullData,Ht=De._fullLayout,Sr=Ht.datarevision===void 0,Kr=Ht.transition,Yt=$t(De,Pt,Ht,Sr,Kr),Rt=Yt.newDataRevision,nr=At(De,pt,Vt,Sr,Kr,Rt);if(ke(De)&&(Yt.layoutReplot=!0),nr.calc||Yt.calc){De.calcdata=void 0;for(var ur=Object.getOwnPropertyNames(Ht),cr=0;cr(qt||De.emit("plotly_react",{config:Ke,data:Ne,layout:We}),De))}function At(De,Ne,We,Ke,Je,et){var Mt=Ne.length===We.length;if(!Je&&!Mt)return{fullReplot:!0,calc:!0};var pt=C.traceFlags();pt.arrays={},pt.nChanges=0,pt.nChangesAnim=0;var Pt,Ct;function qt(Sr){var Kr=n.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&Kr.anim&&(Kr.anim=!1),Kr}var Vt={getValObject:qt,flags:pt,immutable:Ke,transition:Je,newDataRevision:et,gd:De},Ht={};for(Pt=0;Pt=Je.length?Je[0]:Je[Ct]:Je}function pt(Ct){return Array.isArray(et)?Ct>=et.length?et[0]:et[Ct]:et}function Pt(Ct,qt){var Vt=0;return function(){if(Ct&&++Vt===qt)return Ct()}}return new Promise(function(Ct,qt){function Vt(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ja=Ke._frameQueue.pop();ja.onInterrupt&&ja.onInterrupt()}De.emit("plotly_animationinterrupted",[])}}function Ht(ja){if(ja.length!==0){for(var Nn=0;NnKe._timeToNext&&Kr()};ja()}var Rt=0;function nr(ja){return Array.isArray(Je)?Rt>=Je.length?ja.transitionOpts=Je[Rt]:ja.transitionOpts=Je[0]:ja.transitionOpts=Je,Rt++,ja}var ur,cr,Rr=[],Qr=Ne==null,Zr=Array.isArray(Ne),ha=!Qr&&!Zr&&E.isPlainObject(Ne);if(ha)Rr.push({type:"object",data:nr(E.extendFlat({},Ne))});else if(Qr||["string","number"].indexOf(typeof Ne)!==-1)for(ur=0;ur0&&unun)&&Xa.push(cr);Rr=Xa}}Rr.length>0?Ht(Rr):(De.emit("plotly_animated"),Ct())})}function Xt(De,Ne,We){if(De=E.getGraphDiv(De),Ne==null)return Promise.resolve();if(!E.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ke,Je,et,Mt,pt=De._transitionData._frames,Pt=De._transitionData._frameHash;if(!Array.isArray(Ne))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ne);var Ct=pt.length+Ne.length*2,qt=[],Vt={};for(Ke=Ne.length-1;Ke>=0;Ke--)if(E.isPlainObject(Ne[Ke])){var Ht=Ne[Ke].name,Sr=(Pt[Ht]||Vt[Ht]||{}).name,Kr=Ne[Ke].name,Yt=Pt[Sr]||Vt[Sr];Sr&&Kr&&typeof Kr=="number"&&Yt&&TPa.index?-1:ha.index=0;Ke--){if(Je=qt[Ke].frame,typeof Je.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Je.name)for(;Pt[Je.name="frame "+De._transitionData._counter++];);if(Pt[Je.name]){for(et=0;et=0;We--)Ke=Ne[We],et.push({type:"delete",index:Ke}),Mt.unshift({type:"insert",index:Ke,value:Je[Ke]});var pt=r.modifyFrames,Pt=r.modifyFrames,Ct=[De,Mt],qt=[De,et];return e&&e.add(De,pt,Ct,Pt,qt),r.modifyFrames(De,et)}function Ot(De){De=E.getGraphDiv(De);var Ne=De._fullLayout||{},We=De._fullData||[];return r.cleanPlot([],{},We,Ne),r.purge(De),l.purge(De),Ne._container&&Ne._container.remove(),delete De._context,De}function vt(De){var Ne=De._fullLayout,We=De.getBoundingClientRect();if(!E.equalDomRects(We,Ne._lastBBox)){var Ke=Ne._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(De));Ne._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Ne._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Ne._lastBBox=We}}function ht(De){var Ne=V.select(De),We=De._fullLayout;if(We._calcInverseTransform=vt,We._calcInverseTransform(De),We._container=Ne.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};V.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=E.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var Je=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=Je.append("g").classed("imagelayer",!0),We._shapeLowerLayer=Je.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var et=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=et.append("g").classed("imagelayer",!0),We._shapeUpperLayer=et.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),De.emit("plotly_framework")}J.animate=_r,J.addFrames=Xt,J.deleteFrames=or,J.addTraces=X,J.deleteTraces=K,J.extendTraces=se,J.moveTraces=H,J.prependTraces=G,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=D,J.relayout=xe,J.restyle=Y,J.setPlotConfig=x,J.update=_e,J._guiRelayout=ce(xe),J._guiRestyle=ce(Y),J._guiUpdate=ce(_e),J._storeDirectGUIEdit=ae}}),ip=ze({"src/snapshot/helpers.js"(J){"use strict";var V=mi();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){V.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var p=window.URL||window.webkitURL;J.createObjectURL=function(E){return p.createObjectURL(E)},J.revokeObjectURL=function(E){return p.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=b(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,n=E._fullLayout;if(n){var r=(k=n.title)==null?void 0:k.text;return r===((l=n._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,n,r,a=E._fullLayout;if(a){var o=(l=(k=a.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=a._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(n=(t=E.layout)==null?void 0:t.title)==null?void 0:n.subtitle)==null?void 0:r.text};function b(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=g.toLowerCase();return r.includes(i)?g:a.includes(i)?"<":o.includes(i)?">":g.includes("<")||g.includes(">")?"":h.html(g).text()});return h.remove(),v}function c(m){return m.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}V.exports=function(h,v,g){var i=h._fullLayout,w=i._paper,S=i._toppaper,M=i.width,C=i.height,_;w.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var T=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),b.supplyDefaults(_);for(var u=_._fullData,A=T.length,x=0;xz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,$,Q,re,ne;if(I.dimensions===2)for($=0;$z[$].length&&M.push(s("unused",C,A.concat($,z[$].length)));var se=z[$].length;for(U=0;U<(j?Math.min(se,F[$].length):se);U++)Q=j?F[$][U]:F,re=x[$][U],ne=z[$][U],p.validate(re,Q)?ne!==re&&ne!==+re&&M.push(s("dynamic",C,A.concat($,U),re,ne)):M.push(s("value",C,A.concat($,U),re))}else M.push(s("array",C,A.concat($),x[$]));else for($=0;$D?M.push({code:"unused",traceType:x,templateCount:O,dataCount:D}):D>O&&M.push({code:"reused",traceType:x,templateCount:O,dataCount:D})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],$=s(F,j,P);p(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:$,templateitemname:U.templateitemname}),B(U,$)):Array.isArray(U)&&c(U)&&B(U,$)}}if(B({data:_,layout:C},""),M.length)return M.map(m)};function c(h){for(var v=0;v=0;m--){var h=l[m];if(h.type==="scatter"&&h.xaxis===s.xaxis&&h.yaxis===s.yaxis){h.opacity=void 0;break}}}}}}}),kD=ze({"src/traces/scatter/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Lx();V.exports=function(E,k){function l(t,n){return p.coerce(E,k,b,t,n)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),bd=ze({"src/plots/cartesian/align_period.js"(J,V){"use strict";var p=ao(),b=Nr(),E=b.dateTime2ms,k=b.incrementMonth,l=No(),e=l.ONEAVGMONTH;V.exports=function(n,r,a,o){if(r.type!=="date")return{vals:o};var s=n[a+"periodalignment"];if(!s)return{vals:o};var c=n[a+"period"],m;if(p(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var h=+c.substring(1);if(h>0&&Math.round(h)===h)m=h;else return{vals:o}}for(var v=r.calendar,g=s==="start",i=s==="end",w=n[a+"period0"],S=E(w,v)||0,M=[],C=[],_=[],T=o.length,f=0;fu;)z=k(z,-m,v);for(;z<=u;)z=k(z,m,v);x=k(z,-m,v)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;x=z-c}M[f]=g?x:i?z:(x+z)/2,C[f]=x,_[f]=z}return{vals:M,starts:C,ends:_}}}}),od=ze({"src/traces/scatter/colorscale_calc.js"(J,V){"use strict";var p=Bf().hasColorscale,b=Qf(),E=el();V.exports=function(l,e){E.hasLines(e)&&p(e,"line")&&b(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(p(e,"marker")&&b(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),p(e,"marker.line")&&b(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Nd=ze({"src/traces/scatter/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lB&&x[P].gap;)P--;for(U=x[P].s,F=x.length-1;F>P;F--)x[F].s=U;for(;Bre+$||!p(Q))}for(var se=0;seP(U))):P(D.text);let j=D.outsidetextfont.size*r*F+n;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(D,B,F,P){for(var j=O(P),U=0;UO[v]&&v0?l:e)/(v._m*w*(v._m>0?l:e)))),Ct*=1e3}if(qt===E){if(i&&(qt=v.c2p(Pt.y,!0)),qt===E)return!1;qt*=1e3}return[Ct,qt]}function ee(pt,Pt,Ct,qt){var Vt=Ct-pt,Ht=qt-Pt,Sr=.5-pt,Kr=.5-Pt,Yt=Vt*Vt+Ht*Ht,Rt=Vt*Sr+Ht*Kr;if(Rt>0&&Rt1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],qt&&we(Sr,pt)Ie||pt[1]Ge)return[r(pt[0],Se,Ie),r(pt[1],Ve,Ge)]}function yt(pt,Pt){if(pt[0]===Pt[0]&&(pt[0]===Se||pt[0]===Ie)||pt[1]===Pt[1]&&(pt[1]===Ve||pt[1]===Ge))return!0}function gt(pt,Pt){var Ct=[],qt=Ye(pt),Vt=Ye(Pt);return qt&&Vt&&yt(qt,Vt)||(qt&&Ct.push(qt),Vt&&Ct.push(Vt)),Ct}function Tt(pt,Pt,Ct){return function(qt,Vt){var Ht=Ye(qt),Sr=Ye(Vt),Kr=[];if(Ht&&Sr&&yt(Ht,Sr))return Kr;Ht&&Kr.push(Ht),Sr&&Kr.push(Sr);var Yt=2*t.constrain((qt[pt]+Vt[pt])/2,Pt,Ct)-((Ht||qt)[pt]+(Sr||Vt)[pt]);if(Yt){var Rt;Ht&&Sr?Rt=Yt>0==Ht[pt]>Sr[pt]?Ht:Sr:Rt=Ht||Sr,Rt[pt]+=Yt}return Kr}}var At;f==="linear"||f==="spline"?At=Xe:f==="hv"||f==="vh"?At=gt:f==="hvh"?At=Tt(0,Se,Ie):f==="vhv"&&(At=Tt(1,Ve,Ge));function $t(pt,Pt){var Ct=Pt[0]-pt[0],qt=(Pt[1]-pt[1])/Ct,Vt=(pt[1]*Pt[0]-Pt[1]*pt[0])/Ct;return Vt>0?[qt>0?Se:Ie,Ge]:[qt>0?Ie:Se,Ve]}function rr(pt){var Pt=pt[0],Ct=pt[1],qt=Pt===O[D-1][0],Vt=Ct===O[D-1][1];if(!(qt&&Vt))if(D>1){var Ht=Pt===O[D-2][0],Sr=Ct===O[D-2][1];qt&&(Pt===Se||Pt===Ie)&&Ht?Sr?D--:O[D-1]=pt:Vt&&(Ct===Ve||Ct===Ge)&&Sr?Ht?D--:O[D-1]=pt:O[D++]=pt}else O[D++]=pt}function _r(pt){O[D-1][0]!==pt[0]&&O[D-1][1]!==pt[1]&&rr([ve,le]),rr(pt),Ae=null,ve=le=0}var Xt=t.isArrayOrTypedArray(C);function or(pt){if(pt&&M&&(pt.i=B,pt.d=s,pt.trace=m,pt.marker=Xt?C[pt.i]:C,pt.backoff=M),ae=pt[0]/w,he=pt[1]/S,_e=pt[0]Ie?Ie:0,ce=pt[1]Ge?Ge:0,_e||ce){if(!D)O[D++]=[_e||pt[0],ce||pt[1]];else if(Ae){var Pt=At(Ae,pt);Pt.length>1&&(_r(Pt[0]),O[D++]=Pt[1])}else Be=At(O[D-1],pt)[0],O[D++]=Be;var Ct=O[D-1];_e&&ce&&(Ct[0]!==_e||Ct[1]!==ce)?(Ae&&(ve!==_e&&le!==ce?rr(ve&&le?$t(Ae,pt):[ve||_e,le||ce]):ve&&le&&rr([ve,le])),rr([_e,ce])):ve-_e&&le-ce&&rr([_e||ve,ce||le]),Ae=pt,ve=_e,le=ce}else Ae&&_r(At(Ae,pt)[0]),O[D++]=pt}for(B=0;Bxe($,Ot))break;P=$,K=ne[0]*re[0]+ne[1]*re[1],K>G?(G=K,j=$,Q=!1):K=s.length||!$)break;or($),F=$}}Ae&&rr([ve||Ae[0],le||Ae[1]]),x.push(O.slice(0,D))}var vt=f.slice(f.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,De=-1,Ne=[],We=0;We=0?a=h:(a=h=m,m++),a0,f=r(h,v,g);if(M=i.selectAll("g.trace").data(f,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(h,M,v),T){S&&(C=S());var u=p.transition().duration(w.duration).ease(w.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,x){s(h,x,v,A,f,this,w)})})}else M.each(function(A,x){s(h,x,v,A,f,this,w)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(m,h,v){h.each(function(g){var i=k(p.select(this),"g","fills");e.setClipUrl(i,v.layerClipId,m);var w=g[0].trace;w._ownFill=null,w._nextFill=null;var S=[];w._ownfill&&S.push("_ownFill"),w._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){w[C]=k(p.select(this),"path","js-fill")})})}function s(m,h,v,g,i,w,S){var M=m._context.staticPlot,C;c(m,h,v,g,i);var _=!!S&&S.duration>0;function T(rr){return _?rr.transition():rr}var f=v.xaxis,u=v.yaxis,A=g[0].trace,x=A.line,z=p.select(w),I=k(z,"g","errorbars"),O=k(z,"g","lines"),D=k(z,"g","points"),B=k(z,"g","text");if(b.getComponentMethod("errorbars","plot")(m,I,v,S),A.visible!==!0)return;T(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,$;j==="y"?(U=1,$=u.c2p(0,!0)):j==="x"&&(U=0,$=f.c2p(0,!0)),g[0][v.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ne=A._prevtrace,se=null,G=null;ne&&(Q=ne._prevRevpath||"",P=ne._nextFill,re=ne._ownPolygons,se=ne._fillsegments,G=ne._fillElement);var X,K,H="",Y="",q,Z,ee,ae,he,xe,we=[];A._polygons=[];var Me=[],Se=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(g),["hv","vh","hvh","vhv"].indexOf(x.shape)!==-1?(q=e.steps(x.shape),Z=e.steps(x.shape.split("").reverse().join(""))):x.shape==="spline"?q=Z=function(rr){var _r=rr[rr.length-1];return rr.length>1&&rr[0][0]===_r[0]&&rr[0][1]===_r[1]?e.smoothclosed(rr.slice(1),x.smoothing):e.smoothopen(rr,x.smoothing)}:q=Z=function(rr){return"M"+rr.join("L")},ee=function(rr){return Z(rr.reverse())},Se=n(g,{xaxis:f,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(x.width||1,3)/4,shape:x.shape,backoff:x.backoff,simplify:x.simplify,fill:A.fill}),Me=new Array(Se.length);var Ve=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(f.length/T),A=0;i.forEach(function(z,I){var O=z[0].trace;t.hasMarkers(O)&&O.marker.maxdisplayed>0&&I=Math.min(ne,se)&&v<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(m.c2p(re.x)-v);return K=Math.min(ne,se)&&g<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(h.c2p(re.y)-g);return KY!=Me>=Y&&(he=ee[Z-1][0],xe=ee[Z][0],Me-we&&(ae=he+(xe-he)*(Y-we)/(Me-we),G=Math.min(G,ae),X=Math.max(X,ae)));return G=Math.max(G,0),X=Math.min(X,m._length),{x0:G,x1:X,y0:Y,y1:Y}}if(w.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var $=j(c._polygons);$===null&&($={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),p.extendFlat(n,{distance:n.maxHoverDistance,x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1,color:Q,hovertemplate:!1}),delete n.index,c.text&&!p.isArrayOrTypedArray(c.text)?n.text=String(c.text):n.text=c.name,[n]}}}}}),Yv=ze({"src/traces/scatter/select.js"(J,V){"use strict";var p=el();V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=[],r=l[0].trace,a,o,s,c,m=r.mode&&!p.hasMarkers(r)&&!p.hasText(r);if(m)return[];if(k===!1)for(a=0;a0&&(o["_"+r+"axes"]||{})[n])return o;if((o[r+"axis"]||r)===n){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,n){var r=l(t),a=p(t,"box-violin");return a&&n===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Hx=ze({"src/plots/cartesian/category_order_defaults.js"(J,V){"use strict";var p=Ff().isTypedArraySpec;function b(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,n,r;if(k.axData)t=k.axData;else for(t=[],n=0;n0||p(n),a;r&&(a="array");var o=e("categoryorder",a),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=b(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),g1=ze({"src/plots/cartesian/line_grid_defaults.js"(J,V){"use strict";var p=Qn(),b=fc(),E=Nr();V.exports=function(l,e,t,n){n=n||{};var r=n.dfltColor;function a(x,z){return E.coerce2(l,e,n.attributes,x,z)}var o=a("linecolor",r),s=a("linewidth"),c=t("showline",n.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var m=p.mix(r,n.bgColor,n.blend||b.lightFraction),h=a("gridcolor",m),v=a("gridwidth"),g=a("griddash"),i=t("showgrid",n.showGrid||!!h||!!v||!!g);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),n.hasMinor){var w=p.mix(e.gridcolor,n.bgColor,67),S=a("minor.gridcolor",w),M=a("minor.gridwidth",e.gridwidth||1),C=a("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!n.noZeroLine){var T=a("zerolinelayer"),f=a("zerolinecolor",r),u=a("zerolinewidth"),A=t("zeroline",n.showGrid||!!f||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),y1=ze({"src/plots/cartesian/axis_defaults.js"(J,V){"use strict";var p=ao(),b=mi(),E=Nr(),k=hs(),l=Jf(),e=cf(),t=Uv(),n=Ym(),r=ov(),a=sv(),o=Hx(),s=g1(),c=Qw(),m=Dd(),h=hc().WEEKDAY_PATTERN,v=hc().HOUR_PATTERN;V.exports=function(M,C,_,T,f){var u=T.letter,A=T.font||{},x=T.splomStash||{},z=_("visible",!T.visibleDflt),I=C._template||{},O=C.type||I.type||"-",D;if(O==="date"){var B=b.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",T.calendar),T.noTicklabelmode||(D=_("ticklabelmode"))}!T.noTicklabelindex&&(O==="date"||O==="linear")&&_("ticklabelindex");var F="";(!T.noTicklabelposition||O==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:D==="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")),T.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),m(C,f),c(M,C,_,T),o(M,C,_,T),T.noHover||(O!=="category"&&_("hoverformat"),T.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=x.label||f._dfltTitle[u];if(a(M,C,_,O,T),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,O);var $=T.hasMinor;if($&&(k.newContainer(C,"minor"),t(M,C,_,O,{isMinor:!0})),r(M,C,_,O,T),n(M,C,_,T),$){var Q=T.isMinor;T.isMinor=!0,n(M,C,_,T),T.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:T.bgColor,showGrid:T.showGrid,hasMinor:$,attributes:e}),$&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=O==="multicategory";if(!T.noTickson&&(O==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ne=_("showdividers");ne&&(_("dividercolor"),_("dividerwidth"))}if(O==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:g}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var se=0;se=2){var u="",A,x;if(f.length===2){for(A=0;A<2;A++)if(x=w(f[A]),x){u=h;break}}var z=_("pattern",u);if(z===h)for(A=0;A<2;A++)x=w(f[A]),x&&(M.bounds[A]=f[A]=x-1);if(z)for(A=0;A<2;A++)switch(x=f[A],z){case h:if(!p(x)){M.enabled=!1;return}if(x=+x,x!==Math.floor(x)||x<0||x>=7){M.enabled=!1;return}M.bounds[A]=f[A]=x;break;case v:if(!p(x)){M.enabled=!1;return}if(x=+x,x<0||x>24){M.enabled=!1;return}M.bounds[A]=f[A]=x;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(f[0]>I[0]&&f[1]_[1]-1/4096&&(l.domain=m),b.noneOrAll(k.domain,l.domain,m),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),RD=ze({"src/plots/cartesian/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover,k=s5(),l=hs(),e=Gm(),t=cf(),n=E5(),r=y1(),a=Vv(),o=Wx(),s=Xl(),c=s.id2name,m=s.name2id,h=hc().AX_ID_PATTERN,v=mi(),g=v.traceIs,i=v.getComponentMethod;function w(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}V.exports=function(M,C,_){var T=C.autotypenumbers,f={},u={},A={},x={},z={},I={},O={},D={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(g(U,"cartesian")){var $;if(U.xaxis)$=c(U.xaxis),w(f,$,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,T._offset).call(k.setScale,1,1);var f=C.plot.selectAll(".scatterlayer .trace");f.selectAll(".point").call(k.setPointGroupScale,1,1),f.selectAll(".textpoint").call(k.setTextPointsScale,1,1),f.call(k.hideOutsideRangePoints,C)}function c(C,_){var T=C.plotinfo,f=T.xaxis,u=T.yaxis,A=f._length,x=u._length,z=!!C.xr1,I=!!C.yr1,O=[];if(z){var D=E.simpleMap(C.xr0,f.r2l),B=E.simpleMap(C.xr1,f.r2l),F=D[1]-D[0],P=B[1]-B[0];O[0]=(D[0]*(1-_)+_*B[0]-D[0])/(D[1]-D[0])*A,O[2]=A*(1-_+_*P/F),f.range[0]=f.l2r(D[0]*(1-_)+_*B[0]),f.range[1]=f.l2r(D[1]*(1-_)+_*B[1])}else O[0]=0,O[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),$=j[1]-j[0],Q=U[1]-U[0];O[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*x,O[3]=x*(1-_+_*Q/$),u.range[0]=f.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else O[1]=0,O[3]=x;l.drawOne(t,f,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[f._id,u._id]);var re=z?A/O[2]:1,ne=I?x/O[3]:1,se=z?O[0]:0,G=I?O[1]:0,X=z?O[0]/O[2]*A:0,K=I?O[1]/O[3]*x:0,H=f._offset-X,Y=u._offset-K;T.clipRect.call(k.setTranslate,se,G).call(k.setScale,1/re,1/ne),T.plot.call(k.setTranslate,H,Y).call(k.setScale,re,ne),k.setPointGroupScale(T.zoomScalePts,1/re,1/ne),k.setTextPointsScale(T.zoomScaleTxt,1/re,1/ne)}var m;a&&(m=a());function h(){for(var C={},_=0;_r.duration?(h(),w=window.cancelAnimationFrame(M)):w=window.requestAnimationFrame(M)}return g=Date.now(),w=window.requestAnimationFrame(M),Promise.resolve()}}}),Du=ze({"src/plots/cartesian/index.js"(J){"use strict";var V=ci(),p=mi(),b=Nr(),E=cl(),k=$i(),l=zf().getModuleCalcData,e=Xl(),t=hc(),n=nd(),r=b.ensureSingle;function a(g,i,w){return b.ensureSingle(g,i,w,function(S){S.datum(w)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=PD(),J.layoutAttributes=cf(),J.supplyLayoutDefaults=RD(),J.transitionAxes=ID(),J.finalizeSubplots=function(g,i){var w=i._subplots,S=w.xaxis,M=w.yaxis,C=w.cartesian,_=C,T={},f={},u,A,x;for(u=0;u<_.length;u++){var z=_[u].split("y");T[z[0]]=1,f["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=b.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var O=[],D,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===x&&((i.indexOf(P.index)!==-1||P.carpet)&&(D&&D[0].trace.xaxis+D[0].trace.yaxis===x&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&O.indexOf(D)===-1&&O.push(D),O.push(F)),D=F)}s(g,z,O,w,S)}}};function s(g,i,w,S,M){for(var C=t.traceLayerClasses,_=g._fullLayout,T=_._zindices,f=_._modules,u,A,x,z=[],I=[],O=0;O1&&($+=o+U),j.push(T+$),_=0;_1,x=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),x&&A?(i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),x&&A?i.zerolinelayerAbove=x.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+T),i.ylines=S.select(".ylines-"+f),i.xaxislayer=S.select(".xaxislayer-"+T),i.yaxislayer=S.select(".yaxislayer-"+f))}else{var O=x.plotgroup,D=M+"-x",B=M+"-y";i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer,i.zerolinelayerAbove=x.zerolinelayerAbove,r(x.overlinesBelow,"path",D),r(x.overlinesBelow,"path",B),r(x.overaxesBelow,"g",D),r(x.overaxesBelow,"g",B),i.plot=r(x.overplot,"g",M),r(x.overlinesAbove,"path",D),r(x.overlinesAbove,"path",B),r(x.overaxesAbove,"g",D),r(x.overaxesAbove,"g",B),i.xlines=O.select(".overlines-"+T).select("."+D),i.ylines=O.select(".overlines-"+f).select("."+B),i.xaxislayer=O.select(".overaxes-"+T).select("."+D),i.yaxislayer=O.select(".overaxes-"+f).select("."+B)}_||(u||(a(i.minorGridlayer,"g",i.xaxis._id),a(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),a(i.gridlayer,"g",i.xaxis._id),a(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function h(g,i){if(g){var w={};g.each(function(f){var u=f[0],A=V.select(this);A.remove(),v(u,i),w[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=a.indexOf("end")>=0,w=c.backoff*h+o.standoff,S=m.backoff*v+o.startstandoff,M,C,_,T;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var f=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,f),T=_+Math.PI,w&&S&&w+S>Math.sqrt(f*f+u*u)){$();return}if(w){if(w*w>f*f+u*u){$();return}var A=w*Math.cos(_),x=w*Math.sin(_);C.x+=A,C.y+=x,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>f*f+u*u){$();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var O=s.getTotalLength(),D="";if(O2/3?cr="right":cr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[cr]}for(var Be=!1,Xe=["x","y"],Ye=0;Ye1)&&(Tt===gt?(et=At.r2fraction(S["a"+yt]),(et<0||et>1)&&(Be=!0)):Be=!0),ht=At._offset+At.r2p(S[yt]),We=.5}else{var Mt=Je==="domain";yt==="x"?(Ne=S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.l+u.w*Ne):(Ne=1-S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.t+u.h*Ne),We=S.showarrow?.5:Ne}if(S.showarrow){vt.head=ht;var pt=S["a"+yt];if(Ke=rr*Ae(.5,S.xanchor)-_r*Ae(.5,S.yanchor),Tt===gt){var Pt=e.getRefType(Tt);Pt==="domain"?(yt==="y"&&(pt=1-pt),vt.tail=At._offset+At._length*pt):Pt==="paper"?yt==="y"?(pt=1-pt,vt.tail=u.t+u.h*pt):vt.tail=u.l+u.w*pt:vt.tail=At._offset+At.r2p(pt),De=Ke}else vt.tail=ht+pt,De=Ke+pt;vt.text=vt.tail+Ke;var Ct=f[yt==="x"?"width":"height"];if(gt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var qt=-Math.max(vt.tail-3,vt.text),Vt=Math.min(vt.tail+3,vt.text)-Ct;qt>0?(vt.tail+=qt,vt.text+=qt):Vt>0&&(vt.tail-=Vt,vt.text-=Vt)}vt.tail+=Ot,vt.head+=Ot}else Ke=Xt*Ae(We,or),De=Ke,vt.text=ht+Ke;vt.text+=Ot,Ke+=Ot,De+=Ot,S["_"+yt+"padplus"]=Xt/2+De,S["_"+yt+"padminus"]=Xt/2-De,S["_"+yt+"size"]=Xt,S["_"+yt+"shift"]=Ke}if(Be){se.remove();return}var Ht=0,Sr=0;if(S.align!=="left"&&(Ht=(_e-Ge)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(ce-ke)*(S.valign==="middle"?.5:1)),Ie)Se.select("svg").attr({x:K+Ht-1,y:K+Sr}).call(n.setClipUrl,Y?F:null,w);else{var Kr=K+Sr-Ve.top,Yt=K+Ht-Ve.left;ae.call(a.positionText,Yt,Kr).call(n.setClipUrl,Y?F:null,w)}q.select("rect").call(n.setRect,K,K,_e,ce),H.call(n.setRect,G/2,G/2,ve-G,le-G),se.call(n.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-le/2)),$.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var Rt=function(ur,cr){U.selectAll(".annotation-arrow-g").remove();var Rr=P.x.head,Qr=P.y.head,Zr=P.x.tail+ur,ha=P.y.tail+cr,Pa=P.x.text+ur,La=P.y.text+cr,un=k.rotationXYMatrix(j,Pa,La),Xa=k.apply2DTransform(un),ja=k.apply2DTransform2(un),Nn=+H.attr("width"),yn=+H.attr("height"),Un=Pa-.5*Nn,li=Un+Nn,Yn=La-.5*yn,on=Yn+yn,en=[[Un,Yn,Un,on],[Un,on,li,on],[li,on,li,Yn],[li,Yn,Un,Yn]].map(ja);if(!en.reduce(function(ot,kt){return ot^!!k.segmentsIntersect(Rr,Qr,Rr+1e6,Qr+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){en.forEach(function(ot){var kt=k.segmentsIntersect(Zr,ha,Rr,Qr,ot[0],ot[1],ot[2],ot[3]);kt&&(Zr=kt.x,ha=kt.y)});var vi=S.arrowwidth,Yi=S.arrowcolor,Ja=S.arrowside,Oa=U.append("g").style({opacity:t.opacity(Yi)}).classed("annotation-arrow-g",!0),lt=Oa.append("path").attr("d","M"+Zr+","+ha+"L"+Rr+","+Qr).style("stroke-width",vi+"px").call(t.stroke,t.rgb(Yi));if(m(lt,Ja,S),A.annotationPosition&<.node().parentNode&&!C){var rt=Rr,fr=Qr;if(S.standoff){var lr=Math.sqrt(Math.pow(Rr-Zr,2)+Math.pow(Qr-ha,2));rt+=S.standoff*(Zr-Rr)/lr,fr+=S.standoff*(ha-Qr)/lr}var Tr=Oa.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Zr-rt)+","+(ha-fr),transform:l(rt,fr)}).style("stroke-width",vi+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Ir,Dr;s.init({element:Tr.node(),gd:w,prepFn:function(){var ot=n.getTranslate(se);Ir=ot.x,Dr=ot.y,_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0)},moveFn:function(ot,kt){var jt=Xa(Ir,Dr),ar=jt[0]+ot,Er=jt[1]+kt;se.call(n.setTranslate,ar,Er),D("x",g(_,ot,"x",u,S)),D("y",g(T,kt,"y",u,S)),S.axref===S.xref&&D("ax",g(_,ot,"ax",u,S)),S.ayref===S.yref&&D("ay",g(T,kt,"ay",u,S)),Oa.attr("transform",l(ot,kt)),$.attr({transform:"rotate("+j+","+ar+","+Er+")"})},doneFn:function(){b.call("_guiRelayout",w,B());var ot=document.querySelector(".js-notes-box-panel");ot&&ot.redraw(ot.selectedObj)}})}}};if(S.showarrow&&Rt(0,0),Q){var nr;s.init({element:se.node(),gd:w,prepFn:function(){nr=$.attr("transform")},moveFn:function(ur,cr){var Rr="pointer";if(S.showarrow)S.axref===S.xref?D("ax",g(_,ur,"ax",u,S)):D("ax",S.ax+ur),S.ayref===S.yref?D("ay",g(T,cr,"ay",u.w,S)):D("ay",S.ay+cr),Rt(ur,cr);else{if(C)return;var Qr,Zr;if(_)Qr=g(_,ur,"x",u,S);else{var ha=S._xsize/u.w,Pa=S.x+(S._xshift-S.xshift)/u.w-ha/2;Qr=s.align(Pa+ur/u.w,ha,0,1,S.xanchor)}if(T)Zr=g(T,cr,"y",u,S);else{var La=S._ysize/u.h,un=S.y-(S._yshift+S.yshift)/u.h-La/2;Zr=s.align(un-cr/u.h,La,0,1,S.yanchor)}D("x",Qr),D("y",Zr),(!_||!T)&&(Rr=s.getCursor(_?.5:Qr,T?.5:Zr,S.xanchor,S.yanchor))}$.attr({transform:l(ur,cr)+nr}),o(se,Rr)},clickFn:function(ur,cr){S.captureevents&&w.emit("plotly_clickannotation",ne(cr))},doneFn:function(){o(se),b.call("_guiRelayout",w,B());var ur=document.querySelector(".js-notes-box-panel");ur&&ur.redraw(ur.selectedObj)}})}}A.annotationText?ae.call(a.makeEditable,{delegate:se,gd:w}).call(he).on("edit",function(we){S.text=we,this.call(he),D("text",we),_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0),b.call("_guiRelayout",w,B())}):ae.call(he)}}}),zD=ze({"src/components/annotations/click.js"(J,V){"use strict";var p=Nr(),b=mi(),E=hs().arrayEditor;V.exports={hasClickToShow:k,onClick:l};function k(n,r){var a=e(n,r);return a.on.length>0||a.explicitOff.length>0}function l(n,r){var a=e(n,r),o=a.on,s=a.off.concat(a.explicitOff),c={},m=n._fullLayout.annotations,h,v;if(o.length||s.length){for(h=0;h1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(a._pdata=b(l.glplot.cameraParams,[e.xaxis.r2l(a.x)*t[0],e.yaxis.r2l(a.y)*t[1],e.zaxis.r2l(a.z)*t[2]]),p(l.graphDiv,a,r,l.id,a._xa,a._ya))}}}}),GD=ze({"src/components/annotations3d/index.js"(J,V){"use strict";var p=mi(),b=Nr();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Xx()}}},layoutAttributes:Xx(),handleDefaults:UD(),includeBasePlot:E,convert:qD(),draw:VD()};function E(k,l){var e=p.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,n=Object.keys(k),r=0;r{var x=A+"anchor",z=A==="x"?w:S,I={_fullLayout:a},O,D,B,F;let P=A+"ref",j=n[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(v,m,A);F=b.coerceRefArray(n,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=b.coerceRef(n,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){b.getRefType(U)==="range"&&(O=b.getFromId(I,U),O&&O._shapeIndices.indexOf(r._index)===-1&&O._shapeIndices.push(r._index))}),g&&[0,1].forEach(function(U){let $=F[U];b.getRefType($)==="range"?(O=b.getFromId(I,$),D=l.shapePositionToRange(O),B=l.rangeToShapePosition(O),(O.type==="category"||O.type==="multicategory")&&o(A+U+"shift")):D=B=p.identity;let re=A+U,ne=n[re];if(n[re]=D(n[re],!0),z==="pixel"?o(re,C[U]):b.coercePosition(r,I,o,$,re,M[U]),r[re]=B(r[re]),n[re]=ne,U===0&&z==="pixel"){let se=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,$,x,.25),r[x]=B(r[x]),n[x]=se}});else{if(b.getRefType(F)==="range"?(O=b.getFromId(I,F),O._shapeIndices.push(r._index),B=l.rangeToShapePosition(O),D=l.shapePositionToRange(O),g&&(O.type==="category"||O.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):D=B=p.identity,g){let $=A+"0",Q=A+"1",re=n[$],ne=n[Q];n[$]=D(n[$],!0),n[Q]=D(n[Q],!0),z==="pixel"?(o($,C[0]),o(Q,C[1])):(b.coercePosition(r,I,o,F,$,M[0]),b.coercePosition(r,I,o,F,Q,M[1])),r[$]=B(r[$]),r[Q]=B(r[Q]),n[$]=re,n[Q]=ne}if(z==="pixel"){let $=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,F,x,.25),r[x]=B(r[x]),n[x]=$}}}),g&&p.noneOrAll(n,r,["x0","x1","y0","y1"]);var _=v==="line",T,f;if(g&&(T=o("label.texttemplate"),o("label.texttemplatefallback")),T||(f=o("label.text")),f||T){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),p.coerceFont(o,"label.font",a.font)}}}}),WD=ze({"src/components/shapes/draw_newshape/defaults.js"(J,V){"use strict";var p=Qn(),b=Nr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),b.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var n=t("newshape.line.width");if(n){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",p.contrast(r)),t("newshape.line.dash")}var a=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",a?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(a,c)),t("newshape.label.padding"),b.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),YD=ze({"src/components/shapes/calc_autorange.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=h1(),k=cv();V.exports=function(o){var s=o._fullLayout,c=p.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var m=0;m{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,e(h))})}else h.xref!=="paper"&&i!=="domain"&&(v=b.getFromId(o,h.xref),g=r(v,h,E.paramIsX),g&&(h._extremes[v._id]=b.findExtremes(v,g,e(h))));if(w==="array"){let S=l(o,h,"y");Object.entries(S).forEach(([M,C])=>{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,t(h))})}else h.yref!=="paper"&&w!=="domain"&&(v=b.getFromId(o,h.yref),g=r(v,h,E.paramIsY),g&&(h._extremes[v._id]=b.findExtremes(v,g,t(h))))}};function l(a,o,s){let c=o[s+"ref"],m=s==="x"?E.paramIsX:E.paramIsY;function h(M,C){M==="paper"||b.getRefType(M)==="domain"||(v[M]||(v[M]=[]),v[M].push(C))}let v={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var g=0,i=0;iT&&(h(c[g],f[T]),g++)}}else h(c[0],o[s+"0"]),h(c[1],o[s+"1"]);let w={};for(let M in v){let C=b.getFromId(a,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),w[C._id]=v[M].map(S)}}return w}function e(a){return n(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function t(a){return n(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function n(a,o,s,c,m,h){var v=a/2,g=h;if(o==="pixel"){var i=m?k.extractPathCoords(m,h?E.paramIsY:E.paramIsX):[s,c],w=p.aggNums(Math.max,null,i),S=p.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+v:v,C=w>0?w+v:v;return{ppad:v,ppadplus:g?M:C,ppadminus:g?C:M}}else return{ppad:v}}function r(a,o,s){var c=a._id.charAt(0)==="x"?"x":"y",m=a.type==="category"||a.type==="multicategory",h,v,g=0,i=0,w=m?a.r2c:a.d2c,S=o[c+"sizemode"]==="scaled";if(S?(h=o[c+"0"],v=o[c+"1"],m&&(g=o[c+"0shift"],i=o[c+"1shift"])):(h=o[c+"anchor"],v=o[c+"anchor"]),h!==void 0)return[w(h)+g,w(v)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),T,f,u,A,x;for(a.type==="date"&&(w=k.decodeDate(w)),T=0;T<_.length;T++)f=_[T],u=s[f.charAt(0)].drawn,u!==void 0&&(A=_[T].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=x)));if(C>=M)return[M,C]}}}}),XD=ze({"src/components/shapes/index.js"(J,V){"use strict";var p=Ox();V.exports={moduleType:"component",name:"shapes",layoutAttributes:L5(),supplyLayoutDefaults:HD(),supplyDrawNewShapeDefaults:WD(),includeBasePlot:m1()("shapes"),calcAutorange:YD(),draw:p.draw,drawOne:p.drawOne}}}),P5=ze({"src/components/images/attributes.js"(J,V){"use strict";var p=hc(),b=hs().templatedArray,E=v1();V.exports=b("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",p.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",p.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),ZD=ze({"src/components/images/defaults.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Jf(),k=P5(),l="images";V.exports=function(n,r){var a={name:l,handleItemDefaults:e};E(n,r,a)};function e(t,n,r){function a(w,S){return p.coerce(t,n,k,w,S)}var o=a("source"),s=a("visible",!!o);if(!s)return n;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var c={_fullLayout:r},m=["x","y"],h=0;h<2;h++){var v=m[h],g=b.coerceRef(t,n,c,v,"paper",void 0);if(g!=="paper"){var i=b.getFromId(c,g);i._imgIndices.push(n._index)}b.coercePosition(n,c,a,g,v,0)}return n}}}),$D=ze({"src/components/images/draw.js"(J,V){"use strict";var p=ci(),b=$i(),E=Gi(),k=Xl(),l=nd();V.exports=function(t){var n=t._fullLayout,r=[],a={},o=[],s,c;for(c=0;c0);m&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),p.noneOrAll(r,a,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),p.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function n(r,a){function o(c,m){return p.coerce(r,a,e,c,m)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),eF=ze({"src/components/updatemenus/scrollbox.js"(J,V){"use strict";V.exports=l;var p=ci(),b=Qn(),E=$i(),k=Nr();function l(e,t,n){this.gd=e,this.container=t,this.id=n,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})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,n,r){var a=this.gd._fullLayout,o=a.width,s=a.height;this.position=t;var c=this.position.l,m=this.position.w,h=this.position.t,v=this.position.h,g=this.position.direction,i=g==="down",w=g==="left",S=g==="right",M=g==="up",C=m,_=v,T,f,u,A;!i&&!w&&!S&&!M&&(this.position.direction="down",i=!0);var x=i||M;x?(T=c,f=T+C,i?(u=h,A=Math.min(u+_,s),_=A-u):(A=h+_,u=Math.max(A-_,0),_=A-u)):(u=h,A=u+_,w?(f=c+C,T=Math.max(f-C,0),C=f-T):(T=c,f=Math.min(T+C,o),C=f-T)),this._box={l:T,t:u,w:C,h:_};var z=m>C,I=l.barLength+2*l.barPad,O=l.barWidth+2*l.barPad,D=c,B=h+v;B+O>s&&(B=s-O);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(b.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:D,y:B,width:I,height:O}),this._hbarXMin=D+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=v>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,$=c+m,Q=h;$+j>o&&($=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(b.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:$,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ne=this.id,se=T-.5,G=P?f+j+.5:f+.5,X=u-.5,K=z?A+O+.5:A+.5,H=a._topdefs.selectAll("#"+ne).data(z||P?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",ne).append("rect"),z||P?(this._clipRect=H.select("rect").attr({x:Math.floor(se),y:Math.floor(X),width:Math.ceil(G)-Math.floor(se),height:Math.ceil(K)-Math.floor(X)}),this.container.call(E.setClipUrl,ne,this.gd),this.bg.attr({x:c,y:h,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var Y=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault(),p.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(n,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.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)},l.prototype._onBoxDrag=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t-=p.event.dx),this.vbar&&(n-=p.event.dy),this.setTranslate(t,n)},l.prototype._onBoxWheel=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t+=p.event.deltaY),this.vbar&&(n+=p.event.deltaY),this.setTranslate(t,n)},l.prototype._onBarDrag=function(){var t=this.translateX,n=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax,o=k.constrain(p.event.x,r,a),s=(o-r)/(a-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var m=n+this._vbarYMin,h=m+this._vbarTranslateMax,v=k.constrain(p.event.y,m,h),g=(v-m)/(h-m),i=this.position.h-this._box.h;n=g*i}this.setTranslate(t,n)},l.prototype.setTranslate=function(t,n){var r=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),n=k.constrain(n||0,0,a),this.translateX=t,this.translateY=n,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-n),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+n-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,n)}if(this.vbar){var s=n/a;this.vbar.call(E.setTranslate,t,n+s*this._vbarTranslateMax)}}}}),tF=ze({"src/components/updatemenus/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=Qn(),k=$i(),l=Nr(),e=Cs(),t=hs().arrayEditor,n=dc().LINE_SPACING,r=Zx(),a=eF();V.exports=function(I){var O=I._fullLayout,D=l.filterVisible(O[r.name]);function B(ne){b.autoMargin(I,u(ne))}var F=O._menulayer.selectAll("g."+r.containerClassName).data(D.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){p.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),D.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(D,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ne){ne.style("pointer-events","all")}),U=0;U0?[0]:[]);$.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(G){G._commandObserver&&(G._commandObserver.remove(),delete G._commandObserver),b.autoMargin(F,m(G))}if($.exit().each(function(){p.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=$.selectAll("g."+r.groupClassName).data(U,v);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ne=0;ne0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function O(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function($){$.call(f,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function D(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),iF=ze({"src/components/sliders/index.js"(J,V){"use strict";var p=_1();V.exports={moduleType:"component",name:p.name,layoutAttributes:I5(),supplyLayoutDefaults:aF(),draw:nF()}}}),$x=ze({"src/components/rangeslider/attributes.js"(J,V){"use strict";var p=fc();V.exports={bgcolor:{valType:"color",dflt:p.background,editType:"plot"},bordercolor:{valType:"color",dflt:p.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"}}}),D5=ze({"src/components/rangeslider/oppaxis_attributes.js"(J,V){"use strict";V.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"}}}),Kx=ze({"src/components/rangeslider/constants.js"(J,V){"use strict";V.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}}}),oF=ze({"src/components/rangeslider/helpers.js"(J){"use strict";var V=Xl(),p=Cs(),b=Kx(),E=dc().LINE_SPACING,k=b.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=V.list({_fullLayout:e},"x",!0),n=e.margin,r=[],a=0;a=Ge.max)Ie=he[Ve+1];else if(Se=Ge.pmax)Ie=he[Ve+1];else if(Se0?f.touches[0].clientX:0}function h(f,u,A,x){if(u._context.staticPlot)return;var z=f.select("rect."+c.slideBoxClassName).node(),I=f.select("rect."+c.grabAreaMinClassName).node(),O=f.select("rect."+c.grabAreaMaxClassName).node();function D(){var B=p.event,F=B.target,P=m(B),j=P-f.node().getBoundingClientRect().left,U=x.d2p(A._rl[0]),$=x.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ne),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ne);function re(se){var G=m(se),X=+G-P,K,H,Y;switch(F){case z:if(Y="ew-resize",U+X>A._length||$+X<0)return;K=U+X,H=$+X;break;case I:if(Y="col-resize",U+X>A._length)return;K=U+X,H=$;break;case O:if(Y="col-resize",$+X<0)return;K=U,H=$+X;break;default:Y="ew-resize",K=j,H=j+X;break}if(H0);if(w){var S=n(o,s,c);g("x",S[0]),g("y",S[1]),p.noneOrAll(a,o,["x","y"]),g("xanchor"),g("yanchor"),p.coerceFont(g,"font",s.font);var M=g("bgcolor");g("activecolor",b.contrast(M,e.lightAmount,e.darkAmount)),g("bordercolor"),g("borderwidth")}};function t(r,a,o,s){var c=s.calendar;function m(g,i){return p.coerce(r,a,l.buttons,g,i)}var h=m("visible");if(h){var v=m("step");v!=="all"&&(c&&c!=="gregorian"&&(v==="month"||v==="year")?a.stepmode="backward":m("stepmode"),m("count")),m("label")}}function n(r,a,o){for(var s=o.filter(function(v){return a[v].anchor===r._id}),c=0,m=0;m1)){delete c.grid;return}if(!g&&!i&&!w){var A=T("pattern")==="independent";A&&(g=!0)}_._hasSubplotGrid=g;var x=T("roworder"),z=x==="top to bottom",I=g?.2:.1,O=g?.3:.1,D,B;S&&c._splomGridDflt&&(D=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",T,I,D,u),y:r("y",T,O,B,f,z)}}function r(s,c,m,h,v,g){var i=c(s+"gap",m),w=c("domain."+s);c(s+"side",h);for(var S=new Array(v),M=w[0],C=(w[1]-M)/(v-i),_=C*(1-i),T=0;T0,h=t._context.staticPlot;n.each(function(v){var g=v[0].trace,i=g.error_x||{},w=g.error_y||{},S;g.ids&&(S=function(T){return T.id});var M=k.hasMarkers(g)&&g.marker.maxdisplayed>0;!w.visible&&!i.visible&&(v=[]);var C=p.select(this).selectAll("g.errorbar").data(v,S);if(C.exit().remove(),!!v.length){i.visible||C.selectAll("path.xerror").remove(),w.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);m&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(T){var f=p.select(this),u=l(T,s,c);if(!(M&&!T.vis)){var A,x=f.select("path.yerror");if(w.visible&&b(u.x)&&b(u.yh)&&b(u.ys)){var z=w.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!x.size(),o?x=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0):m&&(x=x.transition().duration(a.duration).ease(a.easing)),x.attr("d",A)}else x.remove();var I=f.select("path.xerror");if(i.visible&&b(u.y)&&b(u.xh)&&b(u.xs)){var O=(i.copy_ystyle?w:i).width;A="M"+u.xh+","+(u.y-O)+"v"+2*O+"m0,-"+O+"H"+u.xs,u.noXS||(A+="m0,-"+O+"v"+2*O),o=!I.size(),o?I=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0):m&&(I=I.transition().duration(a.duration).ease(a.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return e.yh!==void 0&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),b(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),b(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),yF=ze({"src/components/errorbars/style.js"(J,V){"use strict";var p=ci(),b=Qn();V.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},n=e.error_x||{},r=p.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(b.stroke,t.color),n.copy_ystyle&&(n=t),r.selectAll("path.xerror").style("stroke-width",n.thickness+"px").call(b.stroke,n.color)})}}}),_F=ze({"src/components/errorbars/index.js"(J,V){"use strict";var p=Nr(),b=Al().overrideAll,E=B5(),k={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E),error_z:p.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:b(l,"calc","nested"),scattergl:b(k,"calc","nested")}},supplyDefaults:vF(),calc:mF(),makeComputeError:O5(),plot:gF(),style:yF(),hoverInfo:e};function e(t,n,r){(n.error_y||{}).visible&&(r.yerr=t.yh-t.y,n.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(n.error_x||{}).visible&&(r.xerr=t.xh-t.x,n.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),xF=ze({"src/components/colorbar/constants.js"(J,V){"use strict";V.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"}}}}),bF=ze({"src/components/colorbar/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=mi(),k=Gi(),l=_h(),e=Nr(),t=e.strTranslate,n=Ki().extendFlat,r=gd(),a=$i(),o=Qn(),s=qv(),c=Cs(),m=Bf().flipScale,h=y1(),v=Wx(),g=cf(),i=dc(),w=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=xF().cn;function _(O){var D=O._fullLayout,B=D._infolayer.selectAll("g."+C.colorbar).data(T(O),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=p.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,O);j&&j.then&&(O._promises||[]).push(j),O._context.edits.colorbarPosition&&x(P,F,O)}),B.exit().each(function(F){b.autoMargin(O,F._id)}).remove(),B.order()}function T(O){var D=O._fullLayout,B=O.calcdata,F=[],P,j,U,$;function Q(ee){return n(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof $.calc=="function"?$.calc(O,U,P):(P._fillgradient=j.reversescale?m(j.colorscale):j.colorscale,P._zrange=[j[$.min],j[$.max]])}for(var ne=0;ne[Math.min(O[0]+D,O[1]),O[1]],u=(O,D)=>[O[0],Math.max(O[1]-D,O[0])];function A(O,D,B){var F=D.orientation==="v",P=D.len,j=D.lenmode,U=D.thickness,$=D.thicknessmode,Q=D.outlinewidth,re=D.borderwidth,ne=D.bgcolor,se=D.xanchor,G=D.yanchor,X=D.xpad,K=D.ypad,H=D.x,Y=F?D.y:1-D.y,q=D.yref==="paper",Z=D.xref==="paper",ee=B._fullLayout,ae=ee._size,he=D._fillcolor,xe=D._line,we=D.title,Me=we.side,Se=D._zrange||p.extent((typeof he=="function"?he:xe.color).domain()),Ie=typeof xe.color=="function"?xe.color:function(){return xe.color},Ve=typeof he=="function"?he:function(){return he},Ge=D._levels,ke=z(B,D,Se),_e=ke.fill,ce=ke.line,ve=Math.round(U*($==="fraction"?F?ae.w:ae.h:1)),le=ve/(F?ae.w:ae.h),Ae=Math.round(P*(j==="fraction"?F?ae.h:ae.w:1)),Be=Ae/(F?ae.h:ae.w),Xe=Z?ae.w:B._fullLayout.width,Ye=q?ae.h:B._fullLayout.height,yt=Math.round(F?H*Xe+X:Y*Ye+K),gt={center:.5,right:1}[se]||0,Tt={top:1,middle:.5}[G]||0,At=F?H-gt*le:Y-Tt*le,$t=F?Y-Tt*Be:H-gt*Be,rr=Math.round(F?Ye*(1-$t):Xe*$t);D._lenFrac=Be,D._thickFrac=le,D._uFrac=At,D._vFrac=$t;var _r=D._axis=I(B,D,Se);_r.position=le+(F?H+X/ae.w:Y+K/ae.h);var Xt=["top","bottom"].indexOf(Me)!==-1;if(F&&Xt&&(_r.title.side=Me,_r.titlex=H+X/ae.w,_r.titley=$t+(we.side==="top"?Be-K/ae.h:K/ae.h)),!F&&!Xt&&(_r.title.side=Me,_r.titley=Y+K/ae.h,_r.titlex=$t+X/ae.w),xe.color&&D.tickmode==="auto"){_r.tickmode="linear",_r.tick0=Ge.start;var or=Ge.size,Ot=e.constrain(Ae/50,4,15)+1,vt=(Se[1]-Se[0])/((D.nticks||Ot)*or);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));or*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(Ge.start)/Ge.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=or}var De=F?K/ae.h:X/ae.w;_r.domain=u(f([$t,$t+Be],De),De),_r.setScale(),O.attr("transform",t(Math.round(ae.l),Math.round(ae.t)));var Ne=O.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ae.l),-Math.round(ae.t))),We=_r.ticklabelposition,Ke=_r.title.font.size,Je=O.select("."+C.cbaxis),et,Mt=0,pt=0;function Pt(Sr,Kr){var Yt={propContainer:_r,propName:D._propPrefix+"title.text",traceIndex:D._traceIndex,_meta:D._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Rt=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;O.selectAll("."+Rt+",."+Rt+"-math-group").remove(),s.draw(B,Sr,n(Yt,Kr||{}))}function Ct(){if(F&&Xt||!F&&!Xt){var Sr,Kr;Me==="top"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t-Be)+3+Ke*.75),Me==="bottom"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t)-3-Ke*.25),Me==="right"&&(Kr=K+ae.t+Ye*Y+3+Ke*.75,Sr=X+ae.l+Xe*$t),Pt(_r._id+"title",{attributes:{x:Sr,y:Kr,"text-anchor":F?"start":"middle"}})}}function qt(){if(F&&!Xt||!F&&Xt){var Sr=_r.position||0,Kr=_r._offset+_r._length/2,Yt,Rt;if(Me==="right")Rt=Kr,Yt=ae.l+Xe*Sr+10+Ke*(_r.showticklabels?1:.5);else if(Yt=Kr,Me==="bottom"&&(Rt=ae.t+Ye*Sr+10+(We.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&D.ticklen||0)),Me==="top"){var nr=we.text.split("
").length;Rt=ae.t+Ye*Sr+10-ve-w*Ke*nr}Pt((F?"h":"v")+_r._id+"title",{avoid:{selection:p.select(B).selectAll("g."+_r._id+"tick"),side:Me,offsetTop:F?0:ae.t,offsetLeft:F?ae.l:0,maxShift:F?ee.width:ee.height},attributes:{x:Yt,y:Rt,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Vt(){if(!F&&!Xt||F&&Xt){var Sr=O.select("."+C.cbtitle),Kr=Sr.select("text"),Yt=[-Q/2,Q/2],Rt=Sr.select(".h"+_r._id+"title-math-group").node(),nr=15.6;Kr.node()&&(nr=parseInt(Kr.node().style.fontSize,10)*w);var ur;if(Rt?(ur=a.bBox(Rt),pt=ur.width,Mt=ur.height,Mt>nr&&(Yt[1]-=(Mt-nr)/2)):Kr.node()&&!Kr.classed(C.jsPlaceholder)&&(ur=a.bBox(Kr.node()),pt=ur.width,Mt=ur.height),F){if(Mt){if(Mt+=5,Me==="top")_r.domain=u(_r.domain,Mt/ae.h),Yt[1]*=-1;else{_r.domain=f(_r.domain,Mt/ae.h);var cr=c.lineCount(Kr);Yt[1]+=(1-cr)*nr}Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale()}}else pt&&(Me==="right"&&(_r.domain=f(_r.domain,(pt+Ke/2)/ae.w)),Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ae.h*(1-_r.domain[1]))):t(Math.round(ae.w*_r.domain[0]),0)),Je.attr("transform",F?t(0,Math.round(-ae.t)):t(Math.round(-ae.l),0));var Rr=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(_e);Rr.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Rr.exit().remove();var Qr=Se.map(_r.c2p).map(Math.round).sort(function(un,Xa){return un-Xa});Rr.each(function(un,Xa){var ja=[Xa===0?Se[0]:(_e[Xa]+_e[Xa-1])/2,Xa===_e.length-1?Se[1]:(_e[Xa]+_e[Xa+1])/2].map(_r.c2p).map(Math.round);F&&(ja[1]=e.constrain(ja[1]+(ja[1]>ja[0])?1:-1,Qr[0],Qr[1]));var Nn=p.select(this).attr(F?"x":"y",yt).attr(F?"y":"x",p.min(ja)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(p.max(ja)-p.min(ja),2));if(D._fillgradient)a.gradient(Nn,B,D._id,F?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var yn=Ve(un).replace("e-","");Nn.attr("fill",o.hexString(yn))}});var Zr=O.select("."+C.cblines).selectAll("path."+C.cbline).data(xe.color&&xe.width?ce:[]);Zr.enter().append("path").classed(C.cbline,!0),Zr.exit().remove(),Zr.each(function(un){var Xa=yt,ja=Math.round(_r.c2p(un))+xe.width/2%1;p.select(this).attr("d","M"+(F?Xa+","+ja:ja+","+Xa)+(F?"h":"v")+ve).call(a.lineGroupStyle,xe.width,Ie(un),xe.dash)}),Je.selectAll("g."+_r._id+"tick,path").remove();var ha=yt+ve+(Q||0)/2-(D.ticks==="outside"?1:0),Pa=k.calcTicks(_r),La=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,Pa):Pa,layer:Je,path:k.makeTickPath(_r,ha,La),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:Pa,layer:Je,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,ha)})}function Ht(){var Sr,Kr=ve+Q/2;We.indexOf("inside")===-1&&(Sr=a.bBox(Je.node()),Kr+=F?Sr.width:Sr.height),et=Ne.select("text");var Yt=0,Rt=F&&Me==="top",nr=!F&&Me==="right",ur=0;if(et.node()&&!et.classed(C.jsPlaceholder)){var cr,Rr=Ne.select(".h"+_r._id+"title-math-group").node();Rr&&(F&&Xt||!F&&!Xt)?(Sr=a.bBox(Rr),Yt=Sr.width,cr=Sr.height):(Sr=a.bBox(Ne.node()),Yt=Sr.right-ae.l-(F?yt:rr),cr=Sr.bottom-ae.t-(F?rr:yt),!F&&Me==="top"&&(Kr+=Sr.height,ur=Sr.height)),nr&&(et.attr("transform",t(Yt/2+Ke/2,0)),Yt*=2),Kr=Math.max(Kr,F?Yt:cr)}var Qr=(F?X:K)*2+Kr+re+Q/2,Zr=0;!F&&we.text&&G==="bottom"&&Y<=0&&(Zr=Qr/2,Qr+=Zr,ur+=Zr),ee._hColorbarMoveTitle=Zr,ee._hColorbarMoveCBTitle=ur;var ha=re+Q,Pa=(F?yt:rr)-ha/2-(F?X:0),La=(F?rr:yt)-(F?Ae:K+ur-Zr);O.select("."+C.cbbg).attr("x",Pa).attr("y",La).attr(F?"width":"height",Math.max(Qr-Zr,2)).attr(F?"height":"width",Math.max(Ae+ha,2)).call(o.fill,ne).call(o.stroke,D.bordercolor).style("stroke-width",re);var un=nr?Math.max(Yt-10,0):0;O.selectAll("."+C.cboutline).attr("x",(F?yt:rr+X)+un).attr("y",(F?rr+K-Ae:yt)+(Rt?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Ae-(F?2*K+Mt:2*X+un),2)).call(o.stroke,D.outlinecolor).style({fill:"none","stroke-width":Q});var Xa=F?gt*Qr:0,ja=F?0:(1-Tt)*Qr-ur;if(Xa=Z?ae.l-Xa:-Xa,ja=q?ae.t-ja:-ja,O.attr("transform",t(Xa,ja)),!F&&(re||o.opacity(ne)&&!o.equals(ee.paper_bgcolor,ne))){var Nn=Je.selectAll("text"),yn=Nn[0].length,Un=O.select("."+C.cbbg).node(),li=a.bBox(Un),Yn=a.getTranslate(O),on=2;Nn.each(function(Tr,Ir){var Dr=0,ot=yn-1;if(Ir===Dr||Ir===ot){var kt=a.bBox(this),jt=a.getTranslate(this),ar;if(Ir===ot){var Er=kt.right+jt.x,xr=li.right+Yn.x+rr-re-on+H;ar=xr-Er,ar>0&&(ar=0)}else if(Ir===Dr){var zr=kt.left+jt.x,Lr=li.left+Yn.x+rr+re+on;ar=Lr-zr,ar<0&&(ar=0)}ar&&(yn<3?this.setAttribute("transform","translate("+ar+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var en={},vi=S[se],Yi=M[se],Ja=S[G],Oa=M[G],lt=Qr-ve;F?(j==="pixels"?(en.y=Y,en.t=Ae*Ja,en.b=Ae*Oa):(en.t=en.b=0,en.yt=Y+P*Ja,en.yb=Y-P*Oa),$==="pixels"?(en.x=H,en.l=Qr*vi,en.r=Qr*Yi):(en.l=lt*vi,en.r=lt*Yi,en.xl=H-U*vi,en.xr=H+U*Yi)):(j==="pixels"?(en.x=H,en.l=Ae*vi,en.r=Ae*Yi):(en.l=en.r=0,en.xl=H+P*vi,en.xr=H-P*Yi),$==="pixels"?(en.y=1-Y,en.t=Qr*Ja,en.b=Qr*Oa):(en.t=lt*Ja,en.b=lt*Oa,en.yt=Y-U*Ja,en.yb=Y+U*Oa));var rt=D.y<.5?"b":"t",fr=D.x<.5?"l":"r";B._fullLayout._reservedMargin[D._id]={};var lr={r:ee.width-Pa-Xa,l:Pa+en.r,b:ee.height-La-ja,t:La+en.b};Z&&q?b.autoMargin(B,D._id,en):Z?B._fullLayout._reservedMargin[D._id][rt]=lr[rt]:q||F?B._fullLayout._reservedMargin[D._id][fr]=lr[fr]:B._fullLayout._reservedMargin[D._id][rt]=lr[rt]}return e.syncOrAsync([b.previousPromises,Ct,Vt,qt,b.previousPromises,Ht],B)}function x(O,D,B){var F=D.orientation==="v",P=B._fullLayout,j=P._size,U,$,Q;l.init({element:O.node(),gd:B,prepFn:function(){U=O.attr("transform"),r(O)},moveFn:function(re,ne){O.attr("transform",U+t(re,ne)),$=l.align((F?D._uFrac:D._vFrac)+re/j.w,F?D._thickFrac:D._lenFrac,0,1,D.xanchor),Q=l.align((F?D._vFrac:1-D._uFrac)-ne/j.h,F?D._lenFrac:D._thickFrac,0,1,D.yanchor);var se=l.getCursor($,Q,D.xanchor,D.yanchor);r(O,se)},doneFn:function(){if(r(O),$!==void 0&&Q!==void 0){var re={};re[D._propPrefix+"x"]=$,re[D._propPrefix+"y"]=Q,D._traceIndex!==void 0?E.call("_guiRestyle",B,re,D._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(O,D,B){var F=D._levels,P=[],j=[],U,$,Q=F.end+F.size/100,re=F.size,ne=1.001*B[0]-.001*B[1],se=1.001*B[1]-.001*B[0];for($=0;$<1e5&&(U=F.start+$*re,!(re>0?U>=Q:U<=Q));$++)U>ne&&U0?U>=Q:U<=Q));$++)U>B[0]&&U-1}V.exports=function(n,r){var a,o=n.data,s=n.layout,c=k([],o),m=k({},s,l(r.tileClass)),h=n._context||{};if(r.width&&(m.width=r.width),r.height&&(m.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){m.annotations=[];var v=Object.keys(m);for(a=0;a=0)return h}else if(typeof h=="string"&&(h=h.trim(),h.slice(-1)==="%"&&p(h.slice(0,-1))&&(h=+h.slice(0,-1),h>=0)))return h+"%"}function m(h,v,g,i,w,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,T=S.moduleHasCliponaxis!==!1,f=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,x=Array.isArray(w)||w==="auto",z=x||w==="inside",I=x||w==="outside";if(z||I){var O=a(i,"textfont",g.font),D=b.extendFlat({},O),B=h.textfont&&h.textfont.color,F=!B;if(F&&delete D.color,a(i,"insidetextfont",D),A){var P=b.extendFlat({},O);F&&delete P.color,a(i,"pathbar.textfont",P)}I&&a(i,"outsidetextfont",O),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),T&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}V.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:m,validateCornerradius:c}}}),j5=ze({"src/traces/bar/layout_defaults.js"(J,V){"use strict";var p=mi(),b=Gi(),E=Nr(),k=Qx(),l=qh().validateCornerradius;V.exports=function(e,t,n){function r(M,C){return E.coerce(e,t,k,M,C)}for(var a=!1,o=!1,s=!1,c={},m=r("barmode"),h=m==="group",v=0;v0&&!c[i]&&(s=!0),c[i]=!0),g.visible&&g.type==="histogram"){var w=b.getFromId({_fullLayout:t},g[g.orientation==="v"?"xaxis":"yaxis"]);w.type!=="category"&&(o=!0)}}if(!a){delete t.barmode;return}m!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),x1=ze({"src/traces/bar/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lt;if(!n)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return V.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return b(E)?k1||A.bargap===0&&A.bargroupgap===0&&!x[0].trace.marker.line.width)&&p.select(this).attr("shape-rendering","crispEdges")}),f.selectAll("g.points").each(function(x){var z=p.select(this),I=x[0].trace;c(z,I,T)}),l.getComponentMethod("errorbars","style")(f)}function c(T,f,u){E.pointStyle(T.selectAll("path"),f,u),m(T,f,u)}function m(T,f,u){T.selectAll("text").each(function(A){var x=p.select(this),z=k.ensureUniformFontSize(u,i(x,A,f,u));E.font(x,z)})}function h(T,f,u){var A=f[0].trace;A.selectedpoints?v(u,A,T):(c(u,A,T),l.getComponentMethod("errorbars","style")(u))}function v(T,f,u){E.selectedPointStyle(T.selectAll("path"),f),g(T.selectAll("text"),f,u)}function g(T,f,u){T.each(function(A){var x=p.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(x,A,f,u));var I=f.selected.textfont&&f.selected.textfont.color;I&&(z.color=I),E.font(x,z)}else E.selectedTextStyle(x,f)})}function i(T,f,u,A){var x=A._fullLayout.font,z=u.textfont;if(T.classed("bartext-inside")){var I=_(f,u);z=S(u,f.i,x,I)}else T.classed("bartext-outside")&&(z=M(u,f.i,x));return z}function w(T,f,u){return C(n,T.textfont,f,u)}function S(T,f,u,A){var x=w(T,f,u),z=T._input.textfont===void 0||T._input.textfont.color===void 0||Array.isArray(T.textfont.color)&&T.textfont.color[f]===void 0;return z&&(x={color:b.contrast(A),family:x.family,size:x.size,weight:x.weight,style:x.style,variant:x.variant,textcase:x.textcase,lineposition:x.lineposition,shadow:x.shadow}),C(r,T.insidetextfont,f,x)}function M(T,f,u){var A=w(T,f,u);return C(a,T.outsidetextfont,f,A)}function C(T,f,u,A){f=f||{};var x=o.getValue(f.family,u),z=o.getValue(f.size,u),I=o.getValue(f.color,u),O=o.getValue(f.weight,u),D=o.getValue(f.style,u),B=o.getValue(f.variant,u),F=o.getValue(f.textcase,u),P=o.getValue(f.lineposition,u),j=o.getValue(f.shadow,u);return{family:o.coerceString(T.family,x,A.family),size:o.coerceNumber(T.size,z,A.size),color:o.coerceColor(T.color,I,A.color),weight:o.coerceString(T.weight,O,A.weight),style:o.coerceString(T.style,D,A.style),variant:o.coerceString(T.variant,B,A.variant),textcase:o.coerceString(T.variant,F,A.textcase),lineposition:o.coerceString(T.variant,P,A.lineposition),shadow:o.coerceString(T.variant,j,A.shadow)}}function _(T,f){return f.type==="waterfall"?f[T.dir].marker.color:T.mcc||T.mc||f.marker.color}V.exports={style:s,styleTextPoints:m,styleOnSelect:h,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),Xv=ze({"src/traces/bar/plot.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Cs(),l=Qn(),e=$i(),t=mi(),n=Gi().tickText,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=ld(),c=tb(),m=hv(),h=jd(),v=h.text,g=h.textposition,i=kh().appendArrayPointValue,w=m.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ne){return re0}function A(re,ne,se,G,X,K){var H=ne.xaxis,Y=ne.yaxis,q=re._fullLayout,Z=re._context.staticPlot;X||(X={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(G,se,"trace bars").each(function(ae){var he=p.select(this),xe=ae[0].trace,we=ae[0].t,Me=xe.type==="waterfall",Se=xe.type==="funnel",Ie=xe.type==="histogram",Ve=xe.type==="bar",Ge=Ve||Se,ke=0;Me&&xe.connector.visible&&xe.connector.mode==="between"&&(ke=xe.connector.line.width/2);var _e=xe.orientation==="h",ce=u(X),ve=E.ensureSingle(he,"g","points"),le=M(xe),Ae=ve.selectAll("g.point").data(E.identity,le);Ae.enter().append("g").classed("point",!0),Ae.exit().remove(),Ae.each(function(Xe,Ye){var yt=p.select(this),gt=T(Xe,H,Y,_e),Tt=gt[0][0],At=gt[0][1],$t=gt[1][0],rr=gt[1][1],_r=(_e?At-Tt:rr-$t)===0;_r&&Ge&&c.getLineWidth(xe,Xe)&&(_r=!1),_r||(_r=!b(Tt)||!b(At)||!b($t)||!b(rr)),Xe.isBlank=_r,_r&&(_e?At=Tt:rr=$t),ke&&!_r&&(_e?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):($t-=_($t,rr)*ke,rr+=_($t,rr)*ke));var Xt,or;if(xe.type==="waterfall"){if(!_r){var Ot=xe[Xe.dir].marker;Xt=Ot.line.width,or=Ot.color}}else Xt=c.getLineWidth(xe,Xe),or=Xe.mc||xe.marker.color;function vt(Zr){var ha=p.round(Xt/2%1,2);return X.gap===0&&X.groupgap===0?p.round(Math.round(Zr)-ha,2):Zr}function ht(Zr,ha,Pa){return Pa&&Zr===ha?Zr:Math.abs(Zr-ha)>=2?vt(Zr):Zr>ha?Math.ceil(Zr):Math.floor(Zr)}var De=l.opacity(or),Ne=De<1||Xt>.01?vt:ht;re._context.staticPlot||(Tt=Ne(Tt,At,_e),At=Ne(At,Tt,_e),$t=Ne($t,rr,!_e),rr=Ne(rr,$t,!_e));var We=_e?H.c2p:Y.c2p,Ke;Xe.s0>0?Ke=Xe._sMax:Xe.s0<0?Ke=Xe._sMin:Ke=Xe.s1>0?Xe._sMax:Xe._sMin;function Je(Zr,ha){if(!Zr)return 0;var Pa=Math.abs(_e?rr-$t:At-Tt),La=Math.abs(_e?At-Tt:rr-$t),un=Ne(Math.abs(We(Ke,!0)-We(0,!0))),Xa=Xe.hasB?Math.min(Pa/2,La/2):Math.min(Pa/2,un),ja;if(ha==="%"){var Nn=Math.min(50,Zr);ja=Pa*(Nn/100)}else ja=Zr;return Ne(Math.max(Math.min(ja,Xa),0))}var et=Ve||Ie?Je(we.cornerradiusvalue,we.cornerradiusform):0,Mt,pt,Pt="M"+Tt+","+$t+"V"+rr+"H"+At+"V"+$t+"Z",Ct=0;if(et&&Xe.s){var qt=C(Xe.s0)===0||C(Xe.s)===C(Xe.s0)?Xe.s1:Xe.s0;if(Ct=Ne(Xe.hasB?0:Math.abs(We(Ke,!0)-We(qt,!0))),Ct0?Math.sqrt(Ct*(2*et-Ct)):0,Rt=Vt>0?Math.max:Math.min;Mt="M"+Tt+","+$t+"V"+(rr-Kr*Ht)+"H"+Rt(At-(et-Ct)*Vt,Tt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht-Yt)+"V"+($t+et*Ht+Yt)+"A "+et+","+et+" 0 0 "+Sr+" "+Rt(At-(et-Ct)*Vt,Tt)+","+($t+Kr*Ht)+"Z"}else if(Xe.hasB)Mt="M"+(Tt+et*Vt)+","+$t+"A "+et+","+et+" 0 0 "+Sr+" "+Tt+","+($t+et*Ht)+"V"+(rr-et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt)+","+rr+"H"+(At-et*Vt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht)+"V"+($t+et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-et*Vt)+","+$t+"Z";else{pt=Math.abs(rr-$t)+Ct;var nr=pt0?Math.sqrt(Ct*(2*et-Ct)):0,cr=Ht>0?Math.max:Math.min;Mt="M"+(Tt+nr*Vt)+","+$t+"V"+cr(rr-(et-Ct)*Ht,$t)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt-ur)+","+rr+"H"+(At-et*Vt+ur)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-nr*Vt)+","+cr(rr-(et-Ct)*Ht,$t)+"V"+$t+"Z"}}else Mt=Pt}else Mt=Pt;var Rr=f(E.ensureSingle(yt,"path"),q,X,K);if(Rr.style("vector-effect",Z?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(rr-$t))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ne.layerClipId,re),!q.uniformtext.mode&&ce){var Qr=e.makePointStyleFns(xe);e.singlePointStyle(Xe,Rr,xe,Qr,re)}x(re,ne,yt,ae,Ye,Tt,At,$t,rr,et,Ct,X,K),ne.layerClipId&&e.hideOutsideRangePoint(Xe,yt.select("text"),H,Y,xe.xcalendar,xe.ycalendar)});var Be=xe.cliponaxis===!1;e.setClipUrl(he,Be?null:ne.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ne,X)}function x(re,ne,se,G,X,K,H,Y,q,Z,ee,ae,he){var xe=ne.xaxis,we=ne.yaxis,Me=re._fullLayout,Se;function Ie(Pt,Ct,qt){var Vt=E.ensureSingle(Pt,"text").text(Ct).attr({class:"bartext bartext-"+Se,"text-anchor":"middle","data-notex":1}).call(e.font,qt).call(k.convertToTspans,re);return Vt}var Ve=G[0].trace,Ge=Ve.orientation==="h",ke=U(G,Ge,xe,we),_e=P(Me,G,X,xe,we);Se=j(Ve,X);var ce=ae.mode==="stack"||ae.mode==="relative",ve=G[X],le=!ce||ve._outmost,Ae=ve.hasB,Be=Z&&Z-ee>w;if(!_e||Se==="none"||(ve.isBlank||K===H||Y===q)&&(Se==="auto"||Se==="inside")){se.select("text").remove();return}var Xe=Me.font,Ye=s.getBarColor(G[X],Ve),yt=s.getInsideTextFont(Ve,X,Xe,Ye),gt=s.getOutsideTextFont(Ve,X,Xe),Tt=Ve.insidetextanchor||"end",At=se.datum();Ge?xe.type==="log"&&At.s0<=0&&(xe.range[0]0&&ht>0,We;Be?Ae?We=z(_r-2*Z,Xt,vt,ht,Ge)||z(_r,Xt-2*Z,vt,ht,Ge):Ge?We=z(_r-(Z-ee),Xt,vt,ht,Ge)||z(_r,Xt-2*(Z-ee),vt,ht,Ge):We=z(_r,Xt-(Z-ee),vt,ht,Ge)||z(_r-2*(Z-ee),Xt,vt,ht,Ge):We=z(_r,Xt,vt,ht,Ge),Ne&&We?Se="inside":(Se="outside",or.remove(),or=null)}else Se="inside";if(!or){De=E.ensureUniformFontSize(re,Se==="outside"?gt:yt),or=Ie(se,_e,De);var Ke=or.attr("transform");if(or.attr("transform",""),Ot=e.bBox(or.node()),vt=Ot.width,ht=Ot.height,or.attr("transform",Ke),vt<=0||ht<=0){or.remove();return}}var Je=Ve.textangle,et,Mt;Se==="outside"?(Mt=Ve.constraintext==="both"||Ve.constraintext==="outside",et=F(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,zeroBarDir:ke})):(Mt=Ve.constraintext==="both"||Ve.constraintext==="inside",et=D(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,anchor:Tt,hasB:Ae,r:Z,overhead:ee})),et.fontSize=De.size,a(Ve.type==="histogram"?"bar":Ve.type,et,Me),ve.transform=et;var pt=f(or,Me,ae,he);E.setTransormAndDisplay(pt,et)}function z(re,ne,se,G,X){if(re<0||ne<0)return!1;var K=se<=re&&G<=ne,H=se<=ne&&G<=re,Y=X?re>=se*(ne/G):ne>=G*(re/se);return K||H||Y}function I(re){return re==="auto"?0:re}function O(re,ne){var se=Math.PI/180*ne,G=Math.abs(Math.sin(se)),X=Math.abs(Math.cos(se));return{x:re.width*X+re.height*G,y:re.width*G+re.height*X}}function D(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=K.anchor,ee=Z==="end",ae=Z==="start",he=K.leftToRight||0,xe=(he+1)/2,we=1-xe,Me=K.hasB,Se=K.r,Ie=K.overhead,Ve=X.width,Ge=X.height,ke=Math.abs(ne-re),_e=Math.abs(G-se),ce=ke>2*w&&_e>2*w?w:0;ke-=2*ce,_e-=2*ce;var ve=I(q);q==="auto"&&!(Ve<=ke&&Ge<=_e)&&(Ve>ke||Ge>_e)&&(!(Ve>_e||Ge>ke)||Vew){var Xe=B(re,ne,se,G,le,Se,Ie,H,Me);Ae=Xe.scale,Be=Xe.pad}else Ae=1,Y&&(Ae=Math.min(1,ke/le.x,_e/le.y)),Be=0;var Ye=X.left*we+X.right*xe,yt=(X.top+X.bottom)/2,gt=(re+w)*we+(ne-w)*xe,Tt=(se+G)/2,At=0,$t=0;if(ae||ee){var rr=(H?le.x:le.y)/2;Se&&(ee||Me)&&(ce+=Be);var _r=H?_(re,ne):_(se,G);H?ae?(gt=re+_r*ce,At=-_r*rr):(gt=ne-_r*ce,At=_r*rr):ae?(Tt=se+_r*ce,$t=-_r*rr):(Tt=G-_r*ce,$t=_r*rr)}return{textX:Ye,textY:yt,targetX:gt,targetY:Tt,anchorX:At,anchorY:$t,scale:Ae,rotate:ve}}function B(re,ne,se,G,X,K,H,Y,q){var Z=Math.max(0,Math.abs(ne-re)-2*w),ee=Math.max(0,Math.abs(G-se)-2*w),ae=K-w,he=H?ae-Math.sqrt(ae*ae-(ae-H)*(ae-H)):ae,xe=q?ae*2:Y?ae-H:2*he,we=q?ae*2:Y?2*he:ae-H,Me,Se,Ie,Ve,Ge;return X.y/X.x>=ee/(Z-xe)?Ve=ee/X.y:X.y/X.x<=(ee-we)/Z?Ve=Z/X.x:!q&&Y?(Me=X.x*X.x+X.y*X.y/4,Se=-2*X.x*(Z-ae)-X.y*(ee/2-ae),Ie=(Z-ae)*(Z-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):q?(Me=(X.x*X.x+X.y*X.y)/4,Se=-X.x*(Z/2-ae)-X.y*(ee/2-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):(Me=X.x*X.x/4+X.y*X.y,Se=-X.x*(Z/2-ae)-2*X.y*(ee-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee-ae)*(ee-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)),Ve=Math.min(1,Ve),Y?Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(ee-X.y*Ve)/2)*(ae-(ee-X.y*Ve)/2)))-H):Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(Z-X.x*Ve)/2)*(ae-(Z-X.x*Ve)/2)))-H),{scale:Ve,pad:Ge}}function F(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=X.width,ee=X.height,ae=Math.abs(ne-re),he=Math.abs(G-se),xe;H?xe=he>2*w?w:0:xe=ae>2*w?w:0;var we=1;Y&&(we=H?Math.min(1,he/ee):Math.min(1,ae/Z));var Me=I(q),Se=O(X,Me),Ie=(H?Se.x:Se.y)/2,Ve=(X.left+X.right)/2,Ge=(X.top+X.bottom)/2,ke=(re+ne)/2,_e=(se+G)/2,ce=0,ve=0,le;return(H?re===ne:se===G)&&K.zeroBarDir?le=K.zeroBarDir:le=H?_(ne,re):_(se,G),H?(ke=ne-le*xe,ce=le*Ie):(_e=G+le*xe,ve=-le*Ie),{textX:Ve,textY:Ge,targetX:ke,targetY:_e,anchorX:ce,anchorY:ve,scale:we,rotate:Me}}function P(re,ne,se,G,X){var K=ne[0].trace,H=K.texttemplate,Y;return H?Y=$(re,ne,se,G,X):K.textinfo?Y=Q(ne,se,G,X):Y=c.getValue(K.text,se),c.coerceString(v,Y)}function j(re,ne){var se=c.getValue(re.textposition,ne);return c.coerceEnumerated(g,se)}function U(re,ne,se,G){for(var X=!1,K=!1,H=0;H0?X=!0:Y<0&&(K=!0),X&&K)return 0}var q=ne?se:G,Z=-_(q.range[0],q.range[1]);return K?X?0:-Z:Z}function $(re,ne,se,G,X){var K=ne[0].trace,H=E.castOption(K,se,"texttemplate");if(!H)return"";var Y=K.type==="histogram",q=K.type==="waterfall",Z=K.type==="funnel",ee=K.orientation==="h",ae,he,xe,we;ee?(ae="y",he=X,xe="x",we=G):(ae="x",he=G,xe="y",we=X);function Me(ce){return n(he,he.c2l(ce),!0).text}function Se(ce){return n(we,we.c2l(ce),!0).text}var Ie=ne[se],Ve={};Ve.label=Ie.p,Ve.labelLabel=Ve[ae+"Label"]=Me(Ie.p);var Ge=E.castOption(K,Ie.i,"text");(Ge===0||Ge)&&(Ve.text=Ge),Ve.value=Ie.s,Ve.valueLabel=Ve[xe+"Label"]=Se(Ie.s);var ke={};i(ke,K,Ie.i),(Y||ke.x===void 0)&&(ke.x=ee?Ve.value:Ve.label),(Y||ke.y===void 0)&&(ke.y=ee?Ve.label:Ve.value),(Y||ke.xLabel===void 0)&&(ke.xLabel=ee?Ve.valueLabel:Ve.labelLabel),(Y||ke.yLabel===void 0)&&(ke.yLabel=ee?Ve.labelLabel:Ve.valueLabel),q&&(Ve.delta=+Ie.rawS||Ie.s,Ve.deltaLabel=Se(Ve.delta),Ve.final=Ie.v,Ve.finalLabel=Se(Ve.final),Ve.initial=Ve.final-Ve.delta,Ve.initialLabel=Se(Ve.initial)),Z&&(Ve.value=Ie.s,Ve.valueLabel=Se(Ve.value),Ve.percentInitial=Ie.begR,Ve.percentInitialLabel=E.formatPercent(Ie.begR),Ve.percentPrevious=Ie.difR,Ve.percentPreviousLabel=E.formatPercent(Ie.difR),Ve.percentTotal=Ie.sumR,Ve.percenTotalLabel=E.formatPercent(Ie.sumR));var _e=E.castOption(K,Ie.i,"customdata");return _e&&(Ve.customdata=_e),E.texttemplateString({data:[ke,Ve,K._meta],fallback:K.texttemplatefallback,labels:Ve,locale:re._d3locale,template:H})}function Q(re,ne,se,G){var X=re[0].trace,K=X.orientation==="h",H=X.type==="waterfall",Y=X.type==="funnel";function q(_e){var ce=K?G:se;return n(ce,_e,!0).text}function Z(_e){var ce=K?se:G;return n(ce,+_e,!0).text}var ee=X.textinfo,ae=re[ne],he=ee.split("+"),xe=[],we,Me=function(_e){return he.indexOf(_e)!==-1};if(Me("label")&&xe.push(q(re[ne].p)),Me("text")&&(we=E.castOption(X,ae.i,"text"),(we===0||we)&&xe.push(we)),H){var Se=+ae.rawS||ae.s,Ie=ae.v,Ve=Ie-Se;Me("initial")&&xe.push(Z(Ve)),Me("delta")&&xe.push(Z(Se)),Me("final")&&xe.push(Z(Ie))}if(Y){Me("value")&&xe.push(Z(ae.s));var Ge=0;Me("percent initial")&&Ge++,Me("percent previous")&&Ge++,Me("percent total")&&Ge++;var ke=Ge>1;Me("percent initial")&&(we=E.formatPercent(ae.begR),ke&&(we+=" of initial"),xe.push(we)),Me("percent previous")&&(we=E.formatPercent(ae.difR),ke&&(we+=" of previous"),xe.push(we)),Me("percent total")&&(we=E.formatPercent(ae.sumR),ke&&(we+=" of total"),xe.push(we))}return xe.join("
")}V.exports={plot:A,toMoveInsideBar:D}}}),eg=ze({"src/traces/bar/hover.js"(J,V){"use strict";var p=Zl(),b=mi(),E=Qn(),k=Nr().fillText,l=tb().getLineWidth,e=Gi().hoverLabelText,t=No().BADNUM;function n(o,s,c,m,h){var v=r(o,s,c,m,h);if(v){var g=v.cd,i=g[0].trace,w=g[v.index];return v.color=a(i,w),b.getComponentMethod("errorbars","hoverInfo")(w,i,v),[v]}}function r(o,s,c,m,h){var v=o.cd,g=v[0].trace,i=v[0].t,w=m==="closest",S=g.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,T,f,u,A,x,z;g.orientation==="h"?(_=c,T=s,f="y",u="x",A=se,x=Q):(_=s,T=c,f="x",u="y",x=se,A=Q);var I=g[f+"period"],O=w||I;function D(xe){return F(xe,-1)}function B(xe){return F(xe,1)}function F(xe,we){var Me=xe.w;return xe[f]+we*Me/2}function P(xe){return xe[f+"End"]-xe[f+"Start"]}var j=w?D:I?function(xe){return xe.p-P(xe)/2}:function(xe){return Math.min(D(xe),xe.p-i.bardelta/2)},U=w?B:I?function(xe){return xe.p+P(xe)/2}:function(xe){return Math.max(B(xe),xe.p+i.bardelta/2)};function $(xe,we,Me){return h.finiteRange&&(Me=0),p.inbox(xe-_,we-_,Me+Math.min(1,Math.abs(we-xe)/z)-1)}function Q(xe){return $(j(xe),U(xe),M)}function re(xe){return $(D(xe),B(xe),C)}function ne(xe){var we=xe[u];if(S){var Me=Math.abs(xe.rawS)||0;T>0?we+=Me:T<0&&(we-=Me)}return we}function se(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,M+(Se-we)/(Se-Me)-1)}function G(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,C+(Se-we)/(Se-Me)-1)}var X=o[f+"a"],K=o[u+"a"];z=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function H(xe){return(A(xe)+x(xe))/2}var Y=p.getDistanceFunction(m,A,x,H);if(p.getClosest(v,Y,o),o.index!==!1&&v[o.index].p!==t){O||(j=function(xe){return Math.min(D(xe),xe.p-i.bargroupwidth/2)},U=function(xe){return Math.max(B(xe),xe.p+i.bargroupwidth/2)});var q=o.index,Z=v[q],ee=g.base?Z.b+Z.s:Z.s;o[u+"0"]=o[u+"1"]=K.c2p(Z[u],!0),o[u+"LabelVal"]=ee;var ae=i.extents[i.extents.round(Z.p)];o[f+"0"]=X.c2p(w?j(Z):ae[0],!0),o[f+"1"]=X.c2p(w?U(Z):ae[1],!0);var he=Z.orig_p!==void 0;return o[f+"LabelVal"]=he?Z.orig_p:Z.p,o.labelLabel=e(X,o[f+"LabelVal"],g[f+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],g[u+"hoverformat"]),o.baseLabel=e(K,Z.b,g[u+"hoverformat"]),o.spikeDistance=(G(Z)+re(Z))/2,o[f+"Spike"]=X.c2p(Z.p,!0),k(Z,g,o),o.hovertemplate=g.hovertemplate,o}}function a(o,s){var c=s.mcc||o.marker.color,m=s.mlcc||o.marker.line.color,h=l(o,s);if(E.opacity(c))return c;if(E.opacity(m)&&h)return m}V.exports={hoverPoints:n,hoverOnBars:r,getTraceColor:a}}}),PF=ze({"src/traces/bar/event_data.js"(J,V){"use strict";V.exports=function(b,E,k){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),k.orientation==="h"?(b.label=b.y,b.value=b.x):(b.label=b.x,b.value=b.y),b}}}),tg=ze({"src/traces/bar/select.js"(J,V){"use strict";V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=l[0].trace,r=n.type==="funnel",a=n.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",f>0?O=Math.min(A,u):O=Math.min(u)):f>0?(I="h",O=Math.min(A)):O=0;if(!O){c.visible=!1;return}c._length=O;var j=m("orientation",I);c._hasPreCompStats?j==="v"&&f===0?(m("x0",0),m("dx",1)):j==="h"&&T===0&&(m("y0",0),m("dy",1)):j==="v"&&f===0?m("x0"):j==="h"&&T===0&&m("y0");var U=b.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],h)}function a(s,c,m,h){var v=h.prefix,g=p.coerce2(s,c,t,"marker.outliercolor"),i=m("marker.line.outliercolor"),w="outliers";c._hasPreCompStats?w="all":(g||i)&&(w="suspectedoutliers");var S=m(v+"points",w);S?(m("jitter",S==="all"?.3:0),m("pointpos",S==="all"?-1.5:0),m("marker.symbol"),m("marker.opacity"),m("marker.size"),m("marker.angle"),m("marker.color",c.line.color),m("marker.line.color"),m("marker.line.width"),S==="suspectedoutliers"&&(m("marker.line.outliercolor",c.marker.color),m("marker.line.outlierwidth")),m("selected.marker.color"),m("unselected.marker.color"),m("selected.marker.size"),m("unselected.marker.size"),m("text"),m("hovertext")):delete c.marker;var M=m("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(m("hovertemplate"),m("hovertemplatefallback")),p.coerceSelectionMarkerOpacity(c,m)}function o(s,c){var m,h;function v(S){return p.coerce(h._input,h,t,S)}for(var g=0;gne.uf};if(C._hasPreCompStats){var q=C[O],Z=function(rr){return I.d2c((C[rr]||[])[x])},ee=1/0,ae=-1/0;for(x=0;x=ne.q1&&ne.q3>=ne.med){var xe=Z("lowerfence");ne.lf=xe!==l&&xe<=ne.q1?xe:h(ne,G,X);var we=Z("upperfence");ne.uf=we!==l&&we>=ne.q3?we:v(ne,G,X);var Me=Z("mean");ne.mean=Me!==l?Me:X?k.mean(G,X):(ne.q1+ne.q3)/2;var Se=Z("sd");ne.sd=Me!==l&&Se>=0?Se:X?k.stdev(G,X,ne.mean):ne.q3-ne.q1,ne.lo=g(ne),ne.uo=i(ne);var Ie=Z("notchspan");Ie=Ie!==l&&Ie>0?Ie:w(ne,X),ne.ln=ne.med-Ie,ne.un=ne.med+Ie;var Ve=ne.lf,Ge=ne.uf;C.boxpoints&&G.length&&(Ve=Math.min(Ve,G[0]),Ge=Math.max(Ge,G[X-1])),C.notched&&(Ve=Math.min(Ve,ne.ln),Ge=Math.max(Ge,ne.un)),ne.min=Ve,ne.max=Ge}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ne.q1,"median = "+ne.med,"q3 = "+ne.q3].join(` @@ -1994,7 +1994,7 @@ void main() { `)&&F!=="\\"?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function Se(){return Me()}function Ie(){return B==="/"&&F==="*"?(P.push(B),ee(P.join("")),D=c,I+1):(P.push(B),F=B,I+1)}function Ve(){if(F==="."&&/\d/.test(B))return D=S,I;if(F==="/"&&B==="*")return D=h,I;if(F==="/"&&B==="/")return D=v,I;if(B==="."&&P.length){for(;Ge(P););return D=S,I}if(B===";"||B===")"||B==="("){if(P.length)for(;Ge(P););return ee(B),D=c,I+1}var le=P.length===2&&B!=="=";if(/[\w_\d\s]/.test(B)||le){for(;Ge(P););return D=c,I}return P.push(B),F=B,I+1}function Ge(le){var Ae=0,Be,Xe;do{if(Be=r.indexOf(le.slice(0,le.length+Ae).join("")),Xe=r[Be],Be===-1){if(Ae--+le.length>0)continue;Xe=le.slice(0,1).join("")}return ee(Xe),ne+=Xe.length,P=P.slice(Xe.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function _e(){return B==="."||/[eE]/.test(B)?(P.push(B),D=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(D=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ce(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var le=P.join("");return Z[le]?D=_:q[le]?D=C:D=M,ee(P.join("")),D=c,I}return P.push(B),F=B,I+1}}},3508:function(l,e,t){var n=t(6852);n=n.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=n.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(l){l.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(l,e,t){var n=t(620);l.exports=n.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(l){l.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(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var n=t(5874);l.exports=r;function r(a,o){var s=n(o),c=[];return c=c.concat(s(a)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r>1,g=-7,i=r?o-1:0,w=r?-1:1,S=t[n+i];for(i+=w,s=S&(1<<-g)-1,S>>=-g,g+=m;g>0;s=s*256+t[n+i],i+=w,g-=8);for(c=s&(1<<-g)-1,s>>=-g,g+=a;g>0;c=c*256+t[n+i],i+=w,g-=8);if(s===0)s=1-v;else{if(s===h)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,a),s=s-v}return(S?-1:1)*c*Math.pow(2,s-a)},e.write=function(t,n,r,a,o,s){var c,m,h,v=s*8-o-1,g=(1<>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=a?0:s-1,M=a?1:-1,C=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(m=isNaN(n)?1:0,c=g):(c=Math.floor(Math.log(n)/Math.LN2),n*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+i>=1?n+=w/h:n+=w*Math.pow(2,1-i),n*h>=2&&(c++,h/=2),c+i>=g?(m=0,c=g):c+i>=1?(m=(n*h-1)*Math.pow(2,o),c=c+i):(m=n*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=m&255,S+=M,m/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,v-=8);t[r+S-M]|=C*128}},8954:function(l,e,t){"use strict";l.exports=i;var n=t(3250),r=t(6803).Fw;function a(w,S,M){this.vertices=w,this.adjacent=S,this.boundary=M,this.lastVisited=-1}a.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(w,S,M){this.vertices=w,this.cell=S,this.index=M}function s(w,S){return r(w.vertices,S.vertices)}function c(w){return function(){var S=this.tuple;return w.apply(this,S)}}function m(w){var S=n[w+1];return S||(S=n),c(S)}var h=[];function v(w,S,M){this.dimension=w,this.vertices=S,this.simplices=M,this.interior=M.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var C=0;C<=w;++C)this.tuple[C]=this.vertices[C];var _=h[w];_||(_=h[w]=m(w)),this.orient=_}var g=v.prototype;g.handleBoundaryDegeneracy=function(w,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,T=this.vertices,f=[w];for(w.lastVisited=-C;f.length>0;){w=f.pop();for(var u=w.adjacent,A=0;A<=M;++A){var x=u[A];if(!(!x.boundary||x.lastVisited<=-C)){for(var z=x.vertices,I=0;I<=M;++I){var O=z[I];O<0?_[I]=S:_[I]=T[O]}var D=this.orient();if(D>0)return x;x.lastVisited=-C,D===0&&f.push(x)}}}return null},g.walk=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[f];e:for(;!u.boundary;){for(var A=u.vertices,x=u.adjacent,z=0;z<=C;++z)T[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=x[z];if(!(I.lastVisited>=M)){var O=T[z];T[z]=w;var D=this.orient();if(T[z]=O,D<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},g.addPeaks=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,f.push(S);for(var x=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,O=z.indexOf(M);if(!(O<0)){for(var D=0;D<=C;++D)if(D!==O){var B=I[D];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,T[j]=w):T[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,f.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var $=B.adjacent,Q=z.slice(),re=I.slice(),ne=new a(Q,re,!0);u.push(ne);var se=$.indexOf(S);if(!(se<0)){$[se]=ne,re[O]=B,Q[D]=-1,re[D]=S,I[D]=ne,ne.flip();for(var j=0;j<=C;++j){var G=Q[j];if(!(G<0||G===M)){for(var X=new Array(C-1),K=0,H=0;H<=C;++H){var Y=Q[H];Y<0||H===j||(X[K++]=Y)}x.push(new o(X,ne,j))}}}}}}}x.sort(s);for(var D=0;D+1=0?f[A++]=u[z]:x=z&1;if(x===(w&1)){var I=f[0];f[0]=f[1],f[1]=I}S.push(f)}}return S};function i(w,S){var M=w.length;if(M===0)throw new Error("Must have at least d+1 points");var C=w[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=w.slice(0,C+1),T=n.apply(void 0,_);if(T===0)throw new Error("Input not in general position");for(var f=new Array(C+1),u=0;u<=C;++u)f[u]=u;T<0&&(f[0]=1,f[1]=0);for(var A=new a(f,new Array(C+1),!1),x=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=f.slice(),O=0;O<=C;++O)O===u&&(I[O]=-1);var D=I[0];I[0]=I[1],I[1]=D;var B=new a(I,new Array(C+1),!0);x[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=x[u].vertices,F=x[u].adjacent,O=0;O<=C;++O){var P=I[O];if(P<0){F[O]=A;continue}for(var j=0;j<=C;++j)x[j].vertices.indexOf(P)<0&&(F[O]=x[j])}for(var U=new v(C,_,z),$=!!S,u=C+1;u3*(z+1)?v(this,x):this.left.insert(x):this.left=T([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?v(this,x):this.right.insert(x):this.right=T([x]);else{var I=n.ge(this.leftPoints,x,C),O=n.ge(this.rightPoints,x,_);this.leftPoints.splice(I,0,x),this.rightPoints.splice(O,0,x)}},c.remove=function(x){var z=this.count-this.leftPoints;if(x[1]3*(z-1))return g(this,x);var O=this.left.remove(x);return O===o?(this.left=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else if(x[0]>this.mid){if(!this.right)return r;var D=this.left?this.left.count:0;if(4*D>3*(z-1))return g(this,x);var O=this.right.remove(x);return O===o?(this.right=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else{if(this.count===1)return this.leftPoints[0]===x?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,O=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=O}m(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return a}for(var P=n.ge(this.leftPoints,x,C);P=0&&x[O][1]>=z;--O){var D=I(x[O]);if(D)return D}}function S(x,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(x,z);if(I)return I}return w(this.rightPoints,x,z)}else return S(this.leftPoints,z)},c.queryInterval=function(x,z,I){if(xthis.mid&&this.right){var O=this.right.queryInterval(x,z,I);if(O)return O}return zthis.mid?w(this.rightPoints,x,I):S(this.leftPoints,I)};function M(x,z){return x-z}function C(x,z){var I=x[0]-z[0];return I||x[1]-z[1]}function _(x,z){var I=x[1]-z[1];return I||x[0]-z[0]}function T(x){if(x.length===0)return null;for(var z=[],I=0;I>1],D=[],B=[],F=[],I=0;I13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},395:function(l){function e(t,n,r){return t*(1-r)+n*r}l.exports=e},2652:function(l,e,t){var n=t(4335),r=t(6864),a=t(1903),o=t(9921),s=t(7608),c=t(5665),m={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},h=r(),v=r(),g=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];l.exports=function(T,f,u,A,x,z){if(f||(f=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),x||(x=[0,0,0,1]),z||(z=[0,0,0,1]),!n(h,T)||(a(v,h),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(o(v)<1e-8)))return!1;var I=h[3],O=h[7],D=h[11],B=h[12],F=h[13],P=h[14],j=h[15];if(I!==0||O!==0||D!==0){g[0]=I,g[1]=O,g[2]=D,g[3]=j;var U=s(v,v);if(!U)return!1;c(v,v),S(x,g,v)}else x[0]=x[1]=x[2]=0,x[3]=1;if(f[0]=B,f[1]=F,f[2]=P,M(i,h),u[0]=m.length(i[0]),m.normalize(i[0],i[0]),A[0]=m.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=m.length(i[1]),m.normalize(i[1],i[1]),A[0]/=u[1],A[1]=m.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=m.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=m.length(i[2]),m.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],m.cross(w,i[1],i[2]),m.dot(i[0],w)<0)for(var $=0;$<3;$++)u[$]*=-1,i[$][0]*=-1,i[$][1]*=-1,i[$][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,T,f){var u=T[0],A=T[1],x=T[2],z=T[3];return _[0]=f[0]*u+f[4]*A+f[8]*x+f[12]*z,_[1]=f[1]*u+f[5]*A+f[9]*x+f[13]*z,_[2]=f[2]*u+f[6]*A+f[10]*x+f[14]*z,_[3]=f[3]*u+f[7]*A+f[11]*x+f[15]*z,_}function M(_,T){_[0][0]=T[0],_[0][1]=T[1],_[0][2]=T[2],_[1][0]=T[4],_[1][1]=T[5],_[1][2]=T[6],_[2][0]=T[8],_[2][1]=T[9],_[2][2]=T[10]}function C(_,T,f,u,A){_[0]=T[0]*u+f[0]*A,_[1]=T[1]*u+f[1]*A,_[2]=T[2]*u+f[2]*A}},4335:function(l){l.exports=function(t,n){var r=n[15];if(r===0)return!1;for(var a=1/r,o=0;o<16;o++)t[o]=n[o]*a;return!0}},7442:function(l,e,t){var n=t(6658),r=t(7182),a=t(2652),o=t(9921),s=t(8648),c=g(),m=g(),h=g();l.exports=v;function v(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var T=a(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),f=a(C,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!T||!f?!1:(n(h.translate,c.translate,m.translate,_),n(h.skew,c.skew,m.skew,_),n(h.scale,c.scale,m.scale,_),n(h.perspective,c.perspective,m.perspective,_),s(h.quaternion,c.quaternion,m.quaternion,_),r(S,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function g(){return{translate:i(),scale:i(1),skew:i(),perspective:w(),quaternion:w()}}function i(S){return[S||0,S||0,S||0]}function w(){return[0,0,0,1]}},7182:function(l,e,t){var n={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=n.create(),a=n.create();l.exports=function(s,c,m,h,v,g){return n.identity(s),n.fromRotationTranslation(s,g,c),s[3]=v[0],s[7]=v[1],s[11]=v[2],s[15]=v[3],n.identity(a),h[2]!==0&&(a[9]=h[2],n.multiply(s,s,a)),h[1]!==0&&(a[9]=0,a[8]=h[1],n.multiply(s,s,a)),h[0]!==0&&(a[8]=0,a[4]=h[0],n.multiply(s,s,a)),n.scale(s,s,m),s}},1811:function(l,e,t){"use strict";var n=t(2478),r=t(7442),a=t(7608),o=t(5567),s=t(2408),c=t(7089),m=t(6582),h=t(7656),v=t(2504),g=t(3536),i=[0,0,0];l.exports=C;function w(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=w.prototype;S.recalcMatrix=function(_){var T=this._time,f=n.le(T,_),u=this.computedMatrix;if(!(f<0)){var A=this._components;if(f===T.length-1)for(var x=16*f,z=0;z<16;++z)u[z]=A[x++];else{for(var I=T[f+1]-T[f],x=16*f,O=this.prevMatrix,D=!0,z=0;z<16;++z)O[z]=A[x++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[x++],D=D&&O[z]===B[z];if(I<1e-6||D)for(var z=0;z<16;++z)u[z]=O[z];else r(u,O,B,(_-T[f])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],g(F,F);var P=this.computedInverse;a(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var $=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)$[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&n(a[m[i-2]],a[m[i-1]],g)<=0;)i-=1,m.pop();for(m.push(v),i=h.length;i>1&&n(a[h[i-2]],a[h[i-1]],g)>=0;)i-=1,h.pop();h.push(v)}for(var w=new Array(h.length+m.length-2),S=0,s=0,M=m.length;s0;--C)w[S++]=h[C];return w}},351:function(l,e,t){"use strict";l.exports=r;var n=t(4687);function r(a,o){o||(o=a,a=window);var s=0,c=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function g(x){var z=!1;return"altKey"in x&&(z=z||x.altKey!==h.alt,h.alt=!!x.altKey),"shiftKey"in x&&(z=z||x.shiftKey!==h.shift,h.shift=!!x.shiftKey),"ctrlKey"in x&&(z=z||x.ctrlKey!==h.control,h.control=!!x.ctrlKey),"metaKey"in x&&(z=z||x.metaKey!==h.meta,h.meta=!!x.metaKey),z}function i(x,z){var I=n.x(z),O=n.y(z);"buttons"in z&&(x=z.buttons|0),(x!==s||I!==c||O!==m||g(z))&&(s=x|0,c=I||0,m=O||0,o&&o(s,c,m,h))}function w(x){i(0,x)}function S(){(s||c||m||h.shift||h.alt||h.meta||h.control)&&(c=m=0,s=0,h.shift=h.alt=h.control=h.meta=!1,o&&o(0,0,0,h))}function M(x){g(x)&&o&&o(s,c,m,h)}function C(x){n.buttons(x)===0?i(0,x):i(s,x)}function _(x){i(s|n.buttons(x),x)}function T(x){i(s&~n.buttons(x),x)}function f(){v||(v=!0,a.addEventListener("mousemove",C),a.addEventListener("mousedown",_),a.addEventListener("mouseup",T),a.addEventListener("mouseleave",w),a.addEventListener("mouseenter",w),a.addEventListener("mouseout",w),a.addEventListener("mouseover",w),a.addEventListener("blur",S),a.addEventListener("keyup",M),a.addEventListener("keydown",M),a.addEventListener("keypress",M),a!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){v&&(v=!1,a.removeEventListener("mousemove",C),a.removeEventListener("mousedown",_),a.removeEventListener("mouseup",T),a.removeEventListener("mouseleave",w),a.removeEventListener("mouseenter",w),a.removeEventListener("mouseout",w),a.removeEventListener("mouseover",w),a.removeEventListener("blur",S),a.removeEventListener("keyup",M),a.removeEventListener("keydown",M),a.removeEventListener("keypress",M),a!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}f();var A={element:a};return Object.defineProperties(A,{enabled:{get:function(){return v},set:function(x){x?f():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),A}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,a,o){a=a||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,m=n(a);return o[0]=s-m.left,o[1]=c-m.top,o}function n(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,G[K++]=h(f[z],S,M,C),z+=U,_>0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;for(z+=$,K=0,Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,re=2;re0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C),Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,z+=$}}g(X),g(G)}},"false,1,0":function(c,m,h,v,g){return function(w,S,M,C){var _=w.shape[0]|0,T=w.shape[1]|0,f=w.data,u=w.offset|0,A=w.stride[0]|0,x=w.stride[1]|0,z=u,I,O=-A|0,D=0,B=-x|0,F=0,P=-A-x|0,j=0,U=x|0,$=A-x*T|0,Q=0,re=0,ne=0,se=2*T|0,G=v(se),X=v(se),K=0,H=0,Y=-1,q=-1,Z=0,ee=-T|0,ae=T|0,he=0,xe=-T-1|0,we=T-1|0,Me=0,Se=0,Ie=0;for(re=0;re0){if(Q=1,G[K++]=h(f[z],S,M,C),z+=U,T>0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,re=2;re0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,j,D,Me,he,S,M,C)),K+=1,z+=U,re=2;re 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 g=s.getters||[],i=new Array(h),w=0;w=0?i[w]=!0:i[w]=!1;return a(s.vertex,s.cell,s.phase,v,m,i)}},6199:function(l,e,t){"use strict";var n=t(1338),r={zero:function(C,_,T,f){var u=C[0],A=T[0];f|=0;var x=0,z=A;for(x=0;x2&&x[1]>2&&f(A.pick(-1,-1).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,0).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,1).lo(1,1).hi(x[0]-2,x[1]-2)),x[1]>2&&(T(A.pick(0,-1).lo(1).hi(x[1]-2),u.pick(0,-1,1).lo(1).hi(x[1]-2)),_(u.pick(0,-1,0).lo(1).hi(x[1]-2))),x[1]>2&&(T(A.pick(x[0]-1,-1).lo(1).hi(x[1]-2),u.pick(x[0]-1,-1,1).lo(1).hi(x[1]-2)),_(u.pick(x[0]-1,-1,0).lo(1).hi(x[1]-2))),x[0]>2&&(T(A.pick(-1,0).lo(1).hi(x[0]-2),u.pick(-1,0,0).lo(1).hi(x[0]-2)),_(u.pick(-1,0,1).lo(1).hi(x[0]-2))),x[0]>2&&(T(A.pick(-1,x[1]-1).lo(1).hi(x[0]-2),u.pick(-1,x[1]-1,0).lo(1).hi(x[0]-2)),_(u.pick(-1,x[1]-1,1).lo(1).hi(x[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(x[0]-1,0,0,0),u.set(x[0]-1,0,1,0),u.set(0,x[1]-1,0,0),u.set(0,x[1]-1,1,0),u.set(x[0]-1,x[1]-1,0,0),u.set(x[0]-1,x[1]-1,1,0),u}}function M(C){var _=C.join(),x=h[_];if(x)return x;for(var T=C.length,f=[g,i],u=1;u<=T;++u)f.push(w(u));var A=S,x=A.apply(void 0,f);return h[_]=x,x}l.exports=function(_,T,f){if(Array.isArray(f)||(typeof f=="string"?f=n(T.dimension,f):f=n(T.dimension,"clamp")),T.size===0)return _;if(T.dimension===0)return _.set(0),_;var u=M(f);return u(_,T)}},4317:function(l){"use strict";function e(o,s){var c=Math.floor(s),m=s-c,h=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(T=P,P=0):(T=64,P-=64),i=D+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,$=0,Q=x,re=u-f*x,ne=A-_*u,se=O,G=z-f*O,X=I-_*z;for($=0;$0;){I<64?(_=I,I=0):(_=64,I-=64);for(var O=h[0]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),i=x+I*f+O*T,M=z+I*A+O*u;var D=0,B=0,F=f,P=T-_*f,j=A,U=u-_*A;for(B=0;B0;){B<64?(T=B,B=0):(T=64,B-=64);for(var F=h[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=O+B*A+F*f+P*u,M=D+B*I+F*x+P*z;var j=0,U=0,$=0,Q=A,re=f-T*A,ne=u-C*f,se=I,G=x-T*I,X=z-C*x;for($=0;$<_;++$){for(U=0;Uw;){j=0,U=D-_;t:for(F=0;FQ)break t;U+=x,j+=z}for(j=D,U=D-_,F=0;F>1,P=F-O,j=F+O,U=D,$=P,Q=F,re=j,ne=B,se=S+1,G=M-1,X=!0,K,H,Y,q,Z,ee,ae,he,xe,we=0,Me=0,Se=0,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt,Tt,At,$t=A,rr=g($t),_r=g($t);Ve=T*U,Ge=T*$,At=_;e:for(Ie=0;Ie0){H=U,U=$,$=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=U,U=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=U,U=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*Q,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=Q,Q=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=$,$=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}for(Ve=T*U,Ge=T*$,ke=T*Q,_e=T*re,ce=T*ne,ve=T*D,le=T*F,Ae=T*B,Tt=0,At=_,Ie=0;Ie0)G--;else if(Se<0){for(Ve=T*ee,Ge=T*se,ke=T*G,At=_,Ie=0;Ie0)for(;;){ae=_+G*T,Tt=0;e:for(Ie=0;Ie0){if(--GB){e:for(;;){for(ae=_+se*T,Tt=0,At=_,Ie=0;Ie1&&w?M(i,w[0],w[1]):M(i)}var m={"uint32,1,0":function(v,g){return function(i){var w=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,T=M[0]|0,f=C[1]|0,u=M[1]|0,A=f,x=f,z=1;T<=32?v(0,T-1,w,S,_,f,T,u,A,x,z):g(0,T-1,w,S,_,f,T,u,A,x,z)}}};function h(v,g){var i=[g,v].join(","),w=m[i],S=o(v,g),M=c(v,g,S);return w(S,M)}l.exports=h},446:function(l,e,t){"use strict";var n=t(7640),r={};function a(o){var s=o.order,c=o.dtype,m=[s,c],h=m.join(":"),v=r[h];return v||(r[h]=v=n(s,c)),v(o),o}l.exports=a},9618:function(l,e,t){var n=t(7163),r=typeof Float64Array<"u";function a(g,i){return g[0]-i[0]}function o(){var g=this.stride,i=new Array(g.length),w;for(w=0;w=0&&(f=_|0,T+=A*f,u-=f),new S(this.data,u,A,T)},M.step=function(_){var T=this.shape[0],f=this.stride[0],u=this.offset,A=0,x=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=f*(T-1),T=x(-T/A)):T=x(T/A),f*=A),new S(this.data,T,f,u)},M.transpose=function(_){_=_===void 0?0:_|0;var T=this.shape,f=this.stride;return new S(this.data,T[_],f[_],this.offset)},M.pick=function(_){var T=[],f=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(T.push(this.shape[0]),f.push(this.stride[0]));var A=i[T.length+1];return A(this.data,T,f,u)},function(_,T,f,u){return new S(_,T[0],f[0],u)}},2:function(g,i,w){function S(C,_,T,f,u,A){this.data=C,this.shape=[_,T],this.stride=[f,u],this.offset=A|0}var M=S.prototype;return M.dtype=g,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(_,T,f){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T,f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]=f},M.get=function(_,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]},M.index=function(_,T){return this.offset+this.stride[0]*_+this.stride[1]*T},M.hi=function(_,T){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,T){var f=this.offset,u=0,A=this.shape[0],x=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,f+=z*u,A-=u),typeof T=="number"&&T>=0&&(u=T|0,f+=I*u,x-=u),new S(this.data,A,x,z,I,f)},M.step=function(_,T){var f=this.shape[0],u=this.shape[1],A=this.stride[0],x=this.stride[1],z=this.offset,I=0,O=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(f-1),f=O(-f/I)):f=O(f/I),A*=I),typeof T=="number"&&(I=T|0,I<0?(z+=x*(u-1),u=O(-u/I)):u=O(u/I),x*=I),new S(this.data,f,u,A,x,z)},M.transpose=function(_,T){_=_===void 0?0:_|0,T=T===void 0?1:T|0;var f=this.shape,u=this.stride;return new S(this.data,f[_],f[T],u[_],u[T],this.offset)},M.pick=function(_,T){var f=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(f.push(this.shape[0]),u.push(this.stride[0])),typeof T=="number"&&T>=0?A=A+this.stride[1]*T|0:(f.push(this.shape[1]),u.push(this.stride[1]));var x=i[f.length+1];return x(this.data,f,u,A)},function(_,T,f,u){return new S(_,T[0],T[1],f[0],f[1],u)}},3:function(g,i,w){function S(C,_,T,f,u,A,x,z){this.data=C,this.shape=[_,T,f],this.stride=[u,A,x],this.offset=z|0}var M=S.prototype;return M.dtype=g,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),f=Math.abs(this.stride[2]);return _>T?T>f?[2,1,0]:_>f?[1,2,0]:[1,0,2]:_>f?[2,0,1]:f>T?[0,1,2]:[0,2,1]}}),M.set=function(_,T,f,u){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]=u},M.get=function(_,T,f){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]},M.index=function(_,T,f){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f},M.hi=function(_,T,f){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,T,f){var u=this.offset,A=0,x=this.shape[0],z=this.shape[1],I=this.shape[2],O=this.stride[0],D=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=O*A,x-=A),typeof T=="number"&&T>=0&&(A=T|0,u+=D*A,z-=A),typeof f=="number"&&f>=0&&(A=f|0,u+=B*A,I-=A),new S(this.data,x,z,I,O,D,B,u)},M.step=function(_,T,f){var u=this.shape[0],A=this.shape[1],x=this.shape[2],z=this.stride[0],I=this.stride[1],O=this.stride[2],D=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(D+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof T=="number"&&(B=T|0,B<0?(D+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof f=="number"&&(B=f|0,B<0?(D+=O*(x-1),x=F(-x/B)):x=F(x/B),O*=B),new S(this.data,u,A,x,z,I,O,D)},M.transpose=function(_,T,f){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[T],u[f],A[_],A[T],A[f],this.offset)},M.pick=function(_,T,f){var u=[],A=[],x=this.offset;typeof _=="number"&&_>=0?x=x+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof T=="number"&&T>=0?x=x+this.stride[1]*T|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof f=="number"&&f>=0?x=x+this.stride[2]*f|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,x)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],f[0],f[1],f[2],u)}},4:function(g,i,w){function S(C,_,T,f,u,A,x,z,I,O){this.data=C,this.shape=[_,T,f,u],this.stride=[A,x,z,I],this.offset=O|0}var M=S.prototype;return M.dtype=g,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(_,T,f,u,A){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]=A},M.get=function(_,T,f,u){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]},M.index=function(_,T,f,u){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u},M.hi=function(_,T,f,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|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)},M.lo=function(_,T,f,u){var A=this.offset,x=0,z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(x=_|0,A+=B*x,z-=x),typeof T=="number"&&T>=0&&(x=T|0,A+=F*x,I-=x),typeof f=="number"&&f>=0&&(x=f|0,A+=P*x,O-=x),typeof u=="number"&&u>=0&&(x=u|0,A+=j*x,D-=x),new S(this.data,z,I,O,D,B,F,P,j,A)},M.step=function(_,T,f,u){var A=this.shape[0],x=this.shape[1],z=this.shape[2],I=this.shape[3],O=this.stride[0],D=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=O*(A-1),A=U(-A/j)):A=U(A/j),O*=j),typeof T=="number"&&(j=T|0,j<0?(P+=D*(x-1),x=U(-x/j)):x=U(x/j),D*=j),typeof f=="number"&&(j=f|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,x,z,I,O,D,B,F,P)},M.transpose=function(_,T,f,u){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0,u=u===void 0?3:u|0;var A=this.shape,x=this.stride;return new S(this.data,A[_],A[T],A[f],A[u],x[_],x[T],x[f],x[u],this.offset)},M.pick=function(_,T,f,u){var A=[],x=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),x.push(this.stride[0])),typeof T=="number"&&T>=0?z=z+this.stride[1]*T|0:(A.push(this.shape[1]),x.push(this.stride[1])),typeof f=="number"&&f>=0?z=z+this.stride[2]*f|0:(A.push(this.shape[2]),x.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),x.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,x,z)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],T[3],f[0],f[1],f[2],f[3],u)}},5:function(i,w,S){function M(_,T,f,u,A,x,z,I,O,D,B,F){this.data=_,this.shape=[T,f,u,A,x],this.stride=[z,I,O,D,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(T,f,u,A,x,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x,z):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]=z},C.get=function(T,f,u,A,x){return i==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]},C.index=function(T,f,u,A,x){return this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x},C.hi=function(T,f,u,A,x){return new M(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof f!="number"||f<0?this.shape[1]:f|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(T,f,u,A,x){var z=this.offset,I=0,O=this.shape[0],D=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],$=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof T=="number"&&T>=0&&(I=T|0,z+=j*I,O-=I),typeof f=="number"&&f>=0&&(I=f|0,z+=U*I,D-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=$*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof x=="number"&&x>=0&&(I=x|0,z+=re*I,P-=I),new M(this.data,O,D,B,F,P,j,U,$,Q,re,z)},C.step=function(T,f,u,A,x){var z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],$=this.stride[4],Q=this.offset,re=0,ne=Math.ceil;return typeof T=="number"&&(re=T|0,re<0?(Q+=F*(z-1),z=ne(-z/re)):z=ne(z/re),F*=re),typeof f=="number"&&(re=f|0,re<0?(Q+=P*(I-1),I=ne(-I/re)):I=ne(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(O-1),O=ne(-O/re)):O=ne(O/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(D-1),D=ne(-D/re)):D=ne(D/re),U*=re),typeof x=="number"&&(re=x|0,re<0?(Q+=$*(B-1),B=ne(-B/re)):B=ne(B/re),$*=re),new M(this.data,z,I,O,D,B,F,P,j,U,$,Q)},C.transpose=function(T,f,u,A,x){T=T===void 0?0:T|0,f=f===void 0?1:f|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,x=x===void 0?4:x|0;var z=this.shape,I=this.stride;return new M(this.data,z[T],z[f],z[u],z[A],z[x],I[T],I[f],I[u],I[A],I[x],this.offset)},C.pick=function(T,f,u,A,x){var z=[],I=[],O=this.offset;typeof T=="number"&&T>=0?O=O+this.stride[0]*T|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof f=="number"&&f>=0?O=O+this.stride[1]*f|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?O=O+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?O=O+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof x=="number"&&x>=0?O=O+this.stride[4]*x|0:(z.push(this.shape[4]),I.push(this.stride[4]));var D=w[z.length+1];return D(this.data,z,I,O)},function(T,f,u,A){return new M(T,f[0],f[1],f[2],f[3],f[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(g,i){var w=i===-1?"T":String(i),S=s[w];return i===-1?S(g):i===0?S(g,h[g][0]):S(g,h[g],o)}function m(g){if(n(g))return"buffer";if(r)switch(Object.prototype.toString.call(g)){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(g)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(g,i,w,S){if(g===void 0){var u=h.array[0];return u([])}else typeof g=="number"&&(g=[g]);i===void 0&&(i=[g.length]);var M=i.length;if(w===void 0){w=new Array(M);for(var C=M-1,_=1;C>=0;--C)w[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var m=n.hi(s),h=n.lo(s);return c>s==s>0?h===a?(m+=1,h=0):h+=1:h===0?(h=a,m-=1):h-=1,n.pack(h,m)}},8406:function(l,e){var t=1e-6,n=1e-6;e.vertexNormals=function(r,a,o){for(var s=a.length,c=new Array(s),m=o===void 0?t:o,h=0;hm)for(var z=c[i],I=1/Math.sqrt(f*A),x=0;x<3;++x){var O=(x+1)%3,D=(x+2)%3;z[x]+=I*(u[O]*T[D]-u[D]*T[O])}}for(var h=0;hm)for(var I=1/Math.sqrt(B),x=0;x<3;++x)z[x]*=I;else for(var x=0;x<3;++x)z[x]=0}return c},e.faceNormals=function(r,a,o){for(var s=r.length,c=new Array(s),m=o===void 0?n:o,h=0;hm?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[h]=M}return c}},4081:function(l){"use strict";l.exports=e;function e(t,n,r,a,o,s,c,m,h,v){var g=n+s+v;if(i>0){var i=Math.sqrt(g+1);t[0]=.5*(c-h)/i,t[1]=.5*(m-a)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var w=Math.max(n,s,v),i=Math.sqrt(2*w-g+1);n>=w?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(m+a)/i,t[3]=.5*(c-h)/i):s>=w?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(h+c)/i,t[3]=.5*(m-a)/i):(t[0]=.5*(a+m)/i,t[1]=.5*(c+h)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977:function(l,e,t){"use strict";l.exports=i;var n=t(9215),r=t(6582),a=t(7399),o=t(7608),s=t(4081);function c(w,S,M){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2))}function m(w,S,M,C){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function h(w,S){var M=S[0],C=S[1],_=S[2],T=S[3],f=m(M,C,_,T);f>1e-6?(w[0]=M/f,w[1]=C/f,w[2]=_/f,w[3]=T/f):(w[0]=w[1]=w[2]=0,w[3]=1)}function v(w,S,M){this.radius=n([M]),this.center=n(S),this.rotation=n(w),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 g=v.prototype;g.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},g.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var S=this.computedRotation;h(S,S);var M=this.computedMatrix;a(M,S);var C=this.computedCenter,_=this.computedEye,T=this.computedUp,f=Math.exp(this.computedRadius[0]);_[0]=C[0]+f*M[2],_[1]=C[1]+f*M[6],_[2]=C[2]+f*M[10],T[0]=M[1],T[1]=M[5],T[2]=M[9];for(var u=0;u<3;++u){for(var A=0,x=0;x<3;++x)A+=M[u+4*x]*_[x];M[12+u]=-A}},g.getMatrix=function(w,S){this.recalcMatrix(w);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},g.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},g.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},g.pan=function(w,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(w);var _=this.computedMatrix,T=_[1],f=_[5],u=_[9],A=c(T,f,u);T/=A,f/=A,u/=A;var x=_[0],z=_[4],I=_[8],O=x*T+z*f+I*u;x-=T*O,z-=f*O,I-=u*O;var D=c(x,z,I);x/=D,z/=D,I/=D;var B=_[2],F=_[6],P=_[10],j=B*T+F*f+P*u,U=B*x+F*z+P*I;B-=j*T+U*x,F-=j*f+U*z,P-=j*u+U*I;var $=c(B,F,P);B/=$,F/=$,P/=$;var Q=x*S+T*M,re=z*S+f*M,ne=I*S+u*M;this.center.move(w,Q,re,ne);var se=Math.exp(this.computedRadius[0]);se=Math.max(1e-4,se+C),this.radius.set(w,Math.log(se))},g.rotate=function(w,S,M,C){this.recalcMatrix(w),S=S||0,M=M||0;var _=this.computedMatrix,T=_[0],f=_[4],u=_[8],A=_[1],x=_[5],z=_[9],I=_[2],O=_[6],D=_[10],B=S*T+M*A,F=S*f+M*x,P=S*u+M*z,j=-(O*P-D*F),U=-(D*B-I*P),$=-(I*F-O*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow($,2))),re=m(j,U,$,Q);re>1e-6?(j/=re,U/=re,$/=re,Q/=re):(j=U=$=0,Q=1);var ne=this.computedRotation,se=ne[0],G=ne[1],X=ne[2],K=ne[3],H=se*Q+K*j+G*$-X*U,Y=G*Q+K*U+X*j-se*$,q=X*Q+K*$+se*U-G*j,Z=K*Q-se*j-G*U-X*$;if(C){j=I,U=O,$=D;var ee=Math.sin(C)/c(j,U,$);j*=ee,U*=ee,$*=ee,Q=Math.cos(S),H=H*Q+Z*j+Y*$-q*U,Y=Y*Q+Z*U+q*j-H*$,q=q*Q+Z*$+H*U-Y*j,Z=Z*Q-H*j-Y*U-q*$}var ae=m(H,Y,q,Z);ae>1e-6?(H/=ae,Y/=ae,q/=ae,Z/=ae):(H=Y=q=0,Z=1),this.rotation.set(w,H,Y,q,Z)},g.lookAt=function(w,S,M,C){this.recalcMatrix(w),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var T=this.computedRotation;s(T,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),h(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var f=0,u=0;u<3;++u)f+=Math.pow(M[u]-S[u],2);this.radius.set(w,.5*Math.log(Math.max(f,1e-6))),this.center.set(w,M[0],M[1],M[2])},g.translate=function(w,S,M,C){this.center.move(w,S||0,M||0,C||0)},g.setMatrix=function(w,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),h(M,M),this.rotation.set(w,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var T=C[12]/_,f=C[13]/_,u=C[14]/_;this.recalcMatrix(w);var A=Math.exp(this.computedRadius[0]);this.center.set(w,T-C[2]*A,f-C[6]*A,u-C[10]*A),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},g.setDistance=function(w,S){S>0&&this.radius.set(w,Math.log(S))},g.setDistanceLimits=function(w,S){w>0?w=Math.log(w):w=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=S},g.getDistanceLimits=function(w){var S=this.radius.bounds;return w?(w[0]=Math.exp(S[0][0]),w[1]=Math.exp(S[1][0]),w):[Math.exp(S[0][0]),Math.exp(S[1][0])]},g.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]}},g.fromJSON=function(w){var S=this.lastT(),M=w.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=w.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=w.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function i(w){w=w||{};var S=w.center||[0,0,0],M=w.rotation||[0,0,0,1],C=w.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),h(M,M);var _=new v(M,S,Math.log(C));return _.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&_.lookAt(0,w.eye,w.center,w.up),_}},1371:function(l,e,t){"use strict";var n=t(3233);l.exports=function(a,o,s){return s=typeof s<"u"?s+"":" ",n(s,o)+a}},3202:function(l){l.exports=function(t,n){n||(n=[0,""]),t=String(t);var r=parseFloat(t,10);return n[0]=r,n[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},3088:function(l,e,t){"use strict";l.exports=r;var n=t(3140);function r(a,o){for(var s=o.length|0,c=a.length,m=[new Array(s),new Array(s)],h=0;h0){z=m[D][A][0],O=D;break}I=z[O^1];for(var B=0;B<2;++B)for(var F=m[B][A],P=0;P0&&(z=j,I=U,O=B)}return x||z&&i(z,O),I}function S(u,A){var x=m[A][u][0],z=[u];i(x,A);for(var I=x[A^1],O=A;;){for(;I!==u;)z.push(I),I=w(z[z.length-2],I,!1);if(m[0][u].length+m[1][u].length===0)break;var D=z[z.length-1],B=u,F=z[1],P=w(D,B,!0);if(n(o[D],o[B],o[F],o[P])<0)break;z.push(u),I=w(D,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var h=0;h0;){var T=m[0][h].length,f=S(h,C);M(_,f)?_.push.apply(_,f):(_.length>0&&g.push(_),_=f)}_.length>0&&g.push(_)}return g}},5609:function(l,e,t){"use strict";l.exports=r;var n=t(3134);function r(a,o){for(var s=n(a,o.length),c=new Array(o.length),m=new Array(o.length),h=[],v=0;v0;){var i=h.pop();c[i]=!1;for(var w=s[i],v=0;v0}T=T.filter(f);for(var u=T.length,A=new Array(u),x=new Array(u),_=0;_0;){var ae=q.pop(),he=re[ae];c(he,function(Ie,Ve){return Ie-Ve});var xe=he.length,we=Z[ae],Me;if(we===0){var F=T[ae];Me=[F]}for(var _=0;_=0)&&(Z[Se]=we^1,q.push(Se),we===0)){var F=T[Se];Y(F)||(F.reverse(),Me.push(F))}}we===0&&ee.push(Me)}return ee}},5085:function(l,e,t){l.exports=w;var n=t(3250)[3],r=t(4209),a=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function m(S){for(var M={},C=0;C0&&M[_]===C[0])T=S[_-1];else return 1;for(var f=1;T;){var u=T.key,A=n(C,u[0],u[1]);if(u[0][0]0)f=-1,T=T.right;else return 0;else if(A>0)T=T.left;else if(A<0)f=1,T=T.right;else return 0}return f}}function v(S){return 1}function g(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function w(S){for(var M=S.length,C=[],_=[],T=0,f=0;f=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M)):(u=0,S>=0?(A=0,x=M):-S>=i?(A=1,x=i+2*S+M):(A=-S/i,x=S*A+M));else if(A<0)A=0,w>=0?(u=0,x=M):-w>=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M);else{var z=1/f;u*=z,A*=z,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M}else{var I,O,D,B;u<0?(I=g+w,O=i+S,O>I?(D=O-I,B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(u=0,O<=0?(A=1,x=i+2*S+M):S>=0?(A=0,x=M):(A=-S/i,x=S*A+M))):A<0?(I=g+S,O=v+w,O>I?(D=O-I,B=v-2*g+i,D>=B?(A=1,u=0,x=i+2*S+M):(A=D/B,u=1-A,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(A=0,O<=0?(u=1,x=v+2*w+M):w>=0?(u=0,x=M):(u=-w/v,x=w*u+M))):(D=i+S-g-w,D<=0?(u=0,A=1,x=i+2*S+M):(B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)))}for(var F=1-u-A,h=0;h0){var i=s[m-1];if(n(v,i)===0&&a(i)!==g){m-=1;continue}}s[m++]=v}}return s.length=m,s}},3233:function(l){"use strict";var e="",t;l.exports=n;function n(r,a){if(typeof r!="string")throw new TypeError("expected a string");if(a===1)return r;if(a===2)return r+r;var o=r.length*a;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&a>1;)a&1&&(e+=r),a>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var n=t.length,r=t[t.length-1],a=n,o=n-2;o>=0;--o){var s=r,c=t[o];r=s+c;var m=r-s,h=c-m;h&&(t[--a]=r,r=h)}for(var v=0,o=a;o0){if(O<=0)return D;B=I+O}else if(I<0){if(O>=0)return D;B=-(I+O)}else return D;var F=m*B;return D>=F||D<=-F?D:S(A,x,z)},function(A,x,z,I){var O=A[0]-I[0],D=x[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=x[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],$=x[2]-I[2],Q=z[2]-I[2],re=D*j,ne=B*P,se=B*F,G=O*j,X=O*P,K=D*F,H=U*(re-ne)+$*(se-G)+Q*(X-K),Y=(Math.abs(re)+Math.abs(ne))*Math.abs(U)+(Math.abs(se)+Math.abs(G))*Math.abs($)+(Math.abs(X)+Math.abs(K))*Math.abs(Q),q=h*Y;return H>q||-H>q?H:M(A,x,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=w(u.length)),A.apply(void 0,u)}function T(u,A,x,z,I,O,D){return function(F,P,j,U,$){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return O(F,P,j,U);case 5:return D(F,P,j,U,$)}for(var Q=new Array(arguments.length),re=0;re0&&v>0||h<0&&v<0)return!1;var g=n(c,o,s),i=n(m,o,s);return g>0&&i>0||g<0&&i<0?!1:h===0&&v===0&&g===0&&i===0?r(o,s,c,m):!0}},8545:function(l){"use strict";l.exports=t;function e(n,r){var a=n+r,o=a-n,s=a-o,c=r-o,m=n-s,h=m+c;return h?[h,a]:[a]}function t(n,r){var a=n.length|0,o=r.length|0;if(a===1&&o===1)return e(n[0],-r[0]);var s=a+o,c=new Array(s),m=0,h=0,v=0,g=Math.abs,i=n[h],w=g(i),S=-r[v],M=g(S),C,_;w=o?(C=i,h+=1,h=o?(C=i,h+=1,h"u"&&(C=s(w));var _=w.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=c(S,+M),f=m(w,C),u=h(f,S,T,+M),A=v(f,S.length|0),x=o(C)(w,f.data,A,T),z=g(f),I=[].slice.call(u.data,0,u.shape[0]);return r.free(T),r.free(f.data),r.free(u.data),r.free(A),{cells:x,vertexIds:z,vertexWeights:I}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,m){for(var h=Math.min(c,m)|0,v=Math.max(c,m)|0,g=o[2*h],i=o[2*h+1];g>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,B=m(A[D],x);B<=0?(B===0&&(O=D),z=D+1):B>0&&(I=D-1)}return O}n=i;function w(A,x){for(var z=new Array(A.length),I=0,O=z.length;I=A.length||m(A[re],D)!==0););}return z}n=w;function S(A,x){if(!x)return w(g(C(A,0)),A,0);for(var z=new Array(x),I=0;I>>j&1&&P.push(O[j]);x.push(P)}return v(x)}n=M;function C(A,x){if(x<0)return[];for(var z=[],I=(1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.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},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.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},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},2014:function(l,e,t){"use strict";"use restrict";var n=t(3105),r=t(4623);function a(u){for(var A=0,x=Math.max,z=0,I=u.length;z>1,D=c(u[O],A);D<=0?(D===0&&(I=O),x=O+1):D>0&&(z=O-1)}return I}e.findCell=g;function i(u,A){for(var x=new Array(u.length),z=0,I=x.length;z=u.length||c(u[Q],O)!==0););}return x}e.incidence=i;function w(u,A){if(!A)return i(v(M(u,0)),u,0);for(var x=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return h(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var x=[],z=(1<>1:(G>>1)-1}function z(G){for(var X=A(G);;){var K=X,H=2*G+1,Y=2*(G+1),q=G;if(H0;){var K=x(G);if(K>=0){var H=A(K);if(X0){var G=F[0];return u(0,U-1),U-=1,z(0),G}return-1}function D(G,X){var K=F[G];return w[K]===X?G:(w[K]=-1/0,I(G),O(),w[K]=X,U+=1,I(U-1))}function B(G){if(!S[G]){S[G]=!0;var X=g[G],K=i[G];g[K]>=0&&(g[K]=X),i[X]>=0&&(i[X]=K),P[X]>=0&&D(P[X],f(X)),P[K]>=0&&D(P[K],f(K))}}for(var F=[],P=new Array(h),M=0;M>1;M>=0;--M)z(M);for(;;){var $=O();if($<0||w[$]>m)break;B($)}for(var Q=[],M=0;M=0&&K>=0&&X!==K){var H=P[X],Y=P[K];H!==Y&&se.push([H,Y])}}),r.unique(r.normalize(se)),{positions:Q,edges:se}}},1303:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){var c,m;if(s[0][0]s[1][0])c=s[1],m=s[0];else{var h=Math.min(o[0][1],o[1][1]),v=Math.max(o[0][1],o[1][1]),g=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return vi?h-i:v-i}var w,S;o[0][1]s[1][0])c=s[1],m=s[0];else return r(s,o);var h,v;if(o[0][0]o[1][0])h=o[1],v=o[0];else return-r(o,s);var g=n(c,m,v),i=n(c,m,h);if(g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;if(g=n(v,h,m),i=n(v,h,c),g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;return m[0]-v[0]}},4209:function(l,e,t){"use strict";l.exports=i;var n=t(2478),r=t(3840),a=t(3250),o=t(1303);function s(w,S,M){this.slabs=w,this.coordinates=S,this.horizontal=M}var c=s.prototype;function m(w,S){return w.y-S}function h(w,S){for(var M=null;w;){var C=w.key,_,T;C[0][0]0)if(S[0]!==C[1][0])M=w,w=w.right;else{var u=h(w.right,S);if(u)return u;w=w.left}else{if(S[0]!==C[1][0])return w;var u=h(w.right,S);if(u)return u;w=w.left}}return M}c.castUp=function(w){var S=n.le(this.coordinates,w[0]);if(S<0)return-1;var M=this.slabs[S],C=h(this.slabs[S],w),_=-1;if(C&&(_=C.value),this.coordinates[S]===w[0]){var T=null;if(C&&(T=C.key),S>0){var f=h(this.slabs[S-1],w);f&&(T?o(f.key,T)>0&&(T=f.key,_=f.value):(_=f.value,T=f.key))}var u=this.horizontal[S];if(u.length>0){var A=n.ge(u,w[1],m);if(A=u.length)return _;x=u[A]}}if(x.start)if(T){var z=a(T[0],T[1],[w[0],x.y]);T[0][0]>T[1][0]&&(z=-z),z>0&&(_=x.index)}else _=x.index;else x.y!==w[1]&&(_=x.index)}}}return _};function v(w,S,M,C){this.y=w,this.index=S,this.start=M,this.closed=C}function g(w,S,M,C){this.x=w,this.segment=S,this.create=M,this.index=C}function i(w){for(var S=w.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=h.length,_=new Array(C),T=0;T0||w>0&&_<0){var T=o(S,_,M,w);g.push(T),i.push(T.slice())}_<0?i.push(M.slice()):_>0?g.push(M.slice()):(g.push(M.slice()),i.push(M.slice())),w=_}return{positive:g,negative:i}}function c(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C>=0&&g.push(S.slice()),i=C}return g}function m(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C<=0&&g.push(S.slice()),i=C}return g}},3387:function(l,e,t){var n;(function(){"use strict";var r={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 a(h){return s(m(h),arguments)}function o(h,v){return a.apply(null,[h].concat(v||[]))}function s(h,v){var g=1,i=h.length,w,S="",M,C,_,T,f,u,A,x;for(M=0;M=0),_.type){case"b":w=parseInt(w,10).toString(2);break;case"c":w=String.fromCharCode(parseInt(w,10));break;case"d":case"i":w=parseInt(w,10);break;case"j":w=JSON.stringify(w,null,_.width?parseInt(_.width):0);break;case"e":w=_.precision?parseFloat(w).toExponential(_.precision):parseFloat(w).toExponential();break;case"f":w=_.precision?parseFloat(w).toFixed(_.precision):parseFloat(w);break;case"g":w=_.precision?String(Number(w.toPrecision(_.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=_.precision?w.substring(0,_.precision):w;break;case"t":w=String(!!w),w=_.precision?w.substring(0,_.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=_.precision?w.substring(0,_.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=_.precision?w.substring(0,_.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=w:(r.number.test(_.type)&&(!A||_.sign)?(x=A?"+":"-",w=w.toString().replace(r.sign,"")):x="",f=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(x+w).length,T=_.width&&u>0?f.repeat(u):"",S+=_.align?x+w+T:f==="0"?x+T+w:T+x+w)}return S}var c=Object.create(null);function m(h){if(c[h])return c[h];for(var v=h,g,i=[],w=0;v;){if((g=r.text.exec(v))!==null)i.push(g[0]);else if((g=r.modulo.exec(v))!==null)i.push("%");else if((g=r.placeholder.exec(v))!==null){if(g[2]){w|=1;var S=[],M=g[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=S}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(g[0].length)}return c[h]=i}e.sprintf=a,e.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,n=function(){return{sprintf:a,vsprintf:o}}.call(e,t,e,l),n!==void 0&&(l.exports=n))})()},3711:function(l,e,t){"use strict";l.exports=m;var n=t(2640),r=t(781),a={"2d":function(h,v,g){var i=h({order:v,scalarArguments:3,getters:g==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,T,f,u,A,x,z,I,O,D){var B=(u<<0)+(A<<1)+(x<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*D)/(C-_),M-.25-.25*(T+C-2*D)/(C-T)]);break;case 2:I.push([S-.75-.25*(-_-C+2*D)/(_-C),M-.25-.25*(f+_-2*D)/(_-f)]);break;case 3:I.push([S-.5,M-.5-.5*(T+C+f+_-4*D)/(C-T+_-f)]);break;case 4:I.push([S-.25-.25*(f+T-2*D)/(T-f),M-.75-.25*(-T-C+2*D)/(T-C)]);break;case 5:I.push([S-.5-.5*(_+C+f+T-4*D)/(C-_+T-f),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+f+T)/(_-C+T-f),M-.5-.25*(-T-C+f+_)/(T-C+_-f)]);break;case 7:I.push([S-.75-.25*(f+T-2*D)/(T-f),M-.75-.25*(f+_-2*D)/(_-f)]);break;case 8:I.push([S-.75-.25*(-f-T+2*D)/(f-T),M-.75-.25*(-f-_+2*D)/(f-_)]);break;case 9:I.push([S-.5-.25*(_+C+-f-T)/(C-_+f-T),M-.5-.25*(T+C+-f-_)/(C-T+f-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-f-T+4*D)/(_-C+f-T),M-.5]);break;case 11:I.push([S-.25-.25*(-f-T+2*D)/(f-T),M-.75-.25*(T+C-2*D)/(C-T)]);break;case 12:I.push([S-.5,M-.5-.5*(-T-C+-f-_+4*D)/(T-C+f-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*D)/(C-_),M-.25-.25*(-f-_+2*D)/(f-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*D)/(_-C),M-.25-.25*(-T-C+2*D)/(T-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,T,f,u,A,x){T?A.push([S,M]):A.push([M,S])}});return function(w,S){var M=[],C=[];return i(w,M,C,S),{positions:M,cells:C}}}};function o(h,v){var g=h.length+"d",i=a[g];if(i)return i(n,h,v)}function s(h,v){for(var g=r(h,v),i=g.length,w=new Array(i),S=new Array(i),M=0;MMath.max(_,T)?f[2]=1:_>Math.max(C,T)?f[0]=1:f[1]=1;for(var u=0,A=0,x=0;x<3;++x)u+=M[x]*M[x],A+=f[x]*M[x];for(var x=0;x<3;++x)f[x]-=A/u*M[x];return s(f,f),f}function g(M,C,_,T,f,u,A,x){this.center=n(_),this.up=n(T),this.right=n(f),this.radius=n([u]),this.angle=n([A,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=g.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,T=0,f=0,u=0;u<3;++u)f+=C[u]*_[u],T+=C[u]*C[u];for(var A=Math.sqrt(T),x=0,u=0;u<3;++u)_[u]-=C[u]*f/T,x+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(x),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var O=Math.exp(this.computedRadius[0]),D=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(D),P=Math.sin(D),j=Math.cos(B),U=Math.sin(B),$=this.computedCenter,Q=F*j,re=P*j,ne=U,se=-F*U,G=-P*U,X=j,K=this.computedEye,H=this.computedMatrix,u=0;u<3;++u){var Y=Q*_[u]+re*I[u]+ne*C[u];H[4*u+1]=se*_[u]+G*I[u]+X*C[u],H[4*u+2]=Y,H[4*u+3]=0}var q=H[1],Z=H[5],ee=H[9],ae=H[2],he=H[6],xe=H[10],we=Z*xe-ee*he,Me=ee*ae-q*xe,Se=q*he-Z*ae,Ie=m(we,Me,Se);we/=Ie,Me/=Ie,Se/=Ie,H[0]=we,H[4]=Me,H[8]=Se;for(var u=0;u<3;++u)K[u]=$[u]+H[2+4*u]*O;for(var u=0;u<3;++u){for(var x=0,Ve=0;Ve<3;++Ve)x+=H[u+4*Ve]*K[Ve];H[12+u]=-x}H[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var T=0;T<16;++T)C[T]=_[T];return C}return _};var w=[0,0,0];i.rotate=function(M,C,_,T){if(this.angle.move(M,C,_),T){this.recalcMatrix(M);var f=this.computedMatrix;w[0]=f[2],w[1]=f[6],w[2]=f[10];for(var u=this.computedUp,A=this.computedRight,x=this.computedToward,z=0;z<3;++z)f[4*z]=u[z],f[4*z+1]=A[z],f[4*z+2]=x[z];a(f,f,T,w);for(var z=0;z<3;++z)u[z]=f[4*z],A[z]=f[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,T){C=C||0,_=_||0,T=T||0,this.recalcMatrix(M);var f=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=f[1],x=f[5],z=f[9],I=m(A,x,z);A/=I,x/=I,z/=I;var O=f[0],D=f[4],B=f[8],F=O*A+D*x+B*z;O-=A*F,D-=x*F,B-=z*F;var P=m(O,D,B);O/=P,D/=P,B/=P;var j=O*C+A*_,U=D*C+x*_,$=B*C+z*_;this.center.move(M,j,U,$);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+T),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,T){this.center.move(M,C||0,_||0,T||0)},i.setMatrix=function(M,C,_,T){var f=1;typeof _=="number"&&(f=_|0),(f<0||f>3)&&(f=1);var u=(f+2)%3,A=(f+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var x=C[f],z=C[f+4],I=C[f+8];if(T){var D=Math.abs(x),B=Math.abs(z),F=Math.abs(I),P=Math.max(D,B,F);D===P?(x=x<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,x=z=0):(z=z<0?-1:1,x=I=0)}else{var O=m(x,z,I);x/=O,z/=O,I/=O}var j=C[u],U=C[u+4],$=C[u+8],Q=j*x+U*z+$*I;j-=x*Q,U-=z*Q,$-=I*Q;var re=m(j,U,$);j/=re,U/=re,$/=re;var ne=z*$-I*U,se=I*j-x*$,G=x*U-z*j,X=m(ne,se,G);ne/=X,se/=X,G/=X,this.center.jump(M,ve,le,Ae),this.radius.idle(M),this.up.jump(M,x,z,I),this.right.jump(M,j,U,$);var K,H;if(f===2){var Y=C[1],q=C[5],Z=C[9],ee=Y*j+q*U+Z*$,ae=Y*ne+q*se+Z*G;Me<0?K=-Math.PI/2:K=Math.PI/2,H=Math.atan2(ae,ee)}else{var he=C[2],xe=C[6],we=C[10],Me=he*x+xe*z+we*I,Se=he*j+xe*U+we*$,Ie=he*ne+xe*se+we*G;K=Math.asin(h(Me)),H=Math.atan2(Ie,Se)}this.angle.jump(M,H,K),this.recalcMatrix(M);var Ve=C[2],Ge=C[6],ke=C[10],_e=this.computedMatrix;r(_e,C);var ce=_e[15],ve=_e[12]/ce,le=_e[13]/ce,Ae=_e[14]/ce,Be=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-Ve*Be,le-Ge*Be,Ae-ke*Be)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,T){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,T=T||this.computedUp;var f=T[0],u=T[1],A=T[2],x=m(f,u,A);if(!(x<1e-6)){f/=x,u/=x,A/=x;var z=C[0]-_[0],I=C[1]-_[1],O=C[2]-_[2],D=m(z,I,O);if(!(D<1e-6)){z/=D,I/=D,O/=D;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=f*F+u*P+A*j;F-=U*f,P-=U*u,j-=U*A;var $=m(F,P,j);if(!($<.01&&(F=u*O-A*I,P=A*z-f*O,j=f*I-u*z,$=m(F,P,j),$<1e-6))){F/=$,P/=$,j/=$,this.up.set(M,f,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(D));var Q=u*j-A*P,re=A*F-f*j,ne=f*P-u*F,se=m(Q,re,ne);Q/=se,re/=se,ne/=se;var G=f*z+u*I+A*O,X=F*z+P*I+j*O,K=Q*z+re*I+ne*O,H=Math.asin(h(G)),Y=Math.atan2(K,X),q=this.angle._state,Z=q[q.length-1],ee=q[q.length-2];Z=Z%(2*Math.PI);var ae=Math.abs(Z+2*Math.PI-Y),he=Math.abs(Z-Y),xe=Math.abs(Z-2*Math.PI-Y);ae0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=w;function S(B){return new Uint8Array(w(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(w(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(w(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(w(B),0,B)}e.mallocInt8=_;function T(B){return new Int16Array(w(2*B),0,B)}e.mallocInt16=T;function f(B){return new Int32Array(w(4*B),0,B)}e.mallocInt32=f;function u(B){return new Float32Array(w(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(w(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function x(B){return o?new Uint8ClampedArray(w(B),0,B):S(B)}e.mallocUint8Clamped=x;function z(B){return s?new BigUint64Array(w(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(w(8*B),0,B):null}e.mallocBigInt64=I;function O(B){return new DataView(w(B),0,B)}e.mallocDataView=O;function D(B){B=n.nextPow2(B);var F=n.log2(B),P=v[F];return P.length>0?P.pop():new a(B)}e.mallocBuffer=D,e.clearCache=function(){for(var F=0;F<32;++F)m.UINT8[F].length=0,m.UINT16[F].length=0,m.UINT32[F].length=0,m.INT8[F].length=0,m.INT16[F].length=0,m.INT32[F].length=0,m.FLOAT[F].length=0,m.DOUBLE[F].length=0,m.BIGUINT64[F].length=0,m.BIGINT64[F].length=0,m.UINT8C[F].length=0,h[F].length=0,v[F].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(n){this.roots=new Array(n),this.ranks=new Array(n);for(var r=0;r",j="",U=P.length,$=j.length,Q=D[0]===w||D[0]===C,re=0,ne=-$;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ne=B.indexOf(j,re+U),ne===-1)||ne<=re));){for(var se=re;se=ne)F[se]=null,B=B.substr(0,se)+" "+B.substr(se+1);else if(F[se]!==null){var G=F[se].indexOf(D[0]);G===-1?F[se]+=D:Q&&(F[se]=F[se].substr(0,G+1)+(1+parseInt(F[se][G+1]))+F[se].substr(G+2))}var X=re+U,K=B.substr(X,ne-X),H=K.indexOf(P);H!==-1?re=H:re=ne+$}return F}function f(O,D,B){for(var F=D.textAlign||"start",P=D.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],$=O.length,Q=0;Q<$;++Q)for(var re=O[Q],ne=0;ne<2;++ne)j[ne]=Math.min(j[ne],re[ne])|0,U[ne]=Math.max(U[ne],re[ne])|0;var se=0;switch(F){case"center":se=-.5*(j[0]+U[0]);break;case"right":case"end":se=-U[0];break;case"left":case"start":se=-j[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+F+"'")}var G=0;switch(P){case"hanging":case"top":G=-j[1];break;case"middle":G=-.5*(j[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: '"+P+"'")}var X=1/B;return"lineHeight"in D?X*=+D.lineHeight:"width"in D?X=D.width/(U[0]-j[0]):"height"in D&&(X=D.height/(U[1]-j[1])),O.map(function(K){return[X*(K[0]+se),X*(K[1]+G)]})}function u(O,D,B,F,P,j){B=B.replace(/\n/g,""),j.breaklines===!0?B=B.replace(/\/g,` `):B=B.replace(/\/g," ");var U="",$=[];for(Z=0;Z-1?parseInt(le[1+Xe]):0,gt=Ye>-1?parseInt(Ae[1+Ye]):0;yt!==gt&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,gt-yt),Be=Be.replace("?px ",Se())),ae+=.25*G*(gt-yt)}if(j.superscripts===!0){var Tt=le.indexOf(w),At=Ae.indexOf(w),$t=Tt>-1?parseInt(le[1+Tt]):0,rr=At>-1?parseInt(Ae[1+At]):0;$t!==rr&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,rr-$t),Be=Be.replace("?px ",Se())),ae-=.25*G*(rr-$t)}if(j.bolds===!0){var _r=le.indexOf(h)>-1,Xt=Ae.indexOf(h)>-1;!_r&&Xt&&(or?Be=Be.replace("italic ","italic bold "):Be="bold "+Be),_r&&!Xt&&(Be=Be.replace("bold ",""))}if(j.italics===!0){var or=le.indexOf(g)>-1,Ot=Ae.indexOf(g)>-1;!or&&Ot&&(Be="italic "+Be),or&&!Ot&&(Be=Be.replace("italic ",""))}D.font=Be}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var $=u(D,B,O,P,j,U);return z($,F,P)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(x){x.permitHostObjects___&&x.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var n=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new r,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,m=Object.defineProperty,h=Object.isExtensible,v="weakmap:",g=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),w=new Uint8Array(i);crypto.getRandomValues(w),g=v+"rand:"+Array.prototype.map.call(w,function(x){return(x%36).toString(36)}).join("")+"___"}function S(x){return!(x.substr(0,v.length)==v&&x.substr(x.length-3)==="___")}if(m(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(x){if(x!==Object(x))throw new TypeError("Not an object: "+x);var z=x[g];if(z&&z.key===x)return z;if(h(x)){z={key:x};try{return m(x,g,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var x=Object.freeze;m(Object,"freeze",{value:function(D){return C(D),x(D)}});var z=Object.seal;m(Object,"seal",{value:function(D){return C(D),z(D)}});var I=Object.preventExtensions;m(Object,"preventExtensions",{value:function(D){return C(D),I(D)}})})();function _(x){return x.prototype=null,Object.freeze(x)}var T=!1;function f(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||f();var x=[],z=[],I=u++;function O(P,j){var U,$=C(P);return $?I in $?$[I]:j:(U=x.indexOf(P),U>=0?z[U]:j)}function D(P){var j=C(P);return j?I in j:x.indexOf(P)>=0}function B(P,j){var U,$=C(P);return $?$[I]=j:(U=x.indexOf(P),U>=0?z[U]=j:(U=x.length,z[U]=j,x[U]=P)),this}function F(P){var j=C(P),U,$;return j?I in j&&delete j[I]:(U=x.indexOf(P),U<0?!1:($=x.length-1,x[U]=void 0,z[U]=z[$],x[U]=x[$],x.length=$,z.length=$,!0))}return Object.create(A.prototype,{get___:{value:_(O)},has___:{value:_(D)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function x(){this instanceof A||f();var z=new r,I=void 0,O=!1;function D(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;n?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(O)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(D)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)O=!0;else throw new Error("bogus call to permitHostObjects___")})}})}x.prototype=A.prototype,l.exports=x,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236:function(l,e,t){var n=t(8284);l.exports=r;function r(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(a);return s&&s.identity===a?s:n(o,a)}}},8284:function(l){l.exports=e;function e(t,n){var r={identity:n},a=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var n=t(236);l.exports=r;function r(){var a=n();return{get:function(o,s){var c=a(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return a(o).value=s,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},3349:function(l){"use strict";function e(){return function(s,c,m,h,v,g){var i=s[0],w=m[0],S=[0],M=w;h|=0;var C=0,_=w;for(C=0;C=0!=f>=0&&v.push(S[0]+.5+.5*(T+f)/(T-f))}h+=_,++S[0]}}}function t(){return e()}var n=t;function r(s){var c={};return function(h,v,g){var i=h.dtype,w=h.order,S=[i,w.join()].join(),M=c[S];return M||(c[S]=M=s([i,w])),M(h.shape.slice(0),h.data,h.stride,h.offset|0,v,g)}}function a(s){return r(n.bind(void 0,s))}function o(s){return a({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var n=t(3349);function r(a,o){var s=[];return o=+o||0,n(a.hi(a.shape[0]-1),s,o),s}},7790:function(){}},b={};function E(l){var e=b[l];if(e!==void 0)return e.exports;var t=b[l]={id:l,loaded:!1,exports:{}};return p[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}(function(){E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){E.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var k=E(1964);V.exports=k})()}}),cp=ze({"src/lib/str2rgbarray.js"(J,V){"use strict";var{normalize:p}=Qn();function b(E){return E?p(E):[0,0,0,1]}V.exports=b}}),fp=ze({"src/lib/gl_format_color.js"(J,V){"use strict";var p=ao(),b=fl(),E=Qn(),k=fc().defaultLine,l=Ff().isArrayOrTypedArray,e=E.normalize(k),t=1;function n(c,m){return[c[0],c[1],c[2],c[3]*m]}function r(c){return p(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function a(c){return p(c)?c:t}function o(c,m,h){var v=c.color;v&&v._inputArray&&(v=v._inputArray);var g=l(v),i=l(m),w=b.extractOpts(c),S=[],M,C,_,T,f;if(w.colorscale!==void 0?M=b.makeColorScaleFuncFromTrace(c):M=r,g?C=(A,x)=>A[x]===void 0?e:w.colorscale===void 0?M(A[x]):E.normalize(M(A[x])):C=r,i?_=function(A,x){return A[x]===void 0?t:a(A[x])}:_=a,g||i)for(var u=0;u0){var v=n.c2l(m);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else a[o]=[-s[0]*t,s[1]*t]}return a}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,O=0,D=[I,O];if(Array.isArray(z))for(var B=0;B=0){var $=g(j.position,j.delaunayColor,j.delaunayAxis);$.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update($):($.gl=I,this.delaunayMesh=k($),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 x(z,I){var O=new h(z,I.uid);return O.update(I),O}V.exports=x}}),mA=ze({"src/traces/scatter3d/attributes.js"(J,V){"use strict";var p=su(),b=Qs(),E=qs(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=ws(),r=vA(),a=w2(),o=Ki().extendFlat,s=Al().overrideAll,c=(Nv(),Po(nv)).default,m=p.line,h=p.marker,v=h.line,g=o({width:m.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){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 w=V.exports=s({x:p.x,y:p.y,z:{valType:"data_array"},text:o({},p.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},p.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},p.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:p.connectgaps,line:g,marker:o({symbol:{valType:"enumerated",values:c(a),dflt:"circle",arrayOk:!0},size:o({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:o({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:o({width:o({},v.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},p.textposition,{dflt:"top center"}),textfont:b({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:n.opacity,hoverinfo:o({},n.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"}}),LN=ze({"src/traces/scatter3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=el(),k=id(),l=_d(),e=xd(),t=mA();V.exports=function(a,o,s,c){function m(C,_){return b.coerce(a,o,t,C,_)}var h=n(a,o,m,c);if(!h){o.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),m("mode"),E.hasMarkers(o)&&k(a,o,s,c,m,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(m("connectgaps"),l(a,o,s,c,m)),E.hasText(o)&&(m("texttemplate"),m("texttemplatefallback"),e(a,o,c,m,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var v=(o.line||{}).color,g=(o.marker||{}).color;m("surfaceaxis")>=0&&m("surfacecolor",v||g);for(var i=["x","y","z"],w=0;w<3;++w){var S="projection."+i[w];m(S+".show")&&(m(S+".opacity"),m(S+".scale"))}var M=p.getComponentMethod("errorbars","supplyDefaults");M(a,o,v||g||s,{axis:"z"}),M(a,o,v||g||s,{axis:"y",inherit:"z"}),M(a,o,v||g||s,{axis:"x",inherit:"z"})};function n(r,a,o,s){var c=0,m=o("x"),h=o("y"),v=o("z"),g=p.getComponentMethod("calendars","handleTraceDefaults");return g(r,a,["x","y","z"],s),m&&h&&v&&(c=Math.min(m.length,h.length,v.length),a._length=a._xlength=a._ylength=a._zlength=c),c}}}),PN=ze({"src/traces/scatter3d/calc.js"(J,V){"use strict";var p=Nd(),b=od();V.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return p(e,l),b(k,l),e}}}),RN=ze({"node_modules/get-canvas-context/index.js"(J,V){V.exports=p;function p(b,E){if(typeof b!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[b];b.indexOf("webgl")===0&&t.push("experimental-"+b);for(var n=0;n/g," "));o[s]=v,c.tickmode=m}}n.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var g=0;g<2;++g)n.bounds[g][s]=t.glplot.bounds[g][s]}t.contourLevels=l(o)}}}),BN=ze({"src/plots/gl3d/scene.js"(J,V){"use strict";var p=df().gl_plot3d,b=p.createCamera,E=p.createScene,k=IN(),l=Rx(),e=mi(),t=Nr(),n=t.preserveDrawingBuffer(),r=Gi(),a=Zl(),o=cp(),s=gA(),c=C5(),m=DN(),h=FN(),v=zN(),g=md().applyAutorangeOptions,i,w,S=!1;function M(O,D){var B=document.createElement("div"),F=O.container;this.graphDiv=O.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",B.appendChild(P),this.svgContainer=P,B.id=O.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=D,this.id=O.id||"scene",this.fullSceneLayout=D[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(D,D[this.id]),this.spikeOptions=h(D[this.id]),this.container=B,this.staticMode=!!O.staticPlot,this.pixelRatio=this.pixelRatio||O.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var O=this,D={canvas:O.canvas,gl:O.gl,glOptions:{preserveDrawingBuffer:n,premultipliedAlpha:!0,antialias:!0},container:O.container,axes:O.axesOptions,spikes:O.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:O.camera,pixelRatio:O.pixelRatio};if(O.staticMode){if(!w&&(i=document.createElement("canvas"),w=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!w))throw new Error("error creating static canvas/context for image server");D.gl=w,D.canvas=i}return D};var _=!0;C.tryCreatePlot=function(){var O=this,D=O.prepareOptions(),B=!0;try{O.glplot=E(D)}catch{if(O.staticMode||!_||n)B=!1;else{t.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{n=D.glOptions.preserveDrawingBuffer=!0,O.glplot=E(D)}catch{n=D.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var O=this,D=O.fullSceneLayout.camera,B=D.projection.type==="orthographic";O.camera=b(O.container,{center:[D.center.x,D.center.y,D.center.z],eye:[D.eye.x,D.eye.y,D.eye.z],up:[D.up.x,D.up.y,D.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var O=this;O.initializeGLCamera();var D=O.tryCreatePlot();if(!D)return s(O);O.traces={},O.make4thDimension();var B=O.graphDiv,F=B.layout,P=function(){var U={};return O.isCameraChanged(F)&&(U[O.id+".camera"]=O.getCamera()),O.isAspectChanged(F)&&(U[O.id+".aspectratio"]=O.glplot.getAspectratio(),F[O.id].aspectmode!=="manual"&&(O.fullSceneLayout.aspectmode=F[O.id].aspectmode=U[O.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var $=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",$)}};return O.glplot.canvas&&(O.glplot.canvas.addEventListener("mouseup",function(){j(O)}),O.glplot.canvas.addEventListener("touchstart",function(){S=!0}),O.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(O.camera._ortho){var $=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=O.glplot.getAspectratio();O.glplot.setAspectratio({x:$*Q.x,y:$*Q.y,z:$*Q.z})}j(O)}},l?{passive:!1}:!1),O.glplot.canvas.addEventListener("mousemove",function(){if(O.fullSceneLayout.dragmode!==!1&&O.camera.mouseListener.buttons!==0){var U=P();O.graphDiv.emit("plotly_relayouting",U)}}),O.staticMode||O.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:O.id})},!1)),O.glplot.oncontextloss=function(){O.recoverContext()},O.glplot.onrender=function(){O.render()},!0},C.render=function(){var O=this,D=O.graphDiv,B,F=O.svgContainer,P=O.container.getBoundingClientRect();D._fullLayout._calcInverseTransform(D);var j=D._fullLayout._invScaleX,U=D._fullLayout._invScaleY,$=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+$+" "+Q),F.setAttributeNS(null,"width",$),F.setAttributeNS(null,"height",Q),v(O),O.glplot.axes.update(O.axesOptions);for(var re=Object.keys(O.traces),ne=null,se=O.glplot.selection,G=0;G")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(O._mockAxis,O._mockAxis.d2l(se.traceCoordinate[3]),B.valuehoverformat),xe.push("value: "+q.valueLabel),se.textLabel&&xe.push(se.textLabel),he=xe.join("
")):he=se.textLabel;var we={x:se.traceCoordinate[0],y:se.traceCoordinate[1],z:se.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:Y};a.appendArrayPointValue(we,H,Y),B._module.eventData&&(we=H._module.eventData(we,se,H,{},Y));var Me={points:[we]};if(O.fullSceneLayout.hovermode){var Se=[];a.loneHover({trace:H,x:(.5+.5*K[0]/K[3])*$,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:he,name:ne.name,color:a.castHoverOption(H,Y,"bgcolor")||ne.color,borderColor:a.castHoverOption(H,Y,"bordercolor"),fontFamily:a.castHoverOption(H,Y,"font.family"),fontSize:a.castHoverOption(H,Y,"font.size"),fontColor:a.castHoverOption(H,Y,"font.color"),nameLength:a.castHoverOption(H,Y,"namelength"),textAlign:a.castHoverOption(H,Y,"align"),hovertemplate:t.castOption(H,Y,"hovertemplate"),hovertemplateLabels:t.extendFlat({},we,q),eventData:[we]},{container:F,gd:D,inOut_bbox:Se}),we.bbox=Se[0]}se.distance<5&&(se.buttons||S)?D.emit("plotly_click",Me):D.emit("plotly_hover",Me),this.oldEventData=Me}else a.loneUnhover(F),this.oldEventData&&D.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;O.drawAnnotations(O)},C.recoverContext=function(){var O=this;O.glplot.dispose();var D=function(){if(O.glplot.gl.isContextLost()){requestAnimationFrame(D);return}if(!O.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}O.plot.apply(O,O.plotArgs)};requestAnimationFrame(D)};var T=["xaxis","yaxis","zaxis"];function f(O,D,B){for(var F=O.fullSceneLayout,P=0;P<3;P++){var j=T[P],U=j.charAt(0),$=F[j],Q=D[U],re=D[U+"calendar"],ne=D["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ne-1);else for(var se,G=0;G<(ne||Q.length);G++)if(t.isArrayOrTypedArray(Q[G]))for(var X=0;XH[1][U])H[0][U]=-1,H[1][U]=1;else{var Ve=H[1][U]-H[0][U];H[0][U]-=Ve/32,H[1][U]+=Ve/32}if(Z=[H[0][U],H[1][U]],Z=g(Z,Q),H[0][U]=Z[0],H[1][U]=Z[1],Q.isReversed()){var Ge=H[0][U];H[0][U]=H[1][U],H[1][U]=Ge}}else Z=Q.range,H[0][U]=Q.r2l(Z[0]),H[1][U]=Q.r2l(Z[1]);H[0][U]===H[1][U]&&(H[0][U]-=1,H[1][U]+=1),Y[U]=H[1][U]-H[0][U],Q.range=[H[0][U],H[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*X[U],max:Q.range[1]*X[U]})}var ke,_e=ne.aspectmode;if(_e==="cube")ke=[1,1,1];else if(_e==="manual"){var ce=ne.aspectratio;ke=[ce.x,ce.y,ce.z]}else if(_e==="auto"||_e==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ne[T[U]],re=Q.type;var le=q[re];ve[U]=Math.pow(le.acc,1/le.count)/X[U]}_e==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ne.aspectratio.x=se.aspectratio.x=ke[0],ne.aspectratio.y=se.aspectratio.y=ke[1],ne.aspectratio.z=se.aspectratio.z=ke[2],F.glplot.setAspectratio(ne.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ne.aspectratio.x,y:ne.aspectratio.y,z:ne.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ne.aspectmode);var Ae=ne.domain||null,Be=D._size||null;if(Ae&&Be){var Xe=F.container.style;Xe.position="absolute",Xe.left=Be.l+Ae.x[0]*Be.w+"px",Xe.top=Be.t+(1-Ae.y[1])*Be.h+"px",Xe.width=Be.w*(Ae.x[1]-Ae.x[0])+"px",Xe.height=Be.h*(Ae.y[1]-Ae.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var O=this;O.glplot&&(O.camera.mouseListener.enabled=!1,O.container.removeEventListener("wheel",O.camera.wheelListener),O.camera=null,O.glplot.dispose(),O.container.parentNode.removeChild(O.container),O.glplot=null)};function A(O){return[[O.eye.x,O.eye.y,O.eye.z],[O.center.x,O.center.y,O.center.z],[O.up.x,O.up.y,O.up.z]]}function x(O){return{up:{x:O.up[0],y:O.up[1],z:O.up[2]},center:{x:O.center[0],y:O.center[1],z:O.center[2]},eye:{x:O.eye[0],y:O.eye[1],z:O.eye[2]},projection:{type:O._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var O=this;return O.camera.view.recalcMatrix(O.camera.view.lastT()),x(O.camera)},C.setViewport=function(O){var D=this,B=O.camera;D.camera.lookAt.apply(this,A(B)),D.glplot.setAspectratio(O.aspectratio);var F=B.projection.type==="orthographic",P=D.camera._ortho;F!==P&&(D.glplot.redraw(),D.glplot.clearRGBA(),D.glplot.dispose(),D.initializeGLPlot())},C.isCameraChanged=function(O){var D=this,B=D.getCamera(),F=t.nestedProperty(O,D.id+".camera"),P=F.get();function j(re,ne,se,G){var X=["up","center","eye"],K=["x","y","z"];return ne[X[se]]&&re[X[se]][K[G]]===ne[X[se]][K[G]]}var U=!1;if(P===void 0)U=!0;else{for(var $=0;$<3;$++)for(var Q=0;Q<3;Q++)if(!j(B,P,$,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(O){var D=this,B=D.glplot.getAspectratio(),F=t.nestedProperty(O,D.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(O){var D=this,B=D.fullLayout,F,P,j,U,$,Q,re=D.isCameraChanged(O),ne=D.isAspectChanged(O),se=re||ne;if(se){var G={};if(re&&(F=D.getCamera(),P=t.nestedProperty(O,D.id+".camera"),j=P.get(),G[D.id+".camera"]=j),ne&&(U=D.glplot.getAspectratio(),$=t.nestedProperty(O,D.id+".aspectratio"),Q=$.get(),G[D.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",O,B._preGUI,G),re){P.set(F);var X=t.nestedProperty(B,D.id+".camera");X.set(F)}if(ne){$.set(U);var K=t.nestedProperty(B,D.id+".aspectratio");K.set(U),D.glplot.redraw()}}return se},C.updateFx=function(O,D){var B=this,F=B.camera;if(F)if(O==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(O==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,$=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt($*$+Q*Q+re*re)<.999){var ne=B.id+".camera.up",se={x:0,y:0,z:1},G={};G[ne]=se;var X=P.layout;e.call("_storeDirectGUIEdit",X,j._preGUI,G),U.up=se,t.nestedProperty(X,ne).set(se)}}else F.keyBindingMode=O;B.fullSceneLayout.hovermode=D};function z(O,D,B){for(var F=0,P=B-1;F0)for(var $=255/U,Q=0;Q<3;++Q)O[j+Q]=Math.min($*O[j+Q],255)}}C.toImage=function(O){var D=this;O||(O="png"),D.staticMode&&D.container.appendChild(i),D.glplot.redraw();var B=D.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var $=U.getContext("2d",{willReadFrequently:!0}),Q=$.createImageData(F,P);Q.data.set(j),$.putImageData(Q,0,0);var re;switch(O){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return D.staticMode&&D.container.removeChild(i),re},C.setConvert=function(){for(var O=this,D=0;D<3;D++){var B=O.fullSceneLayout[T[D]];r.setConvert(B,O.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var O=this,D=O.graphDiv,B=D._fullLayout;O._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(O._mockAxis,B)},V.exports=M}}),ON=ze({"src/plots/gl3d/layout/attributes.js"(J,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),yA=ze({"src/plots/gl3d/layout/axis_attributes.js"(J,V){"use strict";var p=Qn(),b=cf(),E=Ki().extendFlat,k=Al().overrideAll;V.exports=k({visible:b.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:p.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:b.color,categoryorder:b.categoryorder,categoryarray:b.categoryarray,title:{text:b.title.text,font:b.title.font},type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorange:b.autorange,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},rangemode:b.rangemode,minallowed:b.minallowed,maxallowed:b.maxallowed,range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,mirror:b.mirror,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,tickfont:b.tickfont,tickangle:b.tickangle,tickprefix:b.tickprefix,showtickprefix:b.showtickprefix,ticksuffix:b.ticksuffix,showticksuffix:b.showticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickformat:b.tickformat,tickformatstops:b.tickformatstops,hoverformat:b.hoverformat,showline:b.showline,linecolor:b.linecolor,linewidth:b.linewidth,showgrid:b.showgrid,gridcolor:E({},b.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:b.gridwidth,zeroline:b.zeroline,zerolinecolor:b.zerolinecolor,zerolinewidth:b.zerolinewidth},"plot","from-root")}}),_A=ze({"src/plots/gl3d/layout/layout_attributes.js"(J,V){"use strict";var p=yA(),b=Ml().attributes,E=Ki().extendFlat,k=Nr().counterRegex;function l(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:b({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:p,yaxis:p,zaxis:p,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"}}}),NN=ze({"src/plots/gl3d/layout/axis_defaults.js"(J,V){"use strict";var p=Qn(),b=Nr(),E=hs(),k=yA(),l=E5(),e=y1(),t=["xaxis","yaxis","zaxis"],n=100*136/187;V.exports=function(a,o,s){var c,m;function h(i,w){return b.coerce(c,m,k,i,w)}for(var v=0;v1;function h(v){if(!m){var g=p.validate(o[v],e[v]);if(g)return o[v]}}k(o,s,c,{type:n,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:h,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(a,o,s,c){for(var m=s("bgcolor"),h=b.combine(m,c.paper_bgcolor),v=["up","center","eye"],g=0;g.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),xv=ze({"src/plots/gl3d/index.js"(J){"use strict";var V=Al().overrideAll,p=rv(),b=BN(),E=zf().getSubplotData,k=Nr(),l=nd(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=ON(),J.layoutAttributes=_A(),J.baseLayoutAttrOverrides=V({hoverlabel:p.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=jN(),J.plot=function(r){for(var a=r._fullLayout,o=r._fullData,s=a._subplots[e],c=0;c0){z=c[I];break}return z}function g(A,x){if(!(A<1||x<1)){for(var z=h(A),I=h(x),O=1,D=0;DM;)I--,I/=v(I),I++,I1?O:1};function C(A,x,z){var I=z[8]+z[2]*x[0]+z[5]*x[1];return A[0]=(z[6]+z[0]*x[0]+z[3]*x[1])/I,A[1]=(z[7]+z[1]*x[0]+z[4]*x[1])/I,A}function _(A,x,z){return T(A,x,C,z),A}function T(A,x,z,I){for(var O=[0,0],D=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(x[I]=!0,O=this.contourStart[I];OQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(n.isomin=null,n.isomax=null);var m=o("x"),h=o("y"),v=o("z"),g=o("value");if(!m||!m.length||!h||!h.length||!v||!v.length||!g||!g.length){n.visible=!1;return}var i=b.getComponentMethod("calendars","handleTraceDefaults");i(t,n,["x","y","z"],a),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,T=o(_+".show");T&&o(_+".fill");var f="slices."+C,u=o(f+".show");u&&(o(f+".fill"),o(f+".locations"))});var w=o("spaceframe.show");w&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("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(C){o(C)}),k(t,n,a,o,{prefix:"",cLetter:"c"}),n._length=null}V.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),A2=ze({"src/traces/streamtube/calc.js"(J,V){"use strict";var p=Nr(),b=Qf();function E(t,n){n._len=Math.min(n.u.length,n.v.length,n.w.length,n.x.length,n.y.length,n.z.length),n._u=e(n.u,n._len),n._v=e(n.v,n._len),n._w=e(n.w,n._len),n._x=e(n.x,n._len),n._y=e(n.y,n._len),n._z=e(n.z,n._len);var r=k(n);n._gridFill=r.fill,n._Xs=r.Xs,n._Ys=r.Ys,n._Zs=r.Zs,n._len=r.len;var a=0,o,s,c;n.starts&&(o=e(n.starts.x||[]),s=e(n.starts.y||[]),c=e(n.starts.z||[]),a=Math.min(o.length,s.length,c.length)),n._startsX=o||[],n._startsY=s||[],n._startsZ=c||[];var m=0,h=1/0,v;for(v=0;v1&&(u=n[o-1],x=r[o-1],I=a[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>x?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,O=[],D=[],B=[]};(!o||o0;h--){var v=Math.min(m[h],m[h-1]),g=Math.max(m[h],m[h-1]);if(g>v&&v-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ae(Ot,vt,ht){re();var De=[vt],Ne=[ht];if(H>=1)De=[vt],Ne=[ht];else if(H>0){var We=q(vt,ht);De=We.xyzv,Ne=We.abc}for(var Ke=0;Ke-1?ht[et]:Q(Mt,pt,Pt);qt>-1?Je[et]=qt:Je[et]=se(Mt,pt,Pt,ee(Ot,Ct))}G(Je[0],Je[1],Je[2])}}function he(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(2,3,0)}function xe(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function we(Ot,vt,ht,De){var Ne=Ot[3];NeDe&&(Ne=De);for(var We=(Ot[3]-Ne)/(Ot[3]-vt[3]+1e-9),Ke=[],Je=0;Je<4;Je++)Ke[Je]=(1-We)*Ot[Je]+We*vt[Je];return Ke}function Me(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Se(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var De=Ot[ht];vt.push([c._x[De],c._y[De],c._z[De],c._value[De]])}return vt}var Ve=3;function Ge(Ot,vt,ht,De,Ne,We){We||(We=1),ht=[-1,-1,-1];var Ke=!1,Je=[Me(vt[0][3],De,Ne),Me(vt[1][3],De,Ne),Me(vt[2][3],De,Ne)];if(!Je[0]&&!Je[1]&&!Je[2])return!1;var et=function(pt,Pt,Ct){return Se(Pt[0][3])&&Se(Pt[1][3])&&Se(Pt[2][3])?(ae(pt,Pt,Ct),!0):WeJe?[O,We]:[We,D];Tt(vt,et[0],et[1])}}var Mt=[[Math.min(B,D),Math.max(B,D)],[Math.min(O,F),Math.max(O,F)]];["x","y","z"].forEach(function(pt){for(var Pt=[],Ct=0;Ct0&&(Yt.push(ur.id),pt==="x"?Rt.push([ur.distRatio,0,0]):pt==="y"?Rt.push([0,ur.distRatio,0]):Rt.push([0,0,ur.distRatio]))}else pt==="x"?Kr=_r(1,u-1):pt==="y"?Kr=_r(1,A-1):Kr=_r(1,x-1);Yt.length>0&&(pt==="x"?Pt[qt]=At(Ot,Yt,Vt,Ht,Rt,Pt[qt]):pt==="y"?Pt[qt]=$t(Ot,Yt,Vt,Ht,Rt,Pt[qt]):Pt[qt]=rr(Ot,Yt,Vt,Ht,Rt,Pt[qt]),qt++),Kr.length>0&&(pt==="x"?Pt[qt]=Be(Ot,Kr,Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,Kr,Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,Kr,Vt,Ht,Pt[qt]),qt++)}var cr=c.caps[pt];cr.show&&cr.fill&&(Y(cr.fill),pt==="x"?Pt[qt]=Be(Ot,[0,u-1],Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,[0,A-1],Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,[0,x-1],Vt,Ht,Pt[qt]),qt++)}}),S===0&&ne(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=$,c._Xs=_,c._Ys=T,c._Zs=f}return or(),c}function s(c,m){var h=c.glplot.gl,v=p({gl:h}),g=new n(c,v,m.uid);return v._trace=g,g.update(m),c.glplot.add(v),g}V.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),YN=ze({"src/traces/isosurface/index.js"(J,V){"use strict";V.exports={attributes:T2(),supplyDefaults:bA().supplyDefaults,calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:M2().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),XN=ze({"lib/isosurface.js"(J,V){"use strict";V.exports=YN()}}),TA=ze({"src/traces/volume/attributes.js"(J,V){"use strict";var p=qs(),b=T2(),E=K1(),k=ws(),l=Ki().extendFlat,e=Al().overrideAll,t=V.exports=e(l({x:b.x,y:b.y,z:b.z,value:b.value,isomin:b.isomin,isomax:b.isomax,surface:b.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:b.slices,caps:b.caps,text:b.text,hovertext:b.hovertext,xhoverformat:b.xhoverformat,yhoverformat:b.yhoverformat,zhoverformat:b.zhoverformat,valuehoverformat:b.valuehoverformat,hovertemplate:b.hovertemplate,hovertemplatefallback:b.hovertemplatefallback},p("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:b.colorbar,opacity:b.opacity,opacityscale:E.opacityscale,lightposition:b.lightposition,lighting:b.lighting,flatshading:b.flatshading,contour:b.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),ZN=ze({"src/traces/volume/defaults.js"(J,V){"use strict";var p=Nr(),b=TA(),E=bA().supplyIsoDefaults,k=xA().opacityscaleDefaults;V.exports=function(e,t,n,r){function a(o,s){return p.coerce(e,t,b,o,s)}E(e,t,n,r,a),k(e,t,r,a)}}}),$N=ze({"src/traces/volume/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=fp().parseColorScale,E=Nr().isArrayOrTypedArray,k=cp(),l=fl().extractOpts,e=mg(),t=M2().findNearestOnAxis,n=M2().generateIsoMeshes;function r(s,c,m){this.scene=s,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=r.prototype;a.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,m=this.data._meshX[c],h=this.data._meshY[c],v=this.data._meshZ[c],g=this.data._Ys.length,i=this.data._Zs.length,w=t(m,this.data._Xs).id,S=t(h,this.data._Ys).id,M=t(v,this.data._Zs).id,C=s.index=M+i*S+i*g*w;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},a.update=function(s){var c=this.scene,m=c.fullSceneLayout;this.data=n(s);function h(S,M,C,_){return M.map(function(T){return S.d2l(T,0,_)*C})}var v=e(h(m.xaxis,s._meshX,c.dataScale[0],s.xcalendar),h(m.yaxis,s._meshY,c.dataScale[1],s.ycalendar),h(m.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),g=e(s._meshI,s._meshJ,s._meshK),i={positions:v,cells:g,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:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},w=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[w.min,w.max],i.colormap=b(s),this.mesh.update(i)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var m=s.glplot.gl,h=p({gl:m}),v=new r(s,h,c.uid);return h._trace=v,v.update(c),s.glplot.add(h),v}V.exports=o}}),KN=ze({"src/traces/volume/index.js"(J,V){"use strict";V.exports={attributes:TA(),supplyDefaults:ZN(),calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:$N(),moduleType:"trace",name:"volume",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),JN=ze({"lib/volume.js"(J,V){"use strict";V.exports=KN()}}),QN=ze({"src/traces/mesh3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=qc(),k=vg();V.exports=function(e,t,n,r){function a(h,v){return b.coerce(e,t,k,h,v)}function o(h){var v=h.map(function(g){var i=a(g);return i&&b.isArrayOrTypedArray(i)?i:null});return v.every(function(g){return g&&g.length===v[0].length})&&v}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=p.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["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(h){a(h)});var m=a("contour.show");m&&(a("contour.color"),a("contour.width")),"intensity"in e?(a("intensity"),a("intensitymode"),E(e,t,r,a,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?a("facecolor"):"vertexcolor"in e?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),ej=ze({"src/traces/mesh3d/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){k.intensity&&p(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),tj=ze({"src/traces/mesh3d/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=df().delaunay_triangulate,E=df().alpha_shape,k=df().convex_hull,l=fp().parseColorScale,e=Nr().isArrayOrTypedArray,t=cp(),n=fl().extractOpts,r=mg();function a(i,w,S){this.scene=i,this.uid=S,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=a.prototype;o.handlePick=function(i){if(i.object===this.mesh){var w=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var S=this.data.hovertext||this.data.text;return e(S)&&S[w]!==void 0?i.textLabel=S[w]:S&&(i.textLabel=S),!0}};function s(i){for(var w=[],S=i.length,M=0;M=w-.5)return!1;return!0}o.update=function(i){var w=this.scene,S=w.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,w.dataScale[0],i.xcalendar),c(S.yaxis,i.y,w.dataScale[1],i.ycalendar),c(S.zaxis,i.z,w.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!v(i.i,M)||!v(i.j,M)||!v(i.k,M))return;_=r(m(i.i),m(i.j),m(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=h(i.delaunayaxis,C);var T={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var f=n(i);this.color="#fff";var u=i.intensitymode;T[u+"Intensity"]=i.intensity,T[u+"IntensityBounds"]=[f.min,f.max],T.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],T.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],T.cellColors=s(i.facecolor)):(this.color=i.color,T.meshColor=t(i.color));this.mesh.update(T)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(i,w){var S=i.glplot.gl,M=p({gl:S}),C=new a(i,M,w.uid);return M._trace=C,C.update(w),i.glplot.add(M),C}V.exports=g}}),rj=ze({"src/traces/mesh3d/index.js"(J,V){"use strict";V.exports={attributes:vg(),supplyDefaults:QN(),calc:ej(),colorbar:{min:"cmin",max:"cmax"},plot:tj(),moduleType:"trace",name:"mesh3d",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),aj=ze({"lib/mesh3d.js"(J,V){"use strict";V.exports=rj()}}),AA=ze({"src/traces/cone/attributes.js"(J,V){"use strict";var p=qs(),b=Il().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=vg(),e=ws(),t=Ki().extendFlat,n={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:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:b("u",1),vhoverformat:b("v",1),whoverformat:b("w",1),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(n,p("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(a){n[a]=l[a]}),n.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=n}}),nj=ze({"src/traces/cone/defaults.js"(J,V){"use strict";var p=Nr(),b=qc(),E=AA();V.exports=function(l,e,t,n){function r(g,i){return p.coerce(l,e,E,g,i)}var a=r("u"),o=r("v"),s=r("w"),c=r("x"),m=r("y"),h=r("z");if(!a||!a.length||!o||!o.length||!s||!s.length||!c||!c.length||!m||!m.length||!h||!h.length){e.visible=!1;return}var v=r("sizemode");r("sizeref",v==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),b(l,e,n,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),ij=ze({"src/traces/cone/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,n=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,a=1/0,o=0;o2?v=m.slice(1,h-1):h===2?v=[(m[0]+m[1])/2]:v=m,v}function o(m){var h=m.length;return h===1?[.5,.5]:[m[1]-m[0],m[h-1]-m[h-2]]}function s(m,h){var v=m.fullSceneLayout,g=m.dataScale,i=h._len,w={};function S(se,G){var X=v[G],K=g[t[G]];return E.simpleMap(se,function(H){return X.d2l(H)*K})}if(w.vectors=e(S(h._u,"xaxis"),S(h._v,"yaxis"),S(h._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(h._Xs,"xaxis"),C=S(h._Ys,"yaxis"),_=S(h._Zs,"zaxis");w.meshgrid=[M,C,_],w.gridFill=h._gridFill;var T=h._slen;if(T)w.startingPositions=e(S(h._startsX,"xaxis"),S(h._startsY,"yaxis"),S(h._startsZ,"zaxis"));else{for(var f=C[0],u=a(M),A=a(_),x=new Array(u.length*A.length),z=0,I=0;If&&(f=z[0]),z[1]u&&(u=z[1])}function x(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(x);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,O=z.length,D;++If&&(f=D[0]),D[1]u&&(u=D[1])});for(C in S.objects)x(S.objects[C]);return[_,T,f,u]}function l(S,M){for(var C,_=S.length,T=_-M;T<--_;)C=S[T],S[T++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,T=M.properties==null?{}:M.properties,f=n(S,M);return C==null&&_==null?{type:"Feature",properties:T,geometry:f}:_==null?{type:"Feature",id:C,properties:T,geometry:f}:{type:"Feature",id:C,bbox:_,properties:T,geometry:f}}function n(S,M){var C=E(S.transform),_=S.arcs;function T(I,O){O.length&&O.pop();for(var D=_[I<0?~I:I],B=0,F=D.length;B1)_=s(S,M,C);else for(T=0,_=new Array(f=S.arcs.length);T1)for(var O=1,D=A(z[0]),B,F;OD&&(F=z[0],z[0]=z[O],z[O]=F,D=B);return z}).filter(function(x){return x.length>0})}}function v(S,M){for(var C=0,_=S.length;C<_;){var T=C+_>>>1;S[T]=2))throw new Error("n must be \u22652");x=S.bbox||k(S);var C=x[0],_=x[1],T=x[2],f=x[3],u;M={scale:[T-C?(T-C)/(u-1):1,f-_?(f-_)/(u-1):1],translate:[C,_]}}else x=S.bbox;var A=i(M),x,z,I=S.objects,O={};function D(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:D(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(D)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,$=P.length,Q,re=new Array($);for(re[0]=A(P[0],0);++j<$;)((Q=A(P[j],j))[0]||Q[1])&&(re[U++]=Q);return U===1&&(re[U++]=[0,0]),re.length=U,re}for(z in I)O[z]=B(I[z]);return{type:"Topology",bbox:x,transform:M,objects:O,arcs:S.arcs.map(F)}}p.bbox=k,p.feature=e,p.merge=m,p.mergeArcs=h,p.mesh=a,p.meshArcs=o,p.neighbors=g,p.quantize=w,p.transform=E,p.untransform=i,Object.defineProperty(p,"__esModule",{value:!0})})}}),S2=ze({"src/lib/topojson_utils.js"(J,V){"use strict";var p=V.exports={},b=J1().locationmodeToLayer,E=EA().feature;p.getTopojsonName=function(k){return[k.scope.replace(/ /g,"-"),"_",k.resolution.toString(),"m"].join("")},p.getTopojsonPath=function(k,l){return k+=k.endsWith("/")?"":"/",`${k}${l}.json`},p.getTopojsonFeatures=function(k,l){var e=b[k.locationmode],t=l.objects[e];return E(l,t).features}}}),Q1=ze({"src/lib/geojson_utils.js"(J){"use strict";var V=No().BADNUM;J.calcTraceToLineCoords=function(p){for(var b=p[0].trace,E=b.connectgaps,k=[],l=[],e=0;e0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(p){return p.length===1?{type:"LineString",coordinates:p[0]}:{type:"MultiLineString",coordinates:p}},J.makePolygon=function(p){if(p.length===1)return{type:"Polygon",coordinates:p};for(var b=new Array(p.length),E=0;E{for(var S in w)p(i,S,{get:w[S],enumerable:!0})},e=(i,w,S,M)=>{if(w&&typeof w=="object"||typeof w=="function")for(let C of E(w))!k.call(i,C)&&C!==S&&p(i,C,{get:()=>w[C],enumerable:!(M=b(w,C))||M.enumerable});return i},t=i=>e(p({},"__esModule",{value:!0}),i),n={};l(n,{COUNTRIES:()=>r,byAlpha2:()=>v,byAlpha3:()=>h,byM49:()=>g,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>m,sanitize:()=>a}),V.exports=t(n);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function a(i){return i.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function o(i){let w=new Map,S=new Map,M=new Map;for(let f of i)w.set(f.iso3,f),f.iso2&&S.set(f.iso2,f),f.m49&&M.set(f.m49,f);let C=new Map;for(let f of i)for(let u of[f.name,...f.aliases]){let A=a(u),x=C.get(A);if(x!==void 0&&x!==f.iso3)throw new Error(`Duplicate name/alias "${A}": ${x} vs ${f.iso3}`);C.set(A,f.iso3)}function _(f){if(f==null)return;let u=String(f).trim();if(!u)return;if(/^\d+$/.test(u)){let x=M.get(String(parseInt(u,10)).padStart(3,"0"));if(x)return x}if(/^[A-Za-z]{2}$/.test(u)){let x=S.get(u.toUpperCase());if(x)return x}if(/^[A-Za-z]{3}$/.test(u)){let x=w.get(u.toUpperCase());if(x)return x}let A=C.get(a(u));return A===void 0?void 0:w.get(A)}function T(f){var u;return(u=_(f))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:T,byAlpha3:w,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,m=s.lookupAlpha3,h=s.byAlpha3,v=s.byAlpha2,g=s.byM49}}),E2=ze({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=63710088e-1,p={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},b={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 E(I,O,D={}){let B={type:"Feature"};return(D.id===0||D.id)&&(B.id=D.id),D.bbox&&(B.bbox=D.bbox),B.properties=O||{},B.geometry=I,B}function k(I,O,D={}){switch(I){case"Point":return l(O).geometry;case"LineString":return r(O).geometry;case"Polygon":return t(O).geometry;case"MultiPoint":return c(O).geometry;case"MultiLineString":return s(O).geometry;case"MultiPolygon":return m(O).geometry;default:throw new Error(I+" is invalid")}}function l(I,O,D={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},O,D)}function e(I,O,D={}){return o(I.map(B=>l(B,O)),D)}function t(I,O,D={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,O)),D)}function r(I,O,D={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},O,D)}function a(I,O,D={}){return o(I.map(B=>r(B,O)),D)}function o(I,O={}){let D={type:"FeatureCollection"};return O.id&&(D.id=O.id),O.bbox&&(D.bbox=O.bbox),D.features=I,D}function s(I,O,D={}){return E({type:"MultiLineString",coordinates:I},O,D)}function c(I,O,D={}){return E({type:"MultiPoint",coordinates:I},O,D)}function m(I,O,D={}){return E({type:"MultiPolygon",coordinates:I},O,D)}function h(I,O,D={}){return E({type:"GeometryCollection",geometries:I},O,D)}function v(I,O=0){if(O&&!(O>=0))throw new Error("precision must be a positive number");let D=Math.pow(10,O||0);return Math.round(I*D)/D}function g(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I*D}function i(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I/D}function w(I,O){return C(i(I,O))}function S(I){let O=I%360;return O<0&&(O+=360),O}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function T(I,O="kilometers",D="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return g(i(I,O),D)}function f(I,O="meters",D="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=b[O];if(!B)throw new Error("invalid original units");let F=b[D];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function x(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(O=>{if(!u(O))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=b,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=f,J.convertLength=T,J.degreesToRadians=_,J.earthRadius=V,J.factors=p,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=h,J.isNumber=u,J.isObject=A,J.lengthToDegrees=w,J.lengthToRadians=i,J.lineString=r,J.lineStrings=a,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=m,J.point=l,J.points=e,J.polygon=t,J.polygons=n,J.radiansToDegrees=C,J.radiansToLength=g,J.round=v,J.validateBBox=x,J.validateId=z}}),k2=ze({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2();function p(i,w,S){if(i!==null)for(var M,C,_,T,f,u,A,x=0,z=0,I,O=i.type,D=O==="FeatureCollection",B=O==="Feature",F=D?i.features.length:1,P=0;Pu||D>A||B>x){f=z,u=M,A=D,x=B,_=0;return}var F=V.lineString.call(void 0,[f,z],S.properties);if(w(F,M,C,B,_)===!1)return!1;_++,f=z})===!1)return!1}}})}function c(i,w,S){var M=S,C=!1;return s(i,function(_,T,f,u,A){C===!1&&S===void 0?M=_:M=w(M,_,T,f,u,A),C=!0}),M}function m(i,w){if(!i)throw new Error("geojson is required");a(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,T=S.geometry.coordinates;switch(_){case"LineString":if(w(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var f=0;fa+E(o),0)}function E(r){let a=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){a+=Math.abs(t(r[0]));for(let o=1;o=a?(s+2)%a:s+2],v=c[0]*e,g=m[1]*e,i=h[0]*e;o+=(i-v)*Math.sin(g),s++}return o*l}var n=b;J.area=b,J.default=n}}),gj=ze({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2(),p=k2();function b(k,l={}){let e=0,t=0,n=0;return p.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],n++},!0),V.point.call(void 0,[e/n,t/n],l.properties)}var E=b;J.centroid=b,J.default=E}}),yj=ze({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:Ft<0?-1:0},f=Math.sqrt,u=Math.tan;function A(Ft){return Ft>1?0:Ft<-1?r:Math.acos(Ft)}function x(Ft){return Ft>1?a:Ft<-1?-a:Math.asin(Ft)}function z(Ft){return(Ft=_(Ft/2))*Ft}function I(){}function O(Ft,tr){Ft&&B.hasOwnProperty(Ft.type)&&B[Ft.type](Ft,tr)}var D={Feature:function(Ft,tr){O(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr=0?1:-1,ea=wr*Fr,ba=i(tr),Ia=_(tr),Na=G*Ia,Za=se*ba+Na*i(ea),mn=Na*wr*_(ea);U.add(g(mn,Za)),ne=Ft,se=ba,G=Ia}function Z(Ft){return $.reset(),j(Ft,X),$*2}function ee(Ft){return[g(Ft[1],Ft[0]),x(Ft[2])]}function ae(Ft){var tr=Ft[0],Fr=Ft[1],wr=i(Fr);return[wr*i(tr),wr*_(tr),_(Fr)]}function he(Ft,tr){return Ft[0]*tr[0]+Ft[1]*tr[1]+Ft[2]*tr[2]}function xe(Ft,tr){return[Ft[1]*tr[2]-Ft[2]*tr[1],Ft[2]*tr[0]-Ft[0]*tr[2],Ft[0]*tr[1]-Ft[1]*tr[0]]}function we(Ft,tr){Ft[0]+=tr[0],Ft[1]+=tr[1],Ft[2]+=tr[2]}function Me(Ft,tr){return[Ft[0]*tr,Ft[1]*tr,Ft[2]*tr]}function Se(Ft){var tr=f(Ft[0]*Ft[0]+Ft[1]*Ft[1]+Ft[2]*Ft[2]);Ft[0]/=tr,Ft[1]/=tr,Ft[2]/=tr}var Ie,Ve,Ge,ke,_e,ce,ve,le,Ae=E(),Be,Xe,Ye={point:yt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ye.point=$t,Ye.lineStart=rr,Ye.lineEnd=_r,Ae.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Ye.point=yt,Ye.lineStart=Tt,Ye.lineEnd=At,U<0?(Ie=-(Ge=180),Ve=-(ke=90)):Ae>t?ke=90:Ae<-t&&(Ve=-90),Xe[0]=Ie,Xe[1]=Ge},sphere:function(){Ie=-(Ge=180),Ve=-(ke=90)}};function yt(Ft,tr){Be.push(Xe=[Ie=Ft,Ge=Ft]),trke&&(ke=tr)}function gt(Ft,tr){var Fr=ae([Ft*m,tr*m]);if(le){var wr=xe(le,Fr),ea=[wr[1],-wr[0],0],ba=xe(ea,wr);Se(ba),ba=ee(ba);var Ia=Ft-_e,Na=Ia>0?1:-1,Za=ba[0]*c*Na,mn,Da=h(Ia)>180;Da^(Na*_eke&&(ke=mn)):(Za=(Za+360)%360-180,Da^(Na*_eke&&(ke=tr))),Da?Ft<_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft):Ge>=Ie?(FtGe&&(Ge=Ft)):Ft>_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft)}else Be.push(Xe=[Ie=Ft,Ge=Ft]);trke&&(ke=tr),le=Fr,_e=Ft}function Tt(){Ye.point=gt}function At(){Xe[0]=Ie,Xe[1]=Ge,Ye.point=yt,le=null}function $t(Ft,tr){if(le){var Fr=Ft-_e;Ae.add(h(Fr)>180?Fr+(Fr>0?360:-360):Fr)}else ce=Ft,ve=tr;X.point(Ft,tr),gt(Ft,tr)}function rr(){X.lineStart()}function _r(){$t(ce,ve),X.lineEnd(),h(Ae)>t&&(Ie=-(Ge=180)),Xe[0]=Ie,Xe[1]=Ge,le=null}function Xt(Ft,tr){return(tr-=Ft)<0?tr+360:tr}function or(Ft,tr){return Ft[0]-tr[0]}function Ot(Ft,tr){return Ft[0]<=Ft[1]?Ft[0]<=tr&&tr<=Ft[1]:trXt(wr[0],wr[1])&&(wr[1]=ea[1]),Xt(ea[0],wr[1])>Xt(wr[0],wr[1])&&(wr[0]=ea[0])):ba.push(wr=ea);for(Ia=-1/0,Fr=ba.length-1,tr=0,wr=ba[Fr];tr<=Fr;wr=ea,++tr)ea=ba[tr],(Na=Xt(wr[1],ea[0]))>Ia&&(Ia=Na,Ie=ea[0],Ge=wr[1])}return Be=Xe=null,Ie===1/0||Ve===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ve],[Ge,ke]]}var ht,De,Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt,Ht,Sr,Kr,Yt={sphere:I,point:Rt,lineStart:ur,lineEnd:Qr,polygonStart:function(){Yt.lineStart=Zr,Yt.lineEnd=ha},polygonEnd:function(){Yt.lineStart=ur,Yt.lineEnd=Qr}};function Rt(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);nr(Fr*i(Ft),Fr*_(Ft),_(tr))}function nr(Ft,tr,Fr){++ht,Ne+=(Ft-Ne)/ht,We+=(tr-We)/ht,Ke+=(Fr-Ke)/ht}function ur(){Yt.point=cr}function cr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),Yt.point=Rr,nr(Ht,Sr,Kr)}function Rr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=g(f((Ia=Sr*ba-Kr*ea)*Ia+(Ia=Kr*wr-Ht*ba)*Ia+(Ia=Ht*ea-Sr*wr)*Ia),Ht*wr+Sr*ea+Kr*ba);De+=Ia,Je+=Ia*(Ht+(Ht=wr)),et+=Ia*(Sr+(Sr=ea)),Mt+=Ia*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function Qr(){Yt.point=Rt}function Zr(){Yt.point=Pa}function ha(){La(qt,Vt),Yt.point=Rt}function Pa(Ft,tr){qt=Ft,Vt=tr,Ft*=m,tr*=m,Yt.point=La;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),nr(Ht,Sr,Kr)}function La(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=Sr*ba-Kr*ea,Na=Kr*wr-Ht*ba,Za=Ht*ea-Sr*wr,mn=f(Ia*Ia+Na*Na+Za*Za),Da=x(mn),Ha=mn&&-Da/mn;pt+=Ha*Ia,Pt+=Ha*Na,Ct+=Ha*Za,De+=Da,Je+=Da*(Ht+(Ht=wr)),et+=Da*(Sr+(Sr=ea)),Mt+=Da*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function un(Ft){ht=De=Ne=We=Ke=Je=et=Mt=pt=Pt=Ct=0,j(Ft,Yt);var tr=pt,Fr=Pt,wr=Ct,ea=tr*tr+Fr*Fr+wr*wr;return ear?Ft+Math.round(-Ft/s)*s:Ft,tr]}Nn.invert=Nn;function yn(Ft,tr,Fr){return(Ft%=s)?tr||Fr?ja(li(Ft),Yn(tr,Fr)):li(Ft):tr||Fr?Yn(tr,Fr):Nn}function Un(Ft){return function(tr,Fr){return tr+=Ft,[tr>r?tr-s:tr<-r?tr+s:tr,Fr]}}function li(Ft){var tr=Un(Ft);return tr.invert=Un(-Ft),tr}function Yn(Ft,tr){var Fr=i(Ft),wr=_(Ft),ea=i(tr),ba=_(tr);function Ia(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*Fr+Da*wr;return[g(Ha*ea-vn*ba,Da*Fr-$a*wr),x(vn*ea+Ha*ba)]}return Ia.invert=function(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*ea-Ha*ba;return[g(Ha*ea+$a*ba,Da*Fr+vn*wr),x(vn*Fr-Da*wr)]},Ia}function on(Ft){Ft=yn(Ft[0]*m,Ft[1]*m,Ft.length>2?Ft[2]*m:0);function tr(Fr){return Fr=Ft(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr}return tr.invert=function(Fr){return Fr=Ft.invert(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr},tr}function en(Ft,tr,Fr,wr,ea,ba){if(Fr){var Ia=i(tr),Na=_(tr),Za=wr*Fr;ea==null?(ea=tr+wr*s,ba=tr-Za/2):(ea=vi(Ia,ea),ba=vi(Ia,ba),(wr>0?eaba)&&(ea+=wr*s));for(var mn,Da=ea;wr>0?Da>ba:Da1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var Fr=Ft;return Ft=[],tr=null,Fr}}}function Oa(Ft,tr){return h(Ft[0]-tr[0])=0;--Na)ea.point((Ha=Da[Na])[0],Ha[1]);else wr($a.x,$a.p.x,-1,ea);$a=$a.p}$a=$a.o,Da=$a.z,vn=!vn}while(!$a.v);ea.lineEnd()}}}function fr(Ft){if(tr=Ft.length){for(var tr,Fr=0,wr=Ft[0],ea;++Fr=0?1:-1,Fo=Do*Co,Yo=Fo>r,bo=yi*Ni;if(lr.add(g(bo*Do*_(Fo),_i*Zi+bo*i(Fo))),Ia+=Yo?Co+Do*s:Co,Yo^vn>=Fr^En>=Fr){var Gs=xe(ae($a),ae(ri));Se(Gs);var Es=xe(ba,Gs);Se(Es);var ns=(Yo^Co>=0?-1:1)*x(Es[2]);(wr>ns||wr===ns&&(Gs[0]||Gs[1]))&&(Na+=Yo^Co>=0?1:-1)}}return(Ia<-t||Ia0){for(Za||(ea.polygonStart(),Za=!0),ea.lineStart(),Zi=0;Zi1&&Ln&2&&Ni.push(Ni.pop().concat(Ni.shift())),Da.push(Ni.filter(ot))}}return $a}}function ot(Ft){return Ft.length>1}function kt(Ft,tr){return((Ft=Ft.x)[0]<0?Ft[1]-a-t:a-Ft[1])-((tr=tr.x)[0]<0?tr[1]-a-t:a-tr[1])}var jt=Dr(function(){return!0},ar,xr,[-r,-a]);function ar(Ft){var tr=NaN,Fr=NaN,wr=NaN,ea;return{lineStart:function(){Ft.lineStart(),ea=1},point:function(ba,Ia){var Na=ba>0?r:-r,Za=h(ba-tr);h(Za-r)0?a:-a),Ft.point(wr,Fr),Ft.lineEnd(),Ft.lineStart(),Ft.point(Na,Fr),Ft.point(ba,Fr),ea=0):wr!==Na&&Za>=r&&(h(tr-wr)t?v((_(tr)*(ba=i(wr))*_(Fr)-_(wr)*(ea=i(tr))*_(Ft))/(ea*ba*Ia)):(tr+wr)/2}function xr(Ft,tr,Fr,wr){var ea;if(Ft==null)ea=Fr*a,wr.point(-r,ea),wr.point(0,ea),wr.point(r,ea),wr.point(r,0),wr.point(r,-ea),wr.point(0,-ea),wr.point(-r,-ea),wr.point(-r,0),wr.point(-r,ea);else if(h(Ft[0]-tr[0])>t){var ba=Ft[0]0,ea=h(tr)>t;function ba(Da,Ha,$a,vn){en(vn,Ft,Fr,$a,Da,Ha)}function Ia(Da,Ha){return i(Da)*i(Ha)>tr}function Na(Da){var Ha,$a,vn,Sn,yi;return{lineStart:function(){Sn=vn=!1,yi=1},point:function(_i,ki){var ri=[_i,ki],En,Ln=Ia(_i,ki),Ni=wr?Ln?0:mn(_i,ki):Ln?mn(_i+(_i<0?r:-r),ki):0;if(!Ha&&(Sn=vn=Ln)&&Da.lineStart(),Ln!==vn&&(En=Za(Ha,ri),(!En||Oa(Ha,En)||Oa(ri,En))&&(ri[2]=1)),Ln!==vn)yi=0,Ln?(Da.lineStart(),En=Za(ri,Ha),Da.point(En[0],En[1])):(En=Za(Ha,ri),Da.point(En[0],En[1],2),Da.lineEnd()),Ha=En;else if(ea&&Ha&&wr^Ln){var Zi;!(Ni&$a)&&(Zi=Za(ri,Ha,!0))&&(yi=0,wr?(Da.lineStart(),Da.point(Zi[0][0],Zi[0][1]),Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd()):(Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd(),Da.lineStart(),Da.point(Zi[0][0],Zi[0][1],3)))}Ln&&(!Ha||!Oa(Ha,ri))&&Da.point(ri[0],ri[1]),Ha=ri,vn=Ln,$a=Ni},lineEnd:function(){vn&&Da.lineEnd(),Ha=null},clean:function(){return yi|(Sn&&vn)<<1}}}function Za(Da,Ha,$a){var vn=ae(Da),Sn=ae(Ha),yi=[1,0,0],_i=xe(vn,Sn),ki=he(_i,_i),ri=_i[0],En=ki-ri*ri;if(!En)return!$a&&Da;var Ln=tr*ki/En,Ni=-tr*ri/En,Zi=xe(yi,_i),Co=Me(yi,Ln),Do=Me(_i,Ni);we(Co,Do);var Fo=Zi,Yo=he(Co,Fo),bo=he(Fo,Fo),Gs=Yo*Yo-bo*(he(Co,Co)-1);if(!(Gs<0)){var Es=f(Gs),ns=Me(Fo,(-Yo-Es)/bo);if(we(ns,Co),ns=ee(ns),!$a)return ns;var Kn=Da[0],zo=Ha[0],gs=Da[1],js=Ha[1],Cl;zo0^ns[1]<(h(ns[0]-Kn)r^(Kn<=ns[0]&&ns[0]<=zo)){var xl=Me(Fo,(-Yo+Es)/bo);return we(xl,Co),[ns,ee(xl)]}}}function mn(Da,Ha){var $a=wr?Ft:r-Ft,vn=0;return Da<-$a?vn|=1:Da>$a&&(vn|=2),Ha<-$a?vn|=4:Ha>$a&&(vn|=8),vn}return Dr(Ia,Na,ba,wr?[0,-Ft]:[-r,Ft-r])}function Lr(Ft,tr,Fr,wr,ea,ba){var Ia=Ft[0],Na=Ft[1],Za=tr[0],mn=tr[1],Da=0,Ha=1,$a=Za-Ia,vn=mn-Na,Sn;if(Sn=Fr-Ia,!(!$a&&Sn>0)){if(Sn/=$a,$a<0){if(Sn0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}if(Sn=ea-Ia,!(!$a&&Sn<0)){if(Sn/=$a,$a<0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}else if($a>0){if(Sn0)){if(Sn/=vn,vn<0){if(Sn0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}if(Sn=ba-Na,!(!vn&&Sn<0)){if(Sn/=vn,vn<0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}else if(vn>0){if(Sn0&&(Ft[0]=Ia+Da*$a,Ft[1]=Na+Da*vn),Ha<1&&(tr[0]=Ia+Ha*$a,tr[1]=Na+Ha*vn),!0}}}}}var aa=1e9,Sa=-aa;function wa(Ft,tr,Fr,wr){function ea(mn,Da){return Ft<=mn&&mn<=Fr&&tr<=Da&&Da<=wr}function ba(mn,Da,Ha,$a){var vn=0,Sn=0;if(mn==null||(vn=Ia(mn,Ha))!==(Sn=Ia(Da,Ha))||Za(mn,Da)<0^Ha>0)do $a.point(vn===0||vn===3?Ft:Fr,vn>1?wr:tr);while((vn=(vn+Ha+4)%4)!==Sn);else $a.point(Da[0],Da[1])}function Ia(mn,Da){return h(mn[0]-Ft)0?0:3:h(mn[0]-Fr)0?2:1:h(mn[1]-tr)0?1:0:Da>0?3:2}function Na(mn,Da){return Za(mn.x,Da.x)}function Za(mn,Da){var Ha=Ia(mn,1),$a=Ia(Da,1);return Ha!==$a?Ha-$a:Ha===0?Da[1]-mn[1]:Ha===1?mn[0]-Da[0]:Ha===2?mn[1]-Da[1]:Da[0]-mn[0]}return function(mn){var Da=mn,Ha=Ja(),$a,vn,Sn,yi,_i,ki,ri,En,Ln,Ni,Zi,Co={point:Do,lineStart:Gs,lineEnd:Es,polygonStart:Yo,polygonEnd:bo};function Do(Kn,zo){ea(Kn,zo)&&Da.point(Kn,zo)}function Fo(){for(var Kn=0,zo=0,gs=vn.length;zowr&&(Hu-Gu)*(wr-xl)>(Su-xl)*(Ft-Gu)&&++Kn:Su<=wr&&(Hu-Gu)*(wr-xl)<(Su-xl)*(Ft-Gu)&&--Kn;return Kn}function Yo(){Da=Ha,$a=[],vn=[],Zi=!0}function bo(){var Kn=Fo(),zo=Zi&&Kn,gs=($a=b.merge($a)).length;(zo||gs)&&(mn.polygonStart(),zo&&(mn.lineStart(),ba(null,null,1,mn),mn.lineEnd()),gs&&rt($a,Na,Kn,ba,mn),mn.polygonEnd()),Da=mn,$a=vn=Sn=null}function Gs(){Co.point=ns,vn&&vn.push(Sn=[]),Ni=!0,Ln=!1,ri=En=NaN}function Es(){$a&&(ns(yi,_i),ki&&Ln&&Ha.rejoin(),$a.push(Ha.result())),Co.point=Do,Ln&&Da.lineEnd()}function ns(Kn,zo){var gs=ea(Kn,zo);if(vn&&Sn.push([Kn,zo]),Ni)yi=Kn,_i=zo,ki=gs,Ni=!1,gs&&(Da.lineStart(),Da.point(Kn,zo));else if(gs&&Ln)Da.point(Kn,zo);else{var js=[ri=Math.max(Sa,Math.min(aa,ri)),En=Math.max(Sa,Math.min(aa,En))],Cl=[Kn=Math.max(Sa,Math.min(aa,Kn)),zo=Math.max(Sa,Math.min(aa,zo))];Lr(js,Cl,Ft,tr,Fr,wr)?(Ln||(Da.lineStart(),Da.point(js[0],js[1])),Da.point(Cl[0],Cl[1]),gs||Da.lineEnd(),Zi=!1):gs&&(Da.lineStart(),Da.point(Kn,zo),Zi=!1)}ri=Kn,En=zo,Ln=gs}return Co}}function pn(){var Ft=0,tr=0,Fr=960,wr=500,ea,ba,Ia;return Ia={stream:function(Na){return ea&&ba===Na?ea:ea=wa(Ft,tr,Fr,wr)(ba=Na)},extent:function(Na){return arguments.length?(Ft=+Na[0][0],tr=+Na[0][1],Fr=+Na[1][0],wr=+Na[1][1],ea=ba=null,Ia):[[Ft,tr],[Fr,wr]]}}}var tn=E(),ai,rn,Ri,Gn={sphere:I,point:I,lineStart:no,lineEnd:I,polygonStart:I,polygonEnd:I};function no(){Gn.point=fn,Gn.lineEnd=Di}function Di(){Gn.point=Gn.lineEnd=I}function fn(Ft,tr){Ft*=m,tr*=m,ai=Ft,rn=_(tr),Ri=i(tr),Gn.point=Ai}function Ai(Ft,tr){Ft*=m,tr*=m;var Fr=_(tr),wr=i(tr),ea=h(Ft-ai),ba=i(ea),Ia=_(ea),Na=wr*Ia,Za=Ri*Fr-rn*wr*ba,mn=rn*Fr+Ri*wr*ba;tn.add(g(f(Na*Na+Za*Za),mn)),ai=Ft,rn=Fr,Ri=wr}function jn(Ft){return tn.reset(),j(Ft,Gn),+tn}var Xn=[null,null],eo={type:"LineString",coordinates:Xn};function gi(Ft,tr){return Xn[0]=Ft,Xn[1]=tr,jn(eo)}var qi={Feature:function(Ft,tr){return oo(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr0&&(ea=gi(Ft[ba],Ft[ba-1]),ea>0&&Fr<=ea&&wr<=ea&&(Fr+wr-ea)*(1-Math.pow((Fr-wr)/ea,2))t}).map($a)).concat(b.range(w(ba/mn)*mn,ea,mn).filter(function(En){return h(En%Ha)>t}).map(vn))}return ki.lines=function(){return ri().map(function(En){return{type:"LineString",coordinates:En}})},ki.outline=function(){return{type:"Polygon",coordinates:[Sn(wr).concat(yi(Ia).slice(1),Sn(Fr).reverse().slice(1),yi(Na).reverse().slice(1))]}},ki.extent=function(En){return arguments.length?ki.extentMajor(En).extentMinor(En):ki.extentMinor()},ki.extentMajor=function(En){return arguments.length?(wr=+En[0][0],Fr=+En[1][0],Na=+En[0][1],Ia=+En[1][1],wr>Fr&&(En=wr,wr=Fr,Fr=En),Na>Ia&&(En=Na,Na=Ia,Ia=En),ki.precision(_i)):[[wr,Na],[Fr,Ia]]},ki.extentMinor=function(En){return arguments.length?(tr=+En[0][0],Ft=+En[1][0],ba=+En[0][1],ea=+En[1][1],tr>Ft&&(En=tr,tr=Ft,Ft=En),ba>ea&&(En=ba,ba=ea,ea=En),ki.precision(_i)):[[tr,ba],[Ft,ea]]},ki.step=function(En){return arguments.length?ki.stepMajor(En).stepMinor(En):ki.stepMinor()},ki.stepMajor=function(En){return arguments.length?(Da=+En[0],Ha=+En[1],ki):[Da,Ha]},ki.stepMinor=function(En){return arguments.length?(Za=+En[0],mn=+En[1],ki):[Za,mn]},ki.precision=function(En){return arguments.length?(_i=+En,$a=Eo(ba,ea,90),vn=Ao(tr,Ft,_i),Sn=Eo(Na,Ia,90),yi=Ao(wr,Fr,_i),ki):_i},ki.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function jo(){return ds()()}function Wo(Ft,tr){var Fr=Ft[0]*m,wr=Ft[1]*m,ea=tr[0]*m,ba=tr[1]*m,Ia=i(wr),Na=_(wr),Za=i(ba),mn=_(ba),Da=Ia*i(Fr),Ha=Ia*_(Fr),$a=Za*i(ea),vn=Za*_(ea),Sn=2*x(f(z(ba-wr)+Ia*Za*z(ea-Fr))),yi=_(Sn),_i=Sn?function(ki){var ri=_(ki*=Sn)/yi,En=_(Sn-ki)/yi,Ln=En*Da+ri*$a,Ni=En*Ha+ri*vn,Zi=En*Na+ri*mn;return[g(Ni,Ln)*c,g(Zi,f(Ln*Ln+Ni*Ni))*c]}:function(){return[Fr*c,wr*c]};return _i.distance=Sn,_i}function to(Ft){return Ft}var wo=E(),pi=E(),Vi,Io,Xi,Ko,Uo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Uo.lineStart=Ls,Uo.lineEnd=Vs},polygonEnd:function(){Uo.lineStart=Uo.lineEnd=Uo.point=I,wo.add(h(pi)),pi.reset()},result:function(){var Ft=wo/2;return wo.reset(),Ft}};function Ls(){Uo.point=Ss}function Ss(Ft,tr){Uo.point=Vo,Vi=Xi=Ft,Io=Ko=tr}function Vo(Ft,tr){pi.add(Ko*Ft-Xi*tr),Xi=Ft,Ko=tr}function Vs(){Vo(Vi,Io)}var Ts=1/0,Bo=Ts,_o=-Ts,Pi=_o,yo={point:bs,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var Ft=[[Ts,Bo],[_o,Pi]];return _o=Pi=-(Bo=Ts=1/0),Ft}};function bs(Ft,tr){Ft_o&&(_o=Ft),trPi&&(Pi=tr)}var Dl=0,hl=0,ps=0,dl=0,wu=0,lu=0,xc=0,Fl=0,pl=0,$u,uu,tl,vs,os={point:ms,lineStart:rl,lineEnd:Ku,polygonStart:function(){os.lineStart=bc,os.lineEnd=Lh},polygonEnd:function(){os.point=ms,os.lineStart=rl,os.lineEnd=Ku},result:function(){var Ft=pl?[xc/pl,Fl/pl]:lu?[dl/lu,wu/lu]:ps?[Dl/ps,hl/ps]:[NaN,NaN];return Dl=hl=ps=dl=wu=lu=xc=Fl=pl=0,Ft}};function ms(Ft,tr){Dl+=Ft,hl+=tr,++ps}function rl(){os.point=Fu}function Fu(Ft,tr){os.point=zu,ms(tl=Ft,vs=tr)}function zu(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ms(tl=Ft,vs=tr)}function Ku(){os.point=ms}function bc(){os.point=rh}function Lh(){Ju($u,uu)}function rh(Ft,tr){os.point=Ju,ms($u=tl=Ft,uu=vs=tr)}function Ju(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ea=vs*Ft-tl*tr,xc+=ea*(tl+Ft),Fl+=ea*(vs+tr),pl+=ea*3,ms(tl=Ft,vs=tr)}function ss(Ft){this._context=Ft}ss.prototype={_radius:4.5,pointRadius:function(Ft){return this._radius=Ft,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(Ft,tr){switch(this._point){case 0:{this._context.moveTo(Ft,tr),this._point=1;break}case 1:{this._context.lineTo(Ft,tr);break}default:{this._context.moveTo(Ft+this._radius,tr),this._context.arc(Ft,tr,this._radius,0,s);break}}},result:I};var ah=E(),wc,pc,Nf,Bu,Tc,Ou={point:I,lineStart:function(){Ou.point=Gc},lineEnd:function(){wc&&pf(pc,Nf),Ou.point=I},polygonStart:function(){wc=!0},polygonEnd:function(){wc=null},result:function(){var Ft=+ah;return ah.reset(),Ft}};function Gc(Ft,tr){Ou.point=pf,pc=Bu=Ft,Nf=Tc=tr}function pf(Ft,tr){Bu-=Ft,Tc-=tr,ah.add(f(Bu*Bu+Tc*Tc)),Bu=Ft,Tc=tr}function $l(){this._string=[]}$l.prototype={_radius:4.5,_circle:jf(4.5),pointRadius:function(Ft){return(Ft=+Ft)!==this._radius&&(this._radius=Ft,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(Ft,tr){switch(this._point){case 0:{this._string.push("M",Ft,",",tr),this._point=1;break}case 1:{this._string.push("L",Ft,",",tr);break}default:{this._circle==null&&(this._circle=jf(this._radius)),this._string.push("M",Ft,",",tr,this._circle);break}}},result:function(){if(this._string.length){var Ft=this._string.join("");return this._string=[],Ft}else return null}};function jf(Ft){return"m0,"+Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+-2*Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+2*Ft+"z"}function Hc(Ft,tr){var Fr=4.5,wr,ea;function ba(Ia){return Ia&&(typeof Fr=="function"&&ea.pointRadius(+Fr.apply(this,arguments)),j(Ia,wr(ea))),ea.result()}return ba.area=function(Ia){return j(Ia,wr(Uo)),Uo.result()},ba.measure=function(Ia){return j(Ia,wr(Ou)),Ou.result()},ba.bounds=function(Ia){return j(Ia,wr(yo)),yo.result()},ba.centroid=function(Ia){return j(Ia,wr(os)),os.result()},ba.projection=function(Ia){return arguments.length?(wr=Ia==null?(Ft=null,to):(Ft=Ia).stream,ba):Ft},ba.context=function(Ia){return arguments.length?(ea=Ia==null?(tr=null,new $l):new ss(tr=Ia),typeof Fr!="function"&&ea.pointRadius(Fr),ba):tr},ba.pointRadius=function(Ia){return arguments.length?(Fr=typeof Ia=="function"?Ia:(ea.pointRadius(+Ia),+Ia),ba):Fr},ba.projection(Ft).context(tr)}function Wc(Ft){return{stream:Qu(Ft)}}function Qu(Ft){return function(tr){var Fr=new Yc;for(var wr in Ft)Fr[wr]=Ft[wr];return Fr.stream=tr,Fr}}function Yc(){}Yc.prototype={constructor:Yc,point:function(Ft,tr){this.stream.point(Ft,tr)},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 Nu(Ft,tr,Fr){var wr=Ft.clipExtent&&Ft.clipExtent();return Ft.scale(150).translate([0,0]),wr!=null&&Ft.clipExtent(null),j(Fr,Ft.stream(yo)),tr(yo.result()),wr!=null&&Ft.clipExtent(wr),Ft}function Uf(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=tr[1][0]-tr[0][0],ba=tr[1][1]-tr[0][1],Ia=Math.min(ea/(wr[1][0]-wr[0][0]),ba/(wr[1][1]-wr[0][1])),Na=+tr[0][0]+(ea-Ia*(wr[1][0]+wr[0][0]))/2,Za=+tr[0][1]+(ba-Ia*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*Ia).translate([Na,Za])},Fr)}function al(Ft,tr,Fr){return Uf(Ft,[[0,0],tr],Fr)}function Xc(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][0]-wr[0][0]),Ia=(ea-ba*(wr[1][0]+wr[0][0]))/2,Na=-ba*wr[0][1];Ft.scale(150*ba).translate([Ia,Na])},Fr)}function ju(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][1]-wr[0][1]),Ia=-ba*wr[0][0],Na=(ea-ba*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*ba).translate([Ia,Na])},Fr)}var Ac=16,Zc=i(30*m);function ec(Ft,tr){return+tr?tc(Ft,tr):cu(Ft)}function cu(Ft){return Qu({point:function(tr,Fr){tr=Ft(tr,Fr),this.stream.point(tr[0],tr[1])}})}function tc(Ft,tr){function Fr(wr,ea,ba,Ia,Na,Za,mn,Da,Ha,$a,vn,Sn,yi,_i){var ki=mn-wr,ri=Da-ea,En=ki*ki+ri*ri;if(En>4*tr&&yi--){var Ln=Ia+$a,Ni=Na+vn,Zi=Za+Sn,Co=f(Ln*Ln+Ni*Ni+Zi*Zi),Do=x(Zi/=Co),Fo=h(h(Zi)-1)tr||h((ki*Es+ri*ns)/En-.5)>.3||Ia*$a+Na*vn+Za*Sn2?Kn[2]%360*m:0,Es()):[Na*c,Za*c,mn*c]},bo.angle=function(Kn){return arguments.length?(Ha=Kn%360*m,Es()):Ha*c},bo.reflectX=function(Kn){return arguments.length?($a=Kn?-1:1,Es()):$a<0},bo.reflectY=function(Kn){return arguments.length?(vn=Kn?-1:1,Es()):vn<0},bo.precision=function(Kn){return arguments.length?(Zi=ec(Co,Ni=Kn*Kn),ns()):f(Ni)},bo.fitExtent=function(Kn,zo){return Uf(bo,Kn,zo)},bo.fitSize=function(Kn,zo){return al(bo,Kn,zo)},bo.fitWidth=function(Kn,zo){return Xc(bo,Kn,zo)},bo.fitHeight=function(Kn,zo){return ju(bo,Kn,zo)};function Es(){var Kn=vl(Fr,0,0,$a,vn,Ha).apply(null,tr(ba,Ia)),zo=(Ha?vl:nh)(Fr,wr-Kn[0],ea-Kn[1],$a,vn,Ha);return Da=yn(Na,Za,mn),Co=ja(tr,zo),Do=ja(Da,Co),Zi=ec(Co,Ni),ns()}function ns(){return Fo=Yo=null,bo}return function(){return tr=Ft.apply(this,arguments),bo.invert=tr.invert&&Gs,Es()}}function yl(Ft){var tr=0,Fr=r/3,wr=rc(Ft),ea=wr(tr,Fr);return ea.parallels=function(ba){return arguments.length?wr(tr=ba[0]*m,Fr=ba[1]*m):[tr*c,Fr*c]},ea}function qf(Ft){var tr=i(Ft);function Fr(wr,ea){return[wr*tr,_(ea)/tr]}return Fr.invert=function(wr,ea){return[wr/tr,x(ea*tr)]},Fr}function ac(Ft,tr){var Fr=_(Ft),wr=(Fr+_(tr))/2;if(h(wr)=.12&&_i<.234&&yi>=-.425&&yi<-.214?ea:_i>=.166&&_i<.234&&yi>=-.214&&yi<-.115?Ia:Fr).invert($a)},Da.stream=function($a){return Ft&&tr===$a?Ft:Ft=Jo([Fr.stream(tr=$a),ea.stream($a),Ia.stream($a)])},Da.precision=function($a){return arguments.length?(Fr.precision($a),ea.precision($a),Ia.precision($a),Ha()):Fr.precision()},Da.scale=function($a){return arguments.length?(Fr.scale($a),ea.scale($a*.35),Ia.scale($a),Da.translate(Fr.translate())):Fr.scale()},Da.translate=function($a){if(!arguments.length)return Fr.translate();var vn=Fr.scale(),Sn=+$a[0],yi=+$a[1];return wr=Fr.translate($a).clipExtent([[Sn-.455*vn,yi-.238*vn],[Sn+.455*vn,yi+.238*vn]]).stream(mn),ba=ea.translate([Sn-.307*vn,yi+.201*vn]).clipExtent([[Sn-.425*vn+t,yi+.12*vn+t],[Sn-.214*vn-t,yi+.234*vn-t]]).stream(mn),Na=Ia.translate([Sn-.205*vn,yi+.212*vn]).clipExtent([[Sn-.214*vn+t,yi+.166*vn+t],[Sn-.115*vn-t,yi+.234*vn-t]]).stream(mn),Ha()},Da.fitExtent=function($a,vn){return Uf(Da,$a,vn)},Da.fitSize=function($a,vn){return al(Da,$a,vn)},Da.fitWidth=function($a,vn){return Xc(Da,$a,vn)},Da.fitHeight=function($a,vn){return ju(Da,$a,vn)};function Ha(){return Ft=tr=null,Da}return Da.scale(1070)}function fu(Ft){return function(tr,Fr){var wr=i(tr),ea=i(Fr),ba=Ft(wr*ea);return[ba*ea*_(tr),ba*_(Fr)]}}function Sl(Ft){return function(tr,Fr){var wr=f(tr*tr+Fr*Fr),ea=Ft(wr),ba=_(ea),Ia=i(ea);return[g(tr*ba,wr*Ia),x(wr&&Fr*ba/wr)]}}var El=fu(function(Ft){return f(2/(1+Ft))});El.invert=Sl(function(Ft){return 2*x(Ft/2)});function oh(){return ml(El).scale(124.75).clipAngle(180-.001)}var Au=fu(function(Ft){return(Ft=A(Ft))&&Ft/_(Ft)});Au.invert=Sl(function(Ft){return Ft});function $c(){return ml(Au).scale(79.4188).clipAngle(180-.001)}function _l(Ft,tr){return[Ft,M(u((a+tr)/2))]}_l.invert=function(Ft,tr){return[Ft,2*v(S(tr))-a]};function nl(){return gf(_l).scale(961/s)}function gf(Ft){var tr=ml(Ft),Fr=tr.center,wr=tr.scale,ea=tr.translate,ba=tr.clipExtent,Ia=null,Na,Za,mn;tr.scale=function(Ha){return arguments.length?(wr(Ha),Da()):wr()},tr.translate=function(Ha){return arguments.length?(ea(Ha),Da()):ea()},tr.center=function(Ha){return arguments.length?(Fr(Ha),Da()):Fr()},tr.clipExtent=function(Ha){return arguments.length?(Ha==null?Ia=Na=Za=mn=null:(Ia=+Ha[0][0],Na=+Ha[0][1],Za=+Ha[1][0],mn=+Ha[1][1]),Da()):Ia==null?null:[[Ia,Na],[Za,mn]]};function Da(){var Ha=r*wr(),$a=tr(on(tr.rotate()).invert([0,0]));return ba(Ia==null?[[$a[0]-Ha,$a[1]-Ha],[$a[0]+Ha,$a[1]+Ha]]:Ft===_l?[[Math.max($a[0]-Ha,Ia),Na],[Math.min($a[0]+Ha,Za),mn]]:[[Ia,Math.max($a[1]-Ha,Na)],[Za,Math.min($a[1]+Ha,mn)]])}return Da()}function Kc(Ft){return u((a+Ft)/2)}function sh(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):M(Fr/i(tr))/M(Kc(tr)/Kc(Ft)),ea=Fr*C(Kc(Ft),wr)/wr;if(!wr)return _l;function ba(Ia,Na){ea>0?Na<-a+t&&(Na=-a+t):Na>a-t&&(Na=a-t);var Za=ea/C(Kc(Na),wr);return[Za*_(wr*Ia),ea-Za*i(wr*Ia)]}return ba.invert=function(Ia,Na){var Za=ea-Na,mn=T(wr)*f(Ia*Ia+Za*Za),Da=g(Ia,h(Za))*T(Za);return Za*wr<0&&(Da-=r*T(Ia)*T(Za)),[Da/wr,2*v(C(ea/mn,1/wr))-a]},ba}function hu(){return yl(sh).scale(109.5).parallels([30,30])}function Uu(Ft,tr){return[Ft,tr]}Uu.invert=Uu;function qu(){return ml(Uu).scale(152.63)}function nc(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):(Fr-i(tr))/(tr-Ft),ea=Fr/wr+Ft;if(h(wr)t&&--wr>0);return[Ft/(.8707+(ba=Fr*Fr)*(-.131979+ba*(-.013791+ba*ba*ba*(.003971-.001529*ba)))),Fr]};function Hf(){return ml(bh).scale(175.295)}function il(Ft,tr){return[i(tr)*_(Ft),_(tr)]}il.invert=Sl(x);function kl(){return ml(il).scale(249.5).clipAngle(90+t)}function kc(Ft,tr){var Fr=i(tr),wr=1+i(Ft)*Fr;return[Fr*_(Ft)/wr,_(tr)/wr]}kc.invert=Sl(function(Ft){return 2*v(Ft)});function Cc(){return ml(kc).scale(250).clipAngle(142)}function Lc(Ft,tr){return[M(u((a+tr)/2)),-Ft]}Lc.invert=function(Ft,tr){return[-tr,2*v(S(Ft))-a]};function vc(){var Ft=gf(Lc),tr=Ft.center,Fr=Ft.rotate;return Ft.center=function(wr){return arguments.length?tr([-wr[1],wr[0]]):(wr=tr(),[wr[1],-wr[0]])},Ft.rotate=function(wr){return arguments.length?Fr([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Fr(),[wr[0],wr[1],wr[2]-90])},Fr([0,0,90]).scale(159.155)}p.geoAlbers=mf,p.geoAlbersUsa=ih,p.geoArea=Z,p.geoAzimuthalEqualArea=oh,p.geoAzimuthalEqualAreaRaw=El,p.geoAzimuthalEquidistant=$c,p.geoAzimuthalEquidistantRaw=Au,p.geoBounds=vt,p.geoCentroid=un,p.geoCircle=Yi,p.geoClipAntimeridian=jt,p.geoClipCircle=zr,p.geoClipExtent=pn,p.geoClipRectangle=wa,p.geoConicConformal=hu,p.geoConicConformalRaw=sh,p.geoConicEqualArea=Mc,p.geoConicEqualAreaRaw=ac,p.geoConicEquidistant=yf,p.geoConicEquidistantRaw=nc,p.geoContains=go,p.geoDistance=gi,p.geoEqualEarth=xh,p.geoEqualEarthRaw=Ec,p.geoEquirectangular=qu,p.geoEquirectangularRaw=Uu,p.geoGnomonic=xf,p.geoGnomonicRaw=Vf,p.geoGraticule=ds,p.geoGraticule10=jo,p.geoIdentity=Gf,p.geoInterpolate=Wo,p.geoLength=jn,p.geoMercator=nl,p.geoMercatorRaw=_l,p.geoNaturalEarth1=Hf,p.geoNaturalEarth1Raw=bh,p.geoOrthographic=kl,p.geoOrthographicRaw=il,p.geoPath=Hc,p.geoProjection=ml,p.geoProjectionMutator=rc,p.geoRotation=on,p.geoStereographic=Cc,p.geoStereographicRaw=kc,p.geoStream=j,p.geoTransform=Wc,p.geoTransverseMercator=vc,p.geoTransverseMercatorRaw=Lc,Object.defineProperty(p,"__esModule",{value:!0})})}}),_j=ze({"src/lib/usa_location_names.js"(J,V){"use strict";var p={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},b=new Set(Object.values(p));V.exports={usaLocationAbbreviations:b,usaLocationList:p}}}),kA={};bu(kA,{COUNTRIES_X:()=>CA});var CA,xj=zi({"src/lib/custom_country_codes.ts"(){"use strict";CA=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),hp=ze({"src/lib/geo_location_utils.js"(J,V){"use strict";var p=ci(),{COUNTRIES:b,createLookup:E}=vj(),{area:k}=mj(),{centroid:l}=gj(),{coordAll:e}=k2(),{geoBounds:t}=C2(),n=s1(),r=ap(),a=tv(),o=r1(),s=p1(),{usaLocationAbbreviations:c,usaLocationList:m}=_j(),{COUNTRIES_X:h}=(xj(),Po(kA)),{lookupAlpha3:v}=E([...b,...h]),g={"ISO-3":n,"USA-states":w,"country names":i};function i(P){let j=v(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function w(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():m[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var $;if(!j||typeof j!="string")return!1;let Q=g[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ne of U)(($=ne?.properties)==null?void 0:$.gu)==="USA"&&re.push(ne)}else re=U;for(let ne of re)if(ne.id===Q)return ne;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,$=P.id,Q=[],re,ne,se,G;switch($==="RUS"||$==="FJI"?re=function(X){var K;if(C(X)===null)K=X;else for(K=new Array(X.length),G=0;GK?H[Y++]=[X[G][0]+M,X[G][1]]:G===K?(H[Y++]=X[G],H[Y++]=[X[G][0],-90]):H[Y++]=X[G];var q=s.tester(H);q.pts.pop(),Q.push(q)}:re=function(X){Q.push(s.tester(X))},j.type){case"MultiPolygon":for(ne=0;neQ&&(Q=se,U=ne)}else U=j;return!U||!U.coordinates.some(G=>G.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function $(G){return new Promise(function(X,K){p.json(G,function(H,Y){if(H){delete j[G];var q=H.status===404?'GeoJSON at URL "'+G+'" does not exist.':"Unexpected error while fetching from "+G;return K(new Error(q))}return j[G]=Y,X(Y)})})}function Q(G){return new Promise(function(X,K){var H=0,Y=setInterval(function(){if(j[G]&&j[G]!=="pending")return clearInterval(Y),X(j[G]);if(H>100)return clearInterval(Y),K("Unexpected error while fetching from "+G);H++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ne]=P[0];return[re,ne,re,ne]}let[[j,U],[$,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,$])[1],Q]}var O=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",D=(P,j)=>O(P,j)?z(T(P)):[],B=(P,j)=>I(D(P,j));function F([P,j]){return[P,P>j?j+M:j]}V.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:T,extractTraceFeature:f,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:x,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:D,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),LA=ze({"src/traces/scattergeo/style.js"(J,V){"use strict";var p=ci(),b=$i(),E=Qn(),k=Ch(),l=k.stylePoints,e=k.styleText;V.exports=function(r,a){a&&t(r,a)};function t(n,r){var a=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,a,n),e(o,a,n),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=p.select(this),m=s.trace,h=m.line||{};c.call(E.stroke,h.color).call(b.dashLine,h.dash||"",h.width||0),m.fill!=="none"&&c.call(E.fill,m.fillcolor)})}}}),L2=ze({"src/traces/scattergeo/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=S2().getTopojsonFeatures,k=Q1(),l=hp(),e=md().findExtremes,t=No().BADNUM,n=sd().calcMarkerSize,r=el(),a=LA();function o(m,h,v){var g=h.layers.frontplot.select(".scatterlayer"),i=b.makeTraceGroups(g,v,"trace scattergeo");function w(S,M){S.lonlat[0]===t&&p.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=p.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),T=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:T,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(b.identity).enter().append("path").classed("point",!0).each(function(f){w(f,this)}),r.hasText(C)&&M.selectAll("g").data(b.identity).enter().append("g").append("text").each(function(f){w(f,this)}),a(m,S)})}function s(m,h){var v=m[0].trace,g=h[v.geo],i=g._subplot,w=v._length,S,M;if(b.isArrayOrTypedArray(v.locations)){var C=v.locationmode,_=C==="geojson-id"?l.extractTraceFeature(m):E(v,i.topojson);for(S=0;S")}}}),wj=ze({"src/traces/scattergeo/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.lon=E.lon,b.lat=E.lat,b.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b}}}),Tj=ze({"src/traces/scattergeo/select.js"(J,V){"use strict";var p=el(),b=No().BADNUM;V.exports=function(k,l){var e=k.cd,t=k.xaxis,n=k.yaxis,r=[],a=e[0].trace,o,s,c,m,h,v=!p.hasMarkers(a)&&!p.hasText(a);if(v)return[];if(l===!1)for(h=0;hH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:$e<0?-1:0},v=Math.sin,g=Math.tan,i=1e-6,w=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,T=D(2),f=D(S),u=S*2,A=180/S,x=S/180;function z($e){return $e?$e/Math.sin($e):1}function I($e){return $e>1?M:$e<-1?-M:Math.asin($e)}function O($e){return $e>1?0:$e<-1?S:Math.acos($e)}function D($e){return $e>0?Math.sqrt($e):0}function B($e){return $e=n(2*$e),($e-1)/($e+1)}function F($e){return(n($e)-n(-$e))/2}function P($e){return(n($e)+n(-$e))/2}function j($e){return a($e+D($e*$e+1))}function U($e){return a($e+D($e*$e-1))}function $($e){var nt=g($e/2),mt=2*a(t($e/2))/(nt*nt);function xt(Bt,zt){var Wt=t(Bt),Pr=t(zt),Br=v(zt),kr=Pr*Wt,jr=-((1-kr?a((1+kr)/2)/(1-kr):-.5)+mt/(1+kr));return[jr*Pr*v(Bt),jr*Br]}return xt.invert=function(Bt,zt){var Wt=D(Bt*Bt+zt*zt),Pr=-$e/2,Br=50,kr;if(!Wt)return[0,0];do{var jr=Pr/2,Jr=t(jr),la=v(jr),xa=la/Jr,Ba=-a(k(Jr));Pr-=kr=(2/xa*Ba-mt*xa-Wt)/(-Ba/(la*la)+1-mt/(2*Jr*Jr))*(Jr<0?.7:1)}while(k(kr)>i&&--Br>0);var an=v(Pr);return[e(Bt*an,Wt*t(Pr)),I(zt*an/Wt)]},xt}function Q(){var $e=M,nt=b.geoProjectionMutator($),mt=nt($e);return mt.radius=function(xt){return arguments.length?nt($e=xt*x):$e*A},mt.scale(179.976).clipAngle(147)}function re($e,nt){var mt=t(nt),xt=z(O(mt*t($e/=2)));return[2*mt*v($e)*xt,v(nt)*xt]}re.invert=function($e,nt){if(!($e*$e+4*nt*nt>S*S+i)){var mt=$e,xt=nt,Bt=25;do{var zt=v(mt),Wt=v(mt/2),Pr=t(mt/2),Br=v(xt),kr=t(xt),jr=v(2*xt),Jr=Br*Br,la=kr*kr,xa=Wt*Wt,Ba=1-la*Pr*Pr,an=Ba?O(kr*Pr)*D(wn=1/Ba):wn=0,wn,ii=2*an*kr*Wt-$e,Si=an*Br-nt,oi=wn*(la*xa+an*kr*Pr*Jr),Ji=wn*(.5*zt*jr-an*2*Br*Wt),Qi=wn*.25*(jr*Wt-an*Br*la*zt),Oo=wn*(Jr*Pr+an*xa*kr),Qo=Ji*Qi-Oo*oi;if(!Qo)break;var vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]}};function ne(){return b.geoProjection(re).scale(152.63)}function se($e){var nt=v($e),mt=t($e),xt=$e>=0?1:-1,Bt=g(xt*$e),zt=(1+nt-mt)/2;function Wt(Pr,Br){var kr=t(Br),jr=t(Pr/=2);return[(1+kr)*v(Pr),(xt*Br>-e(jr,Bt)-.001?0:-xt*10)+zt+v(Br)*mt-(1+kr)*nt*jr]}return Wt.invert=function(Pr,Br){var kr=0,jr=0,Jr=50;do{var la=t(kr),xa=v(kr),Ba=t(jr),an=v(jr),wn=1+Ba,ii=wn*xa-Pr,Si=zt+an*mt-wn*nt*la-Br,oi=wn*la/2,Ji=-xa*an,Qi=nt*wn*xa/2,Oo=mt*Ba+nt*la*an,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo/2,ys=(ii*Qi-Si*oi)/Qo;k(ys)>2&&(ys/=2),kr-=vo,jr-=ys}while((k(vo)>i||k(ys)>i)&&--Jr>0);return xt*jr>-e(t(kr),Bt)-.001?[kr*2,jr]:null},Wt}function G(){var $e=20*x,nt=$e>=0?1:-1,mt=g(nt*$e),xt=b.geoProjectionMutator(se),Bt=xt($e),zt=Bt.stream;return Bt.parallel=function(Wt){return arguments.length?(mt=g((nt=($e=Wt*x)>=0?1:-1)*$e),xt($e)):$e*A},Bt.stream=function(Wt){var Pr=Bt.rotate(),Br=zt(Wt),kr=(Bt.rotate([0,0]),zt(Wt)),jr=Bt.precision();return Bt.rotate(Pr),Br.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Jr=nt*-180;nt*Jr<180;Jr+=nt*90)kr.point(Jr,nt*90);if($e)for(;nt*(Jr-=3*nt*jr)>=-180;)kr.point(Jr,nt*-e(t(Jr*x/2),mt)*A);kr.lineEnd(),kr.polygonEnd()},Br},Bt.scale(218.695).center([0,28.0974])}function X($e,nt){var mt=g(nt/2),xt=D(1-mt*mt),Bt=1+xt*t($e/=2),zt=v($e)*xt/Bt,Wt=mt/Bt,Pr=zt*zt,Br=Wt*Wt;return[4/3*zt*(3+Pr-3*Br),4/3*Wt*(3+3*Pr-Br)]}X.invert=function($e,nt){if($e*=3/8,nt*=3/8,!$e&&k(nt)>1)return null;var mt=$e*$e,xt=nt*nt,Bt=1+mt+xt,zt=D((Bt-D(Bt*Bt-4*nt*nt))/2),Wt=I(zt)/3,Pr=zt?U(k(nt/zt))/3:j(k($e))/3,Br=t(Wt),kr=P(Pr),jr=kr*kr-Br*Br;return[h($e)*2*e(F(Pr)*Br,.25-jr),h(nt)*2*e(kr*v(Wt),.25+jr)]};function K(){return b.geoProjection(X).scale(66.1603)}var H=D(8),Y=a(1+T);function q($e,nt){var mt=k(nt);return mtw&&--xt>0);return[$e/(t(mt)*(H-1/v(mt))),h(nt)*mt]};function Z(){return b.geoProjection(q).scale(112.314)}function ee($e){var nt=2*S/$e;function mt(xt,Bt){var zt=b.geoAzimuthalEquidistantRaw(xt,Bt);if(k(xt)>M){var Wt=e(zt[1],zt[0]),Pr=D(zt[0]*zt[0]+zt[1]*zt[1]),Br=nt*m((Wt-M)/nt)+M,kr=e(v(Wt-=Br),2-t(Wt));Wt=Br+I(S/Pr*v(kr))-kr,zt[0]=Pr*t(Wt),zt[1]=Pr*v(Wt)}return zt}return mt.invert=function(xt,Bt){var zt=D(xt*xt+Bt*Bt);if(zt>M){var Wt=e(Bt,xt),Pr=nt*m((Wt-M)/nt)+M,Br=Wt>Pr?-1:1,kr=zt*t(Pr-Wt),jr=1/g(Br*O((kr-S)/D(S*(S-2*kr)+zt*zt)));Wt=Pr+2*l((jr+Br*D(jr*jr-3))/3),xt=zt*t(Wt),Bt=zt*v(Wt)}return b.geoAzimuthalEquidistantRaw.invert(xt,Bt)},mt}function ae(){var $e=5,nt=b.geoProjectionMutator(ee),mt=nt($e),xt=mt.stream,Bt=.01,zt=-t(Bt*x),Wt=v(Bt*x);return mt.lobes=function(Pr){return arguments.length?nt($e=+Pr):$e},mt.stream=function(Pr){var Br=mt.rotate(),kr=xt(Pr),jr=(mt.rotate([0,0]),xt(Pr));return mt.rotate(Br),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Jr=0,la=360/$e,xa=2*S/$e,Ba=90-180/$e,an=M;Jr<$e;++Jr,Ba-=la,an-=xa)jr.point(e(Wt*t(an),zt)*A,I(Wt*v(an))*A),Ba<-90?(jr.point(-90,-180-Ba-Bt),jr.point(-90,-180-Ba+Bt)):(jr.point(90,Ba+Bt),jr.point(90,Ba-Bt));jr.lineEnd(),jr.polygonEnd()},kr},mt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function he($e,nt){if(arguments.length<2&&(nt=$e),nt===1)return b.geoAzimuthalEqualAreaRaw;if(nt===1/0)return xe;function mt(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw(xt/nt,Bt);return zt[0]*=$e,zt}return mt.invert=function(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw.invert(xt/$e,Bt);return zt[0]*=nt,zt},mt}function xe($e,nt){return[$e*t(nt)/t(nt/=2),2*v(nt)]}xe.invert=function($e,nt){var mt=2*I(nt/2);return[$e*t(mt/2)/t(mt),mt]};function we(){var $e=2,nt=b.geoProjectionMutator(he),mt=nt($e);return mt.coefficient=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(169.529)}function Me($e,nt,mt){var xt=100,Bt,zt,Wt;mt=mt===void 0?0:+mt,nt=+nt;do zt=$e(mt),Wt=$e(mt+i),zt===Wt&&(Wt=zt+i),mt-=Bt=-1*i*(zt-nt)/(zt-Wt);while(xt-- >0&&k(Bt)>i);return xt<0?NaN:mt}function Se($e,nt,mt){return nt===void 0&&(nt=40),mt===void 0&&(mt=w),function(xt,Bt,zt,Wt){var Pr,Br,kr;zt=zt===void 0?0:+zt,Wt=Wt===void 0?0:+Wt;for(var jr=0;jrPr){zt-=Br/=2,Wt-=kr/=2;continue}Pr=Ba;var an=(zt>0?-1:1)*mt,wn=(Wt>0?-1:1)*mt,ii=$e(zt+an,Wt),Si=$e(zt,Wt+wn),oi=(ii[0]-Jr[0])/an,Ji=(ii[1]-Jr[1])/an,Qi=(Si[0]-Jr[0])/wn,Oo=(Si[1]-Jr[1])/wn,Qo=Oo*oi-Ji*Qi,vo=(k(Qo)<.5?.5:1)/Qo;if(Br=(xa*Qi-la*Oo)*vo,kr=(la*Ji-xa*oi)*vo,zt+=Br,Wt+=kr,k(Br)0&&(Pr[1]*=1+Br/1.5*Pr[0]*Pr[0]),Pr}return xt.invert=Se(xt),xt}function Ve(){return b.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ge($e,nt){var mt=$e*v(nt),xt=30,Bt;do nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));while(k(Bt)>i&&--xt>0);return nt/2}function ke($e,nt,mt){function xt(Bt,zt){return[$e*Bt*t(zt=Ge(mt,zt)),nt*v(zt)]}return xt.invert=function(Bt,zt){return zt=I(zt/nt),[Bt/($e*t(zt)),I((2*zt+v(2*zt))/mt)]},xt}var _e=ke(T/M,T,S);function ce(){return b.geoProjection(_e).scale(169.529)}var ve=2.00276,le=1.11072;function Ae($e,nt){var mt=Ge(S,nt);return[ve*$e/(1/t(nt)+le/t(mt)),(nt+T*v(mt))/ve]}Ae.invert=function($e,nt){var mt=ve*nt,xt=nt<0?-C:C,Bt=25,zt,Wt;do Wt=mt-T*v(xt),xt-=zt=(v(2*xt)+2*xt-S*v(Wt))/(2*t(2*xt)+2+S*t(Wt)*T*t(xt));while(k(zt)>i&&--Bt>0);return Wt=mt-T*v(xt),[$e*(1/t(Wt)+le/t(xt))/ve,Wt]};function Be(){return b.geoProjection(Ae).scale(160.857)}function Xe($e){var nt=0,mt=b.geoProjectionMutator($e),xt=mt(nt);return xt.parallel=function(Bt){return arguments.length?mt(nt=Bt*x):nt*A},xt}function Ye($e,nt){return[$e*t(nt),nt]}Ye.invert=function($e,nt){return[$e/t(nt),nt]};function yt(){return b.geoProjection(Ye).scale(152.63)}function gt($e){if(!$e)return Ye;var nt=1/g($e);function mt(xt,Bt){var zt=nt+$e-Bt,Wt=zt&&xt*t(Bt)/zt;return[zt*v(Wt),nt-zt*t(Wt)]}return mt.invert=function(xt,Bt){var zt=D(xt*xt+(Bt=nt-Bt)*Bt),Wt=nt+$e-zt;return[zt/t(Wt)*e(xt,Bt),Wt]},mt}function Tt(){return Xe(gt).scale(123.082).center([0,26.1441]).parallel(45)}function At($e){function nt(mt,xt){var Bt=M-xt,zt=Bt&&mt*$e*v(Bt)/Bt;return[Bt*v(zt)/$e,M-Bt*t(zt)]}return nt.invert=function(mt,xt){var Bt=mt*$e,zt=M-xt,Wt=D(Bt*Bt+zt*zt),Pr=e(Bt,zt);return[(Wt?Wt/v(Wt):1)*Pr/$e,M-Wt]},nt}function $t(){var $e=.5,nt=b.geoProjectionMutator(At),mt=nt($e);return mt.fraction=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(158.837)}var rr=ke(1,4/S,S);function _r(){return b.geoProjection(rr).scale(152.63)}function Xt($e,nt,mt,xt,Bt,zt){var Wt=t(zt),Pr;if(k($e)>1||k(zt)>1)Pr=O(mt*Bt+nt*xt*Wt);else{var Br=v($e/2),kr=v(zt/2);Pr=2*I(D(Br*Br+nt*xt*kr*kr))}return k(Pr)>i?[Pr,e(xt*v(zt),nt*Bt-mt*xt*Wt)]:[0,0]}function or($e,nt,mt){return O(($e*$e+nt*nt-mt*mt)/(2*$e*nt))}function Ot($e){return $e-2*S*r(($e+S)/(2*S))}function vt($e,nt,mt){for(var xt=[[$e[0],$e[1],v($e[1]),t($e[1])],[nt[0],nt[1],v(nt[1]),t(nt[1])],[mt[0],mt[1],v(mt[1]),t(mt[1])]],Bt=xt[2],zt,Wt=0;Wt<3;++Wt,Bt=zt)zt=xt[Wt],Bt.v=Xt(zt[1]-Bt[1],Bt[3],Bt[2],zt[3],zt[2],zt[0]-Bt[0]),Bt.point=[0,0];var Pr=or(xt[0].v[0],xt[2].v[0],xt[1].v[0]),Br=or(xt[0].v[0],xt[1].v[0],xt[2].v[0]),kr=S-Pr;xt[2].point[1]=0,xt[0].point[0]=-(xt[1].point[0]=xt[0].v[0]/2);var jr=[xt[2].point[0]=xt[0].point[0]+xt[2].v[0]*t(Pr),2*(xt[0].point[1]=xt[1].point[1]=xt[2].v[0]*v(Pr))];function Jr(la,xa){var Ba=v(xa),an=t(xa),wn=new Array(3),ii;for(ii=0;ii<3;++ii){var Si=xt[ii];if(wn[ii]=Xt(xa-Si[1],Si[3],Si[2],an,Ba,la-Si[0]),!wn[ii][0])return Si.point;wn[ii][1]=Ot(wn[ii][1]-Si.v[1])}var oi=jr.slice();for(ii=0;ii<3;++ii){var Ji=ii==2?0:ii+1,Qi=or(xt[ii].v[0],wn[ii][0],wn[Ji][0]);wn[ii][1]<0&&(Qi=-Qi),ii?ii==1?(Qi=Br-Qi,oi[0]-=wn[ii][0]*t(Qi),oi[1]-=wn[ii][0]*v(Qi)):(Qi=kr-Qi,oi[0]+=wn[ii][0]*t(Qi),oi[1]+=wn[ii][0]*v(Qi)):(oi[0]+=wn[ii][0]*t(Qi),oi[1]-=wn[ii][0]*v(Qi))}return oi[0]/=3,oi[1]/=3,oi}return Jr}function ht($e){return $e[0]*=x,$e[1]*=x,$e}function De(){return Ne([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ne($e,nt,mt){var xt=b.geoCentroid({type:"MultiPoint",coordinates:[$e,nt,mt]}),Bt=[-xt[0],-xt[1]],zt=b.geoRotation(Bt),Wt=vt(ht(zt($e)),ht(zt(nt)),ht(zt(mt)));Wt.invert=Se(Wt);var Pr=b.geoProjection(Wt).rotate(Bt),Br=Pr.center;return delete Pr.rotate,Pr.center=function(kr){return arguments.length?Br(zt(kr)):zt.invert(Br())},Pr.clipAngle(90)}function We($e,nt){var mt=D(1-v(nt));return[2/f*$e*mt,f*(1-mt)]}We.invert=function($e,nt){var mt=(mt=nt/f-1)*mt;return[mt>0?$e*D(S/mt)/2:0,I(1-mt)]};function Ke(){return b.geoProjection(We).scale(95.6464).center([0,30])}function Je($e){var nt=g($e);function mt(xt,Bt){return[xt,(xt?xt/v(xt):1)*(v(Bt)*t(xt)-nt*t(Bt))]}return mt.invert=nt?function(xt,Bt){xt&&(Bt*=v(xt)/xt);var zt=t(xt);return[xt,2*e(D(zt*zt+nt*nt-Bt*Bt)-zt,nt-Bt)]}:function(xt,Bt){return[xt,I(xt?Bt*g(xt)/xt:Bt)]},mt}function et(){return Xe(Je).scale(249.828).clipAngle(90)}var Mt=D(3);function pt($e,nt){return[Mt*$e*(2*t(2*nt/3)-1)/f,Mt*f*v(nt/3)]}pt.invert=function($e,nt){var mt=3*I(nt/(Mt*f));return[f*$e/(Mt*(2*t(2*mt/3)-1)),mt]};function Pt(){return b.geoProjection(pt).scale(156.19)}function Ct($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,v(Bt)/nt]}return mt.invert=function(xt,Bt){return[xt/nt,I(Bt*nt)]},mt}function qt(){return Xe(Ct).parallel(38.58).scale(195.044)}function Vt($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,(1+nt)*g(Bt/2)]}return mt.invert=function(xt,Bt){return[xt/nt,l(Bt/(1+nt))*2]},mt}function Ht(){return Xe(Vt).scale(124.75)}function Sr($e,nt){var mt=D(8/(3*S));return[mt*$e*(1-k(nt)/S),mt*nt]}Sr.invert=function($e,nt){var mt=D(8/(3*S)),xt=nt/mt;return[$e/(mt*(1-k(xt)/S)),xt]};function Kr(){return b.geoProjection(Sr).scale(165.664)}function Yt($e,nt){var mt=D(4-3*v(k(nt)));return[2/D(6*S)*$e*mt,h(nt)*D(2*S/3)*(2-mt)]}Yt.invert=function($e,nt){var mt=2-k(nt)/D(2*S/3);return[$e*D(6*S)/(2*mt),h(nt)*I((4-mt*mt)/3)]};function Rt(){return b.geoProjection(Yt).scale(165.664)}function nr($e,nt){var mt=D(S*(4+S));return[2/mt*$e*(1+D(1-4*nt*nt/(S*S))),4/mt*nt]}nr.invert=function($e,nt){var mt=D(S*(4+S))/2;return[$e*mt/(1+D(1-nt*nt*(4+S)/(4*S))),nt*mt/2]};function ur(){return b.geoProjection(nr).scale(180.739)}function cr($e,nt){var mt=(2+M)*v(nt);nt/=2;for(var xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++){var zt=t(nt);nt-=Bt=(nt+v(nt)*(zt+2)-mt)/(2*zt*(1+zt))}return[2/D(S*(4+S))*$e*(1+t(nt)),2*D(S/(4+S))*v(nt)]}cr.invert=function($e,nt){var mt=nt*D((4+S)/S)/2,xt=I(mt),Bt=t(xt);return[$e/(2/D(S*(4+S))*(1+Bt)),I((xt+mt*(Bt+2))/(2+M))]};function Rr(){return b.geoProjection(cr).scale(180.739)}function Qr($e,nt){return[$e*(1+t(nt))/D(2+S),2*nt/D(2+S)]}Qr.invert=function($e,nt){var mt=D(2+S),xt=nt*mt/2;return[mt*$e/(1+t(xt)),xt]};function Zr(){return b.geoProjection(Qr).scale(173.044)}function ha($e,nt){for(var mt=(1+M)*v(nt),xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++)nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));return mt=D(2+S),[$e*(1+t(nt))/mt,2*nt/mt]}ha.invert=function($e,nt){var mt=1+M,xt=D(mt/2);return[$e*2*xt/(1+t(nt*=xt)),I((nt+v(nt))/mt)]};function Pa(){return b.geoProjection(ha).scale(173.044)}var La=3+2*T;function un($e,nt){var mt=v($e/=2),xt=t($e),Bt=D(t(nt)),zt=t(nt/=2),Wt=v(nt)/(zt+T*xt*Bt),Pr=D(2/(1+Wt*Wt)),Br=D((T*zt+(xt+mt)*Bt)/(T*zt+(xt-mt)*Bt));return[La*(Pr*(Br-1/Br)-2*a(Br)),La*(Pr*Wt*(Br+1/Br)-2*l(Wt))]}un.invert=function($e,nt){if(!(zt=X.invert($e/1.2,nt*1.065)))return null;var mt=zt[0],xt=zt[1],Bt=20,zt;$e/=La,nt/=La;do{var Wt=mt/2,Pr=xt/2,Br=v(Wt),kr=t(Wt),jr=v(Pr),Jr=t(Pr),la=t(xt),xa=D(la),Ba=jr/(Jr+T*kr*xa),an=Ba*Ba,wn=D(2/(1+an)),ii=T*Jr+(kr+Br)*xa,Si=T*Jr+(kr-Br)*xa,oi=ii/Si,Ji=D(oi),Qi=Ji-1/Ji,Oo=Ji+1/Ji,Qo=wn*Qi-2*a(Ji)-$e,vo=wn*Ba*Oo-2*l(Ba)-nt,ys=jr&&_*xa*Br*an/jr,ol=(T*kr*Jr+xa)/(2*(Jr+T*kr*xa)*(Jr+T*kr*xa)*xa),jl=-.5*Ba*wn*wn*wn,Hs=jl*ys,Cu=jl*ol,hi=(hi=2*Jr+T*xa*(kr-Br))*hi*Ji,wi=(T*kr*Jr*xa+la)/hi,sl=-(T*Br*jr)/(xa*hi),sc=Qi*Hs-2*wi/Ji+wn*(wi+wi/oi),tu=Qi*Cu-2*sl/Ji+wn*(sl+sl/oi),Ps=Ba*Oo*Hs-2*ys/(1+an)+wn*Oo*ys+wn*Ba*(wi-wi/oi),gc=Ba*Oo*Cu-2*ol/(1+an)+wn*Oo*ol+wn*Ba*(sl-sl/oi),pu=tu*Ps-gc*sc;if(!pu)break;var ll=(vo*tu-Qo*gc)/pu,ef=(Qo*Ps-vo*sc)/pu;mt-=ll,xt=o(-M,s(M,xt-ef))}while((k(ll)>i||k(ef)>i)&&--Bt>0);return k(k(xt)-M)xt){var Jr=D(jr),la=e(kr,Br),xa=mt*m(la/mt),Ba=la-xa,an=$e*t(Ba),wn=($e*v(Ba)-Ba*v(an))/(M-an),ii=Oa(Ba,wn),Si=(S-$e)/lt(ii,an,S);Br=Jr;var oi=50,Ji;do Br-=Ji=($e+lt(ii,an,Br)*Si-Jr)/(ii(Br)*Si);while(k(Ji)>i&&--oi>0);kr=Ba*v(Br),Brxt){var Br=D(Pr),kr=e(Wt,zt),jr=mt*m(kr/mt),Jr=kr-jr;zt=Br*t(Jr),Wt=Br*v(Jr);for(var la=zt-M,xa=v(zt),Ba=Wt/xa,an=zti||k(Ba)>i)&&--an>0);return[Jr,la]},Br}var lr=fr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return b.geoProjection(lr).scale(149.995)}var Ir=fr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Dr(){return b.geoProjection(Ir).scale(153.93)}var ot=fr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return b.geoProjection(ot).scale(130.945)}function jt($e,nt){var mt=$e*$e,xt=nt*nt;return[$e*(1-.162388*xt)*(.87-952426e-9*mt*mt),nt*(1+xt/12)]}jt.invert=function($e,nt){var mt=$e,xt=nt,Bt=50,zt;do{var Wt=xt*xt;xt-=zt=(xt*(1+Wt/12)-nt)/(1+Wt/4)}while(k(zt)>i&&--Bt>0);Bt=50,$e/=1-.162388*Wt;do{var Pr=(Pr=mt*mt)*Pr;mt-=zt=(mt*(.87-952426e-9*Pr)-$e)/(.87-.00476213*Pr)}while(k(zt)>i&&--Bt>0);return[mt,xt]};function ar(){return b.geoProjection(jt).scale(131.747)}var Er=fr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function xr(){return b.geoProjection(Er).scale(131.087)}function zr($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e(xt+zt*S,Bt);return Wt[0]-=zt*nt,Wt}return $e.invert&&(mt.invert=function(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e.invert(xt+zt*nt,Bt),Pr=Wt[0]-zt*S;return Pr<-S?Pr+=2*S:Pr>S&&(Pr-=2*S),Wt[0]=Pr,Wt}),mt}function Lr($e,nt){var mt=h($e),xt=h(nt),Bt=t(nt),zt=t($e)*Bt,Wt=v($e)*Bt,Pr=v(xt*nt);$e=k(e(Wt,Pr)),nt=I(zt),k($e-M)>i&&($e%=M);var Br=aa($e>S/4?M-$e:$e,nt);return $e>S/4&&(Pr=Br[0],Br[0]=-Br[1],Br[1]=-Pr),Br[0]*=mt,Br[1]*=-xt,Br}Lr.invert=function($e,nt){k($e)>1&&($e=h($e)*2-$e),k(nt)>1&&(nt=h(nt)*2-nt);var mt=h($e),xt=h(nt),Bt=-mt*$e,zt=-xt*nt,Wt=zt/Bt<1,Pr=Sa(Wt?zt:Bt,Wt?Bt:zt),Br=Pr[0],kr=Pr[1],jr=t(kr);return Wt&&(Br=-M-Br),[mt*(e(v(Br)*jr,-v(kr))+S),xt*I(t(Br)*jr)]};function aa($e,nt){if(nt===M)return[0,0];var mt=v(nt),xt=mt*mt,Bt=xt*xt,zt=1+Bt,Wt=1+3*Bt,Pr=1-Bt,Br=I(1/D(zt)),kr=Pr+xt*zt*Br,jr=(1-mt)/kr,Jr=D(jr),la=jr*zt,xa=D(la),Ba=Jr*Pr,an,wn;if($e===0)return[0,-(Ba+xt*xa)];var ii=t(nt),Si=1/ii,oi=2*mt*ii,Ji=(-3*xt+Br*Wt)*oi,Qi=(-kr*ii-(1-mt)*Ji)/(kr*kr),Oo=.5*Qi/Jr,Qo=Pr*Oo-2*xt*Jr*oi,vo=xt*zt*Qi+jr*Wt*oi,ys=-Si*oi,ol=-Si*vo,jl=-2*Si*Qo,Hs=4*$e/S,Cu;if($e>.222*S||nt.175*S){if(an=(Ba+xt*D(la*(1+Bt)-Ba*Ba))/(1+Bt),$e>S/4)return[an,an];var hi=an,wi=.5*an;an=.5*(wi+hi),wn=50;do{var sl=D(la-an*an),sc=an*(jl+ys*sl)+ol*I(an/xa)-Hs;if(!sc)break;sc<0?wi=an:hi=an,an=.5*(wi+hi)}while(k(hi-wi)>i&&--wn>0)}else{an=i,wn=25;do{var tu=an*an,Ps=D(la-tu),gc=jl+ys*Ps,pu=an*gc+ol*I(an/xa)-Hs,ll=gc+(ol-ys*tu)/Ps;an-=Cu=Ps?pu/ll:0}while(k(Cu)>i&&--wn>0)}return[an,-Ba-xt*D(la-an*an)]}function Sa($e,nt){for(var mt=0,xt=1,Bt=.5,zt=50;;){var Wt=Bt*Bt,Pr=D(Bt),Br=I(1/D(1+Wt)),kr=1-Wt+Bt*(1+Wt)*Br,jr=(1-Pr)/kr,Jr=D(jr),la=jr*(1+Wt),xa=Jr*(1-Wt),Ba=la-$e*$e,an=D(Ba),wn=nt+xa+Bt*an;if(k(xt-mt)0?mt=Bt:xt=Bt,Bt=.5*(mt+xt)}if(!zt)return null;var ii=I(Pr),Si=t(ii),oi=1/Si,Ji=2*Pr*Si,Qi=(-3*Bt+Br*(1+3*Wt))*Ji,Oo=(-kr*Si-(1-Pr)*Qi)/(kr*kr),Qo=.5*Oo/Jr,vo=(1-Wt)*Qo-2*Bt*Jr*Ji,ys=-2*oi*vo,ol=-oi*Ji,jl=-oi*(Bt*(1+Wt)*Oo+jr*(1+3*Wt)*Ji);return[S/4*($e*(ys+ol*an)+jl*I($e/D(la))),ii]}function wa(){return b.geoProjection(zr(Lr)).scale(239.75)}function pn($e,nt,mt){var xt,Bt,zt;return $e?(xt=tn($e,mt),nt?(Bt=tn(nt,1-mt),zt=Bt[1]*Bt[1]+mt*xt[0]*xt[0]*Bt[0]*Bt[0],[[xt[0]*Bt[2]/zt,xt[1]*xt[2]*Bt[0]*Bt[1]/zt],[xt[1]*Bt[1]/zt,-xt[0]*xt[2]*Bt[0]*Bt[2]/zt],[xt[2]*Bt[1]*Bt[2]/zt,-mt*xt[0]*xt[1]*Bt[0]/zt]]):[[xt[0],0],[xt[1],0],[xt[2],0]]):(Bt=tn(nt,1-mt),[[0,Bt[0]/Bt[1]],[1/Bt[1],0],[Bt[2]/Bt[1],0]])}function tn($e,nt){var mt,xt,Bt,zt,Wt;if(nt=1-i)return mt=(1-nt)/4,xt=P($e),zt=B($e),Bt=1/xt,Wt=xt*F($e),[zt+mt*(Wt-$e)/(xt*xt),Bt-mt*zt*Bt*(Wt-$e),Bt+mt*zt*Bt*(Wt+$e),2*l(n($e))-M+mt*(Wt-$e)/xt];var Pr=[1,0,0,0,0,0,0,0,0],Br=[D(nt),0,0,0,0,0,0,0,0],kr=0;for(xt=D(1-nt),Wt=1;k(Br[kr]/Pr[kr])>i&&kr<8;)mt=Pr[kr++],Br[kr]=(mt-xt)/2,Pr[kr]=(mt+xt)/2,xt=D(mt*xt),Wt*=2;Bt=Wt*Pr[kr]*$e;do zt=Br[kr]*v(xt=Bt)/Pr[kr],Bt=(I(zt)+Bt)/2;while(--kr);return[v(Bt),zt=t(Bt),zt/t(Bt-xt),Bt]}function ai($e,nt,mt){var xt=k($e),Bt=k(nt),zt=F(Bt);if(xt){var Wt=1/v(xt),Pr=1/(g(xt)*g(xt)),Br=-(Pr+mt*(zt*zt*Wt*Wt)-1+mt),kr=(mt-1)*Pr,jr=(-Br+D(Br*Br-4*kr))/2;return[rn(l(1/D(jr)),mt)*h($e),rn(l(D((jr/Pr-1)/mt)),1-mt)*h(nt)]}return[0,rn(l(zt),1-mt)*h(nt)]}function rn($e,nt){if(!nt)return $e;if(nt===1)return a(g($e/2+C));for(var mt=1,xt=D(1-nt),Bt=D(nt),zt=0;k(Bt)>i;zt++){if($e%S){var Wt=l(xt*g($e)/mt);Wt<0&&(Wt+=S),$e+=Wt+~~($e/S)*S}else $e+=$e;Bt=(mt+xt)/2,xt=D(mt*xt),Bt=((mt=Bt)-xt)/2}return $e/(c(2,zt)*mt)}function Ri($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=a(g(S/4+k(nt)/2)),Pr=n(zt*Wt)/D(mt),Br=Gn(Pr*t(zt*$e),Pr*v(zt*$e)),kr=ai(Br[0],Br[1],xt*xt);return[-kr[1],(nt>=0?1:-1)*(.5*Bt-kr[0])]}function Gn($e,nt){var mt=$e*$e,xt=nt+1,Bt=1-mt-nt*nt;return[.5*(($e>=0?M:-M)-e(Bt,2*$e)),-.25*a(Bt*Bt+4*mt)+.5*a(xt*xt+mt)]}function no($e,nt){var mt=nt[0]*nt[0]+nt[1]*nt[1];return[($e[0]*nt[0]+$e[1]*nt[1])/mt,($e[1]*nt[0]-$e[0]*nt[1])/mt]}Ri.invert=function($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=pn(.5*Bt-nt,-$e,xt*xt),Pr=no(Wt[0],Wt[1]),Br=e(Pr[1],Pr[0])/zt;return[Br,2*l(n(.5/zt*a(mt*Pr[0]*Pr[0]+mt*Pr[1]*Pr[1])))-M]};function Di(){return b.geoProjection(zr(Ri)).scale(151.496)}function fn($e){var nt=v($e),mt=t($e),xt=Ai($e);xt.invert=Ai(-$e);function Bt(zt,Wt){var Pr=xt(zt,Wt);zt=Pr[0],Wt=Pr[1];var Br=v(Wt),kr=t(Wt),jr=t(zt),Jr=O(nt*Br+mt*kr*jr),la=v(Jr),xa=k(la)>i?Jr/la:1;return[xa*mt*v(zt),(k(zt)>M?xa:-xa)*(nt*kr-mt*Br*jr)]}return Bt.invert=function(zt,Wt){var Pr=D(zt*zt+Wt*Wt),Br=-v(Pr),kr=t(Pr),jr=Pr*kr,Jr=-Wt*Br,la=Pr*nt,xa=D(jr*jr+Jr*Jr-la*la),Ba=e(jr*la+Jr*xa,Jr*la-jr*xa),an=(Pr>M?-1:1)*e(zt*Br,Pr*t(Ba)*kr+Wt*v(Ba)*Br);return xt.invert(an,Ba)},Bt}function Ai($e){var nt=v($e),mt=t($e);return function(xt,Bt){var zt=t(Bt),Wt=t(xt)*zt,Pr=v(xt)*zt,Br=v(Bt);return[e(Pr,Wt*mt-Br*nt),I(Br*mt+Wt*nt)]}}function jn(){var $e=0,nt=b.geoProjectionMutator(fn),mt=nt($e),xt=mt.rotate,Bt=mt.stream,zt=b.geoCircle();return mt.parallel=function(Wt){if(!arguments.length)return $e*A;var Pr=mt.rotate();return nt($e=Wt*x).rotate(Pr)},mt.rotate=function(Wt){return arguments.length?(xt.call(mt,[Wt[0],Wt[1]-$e*A]),zt.center([-Wt[0],-Wt[1]]),mt):(Wt=xt.call(mt),Wt[1]+=$e*A,Wt)},mt.stream=function(Wt){return Wt=Bt(Wt),Wt.sphere=function(){Wt.polygonStart();var Pr=.01,Br=zt.radius(90-Pr)().coordinates[0],kr=Br.length-1,jr=-1,Jr;for(Wt.lineStart();++jr=0;)Wt.point((Jr=Br[jr])[0],Jr[1]);Wt.lineEnd(),Wt.polygonEnd()},Wt},mt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Xn=3,eo=I(1-1/Xn)*A,gi=Ct(0);function qi($e){var nt=eo*x,mt=We(S,nt)[0]-We(-S,nt)[0],xt=gi(0,nt)[1],Bt=We(0,nt)[1],zt=f-Bt,Wt=u/$e,Pr=4/u,Br=xt+zt*zt*4/u;function kr(jr,Jr){var la,xa=k(Jr);if(xa>nt){var Ba=s($e-1,o(0,r((jr+S)/Wt)));jr+=S*($e-1)/$e-Ba*Wt,la=We(jr,xa),la[0]=la[0]*u/mt-u*($e-1)/(2*$e)+Ba*u/$e,la[1]=xt+(la[1]-Bt)*4*zt/u,Jr<0&&(la[1]=-la[1])}else la=gi(jr,Jr);return la[0]*=Pr,la[1]/=Br,la}return kr.invert=function(jr,Jr){jr/=Pr,Jr*=Br;var la=k(Jr);if(la>xt){var xa=s($e-1,o(0,r((jr+S)/Wt)));jr=(jr+S*($e-1)/$e-xa*Wt)*mt/u;var Ba=We.invert(jr,.25*(la-xt)*u/zt+Bt);return Ba[0]-=S*($e-1)/$e-xa*Wt,Jr<0&&(Ba[1]=-Ba[1]),Ba}return gi.invert(jr,Jr)},kr}function io($e,nt){return[$e,nt&1?90-i:eo]}function oo($e,nt){return[$e,nt&1?-90+i:-eo]}function Vn($e){return[$e[0]*(1-i),$e[1]]}function qn($e){var nt=[].concat(E.range(-180,180+$e/2,$e).map(io),E.range(180,-180-$e/2,-$e).map(oo));return{type:"Polygon",coordinates:[$e===180?nt.map(Vn):nt]}}function Hi(){var $e=4,nt=b.geoProjectionMutator(qi),mt=nt($e),xt=mt.stream;return mt.lobes=function(Bt){return arguments.length?nt($e=+Bt):$e},mt.stream=function(Bt){var zt=mt.rotate(),Wt=xt(Bt),Pr=(mt.rotate([0,0]),xt(Bt));return mt.rotate(zt),Wt.sphere=function(){b.geoStream(qn(180/$e),Pr)},Wt},mt.scale(239.75)}function Mi($e){var nt=1+$e,mt=v(1/nt),xt=I(mt),Bt=2*D(S/(zt=S+4*xt*nt)),zt,Wt=.5*Bt*(nt+D($e*(2+$e))),Pr=$e*$e,Br=nt*nt;function kr(jr,Jr){var la=1-v(Jr),xa,Ba;if(la&&la<2){var an=M-Jr,wn=25,ii;do{var Si=v(an),oi=t(an),Ji=xt+e(Si,nt-oi),Qi=1+Br-2*nt*oi;an-=ii=(an-Pr*xt-nt*Si+Qi*Ji-.5*la*zt)/(2*nt*Si*Ji)}while(k(ii)>w&&--wn>0);xa=Bt*D(Qi),Ba=jr*Ji/S}else xa=Bt*($e+la),Ba=jr*xt/S;return[xa*v(Ba),Wt-xa*t(Ba)]}return kr.invert=function(jr,Jr){var la=jr*jr+(Jr-=Wt)*Jr,xa=(1+Br-la/(Bt*Bt))/(2*nt),Ba=O(xa),an=v(Ba),wn=xt+e(an,nt-xa);return[I(jr/D(la))*S/wn,I(1-2*(Ba-Pr*xt-nt*an+(1+Br-2*nt*xa)*wn)/zt)]},kr}function Ro(){var $e=1,nt=b.geoProjectionMutator(Mi),mt=nt($e);return mt.ratio=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(167.774).center([0,18.67])}var go=.7109889596207567,Eo=.0528035274542;function Ao($e,nt){return nt>-go?($e=_e($e,nt),$e[1]+=Eo,$e):Ye($e,nt)}Ao.invert=function($e,nt){return nt>-go?_e.invert($e,nt-Eo):Ye.invert($e,nt)};function ds(){return b.geoProjection(Ao).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function jo($e,nt){return k(nt)>go?($e=_e($e,nt),$e[1]-=nt>0?Eo:-Eo,$e):Ye($e,nt)}jo.invert=function($e,nt){return k(nt)>go?_e.invert($e,nt+(nt>0?Eo:-Eo)):Ye.invert($e,nt)};function Wo(){return b.geoProjection(jo).scale(152.63)}function to($e,nt,mt,xt){var Bt=D(4*S/(2*mt+(1+$e-nt/2)*v(2*mt)+($e+nt)/2*v(4*mt)+nt/2*v(6*mt))),zt=D(xt*v(mt)*D((1+$e*t(2*mt)+nt*t(4*mt))/(1+$e+nt))),Wt=mt*Br(1);function Pr(Jr){return D(1+$e*t(2*Jr)+nt*t(4*Jr))}function Br(Jr){var la=Jr*mt;return(2*la+(1+$e-nt/2)*v(2*la)+($e+nt)/2*v(4*la)+nt/2*v(6*la))/mt}function kr(Jr){return Pr(Jr)*v(Jr)}var jr=function(Jr,la){var xa=mt*Me(Br,Wt*v(la)/mt,la/S);isNaN(xa)&&(xa=mt*h(la));var Ba=Bt*Pr(xa);return[Ba*zt*Jr/S*t(xa),Ba/zt*v(xa)]};return jr.invert=function(Jr,la){var xa=Me(kr,la*zt/Bt);return[Jr*S/(t(xa)*Bt*zt*Pr(xa)),I(mt*Br(xa/mt)/Wt)]},mt===0&&(Bt=D(xt/S),jr=function(Jr,la){return[Jr*Bt,v(la)/Bt]},jr.invert=function(Jr,la){return[Jr/Bt,I(la*Bt)]}),jr}function wo(){var $e=1,nt=0,mt=45*x,xt=2,Bt=b.geoProjectionMutator(to),zt=Bt($e,nt,mt,xt);return zt.a=function(Wt){return arguments.length?Bt($e=+Wt,nt,mt,xt):$e},zt.b=function(Wt){return arguments.length?Bt($e,nt=+Wt,mt,xt):nt},zt.psiMax=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt*x,xt):mt*A},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(180.739)}function pi($e,nt,mt,xt,Bt,zt,Wt,Pr,Br,kr,jr){if(jr.nanEncountered)return NaN;var Jr,la,xa,Ba,an,wn,ii,Si,oi,Ji;if(Jr=mt-nt,la=$e(nt+Jr*.25),xa=$e(mt-Jr*.25),isNaN(la)){jr.nanEncountered=!0;return}if(isNaN(xa)){jr.nanEncountered=!0;return}return Ba=Jr*(xt+4*la+Bt)/12,an=Jr*(Bt+4*xa+zt)/12,wn=Ba+an,Ji=(wn-Wt)/15,kr>Br?(jr.maxDepthCount++,wn+Ji):Math.abs(Ji)>1;do Br[wn]>xa?an=wn:Ba=wn,wn=Ba+an>>1;while(wn>Ba);var ii=Br[wn+1]-Br[wn];return ii&&(ii=(xa-Br[wn+1])/ii),(wn+1+ii)/Wt}var Jr=2*jr(1)/S*zt/mt,la=function(xa,Ba){var an=jr(k(v(Ba))),wn=xt(an)*xa;return an/=Jr,[wn,Ba>=0?an:-an]};return la.invert=function(xa,Ba){var an;return Ba*=Jr,k(Ba)<1&&(an=h(Ba)*I(Bt(k(Ba))*zt)),[xa/xt(k(Ba)),an]},la}function Xi(){var $e=0,nt=2.5,mt=1.183136,xt=b.geoProjectionMutator(Io),Bt=xt($e,nt,mt);return Bt.alpha=function(zt){return arguments.length?xt($e=+zt,nt,mt):$e},Bt.k=function(zt){return arguments.length?xt($e,nt=+zt,mt):nt},Bt.gamma=function(zt){return arguments.length?xt($e,nt,mt=+zt):mt},Bt.scale(152.63)}function Ko($e,nt){return k($e[0]-nt[0])=0;--Br)mt=$e[1][Br],xt=mt[0][0],Bt=mt[0][1],zt=mt[1][1],Wt=mt[2][0],Pr=mt[2][1],nt.push(Uo([[Wt-i,Pr-i],[Wt-i,zt+i],[xt+i,zt+i],[xt+i,Bt-i]],30));return{type:"Polygon",coordinates:[E.merge(nt)]}}function Ss($e,nt,mt){var xt,Bt;function zt(Br,kr){for(var jr=kr<0?-1:1,Jr=nt[+(kr<0)],la=0,xa=Jr.length-1;laJr[la][2][0];++la);var Ba=$e(Br-Jr[la][1][0],kr);return Ba[0]+=$e(Jr[la][1][0],jr*kr>jr*Jr[la][0][1]?Jr[la][0][1]:kr)[0],Ba}mt?zt.invert=mt(zt):$e.invert&&(zt.invert=function(Br,kr){for(var jr=Bt[+(kr<0)],Jr=nt[+(kr<0)],la=0,xa=jr.length;laBa&&(an=xa,xa=Ba,Ba=an),[[Jr,xa],[la,Ba]]})}),Wt):nt.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*A,jr[0][1]*A],[jr[1][0]*A,jr[1][1]*A],[jr[2][0]*A,jr[2][1]*A]]})})},nt!=null&&Wt.lobes(nt),Wt}var Vo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vs(){return Ss(Ae,Vo).scale(160.857)}var Ts=[[[[-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 Bo(){return Ss(jo,Ts).scale(152.63)}var _o=[[[[-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 Pi(){return Ss(_e,_o).scale(169.529)}var yo=[[[[-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 bs(){return Ss(_e,yo).scale(169.529).rotate([20,0])}var Dl=[[[[-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 hl(){return Ss(Ao,Dl,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function dl(){return Ss(Ye,ps).scale(152.63).rotate([-20,0])}function wu($e,nt){return[3/u*$e*D(S*S/3-nt*nt),nt]}wu.invert=function($e,nt){return[u/3*$e/D(S*S/3-nt*nt),nt]};function lu(){return b.geoProjection(wu).scale(158.837)}function xc($e){function nt(mt,xt){if(k(k(xt)-M)2)return null;mt/=2,xt/=2;var zt=mt*mt,Wt=xt*xt,Pr=2*xt/(1+zt+Wt);return Pr=c((1+Pr)/(1-Pr),1/$e),[e(2*mt,1-zt-Wt)/$e,I((Pr-1)/(Pr+1))]},nt}function Fl(){var $e=.5,nt=b.geoProjectionMutator(xc),mt=nt($e);return mt.spacing=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(124.75)}var pl=S/T;function $u($e,nt){return[$e*(1+D(t(nt)))/2,nt/(t(nt/2)*t($e/6))]}$u.invert=function($e,nt){var mt=k($e),xt=k(nt),Bt=i,zt=M;xti||k(wn)>i)&&--Bt>0);return Bt&&[mt,xt]};function vs(){return b.geoProjection(tl).scale(139.98)}function os($e,nt){return[v($e)/t(nt),g(nt)*t($e)]}os.invert=function($e,nt){var mt=$e*$e,xt=nt*nt,Bt=xt+1,zt=mt+Bt,Wt=$e?_*D((zt-D(zt*zt-4*mt))/mt):1/D(Bt);return[I($e*Wt),h(nt)*O(Wt)]};function ms(){return b.geoProjection(os).scale(144.049).clipAngle(90-.001)}function rl($e){var nt=t($e),mt=g(C+$e/2);function xt(Bt,zt){var Wt=zt-$e,Pr=k(Wt)=0;)jr=$e[kr],Jr=jr[0]+Pr*(xa=Jr)-Br*la,la=jr[1]+Pr*la+Br*xa;return Jr=Pr*(xa=Jr)-Br*la,la=Pr*la+Br*xa,[Jr,la]}return mt.invert=function(xt,Bt){var zt=20,Wt=xt,Pr=Bt;do{for(var Br=nt,kr=$e[Br],jr=kr[0],Jr=kr[1],la=0,xa=0,Ba;--Br>=0;)kr=$e[Br],la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=kr[0]+Wt*(Ba=jr)-Pr*Jr,Jr=kr[1]+Wt*Jr+Pr*Ba;la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=Wt*(Ba=jr)-Pr*Jr-xt,Jr=Wt*Jr+Pr*Ba-Bt;var an=la*la+xa*xa,wn,ii;Wt-=wn=(jr*la+Jr*xa)/an,Pr-=ii=(Jr*la-jr*xa)/an}while(k(wn)+k(ii)>i*i&&--zt>0);if(zt){var Si=D(Wt*Wt+Pr*Pr),oi=2*l(Si*.5),Ji=v(oi);return[e(Wt*Ji,Si*t(oi)),Si?I(Pr*Ji/Si):0]}},mt}var Lh=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ju=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ss=[[.9245,0],[0,0],[.01943,0]],ah=[[.721316,0],[0,0],[-.00881625,-.00617325]];function wc(){return Ou(Lh,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function pc(){return Ou(rh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Nf(){return Ou(Ju,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Bu(){return Ou(ss,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tc(){return Ou(ah,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ou($e,nt){var mt=b.geoProjection(bc($e)).rotate(nt).clipAngle(90),xt=b.geoRotation(nt),Bt=mt.center;return delete mt.rotate,mt.center=function(zt){return arguments.length?Bt(xt(zt)):xt.invert(Bt())},mt}var Gc=D(6),pf=D(7);function $l($e,nt){var mt=I(7*v(nt)/(3*Gc));return[Gc*$e*(2*t(2*mt/3)-1)/pf,9*v(mt/3)/pf]}$l.invert=function($e,nt){var mt=3*I(nt*pf/9);return[$e*pf/(Gc*(2*t(2*mt/3)-1)),I(v(mt)*3*Gc/7)]};function jf(){return b.geoProjection($l).scale(164.859)}function Hc($e,nt){for(var mt=(1+_)*v(nt),xt=nt,Bt=0,zt;Bt<25&&(xt-=zt=(v(xt/2)+v(xt)-mt)/(.5*t(xt/2)+t(xt)),!(k(zt)w&&--xt>0);return zt=mt*mt,Wt=zt*zt,Pr=zt*Wt,[$e/(.84719-.13063*zt+Pr*Pr*(-.04515+.05494*zt-.02326*Wt+.00331*Pr)),mt]};function Uf(){return b.geoProjection(Nu).scale(175.295)}function al($e,nt){return[$e*(1+t(nt))/2,2*(nt-g(nt/2))]}al.invert=function($e,nt){for(var mt=nt/2,xt=0,Bt=1/0;xt<10&&k(Bt)>i;++xt){var zt=t(nt/2);nt-=Bt=(nt-g(nt/2)-mt)/(1-.5/(zt*zt))}return[2*$e/(1+t(nt)),nt]};function Xc(){return b.geoProjection(al).scale(152.63)}var ju=[[[[-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 Ac(){return Ss(he(1/0),ju).rotate([20,0]).scale(152.63)}function Zc($e,nt){var mt=v(nt),xt=t(nt),Bt=h($e);if($e===0||k(nt)===M)return[0,nt];if(nt===0)return[$e,0];if(k($e)===M)return[$e*xt,M*mt];var zt=S/(2*$e)-2*$e/S,Wt=2*nt/S,Pr=(1-Wt*Wt)/(mt-Wt),Br=zt*zt,kr=Pr*Pr,jr=1+Br/kr,Jr=1+kr/Br,la=(zt*mt/Pr-zt/2)/jr,xa=(kr*mt/Br+Pr/2)/Jr,Ba=la*la+xt*xt/jr,an=xa*xa-(kr*mt*mt/Br+Pr*mt-1)/Jr;return[M*(la+D(Ba)*Bt),M*(xa+D(an<0?0:an)*h(-nt*zt)*Bt)]}Zc.invert=function($e,nt){$e/=M,nt/=M;var mt=$e*$e,xt=nt*nt,Bt=mt+xt,zt=S*S;return[$e?(Bt-1+D((1-Bt)*(1-Bt)+4*mt))/(2*$e)*M:0,Me(function(Wt){return Bt*(S*v(Wt)-2*Wt)*S+4*Wt*Wt*(nt-v(Wt))+2*S*Wt-zt*nt},0)]};function ec(){return b.geoProjection(Zc).scale(127.267)}var cu=1.0148,tc=.23185,vf=-.14499,Tu=.02406,nh=cu,vl=5*tc,ml=7*vf,rc=9*Tu,yl=1.790857183;function qf($e,nt){var mt=nt*nt;return[$e,nt*(cu+mt*mt*(tc+mt*(vf+Tu*mt)))]}qf.invert=function($e,nt){nt>yl?nt=yl:nt<-yl&&(nt=-yl);var mt=nt,xt;do{var Bt=mt*mt;mt-=xt=(mt*(cu+Bt*Bt*(tc+Bt*(vf+Tu*Bt)))-nt)/(nh+Bt*Bt*(vl+Bt*(ml+rc*Bt)))}while(k(xt)>i);return[$e,mt]};function ac(){return b.geoProjection(qf).scale(139.319)}function Mc($e,nt){if(k(nt)i&&--Bt>0);return Wt=g(xt),[(k(nt)=0;)if(xt=nt[Pr],mt[0]===xt[0]&&mt[1]===xt[1]){if(zt)return[zt,mt];zt=mt}}}function gf($e){for(var nt=$e.length,mt=[],xt=$e[nt-1],Bt=0;Bt0?[-xt[0],0]:[180-xt[0],180])};var nt=hu.map(function(mt){return{face:mt,project:$e(mt)}});return[-1,0,0,1,0,1,4,5].forEach(function(mt,xt){var Bt=nt[mt];Bt&&(Bt.children||(Bt.children=[])).push(nt[xt])}),Au(nt[0],function(mt,xt){return nt[mt<-S/2?xt<0?6:4:mt<0?xt<0?2:0:mtxt^xa>xt&&mt<(la-kr)*(xt-jr)/(xa-jr)+kr&&(Bt=!Bt)}return Bt}function Vf($e,nt){var mt=nt.stream,xt;if(!mt)throw new Error("invalid projection");switch($e&&$e.type){case"Feature":xt=Gf;break;case"FeatureCollection":xt=xf;break;default:xt=Hf;break}return xt($e,mt)}function xf($e,nt){return{type:"FeatureCollection",features:$e.features.map(function(mt){return Gf(mt,nt)})}}function Gf($e,nt){return{type:"Feature",id:$e.id,properties:$e.properties,geometry:Hf($e.geometry,nt)}}function bh($e,nt){return{type:"GeometryCollection",geometries:$e.geometries.map(function(mt){return Hf(mt,nt)})}}function Hf($e,nt){if(!$e)return null;if($e.type==="GeometryCollection")return bh($e,nt);var mt;switch($e.type){case"Point":mt=kc;break;case"MultiPoint":mt=kc;break;case"LineString":mt=Cc;break;case"MultiLineString":mt=Cc;break;case"Polygon":mt=Lc;break;case"MultiPolygon":mt=Lc;break;case"Sphere":mt=Lc;break;default:return null}return b.geoStream($e,nt(mt)),mt.result()}var il=[],kl=[],kc={point:function($e,nt){il.push([$e,nt])},result:function(){var $e=il.length?il.length<2?{type:"Point",coordinates:il[0]}:{type:"MultiPoint",coordinates:il}:null;return il=[],$e}},Cc={lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){il.length&&(kl.push(il),il=[])},result:function(){var $e=kl.length?kl.length<2?{type:"LineString",coordinates:kl[0]}:{type:"MultiLineString",coordinates:kl}:null;return kl=[],$e}},Lc={polygonStart:xo,lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){var $e=il.length;if($e){do il.push(il[0].slice());while(++$e<4);kl.push(il),il=[]}},polygonEnd:xo,result:function(){if(!kl.length)return null;var $e=[],nt=[];return kl.forEach(function(mt){Ec(mt)?$e.push([mt]):nt.push(mt)}),nt.forEach(function(mt){var xt=mt[0];$e.some(function(Bt){if(xh(Bt[0],xt))return Bt.push(mt),!0})||$e.push([mt])}),kl=[],$e.length?$e.length>1?{type:"MultiPolygon",coordinates:$e}:{type:"Polygon",coordinates:$e[0]}:null}};function vc($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=k(xt)0?xt-S:xt+S,Bt),Pr=(Wt[0]-Wt[1])*_,Br=(Wt[0]+Wt[1])*_;if(zt)return[Pr,Br];var kr=nt*_,jr=Pr>0^Br>0?-1:1;return[jr*Pr-h(Br)*kr,jr*Br-h(Pr)*kr]}return $e.invert&&(mt.invert=function(xt,Bt){var zt=(xt+Bt)*_,Wt=(Bt-xt)*_,Pr=k(zt)<.5*nt&&k(Wt)<.5*nt;if(!Pr){var Br=nt*_,kr=zt>0^Wt>0?-1:1,jr=-kr*xt+(Wt>0?1:-1)*Br,Jr=-kr*Bt+(zt>0?1:-1)*Br;zt=(-jr-Jr)*_,Wt=(jr-Jr)*_}var la=$e.invert(zt,Wt);return Pr||(la[0]+=zt>0?S:-S),la}),b.geoProjection(mt).rotate([-90,-90,45]).clipAngle(180-.001)}function Ft(){return vc(Lr).scale(176.423)}function tr(){return vc(Ri).scale(111.48)}function Fr($e,nt){if(!(0<=(nt=+nt)&&nt<=20))throw new Error("invalid digits");function mt(kr){var jr=kr.length,Jr=2,la=new Array(jr);for(la[0]=+kr[0].toFixed(nt),la[1]=+kr[1].toFixed(nt);Jr2||xa[0]!=jr[0]||xa[1]!=jr[1])&&(Jr.push(xa),jr=xa)}return Jr.length===1&&kr.length>1&&Jr.push(mt(kr[kr.length-1])),Jr}function zt(kr){return kr.map(Bt)}function Wt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Wt)};break;case"Point":jr={type:"Point",coordinates:mt(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:xt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:zt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(zt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function Pr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Wt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if($e!=null)switch($e.type){case"Feature":return Pr($e);case"FeatureCollection":{var Br={type:"FeatureCollection",features:$e.features.map(Pr)};return $e.bbox!=null&&(Br.bbox=$e.bbox),Br}default:return Wt($e)}return $e}function wr($e){var nt=v($e);function mt(xt,Bt){var zt=nt?g(xt*nt/2)/nt:xt/2;if(!Bt)return[2*zt,-$e];var Wt=2*l(zt*v(Bt)),Pr=1/g(Bt);return[v(Wt)*Pr,Bt+(1-t(Wt))*Pr-$e]}return mt.invert=function(xt,Bt){if(k(Bt+=$e)i&&--Pr>0);var la=xt*(kr=g(Wt)),xa=g(k(Bt)0?M:-M)*(Br+Bt*(jr-Wt)/2+Bt*Bt*(jr-2*Br+Wt)/2)]}Ia.invert=function($e,nt){var mt=nt/M,xt=mt*90,Bt=s(18,k(xt/5)),zt=o(0,r(Bt));do{var Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],kr=Br-Wt,jr=Br-2*Pr+Wt,Jr=2*(k(mt)-Pr)/kr,la=jr/kr,xa=Jr*(1-la*Jr*(1-2*la*Jr));if(xa>=0||zt===1){xt=(nt>=0?5:-5)*(xa+Bt);var Ba=50,an;do Bt=s(18,k(xt)/5),zt=r(Bt),xa=Bt-zt,Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],xt-=(an=(nt>=0?M:-M)*(Pr+xa*(Br-Wt)/2+xa*xa*(Br-2*Pr+Wt)/2)-nt)*A;while(k(an)>w&&--Ba>0);break}}while(--zt>=0);var wn=ba[zt][0],ii=ba[zt+1][0],Si=ba[s(19,zt+2)][0];return[$e/(ii+xa*(Si-wn)/2+xa*xa*(Si-2*ii+wn)/2),xt*x]};function Na(){return b.geoProjection(Ia).scale(152.63)}function Za($e){function nt(mt,xt){var Bt=t(xt),zt=($e-1)/($e-Bt*t(mt));return[zt*Bt*v(mt),zt*v(xt)]}return nt.invert=function(mt,xt){var Bt=mt*mt+xt*xt,zt=D(Bt),Wt=($e-D(1-Bt*($e+1)/($e-1)))/(($e-1)/zt+zt/($e-1));return[e(mt*Wt,zt*D(1-Wt*Wt)),zt?I(xt*Wt/zt):0]},nt}function mn($e,nt){var mt=Za($e);if(!nt)return mt;var xt=t(nt),Bt=v(nt);function zt(Wt,Pr){var Br=mt(Wt,Pr),kr=Br[1],jr=kr*Bt/($e-1)+xt;return[Br[0]*xt/jr,kr/jr]}return zt.invert=function(Wt,Pr){var Br=($e-1)/($e-1-Pr*Bt);return mt.invert(Br*Wt,Br*Pr*xt)},zt}function Da(){var $e=2,nt=0,mt=b.geoProjectionMutator(mn),xt=mt($e,nt);return xt.distance=function(Bt){return arguments.length?mt($e=+Bt,nt):$e},xt.tilt=function(Bt){return arguments.length?mt($e,nt=Bt*x):nt*A},xt.scale(432.147).clipAngle(O(1/$e)*A-1e-6)}var Ha=1e-4,$a=1e4,vn=-180,Sn=vn+Ha,yi=180,_i=yi-Ha,ki=-90,ri=ki+Ha,En=90,Ln=En-Ha;function Ni($e){return $e.length>0}function Zi($e){return Math.floor($e*$a)/$a}function Co($e){return $e===ki||$e===En?[0,$e]:[vn,Zi($e)]}function Do($e){var nt=$e[0],mt=$e[1],xt=!1;return nt<=Sn?(nt=vn,xt=!0):nt>=_i&&(nt=yi,xt=!0),mt<=ri?(mt=ki,xt=!0):mt>=Ln&&(mt=En,xt=!0),xt?[nt,mt]:$e}function Fo($e){return $e.map(Do)}function Yo($e,nt,mt){for(var xt=0,Bt=$e.length;xt=_i||jr<=ri||jr>=Ln){zt[Wt]=Do(Br);for(var Jr=Wt+1;JrSn&&xa<_i&&Ba>ri&&Ba=Pr)break;mt.push({index:-1,polygon:nt,ring:zt=zt.slice(Jr-1)}),zt[0]=Co(zt[0][1]),Wt=-1,Pr=zt.length}}}}function bo($e){var nt,mt=$e.length,xt={},Bt={},zt,Wt,Pr,Br,kr;for(nt=0;nt0?S-Pr:Pr)*A],kr=b.geoProjection($e(Wt)).rotate(Br),jr=b.geoRotation(Br),Jr=kr.center;return delete kr.rotate,kr.center=function(la){return arguments.length?Jr(jr(la)):jr.invert(Jr())},kr.clipAngle(90)}function js($e){var nt=t($e);function mt(xt,Bt){var zt=b.geoGnomonicRaw(xt,Bt);return zt[0]*=nt,zt}return mt.invert=function(xt,Bt){return b.geoGnomonicRaw.invert(xt/nt,Bt)},mt}function Cl(){return zl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zl($e,nt){return gs(js,$e,nt)}function Kl($e){if(!($e*=2))return b.geoAzimuthalEquidistantRaw;var nt=-$e/2,mt=-nt,xt=$e*$e,Bt=g(mt),zt=.5/v(mt);function Wt(Pr,Br){var kr=O(t(Br)*t(Pr-nt)),jr=O(t(Br)*t(Pr-mt)),Jr=Br<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*$e),Jr*D(4*xt*jr-(xt-kr+jr)*(xt-kr+jr))/(2*$e)]}return Wt.invert=function(Pr,Br){var kr=Br*Br,jr=t(D(kr+(la=Pr+nt)*la)),Jr=t(D(kr+(la=Pr+mt)*la)),la,xa;return[e(xa=jr-Jr,la=(jr+Jr)*Bt),(Br<0?-1:1)*O(D(la*la+xa*xa)*zt)]},Wt}function Gu(){return xl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function xl($e,nt){return gs(Kl,$e,nt)}function Hu($e,nt){if(k(nt)i&&--Pr>0);return[h($e)*(D(Bt*Bt+4)+Bt)*S/4,M*Wt]};function Ql(){return b.geoProjection(Jl).scale(127.16)}function Eu($e,nt,mt,xt,Bt){function zt(Wt,Pr){var Br=mt*v(xt*Pr),kr=D(1-Br*Br),jr=D(2/(1+kr*t(Wt*=Bt)));return[$e*kr*jr*v(Wt),nt*Br*jr]}return zt.invert=function(Wt,Pr){var Br=Wt/$e,kr=Pr/nt,jr=D(Br*Br+kr*kr),Jr=2*I(jr/2);return[e(Wt*g(Jr),$e*jr)/Bt,jr&&I(Pr*v(Jr)/(nt*mt*jr))/xt]},zt}function bf($e,nt,mt,xt){var Bt=S/3;$e=o($e,i),nt=o(nt,i),$e=s($e,M),nt=s(nt,S-i),mt=o(mt,0),mt=s(mt,100-i),xt=o(xt,i);var zt=mt/100+1,Wt=xt/100,Pr=O(zt*t(Bt))/Bt,Br=v($e)/v(Pr*M),kr=nt/S,jr=D(Wt*v($e/2)/v(nt/2)),Jr=jr/D(kr*Br*Pr),la=1/(jr*D(kr*Br*Pr));return Eu(Jr,la,Br,Pr,kr)}function lh(){var $e=65*x,nt=60*x,mt=20,xt=200,Bt=b.geoProjectionMutator(bf),zt=Bt($e,nt,mt,xt);return zt.poleline=function(Wt){return arguments.length?Bt($e=+Wt*x,nt,mt,xt):$e*A},zt.parallels=function(Wt){return arguments.length?Bt($e,nt=+Wt*x,mt,xt):nt*A},zt.inflation=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt,xt):mt},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(163.775)}function Pc(){return lh().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ks=4*S+3*D(3),Bl=2*D(2*S*D(3)/Ks),Wu=ke(Bl*D(3)/S,Bl,Ks/6);function wf(){return b.geoProjection(Wu).scale(176.84)}function Qc($e,nt){return[$e*D(1-3*nt*nt/(S*S)),nt]}Qc.invert=function($e,nt){return[$e/D(1-3*nt*nt/(S*S)),nt]};function ku(){return b.geoProjection(Qc).scale(152.63)}function Ol($e,nt){var mt=t(nt),xt=t($e)*mt,Bt=1-xt,zt=t($e=e(v($e)*mt,-v(nt))),Wt=v($e);return mt=D(1-xt*xt),[Wt*mt-zt*Bt,-zt*mt-Wt*Bt]}Ol.invert=function($e,nt){var mt=($e*$e+nt*nt)/-2,xt=D(-mt*(2+mt)),Bt=nt*mt+$e*xt,zt=$e*mt-nt*xt,Wt=D(zt*zt+Bt*Bt);return[e(xt*Bt,Wt*(1+mt)),Wt?-I(xt*zt/Wt):0]};function Nl(){return b.geoProjection(Ol).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fi($e,nt){var mt=re($e,nt);return[(mt[0]+$e/M)/2,(mt[1]+nt)/2]}fi.invert=function($e,nt){var mt=$e,xt=nt,Bt=25;do{var zt=t(xt),Wt=v(xt),Pr=v(2*xt),Br=Wt*Wt,kr=zt*zt,jr=v(mt),Jr=t(mt/2),la=v(mt/2),xa=la*la,Ba=1-kr*Jr*Jr,an=Ba?O(zt*Jr)*D(wn=1/Ba):wn=0,wn,ii=.5*(2*an*zt*la+mt/M)-$e,Si=.5*(an*Wt+xt)-nt,oi=.5*wn*(kr*xa+an*zt*Jr*Br)+.5/M,Ji=wn*(jr*Pr/4-an*Wt*la),Qi=.125*wn*(Pr*la-an*Wt*kr*jr),Oo=.5*wn*(Br*Jr+an*xa*zt)+.5,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]};function eu(){return b.geoProjection(fi).scale(158.837)}p.geoNaturalEarth=b.geoNaturalEarth1,p.geoNaturalEarthRaw=b.geoNaturalEarth1Raw,p.geoAiry=Q,p.geoAiryRaw=$,p.geoAitoff=ne,p.geoAitoffRaw=re,p.geoArmadillo=G,p.geoArmadilloRaw=se,p.geoAugust=K,p.geoAugustRaw=X,p.geoBaker=Z,p.geoBakerRaw=q,p.geoBerghaus=ae,p.geoBerghausRaw=ee,p.geoBertin1953=Ve,p.geoBertin1953Raw=Ie,p.geoBoggs=Be,p.geoBoggsRaw=Ae,p.geoBonne=Tt,p.geoBonneRaw=gt,p.geoBottomley=$t,p.geoBottomleyRaw=At,p.geoBromley=_r,p.geoBromleyRaw=rr,p.geoChamberlin=Ne,p.geoChamberlinRaw=vt,p.geoChamberlinAfrica=De,p.geoCollignon=Ke,p.geoCollignonRaw=We,p.geoCraig=et,p.geoCraigRaw=Je,p.geoCraster=Pt,p.geoCrasterRaw=pt,p.geoCylindricalEqualArea=qt,p.geoCylindricalEqualAreaRaw=Ct,p.geoCylindricalStereographic=Ht,p.geoCylindricalStereographicRaw=Vt,p.geoEckert1=Kr,p.geoEckert1Raw=Sr,p.geoEckert2=Rt,p.geoEckert2Raw=Yt,p.geoEckert3=ur,p.geoEckert3Raw=nr,p.geoEckert4=Rr,p.geoEckert4Raw=cr,p.geoEckert5=Zr,p.geoEckert5Raw=Qr,p.geoEckert6=Pa,p.geoEckert6Raw=ha,p.geoEisenlohr=Xa,p.geoEisenlohrRaw=un,p.geoFahey=yn,p.geoFaheyRaw=Nn,p.geoFoucaut=li,p.geoFoucautRaw=Un,p.geoFoucautSinusoidal=on,p.geoFoucautSinusoidalRaw=Yn,p.geoGilbert=Yi,p.geoGingery=rt,p.geoGingeryRaw=Ja,p.geoGinzburg4=Tr,p.geoGinzburg4Raw=lr,p.geoGinzburg5=Dr,p.geoGinzburg5Raw=Ir,p.geoGinzburg6=kt,p.geoGinzburg6Raw=ot,p.geoGinzburg8=ar,p.geoGinzburg8Raw=jt,p.geoGinzburg9=xr,p.geoGinzburg9Raw=Er,p.geoGringorten=wa,p.geoGringortenRaw=Lr,p.geoGuyou=Di,p.geoGuyouRaw=Ri,p.geoHammer=we,p.geoHammerRaw=he,p.geoHammerRetroazimuthal=jn,p.geoHammerRetroazimuthalRaw=fn,p.geoHealpix=Hi,p.geoHealpixRaw=qi,p.geoHill=Ro,p.geoHillRaw=Mi,p.geoHomolosine=Wo,p.geoHomolosineRaw=jo,p.geoHufnagel=wo,p.geoHufnagelRaw=to,p.geoHyperelliptical=Xi,p.geoHyperellipticalRaw=Io,p.geoInterrupt=Ss,p.geoInterruptedBoggs=Vs,p.geoInterruptedHomolosine=Bo,p.geoInterruptedMollweide=Pi,p.geoInterruptedMollweideHemispheres=bs,p.geoInterruptedSinuMollweide=hl,p.geoInterruptedSinusoidal=dl,p.geoKavrayskiy7=lu,p.geoKavrayskiy7Raw=wu,p.geoLagrange=Fl,p.geoLagrangeRaw=xc,p.geoLarrivee=uu,p.geoLarriveeRaw=$u,p.geoLaskowski=vs,p.geoLaskowskiRaw=tl,p.geoLittrow=ms,p.geoLittrowRaw=os,p.geoLoximuthal=Fu,p.geoLoximuthalRaw=rl,p.geoMiller=Ku,p.geoMillerRaw=zu,p.geoModifiedStereographic=Ou,p.geoModifiedStereographicRaw=bc,p.geoModifiedStereographicAlaska=wc,p.geoModifiedStereographicGs48=pc,p.geoModifiedStereographicGs50=Nf,p.geoModifiedStereographicMiller=Bu,p.geoModifiedStereographicLee=Tc,p.geoMollweide=ce,p.geoMollweideRaw=_e,p.geoMtFlatPolarParabolic=jf,p.geoMtFlatPolarParabolicRaw=$l,p.geoMtFlatPolarQuartic=Wc,p.geoMtFlatPolarQuarticRaw=Hc,p.geoMtFlatPolarSinusoidal=Yc,p.geoMtFlatPolarSinusoidalRaw=Qu,p.geoNaturalEarth2=Uf,p.geoNaturalEarth2Raw=Nu,p.geoNellHammer=Xc,p.geoNellHammerRaw=al,p.geoInterruptedQuarticAuthalic=Ac,p.geoNicolosi=ec,p.geoNicolosiRaw=Zc,p.geoPatterson=ac,p.geoPattersonRaw=qf,p.geoPolyconic=mf,p.geoPolyconicRaw=Mc,p.geoPolyhedral=Au,p.geoPolyhedralButterfly=Uu,p.geoPolyhedralCollignon=yf,p.geoPolyhedralWaterman=_f,p.geoProject=Vf,p.geoGringortenQuincuncial=Ft,p.geoPeirceQuincuncial=tr,p.geoPierceQuincuncial=tr,p.geoQuantize=Fr,p.geoQuincuncial=vc,p.geoRectangularPolyconic=ea,p.geoRectangularPolyconicRaw=wr,p.geoRobinson=Na,p.geoRobinsonRaw=Ia,p.geoSatellite=Da,p.geoSatelliteRaw=mn,p.geoSinuMollweide=ds,p.geoSinuMollweideRaw=Ao,p.geoSinusoidal=yt,p.geoSinusoidalRaw=Ye,p.geoStitch=ns,p.geoTimes=zo,p.geoTimesRaw=Kn,p.geoTwoPointAzimuthal=zl,p.geoTwoPointAzimuthalRaw=js,p.geoTwoPointAzimuthalUsa=Cl,p.geoTwoPointEquidistant=xl,p.geoTwoPointEquidistantRaw=Kl,p.geoTwoPointEquidistantUsa=Gu,p.geoVanDerGrinten=Su,p.geoVanDerGrintenRaw=Hu,p.geoVanDerGrinten2=Jc,p.geoVanDerGrinten2Raw=mc,p.geoVanDerGrinten3=du,p.geoVanDerGrinten3Raw=oc,p.geoVanDerGrinten4=Ql,p.geoVanDerGrinten4Raw=Jl,p.geoWagner=lh,p.geoWagner7=Pc,p.geoWagnerRaw=bf,p.geoWagner4=wf,p.geoWagner4Raw=Wu,p.geoWagner6=ku,p.geoWagner6Raw=Qc,p.geoWiechel=Nl,p.geoWiechelRaw=Ol,p.geoWinkel3=eu,p.geoWinkel3Raw=fi,Object.defineProperty(p,"__esModule",{value:!0})})}}),Sj=ze({"src/plots/geo/zoom.js"(J,V){"use strict";var p=ci(),b=Nr(),E=mi(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function n(A,x){var z=A.projection,I;return x._isScoped?I=o:x._isClipped?I=c:I=s,I(A,z)}V.exports=n;function r(A,x){return p.behavior.zoom().translate(x.translate()).scaleExtent(x.scaleExtent()).scale(x.scale())}function a(A,x,z){var I=A.id,O=A.graphDiv,D=O.layout,B=D[I],F=O._fullLayout,P=F[I],j={},U={};function $(Q,re){j[I+"."+Q]=b.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",D,F._preGUI,j);var ne=b.nestedProperty(P,Q);ne.get()!==re&&(ne.set(re),b.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z($),$("projection.scale",x.scale()/A.fitScale),$("fitbounds",!1),O.emit("plotly_relayout",U)}function o(A,x){var z=r(A,x);function I(){p.select(this).style(e)}function O(){x.scale(p.event.scale).translate(p.event.translate),A.render(!0);var F=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function D(F){var P=x.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){p.select(this).style(t),a(A,x,D)}return z.on("zoomstart",I).on("zoom",O).on("zoomend",B),z}function s(A,x){var z=r(A,x),I=2,O,D,B,F,P,j,U,$,Q;function re(H){return x.invert(H)}function ne(H){var Y=re(H);if(!Y)return!0;var q=x(Y);return Math.abs(q[0]-H[0])>I||Math.abs(q[1]-H[1])>I}function se(){p.select(this).style(e);let{x:H,y:Y,width:q,height:Z}=this.getBBox();O=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],D=x.rotate(),B=x.translate(),F=D,P=re(O)}function G(){let{x:H,y:Y,width:q,height:Z}=this.getBBox();if(j=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],ne(O)){z.scale(x.scale()),z.translate(x.translate());return}x.scale(p.event.scale),x.translate([B[0],p.event.translate[1]]),P?re(j)&&($=re(j),U=[F[0]+($[0]-P[0]),D[1],D[2]],x.rotate(U),F=U):(O=j,P=re(O)),Q=!0,A.render(!0);var ee=x.rotate(),ae=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-ee[0]})}function X(){p.select(this).style(t),Q&&a(A,x,K)}function K(H){var Y=x.rotate(),q=x.invert(A.midPt);H("projection.rotation.lon",-Y[0]),H("center.lon",q[0]),H("center.lat",q[1])}return z.on("zoomstart",se).on("zoom",G).on("zoomend",X),z}function c(A,x){var z={r:x.rotate(),k:x.scale()},I=r(A,x),O=u(I,"zoomstart","zoom","zoomend"),D=0,B=I.on,F;I.on("zoomstart",function(){p.select(this).style(e);let{x:Q,y:re,width:ne,height:se}=this.getBBox(),G=p.event.sourceEvent?p.mouse(this):[Q+ne/2,re+se/2],X=x.rotate(),K=X,H=x.translate(),Y=h(X);F=m(x,G),B.call(I,"zoom",function(){let{x:q,y:Z,width:ee,height:ae}=this.getBBox(),he=p.event.sourceEvent?p.mouse(this):[q+ee/2,Z+ae/2];if(x.scale(z.k=p.event.scale),!F)G=he,F=m(x,G);else if(m(x,he)){x.rotate(X).translate(H);var xe=m(x,he),we=g(F,xe),Me=C(v(Y,we)),Se=z.r=i(Me,F,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),x.rotate(Se),K=Se}j(O.of(this,arguments))}),P(O.of(this,arguments))}).on("zoomend",function(){p.select(this).style(t),B.call(I,"zoom",null),U(O.of(this,arguments)),a(A,x,$)}).on("zoom.redraw",function(){A.render(!0);var Q=x.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){D++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--D||Q({type:"zoomend"})}function $(Q){var re=x.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return p.rebind(I,O,"on")}function m(A,x){var z=A.invert(x);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function h(A){var x=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,O=Math.sin(x),D=Math.cos(x),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[D*F*j+O*B*P,O*F*j-D*B*P,D*B*j+O*F*P,D*F*P-O*B*j]}function v(A,x){var z=A[0],I=A[1],O=A[2],D=A[3],B=x[0],F=x[1],P=x[2],j=x[3];return[z*B-I*F-O*P-D*j,z*F+I*B+O*j-D*P,z*P-I*j+O*B+D*F,z*j+I*P-O*F+D*B]}function g(A,x){if(!(!A||!x)){var z=f(A,x),I=Math.sqrt(T(z,z)),O=.5*Math.acos(Math.max(-1,Math.min(1,T(A,x)))),D=Math.sin(O)/I;return I&&[Math.cos(O),z[2]*D,-z[1]*D,z[0]*D]}}function i(A,x,z){var I=M(x,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var O=x[0],D=x[1],B=x[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(D,O)*l,$=Math.sqrt(O*O+D*D),Q,re;Math.abs(P)>$?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/$)*l-U,Q=Math.sqrt($*$-P*P));var ne=180-re-2*U,se=(Math.atan2(j,F)-Math.atan2(B,Q))*l,G=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,X=w(z[0],z[1],re,se),K=w(z[0],z[1],ne,G);return X<=K?[re,se,z[2]]:[ne,G,z[2]]}function w(A,x,z,I){var O=S(z-A),D=S(I-x);return Math.sqrt(O*O+D*D)}function S(A){return(A%360+540)%360-180}function M(A,x,z){var I=z*k,O=A.slice(),D=x===0?1:0,B=x===2?1:2,F=Math.cos(I),P=Math.sin(I);return O[D]=A[D]*F-A[B]*P,O[B]=A[B]*F+A[D]*P,O}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var x=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(x),I*Math.sin(x),Math.sin(z)]}function T(A,x){for(var z=0,I=0,O=A.length;I0&&$._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(D,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,D,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ne=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ne.selectAll("path"),this._render()},x.updateProjection=function(D,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,$=P.projection,Q=P.lonaxis,re=P.lataxis,ne=Q._ax,se=re._ax,G=this.projection=z(P),X=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},H=$.rotation||{},Y=Q.range||[],q=re.range||[];if(P.fitbounds){ne._length=X[1][0]-X[0][0],se._length=X[1][1]-X[0][1],ne.range=h(F,ne),se.range=h(F,se);let ve=[];for(let $t of D){let rr=$t[0].trace;rr.visible===!0&&rr._module.fitCoords&&ve.push(rr._module.fitCoords($t,P))}let le=m(F,ne),Ae=le.min.reduce(($t,{val:rr})=>Math.min($t,rr),1/0),Xe=le.max.reduce(($t,{val:rr})=>Math.max($t,rr),-1/0)-Ae,Ye=_.boundsOfCoords(ve.flat()),[yt,,gt]=Ye||[],Tt=gt-yt;if(!!Ye&&(Xe>360||Xe<360&&TtMath.max(ht,$t(De)),0),Xt=le.max.reduce((ht,De)=>Math.max(ht,rr(De)),0),or=ne._length-_r-Xt,Ot=or>ne._length/10?Tt*ne._length/or:Tt,vt=(yt+gt)/2;ne.range=[vt-Ot/2,vt+Ot/2]}var Z=(ne.range[0]+ne.range[1])/2,ee=(se.range[0]+se.range[1])/2;if(P._isScoped)K={lon:Z,lat:ee};else if(P._isClipped){K={lon:Z,lat:ee},H={lon:Z,lat:ee,roll:H.roll};var ae=$.type,he=C.lonaxisSpan[ae]/2||180,xe=C.lataxisSpan[ae]/2||90;Y=[Z-he,Z+he],q=[ee-xe,ee+xe]}else K={lon:Z,lat:ee},H={lon:Z,lat:H.lat,roll:H.roll}}G.center([K.lon-H.lon,K.lat-H.lat]).rotate([-H.lon,-H.lat,H.roll]).parallels($.parallels);var we=O(Y,q);G.fitExtent(X,we);var Me=this.bounds=G.getBounds(we),Se=this.fitScale=G.scale(),Ie=G.translate();if(G.scaleExtent=()=>{var ve;let{minscale:le}=$,Ae=(ve=$.maxscale)!=null?ve:1/0;return[Se*Math.min(le,Ae),Se*Math.max(le,Ae)]},P.fitbounds){var Ve=G.getBounds(O(ne.range,se.range)),Ge=Math.min((Me[1][0]-Me[0][0])/(Ve[1][0]-Ve[0][0]),(Me[1][1]-Me[0][1])/(Ve[1][1]-Ve[0][1]));isFinite(Ge)?G.scale(Ge*Se):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else G.scale($.scale*Se);var ke=this.midPt=[(Me[0][0]+Me[1][0])/2,(Me[0][1]+Me[1][1])/2];if(G.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Me),P._isAlbersUsa){var _e=G([K.lon,K.lat]);if(_e){var ce=G.translate();G.translate([ce[0]-(_e[0]-ce[0]),ce[1]-(_e[1]-ce[1])])}}},x.updateBaseLayers=function(D,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function $(X){return X==="lonaxis"||X==="lataxis"}function Q(X){return!!C.lineLayers[X]}function re(X){return!!C.fillLayers[X]}var ne=this.hasChoropleth?C.layersForChoropleth:C.layers,se=ne.filter(function(X){return Q(X)||re(X)?B["show"+X]:$(X)?B[X].showgrid:!0}),G=F.framework.selectAll(".layer").data(se,String);G.exit().each(function(X){delete j[X],delete U[X],p.select(this).remove()}),G.enter().append("g").attr("class",function(X){return"layer "+X}).each(function(X){var K=j[X]=p.select(this);X==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):$(X)?U[X]=K.append("path").style("fill","none"):X==="backplot"?K.append("g").classed("choroplethlayer",!0):X==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(X)?U[X]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(X)&&(U[X]=K.append("path").style("stroke","none"))}),G.order(),G.each(function(X){var K=U[X],H=C.layerNameToAdjective[X];X==="frame"?K.datum(C.sphereSVG):Q(X)||re(X)?K.datum(u(P,P.objects[X])):$(X)&&K.datum(I(X,B,D)).call(r.stroke,B[X].gridcolor).call(a.dashLine,B[X].griddash,B[X].gridwidth),Q(X)?K.call(r.stroke,B[H+"color"]).call(a.dashLine,"",B[H+"width"]):re(X)&&K.call(r.fill,B[H+"color"])})},x.updateDims=function(D,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,$=F[1][0]-j+P,Q=F[1][1]-U+P;a.setRect(this.clipRect,j,U,$,Q),this.bgRect.call(a.setRect,j,U,$,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=$,this.yaxis._offset=U,this.yaxis._length=Q},x.updateFx=function(D,B){var F=this,P=F.graphDiv,j=F.bgRect,U=D.dragmode,$=D.clickmode;if(F.isStatic)return;function Q(){var G=F.viewInitial,X={};for(var K in G)X[F.id+"."+K]=G[K];e.call("_guiRelayout",P,X),P.emit("plotly_doubleclick",null)}function re(G){return F.projection.invert([G[0]+F.xaxis._offset,G[1]+F.yaxis._offset])}var ne=function(G,X){if(X.isRect){var K=G.range={};K[F.id]=[re([X.xmin,X.ymin]),re([X.xmax,X.ymax])]}else{var H=G.lassoPoints={};H[F.id]=X.map(re)}},se={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ne},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(G){G===2&&w(P)}};if(U==="pan"){j.node().onmousedown=null;let G=M(F,B);if(j.call(G),!p.event){let X=F.projection.scale(),[K,H]=F.projection.scaleExtent();(XH)&&G.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),se.prepFn=function(G,X,K){i(G,X,K,se,U)},g.init(se));j.on("mousemove",function(){var G=F.projection.invert(t.getPositionFromD3Event());if(!G)return g.unhover(P,p.event);F.xaxis.p2c=function(){return G[0]},F.yaxis.p2c=function(){return G[1]},o.hover(P,p.event,F.id)}),j.on("mouseout",function(){P._dragging||g.unhover(P,p.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&($.indexOf("select")>-1&&S(p.event,P,[F.xaxis],[F.yaxis],F.id,se),$.indexOf("event")>-1&&o.click(P,p.event))})},x.makeFramework=function(){var D=this,B=D.graphDiv,F=B._fullLayout,P="clip"+F._uid+D.id;D.clipDef=F._clips.append("clipPath").attr("id",P),D.clipRect=D.clipDef.append("rect"),D.framework=p.select(D.container).append("g").attr("class","geo "+D.id).call(a.setClipUrl,P,B),D.project=function(j){var U=D.projection(j);return U?[U[0]-D.xaxis._offset,U[1]-D.yaxis._offset]:[null,null]},D.xaxis={_id:"x",c2p:function(j){return D.project(j)[0]}},D.yaxis={_id:"y",c2p:function(j){return D.project(j)[1]}},D.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(D.mockAxis,F)},x.saveViewInitial=function(D){var B=D.center||{},F=D.projection,P=F.rotation||{};this.viewInitial={fitbounds:D.fitbounds,"projection.scale":F.scale};var j;D._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:D._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},x.render=function(D){this._hasMarkerAngles&&D?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},x._render=function(){var D=this.projection,B=D.getPath(),F;function P(U){var $=D(U.lonlat);return $?n($[0],$[1]):null}function j(U){return D.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(D){var B=D.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=b[P]||l[P],U=j(),$=D._isSatellite?Math.acos(1/B.distance)*180/Math.PI:D._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(G){return G?U:[]},ne=0;neH}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(G){return U.getPath().bounds(G)},U.precision(C.precision),D._isSatellite&&U.tilt(B.tilt).distance(B.distance),$&&U.clipAngle($-C.clipPad),U}function I(D,B,F){var P=1e-6,j=2.5,U=B[D],$=C.scopeDefaults[B.scope],Q,re,ne;D==="lonaxis"?(Q=$.lonaxisRange,re=$.lataxisRange,ne=function(ee,ae){return[ee,ae]}):D==="lataxis"&&(Q=$.lataxisRange,re=$.lonaxisRange,ne=function(ee,ae){return[ae,ee]});var se={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(se,F);var G=c.calcTicks(se);!B.isScoped&&D==="lonaxis"&&G.pop();for(var X=G.length,K=new Array(X),H=0;Hhe[xe]!=null)||l.fitboundsIncompatible.has(i)?a.fitbounds=!1:ee.forEach(({dst:he,key:xe})=>he&&(he[xe]=null))}}}}),RA=ze({"src/plots/geo/index.js"(J,V){"use strict";var p=zf().getSubplotCalcData,b=Nr().counterRegex,E=Ej(),k="geo",l=b(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(a){for(var o=a._fullLayout,s=a.calcdata,c=o._subplots[k],m=0;m")}}}}),FA=ze({"src/traces/choropleth/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.location=E.location,b.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b.ct=t.ct,b}}}),zA=ze({"src/traces/choropleth/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r,a,o,s;if(E===!1)for(n=0;n=Math.min(U,$)&&g<=Math.max(U,$)?0:1/0}if(I=Math.min(Q,re)&&i<=Math.max(Q,re)?0:1/0}B=Math.sqrt(I*I+O*O),u=S[z]}}}else for(z=S.length-1;z>-1;z--)f=S[z],A=h[f],x=v[f],I=c.c2p(A)-g,O=m.c2p(x)-i,D=Math.sqrt(I*I+O*O),D100},J.isDotSymbol=function(p){return typeof p=="string"?V.DOT_RE.test(p):p>200}}}),Dj=ze({"src/traces/scattergl/defaults.js"(J,V){"use strict";var p=Nr(),b=mi(),E=D2(),k=ty(),l=zd(),e=el(),t=Gv(),n=yd(),r=id(),a=_d(),o=Od(),s=xd();V.exports=function(m,h,v,g){function i(u,A){return p.coerce(m,h,k,u,A)}var w=m.marker?E.isOpenSymbol(m.marker.symbol):!1,S=e.isBubble(m),M=t(m,h,g,i);if(!M){h.visible=!1;return}n(m,h,g,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>=0?(s=c,o=c-1):a=c+1}return s}function b(t,n,r,a,o){for(var s=o+1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>0?(s=c,o=c-1):a=c+1}return s}function E(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<0?(s=c,a=c+1):o=c-1}return s}function k(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<=0?(s=c,a=c+1):o=c-1}return s}function l(t,n,r,a,o){for(;a<=o;){var s=a+o>>>1,c=t[s],m=r!==void 0?r(c,n):c-n;if(m===0)return s;m<=0?a=s+1:o=s-1}return-1}function e(t,n,r,a,o,s){return typeof r=="function"?s(t,n,r,a===void 0?0:a|0,o===void 0?t.length-1:o|0):s(t,n,void 0,r===void 0?0:r|0,a===void 0?t.length-1:a|0)}V.exports={ge:function(t,n,r,a,o){return e(t,n,r,a,o,p)},gt:function(t,n,r,a,o){return e(t,n,r,a,o,b)},lt:function(t,n,r,a,o){return e(t,n,r,a,o,E)},le:function(t,n,r,a,o){return e(t,n,r,a,o,k)},eq:function(t,n,r,a,o){return e(t,n,r,a,o,l)}}}}),BA=ze({"node_modules/clamp/index.js"(J,V){V.exports=p;function p(b,E,k){return Ek?k:b:bE?E:b}}}),qd=ze({"node_modules/pick-by-alias/index.js"(J,V){"use strict";V.exports=function(k,l,e){var t={},n,r;if(typeof l=="string"&&(l=b(l)),Array.isArray(l)){var a={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=p(E,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),c0=ze({"node_modules/array-bounds/index.js"(J,V){"use strict";V.exports=p;function p(b,E){if(!b||b.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=b[n]),b[n]>>1,S;h.dtype||(h.dtype="array"),typeof h.dtype=="string"?S=new(r(h.dtype))(w):h.dtype&&(S=h.dtype,Array.isArray(S)&&(S.length=w));for(let I=0;Iv||P>o){for(let Y=0;Yae||$>he||Q=ne||Z===ee)return;let xe=M[q];ee===void 0&&(ee=xe.length);for(let ce=Z;ce=B&&le<=P&&Ae>=F&&Ae<=j&&se.push(ve)}let we=C[q],Me=we[Z*4+0],Se=we[Z*4+1],Ie=we[Z*4+2],Ve=we[Z*4+3],Ge=X(we,Z+1),ke=Y*.5,_e=q+1;G(K,H,ke,_e,Me,Se||Ie||Ve||Ge),G(K,H+ke,ke,_e,Se,Ie||Ve||Ge),G(K+ke,H,ke,_e,Ie,Ve||Ge),G(K+ke,H+ke,ke,_e,Ve,Ge)}function X(K,H){let Y=null,q=0;for(;Y===null;)if(Y=K[H*4+q],q++,q>K.length)return null;return Y}return se}function x(I,O,D,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(a.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(a.length==p[o])return a.unshift(r),t.push(a);if(a.length1&&(m=1),m<-1&&(m=-1),c*Math.acos(m)},e=function(r,a,o,s,c,m,h,v,g,i,w,S){var M=Math.pow(c,2),C=Math.pow(m,2),_=Math.pow(w,2),T=Math.pow(S,2),f=M*C-M*T-C*_;f<0&&(f=0),f/=M*T+C*_,f=Math.sqrt(f)*(h===v?-1:1);var u=f*c/m*S,A=f*-m/c*w,x=i*u-g*A+(r+o)/2,z=g*u+i*A+(a+s)/2,I=(w-u)/c,O=(S-A)/m,D=(-w-u)/c,B=(-S-A)/m,F=l(1,0,I,O),P=l(I,O,D,B);return v===0&&P>0&&(P-=b),v===1&&P<0&&(P+=b),[x,z,F,P]},t=function(r){var a=r.px,o=r.py,s=r.cx,c=r.cy,m=r.rx,h=r.ry,v=r.xAxisRotation,g=v===void 0?0:v,i=r.largeArcFlag,w=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(m===0||h===0)return[];var _=Math.sin(g*b/360),T=Math.cos(g*b/360),f=T*(a-s)/2+_*(o-c)/2,u=-_*(a-s)/2+T*(o-c)/2;if(f===0&&u===0)return[];m=Math.abs(m),h=Math.abs(h);var A=Math.pow(f,2)/Math.pow(m,2)+Math.pow(u,2)/Math.pow(h,2);A>1&&(m*=Math.sqrt(A),h*=Math.sqrt(A));var x=e(a,o,s,c,m,h,w,M,_,T,f,u),z=p(x,4),I=z[0],O=z[1],D=z[2],B=z[3],F=Math.abs(B)/(b/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(n=i[i.length-4],r=i[i.length-3]):(n=m,r=h),t.push(i)}return t}function E(l,e,t,n){return["C",l,e,t,n,t,n]}function k(l,e,t,n,r,a){return["C",l/3+2/3*t,e/3+2/3*n,r/3+2/3*t,a/3+2/3*n,r,a]}}}),OA=ze({"node_modules/is-svg-path/index.js"(J,V){"use strict";V.exports=function(b){return typeof b!="string"?!1:(b=b.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(b)&&/[\dz]$/i.test(b)&&b.length>4))}}}),Hj=ze({"node_modules/svg-path-bounds/index.js"(J,V){"use strict";var p=Uj(),b=qj(),E=Gj(),k=OA();V.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=p(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=b(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,r=e.length;nt[2]&&(t[2]=a[o+0]),a[o+1]>t[3]&&(t[3]=a[o+1]);return t}}}),Wj=ze({"node_modules/bitmap-sdf/index.js"(J,V){"use strict";V.exports=b;var p=1e20;function b(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,n=e.radius==null?8:e.radius,r=e.channel||0,a,o,s,c,m,h,v,g,i,w,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");a=e.width,o=e.height,c=l,e.stride?h=e.stride:h=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(g=l,v=g.getContext("2d"),a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(g=l.canvas,v=l,a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.ImageData&&l instanceof window.ImageData&&(i=l,a=l.width,o=l.height,c=i.data,h=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(a*o),w=0,S=Math.floor(m.length/h);wYj});function Yj(J,V={}){if(!(0,UA.default)(J))throw Error("Invalid SVG path");let p,b;V.shape||Array.isArray(V)?[p,b]=V.shape||V:(p=ry.width=V.width||V.w||200,b=ry.height=V.height||V.h||200);let E=Math.min(p,b),k=V.stroke||0,l=V.viewbox||V.viewBox||(0,jA.default)(J),e=[p/(l[2]-l[0]),b/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;Vh.fillStyle="black",Vh.fillRect(0,0,p,b),Vh.fillStyle="white",k&&(typeof k!="number"&&(k=1),Vh.strokeStyle=k>0?"white":"black",Vh.lineWidth=Math.abs(k)),Vh.translate(p*.5,b*.5),Vh.scale(t,t);let n=new Path2D(J);return Vh.fill(n),k&&Vh.stroke(n),Vh.setTransform(1,0,0,1,0,0),(0,qA.default)(Vh,{cutoff:V.cutoff!=null?V.cutoff:.5,radius:V.radius!=null?V.radius:E*.5})}var jA,UA,qA,ry,Vh,Xj=zi({"node_modules/svg-path-sdf/svg-path-sdf.js"(){jA=Yl(Hj()),UA=Yl(OA()),qA=Yl(Wj()),ry=document.createElement("canvas"),Vh=ry.getContext("2d",{willReadFrequently:!0})}}),h0=ze({"src/traces/scattergl/convert.js"(J,V){"use strict";var p=ao(),b=(Xj(),Po(NA)).default,{normalize:E}=Qn(),k=mi(),l=Nr(),e=l.isArrayOrTypedArray,t=$i(),n=Xl(),r=fp().formatColor,a=el(),o=l1(),s=D2(),c=bv(),m=np().DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=kh().appendArrayPointValue;function g(B,F){var P,j={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(F.visible!==!0)return j;if(a.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),a.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var $=F.marker.opacity;for(j.markerUnsel.opacity=new Array($.length),P=0;P<$.length;P++)j.markerUnsel.opacity[P]=m*$[P]}if(a.hasLines(F)){j.line={overlay:!0,thickness:F.line.width*U,color:F.line.color,opacity:F.opacity};var Q=(c.DASHES[F.line.dash]||[1]).slice();for(P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},$,Q=e(j.symbol),re=e(j.angle),ne=e(j.color),se=e(j.line.color),G=e(j.opacity),X=e(j.size),K=e(j.line.width),H;if(Q||(H=s.isOpenSymbol(j.symbol)),Q||ne||se||G||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var Y=j.symbol,q=j.angle,Z=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ae=ee;for(ee=Array(P),$=0;$c.TOO_MANY_POINTS||a.hasMarkers(F)?"rect":"round";if(se&&F.connectgaps){var X=$[0],K=$[1];for(Q=0;Q<$.length;Q+=2)isNaN($[Q])||isNaN($[Q+1])?($[Q]=X,$[Q+1]=K):(X=$[Q],K=$[Q+1])}return{join:G,positions:$}}function O(B,F,P,j,U){var $=k.getComponentMethod("errorbars","makeComputeError"),Q=n.getFromId(B,F.xaxis,"x"),re=n.getFromId(B,F.yaxis,"y"),ne=P.length/2,se={};function G(X,K){var H=K._id.charAt(0),Y=F["error_"+H];if(Y&&Y.visible&&(K.type==="linear"||K.type==="log")){for(var q=$(Y),Z={x:0,y:1}[H],ee={x:[0,1,2,3],y:[2,3,0,1]}[H],ae=new Float64Array(4*ne),he=1/0,xe=-1/0,we=0,Me=0;we1?ne[Q]:ne[0]:ne,H=e(se)?se.length>1?se[Q]:se[0]:se,Y=h[K],q=h[H],Z=G?G/.8+1:0,ee=-q*Z-q*.5;$.offset[Q]=[Y*Z/X,ee/X]}}return $}V.exports={style:g,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:O,textPosition:D}}}),VA=ze({"src/traces/scattergl/scene_update.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){p.extendFlat(l,t,e)},l.init(),l.update=function(r){var a=p.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(a),l.scatter2d&&l.scatter2d.update(a),l.line2d&&l.line2d.update(a),l.error2d&&l.error2d.update(a.concat(a)),l.select2d&&l.select2d.update(a),l.glText)for(var o=0;o=m,u=T*2,A={},x,z=M.makeCalcdata(w,"x"),I=C.makeCalcdata(w,"y"),O=l(w,M,"x",z),D=l(w,C,"y",I),B=O.vals,F=D.vals;w._x=B,w._y=F,w.xperiodalignment&&(w._origX=z,w._xStarts=O.starts,w._xEnds=O.ends),w.yperiodalignment&&(w._origY=I,w._yStarts=D.starts,w._yEnds=D.ends);var P=new Array(u),j=new Array(T);for(x=0;x1&&b.extendFlat(_.line,o.linePositions(g,w,S)),_.errorX||_.errorY){var T=o.errorBarPositions(g,w,S,M,C);_.errorX&&b.extendFlat(_.errorX,T.x),_.errorY&&b.extendFlat(_.errorY,T.y)}return _.text&&(b.extendFlat(_.text,{positions:S},o.textPosition(g,w,_.text,_.marker)),b.extendFlat(_.textSel,{positions:S},o.textPosition(g,w,_.text,_.markerSel)),b.extendFlat(_.textUnsel,{positions:S},o.textPosition(g,w,_.text,_.markerUnsel))),_}}}),GA=ze({"src/traces/scattergl/edit_style.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=np().DESELECTDIM;function k(l){var e=l[0],t=e.trace,n=e.t,r=n._scene,a=n.index,o=r.selectBatch[a],s=r.unselectBatch[a],c=r.textOptions[a],m=r.textSelectedOptions[a]||{},h=r.textUnselectedOptions[a]||{},v=p.extendFlat({},c),g,i;if(o.length||s.length){var w=m.color,S=h.color,M=c.color,C=p.isArrayOrTypedArray(M);for(v.color=new Array(t._length),g=0;g10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),n=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],n="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(n="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(n="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(n="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:n,values:e,alpha:t}}}}),Qj=ze({"node_modules/color-rgba/index.js"(J,V){"use strict";var p=Jj();V.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,n=p(k);if(!n.space)return[];var r=[0,0,0],a=n.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(n.values[0],r[0]),a[0]),l[1]=Math.min(Math.max(n.values[1],r[1]),a[1]),l[2]=Math.min(Math.max(n.values[2],r[2]),a[2]),n.space[0]==="h"&&(l=b(l)),l.push(Math.min(Math.max(n.alpha,0),1)),l};function b(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,n,r,a,o,s=0;if(l===0)return o=e*255,[o,o,o];for(n=e<.5?e*(1+l):e+l-e*l,t=2*e-n,a=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(n-t)*6*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[s++]=o*255;return a}}}),ay=ze({"node_modules/color-normalize/index.js"(J,V){"use strict";var p=Qj(),b=F2();V.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=b(e),n=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=p(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,r&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(r?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),n[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),n)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),eU=ze({"node_modules/color-id/index.js"(J,V){"use strict";var p=BA();V.exports=b,V.exports.to=b,V.exports.from=E;function b(k,l){l==null&&(l=!0);var e=k[0],t=k[1],n=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,n*=255,r*=255),e=p(e,0,255)&255,t=p(t,0,255)&255,n=p(n,0,255)&255,r=p(r,0,255)&255;var a=e*16777216+(t<<16)+(n<<8)+r;return a}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,n=(k&65280)>>>8,r=k&255;return l===!1?[e,t,n,r]:[e/255,t/255,n/255,r/255]}}}),tU=ze({"node_modules/glslify/browser.js"(J,V){V.exports=function(p){typeof p=="string"&&(p=[p]);for(var b=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,g.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:g},attributes:{x:(x,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(x,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(x,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(x,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(x,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(x,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(x,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(x,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(x,z)=>z.activation===!0?{constant:[1]}:z.activation?z.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"},u=Object.assign({},f);u.frag=l([`precision highp float; +`;for(ee=0,ae=q*G,he=F,we="",Z=0;Z0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var $=u(D,B,O,P,j,U);return z($,F,P)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(x){x.permitHostObjects___&&x.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var n=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new r,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,m=Object.defineProperty,h=Object.isExtensible,v="weakmap:",g=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),w=new Uint8Array(i);crypto.getRandomValues(w),g=v+"rand:"+Array.prototype.map.call(w,function(x){return(x%36).toString(36)}).join("")+"___"}function S(x){return!(x.substr(0,v.length)==v&&x.substr(x.length-3)==="___")}if(m(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(x){if(x!==Object(x))throw new TypeError("Not an object: "+x);var z=x[g];if(z&&z.key===x)return z;if(h(x)){z={key:x};try{return m(x,g,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var x=Object.freeze;m(Object,"freeze",{value:function(D){return C(D),x(D)}});var z=Object.seal;m(Object,"seal",{value:function(D){return C(D),z(D)}});var I=Object.preventExtensions;m(Object,"preventExtensions",{value:function(D){return C(D),I(D)}})})();function _(x){return x.prototype=null,Object.freeze(x)}var T=!1;function f(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||f();var x=[],z=[],I=u++;function O(P,j){var U,$=C(P);return $?I in $?$[I]:j:(U=x.indexOf(P),U>=0?z[U]:j)}function D(P){var j=C(P);return j?I in j:x.indexOf(P)>=0}function B(P,j){var U,$=C(P);return $?$[I]=j:(U=x.indexOf(P),U>=0?z[U]=j:(U=x.length,z[U]=j,x[U]=P)),this}function F(P){var j=C(P),U,$;return j?I in j&&delete j[I]:(U=x.indexOf(P),U<0?!1:($=x.length-1,x[U]=void 0,z[U]=z[$],x[U]=x[$],x.length=$,z.length=$,!0))}return Object.create(A.prototype,{get___:{value:_(O)},has___:{value:_(D)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function x(){this instanceof A||f();var z=new r,I=void 0,O=!1;function D(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;n?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(O)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(D)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)O=!0;else throw new Error("bogus call to permitHostObjects___")})}})}x.prototype=A.prototype,l.exports=x,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236:function(l,e,t){var n=t(8284);l.exports=r;function r(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(a);return s&&s.identity===a?s:n(o,a)}}},8284:function(l){l.exports=e;function e(t,n){var r={identity:n},a=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var n=t(236);l.exports=r;function r(){var a=n();return{get:function(o,s){var c=a(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return a(o).value=s,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},3349:function(l){"use strict";function e(){return function(s,c,m,h,v,g){var i=s[0],w=m[0],S=[0],M=w;h|=0;var C=0,_=w;for(C=0;C=0!=f>=0&&v.push(S[0]+.5+.5*(T+f)/(T-f))}h+=_,++S[0]}}}function t(){return e()}var n=t;function r(s){var c={};return function(h,v,g){var i=h.dtype,w=h.order,S=[i,w.join()].join(),M=c[S];return M||(c[S]=M=s([i,w])),M(h.shape.slice(0),h.data,h.stride,h.offset|0,v,g)}}function a(s){return r(n.bind(void 0,s))}function o(s){return a({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var n=t(3349);function r(a,o){var s=[];return o=+o||0,n(a.hi(a.shape[0]-1),s,o),s}},7790:function(){}},b={};function E(l){var e=b[l];if(e!==void 0)return e.exports;var t=b[l]={id:l,loaded:!1,exports:{}};return p[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}(function(){E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){E.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var k=E(1964);V.exports=k})()}}),cp=ze({"src/lib/str2rgbarray.js"(J,V){"use strict";var{normalize:p}=Qn();function b(E){return E?p(E):[0,0,0,1]}V.exports=b}}),fp=ze({"src/lib/gl_format_color.js"(J,V){"use strict";var p=ao(),b=fl(),E=Qn(),k=fc().defaultLine,l=Ff().isArrayOrTypedArray,e=E.normalize(k),t=1;function n(c,m){return[c[0],c[1],c[2],c[3]*m]}function r(c){return p(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function a(c){return p(c)?c:t}function o(c,m,h){var v=c.color;v&&v._inputArray&&(v=v._inputArray);var g=l(v),i=l(m),w=b.extractOpts(c),S=[],M,C,_,T,f;if(w.colorscale!==void 0?M=b.makeColorScaleFuncFromTrace(c):M=r,g?C=(A,x)=>A[x]===void 0?e:w.colorscale===void 0?M(A[x]):E.normalize(M(A[x])):C=r,i?_=function(A,x){return A[x]===void 0?t:a(A[x])}:_=a,g||i)for(var u=0;u0){var v=n.c2l(m);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else a[o]=[-s[0]*t,s[1]*t]}return a}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,O=0,D=[I,O];if(Array.isArray(z))for(var B=0;B=0){var $=g(j.position,j.delaunayColor,j.delaunayAxis);$.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update($):($.gl=I,this.delaunayMesh=k($),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 x(z,I){var O=new h(z,I.uid);return O.update(I),O}V.exports=x}}),mA=ze({"src/traces/scatter3d/attributes.js"(J,V){"use strict";var p=su(),b=Qs(),E=qs(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=ws(),r=vA(),a=w2(),o=Ki().extendFlat,s=Al().overrideAll,c=(Nv(),Po(nv)).default,m=p.line,h=p.marker,v=h.line,g=o({width:m.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){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 w=V.exports=s({x:p.x,y:p.y,z:{valType:"data_array"},text:o({},p.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},p.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},p.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:p.connectgaps,line:g,marker:o({symbol:{valType:"enumerated",values:c(a),dflt:"circle",arrayOk:!0},size:o({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:o({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:o({width:o({},v.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},p.textposition,{dflt:"top center"}),textfont:b({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:n.opacity,hoverinfo:o({},n.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"}}),LN=ze({"src/traces/scatter3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=el(),k=id(),l=_d(),e=xd(),t=mA();V.exports=function(a,o,s,c){function m(C,_){return b.coerce(a,o,t,C,_)}var h=n(a,o,m,c);if(!h){o.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),m("mode"),E.hasMarkers(o)&&k(a,o,s,c,m,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(m("connectgaps"),l(a,o,s,c,m)),E.hasText(o)&&(m("texttemplate"),m("texttemplatefallback"),e(a,o,c,m,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var v=(o.line||{}).color,g=(o.marker||{}).color;m("surfaceaxis")>=0&&m("surfacecolor",v||g);for(var i=["x","y","z"],w=0;w<3;++w){var S="projection."+i[w];m(S+".show")&&(m(S+".opacity"),m(S+".scale"))}var M=p.getComponentMethod("errorbars","supplyDefaults");M(a,o,v||g||s,{axis:"z"}),M(a,o,v||g||s,{axis:"y",inherit:"z"}),M(a,o,v||g||s,{axis:"x",inherit:"z"})};function n(r,a,o,s){var c=0,m=o("x"),h=o("y"),v=o("z"),g=p.getComponentMethod("calendars","handleTraceDefaults");return g(r,a,["x","y","z"],s),m&&h&&v&&(c=Math.min(m.length,h.length,v.length),a._length=a._xlength=a._ylength=a._zlength=c),c}}}),PN=ze({"src/traces/scatter3d/calc.js"(J,V){"use strict";var p=Nd(),b=od();V.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return p(e,l),b(k,l),e}}}),RN=ze({"node_modules/get-canvas-context/index.js"(J,V){V.exports=p;function p(b,E){if(typeof b!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[b];b.indexOf("webgl")===0&&t.push("experimental-"+b);for(var n=0;n/g," "));o[s]=v,c.tickmode=m}}n.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var g=0;g<2;++g)n.bounds[g][s]=t.glplot.bounds[g][s]}t.contourLevels=l(o)}}}),BN=ze({"src/plots/gl3d/scene.js"(J,V){"use strict";var p=df().gl_plot3d,b=p.createCamera,E=p.createScene,k=IN(),l=Rx(),e=mi(),t=Nr(),n=t.preserveDrawingBuffer(),r=Gi(),a=Zl(),o=cp(),s=gA(),c=C5(),m=DN(),h=FN(),v=zN(),g=md().applyAutorangeOptions,i,w,S=!1;function M(O,D){var B=document.createElement("div"),F=O.container;this.graphDiv=O.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",B.appendChild(P),this.svgContainer=P,B.id=O.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=D,this.id=O.id||"scene",this.fullSceneLayout=D[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(D,D[this.id]),this.spikeOptions=h(D[this.id]),this.container=B,this.staticMode=!!O.staticPlot,this.pixelRatio=this.pixelRatio||O.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var O=this,D={canvas:O.canvas,gl:O.gl,glOptions:{preserveDrawingBuffer:n,premultipliedAlpha:!0,antialias:!0},container:O.container,axes:O.axesOptions,spikes:O.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:O.camera,pixelRatio:O.pixelRatio};if(O.staticMode){if(!w&&(i=document.createElement("canvas"),w=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!w))throw new Error("error creating static canvas/context for image server");D.gl=w,D.canvas=i}return D};var _=!0;C.tryCreatePlot=function(){var O=this,D=O.prepareOptions(),B=!0;try{O.glplot=E(D)}catch{if(O.staticMode||!_||n)B=!1;else{t.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{n=D.glOptions.preserveDrawingBuffer=!0,O.glplot=E(D)}catch{n=D.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var O=this,D=O.fullSceneLayout.camera,B=D.projection.type==="orthographic";O.camera=b(O.container,{center:[D.center.x,D.center.y,D.center.z],eye:[D.eye.x,D.eye.y,D.eye.z],up:[D.up.x,D.up.y,D.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var O=this;O.initializeGLCamera();var D=O.tryCreatePlot();if(!D)return s(O);O.traces={},O.make4thDimension();var B=O.graphDiv,F=B.layout,P=function(){var U={};return O.isCameraChanged(F)&&(U[O.id+".camera"]=O.getCamera()),O.isAspectChanged(F)&&(U[O.id+".aspectratio"]=O.glplot.getAspectratio(),F[O.id].aspectmode!=="manual"&&(O.fullSceneLayout.aspectmode=F[O.id].aspectmode=U[O.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var $=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",$)}};return O.glplot.canvas&&(O.glplot.canvas.addEventListener("mouseup",function(){j(O)}),O.glplot.canvas.addEventListener("touchstart",function(){S=!0}),O.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(O.camera._ortho){var $=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=O.glplot.getAspectratio();O.glplot.setAspectratio({x:$*Q.x,y:$*Q.y,z:$*Q.z})}j(O)}},l?{passive:!1}:!1),O.glplot.canvas.addEventListener("mousemove",function(){if(O.fullSceneLayout.dragmode!==!1&&O.camera.mouseListener.buttons!==0){var U=P();O.graphDiv.emit("plotly_relayouting",U)}}),O.staticMode||O.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:O.id})},!1)),O.glplot.oncontextloss=function(){O.recoverContext()},O.glplot.onrender=function(){O.render()},!0},C.render=function(){var O=this,D=O.graphDiv,B,F=O.svgContainer,P=O.container.getBoundingClientRect();D._fullLayout._calcInverseTransform(D);var j=D._fullLayout._invScaleX,U=D._fullLayout._invScaleY,$=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+$+" "+Q),F.setAttributeNS(null,"width",$),F.setAttributeNS(null,"height",Q),v(O),O.glplot.axes.update(O.axesOptions);for(var re=Object.keys(O.traces),ne=null,se=O.glplot.selection,G=0;G")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(O._mockAxis,O._mockAxis.d2l(se.traceCoordinate[3]),B.valuehoverformat),xe.push("value: "+q.valueLabel),se.textLabel&&xe.push(se.textLabel),he=xe.join("
")):he=se.textLabel;var we={x:se.traceCoordinate[0],y:se.traceCoordinate[1],z:se.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:Y};a.appendArrayPointValue(we,H,Y),B._module.eventData&&(we=H._module.eventData(we,se,H,{},Y));var Me={points:[we]};if(O.fullSceneLayout.hovermode){var Se=[];a.loneHover({trace:H,x:(.5+.5*K[0]/K[3])*$,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:he,name:ne.name,color:a.castHoverOption(H,Y,"bgcolor")||ne.color,borderColor:a.castHoverOption(H,Y,"bordercolor"),fontFamily:a.castHoverOption(H,Y,"font.family"),fontSize:a.castHoverOption(H,Y,"font.size"),fontColor:a.castHoverOption(H,Y,"font.color"),nameLength:a.castHoverOption(H,Y,"namelength"),textAlign:a.castHoverOption(H,Y,"align"),hovertemplate:t.castOption(H,Y,"hovertemplate"),hovertemplateLabels:t.extendFlat({},we,q),eventData:[we]},{container:F,gd:D,inOut_bbox:Se}),we.bbox=Se[0]}se.distance<5&&(se.buttons||S)?D.emit("plotly_click",Me):D.emit("plotly_hover",Me),this.oldEventData=Me}else a.loneUnhover(F),this.oldEventData&&D.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;O.drawAnnotations(O)},C.recoverContext=function(){var O=this;O.glplot.dispose();var D=function(){if(O.glplot.gl.isContextLost()){requestAnimationFrame(D);return}if(!O.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}O.plot.apply(O,O.plotArgs)};requestAnimationFrame(D)};var T=["xaxis","yaxis","zaxis"];function f(O,D,B){for(var F=O.fullSceneLayout,P=0;P<3;P++){var j=T[P],U=j.charAt(0),$=F[j],Q=D[U],re=D[U+"calendar"],ne=D["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ne-1);else for(var se,G=0;G<(ne||Q.length);G++)if(t.isArrayOrTypedArray(Q[G]))for(var X=0;XH[1][U])H[0][U]=-1,H[1][U]=1;else{var Ve=H[1][U]-H[0][U];H[0][U]-=Ve/32,H[1][U]+=Ve/32}if(Z=[H[0][U],H[1][U]],Z=g(Z,Q),H[0][U]=Z[0],H[1][U]=Z[1],Q.isReversed()){var Ge=H[0][U];H[0][U]=H[1][U],H[1][U]=Ge}}else Z=Q.range,H[0][U]=Q.r2l(Z[0]),H[1][U]=Q.r2l(Z[1]);H[0][U]===H[1][U]&&(H[0][U]-=1,H[1][U]+=1),Y[U]=H[1][U]-H[0][U],Q.range=[H[0][U],H[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*X[U],max:Q.range[1]*X[U]})}var ke,_e=ne.aspectmode;if(_e==="cube")ke=[1,1,1];else if(_e==="manual"){var ce=ne.aspectratio;ke=[ce.x,ce.y,ce.z]}else if(_e==="auto"||_e==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ne[T[U]],re=Q.type;var le=q[re];ve[U]=Math.pow(le.acc,1/le.count)/X[U]}_e==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ne.aspectratio.x=se.aspectratio.x=ke[0],ne.aspectratio.y=se.aspectratio.y=ke[1],ne.aspectratio.z=se.aspectratio.z=ke[2],F.glplot.setAspectratio(ne.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ne.aspectratio.x,y:ne.aspectratio.y,z:ne.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ne.aspectmode);var Ae=ne.domain||null,Be=D._size||null;if(Ae&&Be){var Xe=F.container.style;Xe.position="absolute",Xe.left=Be.l+Ae.x[0]*Be.w+"px",Xe.top=Be.t+(1-Ae.y[1])*Be.h+"px",Xe.width=Be.w*(Ae.x[1]-Ae.x[0])+"px",Xe.height=Be.h*(Ae.y[1]-Ae.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var O=this;O.glplot&&(O.camera.mouseListener.enabled=!1,O.container.removeEventListener("wheel",O.camera.wheelListener),O.camera=null,O.glplot.dispose(),O.container.parentNode.removeChild(O.container),O.glplot=null)};function A(O){return[[O.eye.x,O.eye.y,O.eye.z],[O.center.x,O.center.y,O.center.z],[O.up.x,O.up.y,O.up.z]]}function x(O){return{up:{x:O.up[0],y:O.up[1],z:O.up[2]},center:{x:O.center[0],y:O.center[1],z:O.center[2]},eye:{x:O.eye[0],y:O.eye[1],z:O.eye[2]},projection:{type:O._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var O=this;return O.camera.view.recalcMatrix(O.camera.view.lastT()),x(O.camera)},C.setViewport=function(O){var D=this,B=O.camera;D.camera.lookAt.apply(this,A(B)),D.glplot.setAspectratio(O.aspectratio);var F=B.projection.type==="orthographic",P=D.camera._ortho;F!==P&&(D.glplot.redraw(),D.glplot.clearRGBA(),D.glplot.dispose(),D.initializeGLPlot())},C.isCameraChanged=function(O){var D=this,B=D.getCamera(),F=t.nestedProperty(O,D.id+".camera"),P=F.get();function j(re,ne,se,G){var X=["up","center","eye"],K=["x","y","z"];return ne[X[se]]&&re[X[se]][K[G]]===ne[X[se]][K[G]]}var U=!1;if(P===void 0)U=!0;else{for(var $=0;$<3;$++)for(var Q=0;Q<3;Q++)if(!j(B,P,$,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(O){var D=this,B=D.glplot.getAspectratio(),F=t.nestedProperty(O,D.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(O){var D=this,B=D.fullLayout,F,P,j,U,$,Q,re=D.isCameraChanged(O),ne=D.isAspectChanged(O),se=re||ne;if(se){var G={};if(re&&(F=D.getCamera(),P=t.nestedProperty(O,D.id+".camera"),j=P.get(),G[D.id+".camera"]=j),ne&&(U=D.glplot.getAspectratio(),$=t.nestedProperty(O,D.id+".aspectratio"),Q=$.get(),G[D.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",O,B._preGUI,G),re){P.set(F);var X=t.nestedProperty(B,D.id+".camera");X.set(F)}if(ne){$.set(U);var K=t.nestedProperty(B,D.id+".aspectratio");K.set(U),D.glplot.redraw()}}return se},C.updateFx=function(O,D){var B=this,F=B.camera;if(F)if(O==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(O==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,$=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt($*$+Q*Q+re*re)<.999){var ne=B.id+".camera.up",se={x:0,y:0,z:1},G={};G[ne]=se;var X=P.layout;e.call("_storeDirectGUIEdit",X,j._preGUI,G),U.up=se,t.nestedProperty(X,ne).set(se)}}else F.keyBindingMode=O;B.fullSceneLayout.hovermode=D};function z(O,D,B){for(var F=0,P=B-1;F0)for(var $=255/U,Q=0;Q<3;++Q)O[j+Q]=Math.min($*O[j+Q],255)}}C.toImage=function(O){var D=this;O||(O="png"),D.staticMode&&D.container.appendChild(i),D.glplot.redraw();var B=D.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var $=U.getContext("2d",{willReadFrequently:!0}),Q=$.createImageData(F,P);Q.data.set(j),$.putImageData(Q,0,0);var re;switch(O){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return D.staticMode&&D.container.removeChild(i),re},C.setConvert=function(){for(var O=this,D=0;D<3;D++){var B=O.fullSceneLayout[T[D]];r.setConvert(B,O.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var O=this,D=O.graphDiv,B=D._fullLayout;O._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(O._mockAxis,B)},V.exports=M}}),ON=ze({"src/plots/gl3d/layout/attributes.js"(J,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),yA=ze({"src/plots/gl3d/layout/axis_attributes.js"(J,V){"use strict";var p=Qn(),b=cf(),E=Ki().extendFlat,k=Al().overrideAll;V.exports=k({visible:b.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:p.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:b.color,categoryorder:b.categoryorder,categoryarray:b.categoryarray,title:{text:b.title.text,font:b.title.font},type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorange:b.autorange,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},rangemode:b.rangemode,minallowed:b.minallowed,maxallowed:b.maxallowed,range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,mirror:b.mirror,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,tickfont:b.tickfont,tickangle:b.tickangle,tickprefix:b.tickprefix,showtickprefix:b.showtickprefix,ticksuffix:b.ticksuffix,showticksuffix:b.showticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickformat:b.tickformat,tickformatstops:b.tickformatstops,hoverformat:b.hoverformat,showline:b.showline,linecolor:b.linecolor,linewidth:b.linewidth,showgrid:b.showgrid,gridcolor:E({},b.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:b.gridwidth,zeroline:b.zeroline,zerolinecolor:b.zerolinecolor,zerolinewidth:b.zerolinewidth},"plot","from-root")}}),_A=ze({"src/plots/gl3d/layout/layout_attributes.js"(J,V){"use strict";var p=yA(),b=Ml().attributes,E=Ki().extendFlat,k=Nr().counterRegex;function l(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:b({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:p,yaxis:p,zaxis:p,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"}}}),NN=ze({"src/plots/gl3d/layout/axis_defaults.js"(J,V){"use strict";var p=Qn(),b=Nr(),E=hs(),k=yA(),l=E5(),e=y1(),t=["xaxis","yaxis","zaxis"],n=100*136/187;V.exports=function(a,o,s){var c,m;function h(i,w){return b.coerce(c,m,k,i,w)}for(var v=0;v1;function h(v){if(!m){var g=p.validate(o[v],e[v]);if(g)return o[v]}}k(o,s,c,{type:n,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:h,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(a,o,s,c){for(var m=s("bgcolor"),h=b.combine(m,c.paper_bgcolor),v=["up","center","eye"],g=0;g.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),xv=ze({"src/plots/gl3d/index.js"(J){"use strict";var V=Al().overrideAll,p=rv(),b=BN(),E=zf().getSubplotData,k=Nr(),l=nd(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=ON(),J.layoutAttributes=_A(),J.baseLayoutAttrOverrides=V({hoverlabel:p.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=jN(),J.plot=function(r){for(var a=r._fullLayout,o=r._fullData,s=a._subplots[e],c=0;c0){z=c[I];break}return z}function g(A,x){if(!(A<1||x<1)){for(var z=h(A),I=h(x),O=1,D=0;DM;)I--,I/=v(I),I++,I1?O:1};function C(A,x,z){var I=z[8]+z[2]*x[0]+z[5]*x[1];return A[0]=(z[6]+z[0]*x[0]+z[3]*x[1])/I,A[1]=(z[7]+z[1]*x[0]+z[4]*x[1])/I,A}function _(A,x,z){return T(A,x,C,z),A}function T(A,x,z,I){for(var O=[0,0],D=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(x[I]=!0,O=this.contourStart[I];OQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(n.isomin=null,n.isomax=null);var m=o("x"),h=o("y"),v=o("z"),g=o("value");if(!m||!m.length||!h||!h.length||!v||!v.length||!g||!g.length){n.visible=!1;return}var i=b.getComponentMethod("calendars","handleTraceDefaults");i(t,n,["x","y","z"],a),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,T=o(_+".show");T&&o(_+".fill");var f="slices."+C,u=o(f+".show");u&&(o(f+".fill"),o(f+".locations"))});var w=o("spaceframe.show");w&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("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(C){o(C)}),k(t,n,a,o,{prefix:"",cLetter:"c"}),n._length=null}V.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),A2=ze({"src/traces/streamtube/calc.js"(J,V){"use strict";var p=Nr(),b=Qf();function E(t,n){n._len=Math.min(n.u.length,n.v.length,n.w.length,n.x.length,n.y.length,n.z.length),n._u=e(n.u,n._len),n._v=e(n.v,n._len),n._w=e(n.w,n._len),n._x=e(n.x,n._len),n._y=e(n.y,n._len),n._z=e(n.z,n._len);var r=k(n);n._gridFill=r.fill,n._Xs=r.Xs,n._Ys=r.Ys,n._Zs=r.Zs,n._len=r.len;var a=0,o,s,c;n.starts&&(o=e(n.starts.x||[]),s=e(n.starts.y||[]),c=e(n.starts.z||[]),a=Math.min(o.length,s.length,c.length)),n._startsX=o||[],n._startsY=s||[],n._startsZ=c||[];var m=0,h=1/0,v;for(v=0;v1&&(u=n[o-1],x=r[o-1],I=a[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>x?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,O=[],D=[],B=[]};(!o||o0;h--){var v=Math.min(m[h],m[h-1]),g=Math.max(m[h],m[h-1]);if(g>v&&v-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ae(Ot,vt,ht){re();var De=[vt],Ne=[ht];if(H>=1)De=[vt],Ne=[ht];else if(H>0){var We=q(vt,ht);De=We.xyzv,Ne=We.abc}for(var Ke=0;Ke-1?ht[et]:Q(Mt,pt,Pt);qt>-1?Je[et]=qt:Je[et]=se(Mt,pt,Pt,ee(Ot,Ct))}G(Je[0],Je[1],Je[2])}}function he(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(2,3,0)}function xe(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function we(Ot,vt,ht,De){var Ne=Ot[3];NeDe&&(Ne=De);for(var We=(Ot[3]-Ne)/(Ot[3]-vt[3]+1e-9),Ke=[],Je=0;Je<4;Je++)Ke[Je]=(1-We)*Ot[Je]+We*vt[Je];return Ke}function Me(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Se(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var De=Ot[ht];vt.push([c._x[De],c._y[De],c._z[De],c._value[De]])}return vt}var Ve=3;function Ge(Ot,vt,ht,De,Ne,We){We||(We=1),ht=[-1,-1,-1];var Ke=!1,Je=[Me(vt[0][3],De,Ne),Me(vt[1][3],De,Ne),Me(vt[2][3],De,Ne)];if(!Je[0]&&!Je[1]&&!Je[2])return!1;var et=function(pt,Pt,Ct){return Se(Pt[0][3])&&Se(Pt[1][3])&&Se(Pt[2][3])?(ae(pt,Pt,Ct),!0):WeJe?[O,We]:[We,D];Tt(vt,et[0],et[1])}}var Mt=[[Math.min(B,D),Math.max(B,D)],[Math.min(O,F),Math.max(O,F)]];["x","y","z"].forEach(function(pt){for(var Pt=[],Ct=0;Ct0&&(Yt.push(ur.id),pt==="x"?Rt.push([ur.distRatio,0,0]):pt==="y"?Rt.push([0,ur.distRatio,0]):Rt.push([0,0,ur.distRatio]))}else pt==="x"?Kr=_r(1,u-1):pt==="y"?Kr=_r(1,A-1):Kr=_r(1,x-1);Yt.length>0&&(pt==="x"?Pt[qt]=At(Ot,Yt,Vt,Ht,Rt,Pt[qt]):pt==="y"?Pt[qt]=$t(Ot,Yt,Vt,Ht,Rt,Pt[qt]):Pt[qt]=rr(Ot,Yt,Vt,Ht,Rt,Pt[qt]),qt++),Kr.length>0&&(pt==="x"?Pt[qt]=Be(Ot,Kr,Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,Kr,Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,Kr,Vt,Ht,Pt[qt]),qt++)}var cr=c.caps[pt];cr.show&&cr.fill&&(Y(cr.fill),pt==="x"?Pt[qt]=Be(Ot,[0,u-1],Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,[0,A-1],Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,[0,x-1],Vt,Ht,Pt[qt]),qt++)}}),S===0&&ne(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=$,c._Xs=_,c._Ys=T,c._Zs=f}return or(),c}function s(c,m){var h=c.glplot.gl,v=p({gl:h}),g=new n(c,v,m.uid);return v._trace=g,g.update(m),c.glplot.add(v),g}V.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),YN=ze({"src/traces/isosurface/index.js"(J,V){"use strict";V.exports={attributes:T2(),supplyDefaults:bA().supplyDefaults,calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:M2().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),XN=ze({"lib/isosurface.js"(J,V){"use strict";V.exports=YN()}}),TA=ze({"src/traces/volume/attributes.js"(J,V){"use strict";var p=qs(),b=T2(),E=K1(),k=ws(),l=Ki().extendFlat,e=Al().overrideAll,t=V.exports=e(l({x:b.x,y:b.y,z:b.z,value:b.value,isomin:b.isomin,isomax:b.isomax,surface:b.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:b.slices,caps:b.caps,text:b.text,hovertext:b.hovertext,xhoverformat:b.xhoverformat,yhoverformat:b.yhoverformat,zhoverformat:b.zhoverformat,valuehoverformat:b.valuehoverformat,hovertemplate:b.hovertemplate,hovertemplatefallback:b.hovertemplatefallback},p("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:b.colorbar,opacity:b.opacity,opacityscale:E.opacityscale,lightposition:b.lightposition,lighting:b.lighting,flatshading:b.flatshading,contour:b.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),ZN=ze({"src/traces/volume/defaults.js"(J,V){"use strict";var p=Nr(),b=TA(),E=bA().supplyIsoDefaults,k=xA().opacityscaleDefaults;V.exports=function(e,t,n,r){function a(o,s){return p.coerce(e,t,b,o,s)}E(e,t,n,r,a),k(e,t,r,a)}}}),$N=ze({"src/traces/volume/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=fp().parseColorScale,E=Nr().isArrayOrTypedArray,k=cp(),l=fl().extractOpts,e=mg(),t=M2().findNearestOnAxis,n=M2().generateIsoMeshes;function r(s,c,m){this.scene=s,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=r.prototype;a.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,m=this.data._meshX[c],h=this.data._meshY[c],v=this.data._meshZ[c],g=this.data._Ys.length,i=this.data._Zs.length,w=t(m,this.data._Xs).id,S=t(h,this.data._Ys).id,M=t(v,this.data._Zs).id,C=s.index=M+i*S+i*g*w;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},a.update=function(s){var c=this.scene,m=c.fullSceneLayout;this.data=n(s);function h(S,M,C,_){return M.map(function(T){return S.d2l(T,0,_)*C})}var v=e(h(m.xaxis,s._meshX,c.dataScale[0],s.xcalendar),h(m.yaxis,s._meshY,c.dataScale[1],s.ycalendar),h(m.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),g=e(s._meshI,s._meshJ,s._meshK),i={positions:v,cells:g,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:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},w=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[w.min,w.max],i.colormap=b(s),this.mesh.update(i)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var m=s.glplot.gl,h=p({gl:m}),v=new r(s,h,c.uid);return h._trace=v,v.update(c),s.glplot.add(h),v}V.exports=o}}),KN=ze({"src/traces/volume/index.js"(J,V){"use strict";V.exports={attributes:TA(),supplyDefaults:ZN(),calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:$N(),moduleType:"trace",name:"volume",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),JN=ze({"lib/volume.js"(J,V){"use strict";V.exports=KN()}}),QN=ze({"src/traces/mesh3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=qc(),k=vg();V.exports=function(e,t,n,r){function a(h,v){return b.coerce(e,t,k,h,v)}function o(h){var v=h.map(function(g){var i=a(g);return i&&b.isArrayOrTypedArray(i)?i:null});return v.every(function(g){return g&&g.length===v[0].length})&&v}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=p.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["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(h){a(h)});var m=a("contour.show");m&&(a("contour.color"),a("contour.width")),"intensity"in e?(a("intensity"),a("intensitymode"),E(e,t,r,a,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?a("facecolor"):"vertexcolor"in e?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),ej=ze({"src/traces/mesh3d/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){k.intensity&&p(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),tj=ze({"src/traces/mesh3d/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=df().delaunay_triangulate,E=df().alpha_shape,k=df().convex_hull,l=fp().parseColorScale,e=Nr().isArrayOrTypedArray,t=cp(),n=fl().extractOpts,r=mg();function a(i,w,S){this.scene=i,this.uid=S,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=a.prototype;o.handlePick=function(i){if(i.object===this.mesh){var w=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var S=this.data.hovertext||this.data.text;return e(S)&&S[w]!==void 0?i.textLabel=S[w]:S&&(i.textLabel=S),!0}};function s(i){for(var w=[],S=i.length,M=0;M=w-.5)return!1;return!0}o.update=function(i){var w=this.scene,S=w.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,w.dataScale[0],i.xcalendar),c(S.yaxis,i.y,w.dataScale[1],i.ycalendar),c(S.zaxis,i.z,w.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!v(i.i,M)||!v(i.j,M)||!v(i.k,M))return;_=r(m(i.i),m(i.j),m(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=h(i.delaunayaxis,C);var T={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var f=n(i);this.color="#fff";var u=i.intensitymode;T[u+"Intensity"]=i.intensity,T[u+"IntensityBounds"]=[f.min,f.max],T.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],T.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],T.cellColors=s(i.facecolor)):(this.color=i.color,T.meshColor=t(i.color));this.mesh.update(T)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(i,w){var S=i.glplot.gl,M=p({gl:S}),C=new a(i,M,w.uid);return M._trace=C,C.update(w),i.glplot.add(M),C}V.exports=g}}),rj=ze({"src/traces/mesh3d/index.js"(J,V){"use strict";V.exports={attributes:vg(),supplyDefaults:QN(),calc:ej(),colorbar:{min:"cmin",max:"cmax"},plot:tj(),moduleType:"trace",name:"mesh3d",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),aj=ze({"lib/mesh3d.js"(J,V){"use strict";V.exports=rj()}}),AA=ze({"src/traces/cone/attributes.js"(J,V){"use strict";var p=qs(),b=Il().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=vg(),e=ws(),t=Ki().extendFlat,n={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:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:b("u",1),vhoverformat:b("v",1),whoverformat:b("w",1),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(n,p("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(a){n[a]=l[a]}),n.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=n}}),nj=ze({"src/traces/cone/defaults.js"(J,V){"use strict";var p=Nr(),b=qc(),E=AA();V.exports=function(l,e,t,n){function r(g,i){return p.coerce(l,e,E,g,i)}var a=r("u"),o=r("v"),s=r("w"),c=r("x"),m=r("y"),h=r("z");if(!a||!a.length||!o||!o.length||!s||!s.length||!c||!c.length||!m||!m.length||!h||!h.length){e.visible=!1;return}var v=r("sizemode");r("sizeref",v==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),b(l,e,n,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),ij=ze({"src/traces/cone/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,n=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,a=1/0,o=0;o2?v=m.slice(1,h-1):h===2?v=[(m[0]+m[1])/2]:v=m,v}function o(m){var h=m.length;return h===1?[.5,.5]:[m[1]-m[0],m[h-1]-m[h-2]]}function s(m,h){var v=m.fullSceneLayout,g=m.dataScale,i=h._len,w={};function S(se,G){var X=v[G],K=g[t[G]];return E.simpleMap(se,function(H){return X.d2l(H)*K})}if(w.vectors=e(S(h._u,"xaxis"),S(h._v,"yaxis"),S(h._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(h._Xs,"xaxis"),C=S(h._Ys,"yaxis"),_=S(h._Zs,"zaxis");w.meshgrid=[M,C,_],w.gridFill=h._gridFill;var T=h._slen;if(T)w.startingPositions=e(S(h._startsX,"xaxis"),S(h._startsY,"yaxis"),S(h._startsZ,"zaxis"));else{for(var f=C[0],u=a(M),A=a(_),x=new Array(u.length*A.length),z=0,I=0;If&&(f=z[0]),z[1]u&&(u=z[1])}function x(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(x);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,O=z.length,D;++If&&(f=D[0]),D[1]u&&(u=D[1])});for(C in S.objects)x(S.objects[C]);return[_,T,f,u]}function l(S,M){for(var C,_=S.length,T=_-M;T<--_;)C=S[T],S[T++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,T=M.properties==null?{}:M.properties,f=n(S,M);return C==null&&_==null?{type:"Feature",properties:T,geometry:f}:_==null?{type:"Feature",id:C,properties:T,geometry:f}:{type:"Feature",id:C,bbox:_,properties:T,geometry:f}}function n(S,M){var C=E(S.transform),_=S.arcs;function T(I,O){O.length&&O.pop();for(var D=_[I<0?~I:I],B=0,F=D.length;B1)_=s(S,M,C);else for(T=0,_=new Array(f=S.arcs.length);T1)for(var O=1,D=A(z[0]),B,F;OD&&(F=z[0],z[0]=z[O],z[O]=F,D=B);return z}).filter(function(x){return x.length>0})}}function v(S,M){for(var C=0,_=S.length;C<_;){var T=C+_>>>1;S[T]=2))throw new Error("n must be \u22652");x=S.bbox||k(S);var C=x[0],_=x[1],T=x[2],f=x[3],u;M={scale:[T-C?(T-C)/(u-1):1,f-_?(f-_)/(u-1):1],translate:[C,_]}}else x=S.bbox;var A=i(M),x,z,I=S.objects,O={};function D(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:D(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(D)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,$=P.length,Q,re=new Array($);for(re[0]=A(P[0],0);++j<$;)((Q=A(P[j],j))[0]||Q[1])&&(re[U++]=Q);return U===1&&(re[U++]=[0,0]),re.length=U,re}for(z in I)O[z]=B(I[z]);return{type:"Topology",bbox:x,transform:M,objects:O,arcs:S.arcs.map(F)}}p.bbox=k,p.feature=e,p.merge=m,p.mergeArcs=h,p.mesh=a,p.meshArcs=o,p.neighbors=g,p.quantize=w,p.transform=E,p.untransform=i,Object.defineProperty(p,"__esModule",{value:!0})})}}),S2=ze({"src/lib/topojson_utils.js"(J,V){"use strict";var p=V.exports={},b=J1().locationmodeToLayer,E=EA().feature;p.getTopojsonName=function(k){return[k.scope.replace(/ /g,"-"),"_",k.resolution.toString(),"m"].join("")},p.getTopojsonPath=function(k,l){return k+=k.endsWith("/")?"":"/",`${k}${l}.json`},p.getTopojsonFeatures=function(k,l){var e=b[k.locationmode],t=l.objects[e];return E(l,t).features}}}),Q1=ze({"src/lib/geojson_utils.js"(J){"use strict";var V=No().BADNUM;J.calcTraceToLineCoords=function(p){for(var b=p[0].trace,E=b.connectgaps,k=[],l=[],e=0;e0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(p){return p.length===1?{type:"LineString",coordinates:p[0]}:{type:"MultiLineString",coordinates:p}},J.makePolygon=function(p){if(p.length===1)return{type:"Polygon",coordinates:p};for(var b=new Array(p.length),E=0;E{for(var S in w)p(i,S,{get:w[S],enumerable:!0})},e=(i,w,S,M)=>{if(w&&typeof w=="object"||typeof w=="function")for(let C of E(w))!k.call(i,C)&&C!==S&&p(i,C,{get:()=>w[C],enumerable:!(M=b(w,C))||M.enumerable});return i},t=i=>e(p({},"__esModule",{value:!0}),i),n={};l(n,{COUNTRIES:()=>r,byAlpha2:()=>v,byAlpha3:()=>h,byM49:()=>g,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>m,sanitize:()=>a}),V.exports=t(n);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function a(i){return i.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function o(i){let w=new Map,S=new Map,M=new Map;for(let f of i)w.set(f.iso3,f),f.iso2&&S.set(f.iso2,f),f.m49&&M.set(f.m49,f);let C=new Map;for(let f of i)for(let u of[f.name,...f.aliases]){let A=a(u),x=C.get(A);if(x!==void 0&&x!==f.iso3)throw new Error(`Duplicate name/alias "${A}": ${x} vs ${f.iso3}`);C.set(A,f.iso3)}function _(f){if(f==null)return;let u=String(f).trim();if(!u)return;if(/^\d+$/.test(u)){let x=M.get(String(parseInt(u,10)).padStart(3,"0"));if(x)return x}if(/^[A-Za-z]{2}$/.test(u)){let x=S.get(u.toUpperCase());if(x)return x}if(/^[A-Za-z]{3}$/.test(u)){let x=w.get(u.toUpperCase());if(x)return x}let A=C.get(a(u));return A===void 0?void 0:w.get(A)}function T(f){var u;return(u=_(f))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:T,byAlpha3:w,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,m=s.lookupAlpha3,h=s.byAlpha3,v=s.byAlpha2,g=s.byM49}}),E2=ze({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=63710088e-1,p={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},b={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 E(I,O,D={}){let B={type:"Feature"};return(D.id===0||D.id)&&(B.id=D.id),D.bbox&&(B.bbox=D.bbox),B.properties=O||{},B.geometry=I,B}function k(I,O,D={}){switch(I){case"Point":return l(O).geometry;case"LineString":return r(O).geometry;case"Polygon":return t(O).geometry;case"MultiPoint":return c(O).geometry;case"MultiLineString":return s(O).geometry;case"MultiPolygon":return m(O).geometry;default:throw new Error(I+" is invalid")}}function l(I,O,D={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},O,D)}function e(I,O,D={}){return o(I.map(B=>l(B,O)),D)}function t(I,O,D={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,O)),D)}function r(I,O,D={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},O,D)}function a(I,O,D={}){return o(I.map(B=>r(B,O)),D)}function o(I,O={}){let D={type:"FeatureCollection"};return O.id&&(D.id=O.id),O.bbox&&(D.bbox=O.bbox),D.features=I,D}function s(I,O,D={}){return E({type:"MultiLineString",coordinates:I},O,D)}function c(I,O,D={}){return E({type:"MultiPoint",coordinates:I},O,D)}function m(I,O,D={}){return E({type:"MultiPolygon",coordinates:I},O,D)}function h(I,O,D={}){return E({type:"GeometryCollection",geometries:I},O,D)}function v(I,O=0){if(O&&!(O>=0))throw new Error("precision must be a positive number");let D=Math.pow(10,O||0);return Math.round(I*D)/D}function g(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I*D}function i(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I/D}function w(I,O){return C(i(I,O))}function S(I){let O=I%360;return O<0&&(O+=360),O}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function T(I,O="kilometers",D="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return g(i(I,O),D)}function f(I,O="meters",D="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=b[O];if(!B)throw new Error("invalid original units");let F=b[D];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function x(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(O=>{if(!u(O))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=b,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=f,J.convertLength=T,J.degreesToRadians=_,J.earthRadius=V,J.factors=p,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=h,J.isNumber=u,J.isObject=A,J.lengthToDegrees=w,J.lengthToRadians=i,J.lineString=r,J.lineStrings=a,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=m,J.point=l,J.points=e,J.polygon=t,J.polygons=n,J.radiansToDegrees=C,J.radiansToLength=g,J.round=v,J.validateBBox=x,J.validateId=z}}),k2=ze({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2();function p(i,w,S){if(i!==null)for(var M,C,_,T,f,u,A,x=0,z=0,I,O=i.type,D=O==="FeatureCollection",B=O==="Feature",F=D?i.features.length:1,P=0;Pu||D>A||B>x){f=z,u=M,A=D,x=B,_=0;return}var F=V.lineString.call(void 0,[f,z],S.properties);if(w(F,M,C,B,_)===!1)return!1;_++,f=z})===!1)return!1}}})}function c(i,w,S){var M=S,C=!1;return s(i,function(_,T,f,u,A){C===!1&&S===void 0?M=_:M=w(M,_,T,f,u,A),C=!0}),M}function m(i,w){if(!i)throw new Error("geojson is required");a(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,T=S.geometry.coordinates;switch(_){case"LineString":if(w(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var f=0;fa+E(o),0)}function E(r){let a=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){a+=Math.abs(t(r[0]));for(let o=1;o=a?(s+2)%a:s+2],v=c[0]*e,g=m[1]*e,i=h[0]*e;o+=(i-v)*Math.sin(g),s++}return o*l}var n=b;J.area=b,J.default=n}}),gj=ze({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2(),p=k2();function b(k,l={}){let e=0,t=0,n=0;return p.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],n++},!0),V.point.call(void 0,[e/n,t/n],l.properties)}var E=b;J.centroid=b,J.default=E}}),yj=ze({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:Ft<0?-1:0},f=Math.sqrt,u=Math.tan;function A(Ft){return Ft>1?0:Ft<-1?r:Math.acos(Ft)}function x(Ft){return Ft>1?a:Ft<-1?-a:Math.asin(Ft)}function z(Ft){return(Ft=_(Ft/2))*Ft}function I(){}function O(Ft,tr){Ft&&B.hasOwnProperty(Ft.type)&&B[Ft.type](Ft,tr)}var D={Feature:function(Ft,tr){O(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr=0?1:-1,ea=wr*Fr,ba=i(tr),Ia=_(tr),Na=G*Ia,Za=se*ba+Na*i(ea),mn=Na*wr*_(ea);U.add(g(mn,Za)),ne=Ft,se=ba,G=Ia}function Z(Ft){return $.reset(),j(Ft,X),$*2}function ee(Ft){return[g(Ft[1],Ft[0]),x(Ft[2])]}function ae(Ft){var tr=Ft[0],Fr=Ft[1],wr=i(Fr);return[wr*i(tr),wr*_(tr),_(Fr)]}function he(Ft,tr){return Ft[0]*tr[0]+Ft[1]*tr[1]+Ft[2]*tr[2]}function xe(Ft,tr){return[Ft[1]*tr[2]-Ft[2]*tr[1],Ft[2]*tr[0]-Ft[0]*tr[2],Ft[0]*tr[1]-Ft[1]*tr[0]]}function we(Ft,tr){Ft[0]+=tr[0],Ft[1]+=tr[1],Ft[2]+=tr[2]}function Me(Ft,tr){return[Ft[0]*tr,Ft[1]*tr,Ft[2]*tr]}function Se(Ft){var tr=f(Ft[0]*Ft[0]+Ft[1]*Ft[1]+Ft[2]*Ft[2]);Ft[0]/=tr,Ft[1]/=tr,Ft[2]/=tr}var Ie,Ve,Ge,ke,_e,ce,ve,le,Ae=E(),Be,Xe,Ye={point:yt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ye.point=$t,Ye.lineStart=rr,Ye.lineEnd=_r,Ae.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Ye.point=yt,Ye.lineStart=Tt,Ye.lineEnd=At,U<0?(Ie=-(Ge=180),Ve=-(ke=90)):Ae>t?ke=90:Ae<-t&&(Ve=-90),Xe[0]=Ie,Xe[1]=Ge},sphere:function(){Ie=-(Ge=180),Ve=-(ke=90)}};function yt(Ft,tr){Be.push(Xe=[Ie=Ft,Ge=Ft]),trke&&(ke=tr)}function gt(Ft,tr){var Fr=ae([Ft*m,tr*m]);if(le){var wr=xe(le,Fr),ea=[wr[1],-wr[0],0],ba=xe(ea,wr);Se(ba),ba=ee(ba);var Ia=Ft-_e,Na=Ia>0?1:-1,Za=ba[0]*c*Na,mn,Da=h(Ia)>180;Da^(Na*_eke&&(ke=mn)):(Za=(Za+360)%360-180,Da^(Na*_eke&&(ke=tr))),Da?Ft<_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft):Ge>=Ie?(FtGe&&(Ge=Ft)):Ft>_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft)}else Be.push(Xe=[Ie=Ft,Ge=Ft]);trke&&(ke=tr),le=Fr,_e=Ft}function Tt(){Ye.point=gt}function At(){Xe[0]=Ie,Xe[1]=Ge,Ye.point=yt,le=null}function $t(Ft,tr){if(le){var Fr=Ft-_e;Ae.add(h(Fr)>180?Fr+(Fr>0?360:-360):Fr)}else ce=Ft,ve=tr;X.point(Ft,tr),gt(Ft,tr)}function rr(){X.lineStart()}function _r(){$t(ce,ve),X.lineEnd(),h(Ae)>t&&(Ie=-(Ge=180)),Xe[0]=Ie,Xe[1]=Ge,le=null}function Xt(Ft,tr){return(tr-=Ft)<0?tr+360:tr}function or(Ft,tr){return Ft[0]-tr[0]}function Ot(Ft,tr){return Ft[0]<=Ft[1]?Ft[0]<=tr&&tr<=Ft[1]:trXt(wr[0],wr[1])&&(wr[1]=ea[1]),Xt(ea[0],wr[1])>Xt(wr[0],wr[1])&&(wr[0]=ea[0])):ba.push(wr=ea);for(Ia=-1/0,Fr=ba.length-1,tr=0,wr=ba[Fr];tr<=Fr;wr=ea,++tr)ea=ba[tr],(Na=Xt(wr[1],ea[0]))>Ia&&(Ia=Na,Ie=ea[0],Ge=wr[1])}return Be=Xe=null,Ie===1/0||Ve===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ve],[Ge,ke]]}var ht,De,Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt,Ht,Sr,Kr,Yt={sphere:I,point:Rt,lineStart:ur,lineEnd:Qr,polygonStart:function(){Yt.lineStart=Zr,Yt.lineEnd=ha},polygonEnd:function(){Yt.lineStart=ur,Yt.lineEnd=Qr}};function Rt(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);nr(Fr*i(Ft),Fr*_(Ft),_(tr))}function nr(Ft,tr,Fr){++ht,Ne+=(Ft-Ne)/ht,We+=(tr-We)/ht,Ke+=(Fr-Ke)/ht}function ur(){Yt.point=cr}function cr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),Yt.point=Rr,nr(Ht,Sr,Kr)}function Rr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=g(f((Ia=Sr*ba-Kr*ea)*Ia+(Ia=Kr*wr-Ht*ba)*Ia+(Ia=Ht*ea-Sr*wr)*Ia),Ht*wr+Sr*ea+Kr*ba);De+=Ia,Je+=Ia*(Ht+(Ht=wr)),et+=Ia*(Sr+(Sr=ea)),Mt+=Ia*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function Qr(){Yt.point=Rt}function Zr(){Yt.point=Pa}function ha(){La(qt,Vt),Yt.point=Rt}function Pa(Ft,tr){qt=Ft,Vt=tr,Ft*=m,tr*=m,Yt.point=La;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),nr(Ht,Sr,Kr)}function La(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=Sr*ba-Kr*ea,Na=Kr*wr-Ht*ba,Za=Ht*ea-Sr*wr,mn=f(Ia*Ia+Na*Na+Za*Za),Da=x(mn),Ha=mn&&-Da/mn;pt+=Ha*Ia,Pt+=Ha*Na,Ct+=Ha*Za,De+=Da,Je+=Da*(Ht+(Ht=wr)),et+=Da*(Sr+(Sr=ea)),Mt+=Da*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function un(Ft){ht=De=Ne=We=Ke=Je=et=Mt=pt=Pt=Ct=0,j(Ft,Yt);var tr=pt,Fr=Pt,wr=Ct,ea=tr*tr+Fr*Fr+wr*wr;return ear?Ft+Math.round(-Ft/s)*s:Ft,tr]}Nn.invert=Nn;function yn(Ft,tr,Fr){return(Ft%=s)?tr||Fr?ja(li(Ft),Yn(tr,Fr)):li(Ft):tr||Fr?Yn(tr,Fr):Nn}function Un(Ft){return function(tr,Fr){return tr+=Ft,[tr>r?tr-s:tr<-r?tr+s:tr,Fr]}}function li(Ft){var tr=Un(Ft);return tr.invert=Un(-Ft),tr}function Yn(Ft,tr){var Fr=i(Ft),wr=_(Ft),ea=i(tr),ba=_(tr);function Ia(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*Fr+Da*wr;return[g(Ha*ea-vn*ba,Da*Fr-$a*wr),x(vn*ea+Ha*ba)]}return Ia.invert=function(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*ea-Ha*ba;return[g(Ha*ea+$a*ba,Da*Fr+vn*wr),x(vn*Fr-Da*wr)]},Ia}function on(Ft){Ft=yn(Ft[0]*m,Ft[1]*m,Ft.length>2?Ft[2]*m:0);function tr(Fr){return Fr=Ft(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr}return tr.invert=function(Fr){return Fr=Ft.invert(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr},tr}function en(Ft,tr,Fr,wr,ea,ba){if(Fr){var Ia=i(tr),Na=_(tr),Za=wr*Fr;ea==null?(ea=tr+wr*s,ba=tr-Za/2):(ea=vi(Ia,ea),ba=vi(Ia,ba),(wr>0?eaba)&&(ea+=wr*s));for(var mn,Da=ea;wr>0?Da>ba:Da1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var Fr=Ft;return Ft=[],tr=null,Fr}}}function Oa(Ft,tr){return h(Ft[0]-tr[0])=0;--Na)ea.point((Ha=Da[Na])[0],Ha[1]);else wr($a.x,$a.p.x,-1,ea);$a=$a.p}$a=$a.o,Da=$a.z,vn=!vn}while(!$a.v);ea.lineEnd()}}}function fr(Ft){if(tr=Ft.length){for(var tr,Fr=0,wr=Ft[0],ea;++Fr=0?1:-1,Fo=Do*Co,Yo=Fo>r,bo=yi*Ni;if(lr.add(g(bo*Do*_(Fo),_i*Zi+bo*i(Fo))),Ia+=Yo?Co+Do*s:Co,Yo^vn>=Fr^kn>=Fr){var Gs=xe(ae($a),ae(ri));Se(Gs);var Es=xe(ba,Gs);Se(Es);var ns=(Yo^Co>=0?-1:1)*x(Es[2]);(wr>ns||wr===ns&&(Gs[0]||Gs[1]))&&(Na+=Yo^Co>=0?1:-1)}}return(Ia<-t||Ia0){for(Za||(ea.polygonStart(),Za=!0),ea.lineStart(),Zi=0;Zi1&&Ln&2&&Ni.push(Ni.pop().concat(Ni.shift())),Da.push(Ni.filter(ot))}}return $a}}function ot(Ft){return Ft.length>1}function kt(Ft,tr){return((Ft=Ft.x)[0]<0?Ft[1]-a-t:a-Ft[1])-((tr=tr.x)[0]<0?tr[1]-a-t:a-tr[1])}var jt=Dr(function(){return!0},ar,xr,[-r,-a]);function ar(Ft){var tr=NaN,Fr=NaN,wr=NaN,ea;return{lineStart:function(){Ft.lineStart(),ea=1},point:function(ba,Ia){var Na=ba>0?r:-r,Za=h(ba-tr);h(Za-r)0?a:-a),Ft.point(wr,Fr),Ft.lineEnd(),Ft.lineStart(),Ft.point(Na,Fr),Ft.point(ba,Fr),ea=0):wr!==Na&&Za>=r&&(h(tr-wr)t?v((_(tr)*(ba=i(wr))*_(Fr)-_(wr)*(ea=i(tr))*_(Ft))/(ea*ba*Ia)):(tr+wr)/2}function xr(Ft,tr,Fr,wr){var ea;if(Ft==null)ea=Fr*a,wr.point(-r,ea),wr.point(0,ea),wr.point(r,ea),wr.point(r,0),wr.point(r,-ea),wr.point(0,-ea),wr.point(-r,-ea),wr.point(-r,0),wr.point(-r,ea);else if(h(Ft[0]-tr[0])>t){var ba=Ft[0]0,ea=h(tr)>t;function ba(Da,Ha,$a,vn){en(vn,Ft,Fr,$a,Da,Ha)}function Ia(Da,Ha){return i(Da)*i(Ha)>tr}function Na(Da){var Ha,$a,vn,En,yi;return{lineStart:function(){En=vn=!1,yi=1},point:function(_i,ki){var ri=[_i,ki],kn,Ln=Ia(_i,ki),Ni=wr?Ln?0:mn(_i,ki):Ln?mn(_i+(_i<0?r:-r),ki):0;if(!Ha&&(En=vn=Ln)&&Da.lineStart(),Ln!==vn&&(kn=Za(Ha,ri),(!kn||Oa(Ha,kn)||Oa(ri,kn))&&(ri[2]=1)),Ln!==vn)yi=0,Ln?(Da.lineStart(),kn=Za(ri,Ha),Da.point(kn[0],kn[1])):(kn=Za(Ha,ri),Da.point(kn[0],kn[1],2),Da.lineEnd()),Ha=kn;else if(ea&&Ha&&wr^Ln){var Zi;!(Ni&$a)&&(Zi=Za(ri,Ha,!0))&&(yi=0,wr?(Da.lineStart(),Da.point(Zi[0][0],Zi[0][1]),Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd()):(Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd(),Da.lineStart(),Da.point(Zi[0][0],Zi[0][1],3)))}Ln&&(!Ha||!Oa(Ha,ri))&&Da.point(ri[0],ri[1]),Ha=ri,vn=Ln,$a=Ni},lineEnd:function(){vn&&Da.lineEnd(),Ha=null},clean:function(){return yi|(En&&vn)<<1}}}function Za(Da,Ha,$a){var vn=ae(Da),En=ae(Ha),yi=[1,0,0],_i=xe(vn,En),ki=he(_i,_i),ri=_i[0],kn=ki-ri*ri;if(!kn)return!$a&&Da;var Ln=tr*ki/kn,Ni=-tr*ri/kn,Zi=xe(yi,_i),Co=Me(yi,Ln),Do=Me(_i,Ni);we(Co,Do);var Fo=Zi,Yo=he(Co,Fo),bo=he(Fo,Fo),Gs=Yo*Yo-bo*(he(Co,Co)-1);if(!(Gs<0)){var Es=f(Gs),ns=Me(Fo,(-Yo-Es)/bo);if(we(ns,Co),ns=ee(ns),!$a)return ns;var Kn=Da[0],zo=Ha[0],gs=Da[1],js=Ha[1],Cl;zo0^ns[1]<(h(ns[0]-Kn)r^(Kn<=ns[0]&&ns[0]<=zo)){var xl=Me(Fo,(-Yo+Es)/bo);return we(xl,Co),[ns,ee(xl)]}}}function mn(Da,Ha){var $a=wr?Ft:r-Ft,vn=0;return Da<-$a?vn|=1:Da>$a&&(vn|=2),Ha<-$a?vn|=4:Ha>$a&&(vn|=8),vn}return Dr(Ia,Na,ba,wr?[0,-Ft]:[-r,Ft-r])}function Lr(Ft,tr,Fr,wr,ea,ba){var Ia=Ft[0],Na=Ft[1],Za=tr[0],mn=tr[1],Da=0,Ha=1,$a=Za-Ia,vn=mn-Na,En;if(En=Fr-Ia,!(!$a&&En>0)){if(En/=$a,$a<0){if(En0){if(En>Ha)return;En>Da&&(Da=En)}if(En=ea-Ia,!(!$a&&En<0)){if(En/=$a,$a<0){if(En>Ha)return;En>Da&&(Da=En)}else if($a>0){if(En0)){if(En/=vn,vn<0){if(En0){if(En>Ha)return;En>Da&&(Da=En)}if(En=ba-Na,!(!vn&&En<0)){if(En/=vn,vn<0){if(En>Ha)return;En>Da&&(Da=En)}else if(vn>0){if(En0&&(Ft[0]=Ia+Da*$a,Ft[1]=Na+Da*vn),Ha<1&&(tr[0]=Ia+Ha*$a,tr[1]=Na+Ha*vn),!0}}}}}var aa=1e9,Sa=-aa;function wa(Ft,tr,Fr,wr){function ea(mn,Da){return Ft<=mn&&mn<=Fr&&tr<=Da&&Da<=wr}function ba(mn,Da,Ha,$a){var vn=0,En=0;if(mn==null||(vn=Ia(mn,Ha))!==(En=Ia(Da,Ha))||Za(mn,Da)<0^Ha>0)do $a.point(vn===0||vn===3?Ft:Fr,vn>1?wr:tr);while((vn=(vn+Ha+4)%4)!==En);else $a.point(Da[0],Da[1])}function Ia(mn,Da){return h(mn[0]-Ft)0?0:3:h(mn[0]-Fr)0?2:1:h(mn[1]-tr)0?1:0:Da>0?3:2}function Na(mn,Da){return Za(mn.x,Da.x)}function Za(mn,Da){var Ha=Ia(mn,1),$a=Ia(Da,1);return Ha!==$a?Ha-$a:Ha===0?Da[1]-mn[1]:Ha===1?mn[0]-Da[0]:Ha===2?mn[1]-Da[1]:Da[0]-mn[0]}return function(mn){var Da=mn,Ha=Ja(),$a,vn,En,yi,_i,ki,ri,kn,Ln,Ni,Zi,Co={point:Do,lineStart:Gs,lineEnd:Es,polygonStart:Yo,polygonEnd:bo};function Do(Kn,zo){ea(Kn,zo)&&Da.point(Kn,zo)}function Fo(){for(var Kn=0,zo=0,gs=vn.length;zowr&&(Hu-Gu)*(wr-xl)>(Su-xl)*(Ft-Gu)&&++Kn:Su<=wr&&(Hu-Gu)*(wr-xl)<(Su-xl)*(Ft-Gu)&&--Kn;return Kn}function Yo(){Da=Ha,$a=[],vn=[],Zi=!0}function bo(){var Kn=Fo(),zo=Zi&&Kn,gs=($a=b.merge($a)).length;(zo||gs)&&(mn.polygonStart(),zo&&(mn.lineStart(),ba(null,null,1,mn),mn.lineEnd()),gs&&rt($a,Na,Kn,ba,mn),mn.polygonEnd()),Da=mn,$a=vn=En=null}function Gs(){Co.point=ns,vn&&vn.push(En=[]),Ni=!0,Ln=!1,ri=kn=NaN}function Es(){$a&&(ns(yi,_i),ki&&Ln&&Ha.rejoin(),$a.push(Ha.result())),Co.point=Do,Ln&&Da.lineEnd()}function ns(Kn,zo){var gs=ea(Kn,zo);if(vn&&En.push([Kn,zo]),Ni)yi=Kn,_i=zo,ki=gs,Ni=!1,gs&&(Da.lineStart(),Da.point(Kn,zo));else if(gs&&Ln)Da.point(Kn,zo);else{var js=[ri=Math.max(Sa,Math.min(aa,ri)),kn=Math.max(Sa,Math.min(aa,kn))],Cl=[Kn=Math.max(Sa,Math.min(aa,Kn)),zo=Math.max(Sa,Math.min(aa,zo))];Lr(js,Cl,Ft,tr,Fr,wr)?(Ln||(Da.lineStart(),Da.point(js[0],js[1])),Da.point(Cl[0],Cl[1]),gs||Da.lineEnd(),Zi=!1):gs&&(Da.lineStart(),Da.point(Kn,zo),Zi=!1)}ri=Kn,kn=zo,Ln=gs}return Co}}function pn(){var Ft=0,tr=0,Fr=960,wr=500,ea,ba,Ia;return Ia={stream:function(Na){return ea&&ba===Na?ea:ea=wa(Ft,tr,Fr,wr)(ba=Na)},extent:function(Na){return arguments.length?(Ft=+Na[0][0],tr=+Na[0][1],Fr=+Na[1][0],wr=+Na[1][1],ea=ba=null,Ia):[[Ft,tr],[Fr,wr]]}}}var tn=E(),ai,rn,Ri,Gn={sphere:I,point:I,lineStart:no,lineEnd:I,polygonStart:I,polygonEnd:I};function no(){Gn.point=fn,Gn.lineEnd=Di}function Di(){Gn.point=Gn.lineEnd=I}function fn(Ft,tr){Ft*=m,tr*=m,ai=Ft,rn=_(tr),Ri=i(tr),Gn.point=Ai}function Ai(Ft,tr){Ft*=m,tr*=m;var Fr=_(tr),wr=i(tr),ea=h(Ft-ai),ba=i(ea),Ia=_(ea),Na=wr*Ia,Za=Ri*Fr-rn*wr*ba,mn=rn*Fr+Ri*wr*ba;tn.add(g(f(Na*Na+Za*Za),mn)),ai=Ft,rn=Fr,Ri=wr}function jn(Ft){return tn.reset(),j(Ft,Gn),+tn}var Xn=[null,null],eo={type:"LineString",coordinates:Xn};function gi(Ft,tr){return Xn[0]=Ft,Xn[1]=tr,jn(eo)}var qi={Feature:function(Ft,tr){return oo(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr0&&(ea=gi(Ft[ba],Ft[ba-1]),ea>0&&Fr<=ea&&wr<=ea&&(Fr+wr-ea)*(1-Math.pow((Fr-wr)/ea,2))t}).map($a)).concat(b.range(w(ba/mn)*mn,ea,mn).filter(function(kn){return h(kn%Ha)>t}).map(vn))}return ki.lines=function(){return ri().map(function(kn){return{type:"LineString",coordinates:kn}})},ki.outline=function(){return{type:"Polygon",coordinates:[En(wr).concat(yi(Ia).slice(1),En(Fr).reverse().slice(1),yi(Na).reverse().slice(1))]}},ki.extent=function(kn){return arguments.length?ki.extentMajor(kn).extentMinor(kn):ki.extentMinor()},ki.extentMajor=function(kn){return arguments.length?(wr=+kn[0][0],Fr=+kn[1][0],Na=+kn[0][1],Ia=+kn[1][1],wr>Fr&&(kn=wr,wr=Fr,Fr=kn),Na>Ia&&(kn=Na,Na=Ia,Ia=kn),ki.precision(_i)):[[wr,Na],[Fr,Ia]]},ki.extentMinor=function(kn){return arguments.length?(tr=+kn[0][0],Ft=+kn[1][0],ba=+kn[0][1],ea=+kn[1][1],tr>Ft&&(kn=tr,tr=Ft,Ft=kn),ba>ea&&(kn=ba,ba=ea,ea=kn),ki.precision(_i)):[[tr,ba],[Ft,ea]]},ki.step=function(kn){return arguments.length?ki.stepMajor(kn).stepMinor(kn):ki.stepMinor()},ki.stepMajor=function(kn){return arguments.length?(Da=+kn[0],Ha=+kn[1],ki):[Da,Ha]},ki.stepMinor=function(kn){return arguments.length?(Za=+kn[0],mn=+kn[1],ki):[Za,mn]},ki.precision=function(kn){return arguments.length?(_i=+kn,$a=Eo(ba,ea,90),vn=Ao(tr,Ft,_i),En=Eo(Na,Ia,90),yi=Ao(wr,Fr,_i),ki):_i},ki.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function jo(){return ds()()}function Wo(Ft,tr){var Fr=Ft[0]*m,wr=Ft[1]*m,ea=tr[0]*m,ba=tr[1]*m,Ia=i(wr),Na=_(wr),Za=i(ba),mn=_(ba),Da=Ia*i(Fr),Ha=Ia*_(Fr),$a=Za*i(ea),vn=Za*_(ea),En=2*x(f(z(ba-wr)+Ia*Za*z(ea-Fr))),yi=_(En),_i=En?function(ki){var ri=_(ki*=En)/yi,kn=_(En-ki)/yi,Ln=kn*Da+ri*$a,Ni=kn*Ha+ri*vn,Zi=kn*Na+ri*mn;return[g(Ni,Ln)*c,g(Zi,f(Ln*Ln+Ni*Ni))*c]}:function(){return[Fr*c,wr*c]};return _i.distance=En,_i}function to(Ft){return Ft}var wo=E(),pi=E(),Vi,Io,Xi,Ko,Uo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Uo.lineStart=Ls,Uo.lineEnd=Vs},polygonEnd:function(){Uo.lineStart=Uo.lineEnd=Uo.point=I,wo.add(h(pi)),pi.reset()},result:function(){var Ft=wo/2;return wo.reset(),Ft}};function Ls(){Uo.point=Ss}function Ss(Ft,tr){Uo.point=Vo,Vi=Xi=Ft,Io=Ko=tr}function Vo(Ft,tr){pi.add(Ko*Ft-Xi*tr),Xi=Ft,Ko=tr}function Vs(){Vo(Vi,Io)}var Ts=1/0,Bo=Ts,_o=-Ts,Pi=_o,yo={point:bs,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var Ft=[[Ts,Bo],[_o,Pi]];return _o=Pi=-(Bo=Ts=1/0),Ft}};function bs(Ft,tr){Ft_o&&(_o=Ft),trPi&&(Pi=tr)}var Dl=0,hl=0,ps=0,dl=0,wu=0,lu=0,xc=0,Fl=0,pl=0,$u,uu,tl,vs,os={point:ms,lineStart:rl,lineEnd:Ku,polygonStart:function(){os.lineStart=bc,os.lineEnd=Lh},polygonEnd:function(){os.point=ms,os.lineStart=rl,os.lineEnd=Ku},result:function(){var Ft=pl?[xc/pl,Fl/pl]:lu?[dl/lu,wu/lu]:ps?[Dl/ps,hl/ps]:[NaN,NaN];return Dl=hl=ps=dl=wu=lu=xc=Fl=pl=0,Ft}};function ms(Ft,tr){Dl+=Ft,hl+=tr,++ps}function rl(){os.point=Fu}function Fu(Ft,tr){os.point=zu,ms(tl=Ft,vs=tr)}function zu(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ms(tl=Ft,vs=tr)}function Ku(){os.point=ms}function bc(){os.point=rh}function Lh(){Ju($u,uu)}function rh(Ft,tr){os.point=Ju,ms($u=tl=Ft,uu=vs=tr)}function Ju(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ea=vs*Ft-tl*tr,xc+=ea*(tl+Ft),Fl+=ea*(vs+tr),pl+=ea*3,ms(tl=Ft,vs=tr)}function ss(Ft){this._context=Ft}ss.prototype={_radius:4.5,pointRadius:function(Ft){return this._radius=Ft,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(Ft,tr){switch(this._point){case 0:{this._context.moveTo(Ft,tr),this._point=1;break}case 1:{this._context.lineTo(Ft,tr);break}default:{this._context.moveTo(Ft+this._radius,tr),this._context.arc(Ft,tr,this._radius,0,s);break}}},result:I};var ah=E(),wc,pc,Nf,Bu,Tc,Ou={point:I,lineStart:function(){Ou.point=Gc},lineEnd:function(){wc&&pf(pc,Nf),Ou.point=I},polygonStart:function(){wc=!0},polygonEnd:function(){wc=null},result:function(){var Ft=+ah;return ah.reset(),Ft}};function Gc(Ft,tr){Ou.point=pf,pc=Bu=Ft,Nf=Tc=tr}function pf(Ft,tr){Bu-=Ft,Tc-=tr,ah.add(f(Bu*Bu+Tc*Tc)),Bu=Ft,Tc=tr}function $l(){this._string=[]}$l.prototype={_radius:4.5,_circle:jf(4.5),pointRadius:function(Ft){return(Ft=+Ft)!==this._radius&&(this._radius=Ft,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(Ft,tr){switch(this._point){case 0:{this._string.push("M",Ft,",",tr),this._point=1;break}case 1:{this._string.push("L",Ft,",",tr);break}default:{this._circle==null&&(this._circle=jf(this._radius)),this._string.push("M",Ft,",",tr,this._circle);break}}},result:function(){if(this._string.length){var Ft=this._string.join("");return this._string=[],Ft}else return null}};function jf(Ft){return"m0,"+Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+-2*Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+2*Ft+"z"}function Hc(Ft,tr){var Fr=4.5,wr,ea;function ba(Ia){return Ia&&(typeof Fr=="function"&&ea.pointRadius(+Fr.apply(this,arguments)),j(Ia,wr(ea))),ea.result()}return ba.area=function(Ia){return j(Ia,wr(Uo)),Uo.result()},ba.measure=function(Ia){return j(Ia,wr(Ou)),Ou.result()},ba.bounds=function(Ia){return j(Ia,wr(yo)),yo.result()},ba.centroid=function(Ia){return j(Ia,wr(os)),os.result()},ba.projection=function(Ia){return arguments.length?(wr=Ia==null?(Ft=null,to):(Ft=Ia).stream,ba):Ft},ba.context=function(Ia){return arguments.length?(ea=Ia==null?(tr=null,new $l):new ss(tr=Ia),typeof Fr!="function"&&ea.pointRadius(Fr),ba):tr},ba.pointRadius=function(Ia){return arguments.length?(Fr=typeof Ia=="function"?Ia:(ea.pointRadius(+Ia),+Ia),ba):Fr},ba.projection(Ft).context(tr)}function Wc(Ft){return{stream:Qu(Ft)}}function Qu(Ft){return function(tr){var Fr=new Yc;for(var wr in Ft)Fr[wr]=Ft[wr];return Fr.stream=tr,Fr}}function Yc(){}Yc.prototype={constructor:Yc,point:function(Ft,tr){this.stream.point(Ft,tr)},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 Nu(Ft,tr,Fr){var wr=Ft.clipExtent&&Ft.clipExtent();return Ft.scale(150).translate([0,0]),wr!=null&&Ft.clipExtent(null),j(Fr,Ft.stream(yo)),tr(yo.result()),wr!=null&&Ft.clipExtent(wr),Ft}function Uf(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=tr[1][0]-tr[0][0],ba=tr[1][1]-tr[0][1],Ia=Math.min(ea/(wr[1][0]-wr[0][0]),ba/(wr[1][1]-wr[0][1])),Na=+tr[0][0]+(ea-Ia*(wr[1][0]+wr[0][0]))/2,Za=+tr[0][1]+(ba-Ia*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*Ia).translate([Na,Za])},Fr)}function al(Ft,tr,Fr){return Uf(Ft,[[0,0],tr],Fr)}function Xc(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][0]-wr[0][0]),Ia=(ea-ba*(wr[1][0]+wr[0][0]))/2,Na=-ba*wr[0][1];Ft.scale(150*ba).translate([Ia,Na])},Fr)}function ju(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][1]-wr[0][1]),Ia=-ba*wr[0][0],Na=(ea-ba*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*ba).translate([Ia,Na])},Fr)}var Ac=16,Zc=i(30*m);function ec(Ft,tr){return+tr?tc(Ft,tr):cu(Ft)}function cu(Ft){return Qu({point:function(tr,Fr){tr=Ft(tr,Fr),this.stream.point(tr[0],tr[1])}})}function tc(Ft,tr){function Fr(wr,ea,ba,Ia,Na,Za,mn,Da,Ha,$a,vn,En,yi,_i){var ki=mn-wr,ri=Da-ea,kn=ki*ki+ri*ri;if(kn>4*tr&&yi--){var Ln=Ia+$a,Ni=Na+vn,Zi=Za+En,Co=f(Ln*Ln+Ni*Ni+Zi*Zi),Do=x(Zi/=Co),Fo=h(h(Zi)-1)tr||h((ki*Es+ri*ns)/kn-.5)>.3||Ia*$a+Na*vn+Za*En2?Kn[2]%360*m:0,Es()):[Na*c,Za*c,mn*c]},bo.angle=function(Kn){return arguments.length?(Ha=Kn%360*m,Es()):Ha*c},bo.reflectX=function(Kn){return arguments.length?($a=Kn?-1:1,Es()):$a<0},bo.reflectY=function(Kn){return arguments.length?(vn=Kn?-1:1,Es()):vn<0},bo.precision=function(Kn){return arguments.length?(Zi=ec(Co,Ni=Kn*Kn),ns()):f(Ni)},bo.fitExtent=function(Kn,zo){return Uf(bo,Kn,zo)},bo.fitSize=function(Kn,zo){return al(bo,Kn,zo)},bo.fitWidth=function(Kn,zo){return Xc(bo,Kn,zo)},bo.fitHeight=function(Kn,zo){return ju(bo,Kn,zo)};function Es(){var Kn=vl(Fr,0,0,$a,vn,Ha).apply(null,tr(ba,Ia)),zo=(Ha?vl:nh)(Fr,wr-Kn[0],ea-Kn[1],$a,vn,Ha);return Da=yn(Na,Za,mn),Co=ja(tr,zo),Do=ja(Da,Co),Zi=ec(Co,Ni),ns()}function ns(){return Fo=Yo=null,bo}return function(){return tr=Ft.apply(this,arguments),bo.invert=tr.invert&&Gs,Es()}}function yl(Ft){var tr=0,Fr=r/3,wr=rc(Ft),ea=wr(tr,Fr);return ea.parallels=function(ba){return arguments.length?wr(tr=ba[0]*m,Fr=ba[1]*m):[tr*c,Fr*c]},ea}function qf(Ft){var tr=i(Ft);function Fr(wr,ea){return[wr*tr,_(ea)/tr]}return Fr.invert=function(wr,ea){return[wr/tr,x(ea*tr)]},Fr}function ac(Ft,tr){var Fr=_(Ft),wr=(Fr+_(tr))/2;if(h(wr)=.12&&_i<.234&&yi>=-.425&&yi<-.214?ea:_i>=.166&&_i<.234&&yi>=-.214&&yi<-.115?Ia:Fr).invert($a)},Da.stream=function($a){return Ft&&tr===$a?Ft:Ft=Jo([Fr.stream(tr=$a),ea.stream($a),Ia.stream($a)])},Da.precision=function($a){return arguments.length?(Fr.precision($a),ea.precision($a),Ia.precision($a),Ha()):Fr.precision()},Da.scale=function($a){return arguments.length?(Fr.scale($a),ea.scale($a*.35),Ia.scale($a),Da.translate(Fr.translate())):Fr.scale()},Da.translate=function($a){if(!arguments.length)return Fr.translate();var vn=Fr.scale(),En=+$a[0],yi=+$a[1];return wr=Fr.translate($a).clipExtent([[En-.455*vn,yi-.238*vn],[En+.455*vn,yi+.238*vn]]).stream(mn),ba=ea.translate([En-.307*vn,yi+.201*vn]).clipExtent([[En-.425*vn+t,yi+.12*vn+t],[En-.214*vn-t,yi+.234*vn-t]]).stream(mn),Na=Ia.translate([En-.205*vn,yi+.212*vn]).clipExtent([[En-.214*vn+t,yi+.166*vn+t],[En-.115*vn-t,yi+.234*vn-t]]).stream(mn),Ha()},Da.fitExtent=function($a,vn){return Uf(Da,$a,vn)},Da.fitSize=function($a,vn){return al(Da,$a,vn)},Da.fitWidth=function($a,vn){return Xc(Da,$a,vn)},Da.fitHeight=function($a,vn){return ju(Da,$a,vn)};function Ha(){return Ft=tr=null,Da}return Da.scale(1070)}function fu(Ft){return function(tr,Fr){var wr=i(tr),ea=i(Fr),ba=Ft(wr*ea);return[ba*ea*_(tr),ba*_(Fr)]}}function Sl(Ft){return function(tr,Fr){var wr=f(tr*tr+Fr*Fr),ea=Ft(wr),ba=_(ea),Ia=i(ea);return[g(tr*ba,wr*Ia),x(wr&&Fr*ba/wr)]}}var El=fu(function(Ft){return f(2/(1+Ft))});El.invert=Sl(function(Ft){return 2*x(Ft/2)});function oh(){return ml(El).scale(124.75).clipAngle(180-.001)}var Au=fu(function(Ft){return(Ft=A(Ft))&&Ft/_(Ft)});Au.invert=Sl(function(Ft){return Ft});function $c(){return ml(Au).scale(79.4188).clipAngle(180-.001)}function _l(Ft,tr){return[Ft,M(u((a+tr)/2))]}_l.invert=function(Ft,tr){return[Ft,2*v(S(tr))-a]};function nl(){return gf(_l).scale(961/s)}function gf(Ft){var tr=ml(Ft),Fr=tr.center,wr=tr.scale,ea=tr.translate,ba=tr.clipExtent,Ia=null,Na,Za,mn;tr.scale=function(Ha){return arguments.length?(wr(Ha),Da()):wr()},tr.translate=function(Ha){return arguments.length?(ea(Ha),Da()):ea()},tr.center=function(Ha){return arguments.length?(Fr(Ha),Da()):Fr()},tr.clipExtent=function(Ha){return arguments.length?(Ha==null?Ia=Na=Za=mn=null:(Ia=+Ha[0][0],Na=+Ha[0][1],Za=+Ha[1][0],mn=+Ha[1][1]),Da()):Ia==null?null:[[Ia,Na],[Za,mn]]};function Da(){var Ha=r*wr(),$a=tr(on(tr.rotate()).invert([0,0]));return ba(Ia==null?[[$a[0]-Ha,$a[1]-Ha],[$a[0]+Ha,$a[1]+Ha]]:Ft===_l?[[Math.max($a[0]-Ha,Ia),Na],[Math.min($a[0]+Ha,Za),mn]]:[[Ia,Math.max($a[1]-Ha,Na)],[Za,Math.min($a[1]+Ha,mn)]])}return Da()}function Kc(Ft){return u((a+Ft)/2)}function sh(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):M(Fr/i(tr))/M(Kc(tr)/Kc(Ft)),ea=Fr*C(Kc(Ft),wr)/wr;if(!wr)return _l;function ba(Ia,Na){ea>0?Na<-a+t&&(Na=-a+t):Na>a-t&&(Na=a-t);var Za=ea/C(Kc(Na),wr);return[Za*_(wr*Ia),ea-Za*i(wr*Ia)]}return ba.invert=function(Ia,Na){var Za=ea-Na,mn=T(wr)*f(Ia*Ia+Za*Za),Da=g(Ia,h(Za))*T(Za);return Za*wr<0&&(Da-=r*T(Ia)*T(Za)),[Da/wr,2*v(C(ea/mn,1/wr))-a]},ba}function hu(){return yl(sh).scale(109.5).parallels([30,30])}function Uu(Ft,tr){return[Ft,tr]}Uu.invert=Uu;function qu(){return ml(Uu).scale(152.63)}function nc(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):(Fr-i(tr))/(tr-Ft),ea=Fr/wr+Ft;if(h(wr)t&&--wr>0);return[Ft/(.8707+(ba=Fr*Fr)*(-.131979+ba*(-.013791+ba*ba*ba*(.003971-.001529*ba)))),Fr]};function Hf(){return ml(bh).scale(175.295)}function il(Ft,tr){return[i(tr)*_(Ft),_(tr)]}il.invert=Sl(x);function kl(){return ml(il).scale(249.5).clipAngle(90+t)}function kc(Ft,tr){var Fr=i(tr),wr=1+i(Ft)*Fr;return[Fr*_(Ft)/wr,_(tr)/wr]}kc.invert=Sl(function(Ft){return 2*v(Ft)});function Cc(){return ml(kc).scale(250).clipAngle(142)}function Lc(Ft,tr){return[M(u((a+tr)/2)),-Ft]}Lc.invert=function(Ft,tr){return[-tr,2*v(S(Ft))-a]};function vc(){var Ft=gf(Lc),tr=Ft.center,Fr=Ft.rotate;return Ft.center=function(wr){return arguments.length?tr([-wr[1],wr[0]]):(wr=tr(),[wr[1],-wr[0]])},Ft.rotate=function(wr){return arguments.length?Fr([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Fr(),[wr[0],wr[1],wr[2]-90])},Fr([0,0,90]).scale(159.155)}p.geoAlbers=mf,p.geoAlbersUsa=ih,p.geoArea=Z,p.geoAzimuthalEqualArea=oh,p.geoAzimuthalEqualAreaRaw=El,p.geoAzimuthalEquidistant=$c,p.geoAzimuthalEquidistantRaw=Au,p.geoBounds=vt,p.geoCentroid=un,p.geoCircle=Yi,p.geoClipAntimeridian=jt,p.geoClipCircle=zr,p.geoClipExtent=pn,p.geoClipRectangle=wa,p.geoConicConformal=hu,p.geoConicConformalRaw=sh,p.geoConicEqualArea=Mc,p.geoConicEqualAreaRaw=ac,p.geoConicEquidistant=yf,p.geoConicEquidistantRaw=nc,p.geoContains=go,p.geoDistance=gi,p.geoEqualEarth=xh,p.geoEqualEarthRaw=Ec,p.geoEquirectangular=qu,p.geoEquirectangularRaw=Uu,p.geoGnomonic=xf,p.geoGnomonicRaw=Vf,p.geoGraticule=ds,p.geoGraticule10=jo,p.geoIdentity=Gf,p.geoInterpolate=Wo,p.geoLength=jn,p.geoMercator=nl,p.geoMercatorRaw=_l,p.geoNaturalEarth1=Hf,p.geoNaturalEarth1Raw=bh,p.geoOrthographic=kl,p.geoOrthographicRaw=il,p.geoPath=Hc,p.geoProjection=ml,p.geoProjectionMutator=rc,p.geoRotation=on,p.geoStereographic=Cc,p.geoStereographicRaw=kc,p.geoStream=j,p.geoTransform=Wc,p.geoTransverseMercator=vc,p.geoTransverseMercatorRaw=Lc,Object.defineProperty(p,"__esModule",{value:!0})})}}),_j=ze({"src/lib/usa_location_names.js"(J,V){"use strict";var p={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},b=new Set(Object.values(p));V.exports={usaLocationAbbreviations:b,usaLocationList:p}}}),kA={};bu(kA,{COUNTRIES_X:()=>CA});var CA,xj=zi({"src/lib/custom_country_codes.ts"(){"use strict";CA=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),hp=ze({"src/lib/geo_location_utils.js"(J,V){"use strict";var p=ci(),{COUNTRIES:b,createLookup:E}=vj(),{area:k}=mj(),{centroid:l}=gj(),{coordAll:e}=k2(),{geoBounds:t}=C2(),n=s1(),r=ap(),a=tv(),o=r1(),s=p1(),{usaLocationAbbreviations:c,usaLocationList:m}=_j(),{COUNTRIES_X:h}=(xj(),Po(kA)),{lookupAlpha3:v}=E([...b,...h]),g={"ISO-3":n,"USA-states":w,"country names":i};function i(P){let j=v(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function w(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():m[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var $;if(!j||typeof j!="string")return!1;let Q=g[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ne of U)(($=ne?.properties)==null?void 0:$.gu)==="USA"&&re.push(ne)}else re=U;for(let ne of re)if(ne.id===Q)return ne;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,$=P.id,Q=[],re,ne,se,G;switch($==="RUS"||$==="FJI"?re=function(X){var K;if(C(X)===null)K=X;else for(K=new Array(X.length),G=0;GK?H[Y++]=[X[G][0]+M,X[G][1]]:G===K?(H[Y++]=X[G],H[Y++]=[X[G][0],-90]):H[Y++]=X[G];var q=s.tester(H);q.pts.pop(),Q.push(q)}:re=function(X){Q.push(s.tester(X))},j.type){case"MultiPolygon":for(ne=0;neQ&&(Q=se,U=ne)}else U=j;return!U||!U.coordinates.some(G=>G.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function $(G){return new Promise(function(X,K){p.json(G,function(H,Y){if(H){delete j[G];var q=H.status===404?'GeoJSON at URL "'+G+'" does not exist.':"Unexpected error while fetching from "+G;return K(new Error(q))}return j[G]=Y,X(Y)})})}function Q(G){return new Promise(function(X,K){var H=0,Y=setInterval(function(){if(j[G]&&j[G]!=="pending")return clearInterval(Y),X(j[G]);if(H>100)return clearInterval(Y),K("Unexpected error while fetching from "+G);H++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ne]=P[0];return[re,ne,re,ne]}let[[j,U],[$,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,$])[1],Q]}var O=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",D=(P,j)=>O(P,j)?z(T(P)):[],B=(P,j)=>I(D(P,j));function F([P,j]){return[P,P>j?j+M:j]}V.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:T,extractTraceFeature:f,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:x,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:D,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),LA=ze({"src/traces/scattergeo/style.js"(J,V){"use strict";var p=ci(),b=$i(),E=Qn(),k=Ch(),l=k.stylePoints,e=k.styleText;V.exports=function(r,a){a&&t(r,a)};function t(n,r){var a=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,a,n),e(o,a,n),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=p.select(this),m=s.trace,h=m.line||{};c.call(E.stroke,h.color).call(b.dashLine,h.dash||"",h.width||0),m.fill!=="none"&&c.call(E.fill,m.fillcolor)})}}}),L2=ze({"src/traces/scattergeo/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=S2().getTopojsonFeatures,k=Q1(),l=hp(),e=md().findExtremes,t=No().BADNUM,n=sd().calcMarkerSize,r=el(),a=LA();function o(m,h,v){var g=h.layers.frontplot.select(".scatterlayer"),i=b.makeTraceGroups(g,v,"trace scattergeo");function w(S,M){S.lonlat[0]===t&&p.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=p.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),T=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:T,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(b.identity).enter().append("path").classed("point",!0).each(function(f){w(f,this)}),r.hasText(C)&&M.selectAll("g").data(b.identity).enter().append("g").append("text").each(function(f){w(f,this)}),a(m,S)})}function s(m,h){var v=m[0].trace,g=h[v.geo],i=g._subplot,w=v._length,S,M;if(b.isArrayOrTypedArray(v.locations)){var C=v.locationmode,_=C==="geojson-id"?l.extractTraceFeature(m):E(v,i.topojson);for(S=0;S")}}}),wj=ze({"src/traces/scattergeo/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.lon=E.lon,b.lat=E.lat,b.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b}}}),Tj=ze({"src/traces/scattergeo/select.js"(J,V){"use strict";var p=el(),b=No().BADNUM;V.exports=function(k,l){var e=k.cd,t=k.xaxis,n=k.yaxis,r=[],a=e[0].trace,o,s,c,m,h,v=!p.hasMarkers(a)&&!p.hasText(a);if(v)return[];if(l===!1)for(h=0;hH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:$e<0?-1:0},v=Math.sin,g=Math.tan,i=1e-6,w=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,T=D(2),f=D(S),u=S*2,A=180/S,x=S/180;function z($e){return $e?$e/Math.sin($e):1}function I($e){return $e>1?M:$e<-1?-M:Math.asin($e)}function O($e){return $e>1?0:$e<-1?S:Math.acos($e)}function D($e){return $e>0?Math.sqrt($e):0}function B($e){return $e=n(2*$e),($e-1)/($e+1)}function F($e){return(n($e)-n(-$e))/2}function P($e){return(n($e)+n(-$e))/2}function j($e){return a($e+D($e*$e+1))}function U($e){return a($e+D($e*$e-1))}function $($e){var nt=g($e/2),mt=2*a(t($e/2))/(nt*nt);function xt(Bt,zt){var Wt=t(Bt),Pr=t(zt),Br=v(zt),kr=Pr*Wt,jr=-((1-kr?a((1+kr)/2)/(1-kr):-.5)+mt/(1+kr));return[jr*Pr*v(Bt),jr*Br]}return xt.invert=function(Bt,zt){var Wt=D(Bt*Bt+zt*zt),Pr=-$e/2,Br=50,kr;if(!Wt)return[0,0];do{var jr=Pr/2,Jr=t(jr),la=v(jr),xa=la/Jr,Ba=-a(k(Jr));Pr-=kr=(2/xa*Ba-mt*xa-Wt)/(-Ba/(la*la)+1-mt/(2*Jr*Jr))*(Jr<0?.7:1)}while(k(kr)>i&&--Br>0);var an=v(Pr);return[e(Bt*an,Wt*t(Pr)),I(zt*an/Wt)]},xt}function Q(){var $e=M,nt=b.geoProjectionMutator($),mt=nt($e);return mt.radius=function(xt){return arguments.length?nt($e=xt*x):$e*A},mt.scale(179.976).clipAngle(147)}function re($e,nt){var mt=t(nt),xt=z(O(mt*t($e/=2)));return[2*mt*v($e)*xt,v(nt)*xt]}re.invert=function($e,nt){if(!($e*$e+4*nt*nt>S*S+i)){var mt=$e,xt=nt,Bt=25;do{var zt=v(mt),Wt=v(mt/2),Pr=t(mt/2),Br=v(xt),kr=t(xt),jr=v(2*xt),Jr=Br*Br,la=kr*kr,xa=Wt*Wt,Ba=1-la*Pr*Pr,an=Ba?O(kr*Pr)*D(Tn=1/Ba):Tn=0,Tn,ii=2*an*kr*Wt-$e,Si=an*Br-nt,oi=Tn*(la*xa+an*kr*Pr*Jr),Ji=Tn*(.5*zt*jr-an*2*Br*Wt),Qi=Tn*.25*(jr*Wt-an*Br*la*zt),Oo=Tn*(Jr*Pr+an*xa*kr),Qo=Ji*Qi-Oo*oi;if(!Qo)break;var vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]}};function ne(){return b.geoProjection(re).scale(152.63)}function se($e){var nt=v($e),mt=t($e),xt=$e>=0?1:-1,Bt=g(xt*$e),zt=(1+nt-mt)/2;function Wt(Pr,Br){var kr=t(Br),jr=t(Pr/=2);return[(1+kr)*v(Pr),(xt*Br>-e(jr,Bt)-.001?0:-xt*10)+zt+v(Br)*mt-(1+kr)*nt*jr]}return Wt.invert=function(Pr,Br){var kr=0,jr=0,Jr=50;do{var la=t(kr),xa=v(kr),Ba=t(jr),an=v(jr),Tn=1+Ba,ii=Tn*xa-Pr,Si=zt+an*mt-Tn*nt*la-Br,oi=Tn*la/2,Ji=-xa*an,Qi=nt*Tn*xa/2,Oo=mt*Ba+nt*la*an,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo/2,ys=(ii*Qi-Si*oi)/Qo;k(ys)>2&&(ys/=2),kr-=vo,jr-=ys}while((k(vo)>i||k(ys)>i)&&--Jr>0);return xt*jr>-e(t(kr),Bt)-.001?[kr*2,jr]:null},Wt}function G(){var $e=20*x,nt=$e>=0?1:-1,mt=g(nt*$e),xt=b.geoProjectionMutator(se),Bt=xt($e),zt=Bt.stream;return Bt.parallel=function(Wt){return arguments.length?(mt=g((nt=($e=Wt*x)>=0?1:-1)*$e),xt($e)):$e*A},Bt.stream=function(Wt){var Pr=Bt.rotate(),Br=zt(Wt),kr=(Bt.rotate([0,0]),zt(Wt)),jr=Bt.precision();return Bt.rotate(Pr),Br.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Jr=nt*-180;nt*Jr<180;Jr+=nt*90)kr.point(Jr,nt*90);if($e)for(;nt*(Jr-=3*nt*jr)>=-180;)kr.point(Jr,nt*-e(t(Jr*x/2),mt)*A);kr.lineEnd(),kr.polygonEnd()},Br},Bt.scale(218.695).center([0,28.0974])}function X($e,nt){var mt=g(nt/2),xt=D(1-mt*mt),Bt=1+xt*t($e/=2),zt=v($e)*xt/Bt,Wt=mt/Bt,Pr=zt*zt,Br=Wt*Wt;return[4/3*zt*(3+Pr-3*Br),4/3*Wt*(3+3*Pr-Br)]}X.invert=function($e,nt){if($e*=3/8,nt*=3/8,!$e&&k(nt)>1)return null;var mt=$e*$e,xt=nt*nt,Bt=1+mt+xt,zt=D((Bt-D(Bt*Bt-4*nt*nt))/2),Wt=I(zt)/3,Pr=zt?U(k(nt/zt))/3:j(k($e))/3,Br=t(Wt),kr=P(Pr),jr=kr*kr-Br*Br;return[h($e)*2*e(F(Pr)*Br,.25-jr),h(nt)*2*e(kr*v(Wt),.25+jr)]};function K(){return b.geoProjection(X).scale(66.1603)}var H=D(8),Y=a(1+T);function q($e,nt){var mt=k(nt);return mtw&&--xt>0);return[$e/(t(mt)*(H-1/v(mt))),h(nt)*mt]};function Z(){return b.geoProjection(q).scale(112.314)}function ee($e){var nt=2*S/$e;function mt(xt,Bt){var zt=b.geoAzimuthalEquidistantRaw(xt,Bt);if(k(xt)>M){var Wt=e(zt[1],zt[0]),Pr=D(zt[0]*zt[0]+zt[1]*zt[1]),Br=nt*m((Wt-M)/nt)+M,kr=e(v(Wt-=Br),2-t(Wt));Wt=Br+I(S/Pr*v(kr))-kr,zt[0]=Pr*t(Wt),zt[1]=Pr*v(Wt)}return zt}return mt.invert=function(xt,Bt){var zt=D(xt*xt+Bt*Bt);if(zt>M){var Wt=e(Bt,xt),Pr=nt*m((Wt-M)/nt)+M,Br=Wt>Pr?-1:1,kr=zt*t(Pr-Wt),jr=1/g(Br*O((kr-S)/D(S*(S-2*kr)+zt*zt)));Wt=Pr+2*l((jr+Br*D(jr*jr-3))/3),xt=zt*t(Wt),Bt=zt*v(Wt)}return b.geoAzimuthalEquidistantRaw.invert(xt,Bt)},mt}function ae(){var $e=5,nt=b.geoProjectionMutator(ee),mt=nt($e),xt=mt.stream,Bt=.01,zt=-t(Bt*x),Wt=v(Bt*x);return mt.lobes=function(Pr){return arguments.length?nt($e=+Pr):$e},mt.stream=function(Pr){var Br=mt.rotate(),kr=xt(Pr),jr=(mt.rotate([0,0]),xt(Pr));return mt.rotate(Br),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Jr=0,la=360/$e,xa=2*S/$e,Ba=90-180/$e,an=M;Jr<$e;++Jr,Ba-=la,an-=xa)jr.point(e(Wt*t(an),zt)*A,I(Wt*v(an))*A),Ba<-90?(jr.point(-90,-180-Ba-Bt),jr.point(-90,-180-Ba+Bt)):(jr.point(90,Ba+Bt),jr.point(90,Ba-Bt));jr.lineEnd(),jr.polygonEnd()},kr},mt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function he($e,nt){if(arguments.length<2&&(nt=$e),nt===1)return b.geoAzimuthalEqualAreaRaw;if(nt===1/0)return xe;function mt(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw(xt/nt,Bt);return zt[0]*=$e,zt}return mt.invert=function(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw.invert(xt/$e,Bt);return zt[0]*=nt,zt},mt}function xe($e,nt){return[$e*t(nt)/t(nt/=2),2*v(nt)]}xe.invert=function($e,nt){var mt=2*I(nt/2);return[$e*t(mt/2)/t(mt),mt]};function we(){var $e=2,nt=b.geoProjectionMutator(he),mt=nt($e);return mt.coefficient=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(169.529)}function Me($e,nt,mt){var xt=100,Bt,zt,Wt;mt=mt===void 0?0:+mt,nt=+nt;do zt=$e(mt),Wt=$e(mt+i),zt===Wt&&(Wt=zt+i),mt-=Bt=-1*i*(zt-nt)/(zt-Wt);while(xt-- >0&&k(Bt)>i);return xt<0?NaN:mt}function Se($e,nt,mt){return nt===void 0&&(nt=40),mt===void 0&&(mt=w),function(xt,Bt,zt,Wt){var Pr,Br,kr;zt=zt===void 0?0:+zt,Wt=Wt===void 0?0:+Wt;for(var jr=0;jrPr){zt-=Br/=2,Wt-=kr/=2;continue}Pr=Ba;var an=(zt>0?-1:1)*mt,Tn=(Wt>0?-1:1)*mt,ii=$e(zt+an,Wt),Si=$e(zt,Wt+Tn),oi=(ii[0]-Jr[0])/an,Ji=(ii[1]-Jr[1])/an,Qi=(Si[0]-Jr[0])/Tn,Oo=(Si[1]-Jr[1])/Tn,Qo=Oo*oi-Ji*Qi,vo=(k(Qo)<.5?.5:1)/Qo;if(Br=(xa*Qi-la*Oo)*vo,kr=(la*Ji-xa*oi)*vo,zt+=Br,Wt+=kr,k(Br)0&&(Pr[1]*=1+Br/1.5*Pr[0]*Pr[0]),Pr}return xt.invert=Se(xt),xt}function Ve(){return b.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ge($e,nt){var mt=$e*v(nt),xt=30,Bt;do nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));while(k(Bt)>i&&--xt>0);return nt/2}function ke($e,nt,mt){function xt(Bt,zt){return[$e*Bt*t(zt=Ge(mt,zt)),nt*v(zt)]}return xt.invert=function(Bt,zt){return zt=I(zt/nt),[Bt/($e*t(zt)),I((2*zt+v(2*zt))/mt)]},xt}var _e=ke(T/M,T,S);function ce(){return b.geoProjection(_e).scale(169.529)}var ve=2.00276,le=1.11072;function Ae($e,nt){var mt=Ge(S,nt);return[ve*$e/(1/t(nt)+le/t(mt)),(nt+T*v(mt))/ve]}Ae.invert=function($e,nt){var mt=ve*nt,xt=nt<0?-C:C,Bt=25,zt,Wt;do Wt=mt-T*v(xt),xt-=zt=(v(2*xt)+2*xt-S*v(Wt))/(2*t(2*xt)+2+S*t(Wt)*T*t(xt));while(k(zt)>i&&--Bt>0);return Wt=mt-T*v(xt),[$e*(1/t(Wt)+le/t(xt))/ve,Wt]};function Be(){return b.geoProjection(Ae).scale(160.857)}function Xe($e){var nt=0,mt=b.geoProjectionMutator($e),xt=mt(nt);return xt.parallel=function(Bt){return arguments.length?mt(nt=Bt*x):nt*A},xt}function Ye($e,nt){return[$e*t(nt),nt]}Ye.invert=function($e,nt){return[$e/t(nt),nt]};function yt(){return b.geoProjection(Ye).scale(152.63)}function gt($e){if(!$e)return Ye;var nt=1/g($e);function mt(xt,Bt){var zt=nt+$e-Bt,Wt=zt&&xt*t(Bt)/zt;return[zt*v(Wt),nt-zt*t(Wt)]}return mt.invert=function(xt,Bt){var zt=D(xt*xt+(Bt=nt-Bt)*Bt),Wt=nt+$e-zt;return[zt/t(Wt)*e(xt,Bt),Wt]},mt}function Tt(){return Xe(gt).scale(123.082).center([0,26.1441]).parallel(45)}function At($e){function nt(mt,xt){var Bt=M-xt,zt=Bt&&mt*$e*v(Bt)/Bt;return[Bt*v(zt)/$e,M-Bt*t(zt)]}return nt.invert=function(mt,xt){var Bt=mt*$e,zt=M-xt,Wt=D(Bt*Bt+zt*zt),Pr=e(Bt,zt);return[(Wt?Wt/v(Wt):1)*Pr/$e,M-Wt]},nt}function $t(){var $e=.5,nt=b.geoProjectionMutator(At),mt=nt($e);return mt.fraction=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(158.837)}var rr=ke(1,4/S,S);function _r(){return b.geoProjection(rr).scale(152.63)}function Xt($e,nt,mt,xt,Bt,zt){var Wt=t(zt),Pr;if(k($e)>1||k(zt)>1)Pr=O(mt*Bt+nt*xt*Wt);else{var Br=v($e/2),kr=v(zt/2);Pr=2*I(D(Br*Br+nt*xt*kr*kr))}return k(Pr)>i?[Pr,e(xt*v(zt),nt*Bt-mt*xt*Wt)]:[0,0]}function or($e,nt,mt){return O(($e*$e+nt*nt-mt*mt)/(2*$e*nt))}function Ot($e){return $e-2*S*r(($e+S)/(2*S))}function vt($e,nt,mt){for(var xt=[[$e[0],$e[1],v($e[1]),t($e[1])],[nt[0],nt[1],v(nt[1]),t(nt[1])],[mt[0],mt[1],v(mt[1]),t(mt[1])]],Bt=xt[2],zt,Wt=0;Wt<3;++Wt,Bt=zt)zt=xt[Wt],Bt.v=Xt(zt[1]-Bt[1],Bt[3],Bt[2],zt[3],zt[2],zt[0]-Bt[0]),Bt.point=[0,0];var Pr=or(xt[0].v[0],xt[2].v[0],xt[1].v[0]),Br=or(xt[0].v[0],xt[1].v[0],xt[2].v[0]),kr=S-Pr;xt[2].point[1]=0,xt[0].point[0]=-(xt[1].point[0]=xt[0].v[0]/2);var jr=[xt[2].point[0]=xt[0].point[0]+xt[2].v[0]*t(Pr),2*(xt[0].point[1]=xt[1].point[1]=xt[2].v[0]*v(Pr))];function Jr(la,xa){var Ba=v(xa),an=t(xa),Tn=new Array(3),ii;for(ii=0;ii<3;++ii){var Si=xt[ii];if(Tn[ii]=Xt(xa-Si[1],Si[3],Si[2],an,Ba,la-Si[0]),!Tn[ii][0])return Si.point;Tn[ii][1]=Ot(Tn[ii][1]-Si.v[1])}var oi=jr.slice();for(ii=0;ii<3;++ii){var Ji=ii==2?0:ii+1,Qi=or(xt[ii].v[0],Tn[ii][0],Tn[Ji][0]);Tn[ii][1]<0&&(Qi=-Qi),ii?ii==1?(Qi=Br-Qi,oi[0]-=Tn[ii][0]*t(Qi),oi[1]-=Tn[ii][0]*v(Qi)):(Qi=kr-Qi,oi[0]+=Tn[ii][0]*t(Qi),oi[1]+=Tn[ii][0]*v(Qi)):(oi[0]+=Tn[ii][0]*t(Qi),oi[1]-=Tn[ii][0]*v(Qi))}return oi[0]/=3,oi[1]/=3,oi}return Jr}function ht($e){return $e[0]*=x,$e[1]*=x,$e}function De(){return Ne([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ne($e,nt,mt){var xt=b.geoCentroid({type:"MultiPoint",coordinates:[$e,nt,mt]}),Bt=[-xt[0],-xt[1]],zt=b.geoRotation(Bt),Wt=vt(ht(zt($e)),ht(zt(nt)),ht(zt(mt)));Wt.invert=Se(Wt);var Pr=b.geoProjection(Wt).rotate(Bt),Br=Pr.center;return delete Pr.rotate,Pr.center=function(kr){return arguments.length?Br(zt(kr)):zt.invert(Br())},Pr.clipAngle(90)}function We($e,nt){var mt=D(1-v(nt));return[2/f*$e*mt,f*(1-mt)]}We.invert=function($e,nt){var mt=(mt=nt/f-1)*mt;return[mt>0?$e*D(S/mt)/2:0,I(1-mt)]};function Ke(){return b.geoProjection(We).scale(95.6464).center([0,30])}function Je($e){var nt=g($e);function mt(xt,Bt){return[xt,(xt?xt/v(xt):1)*(v(Bt)*t(xt)-nt*t(Bt))]}return mt.invert=nt?function(xt,Bt){xt&&(Bt*=v(xt)/xt);var zt=t(xt);return[xt,2*e(D(zt*zt+nt*nt-Bt*Bt)-zt,nt-Bt)]}:function(xt,Bt){return[xt,I(xt?Bt*g(xt)/xt:Bt)]},mt}function et(){return Xe(Je).scale(249.828).clipAngle(90)}var Mt=D(3);function pt($e,nt){return[Mt*$e*(2*t(2*nt/3)-1)/f,Mt*f*v(nt/3)]}pt.invert=function($e,nt){var mt=3*I(nt/(Mt*f));return[f*$e/(Mt*(2*t(2*mt/3)-1)),mt]};function Pt(){return b.geoProjection(pt).scale(156.19)}function Ct($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,v(Bt)/nt]}return mt.invert=function(xt,Bt){return[xt/nt,I(Bt*nt)]},mt}function qt(){return Xe(Ct).parallel(38.58).scale(195.044)}function Vt($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,(1+nt)*g(Bt/2)]}return mt.invert=function(xt,Bt){return[xt/nt,l(Bt/(1+nt))*2]},mt}function Ht(){return Xe(Vt).scale(124.75)}function Sr($e,nt){var mt=D(8/(3*S));return[mt*$e*(1-k(nt)/S),mt*nt]}Sr.invert=function($e,nt){var mt=D(8/(3*S)),xt=nt/mt;return[$e/(mt*(1-k(xt)/S)),xt]};function Kr(){return b.geoProjection(Sr).scale(165.664)}function Yt($e,nt){var mt=D(4-3*v(k(nt)));return[2/D(6*S)*$e*mt,h(nt)*D(2*S/3)*(2-mt)]}Yt.invert=function($e,nt){var mt=2-k(nt)/D(2*S/3);return[$e*D(6*S)/(2*mt),h(nt)*I((4-mt*mt)/3)]};function Rt(){return b.geoProjection(Yt).scale(165.664)}function nr($e,nt){var mt=D(S*(4+S));return[2/mt*$e*(1+D(1-4*nt*nt/(S*S))),4/mt*nt]}nr.invert=function($e,nt){var mt=D(S*(4+S))/2;return[$e*mt/(1+D(1-nt*nt*(4+S)/(4*S))),nt*mt/2]};function ur(){return b.geoProjection(nr).scale(180.739)}function cr($e,nt){var mt=(2+M)*v(nt);nt/=2;for(var xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++){var zt=t(nt);nt-=Bt=(nt+v(nt)*(zt+2)-mt)/(2*zt*(1+zt))}return[2/D(S*(4+S))*$e*(1+t(nt)),2*D(S/(4+S))*v(nt)]}cr.invert=function($e,nt){var mt=nt*D((4+S)/S)/2,xt=I(mt),Bt=t(xt);return[$e/(2/D(S*(4+S))*(1+Bt)),I((xt+mt*(Bt+2))/(2+M))]};function Rr(){return b.geoProjection(cr).scale(180.739)}function Qr($e,nt){return[$e*(1+t(nt))/D(2+S),2*nt/D(2+S)]}Qr.invert=function($e,nt){var mt=D(2+S),xt=nt*mt/2;return[mt*$e/(1+t(xt)),xt]};function Zr(){return b.geoProjection(Qr).scale(173.044)}function ha($e,nt){for(var mt=(1+M)*v(nt),xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++)nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));return mt=D(2+S),[$e*(1+t(nt))/mt,2*nt/mt]}ha.invert=function($e,nt){var mt=1+M,xt=D(mt/2);return[$e*2*xt/(1+t(nt*=xt)),I((nt+v(nt))/mt)]};function Pa(){return b.geoProjection(ha).scale(173.044)}var La=3+2*T;function un($e,nt){var mt=v($e/=2),xt=t($e),Bt=D(t(nt)),zt=t(nt/=2),Wt=v(nt)/(zt+T*xt*Bt),Pr=D(2/(1+Wt*Wt)),Br=D((T*zt+(xt+mt)*Bt)/(T*zt+(xt-mt)*Bt));return[La*(Pr*(Br-1/Br)-2*a(Br)),La*(Pr*Wt*(Br+1/Br)-2*l(Wt))]}un.invert=function($e,nt){if(!(zt=X.invert($e/1.2,nt*1.065)))return null;var mt=zt[0],xt=zt[1],Bt=20,zt;$e/=La,nt/=La;do{var Wt=mt/2,Pr=xt/2,Br=v(Wt),kr=t(Wt),jr=v(Pr),Jr=t(Pr),la=t(xt),xa=D(la),Ba=jr/(Jr+T*kr*xa),an=Ba*Ba,Tn=D(2/(1+an)),ii=T*Jr+(kr+Br)*xa,Si=T*Jr+(kr-Br)*xa,oi=ii/Si,Ji=D(oi),Qi=Ji-1/Ji,Oo=Ji+1/Ji,Qo=Tn*Qi-2*a(Ji)-$e,vo=Tn*Ba*Oo-2*l(Ba)-nt,ys=jr&&_*xa*Br*an/jr,ol=(T*kr*Jr+xa)/(2*(Jr+T*kr*xa)*(Jr+T*kr*xa)*xa),jl=-.5*Ba*Tn*Tn*Tn,Hs=jl*ys,Cu=jl*ol,hi=(hi=2*Jr+T*xa*(kr-Br))*hi*Ji,wi=(T*kr*Jr*xa+la)/hi,sl=-(T*Br*jr)/(xa*hi),sc=Qi*Hs-2*wi/Ji+Tn*(wi+wi/oi),tu=Qi*Cu-2*sl/Ji+Tn*(sl+sl/oi),Ps=Ba*Oo*Hs-2*ys/(1+an)+Tn*Oo*ys+Tn*Ba*(wi-wi/oi),gc=Ba*Oo*Cu-2*ol/(1+an)+Tn*Oo*ol+Tn*Ba*(sl-sl/oi),pu=tu*Ps-gc*sc;if(!pu)break;var ll=(vo*tu-Qo*gc)/pu,ef=(Qo*Ps-vo*sc)/pu;mt-=ll,xt=o(-M,s(M,xt-ef))}while((k(ll)>i||k(ef)>i)&&--Bt>0);return k(k(xt)-M)xt){var Jr=D(jr),la=e(kr,Br),xa=mt*m(la/mt),Ba=la-xa,an=$e*t(Ba),Tn=($e*v(Ba)-Ba*v(an))/(M-an),ii=Oa(Ba,Tn),Si=(S-$e)/lt(ii,an,S);Br=Jr;var oi=50,Ji;do Br-=Ji=($e+lt(ii,an,Br)*Si-Jr)/(ii(Br)*Si);while(k(Ji)>i&&--oi>0);kr=Ba*v(Br),Brxt){var Br=D(Pr),kr=e(Wt,zt),jr=mt*m(kr/mt),Jr=kr-jr;zt=Br*t(Jr),Wt=Br*v(Jr);for(var la=zt-M,xa=v(zt),Ba=Wt/xa,an=zti||k(Ba)>i)&&--an>0);return[Jr,la]},Br}var lr=fr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return b.geoProjection(lr).scale(149.995)}var Ir=fr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Dr(){return b.geoProjection(Ir).scale(153.93)}var ot=fr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return b.geoProjection(ot).scale(130.945)}function jt($e,nt){var mt=$e*$e,xt=nt*nt;return[$e*(1-.162388*xt)*(.87-952426e-9*mt*mt),nt*(1+xt/12)]}jt.invert=function($e,nt){var mt=$e,xt=nt,Bt=50,zt;do{var Wt=xt*xt;xt-=zt=(xt*(1+Wt/12)-nt)/(1+Wt/4)}while(k(zt)>i&&--Bt>0);Bt=50,$e/=1-.162388*Wt;do{var Pr=(Pr=mt*mt)*Pr;mt-=zt=(mt*(.87-952426e-9*Pr)-$e)/(.87-.00476213*Pr)}while(k(zt)>i&&--Bt>0);return[mt,xt]};function ar(){return b.geoProjection(jt).scale(131.747)}var Er=fr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function xr(){return b.geoProjection(Er).scale(131.087)}function zr($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e(xt+zt*S,Bt);return Wt[0]-=zt*nt,Wt}return $e.invert&&(mt.invert=function(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e.invert(xt+zt*nt,Bt),Pr=Wt[0]-zt*S;return Pr<-S?Pr+=2*S:Pr>S&&(Pr-=2*S),Wt[0]=Pr,Wt}),mt}function Lr($e,nt){var mt=h($e),xt=h(nt),Bt=t(nt),zt=t($e)*Bt,Wt=v($e)*Bt,Pr=v(xt*nt);$e=k(e(Wt,Pr)),nt=I(zt),k($e-M)>i&&($e%=M);var Br=aa($e>S/4?M-$e:$e,nt);return $e>S/4&&(Pr=Br[0],Br[0]=-Br[1],Br[1]=-Pr),Br[0]*=mt,Br[1]*=-xt,Br}Lr.invert=function($e,nt){k($e)>1&&($e=h($e)*2-$e),k(nt)>1&&(nt=h(nt)*2-nt);var mt=h($e),xt=h(nt),Bt=-mt*$e,zt=-xt*nt,Wt=zt/Bt<1,Pr=Sa(Wt?zt:Bt,Wt?Bt:zt),Br=Pr[0],kr=Pr[1],jr=t(kr);return Wt&&(Br=-M-Br),[mt*(e(v(Br)*jr,-v(kr))+S),xt*I(t(Br)*jr)]};function aa($e,nt){if(nt===M)return[0,0];var mt=v(nt),xt=mt*mt,Bt=xt*xt,zt=1+Bt,Wt=1+3*Bt,Pr=1-Bt,Br=I(1/D(zt)),kr=Pr+xt*zt*Br,jr=(1-mt)/kr,Jr=D(jr),la=jr*zt,xa=D(la),Ba=Jr*Pr,an,Tn;if($e===0)return[0,-(Ba+xt*xa)];var ii=t(nt),Si=1/ii,oi=2*mt*ii,Ji=(-3*xt+Br*Wt)*oi,Qi=(-kr*ii-(1-mt)*Ji)/(kr*kr),Oo=.5*Qi/Jr,Qo=Pr*Oo-2*xt*Jr*oi,vo=xt*zt*Qi+jr*Wt*oi,ys=-Si*oi,ol=-Si*vo,jl=-2*Si*Qo,Hs=4*$e/S,Cu;if($e>.222*S||nt.175*S){if(an=(Ba+xt*D(la*(1+Bt)-Ba*Ba))/(1+Bt),$e>S/4)return[an,an];var hi=an,wi=.5*an;an=.5*(wi+hi),Tn=50;do{var sl=D(la-an*an),sc=an*(jl+ys*sl)+ol*I(an/xa)-Hs;if(!sc)break;sc<0?wi=an:hi=an,an=.5*(wi+hi)}while(k(hi-wi)>i&&--Tn>0)}else{an=i,Tn=25;do{var tu=an*an,Ps=D(la-tu),gc=jl+ys*Ps,pu=an*gc+ol*I(an/xa)-Hs,ll=gc+(ol-ys*tu)/Ps;an-=Cu=Ps?pu/ll:0}while(k(Cu)>i&&--Tn>0)}return[an,-Ba-xt*D(la-an*an)]}function Sa($e,nt){for(var mt=0,xt=1,Bt=.5,zt=50;;){var Wt=Bt*Bt,Pr=D(Bt),Br=I(1/D(1+Wt)),kr=1-Wt+Bt*(1+Wt)*Br,jr=(1-Pr)/kr,Jr=D(jr),la=jr*(1+Wt),xa=Jr*(1-Wt),Ba=la-$e*$e,an=D(Ba),Tn=nt+xa+Bt*an;if(k(xt-mt)0?mt=Bt:xt=Bt,Bt=.5*(mt+xt)}if(!zt)return null;var ii=I(Pr),Si=t(ii),oi=1/Si,Ji=2*Pr*Si,Qi=(-3*Bt+Br*(1+3*Wt))*Ji,Oo=(-kr*Si-(1-Pr)*Qi)/(kr*kr),Qo=.5*Oo/Jr,vo=(1-Wt)*Qo-2*Bt*Jr*Ji,ys=-2*oi*vo,ol=-oi*Ji,jl=-oi*(Bt*(1+Wt)*Oo+jr*(1+3*Wt)*Ji);return[S/4*($e*(ys+ol*an)+jl*I($e/D(la))),ii]}function wa(){return b.geoProjection(zr(Lr)).scale(239.75)}function pn($e,nt,mt){var xt,Bt,zt;return $e?(xt=tn($e,mt),nt?(Bt=tn(nt,1-mt),zt=Bt[1]*Bt[1]+mt*xt[0]*xt[0]*Bt[0]*Bt[0],[[xt[0]*Bt[2]/zt,xt[1]*xt[2]*Bt[0]*Bt[1]/zt],[xt[1]*Bt[1]/zt,-xt[0]*xt[2]*Bt[0]*Bt[2]/zt],[xt[2]*Bt[1]*Bt[2]/zt,-mt*xt[0]*xt[1]*Bt[0]/zt]]):[[xt[0],0],[xt[1],0],[xt[2],0]]):(Bt=tn(nt,1-mt),[[0,Bt[0]/Bt[1]],[1/Bt[1],0],[Bt[2]/Bt[1],0]])}function tn($e,nt){var mt,xt,Bt,zt,Wt;if(nt=1-i)return mt=(1-nt)/4,xt=P($e),zt=B($e),Bt=1/xt,Wt=xt*F($e),[zt+mt*(Wt-$e)/(xt*xt),Bt-mt*zt*Bt*(Wt-$e),Bt+mt*zt*Bt*(Wt+$e),2*l(n($e))-M+mt*(Wt-$e)/xt];var Pr=[1,0,0,0,0,0,0,0,0],Br=[D(nt),0,0,0,0,0,0,0,0],kr=0;for(xt=D(1-nt),Wt=1;k(Br[kr]/Pr[kr])>i&&kr<8;)mt=Pr[kr++],Br[kr]=(mt-xt)/2,Pr[kr]=(mt+xt)/2,xt=D(mt*xt),Wt*=2;Bt=Wt*Pr[kr]*$e;do zt=Br[kr]*v(xt=Bt)/Pr[kr],Bt=(I(zt)+Bt)/2;while(--kr);return[v(Bt),zt=t(Bt),zt/t(Bt-xt),Bt]}function ai($e,nt,mt){var xt=k($e),Bt=k(nt),zt=F(Bt);if(xt){var Wt=1/v(xt),Pr=1/(g(xt)*g(xt)),Br=-(Pr+mt*(zt*zt*Wt*Wt)-1+mt),kr=(mt-1)*Pr,jr=(-Br+D(Br*Br-4*kr))/2;return[rn(l(1/D(jr)),mt)*h($e),rn(l(D((jr/Pr-1)/mt)),1-mt)*h(nt)]}return[0,rn(l(zt),1-mt)*h(nt)]}function rn($e,nt){if(!nt)return $e;if(nt===1)return a(g($e/2+C));for(var mt=1,xt=D(1-nt),Bt=D(nt),zt=0;k(Bt)>i;zt++){if($e%S){var Wt=l(xt*g($e)/mt);Wt<0&&(Wt+=S),$e+=Wt+~~($e/S)*S}else $e+=$e;Bt=(mt+xt)/2,xt=D(mt*xt),Bt=((mt=Bt)-xt)/2}return $e/(c(2,zt)*mt)}function Ri($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=a(g(S/4+k(nt)/2)),Pr=n(zt*Wt)/D(mt),Br=Gn(Pr*t(zt*$e),Pr*v(zt*$e)),kr=ai(Br[0],Br[1],xt*xt);return[-kr[1],(nt>=0?1:-1)*(.5*Bt-kr[0])]}function Gn($e,nt){var mt=$e*$e,xt=nt+1,Bt=1-mt-nt*nt;return[.5*(($e>=0?M:-M)-e(Bt,2*$e)),-.25*a(Bt*Bt+4*mt)+.5*a(xt*xt+mt)]}function no($e,nt){var mt=nt[0]*nt[0]+nt[1]*nt[1];return[($e[0]*nt[0]+$e[1]*nt[1])/mt,($e[1]*nt[0]-$e[0]*nt[1])/mt]}Ri.invert=function($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=pn(.5*Bt-nt,-$e,xt*xt),Pr=no(Wt[0],Wt[1]),Br=e(Pr[1],Pr[0])/zt;return[Br,2*l(n(.5/zt*a(mt*Pr[0]*Pr[0]+mt*Pr[1]*Pr[1])))-M]};function Di(){return b.geoProjection(zr(Ri)).scale(151.496)}function fn($e){var nt=v($e),mt=t($e),xt=Ai($e);xt.invert=Ai(-$e);function Bt(zt,Wt){var Pr=xt(zt,Wt);zt=Pr[0],Wt=Pr[1];var Br=v(Wt),kr=t(Wt),jr=t(zt),Jr=O(nt*Br+mt*kr*jr),la=v(Jr),xa=k(la)>i?Jr/la:1;return[xa*mt*v(zt),(k(zt)>M?xa:-xa)*(nt*kr-mt*Br*jr)]}return Bt.invert=function(zt,Wt){var Pr=D(zt*zt+Wt*Wt),Br=-v(Pr),kr=t(Pr),jr=Pr*kr,Jr=-Wt*Br,la=Pr*nt,xa=D(jr*jr+Jr*Jr-la*la),Ba=e(jr*la+Jr*xa,Jr*la-jr*xa),an=(Pr>M?-1:1)*e(zt*Br,Pr*t(Ba)*kr+Wt*v(Ba)*Br);return xt.invert(an,Ba)},Bt}function Ai($e){var nt=v($e),mt=t($e);return function(xt,Bt){var zt=t(Bt),Wt=t(xt)*zt,Pr=v(xt)*zt,Br=v(Bt);return[e(Pr,Wt*mt-Br*nt),I(Br*mt+Wt*nt)]}}function jn(){var $e=0,nt=b.geoProjectionMutator(fn),mt=nt($e),xt=mt.rotate,Bt=mt.stream,zt=b.geoCircle();return mt.parallel=function(Wt){if(!arguments.length)return $e*A;var Pr=mt.rotate();return nt($e=Wt*x).rotate(Pr)},mt.rotate=function(Wt){return arguments.length?(xt.call(mt,[Wt[0],Wt[1]-$e*A]),zt.center([-Wt[0],-Wt[1]]),mt):(Wt=xt.call(mt),Wt[1]+=$e*A,Wt)},mt.stream=function(Wt){return Wt=Bt(Wt),Wt.sphere=function(){Wt.polygonStart();var Pr=.01,Br=zt.radius(90-Pr)().coordinates[0],kr=Br.length-1,jr=-1,Jr;for(Wt.lineStart();++jr=0;)Wt.point((Jr=Br[jr])[0],Jr[1]);Wt.lineEnd(),Wt.polygonEnd()},Wt},mt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Xn=3,eo=I(1-1/Xn)*A,gi=Ct(0);function qi($e){var nt=eo*x,mt=We(S,nt)[0]-We(-S,nt)[0],xt=gi(0,nt)[1],Bt=We(0,nt)[1],zt=f-Bt,Wt=u/$e,Pr=4/u,Br=xt+zt*zt*4/u;function kr(jr,Jr){var la,xa=k(Jr);if(xa>nt){var Ba=s($e-1,o(0,r((jr+S)/Wt)));jr+=S*($e-1)/$e-Ba*Wt,la=We(jr,xa),la[0]=la[0]*u/mt-u*($e-1)/(2*$e)+Ba*u/$e,la[1]=xt+(la[1]-Bt)*4*zt/u,Jr<0&&(la[1]=-la[1])}else la=gi(jr,Jr);return la[0]*=Pr,la[1]/=Br,la}return kr.invert=function(jr,Jr){jr/=Pr,Jr*=Br;var la=k(Jr);if(la>xt){var xa=s($e-1,o(0,r((jr+S)/Wt)));jr=(jr+S*($e-1)/$e-xa*Wt)*mt/u;var Ba=We.invert(jr,.25*(la-xt)*u/zt+Bt);return Ba[0]-=S*($e-1)/$e-xa*Wt,Jr<0&&(Ba[1]=-Ba[1]),Ba}return gi.invert(jr,Jr)},kr}function io($e,nt){return[$e,nt&1?90-i:eo]}function oo($e,nt){return[$e,nt&1?-90+i:-eo]}function Vn($e){return[$e[0]*(1-i),$e[1]]}function qn($e){var nt=[].concat(E.range(-180,180+$e/2,$e).map(io),E.range(180,-180-$e/2,-$e).map(oo));return{type:"Polygon",coordinates:[$e===180?nt.map(Vn):nt]}}function Hi(){var $e=4,nt=b.geoProjectionMutator(qi),mt=nt($e),xt=mt.stream;return mt.lobes=function(Bt){return arguments.length?nt($e=+Bt):$e},mt.stream=function(Bt){var zt=mt.rotate(),Wt=xt(Bt),Pr=(mt.rotate([0,0]),xt(Bt));return mt.rotate(zt),Wt.sphere=function(){b.geoStream(qn(180/$e),Pr)},Wt},mt.scale(239.75)}function Mi($e){var nt=1+$e,mt=v(1/nt),xt=I(mt),Bt=2*D(S/(zt=S+4*xt*nt)),zt,Wt=.5*Bt*(nt+D($e*(2+$e))),Pr=$e*$e,Br=nt*nt;function kr(jr,Jr){var la=1-v(Jr),xa,Ba;if(la&&la<2){var an=M-Jr,Tn=25,ii;do{var Si=v(an),oi=t(an),Ji=xt+e(Si,nt-oi),Qi=1+Br-2*nt*oi;an-=ii=(an-Pr*xt-nt*Si+Qi*Ji-.5*la*zt)/(2*nt*Si*Ji)}while(k(ii)>w&&--Tn>0);xa=Bt*D(Qi),Ba=jr*Ji/S}else xa=Bt*($e+la),Ba=jr*xt/S;return[xa*v(Ba),Wt-xa*t(Ba)]}return kr.invert=function(jr,Jr){var la=jr*jr+(Jr-=Wt)*Jr,xa=(1+Br-la/(Bt*Bt))/(2*nt),Ba=O(xa),an=v(Ba),Tn=xt+e(an,nt-xa);return[I(jr/D(la))*S/Tn,I(1-2*(Ba-Pr*xt-nt*an+(1+Br-2*nt*xa)*Tn)/zt)]},kr}function Ro(){var $e=1,nt=b.geoProjectionMutator(Mi),mt=nt($e);return mt.ratio=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(167.774).center([0,18.67])}var go=.7109889596207567,Eo=.0528035274542;function Ao($e,nt){return nt>-go?($e=_e($e,nt),$e[1]+=Eo,$e):Ye($e,nt)}Ao.invert=function($e,nt){return nt>-go?_e.invert($e,nt-Eo):Ye.invert($e,nt)};function ds(){return b.geoProjection(Ao).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function jo($e,nt){return k(nt)>go?($e=_e($e,nt),$e[1]-=nt>0?Eo:-Eo,$e):Ye($e,nt)}jo.invert=function($e,nt){return k(nt)>go?_e.invert($e,nt+(nt>0?Eo:-Eo)):Ye.invert($e,nt)};function Wo(){return b.geoProjection(jo).scale(152.63)}function to($e,nt,mt,xt){var Bt=D(4*S/(2*mt+(1+$e-nt/2)*v(2*mt)+($e+nt)/2*v(4*mt)+nt/2*v(6*mt))),zt=D(xt*v(mt)*D((1+$e*t(2*mt)+nt*t(4*mt))/(1+$e+nt))),Wt=mt*Br(1);function Pr(Jr){return D(1+$e*t(2*Jr)+nt*t(4*Jr))}function Br(Jr){var la=Jr*mt;return(2*la+(1+$e-nt/2)*v(2*la)+($e+nt)/2*v(4*la)+nt/2*v(6*la))/mt}function kr(Jr){return Pr(Jr)*v(Jr)}var jr=function(Jr,la){var xa=mt*Me(Br,Wt*v(la)/mt,la/S);isNaN(xa)&&(xa=mt*h(la));var Ba=Bt*Pr(xa);return[Ba*zt*Jr/S*t(xa),Ba/zt*v(xa)]};return jr.invert=function(Jr,la){var xa=Me(kr,la*zt/Bt);return[Jr*S/(t(xa)*Bt*zt*Pr(xa)),I(mt*Br(xa/mt)/Wt)]},mt===0&&(Bt=D(xt/S),jr=function(Jr,la){return[Jr*Bt,v(la)/Bt]},jr.invert=function(Jr,la){return[Jr/Bt,I(la*Bt)]}),jr}function wo(){var $e=1,nt=0,mt=45*x,xt=2,Bt=b.geoProjectionMutator(to),zt=Bt($e,nt,mt,xt);return zt.a=function(Wt){return arguments.length?Bt($e=+Wt,nt,mt,xt):$e},zt.b=function(Wt){return arguments.length?Bt($e,nt=+Wt,mt,xt):nt},zt.psiMax=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt*x,xt):mt*A},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(180.739)}function pi($e,nt,mt,xt,Bt,zt,Wt,Pr,Br,kr,jr){if(jr.nanEncountered)return NaN;var Jr,la,xa,Ba,an,Tn,ii,Si,oi,Ji;if(Jr=mt-nt,la=$e(nt+Jr*.25),xa=$e(mt-Jr*.25),isNaN(la)){jr.nanEncountered=!0;return}if(isNaN(xa)){jr.nanEncountered=!0;return}return Ba=Jr*(xt+4*la+Bt)/12,an=Jr*(Bt+4*xa+zt)/12,Tn=Ba+an,Ji=(Tn-Wt)/15,kr>Br?(jr.maxDepthCount++,Tn+Ji):Math.abs(Ji)>1;do Br[Tn]>xa?an=Tn:Ba=Tn,Tn=Ba+an>>1;while(Tn>Ba);var ii=Br[Tn+1]-Br[Tn];return ii&&(ii=(xa-Br[Tn+1])/ii),(Tn+1+ii)/Wt}var Jr=2*jr(1)/S*zt/mt,la=function(xa,Ba){var an=jr(k(v(Ba))),Tn=xt(an)*xa;return an/=Jr,[Tn,Ba>=0?an:-an]};return la.invert=function(xa,Ba){var an;return Ba*=Jr,k(Ba)<1&&(an=h(Ba)*I(Bt(k(Ba))*zt)),[xa/xt(k(Ba)),an]},la}function Xi(){var $e=0,nt=2.5,mt=1.183136,xt=b.geoProjectionMutator(Io),Bt=xt($e,nt,mt);return Bt.alpha=function(zt){return arguments.length?xt($e=+zt,nt,mt):$e},Bt.k=function(zt){return arguments.length?xt($e,nt=+zt,mt):nt},Bt.gamma=function(zt){return arguments.length?xt($e,nt,mt=+zt):mt},Bt.scale(152.63)}function Ko($e,nt){return k($e[0]-nt[0])=0;--Br)mt=$e[1][Br],xt=mt[0][0],Bt=mt[0][1],zt=mt[1][1],Wt=mt[2][0],Pr=mt[2][1],nt.push(Uo([[Wt-i,Pr-i],[Wt-i,zt+i],[xt+i,zt+i],[xt+i,Bt-i]],30));return{type:"Polygon",coordinates:[E.merge(nt)]}}function Ss($e,nt,mt){var xt,Bt;function zt(Br,kr){for(var jr=kr<0?-1:1,Jr=nt[+(kr<0)],la=0,xa=Jr.length-1;laJr[la][2][0];++la);var Ba=$e(Br-Jr[la][1][0],kr);return Ba[0]+=$e(Jr[la][1][0],jr*kr>jr*Jr[la][0][1]?Jr[la][0][1]:kr)[0],Ba}mt?zt.invert=mt(zt):$e.invert&&(zt.invert=function(Br,kr){for(var jr=Bt[+(kr<0)],Jr=nt[+(kr<0)],la=0,xa=jr.length;laBa&&(an=xa,xa=Ba,Ba=an),[[Jr,xa],[la,Ba]]})}),Wt):nt.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*A,jr[0][1]*A],[jr[1][0]*A,jr[1][1]*A],[jr[2][0]*A,jr[2][1]*A]]})})},nt!=null&&Wt.lobes(nt),Wt}var Vo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vs(){return Ss(Ae,Vo).scale(160.857)}var Ts=[[[[-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 Bo(){return Ss(jo,Ts).scale(152.63)}var _o=[[[[-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 Pi(){return Ss(_e,_o).scale(169.529)}var yo=[[[[-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 bs(){return Ss(_e,yo).scale(169.529).rotate([20,0])}var Dl=[[[[-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 hl(){return Ss(Ao,Dl,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function dl(){return Ss(Ye,ps).scale(152.63).rotate([-20,0])}function wu($e,nt){return[3/u*$e*D(S*S/3-nt*nt),nt]}wu.invert=function($e,nt){return[u/3*$e/D(S*S/3-nt*nt),nt]};function lu(){return b.geoProjection(wu).scale(158.837)}function xc($e){function nt(mt,xt){if(k(k(xt)-M)2)return null;mt/=2,xt/=2;var zt=mt*mt,Wt=xt*xt,Pr=2*xt/(1+zt+Wt);return Pr=c((1+Pr)/(1-Pr),1/$e),[e(2*mt,1-zt-Wt)/$e,I((Pr-1)/(Pr+1))]},nt}function Fl(){var $e=.5,nt=b.geoProjectionMutator(xc),mt=nt($e);return mt.spacing=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(124.75)}var pl=S/T;function $u($e,nt){return[$e*(1+D(t(nt)))/2,nt/(t(nt/2)*t($e/6))]}$u.invert=function($e,nt){var mt=k($e),xt=k(nt),Bt=i,zt=M;xti||k(Tn)>i)&&--Bt>0);return Bt&&[mt,xt]};function vs(){return b.geoProjection(tl).scale(139.98)}function os($e,nt){return[v($e)/t(nt),g(nt)*t($e)]}os.invert=function($e,nt){var mt=$e*$e,xt=nt*nt,Bt=xt+1,zt=mt+Bt,Wt=$e?_*D((zt-D(zt*zt-4*mt))/mt):1/D(Bt);return[I($e*Wt),h(nt)*O(Wt)]};function ms(){return b.geoProjection(os).scale(144.049).clipAngle(90-.001)}function rl($e){var nt=t($e),mt=g(C+$e/2);function xt(Bt,zt){var Wt=zt-$e,Pr=k(Wt)=0;)jr=$e[kr],Jr=jr[0]+Pr*(xa=Jr)-Br*la,la=jr[1]+Pr*la+Br*xa;return Jr=Pr*(xa=Jr)-Br*la,la=Pr*la+Br*xa,[Jr,la]}return mt.invert=function(xt,Bt){var zt=20,Wt=xt,Pr=Bt;do{for(var Br=nt,kr=$e[Br],jr=kr[0],Jr=kr[1],la=0,xa=0,Ba;--Br>=0;)kr=$e[Br],la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=kr[0]+Wt*(Ba=jr)-Pr*Jr,Jr=kr[1]+Wt*Jr+Pr*Ba;la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=Wt*(Ba=jr)-Pr*Jr-xt,Jr=Wt*Jr+Pr*Ba-Bt;var an=la*la+xa*xa,Tn,ii;Wt-=Tn=(jr*la+Jr*xa)/an,Pr-=ii=(Jr*la-jr*xa)/an}while(k(Tn)+k(ii)>i*i&&--zt>0);if(zt){var Si=D(Wt*Wt+Pr*Pr),oi=2*l(Si*.5),Ji=v(oi);return[e(Wt*Ji,Si*t(oi)),Si?I(Pr*Ji/Si):0]}},mt}var Lh=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ju=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ss=[[.9245,0],[0,0],[.01943,0]],ah=[[.721316,0],[0,0],[-.00881625,-.00617325]];function wc(){return Ou(Lh,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function pc(){return Ou(rh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Nf(){return Ou(Ju,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Bu(){return Ou(ss,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tc(){return Ou(ah,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ou($e,nt){var mt=b.geoProjection(bc($e)).rotate(nt).clipAngle(90),xt=b.geoRotation(nt),Bt=mt.center;return delete mt.rotate,mt.center=function(zt){return arguments.length?Bt(xt(zt)):xt.invert(Bt())},mt}var Gc=D(6),pf=D(7);function $l($e,nt){var mt=I(7*v(nt)/(3*Gc));return[Gc*$e*(2*t(2*mt/3)-1)/pf,9*v(mt/3)/pf]}$l.invert=function($e,nt){var mt=3*I(nt*pf/9);return[$e*pf/(Gc*(2*t(2*mt/3)-1)),I(v(mt)*3*Gc/7)]};function jf(){return b.geoProjection($l).scale(164.859)}function Hc($e,nt){for(var mt=(1+_)*v(nt),xt=nt,Bt=0,zt;Bt<25&&(xt-=zt=(v(xt/2)+v(xt)-mt)/(.5*t(xt/2)+t(xt)),!(k(zt)w&&--xt>0);return zt=mt*mt,Wt=zt*zt,Pr=zt*Wt,[$e/(.84719-.13063*zt+Pr*Pr*(-.04515+.05494*zt-.02326*Wt+.00331*Pr)),mt]};function Uf(){return b.geoProjection(Nu).scale(175.295)}function al($e,nt){return[$e*(1+t(nt))/2,2*(nt-g(nt/2))]}al.invert=function($e,nt){for(var mt=nt/2,xt=0,Bt=1/0;xt<10&&k(Bt)>i;++xt){var zt=t(nt/2);nt-=Bt=(nt-g(nt/2)-mt)/(1-.5/(zt*zt))}return[2*$e/(1+t(nt)),nt]};function Xc(){return b.geoProjection(al).scale(152.63)}var ju=[[[[-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 Ac(){return Ss(he(1/0),ju).rotate([20,0]).scale(152.63)}function Zc($e,nt){var mt=v(nt),xt=t(nt),Bt=h($e);if($e===0||k(nt)===M)return[0,nt];if(nt===0)return[$e,0];if(k($e)===M)return[$e*xt,M*mt];var zt=S/(2*$e)-2*$e/S,Wt=2*nt/S,Pr=(1-Wt*Wt)/(mt-Wt),Br=zt*zt,kr=Pr*Pr,jr=1+Br/kr,Jr=1+kr/Br,la=(zt*mt/Pr-zt/2)/jr,xa=(kr*mt/Br+Pr/2)/Jr,Ba=la*la+xt*xt/jr,an=xa*xa-(kr*mt*mt/Br+Pr*mt-1)/Jr;return[M*(la+D(Ba)*Bt),M*(xa+D(an<0?0:an)*h(-nt*zt)*Bt)]}Zc.invert=function($e,nt){$e/=M,nt/=M;var mt=$e*$e,xt=nt*nt,Bt=mt+xt,zt=S*S;return[$e?(Bt-1+D((1-Bt)*(1-Bt)+4*mt))/(2*$e)*M:0,Me(function(Wt){return Bt*(S*v(Wt)-2*Wt)*S+4*Wt*Wt*(nt-v(Wt))+2*S*Wt-zt*nt},0)]};function ec(){return b.geoProjection(Zc).scale(127.267)}var cu=1.0148,tc=.23185,vf=-.14499,Tu=.02406,nh=cu,vl=5*tc,ml=7*vf,rc=9*Tu,yl=1.790857183;function qf($e,nt){var mt=nt*nt;return[$e,nt*(cu+mt*mt*(tc+mt*(vf+Tu*mt)))]}qf.invert=function($e,nt){nt>yl?nt=yl:nt<-yl&&(nt=-yl);var mt=nt,xt;do{var Bt=mt*mt;mt-=xt=(mt*(cu+Bt*Bt*(tc+Bt*(vf+Tu*Bt)))-nt)/(nh+Bt*Bt*(vl+Bt*(ml+rc*Bt)))}while(k(xt)>i);return[$e,mt]};function ac(){return b.geoProjection(qf).scale(139.319)}function Mc($e,nt){if(k(nt)i&&--Bt>0);return Wt=g(xt),[(k(nt)=0;)if(xt=nt[Pr],mt[0]===xt[0]&&mt[1]===xt[1]){if(zt)return[zt,mt];zt=mt}}}function gf($e){for(var nt=$e.length,mt=[],xt=$e[nt-1],Bt=0;Bt0?[-xt[0],0]:[180-xt[0],180])};var nt=hu.map(function(mt){return{face:mt,project:$e(mt)}});return[-1,0,0,1,0,1,4,5].forEach(function(mt,xt){var Bt=nt[mt];Bt&&(Bt.children||(Bt.children=[])).push(nt[xt])}),Au(nt[0],function(mt,xt){return nt[mt<-S/2?xt<0?6:4:mt<0?xt<0?2:0:mtxt^xa>xt&&mt<(la-kr)*(xt-jr)/(xa-jr)+kr&&(Bt=!Bt)}return Bt}function Vf($e,nt){var mt=nt.stream,xt;if(!mt)throw new Error("invalid projection");switch($e&&$e.type){case"Feature":xt=Gf;break;case"FeatureCollection":xt=xf;break;default:xt=Hf;break}return xt($e,mt)}function xf($e,nt){return{type:"FeatureCollection",features:$e.features.map(function(mt){return Gf(mt,nt)})}}function Gf($e,nt){return{type:"Feature",id:$e.id,properties:$e.properties,geometry:Hf($e.geometry,nt)}}function bh($e,nt){return{type:"GeometryCollection",geometries:$e.geometries.map(function(mt){return Hf(mt,nt)})}}function Hf($e,nt){if(!$e)return null;if($e.type==="GeometryCollection")return bh($e,nt);var mt;switch($e.type){case"Point":mt=kc;break;case"MultiPoint":mt=kc;break;case"LineString":mt=Cc;break;case"MultiLineString":mt=Cc;break;case"Polygon":mt=Lc;break;case"MultiPolygon":mt=Lc;break;case"Sphere":mt=Lc;break;default:return null}return b.geoStream($e,nt(mt)),mt.result()}var il=[],kl=[],kc={point:function($e,nt){il.push([$e,nt])},result:function(){var $e=il.length?il.length<2?{type:"Point",coordinates:il[0]}:{type:"MultiPoint",coordinates:il}:null;return il=[],$e}},Cc={lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){il.length&&(kl.push(il),il=[])},result:function(){var $e=kl.length?kl.length<2?{type:"LineString",coordinates:kl[0]}:{type:"MultiLineString",coordinates:kl}:null;return kl=[],$e}},Lc={polygonStart:xo,lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){var $e=il.length;if($e){do il.push(il[0].slice());while(++$e<4);kl.push(il),il=[]}},polygonEnd:xo,result:function(){if(!kl.length)return null;var $e=[],nt=[];return kl.forEach(function(mt){Ec(mt)?$e.push([mt]):nt.push(mt)}),nt.forEach(function(mt){var xt=mt[0];$e.some(function(Bt){if(xh(Bt[0],xt))return Bt.push(mt),!0})||$e.push([mt])}),kl=[],$e.length?$e.length>1?{type:"MultiPolygon",coordinates:$e}:{type:"Polygon",coordinates:$e[0]}:null}};function vc($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=k(xt)0?xt-S:xt+S,Bt),Pr=(Wt[0]-Wt[1])*_,Br=(Wt[0]+Wt[1])*_;if(zt)return[Pr,Br];var kr=nt*_,jr=Pr>0^Br>0?-1:1;return[jr*Pr-h(Br)*kr,jr*Br-h(Pr)*kr]}return $e.invert&&(mt.invert=function(xt,Bt){var zt=(xt+Bt)*_,Wt=(Bt-xt)*_,Pr=k(zt)<.5*nt&&k(Wt)<.5*nt;if(!Pr){var Br=nt*_,kr=zt>0^Wt>0?-1:1,jr=-kr*xt+(Wt>0?1:-1)*Br,Jr=-kr*Bt+(zt>0?1:-1)*Br;zt=(-jr-Jr)*_,Wt=(jr-Jr)*_}var la=$e.invert(zt,Wt);return Pr||(la[0]+=zt>0?S:-S),la}),b.geoProjection(mt).rotate([-90,-90,45]).clipAngle(180-.001)}function Ft(){return vc(Lr).scale(176.423)}function tr(){return vc(Ri).scale(111.48)}function Fr($e,nt){if(!(0<=(nt=+nt)&&nt<=20))throw new Error("invalid digits");function mt(kr){var jr=kr.length,Jr=2,la=new Array(jr);for(la[0]=+kr[0].toFixed(nt),la[1]=+kr[1].toFixed(nt);Jr2||xa[0]!=jr[0]||xa[1]!=jr[1])&&(Jr.push(xa),jr=xa)}return Jr.length===1&&kr.length>1&&Jr.push(mt(kr[kr.length-1])),Jr}function zt(kr){return kr.map(Bt)}function Wt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Wt)};break;case"Point":jr={type:"Point",coordinates:mt(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:xt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:zt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(zt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function Pr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Wt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if($e!=null)switch($e.type){case"Feature":return Pr($e);case"FeatureCollection":{var Br={type:"FeatureCollection",features:$e.features.map(Pr)};return $e.bbox!=null&&(Br.bbox=$e.bbox),Br}default:return Wt($e)}return $e}function wr($e){var nt=v($e);function mt(xt,Bt){var zt=nt?g(xt*nt/2)/nt:xt/2;if(!Bt)return[2*zt,-$e];var Wt=2*l(zt*v(Bt)),Pr=1/g(Bt);return[v(Wt)*Pr,Bt+(1-t(Wt))*Pr-$e]}return mt.invert=function(xt,Bt){if(k(Bt+=$e)i&&--Pr>0);var la=xt*(kr=g(Wt)),xa=g(k(Bt)0?M:-M)*(Br+Bt*(jr-Wt)/2+Bt*Bt*(jr-2*Br+Wt)/2)]}Ia.invert=function($e,nt){var mt=nt/M,xt=mt*90,Bt=s(18,k(xt/5)),zt=o(0,r(Bt));do{var Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],kr=Br-Wt,jr=Br-2*Pr+Wt,Jr=2*(k(mt)-Pr)/kr,la=jr/kr,xa=Jr*(1-la*Jr*(1-2*la*Jr));if(xa>=0||zt===1){xt=(nt>=0?5:-5)*(xa+Bt);var Ba=50,an;do Bt=s(18,k(xt)/5),zt=r(Bt),xa=Bt-zt,Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],xt-=(an=(nt>=0?M:-M)*(Pr+xa*(Br-Wt)/2+xa*xa*(Br-2*Pr+Wt)/2)-nt)*A;while(k(an)>w&&--Ba>0);break}}while(--zt>=0);var Tn=ba[zt][0],ii=ba[zt+1][0],Si=ba[s(19,zt+2)][0];return[$e/(ii+xa*(Si-Tn)/2+xa*xa*(Si-2*ii+Tn)/2),xt*x]};function Na(){return b.geoProjection(Ia).scale(152.63)}function Za($e){function nt(mt,xt){var Bt=t(xt),zt=($e-1)/($e-Bt*t(mt));return[zt*Bt*v(mt),zt*v(xt)]}return nt.invert=function(mt,xt){var Bt=mt*mt+xt*xt,zt=D(Bt),Wt=($e-D(1-Bt*($e+1)/($e-1)))/(($e-1)/zt+zt/($e-1));return[e(mt*Wt,zt*D(1-Wt*Wt)),zt?I(xt*Wt/zt):0]},nt}function mn($e,nt){var mt=Za($e);if(!nt)return mt;var xt=t(nt),Bt=v(nt);function zt(Wt,Pr){var Br=mt(Wt,Pr),kr=Br[1],jr=kr*Bt/($e-1)+xt;return[Br[0]*xt/jr,kr/jr]}return zt.invert=function(Wt,Pr){var Br=($e-1)/($e-1-Pr*Bt);return mt.invert(Br*Wt,Br*Pr*xt)},zt}function Da(){var $e=2,nt=0,mt=b.geoProjectionMutator(mn),xt=mt($e,nt);return xt.distance=function(Bt){return arguments.length?mt($e=+Bt,nt):$e},xt.tilt=function(Bt){return arguments.length?mt($e,nt=Bt*x):nt*A},xt.scale(432.147).clipAngle(O(1/$e)*A-1e-6)}var Ha=1e-4,$a=1e4,vn=-180,En=vn+Ha,yi=180,_i=yi-Ha,ki=-90,ri=ki+Ha,kn=90,Ln=kn-Ha;function Ni($e){return $e.length>0}function Zi($e){return Math.floor($e*$a)/$a}function Co($e){return $e===ki||$e===kn?[0,$e]:[vn,Zi($e)]}function Do($e){var nt=$e[0],mt=$e[1],xt=!1;return nt<=En?(nt=vn,xt=!0):nt>=_i&&(nt=yi,xt=!0),mt<=ri?(mt=ki,xt=!0):mt>=Ln&&(mt=kn,xt=!0),xt?[nt,mt]:$e}function Fo($e){return $e.map(Do)}function Yo($e,nt,mt){for(var xt=0,Bt=$e.length;xt=_i||jr<=ri||jr>=Ln){zt[Wt]=Do(Br);for(var Jr=Wt+1;JrEn&&xa<_i&&Ba>ri&&Ba=Pr)break;mt.push({index:-1,polygon:nt,ring:zt=zt.slice(Jr-1)}),zt[0]=Co(zt[0][1]),Wt=-1,Pr=zt.length}}}}function bo($e){var nt,mt=$e.length,xt={},Bt={},zt,Wt,Pr,Br,kr;for(nt=0;nt0?S-Pr:Pr)*A],kr=b.geoProjection($e(Wt)).rotate(Br),jr=b.geoRotation(Br),Jr=kr.center;return delete kr.rotate,kr.center=function(la){return arguments.length?Jr(jr(la)):jr.invert(Jr())},kr.clipAngle(90)}function js($e){var nt=t($e);function mt(xt,Bt){var zt=b.geoGnomonicRaw(xt,Bt);return zt[0]*=nt,zt}return mt.invert=function(xt,Bt){return b.geoGnomonicRaw.invert(xt/nt,Bt)},mt}function Cl(){return zl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zl($e,nt){return gs(js,$e,nt)}function Kl($e){if(!($e*=2))return b.geoAzimuthalEquidistantRaw;var nt=-$e/2,mt=-nt,xt=$e*$e,Bt=g(mt),zt=.5/v(mt);function Wt(Pr,Br){var kr=O(t(Br)*t(Pr-nt)),jr=O(t(Br)*t(Pr-mt)),Jr=Br<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*$e),Jr*D(4*xt*jr-(xt-kr+jr)*(xt-kr+jr))/(2*$e)]}return Wt.invert=function(Pr,Br){var kr=Br*Br,jr=t(D(kr+(la=Pr+nt)*la)),Jr=t(D(kr+(la=Pr+mt)*la)),la,xa;return[e(xa=jr-Jr,la=(jr+Jr)*Bt),(Br<0?-1:1)*O(D(la*la+xa*xa)*zt)]},Wt}function Gu(){return xl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function xl($e,nt){return gs(Kl,$e,nt)}function Hu($e,nt){if(k(nt)i&&--Pr>0);return[h($e)*(D(Bt*Bt+4)+Bt)*S/4,M*Wt]};function Ql(){return b.geoProjection(Jl).scale(127.16)}function Eu($e,nt,mt,xt,Bt){function zt(Wt,Pr){var Br=mt*v(xt*Pr),kr=D(1-Br*Br),jr=D(2/(1+kr*t(Wt*=Bt)));return[$e*kr*jr*v(Wt),nt*Br*jr]}return zt.invert=function(Wt,Pr){var Br=Wt/$e,kr=Pr/nt,jr=D(Br*Br+kr*kr),Jr=2*I(jr/2);return[e(Wt*g(Jr),$e*jr)/Bt,jr&&I(Pr*v(Jr)/(nt*mt*jr))/xt]},zt}function bf($e,nt,mt,xt){var Bt=S/3;$e=o($e,i),nt=o(nt,i),$e=s($e,M),nt=s(nt,S-i),mt=o(mt,0),mt=s(mt,100-i),xt=o(xt,i);var zt=mt/100+1,Wt=xt/100,Pr=O(zt*t(Bt))/Bt,Br=v($e)/v(Pr*M),kr=nt/S,jr=D(Wt*v($e/2)/v(nt/2)),Jr=jr/D(kr*Br*Pr),la=1/(jr*D(kr*Br*Pr));return Eu(Jr,la,Br,Pr,kr)}function lh(){var $e=65*x,nt=60*x,mt=20,xt=200,Bt=b.geoProjectionMutator(bf),zt=Bt($e,nt,mt,xt);return zt.poleline=function(Wt){return arguments.length?Bt($e=+Wt*x,nt,mt,xt):$e*A},zt.parallels=function(Wt){return arguments.length?Bt($e,nt=+Wt*x,mt,xt):nt*A},zt.inflation=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt,xt):mt},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(163.775)}function Pc(){return lh().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ks=4*S+3*D(3),Bl=2*D(2*S*D(3)/Ks),Wu=ke(Bl*D(3)/S,Bl,Ks/6);function wf(){return b.geoProjection(Wu).scale(176.84)}function Qc($e,nt){return[$e*D(1-3*nt*nt/(S*S)),nt]}Qc.invert=function($e,nt){return[$e/D(1-3*nt*nt/(S*S)),nt]};function ku(){return b.geoProjection(Qc).scale(152.63)}function Ol($e,nt){var mt=t(nt),xt=t($e)*mt,Bt=1-xt,zt=t($e=e(v($e)*mt,-v(nt))),Wt=v($e);return mt=D(1-xt*xt),[Wt*mt-zt*Bt,-zt*mt-Wt*Bt]}Ol.invert=function($e,nt){var mt=($e*$e+nt*nt)/-2,xt=D(-mt*(2+mt)),Bt=nt*mt+$e*xt,zt=$e*mt-nt*xt,Wt=D(zt*zt+Bt*Bt);return[e(xt*Bt,Wt*(1+mt)),Wt?-I(xt*zt/Wt):0]};function Nl(){return b.geoProjection(Ol).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fi($e,nt){var mt=re($e,nt);return[(mt[0]+$e/M)/2,(mt[1]+nt)/2]}fi.invert=function($e,nt){var mt=$e,xt=nt,Bt=25;do{var zt=t(xt),Wt=v(xt),Pr=v(2*xt),Br=Wt*Wt,kr=zt*zt,jr=v(mt),Jr=t(mt/2),la=v(mt/2),xa=la*la,Ba=1-kr*Jr*Jr,an=Ba?O(zt*Jr)*D(Tn=1/Ba):Tn=0,Tn,ii=.5*(2*an*zt*la+mt/M)-$e,Si=.5*(an*Wt+xt)-nt,oi=.5*Tn*(kr*xa+an*zt*Jr*Br)+.5/M,Ji=Tn*(jr*Pr/4-an*Wt*la),Qi=.125*Tn*(Pr*la-an*Wt*kr*jr),Oo=.5*Tn*(Br*Jr+an*xa*zt)+.5,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]};function eu(){return b.geoProjection(fi).scale(158.837)}p.geoNaturalEarth=b.geoNaturalEarth1,p.geoNaturalEarthRaw=b.geoNaturalEarth1Raw,p.geoAiry=Q,p.geoAiryRaw=$,p.geoAitoff=ne,p.geoAitoffRaw=re,p.geoArmadillo=G,p.geoArmadilloRaw=se,p.geoAugust=K,p.geoAugustRaw=X,p.geoBaker=Z,p.geoBakerRaw=q,p.geoBerghaus=ae,p.geoBerghausRaw=ee,p.geoBertin1953=Ve,p.geoBertin1953Raw=Ie,p.geoBoggs=Be,p.geoBoggsRaw=Ae,p.geoBonne=Tt,p.geoBonneRaw=gt,p.geoBottomley=$t,p.geoBottomleyRaw=At,p.geoBromley=_r,p.geoBromleyRaw=rr,p.geoChamberlin=Ne,p.geoChamberlinRaw=vt,p.geoChamberlinAfrica=De,p.geoCollignon=Ke,p.geoCollignonRaw=We,p.geoCraig=et,p.geoCraigRaw=Je,p.geoCraster=Pt,p.geoCrasterRaw=pt,p.geoCylindricalEqualArea=qt,p.geoCylindricalEqualAreaRaw=Ct,p.geoCylindricalStereographic=Ht,p.geoCylindricalStereographicRaw=Vt,p.geoEckert1=Kr,p.geoEckert1Raw=Sr,p.geoEckert2=Rt,p.geoEckert2Raw=Yt,p.geoEckert3=ur,p.geoEckert3Raw=nr,p.geoEckert4=Rr,p.geoEckert4Raw=cr,p.geoEckert5=Zr,p.geoEckert5Raw=Qr,p.geoEckert6=Pa,p.geoEckert6Raw=ha,p.geoEisenlohr=Xa,p.geoEisenlohrRaw=un,p.geoFahey=yn,p.geoFaheyRaw=Nn,p.geoFoucaut=li,p.geoFoucautRaw=Un,p.geoFoucautSinusoidal=on,p.geoFoucautSinusoidalRaw=Yn,p.geoGilbert=Yi,p.geoGingery=rt,p.geoGingeryRaw=Ja,p.geoGinzburg4=Tr,p.geoGinzburg4Raw=lr,p.geoGinzburg5=Dr,p.geoGinzburg5Raw=Ir,p.geoGinzburg6=kt,p.geoGinzburg6Raw=ot,p.geoGinzburg8=ar,p.geoGinzburg8Raw=jt,p.geoGinzburg9=xr,p.geoGinzburg9Raw=Er,p.geoGringorten=wa,p.geoGringortenRaw=Lr,p.geoGuyou=Di,p.geoGuyouRaw=Ri,p.geoHammer=we,p.geoHammerRaw=he,p.geoHammerRetroazimuthal=jn,p.geoHammerRetroazimuthalRaw=fn,p.geoHealpix=Hi,p.geoHealpixRaw=qi,p.geoHill=Ro,p.geoHillRaw=Mi,p.geoHomolosine=Wo,p.geoHomolosineRaw=jo,p.geoHufnagel=wo,p.geoHufnagelRaw=to,p.geoHyperelliptical=Xi,p.geoHyperellipticalRaw=Io,p.geoInterrupt=Ss,p.geoInterruptedBoggs=Vs,p.geoInterruptedHomolosine=Bo,p.geoInterruptedMollweide=Pi,p.geoInterruptedMollweideHemispheres=bs,p.geoInterruptedSinuMollweide=hl,p.geoInterruptedSinusoidal=dl,p.geoKavrayskiy7=lu,p.geoKavrayskiy7Raw=wu,p.geoLagrange=Fl,p.geoLagrangeRaw=xc,p.geoLarrivee=uu,p.geoLarriveeRaw=$u,p.geoLaskowski=vs,p.geoLaskowskiRaw=tl,p.geoLittrow=ms,p.geoLittrowRaw=os,p.geoLoximuthal=Fu,p.geoLoximuthalRaw=rl,p.geoMiller=Ku,p.geoMillerRaw=zu,p.geoModifiedStereographic=Ou,p.geoModifiedStereographicRaw=bc,p.geoModifiedStereographicAlaska=wc,p.geoModifiedStereographicGs48=pc,p.geoModifiedStereographicGs50=Nf,p.geoModifiedStereographicMiller=Bu,p.geoModifiedStereographicLee=Tc,p.geoMollweide=ce,p.geoMollweideRaw=_e,p.geoMtFlatPolarParabolic=jf,p.geoMtFlatPolarParabolicRaw=$l,p.geoMtFlatPolarQuartic=Wc,p.geoMtFlatPolarQuarticRaw=Hc,p.geoMtFlatPolarSinusoidal=Yc,p.geoMtFlatPolarSinusoidalRaw=Qu,p.geoNaturalEarth2=Uf,p.geoNaturalEarth2Raw=Nu,p.geoNellHammer=Xc,p.geoNellHammerRaw=al,p.geoInterruptedQuarticAuthalic=Ac,p.geoNicolosi=ec,p.geoNicolosiRaw=Zc,p.geoPatterson=ac,p.geoPattersonRaw=qf,p.geoPolyconic=mf,p.geoPolyconicRaw=Mc,p.geoPolyhedral=Au,p.geoPolyhedralButterfly=Uu,p.geoPolyhedralCollignon=yf,p.geoPolyhedralWaterman=_f,p.geoProject=Vf,p.geoGringortenQuincuncial=Ft,p.geoPeirceQuincuncial=tr,p.geoPierceQuincuncial=tr,p.geoQuantize=Fr,p.geoQuincuncial=vc,p.geoRectangularPolyconic=ea,p.geoRectangularPolyconicRaw=wr,p.geoRobinson=Na,p.geoRobinsonRaw=Ia,p.geoSatellite=Da,p.geoSatelliteRaw=mn,p.geoSinuMollweide=ds,p.geoSinuMollweideRaw=Ao,p.geoSinusoidal=yt,p.geoSinusoidalRaw=Ye,p.geoStitch=ns,p.geoTimes=zo,p.geoTimesRaw=Kn,p.geoTwoPointAzimuthal=zl,p.geoTwoPointAzimuthalRaw=js,p.geoTwoPointAzimuthalUsa=Cl,p.geoTwoPointEquidistant=xl,p.geoTwoPointEquidistantRaw=Kl,p.geoTwoPointEquidistantUsa=Gu,p.geoVanDerGrinten=Su,p.geoVanDerGrintenRaw=Hu,p.geoVanDerGrinten2=Jc,p.geoVanDerGrinten2Raw=mc,p.geoVanDerGrinten3=du,p.geoVanDerGrinten3Raw=oc,p.geoVanDerGrinten4=Ql,p.geoVanDerGrinten4Raw=Jl,p.geoWagner=lh,p.geoWagner7=Pc,p.geoWagnerRaw=bf,p.geoWagner4=wf,p.geoWagner4Raw=Wu,p.geoWagner6=ku,p.geoWagner6Raw=Qc,p.geoWiechel=Nl,p.geoWiechelRaw=Ol,p.geoWinkel3=eu,p.geoWinkel3Raw=fi,Object.defineProperty(p,"__esModule",{value:!0})})}}),Sj=ze({"src/plots/geo/zoom.js"(J,V){"use strict";var p=ci(),b=Nr(),E=mi(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function n(A,x){var z=A.projection,I;return x._isScoped?I=o:x._isClipped?I=c:I=s,I(A,z)}V.exports=n;function r(A,x){return p.behavior.zoom().translate(x.translate()).scaleExtent(x.scaleExtent()).scale(x.scale())}function a(A,x,z){var I=A.id,O=A.graphDiv,D=O.layout,B=D[I],F=O._fullLayout,P=F[I],j={},U={};function $(Q,re){j[I+"."+Q]=b.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",D,F._preGUI,j);var ne=b.nestedProperty(P,Q);ne.get()!==re&&(ne.set(re),b.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z($),$("projection.scale",x.scale()/A.fitScale),$("fitbounds",!1),O.emit("plotly_relayout",U)}function o(A,x){var z=r(A,x);function I(){p.select(this).style(e)}function O(){x.scale(p.event.scale).translate(p.event.translate),A.render(!0);var F=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function D(F){var P=x.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){p.select(this).style(t),a(A,x,D)}return z.on("zoomstart",I).on("zoom",O).on("zoomend",B),z}function s(A,x){var z=r(A,x),I=2,O,D,B,F,P,j,U,$,Q;function re(H){return x.invert(H)}function ne(H){var Y=re(H);if(!Y)return!0;var q=x(Y);return Math.abs(q[0]-H[0])>I||Math.abs(q[1]-H[1])>I}function se(){p.select(this).style(e);let{x:H,y:Y,width:q,height:Z}=this.getBBox();O=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],D=x.rotate(),B=x.translate(),F=D,P=re(O)}function G(){let{x:H,y:Y,width:q,height:Z}=this.getBBox();if(j=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],ne(O)){z.scale(x.scale()),z.translate(x.translate());return}x.scale(p.event.scale),x.translate([B[0],p.event.translate[1]]),P?re(j)&&($=re(j),U=[F[0]+($[0]-P[0]),D[1],D[2]],x.rotate(U),F=U):(O=j,P=re(O)),Q=!0,A.render(!0);var ee=x.rotate(),ae=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-ee[0]})}function X(){p.select(this).style(t),Q&&a(A,x,K)}function K(H){var Y=x.rotate(),q=x.invert(A.midPt);H("projection.rotation.lon",-Y[0]),H("center.lon",q[0]),H("center.lat",q[1])}return z.on("zoomstart",se).on("zoom",G).on("zoomend",X),z}function c(A,x){var z={r:x.rotate(),k:x.scale()},I=r(A,x),O=u(I,"zoomstart","zoom","zoomend"),D=0,B=I.on,F;I.on("zoomstart",function(){p.select(this).style(e);let{x:Q,y:re,width:ne,height:se}=this.getBBox(),G=p.event.sourceEvent?p.mouse(this):[Q+ne/2,re+se/2],X=x.rotate(),K=X,H=x.translate(),Y=h(X);F=m(x,G),B.call(I,"zoom",function(){let{x:q,y:Z,width:ee,height:ae}=this.getBBox(),he=p.event.sourceEvent?p.mouse(this):[q+ee/2,Z+ae/2];if(x.scale(z.k=p.event.scale),!F)G=he,F=m(x,G);else if(m(x,he)){x.rotate(X).translate(H);var xe=m(x,he),we=g(F,xe),Me=C(v(Y,we)),Se=z.r=i(Me,F,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),x.rotate(Se),K=Se}j(O.of(this,arguments))}),P(O.of(this,arguments))}).on("zoomend",function(){p.select(this).style(t),B.call(I,"zoom",null),U(O.of(this,arguments)),a(A,x,$)}).on("zoom.redraw",function(){A.render(!0);var Q=x.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){D++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--D||Q({type:"zoomend"})}function $(Q){var re=x.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return p.rebind(I,O,"on")}function m(A,x){var z=A.invert(x);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function h(A){var x=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,O=Math.sin(x),D=Math.cos(x),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[D*F*j+O*B*P,O*F*j-D*B*P,D*B*j+O*F*P,D*F*P-O*B*j]}function v(A,x){var z=A[0],I=A[1],O=A[2],D=A[3],B=x[0],F=x[1],P=x[2],j=x[3];return[z*B-I*F-O*P-D*j,z*F+I*B+O*j-D*P,z*P-I*j+O*B+D*F,z*j+I*P-O*F+D*B]}function g(A,x){if(!(!A||!x)){var z=f(A,x),I=Math.sqrt(T(z,z)),O=.5*Math.acos(Math.max(-1,Math.min(1,T(A,x)))),D=Math.sin(O)/I;return I&&[Math.cos(O),z[2]*D,-z[1]*D,z[0]*D]}}function i(A,x,z){var I=M(x,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var O=x[0],D=x[1],B=x[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(D,O)*l,$=Math.sqrt(O*O+D*D),Q,re;Math.abs(P)>$?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/$)*l-U,Q=Math.sqrt($*$-P*P));var ne=180-re-2*U,se=(Math.atan2(j,F)-Math.atan2(B,Q))*l,G=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,X=w(z[0],z[1],re,se),K=w(z[0],z[1],ne,G);return X<=K?[re,se,z[2]]:[ne,G,z[2]]}function w(A,x,z,I){var O=S(z-A),D=S(I-x);return Math.sqrt(O*O+D*D)}function S(A){return(A%360+540)%360-180}function M(A,x,z){var I=z*k,O=A.slice(),D=x===0?1:0,B=x===2?1:2,F=Math.cos(I),P=Math.sin(I);return O[D]=A[D]*F-A[B]*P,O[B]=A[B]*F+A[D]*P,O}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var x=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(x),I*Math.sin(x),Math.sin(z)]}function T(A,x){for(var z=0,I=0,O=A.length;I0&&$._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(D,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,D,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ne=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ne.selectAll("path"),this._render()},x.updateProjection=function(D,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,$=P.projection,Q=P.lonaxis,re=P.lataxis,ne=Q._ax,se=re._ax,G=this.projection=z(P),X=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},H=$.rotation||{},Y=Q.range||[],q=re.range||[];if(P.fitbounds){ne._length=X[1][0]-X[0][0],se._length=X[1][1]-X[0][1],ne.range=h(F,ne),se.range=h(F,se);let ve=[];for(let $t of D){let rr=$t[0].trace;rr.visible===!0&&rr._module.fitCoords&&ve.push(rr._module.fitCoords($t,P))}let le=m(F,ne),Ae=le.min.reduce(($t,{val:rr})=>Math.min($t,rr),1/0),Xe=le.max.reduce(($t,{val:rr})=>Math.max($t,rr),-1/0)-Ae,Ye=_.boundsOfCoords(ve.flat()),[yt,,gt]=Ye||[],Tt=gt-yt;if(!!Ye&&(Xe>360||Xe<360&&TtMath.max(ht,$t(De)),0),Xt=le.max.reduce((ht,De)=>Math.max(ht,rr(De)),0),or=ne._length-_r-Xt,Ot=or>ne._length/10?Tt*ne._length/or:Tt,vt=(yt+gt)/2;ne.range=[vt-Ot/2,vt+Ot/2]}var Z=(ne.range[0]+ne.range[1])/2,ee=(se.range[0]+se.range[1])/2;if(P._isScoped)K={lon:Z,lat:ee};else if(P._isClipped){K={lon:Z,lat:ee},H={lon:Z,lat:ee,roll:H.roll};var ae=$.type,he=C.lonaxisSpan[ae]/2||180,xe=C.lataxisSpan[ae]/2||90;Y=[Z-he,Z+he],q=[ee-xe,ee+xe]}else K={lon:Z,lat:ee},H={lon:Z,lat:H.lat,roll:H.roll}}G.center([K.lon-H.lon,K.lat-H.lat]).rotate([-H.lon,-H.lat,H.roll]).parallels($.parallels);var we=O(Y,q);G.fitExtent(X,we);var Me=this.bounds=G.getBounds(we),Se=this.fitScale=G.scale(),Ie=G.translate();if(G.scaleExtent=()=>{var ve;let{minscale:le}=$,Ae=(ve=$.maxscale)!=null?ve:1/0;return[Se*Math.min(le,Ae),Se*Math.max(le,Ae)]},P.fitbounds){var Ve=G.getBounds(O(ne.range,se.range)),Ge=Math.min((Me[1][0]-Me[0][0])/(Ve[1][0]-Ve[0][0]),(Me[1][1]-Me[0][1])/(Ve[1][1]-Ve[0][1]));isFinite(Ge)?G.scale(Ge*Se):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else G.scale($.scale*Se);var ke=this.midPt=[(Me[0][0]+Me[1][0])/2,(Me[0][1]+Me[1][1])/2];if(G.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Me),P._isAlbersUsa){var _e=G([K.lon,K.lat]);if(_e){var ce=G.translate();G.translate([ce[0]-(_e[0]-ce[0]),ce[1]-(_e[1]-ce[1])])}}},x.updateBaseLayers=function(D,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function $(X){return X==="lonaxis"||X==="lataxis"}function Q(X){return!!C.lineLayers[X]}function re(X){return!!C.fillLayers[X]}var ne=this.hasChoropleth?C.layersForChoropleth:C.layers,se=ne.filter(function(X){return Q(X)||re(X)?B["show"+X]:$(X)?B[X].showgrid:!0}),G=F.framework.selectAll(".layer").data(se,String);G.exit().each(function(X){delete j[X],delete U[X],p.select(this).remove()}),G.enter().append("g").attr("class",function(X){return"layer "+X}).each(function(X){var K=j[X]=p.select(this);X==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):$(X)?U[X]=K.append("path").style("fill","none"):X==="backplot"?K.append("g").classed("choroplethlayer",!0):X==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(X)?U[X]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(X)&&(U[X]=K.append("path").style("stroke","none"))}),G.order(),G.each(function(X){var K=U[X],H=C.layerNameToAdjective[X];X==="frame"?K.datum(C.sphereSVG):Q(X)||re(X)?K.datum(u(P,P.objects[X])):$(X)&&K.datum(I(X,B,D)).call(r.stroke,B[X].gridcolor).call(a.dashLine,B[X].griddash,B[X].gridwidth),Q(X)?K.call(r.stroke,B[H+"color"]).call(a.dashLine,"",B[H+"width"]):re(X)&&K.call(r.fill,B[H+"color"])})},x.updateDims=function(D,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,$=F[1][0]-j+P,Q=F[1][1]-U+P;a.setRect(this.clipRect,j,U,$,Q),this.bgRect.call(a.setRect,j,U,$,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=$,this.yaxis._offset=U,this.yaxis._length=Q},x.updateFx=function(D,B){var F=this,P=F.graphDiv,j=F.bgRect,U=D.dragmode,$=D.clickmode;if(F.isStatic)return;function Q(){var G=F.viewInitial,X={};for(var K in G)X[F.id+"."+K]=G[K];e.call("_guiRelayout",P,X),P.emit("plotly_doubleclick",null)}function re(G){return F.projection.invert([G[0]+F.xaxis._offset,G[1]+F.yaxis._offset])}var ne=function(G,X){if(X.isRect){var K=G.range={};K[F.id]=[re([X.xmin,X.ymin]),re([X.xmax,X.ymax])]}else{var H=G.lassoPoints={};H[F.id]=X.map(re)}},se={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ne},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(G){G===2&&w(P)}};if(U==="pan"){j.node().onmousedown=null;let G=M(F,B);if(j.call(G),!p.event){let X=F.projection.scale(),[K,H]=F.projection.scaleExtent();(XH)&&G.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),se.prepFn=function(G,X,K){i(G,X,K,se,U)},g.init(se));j.on("mousemove",function(){var G=F.projection.invert(t.getPositionFromD3Event());if(!G)return g.unhover(P,p.event);F.xaxis.p2c=function(){return G[0]},F.yaxis.p2c=function(){return G[1]},o.hover(P,p.event,F.id)}),j.on("mouseout",function(){P._dragging||g.unhover(P,p.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&($.indexOf("select")>-1&&S(p.event,P,[F.xaxis],[F.yaxis],F.id,se),$.indexOf("event")>-1&&o.click(P,p.event))})},x.makeFramework=function(){var D=this,B=D.graphDiv,F=B._fullLayout,P="clip"+F._uid+D.id;D.clipDef=F._clips.append("clipPath").attr("id",P),D.clipRect=D.clipDef.append("rect"),D.framework=p.select(D.container).append("g").attr("class","geo "+D.id).call(a.setClipUrl,P,B),D.project=function(j){var U=D.projection(j);return U?[U[0]-D.xaxis._offset,U[1]-D.yaxis._offset]:[null,null]},D.xaxis={_id:"x",c2p:function(j){return D.project(j)[0]}},D.yaxis={_id:"y",c2p:function(j){return D.project(j)[1]}},D.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(D.mockAxis,F)},x.saveViewInitial=function(D){var B=D.center||{},F=D.projection,P=F.rotation||{};this.viewInitial={fitbounds:D.fitbounds,"projection.scale":F.scale};var j;D._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:D._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},x.render=function(D){this._hasMarkerAngles&&D?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},x._render=function(){var D=this.projection,B=D.getPath(),F;function P(U){var $=D(U.lonlat);return $?n($[0],$[1]):null}function j(U){return D.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(D){var B=D.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=b[P]||l[P],U=j(),$=D._isSatellite?Math.acos(1/B.distance)*180/Math.PI:D._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(G){return G?U:[]},ne=0;neH}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(G){return U.getPath().bounds(G)},U.precision(C.precision),D._isSatellite&&U.tilt(B.tilt).distance(B.distance),$&&U.clipAngle($-C.clipPad),U}function I(D,B,F){var P=1e-6,j=2.5,U=B[D],$=C.scopeDefaults[B.scope],Q,re,ne;D==="lonaxis"?(Q=$.lonaxisRange,re=$.lataxisRange,ne=function(ee,ae){return[ee,ae]}):D==="lataxis"&&(Q=$.lataxisRange,re=$.lonaxisRange,ne=function(ee,ae){return[ae,ee]});var se={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(se,F);var G=c.calcTicks(se);!B.isScoped&&D==="lonaxis"&&G.pop();for(var X=G.length,K=new Array(X),H=0;Hhe[xe]!=null)||l.fitboundsIncompatible.has(i)?a.fitbounds=!1:ee.forEach(({dst:he,key:xe})=>he&&(he[xe]=null))}}}}),RA=ze({"src/plots/geo/index.js"(J,V){"use strict";var p=zf().getSubplotCalcData,b=Nr().counterRegex,E=Ej(),k="geo",l=b(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(a){for(var o=a._fullLayout,s=a.calcdata,c=o._subplots[k],m=0;m")}}}}),FA=ze({"src/traces/choropleth/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.location=E.location,b.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b.ct=t.ct,b}}}),zA=ze({"src/traces/choropleth/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r,a,o,s;if(E===!1)for(n=0;n=Math.min(U,$)&&g<=Math.max(U,$)?0:1/0}if(I=Math.min(Q,re)&&i<=Math.max(Q,re)?0:1/0}B=Math.sqrt(I*I+O*O),u=S[z]}}}else for(z=S.length-1;z>-1;z--)f=S[z],A=h[f],x=v[f],I=c.c2p(A)-g,O=m.c2p(x)-i,D=Math.sqrt(I*I+O*O),D100},J.isDotSymbol=function(p){return typeof p=="string"?V.DOT_RE.test(p):p>200}}}),Dj=ze({"src/traces/scattergl/defaults.js"(J,V){"use strict";var p=Nr(),b=mi(),E=D2(),k=ty(),l=zd(),e=el(),t=Gv(),n=yd(),r=id(),a=_d(),o=Od(),s=xd();V.exports=function(m,h,v,g){function i(u,A){return p.coerce(m,h,k,u,A)}var w=m.marker?E.isOpenSymbol(m.marker.symbol):!1,S=e.isBubble(m),M=t(m,h,g,i);if(!M){h.visible=!1;return}n(m,h,g,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>=0?(s=c,o=c-1):a=c+1}return s}function b(t,n,r,a,o){for(var s=o+1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>0?(s=c,o=c-1):a=c+1}return s}function E(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<0?(s=c,a=c+1):o=c-1}return s}function k(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<=0?(s=c,a=c+1):o=c-1}return s}function l(t,n,r,a,o){for(;a<=o;){var s=a+o>>>1,c=t[s],m=r!==void 0?r(c,n):c-n;if(m===0)return s;m<=0?a=s+1:o=s-1}return-1}function e(t,n,r,a,o,s){return typeof r=="function"?s(t,n,r,a===void 0?0:a|0,o===void 0?t.length-1:o|0):s(t,n,void 0,r===void 0?0:r|0,a===void 0?t.length-1:a|0)}V.exports={ge:function(t,n,r,a,o){return e(t,n,r,a,o,p)},gt:function(t,n,r,a,o){return e(t,n,r,a,o,b)},lt:function(t,n,r,a,o){return e(t,n,r,a,o,E)},le:function(t,n,r,a,o){return e(t,n,r,a,o,k)},eq:function(t,n,r,a,o){return e(t,n,r,a,o,l)}}}}),BA=ze({"node_modules/clamp/index.js"(J,V){V.exports=p;function p(b,E,k){return Ek?k:b:bE?E:b}}}),qd=ze({"node_modules/pick-by-alias/index.js"(J,V){"use strict";V.exports=function(k,l,e){var t={},n,r;if(typeof l=="string"&&(l=b(l)),Array.isArray(l)){var a={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=p(E,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),c0=ze({"node_modules/array-bounds/index.js"(J,V){"use strict";V.exports=p;function p(b,E){if(!b||b.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=b[n]),b[n]>>1,S;h.dtype||(h.dtype="array"),typeof h.dtype=="string"?S=new(r(h.dtype))(w):h.dtype&&(S=h.dtype,Array.isArray(S)&&(S.length=w));for(let I=0;Iv||P>o){for(let Y=0;Yae||$>he||Q=ne||Z===ee)return;let xe=M[q];ee===void 0&&(ee=xe.length);for(let ce=Z;ce=B&&le<=P&&Ae>=F&&Ae<=j&&se.push(ve)}let we=C[q],Me=we[Z*4+0],Se=we[Z*4+1],Ie=we[Z*4+2],Ve=we[Z*4+3],Ge=X(we,Z+1),ke=Y*.5,_e=q+1;G(K,H,ke,_e,Me,Se||Ie||Ve||Ge),G(K,H+ke,ke,_e,Se,Ie||Ve||Ge),G(K+ke,H,ke,_e,Ie,Ve||Ge),G(K+ke,H+ke,ke,_e,Ve,Ge)}function X(K,H){let Y=null,q=0;for(;Y===null;)if(Y=K[H*4+q],q++,q>K.length)return null;return Y}return se}function x(I,O,D,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(a.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(a.length==p[o])return a.unshift(r),t.push(a);if(a.length1&&(m=1),m<-1&&(m=-1),c*Math.acos(m)},e=function(r,a,o,s,c,m,h,v,g,i,w,S){var M=Math.pow(c,2),C=Math.pow(m,2),_=Math.pow(w,2),T=Math.pow(S,2),f=M*C-M*T-C*_;f<0&&(f=0),f/=M*T+C*_,f=Math.sqrt(f)*(h===v?-1:1);var u=f*c/m*S,A=f*-m/c*w,x=i*u-g*A+(r+o)/2,z=g*u+i*A+(a+s)/2,I=(w-u)/c,O=(S-A)/m,D=(-w-u)/c,B=(-S-A)/m,F=l(1,0,I,O),P=l(I,O,D,B);return v===0&&P>0&&(P-=b),v===1&&P<0&&(P+=b),[x,z,F,P]},t=function(r){var a=r.px,o=r.py,s=r.cx,c=r.cy,m=r.rx,h=r.ry,v=r.xAxisRotation,g=v===void 0?0:v,i=r.largeArcFlag,w=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(m===0||h===0)return[];var _=Math.sin(g*b/360),T=Math.cos(g*b/360),f=T*(a-s)/2+_*(o-c)/2,u=-_*(a-s)/2+T*(o-c)/2;if(f===0&&u===0)return[];m=Math.abs(m),h=Math.abs(h);var A=Math.pow(f,2)/Math.pow(m,2)+Math.pow(u,2)/Math.pow(h,2);A>1&&(m*=Math.sqrt(A),h*=Math.sqrt(A));var x=e(a,o,s,c,m,h,w,M,_,T,f,u),z=p(x,4),I=z[0],O=z[1],D=z[2],B=z[3],F=Math.abs(B)/(b/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(n=i[i.length-4],r=i[i.length-3]):(n=m,r=h),t.push(i)}return t}function E(l,e,t,n){return["C",l,e,t,n,t,n]}function k(l,e,t,n,r,a){return["C",l/3+2/3*t,e/3+2/3*n,r/3+2/3*t,a/3+2/3*n,r,a]}}}),OA=ze({"node_modules/is-svg-path/index.js"(J,V){"use strict";V.exports=function(b){return typeof b!="string"?!1:(b=b.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(b)&&/[\dz]$/i.test(b)&&b.length>4))}}}),Hj=ze({"node_modules/svg-path-bounds/index.js"(J,V){"use strict";var p=Uj(),b=qj(),E=Gj(),k=OA();V.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=p(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=b(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,r=e.length;nt[2]&&(t[2]=a[o+0]),a[o+1]>t[3]&&(t[3]=a[o+1]);return t}}}),Wj=ze({"node_modules/bitmap-sdf/index.js"(J,V){"use strict";V.exports=b;var p=1e20;function b(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,n=e.radius==null?8:e.radius,r=e.channel||0,a,o,s,c,m,h,v,g,i,w,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");a=e.width,o=e.height,c=l,e.stride?h=e.stride:h=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(g=l,v=g.getContext("2d"),a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(g=l.canvas,v=l,a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.ImageData&&l instanceof window.ImageData&&(i=l,a=l.width,o=l.height,c=i.data,h=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(a*o),w=0,S=Math.floor(m.length/h);wYj});function Yj(J,V={}){if(!(0,UA.default)(J))throw Error("Invalid SVG path");let p,b;V.shape||Array.isArray(V)?[p,b]=V.shape||V:(p=ry.width=V.width||V.w||200,b=ry.height=V.height||V.h||200);let E=Math.min(p,b),k=V.stroke||0,l=V.viewbox||V.viewBox||(0,jA.default)(J),e=[p/(l[2]-l[0]),b/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;Vh.fillStyle="black",Vh.fillRect(0,0,p,b),Vh.fillStyle="white",k&&(typeof k!="number"&&(k=1),Vh.strokeStyle=k>0?"white":"black",Vh.lineWidth=Math.abs(k)),Vh.translate(p*.5,b*.5),Vh.scale(t,t);let n=new Path2D(J);return Vh.fill(n),k&&Vh.stroke(n),Vh.setTransform(1,0,0,1,0,0),(0,qA.default)(Vh,{cutoff:V.cutoff!=null?V.cutoff:.5,radius:V.radius!=null?V.radius:E*.5})}var jA,UA,qA,ry,Vh,Xj=zi({"node_modules/svg-path-sdf/svg-path-sdf.js"(){jA=Yl(Hj()),UA=Yl(OA()),qA=Yl(Wj()),ry=document.createElement("canvas"),Vh=ry.getContext("2d",{willReadFrequently:!0})}}),h0=ze({"src/traces/scattergl/convert.js"(J,V){"use strict";var p=ao(),b=(Xj(),Po(NA)).default,{normalize:E}=Qn(),k=mi(),l=Nr(),e=l.isArrayOrTypedArray,t=$i(),n=Xl(),r=fp().formatColor,a=el(),o=l1(),s=D2(),c=bv(),m=np().DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=kh().appendArrayPointValue;function g(B,F){var P,j={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(F.visible!==!0)return j;if(a.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),a.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var $=F.marker.opacity;for(j.markerUnsel.opacity=new Array($.length),P=0;P<$.length;P++)j.markerUnsel.opacity[P]=m*$[P]}if(a.hasLines(F)){j.line={overlay:!0,thickness:F.line.width*U,color:F.line.color,opacity:F.opacity};var Q=(c.DASHES[F.line.dash]||[1]).slice();for(P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},$,Q=e(j.symbol),re=e(j.angle),ne=e(j.color),se=e(j.line.color),G=e(j.opacity),X=e(j.size),K=e(j.line.width),H;if(Q||(H=s.isOpenSymbol(j.symbol)),Q||ne||se||G||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var Y=j.symbol,q=j.angle,Z=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ae=ee;for(ee=Array(P),$=0;$c.TOO_MANY_POINTS||a.hasMarkers(F)?"rect":"round";if(se&&F.connectgaps){var X=$[0],K=$[1];for(Q=0;Q<$.length;Q+=2)isNaN($[Q])||isNaN($[Q+1])?($[Q]=X,$[Q+1]=K):(X=$[Q],K=$[Q+1])}return{join:G,positions:$}}function O(B,F,P,j,U){var $=k.getComponentMethod("errorbars","makeComputeError"),Q=n.getFromId(B,F.xaxis,"x"),re=n.getFromId(B,F.yaxis,"y"),ne=P.length/2,se={};function G(X,K){var H=K._id.charAt(0),Y=F["error_"+H];if(Y&&Y.visible&&(K.type==="linear"||K.type==="log")){for(var q=$(Y),Z={x:0,y:1}[H],ee={x:[0,1,2,3],y:[2,3,0,1]}[H],ae=new Float64Array(4*ne),he=1/0,xe=-1/0,we=0,Me=0;we1?ne[Q]:ne[0]:ne,H=e(se)?se.length>1?se[Q]:se[0]:se,Y=h[K],q=h[H],Z=G?G/.8+1:0,ee=-q*Z-q*.5;$.offset[Q]=[Y*Z/X,ee/X]}}return $}V.exports={style:g,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:O,textPosition:D}}}),VA=ze({"src/traces/scattergl/scene_update.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){p.extendFlat(l,t,e)},l.init(),l.update=function(r){var a=p.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(a),l.scatter2d&&l.scatter2d.update(a),l.line2d&&l.line2d.update(a),l.error2d&&l.error2d.update(a.concat(a)),l.select2d&&l.select2d.update(a),l.glText)for(var o=0;o=m,u=T*2,A={},x,z=M.makeCalcdata(w,"x"),I=C.makeCalcdata(w,"y"),O=l(w,M,"x",z),D=l(w,C,"y",I),B=O.vals,F=D.vals;w._x=B,w._y=F,w.xperiodalignment&&(w._origX=z,w._xStarts=O.starts,w._xEnds=O.ends),w.yperiodalignment&&(w._origY=I,w._yStarts=D.starts,w._yEnds=D.ends);var P=new Array(u),j=new Array(T);for(x=0;x1&&b.extendFlat(_.line,o.linePositions(g,w,S)),_.errorX||_.errorY){var T=o.errorBarPositions(g,w,S,M,C);_.errorX&&b.extendFlat(_.errorX,T.x),_.errorY&&b.extendFlat(_.errorY,T.y)}return _.text&&(b.extendFlat(_.text,{positions:S},o.textPosition(g,w,_.text,_.marker)),b.extendFlat(_.textSel,{positions:S},o.textPosition(g,w,_.text,_.markerSel)),b.extendFlat(_.textUnsel,{positions:S},o.textPosition(g,w,_.text,_.markerUnsel))),_}}}),GA=ze({"src/traces/scattergl/edit_style.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=np().DESELECTDIM;function k(l){var e=l[0],t=e.trace,n=e.t,r=n._scene,a=n.index,o=r.selectBatch[a],s=r.unselectBatch[a],c=r.textOptions[a],m=r.textSelectedOptions[a]||{},h=r.textUnselectedOptions[a]||{},v=p.extendFlat({},c),g,i;if(o.length||s.length){var w=m.color,S=h.color,M=c.color,C=p.isArrayOrTypedArray(M);for(v.color=new Array(t._length),g=0;g10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),n=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],n="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(n="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(n="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(n="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:n,values:e,alpha:t}}}}),Qj=ze({"node_modules/color-rgba/index.js"(J,V){"use strict";var p=Jj();V.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,n=p(k);if(!n.space)return[];var r=[0,0,0],a=n.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(n.values[0],r[0]),a[0]),l[1]=Math.min(Math.max(n.values[1],r[1]),a[1]),l[2]=Math.min(Math.max(n.values[2],r[2]),a[2]),n.space[0]==="h"&&(l=b(l)),l.push(Math.min(Math.max(n.alpha,0),1)),l};function b(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,n,r,a,o,s=0;if(l===0)return o=e*255,[o,o,o];for(n=e<.5?e*(1+l):e+l-e*l,t=2*e-n,a=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(n-t)*6*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[s++]=o*255;return a}}}),ay=ze({"node_modules/color-normalize/index.js"(J,V){"use strict";var p=Qj(),b=F2();V.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=b(e),n=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=p(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,r&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(r?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),n[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),n)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),eU=ze({"node_modules/color-id/index.js"(J,V){"use strict";var p=BA();V.exports=b,V.exports.to=b,V.exports.from=E;function b(k,l){l==null&&(l=!0);var e=k[0],t=k[1],n=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,n*=255,r*=255),e=p(e,0,255)&255,t=p(t,0,255)&255,n=p(n,0,255)&255,r=p(r,0,255)&255;var a=e*16777216+(t<<16)+(n<<8)+r;return a}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,n=(k&65280)>>>8,r=k&255;return l===!1?[e,t,n,r]:[e/255,t/255,n/255,r/255]}}}),tU=ze({"node_modules/glslify/browser.js"(J,V){V.exports=function(p){typeof p=="string"&&(p=[p]);for(var b=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,g.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:g},attributes:{x:(x,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(x,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(x,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(x,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(x,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(x,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(x,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(x,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(x,z)=>z.activation===!0?{constant:[1]}:z.activation?z.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"},u=Object.assign({},f);u.frag=l([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2615,10 +2615,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:o.prop("range"),lineWidth:o.prop("lineWidth"),capSize:o.prop("capSize"),opacity:o.prop("opacity"),scale:o.prop("scale"),translate:o.prop("translate"),scaleFract:o.prop("scaleFract"),translateFract:o.prop("translateFract"),viewport:(A,x)=>[x.viewport.x,x.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:g,offset:(A,x)=>x.offset*4,divisor:1},position:{buffer:h,offset:(A,x)=>x.offset*8,divisor:1},positionFract:{buffer:v,offset:(A,x)=>x.offset*8,divisor:1},error:{buffer:i,offset:(A,x)=>x.offset*16,divisor:1},direction:{buffer:w,stride:24,offset:0},lineOffset:{buffer:w,stride:24,offset:8},capOffset:{buffer:w,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:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:f,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?f(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return T(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((x,z)=>{if(x){if(A&&(A[z]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}T(z)}})}function T(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],m(A),A.after&&A.after(A))}function f(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let x=0,z=0;if(C.groups=M=A.map((D,B)=>{let F=M[B];if(D)typeof D=="function"?D={after:D}:typeof D[0]=="number"&&(D={positions:D});else return F;return D=k(D,{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"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},D=l({},S,D)),E(F,D,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=p(P,2),j.offset=x,x+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let $=j.bounds;return P||(P=$),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=n(j.scale),j.translateFract=n(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),x||z){let D=M.reduce((j,U,$)=>j+(U?U.count:0),0),B=new Float64Array(D*2),F=new Uint8Array(D*4),P=new Float32Array(D*4);M.forEach((j,U)=>{if(!j)return;let{positions:$,count:Q,offset:re,color:ne,errors:se}=j;Q&&(F.set(ne,re*4),P.set(se,re*4),B.set($,re*2))});var I=t(B);h(I);var O=n(B,I);v(O),g(F),i(P)}}function u(){h.destroy(),v.destroy(),g.destroy(),i.destroy(),w.destroy()}}}}),rq=ze({"node_modules/unquote/index.js"(J,V){var p=/[\'\"]/;V.exports=function(E){return E?(p.test(E.charAt(0))&&(E=E.substr(1)),p.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),sM=ze({"node_modules/css-global-keywords/index.json"(J,V){V.exports=["inherit","initial","unset"]}}),lM=ze({"node_modules/css-system-font-keywords/index.json"(J,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),uM=ze({"node_modules/css-font-weight-keywords/index.json"(J,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),cM=ze({"node_modules/css-font-style-keywords/index.json"(J,V){V.exports=["normal","italic","oblique"]}}),fM=ze({"node_modules/css-font-stretch-keywords/index.json"(J,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),aq=ze({"node_modules/parenthesis/index.js"(J,V){"use strict";function p(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],n=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),m=[];function h(v,g,i){var w=e.push(v.slice(s[0].length,-s[1].length))-1;return m.push(w),n+w+n}e.forEach(function(v,g){for(var i,w=0;v!=i;)if(i=v,v=v.replace(c,h),w++>1e4)throw Error("References have circular dependency. Please, check them.");e[g]=v}),m=m.reverse(),e=e.map(function(v){return m.forEach(function(g){v=v.replace(new RegExp("(\\"+n+g+"\\"+n+")","g"),s[0]+"$1"+s[1])}),v})});var a=new RegExp("\\"+n+"([0-9]+)\\"+n);function o(s,c,m){for(var h=[],v,g=0;v=a.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");h.push(s.slice(0,v.index)),h.push(o(c[v[1]],c)),s=s.slice(v.index+v[0].length)}return h.push(s),h}return r?e:o(e[0],e)}function b(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],n;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),a=0;t!=n;){if(a++>1e4)throw Error("Circular references in "+k);n=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,m){return Array.isArray(m)&&(m=m.reduce(s,"")),c+m},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?b(k,l):p(k,l)}E.parse=p,E.stringify=b,V.exports=E}}),nq=ze({"node_modules/string-split-by/index.js"(J,V){"use strict";var p=aq();V.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=p.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],n=t.split(k);if(l.escape){for(var r=[],a=0;a1&&It===Ut&&(It==='"'||It==="'"))return['"'+t(st.substr(1,st.length-2))+'"'];var ir=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(st);if(ir)return n(st.substr(0,ir.index)).concat(n(ir[1])).concat(n(st.substr(ir.index+ir[0].length)));var dr=st.split(".");if(dr.length===1)return['"'+t(st)+'"'];for(var Ar=[],hr=0;hr"u"?1:window.devicePixelRatio,ta=!1,ka={},Ta=function(ia){},Ra=function(){};if(typeof It=="string"?Ut=document.querySelector(It):typeof It=="object"&&(w(It)?Ut=It:S(It)?(Ar=It,dr=Ar.canvas):("gl"in It?Ar=It.gl:"canvas"in It?dr=C(It.canvas):"container"in It&&(ir=C(It.container)),"attributes"in It&&(hr=It.attributes),"extensions"in It&&(vr=M(It.extensions)),"optionalExtensions"in It&&(Or=M(It.optionalExtensions)),"onDone"in It&&(Ta=It.onDone),"profile"in It&&(ta=!!It.profile),"pixelRatio"in It&&(Cr=+It.pixelRatio),"cachedCode"in It&&(ka=It.cachedCode))),Ut&&(Ut.nodeName.toLowerCase()==="canvas"?dr=Ut:ir=Ut),!Ar){if(!dr){var ua=g(ir||document.body,Ta,Cr);if(!ua)return null;dr=ua.canvas,Ra=ua.onDestroy}hr.premultipliedAlpha===void 0&&(hr.premultipliedAlpha=!0),Ar=i(dr,hr)}return Ar?{gl:Ar,canvas:dr,container:ir,extensions:vr,optionalExtensions:Or,pixelRatio:Cr,profile:ta,cachedCode:ka,onDone:Ta,onDestroy:Ra}:(Ra(),Ta("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(st,It){var Ut={};function ir(hr){var vr=hr.toLowerCase(),Or;try{Or=Ut[vr]=st.getExtension(vr)}catch{}return!!Or}for(var dr=0;dr65535)<<4,st>>>=It,Ut=(st>255)<<3,st>>>=Ut,It|=Ut,Ut=(st>15)<<2,st>>>=Ut,It|=Ut,Ut=(st>3)<<1,st>>>=Ut,It|=Ut,It|st>>1}function P(){var st=f(8,function(){return[]});function It(Ar){var hr=B(Ar),vr=st[F(hr)>>2];return vr.length>0?vr.pop():new ArrayBuffer(hr)}function Ut(Ar){st[F(Ar.byteLength)>>2].push(Ar)}function ir(Ar,hr){var vr=null;switch(Ar){case u:vr=new Int8Array(It(hr),0,hr);break;case A:vr=new Uint8Array(It(hr),0,hr);break;case x:vr=new Int16Array(It(2*hr),0,hr);break;case z:vr=new Uint16Array(It(2*hr),0,hr);break;case I:vr=new Int32Array(It(4*hr),0,hr);break;case O:vr=new Uint32Array(It(4*hr),0,hr);break;case D:vr=new Float32Array(It(4*hr),0,hr);break;default:return null}return vr.length!==hr?vr.subarray(0,hr):vr}function dr(Ar){Ut(Ar.buffer)}return{alloc:It,free:Ut,allocType:ir,freeType:dr}}var j=P();j.zero=P();var U=3408,$=3410,Q=3411,re=3412,ne=3413,se=3414,G=3415,X=33901,K=33902,H=3379,Y=3386,q=34921,Z=36347,ee=36348,ae=35661,he=35660,xe=34930,we=36349,Me=34076,Se=34024,Ie=7936,Ve=7937,Ge=7938,ke=35724,_e=34047,ce=36063,ve=34852,le=3553,Ae=34067,Be=34069,Xe=33984,Ye=6408,yt=5126,gt=5121,Tt=36160,At=36053,$t=36064,rr=16384,_r=function(st,It){var Ut=1;It.ext_texture_filter_anisotropic&&(Ut=st.getParameter(_e));var ir=1,dr=1;It.webgl_draw_buffers&&(ir=st.getParameter(ve),dr=st.getParameter(ce));var Ar=!!It.oes_texture_float;if(Ar){var hr=st.createTexture();st.bindTexture(le,hr),st.texImage2D(le,0,Ye,1,1,0,Ye,yt,null);var vr=st.createFramebuffer();if(st.bindFramebuffer(Tt,vr),st.framebufferTexture2D(Tt,$t,le,hr,0),st.bindTexture(le,null),st.checkFramebufferStatus(Tt)!==At)Ar=!1;else{st.viewport(0,0,1,1),st.clearColor(1,0,0,1),st.clear(rr);var Or=j.allocType(yt,4);st.readPixels(0,0,1,1,Ye,yt,Or),st.getError()?Ar=!1:(st.deleteFramebuffer(vr),st.deleteTexture(hr),Ar=Or[0]===1),j.freeType(Or)}}var Cr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ta=!0;if(!Cr){var ka=st.createTexture(),Ta=j.allocType(gt,36);st.activeTexture(Xe),st.bindTexture(Ae,ka),st.texImage2D(Be,0,Ye,3,3,0,Ye,gt,Ta),j.freeType(Ta),st.bindTexture(Ae,null),st.deleteTexture(ka),ta=!st.getError()}return{colorBits:[st.getParameter($),st.getParameter(Q),st.getParameter(re),st.getParameter(ne)],depthBits:st.getParameter(se),stencilBits:st.getParameter(G),subpixelBits:st.getParameter(U),extensions:Object.keys(It).filter(function(Ra){return!!It[Ra]}),maxAnisotropic:Ut,maxDrawbuffers:ir,maxColorAttachments:dr,pointSizeDims:st.getParameter(X),lineWidthDims:st.getParameter(K),maxViewportDims:st.getParameter(Y),maxCombinedTextureUnits:st.getParameter(ae),maxCubeMapSize:st.getParameter(Me),maxRenderbufferSize:st.getParameter(Se),maxTextureUnits:st.getParameter(xe),maxTextureSize:st.getParameter(H),maxAttributes:st.getParameter(q),maxVertexUniforms:st.getParameter(Z),maxVertexTextureUnits:st.getParameter(he),maxVaryingVectors:st.getParameter(ee),maxFragmentUniforms:st.getParameter(we),glsl:st.getParameter(ke),renderer:st.getParameter(Ve),vendor:st.getParameter(Ie),version:st.getParameter(Ge),readFloat:Ar,npotTextureCube:ta}},Xt=function(st){return st instanceof Uint8Array||st instanceof Uint16Array||st instanceof Uint32Array||st instanceof Int8Array||st instanceof Int16Array||st instanceof Int32Array||st instanceof Float32Array||st instanceof Float64Array||st instanceof Uint8ClampedArray};function or(st){return!!st&&typeof st=="object"&&Array.isArray(st.shape)&&Array.isArray(st.stride)&&typeof st.offset=="number"&&st.shape.length===st.stride.length&&(Array.isArray(st.data)||Xt(st.data))}var Ot=function(st){return Object.keys(st).map(function(It){return st[It]})},vt={shape:Je,flatten:Ke};function ht(st,It,Ut){for(var ir=0;ir0){var ui;if(Array.isArray(ma[0])){Dn=cr(ma);for(var cn=1,sn=1;sn0){if(typeof cn[0]=="number"){var Rn=j.allocType(za.dtype,cn.length);un(Rn,cn),Dn(Rn,ei),j.freeType(Rn)}else if(Array.isArray(cn[0])||Xt(cn[0])){Pn=cr(cn);var In=ur(cn,Pn,za.dtype);Dn(In,ei),j.freeType(In)}}}else if(or(cn)){Pn=cn.shape;var Jn=cn.stride,Ei=0,so=0,ti=0,bi=0;Pn.length===1?(Ei=Pn[0],so=1,ti=Jn[0],bi=0):Pn.length===2&&(Ei=Pn[0],so=Pn[1],ti=Jn[0],bi=Jn[1]);var Wi=Array.isArray(cn.data)?za.dtype:La(cn.data),ro=j.allocType(Wi,Ei*so);Xa(ro,cn.data,Ei,so,ti,bi,cn.offset),Dn(ro,ei),j.freeType(ro)}return kn}return da||kn(ia),kn._reglType="buffer",kn._buffer=za,kn.subdata=ui,Ut.profile&&(kn.stats=za.stats),kn.destroy=function(){Ta(za)},kn}function ua(){Ot(Ar).forEach(function(ia){ia.buffer=st.createBuffer(),st.bindBuffer(ia.type,ia.buffer),st.bufferData(ia.type,ia.persistentData||ia.byteLength,ia.usage)})}return Ut.profile&&(It.getTotalBufferSize=function(){var ia=0;return Object.keys(Ar).forEach(function(ma){ia+=Ar[ma].stats.size}),ia}),{create:Ra,createStream:Or,destroyStream:Cr,clear:function(){Ot(Ar).forEach(Ta),vr.forEach(Ta)},getBuffer:function(ia){return ia&&ia._buffer instanceof hr?ia._buffer:null},restore:ua,_initBuffer:ka}}var Nn=0,yn=0,Un=1,li=1,Yn=4,on=4,en={points:Nn,point:yn,lines:Un,line:li,triangles:Yn,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},vi=0,Yi=1,Ja=4,Oa=5120,lt=5121,rt=5122,fr=5123,lr=5124,Tr=5125,Ir=34963,Dr=35040,ot=35044;function kt(st,It,Ut,ir){var dr={},Ar=0,hr={uint8:lt,uint16:fr};It.oes_element_index_uint&&(hr.uint32=Tr);function vr(ua){this.id=Ar++,dr[this.id]=this,this.buffer=ua,this.primType=Ja,this.vertCount=0,this.type=0}vr.prototype.bind=function(){this.buffer.bind()};var Or=[];function Cr(ua){var ia=Or.pop();return ia||(ia=new vr(Ut.create(null,Ir,!0,!1)._buffer)),ka(ia,ua,Dr,-1,-1,0,0),ia}function ta(ua){Or.push(ua)}function ka(ua,ia,ma,da,Fa,za,kn){ua.buffer.bind();var Dn;if(ia){var ui=kn;!kn&&(!Xt(ia)||or(ia)&&!Xt(ia.data))&&(ui=It.oes_element_index_uint?Tr:fr),Ut._initBuffer(ua.buffer,ia,ma,ui,3)}else st.bufferData(Ir,za,ma),ua.buffer.dtype=Dn||lt,ua.buffer.usage=ma,ua.buffer.dimension=3,ua.buffer.byteLength=za;if(Dn=kn,!kn){switch(ua.buffer.dtype){case lt:case Oa:Dn=lt;break;case fr:case rt:Dn=fr;break;case Tr:case lr:Dn=Tr;break;default:}ua.buffer.dtype=Dn}ua.type=Dn;var cn=Fa;cn<0&&(cn=ua.buffer.byteLength,Dn===fr?cn>>=1:Dn===Tr&&(cn>>=2)),ua.vertCount=cn;var sn=da;if(da<0){sn=Ja;var ei=ua.buffer.dimension;ei===1&&(sn=vi),ei===2&&(sn=Yi),ei===3&&(sn=Ja)}ua.primType=sn}function Ta(ua){ir.elementsCount--,delete dr[ua.id],ua.buffer.destroy(),ua.buffer=null}function Ra(ua,ia){var ma=Ut.create(null,Ir,!0),da=new vr(ma._buffer);ir.elementsCount++;function Fa(za){if(!za)ma(),da.primType=Ja,da.vertCount=0,da.type=lt;else if(typeof za=="number")ma(za),da.primType=Ja,da.vertCount=za|0,da.type=lt;else{var kn=null,Dn=ot,ui=-1,cn=-1,sn=0,ei=0;Array.isArray(za)||Xt(za)||or(za)?kn=za:("data"in za&&(kn=za.data),"usage"in za&&(Dn=nr[za.usage]),"primitive"in za&&(ui=en[za.primitive]),"count"in za&&(cn=za.count|0),"type"in za&&(ei=hr[za.type]),"length"in za?sn=za.length|0:(sn=cn,ei===fr||ei===rt?sn*=2:(ei===Tr||ei===lr)&&(sn*=4))),ka(da,kn,Dn,ui,cn,sn,ei)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=da,Fa.subdata=function(za,kn){return ma.subdata(za,kn),Fa},Fa.destroy=function(){Ta(da)},Fa}return{create:Ra,createStream:Cr,destroyStream:ta,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof vr?ua._elements:null},clear:function(){Ot(dr).forEach(Ta)}}}var jt=new Float32Array(1),ar=new Uint32Array(jt.buffer),Er=5123;function xr(st){for(var It=j.allocType(Er,st.length),Ut=0;Ut>>31<<15,Ar=(ir<<1>>>24)-127,hr=ir>>13&1023;if(Ar<-24)It[Ut]=dr;else if(Ar<-14){var vr=-14-Ar;It[Ut]=dr+(hr+1024>>vr)}else Ar>15?It[Ut]=dr+31744:It[Ut]=dr+(Ar+15<<10)+hr}return It}function zr(st){return Array.isArray(st)||Xt(st)}var Lr=34467,aa=3553,Sa=34067,wa=34069,pn=6408,tn=6406,ai=6407,rn=6409,Ri=6410,Gn=32854,no=32855,Di=36194,fn=32819,Ai=32820,jn=33635,Xn=34042,eo=6402,gi=34041,qi=35904,io=35906,oo=36193,Vn=33776,qn=33777,Hi=33778,Mi=33779,Ro=35986,go=35987,Eo=34798,Ao=35840,ds=35841,jo=35842,Wo=35843,to=36196,wo=5121,pi=5123,Vi=5125,Io=5126,Xi=10242,Ko=10243,Uo=10497,Ls=33071,Ss=33648,Vo=10240,Vs=10241,Ts=9728,Bo=9729,_o=9984,Pi=9985,yo=9986,bs=9987,Dl=33170,hl=4352,ps=4353,dl=4354,wu=34046,lu=3317,xc=37440,Fl=37441,pl=37443,$u=37444,uu=33984,tl=[_o,yo,Pi,bs],vs=[0,rn,Ri,ai,pn],os={};os[rn]=os[tn]=os[eo]=1,os[gi]=os[Ri]=2,os[ai]=os[qi]=3,os[pn]=os[io]=4;function ms(st){return"[object "+st+"]"}var rl=ms("HTMLCanvasElement"),Fu=ms("OffscreenCanvas"),zu=ms("CanvasRenderingContext2D"),Ku=ms("ImageBitmap"),bc=ms("HTMLImageElement"),Lh=ms("HTMLVideoElement"),rh=Object.keys(et).concat([rl,Fu,zu,Ku,bc,Lh]),Ju=[];Ju[wo]=1,Ju[Io]=4,Ju[oo]=2,Ju[pi]=2,Ju[Vi]=4;var ss=[];ss[Gn]=2,ss[no]=2,ss[Di]=2,ss[gi]=4,ss[Vn]=.5,ss[qn]=.5,ss[Hi]=1,ss[Mi]=1,ss[Ro]=.5,ss[go]=1,ss[Eo]=1,ss[Ao]=.5,ss[ds]=.25,ss[jo]=.5,ss[Wo]=.25,ss[to]=.5;function ah(st){return Array.isArray(st)&&(st.length===0||typeof st[0]=="number")}function wc(st){if(!Array.isArray(st))return!1;var It=st.length;return!(It===0||!zr(st[0]))}function pc(st){return Object.prototype.toString.call(st)}function Nf(st){return pc(st)===rl}function Bu(st){return pc(st)===Fu}function Tc(st){return pc(st)===zu}function Ou(st){return pc(st)===Ku}function Gc(st){return pc(st)===bc}function pf(st){return pc(st)===Lh}function $l(st){if(!st)return!1;var It=pc(st);return rh.indexOf(It)>=0?!0:ah(st)||wc(st)||or(st)}function jf(st){return et[Object.prototype.toString.call(st)]|0}function Hc(st,It){var Ut=It.length;switch(st.type){case wo:case pi:case Vi:case Io:var ir=j.allocType(st.type,Ut);ir.set(It),st.data=ir;break;case oo:st.data=xr(It);break;default:}}function Wc(st,It){return j.allocType(st.type===oo?Io:st.type,It)}function Qu(st,It){st.type===oo?(st.data=xr(It),j.freeType(It)):st.data=It}function Yc(st,It,Ut,ir,dr,Ar){for(var hr=st.width,vr=st.height,Or=st.channels,Cr=hr*vr*Or,ta=Wc(st,Cr),ka=0,Ta=0;Ta=1;)vr+=hr*Or*Or,Or/=2;return vr}else return hr*Ut*ir}function Uf(st,It,Ut,ir,dr,Ar,hr){var vr={"don't care":hl,"dont care":hl,nice:dl,fast:ps},Or={repeat:Uo,clamp:Ls,mirror:Ss},Cr={nearest:Ts,linear:Bo},ta=p({mipmap:bs,"nearest mipmap nearest":_o,"linear mipmap nearest":Pi,"nearest mipmap linear":yo,"linear mipmap linear":bs},Cr),ka={none:0,browser:$u},Ta={uint8:wo,rgba4:fn,rgb565:jn,"rgb5 a1":Ai},Ra={alpha:tn,luminance:rn,"luminance alpha":Ri,rgb:ai,rgba:pn,rgba4:Gn,"rgb5 a1":no,rgb565:Di},ua={};It.ext_srgb&&(Ra.srgb=qi,Ra.srgba=io),It.oes_texture_float&&(Ta.float32=Ta.float=Io),It.oes_texture_half_float&&(Ta.float16=Ta["half float"]=oo),It.webgl_depth_texture&&(p(Ra,{depth:eo,"depth stencil":gi}),p(Ta,{uint16:pi,uint32:Vi,"depth stencil":Xn})),It.webgl_compressed_texture_s3tc&&p(ua,{"rgb s3tc dxt1":Vn,"rgba s3tc dxt1":qn,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Mi}),It.webgl_compressed_texture_atc&&p(ua,{"rgb atc":Ro,"rgba atc explicit alpha":go,"rgba atc interpolated alpha":Eo}),It.webgl_compressed_texture_pvrtc&&p(ua,{"rgb pvrtc 4bppv1":Ao,"rgb pvrtc 2bppv1":ds,"rgba pvrtc 4bppv1":jo,"rgba pvrtc 2bppv1":Wo}),It.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=to);var ia=Array.prototype.slice.call(st.getParameter(Lr));Object.keys(ua).forEach(function(ra){var Ya=ua[ra];ia.indexOf(Ya)>=0&&(Ra[ra]=Ya)});var ma=Object.keys(Ra);Ut.textureFormats=ma;var da=[];Object.keys(Ra).forEach(function(ra){var Ya=Ra[ra];da[Ya]=ra});var Fa=[];Object.keys(Ta).forEach(function(ra){var Ya=Ta[ra];Fa[Ya]=ra});var za=[];Object.keys(Cr).forEach(function(ra){var Ya=Cr[ra];za[Ya]=ra});var kn=[];Object.keys(ta).forEach(function(ra){var Ya=ta[ra];kn[Ya]=ra});var Dn=[];Object.keys(Or).forEach(function(ra){var Ya=Or[ra];Dn[Ya]=ra});var ui=ma.reduce(function(ra,Ya){var Ka=Ra[Ya];return Ka===rn||Ka===tn||Ka===rn||Ka===Ri||Ka===eo||Ka===gi||It.ext_srgb&&(Ka===qi||Ka===io)?ra[Ka]=Ka:Ka===no||Ya.indexOf("rgba")>=0?ra[Ka]=pn:ra[Ka]=ai,ra},{});function cn(){this.internalformat=pn,this.format=pn,this.type=wo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=$u,this.width=0,this.height=0,this.channels=0}function sn(ra,Ya){ra.internalformat=Ya.internalformat,ra.format=Ya.format,ra.type=Ya.type,ra.compressed=Ya.compressed,ra.premultiplyAlpha=Ya.premultiplyAlpha,ra.flipY=Ya.flipY,ra.unpackAlignment=Ya.unpackAlignment,ra.colorSpace=Ya.colorSpace,ra.width=Ya.width,ra.height=Ya.height,ra.channels=Ya.channels}function ei(ra,Ya){if(!(typeof Ya!="object"||!Ya)){if("premultiplyAlpha"in Ya&&(ra.premultiplyAlpha=Ya.premultiplyAlpha),"flipY"in Ya&&(ra.flipY=Ya.flipY),"alignment"in Ya&&(ra.unpackAlignment=Ya.alignment),"colorSpace"in Ya&&(ra.colorSpace=ka[Ya.colorSpace]),"type"in Ya){var Ka=Ya.type;ra.type=Ta[Ka]}var Bi=ra.width,rs=ra.height,Is=ra.channels,Oi=!1;"shape"in Ya?(Bi=Ya.shape[0],rs=Ya.shape[1],Ya.shape.length===3&&(Is=Ya.shape[2],Oi=!0)):("radius"in Ya&&(Bi=rs=Ya.radius),"width"in Ya&&(Bi=Ya.width),"height"in Ya&&(rs=Ya.height),"channels"in Ya&&(Is=Ya.channels,Oi=!0)),ra.width=Bi|0,ra.height=rs|0,ra.channels=Is|0;var Wr=!1;if("format"in Ya){var na=Ya.format,pa=ra.internalformat=Ra[na];ra.format=ui[pa],na in Ta&&("type"in Ya||(ra.type=Ta[na])),na in ua&&(ra.compressed=!0),Wr=!0}!Oi&&Wr?ra.channels=os[ra.format]:Oi&&!Wr&&ra.channels!==vs[ra.format]&&(ra.format=ra.internalformat=vs[ra.channels])}}function Pn(ra){st.pixelStorei(xc,ra.flipY),st.pixelStorei(Fl,ra.premultiplyAlpha),st.pixelStorei(pl,ra.colorSpace),st.pixelStorei(lu,ra.unpackAlignment)}function Rn(){cn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function In(ra,Ya){var Ka=null;if($l(Ya)?Ka=Ya:Ya&&(ei(ra,Ya),"x"in Ya&&(ra.xOffset=Ya.x|0),"y"in Ya&&(ra.yOffset=Ya.y|0),$l(Ya.data)&&(Ka=Ya.data)),Ya.copy){var Bi=dr.viewportWidth,rs=dr.viewportHeight;ra.width=ra.width||Bi-ra.xOffset,ra.height=ra.height||rs-ra.yOffset,ra.needsCopy=!0}else if(!Ka)ra.width=ra.width||1,ra.height=ra.height||1,ra.channels=ra.channels||4;else if(Xt(Ka))ra.channels=ra.channels||4,ra.data=Ka,!("type"in Ya)&&ra.type===wo&&(ra.type=jf(Ka));else if(ah(Ka))ra.channels=ra.channels||4,Hc(ra,Ka),ra.alignment=1,ra.needsFree=!0;else if(or(Ka)){var Is=Ka.data;!Array.isArray(Is)&&ra.type===wo&&(ra.type=jf(Is));var Oi=Ka.shape,Wr=Ka.stride,na,pa,Wa,ln,Le,Ue;Oi.length===3?(Wa=Oi[2],Ue=Wr[2]):(Wa=1,Ue=1),na=Oi[0],pa=Oi[1],ln=Wr[0],Le=Wr[1],ra.alignment=1,ra.width=na,ra.height=pa,ra.channels=Wa,ra.format=ra.internalformat=vs[Wa],ra.needsFree=!0,Yc(ra,Is,ln,Le,Ue,Ka.offset)}else if(Nf(Ka)||Bu(Ka)||Tc(Ka))Nf(Ka)||Bu(Ka)?ra.element=Ka:ra.element=Ka.canvas,ra.width=ra.element.width,ra.height=ra.element.height,ra.channels=4;else if(Ou(Ka))ra.element=Ka,ra.width=Ka.width,ra.height=Ka.height,ra.channels=4;else if(Gc(Ka))ra.element=Ka,ra.width=Ka.naturalWidth,ra.height=Ka.naturalHeight,ra.channels=4;else if(pf(Ka))ra.element=Ka,ra.width=Ka.videoWidth,ra.height=Ka.videoHeight,ra.channels=4;else if(wc(Ka)){var Qe=ra.width||Ka[0].length,_t=ra.height||Ka.length,wt=ra.channels;zr(Ka[0][0])?wt=wt||Ka[0][0].length:wt=wt||1;for(var Lt=vt.shape(Ka),pr=1,Gr=0;Gr>=rs,Ka.height>>=rs,In(Ka,Bi[rs]),ra.mipmask|=1<=0&&!("faces"in Ya)&&(ra.genMipmaps=!0)}if("mag"in Ya){var Bi=Ya.mag;ra.magFilter=Cr[Bi]}var rs=ra.wrapS,Is=ra.wrapT;if("wrap"in Ya){var Oi=Ya.wrap;typeof Oi=="string"?rs=Is=Or[Oi]:Array.isArray(Oi)&&(rs=Or[Oi[0]],Is=Or[Oi[1]])}else{if("wrapS"in Ya){var Wr=Ya.wrapS;rs=Or[Wr]}if("wrapT"in Ya){var na=Ya.wrapT;Is=Or[na]}}if(ra.wrapS=rs,ra.wrapT=Is,"anisotropic"in Ya){var pa=Ya.anisotropic;ra.anisotropic=Ya.anisotropic}if("mipmap"in Ya){var Wa=!1;switch(typeof Ya.mipmap){case"string":ra.mipmapHint=vr[Ya.mipmap],ra.genMipmaps=!0,Wa=!0;break;case"boolean":Wa=ra.genMipmaps=Ya.mipmap;break;case"object":ra.genMipmaps=!1,Wa=!0;break;default:}Wa&&!("min"in Ya)&&(ra.minFilter=_o)}}function $o(ra,Ya){st.texParameteri(Ya,Vs,ra.minFilter),st.texParameteri(Ya,Vo,ra.magFilter),st.texParameteri(Ya,Xi,ra.wrapS),st.texParameteri(Ya,Ko,ra.wrapT),It.ext_texture_filter_anisotropic&&st.texParameteri(Ya,wu,ra.anisotropic),ra.genMipmaps&&(st.hint(Dl,ra.mipmapHint),st.generateMipmap(Ya))}var _s=0,Go={},Ys=Ut.maxTextureUnits,Ll=Array(Ys).map(function(){return null});function mo(ra){cn.call(this),this.mipmask=0,this.internalformat=pn,this.id=_s++,this.refCount=1,this.target=ra,this.texture=st.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zo,hr.profile&&(this.stats={size:0})}function ru(ra){st.activeTexture(uu),st.bindTexture(ra.target,ra.texture)}function Rs(){var ra=Ll[0];ra?st.bindTexture(ra.target,ra.texture):st.bindTexture(aa,null)}function Yu(ra){var Ya=ra.texture,Ka=ra.unit,Bi=ra.target;Ka>=0&&(st.activeTexture(uu+Ka),st.bindTexture(Bi,null),Ll[Ka]=null),st.deleteTexture(Ya),ra.texture=null,ra.params=null,ra.pixels=null,ra.refCount=0,delete Go[ra.id],Ar.textureCount--}p(mo.prototype,{bind:function(){var ra=this;ra.bindCount+=1;var Ya=ra.unit;if(Ya<0){for(var Ka=0;Ka0)continue;Bi.unit=-1}Ll[Ka]=ra,Ya=Ka;break}Ya>=Ys,hr.profile&&Ar.maxTextureUnits>Le)-Wa,Ue.height=Ue.height||(Ka.height>>Le)-ln,ru(Ka),Ei(Ue,aa,Wa,ln,Le),Rs(),bi(Ue),Bi}function Is(Oi,Wr){var na=Oi|0,pa=Wr|0||na;if(na===Ka.width&&pa===Ka.height)return Bi;Bi.width=Ka.width=na,Bi.height=Ka.height=pa,ru(Ka);for(var Wa=0;Ka.mipmask>>Wa;++Wa){var ln=na>>Wa,Le=pa>>Wa;if(!ln||!Le)break;st.texImage2D(aa,Wa,Ka.format,ln,Le,0,Ka.format,Ka.type,null)}return Rs(),hr.profile&&(Ka.stats.size=Nu(Ka.internalformat,Ka.type,na,pa,!1,!1)),Bi}return Bi(ra,Ya),Bi.subimage=rs,Bi.resize=Is,Bi._reglType="texture2d",Bi._texture=Ka,hr.profile&&(Bi.stats=Ka.stats),Bi.destroy=function(){Ka.decRef()},Bi}function ql(ra,Ya,Ka,Bi,rs,Is){var Oi=new mo(Sa);Go[Oi.id]=Oi,Ar.cubeCount++;var Wr=new Array(6);function na(ln,Le,Ue,Qe,_t,wt){var Lt,pr=Oi.texInfo;for(Zo.call(pr),Lt=0;Lt<6;++Lt)Wr[Lt]=So();if(typeof ln=="number"||!ln){var Gr=ln|0||1;for(Lt=0;Lt<6;++Lt)ro(Wr[Lt],Gr,Gr)}else if(typeof ln=="object")if(Le)Mo(Wr[0],ln),Mo(Wr[1],Le),Mo(Wr[2],Ue),Mo(Wr[3],Qe),Mo(Wr[4],_t),Mo(Wr[5],wt);else if(es(pr,ln),ei(Oi,ln),"faces"in ln){var va=ln.faces;for(Lt=0;Lt<6;++Lt)sn(Wr[Lt],Oi),Mo(Wr[Lt],va[Lt])}else for(Lt=0;Lt<6;++Lt)Mo(Wr[Lt],ln);for(sn(Oi,Wr[0]),pr.genMipmaps?Oi.mipmask=(Wr[0].width<<1)-1:Oi.mipmask=Wr[0].mipmask,Oi.internalformat=Wr[0].internalformat,na.width=Wr[0].width,na.height=Wr[0].height,ru(Oi),Lt=0;Lt<6;++Lt)zs(Wr[Lt],wa+Lt);for($o(pr,Sa),Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,pr.genMipmaps,!0)),na.format=da[Oi.internalformat],na.type=Fa[Oi.type],na.mag=za[pr.magFilter],na.min=kn[pr.minFilter],na.wrapS=Dn[pr.wrapS],na.wrapT=Dn[pr.wrapT],Lt=0;Lt<6;++Lt)Ws(Wr[Lt]);return na}function pa(ln,Le,Ue,Qe,_t){var wt=Ue|0,Lt=Qe|0,pr=_t|0,Gr=ti();return sn(Gr,Oi),Gr.width=0,Gr.height=0,In(Gr,Le),Gr.width=Gr.width||(Oi.width>>pr)-wt,Gr.height=Gr.height||(Oi.height>>pr)-Lt,ru(Oi),Ei(Gr,wa+ln,wt,Lt,pr),Rs(),bi(Gr),na}function Wa(ln){var Le=ln|0;if(Le!==Oi.width){na.width=Oi.width=Le,na.height=Oi.height=Le,ru(Oi);for(var Ue=0;Ue<6;++Ue)for(var Qe=0;Oi.mipmask>>Qe;++Qe)st.texImage2D(wa+Ue,Qe,Oi.format,Le>>Qe,Le>>Qe,0,Oi.format,Oi.type,null);return Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,!1,!0)),na}}return na(ra,Ya,Ka,Bi,rs,Is),na.subimage=pa,na.resize=Wa,na._reglType="textureCube",na._texture=Oi,hr.profile&&(na.stats=Oi.stats),na.destroy=function(){Oi.decRef()},na}function fo(){for(var ra=0;ra>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);else for(var rs=0;rs<6;++rs)st.texImage2D(wa+rs,Bi,Ka.internalformat,Ka.width>>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);$o(Ka.texInfo,Ka.target)})}function Os(){for(var ra=0;ra=0?Ws=!0:Or.indexOf(Zo)>=0&&(Ws=!1))),("depthTexture"in mo||"depthStencilTexture"in mo)&&(Ll=!!(mo.depthTexture||mo.depthStencilTexture)),"depth"in mo&&(typeof mo.depth=="boolean"?zs=mo.depth:(_s=mo.depth,Bs=!1)),"stencil"in mo&&(typeof mo.stencil=="boolean"?Bs=mo.stencil:(Go=mo.stencil,zs=!1)),"depthStencil"in mo&&(typeof mo.depthStencil=="boolean"?zs=Bs=mo.depthStencil:(Ys=mo.depthStencil,zs=!1,Bs=!1))}var Rs=null,Yu=null,Ul=null,ql=null;if(Array.isArray(So))Rs=So.map(ua);else if(So)Rs=[ua(So)];else for(Rs=new Array($o),Wi=0;Wi<$o;++Wi)Rs[Wi]=ia(ro,Mo,Ws,Zo,es);ro=ro||Rs[0].width,Mo=Mo||Rs[0].height,_s?Yu=ua(_s):zs&&!Bs&&(Yu=ia(ro,Mo,Ll,"depth","uint32")),Go?Ul=ua(Go):Bs&&!zs&&(Ul=ia(ro,Mo,!1,"stencil","uint8")),Ys?ql=ua(Ys):!_s&&!Go&&Bs&&zs&&(ql=ia(ro,Mo,Ll,"depth stencil","depth stencil"));var fo=null;for(Wi=0;Wi0&&(bi.depth=In[0].depth,bi.stencil=In[0].stencil,bi.depthStencil=In[0].depthStencil),In[ti]?In[ti](bi):In[ti]=sn(bi)}return p(Jn,{width:Wi,height:Wi,color:Zo})}function Ei(so){var ti,bi=so|0;if(bi===Jn.width)return Jn;var Wi=Jn.color;for(ti=0;ti=Wi.byteLength?ro.subdata(Wi):(ro.destroy(),sn.buffers[so]=null)),sn.buffers[so]||(ro=sn.buffers[so]=dr.create(ti,hu,!1,!0)),bi.buffer=dr.getBuffer(ro),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1,Jn[so]=1}else dr.getBuffer(ti)?(bi.buffer=dr.getBuffer(ti),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1):dr.getBuffer(ti.buffer)?(bi.buffer=dr.getBuffer(ti.buffer),bi.size=(+ti.size||bi.buffer.dimension)|0,bi.normalized=!!ti.normalized||!1,"type"in ti?bi.type=Kr[ti.type]:bi.type=bi.buffer.dtype,bi.offset=(ti.offset||0)|0,bi.stride=(ti.stride||0)|0,bi.divisor=(ti.divisor||0)|0,bi.state=1):"x"in ti&&(bi.x=+ti.x||0,bi.y=+ti.y||0,bi.z=+ti.z||0,bi.w=+ti.w||0,bi.state=2)}for(var Mo=0;Mo1)for(var Pn=0;Pnia&&(ia=ma.stats.uniformsCount)}),ia},Ut.getMaxAttributesCount=function(){var ia=0;return ta.forEach(function(ma){ma.stats.attributesCount>ia&&(ia=ma.stats.attributesCount)}),ia});function ua(){dr={},Ar={};for(var ia=0;ia16&&(Ut=Da(Ut,st.length*8));for(var ir=Array(16),dr=Array(16),Ar=0;Ar<16;Ar++)ir[Ar]=Ut[Ar]^909522486,dr[Ar]=Ut[Ar]^1549556828;var hr=Da(ir.concat(vc(It)),512+It.length*8);return Ft(Da(dr.concat(hr),768))}function kl(st){for(var It=xf?"0123456789ABCDEF":"0123456789abcdef",Ut="",ir,dr=0;dr>>4&15)+It.charAt(ir&15);return Ut}function kc(st){for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut="",ir=st.length,dr=0;drst.length*8?Ut+=Gf:Ut+=It.charAt(Ar>>>6*(3-hr)&63);return Ut}function Cc(st,It){var Ut=It.length,ir=Array(),dr,Ar,hr,vr,Or=Array(Math.ceil(st.length/2));for(dr=0;dr0;){for(vr=Array(),hr=0,dr=0;dr0||Ar>0)&&(vr[vr.length]=Ar);ir[ir.length]=hr,Or=vr}var Cr="";for(dr=ir.length-1;dr>=0;dr--)Cr+=It.charAt(ir[dr]);var ta=Math.ceil(st.length*8/(Math.log(It.length)/Math.log(2)));for(dr=Cr.length;dr>>6&31,128|ir&63):ir<=65535?It+=String.fromCharCode(224|ir>>>12&15,128|ir>>>6&63,128|ir&63):ir<=2097151&&(It+=String.fromCharCode(240|ir>>>18&7,128|ir>>>12&63,128|ir>>>6&63,128|ir&63));return It}function vc(st){for(var It=Array(st.length>>2),Ut=0;Ut>5]|=(st.charCodeAt(Ut/8)&255)<<24-Ut%32;return It}function Ft(st){for(var It="",Ut=0;Ut>5]>>>24-Ut%32&255);return It}function tr(st,It){return st>>>It|st<<32-It}function Fr(st,It){return st>>>It}function wr(st,It,Ut){return st&It^~st&Ut}function ea(st,It,Ut){return st&It^st&Ut^It&Ut}function ba(st){return tr(st,2)^tr(st,13)^tr(st,22)}function Ia(st){return tr(st,6)^tr(st,11)^tr(st,25)}function Na(st){return tr(st,7)^tr(st,18)^Fr(st,3)}function Za(st){return tr(st,17)^tr(st,19)^Fr(st,10)}var mn=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 Da(st,It){var Ut=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ir=new Array(64),dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia;for(st[It>>5]|=128<<24-It%32,st[(It+64>>9<<4)+15]=It,Ta=0;Ta>16)+(It>>16)+(Ut>>16);return ir<<16|Ut&65535}function $a(st){return Array.prototype.slice.call(st)}function vn(st){return $a(st).join("")}function Sn(st){var It=st&&st.cache,Ut=0,ir=[],dr=[],Ar=[];function hr(ua,ia){var ma=ia&&ia.stable;if(!ma){for(var da=0;da0&&(ua.push(Fa,"="),ua.push.apply(ua,$a(arguments)),ua.push(";")),Fa}return p(ia,{def:da,toString:function(){return vn([ma.length>0?"var "+ma.join(",")+";":"",vn(ua)])}})}function Or(){var ua=vr(),ia=vr(),ma=ua.toString,da=ia.toString;function Fa(za,kn){ia(za,kn,"=",ua.def(za,kn),";")}return p(function(){ua.apply(ua,$a(arguments))},{def:ua.def,entry:ua,exit:ia,save:Fa,set:function(za,kn,Dn){Fa(za,kn),ua(za,kn,"=",Dn,";")},toString:function(){return ma()+da()}})}function Cr(){var ua=vn(arguments),ia=Or(),ma=Or(),da=ia.toString,Fa=ma.toString;return p(ia,{then:function(){return ia.apply(ia,$a(arguments)),this},else:function(){return ma.apply(ma,$a(arguments)),this},toString:function(){var za=Fa();return za&&(za="else{"+za+"}"),vn(["if(",ua,"){",da(),"}",za])}})}var ta=vr(),ka={};function Ta(ua,ia){var ma=[];function da(){var ui="a"+ma.length;return ma.push(ui),ui}ia=ia||0;for(var Fa=0;Fa[x.viewport.x,x.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:g,offset:(A,x)=>x.offset*4,divisor:1},position:{buffer:h,offset:(A,x)=>x.offset*8,divisor:1},positionFract:{buffer:v,offset:(A,x)=>x.offset*8,divisor:1},error:{buffer:i,offset:(A,x)=>x.offset*16,divisor:1},direction:{buffer:w,stride:24,offset:0},lineOffset:{buffer:w,stride:24,offset:8},capOffset:{buffer:w,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:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:f,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?f(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return T(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((x,z)=>{if(x){if(A&&(A[z]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}T(z)}})}function T(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],m(A),A.after&&A.after(A))}function f(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let x=0,z=0;if(C.groups=M=A.map((D,B)=>{let F=M[B];if(D)typeof D=="function"?D={after:D}:typeof D[0]=="number"&&(D={positions:D});else return F;return D=k(D,{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"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},D=l({},S,D)),E(F,D,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=p(P,2),j.offset=x,x+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let $=j.bounds;return P||(P=$),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=n(j.scale),j.translateFract=n(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),x||z){let D=M.reduce((j,U,$)=>j+(U?U.count:0),0),B=new Float64Array(D*2),F=new Uint8Array(D*4),P=new Float32Array(D*4);M.forEach((j,U)=>{if(!j)return;let{positions:$,count:Q,offset:re,color:ne,errors:se}=j;Q&&(F.set(ne,re*4),P.set(se,re*4),B.set($,re*2))});var I=t(B);h(I);var O=n(B,I);v(O),g(F),i(P)}}function u(){h.destroy(),v.destroy(),g.destroy(),i.destroy(),w.destroy()}}}}),rq=ze({"node_modules/unquote/index.js"(J,V){var p=/[\'\"]/;V.exports=function(E){return E?(p.test(E.charAt(0))&&(E=E.substr(1)),p.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),sM=ze({"node_modules/css-global-keywords/index.json"(J,V){V.exports=["inherit","initial","unset"]}}),lM=ze({"node_modules/css-system-font-keywords/index.json"(J,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),uM=ze({"node_modules/css-font-weight-keywords/index.json"(J,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),cM=ze({"node_modules/css-font-style-keywords/index.json"(J,V){V.exports=["normal","italic","oblique"]}}),fM=ze({"node_modules/css-font-stretch-keywords/index.json"(J,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),aq=ze({"node_modules/parenthesis/index.js"(J,V){"use strict";function p(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],n=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),m=[];function h(v,g,i){var w=e.push(v.slice(s[0].length,-s[1].length))-1;return m.push(w),n+w+n}e.forEach(function(v,g){for(var i,w=0;v!=i;)if(i=v,v=v.replace(c,h),w++>1e4)throw Error("References have circular dependency. Please, check them.");e[g]=v}),m=m.reverse(),e=e.map(function(v){return m.forEach(function(g){v=v.replace(new RegExp("(\\"+n+g+"\\"+n+")","g"),s[0]+"$1"+s[1])}),v})});var a=new RegExp("\\"+n+"([0-9]+)\\"+n);function o(s,c,m){for(var h=[],v,g=0;v=a.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");h.push(s.slice(0,v.index)),h.push(o(c[v[1]],c)),s=s.slice(v.index+v[0].length)}return h.push(s),h}return r?e:o(e[0],e)}function b(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],n;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),a=0;t!=n;){if(a++>1e4)throw Error("Circular references in "+k);n=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,m){return Array.isArray(m)&&(m=m.reduce(s,"")),c+m},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?b(k,l):p(k,l)}E.parse=p,E.stringify=b,V.exports=E}}),nq=ze({"node_modules/string-split-by/index.js"(J,V){"use strict";var p=aq();V.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=p.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],n=t.split(k);if(l.escape){for(var r=[],a=0;a1&&It===Ut&&(It==='"'||It==="'"))return['"'+t(st.substr(1,st.length-2))+'"'];var ir=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(st);if(ir)return n(st.substr(0,ir.index)).concat(n(ir[1])).concat(n(st.substr(ir.index+ir[0].length)));var dr=st.split(".");if(dr.length===1)return['"'+t(st)+'"'];for(var Ar=[],hr=0;hr"u"?1:window.devicePixelRatio,ta=!1,ka={},Ta=function(ia){},Ra=function(){};if(typeof It=="string"?Ut=document.querySelector(It):typeof It=="object"&&(w(It)?Ut=It:S(It)?(Ar=It,dr=Ar.canvas):("gl"in It?Ar=It.gl:"canvas"in It?dr=C(It.canvas):"container"in It&&(ir=C(It.container)),"attributes"in It&&(hr=It.attributes),"extensions"in It&&(vr=M(It.extensions)),"optionalExtensions"in It&&(Or=M(It.optionalExtensions)),"onDone"in It&&(Ta=It.onDone),"profile"in It&&(ta=!!It.profile),"pixelRatio"in It&&(Cr=+It.pixelRatio),"cachedCode"in It&&(ka=It.cachedCode))),Ut&&(Ut.nodeName.toLowerCase()==="canvas"?dr=Ut:ir=Ut),!Ar){if(!dr){var ua=g(ir||document.body,Ta,Cr);if(!ua)return null;dr=ua.canvas,Ra=ua.onDestroy}hr.premultipliedAlpha===void 0&&(hr.premultipliedAlpha=!0),Ar=i(dr,hr)}return Ar?{gl:Ar,canvas:dr,container:ir,extensions:vr,optionalExtensions:Or,pixelRatio:Cr,profile:ta,cachedCode:ka,onDone:Ta,onDestroy:Ra}:(Ra(),Ta("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(st,It){var Ut={};function ir(hr){var vr=hr.toLowerCase(),Or;try{Or=Ut[vr]=st.getExtension(vr)}catch{}return!!Or}for(var dr=0;dr65535)<<4,st>>>=It,Ut=(st>255)<<3,st>>>=Ut,It|=Ut,Ut=(st>15)<<2,st>>>=Ut,It|=Ut,Ut=(st>3)<<1,st>>>=Ut,It|=Ut,It|st>>1}function P(){var st=f(8,function(){return[]});function It(Ar){var hr=B(Ar),vr=st[F(hr)>>2];return vr.length>0?vr.pop():new ArrayBuffer(hr)}function Ut(Ar){st[F(Ar.byteLength)>>2].push(Ar)}function ir(Ar,hr){var vr=null;switch(Ar){case u:vr=new Int8Array(It(hr),0,hr);break;case A:vr=new Uint8Array(It(hr),0,hr);break;case x:vr=new Int16Array(It(2*hr),0,hr);break;case z:vr=new Uint16Array(It(2*hr),0,hr);break;case I:vr=new Int32Array(It(4*hr),0,hr);break;case O:vr=new Uint32Array(It(4*hr),0,hr);break;case D:vr=new Float32Array(It(4*hr),0,hr);break;default:return null}return vr.length!==hr?vr.subarray(0,hr):vr}function dr(Ar){Ut(Ar.buffer)}return{alloc:It,free:Ut,allocType:ir,freeType:dr}}var j=P();j.zero=P();var U=3408,$=3410,Q=3411,re=3412,ne=3413,se=3414,G=3415,X=33901,K=33902,H=3379,Y=3386,q=34921,Z=36347,ee=36348,ae=35661,he=35660,xe=34930,we=36349,Me=34076,Se=34024,Ie=7936,Ve=7937,Ge=7938,ke=35724,_e=34047,ce=36063,ve=34852,le=3553,Ae=34067,Be=34069,Xe=33984,Ye=6408,yt=5126,gt=5121,Tt=36160,At=36053,$t=36064,rr=16384,_r=function(st,It){var Ut=1;It.ext_texture_filter_anisotropic&&(Ut=st.getParameter(_e));var ir=1,dr=1;It.webgl_draw_buffers&&(ir=st.getParameter(ve),dr=st.getParameter(ce));var Ar=!!It.oes_texture_float;if(Ar){var hr=st.createTexture();st.bindTexture(le,hr),st.texImage2D(le,0,Ye,1,1,0,Ye,yt,null);var vr=st.createFramebuffer();if(st.bindFramebuffer(Tt,vr),st.framebufferTexture2D(Tt,$t,le,hr,0),st.bindTexture(le,null),st.checkFramebufferStatus(Tt)!==At)Ar=!1;else{st.viewport(0,0,1,1),st.clearColor(1,0,0,1),st.clear(rr);var Or=j.allocType(yt,4);st.readPixels(0,0,1,1,Ye,yt,Or),st.getError()?Ar=!1:(st.deleteFramebuffer(vr),st.deleteTexture(hr),Ar=Or[0]===1),j.freeType(Or)}}var Cr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ta=!0;if(!Cr){var ka=st.createTexture(),Ta=j.allocType(gt,36);st.activeTexture(Xe),st.bindTexture(Ae,ka),st.texImage2D(Be,0,Ye,3,3,0,Ye,gt,Ta),j.freeType(Ta),st.bindTexture(Ae,null),st.deleteTexture(ka),ta=!st.getError()}return{colorBits:[st.getParameter($),st.getParameter(Q),st.getParameter(re),st.getParameter(ne)],depthBits:st.getParameter(se),stencilBits:st.getParameter(G),subpixelBits:st.getParameter(U),extensions:Object.keys(It).filter(function(Ra){return!!It[Ra]}),maxAnisotropic:Ut,maxDrawbuffers:ir,maxColorAttachments:dr,pointSizeDims:st.getParameter(X),lineWidthDims:st.getParameter(K),maxViewportDims:st.getParameter(Y),maxCombinedTextureUnits:st.getParameter(ae),maxCubeMapSize:st.getParameter(Me),maxRenderbufferSize:st.getParameter(Se),maxTextureUnits:st.getParameter(xe),maxTextureSize:st.getParameter(H),maxAttributes:st.getParameter(q),maxVertexUniforms:st.getParameter(Z),maxVertexTextureUnits:st.getParameter(he),maxVaryingVectors:st.getParameter(ee),maxFragmentUniforms:st.getParameter(we),glsl:st.getParameter(ke),renderer:st.getParameter(Ve),vendor:st.getParameter(Ie),version:st.getParameter(Ge),readFloat:Ar,npotTextureCube:ta}},Xt=function(st){return st instanceof Uint8Array||st instanceof Uint16Array||st instanceof Uint32Array||st instanceof Int8Array||st instanceof Int16Array||st instanceof Int32Array||st instanceof Float32Array||st instanceof Float64Array||st instanceof Uint8ClampedArray};function or(st){return!!st&&typeof st=="object"&&Array.isArray(st.shape)&&Array.isArray(st.stride)&&typeof st.offset=="number"&&st.shape.length===st.stride.length&&(Array.isArray(st.data)||Xt(st.data))}var Ot=function(st){return Object.keys(st).map(function(It){return st[It]})},vt={shape:Je,flatten:Ke};function ht(st,It,Ut){for(var ir=0;ir0){var ui;if(Array.isArray(ga[0])){Dn=cr(ga);for(var cn=1,sn=1;sn0){if(typeof cn[0]=="number"){var Rn=j.allocType(za.dtype,cn.length);un(Rn,cn),Dn(Rn,ei),j.freeType(Rn)}else if(Array.isArray(cn[0])||Xt(cn[0])){Pn=cr(cn);var In=ur(cn,Pn,za.dtype);Dn(In,ei),j.freeType(In)}}}else if(or(cn)){Pn=cn.shape;var Jn=cn.stride,Ei=0,so=0,ti=0,bi=0;Pn.length===1?(Ei=Pn[0],so=1,ti=Jn[0],bi=0):Pn.length===2&&(Ei=Pn[0],so=Pn[1],ti=Jn[0],bi=Jn[1]);var Wi=Array.isArray(cn.data)?za.dtype:La(cn.data),ro=j.allocType(Wi,Ei*so);Xa(ro,cn.data,Ei,so,ti,bi,cn.offset),Dn(ro,ei),j.freeType(ro)}return Cn}return da||Cn(ia),Cn._reglType="buffer",Cn._buffer=za,Cn.subdata=ui,Ut.profile&&(Cn.stats=za.stats),Cn.destroy=function(){Ta(za)},Cn}function ua(){Ot(Ar).forEach(function(ia){ia.buffer=st.createBuffer(),st.bindBuffer(ia.type,ia.buffer),st.bufferData(ia.type,ia.persistentData||ia.byteLength,ia.usage)})}return Ut.profile&&(It.getTotalBufferSize=function(){var ia=0;return Object.keys(Ar).forEach(function(ga){ia+=Ar[ga].stats.size}),ia}),{create:Ra,createStream:Or,destroyStream:Cr,clear:function(){Ot(Ar).forEach(Ta),vr.forEach(Ta)},getBuffer:function(ia){return ia&&ia._buffer instanceof hr?ia._buffer:null},restore:ua,_initBuffer:ka}}var Nn=0,yn=0,Un=1,li=1,Yn=4,on=4,en={points:Nn,point:yn,lines:Un,line:li,triangles:Yn,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},vi=0,Yi=1,Ja=4,Oa=5120,lt=5121,rt=5122,fr=5123,lr=5124,Tr=5125,Ir=34963,Dr=35040,ot=35044;function kt(st,It,Ut,ir){var dr={},Ar=0,hr={uint8:lt,uint16:fr};It.oes_element_index_uint&&(hr.uint32=Tr);function vr(ua){this.id=Ar++,dr[this.id]=this,this.buffer=ua,this.primType=Ja,this.vertCount=0,this.type=0}vr.prototype.bind=function(){this.buffer.bind()};var Or=[];function Cr(ua){var ia=Or.pop();return ia||(ia=new vr(Ut.create(null,Ir,!0,!1)._buffer)),ka(ia,ua,Dr,-1,-1,0,0),ia}function ta(ua){Or.push(ua)}function ka(ua,ia,ga,da,Fa,za,Cn){ua.buffer.bind();var Dn;if(ia){var ui=Cn;!Cn&&(!Xt(ia)||or(ia)&&!Xt(ia.data))&&(ui=It.oes_element_index_uint?Tr:fr),Ut._initBuffer(ua.buffer,ia,ga,ui,3)}else st.bufferData(Ir,za,ga),ua.buffer.dtype=Dn||lt,ua.buffer.usage=ga,ua.buffer.dimension=3,ua.buffer.byteLength=za;if(Dn=Cn,!Cn){switch(ua.buffer.dtype){case lt:case Oa:Dn=lt;break;case fr:case rt:Dn=fr;break;case Tr:case lr:Dn=Tr;break;default:}ua.buffer.dtype=Dn}ua.type=Dn;var cn=Fa;cn<0&&(cn=ua.buffer.byteLength,Dn===fr?cn>>=1:Dn===Tr&&(cn>>=2)),ua.vertCount=cn;var sn=da;if(da<0){sn=Ja;var ei=ua.buffer.dimension;ei===1&&(sn=vi),ei===2&&(sn=Yi),ei===3&&(sn=Ja)}ua.primType=sn}function Ta(ua){ir.elementsCount--,delete dr[ua.id],ua.buffer.destroy(),ua.buffer=null}function Ra(ua,ia){var ga=Ut.create(null,Ir,!0),da=new vr(ga._buffer);ir.elementsCount++;function Fa(za){if(!za)ga(),da.primType=Ja,da.vertCount=0,da.type=lt;else if(typeof za=="number")ga(za),da.primType=Ja,da.vertCount=za|0,da.type=lt;else{var Cn=null,Dn=ot,ui=-1,cn=-1,sn=0,ei=0;Array.isArray(za)||Xt(za)||or(za)?Cn=za:("data"in za&&(Cn=za.data),"usage"in za&&(Dn=nr[za.usage]),"primitive"in za&&(ui=en[za.primitive]),"count"in za&&(cn=za.count|0),"type"in za&&(ei=hr[za.type]),"length"in za?sn=za.length|0:(sn=cn,ei===fr||ei===rt?sn*=2:(ei===Tr||ei===lr)&&(sn*=4))),ka(da,Cn,Dn,ui,cn,sn,ei)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=da,Fa.subdata=function(za,Cn){return ga.subdata(za,Cn),Fa},Fa.destroy=function(){Ta(da)},Fa}return{create:Ra,createStream:Cr,destroyStream:ta,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof vr?ua._elements:null},clear:function(){Ot(dr).forEach(Ta)}}}var jt=new Float32Array(1),ar=new Uint32Array(jt.buffer),Er=5123;function xr(st){for(var It=j.allocType(Er,st.length),Ut=0;Ut>>31<<15,Ar=(ir<<1>>>24)-127,hr=ir>>13&1023;if(Ar<-24)It[Ut]=dr;else if(Ar<-14){var vr=-14-Ar;It[Ut]=dr+(hr+1024>>vr)}else Ar>15?It[Ut]=dr+31744:It[Ut]=dr+(Ar+15<<10)+hr}return It}function zr(st){return Array.isArray(st)||Xt(st)}var Lr=34467,aa=3553,Sa=34067,wa=34069,pn=6408,tn=6406,ai=6407,rn=6409,Ri=6410,Gn=32854,no=32855,Di=36194,fn=32819,Ai=32820,jn=33635,Xn=34042,eo=6402,gi=34041,qi=35904,io=35906,oo=36193,Vn=33776,qn=33777,Hi=33778,Mi=33779,Ro=35986,go=35987,Eo=34798,Ao=35840,ds=35841,jo=35842,Wo=35843,to=36196,wo=5121,pi=5123,Vi=5125,Io=5126,Xi=10242,Ko=10243,Uo=10497,Ls=33071,Ss=33648,Vo=10240,Vs=10241,Ts=9728,Bo=9729,_o=9984,Pi=9985,yo=9986,bs=9987,Dl=33170,hl=4352,ps=4353,dl=4354,wu=34046,lu=3317,xc=37440,Fl=37441,pl=37443,$u=37444,uu=33984,tl=[_o,yo,Pi,bs],vs=[0,rn,Ri,ai,pn],os={};os[rn]=os[tn]=os[eo]=1,os[gi]=os[Ri]=2,os[ai]=os[qi]=3,os[pn]=os[io]=4;function ms(st){return"[object "+st+"]"}var rl=ms("HTMLCanvasElement"),Fu=ms("OffscreenCanvas"),zu=ms("CanvasRenderingContext2D"),Ku=ms("ImageBitmap"),bc=ms("HTMLImageElement"),Lh=ms("HTMLVideoElement"),rh=Object.keys(et).concat([rl,Fu,zu,Ku,bc,Lh]),Ju=[];Ju[wo]=1,Ju[Io]=4,Ju[oo]=2,Ju[pi]=2,Ju[Vi]=4;var ss=[];ss[Gn]=2,ss[no]=2,ss[Di]=2,ss[gi]=4,ss[Vn]=.5,ss[qn]=.5,ss[Hi]=1,ss[Mi]=1,ss[Ro]=.5,ss[go]=1,ss[Eo]=1,ss[Ao]=.5,ss[ds]=.25,ss[jo]=.5,ss[Wo]=.25,ss[to]=.5;function ah(st){return Array.isArray(st)&&(st.length===0||typeof st[0]=="number")}function wc(st){if(!Array.isArray(st))return!1;var It=st.length;return!(It===0||!zr(st[0]))}function pc(st){return Object.prototype.toString.call(st)}function Nf(st){return pc(st)===rl}function Bu(st){return pc(st)===Fu}function Tc(st){return pc(st)===zu}function Ou(st){return pc(st)===Ku}function Gc(st){return pc(st)===bc}function pf(st){return pc(st)===Lh}function $l(st){if(!st)return!1;var It=pc(st);return rh.indexOf(It)>=0?!0:ah(st)||wc(st)||or(st)}function jf(st){return et[Object.prototype.toString.call(st)]|0}function Hc(st,It){var Ut=It.length;switch(st.type){case wo:case pi:case Vi:case Io:var ir=j.allocType(st.type,Ut);ir.set(It),st.data=ir;break;case oo:st.data=xr(It);break;default:}}function Wc(st,It){return j.allocType(st.type===oo?Io:st.type,It)}function Qu(st,It){st.type===oo?(st.data=xr(It),j.freeType(It)):st.data=It}function Yc(st,It,Ut,ir,dr,Ar){for(var hr=st.width,vr=st.height,Or=st.channels,Cr=hr*vr*Or,ta=Wc(st,Cr),ka=0,Ta=0;Ta=1;)vr+=hr*Or*Or,Or/=2;return vr}else return hr*Ut*ir}function Uf(st,It,Ut,ir,dr,Ar,hr){var vr={"don't care":hl,"dont care":hl,nice:dl,fast:ps},Or={repeat:Uo,clamp:Ls,mirror:Ss},Cr={nearest:Ts,linear:Bo},ta=p({mipmap:bs,"nearest mipmap nearest":_o,"linear mipmap nearest":Pi,"nearest mipmap linear":yo,"linear mipmap linear":bs},Cr),ka={none:0,browser:$u},Ta={uint8:wo,rgba4:fn,rgb565:jn,"rgb5 a1":Ai},Ra={alpha:tn,luminance:rn,"luminance alpha":Ri,rgb:ai,rgba:pn,rgba4:Gn,"rgb5 a1":no,rgb565:Di},ua={};It.ext_srgb&&(Ra.srgb=qi,Ra.srgba=io),It.oes_texture_float&&(Ta.float32=Ta.float=Io),It.oes_texture_half_float&&(Ta.float16=Ta["half float"]=oo),It.webgl_depth_texture&&(p(Ra,{depth:eo,"depth stencil":gi}),p(Ta,{uint16:pi,uint32:Vi,"depth stencil":Xn})),It.webgl_compressed_texture_s3tc&&p(ua,{"rgb s3tc dxt1":Vn,"rgba s3tc dxt1":qn,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Mi}),It.webgl_compressed_texture_atc&&p(ua,{"rgb atc":Ro,"rgba atc explicit alpha":go,"rgba atc interpolated alpha":Eo}),It.webgl_compressed_texture_pvrtc&&p(ua,{"rgb pvrtc 4bppv1":Ao,"rgb pvrtc 2bppv1":ds,"rgba pvrtc 4bppv1":jo,"rgba pvrtc 2bppv1":Wo}),It.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=to);var ia=Array.prototype.slice.call(st.getParameter(Lr));Object.keys(ua).forEach(function(ra){var Ya=ua[ra];ia.indexOf(Ya)>=0&&(Ra[ra]=Ya)});var ga=Object.keys(Ra);Ut.textureFormats=ga;var da=[];Object.keys(Ra).forEach(function(ra){var Ya=Ra[ra];da[Ya]=ra});var Fa=[];Object.keys(Ta).forEach(function(ra){var Ya=Ta[ra];Fa[Ya]=ra});var za=[];Object.keys(Cr).forEach(function(ra){var Ya=Cr[ra];za[Ya]=ra});var Cn=[];Object.keys(ta).forEach(function(ra){var Ya=ta[ra];Cn[Ya]=ra});var Dn=[];Object.keys(Or).forEach(function(ra){var Ya=Or[ra];Dn[Ya]=ra});var ui=ga.reduce(function(ra,Ya){var Ka=Ra[Ya];return Ka===rn||Ka===tn||Ka===rn||Ka===Ri||Ka===eo||Ka===gi||It.ext_srgb&&(Ka===qi||Ka===io)?ra[Ka]=Ka:Ka===no||Ya.indexOf("rgba")>=0?ra[Ka]=pn:ra[Ka]=ai,ra},{});function cn(){this.internalformat=pn,this.format=pn,this.type=wo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=$u,this.width=0,this.height=0,this.channels=0}function sn(ra,Ya){ra.internalformat=Ya.internalformat,ra.format=Ya.format,ra.type=Ya.type,ra.compressed=Ya.compressed,ra.premultiplyAlpha=Ya.premultiplyAlpha,ra.flipY=Ya.flipY,ra.unpackAlignment=Ya.unpackAlignment,ra.colorSpace=Ya.colorSpace,ra.width=Ya.width,ra.height=Ya.height,ra.channels=Ya.channels}function ei(ra,Ya){if(!(typeof Ya!="object"||!Ya)){if("premultiplyAlpha"in Ya&&(ra.premultiplyAlpha=Ya.premultiplyAlpha),"flipY"in Ya&&(ra.flipY=Ya.flipY),"alignment"in Ya&&(ra.unpackAlignment=Ya.alignment),"colorSpace"in Ya&&(ra.colorSpace=ka[Ya.colorSpace]),"type"in Ya){var Ka=Ya.type;ra.type=Ta[Ka]}var Bi=ra.width,rs=ra.height,Is=ra.channels,Oi=!1;"shape"in Ya?(Bi=Ya.shape[0],rs=Ya.shape[1],Ya.shape.length===3&&(Is=Ya.shape[2],Oi=!0)):("radius"in Ya&&(Bi=rs=Ya.radius),"width"in Ya&&(Bi=Ya.width),"height"in Ya&&(rs=Ya.height),"channels"in Ya&&(Is=Ya.channels,Oi=!0)),ra.width=Bi|0,ra.height=rs|0,ra.channels=Is|0;var Wr=!1;if("format"in Ya){var na=Ya.format,pa=ra.internalformat=Ra[na];ra.format=ui[pa],na in Ta&&("type"in Ya||(ra.type=Ta[na])),na in ua&&(ra.compressed=!0),Wr=!0}!Oi&&Wr?ra.channels=os[ra.format]:Oi&&!Wr&&ra.channels!==vs[ra.format]&&(ra.format=ra.internalformat=vs[ra.channels])}}function Pn(ra){st.pixelStorei(xc,ra.flipY),st.pixelStorei(Fl,ra.premultiplyAlpha),st.pixelStorei(pl,ra.colorSpace),st.pixelStorei(lu,ra.unpackAlignment)}function Rn(){cn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function In(ra,Ya){var Ka=null;if($l(Ya)?Ka=Ya:Ya&&(ei(ra,Ya),"x"in Ya&&(ra.xOffset=Ya.x|0),"y"in Ya&&(ra.yOffset=Ya.y|0),$l(Ya.data)&&(Ka=Ya.data)),Ya.copy){var Bi=dr.viewportWidth,rs=dr.viewportHeight;ra.width=ra.width||Bi-ra.xOffset,ra.height=ra.height||rs-ra.yOffset,ra.needsCopy=!0}else if(!Ka)ra.width=ra.width||1,ra.height=ra.height||1,ra.channels=ra.channels||4;else if(Xt(Ka))ra.channels=ra.channels||4,ra.data=Ka,!("type"in Ya)&&ra.type===wo&&(ra.type=jf(Ka));else if(ah(Ka))ra.channels=ra.channels||4,Hc(ra,Ka),ra.alignment=1,ra.needsFree=!0;else if(or(Ka)){var Is=Ka.data;!Array.isArray(Is)&&ra.type===wo&&(ra.type=jf(Is));var Oi=Ka.shape,Wr=Ka.stride,na,pa,Wa,ln,Le,Ue;Oi.length===3?(Wa=Oi[2],Ue=Wr[2]):(Wa=1,Ue=1),na=Oi[0],pa=Oi[1],ln=Wr[0],Le=Wr[1],ra.alignment=1,ra.width=na,ra.height=pa,ra.channels=Wa,ra.format=ra.internalformat=vs[Wa],ra.needsFree=!0,Yc(ra,Is,ln,Le,Ue,Ka.offset)}else if(Nf(Ka)||Bu(Ka)||Tc(Ka))Nf(Ka)||Bu(Ka)?ra.element=Ka:ra.element=Ka.canvas,ra.width=ra.element.width,ra.height=ra.element.height,ra.channels=4;else if(Ou(Ka))ra.element=Ka,ra.width=Ka.width,ra.height=Ka.height,ra.channels=4;else if(Gc(Ka))ra.element=Ka,ra.width=Ka.naturalWidth,ra.height=Ka.naturalHeight,ra.channels=4;else if(pf(Ka))ra.element=Ka,ra.width=Ka.videoWidth,ra.height=Ka.videoHeight,ra.channels=4;else if(wc(Ka)){var Qe=ra.width||Ka[0].length,_t=ra.height||Ka.length,wt=ra.channels;zr(Ka[0][0])?wt=wt||Ka[0][0].length:wt=wt||1;for(var Lt=vt.shape(Ka),pr=1,Gr=0;Gr>=rs,Ka.height>>=rs,In(Ka,Bi[rs]),ra.mipmask|=1<=0&&!("faces"in Ya)&&(ra.genMipmaps=!0)}if("mag"in Ya){var Bi=Ya.mag;ra.magFilter=Cr[Bi]}var rs=ra.wrapS,Is=ra.wrapT;if("wrap"in Ya){var Oi=Ya.wrap;typeof Oi=="string"?rs=Is=Or[Oi]:Array.isArray(Oi)&&(rs=Or[Oi[0]],Is=Or[Oi[1]])}else{if("wrapS"in Ya){var Wr=Ya.wrapS;rs=Or[Wr]}if("wrapT"in Ya){var na=Ya.wrapT;Is=Or[na]}}if(ra.wrapS=rs,ra.wrapT=Is,"anisotropic"in Ya){var pa=Ya.anisotropic;ra.anisotropic=Ya.anisotropic}if("mipmap"in Ya){var Wa=!1;switch(typeof Ya.mipmap){case"string":ra.mipmapHint=vr[Ya.mipmap],ra.genMipmaps=!0,Wa=!0;break;case"boolean":Wa=ra.genMipmaps=Ya.mipmap;break;case"object":ra.genMipmaps=!1,Wa=!0;break;default:}Wa&&!("min"in Ya)&&(ra.minFilter=_o)}}function $o(ra,Ya){st.texParameteri(Ya,Vs,ra.minFilter),st.texParameteri(Ya,Vo,ra.magFilter),st.texParameteri(Ya,Xi,ra.wrapS),st.texParameteri(Ya,Ko,ra.wrapT),It.ext_texture_filter_anisotropic&&st.texParameteri(Ya,wu,ra.anisotropic),ra.genMipmaps&&(st.hint(Dl,ra.mipmapHint),st.generateMipmap(Ya))}var _s=0,Go={},Ys=Ut.maxTextureUnits,Ll=Array(Ys).map(function(){return null});function mo(ra){cn.call(this),this.mipmask=0,this.internalformat=pn,this.id=_s++,this.refCount=1,this.target=ra,this.texture=st.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zo,hr.profile&&(this.stats={size:0})}function ru(ra){st.activeTexture(uu),st.bindTexture(ra.target,ra.texture)}function Rs(){var ra=Ll[0];ra?st.bindTexture(ra.target,ra.texture):st.bindTexture(aa,null)}function Yu(ra){var Ya=ra.texture,Ka=ra.unit,Bi=ra.target;Ka>=0&&(st.activeTexture(uu+Ka),st.bindTexture(Bi,null),Ll[Ka]=null),st.deleteTexture(Ya),ra.texture=null,ra.params=null,ra.pixels=null,ra.refCount=0,delete Go[ra.id],Ar.textureCount--}p(mo.prototype,{bind:function(){var ra=this;ra.bindCount+=1;var Ya=ra.unit;if(Ya<0){for(var Ka=0;Ka0)continue;Bi.unit=-1}Ll[Ka]=ra,Ya=Ka;break}Ya>=Ys,hr.profile&&Ar.maxTextureUnits>Le)-Wa,Ue.height=Ue.height||(Ka.height>>Le)-ln,ru(Ka),Ei(Ue,aa,Wa,ln,Le),Rs(),bi(Ue),Bi}function Is(Oi,Wr){var na=Oi|0,pa=Wr|0||na;if(na===Ka.width&&pa===Ka.height)return Bi;Bi.width=Ka.width=na,Bi.height=Ka.height=pa,ru(Ka);for(var Wa=0;Ka.mipmask>>Wa;++Wa){var ln=na>>Wa,Le=pa>>Wa;if(!ln||!Le)break;st.texImage2D(aa,Wa,Ka.format,ln,Le,0,Ka.format,Ka.type,null)}return Rs(),hr.profile&&(Ka.stats.size=Nu(Ka.internalformat,Ka.type,na,pa,!1,!1)),Bi}return Bi(ra,Ya),Bi.subimage=rs,Bi.resize=Is,Bi._reglType="texture2d",Bi._texture=Ka,hr.profile&&(Bi.stats=Ka.stats),Bi.destroy=function(){Ka.decRef()},Bi}function ql(ra,Ya,Ka,Bi,rs,Is){var Oi=new mo(Sa);Go[Oi.id]=Oi,Ar.cubeCount++;var Wr=new Array(6);function na(ln,Le,Ue,Qe,_t,wt){var Lt,pr=Oi.texInfo;for(Zo.call(pr),Lt=0;Lt<6;++Lt)Wr[Lt]=So();if(typeof ln=="number"||!ln){var Gr=ln|0||1;for(Lt=0;Lt<6;++Lt)ro(Wr[Lt],Gr,Gr)}else if(typeof ln=="object")if(Le)Mo(Wr[0],ln),Mo(Wr[1],Le),Mo(Wr[2],Ue),Mo(Wr[3],Qe),Mo(Wr[4],_t),Mo(Wr[5],wt);else if(es(pr,ln),ei(Oi,ln),"faces"in ln){var va=ln.faces;for(Lt=0;Lt<6;++Lt)sn(Wr[Lt],Oi),Mo(Wr[Lt],va[Lt])}else for(Lt=0;Lt<6;++Lt)Mo(Wr[Lt],ln);for(sn(Oi,Wr[0]),pr.genMipmaps?Oi.mipmask=(Wr[0].width<<1)-1:Oi.mipmask=Wr[0].mipmask,Oi.internalformat=Wr[0].internalformat,na.width=Wr[0].width,na.height=Wr[0].height,ru(Oi),Lt=0;Lt<6;++Lt)zs(Wr[Lt],wa+Lt);for($o(pr,Sa),Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,pr.genMipmaps,!0)),na.format=da[Oi.internalformat],na.type=Fa[Oi.type],na.mag=za[pr.magFilter],na.min=Cn[pr.minFilter],na.wrapS=Dn[pr.wrapS],na.wrapT=Dn[pr.wrapT],Lt=0;Lt<6;++Lt)Ws(Wr[Lt]);return na}function pa(ln,Le,Ue,Qe,_t){var wt=Ue|0,Lt=Qe|0,pr=_t|0,Gr=ti();return sn(Gr,Oi),Gr.width=0,Gr.height=0,In(Gr,Le),Gr.width=Gr.width||(Oi.width>>pr)-wt,Gr.height=Gr.height||(Oi.height>>pr)-Lt,ru(Oi),Ei(Gr,wa+ln,wt,Lt,pr),Rs(),bi(Gr),na}function Wa(ln){var Le=ln|0;if(Le!==Oi.width){na.width=Oi.width=Le,na.height=Oi.height=Le,ru(Oi);for(var Ue=0;Ue<6;++Ue)for(var Qe=0;Oi.mipmask>>Qe;++Qe)st.texImage2D(wa+Ue,Qe,Oi.format,Le>>Qe,Le>>Qe,0,Oi.format,Oi.type,null);return Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,!1,!0)),na}}return na(ra,Ya,Ka,Bi,rs,Is),na.subimage=pa,na.resize=Wa,na._reglType="textureCube",na._texture=Oi,hr.profile&&(na.stats=Oi.stats),na.destroy=function(){Oi.decRef()},na}function fo(){for(var ra=0;ra>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);else for(var rs=0;rs<6;++rs)st.texImage2D(wa+rs,Bi,Ka.internalformat,Ka.width>>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);$o(Ka.texInfo,Ka.target)})}function Os(){for(var ra=0;ra=0?Ws=!0:Or.indexOf(Zo)>=0&&(Ws=!1))),("depthTexture"in mo||"depthStencilTexture"in mo)&&(Ll=!!(mo.depthTexture||mo.depthStencilTexture)),"depth"in mo&&(typeof mo.depth=="boolean"?zs=mo.depth:(_s=mo.depth,Bs=!1)),"stencil"in mo&&(typeof mo.stencil=="boolean"?Bs=mo.stencil:(Go=mo.stencil,zs=!1)),"depthStencil"in mo&&(typeof mo.depthStencil=="boolean"?zs=Bs=mo.depthStencil:(Ys=mo.depthStencil,zs=!1,Bs=!1))}var Rs=null,Yu=null,Ul=null,ql=null;if(Array.isArray(So))Rs=So.map(ua);else if(So)Rs=[ua(So)];else for(Rs=new Array($o),Wi=0;Wi<$o;++Wi)Rs[Wi]=ia(ro,Mo,Ws,Zo,es);ro=ro||Rs[0].width,Mo=Mo||Rs[0].height,_s?Yu=ua(_s):zs&&!Bs&&(Yu=ia(ro,Mo,Ll,"depth","uint32")),Go?Ul=ua(Go):Bs&&!zs&&(Ul=ia(ro,Mo,!1,"stencil","uint8")),Ys?ql=ua(Ys):!_s&&!Go&&Bs&&zs&&(ql=ia(ro,Mo,Ll,"depth stencil","depth stencil"));var fo=null;for(Wi=0;Wi0&&(bi.depth=In[0].depth,bi.stencil=In[0].stencil,bi.depthStencil=In[0].depthStencil),In[ti]?In[ti](bi):In[ti]=sn(bi)}return p(Jn,{width:Wi,height:Wi,color:Zo})}function Ei(so){var ti,bi=so|0;if(bi===Jn.width)return Jn;var Wi=Jn.color;for(ti=0;ti=Wi.byteLength?ro.subdata(Wi):(ro.destroy(),sn.buffers[so]=null)),sn.buffers[so]||(ro=sn.buffers[so]=dr.create(ti,hu,!1,!0)),bi.buffer=dr.getBuffer(ro),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1,Jn[so]=1}else dr.getBuffer(ti)?(bi.buffer=dr.getBuffer(ti),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1):dr.getBuffer(ti.buffer)?(bi.buffer=dr.getBuffer(ti.buffer),bi.size=(+ti.size||bi.buffer.dimension)|0,bi.normalized=!!ti.normalized||!1,"type"in ti?bi.type=Kr[ti.type]:bi.type=bi.buffer.dtype,bi.offset=(ti.offset||0)|0,bi.stride=(ti.stride||0)|0,bi.divisor=(ti.divisor||0)|0,bi.state=1):"x"in ti&&(bi.x=+ti.x||0,bi.y=+ti.y||0,bi.z=+ti.z||0,bi.w=+ti.w||0,bi.state=2)}for(var Mo=0;Mo1)for(var Pn=0;Pnia&&(ia=ga.stats.uniformsCount)}),ia},Ut.getMaxAttributesCount=function(){var ia=0;return ta.forEach(function(ga){ga.stats.attributesCount>ia&&(ia=ga.stats.attributesCount)}),ia});function ua(){dr={},Ar={};for(var ia=0;ia16&&(Ut=Da(Ut,st.length*8));for(var ir=Array(16),dr=Array(16),Ar=0;Ar<16;Ar++)ir[Ar]=Ut[Ar]^909522486,dr[Ar]=Ut[Ar]^1549556828;var hr=Da(ir.concat(vc(It)),512+It.length*8);return Ft(Da(dr.concat(hr),768))}function kl(st){for(var It=xf?"0123456789ABCDEF":"0123456789abcdef",Ut="",ir,dr=0;dr>>4&15)+It.charAt(ir&15);return Ut}function kc(st){for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut="",ir=st.length,dr=0;drst.length*8?Ut+=Gf:Ut+=It.charAt(Ar>>>6*(3-hr)&63);return Ut}function Cc(st,It){var Ut=It.length,ir=Array(),dr,Ar,hr,vr,Or=Array(Math.ceil(st.length/2));for(dr=0;dr0;){for(vr=Array(),hr=0,dr=0;dr0||Ar>0)&&(vr[vr.length]=Ar);ir[ir.length]=hr,Or=vr}var Cr="";for(dr=ir.length-1;dr>=0;dr--)Cr+=It.charAt(ir[dr]);var ta=Math.ceil(st.length*8/(Math.log(It.length)/Math.log(2)));for(dr=Cr.length;dr>>6&31,128|ir&63):ir<=65535?It+=String.fromCharCode(224|ir>>>12&15,128|ir>>>6&63,128|ir&63):ir<=2097151&&(It+=String.fromCharCode(240|ir>>>18&7,128|ir>>>12&63,128|ir>>>6&63,128|ir&63));return It}function vc(st){for(var It=Array(st.length>>2),Ut=0;Ut>5]|=(st.charCodeAt(Ut/8)&255)<<24-Ut%32;return It}function Ft(st){for(var It="",Ut=0;Ut>5]>>>24-Ut%32&255);return It}function tr(st,It){return st>>>It|st<<32-It}function Fr(st,It){return st>>>It}function wr(st,It,Ut){return st&It^~st&Ut}function ea(st,It,Ut){return st&It^st&Ut^It&Ut}function ba(st){return tr(st,2)^tr(st,13)^tr(st,22)}function Ia(st){return tr(st,6)^tr(st,11)^tr(st,25)}function Na(st){return tr(st,7)^tr(st,18)^Fr(st,3)}function Za(st){return tr(st,17)^tr(st,19)^Fr(st,10)}var mn=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 Da(st,It){var Ut=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ir=new Array(64),dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia;for(st[It>>5]|=128<<24-It%32,st[(It+64>>9<<4)+15]=It,Ta=0;Ta>16)+(It>>16)+(Ut>>16);return ir<<16|Ut&65535}function $a(st){return Array.prototype.slice.call(st)}function vn(st){return $a(st).join("")}function En(st){var It=st&&st.cache,Ut=0,ir=[],dr=[],Ar=[];function hr(ua,ia){var ga=ia&&ia.stable;if(!ga){for(var da=0;da0&&(ua.push(Fa,"="),ua.push.apply(ua,$a(arguments)),ua.push(";")),Fa}return p(ia,{def:da,toString:function(){return vn([ga.length>0?"var "+ga.join(",")+";":"",vn(ua)])}})}function Or(){var ua=vr(),ia=vr(),ga=ua.toString,da=ia.toString;function Fa(za,Cn){ia(za,Cn,"=",ua.def(za,Cn),";")}return p(function(){ua.apply(ua,$a(arguments))},{def:ua.def,entry:ua,exit:ia,save:Fa,set:function(za,Cn,Dn){Fa(za,Cn),ua(za,Cn,"=",Dn,";")},toString:function(){return ga()+da()}})}function Cr(){var ua=vn(arguments),ia=Or(),ga=Or(),da=ia.toString,Fa=ga.toString;return p(ia,{then:function(){return ia.apply(ia,$a(arguments)),this},else:function(){return ga.apply(ga,$a(arguments)),this},toString:function(){var za=Fa();return za&&(za="else{"+za+"}"),vn(["if(",ua,"){",da(),"}",za])}})}var ta=vr(),ka={};function Ta(ua,ia){var ga=[];function da(){var ui="a"+ga.length;return ga.push(ui),ui}ia=ia||0;for(var Fa=0;Fa":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fa={cw:qe,ccw:tt};function Ea(st){return Array.isArray(st)||Xt(st)||or(st)}function Ma(st){return st.sort(function(It,Ut){return It===Ks?-1:Ut===Ks?1:It=1,ir>=2,It)}else if(Ut===Co){var dr=st.data;return new sa(dr.thisDep,dr.contextDep,dr.propDep,It)}else{if(Ut===Do)return new sa(!1,!1,!1,It);if(Ut===Fo){for(var Ar=!1,hr=!1,vr=!1,Or=0;Or=1&&(hr=!0),ta>=2&&(vr=!0)}else Cr.type===Co&&(Ar=Ar||Cr.data.thisDep,hr=hr||Cr.data.contextDep,vr=vr||Cr.data.propDep)}return new sa(Ar,hr,vr,It)}else return new sa(Ut===Zi,Ut===Ni,Ut===Ln,It)}}var $n=new sa(!1,!1,!1,function(){});function xi(st,It,Ut,ir,dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia){var ma=Cr.Record,da={add:32774,subtract:32778,"reverse subtract":32779};Ut.ext_blend_minmax&&(da.min=at,da.max=ct);var Fa=Ut.angle_instanced_arrays,za=Ut.webgl_draw_buffers,kn=Ut.oes_vertex_array_object,Dn={dirty:!0,profile:ia.profile},ui={},cn=[],sn={},ei={};function Pn(Wr){return Wr.replace(".","_")}function Rn(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),ui[Wa]=Dn[Wa]=!!pa,sn[Wa]=na}function In(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),Array.isArray(pa)?(Dn[Wa]=pa.slice(),ui[Wa]=pa.slice()):Dn[Wa]=ui[Wa]=pa,ei[Wa]=na}function Jn(Wr){return!!isNaN(Wr)}Rn(Yo,an),Rn(bo,Ba),In(Gs,"blendColor",[0,0,0,0]),In(Es,"blendEquationSeparate",[gr,gr]),In(ns,"blendFuncSeparate",[mr,Jt,mr,Jt]),Rn(Kn,ii,!0),In(zo,"depthFunc",Hr),In(gs,"depthRange",[0,1]),In(js,"depthMask",!0),In(Cl,Cl,[!0,!0,!0,!0]),Rn(zl,xa),In(Kl,"cullFace",Ee),In(Gu,Gu,tt),In(xl,xl,1),Rn(Hu,oi),In(Su,"polygonOffset",[0,0]),Rn(mc,Ji),Rn(Jc,Qi),In(oc,"sampleCoverage",[1,!1]),Rn(du,wn),In(Jl,"stencilMask",-1),In(Ql,"stencilFunc",[Nt,0,-1]),In(Eu,"stencilOpSeparate",[de,St,St,St]),In(bf,"stencilOpSeparate",[Ee,St,St,St]),Rn(lh,Si),In(Pc,"scissor",[0,0,st.drawingBufferWidth,st.drawingBufferHeight]),In(Ks,Ks,[0,0,st.drawingBufferWidth,st.drawingBufferHeight]);var Ei={gl:st,context:Ta,strings:It,next:ui,current:Dn,draw:ka,elements:Ar,buffer:dr,shader:ta,attributes:Cr.state,vao:Cr,uniforms:Or,framebuffer:vr,extensions:Ut,timer:Ra,isBufferArgs:Ea},so={primTypes:en,compareFuncs:Yr,blendFuncs:Aa,blendEquations:da,stencilOps:oa,glTypes:Kr,orientationType:fa};za&&(so.backBuffer=[Ee],so.drawBuffer=f(ir.maxDrawbuffers,function(Wr){return Wr===0?[0]:f(Wr,function(na){return ca+na})}));var ti=0;function bi(){var Wr=Sn({cache:ua}),na=Wr.link,pa=Wr.global;Wr.id=ti++,Wr.batchId="0";var Wa=na(Ei),ln=Wr.shared={props:"a0"};Object.keys(Ei).forEach(function(wt){ln[wt]=pa.def(Wa,".",wt)});var Le=Wr.next={},Ue=Wr.current={};Object.keys(ei).forEach(function(wt){Array.isArray(Dn[wt])&&(Le[wt]=pa.def(ln.next,".",wt),Ue[wt]=pa.def(ln.current,".",wt))});var Qe=Wr.constants={};Object.keys(so).forEach(function(wt){Qe[wt]=pa.def(JSON.stringify(so[wt]))}),Wr.invoke=function(wt,Lt){switch(Lt.type){case En:var pr=["this",ln.context,ln.props,Wr.batchId];return wt.def(na(Lt.data),".call(",pr.slice(0,Math.max(Lt.data.length+1,4)),")");case Ln:return wt.def(ln.props,Lt.data);case Ni:return wt.def(ln.context,Lt.data);case Zi:return wt.def("this",Lt.data);case Co:return Lt.data.append(Wr,wt),Lt.data.ref;case Do:return Lt.data.toString();case Fo:return Lt.data.map(function(Gr){return Wr.invoke(wt,Gr)})}},Wr.attribCache={};var _t={};return Wr.scopeAttrib=function(wt){var Lt=It.id(wt);if(Lt in _t)return _t[Lt];var pr=Cr.scope[Lt];pr||(pr=Cr.scope[Lt]=new ma);var Gr=_t[Lt]=na(pr);return Gr},Wr}function Wi(Wr){var na=Wr.static,pa=Wr.dynamic,Wa;if(Bl in na){var ln=!!na[Bl];Wa=Tn(function(Ue,Qe){return ln}),Wa.enable=ln}else if(Bl in pa){var Le=pa[Bl];Wa=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}return Wa}function ro(Wr,na){var pa=Wr.static,Wa=Wr.dynamic;if(Wu in pa){var ln=pa[Wu];return ln?(ln=vr.getFramebuffer(ln),Tn(function(Ue,Qe){var _t=Ue.link(ln),wt=Ue.shared;Qe.set(wt.framebuffer,".next",_t);var Lt=wt.context;return Qe.set(Lt,"."+xt,_t+".width"),Qe.set(Lt,"."+Bt,_t+".height"),_t})):Tn(function(Ue,Qe){var _t=Ue.shared;Qe.set(_t.framebuffer,".next","null");var wt=_t.context;return Qe.set(wt,"."+xt,wt+"."+Br),Qe.set(wt,"."+Bt,wt+"."+kr),"null"})}else if(Wu in Wa){var Le=Wa[Wu];return zn(Le,function(Ue,Qe){var _t=Ue.invoke(Qe,Le),wt=Ue.shared,Lt=wt.framebuffer,pr=Qe.def(Lt,".getFramebuffer(",_t,")");Qe.set(Lt,".next",pr);var Gr=wt.context;return Qe.set(Gr,"."+xt,pr+"?"+pr+".width:"+Gr+"."+Br),Qe.set(Gr,"."+Bt,pr+"?"+pr+".height:"+Gr+"."+kr),pr})}else return null}function Mo(Wr,na,pa){var Wa=Wr.static,ln=Wr.dynamic;function Le(_t){if(_t in Wa){var wt=Wa[_t],Lt=!0,pr=wt.x|0,Gr=wt.y|0,va,Qa;return"width"in wt?va=wt.width|0:Lt=!1,"height"in wt?Qa=wt.height|0:Lt=!1,new sa(!Lt&&na&&na.thisDep,!Lt&&na&&na.contextDep,!Lt&&na&&na.propDep,function(An,dn){var _n=An.shared.context,Mn=va;"width"in wt||(Mn=dn.def(_n,".",xt,"-",pr));var Bn=Qa;return"height"in wt||(Bn=dn.def(_n,".",Bt,"-",Gr)),[pr,Gr,Mn,Bn]})}else if(_t in ln){var Ga=ln[_t],Ua=zn(Ga,function(An,dn){var _n=An.invoke(dn,Ga),Mn=An.shared.context,Bn=dn.def(_n,".x|0"),Zn=dn.def(_n,".y|0"),Ci=dn.def('"width" in ',_n,"?",_n,".width|0:","(",Mn,".",xt,"-",Bn,")"),qo=dn.def('"height" in ',_n,"?",_n,".height|0:","(",Mn,".",Bt,"-",Zn,")");return[Bn,Zn,Ci,qo]});return na&&(Ua.thisDep=Ua.thisDep||na.thisDep,Ua.contextDep=Ua.contextDep||na.contextDep,Ua.propDep=Ua.propDep||na.propDep),Ua}else return na?new sa(na.thisDep,na.contextDep,na.propDep,function(An,dn){var _n=An.shared.context;return[0,0,dn.def(_n,".",xt),dn.def(_n,".",Bt)]}):null}var Ue=Le(Ks);if(Ue){var Qe=Ue;Ue=new sa(Ue.thisDep,Ue.contextDep,Ue.propDep,function(_t,wt){var Lt=Qe.append(_t,wt),pr=_t.shared.context;return wt.set(pr,"."+zt,Lt[2]),wt.set(pr,"."+Wt,Lt[3]),Lt})}return{viewport:Ue,scissor_box:Le(Pc)}}function zs(Wr,na){var pa=Wr.static,Wa=typeof pa[Qc]=="string"&&typeof pa[wf]=="string";if(Wa){if(Object.keys(na.dynamic).length>0)return null;var ln=na.static,Le=Object.keys(ln);if(Le.length>0&&typeof ln[Le[0]]=="number"){for(var Ue=[],Qe=0;Qe"+Bn+"?"+Lt+".constant["+Bn+"]:0;"}).join(""),"}}else{","if(",va,"(",Lt,".buffer)){",An,"=",Qa,".createStream(",Jr,",",Lt,".buffer);","}else{",An,"=",Qa,".getBuffer(",Lt,".buffer);","}",dn,'="type" in ',Lt,"?",Gr.glTypes,"[",Lt,".type]:",An,".dtype;",Ga.normalized,"=!!",Lt,".normalized;");function _n(Mn){wt(Ga[Mn],"=",Lt,".",Mn,"|0;")}return _n("size"),_n("offset"),_n("stride"),_n("divisor"),wt("}}"),wt.exit("if(",Ga.isStream,"){",Qa,".destroyStream(",An,");","}"),Ga}ln[Le]=zn(Ue,Qe)}),ln}function $o(Wr){var na=Wr.static,pa=Wr.dynamic,Wa={};return Object.keys(na).forEach(function(ln){var Le=na[ln];Wa[ln]=Tn(function(Ue,Qe){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Ue.link(Le)})}),Object.keys(pa).forEach(function(ln){var Le=pa[ln];Wa[ln]=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}),Wa}function _s(Wr,na,pa,Wa,ln){var Le=Wr.static,Ue=Wr.dynamic,Qe=zs(Wr,na),_t=ro(Wr,ln),wt=Mo(Wr,_t,ln),Lt=So(Wr,ln),pr=Ws(Wr,ln),Gr=Bs(Wr,ln,Qe);function va(_n){var Mn=wt[_n];Mn&&(pr[_n]=Mn)}va(Ks),va(Pn(Pc));var Qa=Object.keys(pr).length>0,Ga={framebuffer:_t,draw:Lt,shader:Gr,state:pr,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Wi(Wr,ln),Ga.uniforms=Zo(pa,ln),Ga.drawVAO=Ga.scopeVAO=Lt.vao,!Ga.drawVAO&&Gr.program&&!Qe&&Ut.angle_instanced_arrays&&Lt.static.elements){var Ua=!0,An=Gr.program.attributes.map(function(_n){var Mn=na.static[_n];return Ua=Ua&&!!Mn,Mn});if(Ua&&An.length>0){var dn=Cr.getVAO(Cr.createVAO({attributes:An,elements:Lt.static.elements}));Ga.drawVAO=new sa(null,null,null,function(_n,Mn){return _n.link(dn)}),Ga.useVAO=!0}}return Qe?Ga.useVAO=!0:Ga.attributes=es(na,ln),Ga.context=$o(Wa,ln),Ga}function Go(Wr,na,pa){var Wa=Wr.shared,ln=Wa.context,Le=Wr.scope();Object.keys(pa).forEach(function(Ue){na.save(ln,"."+Ue);var Qe=pa[Ue],_t=Qe.append(Wr,na);Array.isArray(_t)?Le(ln,".",Ue,"=[",_t.join(),"];"):Le(ln,".",Ue,"=",_t,";")}),na(Le)}function Ys(Wr,na,pa,Wa){var ln=Wr.shared,Le=ln.gl,Ue=ln.framebuffer,Qe;za&&(Qe=na.def(ln.extensions,".webgl_draw_buffers"));var _t=Wr.constants,wt=_t.drawBuffer,Lt=_t.backBuffer,pr;pa?pr=pa.append(Wr,na):pr=na.def(Ue,".next"),Wa||na("if(",pr,"!==",Ue,".cur){"),na("if(",pr,"){",Le,".bindFramebuffer(",Vr,",",pr,".framebuffer);"),za&&na(Qe,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),na("}else{",Le,".bindFramebuffer(",Vr,",null);"),za&&na(Qe,".drawBuffersWEBGL(",Lt,");"),na("}",Ue,".cur=",pr,";"),Wa||na("}")}function Ll(Wr,na,pa){var Wa=Wr.shared,ln=Wa.gl,Le=Wr.current,Ue=Wr.next,Qe=Wa.current,_t=Wa.next,wt=Wr.cond(Qe,".dirty");cn.forEach(function(Lt){var pr=Pn(Lt);if(!(pr in pa.state)){var Gr,va;if(pr in Ue){Gr=Ue[pr],va=Le[pr];var Qa=f(Dn[pr].length,function(Ua){return wt.def(Gr,"[",Ua,"]")});wt(Wr.cond(Qa.map(function(Ua,An){return Ua+"!=="+va+"["+An+"]"}).join("||")).then(ln,".",ei[pr],"(",Qa,");",Qa.map(function(Ua,An){return va+"["+An+"]="+Ua}).join(";"),";"))}else{Gr=wt.def(_t,".",pr);var Ga=Wr.cond(Gr,"!==",Qe,".",pr);wt(Ga),pr in sn?Ga(Wr.cond(Gr).then(ln,".enable(",sn[pr],");").else(ln,".disable(",sn[pr],");"),Qe,".",pr,"=",Gr,";"):Ga(ln,".",ei[pr],"(",Gr,");",Qe,".",pr,"=",Gr,";")}}}),Object.keys(pa.state).length===0&&wt(Qe,".dirty=false;"),na(wt)}function mo(Wr,na,pa,Wa){var ln=Wr.shared,Le=Wr.current,Ue=ln.current,Qe=ln.gl,_t;Ma(Object.keys(pa)).forEach(function(wt){var Lt=pa[wt];if(!(Wa&&!Wa(Lt))){var pr=Lt.append(Wr,na);if(sn[wt]){var Gr=sn[wt];hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Wr.cond(_t).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",_t,";")):(na(Wr.cond(pr).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",pr,";"))}else if(zr(pr)){var va=Le[wt];na(Qe,".",ei[wt],"(",pr,");",pr.map(function(Qa,Ga){return va+"["+Ga+"]="+Qa}).join(";"),";")}else hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Qe,".",ei[wt],"(",_t,");",Ue,".",wt,"=",_t,";")):na(Qe,".",ei[wt],"(",pr,");",Ue,".",wt,"=",pr,";")}})}function ru(Wr,na){Fa&&(Wr.instancing=na.def(Wr.shared.extensions,".angle_instanced_arrays"))}function Rs(Wr,na,pa,Wa,ln){var Le=Wr.shared,Ue=Wr.stats,Qe=Le.current,_t=Le.timer,wt=pa.profile;function Lt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Gr;function va(_n){pr=na.def(),_n(pr,"=",Lt(),";"),typeof ln=="string"?_n(Ue,".count+=",ln,";"):_n(Ue,".count++;"),Ra&&(Wa?(Gr=na.def(),_n(Gr,"=",_t,".getNumPendingQueries();")):_n(_t,".beginQuery(",Ue,");"))}function Qa(_n){_n(Ue,".cpuTime+=",Lt(),"-",pr,";"),Ra&&(Wa?_n(_t,".pushScopeStats(",Gr,",",_t,".getNumPendingQueries(),",Ue,");"):_n(_t,".endQuery();"))}function Ga(_n){var Mn=na.def(Qe,".profile");na(Qe,".profile=",_n,";"),na.exit(Qe,".profile=",Mn,";")}var Ua;if(wt){if(hn(wt)){wt.enable?(va(na),Qa(na.exit),Ga("true")):Ga("false");return}Ua=wt.append(Wr,na),Ga(Ua)}else Ua=na.def(Qe,".profile");var An=Wr.block();va(An),na("if(",Ua,"){",An,"}");var dn=Wr.block();Qa(dn),na.exit("if(",Ua,"){",dn,"}")}function Yu(Wr,na,pa,Wa,ln){var Le=Wr.shared;function Ue(_t){switch(_t){case Qo:case jl:case wi:return 2;case vo:case Hs:case sl:return 3;case ys:case Cu:case sc:return 4;default:return 1}}function Qe(_t,wt,Lt){var pr=Le.gl,Gr=na.def(_t,".location"),va=na.def(Le.attributes,"[",Gr,"]"),Qa=Lt.state,Ga=Lt.buffer,Ua=[Lt.x,Lt.y,Lt.z,Lt.w],An=["buffer","normalized","offset","stride"];function dn(){na("if(!",va,".buffer){",pr,".enableVertexAttribArray(",Gr,");}");var Mn=Lt.type,Bn;if(Lt.size?Bn=na.def(Lt.size,"||",wt):Bn=wt,na("if(",va,".type!==",Mn,"||",va,".size!==",Bn,"||",An.map(function(Ci){return va+"."+Ci+"!=="+Lt[Ci]}).join("||"),"){",pr,".bindBuffer(",Jr,",",Ga,".buffer);",pr,".vertexAttribPointer(",[Gr,Bn,Mn,Lt.normalized,Lt.stride,Lt.offset],");",va,".type=",Mn,";",va,".size=",Bn,";",An.map(function(Ci){return va+"."+Ci+"="+Lt[Ci]+";"}).join(""),"}"),Fa){var Zn=Lt.divisor;na("if(",va,".divisor!==",Zn,"){",Wr.instancing,".vertexAttribDivisorANGLE(",[Gr,Zn],");",va,".divisor=",Zn,";}")}}function _n(){na("if(",va,".buffer){",pr,".disableVertexAttribArray(",Gr,");",va,".buffer=null;","}if(",yi.map(function(Mn,Bn){return va+"."+Mn+"!=="+Ua[Bn]}).join("||"),"){",pr,".vertexAttrib4f(",Gr,",",Ua,");",yi.map(function(Mn,Bn){return va+"."+Mn+"="+Ua[Bn]+";"}).join(""),"}")}Qa===ki?dn():Qa===ri?_n():(na("if(",Qa,"===",ki,"){"),dn(),na("}else{"),_n(),na("}"))}Wa.forEach(function(_t){var wt=_t.name,Lt=pa.attributes[wt],pr;if(Lt){if(!ln(Lt))return;pr=Lt.append(Wr,na)}else{if(!ln($n))return;var Gr=Wr.scopeAttrib(wt);pr={},Object.keys(new ma).forEach(function(va){pr[va]=na.def(Gr,".",va)})}Qe(Wr.link(_t),Ue(_t.info.type),pr)})}function Ul(Wr,na,pa,Wa,ln,Le){for(var Ue=Wr.shared,Qe=Ue.gl,_t,wt=0;wt1){for(var As=[],ls=[],Vl=0;Vl>1)",Ga],");")}function Zn(){pa(Ua,".drawArraysInstancedANGLE(",[Gr,va,Qa,Ga],");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}function Mn(){function Bn(){pa(Le+".drawElements("+[Gr,Qa,An,va+"<<(("+An+"-"+_i+")>>1)"]+");")}function Zn(){pa(Le+".drawArrays("+[Gr,va,Qa]+");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}Fa&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(pa("if(",Ga,">0){"),_n(),pa("}else if(",Ga,"<0){"),Mn(),pa("}")):_n():Mn()}function fo(Wr,na,pa,Wa,ln){var Le=bi(),Ue=Le.proc("body",ln);return Fa&&(Le.instancing=Ue.def(Le.shared.extensions,".angle_instanced_arrays")),Wr(Le,Ue,pa,Wa),Le.compile().body}function Xo(Wr,na,pa,Wa){ru(Wr,na),pa.useVAO?pa.drawVAO?na(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,na),");"):na(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(na(Wr.shared.vao,".setVAO(null);"),Yu(Wr,na,pa,Wa.attributes,function(){return!0})),Ul(Wr,na,pa,Wa.uniforms,function(){return!0},!1),ql(Wr,na,na,pa)}function Os(Wr,na){var pa=Wr.proc("draw",1);ru(Wr,pa),Go(Wr,pa,na.context),Ys(Wr,pa,na.framebuffer),Ll(Wr,pa,na),mo(Wr,pa,na.state),Rs(Wr,pa,na,!1,!0);var Wa=na.shader.progVar.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",Wa,".program);"),na.shader.program)Xo(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var ln=Wr.global.def("{}"),Le=pa.def(Wa,".id"),Ue=pa.def(ln,"[",Le,"]");pa(Wr.cond(Ue).then(Ue,".call(this,a0);").else(Ue,"=",ln,"[",Le,"]=",Wr.link(function(Qe){return fo(Xo,Wr,na,Qe,1)}),"(",Wa,");",Ue,".call(this,a0);"))}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function ra(Wr,na,pa,Wa){Wr.batchId="a1",ru(Wr,na);function ln(){return!0}Yu(Wr,na,pa,Wa.attributes,ln),Ul(Wr,na,pa,Wa.uniforms,ln,!1),ql(Wr,na,na,pa)}function Ya(Wr,na,pa,Wa){ru(Wr,na);var ln=pa.contextDep,Le=na.def(),Ue="a0",Qe="a1",_t=na.def();Wr.shared.props=_t,Wr.batchId=Le;var wt=Wr.scope(),Lt=Wr.scope();na(wt.entry,"for(",Le,"=0;",Le,"<",Qe,";++",Le,"){",_t,"=",Ue,"[",Le,"];",Lt,"}",wt.exit);function pr(An){return An.contextDep&&ln||An.propDep}function Gr(An){return!pr(An)}if(pa.needsContext&&Go(Wr,Lt,pa.context),pa.needsFramebuffer&&Ys(Wr,Lt,pa.framebuffer),mo(Wr,Lt,pa.state,pr),pa.profile&&pr(pa.profile)&&Rs(Wr,Lt,pa,!1,!0),Wa)pa.useVAO?pa.drawVAO?pr(pa.drawVAO)?Lt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,Lt),");"):wt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,wt),");"):wt(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(wt(Wr.shared.vao,".setVAO(null);"),Yu(Wr,wt,pa,Wa.attributes,Gr),Yu(Wr,Lt,pa,Wa.attributes,pr)),Ul(Wr,wt,pa,Wa.uniforms,Gr,!1),Ul(Wr,Lt,pa,Wa.uniforms,pr,!0),ql(Wr,wt,Lt,pa);else{var va=Wr.global.def("{}"),Qa=pa.shader.progVar.append(Wr,Lt),Ga=Lt.def(Qa,".id"),Ua=Lt.def(va,"[",Ga,"]");Lt(Wr.shared.gl,".useProgram(",Qa,".program);","if(!",Ua,"){",Ua,"=",va,"[",Ga,"]=",Wr.link(function(An){return fo(ra,Wr,pa,An,2)}),"(",Qa,");}",Ua,".call(this,a0[",Le,"],",Le,");")}}function Ka(Wr,na){var pa=Wr.proc("batch",2);Wr.batchId="0",ru(Wr,pa);var Wa=!1,ln=!0;Object.keys(na.context).forEach(function(va){Wa=Wa||na.context[va].propDep}),Wa||(Go(Wr,pa,na.context),ln=!1);var Le=na.framebuffer,Ue=!1;Le?(Le.propDep?Wa=Ue=!0:Le.contextDep&&Wa&&(Ue=!0),Ue||Ys(Wr,pa,Le)):Ys(Wr,pa,null),na.state.viewport&&na.state.viewport.propDep&&(Wa=!0);function Qe(va){return va.contextDep&&Wa||va.propDep}Ll(Wr,pa,na),mo(Wr,pa,na.state,function(va){return!Qe(va)}),(!na.profile||!Qe(na.profile))&&Rs(Wr,pa,na,!1,"a1"),na.contextDep=Wa,na.needsContext=ln,na.needsFramebuffer=Ue;var _t=na.shader.progVar;if(_t.contextDep&&Wa||_t.propDep)Ya(Wr,pa,na,null);else{var wt=_t.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",wt,".program);"),na.shader.program)Ya(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var Lt=Wr.global.def("{}"),pr=pa.def(wt,".id"),Gr=pa.def(Lt,"[",pr,"]");pa(Wr.cond(Gr).then(Gr,".call(this,a0,a1);").else(Gr,"=",Lt,"[",pr,"]=",Wr.link(function(va){return fo(Ya,Wr,na,va,2)}),"(",wt,");",Gr,".call(this,a0,a1);"))}}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function Bi(Wr,na){var pa=Wr.proc("scope",3);Wr.batchId="a2";var Wa=Wr.shared,ln=Wa.current;if(Go(Wr,pa,na.context),na.framebuffer&&na.framebuffer.append(Wr,pa),Ma(Object.keys(na.state)).forEach(function(Qe){var _t=na.state[Qe],wt=_t.append(Wr,pa);zr(wt)?wt.forEach(function(Lt,pr){Jn(Lt)?pa.set(Wr.next[Qe],"["+pr+"]",Lt):pa.set(Wr.next[Qe],"["+pr+"]",Wr.link(Lt,{stable:!0}))}):hn(_t)?pa.set(Wa.next,"."+Qe,Wr.link(wt,{stable:!0})):pa.set(Wa.next,"."+Qe,wt)}),Rs(Wr,pa,na,!0,!0),[ku,fi,Nl,eu,Ol].forEach(function(Qe){var _t=na.draw[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.draw,"."+Qe,wt):pa.set(Wa.draw,"."+Qe,Wr.link(wt),{stable:!0})}}),Object.keys(na.uniforms).forEach(function(Qe){var _t=na.uniforms[Qe].append(Wr,pa);Array.isArray(_t)&&(_t="["+_t.map(function(wt){return Jn(wt)?wt:Wr.link(wt,{stable:!0})})+"]"),pa.set(Wa.uniforms,"["+Wr.link(It.id(Qe),{stable:!0})+"]",_t)}),Object.keys(na.attributes).forEach(function(Qe){var _t=na.attributes[Qe].append(Wr,pa),wt=Wr.scopeAttrib(Qe);Object.keys(new ma).forEach(function(Lt){pa.set(wt,"."+Lt,_t[Lt])})}),na.scopeVAO){var Le=na.scopeVAO.append(Wr,pa);Jn(Le)?pa.set(Wa.vao,".targetVAO",Le):pa.set(Wa.vao,".targetVAO",Wr.link(Le,{stable:!0}))}function Ue(Qe){var _t=na.shader[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.shader,"."+Qe,wt):pa.set(Wa.shader,"."+Qe,Wr.link(wt,{stable:!0}))}}Ue(wf),Ue(Qc),Object.keys(na.state).length>0&&(pa(ln,".dirty=true;"),pa.exit(ln,".dirty=true;")),pa("a1(",Wr.shared.context,",a0,",Wr.batchId,");")}function rs(Wr){if(!(typeof Wr!="object"||zr(Wr))){for(var na=Object.keys(Wr),pa=0;pa=0;--fo){var Xo=Ei[fo];Xo&&Xo(ua,null,0)}Ut.flush(),ta&&ta.update()}function Mo(){!Wi&&Ei.length>0&&(Wi=m.next(ro))}function zs(){Wi&&(m.cancel(ro),Wi=null)}function Bs(fo){fo.preventDefault(),dr=!0,zs(),so.forEach(function(Xo){Xo()})}function So(fo){Ut.getError(),dr=!1,Ar.restore(),ui.restore(),Fa.restore(),cn.restore(),sn.restore(),ei.restore(),kn.restore(),ta&&ta.restore(),Pn.procs.refresh(),Mo(),ti.forEach(function(Xo){Xo()})}Jn&&(Jn.addEventListener(je,Bs,!1),Jn.addEventListener(Ze,So,!1));function Ws(){Ei.length=0,zs(),Jn&&(Jn.removeEventListener(je,Bs),Jn.removeEventListener(Ze,So)),ui.clear(),ei.clear(),sn.clear(),kn.clear(),cn.clear(),za.clear(),Fa.clear(),ta&&ta.clear(),bi.forEach(function(fo){fo()})}function Zo(fo){function Xo(Le){var Ue=p({},Le);delete Ue.uniforms,delete Ue.attributes,delete Ue.context,delete Ue.vao,"stencil"in Ue&&Ue.stencil.op&&(Ue.stencil.opBack=Ue.stencil.opFront=Ue.stencil.op,delete Ue.stencil.op);function Qe(_t){if(_t in Ue){var wt=Ue[_t];delete Ue[_t],Object.keys(wt).forEach(function(Lt){Ue[_t+"."+Lt]=wt[Lt]})}}return Qe("blend"),Qe("depth"),Qe("cull"),Qe("stencil"),Qe("polygonOffset"),Qe("scissor"),Qe("sample"),"vao"in Le&&(Ue.vao=Le.vao),Ue}function Os(Le,Ue){var Qe={},_t={};return Object.keys(Le).forEach(function(wt){var Lt=Le[wt];if(c.isDynamic(Lt)){_t[wt]=c.unbox(Lt,wt);return}else if(Ue&&Array.isArray(Lt)){for(var pr=0;pr0)return Wr.call(this,Wa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return Wr.call(this,Le,Le.length)}else return Oi.call(this,Le)}return p(ln,{stats:rs,destroy:function(){Is.destroy()}})}var es=ei.setFBO=Zo({framebuffer:c.define.call(null,ut,"framebuffer")});function $o(fo,Xo){var Os=0;Pn.procs.poll();var ra=Xo.color;ra&&(Ut.clearColor(+ra[0]||0,+ra[1]||0,+ra[2]||0,+ra[3]||0),Os|=ie),"depth"in Xo&&(Ut.clearDepth(+Xo.depth),Os|=fe),"stencil"in Xo&&(Ut.clearStencil(Xo.stencil|0),Os|=be),Ut.clear(Os)}function _s(fo){if("framebuffer"in fo)if(fo.framebuffer&&fo.framebuffer_reglType==="framebufferCube")for(var Xo=0;Xo<6;++Xo)es(p({framebuffer:fo.framebuffer.faces[Xo]},fo),$o);else es(fo,$o);else $o(null,fo)}function Go(fo){Ei.push(fo);function Xo(){var Os=Gt(Ei,fo);function ra(){var Ya=Gt(Ei,ra);Ei[Ya]=Ei[Ei.length-1],Ei.length-=1,Ei.length<=0&&zs()}Ei[Os]=ra}return Mo(),{cancel:Xo}}function Ys(){var fo=In.viewport,Xo=In.scissor_box;fo[0]=fo[1]=Xo[0]=Xo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=fo[2]=Xo[2]=Ut.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=fo[3]=Xo[3]=Ut.drawingBufferHeight}function Ll(){ua.tick+=1,ua.time=ru(),Ys(),Pn.procs.poll()}function mo(){cn.refresh(),Ys(),Pn.procs.refresh(),ta&&ta.update()}function ru(){return(h()-ka)/1e3}mo();function Rs(fo,Xo){var Os;switch(fo){case"frame":return Go(Xo);case"lost":Os=so;break;case"restore":Os=ti;break;case"destroy":Os=bi;break;default:}return Os.push(Xo),{cancel:function(){for(var ra=0;ra=0},read:Rn,destroy:Ws,_gl:Ut,_refresh:mo,poll:function(){Ll(),ta&&ta.update()},now:ru,stats:vr,getCachedCode:Yu,preloadCachedCode:Ul});return It.onDone(null,ql),ql}return Kt})}}),lq=ze({"node_modules/gl-util/context.js"(J,V){"use strict";var p=qd();V.exports=function(n){if(n?typeof n=="string"&&(n={container:n}):n={},E(n)?n={container:n}:k(n)?n={container:n}:l(n)?n={gl:n}:n=p(n,{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),n.pixelRatio||(n.pixelRatio=window.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var r=document.querySelector(n.container);if(!r)throw Error("Element "+n.container+" is not found");n.container=r}E(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),b(n))}else if(!n.canvas)if(typeof document<"u")n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),b(n);else throw Error("Not DOM environment. Use headless-gl.");return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{n.gl=n.canvas.getContext(a,n.attrs)}catch{}return n.gl}),n.gl};function b(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var n=t.container.getBoundingClientRect();t.canvas.width=t.width||n.right-n.left,t.canvas.height=t.height||n.bottom-n.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),uq=ze({"node_modules/font-atlas/index.js"(J,V){"use strict";var p=dM(),b=[32,126];V.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,n=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||b;if(t&&typeof t!="string"&&(t=p(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var a=[],o=r[0],s=0;o<=r[1];o++)a[s++]=String.fromCharCode(o);r=a}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var m=n[0]/2,h=n[1]/2,o=0;ol[0]-n[0]/2&&(m=n[0]/2,h+=n[1]);return e}}}),vM=ze({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var V=32;J.INT_BITS=V,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>V-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function p(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=p,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var b=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|b[E>>>16&255]<<8|b[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>p(E)+1}}}),cq=ze({"node_modules/dup/dup.js"(J,V){"use strict";function p(k,l,e){var t=k[e]|0;if(t<=0)return[];var n=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return b(k|0,l);break;case"object":if(typeof k.length=="number")return p(k,l,0);break}return[]}V.exports=E}}),fq=ze({"node_modules/typedarray-pool/pool.js"(J){"use strict";var V=vM(),p=cq(),b=$v().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:p([32,0]),UINT16:p([32,0]),UINT32:p([32,0]),BIGUINT64:p([32,0]),INT8:p([32,0]),INT16:p([32,0]),INT32:p([32,0]),BIGINT64:p([32,0]),FLOAT:p([32,0]),DOUBLE:p([32,0]),DATA:p([32,0]),UINT8C:p([32,0]),BUFFER:p([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=p([32,0])),e.BIGUINT64||(e.BIGUINT64=p([32,0])),e.BIGINT64||(e.BIGINT64=p([32,0])),e.BUFFER||(e.BUFFER=p([32,0]));var t=e.DATA,n=e.BUFFER;J.free=function(u){if(b.isBuffer(u))n[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,x=V.log2(A)|0;t[x].push(u)}};function r(f){if(f){var u=f.length||f.byteLength,A=V.log2(u);t[A].push(f)}}function a(f){r(f.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=a,J.freeArrayBuffer=r,J.freeBuffer=function(u){n[V.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return m(u);case"int8":return h(u);case"int16":return v(u);case"int32":return g(u);case"float":case"float32":return i(u);case"double":case"float64":return w(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return T(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=V.nextPow2(u),A=V.log2(u),x=t[A];return x.length>0?x.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(f){return new Uint8Array(o(f),0,f)}J.mallocUint8=s;function c(f){return new Uint16Array(o(2*f),0,f)}J.mallocUint16=c;function m(f){return new Uint32Array(o(4*f),0,f)}J.mallocUint32=m;function h(f){return new Int8Array(o(f),0,f)}J.mallocInt8=h;function v(f){return new Int16Array(o(2*f),0,f)}J.mallocInt16=v;function g(f){return new Int32Array(o(4*f),0,f)}J.mallocInt32=g;function i(f){return new Float32Array(o(4*f),0,f)}J.mallocFloat32=J.mallocFloat=i;function w(f){return new Float64Array(o(8*f),0,f)}J.mallocFloat64=J.mallocDouble=w;function S(f){return E?new Uint8ClampedArray(o(f),0,f):s(f)}J.mallocUint8Clamped=S;function M(f){return k?new BigUint64Array(o(8*f),0,f):null}J.mallocBigUint64=M;function C(f){return l?new BigInt64Array(o(8*f),0,f):null}J.mallocBigInt64=C;function _(f){return new DataView(o(f),0,f)}J.mallocDataView=_;function T(f){f=V.nextPow2(f);var u=V.log2(f),A=n[u];return A.length>0?A.pop():new b(f)}J.mallocBuffer=T,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,n[u].length=0}}}),hq=ze({"node_modules/is-plain-obj/index.js"(J,V){"use strict";var p=Object.prototype.toString;V.exports=function(b){var E;return p.call(b)==="[object Object]"&&(E=Object.getPrototypeOf(b),E===null||E===Object.getPrototypeOf({}))}}}),mM=ze({"node_modules/parse-unit/index.js"(J,V){V.exports=function(b,E){E||(E=[0,""]),b=String(b);var k=parseFloat(b,10);return E[0]=k,E[1]=b.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),dq=ze({"node_modules/gl-text/node_modules/to-px/topx.js"(J,V){"use strict";var p=mM();V.exports=l;var b=96;function E(e,t){var n=p(getComputedStyle(e).getPropertyValue(t));return n[0]*l(n[1],e)}function k(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=E(n,"font-size")/128;return t.removeChild(n),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(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 b;case"cm":return b/2.54;case"mm":return b/25.4;case"pt":return b/72;case"pc":return b/6}return 1}}}),pq=ze({"node_modules/detect-kerning/index.js"(J,V){"use strict";V.exports=k;var p=k.canvas=document.createElement("canvas"),b=p.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var n={},r,a=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),b.font=a+"px "+e;for(var s=0;sa*o){var v=(h-m)/a;n[c]=v*1e3}}return n}function l(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),a=e[0];a0;n-=4)if(t[n]!==0)return Math.floor((n-3)*.25/e)}}}),mq=ze({"node_modules/gl-text/dist.js"(J,V){"use strict";var p=sq(),b=qd(),E=pM(),k=lq(),l=iM(),e=ay(),t=uq(),n=fq(),r=yg(),a=hq(),o=mM(),s=dq(),c=pq(),m=Vc(),h=vq(),v=f0(),g=vM(),i=g.nextPow2,w=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(f){_(f)?(f={regl:f},this.gl=f.regl._gl):this.gl=k(f),this.shader=w.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=f.regl||E({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(),w.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(a(f)?f:{})};C.prototype.createShader=function(){var f=this.regl,u=f({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:f.prop("count"),offset:f.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:f.this("sizeBuffer")},width:{offset:0,stride:8,buffer:f.this("sizeBuffer")},char:f.this("charBuffer"),position:f.this("position")},uniforms:{atlasSize:function(x,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(x,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(x,z){return z.atlas.texture},charStep:function(x,z){return z.atlas.step},em:function(x,z){return z.atlas.em},color:f.prop("color"),opacity:f.prop("opacity"),viewport:f.this("viewportArray"),scale:f.this("scale"),align:f.prop("align"),baseline:f.prop("baseline"),translate:f.this("translate"),positionOffset:f.prop("positionOffset")},primitive:"points",viewport:f.this("viewport"),vert:` +`),ga;if(It&&(ga=bh(ia),It[ga]))return It[ga].apply(null,dr);var da=Function.apply(null,ir.concat(ia));return It&&(It[ga]=da),da.apply(null,dr)}return{global:ta,link:hr,block:vr,proc:Ta,scope:Or,cond:Cr,compile:Ra}}var yi="xyzw".split(""),_i=5121,ki=1,ri=2,kn=0,Ln=1,Ni=2,Zi=3,Co=4,Do=5,Fo=6,Yo="dither",bo="blend.enable",Gs="blend.color",Es="blend.equation",ns="blend.func",Kn="depth.enable",zo="depth.func",gs="depth.range",js="depth.mask",Cl="colorMask",zl="cull.enable",Kl="cull.face",Gu="frontFace",xl="lineWidth",Hu="polygonOffset.enable",Su="polygonOffset.offset",mc="sample.alpha",Jc="sample.enable",oc="sample.coverage",du="stencil.enable",Jl="stencil.mask",Ql="stencil.func",Eu="stencil.opFront",bf="stencil.opBack",lh="scissor.enable",Pc="scissor.box",Ks="viewport",Bl="profile",Wu="framebuffer",wf="vert",Qc="frag",ku="elements",Ol="primitive",Nl="count",fi="offset",eu="instances",$e="vao",nt="Width",mt="Height",xt=Wu+nt,Bt=Wu+mt,zt=Ks+nt,Wt=Ks+mt,Pr="drawingBuffer",Br=Pr+nt,kr=Pr+mt,jr=[ns,Es,Ql,Eu,bf,oc,Ks,Pc,Su],Jr=34962,la=34963,xa=2884,Ba=3042,an=3024,Tn=2960,ii=2929,Si=3089,oi=32823,Ji=32926,Qi=32928,Oo=5126,Qo=35664,vo=35665,ys=35666,ol=5124,jl=35667,Hs=35668,Cu=35669,hi=35670,wi=35671,sl=35672,sc=35673,tu=35674,Ps=35675,gc=35676,pu=35678,ll=35680,ef=4,de=1028,Ee=1029,qe=2304,tt=2305,at=32775,ct=32776,Nt=519,St=7680,Jt=0,mr=1,gr=32774,Hr=513,Vr=36160,ca=36064,Aa={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},Xr={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},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fa={cw:qe,ccw:tt};function Ea(st){return Array.isArray(st)||Xt(st)||or(st)}function Ma(st){return st.sort(function(It,Ut){return It===Ks?-1:Ut===Ks?1:It=1,ir>=2,It)}else if(Ut===Co){var dr=st.data;return new sa(dr.thisDep,dr.contextDep,dr.propDep,It)}else{if(Ut===Do)return new sa(!1,!1,!1,It);if(Ut===Fo){for(var Ar=!1,hr=!1,vr=!1,Or=0;Or=1&&(hr=!0),ta>=2&&(vr=!0)}else Cr.type===Co&&(Ar=Ar||Cr.data.thisDep,hr=hr||Cr.data.contextDep,vr=vr||Cr.data.propDep)}return new sa(Ar,hr,vr,It)}else return new sa(Ut===Zi,Ut===Ni,Ut===Ln,It)}}var $n=new sa(!1,!1,!1,function(){});function xi(st,It,Ut,ir,dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia){var ga=Cr.Record,da={add:32774,subtract:32778,"reverse subtract":32779};Ut.ext_blend_minmax&&(da.min=at,da.max=ct);var Fa=Ut.angle_instanced_arrays,za=Ut.webgl_draw_buffers,Cn=Ut.oes_vertex_array_object,Dn={dirty:!0,profile:ia.profile},ui={},cn=[],sn={},ei={};function Pn(Wr){return Wr.replace(".","_")}function Rn(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),ui[Wa]=Dn[Wa]=!!pa,sn[Wa]=na}function In(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),Array.isArray(pa)?(Dn[Wa]=pa.slice(),ui[Wa]=pa.slice()):Dn[Wa]=ui[Wa]=pa,ei[Wa]=na}function Jn(Wr){return!!isNaN(Wr)}Rn(Yo,an),Rn(bo,Ba),In(Gs,"blendColor",[0,0,0,0]),In(Es,"blendEquationSeparate",[gr,gr]),In(ns,"blendFuncSeparate",[mr,Jt,mr,Jt]),Rn(Kn,ii,!0),In(zo,"depthFunc",Hr),In(gs,"depthRange",[0,1]),In(js,"depthMask",!0),In(Cl,Cl,[!0,!0,!0,!0]),Rn(zl,xa),In(Kl,"cullFace",Ee),In(Gu,Gu,tt),In(xl,xl,1),Rn(Hu,oi),In(Su,"polygonOffset",[0,0]),Rn(mc,Ji),Rn(Jc,Qi),In(oc,"sampleCoverage",[1,!1]),Rn(du,Tn),In(Jl,"stencilMask",-1),In(Ql,"stencilFunc",[Nt,0,-1]),In(Eu,"stencilOpSeparate",[de,St,St,St]),In(bf,"stencilOpSeparate",[Ee,St,St,St]),Rn(lh,Si),In(Pc,"scissor",[0,0,st.drawingBufferWidth,st.drawingBufferHeight]),In(Ks,Ks,[0,0,st.drawingBufferWidth,st.drawingBufferHeight]);var Ei={gl:st,context:Ta,strings:It,next:ui,current:Dn,draw:ka,elements:Ar,buffer:dr,shader:ta,attributes:Cr.state,vao:Cr,uniforms:Or,framebuffer:vr,extensions:Ut,timer:Ra,isBufferArgs:Ea},so={primTypes:en,compareFuncs:Xr,blendFuncs:Aa,blendEquations:da,stencilOps:oa,glTypes:Kr,orientationType:fa};za&&(so.backBuffer=[Ee],so.drawBuffer=f(ir.maxDrawbuffers,function(Wr){return Wr===0?[0]:f(Wr,function(na){return ca+na})}));var ti=0;function bi(){var Wr=En({cache:ua}),na=Wr.link,pa=Wr.global;Wr.id=ti++,Wr.batchId="0";var Wa=na(Ei),ln=Wr.shared={props:"a0"};Object.keys(Ei).forEach(function(wt){ln[wt]=pa.def(Wa,".",wt)});var Le=Wr.next={},Ue=Wr.current={};Object.keys(ei).forEach(function(wt){Array.isArray(Dn[wt])&&(Le[wt]=pa.def(ln.next,".",wt),Ue[wt]=pa.def(ln.current,".",wt))});var Qe=Wr.constants={};Object.keys(so).forEach(function(wt){Qe[wt]=pa.def(JSON.stringify(so[wt]))}),Wr.invoke=function(wt,Lt){switch(Lt.type){case kn:var pr=["this",ln.context,ln.props,Wr.batchId];return wt.def(na(Lt.data),".call(",pr.slice(0,Math.max(Lt.data.length+1,4)),")");case Ln:return wt.def(ln.props,Lt.data);case Ni:return wt.def(ln.context,Lt.data);case Zi:return wt.def("this",Lt.data);case Co:return Lt.data.append(Wr,wt),Lt.data.ref;case Do:return Lt.data.toString();case Fo:return Lt.data.map(function(Gr){return Wr.invoke(wt,Gr)})}},Wr.attribCache={};var _t={};return Wr.scopeAttrib=function(wt){var Lt=It.id(wt);if(Lt in _t)return _t[Lt];var pr=Cr.scope[Lt];pr||(pr=Cr.scope[Lt]=new ga);var Gr=_t[Lt]=na(pr);return Gr},Wr}function Wi(Wr){var na=Wr.static,pa=Wr.dynamic,Wa;if(Bl in na){var ln=!!na[Bl];Wa=An(function(Ue,Qe){return ln}),Wa.enable=ln}else if(Bl in pa){var Le=pa[Bl];Wa=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}return Wa}function ro(Wr,na){var pa=Wr.static,Wa=Wr.dynamic;if(Wu in pa){var ln=pa[Wu];return ln?(ln=vr.getFramebuffer(ln),An(function(Ue,Qe){var _t=Ue.link(ln),wt=Ue.shared;Qe.set(wt.framebuffer,".next",_t);var Lt=wt.context;return Qe.set(Lt,"."+xt,_t+".width"),Qe.set(Lt,"."+Bt,_t+".height"),_t})):An(function(Ue,Qe){var _t=Ue.shared;Qe.set(_t.framebuffer,".next","null");var wt=_t.context;return Qe.set(wt,"."+xt,wt+"."+Br),Qe.set(wt,"."+Bt,wt+"."+kr),"null"})}else if(Wu in Wa){var Le=Wa[Wu];return zn(Le,function(Ue,Qe){var _t=Ue.invoke(Qe,Le),wt=Ue.shared,Lt=wt.framebuffer,pr=Qe.def(Lt,".getFramebuffer(",_t,")");Qe.set(Lt,".next",pr);var Gr=wt.context;return Qe.set(Gr,"."+xt,pr+"?"+pr+".width:"+Gr+"."+Br),Qe.set(Gr,"."+Bt,pr+"?"+pr+".height:"+Gr+"."+kr),pr})}else return null}function Mo(Wr,na,pa){var Wa=Wr.static,ln=Wr.dynamic;function Le(_t){if(_t in Wa){var wt=Wa[_t],Lt=!0,pr=wt.x|0,Gr=wt.y|0,va,Qa;return"width"in wt?va=wt.width|0:Lt=!1,"height"in wt?Qa=wt.height|0:Lt=!1,new sa(!Lt&&na&&na.thisDep,!Lt&&na&&na.contextDep,!Lt&&na&&na.propDep,function(Mn,dn){var _n=Mn.shared.context,Sn=va;"width"in wt||(Sn=dn.def(_n,".",xt,"-",pr));var Bn=Qa;return"height"in wt||(Bn=dn.def(_n,".",Bt,"-",Gr)),[pr,Gr,Sn,Bn]})}else if(_t in ln){var Ga=ln[_t],Ua=zn(Ga,function(Mn,dn){var _n=Mn.invoke(dn,Ga),Sn=Mn.shared.context,Bn=dn.def(_n,".x|0"),Zn=dn.def(_n,".y|0"),Ci=dn.def('"width" in ',_n,"?",_n,".width|0:","(",Sn,".",xt,"-",Bn,")"),qo=dn.def('"height" in ',_n,"?",_n,".height|0:","(",Sn,".",Bt,"-",Zn,")");return[Bn,Zn,Ci,qo]});return na&&(Ua.thisDep=Ua.thisDep||na.thisDep,Ua.contextDep=Ua.contextDep||na.contextDep,Ua.propDep=Ua.propDep||na.propDep),Ua}else return na?new sa(na.thisDep,na.contextDep,na.propDep,function(Mn,dn){var _n=Mn.shared.context;return[0,0,dn.def(_n,".",xt),dn.def(_n,".",Bt)]}):null}var Ue=Le(Ks);if(Ue){var Qe=Ue;Ue=new sa(Ue.thisDep,Ue.contextDep,Ue.propDep,function(_t,wt){var Lt=Qe.append(_t,wt),pr=_t.shared.context;return wt.set(pr,"."+zt,Lt[2]),wt.set(pr,"."+Wt,Lt[3]),Lt})}return{viewport:Ue,scissor_box:Le(Pc)}}function zs(Wr,na){var pa=Wr.static,Wa=typeof pa[Qc]=="string"&&typeof pa[wf]=="string";if(Wa){if(Object.keys(na.dynamic).length>0)return null;var ln=na.static,Le=Object.keys(ln);if(Le.length>0&&typeof ln[Le[0]]=="number"){for(var Ue=[],Qe=0;Qe"+Bn+"?"+Lt+".constant["+Bn+"]:0;"}).join(""),"}}else{","if(",va,"(",Lt,".buffer)){",Mn,"=",Qa,".createStream(",Jr,",",Lt,".buffer);","}else{",Mn,"=",Qa,".getBuffer(",Lt,".buffer);","}",dn,'="type" in ',Lt,"?",Gr.glTypes,"[",Lt,".type]:",Mn,".dtype;",Ga.normalized,"=!!",Lt,".normalized;");function _n(Sn){wt(Ga[Sn],"=",Lt,".",Sn,"|0;")}return _n("size"),_n("offset"),_n("stride"),_n("divisor"),wt("}}"),wt.exit("if(",Ga.isStream,"){",Qa,".destroyStream(",Mn,");","}"),Ga}ln[Le]=zn(Ue,Qe)}),ln}function $o(Wr){var na=Wr.static,pa=Wr.dynamic,Wa={};return Object.keys(na).forEach(function(ln){var Le=na[ln];Wa[ln]=An(function(Ue,Qe){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Ue.link(Le)})}),Object.keys(pa).forEach(function(ln){var Le=pa[ln];Wa[ln]=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}),Wa}function _s(Wr,na,pa,Wa,ln){var Le=Wr.static,Ue=Wr.dynamic,Qe=zs(Wr,na),_t=ro(Wr,ln),wt=Mo(Wr,_t,ln),Lt=So(Wr,ln),pr=Ws(Wr,ln),Gr=Bs(Wr,ln,Qe);function va(_n){var Sn=wt[_n];Sn&&(pr[_n]=Sn)}va(Ks),va(Pn(Pc));var Qa=Object.keys(pr).length>0,Ga={framebuffer:_t,draw:Lt,shader:Gr,state:pr,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Wi(Wr,ln),Ga.uniforms=Zo(pa,ln),Ga.drawVAO=Ga.scopeVAO=Lt.vao,!Ga.drawVAO&&Gr.program&&!Qe&&Ut.angle_instanced_arrays&&Lt.static.elements){var Ua=!0,Mn=Gr.program.attributes.map(function(_n){var Sn=na.static[_n];return Ua=Ua&&!!Sn,Sn});if(Ua&&Mn.length>0){var dn=Cr.getVAO(Cr.createVAO({attributes:Mn,elements:Lt.static.elements}));Ga.drawVAO=new sa(null,null,null,function(_n,Sn){return _n.link(dn)}),Ga.useVAO=!0}}return Qe?Ga.useVAO=!0:Ga.attributes=es(na,ln),Ga.context=$o(Wa,ln),Ga}function Go(Wr,na,pa){var Wa=Wr.shared,ln=Wa.context,Le=Wr.scope();Object.keys(pa).forEach(function(Ue){na.save(ln,"."+Ue);var Qe=pa[Ue],_t=Qe.append(Wr,na);Array.isArray(_t)?Le(ln,".",Ue,"=[",_t.join(),"];"):Le(ln,".",Ue,"=",_t,";")}),na(Le)}function Ys(Wr,na,pa,Wa){var ln=Wr.shared,Le=ln.gl,Ue=ln.framebuffer,Qe;za&&(Qe=na.def(ln.extensions,".webgl_draw_buffers"));var _t=Wr.constants,wt=_t.drawBuffer,Lt=_t.backBuffer,pr;pa?pr=pa.append(Wr,na):pr=na.def(Ue,".next"),Wa||na("if(",pr,"!==",Ue,".cur){"),na("if(",pr,"){",Le,".bindFramebuffer(",Vr,",",pr,".framebuffer);"),za&&na(Qe,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),na("}else{",Le,".bindFramebuffer(",Vr,",null);"),za&&na(Qe,".drawBuffersWEBGL(",Lt,");"),na("}",Ue,".cur=",pr,";"),Wa||na("}")}function Ll(Wr,na,pa){var Wa=Wr.shared,ln=Wa.gl,Le=Wr.current,Ue=Wr.next,Qe=Wa.current,_t=Wa.next,wt=Wr.cond(Qe,".dirty");cn.forEach(function(Lt){var pr=Pn(Lt);if(!(pr in pa.state)){var Gr,va;if(pr in Ue){Gr=Ue[pr],va=Le[pr];var Qa=f(Dn[pr].length,function(Ua){return wt.def(Gr,"[",Ua,"]")});wt(Wr.cond(Qa.map(function(Ua,Mn){return Ua+"!=="+va+"["+Mn+"]"}).join("||")).then(ln,".",ei[pr],"(",Qa,");",Qa.map(function(Ua,Mn){return va+"["+Mn+"]="+Ua}).join(";"),";"))}else{Gr=wt.def(_t,".",pr);var Ga=Wr.cond(Gr,"!==",Qe,".",pr);wt(Ga),pr in sn?Ga(Wr.cond(Gr).then(ln,".enable(",sn[pr],");").else(ln,".disable(",sn[pr],");"),Qe,".",pr,"=",Gr,";"):Ga(ln,".",ei[pr],"(",Gr,");",Qe,".",pr,"=",Gr,";")}}}),Object.keys(pa.state).length===0&&wt(Qe,".dirty=false;"),na(wt)}function mo(Wr,na,pa,Wa){var ln=Wr.shared,Le=Wr.current,Ue=ln.current,Qe=ln.gl,_t;Ma(Object.keys(pa)).forEach(function(wt){var Lt=pa[wt];if(!(Wa&&!Wa(Lt))){var pr=Lt.append(Wr,na);if(sn[wt]){var Gr=sn[wt];hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Wr.cond(_t).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",_t,";")):(na(Wr.cond(pr).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",pr,";"))}else if(zr(pr)){var va=Le[wt];na(Qe,".",ei[wt],"(",pr,");",pr.map(function(Qa,Ga){return va+"["+Ga+"]="+Qa}).join(";"),";")}else hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Qe,".",ei[wt],"(",_t,");",Ue,".",wt,"=",_t,";")):na(Qe,".",ei[wt],"(",pr,");",Ue,".",wt,"=",pr,";")}})}function ru(Wr,na){Fa&&(Wr.instancing=na.def(Wr.shared.extensions,".angle_instanced_arrays"))}function Rs(Wr,na,pa,Wa,ln){var Le=Wr.shared,Ue=Wr.stats,Qe=Le.current,_t=Le.timer,wt=pa.profile;function Lt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Gr;function va(_n){pr=na.def(),_n(pr,"=",Lt(),";"),typeof ln=="string"?_n(Ue,".count+=",ln,";"):_n(Ue,".count++;"),Ra&&(Wa?(Gr=na.def(),_n(Gr,"=",_t,".getNumPendingQueries();")):_n(_t,".beginQuery(",Ue,");"))}function Qa(_n){_n(Ue,".cpuTime+=",Lt(),"-",pr,";"),Ra&&(Wa?_n(_t,".pushScopeStats(",Gr,",",_t,".getNumPendingQueries(),",Ue,");"):_n(_t,".endQuery();"))}function Ga(_n){var Sn=na.def(Qe,".profile");na(Qe,".profile=",_n,";"),na.exit(Qe,".profile=",Sn,";")}var Ua;if(wt){if(hn(wt)){wt.enable?(va(na),Qa(na.exit),Ga("true")):Ga("false");return}Ua=wt.append(Wr,na),Ga(Ua)}else Ua=na.def(Qe,".profile");var Mn=Wr.block();va(Mn),na("if(",Ua,"){",Mn,"}");var dn=Wr.block();Qa(dn),na.exit("if(",Ua,"){",dn,"}")}function Yu(Wr,na,pa,Wa,ln){var Le=Wr.shared;function Ue(_t){switch(_t){case Qo:case jl:case wi:return 2;case vo:case Hs:case sl:return 3;case ys:case Cu:case sc:return 4;default:return 1}}function Qe(_t,wt,Lt){var pr=Le.gl,Gr=na.def(_t,".location"),va=na.def(Le.attributes,"[",Gr,"]"),Qa=Lt.state,Ga=Lt.buffer,Ua=[Lt.x,Lt.y,Lt.z,Lt.w],Mn=["buffer","normalized","offset","stride"];function dn(){na("if(!",va,".buffer){",pr,".enableVertexAttribArray(",Gr,");}");var Sn=Lt.type,Bn;if(Lt.size?Bn=na.def(Lt.size,"||",wt):Bn=wt,na("if(",va,".type!==",Sn,"||",va,".size!==",Bn,"||",Mn.map(function(Ci){return va+"."+Ci+"!=="+Lt[Ci]}).join("||"),"){",pr,".bindBuffer(",Jr,",",Ga,".buffer);",pr,".vertexAttribPointer(",[Gr,Bn,Sn,Lt.normalized,Lt.stride,Lt.offset],");",va,".type=",Sn,";",va,".size=",Bn,";",Mn.map(function(Ci){return va+"."+Ci+"="+Lt[Ci]+";"}).join(""),"}"),Fa){var Zn=Lt.divisor;na("if(",va,".divisor!==",Zn,"){",Wr.instancing,".vertexAttribDivisorANGLE(",[Gr,Zn],");",va,".divisor=",Zn,";}")}}function _n(){na("if(",va,".buffer){",pr,".disableVertexAttribArray(",Gr,");",va,".buffer=null;","}if(",yi.map(function(Sn,Bn){return va+"."+Sn+"!=="+Ua[Bn]}).join("||"),"){",pr,".vertexAttrib4f(",Gr,",",Ua,");",yi.map(function(Sn,Bn){return va+"."+Sn+"="+Ua[Bn]+";"}).join(""),"}")}Qa===ki?dn():Qa===ri?_n():(na("if(",Qa,"===",ki,"){"),dn(),na("}else{"),_n(),na("}"))}Wa.forEach(function(_t){var wt=_t.name,Lt=pa.attributes[wt],pr;if(Lt){if(!ln(Lt))return;pr=Lt.append(Wr,na)}else{if(!ln($n))return;var Gr=Wr.scopeAttrib(wt);pr={},Object.keys(new ga).forEach(function(va){pr[va]=na.def(Gr,".",va)})}Qe(Wr.link(_t),Ue(_t.info.type),pr)})}function Ul(Wr,na,pa,Wa,ln,Le){for(var Ue=Wr.shared,Qe=Ue.gl,_t,wt=0;wt1){for(var As=[],ls=[],Vl=0;Vl>1)",Ga],");")}function Zn(){pa(Ua,".drawArraysInstancedANGLE(",[Gr,va,Qa,Ga],");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}function Sn(){function Bn(){pa(Le+".drawElements("+[Gr,Qa,Mn,va+"<<(("+Mn+"-"+_i+")>>1)"]+");")}function Zn(){pa(Le+".drawArrays("+[Gr,va,Qa]+");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}Fa&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(pa("if(",Ga,">0){"),_n(),pa("}else if(",Ga,"<0){"),Sn(),pa("}")):_n():Sn()}function fo(Wr,na,pa,Wa,ln){var Le=bi(),Ue=Le.proc("body",ln);return Fa&&(Le.instancing=Ue.def(Le.shared.extensions,".angle_instanced_arrays")),Wr(Le,Ue,pa,Wa),Le.compile().body}function Xo(Wr,na,pa,Wa){ru(Wr,na),pa.useVAO?pa.drawVAO?na(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,na),");"):na(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(na(Wr.shared.vao,".setVAO(null);"),Yu(Wr,na,pa,Wa.attributes,function(){return!0})),Ul(Wr,na,pa,Wa.uniforms,function(){return!0},!1),ql(Wr,na,na,pa)}function Os(Wr,na){var pa=Wr.proc("draw",1);ru(Wr,pa),Go(Wr,pa,na.context),Ys(Wr,pa,na.framebuffer),Ll(Wr,pa,na),mo(Wr,pa,na.state),Rs(Wr,pa,na,!1,!0);var Wa=na.shader.progVar.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",Wa,".program);"),na.shader.program)Xo(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var ln=Wr.global.def("{}"),Le=pa.def(Wa,".id"),Ue=pa.def(ln,"[",Le,"]");pa(Wr.cond(Ue).then(Ue,".call(this,a0);").else(Ue,"=",ln,"[",Le,"]=",Wr.link(function(Qe){return fo(Xo,Wr,na,Qe,1)}),"(",Wa,");",Ue,".call(this,a0);"))}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function ra(Wr,na,pa,Wa){Wr.batchId="a1",ru(Wr,na);function ln(){return!0}Yu(Wr,na,pa,Wa.attributes,ln),Ul(Wr,na,pa,Wa.uniforms,ln,!1),ql(Wr,na,na,pa)}function Ya(Wr,na,pa,Wa){ru(Wr,na);var ln=pa.contextDep,Le=na.def(),Ue="a0",Qe="a1",_t=na.def();Wr.shared.props=_t,Wr.batchId=Le;var wt=Wr.scope(),Lt=Wr.scope();na(wt.entry,"for(",Le,"=0;",Le,"<",Qe,";++",Le,"){",_t,"=",Ue,"[",Le,"];",Lt,"}",wt.exit);function pr(Mn){return Mn.contextDep&&ln||Mn.propDep}function Gr(Mn){return!pr(Mn)}if(pa.needsContext&&Go(Wr,Lt,pa.context),pa.needsFramebuffer&&Ys(Wr,Lt,pa.framebuffer),mo(Wr,Lt,pa.state,pr),pa.profile&&pr(pa.profile)&&Rs(Wr,Lt,pa,!1,!0),Wa)pa.useVAO?pa.drawVAO?pr(pa.drawVAO)?Lt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,Lt),");"):wt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,wt),");"):wt(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(wt(Wr.shared.vao,".setVAO(null);"),Yu(Wr,wt,pa,Wa.attributes,Gr),Yu(Wr,Lt,pa,Wa.attributes,pr)),Ul(Wr,wt,pa,Wa.uniforms,Gr,!1),Ul(Wr,Lt,pa,Wa.uniforms,pr,!0),ql(Wr,wt,Lt,pa);else{var va=Wr.global.def("{}"),Qa=pa.shader.progVar.append(Wr,Lt),Ga=Lt.def(Qa,".id"),Ua=Lt.def(va,"[",Ga,"]");Lt(Wr.shared.gl,".useProgram(",Qa,".program);","if(!",Ua,"){",Ua,"=",va,"[",Ga,"]=",Wr.link(function(Mn){return fo(ra,Wr,pa,Mn,2)}),"(",Qa,");}",Ua,".call(this,a0[",Le,"],",Le,");")}}function Ka(Wr,na){var pa=Wr.proc("batch",2);Wr.batchId="0",ru(Wr,pa);var Wa=!1,ln=!0;Object.keys(na.context).forEach(function(va){Wa=Wa||na.context[va].propDep}),Wa||(Go(Wr,pa,na.context),ln=!1);var Le=na.framebuffer,Ue=!1;Le?(Le.propDep?Wa=Ue=!0:Le.contextDep&&Wa&&(Ue=!0),Ue||Ys(Wr,pa,Le)):Ys(Wr,pa,null),na.state.viewport&&na.state.viewport.propDep&&(Wa=!0);function Qe(va){return va.contextDep&&Wa||va.propDep}Ll(Wr,pa,na),mo(Wr,pa,na.state,function(va){return!Qe(va)}),(!na.profile||!Qe(na.profile))&&Rs(Wr,pa,na,!1,"a1"),na.contextDep=Wa,na.needsContext=ln,na.needsFramebuffer=Ue;var _t=na.shader.progVar;if(_t.contextDep&&Wa||_t.propDep)Ya(Wr,pa,na,null);else{var wt=_t.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",wt,".program);"),na.shader.program)Ya(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var Lt=Wr.global.def("{}"),pr=pa.def(wt,".id"),Gr=pa.def(Lt,"[",pr,"]");pa(Wr.cond(Gr).then(Gr,".call(this,a0,a1);").else(Gr,"=",Lt,"[",pr,"]=",Wr.link(function(va){return fo(Ya,Wr,na,va,2)}),"(",wt,");",Gr,".call(this,a0,a1);"))}}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function Bi(Wr,na){var pa=Wr.proc("scope",3);Wr.batchId="a2";var Wa=Wr.shared,ln=Wa.current;if(Go(Wr,pa,na.context),na.framebuffer&&na.framebuffer.append(Wr,pa),Ma(Object.keys(na.state)).forEach(function(Qe){var _t=na.state[Qe],wt=_t.append(Wr,pa);zr(wt)?wt.forEach(function(Lt,pr){Jn(Lt)?pa.set(Wr.next[Qe],"["+pr+"]",Lt):pa.set(Wr.next[Qe],"["+pr+"]",Wr.link(Lt,{stable:!0}))}):hn(_t)?pa.set(Wa.next,"."+Qe,Wr.link(wt,{stable:!0})):pa.set(Wa.next,"."+Qe,wt)}),Rs(Wr,pa,na,!0,!0),[ku,fi,Nl,eu,Ol].forEach(function(Qe){var _t=na.draw[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.draw,"."+Qe,wt):pa.set(Wa.draw,"."+Qe,Wr.link(wt),{stable:!0})}}),Object.keys(na.uniforms).forEach(function(Qe){var _t=na.uniforms[Qe].append(Wr,pa);Array.isArray(_t)&&(_t="["+_t.map(function(wt){return Jn(wt)?wt:Wr.link(wt,{stable:!0})})+"]"),pa.set(Wa.uniforms,"["+Wr.link(It.id(Qe),{stable:!0})+"]",_t)}),Object.keys(na.attributes).forEach(function(Qe){var _t=na.attributes[Qe].append(Wr,pa),wt=Wr.scopeAttrib(Qe);Object.keys(new ga).forEach(function(Lt){pa.set(wt,"."+Lt,_t[Lt])})}),na.scopeVAO){var Le=na.scopeVAO.append(Wr,pa);Jn(Le)?pa.set(Wa.vao,".targetVAO",Le):pa.set(Wa.vao,".targetVAO",Wr.link(Le,{stable:!0}))}function Ue(Qe){var _t=na.shader[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.shader,"."+Qe,wt):pa.set(Wa.shader,"."+Qe,Wr.link(wt,{stable:!0}))}}Ue(wf),Ue(Qc),Object.keys(na.state).length>0&&(pa(ln,".dirty=true;"),pa.exit(ln,".dirty=true;")),pa("a1(",Wr.shared.context,",a0,",Wr.batchId,");")}function rs(Wr){if(!(typeof Wr!="object"||zr(Wr))){for(var na=Object.keys(Wr),pa=0;pa=0;--fo){var Xo=Ei[fo];Xo&&Xo(ua,null,0)}Ut.flush(),ta&&ta.update()}function Mo(){!Wi&&Ei.length>0&&(Wi=m.next(ro))}function zs(){Wi&&(m.cancel(ro),Wi=null)}function Bs(fo){fo.preventDefault(),dr=!0,zs(),so.forEach(function(Xo){Xo()})}function So(fo){Ut.getError(),dr=!1,Ar.restore(),ui.restore(),Fa.restore(),cn.restore(),sn.restore(),ei.restore(),Cn.restore(),ta&&ta.restore(),Pn.procs.refresh(),Mo(),ti.forEach(function(Xo){Xo()})}Jn&&(Jn.addEventListener(je,Bs,!1),Jn.addEventListener(Ze,So,!1));function Ws(){Ei.length=0,zs(),Jn&&(Jn.removeEventListener(je,Bs),Jn.removeEventListener(Ze,So)),ui.clear(),ei.clear(),sn.clear(),Cn.clear(),cn.clear(),za.clear(),Fa.clear(),ta&&ta.clear(),bi.forEach(function(fo){fo()})}function Zo(fo){function Xo(Le){var Ue=p({},Le);delete Ue.uniforms,delete Ue.attributes,delete Ue.context,delete Ue.vao,"stencil"in Ue&&Ue.stencil.op&&(Ue.stencil.opBack=Ue.stencil.opFront=Ue.stencil.op,delete Ue.stencil.op);function Qe(_t){if(_t in Ue){var wt=Ue[_t];delete Ue[_t],Object.keys(wt).forEach(function(Lt){Ue[_t+"."+Lt]=wt[Lt]})}}return Qe("blend"),Qe("depth"),Qe("cull"),Qe("stencil"),Qe("polygonOffset"),Qe("scissor"),Qe("sample"),"vao"in Le&&(Ue.vao=Le.vao),Ue}function Os(Le,Ue){var Qe={},_t={};return Object.keys(Le).forEach(function(wt){var Lt=Le[wt];if(c.isDynamic(Lt)){_t[wt]=c.unbox(Lt,wt);return}else if(Ue&&Array.isArray(Lt)){for(var pr=0;pr0)return Wr.call(this,Wa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return Wr.call(this,Le,Le.length)}else return Oi.call(this,Le)}return p(ln,{stats:rs,destroy:function(){Is.destroy()}})}var es=ei.setFBO=Zo({framebuffer:c.define.call(null,ut,"framebuffer")});function $o(fo,Xo){var Os=0;Pn.procs.poll();var ra=Xo.color;ra&&(Ut.clearColor(+ra[0]||0,+ra[1]||0,+ra[2]||0,+ra[3]||0),Os|=ie),"depth"in Xo&&(Ut.clearDepth(+Xo.depth),Os|=fe),"stencil"in Xo&&(Ut.clearStencil(Xo.stencil|0),Os|=be),Ut.clear(Os)}function _s(fo){if("framebuffer"in fo)if(fo.framebuffer&&fo.framebuffer_reglType==="framebufferCube")for(var Xo=0;Xo<6;++Xo)es(p({framebuffer:fo.framebuffer.faces[Xo]},fo),$o);else es(fo,$o);else $o(null,fo)}function Go(fo){Ei.push(fo);function Xo(){var Os=Gt(Ei,fo);function ra(){var Ya=Gt(Ei,ra);Ei[Ya]=Ei[Ei.length-1],Ei.length-=1,Ei.length<=0&&zs()}Ei[Os]=ra}return Mo(),{cancel:Xo}}function Ys(){var fo=In.viewport,Xo=In.scissor_box;fo[0]=fo[1]=Xo[0]=Xo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=fo[2]=Xo[2]=Ut.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=fo[3]=Xo[3]=Ut.drawingBufferHeight}function Ll(){ua.tick+=1,ua.time=ru(),Ys(),Pn.procs.poll()}function mo(){cn.refresh(),Ys(),Pn.procs.refresh(),ta&&ta.update()}function ru(){return(h()-ka)/1e3}mo();function Rs(fo,Xo){var Os;switch(fo){case"frame":return Go(Xo);case"lost":Os=so;break;case"restore":Os=ti;break;case"destroy":Os=bi;break;default:}return Os.push(Xo),{cancel:function(){for(var ra=0;ra=0},read:Rn,destroy:Ws,_gl:Ut,_refresh:mo,poll:function(){Ll(),ta&&ta.update()},now:ru,stats:vr,getCachedCode:Yu,preloadCachedCode:Ul});return It.onDone(null,ql),ql}return Kt})}}),lq=ze({"node_modules/gl-util/context.js"(J,V){"use strict";var p=qd();V.exports=function(n){if(n?typeof n=="string"&&(n={container:n}):n={},E(n)?n={container:n}:k(n)?n={container:n}:l(n)?n={gl:n}:n=p(n,{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),n.pixelRatio||(n.pixelRatio=window.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var r=document.querySelector(n.container);if(!r)throw Error("Element "+n.container+" is not found");n.container=r}E(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),b(n))}else if(!n.canvas)if(typeof document<"u")n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),b(n);else throw Error("Not DOM environment. Use headless-gl.");return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{n.gl=n.canvas.getContext(a,n.attrs)}catch{}return n.gl}),n.gl};function b(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var n=t.container.getBoundingClientRect();t.canvas.width=t.width||n.right-n.left,t.canvas.height=t.height||n.bottom-n.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),uq=ze({"node_modules/font-atlas/index.js"(J,V){"use strict";var p=dM(),b=[32,126];V.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,n=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||b;if(t&&typeof t!="string"&&(t=p(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var a=[],o=r[0],s=0;o<=r[1];o++)a[s++]=String.fromCharCode(o);r=a}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var m=n[0]/2,h=n[1]/2,o=0;ol[0]-n[0]/2&&(m=n[0]/2,h+=n[1]);return e}}}),vM=ze({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var V=32;J.INT_BITS=V,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>V-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function p(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=p,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var b=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|b[E>>>16&255]<<8|b[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>p(E)+1}}}),cq=ze({"node_modules/dup/dup.js"(J,V){"use strict";function p(k,l,e){var t=k[e]|0;if(t<=0)return[];var n=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return b(k|0,l);break;case"object":if(typeof k.length=="number")return p(k,l,0);break}return[]}V.exports=E}}),fq=ze({"node_modules/typedarray-pool/pool.js"(J){"use strict";var V=vM(),p=cq(),b=$v().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:p([32,0]),UINT16:p([32,0]),UINT32:p([32,0]),BIGUINT64:p([32,0]),INT8:p([32,0]),INT16:p([32,0]),INT32:p([32,0]),BIGINT64:p([32,0]),FLOAT:p([32,0]),DOUBLE:p([32,0]),DATA:p([32,0]),UINT8C:p([32,0]),BUFFER:p([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=p([32,0])),e.BIGUINT64||(e.BIGUINT64=p([32,0])),e.BIGINT64||(e.BIGINT64=p([32,0])),e.BUFFER||(e.BUFFER=p([32,0]));var t=e.DATA,n=e.BUFFER;J.free=function(u){if(b.isBuffer(u))n[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,x=V.log2(A)|0;t[x].push(u)}};function r(f){if(f){var u=f.length||f.byteLength,A=V.log2(u);t[A].push(f)}}function a(f){r(f.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=a,J.freeArrayBuffer=r,J.freeBuffer=function(u){n[V.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return m(u);case"int8":return h(u);case"int16":return v(u);case"int32":return g(u);case"float":case"float32":return i(u);case"double":case"float64":return w(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return T(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=V.nextPow2(u),A=V.log2(u),x=t[A];return x.length>0?x.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(f){return new Uint8Array(o(f),0,f)}J.mallocUint8=s;function c(f){return new Uint16Array(o(2*f),0,f)}J.mallocUint16=c;function m(f){return new Uint32Array(o(4*f),0,f)}J.mallocUint32=m;function h(f){return new Int8Array(o(f),0,f)}J.mallocInt8=h;function v(f){return new Int16Array(o(2*f),0,f)}J.mallocInt16=v;function g(f){return new Int32Array(o(4*f),0,f)}J.mallocInt32=g;function i(f){return new Float32Array(o(4*f),0,f)}J.mallocFloat32=J.mallocFloat=i;function w(f){return new Float64Array(o(8*f),0,f)}J.mallocFloat64=J.mallocDouble=w;function S(f){return E?new Uint8ClampedArray(o(f),0,f):s(f)}J.mallocUint8Clamped=S;function M(f){return k?new BigUint64Array(o(8*f),0,f):null}J.mallocBigUint64=M;function C(f){return l?new BigInt64Array(o(8*f),0,f):null}J.mallocBigInt64=C;function _(f){return new DataView(o(f),0,f)}J.mallocDataView=_;function T(f){f=V.nextPow2(f);var u=V.log2(f),A=n[u];return A.length>0?A.pop():new b(f)}J.mallocBuffer=T,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,n[u].length=0}}}),hq=ze({"node_modules/is-plain-obj/index.js"(J,V){"use strict";var p=Object.prototype.toString;V.exports=function(b){var E;return p.call(b)==="[object Object]"&&(E=Object.getPrototypeOf(b),E===null||E===Object.getPrototypeOf({}))}}}),mM=ze({"node_modules/parse-unit/index.js"(J,V){V.exports=function(b,E){E||(E=[0,""]),b=String(b);var k=parseFloat(b,10);return E[0]=k,E[1]=b.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),dq=ze({"node_modules/gl-text/node_modules/to-px/topx.js"(J,V){"use strict";var p=mM();V.exports=l;var b=96;function E(e,t){var n=p(getComputedStyle(e).getPropertyValue(t));return n[0]*l(n[1],e)}function k(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=E(n,"font-size")/128;return t.removeChild(n),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(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 b;case"cm":return b/2.54;case"mm":return b/25.4;case"pt":return b/72;case"pc":return b/6}return 1}}}),pq=ze({"node_modules/detect-kerning/index.js"(J,V){"use strict";V.exports=k;var p=k.canvas=document.createElement("canvas"),b=p.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var n={},r,a=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),b.font=a+"px "+e;for(var s=0;sa*o){var v=(h-m)/a;n[c]=v*1e3}}return n}function l(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),a=e[0];a0;n-=4)if(t[n]!==0)return Math.floor((n-3)*.25/e)}}}),mq=ze({"node_modules/gl-text/dist.js"(J,V){"use strict";var p=sq(),b=qd(),E=pM(),k=lq(),l=iM(),e=ay(),t=uq(),n=fq(),r=yg(),a=hq(),o=mM(),s=dq(),c=pq(),m=Vc(),h=vq(),v=f0(),g=vM(),i=g.nextPow2,w=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(f){_(f)?(f={regl:f},this.gl=f.regl._gl):this.gl=k(f),this.shader=w.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=f.regl||E({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(),w.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(a(f)?f:{})};C.prototype.createShader=function(){var f=this.regl,u=f({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:f.prop("count"),offset:f.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:f.this("sizeBuffer")},width:{offset:0,stride:8,buffer:f.this("sizeBuffer")},char:f.this("charBuffer"),position:f.this("position")},uniforms:{atlasSize:function(x,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(x,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(x,z){return z.atlas.texture},charStep:function(x,z){return z.atlas.step},em:function(x,z){return z.atlas.em},color:f.prop("color"),opacity:f.prop("opacity"),viewport:f.this("viewportArray"),scale:f.this("scale"),align:f.prop("align"),baseline:f.prop("baseline"),translate:f.this("translate"),positionOffset:f.prop("positionOffset")},primitive:"points",viewport:f.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2707,8 +2707,8 @@ void main() { {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"}}}),Zq=ze({"src/plots/map/styles/arcgis-sat.js"(J,V){"use strict";V.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 ©
ESRI"},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"}}]}}}),Av=ze({"src/plots/map/constants.js"(J,V){"use strict";var p=(Nv(),Po(nv)).default,b=Xq(),E=Zq(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":b,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,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":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":n,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":a},s=p(o);V.exports={styleValueDflt:"basic",stylesMap:o,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.",fitBoundsPadding:20}}}),ly=ze({"src/plots/map/layout_attributes.js"(J,V){"use strict";var p=Nr(),b=Qn().defaultLine,E=Ml().attributes,k=Qs(),l=su().textposition,e=Al().overrideAll,t=hs().templatedArray,n=Av(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=V.exports=e({_arrayAttrRegexps:[p.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:n.styleValuesMap,dflt:n.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},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("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:b},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:b}},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:r,textposition:p.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}}),q2=ze({"src/traces/scattermap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=gg(),e=su(),t=ly(),n=ws(),r=qs(),a=Ki().extendFlat,o=Al().overrideAll,s=ly(),c=l.line,m=l.marker;V.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},s.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({},m.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:b({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:c.color,width:c.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:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},r("marker")),fill:l.fill,fillcolor:k(),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({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:p(),hovertemplatefallback:E()},"calc","nested")}}),SM=ze({"src/traces/scattermap/constants.js"(J,V){"use strict";var p=["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"];V.exports={isSupportedFont:function(b){return p.indexOf(b)!==-1}}}}),$q=ze({"src/traces/scattermap/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=id(),k=_d(),l=xd(),e=Od(),t=q2(),n=SM().isSupportedFont;V.exports=function(o,s,c,m){function h(A,x){return p.coerce(o,s,t,A,x)}function v(A,x){return p.coerce2(o,s,t,A,x)}var g=r(o,s,h);if(!g){s.visible=!1;return}if(h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),h("below"),b.hasMarkers(s)){E(o,s,c,m,h,{noLine:!0,noAngle:!0}),h("marker.allowoverlap"),h("marker.angle");var i=s.marker;i.symbol!=="circle"&&(p.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),p.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}b.hasLines(s)&&(k(o,s,c,m,h,{noDash:!0}),h("connectgaps"));var w=v("cluster.maxzoom"),S=v("cluster.step"),M=v("cluster.color",s.marker&&s.marker.color||c),C=v("cluster.size"),_=v("cluster.opacity"),T=w!==!1||S!==!1||M!==!1||C!==!1||_!==!1,f=h("cluster.enabled",T);if(f||b.hasText(s)){var u=m.font.family;l(o,s,m,h,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:n(u)?u:"Open Sans Regular",weight:m.font.weight,style:m.font.style,size:m.font.size,color:m.font.color}})}h("fill"),s.fill!=="none"&&e(o,s,c,h),p.coerceSelectionMarkerOpacity(s,h)};function r(a,o,s){var c=s("lon")||[],m=s("lat")||[],h=Math.min(c.length,m.length);return o._length=h,h}}}),EM=ze({"src/traces/scattermap/format_labels.js"(J,V){"use strict";var p=Gi();V.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,n=t.mockAxis,r=E.lonlat;return e.lonLabel=p.tickText(n,n.c2l(r[0]),!0).text,e.latLabel=p.tickText(n,n.c2l(r[1]),!0).text,e}}}),kM=ze({"src/plots/map/convert_text_opts.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],n=p.isArrayOrTypedArray(k)?p.mean(k):k,r=.5+n/100,a=1.5+n/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-a;break;case"bottom":o[0]="bottom",s[1]=a;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),Kq=ze({"src/traces/scattermap/convert.js"(J,V){"use strict";var p=ao(),b=Nr(),E=No().BADNUM,k=Q1(),l=fl(),e=$i(),t=l1(),n=el(),r=SM().isSupportedFont,a=kM(),o=kh().appendArrayPointValue,s=Cs().NEWLINES,c=Cs().BR_TAG_ALL;V.exports=function(_,T){var f=T[0].trace,u=f.visible===!0&&f._length!==0,A=f.fill!=="none",x=n.hasLines(f),z=n.hasMarkers(f),I=n.hasText(f),O=z&&f.marker.symbol==="circle",D=z&&f.marker.symbol!=="circle",B=f.cluster&&f.cluster.enabled,F=m("fill"),P=m("line"),j=m("circle"),U=m("symbol"),$={fill:F,line:P,circle:j,symbol:U};if(!u)return $;var Q;if((A||x)&&(Q=k.calcTraceToLineCoords(T)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",b.extendFlat(F.paint,{"fill-color":f.fillcolor})),x&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",b.extendFlat(P.paint,{"line-width":f.line.width,"line-color":f.line.color,"line-opacity":f.opacity})),O){var re=h(T);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],$.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(f.cluster.color,f.cluster.step),"circle-radius":S(f.cluster.size,f.cluster.step),"circle-opacity":S(f.cluster.opacity,f.cluster.step)}},$.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(f),"text-size":12}}),b.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(O&&B&&(j.filter=["!",["has","point_count"]]),(D||I)&&(U.geojson=v(T,_),b.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),D&&(b.extendFlat(U.layout,{"icon-size":f.marker.size/10}),"angle"in f.marker&&f.marker.angle!=="auto"&&b.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=f.marker.allowoverlap,b.extendFlat(U.paint,{"icon-opacity":f.opacity*f.marker.opacity,"icon-color":f.marker.color,"icon-halo-color":f.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ne=(f.marker||{}).size,se=a(f.textposition,ne);b.extendFlat(U.layout,{"text-size":f.textfont.size,"text-anchor":se.anchor,"text-offset":se.offset,"text-font":M(f)}),b.extendFlat(U.paint,{"text-color":f.textfont.color,"text-opacity":f.opacity})}return $};function m(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function h(C){var _=C[0].trace,T=_.marker,f=_.selectedpoints,u=b.isArrayOrTypedArray(T.color),A=b.isArrayOrTypedArray(T.size),x=b.isArrayOrTypedArray(T.opacity),z;function I(ne){return _.opacity*ne}function O(ne){return ne/2}var D;u&&(l.hasColorscale(_,"marker")?D=l.makeColorScaleFuncFromTrace(T):D=b.identity);var B;A&&(B=t(_));var F;x&&(F=function(ne){var se=p(ne)?+b.constrain(ne,0,1):0;return I(se)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),x&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=T);var I=z.split(", ");return I}}}),Jq=ze({"src/traces/scattermap/plot.js"(J,V){"use strict";var p=Nr(),b=Kq(),E=Av().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,n,r,a){this.type="scattermap",this.subplot=t,this.uid=n,this.clusterEnabled=r,this.isHidden=a,this.sourceIds={fill:"source-"+n+"-fill",line:"source-"+n+"-line",circle:"source-"+n+"-circle",symbol:"source-"+n+"-symbol",cluster:"source-"+n+"-circle",clusterCount:"source-"+n+"-circle"},this.layerIds={fill:E+n+"-fill",line:E+n+"-line",circle:E+n+"-circle",symbol:E+n+"-symbol",cluster:E+n+"-cluster",clusterCount:E+n+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,n,r){var a={type:"geojson",data:n.geojson};r&&r.enabled&&p.extendFlat(a,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(n.geojson):this.subplot.map.addSource(this.sourceIds[t],a)},e.setSourceData=function(t,n){this.subplot.map.getSource(this.sourceIds[t]).setData(n.geojson)},e.addLayer=function(t,n,r){var a={type:n.type,id:this.layerIds[t],source:this.sourceIds[t],layout:n.layout,paint:n.paint};n.filter&&(a.filter=n.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),m=0;m=0;x--){var z=A[x];o.removeLayer(v.layerIds[z])}u||o.removeSource(v.sourceIds.circle)}function w(u){for(var A=k.nonCluster,x=0;x=0;x--){var z=A[x];o.removeLayer(v.layerIds[z]),u||o.removeSource(v.sourceIds[z])}}function M(u){h?i(u):S(u)}function C(u){m?g(u):w(u)}function _(){for(var u=m?k.cluster:k.nonCluster,A=0;A=0;a--){var o=r[a];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},V.exports=function(n,r){var a=r[0].trace,o=a.cluster&&a.cluster.enabled,s=a.visible!==!0,c=new l(n,a.uid,o,s),m=b(n.gd,r),h=c.below=n.belowLookup["trace-"+a.uid],v,g,i;if(o)for(c.addSource("circle",m.circle,a.cluster),v=0;v=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),C=M*360,_=a-C;function T(B){var F=B.lonlat;if(F[0]===l||w&&g.indexOf(B.i+1)===-1)return 1/0;var P=b.modHalf(F[0],360),j=F[1],U=v.project([P,j]),$=U.x-m.c2p([_,j]),Q=U.y-h.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt($*$+Q*Q)-re,1-3/re)}if(p.getClosest(s,T,r),r.index!==!1){var f=s[r.index],u=f.lonlat,A=[b.modHalf(u[0],360)+C,u[1]],x=m.c2p(A),z=h.c2p(A),I=f.mrc||1;r.x0=x-I,r.x1=x+I,r.y0=z-I,r.y1=z+I;var O={};O[c.subplot]={_subplot:v};var D=c._module.formatLabels(f,c,O);return r.lonLabel=D.lonLabel,r.latLabel=D.latLabel,r.color=E(c,f),r.extraText=n(c,f,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function n(r,a,o){if(r.hovertemplate)return;var s=a.hi||r.hoverinfo,c=s.split("+"),m=c.indexOf("all")!==-1,h=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,g=a.lonlat,i=[];function w(S){return S+"\xB0"}return m||h&&v?i.push("("+w(g[1])+", "+w(g[0])+")"):h?i.push(o.lon+w(g[0])):v&&i.push(o.lat+w(g[1])),(m||c.indexOf("text")!==-1)&&k(a,r,i),i.join("
")}V.exports={hoverPoints:t,getExtraText:n}}}),Qq=ze({"src/traces/scattermap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b}}}),eV=ze({"src/traces/scattermap/select.js"(J,V){"use strict";var p=Nr(),b=el(),{BADNUM:E}=No();V.exports=function(l,e){var t;let{cd:n,xaxis:r,yaxis:a}=l,{trace:o}=n[0];if(!b.hasMarkers(o))return[];if(e===!1){for(let h of n)h.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,m=[];for(let h=0;h1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=n(o);let c,m;function h(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function v(){if(m==null&&(m=!1,h())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let W=0;W<5*5;W++){let te=4*W;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(W%5,Math.floor(W/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&L[W]!==W){m=!0;break}}}return m||!1}var g=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function w(){var R=new i(9);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function S(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function M(){var R=new i(3);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function C(R){var d=R[0],L=R[1],W=R[2];return Math.sqrt(d*d+L*L+W*W)}function _(R,d,L){var W=new i(3);return W[0]=R,W[1]=d,W[2]=L,W}function T(R,d,L){return R[0]=d[0]+L[0],R[1]=d[1]+L[1],R[2]=d[2]+L[2],R}function f(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R}function u(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[0],ge=L[1],Ce=L[2];return R[0]=te*Ce-ue*ge,R[1]=ue*me-W*Ce,R[2]=W*ge-te*me,R}var A,x=C;function z(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3];return R[0]=L[0]*W+L[4]*te+L[8]*ue+L[12]*me,R[1]=L[1]*W+L[5]*te+L[9]*ue+L[13]*me,R[2]=L[2]*W+L[6]*te+L[10]*ue+L[14]*me,R[3]=L[3]*W+L[7]*te+L[11]*ue+L[15]*me,R}function I(){var R=new i(4);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R[3]=1,R}function O(R,d,L,W){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",ue=Math.PI/360;d*=ue,W*=ue,L*=ue;var me=Math.sin(d),ge=Math.cos(d),Ce=Math.sin(L),Te=Math.cos(L),Oe=Math.sin(W),Pe=Math.cos(W);switch(te){case"xyz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"xzy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yxz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yzx":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zxy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zyx":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;default:throw new Error("Unknown angle order "+te)}return R}function D(){var R=new i(2);return i!=Float32Array&&(R[0]=0,R[1]=0),R}function B(R,d){var L=new i(2);return L[0]=R,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),w(),D();let F=8192;function P(R,d,L){return d*(F/(R.tileSize*Math.pow(2,L-R.tileID.overscaledZ)))}function j(R){return R instanceof Error?R:new Error(typeof R=="string"?R:String(R))}function U(R,d){return(R%d+d)%d}function $(R,d,L){return R*(1-L)+d*L}function Q(R){if(R<=0)return 0;if(R>=1)return 1;let d=R*R,L=d*R;return 4*(R<.5?L:3*(R-d)+L-.75)}function re(R,d,L,W){let te=new s(R,d,L,W);return ue=>te.solve(ue)}let ne=re(.25,.1,.25,1);function se(R,d,L){return Math.min(L,Math.max(d,R))}function G(R,d,L){let W=L-d,te=((R-d)%W+W)%W+d;return te===d?L:te}function X(R,...d){for(let L of d)for(let W in L)R[W]=L[W];return R}let K=1;function H(R,d,L){let W={};for(let te in R)W[te]=d.call(this,R[te],te,R);return W}function Y(R,d,L){let W={};for(let te in R)d.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?H(R,q):R}let Z={};function ee(R){Z[R]||(typeof console<"u"&&console.warn(R),Z[R]=!0)}function ae(R,d,L){return(L.y-R.y)*(d.x-R.x)>(d.y-R.y)*(L.x-R.x)}function he(R){return typeof WorkerGlobalScope<"u"&&R!==void 0&&R instanceof WorkerGlobalScope}let xe=null;function we(R){return typeof ImageBitmap<"u"&&R instanceof ImageBitmap}let Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Se(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ue=new VideoFrame(R,{timestamp:0});try{let me=ue?.format;if(!me||!me.startsWith("BGR")&&!me.startsWith("RGB"))throw new Error(`Unrecognized format ${me}`);let ge=me.startsWith("BGR"),Ce=new Uint8ClampedArray(W*te*4);if(yield ue.copyTo(Ce,function(Te,Oe,Pe,it,He){let bt=4*Math.max(-Oe,0),Et=(Math.max(0,Pe)-Pe)*it*4+bt,Qt=4*it,er=Math.max(0,Oe),br=Math.max(0,Pe);return{rect:{x:er,y:br,width:Math.min(Te.width,Oe+it)-er,height:Math.min(Te.height,Pe+He)-br},layout:[{offset:Et,stride:Qt}]}}(R,d,L,W,te)),ge)for(let Te=0;Te{R.removeEventListener(d,L,W)}}}function ke(R){return R*Math.PI/180}function _e(R){return R/Math.PI*180}let ce={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},le="AbortError";class Ae extends Error{constructor(d=le){super(d instanceof Error?d.message:d),this.name=le,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Be(R){return R instanceof Error&&R.name===le}function Xe(R){if(R.aborted)throw new Ae(R.reason)}let Ye={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function yt(R){return Ye.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf("://"))]}let gt="global-dispatcher";class Tt extends Error{constructor(d,L,W,te){super(`AJAXError: ${L} (${d}): ${W}`),this.status=d,this.statusText=L,this.url=W,this.body=te}}let At=()=>{var R;return he(self)?(R=self.worker)===null||R===void 0?void 0:R.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},$t=function(R,d){return e(this,void 0,void 0,function*(){var L,W;if(R.url.includes("://")&&!/^https?:|^file:/.test(R.url)){let te=yt(R.url);if(te){let ue=yield te(R,d);return ue.data||R.type!=="arrayBuffer"?ue:X(ue,{data:new ArrayBuffer(0)})}if(he(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:gt},d)}if(!(te=>{var ue;return te.startsWith("file:")||((ue=At())===null||ue===void 0?void 0:ue.startsWith("file:"))&&!/^\w+:/.test(te)})(R.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,ue){return e(this,void 0,void 0,function*(){let me=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:ue.signal}),ge,Ce;te.type!=="json"||me.headers.has("Accept")||me.headers.set("Accept","application/json");try{ge=yield fetch(me)}catch(Oe){throw Be(Oe)?Oe:new Tt(0,j(Oe).message,te.url,new Blob)}if(!ge.ok){let Oe=yield ge.blob();throw new Tt(ge.status,ge.statusText,te.url,Oe)}Ce=te.type==="arrayBuffer"||te.type==="image"?ge.arrayBuffer():te.type==="json"?ge.json():ge.text();let Te=yield Ce;return Xe(ue.signal),{data:Te,cacheControl:ge.headers.get("Cache-Control"),expires:ge.headers.get("Expires"),etag:ge.headers.get("ETag")}})}(R,d);if(he(self)&&(!((W=self.worker)===null||W===void 0)&&W.actor))return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:gt},d)}return function(te,ue){return new Promise((me,ge)=>{var Ce;let Te=new XMLHttpRequest;Te.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(Te.responseType="arraybuffer");for(let Oe in te.headers)Te.setRequestHeader(Oe,te.headers[Oe]);te.type==="json"&&(Te.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||Te.setRequestHeader("Accept","application/json")),Te.withCredentials=te.credentials==="include",Te.onerror=()=>{ge(new Error(Te.statusText))},Te.onload=()=>{if(!ue.signal.aborted)if((Te.status>=200&&Te.status<300||Te.status===0)&&Te.response!==null){let Oe=Te.response;if(te.type==="json")try{Oe=JSON.parse(Te.response)}catch(Pe){return void ge(Pe)}me({data:Oe,cacheControl:Te.getResponseHeader("Cache-Control"),expires:Te.getResponseHeader("Expires"),etag:Te.getResponseHeader("ETag")})}else{let Oe=new Blob([Te.response],{type:Te.getResponseHeader("Content-Type")});ge(new Tt(Te.status,Te.statusText,te.url,Oe))}},ue.signal.addEventListener("abort",()=>{Te.abort(),ge(new Ae(ue.signal.reason))}),Te.send(te.body)})}(R,d)})};function rr(R){if(!R||R.indexOf("://")<=0||R.startsWith("data:image/")||R.startsWith("blob:"))return!0;let d=new URL(R),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(R,d,L){var W;!((W=L[R])===null||W===void 0)&&W.includes(d)||(L[R]||(L[R]=[]),L[R].push(d))}function Xt(R,d,L){if(L?.[R]){let W=L[R].indexOf(d);W!==-1&&L[R].splice(W,1)}}class or{constructor(d,L={}){X(this,L),this.type=d}}class Ot extends or{constructor(d,L={}){super("error",X({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Xt(d,L,this._listeners),Xt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(W=>this.once(d,W))}fire(d,L){var W,te;typeof d=="string"&&(d=new or(d,L||{}));let ue=d.type;if(this.listens(ue)){d.target=this;let me=!((W=this._listeners)===null||W===void 0)&&W[ue]?this._listeners[ue].slice():[];for(let Te of me)Te.call(this,d);let ge=!((te=this._oneTimeListeners)===null||te===void 0)&&te[ue]?this._oneTimeListeners[ue].slice():[];for(let Te of ge)Xt(ue,Te,this._oneTimeListeners),Te.call(this,d);let Ce=this._eventedParent;Ce&&(X(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,W,te,ue,me;return((W=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||W===void 0?void 0:W.length)>0||((ue=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||ue===void 0?void 0:ue.length)>0||((me=this._eventedParent)===null||me===void 0?void 0:me.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},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:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",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:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let De=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ne(R,d){let L={};for(let W in R)W!=="ref"&&(L[W]=R[W]);return De.forEach(W=>{W in d&&(L[W]=d[W])}),L}function We(R,d){if(Array.isArray(R)){if(!Array.isArray(d)||R.length!==d.length)return!1;for(let L=0;L`:R.itemType.kind==="value"?"array":`array<${d}>`}return R.kind}let li=[Yt,Rt,nr,ur,cr,Rr,Pa,Qr,yn(Zr),La,Xa,un,ja,Nn];function Yn(R,d){if(d.kind==="error")return null;if(R.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!Yn(R.itemType,d.itemType))&&(typeof R.N!="number"||R.N===d.N))return null}else{if(R.kind===d.kind)return null;if(R.kind==="value"){for(let L of li)if(!Yn(L,d))return null}}return`Expected ${Un(R)} but found ${Un(d)} instead.`}function on(R,d){return d.some(L=>L.kind===R.kind)}function en(R,d){return d.some(L=>L==="null"?R===null:L==="array"?Array.isArray(R):L==="object"?R&&!Array.isArray(R)&&typeof R=="object":L===typeof R)}function vi(R,d){return R.kind==="array"&&d.kind==="array"?R.itemType.kind===d.itemType.kind&&typeof R.N=="number":R.kind===d.kind}let Yi=.96422,Ja=.82521,Oa=4/29,lt=6/29,rt=3*lt*lt,fr=lt*lt*lt,lr=Math.PI/180,Tr=180/Math.PI;function Ir(R){return(R%=360)<0&&(R+=360),R}function Dr([R,d,L,W]){let te,ue,me=kt((.2225045*(R=ot(R))+.7168786*(d=ot(d))+.0606169*(L=ot(L)))/1);R===d&&d===L?te=ue=me:(te=kt((.4360747*R+.3850649*d+.1430804*L)/Yi),ue=kt((.0139322*R+.0971045*d+.7141733*L)/Ja));let ge=116*me-16;return[ge<0?0:ge,500*(te-me),200*(me-ue),W]}function ot(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function kt(R){return R>fr?Math.pow(R,1/3):R/rt+Oa}function jt([R,d,L,W]){let te=(R+16)/116,ue=isNaN(d)?te:te+d/500,me=isNaN(L)?te:te-L/200;return te=1*Er(te),ue=Yi*Er(ue),me=Ja*Er(me),[ar(3.1338561*ue-1.6168667*te-.4906146*me),ar(-.9787684*ue+1.9161415*te+.033454*me),ar(.0719453*ue-.2289914*te+1.4052427*me),W]}function ar(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Er(R){return R>lt?R*R*R:rt*(R-Oa)}let xr=Object.hasOwn||function(R,d){return Object.prototype.hasOwnProperty.call(R,d)};function zr(R,d){return xr(R,d)?R[d]:void 0}function Lr(R){return parseInt(R.padEnd(2,R),16)/255}function aa(R,d){return Sa(d?R/100:R,0,1)}function Sa(R,d,L){return Math.min(Math.max(d,R),L)}function wa(R){return!R.some(Number.isNaN)}let pn={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]};function tn(R,d,L){return R+L*(d-R)}function ai(R,d,L){return R.map((W,te)=>tn(W,d[te],L))}class rn{constructor(d,L,W,te=1,ue=!0){this.r=d,this.g=L,this.b=W,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,W,te]))}static parse(d){if(d instanceof rn)return d;if(typeof d!="string")return;let L=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=zr(pn,W);if(te){let[me,ge,Ce]=te;return[me/255,ge/255,Ce/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let me=W.length<6?1:2,ge=1;return[Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+me)||"ff")]}if(W.startsWith("rgb")){let me=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(me){let[ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br]=me,sr=[Oe||" ",He||" ",Qt].join("");if(sr===" "||sr===" /"||sr===",,"||sr===",,,"){let Mr=[Te,it,Et].join(""),qr=Mr==="%%%"?100:Mr===""?255:0;if(qr){let $r=[Sa(+Ce/qr,0,1),Sa(+Pe/qr,0,1),Sa(+bt/qr,0,1),er?aa(+er,br):1];if(wa($r))return $r}}return}}let ue=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[me,ge,Ce,Te,Oe,Pe,it,He,bt]=ue,Et=[Ce||" ",Oe||" ",it].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let Qt=[+ge,Sa(+Te,0,100),Sa(+Pe,0,100),He?aa(+He,bt):1];if(wa(Qt))return function([er,br,sr,Mr]){function qr($r){let _a=($r+er/30)%12,Ca=br*Math.min(sr,1-sr);return sr-Ca*Math.max(-1,Math.min(_a-3,9-_a,1))}return er=Ir(er),br/=100,sr/=100,[qr(0),qr(8),qr(4),Mr]}(Qt)}}}(d);return L?new rn(...L,!1):void 0}get rgb(){let{r:d,g:L,b:W,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[d/ue,L/ue,W/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,W,te,ue]=Dr(d),me=Math.sqrt(W*W+te*te);return[Math.round(1e4*me)?Ir(Math.atan2(te,W)*Tr):NaN,me,L,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Dr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,W,te]=this.rgb;return`rgba(${[d,L,W].map(ue=>Math.round(255*ue)).join(",")},${te})`}static interpolate(d,L,W,te="rgb"){switch(te){case"rgb":{let[ue,me,ge,Ce]=ai(d.rgb,L.rgb,W);return new rn(ue,me,ge,Ce,!1)}case"hcl":{let[ue,me,ge,Ce]=d.hcl,[Te,Oe,Pe,it]=L.hcl,He,bt;if(isNaN(ue)||isNaN(Te))isNaN(ue)?isNaN(Te)?He=NaN:(He=Te,ge!==1&&ge!==0||(bt=Oe)):(He=ue,Pe!==1&&Pe!==0||(bt=me));else{let sr=Te-ue;Te>ue&&sr>180?sr-=360:Te180&&(sr+=360),He=ue+W*sr}let[Et,Qt,er,br]=function([sr,Mr,qr,$r]){return sr=isNaN(sr)?0:sr*lr,jt([qr,Math.cos(sr)*Mr,Math.sin(sr)*Mr,$r])}([He,bt??tn(me,Oe,W),tn(ge,Pe,W),tn(Ce,it,W)]);return new rn(Et,Qt,er,br,!1)}case"lab":{let[ue,me,ge,Ce]=jt(ai(d.lab,L.lab,W));return new rn(ue,me,ge,Ce,!1)}}}}rn.black=new rn(0,0,0,1),rn.white=new rn(1,1,1,1),rn.transparent=new rn(0,0,0,0),rn.red=new rn(1,0,0,1);class Ri{constructor(d,L,W){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let Gn=["bottom","center","top"];class no{constructor(d,L,W,te,ue,me){this.text=d,this.image=L,this.scale=W,this.fontStack=te,this.textColor=ue,this.verticalAlign=me}}class Di{constructor(d){this.sections=d}static fromString(d){return new Di([new no(d,null,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 Di?d:Di.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class fn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof fn)return d;if(typeof d=="number")return new fn([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="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 fn(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new fn(ai(d.values,L.values,W))}}class Ai{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Ai)return d;if(typeof d=="number")return new Ai([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Ai(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Ai(ai(d.values,L.values,W))}}class jn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof jn)return d;if(typeof d=="string"){let W=rn.parse(d);return W?new jn([W]):void 0}if(!Array.isArray(d))return;let L=[];for(let W of d){if(typeof W!="string")return;let te=rn.parse(W);if(!te)return;L.push(te)}return new jn(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W,te="rgb"){let ue=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let me=0;me=0&&R<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,d,L,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,d,L,W]:[R,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Vn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof io||R instanceof rn||R instanceof Ri||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi)return!0;if(Array.isArray(R)){for(let d of R)if(!Vn(d))return!1;return!0}if(typeof R=="object"){for(let d in R)if(!Vn(R[d]))return!1;return!0}return!1}function qn(R){if(R===null)return Yt;if(typeof R=="string")return nr;if(typeof R=="boolean")return ur;if(typeof R=="number")return Rt;if(R instanceof rn)return cr;if(R instanceof io)return Rr;if(R instanceof Ri)return ha;if(R instanceof Di)return Pa;if(R instanceof fn)return La;if(R instanceof Ai)return Xa;if(R instanceof jn)return un;if(R instanceof gi)return Nn;if(R instanceof qi)return ja;if(Array.isArray(R)){let d=R.length,L;for(let W of R){let te=qn(W);if(L){if(L===te)continue;L=Zr;break}L=te}return yn(L||Zr,d)}return Qr}function Hi(R){let d=typeof R;return R===null?"":d==="string"||d==="number"||d==="boolean"?String(R):R instanceof rn||R instanceof io||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi?R.toString():JSON.stringify(R)}class Mi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!Vn(d[1]))return L.error("invalid value");let W=d[1],te=qn(W),ue=L.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new Mi(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ro={string:nr,number:Rt,boolean:ur,object:Qr};class go{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W,te=1,ue=d[0];if(ue==="array"){let ge,Ce;if(d.length>2){let Te=d[1];if(typeof Te!="string"||!(Te in Ro)||Te==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);ge=Ro[Te],te++}else ge=Zr;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}W=yn(ge,Ce)}else{if(!Ro[ue])throw new Error(`Types doesn't contain name = ${ue}`);W=Ro[ue]}let me=[];for(;ted.outputDefined())}}let Eo={"to-boolean":ur,"to-color":cr,"to-number":Rt,"to-string":nr};class Ao{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[0];if(!Eo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=Eo[W],ue=[];for(let me=1;me4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:oo(L[0],L[1],L[2],L[3]),!W))return new rn(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new Xn(W||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let W of this.args){L=W.evaluate(d);let te=fn.parse(L);if(te)return te}throw new Xn(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=Ai.parse(L);if(te)return te}throw new Xn(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=jn.parse(L);if(te)return te}throw new Xn(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let W of this.args){L=W.evaluate(d);let te=gi.parse(L);if(te)return te}throw new Xn(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let W of this.args){if(L=W.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new Xn(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return Di.fromString(Hi(this.args[0].evaluate(d)));case"resolvedImage":return qi.fromString(Hi(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return Hi(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ds=["Unknown","Point","LineString","Polygon"];class jo{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,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"?ds[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 L=this._parseColorCache.get(d);return L||(L=rn.parse(d),this._parseColorCache.set(d,L)),L}}class Wo{constructor(d,L,W=[],te,ue=new Kr,me=[]){this.registry=d,this.path=W,this.key=W.map(ge=>`[${ge}]`).join(""),this.scope=ue,this.errors=me,this.expectedType=te,this._isConstant=L}parse(d,L,W,te,ue={}){return L?this.concat(L,W,te)._parse(d,ue):this._parse(d,ue)}_parse(d,L){function W(te,ue,me){return me==="assert"?new go(ue,[te]):me==="coerce"?new Ao(ue,[te]):te}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 te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let me=ue.parse(d,this);if(!me)return null;if(this.expectedType){let ge=this.expectedType,Ce=me.type;if(ge.kind!=="string"&&ge.kind!=="number"&&ge.kind!=="boolean"&&ge.kind!=="object"&&ge.kind!=="array"||Ce.kind!=="value"){if(ge.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(ge.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(ge.kind)&&["value","number","array"].includes(Ce.kind)||ge.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||ge.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))me=W(me,ge,L.typeAnnotation||"coerce");else if(this.checkSubtype(ge,Ce))return null}else me=W(me,ge,L.typeAnnotation||"assert")}if(!(me instanceof Mi)&&me.type.kind!=="resolvedImage"&&this._isConstant(me)){let ge=new jo;try{me=new Mi(me.type,me.evaluate(ge))}catch(Ce){return this.error(Ce.message),null}}return me}return this.error(`Unknown expression "${te}". 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,L,W){let te=typeof d=="number"?this.path.concat(d):this.path,ue=W?this.scope.concat(W):this.scope;return new Wo(this.registry,this._isConstant,te,L||null,ue,this.errors)}error(d,...L){let W=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(W,d))}checkSubtype(d,L){let W=Yn(d,L);return W&&this.error(W),W}}class to{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let W=[];for(let ue=1;ue=W.length)throw new Xn(`Array index out of bounds: ${L} > ${W.length-1}.`);if(L!==Math.floor(L))throw new Xn(`Array index must be an integer, but found ${L} instead.`);return W[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class Vi{constructor(d,L){this.type=ur,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);return W&&te?on(W.type,[ur,nr,Rt,Yt,Zr])?new Vi(W,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!W)return!1;if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);if(!en(W,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`);return W.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Io{constructor(d,L,W){this.type=Rt,this.needle=d,this.haystack=L,this.fromIndex=W}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);if(!W||!te)return null;if(!on(W.type,[ur,nr,Rt,Yt,Zr]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Io(W,te,ue):null}return new Io(W,te)}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),en(W,["string"])){let ue=W.indexOf(L,te);return ue===-1?-1:[...W.slice(0,ue)].length}if(en(W,["array"]))return W.indexOf(L,te);throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class Xi{constructor(d,L,W,te,ue,me){this.inputType=d,this.type=L,this.input=W,this.cases=te,this.outputs=ue,this.otherwise=me}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let W,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let ue={},me=[];for(let Te=2;TeNumber.MAX_SAFE_INTEGER)return it.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return it.error("Numeric branch labels must be integer values.");if(W){if(it.checkSubtype(W,qn(bt)))return null}else W=qn(bt);if(ue[String(bt)]!==void 0)return it.error("Branch labels must be unique.");ue[String(bt)]=me.length}let He=L.parse(Pe,Te,te);if(!He)return null;te=te||He.type,me.push(He)}let ge=L.parse(d[1],1,Zr);if(!ge)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?ge.type.kind!=="value"&&L.concat(1).checkSubtype(W,ge.type)?null:new Xi(W,te,ge,ue,me,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(qn(L)===this.inputType&&this.outputs[this.cases[L]]||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 Ko{constructor(d,L,W){this.type=d,this.branches=L,this.otherwise=W}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let W;L.expectedType&&L.expectedType.kind!=="value"&&(W=L.expectedType);let te=[];for(let me=1;meL.outputDefined())&&this.otherwise.outputDefined()}}class Uo{constructor(d,L,W,te){this.type=d,this.input=L,this.beginIndex=W,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Rt);if(!W||!te)return null;if(!on(W.type,[yn(Zr),nr,Zr]))return L.error(`Expected first argument to be of type array or string, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Uo(W.type,W,te,ue):null}return new Uo(W.type,W,te)}evaluate(d){let L=this.input.evaluate(d),W=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),en(L,["string"]))return[...L].slice(W,te).join("");if(en(L,["array"]))return L.slice(W,te);throw new Xn(`Expected first argument to be of type array or string, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function Ls(R,d){let L=R.length-1,W,te,ue=0,me=L,ge=0;for(;ue<=me;)if(ge=Math.floor((ue+me)/2),W=R[ge],te=R[ge+1],W<=d){if(ge===L||dd))throw new Xn("Input is not a number.");me=ge-1}return 0}class Ss{constructor(d,L,W){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,ue]of W)this.labels.push(te),this.outputs.push(ue)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=[],ue=null;L.expectedType&&L.expectedType.kind!=="value"&&(ue=L.expectedType);for(let me=1;me=ge)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Te);let Pe=L.parse(Ce,Oe,ue);if(!Pe)return null;ue=ue||Pe.type,te.push([ge,Pe])}return new Ss(ue,W,te)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;return te>=L[ue-1]?W[ue-1].evaluate(d):W[Ls(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Vo(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var Vs,Ts,Bo=function(){if(Ts)return Vs;function R(d,L,W,te){this.cx=3*d,this.bx=3*(W-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=W,this.p2y=te}return Ts=1,Vs=R,R.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Vs}(),_o=Vo(Bo);class Pi{constructor(d,L,W,te,ue){this.type=d,this.operator=L,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[me,ge]of ue)this.labels.push(me),this.outputs.push(ge)}static interpolationFactor(d,L,W,te){let ue=0;if(d.name==="exponential")ue=yo(L,d.base,W,te);else if(d.name==="linear")ue=yo(L,1,W,te);else if(d.name==="cubic-bezier"){let me=d.controlPoints;ue=new _o(me[0],me[1],me[2],me[3]).solve(yo(L,1,W,te))}return ue}static parse(d,L){let[W,te,ue,...me]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let Te=te[1];if(typeof Te!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:Te}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let Te=te.slice(1);if(Te.length!==4||Te.some(Oe=>typeof Oe!="number"||Oe<0||Oe>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:Te}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(ue=L.parse(ue,2,Rt),!ue)return null;let ge=[],Ce=null;W!=="interpolate-hcl"&&W!=="interpolate-lab"||L.expectedType==un?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=cr;for(let Te=0;Te=Oe)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',it);let bt=L.parse(Pe,He,Ce);if(!bt)return null;Ce=Ce||bt.type,ge.push([Oe,bt])}return vi(Ce,Rt)||vi(Ce,Rr)||vi(Ce,cr)||vi(Ce,La)||vi(Ce,Xa)||vi(Ce,un)||vi(Ce,Nn)||vi(Ce,yn(Rt))?new Pi(Ce,W,te,ue,ge):L.error(`Type ${Un(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;if(te>=L[ue-1])return W[ue-1].evaluate(d);let me=Ls(L,te),ge=Pi.interpolationFactor(this.interpolation,te,L[me],L[me+1]),Ce=W[me].evaluate(d),Te=W[me+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return tn(Ce,Te,ge);case"color":return rn.interpolate(Ce,Te,ge);case"padding":return fn.interpolate(Ce,Te,ge);case"colorArray":return jn.interpolate(Ce,Te,ge);case"numberArray":return Ai.interpolate(Ce,Te,ge);case"variableAnchorOffsetCollection":return gi.interpolate(Ce,Te,ge);case"array":return ai(Ce,Te,ge);case"projectionDefinition":return io.interpolate(Ce,Te,ge)}case"interpolate-hcl":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"hcl");case"colorArray":return jn.interpolate(Ce,Te,ge,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"lab");case"colorArray":return jn.interpolate(Ce,Te,ge,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function yo(R,d,L,W){let te=W-L,ue=R-L;return te===0?0:d===1?ue/te:(Math.pow(d,ue)-1)/(Math.pow(d,te)-1)}let bs={color:rn.interpolate,number:tn,padding:fn.interpolate,numberArray:Ai.interpolate,colorArray:jn.interpolate,variableAnchorOffsetCollection:gi.interpolate,array:ai};class Dl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=null,te=L.expectedType;te&&te.kind!=="value"&&(W=te);let ue=[];for(let ge of d.slice(1)){let Ce=L.parse(ge,1+ue.length,W,void 0,{typeAnnotation:"omit"});if(!Ce)return null;W=W||Ce.type,ue.push(Ce)}if(!W)throw new Error("No output type");let me=te&&ue.some(ge=>Yn(te,ge.type));return new Dl(me?Zr:W,ue)}evaluate(d){let L,W=null,te=0;for(let ue of this.args)if(te++,W=ue.evaluate(d),W&&W instanceof qi&&!W.available&&(L||(L=W.name),W=null,te===this.args.length&&(W=L)),W!==null)break;return W}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function hl(R,d){return R==="=="||R==="!="?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 ps(R,d,L,W){return W.compare(d,L)===0}function dl(R,d,L){let W=R!=="=="&&R!=="!=";return class ER{constructor(ue,me,ge){this.type=ur,this.lhs=ue,this.rhs=me,this.collator=ge,this.hasUntypedArgument=ue.type.kind==="value"||me.type.kind==="value"}static parse(ue,me){if(ue.length!==3&&ue.length!==4)return me.error("Expected two or three arguments.");let ge=ue[0],Ce=me.parse(ue[1],1,Zr);if(!Ce)return null;if(!hl(ge,Ce.type))return me.concat(1).error(`"${ge}" comparisons are not supported for type '${Un(Ce.type)}'.`);let Te=me.parse(ue[2],2,Zr);if(!Te)return null;if(!hl(ge,Te.type))return me.concat(2).error(`"${ge}" comparisons are not supported for type '${Un(Te.type)}'.`);if(Ce.type.kind!==Te.type.kind&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error(`Cannot compare types '${Un(Ce.type)}' and '${Un(Te.type)}'.`);W&&(Ce.type.kind==="value"&&Te.type.kind!=="value"?Ce=new go(Te.type,[Ce]):Ce.type.kind!=="value"&&Te.type.kind==="value"&&(Te=new go(Ce.type,[Te])));let Oe=null;if(ue.length===4){if(Ce.type.kind!=="string"&&Te.type.kind!=="string"&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error("Cannot use collator to compare non-string types.");if(Oe=me.parse(ue[3],3,ha),!Oe)return null}return new ER(Ce,Te,Oe)}evaluate(ue){let me=this.lhs.evaluate(ue),ge=this.rhs.evaluate(ue);if(W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!==Te.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new Xn(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ce.kind}, ${Te.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!=="string"||Te.kind!=="string")return d(ue,me,ge)}return this.collator?L(ue,me,ge,this.collator.evaluate(ue)):d(ue,me,ge)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let wu=dl("==",function(R,d,L){return d===L},ps),lu=dl("!=",function(R,d,L){return d!==L},function(R,d,L,W){return!ps(0,d,L,W)}),xc=dl("<",function(R,d,L){return d",function(R,d,L){return d>L},function(R,d,L,W){return W.compare(d,L)>0}),pl=dl("<=",function(R,d,L){return d<=L},function(R,d,L,W){return W.compare(d,L)<=0}),$u=dl(">=",function(R,d,L){return d>=L},function(R,d,L,W){return W.compare(d,L)>=0});class uu{constructor(d,L,W){this.type=ha,this.locale=W,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let W=d[1];if(typeof W!="object"||Array.isArray(W))return L.error("Collator options argument must be an object.");let te=L.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,ur);if(!te)return null;let ue=L.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,ur);if(!ue)return null;let me=null;return W.locale&&(me=L.parse(W.locale,1,nr),!me)?null:new uu(te,ue,me)}evaluate(d){return new Ri(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 tl{constructor(d,L,W,te,ue,me){this.type=nr,this.number=d,this.locale=L,this.currency=W,this.unit=te,this.minFractionDigits=ue,this.maxFractionDigits=me}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=L.parse(te.locale,1,nr),!ue))return null;let me=null;if(te.currency&&(me=L.parse(te.currency,1,nr),!me))return null;let ge=null;if(te.unit&&(ge=L.parse(te.unit,1,nr),!ge))return null;if(me&&ge)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,Rt),!Ce))return null;let Te=null;return te["max-fraction-digits"]&&(Te=L.parse(te["max-fraction-digits"],1,Rt),!Te)?null:new tl(W,ue,me,ge,Ce,Te)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.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.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class vs{constructor(d){this.type=Pa,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[1];if(!Array.isArray(W)&&typeof W=="object")return L.error("First argument must be an image or text section.");let te=[],ue=!1;for(let me=1;me<=d.length-1;++me){let ge=d[me];if(ue&&typeof ge=="object"&&!Array.isArray(ge)){ue=!1;let Ce=null;if(ge["font-scale"]&&(Ce=L.parse(ge["font-scale"],1,Rt),!Ce))return null;let Te=null;if(ge["text-font"]&&(Te=L.parse(ge["text-font"],1,yn(nr)),!Te))return null;let Oe=null;if(ge["text-color"]&&(Oe=L.parse(ge["text-color"],1,cr),!Oe))return null;let Pe=null;if(ge["vertical-align"]){if(typeof ge["vertical-align"]=="string"&&!Gn.includes(ge["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${ge["vertical-align"]}' instead.`);if(Pe=L.parse(ge["vertical-align"],1,nr),!Pe)return null}let it=te[te.length-1];it.scale=Ce,it.font=Te,it.textColor=Oe,it.verticalAlign=Pe}else{let Ce=L.parse(d[me],1,Zr);if(!Ce)return null;let Te=Ce.type.kind;if(Te!=="string"&&Te!=="value"&&Te!=="null"&&Te!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new vs(te)}evaluate(d){return new Di(this.sections.map(L=>{let W=L.content.evaluate(d);return qn(W)===ja?new no("",W,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new no(Hi(W),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class os{constructor(d){this.type=ja,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let W=L.parse(d[1],1,nr);return W?new os(W):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),W=qi.fromString(L);return W&&d.availableImages&&(W.available=d.availableImages.indexOf(L)>-1),W}eachChild(d){d(this.input)}outputDefined(){return!1}}class ms{constructor(d){this.type=Rt,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=L.parse(d[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${Un(W.type)} instead.`):new ms(W):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new Xn(`Expected value to be of type string or array, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let rl=8192;function Fu(R,d){let L=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*rl),Math.round(W*te*rl)]}function zu(R,d){let L=Math.pow(2,d.z);return[(te=(R[0]/rl+d.x)/L,360*te-180),(W=(R[1]/rl+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Ku(R,d){R[0]=Math.min(R[0],d[0]),R[1]=Math.min(R[1],d[1]),R[2]=Math.max(R[2],d[0]),R[3]=Math.max(R[3],d[1])}function bc(R,d){return!(R[0]<=d[0]||R[2]>=d[2]||R[1]<=d[1]||R[3]>=d[3])}function Lh(R,d,L){let W=R[0]-d[0],te=R[1]-d[1],ue=R[0]-L[0],me=R[1]-L[1];return W*me-ue*te==0&&W*ue<=0&&te*me<=0}function rh(R,d,L,W){return(te=[W[0]-L[0],W[1]-L[1]])[0]*(ue=[d[0]-R[0],d[1]-R[1]])[1]-te[1]*ue[0]!=0&&!(!Nf(R,d,L,W)||!Nf(L,W,R,d));var te,ue}function Ju(R,d,L){for(let W of L)for(let te=0;te(te=R)[1]!=(me=ge[Ce+1])[1]>te[1]&&te[0]<(me[0]-ue[0])*(te[1]-ue[1])/(me[1]-ue[1])+ue[0]&&(W=!W)}var te,ue,me;return W}function ah(R,d){for(let L of d)if(ss(R,L))return!0;return!1}function wc(R,d){for(let L of R)if(!ss(L,d))return!1;for(let L=0;L0&&ge<0||me<0&&ge>0}function Bu(R,d,L){let W=[];for(let te=0;teL[2]){let te=.5*W,ue=R[0]-L[0]>te?-W:L[0]-R[0]>te?W:0;ue===0&&(ue=R[0]-L[2]>te?-W:L[2]-R[0]>te?W:0),R[0]+=ue}Ku(d,R)}function Gc(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let ge of R)for(let Ce of ge){let Te=[Ce.x+ue[0],Ce.y+ue[1]];Ou(Te,d,L,te),me.push(Te)}return me}function pf(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let Ce of R){let Te=[];for(let Oe of Ce){let Pe=[Oe.x+ue[0],Oe.y+ue[1]];Ku(d,Pe),Te.push(Pe)}me.push(Te)}if(d[2]-d[0]<=te/2){(ge=d)[0]=ge[1]=1/0,ge[2]=ge[3]=-1/0;for(let Ce of me)for(let Te of Ce)Ou(Te,d,L,te)}var ge;return me}class $l{constructor(d,L){this.type=ur,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection"){let te=[];for(let ue of W.features){let{type:me,coordinates:ge}=ue.geometry;me==="Polygon"&&te.push(ge),me==="MultiPolygon"&&te.push(...ge)}if(te.length)return new $l(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new $l(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new $l(W,W)}return L.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(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ss(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ah(Te,ge))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!wc(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!pc(Te,ge))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let jf=class{constructor(R=[],d=(L,W)=>LW?1:0){if(this.data=R,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:d,compare:L}=this,W=d[R];for(;R>0;){let te=R-1>>1,ue=d[te];if(L(W,ue)>=0)break;d[R]=ue,R=te}d[R]=W}_down(R){let{data:d,compare:L}=this,W=this.length>>1,te=d[R];for(;R=0)break;d[R]=d[ue],R=ue}d[R]=te}};function Hc(R,d,L=0,W=R.length-1,te=Qu){for(;W>L;){if(W-L>600){let Ce=W-L+1,Te=d-L+1,Oe=Math.log(Ce),Pe=.5*Math.exp(2*Oe/3),it=.5*Math.sqrt(Oe*Pe*(Ce-Pe)/Ce)*(Te-Ce/2<0?-1:1);Hc(R,d,Math.max(L,Math.floor(d-Te*Pe/Ce+it)),Math.min(W,Math.floor(d+(Ce-Te)*Pe/Ce+it)),te)}let ue=R[d],me=L,ge=W;for(Wc(R,L,d),te(R[W],ue)>0&&Wc(R,L,W);me0;)ge--}te(R[L],ue)===0?Wc(R,L,ge):(ge++,Wc(R,ge,W)),ge<=d&&(L=ge+1),d<=ge&&(W=ge-1)}}function Wc(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function Qu(R,d){return Rd?1:0}function Yc(R,d){if(R.length<=1)return[R];let L=[],W,te;for(let ue of R){let me=Uf(ue);me!==0&&(ue.area=Math.abs(me),te===void 0&&(te=me<0),te===me<0?(W&&L.push(W),W=[ue]):W.push(ue))}if(W&&L.push(W),d>1)for(let ue=0;ue1?(Te=d[Ce+1][0],Oe=d[Ce+1][1]):He>0&&(Te+=Pe/this.kx*He,Oe+=it/this.ky*He)),Pe=this.wrap(L[0]-Te)*this.kx,it=(L[1]-Oe)*this.ky;let bt=Pe*Pe+it*it;bt180;)d-=360;return d}}function Zc(R,d){return d[0]-R[0]}function ec(R){return R[1]-R[0]+1}function cu(R,d){return R[1]>=R[0]&&R[1]R[1])return[null,null];let L=ec(R);if(d){if(L===2)return[R,null];let te=Math.floor(L/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(L===1)return[R,null];let W=Math.floor(L/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function vf(R,d){if(!cu(d,R.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let W=d[0];W<=d[1];++W)Ku(L,R[W]);return L}function Tu(R){let d=[1/0,1/0,-1/0,-1/0];for(let L of R)for(let W of L)Ku(d,W);return d}function nh(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function vl(R,d,L){if(!nh(R)||!nh(d))return NaN;let W=0,te=0;return R[2]d[2]&&(W=R[0]-d[2]),R[1]>d[3]&&(te=R[1]-d[3]),R[3]=W)return W;if(bc(te,ue)){if(mf(R,d))return 0}else if(mf(d,R))return 0;let me=1/0;for(let ge of R)for(let Ce=0,Te=ge.length,Oe=Te-1;Ce0;){let Ce=me.pop();if(Ce[0]>=ue)continue;let Te=Ce[1],Oe=d?50:100;if(ec(Te)<=Oe){if(!cu(Te,R.length))return NaN;if(d){let Pe=Mc(R,Te,L,W);if(isNaN(Pe)||Pe===0)return Pe;ue=Math.min(ue,Pe)}else for(let Pe=Te[0];Pe<=Te[1];++Pe){let it=ac(R[Pe],L,W);if(ue=Math.min(ue,it),ue===0)return 0}}else{let Pe=tc(Te,d);ih(me,ue,W,R,ge,Pe[0]),ih(me,ue,W,R,ge,Pe[1])}}return ue}function El(R,d,L,W,te,ue=1/0){let me=Math.min(ue,te.distance(R[0],L[0]));if(me===0)return me;let ge=new jf([[0,[0,R.length-1],[0,L.length-1]]],Zc);for(;ge.length>0;){let Ce=ge.pop();if(Ce[0]>=me)continue;let Te=Ce[1],Oe=Ce[2],Pe=d?50:100,it=W?50:100;if(ec(Te)<=Pe&&ec(Oe)<=it){if(!cu(Te,R.length)&&cu(Oe,L.length))return NaN;let He;if(d&&W)He=yl(R,Te,L,Oe,te),me=Math.min(me,He);else if(d&&!W){let bt=R.slice(Te[0],Te[1]+1);for(let Et=Oe[0];Et<=Oe[1];++Et)if(He=ml(L[Et],bt,te),me=Math.min(me,He),me===0)return me}else if(!d&&W){let bt=L.slice(Oe[0],Oe[1]+1);for(let Et=Te[0];Et<=Te[1];++Et)if(He=ml(R[Et],bt,te),me=Math.min(me,He),me===0)return me}else He=qf(R,Te,L,Oe,te),me=Math.min(me,He)}else{let He=tc(Te,d),bt=tc(Oe,W);fu(ge,me,te,R,L,He[0],bt[0]),fu(ge,me,te,R,L,He[0],bt[1]),fu(ge,me,te,R,L,He[1],bt[0]),fu(ge,me,te,R,L,He[1],bt[1])}}return me}function oh(R){return R.type==="MultiPolygon"?R.coordinates.map(d=>({type:"Polygon",coordinates:d})):R.type==="MultiLineString"?R.coordinates.map(d=>({type:"LineString",coordinates:d})):R.type==="MultiPoint"?R.coordinates.map(d=>({type:"Point",coordinates:d})):[R]}class Au{constructor(d,L){this.type=Rt,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection")return new Au(W,W.features.map(te=>oh(te.geometry)).flat());if(W.type==="Feature")return new Au(W,oh(W.geometry));if("type"in W&&"coordinates"in W)return new Au(W,oh(W))}return L.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(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!1,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!1,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!1,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!0,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!0,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!0,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,W){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Yc(te,0).map(Ce=>Ce.map(Te=>Te.map(Oe=>zu([Oe.x,Oe.y],L.canonical)))),me=new Ac(ue[0][0][0][1]),ge=1/0;for(let Ce of W)for(let Te of ue){switch(Ce.type){case"Point":ge=Math.min(ge,Sl([Ce.coordinates],!1,Te,me,ge));break;case"LineString":ge=Math.min(ge,Sl(Ce.coordinates,!0,Te,me,ge));break;case"Polygon":ge=Math.min(ge,Jo(Te,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class $c{constructor(d){this.type=Zr,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=d[1];return W==null?L.error("Global state property must be defined."):typeof W!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new $c(W)}evaluate(d){var L;let W=(L=d.globals)===null||L===void 0?void 0:L.globalState;return W&&Object.keys(W).length!==0?zr(W,this.key):null}eachChild(){}outputDefined(){return!1}}let _l={"==":wu,"!=":lu,">":Fl,"<":xc,">=":$u,"<=":pl,array:go,at:pi,boolean:go,case:Ko,coalesce:Dl,collator:uu,format:vs,image:os,in:Vi,"index-of":Io,interpolate:Pi,"interpolate-hcl":Pi,"interpolate-lab":Pi,length:ms,let:to,literal:Mi,match:Xi,number:go,"number-format":tl,object:go,slice:Uo,step:Ss,string:go,"to-boolean":Ao,"to-color":Ao,"to-number":Ao,"to-string":Ao,var:wo,within:$l,distance:Au,"global-state":$c};class nl{constructor(d,L,W,te){this.name=d,this.type=L,this._evaluate=W,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let W=d[0],te=nl.definitions[W];if(!te)return L.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,me=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,ge=me.filter(([Te])=>!Array.isArray(Te)||Te.length===d.length-1),Ce=null;for(let[Te,Oe]of ge){Ce=new Wo(L.registry,Uu,L.path,null,L.scope);let Pe=[],it=!1;for(let He=1;He{return it=Pe,Array.isArray(it)?`(${it.map(Un).join(", ")})`:`(${Un(it.type)}...)`;var it}).join(" | "),Oe=[];for(let Pe=1;Pe{L=d?L&&Uu(W):L&&W instanceof Mi}),!!L&&qu(R)&&yf(R,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function qu(R){if(R instanceof nl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof $l||R instanceof Au)return!1;let d=!0;return R.eachChild(L=>{d&&!qu(L)&&(d=!1)}),d}function nc(R){if(R instanceof nl&&R.name==="feature-state")return!1;let d=!0;return R.eachChild(L=>{d&&!nc(L)&&(d=!1)}),d}function yf(R,d){if(R instanceof nl&&d.indexOf(R.name)>=0)return!1;let L=!0;return R.eachChild(W=>{L&&!yf(W,d)&&(L=!1)}),L}function _f(R){return{result:"success",value:R}}function Mu(R){return{result:"error",value:R}}function ic(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Sc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Vu(R){return!!R.expression&&R.expression.interpolated}function xo(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Ec(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&qn(R)===Qr}function xh(R){return R}function Vf(R,d){let L=R.stops&&typeof R.stops[0][0]=="object",W=L||!(L||R.property!==void 0),te=R.type||(Vu(d)?"exponential":"interval"),ue=function(Oe){switch(Oe.type){case"color":return rn.parse;case"padding":return fn.parse;case"numberArray":return Ai.parse;case"colorArray":return jn.parse;default:return null}}(d);if(ue&&((R=Ht({},R)).stops&&(R.stops=R.stops.map(Oe=>[Oe[0],ue(Oe[1])])),R.default=ue(R.default?R.default:d.default)),R.colorSpace&&(me=R.colorSpace)!=="rgb"&&me!=="hcl"&&me!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var me;let ge=function(Oe){switch(Oe){case"exponential":return Hf;case"interval":return bh;case"categorical":return Gf;case"identity":return il;default:throw new Error(`Unknown function type "${Oe}"`)}}(te),Ce,Te;if(te==="categorical"){Ce=Object.create(null);for(let Oe of R.stops)Ce[Oe[0]]=Oe[1];Te=typeof R.stops[0][0]}if(L){let Oe={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>Hf({stops:it,base:R.base},d,bt).evaluate(bt,Et)}}if(W){let Oe=te==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Oe,interpolationFactor:Pi.interpolationFactor.bind(void 0,Oe),zoomStops:R.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>ge(R,d,Pe,Ce,Te)}}return{kind:"source",evaluate(Oe,Pe){let it=Pe&&Pe.properties?Pe.properties[R.property]:void 0;return it===void 0?xf(R.default,d.default):ge(R,d,it,Ce,Te)}}}function xf(R,d,L){return R!==void 0?R:d!==void 0?d:L!==void 0?L:void 0}function Gf(R,d,L,W,te){return xf(typeof L===te?W[L]:void 0,R.default,d.default)}function bh(R,d,L){if(xo(L)!=="number")return xf(R.default,d.default);let W=R.stops.length;if(W===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[W-1][0])return R.stops[W-1][1];let te=Ls(R.stops.map(ue=>ue[0]),L);return R.stops[te][1]}function Hf(R,d,L){let W=R.base!==void 0?R.base:1;if(xo(L)!=="number")return xf(R.default,d.default);let te=R.stops.length;if(te===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[te-1][0])return R.stops[te-1][1];let ue=Ls(R.stops.map(Oe=>Oe[0]),L),me=function(Oe,Pe,it,He){let bt=He-it,Et=Oe-it;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,W,R.stops[ue][0],R.stops[ue+1][0]),ge=R.stops[ue][1],Ce=R.stops[ue+1][1],Te=bs[d.type]||xh;return typeof ge.evaluate=="function"?{evaluate(...Oe){let Pe=ge.evaluate.apply(void 0,Oe),it=Ce.evaluate.apply(void 0,Oe);if(Pe!==void 0&&it!==void 0)return Te(Pe,it,me,R.colorSpace)}}:Te(ge,Ce,me,R.colorSpace)}function il(R,d,L){switch(d.type){case"color":L=rn.parse(L);break;case"formatted":L=Di.fromString(L.toString());break;case"resolvedImage":L=qi.fromString(L.toString());break;case"padding":L=fn.parse(L);break;case"colorArray":L=jn.parse(L);break;case"numberArray":L=Ai.parse(L);break;default:xo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return xf(L,R.default,d.default)}nl.register(_l,{error:[{kind:"error"},[nr],(R,[d])=>{throw new Xn(d.evaluate(R))}],typeof:[nr,[Zr],(R,[d])=>Un(qn(d.evaluate(R)))],"to-rgba":[yn(Rt,4),[cr],(R,[d])=>{let[L,W,te,ue]=d.evaluate(R).rgb;return[255*L,255*W,255*te,ue]}],rgb:[cr,[Rt,Rt,Rt],gf],rgba:[cr,[Rt,Rt,Rt,Rt],gf],has:{type:ur,overloads:[[[nr],(R,[d])=>Kc(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>Kc(d.evaluate(R),L.evaluate(R))]]},get:{type:Zr,overloads:[[[nr],(R,[d])=>sh(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>sh(d.evaluate(R),L.evaluate(R))]]},"feature-state":[Zr,[nr],(R,[d])=>sh(d.evaluate(R),R.featureState||{})],properties:[Qr,[],R=>R.properties()],"geometry-type":[nr,[],R=>R.geometryType()],id:[Zr,[],R=>R.id()],zoom:[Rt,[],R=>R.globals.zoom],"heatmap-density":[Rt,[],R=>R.globals.heatmapDensity||0],elevation:[Rt,[],R=>R.globals.elevation||0],"line-progress":[Rt,[],R=>R.globals.lineProgress||0],accumulated:[Zr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[Rt,hu(Rt),(R,d)=>{let L=0;for(let W of d)L+=W.evaluate(R);return L}],"*":[Rt,hu(Rt),(R,d)=>{let L=1;for(let W of d)L*=W.evaluate(R);return L}],"-":{type:Rt,overloads:[[[Rt,Rt],(R,[d,L])=>d.evaluate(R)-L.evaluate(R)],[[Rt],(R,[d])=>-d.evaluate(R)]]},"/":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)/L.evaluate(R)],"%":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)%L.evaluate(R)],ln2:[Rt,[],()=>Math.LN2],pi:[Rt,[],()=>Math.PI],e:[Rt,[],()=>Math.E],"^":[Rt,[Rt,Rt],(R,[d,L])=>Math.pow(d.evaluate(R),L.evaluate(R))],sqrt:[Rt,[Rt],(R,[d])=>Math.sqrt(d.evaluate(R))],log10:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN10],ln:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))],log2:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN2],sin:[Rt,[Rt],(R,[d])=>Math.sin(d.evaluate(R))],cos:[Rt,[Rt],(R,[d])=>Math.cos(d.evaluate(R))],tan:[Rt,[Rt],(R,[d])=>Math.tan(d.evaluate(R))],asin:[Rt,[Rt],(R,[d])=>Math.asin(d.evaluate(R))],acos:[Rt,[Rt],(R,[d])=>Math.acos(d.evaluate(R))],atan:[Rt,[Rt],(R,[d])=>Math.atan(d.evaluate(R))],min:[Rt,hu(Rt),(R,d)=>Math.min(...d.map(L=>L.evaluate(R)))],max:[Rt,hu(Rt),(R,d)=>Math.max(...d.map(L=>L.evaluate(R)))],abs:[Rt,[Rt],(R,[d])=>Math.abs(d.evaluate(R))],round:[Rt,[Rt],(R,[d])=>{let L=d.evaluate(R);return L<0?-Math.round(-L):Math.round(L)}],floor:[Rt,[Rt],(R,[d])=>Math.floor(d.evaluate(R))],ceil:[Rt,[Rt],(R,[d])=>Math.ceil(d.evaluate(R))],"filter-==":[ur,[nr,Zr],(R,[d,L])=>R.properties()[d.value]===L.value],"filter-id-==":[ur,[Zr],(R,[d])=>R.id()===d.value],"filter-type-==":[ur,[nr],(R,[d])=>R.geometryType()===d.value],"filter-<":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W{let L=R.id(),W=d.value;return typeof L==typeof W&&L":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>te}],"filter-id->":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>W}],"filter-<=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L<=W}],"filter->=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>=W}],"filter-has":[ur,[Zr],(R,[d])=>d.value in R.properties()],"filter-has-id":[ur,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[ur,[yn(nr)],(R,[d])=>d.value.indexOf(R.geometryType())>=0],"filter-id-in":[ur,[yn(Zr)],(R,[d])=>d.value.indexOf(R.id())>=0],"filter-in-small":[ur,[nr,yn(Zr)],(R,[d,L])=>L.value.indexOf(R.properties()[d.value])>=0],"filter-in-large":[ur,[nr,yn(Zr)],(R,[d,L])=>function(W,te,ue,me){for(;ue<=me;){let ge=ue+me>>1;if(te[ge]===W)return!0;te[ge]>W?me=ge-1:ue=ge+1}return!1}(R.properties()[d.value],L.value,0,L.value.length-1)],all:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)&&L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(!L.evaluate(R))return!1;return!0}]]},any:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)||L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(L.evaluate(R))return!0;return!1}]]},"!":[ur,[ur],(R,[d])=>!d.evaluate(R)],"is-supported-script":[ur,[nr],(R,[d])=>{let L=R.globals&&R.globals.isSupportedScript;return!L||L(d.evaluate(R))}],upcase:[nr,[nr],(R,[d])=>d.evaluate(R).toUpperCase()],downcase:[nr,[nr],(R,[d])=>d.evaluate(R).toLowerCase()],concat:[nr,hu(Zr),(R,d)=>d.map(L=>Hi(L.evaluate(R))).join("")],split:[yn(nr),[nr,nr],(R,[d,L])=>d.evaluate(R).split(L.evaluate(R))],join:[nr,[yn(nr),nr],(R,[d,L])=>d.evaluate(R).join(L.evaluate(R))],"resolved-locale":[nr,[ha],(R,[d])=>d.evaluate(R).resolvedLocale()]});class kl{constructor(d,L,W){this.expression=d,this._warningHistory={},this._evaluator=new jo,this._defaultValue=L?function(te){if(te.type==="color"&&Ec(te.default))return new rn(0,0,0,0);switch(te.type){case"color":return rn.parse(te.default)||null;case"padding":return fn.parse(te.default)||null;case"numberArray":return Ai.parse(te.default)||null;case"colorArray":return jn.parse(te.default)||null;case"variableAnchorOffsetCollection":return gi.parse(te.default)||null;case"projectionDefinition":return io.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me,this.expression.evaluate(this._evaluator)}evaluate(d,L,W,te,ue,me){this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me||null;try{let ge=this.expression.evaluate(this._evaluator);if(ge==null||typeof ge=="number"&&ge!=ge)return this._defaultValue;if(this._enumValues&&!(ge in this._enumValues))throw new Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(ge)} instead.`);return ge}catch(ge){return this._warningHistory[ge.message]||(this._warningHistory[ge.message]=!0,typeof console<"u"&&console.warn(ge.message)),this._defaultValue}}}function kc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in _l}function Cc(R,d,L){let W=new Wo(_l,Uu,[],d?function(ue){let me={color:cr,string:nr,number:Rt,enum:nr,boolean:ur,formatted:Pa,padding:La,numberArray:Xa,colorArray:un,projectionDefinition:Rr,resolvedImage:ja,variableAnchorOffsetCollection:Nn};return ue.type==="array"?yn(me[ue.value]||Zr,ue.length):me[ue.type]}(d):void 0),te=W.parse(R,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?_f(new kl(te,d,L)):Mu(W.errors)}class Lc{constructor(d,L,W){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}}class vc{constructor(d,L,W,te,ue){this.kind=d,this.zoomStops=W,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=ue}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}interpolationFactor(d,L,W){return this.interpolationType?Pi.interpolationFactor(this.interpolationType,d,L,W):0}}function Ft(R,d,L){let W=Cc(R,d,L);if(W.result==="error")return W;let te=W.value.expression,ue=qu(te);if(!ue&&!ic(d))return Mu([new Sr("","data expressions not supported")]);let me=yf(te,["zoom"]);if(!me&&!Sc(d))return Mu([new Sr("","zoom expressions not supported")]);let ge=Fr(te);return ge||me?ge instanceof Sr?Mu([ge]):ge instanceof Pi&&!Vu(d)?Mu([new Sr("",'"interpolate" expressions cannot be used with this property')]):_f(ge?new vc(ue?"camera":"composite",W.value,ge.labels,ge instanceof Pi?ge.interpolation:void 0,L):new Lc(ue?"constant":"source",W.value,L)):Mu([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class tr{constructor(d,L){this._parameters=d,this._specification=L,Ht(this,Vf(this._parameters,this._specification))}static deserialize(d){return new tr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Fr(R){let d=null;if(R instanceof to)d=Fr(R.result);else if(R instanceof Dl){for(let L of R.args)if(d=Fr(L),d)break}else(R instanceof Ss||R instanceof Pi)&&R.input instanceof nl&&R.input.name==="zoom"&&(d=R);return d instanceof Sr||R.eachChild(L=>{let W=Fr(L);W instanceof Sr?d=W:!d&&W?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&W&&d!==W&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(R,d=new Set){return R instanceof $c&&d.add(R.key),R.eachChild(L=>{wr(L,d)}),d}function ea(R,d){let{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge}=R??{};return{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge,globalState:d}}function ba(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let d of R.slice(1))if(!ba(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Ia={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Na(R,d){if(R==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};ba(R)||(R=Da(R));let L=Cc(R,Ia,d);if(L.result==="error")throw new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,te,ue)=>L.value.evaluate(W,te,{},ue),needGeometry:mn(R),getGlobalStateRefs:()=>wr(L.value.expression)}}function Za(R,d){return Rd?1:0}function mn(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?Ha(R[1],R[2],d):d==="any"?(L=R.slice(1),["any"].concat(L.map(Da))):d==="all"?["all"].concat(R.slice(1).map(Da)):d==="none"?["all"].concat(R.slice(1).map(Da).map(Sn)):d==="in"?$a(R[1],R.slice(2)):d==="!in"?Sn($a(R[1],R.slice(2))):d==="has"?vn(R[1]):d!=="!has"||Sn(vn(R[1]));var L}function Ha(R,d,L){switch(R){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,R,d]}}function $a(R,d){if(d.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",R,["literal",d.sort(Za)]]:["filter-in-small",R,["literal",d]]}}function vn(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function Sn(R){return["!",R]}function yi(R){let d=typeof R;if(d==="number"||d==="boolean"||d==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let ue of R)te+=`${yi(ue)},`;return`${te}]`}let L=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new Vt(d,L,`${L} is greater than the maximum value ${W.maximum}`)]:[]}function Co(R){let d=R.valueSpec,L=ri(R.value.type),W,te,ue,me={},ge=L!=="categorical"&&R.value.property===void 0,Ce=!ge,Te=xo(R.value.stops)==="array"&&xo(R.value.stops[0])==="array"&&xo(R.value.stops[0][0])==="object",Oe=Ln({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(He){if(L==="identity")return[new Vt(He.key,He.value,'identity function may not have a "stops" property')];let bt=[],Et=He.value;return bt=bt.concat(Ni({key:He.key,value:Et,valueSpec:He.valueSpec,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,arrayElementValidator:Pe})),xo(Et)==="array"&&Et.length===0&&bt.push(new Vt(He.key,Et,"array must have at least one stop")),bt},default:function(He){return He.validateSpec({key:He.key,value:He.value,valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec})}}});return L==="identity"&&ge&&Oe.push(new Vt(R.key,R.value,'missing required property "property"')),L==="identity"||R.value.stops||Oe.push(new Vt(R.key,R.value,'missing required property "stops"')),L==="exponential"&&R.valueSpec.expression&&!Vu(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ce&&!ic(R.valueSpec)?Oe.push(new Vt(R.key,R.value,"property functions not supported")):ge&&!Sc(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"zoom functions not supported"))),L!=="categorical"&&!Te||R.value.property!==void 0||Oe.push(new Vt(R.key,R.value,'"property" property is required')),Oe;function Pe(He){let bt=[],Et=He.value,Qt=He.key;if(xo(Et)!=="array")return[new Vt(Qt,Et,`array expected, ${xo(Et)} found`)];if(Et.length!==2)return[new Vt(Qt,Et,`array length 2 expected, length ${Et.length} found`)];if(Te){if(xo(Et[0])!=="object")return[new Vt(Qt,Et,`object expected, ${xo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Vt(Qt,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Vt(Qt,Et,"object stop key must have value")];if(ue&&ue>ri(Et[0].zoom))return[new Vt(Qt,Et[0].zoom,"stop zoom values must appear in ascending order")];ri(Et[0].zoom)!==ue&&(ue=ri(Et[0].zoom),te=void 0,me={}),bt=bt.concat(Ln({key:`${Qt}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,objectElementValidators:{zoom:Zi,value:it}}))}else bt=bt.concat(it({key:`${Qt}[0]`,value:Et[0],validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec},Et));return kc(En(Et[1]))?bt.concat([new Vt(`${Qt}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(He.validateSpec({key:`${Qt}[1]`,value:Et[1],valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec}))}function it(He,bt){let Et=xo(He.value),Qt=ri(He.value),er=He.value!==null?He.value:bt;if(W){if(Et!==W)return[new Vt(He.key,er,`${Et} stop domain type must match previous stop domain type ${W}`)]}else W=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Vt(He.key,er,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let br=`number expected, ${Et} found`;return ic(d)&&L===void 0&&(br+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Vt(He.key,er,br)]}return L!=="categorical"||Et!=="number"||isFinite(Qt)&&Math.floor(Qt)===Qt?L!=="categorical"&&Et==="number"&&te!==void 0&&Qtnew Vt(`${R.key}${W.key}`,R.value,W.message));let L=d.value.expression||d.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!L.outputDefined())return[new Vt(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!yf(L,["zoom","feature-state"]))return[new Vt(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!qu(L))return[new Vt(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fo(R){let d=R.key,L=R.value,W=xo(L);return W!=="string"?[new Vt(d,L,`color expected, ${W} found`)]:rn.parse(String(L))?[]:[new Vt(d,L,`color expected, "${L}" found`)]}function Yo(R){let d=R.key,L=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${W.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(W.values).indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function bo(R){return ba(En(R.value))?Do(Ht({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Gs(R)}function Gs(R){let d=R.value,L=R.key;if(xo(d)!=="array")return[new Vt(L,d,`array expected, ${xo(d)} found`)];let W=R.styleSpec,te,ue=[];if(d.length<1)return[new Vt(L,d,"filter array must have at least 1 element")];switch(ue=ue.concat(Yo({key:`${L}[0]`,value:d[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),ri(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&ri(d[1])==="$type"&&ue.push(new Vt(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&ue.push(new Vt(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=xo(d[1]),te!=="string"&&ue.push(new Vt(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let me=2;me{Pe in te&&W.push(new Vt(ue,te[Pe],`"${Pe}" is prohibited for ref layers`))}),me.layers.forEach(Pe=>{ri(Pe.id)===Te&&(Oe=Pe)}),Oe?Oe.ref?W.push(new Vt(ue,te.ref,"ref cannot reference another ref layer")):Ce=ri(Oe.type):W.push(new Vt(ue,te.ref,`ref layer "${Te}" not found`))}else if(Ce!=="background")if(te.source){let Oe=me.sources&&me.sources[te.source],Pe=Oe&&ri(Oe.type);Oe?Pe==="vector"&&Ce==="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?W.push(new Vt(ue,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&Oe.lineMetrics||W.push(new Vt(ue,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):W.push(new Vt(ue,te,`layer "${te.id}" must specify a "source-layer"`)):W.push(new Vt(ue,te.source,`source "${te.source}" not found`))}else W.push(new Vt(ue,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&W.push(new Vt(ue,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),W=W.concat(Ln({key:ue,value:te,valueSpec:ge.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${ue}.type`,value:te.type,valueSpec:ge.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:te,objectKey:"type"}),filter:bo,layout:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>Kn(Ht({layerType:Ce},Pe))}}),paint:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>ns(Ht({layerType:Ce},Pe))}})}})),W}function gs(R){let d=R.value,L=R.key,W=xo(d);return W!=="string"?[new Vt(L,d,`string expected, ${W} found`)]:[]}let js={promoteId:function({key:R,value:d}){if(xo(d)==="string")return gs({key:R,value:d});{let L=[];for(let W in d)L.push(...gs({key:`${R}.${W}`,value:d[W]}));return L}}};function Cl(R){let d=R.value,L=R.key,W=R.styleSpec,te=R.style,ue=R.validateSpec;if(!d.type)return[new Vt(L,d,'"type" is required')];let me=ri(d.type),ge;switch(me){case"vector":case"raster":return ge=Ln({key:L,value:d,valueSpec:W[`source_${me.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:js,validateSpec:ue}),ge;case"raster-dem":return ge=function(Ce){var Te;let Oe=(Te=Ce.sourceName)!==null&&Te!==void 0?Te:"",Pe=Ce.value,it=Ce.styleSpec,He=it.source_raster_dem,bt=Ce.style,Et=[],Qt=xo(Pe);if(Pe===void 0)return Et;if(Qt!=="object")return Et.push(new Vt("source_raster_dem",Pe,`object expected, ${Qt} found`)),Et;let er=ri(Pe.encoding)==="custom",br=["redFactor","greenFactor","blueFactor","baseShift"],sr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!er&&br.includes(Mr)?Et.push(new Vt(Mr,Pe[Mr],`In "${Oe}": "${Mr}" is only valid when "encoding" is set to "custom". ${sr} encoding found`)):He[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:He[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:it})):Et.push(new Vt(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:R.style,styleSpec:W,validateSpec:ue}),ge;case"geojson":if(ge=Ln({key:L,value:d,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:ue,objectElementValidators:js}),d.cluster)for(let Ce in d.clusterProperties){let[Te,Oe]=d.clusterProperties[Ce],Pe=typeof Te=="string"?[Te,["accumulated"],["get",Ce]]:Te;ge.push(...Do({key:`${L}.${Ce}.map`,value:Oe,expressionContext:"cluster-map"})),ge.push(...Do({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return ge;case"video":return Ln({key:L,value:d,valueSpec:W.source_video,style:te,validateSpec:ue,styleSpec:W});case"image":return Ln({key:L,value:d,valueSpec:W.source_image,style:te,validateSpec:ue,styleSpec:W});case"canvas":return[new Vt(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yo({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function zl(R){let d=R.value,L=R.styleSpec,W=L.light,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("light",d,`object expected, ${me} found`)]),ue;for(let ge in d){let Ce=ge.match(/^(.*)-transition$/);ue=ue.concat(Ce&&W[Ce[1]]&&W[Ce[1]].transition?R.validateSpec({key:ge,value:d[ge],valueSpec:L.transition,validateSpec:R.validateSpec,style:te,styleSpec:L}):W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)])}return ue}function Kl(R){let d=R.value,L=R.styleSpec,W=L.sky,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("sky",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me}function Gu(R){let d=R.value,L=R.styleSpec,W=L.terrain,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("terrain",d,`object expected, ${me} found`)]),ue;for(let ge in d)ue=ue.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return ue}function xl(R){let d=[],L=R.value,W=R.key;if(Array.isArray(L)){let te=[],ue=[];for(let me in L)L[me].id&&te.includes(L[me].id)&&d.push(new Vt(W,L,`all the sprites' ids must be unique, but ${L[me].id} is duplicated`)),te.push(L[me].id),L[me].url&&ue.includes(L[me].url)&&d.push(new Vt(W,L,`all the sprites' URLs must be unique, but ${L[me].url} is duplicated`)),ue.push(L[me].url),d=d.concat(Ln({key:`${W}[${me}]`,value:L[me],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return d}return gs({key:W,value:L})}function Hu(R){return!!R&&R.constructor===Object}function Su(R){return Hu(R.value)?[]:[new Vt(R.key,R.value,`object expected, ${xo(R.value)} found`)]}let mc={"*":()=>[],array:Ni,boolean:function(R){let d=R.value,L=R.key,W=xo(d);return W!=="boolean"?[new Vt(L,d,`boolean expected, ${W} found`)]:[]},number:Zi,color:Fo,constants:ki,enum:Yo,filter:bo,function:Co,layer:zo,object:Ln,source:Cl,light:zl,sky:Kl,terrain:Gu,projection:function(R){let d=R.value,L=R.styleSpec,W=L.projection,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("projection",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me},projectionDefinition:function(R){let d=R.key,L=R.value;L=L instanceof String?L.valueOf():L;let W=xo(L);return W!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(W)?[]:[new Vt(d,L,`projection expected, invalid type "${W}" found`)]:[new Vt(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:gs,formatted:function(R){return gs(R).length===0?[]:Do(R)},resolvedImage:function(R){return gs(R).length===0?[]:Do(R)},padding:function(R){let d=R.key,L=R.value;if(xo(L)==="array"){if(L.length<1||L.length>4)return[new Vt(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let W={type:"number"},te=[];for(let ue=0;ue[]}})),R.constants&&(L=L.concat(ki({key:"constants",value:R.constants}))),Ql(L)}function Jl(R){return function(d){return R(Object.assign({},d,{validateSpec:Jc}))}}function Ql(R){return[].concat(R).sort((d,L)=>d.line-L.line)}function Eu(R){return function(...d){return Ql(R.apply(this,d))}}du.source=Eu(Jl(Cl)),du.sprite=Eu(Jl(xl)),du.glyphs=Eu(Jl(oc)),du.light=Eu(Jl(zl)),du.sky=Eu(Jl(Kl)),du.terrain=Eu(Jl(Gu)),du.state=Eu(Jl(Su)),du.layer=Eu(Jl(zo)),du.filter=Eu(Jl(bo)),du.paintProperty=Eu(Jl(ns)),du.layoutProperty=Eu(Jl(Kn));let bf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class lh{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=Cc(d,bf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Pc=ht,Ks=du,Bl=Ks.light,Wu=Ks.sky,wf=Ks.paintProperty,Qc=Ks.layoutProperty;function ku(R,d){let L=!1;if(d?.length)for(let W of d)R.fire(new Ot(new Error(W.message))),L=!0;return L}class Ol{constructor(d,L,W){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let me=new Int32Array(this.arrayBuffer);d=me[0],this.d=(L=me[1])+2*(W=me[2]);for(let Ce=0;Ce=Pe[He+0]&&te>=Pe[He+1])?(ge[it]=!0,me.push(Oe[it])):ge[it]=!1}}}_forEachCell(d,L,W,te,ue,me,ge,Ce){let Te=this._convertToCellCoord(d),Oe=this._convertToCellCoord(L),Pe=this._convertToCellCoord(W),it=this._convertToCellCoord(te);for(let He=Te;He<=Pe;He++)for(let bt=Oe;bt<=it;bt++){let Et=this.d*bt+He;if((!Ce||Ce(this._convertFromCellCoord(He),this._convertFromCellCoord(bt),this._convertFromCellCoord(He+1),this._convertFromCellCoord(bt+1)))&&ue.call(this,d,L,W,te,Et,me,ge,Ce))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,L=3+this.cells.length+1+1,W=0;for(let me of this.cells)W+=me.length;let te=new Int32Array(L+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let ue=L;for(let me=0;meW?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let Jr=jr(["Arab","Dupl","Mong","Ougr","Syrc"]);function la(R){return!Jr.test(String.fromCodePoint(R))}function xa(R){return!(Wt(R)||(d=R,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Ba=jr(["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 an(R){return Ba.test(String.fromCodePoint(R))}function wn(R,d){return!(!d&&an(R)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(R)))}function ii(R){for(let d of R)if(an(d.codePointAt(0)))return!0;return!1}let Si=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){if(Si.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(R,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(R.pluginStatus!=="loading")return this.setState(R),R;let L=R.pluginURL,W=new Promise(ue=>{this.loadScriptResolve=ue});d(L);let te=new Promise(ue=>setTimeout(()=>ue(),this.TIMEOUT));if(yield Promise.race([W,te]),this.isParsed()){let ue={pluginStatus:"loaded",pluginURL:L};return this.setState(ue),ue}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class oi{constructor(d,L){this.isSupportedScript=Ji,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Bt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),W=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*L}}}function Ji(R){return function(d,L){for(let W of d)if(!wn(W.codePointAt(0),L))return!1;return!0}(R,Si.getRTLTextPluginStatus()==="loaded")}let Qi="-transition";class Oo{constructor(d,L,W){this.property=d,this.value=L,this.expression=function(te,ue,me){if(Ec(te))return new tr(te,ue);if(kc(te)){let ge=Ft(te,ue,me);if(ge.result==="error")throw new Error(ge.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return ge.value}{let ge=te;return ue.type==="color"&&typeof te=="string"?ge=rn.parse(te):ue.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?ue.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?ge=gi.parse(te):ue.type==="projectionDefinition"&&typeof te=="string"&&(ge=io.parse(te)):ge=jn.parse(te):ge=Ai.parse(te):ge=fn.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>ge}}}(L===void 0?d.specification.default:L,d.specification,W)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,W){return this.property.possiblyEvaluate(this,d,L,W)}}class Qo{constructor(d,L){this.property=d,this.value=new Oo(d,void 0,L)}transitioned(d,L){return new ys(this.property,this.value,L,X({},d.transition,this.transition),d.now)}untransitioned(){return new ys(this.property,this.value,null,{},0)}}class vo{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].value=new Oo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let W=this.getValue(L);W!==void 0&&(d[L]=W);let te=this.getTransition(L);te!==void 0&&(d[`${L}${Qi}`]=te)}return d}transitioned(d,L){let W=new ol(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(d,L._values[te]);return W}untransitioned(){let d=new ol(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class ys{constructor(d,L,W,te,ue){this.property=d,this.value=L,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(d,L,W){let te=d.now||0,ue=this.value.possiblyEvaluate(d,L,W),me=this.prior;if(me){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class sc{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let ue=d.expression.evaluate(L,null,{},W,te);return this._calculate(ue,ue,ue,L)}return this._calculate(d.expression.evaluate(new oi(Math.floor(L.zoom-1),L)),d.expression.evaluate(new oi(Math.floor(L.zoom),L)),d.expression.evaluate(new oi(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){return!!d.expression.evaluate(L,null,{},W,te)}interpolate(){return!1}}class Ps{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let W=d[L];W.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Oo(W,void 0,void 0),ue=this.defaultTransitionablePropertyValues[L]=new Qo(W,void 0);this.defaultTransitioningPropertyValues[L]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}fi("DataDrivenProperty",wi),fi("DataConstantProperty",hi),fi("CrossFadedDataDrivenProperty",sl),fi("CrossFadedProperty",sc),fi("ColorRampProperty",tu);let gc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",pu=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class ll extends vt{constructor(d,L,W){if(super(),this.id=d.id,this.type=d.type,this._globalState=W,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,ue){return new lh(te,ue)}(this.visibility,W),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,this._featureFilter=Na(d.filter,W)),L.layout&&(this._unevaluatedLayout=new jl(L.layout,W)),L.paint)){this._transitionablePaint=new vo(L.paint,W);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Cu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Na(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+gc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let W=this._unevaluatedLayout._values[L];for(let te of W.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let W in this._transitionablePaint._values){let te=this._transitionablePaint._values[W].value;for(let ue of te.getGlobalStateRefs()){let me=(d=L.get(ue))!==null&&d!==void 0?d:[];me.push({name:W,value:te.value}),L.set(ue,me)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,W={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+gc))):L!=null&&this._validate(Qc,`layers.${this.id}.layout.${d}`,d,L,W)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,W;if(d.endsWith(Qi)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+pu);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((W=this._unevaluatedLayout)===null||W===void 0)&&W.hasProperty(d))throw new Error(d+pu);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,W={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+pu))),!1;if(L!=null&&this._validate(wf,`layers.${this.id}.paint.${d}`,d,L,W))return!1;if(d.endsWith(Qi))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let ue=this._transitionablePaint._values[d],me=ue.property.specification["property-type"]==="cross-faded-data-driven",ge=ue.value.isDataDriven(),Ce=ue.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let Te=this._transitionablePaint._values[d].value;return Te.isDataDriven()||ge||me||this._handleOverridablePaintPropertyUpdate(d,Ce,Te)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,W){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let W={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:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(W.layout||(W.layout={}),W.layout.visibility=this.visibility),Y(W,(te,ue)=>!(te===void 0||ue==="layout"&&!Object.keys(te).length||ue==="paint"&&!Object.keys(te).length))}_validate(d,L,W,te,ue={}){return ue?.validate!==!1&&ku(this,d.call(Ks,{key:L,layerType:this.type,objectKey:W,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Hs&&ic(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let ef;var de={get paint(){return ef=ef||new Ps({"raster-opacity":new hi(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new hi(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new hi(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new hi(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new hi(ht.paint_raster["raster-saturation"]),"raster-contrast":new hi(ht.paint_raster["raster-contrast"]),resampling:new hi(ht.paint_raster.resampling),"raster-resampling":new hi(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new hi(ht.paint_raster["raster-fade-duration"])})}};class Ee extends ll{constructor(d,L){super(d,de,L)}}let qe={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class tt{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class at{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_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 L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ct(R,d=1){let L=0,W=0;return{members:R.map(te=>{let ue=qe[te.type].BYTES_PER_ELEMENT,me=L=Nt(L,Math.max(d,ue)),ge=te.components||1;return W=Math.max(W,ue),L+=ue*ge,{name:te.name,type:te.type,components:ge,offset:me}}),size:Nt(L,Math.max(W,d)),alignment:d}}function Nt(R,d){return Math.ceil(R/d)*d}class St extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=W,d}}St.prototype.bytesPerElement=4,fi("StructArrayLayout2i4",St);class Jt extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.int16[ue+0]=L,this.int16[ue+1]=W,this.int16[ue+2]=te,d}}Jt.prototype.bytesPerElement=6,fi("StructArrayLayout3i6",Jt);class mr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.int16[me+0]=L,this.int16[me+1]=W,this.int16[me+2]=te,this.int16[me+3]=ue,d}}mr.prototype.bytesPerElement=8,fi("StructArrayLayout4i8",mr);class gr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}gr.prototype.bytesPerElement=12,fi("StructArrayLayout2i4i12",gr);class Hr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=4*d,Te=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.uint8[Te+4]=te,this.uint8[Te+5]=ue,this.uint8[Te+6]=me,this.uint8[Te+7]=ge,d}}Hr.prototype.bytesPerElement=8,fi("StructArrayLayout2i4ub8",Hr);class Vr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=W,d}}Vr.prototype.bytesPerElement=8,fi("StructArrayLayout2f8",Vr);class ca extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,W,te,ue,me,ge,Ce,Te,Oe)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=10*d;return this.uint16[it+0]=L,this.uint16[it+1]=W,this.uint16[it+2]=te,this.uint16[it+3]=ue,this.uint16[it+4]=me,this.uint16[it+5]=ge,this.uint16[it+6]=Ce,this.uint16[it+7]=Te,this.uint16[it+8]=Oe,this.uint16[it+9]=Pe,d}}ca.prototype.bytesPerElement=20,fi("StructArrayLayout10ui20",ca);class Aa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce){let Te=this.length;return this.resize(Te+1),this.emplace(Te,d,L,W,te,ue,me,ge,Ce)}emplace(d,L,W,te,ue,me,ge,Ce,Te){let Oe=8*d;return this.uint16[Oe+0]=L,this.uint16[Oe+1]=W,this.uint16[Oe+2]=te,this.uint16[Oe+3]=ue,this.uint16[Oe+4]=me,this.uint16[Oe+5]=ge,this.uint16[Oe+6]=Ce,this.uint16[Oe+7]=Te,d}}Aa.prototype.bytesPerElement=16,fi("StructArrayLayout8ui16",Aa);class Yr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it){let He=this.length;return this.resize(He+1),this.emplace(He,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=W,this.int16[bt+2]=te,this.int16[bt+3]=ue,this.uint16[bt+4]=me,this.uint16[bt+5]=ge,this.uint16[bt+6]=Ce,this.uint16[bt+7]=Te,this.int16[bt+8]=Oe,this.int16[bt+9]=Pe,this.int16[bt+10]=it,this.int16[bt+11]=He,d}}Yr.prototype.bytesPerElement=24,fi("StructArrayLayout4i4ui4i24",Yr);class oa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.float32[ue+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}oa.prototype.bytesPerElement=12,fi("StructArrayLayout3f12",oa);class fa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}fa.prototype.bytesPerElement=4,fi("StructArrayLayout1ul4",fa);class Ea extends at{_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,L,W,te,ue,me,ge,Ce,Te){let Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,d,L,W,te,ue,me,ge,Ce,Te)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=10*d,it=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=W,this.int16[Pe+2]=te,this.int16[Pe+3]=ue,this.int16[Pe+4]=me,this.int16[Pe+5]=ge,this.uint32[it+3]=Ce,this.uint16[Pe+8]=Te,this.uint16[Pe+9]=Oe,d}}Ea.prototype.bytesPerElement=20,fi("StructArrayLayout6i1ul2ui20",Ea);class Ma extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}Ma.prototype.bytesPerElement=12,fi("StructArrayLayout2i2i2i12",Ma);class sa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,ue)}emplace(d,L,W,te,ue,me){let ge=4*d,Ce=8*d;return this.float32[ge+0]=L,this.float32[ge+1]=W,this.float32[ge+2]=te,this.int16[Ce+6]=ue,this.int16[Ce+7]=me,d}}sa.prototype.bytesPerElement=16,fi("StructArrayLayout2f1f2i16",sa);class hn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=16*d,Te=4*d,Oe=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=W,this.float32[Te+1]=te,this.float32[Te+2]=ue,this.int16[Oe+6]=me,this.int16[Oe+7]=ge,d}}hn.prototype.bytesPerElement=16,fi("StructArrayLayout2ub2f2i16",hn);class Tn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[ue+0]=L,this.uint16[ue+1]=W,this.uint16[ue+2]=te,d}}Tn.prototype.bytesPerElement=6,fi("StructArrayLayout3ui6",Tn);class zn extends at{_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,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er){let br=this.length;return this.resize(br+1),this.emplace(br,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br){let sr=24*d,Mr=12*d,qr=48*d;return this.int16[sr+0]=L,this.int16[sr+1]=W,this.uint16[sr+2]=te,this.uint16[sr+3]=ue,this.uint32[Mr+2]=me,this.uint32[Mr+3]=ge,this.uint32[Mr+4]=Ce,this.uint16[sr+10]=Te,this.uint16[sr+11]=Oe,this.uint16[sr+12]=Pe,this.float32[Mr+7]=it,this.float32[Mr+8]=He,this.uint8[qr+36]=bt,this.uint8[qr+37]=Et,this.uint8[qr+38]=Qt,this.uint32[Mr+10]=er,this.int16[sr+22]=br,d}}zn.prototype.bytesPerElement=48,fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",zn);class $n extends at{_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,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn){let gn=this.length;return this.resize(gn+1),this.emplace(gn,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn,gn){let Va=32*d,Hn=16*d;return this.int16[Va+0]=L,this.int16[Va+1]=W,this.int16[Va+2]=te,this.int16[Va+3]=ue,this.int16[Va+4]=me,this.int16[Va+5]=ge,this.int16[Va+6]=Ce,this.int16[Va+7]=Te,this.uint16[Va+8]=Oe,this.uint16[Va+9]=Pe,this.uint16[Va+10]=it,this.uint16[Va+11]=He,this.uint16[Va+12]=bt,this.uint16[Va+13]=Et,this.uint16[Va+14]=Qt,this.uint16[Va+15]=er,this.uint16[Va+16]=br,this.uint16[Va+17]=sr,this.uint16[Va+18]=Mr,this.uint16[Va+19]=qr,this.uint16[Va+20]=$r,this.uint16[Va+21]=_a,this.uint16[Va+22]=Ca,this.uint32[Hn+12]=nn,this.float32[Hn+13]=qa,this.float32[Hn+14]=bn,this.uint16[Va+30]=Fn,this.uint16[Va+31]=gn,d}}$n.prototype.bytesPerElement=64,fi("StructArrayLayout8i15ui1ul2f2ui64",$n);class xi extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}xi.prototype.bytesPerElement=4,fi("StructArrayLayout1f4",xi);class di extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[6*d+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}di.prototype.bytesPerElement=12,fi("StructArrayLayout1ui2f12",di);class uo extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=4*d;return this.uint32[2*d+0]=L,this.uint16[ue+2]=W,this.uint16[ue+3]=te,d}}uo.prototype.bytesPerElement=8,fi("StructArrayLayout1ul2ui8",uo);class pe extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=W,d}}pe.prototype.bytesPerElement=4,fi("StructArrayLayout2ui4",pe);class y extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,fi("StructArrayLayout1ui2",y);class N extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.float32[me+0]=L,this.float32[me+1]=W,this.float32[me+2]=te,this.float32[me+3]=ue,d}}N.prototype.bytesPerElement=16,fi("StructArrayLayout4f16",N);class ie extends tt{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 t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class fe extends Ea{get(d){return new ie(this,d)}}fi("CollisionBoxArray",fe);class be extends tt{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]}}be.prototype.size=48;class Re extends zn{get(d){return new be(this,d)}}fi("PlacedSymbolArray",Re);class je extends tt{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]}}je.prototype.size=64;class Ze extends $n{get(d){return new je(this,d)}}fi("SymbolInstanceArray",Ze);class ut extends xi{getoffsetX(d){return this.float32[1*d+0]}}fi("GlyphOffsetArray",ut);class ft extends Jt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}fi("SymbolLineVertexArray",ft);class Dt extends tt{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]}}Dt.prototype.size=12;class Gt extends di{get(d){return new Dt(this,d)}}fi("TextAnchorOffsetArray",Gt);class Kt extends tt{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]}}Kt.prototype.size=8;class st extends uo{get(d){return new Kt(this,d)}}fi("FeatureIndexArray",st);class It extends St{}class Ut extends St{}class ir extends St{}class dr extends gr{}class Ar extends Hr{}class hr extends Vr{}class vr extends ca{}class Or extends Aa{}class Cr extends Yr{}class ta extends oa{}class ka extends fa{}class Ta extends Ma{}class Ra extends hn{}class ua extends Tn{}class ia extends pe{}let ma=ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:da}=ma;class Fa{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,W,te){let ue=this.segments[this.segments.length-1];return d>Fa.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Fa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Fa.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!ue||ue.vertexLength+d>Fa.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te?this.createNewSegment(L,W,te):ue}createNewSegment(d,L,W){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return W!==void 0&&(te.sortKey=W),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,W){return this.prepareSegment(0,d,L,W)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,W,te){return new Fa([{vertexOffset:d,primitiveOffset:L,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function za(R,d){return 256*(R=se(Math.floor(R),0,255))+se(Math.floor(d),0,255)}Fa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fi("SegmentVector",Fa);let kn=ct([{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"}]),Dn=ct([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var ui,cn,sn,ei={exports:{}},Pn={exports:{}},Rn={exports:{}},In=function(){if(sn)return ei.exports;sn=1;var R=(ui||(ui=1,Pn.exports=function(L,W){var te,ue,me,ge,Ce,Te,Oe,Pe;for(ue=L.length-(te=3&L.length),me=W,Ce=3432918353,Te=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295)<<13|me>>>19))+((5*(me>>>16)&65535)<<16)&4294967295))+((58964+(ge>>>16)&65535)<<16);switch(Oe=0,te){case 3:Oe^=(255&L.charCodeAt(Pe+2))<<16;case 2:Oe^=(255&L.charCodeAt(Pe+1))<<8;case 1:me^=Oe=(65535&(Oe=(Oe=(65535&(Oe^=255&L.charCodeAt(Pe)))*Ce+(((Oe>>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295}return me^=L.length,me=2246822507*(65535&(me^=me>>>16))+((2246822507*(me>>>16)&65535)<<16)&4294967295,me=3266489909*(65535&(me^=me>>>13))+((3266489909*(me>>>16)&65535)<<16)&4294967295,(me^=me>>>16)>>>0}),Pn.exports),d=(cn||(cn=1,Rn.exports=function(L,W){for(var te,ue=L.length,me=W^ue,ge=0;ue>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(ge)|(255&L.charCodeAt(++ge))<<8|(255&L.charCodeAt(++ge))<<16|(255&L.charCodeAt(++ge))<<24))+((1540483477*(te>>>16)&65535)<<16),me=1540483477*(65535&me)+((1540483477*(me>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),ue-=4,++ge;switch(ue){case 3:me^=(255&L.charCodeAt(ge+2))<<16;case 2:me^=(255&L.charCodeAt(ge+1))<<8;case 1:me=1540483477*(65535&(me^=255&L.charCodeAt(ge)))+((1540483477*(me>>>16)&65535)<<16)}return me=1540483477*(65535&(me^=me>>>13))+((1540483477*(me>>>16)&65535)<<16),(me^=me>>>15)>>>0}),Rn.exports);return ei.exports=R,ei.exports.murmur3=R,ei.exports.murmur2=d,ei.exports}(),Jn=n(In);class Ei{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,W,te){this.ids.push(so(d)),this.positions.push(L,W,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=so(d),W=0,te=this.ids.length-1;for(;W>1;this.ids[me]>=L?te=me:W=me+1}let ue=[];for(;this.ids[W]===L;)ue.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return ue}static serialize(d,L){let W=new Float64Array(d.ids),te=new Uint32Array(d.positions);return ti(W,te,0,W.length-1),L&&L.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(d){let L=new Ei;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function so(R){let d=+R;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:Jn(String(R))}function ti(R,d,L,W){for(;L>1],ue=L-1,me=W+1;for(;;){do ue++;while(R[ue]te);if(ue>=me)break;bi(R,ue,me),bi(d,3*ue,3*me),bi(d,3*ue+1,3*me+1),bi(d,3*ue+2,3*me+2)}me-L`u_${te}`),this.type=W}setUniform(d,L,W){d.set(W.constantOr(this.value))}getBinding(d,L,W){return this.type==="color"?new zs(d,L):new ro(d,L)}}class Zo{constructor(d,L){this.uniformNames=L.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,W,te){let ue=null;te==="u_pattern_to"?ue=this.patternTo:te==="u_pattern_from"?ue=this.patternFrom:te==="u_dasharray_to"?ue=this.dashTo:te==="u_dasharray_from"?ue=this.dashFrom:te==="u_pixel_ratio_to"?ue=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(ue=this.pixelRatioFrom),ue!==null&&d.set(ue)}getBinding(d,L,W){return W.startsWith("u_pattern")||W.startsWith("u_dasharray_")?new Mo(d,L):new ro(d,L)}}class es{constructor(d,L,W,te){this.expression=d,this.type=W,this.maxValue=0,this.paintVertexAttributes=L.map(ue=>({name:`a_${ue}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,W){let te=this.paintVertexArray.length,ue=this.expression.evaluate(new oi(0,W),L,{},W.canonical,[],W.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(0,ue),W,te);this._setPaintValue(d,L,me)}_setPaintValue(d,L,W){if(this.type==="color"){let te=So(W);for(let ue=d;ue`u_${ge}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=L.map(ge=>({name:`a_${ge}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new me}populatePaintArray(d,L,W){let te=this.expression.evaluate(new oi(this.zoom,W),L,{},W.canonical,[],W.formattedSection),ue=this.expression.evaluate(new oi(this.zoom+1,W),L,{},W.canonical,[],W.formattedSection),me=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(me,d,te,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(this.zoom,ue),W,te),ge=this.expression.evaluate(new oi(this.zoom+1,ue),W,te);this._setPaintValue(d,L,me,ge)}_setPaintValue(d,L,W,te){if(this.type==="color"){let ue=So(W),me=So(te);for(let ge=d;ge`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof es||W instanceof $o)for(let te of W.paintVertexAttributes)d.push(te.name);else if(W instanceof _s){let te=W.getVertexAttributes();for(let ue of te)d.push(ue.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof Ws||W instanceof Zo||W instanceof $o)for(let te of W.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let W=[];for(let te in this.binders){let ue=this.binders[te];if(ue instanceof Ws||ue instanceof Zo||ue instanceof $o){for(let me of ue.uniformNames)if(L[me]){let ge=ue.getBinding(d,L[me],me);W.push({name:me,property:te,binding:ge})}}}return W}setUniforms(d,L,W,te){for(let{name:ue,property:me,binding:ge}of L)this.binders[me].setUniform(ge,te,W.get(me),ue)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let W=this.binders[L];if(d&&W instanceof _s){let te=d.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof es||W instanceof $o)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(d){for(let L in this.binders){let W=this.binders[L];(W instanceof es||W instanceof $o||W instanceof _s)&&W.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof es||L instanceof $o||L instanceof _s)&&L.destroy()}}}class mo{constructor(d,L,W=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Ll(te,L,W);this.needsUpload=!1,this._featureMap=new Ei,this._bufferOffset=0}populatePaintArrays(d,L,W,te){for(let ue in this.programConfigurations)this.programConfigurations[ue].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,W,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,W,te){for(let ue of W)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(d,this._featureMap,L,ue,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(R,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-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${d}-`,"").replace(/-/g,"_")]}function Rs(R,d,L){let W={color:{source:Vr,composite:N},number:{source:xi,composite:Vr}},te=function(ue){return{"line-pattern":{source:vr,composite:vr},"fill-pattern":{source:vr,composite:vr},"fill-extrusion-pattern":{source:vr,composite:vr},"line-dasharray":{source:Or,composite:Or}}[ue]}(R);return te?.[L]||W[d][L]}fi("ConstantBinder",Ws),fi("CrossFadedConstantBinder",Zo),fi("SourceExpressionBinder",es),fi("CrossFadedPatternBinder",Go),fi("CrossFadedDasharrayBinder",Ys),fi("CompositeExpressionBinder",$o),fi("ProgramConfiguration",Ll,{omit:["_buffers"]}),fi("ProgramConfigurationSet",mo);let Yu=Math.pow(2,14)-1,Ul=-Yu-1;function ql(R){let d=F/R.extent,L=R.loadGeometry();for(let W of L)for(let te of W){let ue=Math.round(te.x*d),me=Math.round(te.y*d);te.x=se(ue,Ul,Yu),te.y=se(me,Ul,Yu),(uete.x+1||mete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function fo(R,d){return{type:R.type,id:R.id,properties:R.properties,geometry:d?ql(R):[]}}let Xo=-32768;function Os(R,d,L,W,te){R.emplaceBack(Xo+8*d+W,Xo+8*L+te)}class ra{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new Ut,this.indexArray=new ua,this.segments=new Fa,this.programConfigurations=new mo(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){let te=this.layers[0],ue=[],me=null,ge=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let Oe=te;me=Oe.layout.get("circle-sort-key"),ge=!me.isConstant(),Ce||(Ce=Oe.paint.get("circle-pitch-alignment")==="map")}let Te=Ce?L.subdivisionGranularity.circle:1;for(let{feature:Oe,id:Pe,index:it,sourceLayerIndex:He}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=fo(Oe,bt);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Et,W))continue;let Qt=ge?me.evaluate(Et,{},W):void 0,er={id:Pe,properties:Oe.properties,type:Oe.type,sourceLayerIndex:He,index:it,geometry:bt?Et.geometry:ql(Oe),patterns:{},sortKey:Qt};ue.push(er)}ge&&ue.sort((Oe,Pe)=>Oe.sortKey-Pe.sortKey);for(let Oe of ue){let{geometry:Pe,index:it,sourceLayerIndex:He}=Oe,bt=d[it].feature;this.addFeature(Oe,Pe,it,W,Te),L.featureIndex.insert(bt,Pe,it,He,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,da),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,L,W,te,ue=1){let me;switch(ue){case 1:me=[0,7];break;case 3:me=[0,2,5,7];break;case 5:me=[0,1,3,4,6,7];break;case 7:me=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${ue}; valid values are 1, 3, 5, 7.`)}let ge=me.length;for(let Ce of L)for(let Te of Ce){let Oe=Te.x,Pe=Te.y;if(Oe<0||Oe>=F||Pe<0||Pe>=F)continue;let it=this.segments.prepareSegment(ge*ge,this.layoutVertexArray,this.indexArray,d.sortKey),He=it.vertexLength;for(let bt=0;bt1){if(Is(R,d))return!0;for(let W of d)if(Wr(W,R,L))return!0}for(let W of R)if(Wr(W,d,L))return!0;return!1}function Is(R,d){if(R.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function pa(R,d){let L,W,te,ue=!1;for(let me of R){L=me;for(let ge=0,Ce=L.length-1;ged.y!=te.y>d.y&&d.x<(te.x-W.x)*(d.y-W.y)/(te.y-W.y)+W.x&&(ue=!ue)}return ue}function Wa(R,d){let L=!1;for(let W=0,te=R.length-1;Wd.y!=me.y>d.y&&d.x<(me.x-ue.x)*(d.y-ue.y)/(me.y-ue.y)+ue.x&&(L=!L)}return L}function ln(R,d,L){let W=L[0],te=L[2];if(R.xte.x&&d.x>te.x||R.yte.y&&d.y>te.y)return!1;let ue=ae(R,d,L[0]);return ue!==ae(R,d,L[1])||ue!==ae(R,d,L[2])||ue!==ae(R,d,L[3])}function Le(R,d,L){let W=d.paint.get(R).value;return W.kind==="constant"?W.value:L.programConfigurations.get(d.id).getMaxValue(R)}function Ue(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qe(R,d,L,W,te){if(!d[0]&&!d[1])return R;let ue=t.convert(d)._mult(te);L==="viewport"&&ue._rotate(-W);let me=[];for(let ge of R)me.push(ge.sub(ue));return me}function _t(R){let d=[];for(let L=0;LQa(sr,Qt,er,br))}(Te,ue,ge,Ce),bt=Oe),va({queryGeometry:He,size:bt,transform:ue,unwrappedTileID:ge,getElevation:Ce,pitchAlignment:it,pitchScale:Pe},te)}}class _n extends ra{}let Mn;fi("HeatmapBucket",_n,{omit:["layers"]});var Bn={get paint(){return Mn=Mn||new Ps({"heatmap-radius":new wi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new wi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new hi(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new hi(ht.paint_heatmap["heatmap-opacity"])})}};function Zn(R,{width:d,height:L},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*W}`)}else te=new Uint8Array(d*L*W);return R.width=d,R.height=L,R.data=te,R}function Ci(R,{width:d,height:L},W){if(d===R.width&&L===R.height)return;let te=Zn({},{width:d,height:L},W);qo(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,d),height:Math.min(R.height,L)},W),R.width=d,R.height=L,R.data=te.data}function qo(R,d,L,W,te,ue){if(te.width===0||te.height===0)return d;if(te.width>R.width||te.height>R.height||L.x>R.width-te.width||L.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||W.x>d.width-te.width||W.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let me=R.data,ge=d.data;if(me===ge)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[R.evaluationKey]=Ce;let Te=R.expression.evaluate(d);te.setPixel(me/4/L,ge/4,Te)};if(R.clips)for(let me=0,ge=0;methis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,W){return d*this.redFactor+L*this.greenFactor+W*this.blueFactor-this.baseShift}pack(d){return gp(d,this.getUnpackVector())}getPixels(){return new ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,W){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,ue=L*this.dim+this.dim,me=W*this.dim,ge=W*this.dim+this.dim;switch(L){case-1:te=ue-1;break;case 1:ue=te+1}switch(W){case-1:me=ge-1;break;case 1:ge=me+1}let Ce=-L*this.dim,Te=-W*this.dim;for(let Oe=me;Oe0)for(let me=d;me=d;me-=W)ue=m4(me/W|0,R[me],R[me+1],ue);return ue&&g0(ue,ue.next)&&(Ag(ue),ue=ue.next),ue}function Hd(R,d){if(!R)return R;d||(d=R);let L,W=R;do if(L=!1,W.steiner||!g0(W,W.next)&&Xu(W.prev,W,W.next)!==0)W=W.next;else{if(Ag(W),W=d=W.prev,W===W.next)break;L=!0}while(L||W!==d);return d}function _p(R,d,L,W,te,ue,me){if(!R)return;!me&&ue&&function(Ce,Te,Oe,Pe){let it=Ce;do it.z===0&&(it.z=t3(it.x,it.y,Te,Oe,Pe)),it.prevZ=it.prev,it.nextZ=it.next,it=it.next;while(it!==Ce);it.prevZ.nextZ=null,it.prevZ=null,function(He){let bt,Et=1;do{let Qt,er=He;He=null;let br=null;for(bt=0;er;){bt++;let sr=er,Mr=0;for(let $r=0;$r0||qr>0&&sr;)Mr!==0&&(qr===0||!sr||er.z<=sr.z)?(Qt=er,er=er.nextZ,Mr--):(Qt=sr,sr=sr.nextZ,qr--),br?br.nextZ=Qt:He=Qt,Qt.prevZ=br,br=Qt;er=sr}br.nextZ=null,Et*=2}while(bt>1)}(it)}(R,W,te,ue);let ge=R;for(;R.prev!==R.next;){let Ce=R.prev,Te=R.next;if(ue?GH(R,W,te,ue):bg(R))d.push(Ce.i,R.i,Te.i),Ag(R),R=Te.next,ge=Te.next;else if((R=Te)===ge){me?me===1?_p(R=HH(Hd(R),d),d,L,W,te,ue,2):me===2&&WH(R,d,L,W,te,ue):_p(Hd(R),d,L,W,te,ue,1);break}}}function bg(R){let d=R.prev,L=R,W=R.next;if(Xu(d,L,W)>=0)return!1;let te=d.x,ue=L.x,me=W.x,ge=d.y,Ce=L.y,Te=W.y,Oe=Math.min(te,ue,me),Pe=Math.min(ge,Ce,Te),it=Math.max(te,ue,me),He=Math.max(ge,Ce,Te),bt=W.next;for(;bt!==d;){if(bt.x>=Oe&&bt.x<=it&&bt.y>=Pe&&bt.y<=He&&wg(te,ge,ue,Ce,me,Te,bt.x,bt.y)&&Xu(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function GH(R,d,L,W){let te=R.prev,ue=R,me=R.next;if(Xu(te,ue,me)>=0)return!1;let ge=te.x,Ce=ue.x,Te=me.x,Oe=te.y,Pe=ue.y,it=me.y,He=Math.min(ge,Ce,Te),bt=Math.min(Oe,Pe,it),Et=Math.max(ge,Ce,Te),Qt=Math.max(Oe,Pe,it),er=t3(He,bt,d,L,W),br=t3(Et,Qt,d,L,W),sr=R.prevZ,Mr=R.nextZ;for(;sr&&sr.z>=er&&Mr&&Mr.z<=br;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0||(sr=sr.prevZ,Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;sr&&sr.z>=er;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0)return!1;sr=sr.prevZ}for(;Mr&&Mr.z<=br;){if(Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function HH(R,d){let L=R;do{let W=L.prev,te=L.next.next;!g0(W,te)&&p4(W,L,L.next,te)&&Tg(W,te)&&Tg(te,W)&&(d.push(W.i,L.i,te.i),Ag(L),Ag(L.next),L=R=te),L=L.next}while(L!==R);return Hd(L)}function WH(R,d,L,W,te,ue){let me=R;do{let ge=me.next.next;for(;ge!==me.prev;){if(me.i!==ge.i&&KH(me,ge)){let Ce=v4(me,ge);return me=Hd(me,me.next),Ce=Hd(Ce,Ce.next),_p(me,d,L,W,te,ue,0),void _p(Ce,d,L,W,te,ue,0)}ge=ge.next}me=me.next}while(me!==R)}function YH(R,d){let L=R.x-d.x;return L===0&&(L=R.y-d.y,L===0)&&(L=(R.next.y-R.y)/(R.next.x-R.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function XH(R,d){let L=function(te,ue){let me=ue,ge=te.x,Ce=te.y,Te,Oe=-1/0;if(g0(te,me))return me;do{if(g0(te,me.next))return me.next;if(Ce<=me.y&&Ce>=me.next.y&&me.next.y!==me.y){let Et=me.x+(Ce-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Et<=ge&&Et>Oe&&(Oe=Et,Te=me.x=me.x&&me.x>=it&&ge!==me.x&&d4(CeTe.x||me.x===Te.x&&ZH(Te,me)))&&(Te=me,bt=Et)}me=me.next}while(me!==Pe);return Te}(R,d);if(!L)return d;let W=v4(L,R);return Hd(W,W.next),Hd(L,L.next)}function ZH(R,d){return Xu(R.prev,R,d.prev)<0&&Xu(d.next,R,R.next)<0}function t3(R,d,L,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-L)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-W)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function $H(R){let d=R,L=R;do(d.x=(R-me)*(ue-ge)&&(R-me)*(W-ge)>=(L-me)*(d-ge)&&(L-me)*(ue-ge)>=(te-me)*(W-ge)}function wg(R,d,L,W,te,ue,me,ge){return!(R===me&&d===ge)&&d4(R,d,L,W,te,ue,me,ge)}function KH(R,d){return R.next.i!==d.i&&R.prev.i!==d.i&&!function(L,W){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==W.i&&te.next.i!==W.i&&p4(te,te.next,L,W))return!0;te=te.next}while(te!==L);return!1}(R,d)&&(Tg(R,d)&&Tg(d,R)&&function(L,W){let te=L,ue=!1,me=(L.x+W.x)/2,ge=(L.y+W.y)/2;do te.y>ge!=te.next.y>ge&&te.next.y!==te.y&&me<(te.next.x-te.x)*(ge-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==L);return ue}(R,d)&&(Xu(R.prev,R,d.prev)||Xu(R,d.prev,d))||g0(R,d)&&Xu(R.prev,R,R.next)>0&&Xu(d.prev,d,d.next)>0)}function Xu(R,d,L){return(d.y-R.y)*(L.x-d.x)-(d.x-R.x)*(L.y-d.y)}function g0(R,d){return R.x===d.x&&R.y===d.y}function p4(R,d,L,W){let te=fy(Xu(R,d,L)),ue=fy(Xu(R,d,W)),me=fy(Xu(L,W,R)),ge=fy(Xu(L,W,d));return te!==ue&&me!==ge||!(te!==0||!cy(R,L,d))||!(ue!==0||!cy(R,W,d))||!(me!==0||!cy(L,R,W))||!(ge!==0||!cy(L,d,W))}function cy(R,d,L){return d.x<=Math.max(R.x,L.x)&&d.x>=Math.min(R.x,L.x)&&d.y<=Math.max(R.y,L.y)&&d.y>=Math.min(R.y,L.y)}function fy(R){return R>0?1:R<0?-1:0}function Tg(R,d){return Xu(R.prev,R,R.next)<0?Xu(R,d,R.next)>=0&&Xu(R,R.prev,d)>=0:Xu(R,d,R.prev)<0||Xu(R,R.next,d)<0}function v4(R,d){let L=r3(R.i,R.x,R.y),W=r3(d.i,d.x,d.y),te=R.next,ue=d.prev;return R.next=d,d.prev=R,L.next=te,te.prev=L,W.next=L,L.prev=W,ue.next=W,W.prev=ue,W}function m4(R,d,L,W){let te=r3(R,d,L);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ag(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function r3(R,d,L){return{i:R,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class y0{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let W=0|Math.round(d),te=0|Math.round(L),ue=this._getKey(W,te);if(this._vertexDictionary.has(ue))return this._vertexDictionary.get(ue);let me=this._vertexBuffer.length/2;return this._vertexDictionary.set(ue,me),this._vertexBuffer.push(W,te),me}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,ue){let me=[];for(let ge=0;ge0?(me.push(Ce),me.push(Oe),me.push(Te)):(me.push(Ce),me.push(Te),me.push(Oe))}return me}(this._vertexBuffer,d);let L=[],W=d.length;for(let te=0;te=1||qr<=0)||er&&(Teue)){Pe>=te&&Pe<=ue&&me.push(W[(ge+1)%3]);continue}!er&&Mr>0&&me.push(this._vertexToIndex(Ce+bt*Mr,Te+Et*Mr));let $r=Ce+bt*Math.max(Mr,0),_a=Ce+bt*Math.min(qr,1);Qt||this._generateIntraEdgeVertices(me,Ce,Te,Oe,Pe,$r,_a),!er&&qr<1&&me.push(this._vertexToIndex(Ce+bt*qr,Te+Et*qr)),(er||Pe>=te&&Pe<=ue)&&me.push(W[(ge+1)%3]),!er&&(Pe<=te||Pe>=ue)&&this._generateInterEdgeVertices(me,Ce,Te,Oe,Pe,it,He,_a,te,ue)}return me}_generateIntraEdgeVertices(d,L,W,te,ue,me,ge){let Ce=te-L,Te=ue-W,Oe=Te===0,Pe=Oe?Math.min(L,te):Math.min(me,ge),it=Oe?Math.max(L,te):Math.max(me,ge),He=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(it/this._granularityCellSize)-1;if(Oe?L=He;Et--){let Qt=Et*this._granularityCellSize;d.push(this._vertexToIndex(Qt,W+Te*(Qt-L)/Ce))}}_generateInterEdgeVertices(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=ue-W,it=me-te,He=ge-ue,bt=(Te-ue)/He,Et=(Oe-ue)/He,Qt=Math.min(bt,Et),er=Math.max(bt,Et),br=te+it*Qt,sr=Math.floor(Math.min(br,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(br,Ce)/this._granularityCellSize)-1,qr=Ce=1||er<=0){let Ca=W-ge,nn=me+(L-me)*Math.min((Te-ge)/Ca,(Oe-ge)/Ca);sr=Math.floor(Math.min(nn,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(nn,Ce)/this._granularityCellSize)-1,qr=Ce0?Oe:Te;if(qr)for(let Ca=sr;Ca<=Mr;Ca++)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a));else for(let Ca=Mr;Ca>=sr;Ca--)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a))}_generateOutline(d){let L=[];for(let W of d){let te=Sv(W,this._granularity,!0),ue=this._pointArrayToIndices(te),me=[];for(let ge=1;geue!=(me===_0)?(d.push(L),d.push(W),d.push(this._vertexToIndex(te,me)),d.push(W),d.push(this._vertexToIndex(ue,me)),d.push(this._vertexToIndex(te,me))):(d.push(W),d.push(L),d.push(this._vertexToIndex(te,me)),d.push(this._vertexToIndex(ue,me)),d.push(W),d.push(this._vertexToIndex(te,me)))}_fillPoles(d,L,W){let te=this._vertexBuffer,ue=F,me=d.length;for(let ge=2;ge80*Pe){Qt=Te[0],er=Te[1];let sr=Qt,Mr=er;for(let qr=Pe;qrsr&&(sr=$r),_a>Mr&&(Mr=_a)}br=Math.max(sr-Qt,Mr-er),br=br!==0?32767/br:0}return _p(bt,Et,Pe,Qt,er,br,0),Et}(W,te),Ce=this._convertIndices(W,ge);ue=this._subdivideTrianglesScanline(Ce)}catch(ge){console.error(ge)}let me=[];return L&&(me=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(ue),{verticesFlattened:this._vertexBuffer,indicesTriangles:ue,indicesLineList:me}}_convertIndices(d,L){let W=[];for(let te of L)W.push(this._vertexToIndex(d[2*te],d[2*te+1]));return W}_pointArrayToIndices(d){let L=[];for(let W of d)L.push(this._vertexToIndex(W.x,W.y));return L}}function g4(R,d,L,W=!0){return new JH(L,d).subdividePolygonInternal(R,W)}function Sv(R,d,L=!1){if(!R||R.length<1)return[];if(R.length<2)return[];let W=R[0],te=R[R.length-1],ue=L&&(W.x!==te.x||W.y!==te.y);if(d<2)return ue?[...R,R[0]]:[...R];let me=Math.floor(F/d),ge=[];ge.push(new t(R[0].x,R[0].y));let Ce=R.length,Te=ue?Ce:Ce-1;for(let Oe=0;Oe0?(Math.floor(_a/me)+1)*me:(Math.ceil(_a/me)-1)*me,bn=Mr>0?(Math.floor(Ca/me)+1)*me:(Math.ceil(Ca/me)-1)*me,Fn=Math.abs(_a-qa),gn=Math.abs(Ca-bn),Va=Math.abs(_a-Et),Hn=Math.abs(Ca-Qt),ni=er?Fn/qr:Number.POSITIVE_INFINITY,Wn=br?gn/$r:Number.POSITIVE_INFINITY;if((Va<=Fn||!er)&&(Hn<=gn||!br))break;if(ni=0?me-1:ue-1,Te=(ge+1)%ue,Oe=R[2*d[Ce]],Pe=R[2*d[Te]],it=R[2*d[me]],He=R[2*d[me]+1],bt=R[2*d[ge]+1],Et=!1;if(OePe)Et=!1;else{let Qt=bt-He,er=-(R[2*d[ge]]-it),br=He((Pe-it)*Qt+(R[2*d[Te]+1]-He)*er)*br&&(Et=!0)}if(Et){let Qt=d[Ce],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),me--,me<0&&(me=ue-1)}else{let Qt=d[Te],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),ge++,ge>=ue&&(ge=0)}if(Ce===Te)break}}function y4(R,d,L,W,te,ue,me,ge,Ce){let Te=te.length/2,Oe=me&&ge&&Ce;if(TeFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,Fn=!0,qr=0);let gn=Sg(er,bt,Qt,br,_a,qa,Mr),Va=Sg(er,bt,Qt,br,Ca,bn,Mr),Hn=Sg(er,bt,Qt,br,nn,Fn,Mr);He.emplaceBack(qr+gn-sr,qr+Va-sr,qr+Hn-sr),Mr.primitiveLength++}})(d,L,W,te,ue,R),Oe&&function(Pe,it,He,bt,Et,Qt){let er=[];for(let $r=0;$rFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,qr=0);let Fn=Sg(er,bt,Qt,br,Ca,qa,Mr),gn=Sg(er,bt,Qt,br,nn,bn,Mr);He.emplaceBack(qr+Fn-sr,qr+gn-sr),Mr.primitiveLength++}}(me,L,ge,te,Ce,R),d.forceNewSegmentOnNextPrepare(),me?.forceNewSegmentOnNextPrepare()}function Sg(R,d,L,W,te,ue,me){if(ue){let ge=W.count;return L(d[2*te],d[2*te+1]),R[te]=W.count,W.count++,me.vertexLength++,ge}return R[te]}class a3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new ir,this.indexArray=new ua,this.indexArray2=new ia,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.segments2=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W,L.availableImages):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;if(this.hasDependencies){let Pe=v0("fill",this.layers,ge,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(ge,Ce,Te,W,{},L.subdivisionGranularity);L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}addFeatures(d,L,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,W,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,p0),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,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce=g4(ge,te,me.fill.getGranularityForZoomLevel(te.z)),Te=this.layoutVertexArray;y4((Oe,Pe)=>{Te.emplaceBack(Oe,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,canonical:te})}}let _4,x4;fi("FillBucket",a3,{omit:["layers","patternFeatures"]});var eW={get paint(){return x4=x4||new Ps({"fill-antialias":new hi(ht.paint_fill["fill-antialias"]),"fill-opacity":new wi(ht.paint_fill["fill-opacity"]),"fill-color":new wi(ht.paint_fill["fill-color"]),"fill-outline-color":new wi(ht.paint_fill["fill-outline-color"]),"fill-translate":new hi(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new hi(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new sl(ht.paint_fill["fill-pattern"])})},get layout(){return _4=_4||new Ps({"fill-sort-key":new wi(ht.layout_fill["fill-sort-key"])})}};class tW extends ll{constructor(d,L){super(d,eW,L)}recalculate(d,L){super.recalculate(d,L);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new a3(d)}queryRadius(){return Ue(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:W,pixelsToTileUnits:te}){return Bi(Qe(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-W.bearingInRadians,te),L)}isTileClipped(){return!0}}let rW=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),aW=ct([{name:"a_centroid",components:2,type:"Int16"}],4),{members:nW}=rW;class Eg{constructor(d,L,W,te,ue){this.properties={},this.extent=W,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=ue,d.readFields(iW,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=[],te,ue=1,me=0,ge=0,Ce=0;for(;d.pos>3}if(me--,ue===1||ue===2)ge+=d.readSVarint(),Ce+=d.readSVarint(),ue===1&&(te&&W.push(te),te=[]),te&&te.push(new t(ge,Ce));else{if(ue!==7)throw new Error(`unknown command ${ue}`);te&&te.push(te[0].clone())}}return te&&W.push(te),W}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=1,te=0,ue=0,me=0,ge=1/0,Ce=-1/0,Te=1/0,Oe=-1/0;for(;d.pos>3}if(te--,W===1||W===2)ue+=d.readSVarint(),me+=d.readSVarint(),ueCe&&(Ce=ue),meOe&&(Oe=me);else if(W!==7)throw new Error(`unknown command ${W}`)}return[ge,Te,Ce,Oe]}toGeoJSON(d,L,W){let te=this.extent*Math.pow(2,W),ue=this.extent*d,me=this.extent*L,ge=this.loadGeometry();function Ce(it){return[360*(it.x+ue)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(it.y+me)/te)*Math.PI))-90]}function Te(it){return it.map(Ce)}let Oe;if(this.type===1){let it=[];for(let bt of ge)it.push(bt[0]);let He=Te(it);Oe=it.length===1?{type:"Point",coordinates:He[0]}:{type:"MultiPoint",coordinates:He}}else if(this.type===2){let it=ge.map(Te);Oe=it.length===1?{type:"LineString",coordinates:it[0]}:{type:"MultiLineString",coordinates:it}}else{if(this.type!==3)throw new Error("unknown feature type");{let it=b4(ge),He=[];for(let bt of it)He.push(bt.map(Te));Oe=He.length===1?{type:"Polygon",coordinates:He[0]}:{type:"MultiPolygon",coordinates:He}}}let Pe={type:"Feature",geometry:Oe,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function iW(R,d,L){R===1?d.id=L.readVarint():R===2?function(W,te){let ue=W.readVarint()+W.pos;for(;W.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new Eg(this._pbf,L,this.extent,this._keys,this._values)}}function lW(R,d,L){R===15?d.version=L.readVarint():R===1?d.name=L.readString():R===5?d.extent=L.readVarint():R===2?d._features.push(L.pos):R===3?d._keys.push(L.readString()):R===4&&d._values.push(function(W){let te=null,ue=W.readVarint()+W.pos;for(;W.pos>3;te=me===1?W.readString():me===2?W.readFloat():me===3?W.readDouble():me===4?W.readVarint64():me===5?W.readVarint():me===6?W.readSVarint():me===7?W.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class w4{constructor(d,L){this.layers=d.readFields(uW,{},L)}}function uW(R,d,L){if(R===3){let W=new sW(L,L.readVarint()+L.pos);W.length&&(d[W.name]=W)}}let n3=Math.pow(2,13);function kg(R,d,L,W,te,ue,me,ge){R.emplaceBack(d,L,2*Math.floor(W*n3)+me,te*n3*2,ue*n3*2,Math.round(ge))}class i3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new dr,this.centroidVertexArray=new It,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.features=[],this.hasDependencies=Md("fill-extrusion",this.layers,L);for(let{feature:te,id:ue,index:me,sourceLayerIndex:ge}of d){let Ce=this.layers[0]._featureFilter.needGeometry,Te=fo(te,Ce);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Te,W))continue;let Oe={id:ue,sourceLayerIndex:ge,index:me,geometry:Ce?Te.geometry:ql(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(v0("fill-extrusion",this.layers,Oe,{zoom:this.zoom},L)):this.addFeature(Oe,Oe.geometry,me,W,{},L.subdivisionGranularity),L.featureIndex.insert(te,Oe.geometry,me,ge,this.index,!0)}}addFeatures(d,L,W){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,L,W,d.subdivisionGranularity)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}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,nW),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,aW.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,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce={x:0,y:0,sampleCount:0},Te=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,ge,me);let Oe=this.layoutVertexArray.length-Te,Pe=Math.floor(Ce.x/Ce.sampleCount),it=Math.floor(Ce.y/Ce.sampleCount);for(let He=0;He{kg(Oe,Pe,it,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,Te.verticesFlattened,Te.indicesTriangles)}_generateSideFaces(d,L){let W=0;for(let te=1;teFa.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ge=ue.sub(me)._perp()._unit(),Ce=me.dist(ue);W+Ce>32768&&(W=0),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,1,W),W+=Ce,kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,1,W);let Te=L.segment.vertexLength;this.indexArray.emplaceBack(Te,Te+2,Te+1),this.indexArray.emplaceBack(Te+1,Te+2,Te+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function cW(R,d){for(let L=0;LF)||R.y===d.y&&(R.y<0||R.y>F)}function T4(R){return R.every(d=>d.x<0)||R.every(d=>d.x>F)||R.every(d=>d.y<0)||R.every(d=>d.y>F)}let A4;fi("FillExtrusionBucket",i3,{omit:["layers","features"]});var hW={get paint(){return A4=A4||new Ps({"fill-extrusion-opacity":new hi(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new wi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new sl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new wi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new wi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new hi(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class dW extends ll{constructor(d,L){super(d,hW,L)}createBucket(d){return new i3(d)}queryRadius(){return Ue(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me,pixelPosMatrix:ge}){let Ce=Qe(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-ue.bearingInRadians,me),Te=this.paint.get("fill-extrusion-height").evaluate(L,W),Oe=this.paint.get("fill-extrusion-base").evaluate(L,W),Pe=function(He,bt){let Et=[];for(let Qt of He){let er=[Qt.x,Qt.y,0,1];z(er,er,bt),Et.push(new t(er[0]/er[3],er[1]/er[3]))}return Et}(Ce,ge),it=function(He,bt,Et,Qt){let er=[],br=[],sr=Qt[8]*bt,Mr=Qt[9]*bt,qr=Qt[10]*bt,$r=Qt[11]*bt,_a=Qt[8]*Et,Ca=Qt[9]*Et,nn=Qt[10]*Et,qa=Qt[11]*Et;for(let bn of He){let Fn=[],gn=[];for(let Va of bn){let Hn=Va.x,ni=Va.y,Wn=Qt[0]*Hn+Qt[4]*ni+Qt[12],si=Qt[1]*Hn+Qt[5]*ni+Qt[13],po=Qt[2]*Hn+Qt[6]*ni+Qt[14],cs=Qt[3]*Hn+Qt[7]*ni+Qt[15],Ds=po+qr,Xs=cs+$r,Mf=Wn+_a,vu=si+Ca,yc=po+nn,Dc=cs+qa,Hl=new t((Wn+sr)/Xs,(si+Mr)/Xs);Hl.z=Ds/Xs,Fn.push(Hl);let rf=new t(Mf/Dc,vu/Dc);rf.z=yc/Dc,gn.push(rf)}er.push(Fn),br.push(gn)}return[er,br]}(te,Oe,Te,ge);return function(He,bt,Et){let Qt=1/0;Bi(Et,bt)&&(Qt=M4(Et,bt[0]));for(let er=0;er>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=S4[15&W];if(!ue)throw new Error("Unrecognized array type.");let[me]=new Uint16Array(d,2,1),[ge]=new Uint32Array(d,4,1);return new dy(ge,me,ue,d)}constructor(d,L=64,W=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=W,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let ue=S4.indexOf(this.ArrayType),me=2*d*this.ArrayType.BYTES_PER_ELEMENT,ge=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-ge%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+me+ge+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=d,this.coords[this._pos++]=L,W}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return o3(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:me,nodeSize:ge}=this,Ce=[0,ue.length-1,0],Te=[];for(;Ce.length;){let Oe=Ce.pop()||0,Pe=Ce.pop()||0,it=Ce.pop()||0;if(Pe-it<=ge){for(let Qt=it;Qt<=Pe;Qt++){let er=me[2*Qt],br=me[2*Qt+1];er>=d&&er<=W&&br>=L&&br<=te&&Te.push(ue[Qt])}continue}let He=it+Pe>>1,bt=me[2*He],Et=me[2*He+1];bt>=d&&bt<=W&&Et>=L&&Et<=te&&Te.push(ue[He]),(Oe===0?d<=bt:L<=Et)&&(Ce.push(it),Ce.push(He-1),Ce.push(1-Oe)),(Oe===0?W>=bt:te>=Et)&&(Ce.push(He+1),Ce.push(Pe),Ce.push(1-Oe))}return Te}within(d,L,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:me}=this,ge=[0,te.length-1,0],Ce=[],Te=W*W;for(;ge.length;){let Oe=ge.pop()||0,Pe=ge.pop()||0,it=ge.pop()||0;if(Pe-it<=me){for(let Qt=it;Qt<=Pe;Qt++)k4(ue[2*Qt],ue[2*Qt+1],d,L)<=Te&&Ce.push(te[Qt]);continue}let He=it+Pe>>1,bt=ue[2*He],Et=ue[2*He+1];k4(bt,Et,d,L)<=Te&&Ce.push(te[He]),(Oe===0?d-W<=bt:L-W<=Et)&&(ge.push(it),ge.push(He-1),ge.push(1-Oe)),(Oe===0?d+W>=bt:L+W>=Et)&&(ge.push(He+1),ge.push(Pe),ge.push(1-Oe))}return Ce}}function o3(R,d,L,W,te,ue){if(te-W<=L)return;let me=W+te>>1;E4(R,d,me,W,te,ue),o3(R,d,L,W,me-1,1-ue),o3(R,d,L,me+1,te,1-ue)}function E4(R,d,L,W,te,ue){for(;te>W;){if(te-W>600){let Te=te-W+1,Oe=L-W+1,Pe=Math.log(Te),it=.5*Math.exp(2*Pe/3),He=.5*Math.sqrt(Pe*it*(Te-it)/Te)*(Oe-Te/2<0?-1:1);E4(R,d,L,Math.max(W,Math.floor(L-Oe*it/Te+He)),Math.min(te,Math.floor(L+(Te-Oe)*it/Te+He)),ue)}let me=d[2*L+ue],ge=W,Ce=te;for(Lg(R,d,W,L),d[2*te+ue]>me&&Lg(R,d,W,te);geme;)Ce--}d[2*W+ue]===me?Lg(R,d,W,Ce):(Ce++,Lg(R,d,Ce,te)),Ce<=L&&(W=Ce+1),L<=Ce&&(te=Ce-1)}}function Lg(R,d,L,W){s3(R,L,W),s3(d,2*L,2*W),s3(d,2*L+1,2*W+1)}function s3(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function k4(R,d,L,W){let te=R-L,ue=d-W;return te*te+ue*ue}function l3(R,d,L,W){let te=W,ue=d+(L-d>>1),me,ge=L-d,Ce=R[d],Te=R[d+1],Oe=R[L],Pe=R[L+1];for(let it=d+3;itte)me=it,te=He;else if(He===te){let bt=Math.abs(it-ue);btW&&(me-d>3&&l3(R,d,me,W),R[me+2]=te,L-me>3&&l3(R,me,L,W))}function pW(R,d,L,W,te,ue){let me=te-L,ge=ue-W;if(me!==0||ge!==0){let Ce=((R-L)*me+(d-W)*ge)/(me*me+ge*ge);Ce>1?(L=te,W=ue):Ce>0&&(L+=me*Ce,W+=ge*Ce)}return me=R-L,ge=d-W,me*me+ge*ge}function tf(R,d,L,W){let te={type:d,geom:L},ue={id:R??null,type:te.type,geometry:te.geom,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":Pg(ue,te.geom);break;case"LineString":Pg(ue,te.geom.points);break;case"Polygon":Pg(ue,te.geom[0].points);break;case"MultiLineString":for(let me of te.geom)Pg(ue,me.points);break;case"MultiPolygon":for(let me of te.geom)Pg(ue,me[0].points)}return ue}function u3(R){R.points.length>64&&(R.points=new Float64Array(R.points))}function Pg(R,d){for(let L=0;L0&&(me+=W?(te*Oe-Te*ue)/2:Math.sqrt(Math.pow(Te-te,2)+Math.pow(Oe-ue,2))),te=Te,ue=Oe}let ge=d.points.length-3;d.points[2]=1,L>0&&l3(d.points,0,ge,L),d.points[ge+2]=1,u3(d),d.size=Math.abs(me),d.start=0,d.end=d.size}function h3(R,d,L,W){for(let te=0;te1?1:L}function vy(R){let d={type:"Feature",geometry:vW(R),properties:R.tags};return R.id!=null&&(d.id=R.id),d}function vW(R){let{type:d,geometry:L}=R;switch(d){case"Point":return{type:d,coordinates:C4(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:my(L)};case"LineString":return{type:d,coordinates:my(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(W=>my(W.points))};case"MultiPolygon":return{type:d,coordinates:L.map(W=>W.map(te=>my(te.points)))}}}function my(R){let d=[];for(let L=0;L=(L/=d)&&me=W)return null;let Ce=[];for(let Te of R){let Oe=te===Wf.X?Te.minX:Te.minY,Pe=te===Wf.X?Te.maxX:Te.maxY;if(Oe>=L&&Pe=W))switch(Te.type){case"Point":case"MultiPoint":mW(Te,Ce,L,W,te);continue;case"LineString":gW(Te,Ce,L,W,te,ge);continue;case"MultiLineString":yW(Te,Ce,L,W,te);continue;case"Polygon":_W(Te,Ce,L,W,te);continue;case"MultiPolygon":xW(Te,Ce,L,W,te);continue}}return Ce.length?Ce:null}function mW(R,d,L,W,te){let ue=[];(function(me,ge,Ce,Te,Oe){for(let Pe=0;Pe=Ce&&it<=Te&&w0(ge,me[Pe],me[Pe+1],me[Pe+2])}})(R.geometry,ue,L,W,te),ue.length&&d.push(tf(R.id,ue.length===3?"Point":"MultiPoint",ue,R.tags))}function gW(R,d,L,W,te,ue){let me=[];if(R4(R.geometry,me,L,W,te,!1,ue.lineMetrics),me.length)if(ue.lineMetrics)for(let ge of me)d.push(tf(R.id,"LineString",ge,R.tags));else d.push(me.length>1?tf(R.id,"MultiLineString",me,R.tags):tf(R.id,"LineString",me[0],R.tags))}function yW(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!1),ue.length&&d.push(ue.length!==1?tf(R.id,"MultiLineString",ue,R.tags):tf(R.id,"LineString",ue[0],R.tags))}function _W(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!0),ue.length&&d.push(tf(R.id,"Polygon",ue,R.tags))}function xW(R,d,L,W,te){let ue=[];for(let me of R.geometry){let ge=[];d3(me,ge,L,W,te,!0),ge.length&&ue.push(ge)}ue.length&&d.push(tf(R.id,"MultiPolygon",ue,R.tags))}function R4(R,d,L,W,te,ue,me){let ge=I4(R),Ce=te===Wf.X?bW:wW,Te,Oe,Pe=R.start;for(let Qt=0;QtL&&(Oe=Ce(ge,er,br,Mr,qr,L),me&&(ge.start=Pe+Te*Oe)):$r>W?_a=L&&(Oe=Ce(ge,er,br,Mr,qr,L),Ca=!0),_a>W&&$r<=W&&(Oe=Ce(ge,er,br,Mr,qr,W),Ca=!0),!ue&&Ca&&(me&&(ge.end=Pe+Te*Oe),d.push(ge),ge=I4(R)),me&&(Pe+=Te)}let it=R.points.length-3,He=R.points[it],bt=R.points[it+1],Et=te===Wf.X?He:bt;Et>=L&&Et<=W&&w0(ge.points,He,bt,R.points[it+2]),it=ge.points.length-3,ue&&it>=3&&(ge.points[it]!==ge.points[0]||ge.points[it+1]!==ge.points[1])&&w0(ge.points,ge.points[0],ge.points[1],ge.points[2]),ge.points.length&&(u3(ge),d.push(ge))}function I4(R){return{points:[],size:R.size,start:R.start,end:R.end}}function d3(R,d,L,W,te,ue){for(let me of R)R4(me,d,L,W,te,ue,!1)}function w0(R,d,L,W){R.push(d,L,W)}function bW(R,d,L,W,te,ue){let me=(ue-d)/(W-d);return w0(R.points,ue,L+(te-L)*me,1),me}function wW(R,d,L,W,te,ue){let me=(ue-L)/(te-L);return w0(R.points,d+(W-d)*me,ue,1),me}function p3(R,d){let L=d.buffer/d.extent,W=R,te=Wd(R,1,-1-L,L,Wf.X,-1,2,d),ue=Wd(R,1,1-L,2+L,Wf.X,-1,2,d);return(te||ue)&&(W=Wd(R,1,-L,1+L,Wf.X,-1,2,d)||[],te&&(W=D4(te,1).concat(W)),ue&&(W=W.concat(D4(ue,-1)))),W}function D4(R,d){let L=[];for(let W of R)switch(W.type){case"Point":case"MultiPoint":{let te=TW(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"LineString":{let te=v3(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let ue of W.geometry)te.push(v3(ue,d));L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiPolygon":{let te=[];for(let ue of W.geometry){let me=[];for(let ge of ue)me.push(v3(ge,d));te.push(me)}L.push(tf(W.id,W.type,te,W.tags));continue}}return L}function TW(R,d){let L=[];for(let W=0;W0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(ue){let ge=R[0],Ce=c3({type:"FeatureCollection",features:[{type:"Feature",id:ge.id,geometry:d.newGeometry,properties:me?F4(ge.tags,d):ge.tags}]},L);return Ce=p3(Ce,L),Ce}if(me){let ge=[];for(let Ce of R){let Te=Li({},Ce);Te.tags=F4(Te.tags,d),ge.push(Te)}return ge}return R}function F4(R,d){if(d.removeAllProperties)return{};let L=Li({},R||{});if(d.removeProperties)for(let W of d.removeProperties)delete L[W];if(d.addOrUpdateProperties)for(let{key:W,value:te}of d.addOrUpdateProperties)L[W]=te;return L}(function(R){R[R.X=0]="X",R[R.Y=1]="Y"})(Wf||(Wf={}));let m3={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:R=>R};class MW{constructor(d){this.options=Object.assign(Object.create(m3),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let W of d){if(!W.geometry)continue;let[te,ue]=W.geometry.coordinates,[me,ge]=[x0(te),b0(ue)];L.push({id:W.id,type:"Point",geometry:[me,ge],tags:W.properties})}this.createIndex(L)}initialize(d){let L=[];for(let W of d)W.type==="Point"&&L.push(W);this.createIndex(L)}updateIndex(d,L,W){this.options=Object.assign(Object.create(m3),W.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:W,maxZoom:te}=this.options;L&&console.time("total time");let ue=`prepare ${d.length} points`;L&&console.time(ue),this.points=d;let me=[];for(let Ce=0;Ce=W;Ce--){let Te=Date.now();ge=this.trees[Ce]=this.createTree(this.cluster(ge,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,ge.numItems,Date.now()-Te)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(W=>vy(W))}getClustersInternal(d,L){let W=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),ue=d[2]===180?180:((d[2]+180)%360+360)%360-180,me=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)W=-180,ue=180;else if(W>ue){let Pe=this.getClustersInternal([W,te,180,me],L),it=this.getClustersInternal([-180,te,ue,me],L);return Pe.concat(it)}let ge=this.trees[this.limitZoom(L)],Ce=ge.range(x0(W),b0(me),x0(ue),b0(te)),Te=ge.flatData,Oe=[];for(let Pe of Ce){let it=this.stride*Pe;Oe.push(Te[it+5]>1?SW(Te,it,this.clusterProps):this.points[Te[it+3]])}return Oe}getChildren(d){let L=this.getOriginId(d),W=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),ue=this.trees[W];if(!ue)throw te;let me=ue.flatData;if(L*this.stride>=me.length)throw te;let ge=this.options.radius/(this.options.extent*Math.pow(2,W-1)),Ce=ue.within(me[L*this.stride],me[L*this.stride+1],ge),Te=[];for(let Oe of Ce){let Pe=Oe*this.stride;me[Pe+4]===d&&Te.push(me[Pe+5]>1?EW(me,Pe,this.clusterProps):vy(this.points[me[Pe+3]]))}if(Te.length===0)throw te;return Te}getLeaves(d,L,W){let te=[];return this.appendLeaves(te,d,L=L||10,W=W||0,0),te}getTile(d,L,W){let te=this.trees[this.limitZoom(d)];if(!te)return null;let ue=Math.pow(2,d),{extent:me,radius:ge}=this.options,Ce=ge/me,Te=(W-Ce)/ue,Oe=(W+1+Ce)/ue,Pe={transformed:!0,features:[],source:null,x:L,y:W,z:d};return this.addTileFeatures(te.range((L-Ce)/ue,Te,(L+1+Ce)/ue,Oe),te.flatData,L,W,ue,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/ue,Te,1,Oe),te.flatData,ue,W,ue,Pe),L===ue-1&&this.addTileFeatures(te.range(0,Te,Ce/ue,Oe),te.flatData,-1,W,ue,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,W,te,ue){let me=this.getChildren(L);for(let ge of me){let Ce=ge.properties;if(Ce?.cluster?ue+Ce.point_count<=te?ue+=Ce.point_count:ue=this.appendLeaves(d,Ce.cluster_id,W,te,ue):ue1,Oe,Pe,it;if(Te)Oe=g3(L,Ce,this.clusterProps),Pe=L[Ce],it=L[Ce+1];else{let Et=this.points[L[Ce+3]];Oe=Et.tags,[Pe,it]=Et.geometry}let He={type:1,geometry:[[Math.round(this.options.extent*(Pe*ue-W)),Math.round(this.options.extent*(it*ue-te))]],tags:Oe},bt;bt=Te||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(He.id=bt),me.features.push(He)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:W,extent:te,reduce:ue,minPoints:me}=this.options,ge=W/(te*Math.pow(2,L)),Ce=d.flatData,Te=[],Oe=this.stride;for(let Pe=0;PeL&&(Qt+=Ce[br+5])}if(Qt>Et&&Qt>=me){let er,br=it*Et,sr=He*Et,Mr=-1,qr=(Pe/Oe<<5)+(L+1)+this.points.length;for(let $r of bt){let _a=$r*Oe;if(Ce[_a+2]<=L)continue;Ce[_a+2]=L;let Ca=Ce[_a+5];br+=Ce[_a]*Ca,sr+=Ce[_a+1]*Ca,Ce[_a+4]=qr,ue&&(er||(er=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(er)),ue(er,this.map(Ce,_a)))}Ce[Pe+4]=qr,Te.push(br/Qt,sr/Qt,1/0,qr,-1,Qt),ue&&Te.push(Mr)}else{for(let er=0;er1)for(let er of bt){let br=er*Oe;if(!(Ce[br+2]<=L)){Ce[br+2]=L;for(let sr=0;sr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,W){if(d[L+5]>1){let me=this.clusterProps[d[L+6]];return W?Object.assign({},me):me}let te=this.points[d[L+3]].tags,ue=this.options.map(te);return W&&ue===te?Object.assign({},ue):ue}}function SW(R,d,L){return{id:R[d+3],type:"Point",tags:g3(R,d,L),geometry:[R[d],R[d+1]]}}function EW(R,d,L){return{type:"Feature",id:R[d+3],properties:g3(R,d,L),geometry:{type:"Point",coordinates:[L4(R[d]),P4(R[d+1])]}}}function g3(R,d,L){let W=R[d+5],te=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,ue=R[d+6],me=ue===-1?{}:Object.assign({},L[ue]);return Object.assign(me,{cluster:!0,cluster_id:R[d+3],point_count:W,point_count_abbreviated:te})}let y3="geojsonvt_clip_start",_3="geojsonvt_clip_end";function z4(R,d,L,W,te){let ue=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?me:W))return void(L.numPoints+=d.points.length/3);let ge=[];for(let Ce=0;Ceme)&&(L.numSimplified++,ge.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,Te){let Oe=0;for(let Pe=0,it=Ce.length,He=it-2;Pe0===Te)for(let Pe=0,it=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),W.debug>1&&console.timeEnd("invalidating");let[te,ue,me]=[0,0,0],ge=z4(d,te,ue,me,W);ge.source=d;let Ce=gy(te,ue,me);if(this.tiles[Ce]=ge,this.tileCoords.push({z:te,x:ue,y:me,id:Ce}),W.debug){let Te=`z${te}`;this.stats[Te]=(this.stats[Te]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,W){return null}getTile(d,L,W){let{extent:te,debug:ue}=this.options,me=1<1&&console.log("drilling down to z%d-%d-%d",d,L,W);let Ce,Te=d,Oe=L,Pe=W;for(;!Ce&&Te>0;)Te--,Oe>>=1,Pe>>=1,Ce=this.tiles[gy(Te,Oe,Pe)];return Ce?.source?(ue>1&&(console.log("found parent tile z%d-%d-%d",Te,Oe,Pe),console.time("drilling down")),this.splitTile(Ce.source,Te,Oe,Pe,d,L,W),ue>1&&console.timeEnd("drilling down"),this.tiles[ge]?B4(this.tiles[ge],te):null):null}splitTile(d,L,W,te,ue,me,ge){let Ce=[d,L,W,te],Te=this.options,Oe=Te.debug;for(;Ce.length;){te=Ce.pop(),W=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),He=this.tiles[it]=z4(d,L,W,te,Te),this.tileCoords.push({z:L,x:W,y:te,id:it}),Oe)){Oe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,W,te,He.numFeatures,He.numPoints,He.numSimplified),console.timeEnd("creation"));let Ca=`z${L}`;this.stats[Ca]=(this.stats[Ca]||0)+1,this.total++}if(He.source=d,ue==null){if(L===Te.indexMaxZoom||He.numPoints<=Te.indexMaxPoints)continue}else{if(L===Te.maxZoom||L===ue)continue;if(ue!=null){let Ca=ue-L;if(W!==me>>Ca||te!==ge>>Ca)continue}}if(He.source=null,!d.length)continue;Oe>1&&console.time("clipping");let bt=.5*Te.buffer/Te.extent,Et=.5-bt,Qt=.5+bt,er=1+bt,br=null,sr=null,Mr=null,qr=null,$r=Wd(d,Pe,W-bt,W+Qt,Wf.X,He.minX,He.maxX,Te),_a=Wd(d,Pe,W+Et,W+er,Wf.X,He.minX,He.maxX,Te);$r&&(br=Wd($r,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),sr=Wd($r,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),_a&&(Mr=Wd(_a,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),qr=Wd(_a,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),Oe>1&&console.timeEnd("clipping"),Ce.push(br||[],L+1,2*W,2*te),Ce.push(sr||[],L+1,2*W,2*te+1),Ce.push(Mr||[],L+1,2*W+1,2*te),Ce.push(qr||[],L+1,2*W+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:W}=L,te=1/0,ue=-1/0,me=1/0,ge=-1/0;for(let Oe of d)te=Math.min(te,Oe.minX),ue=Math.max(ue,Oe.maxX),me=Math.min(me,Oe.minY),ge=Math.max(ge,Oe.maxY);let Ce=L.buffer/L.extent,Te=new Set;for(let Oe in this.tiles){let Pe=this.tiles[Oe],it=1<=bt||ge=Qt)continue;let er=!1;for(let br of d)if(br.maxX>=He&&br.minX=Et&&br.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let br=`z${Pe.z}`;this.stats[br]=(this.stats[br]||0)-1,this.total--}delete this.tiles[Oe],Te.add(Oe)}}Te.size&&(this.tileCoords=this.tileCoords.filter(Oe=>!Te.has(Oe.id)))}}function gy(R,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new hr,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},dashes:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;this.hasDependencies?(Md("line",this.layers,L)?v0("line",this.layers,ge,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,ge,this.zoom,L),this.patternFeatures.push(ge)):this.addFeature(ge,Ce,Te,W,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W,dashPositions:te})}addFeatures(d,L,W,te){for(let ue of this.patternFeatures)this.addFeature(ue,ue.geometry,ue.index,L,W,te,d.subdivisionGranularity)}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,zW)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,DW),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.hasOwn(d.properties,y3)&&Object.hasOwn(d.properties,_3))return{start:+d.properties[y3],end:+d.properties[_3]}}addFeature(d,L,W,te,ue,me,ge){let Ce=this.layers[0].layout,Te=Ce.get("line-join").evaluate(d,{}),Oe=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),it=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let He of L)this.addLine(He,d,Te,Oe,Pe,it,te,ge);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,dashPositions:me,canonical:te})}addLine(d,L,W,te,ue,me,ge,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=Sv(d,ge?Ce.line.getGranularityForZoomLevel(ge.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let sr=0;sr=2&&d[Oe-1].equals(d[Oe-2]);)Oe--;let Pe=0;for(;Pe0;if(nn&&sr>Pe){let gn=bt.dist(Et);if(gn>2*it){let Va=bt.sub(bt.sub(Et)._mult(it/gn)._round());this.updateDistance(Et,Va),this.addCurrentVertex(Va,er,0,0,He),Et=Va}}let bn=Et&&Qt,Fn=bn?W:Te?"butt":te;if(bn&&Fn==="round"&&(_aue&&(Fn="bevel"),Fn==="bevel"&&(_a>2&&(Fn="flipbevel"),_a100)Mr=br.mult(-1);else{let gn=_a*er.add(br).mag()/er.sub(br).mag();Mr._perp()._mult(gn*(qa?-1:1))}this.addCurrentVertex(bt,Mr,0,0,He),this.addCurrentVertex(bt,Mr.mult(-1),0,0,He)}else if(Fn==="bevel"||Fn==="fakeround"){let gn=-Math.sqrt(_a*_a-1),Va=qa?gn:0,Hn=qa?0:gn;if(Et&&this.addCurrentVertex(bt,er,Va,Hn,He),Fn==="fakeround"){let ni=Math.round(180*Ca/Math.PI/20);for(let Wn=1;Wn2*it){let Va=bt.add(Qt.sub(bt)._mult(it/gn)._round());this.updateDistance(bt,Va),this.addCurrentVertex(Va,br,0,0,He),bt=Va}}}}addCurrentVertex(d,L,W,te,ue,me=!1){let ge=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*W,L.y-L.x*W,me,!1,W,ue),this.addHalfVertex(d,ge,Ce,me,!0,-te,ue),this.distance>N4/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,W,te,ue,me))}addHalfVertex({x:d,y:L},W,te,ue,me,ge,Ce){let Te=.5*(this.lineClips?this.scaledDistance*(N4-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(ue?1:0),(L<<1)+(me?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(ge===0?0:ge<0?-1:1)|(63&Te)<<2,Te>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Oe=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,Oe,this.e2),Ce.primitiveLength++),me?this.e2=Oe:this.e1=Oe}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let W=L.paint.get("line-dasharray");if(W&&!W.isConstant())return!0}return!1}addLineDashDependencies(d,L,W,te){for(let ue of d){let me=ue.paint.get("line-dasharray");if(!me||me.value.kind==="constant")continue;let ge=ue.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:me.value.evaluate({zoom:W-1},L,{}),round:ge},Te={dasharray:me.value.evaluate({zoom:W},L,{}),round:ge},Oe={dasharray:me.value.evaluate({zoom:W+1},L,{}),round:ge},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,it=`${Te.dasharray.join(",")},${Te.round}`,He=`${Oe.dasharray.join(",")},${Oe.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[it]=Te,te.dashDependencies[He]=Oe,L.dashes[ue.id]={min:Pe,mid:it,max:He}}}}let j4,U4;fi("LineBucket",b3,{omit:["layers","patternFeatures"]});var q4={get paint(){return U4=U4||new Ps({"line-opacity":new wi(ht.paint_line["line-opacity"]),"line-color":new wi(ht.paint_line["line-color"]),"line-translate":new hi(ht.paint_line["line-translate"]),"line-translate-anchor":new hi(ht.paint_line["line-translate-anchor"]),"line-width":new wi(ht.paint_line["line-width"]),"line-gap-width":new wi(ht.paint_line["line-gap-width"]),"line-offset":new wi(ht.paint_line["line-offset"]),"line-blur":new wi(ht.paint_line["line-blur"]),"line-dasharray":new sl(ht.paint_line["line-dasharray"]),"line-pattern":new sl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return j4=j4||new Ps({"line-cap":new wi(ht.layout_line["line-cap"]),"line-join":new wi(ht.layout_line["line-join"]),"line-miter-limit":new wi(ht.layout_line["line-miter-limit"]),"line-round-limit":new wi(ht.layout_line["line-round-limit"]),"line-sort-key":new wi(ht.layout_line["line-sort-key"])})}};class OW extends wi{possiblyEvaluate(d,L){return L=new oi(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,W,te){return L=X({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,W,te)}}let yy;class NW extends ll{constructor(d,L){super(d,q4,L),this.gradientVersion=0,yy||(yy=new OW(q4.paint.properties["line-width"].specification),yy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Ss,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=yy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new b3(d)}queryRadius(d){let L=d,W=V4(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return W/2+Math.abs(te)+Ue(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me}){let ge=Qe(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-ue.bearingInRadians,me),Ce=me/2*V4(this.paint.get("line-width").evaluate(L,W),this.paint.get("line-gap-width").evaluate(L,W)),Te=this.paint.get("line-offset").evaluate(L,W);return Te&&(te=function(Oe,Pe){let it=[];for(let He of Oe){let bt=_t(He),Et=[];for(let Qt=0;Qt=3){for(let bt of He)if(Wa(Oe,bt))return!0}if(rs(Oe,He,it))return!0}return!1}(ge,te,Ce)}isTileClipped(){return!0}}function V4(R,d){return d>0?d+2*R:R}let jW=ct([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),UW=ct([{name:"a_projected_pos",components:3,type:"Float32"}],4);ct([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let qW=ct([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ct([{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 G4=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VW=ct([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function GW(R,d,L){let W=d.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?R=R.toLocaleUpperCase():W==="lowercase"&&(R=R.toLocaleLowerCase()),Si.applyArabicShaping&&(R=Si.applyArabicShaping(R)),R}function HW(R,d,L){for(let W of R.sections)W.text=GW(W.text,d,L);return R}ct([{name:"triangle",components:3,type:"Uint16"}]),ct([{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"}]),ct([{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"}]),ct([{type:"Float32",name:"offsetX"}]),ct([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ct([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let Rg={"!":"\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","\u22EF":"\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"},WW={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},YW={40:!0};function H4(R,d,L,W,te,ue){if("fontStack"in d){let me=L[d.fontStack],ge=me?.[R];return ge?ge.metrics.advance*d.scale+te:0}{let me=W[d.imageName];return me?me.displaySize[0]*d.scale*Rc/ue+te:0}}function W4(R,d,L,W){let te=Math.pow(R-d,2);return W?RMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,W=0;for(let te=0;teW))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,W,te,ue){let me=[],ge=this.determineAverageLineWidth(d,L,W,te,ue),Ce=this.hasZeroWidthSpaces(),Te=0,Oe=0,Pe=this.text[Symbol.iterator](),it=Pe.next(),He=this.text[Symbol.iterator]();He.next();let bt=He.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let Qt=Et.next();for(;!it.done;){let er=this.getSection(Oe),br=it.value.codePointAt(0);if(Pr(br)||(Te+=H4(br,er,W,te,d,ue)),!bt.done){let sr=zt(br),Mr=bt.value.codePointAt(0);(WW[br]||sr||"imageName"in er||!Qt.done&&YW[Mr])&&me.push(Y4(Oe+1,Te,ge,me,XW(br,Mr,sr&&Ce),!1))}Oe++,it=Pe.next(),bt=He.next(),Qt=Et.next()}return X4(Y4(this.length(),Te,ge,me,0,!0))}determineAverageLineWidth(d,L,W,te,ue){let me=0,ge=0;for(let Ce of this.text){let Te=this.getSection(ge);me+=H4(Ce.codePointAt(0),Te,W,te,d,ue),ge++}return me/Math.max(1,Math.ceil(me/L))}}let w3=4294967296,Z4=1/w3,$4=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class _y{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,W=this.length){for(;this.pos>3,me=this.pos;this.type=7&te,d(ue,L,this),this.pos===me&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*w3;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*w3;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,W,te;return te=L[this.pos++],W=127&te,te<128?W:(te=L[this.pos++],W|=(127&te)<<7,te<128?W:(te=L[this.pos++],W|=(127&te)<<14,te<128?W:(te=L[this.pos++],W|=(127&te)<<21,te<128?W:(te=L[this.pos],W|=(15&te)<<28,function(ue,me,ge){let Ce=ge.buf,Te,Oe;if(Oe=Ce[ge.pos++],Te=(112&Oe)>>4,Oe<128||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<3,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<10,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<17,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<24,Oe<128)||(Oe=Ce[ge.pos++],Te|=(1&Oe)<<31,Oe<128))return A0(ue,Te,me);throw new Error("Expected varint not more than 10 bytes")}(W,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&$4?$4.decode(this.buf.subarray(L,d)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let W=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,W){let te,ue;if(L>=0?(te=L%4294967296|0,ue=L/4294967296|0):(te=~(-L%4294967296),ue=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,ue=ue+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(me,ge,Ce){Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,Ce.buf[Ce.pos]=127&(me>>>=7)}(te,0,W),function(me,ge){let Ce=(7&me)<<4;ge.buf[ge.pos++]|=Ce|((me>>>=3)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me)))))}(ue,W)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,ue,me){for(let ge,Ce,Te=0;Te55295&&ge<57344){if(!Ce){ge>56319||Te+1===ue.length?(te[me++]=239,te[me++]=191,te[me++]=189):Ce=ge;continue}if(ge<56320){te[me++]=239,te[me++]=191,te[me++]=189,Ce=ge;continue}ge=Ce-55296<<10|ge-56320|65536,Ce=null}else Ce&&(te[me++]=239,te[me++]=191,te[me++]=189,Ce=null);ge<128?te[me++]=ge:(ge<2048?te[me++]=ge>>6|192:(ge<65536?te[me++]=ge>>12|224:(te[me++]=ge>>18|240,te[me++]=ge>>12&63|128),te[me++]=ge>>6&63|128),te[me++]=63&ge|128)}return me}(this.buf,d,this.pos);let W=this.pos-L;W>=128&&K4(L,W,this),this.pos=L-1,this.writeVarint(W),this.pos+=W}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let W=0;W=128&&K4(W,te,this),this.pos=W-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,W){this.writeTag(d,2),this.writeRawMessage(L,W)}writePackedVarint(d,L){L.length&&this.writeMessage(d,ZW,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,$W,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,QW,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,KW,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,JW,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,eY,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,tY,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,rY,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,aY,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function A0(R,d,L){return L?4294967296*d+(R>>>0):4294967296*(d>>>0)+(R>>>0)}function K4(R,d,L){let W=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(W);for(let te=L.pos-1;te>=R;te--)L.buf[te+W]=L.buf[te]}function ZW(R,d){for(let L=0;Lge.h-me.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,ue=0;for(let me of R)for(let ge=W.length-1;ge>=0;ge--){let Ce=W[ge];if(!(me.w>Ce.w||me.h>Ce.h)){if(me.x=Ce.x,me.y=Ce.y,ue=Math.max(ue,me.y+me.h),te=Math.max(te,me.x+me.w),me.w===Ce.w&&me.h===Ce.h){let Te=W.pop();Te&&geEt.toCodeUnitIndex(_a));let $r=br(Et.toString(),er);for(let _a of $r){let Ca=[..._a].map(()=>0);Qt.push(new T0(_a,Et.sections,Ca))}}else if(sr){Qt=[],er=er.map(nn=>Et.toCodeUnitIndex(nn));let $r=0,_a=[];for(let nn of Et.text)_a.push(...Array(nn.length).fill(Et.sectionIndex[$r])),$r++;let Ca=sr(Et.text,_a,er);for(let nn of Ca){let qa=[],bn="";for(let Fn of nn[0])qa.push(nn[1][bn.length]),bn+=Fn;Qt.push(new T0(nn[0],Et.sections,qa))}}else Qt=function($r,_a){let Ca=[],nn=0;for(let qa of _a)Ca.push($r.substring(nn,qa)),nn=qa;return nn<$r.length()&&Ca.push($r.substring(nn,$r.length())),Ca}(Et,er);let Mr=[],qr={positionedLines:Mr,text:Et.toString(),top:Oe[1],bottom:Oe[1],left:Oe[0],right:Oe[0],writingMode:Pe,iconsInText:!1,verticalizable:!1};return function($r,_a,Ca,nn,qa,bn,Fn,gn,Va,Hn,ni,Wn){let si=0,po=0,cs=0,Ds=0,Xs=gn==="right"?1:gn==="left"?0:.5,Mf=Rc/Wn,vu=0;for(let Hl of qa){Hl.trim();let rf=Hl.getMaxScale(),Xf={positionedGlyphs:[],lineOffset:0};$r.positionedLines[vu]=Xf;let Zf=Xf.positionedGlyphs,Th=0;if(!Hl.length()){po+=bn,++vu;continue}let Sf=sY(nn,Hl,Mf),Ah=0;for(let Fc of Hl.text){let nu=Hl.getSection(Ah),lc=Fc.codePointAt(0),mu=lY(Va,ni,lc),zc={glyph:lc,imageName:null,x:si,y:po+-17,vertical:mu,scale:1,fontStack:"",sectionIndex:Hl.getSectionIndex(Ah),metrics:null,rect:null},Zd;if("fontStack"in nu){if(Zd=uY(nu,lc,mu,Sf,_a,Ca),!Zd)continue;zc.fontStack=nu.fontStack}else{if($r.iconsInText=!0,nu.scale*=Mf,Zd=cY(nu,mu,rf,Sf,nn),!Zd)continue;Th=Math.max(Th,Zd.imageOffset),zc.imageName=nu.imageName}let{rect:dd,metrics:Bg,baselineOffset:Ep}=Zd;zc.y+=Ep,zc.scale=nu.scale,zc.metrics=Bg,zc.rect=dd,Zf.push(zc),mu?($r.verticalizable=!0,si+=("imageName"in nu?Bg.advance:Rc)*nu.scale+Hn):si+=Bg.advance*nu.scale+Hn,Ah++}Zf.length!==0&&(cs=Math.max(si-Hn,cs),fY(Zf,0,Zf.length-1,Xs)),si=0,Xf.lineOffset=Math.max(Th,(rf-1)*Rc);let Hh=bn*rf+Th;po+=Hh,Ds=Math.max(Hh,Ds),++vu}let{horizontalAlign:yc,verticalAlign:Dc}=A3(Fn);(function(Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc){let nu=(rf-Xf)*Th,lc=0;lc=Sf!==Ah?-Hh*Zf- -17:-Zf*Fc*Ah+.5*Ah;for(let mu of Hl)for(let zc of mu.positionedGlyphs)zc.x+=nu,zc.y+=lc})($r.positionedLines,Xs,yc,Dc,cs,Ds,bn,po,qa.length),$r.top+=-Dc*po,$r.bottom=$r.top+po,$r.left+=-yc*cs,$r.right=$r.left+cs}(qr,d,L,W,Qt,me,ge,Ce,Pe,Te,it,bt),!function($r){for(let _a of $r)if(_a.positionedGlyphs.length!==0)return!1;return!0}(Mr)&&qr}function A3(R){let d=.5,L=.5;switch(R){case"right":case"top-right":case"bottom-right":d=1;break;case"left":case"top-left":case"bottom-left":d=0}switch(R){case"bottom":case"bottom-right":case"bottom-left":L=1;break;case"top":case"top-right":case"top-left":L=0}return{horizontalAlign:d,verticalAlign:L}}function sY(R,d,L){let W=d.getMaxScale()*Rc,{maxImageWidth:te,maxImageHeight:ue}=d.getMaxImageSize(R),me=Math.max(W,ue*L);return{verticalLineContentWidth:Math.max(W,te*L),horizontalLineContentHeight:me}}function eS(R){switch(R){case"top":return 0;case"center":return .5;default:return 1}}function lY(R,d,L){return!(R===l.ax.horizontal||!d&&!Wt(L)||d&&(Pr(L)||(W=L,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(W)))));var W}function uY(R,d,L,W,te,ue){let me=ue[R.fontStack],ge=function(Te,Oe,Pe,it){if(Te?.rect)return Te;let He=Oe[Pe.fontStack],bt=He?.[it];return bt?{rect:null,metrics:bt.metrics}:null}(me?.[d],te,R,d);if(ge===null)return null;let Ce;if(L)Ce=W.verticalLineContentWidth-R.scale*Rc;else{let Te=eS(R.verticalAlign);Ce=(W.horizontalLineContentHeight-R.scale*Rc)*Te}return{rect:ge.rect,metrics:ge.metrics,baselineOffset:Ce}}function cY(R,d,L,W,te){let ue=te[R.imageName];if(!ue)return null;let me=ue.paddedRect,ge=ue.displaySize,Ce={width:ge[0],height:ge[1],left:1,top:-3,advance:d?ge[1]:ge[0]},Te;if(d)Te=W.verticalLineContentWidth-ge[1]*R.scale;else{let Oe=eS(R.verticalAlign);Te=(W.horizontalLineContentHeight-ge[1]*R.scale)*Oe}return{rect:me,metrics:Ce,baselineOffset:Te,imageOffset:(d?ge[0]:ge[1])*R.scale-Rc*L}}function fY(R,d,L,W){if(W===0)return;let te=R[L],ue=(R[L].x+te.metrics.advance*te.scale)*W;for(let me=d;me<=L;me++)R[me].x-=ue}function hY(R,d,L){let{horizontalAlign:W,verticalAlign:te}=A3(L),ue=d[0]-R.displaySize[0]*W,me=d[1]-R.displaySize[1]*te;return{image:R,top:me,bottom:me+R.displaySize[1],left:ue,right:ue+R.displaySize[0]}}function tS(R){var d,L;let W=R.left,te=R.top,ue=R.right-W,me=R.bottom-te,ge=(d=R.image.textFitWidth)!==null&&d!==void 0?d:"stretchOrShrink",Ce=(L=R.image.textFitHeight)!==null&&L!==void 0?L:"stretchOrShrink",Te=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ce==="proportional"){if(ge==="stretchOnly"&&ue/meTe){let Oe=Math.ceil(ue/Te);te*=Oe/me,me=Oe}return{x1:W,y1:te,x2:W+ue,y2:te+me}}function rS(R,d,L,W,te,ue){let me=R.image,ge;if(me.content){let Qt=me.content,er=me.pixelRatio||1;ge=[Qt[0]/er,Qt[1]/er,me.displaySize[0]-Qt[2]/er,me.displaySize[1]-Qt[3]/er]}let Ce=d.left*ue,Te=d.right*ue,Oe,Pe,it,He;L==="width"||L==="both"?(He=te[0]+Ce-W[3],Pe=te[0]+Te+W[1]):(He=te[0]+(Ce+Te-me.displaySize[0])/2,Pe=He+me.displaySize[0]);let bt=d.top*ue,Et=d.bottom*ue;return L==="height"||L==="both"?(Oe=te[1]+bt-W[0],it=te[1]+Et+W[2]):(Oe=te[1]+(bt+Et-me.displaySize[1])/2,it=Oe+me.displaySize[1]),{image:me,top:Oe,right:Pe,bottom:it,left:He,collisionPadding:ge}}fi("ImagePosition",T3),fi("ImageAtlas",Q4),l.ax=void 0,(xp=l.ax||(l.ax={}))[xp.none=0]="none",xp[xp.horizontal=1]="horizontal",xp[xp.vertical=2]="vertical",xp[xp.horizontalOnly=3]="horizontalOnly";let Yd=128,bp=32640;function aS(R,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new oi(R+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=L,ue=0;for(;ueme.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=aS(this.zoom,L["text-size"]),this.iconSizeData=aS(this.zoom,L["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),ue=W.get("symbol-z-order");this.canOverlap=M3(W,"text-overlap","text-allow-overlap")!=="never"||M3(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(me=>l.ax[me])),this.stateDependentLayerIds=this.layers.filter(me=>me.isStateDependent()).map(me=>me.id),this.sourceID=d.sourceID}createArrays(){this.text=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new ut,this.lineVertexArray=new ft,this.symbolInstances=new Ze,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,W,te,ue){for(let me of d)if(L[me.codePointAt(0)]=!0,(W||te)&&ue){let ge=Rg[me];ge&&(L[ge.codePointAt(0)]=!0)}}populate(d,L,W){var te;let ue=this.layers[0],me=ue.layout,ge=me.get("text-font"),Ce=me.get("text-field"),Te=me.get("icon-image"),Oe=(Ce.value.kind!=="constant"||Ce.value.value instanceof Di&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(ge.value.kind!=="constant"||ge.value.value.length>0),Pe=Te.value.kind!=="constant"||!!Te.value.value||Object.keys(Te.parameters).length>0,it=me.get("symbol-sort-key");if(this.features=[],!Oe&&!Pe)return;let He=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,Qt=new oi(this.zoom);for(let{feature:er,id:br,index:sr,sourceLayerIndex:Mr}of d){let qr=ue._featureFilter.needGeometry,$r=fo(er,qr);if(!ue._featureFilter.filter(Qt,$r,W))continue;let _a,Ca;if(qr||($r.geometry=ql(er)),Oe){let qa=ue.getValueAndResolveTokens("text-field",$r,W,Et),bn=Di.factory(qa);this.hasRTLText||(this.hasRTLText=pY(bn)),(!this.hasRTLText||Si.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Si.isParsed())&&(_a=HW(bn,ue,$r))}if(Pe){let qa=ue.getValueAndResolveTokens("icon-image",$r,W,Et);Ca=qa instanceof qi?qa:qi.fromString(qa)}if(!_a&&!Ca)continue;let nn=this.sortFeaturesByKey?it.evaluate($r,{},W):void 0;if(this.features.push({id:br,text:_a,icon:Ca,index:sr,sourceLayerIndex:Mr,geometry:$r.geometry,properties:er.properties,type:Eg.types[er.type],sortKey:nn}),Ca&&(He[Ca.name]=!0),_a){let qa=ge.evaluate($r,{},W).join(","),bn=me.get("text-rotation-alignment")!=="viewport"&&me.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Fn of _a.sections)if(Fn.image)He[Fn.image.name]=!0;else{let gn=Br(_a.toString()),Va=Fn.fontStack||qa;bt[Va]||(bt[Va]={}),this.calculateGlyphDependencies(Fn.text,bt[Va],bn,this.allowVerticalPlacement,gn)}}}me.get("symbol-placement")==="line"&&(this.features=function(er){let br={},sr={},Mr=[],qr=0;function $r(qa){Mr.push(er[qa]),qr++}function _a(qa,bn,Fn){let gn=sr[qa];return delete sr[qa],sr[bn]=gn,Mr[gn].geometry[0].pop(),Mr[gn].geometry[0]=Mr[gn].geometry[0].concat(Fn[0]),gn}function Ca(qa,bn,Fn){let gn=br[bn];return delete br[bn],br[qa]=gn,Mr[gn].geometry[0].shift(),Mr[gn].geometry[0]=Fn[0].concat(Mr[gn].geometry[0]),gn}function nn(qa,bn,Fn){let gn=Fn?bn[0][bn[0].length-1]:bn[0][0];return`${qa}:${gn.x}:${gn.y}`}for(let qa=0;qaqa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((er,br)=>er.sortKey-br.sortKey)}update(d,L,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}))}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,L){let W=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),ue=d.dist(L[d.segment]),me={};for(let ge=d.segment+1;ge=0;ge--)me[ge]={x:L[ge].x,y:L[ge].y,tileUnitDistanceFromAnchor:ue},ge>0&&(ue+=L[ge-1].dist(L[ge]));for(let ge=0;ge0}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,L){let W=d.placedSymbolArray.get(L),te=W.vertexStartIndex+4*W.numGlyphs;for(let ue=W.vertexStartIndex;uete[ge]-te[Ce]||ue[Ce]-ue[ge]),me}addToSortKeyRanges(d,L){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W?.sortKey===L?W.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,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 L of this.symbolInstanceIndexes){let W=this.symbolInstances.get(L);this.featureSortOrder.push(W.featureIndex);let te=[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex];for(let ue=0;ue=0&&te.indexOf(me)===ue&&this.addIndicesForPlacedSymbol(this.text,me)}W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let nS,iS;fi("SymbolBucket",M0,{omit:["layers","collisionBoxArray","features","compareText"]}),M0.MAX_GLYPHS=65535,M0.addDynamicAttributes=S3;var C3={get paint(){return iS=iS||new Ps({"icon-opacity":new wi(ht.paint_symbol["icon-opacity"]),"icon-color":new wi(ht.paint_symbol["icon-color"]),"icon-halo-color":new wi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new wi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new wi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new hi(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new hi(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new wi(ht.paint_symbol["text-opacity"]),"text-color":new wi(ht.paint_symbol["text-color"],{runtimeType:cr,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new wi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new wi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new wi(ht.paint_symbol["text-halo-blur"]),"text-translate":new hi(ht.paint_symbol["text-translate"]),"text-translate-anchor":new hi(ht.paint_symbol["text-translate-anchor"])})},get layout(){return nS=nS||new Ps({"symbol-placement":new hi(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new hi(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new hi(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new wi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new hi(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new hi(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new hi(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new hi(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new hi(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new hi(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new wi(ht.layout_symbol["icon-size"]),"icon-text-fit":new hi(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new hi(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new wi(ht.layout_symbol["icon-image"]),"icon-rotate":new wi(ht.layout_symbol["icon-rotate"]),"icon-padding":new wi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new hi(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new wi(ht.layout_symbol["icon-offset"]),"icon-anchor":new wi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new hi(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new hi(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new hi(ht.layout_symbol["text-rotation-alignment"]),"text-field":new wi(ht.layout_symbol["text-field"]),"text-font":new wi(ht.layout_symbol["text-font"]),"text-size":new wi(ht.layout_symbol["text-size"]),"text-max-width":new wi(ht.layout_symbol["text-max-width"]),"text-line-height":new hi(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new wi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new wi(ht.layout_symbol["text-justify"]),"text-radial-offset":new wi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new hi(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new wi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new wi(ht.layout_symbol["text-anchor"]),"text-max-angle":new hi(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new hi(ht.layout_symbol["text-writing-mode"]),"text-rotate":new wi(ht.layout_symbol["text-rotate"]),"text-padding":new hi(ht.layout_symbol["text-padding"]),"text-keep-upright":new hi(ht.layout_symbol["text-keep-upright"]),"text-transform":new wi(ht.layout_symbol["text-transform"]),"text-offset":new wi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new hi(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new hi(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new hi(ht.layout_symbol["text-ignore-placement"]),"text-optional":new hi(ht.layout_symbol["text-optional"])})}};class oS{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:Yt,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.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}}fi("FormatSectionOverride",oS,{omit:["defaultValue"]});class wy extends ll{constructor(d,L){super(d,C3,L)}recalculate(d,L){if(super.recalculate(d,L),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let ue of W)te.includes(ue)||te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,W,te){let ue=this.layout.get(d).evaluate(L,{},W,te),me=this._unevaluatedLayout._values[d];return me.isDataDriven()||kc(me.value)||!ue?ue:function(ge,Ce){return Ce.replace(/{([^{}]+)}/g,(Te,Oe)=>ge&&Oe in ge?String(ge[Oe]):"")}(L.properties,ue)}createBucket(d){return new M0(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of C3.paint.overridableProperties){if(!wy.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),W=new oS(L),te=new kl(W,L.property.specification),ue=null;ue=L.value.kind==="constant"||L.value.kind==="source"?new Lc("source",te):new vc("composite",te,L.value.zoomStops),this.paint._values[d]=new Hs(L.property,ue,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,W){return!(!this.layout||L.isDataDriven()||W.isDataDriven())&&wy.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let W=d.get("text-field"),te=C3.paint.properties[L],ue=!1,me=ge=>{var Ce;for(let Te of ge)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(Te))return void(ue=!0)};if(W.value.kind==="constant"&&W.value.value instanceof Di)me(W.value.value.sections);else if(W.value.kind==="source"||W.value.kind==="composite"){let ge=Te=>{ue||(Te instanceof Mi&&qn(Te.value)===Pa?me(Te.value.sections):Te instanceof vs?me(Te.sections):Te.eachChild(ge))},Ce=W.value;Ce._styleExpression&&ge(Ce._styleExpression.expression)}return ue}}let sS;var vY={get paint(){return sS=sS||new Ps({"background-color":new hi(ht.paint_background["background-color"]),"background-pattern":new sc(ht.paint_background["background-pattern"]),"background-opacity":new hi(ht.paint_background["background-opacity"])})}};class mY extends ll{constructor(d,L){super(d,vY,L)}}class gY extends ll{constructor(d,L){super(d,{},L),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.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 yY{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let _Y={once:!0},L3=63710088e-1;class wp{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new wp(G(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,W=this.lat*L,te=d.lat*L,ue=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return L3*Math.acos(Math.min(ue,1))}static convert(d){if(d instanceof wp)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new wp(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new wp(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: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let lS=2*Math.PI*L3;function uS(R){return lS*Math.cos(R*Math.PI/180)}function cS(R){return(180+R)/360}function fS(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function hS(R,d){return R/uS(d)}function dS(R){return 360*R-180}function Ty(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}function pS(R,d){return R*uS(Ty(d))}class Ig{constructor(d,L,W=0){this.x=+d,this.y=+L,this.z=+W}static fromLngLat(d,L=0){let W=wp.convert(d);return new Ig(cS(W.lng),fS(W.lat),hS(L,W.lat))}toLngLat(){return new wp(dS(this.x),Ty(this.y))}toAltitude(){return pS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/lS*(d=Ty(this.y),1/Math.cos(d*Math.PI/180));var d}}function vS(R,d,L){var W=2*Math.PI*6378137/256/Math.pow(2,L);return[R*W-2*Math.PI*6378137/2,d*W-2*Math.PI*6378137/2]}class P3{constructor(d,L,W){if(!function(te,ue,me){return!(te<0||te>25||me<0||me>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(d,L,W))throw new Error(`x=${L}, y=${W}, 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=L,this.y=W,this.key=S0(0,d,d,L,W)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,W){let te=(me=this.y,ge=this.z,Ce=vS(256*(ue=this.x),256*(me=Math.pow(2,ge)-me-1),ge),Te=vS(256*(ue+1),256*(me+1),ge),Ce[0]+","+Ce[1]+","+Te[0]+","+Te[1]);var ue,me,ge,Ce,Te;let Oe=function(Pe,it,He){let bt="";for(let Et=Pe;Et>0;Et--){let Qt=1<1?"@2x":"").replace(/{quadkey}/g,Oe).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class mS{constructor(d,L){this.wrap=d,this.canonical=L,this.key=S0(d,L.z,L.z,L.x,L.y)}}class Ph{constructor(d,L,W,te,ue){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${W}`);this.overscaledZ=d,this.wrap=L,this.canonical=new P3(W,+te,+ue),this.key=S0(L,d,W,te,ue)}clone(){return new Ph(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 L=this.canonical.z-d;return d>this.canonical.z?new Ph(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ph(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-d;return d>this.canonical.z?S0(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):S0(this.wrap*+L,d,d,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new Ph(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new Ph(L,this.wrap,L,W,te),new Ph(L,this.wrap,L,W+1,te),new Ph(L,this.wrap,L,W,te+1),new Ph(L,this.wrap,L,W+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=Te)return null;let Pe=this.canonical.x+te,it=this.wrap;return Pe<0?(it-=Math.ceil(-Pe/Te),Pe=(Pe%Te+Te)%Te):Pe>=Te&&(it+=Math.floor(Pe/Te),Pe%=Te),{tileID:new Ph(this.overscaledZ,it,Ce,Pe,Oe),x:me,y:ge}}}function S0(R,d,L,W,te){(R*=2)<0&&(R=-1*R-1);let ue=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new Ev;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new Ev;for(let W of d)L.extend(W);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class gS{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=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 yS{constructor(d,L,W,te,ue){this.type="Feature",this._vectorTileFeature=d,this._x=W,this._y=te,this._z=L,this.properties=d.properties,this.id=ue}projectPoint(d,L,W,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+W)/te)*Math.PI))-90]}projectLine(d,L,W,te){return d.map(ue=>this.projectPoint(ue,L,W,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),W=d.extent*this._x,te=d.extent*this._y,ue=d.loadGeometry();switch(d.type){case 1:{let me=[];for(let Ce of ue)me.push(Ce[0]);let ge=this.projectLine(me,W,te,L);this._geometry=me.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge};break}case 2:{let me=ue.map(ge=>this.projectLine(ge,W,te,L));this._geometry=me.length===1?{type:"LineString",coordinates:me[0]}:{type:"MultiLineString",coordinates:me};break}case 3:{let me=b4(ue),ge=[];for(let Ce of me)ge.push(Ce.map(Te=>this.projectLine(Te,W,te,L)));this._geometry=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class E0{constructor(d,L,W){this._name=d,this.dataBuffer=L,typeof W=="number"?this._size=W:(this.nullabilityBuffer=W,this._size=W.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Ay extends E0{}class R3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class I3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class _S extends E0{constructor(d,L,W,te){super(d,L,te),this.delta=W}}class D3 extends _S{constructor(d,L,W,te){super(d,Int32Array.of(L),W,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class F3 extends E0{constructor(d,L,W,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),W)}getValueFromBuffer(d){return this.dataBuffer[0]}}class xY{constructor(d,L,W,te,ue=4096){this._name=d,this._geometryVector=L,this._idVector=W,this._propertyVectors=te,this._extent=ue}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let W=0;W>>32-R;let B3=z3,Xd=256;function O3(R,d){return R-R%d}function bY(R){let d=R>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let N3=function(){if(!Number.isFinite(65536))return 65536;let R=O3(Math.floor(65536),Xd);return R===0?Xd:R}(),wY=3*N3/Xd+N3|0;function bS(){let R=new Uint8Array(wY);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:R,byteContainerI32:new Int32Array(R.buffer,R.byteOffset,R.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function TY(R,d,L,W,te){switch(te){case 1:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=it>>>0&1,ge[Te++]=it>>>1&1,ge[Te++]=it>>>2&1,ge[Te++]=it>>>3&1,ge[Te++]=it>>>4&1,ge[Te++]=it>>>5&1,ge[Te++]=it>>>6&1,ge[Te++]=it>>>7&1,ge[Te++]=it>>>8&1,ge[Te++]=it>>>9&1,ge[Te++]=it>>>10&1,ge[Te++]=it>>>11&1,ge[Te++]=it>>>12&1,ge[Te++]=it>>>13&1,ge[Te++]=it>>>14&1,ge[Te++]=it>>>15&1,ge[Te++]=it>>>16&1,ge[Te++]=it>>>17&1,ge[Te++]=it>>>18&1,ge[Te++]=it>>>19&1,ge[Te++]=it>>>20&1,ge[Te++]=it>>>21&1,ge[Te++]=it>>>22&1,ge[Te++]=it>>>23&1,ge[Te++]=it>>>24&1,ge[Te++]=it>>>25&1,ge[Te++]=it>>>26&1,ge[Te++]=it>>>27&1,ge[Te++]=it>>>28&1,ge[Te++]=it>>>29&1,ge[Te++]=it>>>30&1,ge[Te++]=it>>>31&1}})(R,d,L,W);break;case 2:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0;ge[Te++]=it>>>0&3,ge[Te++]=it>>>2&3,ge[Te++]=it>>>4&3,ge[Te++]=it>>>6&3,ge[Te++]=it>>>8&3,ge[Te++]=it>>>10&3,ge[Te++]=it>>>12&3,ge[Te++]=it>>>14&3,ge[Te++]=it>>>16&3,ge[Te++]=it>>>18&3,ge[Te++]=it>>>20&3,ge[Te++]=it>>>22&3,ge[Te++]=it>>>24&3,ge[Te++]=it>>>26&3,ge[Te++]=it>>>28&3,ge[Te++]=it>>>30&3,ge[Te++]=He>>>0&3,ge[Te++]=He>>>2&3,ge[Te++]=He>>>4&3,ge[Te++]=He>>>6&3,ge[Te++]=He>>>8&3,ge[Te++]=He>>>10&3,ge[Te++]=He>>>12&3,ge[Te++]=He>>>14&3,ge[Te++]=He>>>16&3,ge[Te++]=He>>>18&3,ge[Te++]=He>>>20&3,ge[Te++]=He>>>22&3,ge[Te++]=He>>>24&3,ge[Te++]=He>>>26&3,ge[Te++]=He>>>28&3,ge[Te++]=He>>>30&3}})(R,d,L,W);break;case 3:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0;ge[Te++]=it>>>0&7,ge[Te++]=it>>>3&7,ge[Te++]=it>>>6&7,ge[Te++]=it>>>9&7,ge[Te++]=it>>>12&7,ge[Te++]=it>>>15&7,ge[Te++]=it>>>18&7,ge[Te++]=it>>>21&7,ge[Te++]=it>>>24&7,ge[Te++]=it>>>27&7,ge[Te++]=7&(it>>>30|(1&He)<<2),ge[Te++]=He>>>1&7,ge[Te++]=He>>>4&7,ge[Te++]=He>>>7&7,ge[Te++]=He>>>10&7,ge[Te++]=He>>>13&7,ge[Te++]=He>>>16&7,ge[Te++]=He>>>19&7,ge[Te++]=He>>>22&7,ge[Te++]=He>>>25&7,ge[Te++]=He>>>28&7,ge[Te++]=7&(He>>>31|(3&bt)<<1),ge[Te++]=bt>>>2&7,ge[Te++]=bt>>>5&7,ge[Te++]=bt>>>8&7,ge[Te++]=bt>>>11&7,ge[Te++]=bt>>>14&7,ge[Te++]=bt>>>17&7,ge[Te++]=bt>>>20&7,ge[Te++]=bt>>>23&7,ge[Te++]=bt>>>26&7,ge[Te++]=bt>>>29&7}})(R,d,L,W);break;case 4:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0;ge[Te++]=it>>>0&15,ge[Te++]=it>>>4&15,ge[Te++]=it>>>8&15,ge[Te++]=it>>>12&15,ge[Te++]=it>>>16&15,ge[Te++]=it>>>20&15,ge[Te++]=it>>>24&15,ge[Te++]=it>>>28&15,ge[Te++]=He>>>0&15,ge[Te++]=He>>>4&15,ge[Te++]=He>>>8&15,ge[Te++]=He>>>12&15,ge[Te++]=He>>>16&15,ge[Te++]=He>>>20&15,ge[Te++]=He>>>24&15,ge[Te++]=He>>>28&15,ge[Te++]=bt>>>0&15,ge[Te++]=bt>>>4&15,ge[Te++]=bt>>>8&15,ge[Te++]=bt>>>12&15,ge[Te++]=bt>>>16&15,ge[Te++]=bt>>>20&15,ge[Te++]=bt>>>24&15,ge[Te++]=bt>>>28&15,ge[Te++]=Et>>>0&15,ge[Te++]=Et>>>4&15,ge[Te++]=Et>>>8&15,ge[Te++]=Et>>>12&15,ge[Te++]=Et>>>16&15,ge[Te++]=Et>>>20&15,ge[Te++]=Et>>>24&15,ge[Te++]=Et>>>28&15}})(R,d,L,W);break;case 5:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0;ge[Te++]=it>>>0&31,ge[Te++]=it>>>5&31,ge[Te++]=it>>>10&31,ge[Te++]=it>>>15&31,ge[Te++]=it>>>20&31,ge[Te++]=it>>>25&31,ge[Te++]=31&(it>>>30|(7&He)<<2),ge[Te++]=He>>>3&31,ge[Te++]=He>>>8&31,ge[Te++]=He>>>13&31,ge[Te++]=He>>>18&31,ge[Te++]=He>>>23&31,ge[Te++]=31&(He>>>28|(1&bt)<<4),ge[Te++]=bt>>>1&31,ge[Te++]=bt>>>6&31,ge[Te++]=bt>>>11&31,ge[Te++]=bt>>>16&31,ge[Te++]=bt>>>21&31,ge[Te++]=bt>>>26&31,ge[Te++]=31&(bt>>>31|(15&Et)<<1),ge[Te++]=Et>>>4&31,ge[Te++]=Et>>>9&31,ge[Te++]=Et>>>14&31,ge[Te++]=Et>>>19&31,ge[Te++]=Et>>>24&31,ge[Te++]=31&(Et>>>29|(3&Qt)<<3),ge[Te++]=Qt>>>2&31,ge[Te++]=Qt>>>7&31,ge[Te++]=Qt>>>12&31,ge[Te++]=Qt>>>17&31,ge[Te++]=Qt>>>22&31,ge[Te++]=Qt>>>27&31}})(R,d,L,W);break;case 6:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0;ge[Te++]=it>>>0&63,ge[Te++]=it>>>6&63,ge[Te++]=it>>>12&63,ge[Te++]=it>>>18&63,ge[Te++]=it>>>24&63,ge[Te++]=63&(it>>>30|(15&He)<<2),ge[Te++]=He>>>4&63,ge[Te++]=He>>>10&63,ge[Te++]=He>>>16&63,ge[Te++]=He>>>22&63,ge[Te++]=63&(He>>>28|(3&bt)<<4),ge[Te++]=bt>>>2&63,ge[Te++]=bt>>>8&63,ge[Te++]=bt>>>14&63,ge[Te++]=bt>>>20&63,ge[Te++]=bt>>>26&63,ge[Te++]=Et>>>0&63,ge[Te++]=Et>>>6&63,ge[Te++]=Et>>>12&63,ge[Te++]=Et>>>18&63,ge[Te++]=Et>>>24&63,ge[Te++]=63&(Et>>>30|(15&Qt)<<2),ge[Te++]=Qt>>>4&63,ge[Te++]=Qt>>>10&63,ge[Te++]=Qt>>>16&63,ge[Te++]=Qt>>>22&63,ge[Te++]=63&(Qt>>>28|(3&er)<<4),ge[Te++]=er>>>2&63,ge[Te++]=er>>>8&63,ge[Te++]=er>>>14&63,ge[Te++]=er>>>20&63,ge[Te++]=er>>>26&63}})(R,d,L,W);break;case 7:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0;ge[Te++]=it>>>0&127,ge[Te++]=it>>>7&127,ge[Te++]=it>>>14&127,ge[Te++]=it>>>21&127,ge[Te++]=127&(it>>>28|(7&He)<<4),ge[Te++]=He>>>3&127,ge[Te++]=He>>>10&127,ge[Te++]=He>>>17&127,ge[Te++]=He>>>24&127,ge[Te++]=127&(He>>>31|(63&bt)<<1),ge[Te++]=bt>>>6&127,ge[Te++]=bt>>>13&127,ge[Te++]=bt>>>20&127,ge[Te++]=127&(bt>>>27|(3&Et)<<5),ge[Te++]=Et>>>2&127,ge[Te++]=Et>>>9&127,ge[Te++]=Et>>>16&127,ge[Te++]=Et>>>23&127,ge[Te++]=127&(Et>>>30|(31&Qt)<<2),ge[Te++]=Qt>>>5&127,ge[Te++]=Qt>>>12&127,ge[Te++]=Qt>>>19&127,ge[Te++]=127&(Qt>>>26|(1&er)<<6),ge[Te++]=er>>>1&127,ge[Te++]=er>>>8&127,ge[Te++]=er>>>15&127,ge[Te++]=er>>>22&127,ge[Te++]=127&(er>>>29|(15&br)<<3),ge[Te++]=br>>>4&127,ge[Te++]=br>>>11&127,ge[Te++]=br>>>18&127,ge[Te++]=br>>>25&127}})(R,d,L,W);break;case 8:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0,sr=ue[Oe++]>>>0;ge[Te++]=it>>>0&255,ge[Te++]=it>>>8&255,ge[Te++]=it>>>16&255,ge[Te++]=it>>>24&255,ge[Te++]=He>>>0&255,ge[Te++]=He>>>8&255,ge[Te++]=He>>>16&255,ge[Te++]=He>>>24&255,ge[Te++]=bt>>>0&255,ge[Te++]=bt>>>8&255,ge[Te++]=bt>>>16&255,ge[Te++]=bt>>>24&255,ge[Te++]=Et>>>0&255,ge[Te++]=Et>>>8&255,ge[Te++]=Et>>>16&255,ge[Te++]=Et>>>24&255,ge[Te++]=Qt>>>0&255,ge[Te++]=Qt>>>8&255,ge[Te++]=Qt>>>16&255,ge[Te++]=Qt>>>24&255,ge[Te++]=er>>>0&255,ge[Te++]=er>>>8&255,ge[Te++]=er>>>16&255,ge[Te++]=er>>>24&255,ge[Te++]=br>>>0&255,ge[Te++]=br>>>8&255,ge[Te++]=br>>>16&255,ge[Te++]=br>>>24&255,ge[Te++]=sr>>>0&255,ge[Te++]=sr>>>8&255,ge[Te++]=sr>>>16&255,ge[Te++]=sr>>>24&255}})(R,d,L,W);break;case 16:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<128;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=65535&it,ge[Te++]=it>>>16&65535}})(R,d,L,W);break;default:(function(ue,me,ge,Ce,Te){let Oe=B3[Te]>>>0,Pe=me,it=0,He=ue[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let Qt=0;Qt<32;Qt++)if(it+Te<=32)ge[bt+Qt]=He>>>it&Oe,it+=Te,it===32&&(it=0,Pe++,Qt!==31&&(He=ue[Pe]>>>0));else{let er=32-it,br=He>>>it;Pe++,He=ue[Pe]>>>0;let sr=Te-er;ge[bt+Qt]=(br|(He&-1>>>32-sr>>>0)<>>0)}})(R,d,L,W,te)}return d+(te<<3)|0}function AY(R,d,L,W){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${W} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=R[L++],ue=R[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${W} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:ue,bytePosIn:L}}function MY(R,d,L,W,te,ue,me,ge,Ce){let{maxBits:Te,exceptionBitWidth:Oe,bytePosIn:Pe}=function(Qt,er,br,sr,Mr,qr){if(br+1>er)throw new Error(`FastPFOR decode: exception header underflow at block=${qr} (need 1 byte for maxBits, bytePos=${br}, byteSize=${er})`);let $r=Qt[br++];if($r32)throw new Error(`FastPFOR decode: invalid maxBits=${$r} at block=${qr} (bitWidth=${sr}, expected ${sr}..32)`);let _a=$r-sr|0;if(_a<1||_a>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${_a} at block=${qr} (bitWidth=${sr}, maxBits=${$r})`);if(br+Mr>er)throw new Error(`FastPFOR decode: exception positions underflow at block=${qr} (need=${Mr}, have=${er-br})`);return{maxBits:$r,exceptionBitWidth:_a,bytePosIn:br}}(te,ue,me,L,W,Ce);if(me=Pe,Oe===1){let Qt=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${Oe} (ptr=${bt}, need ${W}, size=${Et}) at block ${Ce}`);for(let Qt=0;QtR.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${ge} at pageStart=${me} (expected > 0 and pageStart+whereMeta < encoded.length=${R.length})`);let Ce=me+1|0,Te=me+ge|0,Oe=R[Te]>>>0,Pe=Oe+3>>>2,it=Te+1,He=it+Pe;if(He>=R.length)throw new Error(`FastPFOR decode: invalid byteSize=${Oe} (metaInts=${Pe}, pageStart=${me}, packedEnd=${Te}, byteContainerStart=${it}) causes bitmapPos=${He} out of bounds (encoded.length=${R.length})`);let bt=function(er,br,sr,Mr){Mr.byteContainer.length>>2;if(3&qr.byteOffset)for(let Ca=0;Ca<$r;Ca=Ca+1|0){let nn=0|er[br+Ca|0],qa=Ca<<2;qr[qa]=255&nn,qr[qa+1|0]=nn>>>8&255,qr[qa+2|0]=nn>>>16&255,qr[qa+3|0]=nn>>>24&255}else{let Ca=Mr.byteContainerI32;(!Ca||Ca.buffer!==qr.buffer||Ca.byteOffset!==qr.byteOffset||Ca.length<$r)&&(Ca=Mr.byteContainerI32=new Int32Array(qr.buffer,qr.byteOffset,qr.byteLength>>>2)),Ca.set(er.subarray(br,br+$r))}let _a=3&sr;if(_a>0){let Ca=0|er[br+$r|0],nn=$r<<2;for(let qa=0;qa<_a;qa=qa+1|0)qr[nn+qa|0]=Ca>>>(qa<<3)&255}return qr}(R,it,Oe,ue),Et=Oe,Qt=function(er,br,sr){let Mr=0|er[br++],qr=sr.dataToBePacked;for(let $r=2;$r<=32;$r=$r+1|0){if(!(Mr>>>$r-1&1))continue;if(br>=er.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${$r}, streamWordIndex=${br}, needWords=1, availableWords=${er.length-br}, encodedWords=${er.length})`);let _a=er[br++]>>>0,Ca=O3(_a+31,32),nn=_a*$r+31>>>5;if(br+nn>er.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${$r}, size=${_a}, streamWordIndex=${br}, needWords=${nn}, availableWords=${er.length-br}, encodedWords=${er.length})`);let qa=qr[$r];(!qa||qa.length>>5)|0,sr.exceptionSizes[$r]=_a}return br}(R,He,ue);return ue.dataPointers.fill(0),function(er,br,sr,Mr,qr,$r,_a,Ca,nn,qa){let bn=0|sr,Fn=0;for(let gn=0;gn<_a;gn=gn+1|0){let Va=AY(Ca,nn,Fn,gn);Fn=Va.bytePosIn;let Hn=Va.bitWidth,ni=Va.exceptionCount,Wn=$r+gn*Xd|0;switch(Hn){case 0:qr.fill(0,Wn,Wn+Xd);break;case 32:for(let si=0;si0&&(Fn=MY(qr,Wn,Hn,ni,Ca,nn,Fn,qa,gn))}if(bn!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${br}, packedStart=${sr}, consumedPackedEnd=${bn}, expectedPackedEnd=${Mr}, packedWords=${Mr-sr}, encoded.length=${er.length})`)}(R,me,Ce,Te,d,0|W,te/Xd|0,bt,Et,ue),Qt}function EY(R,d,L,W,te){switch(te){case 2:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0;Pe[He++]=bt>>>0&3,Pe[He++]=bt>>>2&3,Pe[He++]=bt>>>4&3,Pe[He++]=bt>>>6&3,Pe[He++]=bt>>>8&3,Pe[He++]=bt>>>10&3,Pe[He++]=bt>>>12&3,Pe[He++]=bt>>>14&3,Pe[He++]=bt>>>16&3,Pe[He++]=bt>>>18&3,Pe[He++]=bt>>>20&3,Pe[He++]=bt>>>22&3,Pe[He++]=bt>>>24&3,Pe[He++]=bt>>>26&3,Pe[He++]=bt>>>28&3,Pe[He++]=bt>>>30&3,Pe[He++]=Et>>>0&3,Pe[He++]=Et>>>2&3,Pe[He++]=Et>>>4&3,Pe[He++]=Et>>>6&3,Pe[He++]=Et>>>8&3,Pe[He++]=Et>>>10&3,Pe[He++]=Et>>>12&3,Pe[He++]=Et>>>14&3,Pe[He++]=Et>>>16&3,Pe[He++]=Et>>>18&3,Pe[He++]=Et>>>20&3,Pe[He++]=Et>>>22&3,Pe[He++]=Et>>>24&3,Pe[He++]=Et>>>26&3,Pe[He++]=Et>>>28&3,Pe[He]=Et>>>30&3}(R,d,L,W);case 3:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0;Pe[He++]=bt>>>0&7,Pe[He++]=bt>>>3&7,Pe[He++]=bt>>>6&7,Pe[He++]=bt>>>9&7,Pe[He++]=bt>>>12&7,Pe[He++]=bt>>>15&7,Pe[He++]=bt>>>18&7,Pe[He++]=bt>>>21&7,Pe[He++]=bt>>>24&7,Pe[He++]=bt>>>27&7,Pe[He++]=7&(bt>>>30|(1&Et)<<2),Pe[He++]=Et>>>1&7,Pe[He++]=Et>>>4&7,Pe[He++]=Et>>>7&7,Pe[He++]=Et>>>10&7,Pe[He++]=Et>>>13&7,Pe[He++]=Et>>>16&7,Pe[He++]=Et>>>19&7,Pe[He++]=Et>>>22&7,Pe[He++]=Et>>>25&7,Pe[He++]=Et>>>28&7,Pe[He++]=7&(Et>>>31|(3&Qt)<<1),Pe[He++]=Qt>>>2&7,Pe[He++]=Qt>>>5&7,Pe[He++]=Qt>>>8&7,Pe[He++]=Qt>>>11&7,Pe[He++]=Qt>>>14&7,Pe[He++]=Qt>>>17&7,Pe[He++]=Qt>>>20&7,Pe[He++]=Qt>>>23&7,Pe[He++]=Qt>>>26&7,Pe[He]=Qt>>>29&7}(R,d,L,W);case 4:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0;Pe[He++]=bt>>>0&15,Pe[He++]=bt>>>4&15,Pe[He++]=bt>>>8&15,Pe[He++]=bt>>>12&15,Pe[He++]=bt>>>16&15,Pe[He++]=bt>>>20&15,Pe[He++]=bt>>>24&15,Pe[He++]=bt>>>28&15,Pe[He++]=Et>>>0&15,Pe[He++]=Et>>>4&15,Pe[He++]=Et>>>8&15,Pe[He++]=Et>>>12&15,Pe[He++]=Et>>>16&15,Pe[He++]=Et>>>20&15,Pe[He++]=Et>>>24&15,Pe[He++]=Et>>>28&15,Pe[He++]=Qt>>>0&15,Pe[He++]=Qt>>>4&15,Pe[He++]=Qt>>>8&15,Pe[He++]=Qt>>>12&15,Pe[He++]=Qt>>>16&15,Pe[He++]=Qt>>>20&15,Pe[He++]=Qt>>>24&15,Pe[He++]=Qt>>>28&15,Pe[He++]=er>>>0&15,Pe[He++]=er>>>4&15,Pe[He++]=er>>>8&15,Pe[He++]=er>>>12&15,Pe[He++]=er>>>16&15,Pe[He++]=er>>>20&15,Pe[He++]=er>>>24&15,Pe[He]=er>>>28&15}(R,d,L,W);case 5:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0;Pe[He++]=bt>>>0&31,Pe[He++]=bt>>>5&31,Pe[He++]=bt>>>10&31,Pe[He++]=bt>>>15&31,Pe[He++]=bt>>>20&31,Pe[He++]=bt>>>25&31,Pe[He++]=31&(bt>>>30|(7&Et)<<2),Pe[He++]=Et>>>3&31,Pe[He++]=Et>>>8&31,Pe[He++]=Et>>>13&31,Pe[He++]=Et>>>18&31,Pe[He++]=Et>>>23&31,Pe[He++]=31&(Et>>>28|(1&Qt)<<4),Pe[He++]=Qt>>>1&31,Pe[He++]=Qt>>>6&31,Pe[He++]=Qt>>>11&31,Pe[He++]=Qt>>>16&31,Pe[He++]=Qt>>>21&31,Pe[He++]=Qt>>>26&31,Pe[He++]=31&(Qt>>>31|(15&er)<<1),Pe[He++]=er>>>4&31,Pe[He++]=er>>>9&31,Pe[He++]=er>>>14&31,Pe[He++]=er>>>19&31,Pe[He++]=er>>>24&31,Pe[He++]=31&(er>>>29|(3&br)<<3),Pe[He++]=br>>>2&31,Pe[He++]=br>>>7&31,Pe[He++]=br>>>12&31,Pe[He++]=br>>>17&31,Pe[He++]=br>>>22&31,Pe[He]=br>>>27&31}(R,d,L,W);case 6:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0;Pe[He++]=bt>>>0&63,Pe[He++]=bt>>>6&63,Pe[He++]=bt>>>12&63,Pe[He++]=bt>>>18&63,Pe[He++]=bt>>>24&63,Pe[He++]=63&(bt>>>30|(15&Et)<<2),Pe[He++]=Et>>>4&63,Pe[He++]=Et>>>10&63,Pe[He++]=Et>>>16&63,Pe[He++]=Et>>>22&63,Pe[He++]=63&(Et>>>28|(3&Qt)<<4),Pe[He++]=Qt>>>2&63,Pe[He++]=Qt>>>8&63,Pe[He++]=Qt>>>14&63,Pe[He++]=Qt>>>20&63,Pe[He++]=Qt>>>26&63,Pe[He++]=er>>>0&63,Pe[He++]=er>>>6&63,Pe[He++]=er>>>12&63,Pe[He++]=er>>>18&63,Pe[He++]=er>>>24&63,Pe[He++]=63&(er>>>30|(15&br)<<2),Pe[He++]=br>>>4&63,Pe[He++]=br>>>10&63,Pe[He++]=br>>>16&63,Pe[He++]=br>>>22&63,Pe[He++]=63&(br>>>28|(3&sr)<<4),Pe[He++]=sr>>>2&63,Pe[He++]=sr>>>8&63,Pe[He++]=sr>>>14&63,Pe[He++]=sr>>>20&63,Pe[He]=sr>>>26&63}(R,d,L,W);case 7:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0;Pe[He++]=bt>>>0&127,Pe[He++]=bt>>>7&127,Pe[He++]=bt>>>14&127,Pe[He++]=bt>>>21&127,Pe[He++]=127&(bt>>>28|(7&Et)<<4),Pe[He++]=Et>>>3&127,Pe[He++]=Et>>>10&127,Pe[He++]=Et>>>17&127,Pe[He++]=Et>>>24&127,Pe[He++]=127&(Et>>>31|(63&Qt)<<1),Pe[He++]=Qt>>>6&127,Pe[He++]=Qt>>>13&127,Pe[He++]=Qt>>>20&127,Pe[He++]=127&(Qt>>>27|(3&er)<<5),Pe[He++]=er>>>2&127,Pe[He++]=er>>>9&127,Pe[He++]=er>>>16&127,Pe[He++]=er>>>23&127,Pe[He++]=127&(er>>>30|(31&br)<<2),Pe[He++]=br>>>5&127,Pe[He++]=br>>>12&127,Pe[He++]=br>>>19&127,Pe[He++]=127&(br>>>26|(1&sr)<<6),Pe[He++]=sr>>>1&127,Pe[He++]=sr>>>8&127,Pe[He++]=sr>>>15&127,Pe[He++]=sr>>>22&127,Pe[He++]=127&(sr>>>29|(15&Mr)<<3),Pe[He++]=Mr>>>4&127,Pe[He++]=Mr>>>11&127,Pe[He++]=Mr>>>18&127,Pe[He]=Mr>>>25&127}(R,d,L,W);case 8:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0;Pe[He++]=bt>>>0&255,Pe[He++]=bt>>>8&255,Pe[He++]=bt>>>16&255,Pe[He++]=bt>>>24&255,Pe[He++]=Et>>>0&255,Pe[He++]=Et>>>8&255,Pe[He++]=Et>>>16&255,Pe[He++]=Et>>>24&255,Pe[He++]=Qt>>>0&255,Pe[He++]=Qt>>>8&255,Pe[He++]=Qt>>>16&255,Pe[He++]=Qt>>>24&255,Pe[He++]=er>>>0&255,Pe[He++]=er>>>8&255,Pe[He++]=er>>>16&255,Pe[He++]=er>>>24&255,Pe[He++]=br>>>0&255,Pe[He++]=br>>>8&255,Pe[He++]=br>>>16&255,Pe[He++]=br>>>24&255,Pe[He++]=sr>>>0&255,Pe[He++]=sr>>>8&255,Pe[He++]=sr>>>16&255,Pe[He++]=sr>>>24&255,Pe[He++]=Mr>>>0&255,Pe[He++]=Mr>>>8&255,Pe[He++]=Mr>>>16&255,Pe[He++]=Mr>>>24&255,Pe[He++]=qr>>>0&255,Pe[He++]=qr>>>8&255,Pe[He++]=qr>>>16&255,Pe[He]=qr>>>24&255}(R,d,L,W);case 9:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0;Pe[He++]=bt>>>0&511,Pe[He++]=bt>>>9&511,Pe[He++]=bt>>>18&511,Pe[He++]=511&(bt>>>27|(15&Et)<<5),Pe[He++]=Et>>>4&511,Pe[He++]=Et>>>13&511,Pe[He++]=Et>>>22&511,Pe[He++]=511&(Et>>>31|(255&Qt)<<1),Pe[He++]=Qt>>>8&511,Pe[He++]=Qt>>>17&511,Pe[He++]=511&(Qt>>>26|(7&er)<<6),Pe[He++]=er>>>3&511,Pe[He++]=er>>>12&511,Pe[He++]=er>>>21&511,Pe[He++]=511&(er>>>30|(127&br)<<2),Pe[He++]=br>>>7&511,Pe[He++]=br>>>16&511,Pe[He++]=511&(br>>>25|(3&sr)<<7),Pe[He++]=sr>>>2&511,Pe[He++]=sr>>>11&511,Pe[He++]=sr>>>20&511,Pe[He++]=511&(sr>>>29|(63&Mr)<<3),Pe[He++]=Mr>>>6&511,Pe[He++]=Mr>>>15&511,Pe[He++]=511&(Mr>>>24|(1&qr)<<8),Pe[He++]=qr>>>1&511,Pe[He++]=qr>>>10&511,Pe[He++]=qr>>>19&511,Pe[He++]=511&(qr>>>28|(31&$r)<<4),Pe[He++]=$r>>>5&511,Pe[He++]=$r>>>14&511,Pe[He]=$r>>>23&511}(R,d,L,W);case 10:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0;Pe[He++]=bt>>>0&1023,Pe[He++]=bt>>>10&1023,Pe[He++]=bt>>>20&1023,Pe[He++]=1023&(bt>>>30|(255&Et)<<2),Pe[He++]=Et>>>8&1023,Pe[He++]=Et>>>18&1023,Pe[He++]=1023&(Et>>>28|(63&Qt)<<4),Pe[He++]=Qt>>>6&1023,Pe[He++]=Qt>>>16&1023,Pe[He++]=1023&(Qt>>>26|(15&er)<<6),Pe[He++]=er>>>4&1023,Pe[He++]=er>>>14&1023,Pe[He++]=1023&(er>>>24|(3&br)<<8),Pe[He++]=br>>>2&1023,Pe[He++]=br>>>12&1023,Pe[He++]=br>>>22&1023,Pe[He++]=sr>>>0&1023,Pe[He++]=sr>>>10&1023,Pe[He++]=sr>>>20&1023,Pe[He++]=1023&(sr>>>30|(255&Mr)<<2),Pe[He++]=Mr>>>8&1023,Pe[He++]=Mr>>>18&1023,Pe[He++]=1023&(Mr>>>28|(63&qr)<<4),Pe[He++]=qr>>>6&1023,Pe[He++]=qr>>>16&1023,Pe[He++]=1023&(qr>>>26|(15&$r)<<6),Pe[He++]=$r>>>4&1023,Pe[He++]=$r>>>14&1023,Pe[He++]=1023&($r>>>24|(3&_a)<<8),Pe[He++]=_a>>>2&1023,Pe[He++]=_a>>>12&1023,Pe[He]=_a>>>22&1023}(R,d,L,W);case 11:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0;Pe[He++]=bt>>>0&2047,Pe[He++]=bt>>>11&2047,Pe[He++]=2047&(bt>>>22|(1&Et)<<10),Pe[He++]=Et>>>1&2047,Pe[He++]=Et>>>12&2047,Pe[He++]=2047&(Et>>>23|(3&Qt)<<9),Pe[He++]=Qt>>>2&2047,Pe[He++]=Qt>>>13&2047,Pe[He++]=2047&(Qt>>>24|(7&er)<<8),Pe[He++]=er>>>3&2047,Pe[He++]=er>>>14&2047,Pe[He++]=2047&(er>>>25|(15&br)<<7),Pe[He++]=br>>>4&2047,Pe[He++]=br>>>15&2047,Pe[He++]=2047&(br>>>26|(31&sr)<<6),Pe[He++]=sr>>>5&2047,Pe[He++]=sr>>>16&2047,Pe[He++]=2047&(sr>>>27|(63&Mr)<<5),Pe[He++]=Mr>>>6&2047,Pe[He++]=Mr>>>17&2047,Pe[He++]=2047&(Mr>>>28|(127&qr)<<4),Pe[He++]=qr>>>7&2047,Pe[He++]=qr>>>18&2047,Pe[He++]=2047&(qr>>>29|(255&$r)<<3),Pe[He++]=$r>>>8&2047,Pe[He++]=$r>>>19&2047,Pe[He++]=2047&($r>>>30|(511&_a)<<2),Pe[He++]=_a>>>9&2047,Pe[He++]=_a>>>20&2047,Pe[He++]=2047&(_a>>>31|(1023&Ca)<<1),Pe[He++]=Ca>>>10&2047,Pe[He]=Ca>>>21&2047}(R,d,L,W);case 12:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0;Pe[He++]=bt>>>0&4095,Pe[He++]=bt>>>12&4095,Pe[He++]=4095&(bt>>>24|(15&Et)<<8),Pe[He++]=Et>>>4&4095,Pe[He++]=Et>>>16&4095,Pe[He++]=4095&(Et>>>28|(255&Qt)<<4),Pe[He++]=Qt>>>8&4095,Pe[He++]=Qt>>>20&4095,Pe[He++]=er>>>0&4095,Pe[He++]=er>>>12&4095,Pe[He++]=4095&(er>>>24|(15&br)<<8),Pe[He++]=br>>>4&4095,Pe[He++]=br>>>16&4095,Pe[He++]=4095&(br>>>28|(255&sr)<<4),Pe[He++]=sr>>>8&4095,Pe[He++]=sr>>>20&4095,Pe[He++]=Mr>>>0&4095,Pe[He++]=Mr>>>12&4095,Pe[He++]=4095&(Mr>>>24|(15&qr)<<8),Pe[He++]=qr>>>4&4095,Pe[He++]=qr>>>16&4095,Pe[He++]=4095&(qr>>>28|(255&$r)<<4),Pe[He++]=$r>>>8&4095,Pe[He++]=$r>>>20&4095,Pe[He++]=_a>>>0&4095,Pe[He++]=_a>>>12&4095,Pe[He++]=4095&(_a>>>24|(15&Ca)<<8),Pe[He++]=Ca>>>4&4095,Pe[He++]=Ca>>>16&4095,Pe[He++]=4095&(Ca>>>28|(255&nn)<<4),Pe[He++]=nn>>>8&4095,Pe[He]=nn>>>20&4095}(R,d,L,W);case 16:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0,qa=Te[Oe+12]>>>0,bn=Te[Oe+13]>>>0,Fn=Te[Oe+14]>>>0,gn=Te[Oe+15]>>>0;Pe[He++]=bt>>>0&65535,Pe[He++]=bt>>>16&65535,Pe[He++]=Et>>>0&65535,Pe[He++]=Et>>>16&65535,Pe[He++]=Qt>>>0&65535,Pe[He++]=Qt>>>16&65535,Pe[He++]=er>>>0&65535,Pe[He++]=er>>>16&65535,Pe[He++]=br>>>0&65535,Pe[He++]=br>>>16&65535,Pe[He++]=sr>>>0&65535,Pe[He++]=sr>>>16&65535,Pe[He++]=Mr>>>0&65535,Pe[He++]=Mr>>>16&65535,Pe[He++]=qr>>>0&65535,Pe[He++]=qr>>>16&65535,Pe[He++]=$r>>>0&65535,Pe[He++]=$r>>>16&65535,Pe[He++]=_a>>>0&65535,Pe[He++]=_a>>>16&65535,Pe[He++]=Ca>>>0&65535,Pe[He++]=Ca>>>16&65535,Pe[He++]=nn>>>0&65535,Pe[He++]=nn>>>16&65535,Pe[He++]=qa>>>0&65535,Pe[He++]=qa>>>16&65535,Pe[He++]=bn>>>0&65535,Pe[He++]=bn>>>16&65535,Pe[He++]=Fn>>>0&65535,Pe[He++]=Fn>>>16&65535,Pe[He++]=gn>>>0&65535,Pe[He]=gn>>>16&65535}(R,d,L,W);case 32:for(let Te=0;Te<32;Te=Te+1|0)L[W+Te|0]=0|R[d+Te|0];return}let ue=B3[te]>>>0,me=d,ge=0,Ce=R[me]>>>0;for(let Te=0;Te<32;Te++)if(ge+te<=32)L[W+Te]=Ce>>>ge&ue,ge+=te,ge===32&&(ge=0,me++,Te!==31&&(Ce=R[me]>>>0));else{let Oe=32-ge,Pe=Ce>>>ge;me++,Ce=R[me]>>>0,L[W+Te]=(Pe|(Ce&B3[te-Oe]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function CY(R,d){let L,W;return W=R[d.get()],d.increment(),L=127&W,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<7,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<14,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<21,W<128?L:(W=R[d.get()],L|=(15&W)<<28,function(te,ue,me){let ge,Ce;if(Ce=ue[me.get()],me.increment(),ge=(112&Ce)>>4,Ce<128||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<3,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<10,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<17,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<24,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(1&Ce)<<31,Ce<128))return 4294967296*ge+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,R,d)))))}function Js(R){return R>>>1^-(1&R)}function fh(R){return R>>BigInt("1")^-(BigInt("1")&R)}function C0(R){return R%2==1?(R+1)/-2:R/2}function j3(R,d,L){if(L===void 0){L=0;for(let ue=0;ue=4)for(;W=4)for(;W=4)for(let W=R[0];L>4],ge=null;switch(me){case Tf.DATA:ge={dictionaryType:Object.values(fd)[15&ue]};break;case Tf.OFFSET:ge={offsetType:Object.values(kv)[15&ue]};break;case Tf.LENGTH:ge={lengthType:Object.values(Rh)[15&ue]}}te.increment();let Ce=W[te.get()],Te=Object.values(us)[Ce>>5],Oe=Object.values(us)[Ce>>2&7],Pe=Object.values(Tp)[3&Ce];te.increment();let it=Yf(W,te,2),He=it[0];return{physicalStreamType:me,logicalStreamType:ge,logicalLevelTechnique1:Te,logicalLevelTechnique2:Oe,physicalLevelTechnique:Pe,numValues:He,byteLength:it[1],decompressedCount:He}}(R,d);return L.logicalLevelTechnique1===us.MORTON?function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:W.decompressedCount,numBits:me[0],coordinateShift:me[1]}}(L,R,d):us.RLE!==L.logicalLevelTechnique1&&us.RLE!==L.logicalLevelTechnique2||Tp.NONE===L.physicalLevelTechnique?L:function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:me[1],runs:me[0],numRleValues:me[1]}}(L,R,d)}(function(R){R.PRESENT="PRESENT",R.DATA="DATA",R.OFFSET="OFFSET",R.LENGTH="LENGTH"})(Tf||(Tf={})),function(R){R.NONE="NONE",R.SINGLE="SINGLE",R.SHARED="SHARED",R.VERTEX="VERTEX",R.MORTON="MORTON",R.FSST="FSST"}(fd||(fd={})),function(R){R.VERTEX="VERTEX",R.INDEX="INDEX",R.STRING="STRING",R.KEY="KEY"}(kv||(kv={})),function(R){R.VAR_BINARY="VAR_BINARY",R.GEOMETRIES="GEOMETRIES",R.PARTS="PARTS",R.RINGS="RINGS",R.TRIANGLES="TRIANGLES",R.SYMBOL="SYMBOL",R.DICTIONARY="DICTIONARY"}(Rh||(Rh={})),function(R){R[R.FLAT=0]="FLAT",R[R.CONST=1]="CONST",R[R.SEQUENCE=2]="SEQUENCE",R[R.DICTIONARY=3]="DICTIONARY",R[R.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Gl||(Gl={}));class hd{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let W=Math.floor(d/8);this.values[W]=this.values[W]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function L0(R,d,L){if(!d)return R;let W=d.size(),te=new R.constructor(W),ue=0;for(let me=0;me=4)for(;He>>0;for(let it=1;it>>0;return Pe}(me.logicalLevelTechnique2===us.RLE?j3(ue,me.runs,me.numRleValues):ue);break;case us.RLE:Te=j3(ue,me.runs,me.numRleValues);break;case us.MORTON:q3(ue),Te=ue;break;case us.COMPONENTWISE_DELTA:Te=function(Oe){if(Oe.length<2)return new Uint32Array(Oe);let Pe=new Uint32Array(Oe.length);Pe[0]=Js(Oe[0])>>>0,Pe[1]=Js(Oe[1])>>>0;for(let it=2;it>>0,Pe[it+1]=Pe[it-1]+Js(Oe[it+1])>>>0;return Pe}(ue);break;case us.NONE:Te=ue;break;default:throw new Error(`The specified Logical level technique is not supported: ${me.logicalLevelTechnique1}`)}return Ce?L0(Te,Ce,0):Te}(P0(R,d,L),L,0,te)}function Mp(R,d,L){return function(W,te){if(te.logicalLevelTechnique1===us.DELTA&&te.logicalLevelTechnique2===us.NONE)return function(ue){let me=new Int32Array(ue.length+1);me[0]=0,me[1]=Js(ue[0]);let ge=me[1];for(let Ce=2;Ce!==me.length;++Ce)ge+=Js(ue[Ce-1]),me[Ce]=me[Ce-1]+ge;return new Uint32Array(me)}(W);if(te.logicalLevelTechnique1===us.RLE&&te.logicalLevelTechnique2===us.NONE)return function(ue,me,ge){let Ce=new Uint32Array(ge+1);Ce[0]=0;let Te=1,Oe=Ce[0];for(let Pe=0;Pe>>2,Et=function(er,br){if(br<=er.encodedWords.length)return er.encodedWords;let sr=new Uint32Array(Math.max(16,2*br));return er.encodedWords=sr,sr}(it,bt);(function(er,br,sr,Mr){if(br<0||sr<0||br+sr>er.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${br}, byteLength=${sr}, bytes.length=${er.length})`);let qr=Math.floor(sr/4),$r=sr%4!=0,_a=$r?qr+1:qr;if(Mr.length<_a)throw new RangeError(`decodeBigEndianInt32sInto: out.length=${Mr.length} < ${_a}`);if(qr>0){let Ca=er.byteOffset+br;if(3&Ca)for(let nn=0;nn0){let Ca=0|er[Mr];if(Mr=Mr+1|0,255&Ca)throw new Error(`FastPFOR decode: invalid alignedLength=${Ca} (expected multiple of 256)`);if(qr+Ca>$r.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${qr}, alignedLength=${Ca}, out.length=${$r.length})`);Mr=function(nn,qa,bn,Fn,gn,Va){let Hn=Fn+O3(gn,Xd),ni=Fn,Wn=bn;for(;ni!==Hn;){let si=Math.min(N3,Hn-ni);Wn=SY(nn,qa,Wn,ni,si,Va),ni=ni+si|0}return Wn}(er,$r,Mr,qr,Ca,_a),qr=qr+Ca|0}return function(Ca,nn,qa,bn,Fn,gn){if(gn===0)return nn;let Va=0,Hn=nn,ni=nn+qa,Wn=Fn,si=Fn,po=Fn+gn,cs=0,Ds=0;for(;Hn>>Va&255;if(Va+=8,Hn+=Va>>>5,Va&=31,cs|=(127&Xs)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${Ds}, partial=${cs}, decoded=${si-Wn}/${gn}, inPos=${Hn}, inEnd=${ni})`)}if(si!==po)throw new Error(`FastPFOR VByte: truncated stream (decoded=${si-Wn}, expected=${gn}, consumedWords=${Hn-nn}/${qa}, vbyteStart=${nn}, vbyteEnd=${ni})`)}(er,Mr,er.length-Mr|0,$r,qr,br-qr|0),$r}(Et.subarray(0,bt),Te,it.decoderWorkspace);return Pe.add(Oe),Qt}(te,ue,me,ge,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let Te=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(Te),decoderWorkspace:bS()}}(me>>>2))}(R,L.numValues,L.byteLength,d);case Tp.VARINT:return Yf(R,d,L.numValues);case Tp.NONE:{let te=d.get();d.add(L.byteLength);let ue=R.subarray(te,d.get());return new Uint32Array(ue)}default:throw new Error(`Specified physicalLevelTechnique ${W} is not supported (yet).`)}}function G3(R,d,L){let W=P0(R,d,L);return W.length===1?W[0]:function(te){return te[1]}(W)}function SS(R,d,L){return function(W){if(W.length===2){let te=Js(W[1]);return[te,te]}return[Js(W[2]),Js(W[3])]}(P0(R,d,L))}function ES(R,d,L){return function(W){if(W.length===2){let te=fh(W[1]);return[te,te]}return[fh(W[2]),fh(W[3])]}(k0(R,d,L.numValues))}function kS(R,d,L,W){return function(te,ue,me){let ge;switch(ue.logicalLevelTechnique1){case us.DELTA:ge=function(Ce){let Te=new BigUint64Array(Ce.length);Te[0]=BigInt.asUintN(64,fh(Ce[0]));for(let Oe=1;Oe>1,d)-L}}function RS(R,d){let L=0;for(let W=0;W>W;return L}function R0(R,d,L,W,te,ue,me){return R===Ap.MORTON?function(ge,Ce,Te,Oe,Pe,it){let He=new Array(Pe?Oe+1:Oe);for(let bt=0;bt[qr]),W+=sr,te+=sr}break;case Ic.LINESTRING:{let sr,Mr;Qt?(sr=He[te]-He[te-1],te++):sr=it[W]-it[W-1],W++,Et?(Mr=I0(er,ge,sr,!1),ge+=2*sr):(Mr=R0(d.vertexBufferType,er,bt,Ce,sr,!1,Te),Ce+=sr),L[me++]=[Mr],Pe&&ue++}break;case Ic.POLYGON:{let sr=it[W]-it[W-1];W++;let Mr=new Array(sr-1),qr,$r=He[te]-He[te-1];if(te++,Et){qr=I0(er,ge,$r,!0),ge+=2*$r;for(let _a=0;_a0&&Et.push(Et[0]),it.push(Et)}d[Oe]=it,ue&&Te++}break;case Ic.MULTIPOLYGON:{let Pe=ue[Te]-ue[Te-1];Te++;let it=[];for(let He=0;He0&&er.push(er[0]),it.push(er)}}d[Oe]=it}}return d}[Symbol.iterator](){return null}}function BS(R,d,L,W,te,ue){return new LY(R,d,L,W,te,ue)}class LY extends zS{constructor(d,L,W,te,ue,me){super(W,te,ue,me),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function OS(R,d,L,W,te){return new PY(R,d,L,W,te)}class PY extends zS{constructor(d,L,W,te,ue){super(L,W,te,ue),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function RY(R,d,L,W,te){let ue=hh(R,L),me,ge,Ce,Te;if(My(ue,W,R,L)===Gl.CONST){let br=G3(R,L,ue),sr,Mr,qr,$r;for(let _a=0;_aL?d[ue++]:1);return W}function NS(R,d,L,W){let te=new Uint32Array(d[d.length-1]+1),ue=0;te[0]=ue;let me=1,ge=0;for(let Ce=0;Ce=it);){let He=me[Te.increment()];if(He<=127){let bt=He+3,Et=me[Te.increment()],Qt=Math.min(Pe+bt,ge);Oe.fill(Et,Pe,Qt),Pe=Qt}else{let bt=256-He;for(let Et=0;Et=12?FY.decode(R.subarray(d,L)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(R,d,L)}class X3 extends E0{constructor(d,L,W,te){super(d,W,te),this.offsetBuffer=L}}class US extends X3{constructor(d,L,W,te){super(d,L,W,te??L.length-1)}getValueFromBuffer(d){return Y3(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class D0 extends X3{constructor(d,L,W,te,ue){super(d,W,te,ue??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Y3(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class qS extends X3{constructor(d,L,W,te,ue,me,ge){super(d,W,te,ge),this.indexBuffer=L,this.symbolOffsetBuffer=ue,this.symbolTableBuffer=me}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(W,te,ue){let me=[],ge=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function HS(R){return R===30}function BY(R){if(R.type==="scalarType"){let d=R.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(R.type==="complexType"){let d=R.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",R),!1}function OY(R){var d;return R.type==="complexType"&&((d=R.complexType)==null?void 0:d.type)==="physicalType"&&R.complexType.physicalType===0}let NY=new TextDecoder;function Z3(R,d){let L=Yf(R,d,1)[0];if(L===0)return"";let W=d.get(),te=R.subarray(W,W+L);return d.add(L),NY.decode(te)}function WS(R,d){let L=Yf(R,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let W=VS(L);if(GS(L)&&(W.name=Z3(R,d)),HS(L)){let te=Yf(R,d,1)[0]>>>0;W.complexType.children=new Array(te);for(let ue=0;ue>>0,W=VS(L);if(!W)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(GS(L)?W.name=Z3(R,d):L>=0&&L<=3?W.name="id":L===4&&(W.name="geometry"),HS(L)){let te=Yf(R,d,1)[0]>>>0,ue=W.complexType;ue.children=new Array(te);for(let me=0;me>>0,ue=Yf(R,d,1)[0]>>>0;W.columns=new Array(ue);for(let me=0;me=4)for(;qr>>0,Pe=ge.get()+Oe;if(Pe>W.length)throw new Error(`Block overruns tile: ${Pe} > ${W.length}`);if(Yf(W,ge,1)[0]>>>0!=1){ge.set(Pe);continue}let[it,He]=UY(W,ge),bt=it.featureTables[0],Et=null,Qt=null,er=[],br=0;for(let Mr of bt.columns){let qr=Mr.name;if((Te=Mr).type==="scalarType"&&((me=Te.scalarType)==null?void 0:me.type)==="logicalType"&&Te.scalarType.logicalType===0){let $r=null;if(Mr.nullable){let Ca=hh(W,ge),nn=ge.get(),qa=Dg(W,Ca.numValues,Ca.byteLength,ge);ge.set(nn+Ca.byteLength),$r=new hd(qa,Ca.numValues)}let _a=hh(W,ge);br=$r?$r.size():_a.decompressedCount,Et=qY(W,Mr,ge,qr,_a,$r??br,ue)}else if(OY(Mr)){let $r=Yf(W,ge,1)[0];if(br===0){let _a=ge.get();br=hh(W,ge).decompressedCount,ge.set(_a)}Qt=RY(W,$r,ge,br)}else{let $r=BY(Mr)?Yf(W,ge,1)[0]:1;if($r===0)continue;let _a=zY(W,ge,Mr,$r,br);if(_a)if(Array.isArray(_a))for(let Ca of _a)er.push(Ca);else er.push(_a)}}let sr=new xY(bt.name,Qt,Et,er,He);Ce.push(sr),ge.set(Pe)}var Te;return Ce}(new Uint8Array(d));this.layers=L.reduce((W,te)=>Object.assign(Object.assign({},W),{[te.name]:new GY(te)}),{})}}class HY{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let W of L){let te=[];for(let ue of W)te.push(new t(ue[0],ue[1]));d.push(te)}return d}}let zg="_geojsonTileLayer";function WY(R,d,L=""){d.writeVarintField(15,R.version||1),d.writeStringField(1,R.name||""),d.writeVarintField(5,R.extent||4096);let W={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let me=0;me>31}function ZY(R,d){let L=R.loadGeometry(),W=R.type,te=0,ue=0;for(let me of L){let ge=1;W===1&&(ge=me.length),d.writeVarint($3(1,ge));let Ce=W===3?me.length-1:me.length;for(let Te=0;Te=0&&Oe[3]>=0&&Ce.insert(ge,Oe[0],Oe[1],Oe[2],Oe[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new w4(new _y(this.rawTileData)).layers:new YS(this.rawTileData).layers,this.sourceLayerCoder=new gS(this.vtLayers?Object.keys(this.vtLayers).sort():[zg])),this.vtLayers}query(d,L,W,te){this.loadVTLayers();let ue=d.params,me=F/d.tileSize/d.scale,ge=Na(ue.filter,ue.globalState),Ce=d.queryGeometry,Te=d.queryPadding*me,Oe=Ev.fromPoints(Ce),Pe=this.grid.query(Oe.minX-Te,Oe.minY-Te,Oe.maxX+Te,Oe.maxY+Te),it=Ev.fromPoints(d.cameraQueryGeometry).expandBy(Te),He=this.grid3D.query(it.minX,it.minY,it.maxX,it.maxY,(Qt,er,br,sr)=>function(Mr,qr,$r,_a,Ca){for(let qa of Mr)if(qr<=qa.x&&$r<=qa.y&&_a>=qa.x&&Ca>=qa.y)return!0;let nn=[new t(qr,$r),new t(qr,Ca),new t(_a,Ca),new t(_a,$r)];if(Mr.length>2){for(let qa of nn)if(Wa(Mr,qa))return!0}for(let qa=0;qa(br||(br=ql(sr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:sr,featureState:qr,geometry:br,zoom:this.z,transform:d.transform,pixelsToTileUnits:me,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=this.bucketLayerIDs[L];if(me&&!it.some(Qt=>me.has(Qt)))return;let He=this.sourceLayerCoder.decode(W),bt=this.vtLayers[He].feature(te);if(ue.needGeometry){let Qt=fo(bt,!0);if(!ue.filter(new oi(this.tileID.overscaledZ),Qt,this.tileID.canonical))return}else if(!ue.filter(new oi(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,He);for(let Qt of it){if(me&&!me.has(Qt))continue;let er=Ce[Qt];if(!er)continue;let br={};Et&&Oe&&(br=Oe.getState(er.sourceLayer||zg,Et));let sr=X({},Te[Qt]);sr.paint=$S(sr.paint,er.paint,bt,br,ge),sr.layout=$S(sr.layout,er.layout,bt,br,ge);let Mr=!Pe||Pe(bt,er,br);if(!Mr)continue;let qr=new yS(bt,this.z,this.x,this.y,Et);qr.layer=sr;let $r=d[Qt];$r===void 0&&($r=d[Qt]=[]),$r.push({featureIndex:te,feature:qr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,W,te,ue,me,ge,Ce){let Te={};this.loadVTLayers();let Oe=Na(ue.filterSpec,ue.globalState);for(let Pe of d)this.loadMatchingFeature(Te,W,te,Pe,Oe,me,ge,Ce,L);return Te}hasLayer(d){for(let L of this.bucketLayerIDs)for(let W of L)if(d===W)return!0;return!1}getId(d,L){var W;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((W=d.properties)===null||W===void 0)&&W.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function $S(R,d,L,W,te){return H(R,(ue,me)=>{let ge=d instanceof Cu?d.get(me):null;return ge?.evaluate?ge.evaluate(L,W,te):ge})}function KY(R,d){return d-R}function KS(R,d,L,W,te){let ue=[];for(let me of R){let ge;for(let Ce=0;Ce=W&&Oe.x>=W||(Te.x>=W?Te=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round():Oe.x>=W&&(Oe=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round()),Te.y>=te&&Oe.y>=te||(Te.y>=te?Te=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round():Oe.y>=te&&(Oe=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round()),ge&&Te.equals(ge[ge.length-1])||(ge=[Te],ue.push(ge)),ge.push(Oe)))))}}return ue}function JS(R,d,L,W,te){switch(d){case 1:return function(ue,me,ge,Ce){let Te=[];for(let Oe of ue)for(let Pe of Oe){let it=Ce===0?Pe.x:Pe.y;it>=me&&it<=ge&&Te.push([Pe])}return Te}(R,L,W,te);case 2:return QS(R,L,W,te,!1);case 3:return QS(R,L,W,te,!0)}return[]}function JY(R,d,L,W,te){let ue=W===0?QY:eX,me=[],ge=[];for(let Oe=0;Oed&&me.push(ue(Pe,it,d)):He>L?bt=d&&(me.push(ue(Pe,it,d)),Et=!0),bt>L&&He<=L&&(me.push(ue(Pe,it,L)),Et=!0),!te&&Et&&(ge.push(me),me=[])}let Ce=R.length-1,Te=W===0?R[Ce].x:R[Ce].y;return Te>=d&&Te<=L&&me.push(R[Ce]),te&&me.length>0&&!me[0].equals(me[me.length-1])&&me.push(new t(me[0].x,me[0].y)),me.length>0&&ge.push(me),ge}function QS(R,d,L,W,te){let ue=[];for(let me of R){let ge=JY(me,d,L,W,te);ge.length>0&&ue.push(...ge)}return ue}function QY(R,d,L){return new t(L,R.y+(L-R.x)/(d.x-R.x)*(d.y-R.y))}function eX(R,d,L){return new t(R.x+(L-R.y)/(d.y-R.y)*(d.x-R.x),L)}fi("FeatureIndex",ZS,{omit:["rawTileData","sourceLayerCoder"]});class Sp extends t{constructor(d,L,W,te){super(d,L),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new Sp(this.x,this.y,this.angle,this.segment)}}function eE(R,d,L,W,te){if(d.segment===void 0||L===0)return!0;let ue=d,me=d.segment+1,ge=0;for(;ge>-L/2;){if(me--,me<0)return!1;ge-=R[me].dist(ue),ue=R[me]}ge+=R[me].dist(R[me+1]),me++;let Ce=[],Te=0;for(;geW;)Te-=Ce.shift().angleDelta;if(Te>te)return!1;me++,ge+=Oe.dist(Pe)}return!0}function tE(R){let d=0;for(let L=0;LTe){let bt=(Te-Ce)/He,Et=bs.number(Pe.x,it.x,bt),Qt=bs.number(Pe.y,it.y,bt),er=new Sp(Et,Qt,it.angleTo(Pe),Oe);return er._round(),!me||eE(R,er,ge,me,d)?er:void 0}Ce+=He}}function rX(R,d,L,W,te,ue,me,ge,Ce){let Te=rE(W,ue,me),Oe=aE(W,te),Pe=Oe*me,it=R[0].x===0||R[0].x===Ce||R[0].y===0||R[0].y===Ce;return d-Pe=0&&Mr=0&&qr=0&&it+Te<=Oe){let $r=new Sp(Mr,qr,br,bt);$r._round(),W&&!eE(R,$r,ue,W,te)||He.push($r)}}Pe+=er}return ge||He.length||me||(He=nE(R,Pe/2,L,W,te,ue,me,!0,Ce)),He}function iE(R,d,L,W){let te=[],ue=R.image,me=ue.pixelRatio,ge=ue.paddedRect.w-2,Ce=ue.paddedRect.h-2,Te={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Oe=ue.stretchX||[[0,ge]],Pe=ue.stretchY||[[0,Ce]],it=(Va,Hn)=>Va+Hn[1]-Hn[0],He=Oe.reduce(it,0),bt=Pe.reduce(it,0),Et=ge-He,Qt=Ce-bt,er=0,br=He,sr=0,Mr=bt,qr=0,$r=Et,_a=0,Ca=Qt;if(ue.content&&W){let Va=ue.content,Hn=Va[2]-Va[0],ni=Va[3]-Va[1];(ue.textFitWidth||ue.textFitHeight)&&(Te=tS(R)),er=Sy(Oe,0,Va[0]),sr=Sy(Pe,0,Va[1]),br=Sy(Oe,Va[0],Va[2]),Mr=Sy(Pe,Va[1],Va[3]),qr=Va[0]-er,_a=Va[1]-sr,$r=Hn-br,Ca=ni-Mr}let nn=Te.x1,qa=Te.y1,bn=Te.x2-nn,Fn=Te.y2-qa,gn=(Va,Hn,ni,Wn)=>{let si=Ey(Va.stretch-er,br,bn,nn),po=ky(Va.fixed-qr,$r,Va.stretch,He),cs=Ey(Hn.stretch-sr,Mr,Fn,qa),Ds=ky(Hn.fixed-_a,Ca,Hn.stretch,bt),Xs=Ey(ni.stretch-er,br,bn,nn),Mf=ky(ni.fixed-qr,$r,ni.stretch,He),vu=Ey(Wn.stretch-sr,Mr,Fn,qa),yc=ky(Wn.fixed-_a,Ca,Wn.stretch,bt),Dc=new t(si,cs),Hl=new t(Xs,cs),rf=new t(Xs,vu),Xf=new t(si,vu),Zf=new t(po/me,Ds/me),Th=new t(Mf/me,yc/me),Sf=d*Math.PI/180;if(Sf){let Fc=Math.sin(Sf),nu=Math.cos(Sf),lc=[nu,-Fc,Fc,nu];Dc._matMult(lc),Hl._matMult(lc),Xf._matMult(lc),rf._matMult(lc)}let Ah=Va.stretch+Va.fixed,Hh=Hn.stretch+Hn.fixed;return{tl:Dc,tr:Hl,bl:Xf,br:rf,tex:{x:ue.paddedRect.x+1+Ah,y:ue.paddedRect.y+1+Hh,w:ni.stretch+ni.fixed-Ah,h:Wn.stretch+Wn.fixed-Hh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zf,pixelOffsetBR:Th,minFontScaleX:$r/me/bn,minFontScaleY:Ca/me/Fn,isSDF:L}};if(W&&(ue.stretchX||ue.stretchY)){let Va=oE(Oe,Et,He),Hn=oE(Pe,Qt,bt);for(let ni=0;ni0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let it=!((Pe=me.image)===null||Pe===void 0)&&Pe.content&&(me.image.textFitWidth||me.image.textFitHeight)?tS(me):{x1:me.left,y1:me.top,x2:me.right,y2:me.bottom};it.y1=it.y1*ge-Ce[0],it.y2=it.y2*ge+Ce[2],it.x1=it.x1*ge-Ce[3],it.x2=it.x2*ge+Ce[1];let He=me.collisionPadding;if(He&&(it.x1-=He[0]*ge,it.y1-=He[1]*ge,it.x2+=He[2]*ge,it.y2+=He[3]*ge),Oe){let bt=new t(it.x1,it.y1),Et=new t(it.x2,it.y1),Qt=new t(it.x1,it.y2),er=new t(it.x2,it.y2),br=Oe*Math.PI/180;bt._rotate(br),Et._rotate(br),Qt._rotate(br),er._rotate(br),it.x1=Math.min(bt.x,Et.x,Qt.x,er.x),it.x2=Math.max(bt.x,Et.x,Qt.x,er.x),it.y1=Math.min(bt.y,Et.y,Qt.y,er.y),it.y2=Math.max(bt.y,Et.y,Qt.y,er.y)}d.emplaceBack(L.x,L.y,it.x1,it.y1,it.x2,it.y2,W,te,ue)}this.boxEndIndex=d.length}}class aX{constructor(d=[],L=(W,te)=>Wte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:W}=this,te=L[d];for(;d>0;){let ue=d-1>>1,me=L[ue];if(W(te,me)>=0)break;L[d]=me,d=ue}L[d]=te}_down(d){let{data:L,compare:W}=this,te=this.length>>1,ue=L[d];for(;d=0)break;L[d]=L[me],d=me}L[d]=ue}}function nX(R,d=1){let L=Ev.fromPoints(R[0]),W=Math.min(L.width(),L.height()),te=W/2,ue=new aX([],iX),{minX:me,minY:ge,maxX:Ce,maxY:Te}=L;if(W===0)return new t(me,ge);for(let it=me;itPe.d||!Pe.d)&&(Pe=it),it.max-Pe.d<=d||(te=it.h/2,ue.push(new F0(it.p.x-te,it.p.y-te,te,R)),ue.push(new F0(it.p.x+te,it.p.y-te,te,R)),ue.push(new F0(it.p.x-te,it.p.y+te,te,R)),ue.push(new F0(it.p.x+te,it.p.y+te,te,R)))}return Oe.d>0&&Pe.d-Oe.d<=d?Oe.p:Pe.p}function iX(R,d){return d.max-R.max}class F0{constructor(d,L,W,te){this.p=new t(d,L),this.h=W,this.d=function(ue,me){let ge=!1,Ce=1/0;for(let Te of me)for(let Oe=0,Pe=Te.length,it=Pe-1;Oeue.y!=bt.y>ue.y&&ue.x<(bt.x-He.x)*(ue.y-He.y)/(bt.y-He.y)+He.x&&(ge=!ge),Ce=Math.min(Ce,na(ue,He,bt))}return(ge?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var Af;l.aM=void 0,(Af=l.aM||(l.aM={}))[Af.center=1]="center",Af[Af.left=2]="left",Af[Af.right=3]="right",Af[Af.top=4]="top",Af[Af.bottom=5]="bottom",Af[Af["top-left"]=6]="top-left",Af[Af["top-right"]=7]="top-right",Af[Af["bottom-left"]=8]="bottom-left",Af[Af["bottom-right"]=9]="bottom-right";let K3=Number.POSITIVE_INFINITY;function sE(R,d){return d[1]!==K3?function(L,W,te){let ue=0,me=0;switch(W=Math.abs(W),te=Math.abs(te),L){case"top-right":case"top-left":case"top":me=te-7;break;case"bottom-right":case"bottom-left":case"bottom":me=7-te}switch(L){case"top-right":case"bottom-right":case"right":ue=-W;break;case"top-left":case"bottom-left":case"left":ue=W}return[ue,me]}(R,d[0],d[1]):function(L,W){let te=0,ue=0;W<0&&(W=0);let me=W/Math.SQRT2;switch(L){case"top-right":case"top-left":ue=me-7;break;case"bottom-right":case"bottom-left":ue=7-me;break;case"bottom":ue=7-W;break;case"top":ue=W-7}switch(L){case"top-right":case"bottom-right":te=-me;break;case"top-left":case"bottom-left":te=me;break;case"left":te=W;break;case"right":te=-W}return[te,ue]}(R,d[0])}function lE(R,d,L){var W;let te=R.layout,ue=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(d,{},L);if(ue){let ge=ue.values,Ce=[];for(let Te=0;Teit*Rc);Oe.startsWith("top")?Pe[1]-=7:Oe.startsWith("bottom")&&(Pe[1]+=7),Ce[Te+1]=Pe}return new gi(Ce)}let me=te.get("text-variable-anchor");if(me){let ge;ge=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*Rc,K3]:te.get("text-offset").evaluate(d,{},L).map(Te=>Te*Rc);let Ce=[];for(let Te of me)Ce.push(Te,sE(Te,ge));return new gi(Ce)}return null}function J3(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function oX(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=ue.textMaxSize.evaluate(d,{});it===void 0&&(it=me);let He=R.layers[0].layout,bt=He.get("icon-offset").evaluate(d,{},Oe),Et=cE(L.horizontal),Qt=me/24,er=R.tilePixelRatio*Qt,br=R.tilePixelRatio*it/24,sr=R.tilePixelRatio*ge,Mr=R.tilePixelRatio*He.get("symbol-spacing"),qr=He.get("text-padding")*R.tilePixelRatio,$r=function(ni,Wn,si,po=1){let cs=ni.get("icon-padding").evaluate(Wn,{},si),Ds=cs?.values;return[Ds[0]*po,Ds[1]*po,Ds[2]*po,Ds[3]*po]}(He,d,Oe,R.tilePixelRatio),_a=He.get("text-max-angle")/180*Math.PI,Ca=He.get("text-rotation-alignment")!=="viewport"&&He.get("symbol-placement")!=="point",nn=He.get("icon-rotation-alignment")==="map"&&He.get("symbol-placement")!=="point",qa=He.get("symbol-placement"),bn=Mr/2,Fn=He.get("icon-text-fit"),gn;W&&Fn!=="none"&&(R.allowVerticalPlacement&&L.vertical&&(gn=rS(W,L.vertical,Fn,He.get("icon-text-fit-padding"),bt,Qt)),Et&&(W=rS(W,Et,Fn,He.get("icon-text-fit-padding"),bt,Qt)));let Va=Oe?Pe.line.getGranularityForZoomLevel(Oe.z):1,Hn=(ni,Wn)=>{Wn.x<0||Wn.x>=F||Wn.y<0||Wn.y>=F||function(si,po,cs,Ds,Xs,Mf,vu,yc,Dc,Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc,nu,lc,mu,zc,Zd,dd,Bg){let Ep=si.addToLineVertexArray(po,cs),Cv,z0,B0,O0,fE=0,hE=0,dE=0,pE=0,Q3=-1,ew=-1,$d={},vE=Jn("");if(si.allowVerticalPlacement&&Ds.vertical){let $f=yc.layout.get("text-rotate").evaluate(mu,{},dd)+90;B0=new Cy(Dc,po,Hl,rf,Xf,Ds.vertical,Zf,Th,Sf,$f),vu&&(O0=new Cy(Dc,po,Hl,rf,Xf,vu,Hh,Fc,Sf,$f))}if(Xs){let $f=yc.layout.get("icon-rotate").evaluate(mu,{}),Nh=yc.layout.get("icon-text-fit")!=="none",Lv=iE(Xs,$f,Zd,Nh),vd=vu?iE(vu,$f,Zd,Nh):void 0;z0=new Cy(Dc,po,Hl,rf,Xf,Xs,Hh,Fc,!1,$f),fE=4*Lv.length;let Pv=si.iconSizeData,Sd=null;Pv.kind==="source"?(Sd=[Yd*yc.layout.get("icon-size").evaluate(mu,{})],Sd[0]>bp&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Pv.kind==="composite"&&(Sd=[Yd*zc.compositeIconSizes[0].evaluate(mu,{},dd),Yd*zc.compositeIconSizes[1].evaluate(mu,{},dd)],(Sd[0]>bp||Sd[1]>bp)&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),si.addSymbols(si.icon,Lv,Sd,lc,nu,mu,l.ax.none,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),Q3=si.icon.placedSymbolArray.length-1,vd&&(hE=4*vd.length,si.addSymbols(si.icon,vd,Sd,lc,nu,mu,l.ax.vertical,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),ew=si.icon.placedSymbolArray.length-1)}let mE=Object.keys(Ds.horizontal);for(let $f of mE){let Nh=Ds.horizontal[$f];if(!Cv){vE=Jn(Nh.text);let vd=yc.layout.get("text-rotate").evaluate(mu,{},dd);Cv=new Cy(Dc,po,Hl,rf,Xf,Nh,Zf,Th,Sf,vd)}let Lv=Nh.positionedLines.length===1;if(dE+=uE(si,po,Nh,Mf,yc,Sf,mu,Ah,Ep,Ds.vertical?l.ax.horizontal:l.ax.horizontalOnly,Lv?mE:[$f],$d,Q3,zc,dd),Lv)break}Ds.vertical&&(pE+=uE(si,po,Ds.vertical,Mf,yc,Sf,mu,Ah,Ep,l.ax.vertical,["vertical"],$d,ew,zc,dd));let lX=Cv?Cv.boxStartIndex:si.collisionBoxArray.length,uX=Cv?Cv.boxEndIndex:si.collisionBoxArray.length,cX=B0?B0.boxStartIndex:si.collisionBoxArray.length,fX=B0?B0.boxEndIndex:si.collisionBoxArray.length,hX=z0?z0.boxStartIndex:si.collisionBoxArray.length,dX=z0?z0.boxEndIndex:si.collisionBoxArray.length,pX=O0?O0.boxStartIndex:si.collisionBoxArray.length,vX=O0?O0.boxEndIndex:si.collisionBoxArray.length,pd=-1,Ly=($f,Nh)=>$f?.circleDiameter?Math.max($f.circleDiameter,Nh):Nh;pd=Ly(Cv,pd),pd=Ly(B0,pd),pd=Ly(z0,pd),pd=Ly(O0,pd);let gE=pd>-1?1:0;gE&&(pd*=Bg/Rc),si.glyphOffsetArray.length>=M0.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mu.sortKey!==void 0&&si.addToSortKeyRanges(si.symbolInstances.length,mu.sortKey);let mX=lE(yc,mu,dd),[gX,yX]=function($f,Nh){let Lv=$f.length,vd=Nh?.values;if(vd?.length>0)for(let Pv=0;Pv=0?$d.right:-1,$d.center>=0?$d.center:-1,$d.left>=0?$d.left:-1,$d.vertical||-1,Q3,ew,vE,lX,uX,cX,fX,hX,dX,pX,vX,Hl,dE,pE,fE,hE,gE,0,Zf,pd,gX,yX)}(R,Wn,ni,L,W,te,gn,R.layers[0],R.collisionBoxArray,d.index,d.sourceLayerIndex,R.index,er,[qr,qr,qr,qr],Ca,Ce,sr,$r,nn,bt,d,ue,Te,Oe,me)};if(qa==="line")for(let ni of KS(d.geometry,0,0,F,F)){let Wn=Sv(ni,Va),si=rX(Wn,Mr,_a,L.vertical||Et,W,24,br,R.overscaling,F);for(let po of si)Et&&sX(R,Et.text,bn,po)||Hn(Wn,po)}else if(qa==="line-center"){for(let ni of d.geometry)if(ni.length>1){let Wn=Sv(ni,Va),si=tX(Wn,_a,L.vertical||Et,W,24,br);si&&Hn(Wn,si)}}else if(d.type==="Polygon")for(let ni of Yc(d.geometry,0)){let Wn=nX(ni,16);Hn(Sv(ni[0],Va,!0),new Sp(Wn.x,Wn.y,0))}else if(d.type==="LineString")for(let ni of d.geometry){let Wn=Sv(ni,Va);Hn(Wn,new Sp(Wn[0].x,Wn[0].y,0))}else if(d.type==="Point")for(let ni of d.geometry)for(let Wn of ni)Hn([Wn],new Sp(Wn.x,Wn.y,0))}function uE(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt){let Et=function(br,sr,Mr,qr,$r,_a,Ca,nn){let qa=qr.layout.get("text-rotate").evaluate(_a,{})*Math.PI/180,bn=[];for(let Fn of sr.positionedLines)for(let gn of Fn.positionedGlyphs){if(!gn.rect)continue;let Va=gn.rect||{},Hn=4,ni=!0,Wn=1,si=0,po=($r||nn)&&gn.vertical,cs=gn.metrics.advance*gn.scale/2;if(nn&&sr.verticalizable&&(si=Fn.lineOffset/2-(gn.imageName?-(Rc-gn.metrics.width*gn.scale)/2:(gn.scale-1)*Rc)),gn.imageName){let Fc=Ca[gn.imageName];ni=Fc.sdf,Wn=Fc.pixelRatio,Hn=1/Wn}let Ds=$r?[gn.x+cs,gn.y]:[0,0],Xs=$r?[0,0]:[gn.x+cs+Mr[0],gn.y+Mr[1]-si],Mf=[0,0];po&&(Mf=Xs,Xs=[0,0]);let vu=gn.metrics.isDoubleResolution?2:1,yc=(gn.metrics.left-Hn)*gn.scale-cs+Xs[0],Dc=(-gn.metrics.top-Hn)*gn.scale+Xs[1],Hl=yc+Va.w/vu*gn.scale/Wn,rf=Dc+Va.h/vu*gn.scale/Wn,Xf=new t(yc,Dc),Zf=new t(Hl,Dc),Th=new t(yc,rf),Sf=new t(Hl,rf);if(po){let Fc=new t(-cs,cs- -17),nu=-Math.PI/2,lc=12-cs,mu=new t(22-lc,-(gn.imageName?lc:0)),zc=new t(...Mf);Xf._rotateAround(nu,Fc)._add(mu)._add(zc),Zf._rotateAround(nu,Fc)._add(mu)._add(zc),Th._rotateAround(nu,Fc)._add(mu)._add(zc),Sf._rotateAround(nu,Fc)._add(mu)._add(zc)}if(qa){let Fc=Math.sin(qa),nu=Math.cos(qa),lc=[nu,-Fc,Fc,nu];Xf._matMult(lc),Zf._matMult(lc),Th._matMult(lc),Sf._matMult(lc)}let Ah=new t(0,0),Hh=new t(0,0);bn.push({tl:Xf,tr:Zf,bl:Th,br:Sf,tex:Va,writingMode:sr.writingMode,glyphOffset:Ds,sectionIndex:gn.sectionIndex,isSDF:ni,pixelOffsetTL:Ah,pixelOffsetBR:Hh,minFontScaleX:0,minFontScaleY:0})}return bn}(0,L,ge,te,ue,me,W,R.allowVerticalPlacement),Qt=R.textSizeData,er=null;Qt.kind==="source"?(er=[Yd*te.layout.get("text-size").evaluate(me,{})],er[0]>bp&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Qt.kind==="composite"&&(er=[Yd*He.compositeTextSizes[0].evaluate(me,{},bt),Yd*He.compositeTextSizes[1].evaluate(me,{},bt)],(er[0]>bp||er[1]>bp)&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),R.addSymbols(R.text,Et,er,ge,ue,me,Te,d,Ce.lineStartIndex,Ce.lineLength,it,bt);for(let br of Oe)Pe[br]=R.text.placedSymbolArray.length-1;return 4*Et.length}function cE(R){for(let d in R)return R[d];return null}function sX(R,d,L,W){let te=R.compareText;if(d in te){let ue=te[d];for(let me=ue.length-1;me>=0;me--)if(W.dist(ue[me])this.process()),this.subscription=Ge(this.target,"message",L=>this.receive(L),!1),this.globalScope=he(self)?R:window}registerMessageHandler(R,d){this.messageHandlers[R]=d}unregisterMessageHandler(R){delete this.messageHandlers[R]}sendAsync(R,d){return new Promise((L,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),ue=d?Ge(d.signal,"abort",()=>{ue?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},_Y):null;this.resolveRejects[te]={resolve:Ce=>{ue?.unsubscribe(),L(Ce)},reject:Ce=>{ue?.unsubscribe(),W(Ce)}};let me=[],ge=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:mt(R.data,me)});this.target.postMessage(ge,{transfer:me})})}receive(R){let d=R.data,L=d.id,W=["file://","resource://android","null"],te=[d.origin,location.origin],ue=d.origin===location.origin,me=te.some(ge=>W.includes(ge));if((ue||me)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let ge=this.abortControllers[L];return delete this.abortControllers[L],void(ge&&ge.abort())}if(he(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),d=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(R,d)}processTask(R,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(d.error?te.reject(j(xt(d.error))):te.resolve(xt(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=xt(d.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,j(te))}})}completeTask(R,d,L){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?mt(d):null,data:mt(L,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var R=new i(16);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},l.P=t,l.Q=function(R,d,L){var W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et=L[0],Qt=L[1],er=L[2];return d===R?(R[12]=d[0]*Et+d[4]*Qt+d[8]*er+d[12],R[13]=d[1]*Et+d[5]*Qt+d[9]*er+d[13],R[14]=d[2]*Et+d[6]*Qt+d[10]*er+d[14],R[15]=d[3]*Et+d[7]*Qt+d[11]*er+d[15]):(te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],R[0]=W=d[0],R[1]=te,R[2]=ue,R[3]=me,R[4]=ge,R[5]=Ce,R[6]=Te,R[7]=Oe,R[8]=Pe,R[9]=it,R[10]=He,R[11]=bt,R[12]=W*Et+ge*Qt+Pe*er+d[12],R[13]=te*Et+Ce*Qt+it*er+d[13],R[14]=ue*Et+Te*Qt+He*er+d[14],R[15]=me*Et+Oe*Qt+bt*er+d[15]),R},l.R=ls,l.S=function(R,d,L){var W=L[0],te=L[1],ue=L[2];return R[0]=d[0]*W,R[1]=d[1]*W,R[2]=d[2]*W,R[3]=d[3]*W,R[4]=d[4]*te,R[5]=d[5]*te,R[6]=d[6]*te,R[7]=d[7]*te,R[8]=d[8]*ue,R[9]=d[9]*ue,R[10]=d[10]*ue,R[11]=d[11]*ue,R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.T=vp,l.U=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],Et=d[12],Qt=d[13],er=d[14],br=d[15],sr=L[0],Mr=L[1],qr=L[2],$r=L[3];return R[0]=sr*W+Mr*ge+qr*Pe+$r*Et,R[1]=sr*te+Mr*Ce+qr*it+$r*Qt,R[2]=sr*ue+Mr*Te+qr*He+$r*er,R[3]=sr*me+Mr*Oe+qr*bt+$r*br,R[4]=(sr=L[4])*W+(Mr=L[5])*ge+(qr=L[6])*Pe+($r=L[7])*Et,R[5]=sr*te+Mr*Ce+qr*it+$r*Qt,R[6]=sr*ue+Mr*Te+qr*He+$r*er,R[7]=sr*me+Mr*Oe+qr*bt+$r*br,R[8]=(sr=L[8])*W+(Mr=L[9])*ge+(qr=L[10])*Pe+($r=L[11])*Et,R[9]=sr*te+Mr*Ce+qr*it+$r*Qt,R[10]=sr*ue+Mr*Te+qr*He+$r*er,R[11]=sr*me+Mr*Oe+qr*bt+$r*br,R[12]=(sr=L[12])*W+(Mr=L[13])*ge+(qr=L[14])*Pe+($r=L[15])*Et,R[13]=sr*te+Mr*Ce+qr*it+$r*Qt,R[14]=sr*ue+Mr*Te+qr*He+$r*er,R[15]=sr*me+Mr*Oe+qr*bt+$r*br,R},l.V=function(R,d){let L={};for(let W of d)W in R&&(L[W]=R[W]);return L},l.W=wp,l.X=G,l.Y=fS,l.Z=cS,l._=e,l.a=Ae,l.a$=function(R){var d=new i(3);return d[0]=R[0],d[1]=R[1],d[2]=R[2],d},l.a0=h,l.a1=v,l.a2=Se,l.a3=Ph,l.a4=dS,l.a5=Ty,l.a6=F,l.a7=Ig,l.a8=Ev,l.a9=25,l.aA=function(R){var d=R[0],L=R[1];return Math.sqrt(d*d+L*L)},l.aB=function(R){return R[0]=0,R[1]=0,R},l.aC=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R},l.aD=S3,l.aE=z,l.aF=function(R,d,L,W){let te=d.y-R.y,ue=d.x-R.x,me=W.y-L.y,ge=W.x-L.x,Ce=me*ue-ge*te;if(Ce===0)return null;let Te=(ge*(R.y-L.y)-me*(R.x-L.x))/Ce;return new t(R.x+Te*ue,R.y+Te*te)},l.aG=KS,l.aH=Ya,l.aI=function(R){let d=1/0,L=1/0,W=-1/0,te=-1/0;for(let ue of R)d=Math.min(d,ue.x),L=Math.min(L,ue.y),W=Math.max(W,ue.x),te=Math.max(te,ue.y);return[d,L,W,te]},l.aJ=Rc,l.aK=P,l.aL=function(R,d,L,W,te=!1){if(!L[0]&&!L[1])return[0,0];let ue=te?W==="map"?-R.bearingInRadians:0:W==="viewport"?R.bearingInRadians:0;if(ue){let me=Math.sin(ue),ge=Math.cos(ue);L=[L[0]*ge-L[1]*me,L[0]*me+L[1]*ge]}return[te?L[0]:P(d,L[0],R.zoom),te?L[1]:P(d,L[1],R.zoom)]},l.aN=M3,l.aO=J3,l.aP=A3,l.aQ=R=>R.type==="symbol",l.aR=dy,l.aS=ct,l.aT=hy,l.aU=It,l.aV=Fa,l.aW=ua,l.aX=_e,l.aY=pS,l.aZ=f,l.a_=T,l.aa=P3,l.ab=R=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let W of R){let te=window.document.createElement("source");rr(W)||(d.crossOrigin="Anonymous"),te.src=W,d.appendChild(te)}})},l.ac=Vt,l.ad=function(){return K++},l.ae=fe,l.af=M0,l.ag=zg,l.ah=Na,l.ai=fo,l.aj=yS,l.ak=function(R){let d={};if(R.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,W,te,ue)=>{let me=te||ue;return d[W]=!me||me.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=se,l.am=85.051129,l.an=ke,l.ao=function(R){return Math.pow(2,R)},l.ap=S,l.aq=hS,l.ar=function(R){return Math.log(R)/Math.LN2},l.as=function(R){var d=R[0],L=R[1];return d*d+L*L},l.at=function(R){if(!R.length)return new Set;let d=Math.max(...R.map(Ce=>Ce.canonical.z)),L=1/0,W=-1/0,te=1/0,ue=-1/0,me=[];for(let Ce of R){let{x:Te,y:Oe,z:Pe}=Ce.canonical,it=Math.pow(2,d-Pe),He=Te*it,bt=Oe*it;me.push({id:Ce,x:He,y:bt}),HeW&&(W=He),btue&&(ue=bt)}let ge=new Set;for(let Ce of me)Ce.x!==L&&Ce.x!==W&&Ce.y!==te&&Ce.y!==ue||ge.add(Ce.id);return ge},l.au=function(R,d){let L=Math.abs(2*R.wrap)-+(R.wrap<0),W=Math.abs(2*d.wrap)-+(d.wrap<0);return R.overscaledZ-d.overscaledZ||W-L||d.canonical.y-R.canonical.y||d.canonical.x-R.canonical.x},l.av=class{constructor(R,d){this.max=R,this.onRemove=d,this.reset()}reset(){for(let R in this.data)for(let d of this.data[R])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(R,d,L){let W=R.wrapped().key;this.data[W]===void 0&&(this.data[W]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(R,te)},L)),this.data[W].push(te),this.order.push(W),this.order.length>this.max){let ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}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 d=this.data[R].shift();return d.timeout&&clearTimeout(d.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),d.value}getByKey(R){let d=this.data[R];return d?d[0].value:null}get(R){return this.has(R)?this.data[R.wrapped().key][0].value:null}remove(R,d){if(!this.has(R))return this;let L=R.wrapped().key,W=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][W];return this.data[L].splice(W,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(R){for(this.max=R;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(R){let d=[];for(let L in this.data)for(let W of this.data[L])R(W.value)||d.push(W);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(R,d){let L=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:me}=R,ge=te?se(Pi.interpolationFactor(te,d,ue,me),0,1):0;R.kind==="camera"?W=bs.number(R.minSize,R.maxSize,ge):L=ge}return{uSizeT:L,uSize:W}},l.ay=function(R,{uSize:d,uSizeT:L},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/Yd:R.kind==="composite"?bs.number(W/Yd,te/Yd,L):d},l.az=D,l.b=we,l.b$=zs,l.b0=function(R,d,L){return R[0]=d[0]-L[0],R[1]=d[1]-L[1],R[2]=d[2]-L[2],R},l.b1=function(R,d){var L=d[0],W=d[1],te=d[2],ue=L*L+W*W+te*te;return ue>0&&(ue=1/Math.sqrt(ue)),R[0]=d[0]*ue,R[1]=d[1]*ue,R[2]=d[2]*ue,R},l.b2=u,l.b3=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]},l.b4=function(R,d,L){return R[0]=d[0]*L[0],R[1]=d[1]*L[1],R[2]=d[2]*L[2],R[3]=d[3]*L[3],R},l.b5=C,l.b6=function(R,d,L){let W=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return W===0?null:(-(R[0]*L[0]+R[1]*L[1]+R[2]*L[2])-L[3])/W},l.b7=x,l.b8=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R[3]=d[3]*L,R},l.b9=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]+R[3]},l.bA=O,l.bB=function(R,d,L){var W=L[0],te=L[1],ue=L[2],me=L[3],ge=d[0],Ce=d[1],Te=d[2],Oe=te*Te-ue*Ce,Pe=ue*ge-W*Te,it=W*Ce-te*ge;return R[0]=ge+me*(Oe+=Oe)+te*(it+=it)-ue*(Pe+=Pe),R[1]=Ce+me*Pe+ue*Oe-W*it,R[2]=Te+me*it+W*Pe-te*Oe,R},l.bC=function(R,d,L){let W=(te=[R[0],R[1],R[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((Oe=te[8])*(me=te[4])-(ge=te[5])*(Te=te[7]))+te[1]*(-Oe*(ue=te[3])+ge*(Ce=te[6]))+te[2]*(Te*ue-me*Ce);var te,ue,me,ge,Ce,Te,Oe;if(W===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),it=u([],[L[0],L[1],L[2]],[R[0],R[1],R[2]]),He=u([],[R[0],R[1],R[2]],[d[0],d[1],d[2]]),bt=f([],Pe,-R[3]);return T(bt,bt,f([],it,-d[3])),T(bt,bt,f([],He,-L[3])),f(bt,bt,1/W),bt},l.bD=L3,l.bE=function(){return new Float64Array(4)},l.bF=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0]*Math.cos(W)-te[1]*Math.sin(W),ue[1]=te[0]*Math.sin(W)+te[1]*Math.cos(W),ue[2]=te[2],R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bG=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0],ue[1]=te[1]*Math.cos(W)-te[2]*Math.sin(W),ue[2]=te[1]*Math.sin(W)+te[2]*Math.cos(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bH=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[2]*Math.sin(W)+te[0]*Math.cos(W),ue[1]=te[1],ue[2]=te[2]*Math.cos(W)-te[0]*Math.sin(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bI=function(R,d,L){var W=Math.sin(L),te=Math.cos(L),ue=d[0],me=d[1],ge=d[2],Ce=d[3],Te=d[8],Oe=d[9],Pe=d[10],it=d[11];return d!==R&&(R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15]),R[0]=ue*te-Te*W,R[1]=me*te-Oe*W,R[2]=ge*te-Pe*W,R[3]=Ce*te-it*W,R[8]=ue*W+Te*te,R[9]=me*W+Oe*te,R[10]=ge*W+Pe*te,R[11]=Ce*W+it*te,R},l.bJ=function(R,d){let L=U(R,360),W=U(d,360),te=W-L,ue=W>L?te-360:te+360;return Math.abs(te)0?me:-me},l.bM=function(R,d){let L=U(R,2*Math.PI),W=U(d,2*Math.PI);return Math.min(Math.abs(L-W),Math.abs(L-W+2*Math.PI),Math.abs(L-W-2*Math.PI))},l.bN=function(){let R={},d=ht.$version;for(let L in ht.$root){let W=ht.$root[L];if(W.required){let te=null;te=L==="version"?d:W.type==="array"?[]:{},te!=null&&(R[L]=te)}}return R},l.bO=At,l.bP=Bt,l.bQ=function R(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let W=0;WR.type==="raster",l.bV=q,l.bW=function(R,d){if(!R)return[{command:"setStyle",args:[d]}];let L=[];try{if(!We(R.version,d.version))return[{command:"setStyle",args:[d]}];We(R.center,d.center)||L.push({command:"setCenter",args:[d.center]}),We(R.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),We(R.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),We(R.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),We(R.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),We(R.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),We(R.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),We(R.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),We(R.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),We(R.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),We(R.light,d.light)||L.push({command:"setLight",args:[d.light]}),We(R.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),We(R.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),We(R.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let W={},te=[];(function(me,ge,Ce,Te){let Oe;for(Oe in ge=ge||{},me=me||{})Object.prototype.hasOwnProperty.call(me,Oe)&&(Object.prototype.hasOwnProperty.call(ge,Oe)||et(Oe,Ce,Te));for(Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&(Object.prototype.hasOwnProperty.call(me,Oe)?We(me[Oe],ge[Oe])||(me[Oe].type==="geojson"&&ge[Oe].type==="geojson"&&pt(me,ge,Oe)?Ke(Ce,{command:"setGeoJSONSourceData",args:[Oe,ge[Oe].data]}):Mt(Oe,ge,Ce,Te)):Je(Oe,ge,Ce))})(R.sources,d.sources,te,W);let ue=[];R.layers&&R.layers.forEach(me=>{"source"in me&&W[me.source]?L.push({command:"removeLayer",args:[me.id]}):ue.push(me)}),L=L.concat(te),function(me,ge,Ce){ge=ge||[];let Te=(me=me||[]).map(Ct),Oe=ge.map(Ct),Pe=me.reduce(qt,{}),it=ge.reduce(qt,{}),He=Te.slice(),bt=Object.create(null),Et,Qt,er,br,sr;for(let Mr=0,qr=0;Mrg?(te=Math.acos(ue),me=Math.sin(te),ge=Math.sin((1-W)*te)/me,Ce=Math.sin(W*te)/me):(ge=1-W,Ce=W),R[0]=ge*Te+Ce*He,R[1]=ge*Oe+Ce*bt,R[2]=ge*Pe+Ce*Et,R[3]=ge*it+Ce*Qt,R},l.bm=function(R){let d=new Float64Array(9);var L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr;Pe=(te=(W=R)[0])*(Ce=te+te),it=(ue=W[1])*Ce,bt=(me=W[2])*Ce,Et=me*(Te=ue+ue),er=(ge=W[3])*Ce,br=ge*Te,sr=ge*(Oe=me+me),(L=d)[0]=1-(He=ue*Te)-(Qt=me*Oe),L[3]=it-sr,L[6]=bt+br,L[1]=it+sr,L[4]=1-Pe-Qt,L[7]=Et-er,L[2]=bt-br,L[5]=Et+er,L[8]=1-Pe-He;let Mr=_e(-Math.asin(se(d[2],-1,1))),qr,$r;return Math.hypot(d[5],d[8])<.001?(qr=0,$r=-_e(Math.atan2(d[3],d[4]))):(qr=_e(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),$r=_e(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:qr,pitch:Mr+90,bearing:$r}},l.bn=function(R,d){return R.roll==d.roll&&R.pitch==d.pitch&&R.bearing==d.bearing},l.bo=rn,l.bp=ro,l.bq=_0,l.br=Mg,l.bs=y0,l.bt=$,l.bu=Q,l.bv=io,l.bw=function(R,d,L,W,te){return $(W,te,se((R-d)/(L-d),0,1))},l.bx=function(R,d,L,W){return R[0]=d[0]+L[0]*W,R[1]=d[1]+L[1]*W,R[2]=d[2]+L[2]*W,R},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ye,l.c$=Cc,l.c0=class extends Wi{constructor(R,d){super(R,d),this.current=Bs}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let d=1;d<16;d++)if(R[d]!==this.current[d]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},l.c1=Mo,l.c2=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},l.c3=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},l.c4=w,l.c5=function(R,d){var L=Math.sin(d),W=Math.cos(d);return R[0]=W,R[1]=L,R[2]=0,R[3]=-L,R[4]=W,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R},l.c6=function(R,d,L){var W=d[0],te=d[1],ue=d[2];return R[0]=W*L[0]+te*L[3]+ue*L[6],R[1]=W*L[1]+te*L[4]+ue*L[7],R[2]=W*L[2]+te*L[5]+ue*L[8],R},l.c7=function(R,d,L,W,te,ue,me){var ge=1/(d-L),Ce=1/(W-te),Te=1/(ue-me);return R[0]=-2*ge,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ce,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*Te,R[11]=0,R[12]=(d+L)*ge,R[13]=(te+W)*Ce,R[14]=(me+ue)*Te,R[15]=1,R},l.c8=class extends Wi{constructor(R,d){super(R,d),this.current=new Array}set(R){if(R!=this.current){this.current=R;let d=new Float32Array(4*R.length);for(let L=0;L25||W<0||W>=1||L<0||L>=1)},l.cE=function(R,d){return R[0]=d[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=d[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=d[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},l.cF=class extends Jt{},l.cG=Tt,l.cH=function(R,d){Ye.REGISTERED_PROTOCOLS[R]=d},l.cI=function(R){delete Ye.REGISTERED_PROTOCOLS[R]},l.cJ=function(R,d){let L={};for(let te=0;teHn*Rc)}let bn=Ce?"center":te.get("text-justify").evaluate(Pe,{},R.canonical),Fn=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},R.canonical)*Rc:1/0,gn=()=>{R.bucket.allowVerticalPlacement&&Br($r)&&(Qt.vertical=xy(er,R.glyphMap,R.glyphPositions,R.imagePositions,it,Fn,ge,nn,"left",Ca,sr,l.ax.vertical,!0,bt,He))};if(!Ce&&qa){let Va=new Set;if(bn==="auto")for(let ni=0;niWY(ge,Ce,ue),W.layers[me])}(R,L,d),L.finish()},l.cT=function(R,d,L,W,te,ue){let me=JS(R,d,L,te,0);return me=JS(me,d,W,ue,1),me},l.cU=class{constructor(R){this.maxEntries=R,this.map=new Map}get(R){let d=this.map.get(R);return d!==void 0&&(this.map.delete(R),this.map.set(R,d)),d}set(R,d){if(this.map.has(R))this.map.delete(R);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(R,d)}clear(){this.map.clear()}},l.cV=w4,l.cW=_y,l.cX=YS,l.cY=function(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(v())try{return yield Se(R,d,L,W,te)}catch{}return function(ue,me,ge,Ce,Te){let Oe=ue.width,Pe=ue.height;Ie&&Ve||(Ie=new OffscreenCanvas(Oe,Pe),Ve=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=Oe,Ie.height=Pe,Ve.drawImage(ue,0,0,Oe,Pe);let it=Ve.getImageData(me,ge,Ce,Te);return Ve.clearRect(0,0,Oe,Pe),it.data}(R,d,L,W,te)})},l.cZ=mp,l.c_=class{constructor(R,d){this.layers={[zg]:this},this.name=zg,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=R.length,this.features=R}feature(R){return new HY(this.features[R],this.extent)}},l.ca=class extends sa{},l.cb=VW,l.cc=class extends Tn{},l.cd=Lu,l.ce=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},l.cf=au,l.cg=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[3]*W+L[7]*te+L[11]*ue+L[15];return R[0]=(L[0]*W+L[4]*te+L[8]*ue+L[12])/(me=me||1),R[1]=(L[1]*W+L[5]*te+L[9]*ue+L[13])/me,R[2]=(L[2]*W+L[6]*te+L[10]*ue+L[14])/me,R},l.ch=class extends mr{},l.ci=class extends y{},l.cj=function(R,d){return R[0]===d[0]&&R[1]===d[1]&&R[2]===d[2]&&R[3]===d[3]&&R[4]===d[4]&&R[5]===d[5]&&R[6]===d[6]&&R[7]===d[7]&&R[8]===d[8]&&R[9]===d[9]&&R[10]===d[10]&&R[11]===d[11]&&R[12]===d[12]&&R[13]===d[13]&&R[14]===d[14]&&R[15]===d[15]},l.ck=function(R,d){var L=R[0],W=R[1],te=R[2],ue=R[3],me=R[4],ge=R[5],Ce=R[6],Te=R[7],Oe=R[8],Pe=R[9],it=R[10],He=R[11],bt=R[12],Et=R[13],Qt=R[14],er=R[15],br=d[0],sr=d[1],Mr=d[2],qr=d[3],$r=d[4],_a=d[5],Ca=d[6],nn=d[7],qa=d[8],bn=d[9],Fn=d[10],gn=d[11],Va=d[12],Hn=d[13],ni=d[14],Wn=d[15];return Math.abs(L-br)<=g*Math.max(1,Math.abs(L),Math.abs(br))&&Math.abs(W-sr)<=g*Math.max(1,Math.abs(W),Math.abs(sr))&&Math.abs(te-Mr)<=g*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(ue-qr)<=g*Math.max(1,Math.abs(ue),Math.abs(qr))&&Math.abs(me-$r)<=g*Math.max(1,Math.abs(me),Math.abs($r))&&Math.abs(ge-_a)<=g*Math.max(1,Math.abs(ge),Math.abs(_a))&&Math.abs(Ce-Ca)<=g*Math.max(1,Math.abs(Ce),Math.abs(Ca))&&Math.abs(Te-nn)<=g*Math.max(1,Math.abs(Te),Math.abs(nn))&&Math.abs(Oe-qa)<=g*Math.max(1,Math.abs(Oe),Math.abs(qa))&&Math.abs(Pe-bn)<=g*Math.max(1,Math.abs(Pe),Math.abs(bn))&&Math.abs(it-Fn)<=g*Math.max(1,Math.abs(it),Math.abs(Fn))&&Math.abs(He-gn)<=g*Math.max(1,Math.abs(He),Math.abs(gn))&&Math.abs(bt-Va)<=g*Math.max(1,Math.abs(bt),Math.abs(Va))&&Math.abs(Et-Hn)<=g*Math.max(1,Math.abs(Et),Math.abs(Hn))&&Math.abs(Qt-ni)<=g*Math.max(1,Math.abs(Qt),Math.abs(ni))&&Math.abs(er-Wn)<=g*Math.max(1,Math.abs(er),Math.abs(Wn))},l.cl=function(R,d){return R[0]=d[0],R[1]=d[1],R[2]=d[2],R[3]=d[3],R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[8]=d[8],R[9]=d[9],R[10]=d[10],R[11]=d[11],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.cm=R=>R.type==="circle",l.cn=R=>R.type==="heatmap",l.co=R=>R.type==="line",l.cp=R=>R.type==="fill",l.cq=R=>R.type==="fill-extrusion",l.cr=R=>R.type==="hillshade",l.cs=R=>R.type==="color-relief",l.ct=R=>R.type==="background",l.cu=R=>R.type==="custom",l.cv=re,l.cw=function(R,d,L){if(d<=0)return R;let W=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(R*W)/W:(L>0?Math.ceil(R*W-1e-9):Math.floor(R*W+1e-10))/W},l.cx=function(R,d,L){let W=B(d.x-L.x,d.y-L.y),te=B(R.x-L.x,R.y-L.y);var ue,me;return _e(Math.atan2(W[0]*te[1]-W[1]*te[0],(ue=W)[0]*(me=te)[0]+ue[1]*me[1]))},l.cy=ne,l.cz=function(R,d){var L;if(!ve[d])return!1;let W=R?.target,te=((L=W?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return R instanceof te.MouseEvent||R instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(R,d){let L=(d=this.options=Object.assign({},RW,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let W=c3(R,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),W=p3(W,d),d.updateable&&(this.source=W),this.initializeIndex(W,d)}initializeIndex(R,d){this.tileIndex=d.cluster?new MW(d.clusterOptions):new PW(d),R.length&&this.tileIndex.initialize(R)}getTile(R,d,L){return d=+d,L=+L,(R=+R)<0||R>24?null:this.tileIndex.getTile(R,d,L)}updateData(R,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:W,source:te}=function(ue,me,ge){let Ce=function(Oe,Pe){var it,He;return Oe?{removeAll:Oe.removeAll,remove:new Set(Oe.remove||[]),add:new Map((it=Oe.add)==null?void 0:it.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((He=Oe.update)==null?void 0:He.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(me,ge),Te=[];if(Ce.removeAll&&(Te=ue,ue=[]),Ce.remove.size||Ce.add.size){let Oe=[];for(let Pe of ue)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&Oe.push(Pe);if(Oe.length){Te.push(...Oe);let Pe=new Set(Oe.map(it=>it.id));ue=ue.filter(it=>!Pe.has(it.id))}if(Ce.add.size){let Pe=c3({type:"FeatureCollection",features:Array.from(Ce.add.values())},ge);Pe=p3(Pe,ge),Te.push(...Pe),ue.push(...Pe)}}if(Ce.update.size){let Oe=new Map,Pe=[];for(let it of ue)Ce.update.has(it.id)?Oe.set(it.id,[...Oe.get(it.id)||[],it]):Pe.push(it);for(let[it,He]of Ce.update){let bt=Oe.get(it);if(!bt||bt.length===0)continue;let Et=AW(bt,He,ge);Te.push(...bt,...Et),Pe.push(...Et)}ue=Pe}return{affected:Te,source:ue}}(this.source,R,L);d&&({affected:W,source:te}=this.filterUpdate(te,W,d)),W.length&&(this.source=te,this.tileIndex.updateIndex(te,W,L))}filterUpdate(R,d,L){let W=new Set;for(let te of R)te.id!=null&&(L(vy(te))||(d.push(te),W.add(te.id)));return{affected:d,source:R=R.filter(te=>!W.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(R=>vy(R))}}updateClusterOptions(R,d){let L=this.options.cluster;this.options.cluster=R,this.options.clusterOptions=d,L!=R?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(R){return this.tileIndex.getClusterExpansionZoom(R)}getClusterChildren(R){return this.tileIndex.getChildren(R)}getClusterLeaves(R,d,L){return this.tileIndex.getLeaves(R,d,L)}},l.d1=Si,l.e=X,l.f=rr,l.g=yt,l.h=R=>e(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=he,l.j=R=>new Promise((d,L)=>{let W=new Image;W.onload=()=>{d(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>W.src=Me)},W.onerror=()=>L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Me}),l.k=(R,d)=>$t(X(R,{type:"json"}),d),l.l=Ot,l.m=$t,l.n=or,l.o=(R,d)=>$t(X(R,{type:"arrayBuffer"}),d),l.p=J4,l.q=function(R){return new _y(R).readFields(nY,[])},l.r=function(R){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(R))},l.s=Ge,l.t=As,l.u=Ps,l.v=Pc,l.w=ee,l.x=ht,l.y=vo,l.z=Bl}),E("worker",["./shared"],function(l){"use strict";class e{constructor(T,f){this.keyCache={},T&&this.replace(T,f)}replace(T,f){this._layerConfigs={},this._layers={},this.update(T,[],f)}update(T,f,u){for(let x of T){this._layerConfigs[x.id]=x;let z=this._layers[x.id]=l.bT(x,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[x.id]&&delete this.keyCache[x.id]}for(let x of f)delete this.keyCache[x],delete this._layerConfigs[x],delete this._layers[x];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let x of A){let z=x.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let O=I.source||"",D=this.familiesBySource[O];D||(D=this.familiesBySource[O]={});let B=I.sourceLayer||l.ag,F=D[B];F||(F=D[B]=[]),F.push(z)}}}class t{constructor(T){let f={},u=[];for(let I in T){let O=T[I],D=f[I]={};for(let B in O){let F=O[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),D[B]={rect:P,metrics:F.metrics}}}let{w:A,h:x}=l.p(u),z=new l.t({width:A||1,height:x||1});for(let I in T){let O=T[I];for(let D in O){let B=O[+D];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=f[I][D].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=f}}l.cK("GlyphAtlas",t);class n{constructor(T){this.tileID=new l.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,f,u,A,x){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(T.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let O={},D={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:x},B=f.familiesBySource[this.source];for(let q in B){let Z=T.layers[q];if(!Z)continue;Z.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ae=[];for(let he=0;hewe.id)))}}let F=l.bY(D.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(D.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let $=Object.keys(D.patternDependencies),Q=Promise.resolve({});if($.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:$,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=D.dashDependencies,ne=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ne=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[se,G,X,K]=yield Promise.all([P,U,Q,ne]),H=new t(se),Y=new l.cN(G,X);for(let q in O){let Z=O[q];Z instanceof l.af?(r(Z.layers,this.zoom,u),l.cO({bucket:Z,glyphMap:se,glyphPositions:H.positions,imageMap:G,imagePositions:Y.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:D.subdivisionGranularity})):Z.hasDependencies&&(Z instanceof l.cP||Z instanceof l.cQ||Z instanceof l.cR)&&(r(Z.layers,this.zoom,u),Z.addFeatures(D,this.tileID.canonical,Y.patternPositions,K))}return this.status="done",{buckets:Object.values(O).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:H.image,imageAtlas:Y,dashPositions:K,glyphMap:this.returnDependencies?se:null,iconMap:this.returnDependencies?G:null,glyphPositions:this.returnDependencies?H.positions:null}})}}function r(_,T,f){let u=new l.J(T);for(let A of _)A.recalculate(u,f)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,f){this.loading[T]=f}finishLoading(T){delete this.loading[T]}abort(T){let f=this.loading[T];f?.abort&&(f.abort.abort(),delete this.loading[T])}setParsing(T,f){this.parsing[T]=f}consumeParsing(T){let f=this.parsing[T];if(f)return delete this.parsing[T],f}clearParsing(T){delete this.parsing[T]}markLoaded(T,f){this.loaded[T]=f}getLoaded(T){let f=this.loaded[T];if(f)return f}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class o{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class s{constructor(T,f,u,A,x){this.type=T,this.properties=u||{},this.extent=x,this.pointsArray=f,this.id=A}loadGeometry(){return this.pointsArray.map(T=>T.map(f=>new l.P(f.x,f.y)))}}class c{constructor(T,f,u){this.version=2,this._myFeatures=T,this.name=f,this.length=T.length,this.extent=u}feature(T){return this._myFeatures[T]}}class m{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function h(_){let T=l.cS(_);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:_,rawData:T.buffer}}function v(_,T,f){let{extent:u}=_,A=Math.pow(2,f.z-T.z),x=(f.x-T.x*A)*u,z=(f.y-T.y*A)*u,I=[];for(let O=0;O<_.length;O++){let D=_.feature(O),B=D.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-x,j.y=j.y*A-z;let F=128;B=l.cT(B,D.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(D.type,B,D.properties,D.id,u))}return new c(I,_.name,u)}class g{constructor(T,f,u){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(T,f){try{return{vectorTile:T.encoding!=="mlt"?new l.cV(new l.cW(f)):new l.cX(f),rawData:f}}catch(u){let A=new Uint8Array(f),x=`Unable to parse the tile at ${T.request.url}, `;throw x+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(x)}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,overzoomParameters:u}=T;u&&(T.request=u.overzoomRequest);let A=this._startRequestTiming(T),x=new n(T);this.tileState.startLoading(f,x);let z=new AbortController;x.abort=z;try{let I=yield l.o(T.request,z);if(T.etag&&T.etag===I.etag)return this.tileState.finishLoading(f),this._getEtagUnmodifiedResult(I,A);let O=this.loadVectorTile(T,I.data);if(this.tileState.finishLoading(f),!O)return null;let{vectorTile:D,rawData:B}=O;u&&({vectorTile:D,rawData:B}=this._getOverzoomTile(T,D));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);x.vectorTile=D,this.tileState.markLoaded(f,x);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(f,j);try{return yield this._parseWorkerTile(x,T,j)}finally{this.tileState.clearParsing(f)}}catch(I){throw this.tileState.finishLoading(f),x.status="done",this.tileState.markLoaded(f,x),I}})}_getEtagUnmodifiedResult(T,f){let u=this._getExpiryData(T),A=this._finishRequestTiming(f);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:x.slice(0),encoding:f.encoding},A,z,I)}return A})}_getExpiryData({expires:T,cacheControl:f,etag:u}){let A={};return T&&(A.expires=T),f&&(A.cacheControl=f),u&&(A.etag=u),A}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T){let f=T?.finish();return f?{resourceTiming:JSON.parse(JSON.stringify(f))}:{}}_getOverzoomTile(T,f){var u;let{tileID:A,source:x,overzoomParameters:z}=T,{maxZoomTileID:I}=z,O=`${I.key}_${A.key}_${(u=T.request)===null||u===void 0?void 0:u.url}`,D=this.overzoomedTileResultCache.get(O);if(D)return D;let B=new m,F=this.layerIndex.familiesBySource[x];for(let j in F){let U=f.layers[j];if(!U)continue;let $=v(U,I,A.canonical);$.length>0&&B.addLayer($)}let P=h(B);return this.overzoomedTileResultCache.set(O,P),P}reloadTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}}class i{constructor(){this.loaded={}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,encoding:u,rawImageData:A,redFactor:x,greenFactor:z,blueFactor:I,baseShift:O}=T,D=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:D,height:B},yield l.cY(A,-1,-1,D,B)):A,P=new l.cZ(f,F,u,x,z,I,O);return this.loaded||(this.loaded={}),this.loaded[f]=P,P})}removeTile(T){let f=this.loaded,u=T.uid;f?.[u]&&delete f[u]}}class w{constructor(T,f,u,A=S){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this._createGeoJSONIndex=A}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:f,x:u,y:A}=T.tileID.canonical,x=this._geoJSONIndex.getTile(f,u,A);return x?h(new l.c_(x.features,{version:2,extent:l.a6})):null}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f}=T,u=new n(T);u.abort=new AbortController;try{let A=this.loadVectorTile(T);if(!A)return null;let{vectorTile:x,rawData:z}=A;u.vectorTile=x,this.tileState.markLoaded(f,u);let I={rawData:z};this.tileState.setParsing(f,I);try{return yield this._parseWorkerTile(u,T,I)}finally{this.tileState.clearParsing(f)}}catch(A){throw u.status="done",this.tileState.markLoaded(f,u),A}})}_reloadLoadedTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x}=u;A=l.e({rawTileData:x.slice(0),encoding:"mvt"},A)}return A})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}loadData(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort();let u=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return T.request&&(A.data=T.data),this._finishRequestTiming(u,T,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T,f,u){let A=T?.finish();A&&(u.resourceTiming={[f.source]:JSON.parse(JSON.stringify(A))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,f){return l._(this,void 0,void 0,function*(){var u;if(T.request&&(T.data=(yield l.k(T.request,f)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,M(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(T,f){if(T.type!=="FeatureCollection")return T;let u=this._getFilterPredicate(f);return u?{type:"FeatureCollection",features:T.features.filter(A=>u(A))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!T?.length)return;let f=l.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(f.result==="error")throw new Error(f.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>f.value.evaluate({zoom:0},u)}removeSource(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort()})}getClusterExpansionZoom(T){return this._geoJSONIndex.getClusterExpansionZoom(T.clusterId)}getClusterChildren(T){return this._geoJSONIndex.getClusterChildren(T.clusterId)}getClusterLeaves(T){return this._geoJSONIndex.getClusterLeaves(T.clusterId,T.limit,T.offset)}}function S(_,T){let f=l.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(T)});return new l.d0(_,f)}function M({geojsonVtOptions:_,clusterProperties:T}){if(!T||!_.clusterOptions)return _.clusterOptions;let f={},u={},A={accumulated:null,zoom:0},x={properties:null},z=Object.keys(T);for(let I of z){let[O,D]=T[I],B=l.c$(D),F=l.c$(typeof O=="string"?[O,["accumulated"],["get",I]]:O);f[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{x.properties=I;let O={};for(let D of z)O[D]=f[D].evaluate(A,x);return O},_.clusterOptions.reduce=(I,O)=>{x.properties=O;for(let D of z)A.accumulated=I[D],I[D]=u[D].evaluate(A,x)},_.clusterOptions}class C{constructor(T){this.self=T,this.actor=new l.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(f,u)=>{if(this.externalWorkerSourceTypes[f])throw new Error(`Worker source with name "${f}" already registered.`);this.externalWorkerSourceTypes[f]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=f=>{l.d1.setMethods(f)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(f,u)=>this._getDEMWorkerSource(f,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(f,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(f,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(f,u)=>this._getWorkerSource(f,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(f,u)=>this._getWorkerSource(f,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(f,u)=>this._getWorkerSource(f,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(f,u)=>l._(this,void 0,void 0,function*(){var A,x;if(!(!((x=(A=this.workerSources[f])===null||A===void 0?void 0:A[u.type])===null||x===void 0)&&x[u.source]))return;let z=this.workerSources[f][u.type][u.source];delete this.workerSources[f][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",f=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[f],delete this.availableImages[f],delete this.workerSources[f],delete this.demWorkerSources[f],this.globalStates.delete(f)})),this.actor.registerMessageHandler("SR",(f,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(f,u)=>this._syncRTLPluginState(f,u)),this.actor.registerMessageHandler("IS",(f,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(f,u)=>this._setImages(f,u)),this.actor.registerMessageHandler("UL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).update(u.layers,u.removedIds,this._getGlobalState(f))})),this.actor.registerMessageHandler("UGS",(f,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(f);for(let x in u)A[x]=u[x]})),this.actor.registerMessageHandler("SL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).replace(u,this._getGlobalState(f))}))}_getGlobalState(T){let f=this.globalStates.get(T);return f||(f={},this.globalStates.set(T,f)),f}_setImages(T,f){return l._(this,void 0,void 0,function*(){this.availableImages[T]=f;for(let u in this.workerSources[T]){let A=this.workerSources[T][u];for(let x in A)A[x].availableImages=f}})}_syncRTLPluginState(T,f){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(f,this.self.importScripts)})}_getAvailableImages(T){let f=this.availableImages[T];return f||(f=[]),f}_getLayerIndex(T){let f=this.layerIndexes[T];return f||(f=this.layerIndexes[T]=new e),f}_getWorkerSource(T,f,u){var A,x;if((A=this.workerSources)[T]||(A[T]={}),(x=this.workerSources[T])[f]||(x[f]={}),!this.workerSources[T][f][u]){let z={sendAsync:(I,O)=>(I.targetMapId=T,this.actor.sendAsync(I,O))};switch(f){case"vector":this.workerSources[T][f][u]=new g(z,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][f][u]=new w(z,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][f][u]=new this.externalWorkerSourceTypes[f](z,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][f][u]}_getDEMWorkerSource(T,f){var u,A;return(u=this.demWorkerSources)[T]||(u[T]={}),(A=this.demWorkerSources[T])[f]||(A[f]=new i),this.demWorkerSources[T][f]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function n(){var pe=new e.A(4);return e.A!=Float32Array&&(pe[1]=0,pe[2]=0),pe[0]=1,pe[3]=1,pe}let r,a,o,s={frame(pe,y,N,ie){let fe=ie||window,be=fe.requestAnimationFrame(je=>{Re(),y(je)}),{unsubscribe:Re}=e.s(pe.signal,"abort",()=>{Re(),fe.cancelAnimationFrame(be),N(new e.a(pe.signal.reason))},!1)},frameAsync(pe,y){return new Promise((N,ie)=>{this.frame(pe,N,ie,y)})},getImageData(pe,y=0){return this.getImageCanvasContext(pe).getImageData(-y,-y,pe.width+2*y,pe.height+2*y)},getImageCanvasContext(pe){let y=window.document.createElement("canvas"),N=y.getContext("2d",{willReadFrequently:!0});if(!N)throw new Error("failed to create canvas 2d context");return y.width=pe.width,y.height=pe.height,N.drawImage(pe,0,0,pe.width,pe.height),N},resolveURL:pe=>(r||(r=document.createElement("a")),r.href=pe,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(a!=null||(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)},set prefersReducedMotion(pe){o=pe}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(pe){this._frozenAt=pe}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function m(){return c.getCurrentTime()}var h,v;class g{static create(y,N,ie){let fe=window.document.createElement(y);return N!==void 0&&(fe.className=N),ie&&ie.appendChild(fe),fe}static createNS(y,N){return window.document.createElementNS(y,N)}static disableDrag(){g.docStyle&&g.selectProp&&(g.userSelect=g.docStyle[g.selectProp],g.docStyle[g.selectProp]="none")}static enableDrag(){g.docStyle&&g.selectProp&&(g.docStyle[g.selectProp]=g.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",g.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",g.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",g.suppressClickInternal,!0)},0)}static getScale(y){let N=y.getBoundingClientRect();return{x:N.width/y.offsetWidth||1,y:N.height/y.offsetHeight||1,boundingClientRect:N}}static getPoint(y,N,ie){let fe=N.boundingClientRect;return new e.P((ie.clientX-fe.left)/N.x-y.clientLeft,(ie.clientY-fe.top)/N.y-y.clientTop)}static mousePos(y,N){let ie=g.getScale(y);return g.getPoint(y,ie,N)}static touchPos(y,N){let ie=[],fe=g.getScale(y);for(let be of N)ie.push(g.getPoint(y,fe,be));return ie}static sanitize(y){let N=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=N.querySelectorAll("script");for(let fe of ie)fe.remove();return g.clean(N),N.innerHTML}static isPossiblyDangerous(y,N){let ie=N.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let N=y.children;for(let ie of N)g.removeAttributes(ie),g.clean(ie)}static removeAttributes(y){for(let{name:N,value:ie}of y.attributes)g.isPossiblyDangerous(N,ie)&&y.removeAttribute(N)}}g.docStyle=typeof window<"u"&&((h=window.document)===null||h===void 0?void 0:h.documentElement.style),g.selectProp=!g.docStyle||"userSelect"in g.docStyle?"userSelect":"webkitUserSelect",function(pe){let y,N,ie,fe;pe.resetRequestQueue=()=>{y=[],N=0,ie=0,fe={}},pe.addThrottleControl=Ze=>{let ut=ie++;return fe[ut]=Ze,ut},pe.removeThrottleControl=Ze=>{delete fe[Ze],Re()},pe.getImage=(Ze,ut,ft=!0)=>new Promise((Dt,Gt)=>{Ze.headers||(Ze.headers={}),Ze.headers.accept="image/webp,*/*",e.e(Ze,{type:"image"}),y.push({abortController:ut,requestParameters:Ze,supportImageRefresh:ft,state:"queued",onError:Kt=>{Gt(Kt)},onSuccess:Kt=>{Dt(Kt)}}),Re()});let be=Ze=>e._(this,void 0,void 0,function*(){Ze.state="running";let{requestParameters:ut,supportImageRefresh:ft,onError:Dt,onSuccess:Gt,abortController:Kt}=Ze,st=ft===!1&&!e.i(self)&&!e.g(ut.url)&&(!ut.headers||Object.keys(ut.headers).reduce((ir,dr)=>ir&&dr==="accept",!0));N++;let It=st?je(ut,Kt):e.m(ut,Kt);try{let ir=yield It;delete Ze.abortController,Ze.state="completed",ir.data instanceof HTMLImageElement||e.b(ir.data)?Gt(ir):ir.data&&Gt({data:yield(Ut=ir.data,typeof createImageBitmap=="function"?e.h(Ut):e.j(Ut)),cacheControl:ir.cacheControl,expires:ir.expires})}catch(ir){delete Ze.abortController,Dt(e.d(ir))}finally{N--,Re()}var Ut}),Re=()=>{let Ze=(()=>{for(let ut of Object.keys(fe))if(fe[ut]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let ut=N;ut0;ut++){let ft=y.shift();ft.abortController.signal.aborted?ut--:be(ft)}},je=(Ze,ut)=>new Promise((ft,Dt)=>{let Gt=new Image,Kt=Ze.url,st=Ze.credentials;st&&st==="include"?Gt.crossOrigin="use-credentials":(st&&st==="same-origin"||!e.f(Kt))&&(Gt.crossOrigin="anonymous"),ut.signal.addEventListener("abort",()=>{Gt.src="",Dt(new e.a(ut.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ft({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,ut.signal.aborted||Dt(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."))},Gt.src=Kt})}(v||(v={})),v.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,N){return this._transformRequestFn&&this._transformRequestFn(y,N)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function w(pe){let y=[];if(typeof pe=="string")y.push({id:"default",url:pe});else if(pe&&pe.length>0){let N=[];for(let{id:ie,url:fe}of pe){let be=`${ie}${fe}`;N.includes(be)||(N.push(be),y.push({id:ie,url:fe}))}}return y}function S(pe,y,N){try{let ie=new URL(pe);return ie.pathname+=`${y}${N}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${pe}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(pe){let{userImage:y}=pe;return!(!y?.render||!y.render()||(pe.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:N,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(N));this.requestors=[]}}getImage(y){let N=this.images[y];if(N&&!N.data&&N.spriteData){let ie=N.spriteData;N.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),N.spriteData=null}return N}addImage(y,N){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,N)&&(this.images[y]=N)}_validate(y,N){let ie=!0,fe=N.data||N.spriteData;return this._validateStretch(N.stretchX,fe?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(N.stretchY,fe?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(N.content,N)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,N){if(!y)return!0;let ie=0;for(let fe of y){if(fe[0]=y[1]))}updateImage(y,N,ie=!0){let fe=this.getImage(y);if(ie&&(fe.data.width!==N.data.width||fe.data.height!==N.data.height))throw new Error(`size mismatch between old image (${fe.data.width}x${fe.data.height}) and new image (${N.data.width}x${N.data.height}).`);N.version=fe.version+1,this.images[y]=N,this.updatedImages[y]=!0}removeImage(y){var N;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((N=ie.userImage)===null||N===void 0)&&N.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((N,ie)=>{let fe=!0;if(!this.isLoaded())for(let be of y)this.images[be]||(fe=!1);this.isLoaded()||fe?N(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:N})})}_getImagesForIds(y){var N;let ie={};for(let fe of y){let be=this.getImage(fe);be||(this.fire(new e.n("styleimagemissing",{id:fe})),be=this.getImage(fe)),be?ie[fe]={data:be.data.clone(),pixelRatio:be.pixelRatio,sdf:be.sdf,version:be.version,stretchX:be.stretchX,stretchY:be.stretchY,content:be.content,textFitWidth:be.textFitWidth,textFitHeight:be.textFitHeight,hasRenderCallback:!!(!((N=be.userImage)===null||N===void 0)&&N.render)}:e.w(`Image "${fe}" 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 ie}getPixelSize(){let{width:y,height:N}=this.atlasImage;return{width:y,height:N}}getPattern(y){let N=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(N&&N.position.version===ie.version)return N.position;if(N)N.position.version=ie.version;else{let fe={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},be=new e.I(fe,ie);this.patterns[y]={bin:fe,position:be}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let N=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,N.RGBA),this.atlasTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let be in this.patterns)y.push(this.patterns[be].bin);let{w:N,h:ie}=e.p(y),fe=this.atlasImage;fe.resize({width:N||1,height:ie||1});for(let be in this.patterns){let{bin:Re}=this.patterns[be],je=Re.x+1,Ze=Re.y+1,ut=this.getImage(be).data,ft=ut.width,Dt=ut.height;e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze},{width:ft,height:Dt}),e.R.copy(ut,fe,{x:0,y:Dt-1},{x:je,y:Ze-1},{width:ft,height:1}),e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze+Dt},{width:ft,height:1}),e.R.copy(ut,fe,{x:ft-1,y:0},{x:je-1,y:Ze},{width:1,height:Dt}),e.R.copy(ut,fe,{x:0,y:0},{x:je+ft,y:Ze},{width:1,height:Dt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let N of y){if(this.callbackDispatchedThisFrame[N])continue;this.callbackDispatchedThisFrame[N]=!0;let ie=this.getImage(N);ie||e.w(`Image with ID: "${N}" was not found`),M(ie)&&this.updateImage(N,ie)}}cloneImages(){let y={};for(let N in this.images){let ie=this.images[N];y[N]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,T=new Float64Array(256);for(let pe=0;pe<256;pe++){let y=.5-Math.pow(pe/255,.45454545454545453);T[pe]=y*Math.abs(y)}function f(pe,y,N,ie,fe,be,Re,je,Ze){for(let ut=y;ut-1);Ze++,be[Ze]=je,Re[Ze]=ut,Re[Ze+1]=_}for(let je=0,Ze=0;je/[-\w]+/.test(fe)?fe:`'${CSS.escape(fe)}'`).join(",");return new x.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(N[0]),fontStyle:this._fontStyle(N[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let N={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[fe,be]of Object.entries(N))new RegExp(`\\b${fe}\\b`,"i").test(y)&&(ie=`${be}`);return ie}destroy(){for(let y in this.entries){let N=this.entries[y];N.tinySDF=null,N.ideographTinySDF=null,N.glyphs={},N.requests={},N.ranges={}}this.entries={}}}x.loadGlyphRange=function(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=256*y,be=fe+255,Re=yield ie.transformRequest(N.replace("{fontstack}",pe).replace("{range}",`${fe}-${be}`),"Glyphs"),je=yield e.o(Re,new AbortController);if(!je?.data)throw new Error(`Could not load glyph range. range: ${y}, ${fe}-${be}`);let Ze={};for(let ut of e.q(je.data))Ze[ut.id]=ut;return Ze})},x.TinySDF=class{constructor({fontSize:pe=24,buffer:y=3,radius:N=8,cutoff:ie=.25,fontFamily:fe="sans-serif",fontWeight:be="normal",fontStyle:Re="normal",lang:je=null}={}){this.buffer=y,this.radius=N,this.cutoff=ie,this.lang=je;let Ze=this.size=pe+4*y,ut=this._createCanvas(Ze),ft=this.ctx=ut.getContext("2d",{willReadFrequently:!0});ft.font=`${Re} ${be} ${pe}px ${fe}`,ft.textBaseline="alphabetic",ft.textAlign="left",ft.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(pe){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(pe,pe);let y=document.createElement("canvas");return y.width=y.height=pe,y}draw(pe){let{width:y,actualBoundingBoxAscent:N,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:fe,actualBoundingBoxRight:be}=this.ctx.measureText(pe),Re=Math.ceil(N),je=Math.floor(fe),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(be)-je)),ut=Math.max(0,Math.min(this.size-this.buffer,Re+Math.ceil(ie))),ft=Ze+2*this.buffer,Dt=ut+2*this.buffer,Gt=Math.max(ft*Dt,0),Kt=new Uint8ClampedArray(Gt),st={data:Kt,width:ft,height:Dt,glyphWidth:Ze,glyphHeight:ut,glyphTop:Re,glyphLeft:je,glyphAdvance:y};if(Ze===0||ut===0)return st;let{ctx:It,buffer:Ut,gridInner:ir,gridOuter:dr}=this;this.lang&&(It.lang=this.lang),It.clearRect(Ut,Ut,Ze,ut),It.fillText(pe,Ut-je,Ut+Re);let Ar=It.getImageData(Ut,Ut,Ze,ut);dr.fill(_,0,Gt),ir.fill(0,0,Gt);let hr=3;for(let Cr=0;Cr1&&(Ze=y[++je]);let ft=Math.abs(ut-Ze.left),Dt=Math.abs(ut-Ze.right),Gt=Math.min(ft,Dt),Kt,st=be/ie*(fe+1);if(Ze.isDash){let It=fe-Math.abs(st);Kt=Math.sqrt(Gt*Gt+It*It)}else Kt=fe-Math.sqrt(Gt*Gt+st*st);this.data[Re+ut]=Math.max(0,Math.min(255,Kt+128))}}}addRegularDash(y){for(let je=y.length-1;je>=0;--je){let Ze=y[je],ut=y[je+1];Ze.zeroLength?y.splice(je,1):ut&&ut.isDash===Ze.isDash&&(ut.left=Ze.left,y.splice(je,1))}let N=y[0],ie=y[y.length-1];N.isDash===ie.isDash&&(N.left=ie.left-this.width,ie.right=N.right+this.width);let fe=this.width*this.nextRow,be=0,Re=y[be];for(let je=0;je1&&(Re=y[++be]);let Ze=Math.abs(je-Re.left),ut=Math.abs(je-Re.right),ft=Math.min(Ze,ut);this.data[fe+je]=Math.max(0,Math.min(255,(Re.isDash?ft:-ft)+128))}}addDash(y,N){let ie=N?7:0,fe=2*ie+1;if(this.nextRow+fe>this.height)return e.w("LineAtlas out of space"),null;let be=0;for(let je of y)be+=je;if(be!==0){let je=this.width/be,Ze=this.getDashRanges(y,this.width,je);N?this.addRoundDash(Ze,je,ie):this.addRegularDash(Ze)}let Re={y:this.nextRow+ie,height:2*ie,width:be};return this.nextRow+=fe,this.dirty=!0,Re}bind(y){let N=y.gl;this.texture?(N.bindTexture(N.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,N.texSubImage2D(N.TEXTURE_2D,0,0,0,this.width,this.height,N.ALPHA,N.UNSIGNED_BYTE,this.data))):(this.texture=N.createTexture(),N.bindTexture(N.TEXTURE_2D,this.texture),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),N.texImage2D(N.TEXTURE_2D,0,N.ALPHA,this.width,this.height,0,N.ALPHA,N.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,N))),Q}function G(pe,y){let N=e.O();return e.Q(N,N,[1,1,0]),e.S(N,N,[.5*pe.width,.5*pe.height,1]),pe.calculatePosMatrix?e.U(N,N,pe.calculatePosMatrix(y.toUnwrapped())):N}function X(pe,y,N,ie,fe,be,Re){var je;let Ze=function(Gt,Kt,st){if(Gt)for(let It of Gt){let Ut=Kt[It];if(Ut?.source===st&&Ut.type==="fill-extrusion")return!0}else for(let It in Kt){let Ut=Kt[It];if(Ut.source===st&&Ut.type==="fill-extrusion")return!0}return!1}((je=fe?.layers)!==null&&je!==void 0?je:null,y,pe.id),ut=be.maxPitchScaleFactor(),ft=pe.tilesIn(ie,ut,Ze);ft.sort(K);let Dt=[];for(let Gt of ft)Dt.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,N,pe.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,fe,be,ut,G(be,Gt.tileID),Re?(Kt,st)=>Re(Gt.tileID,Kt,st):void 0)});return function(Gt,Kt){for(let st in Gt)for(let It of Gt[st])H(It,Kt);return Gt}(function(Gt){let Kt={},st={};for(let{queryResults:It,wrappedTileID:Ut}of Gt){st[Ut]||(st[Ut]={});let ir=st[Ut];for(let dr in It){let Ar=It[dr];ir[dr]||(ir[dr]={});let hr=ir[dr];Kt[dr]||(Kt[dr]=[]);for(let vr of Ar)hr[vr.featureIndex]||(hr[vr.featureIndex]=!0,Kt[dr].push(vr))}}return Kt}(Dt),pe)}function K(pe,y){let N=pe.tileID,ie=y.tileID;return N.overscaledZ-ie.overscaledZ||N.canonical.y-ie.canonical.y||N.wrap-ie.wrap||N.canonical.x-ie.canonical.x}function H(pe,y){let N=pe.feature,ie=y.getFeatureState(N.layer["source-layer"],N.id);N.source=N.layer.source,N.layer["source-layer"]&&(N.sourceLayer=N.layer["source-layer"]),N.state=ie}function Y(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=pe;if(pe.url?fe=(yield e.k(yield y.transformRequest(pe.url,"Source"),N)).data:yield s.frameAsync(N,ie),!fe)return null;let be=e.V(e.e(fe,pe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fe&&fe.vector_layers&&(be.vectorLayerIds=fe.vector_layers.map(Re=>Re.id)),be})}class q{constructor(y,N){y&&(N?this.setSouthWest(y).setNorthEast(N):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let N=this._sw,ie=this._ne,fe,be;if(y instanceof e.W)fe=y,be=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(fe=y._sw,be=y._ne,!fe||!be)return this}return N||ie?(N.lng=Math.min(fe.lng,N.lng),N.lat=Math.min(fe.lat,N.lat),ie.lng=Math.max(be.lng,ie.lng),ie.lat=Math.max(be.lat,ie.lat)):(this._sw=new e.W(fe.lng,fe.lat),this._ne=new e.W(be.lng,be.lat)),this}getCenter(){return new e.W((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 e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(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(y){let{lng:N,lat:ie}=e.W.convert(y),fe=this._sw.lng<=N&&N<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=N&&N>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&fe}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let N=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(N>=360||ie>=360)return!0;let fe=e.X(this.getWest(),-180,180),be=e.X(this.getEast(),-180,180),Re=e.X(y.getWest(),-180,180),je=e.X(y.getEast(),-180,180),Ze=fe>be,ut=Re>je;return!(!Ze||!ut)||(Ze?je>=fe||Re<=be:ut?be>=Re||fe<=je:Re<=be&&je>=fe)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,N=0){let ie=360*N/40075017,fe=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-fe,y.lat-ie),new e.W(y.lng+fe,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),N=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>N.lng?new e.W(N.lng+360,N.lat):N)}}class Z{constructor(y,N,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=N||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let N=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*N),fe=Math.floor(e.Y(this.bounds.getNorth())*N),be=Math.ceil(e.Z(this.bounds.getEast())*N),Re=Math.ceil(e.Y(this.bounds.getSouth())*N);return y.x>=ie&&y.x=fe&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(N,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let fe="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((be,Re)=>{y.reloadPromise={resolve:be,reject:Re}})}else y.actor=this.dispatcher.getActor(),fe="LT";y.abortController=new AbortController;try{let be=yield y.actor.sendAsync({type:fe,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,be);let Re={};return be?.etagUnmodified&&(Re.unmodified=!0),Re}catch(be){if(delete y.abortController,y.aborted)return;if(be&&be.status!==404)throw be;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let N=y.tileID.scaledTo(this.maxzoom).canonical,ie=N.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:N,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,N){if(N?.resourceTiming&&(y.resourceTiming=N.resourceTiming),N&&this.map._refreshExpiredTiles&&y.setExpiryData(N),y.etag=N?.etag,y.loadVectorData(N,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ae extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(fe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},N),e.e(this,e.V(N,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let N=yield Y(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,N&&(e.e(this,N),N.bounds&&(this.tileBounds=new Z(N.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(N){this._tileJSONRequest=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield v.getImage(yield this.map._requestManager.transformRequest(N,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let fe=this.map.painter.context,be=fe.gl,Re=ie.data;y.texture=this.map.painter.getTileTexture(Re.width),y.texture?y.texture.update(Re,{useMipmap:!0}):(y.texture=new e.T(fe,Re,be.RGBA,{useMipmap:!0}),y.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE,be.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class he extends ae{constructor(y,N,ie,fe){super(y,N,ie,fe),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},N),this.encoding=N.encoding||"mapbox",this.redFactor=N.redFactor,this.greenFactor=N.greenFactor,this.blueFactor=N.blueFactor,this.baseShift=N.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(N,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let fe=yield v.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(fe?.data){let be=fe.data;this.map._refreshExpiredTiles&&(fe.cacheControl||fe.expires)&&y.setExpiryData({cacheControl:fe.cacheControl,expires:fe.expires});let Re=e.b(be)&&e.a0()?be:yield this.readImageNow(be),je={type:this.type,uid:y.uid,source:this.id,rawImageData:Re,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:je}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(fe){if(delete y.abortController,y.aborted)y.state="unloaded";else if(fe)throw y.state="errored",fe}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let N=y.width+2,ie=y.height+2;try{return new e.R({width:N,height:ie},yield e.a2(y,-1,-1,N,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let N=y.canonical,ie=Math.pow(2,N.z),fe=(N.x-1+ie)%ie,be=N.x===0?y.wrap-1:y.wrap,Re=(N.x+1+ie)%ie,je=N.x+1===ie?y.wrap+1:y.wrap,Ze={};return Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y).key]={backfilled:!1},N.y>0&&(Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,y.wrap,N.z,N.x,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y-1).key]={backfilled:!1}),N.y+1be.key===ie);fe>-1&&pe.addOrUpdateProperties.splice(fe,1)}return(pe.removeAllProperties||y.removeAllProperties)&&(N.removeAllProperties=!0),(pe.removeProperties||y.removeProperties)&&(N.removeProperties=[...pe.removeProperties||[],...y.removeProperties||[]]),(pe.addOrUpdateProperties||y.addOrUpdateProperties)&&(N.addOrUpdateProperties=[...pe.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(pe.newGeometry||y.newGeometry)&&(N.newGeometry=y.newGeometry||pe.newGeometry),N}function Me(pe){var y,N;if(!pe)return{};let ie={};return ie.removeAll=pe.removeAll,ie.remove=new Set(pe.remove||[]),ie.add=new Map((y=pe.add)===null||y===void 0?void 0:y.map(fe=>[fe.id,fe])),ie.update=new Map((N=pe.update)===null||N===void 0?void 0:N.map(fe=>[fe.id,fe])),ie}function Se(pe){return pe&&pe.length!==0?typeof pe[0]=="number"?[pe]:pe.flatMap(y=>Se(y)):[]}function Ie(pe){return pe.type==="GeometryCollection"?pe.geometries.flatMap(y=>Ie(y)):Se(pe.coordinates)}function Ve(pe){let y=new q,N;switch(pe.type){case"FeatureCollection":N=pe.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":N=Ie(pe.geometry);break;default:N=Ie(pe)}if(N.length===0)return y;for(let ie of N){let[fe,be]=ie;y.extend([fe,be])}return y}class Ge extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:N.data},this.actor=ie.getActor(),this.setEventedParent(fe),this._data=typeof N.data=="string"?{url:N.data}:{geojson:N.data},this._options=e.e({},N),this._collectResourceTiming=N.collectResourceTiming,N.maxzoom!==void 0&&(this.maxzoom=N.maxzoom),N.type&&(this.type=N.type),N.attribution&&(this.attribution=N.attribution),this.promoteId=N.promoteId,N.clusterMaxZoom!==void 0&&this.maxzoom<=N.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${N.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(N.buffer!==void 0?N.buffer:128),tolerance:this._pixelsToTileUnits(N.tolerance!==void 0?N.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:N.lineMetrics||!1,generateId:N.generateId||!1,promoteId:typeof N.promoteId=="string"?N.promoteId:void 0,cluster:N.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(N.clusterMaxZoom),minPoints:Math.max(2,N.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(N.clusterRadius||50),log:!1,generateId:N.generateId||!1}},clusterProperties:N.clusterProperties,filter:N.filter},N.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let N=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${N}"`),N}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,N){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return N?ie:this}updateData(y,N){this._pendingWorkerUpdate.diff=function(fe,be){if(!fe)return be||{};if(!be)return fe||{};let Re=Me(fe),je=Me(be);(function(ut,ft){ft.removeAll&&(ut.add.clear(),ut.update.clear(),ut.remove.clear(),ft.remove.clear());for(let Dt of ft.remove)ut.add.delete(Dt),ut.update.delete(Dt);for(let[Dt,Gt]of ft.update){let Kt=ut.update.get(Dt);Kt&&(ft.update.set(Dt,we(Kt,Gt)),ut.update.delete(Dt))}})(Re,je);let Ze={};if((Re.removeAll||je.removeAll)&&(Ze.removeAll=!0),Ze.remove=new Set([...Re.remove,...je.remove]),Ze.add=new Map([...Re.add,...je.add]),Ze.update=new Map([...Re.update,...je.update]),Ze.remove.size&&Ze.add.size)for(let ut of Ze.add.keys())Ze.remove.delete(ut);return function(ut){let ft={};return ut.removeAll&&(ft.removeAll=ut.removeAll),ut.remove&&(ft.remove=Array.from(ut.remove)),ut.add&&(ft.add=Array.from(ut.add.values())),ut.update&&(ft.update=Array.from(ut.update.values())),ft}(Ze)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return N?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ve(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,N,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:N,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:N,updateCluster:ie}=this._pendingWorkerUpdate,fe=this._getLoadGeoJSONParameters(y,N,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:N?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(fe)})}_getLoadGeoJSONParameters(y,N,ie){return e._(this,void 0,void 0,function*(){let fe=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(fe.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming,fe):y!==void 0?(fe.data=y,fe):N?(fe.dataDiff=N,fe):ie?(fe.updateCluster=!0,fe):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let N=yield y,ie=yield this.actor.sendAsync({type:"LD",data:N});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let fe=this._applyDiffToSource(N.dataDiff),be=this._getShouldReloadTileOptions(fe),Re={dataType:"source"};this._applyResourceTiming(Re,ie),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"content",shouldReloadTileOptions:be})))}catch(N){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(N)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,N){var ie;if(!this._collectResourceTiming)return;let fe=(ie=N.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!fe)return;let be=fe.slice(0);be?.length&&e.e(y,{resourceTiming:be})}_applyDiffToSource(y){if(!y)return;let N=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let fe=function(be,Re){let je=new Map;if(be==null||be.type==null)return je;if(be.type==="Feature"){let Ze=xe(be,Re);return Ze==null?void 0:(je.set(Ze,be),je)}if(be.type==="FeatureCollection"){let Ze=new Set;for(let ut of be.features){let ft=xe(ut,Re);if(ft==null||Ze.has(ft))return;Ze.add(ft),je.set(ft,ut)}return je}}(this._data.geojson,N);if(!fe)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:fe}}if(!this._data.updateable)return;let ie=function(fe,be,Re){var je,Ze;let ut=[];if(be.removeAll)fe.clear();else if(be.remove)for(let ft of be.remove){let Dt=fe.get(ft);Dt&&(ut.push(Dt.geometry),fe.delete(ft))}if(be.add)for(let ft of be.add){let Dt=xe(ft,Re);if(Dt==null)continue;let Gt=fe.get(Dt);Gt&&ut.push(Gt.geometry),ut.push(ft.geometry),fe.set(Dt,ft)}if(be.update)for(let ft of be.update){let Dt=fe.get(ft.id);if(!Dt)continue;let Gt=!!ft.newGeometry,Kt=ft.removeAllProperties||((je=ft.removeProperties)===null||je===void 0?void 0:je.length)>0||((Ze=ft.addOrUpdateProperties)===null||Ze===void 0?void 0:Ze.length)>0;if(!Gt&&!Kt)continue;ut.push(Dt.geometry);let st=Object.assign({},Dt);if(fe.set(ft.id,st),Gt&&(ut.push(ft.newGeometry),st.geometry=ft.newGeometry),Kt){if(st.properties=ft.removeAllProperties?{}:Object.assign({},st.properties||{}),ft.removeProperties)for(let It of ft.removeProperties)delete st.properties[It];if(ft.addOrUpdateProperties)for(let{key:It,value:Ut}of ft.addOrUpdateProperties)st.properties[It]=Ut}}return ut}(this._data.updateable,y,N);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(N=>Ve(N))}}shouldReloadTile(y,{affectedBounds:N}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:fe}=this.workerOptions.geojsonVtOptions,be=function({x:Re,y:je,z:Ze},ut=0){let ft=e.a4((Re-ut)/Math.pow(2,Ze)),Dt=e.a5((je+1+ut)/Math.pow(2,Ze)),Gt=e.a4((Re+1+ut)/Math.pow(2,Ze)),Kt=e.a5((je-ut)/Math.pow(2,Ze));return new q([ft,Dt],[Gt,Kt])}(y.tileID.canonical,ie/fe);for(let Re of N)if(be.intersects(Re))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let fe=yield this.actor.sendAsync({type:N,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(fe,this.map.painter,N==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.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 e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,N,ie,fe){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=N}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let N=yield v.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,N?.data&&(this.image=N.data,y&&(this.coordinates=y),this._finishLoading())}catch(N){this._request=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let N=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(fe){let be=e.a8.fromPoints(fe),Re=be.width(),je=be.height(),Ze=Math.max(Re,je),ut=Math.max(0,Math.floor(-Math.log(Ze)/Math.LN2)),ft=Math.pow(2,ut);return new e.aa(ut,Math.floor((be.minX+be.maxX)/2*ft),Math.floor((be.minY+be.maxY)/2*ft))}(N),this.terrainTileRanges=this._getOverlappingTileRanges(N),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=N.map(fe=>this.tileID.getTilePoint(fe)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,N=y.gl;this.texture||(this.texture=new e.T(y,this.image,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var N;!((N=this.tileID)===null||N===void 0)&&N.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:N,minY:ie,maxX:fe,maxY:be}=e.a8.fromPoints(y),Re={};for(let je=0;je<=e.a9;je++){let Ze=Math.pow(2,je),ut=Math.floor(N*Ze),ft=Math.floor(ie*Ze),Dt=Math.floor(fe*Ze),Gt=Math.floor(be*Ze),Kt=(ut%Ze+Ze)%Ze,st=Dt%Ze,It=Math.floor(ut/Ze),Ut=Math.floor(Dt/Ze);Re[je]={minWrap:It,maxWrap:Ut,minTileXWrapped:Kt,maxTileXWrapped:st,minTileY:ft,maxTileY:Gt}}return Re}}class _e extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),this._onPlayingHandler=()=>{var be;(be=this.map)===null||be===void 0||be.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=N}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let N of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(N,"Source")).url);try{let N=yield e.ab(this.urls);if(this._loaded=!0,!N)return;this.video=N,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(N){this.fire(new e.l(e.d(N)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let N=this.video.seekable;yN.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${N.start(0)} and ${N.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,N=y.gl;this.texture?this.video.paused||(this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE),N.texSubImage2D(N.TEXTURE_2D,0,0,0,N.RGBA,N.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("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 ce extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),N.coordinates?Array.isArray(N.coordinates)&&N.coordinates.length===4&&!N.coordinates.some(be=>!Array.isArray(be)||be.length!==2||be.some(Re=>typeof Re!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas=="string"||N.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,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.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate===void 0||N.animate}load(){return e._(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 e.l(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(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let N=this.map.painter.context,ie=N.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(N,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let fe=!1;for(let be in this.tiles){let Re=this.tiles[be];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture,fe=!0)}fe&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},le=pe=>{switch(pe){case"geojson":return Ge;case"image":return ke;case"raster":return ae;case"raster-dem":return he;case"vector":return ee;case"video":return _e;case"canvas":return ce}return ve[pe]},Ae="RTLPluginLoaded";class Be extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=se()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(N=>{throw this.status="error",N})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(N,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(N),!this.url)throw new Error(`requested url ${N} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Ae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Xe=null;function Ye(){return Xe||(Xe=new Be),Xe}var yt,gt;(function(pe){pe[pe.Base=0]="Base",pe[pe.Parent=1]="Parent"})(yt||(yt={})),function(pe){pe[pe.Departing=0]="Departing",pe[pe.Incoming=1]="Incoming"}(gt||(gt={}));class Tt{constructor(y,N){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=N,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:N,fadingParentID:ie,fadeEndTime:fe}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=N,this.fadingParentID=ie,this.fadeEndTime=fe}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=m(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,N,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(fe,be){let Re={};if(!be)return Re;for(let je of fe){let Ze=je.layerIds.map(ut=>be.getLayer(ut)).filter(Boolean);if(Ze.length!==0){je.layers=Ze,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(ut=>Ze.filter(ft=>ft.id===ut)[0]));for(let ut of Ze)Re[ut.id]=je}}return Re}(y.buckets,N?.style),this.hasSymbolBuckets=!1;for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af&&be.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let fe in this.buckets){let be=this.buckets[fe];this.queryPadding=Math.max(this.queryPadding,N.style.getLayer(fe).queryRadius(be))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let fe=this.buckets[ie];fe.uploadPending()&&fe.upload(y)}let N=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,N.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,N.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:fe,cameraQueryGeometry:be,scale:Re,tileSize:this.tileSize,pixelPosMatrix:ft,transform:Ze,params:je,queryPadding:this.queryPadding*ut,getElevation:Dt},y,N,ie):{}}querySourceFeatures(y,N){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let fe=ie.loadVTLayers(),be=N?.sourceLayer?N.sourceLayer:"",Re=fe[e.ag]||fe[be];if(!Re)return;let je=e.ah(N?.filter,N?.globalState),{z:Ze,x:ut,y:ft}=this.tileID.canonical,Dt={z:Ze,x:ut,y:ft};for(let Gt=0;Gtie)fe=!1;else if(N)if(this.expirationTime({zoom:0,x:0,y:0,wrap:vr,fullyVisible:!1}),Ar=[],hr=[];if(pe.renderWorldCopies&&Re.allowWorldCopies())for(let vr=1;vr<=3;vr++)Ar.push(dr(-vr)),Ar.push(dr(vr));for(Ar.push(dr(0));Ar.length>0;){let vr=Ar.pop(),Or=vr.x,Cr=vr.y,ta=vr.fullyVisible,ka={x:Or,y:Cr,z:vr.zoom},Ta=Re.getTileBoundingVolume(ka,vr.wrap,pe.elevation,y);if(!ta){let ma=ht(N,Ta,ie);if(ma===0)continue;ta=ma===2}let Ra=Re.distanceToTile2d(fe.x,fe.y,ka,Ta),ua=Ze;je&&(ua=(y.calculateTileZoom||We)(pe.zoom+e.ar(pe.tileSize/y.tileSize),Ra,Ut,ir,pe.fov)),ua=(y.roundZoom?Math.round:Math.floor)(ua),ua=Math.max(0,ua);let ia=Math.min(ua,ft);if(vr.wrap=Re.getWrap(be,ka,vr.wrap),vr.zoom>=ia){if(vr.zoom>1),wrap:vr.wrap,fullyVisible:ta})}return hr.sort((vr,Or)=>vr.distanceSq-Or.distanceSq).map(vr=>vr.tileID)}let et=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(pe){return pe==="raster"||pe==="image"||pe==="video"}function pt(pe,y,N,ie,fe,be,Re){if(!y.hasData())return!1;let{tileID:je,fadingRole:Ze,fadingDirection:ut,fadingParentID:ft}=y;if(Ze===yt.Base&&ut===gt.Incoming&&ft)return N[ft.key]=ft,!0;let Dt=Math.max(je.overscaledZ-fe,be);for(let Gt=je.overscaledZ-1;Gt>=Dt;Gt--){let Kt=je.scaledTo(Gt),st=pe.getLoadedTile(Kt);if(st)return y.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Incoming,fadingParentID:st.tileID,fadeEndTime:ie+Re}),st.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Departing,fadeEndTime:ie+Re}),N[Kt.key]=Kt,!0}return!1}function Pt(pe,y,N,ie,fe,be){if(!y.hasData())return!1;let Re=y.tileID.children(fe),je=Ct(pe,y,Re,N,ie,fe,be);if(je)return!0;for(let Ze of Re)Ct(pe,y,Ze.children(fe),N,ie,fe,be)&&(je=!0);return je}function Ct(pe,y,N,ie,fe,be,Re){if(N[0].overscaledZ>=be)return!1;let je=!1;for(let Ze of N){let ut=pe.getLoadedTile(Ze);if(!ut)continue;let{fadingRole:ft,fadingDirection:Dt,fadingParentID:Gt}=ut;ft===yt.Base&&Dt===gt.Departing&&Gt||(ut.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Departing,fadingParentID:y.tileID,fadeEndTime:fe+Re}),y.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Incoming,fadeEndTime:fe+Re})),ie[Ze.key]=Ze,je=!0}return je}function qt(pe,y,N,ie){let fe=pe.tileID;return!!pe.selfFading||!pe.hasData()&&!!y.has(fe)&&(pe.setSelfFadeLogic(N+ie),!0)}function Vt(pe,y){var N;pe.needsHillshadePrepare=!0,pe.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-pe.tileID.canonical.x,fe=y.tileID.canonical.y-pe.tileID.canonical.y,be=Math.pow(2,pe.tileID.canonical.z),Re=y.tileID.key;ie===0&&fe===0||Math.abs(fe)>1||(Math.abs(ie)>1&&(Math.abs(ie+be)===1?ie+=be:Math.abs(ie-be)===1&&(ie-=be)),y.dem&&pe.dem&&(pe.dem.backfillBorder(y.dem,ie,fe),!((N=pe.neighboringTiles)===null||N===void 0)&&N[Re]&&(pe.neighboringTiles[Re].backfilled=!0)))}class Ht{constructor(){this._tiles={}}handleWrapJump(y){let N={};for(let ie in this._tiles){let fe=this._tiles[ie];fe.tileID=fe.tileID.unwrapTo(fe.tileID.wrap+y),N[fe.tileID.key]=fe}this._tiles=N}setFeatureState(y,N){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,N)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(N=>N.tileID).sort(e.au).map(N=>N.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,N){this._tiles[y]=N}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let N=this.getTileById(y.key);return N?.hasData()?N:null}isIdRenderable(y,N=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(N)}getRenderableIds(y=0,N){let ie=[];for(let fe of this.getAllIds())this.isIdRenderable(fe,N)&&ie.push(this.getTileById(fe));return N?ie.sort((fe,be)=>{let Re=fe.tileID,je=be.tileID,Ze=new e.P(Re.canonical.x,Re.canonical.y)._rotate(-y),ut=new e.P(je.canonical.x,je.canonical.y)._rotate(-y);return Re.overscaledZ-je.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(fe=>fe.tileID.key):ie.map(fe=>fe.tileID).sort(e.au).map(fe=>fe.key)}}class Sr extends e.E{constructor(y,N,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",fe=>{this._dataHandler(fe)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((fe,be,Re,je)=>{let Ze=new(le(be.type))(fe,be,Re,je);if(Ze.id!==fe)throw new Error(`Expected Source id to be ${fe} instead of ${Ze.id}`);return Ze})(y,N,ie,this),this._inViewTiles=new Ht,this._outOfViewCache=new e.av(0,fe=>this._unloadTile(fe)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var N;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((N=this._source)===null||N===void 0)&&N.onAdd&&this._source.onAdd(y)}onRemove(y){var N;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((N=this._source)===null||N===void 0)&&N.onRemove&&this._source.onRemove(y),this._inViewTiles=new Ht}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 y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,N,ie){return e._(this,void 0,void 0,function*(){try{let fe=yield this._source.loadTile(y);this._tileLoaded(y,N,ie,fe)}catch(fe){y.state="errored",fe.status!==404?this._source.fire(new e.l(e.d(fe),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let N of this._inViewTiles.getAllTiles())N.upload(y),N.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var N;return this._inViewTiles.getRenderableIds((N=this.transform)===null||N===void 0?void 0:N.bearingInRadians,y)}hasRenderableParent(y){let N=y.overscaledZ-1;if(N>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(N));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,N=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let fe=this._inViewTiles.getTileById(ie);N&&!this._source.shouldReloadTile(fe,N)||(y?this._reloadTile(ie,"expired"):fe.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,N){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=N),yield this._loadTile(ie,y,N))})}_tileLoaded(y,N,ie,fe){y.timeAdded=m(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(N,y),fe?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(be,Re){var je,Ze,ut;let ft=Re.getRenderableIds();for(let Dt of ft){if(!(!((je=be.neighboringTiles)===null||je===void 0)&&je[Dt]))continue;let Gt=Re.getTileById(Dt);be.neighboringTiles[Dt].backfilled||Vt(be,Gt),!((ut=(Ze=Gt.neighboringTiles)===null||Ze===void 0?void 0:Ze[be.tileID.key])===null||ut===void 0)&&ut.backfilled||Vt(Gt,be)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,N){let ie=this._getLoadedDescendents(N),fe=new Set;for(let be of N){let Re=ie[be.key];if(!Re?.length){fe.add(be);continue}let je=be.overscaledZ+Sr.maxOverzooming,Ze=Re.filter(Dt=>Dt.tileID.overscaledZ<=je);if(!Ze.length){fe.add(be);continue}let ut=Math.min(...Ze.map(Dt=>Dt.tileID.overscaledZ)),ft=Ze.filter(Dt=>Dt.tileID.overscaledZ===ut).map(Dt=>Dt.tileID);for(let Dt of ft)y[Dt.key]=Dt;this._areDescendentsComplete(ft,ut,be.overscaledZ)||fe.add(be)}return fe}_getLoadedDescendents(y){var N;let ie={};for(let fe of this._inViewTiles.getAllTiles().filter(be=>be.hasData()))for(let be of y)fe.tileID.isChildOf(be)&&(ie[N=be.key]||(ie[N]=[]),ie[be.key].push(fe));return ie}_areDescendentsComplete(y,N,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===N:Math.pow(4,N-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let N=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,fe=Math.floor(N*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,fe):fe;this._outOfViewCache.setMaxSize(be)}handleWrapJump(y){let N=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,N&&(this._inViewTiles.handleWrapJump(N),this._resetTileReloadTimers())}update(y,N){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=N,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ze=>new e.a3(Ze.canonical.z,Ze.wrap,Ze.canonical.z,Ze.canonical.x,Ze.canonical.y)):(ie=Je(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:N,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ze=>this._source.hasTile(Ze)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let fe=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,fe&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let be=Ke(y,this._source),Re=this._updateRetainedTiles(ie,be),je=Mt(this._source.type);je&&this._rasterFadeDuration>0&&!N&&function(Ze,ut,ft,Dt,Gt,Kt,st){let It=m(),Ut=e.at(ut);for(let ir of ut){let dr=Ze.getTileById(ir.key);dr.fadingDirection!==gt.Departing&&dr.fadeOpacity!==0||dr.resetFadeLogic(),pt(Ze,dr,ft,It,Dt,Gt,st)||Pt(Ze,dr,ft,It,Kt,st)||qt(dr,Ut,It,st)||dr.resetFadeLogic()}}(this._inViewTiles,ie,Re,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),je?this._cleanUpRasterTiles(Re):this._cleanUpVectorTiles(Re)}_cleanUpRasterTiles(y){for(let N of this._inViewTiles.getAllIds())y[N]||this._removeTile(N)}_cleanUpVectorTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);y[N]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(N):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(N)}}_addTerrainIdealTiles(y){let N=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let fe=ie.scaledTo(ie.canonical.z-1);N.push(fe);let be=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));N.push(be)}return y.concat(N)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,N){var ie;let fe=new Set;for(let ut of y)this._addTile(ut).hasData()||fe.add(ut);let be=y.reduce((ut,ft)=>(ut[ft.key]=ft,ut),{}),Re=this._retainLoadedChildren(be,fe),je={},Ze=Math.max(N-Sr.maxUnderzooming,this._source.minzoom);for(let ut of Re){let ft=this._inViewTiles.getTileById(ut.key),Dt=ft?.wasRequested();for(let Gt=ut.overscaledZ-1;Gt>=Ze;--Gt){let Kt=ut.scaledTo(Gt);if(je[Kt.key])break;if(je[Kt.key]=!0,ft=this.getTile(Kt),!ft&&Dt&&(ft=this._addTile(Kt)),ft){let st=ft.hasData();if((st||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Dt)&&(be[Kt.key]=Kt),Dt=ft.wasRequested(),st)break}}}return be}_addTile(y){let N=this._inViewTiles.getTileById(y.key);if(N)return N;N=this._outOfViewCache.getAndRemove(y),N&&(N.resetFadeLogic(),this._setTileReloadTimer(y.key,N),N.tileID=y,this._state.initializeTileState(N,this.map?this.map.painter:null));let ie=N;return N||(N=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(N,y.key,N.state)),N.uses++,this._inViewTiles.setTile(y.key,N),ie||this._source.fire(new e.n("dataloading",{tile:N,coord:N.tileID,dataType:"source"})),N}_setTileReloadTimer(y,N){this._clearTileReloadTimer(y);let ie=N.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let N=this._timers[y];N&&(clearTimeout(N),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,N)}}refreshTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);(this._inViewTiles.isIdRenderable(N)||ie.state=="errored")&&y.some(fe=>fe.equals(ie.tileID.canonical))&&this._reloadTile(N,"expired")}}_removeTile(y){let N=this._inViewTiles.getTileById(y);N&&(N.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),N.uses>0||(N.hasData()&&N.state!=="reloading"?this._outOfViewCache.add(N.tileID,N,N.getExpiryTimeout()):(N.aborted=!0,this._abortTile(N),this._unloadTile(N))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,N,ie){let fe=[],be=this.transform;if(!be)return fe;let Re=be.getCoveringTilesDetailsProvider().allowWorldCopies(),je=ie?be.getCameraQueryGeometry(y):y,Ze=Kt=>be.screenPointToMercatorCoordinate(Kt,this.terrain),ut=this.transformBbox(y,Ze,!Re),ft=this.transformBbox(je,Ze,!Re),Dt=this.getIds(),Gt=e.a8.fromPoints(ft);for(let Kt of Dt){let st=this._inViewTiles.getTileById(Kt);if(st.holdingForSymbolFade())continue;let It=Re?[st.tileID]:[st.tileID.unwrapTo(-1),st.tileID.unwrapTo(0)],Ut=Math.pow(2,be.zoom-st.tileID.overscaledZ),ir=N*st.queryPadding*e.a6/st.tileSize/Ut;for(let dr of It){let Ar=Gt.map(hr=>dr.getTilePoint(new e.a7(hr.x,hr.y)));if(Ar.expandBy(ir),Ar.intersects(et)){let hr=ut.map(Or=>dr.getTilePoint(Or)),vr=ft.map(Or=>dr.getTilePoint(Or));fe.push({tile:st,tileID:Re?dr:dr.unwrapTo(0),queryGeometry:hr,cameraQueryGeometry:vr,scale:Ut})}}}return fe}transformBbox(y,N,ie){let fe=y.map(N);if(ie){let be=e.a8.fromPoints(y);be.shrinkBy(.001*Math.min(be.width(),be.height()));let Re=be.map(N);e.a8.fromPoints(fe).covers(Re)||(fe=fe.map(je=>je.x>.5?new e.a7(je.x-1,je.y,je.z):je))}return fe}getVisibleCoordinates(y){let N=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(N),N}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,N){if(N<=0)return!1;let ie=m();for(let fe of y.getAllTiles())if(fe.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,N,ie){y||(y=e.ag),this._state.updateState(y,N,ie)}removeFeatureState(y,N,ie){y||(y=e.ag),this._state.removeFeatureState(y,N,ie)}getFeatureState(y,N){return y||(y=e.ag),this._state.getState(y,N)}setDependencies(y,N,ie){let fe=this._inViewTiles.getTileById(y);fe&&fe.setDependencies(N,ie)}reloadTilesForDependencies(y,N){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,N)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,N))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class Kr{constructor(y,N){this.reset(y,N)}reset(y,N){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(fe-Re)/je:0;return this.points[be].mult(1-Ze).add(this.points[N].mult(Ze))}}function Yt(pe,y){let N=!0;return pe==="always"||pe!=="never"&&y!=="never"||(N=!1),N}class Rt{constructor(y,N,ie){let fe=this.boxCells=[],be=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(N/ie);for(let Re=0;Rethis.width||fe<0||N>this.height)return[];let Ze=[];if(y<=0&&N<=0&&this.width<=ie&&this.height<=fe){if(be)return[{key:null,x1:y,y1:N,x2:ie,y2:fe}];for(let ut=0;ut0}hitTestCircle(y,N,ie,fe,be){let Re=y-ie,je=y+ie,Ze=N-ie,ut=N+ie;if(je<0||Re>this.width||ut<0||Ze>this.height)return!1;let ft=[];return this._forEachCell(Re,Ze,je,ut,this._queryCellCircle,ft,{hitTest:!0,overlapMode:fe,circle:{x:y,y:N,radius:ie},seenUids:{box:{},circle:{}}},be),ft.length>0}_queryCell(y,N,ie,fe,be,Re,je,Ze){let{seenUids:ut,hitTest:ft,overlapMode:Dt}=je,Gt=this.boxCells[be],Kt=1e-6;if(Gt!==null){let It=this.bboxes;for(let Ut of Gt)if(!ut.box[Ut]){ut.box[Ut]=!0;let ir=4*Ut,dr=this.boxKeys[Ut];if(y<=It[ir+2]+Kt&&N<=It[ir+3]+Kt&&ie>=It[ir+0]-Kt&&fe>=It[ir+1]-Kt&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))&&(Re.push({key:dr,x1:It[ir],y1:It[ir+1],x2:It[ir+2],y2:It[ir+3]}),ft))return!0}}let st=this.circleCells[be];if(st!==null){let It=this.circles;for(let Ut of st)if(!ut.circle[Ut]){ut.circle[Ut]=!0;let ir=3*Ut,dr=this.circleKeys[Ut];if(this._circleAndRectCollide(It[ir],It[ir+1],It[ir+2],y,N,ie,fe)&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))){let Ar=It[ir],hr=It[ir+1],vr=It[ir+2];if(Re.push({key:dr,x1:Ar-vr,y1:hr-vr,x2:Ar+vr,y2:hr+vr}),ft)return!0}}}return!1}_queryCellCircle(y,N,ie,fe,be,Re,je,Ze){let{circle:ut,seenUids:ft,overlapMode:Dt}=je,Gt=this.boxCells[be];if(Gt!==null){let st=this.bboxes;for(let It of Gt)if(!ft.box[It]){ft.box[It]=!0;let Ut=4*It,ir=this.boxKeys[It];if(this._circleAndRectCollide(ut.x,ut.y,ut.radius,st[Ut+0],st[Ut+1],st[Ut+2],st[Ut+3])&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}let Kt=this.circleCells[be];if(Kt!==null){let st=this.circles;for(let It of Kt)if(!ft.circle[It]){ft.circle[It]=!0;let Ut=3*It,ir=this.circleKeys[It];if(this._circlesCollide(st[Ut],st[Ut+1],st[Ut+2],ut.x,ut.y,ut.radius)&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}}_forEachCell(y,N,ie,fe,be,Re,je,Ze){let ut=this._convertToXCellCoord(y),ft=this._convertToYCellCoord(N),Dt=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(fe);for(let Kt=ut;Kt<=Dt;Kt++)for(let st=ft;st<=Gt;st++)if(be.call(this,y,N,ie,fe,this.xCellCount*st+Kt,Re,je,Ze))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,N,ie,fe,be,Re){let je=fe-y,Ze=be-N,ut=ie+Re;return ut*ut>je*je+Ze*Ze}_circleAndRectCollide(y,N,ie,fe,be,Re,je){let Ze=(Re-fe)/2,ut=Math.abs(y-(fe+Ze));if(ut>Ze+ie)return!1;let ft=(je-be)/2,Dt=Math.abs(N-(be+ft));if(Dt>ft+ie)return!1;if(ut<=Ze||Dt<=ft)return!0;let Gt=ut-Ze,Kt=Dt-ft;return Gt*Gt+Kt*Kt<=ie*ie}}function nr(pe,y){let N=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),fe=y[0]*N,be=y[4]*N,Re=y[8]*ie,je=y[1]*N,Ze=y[5]*N,ut=y[9]*ie,ft=y[2]*N,Dt=y[6]*N,Gt=y[10]*ie;pe[0]=fe,pe[1]=be,pe[2]=Re,pe[4]=je,pe[5]=Ze,pe[6]=ut,pe[8]=ft,pe[9]=Dt,pe[10]=Gt;let Kt=y[12],st=y[13],It=y[14];return pe[12]=-fe*Kt-je*st-ft*It,pe[13]=-be*Kt-Ze*st-Dt*It,pe[14]=-Re*Kt-ut*st-Gt*It,pe[3]=0,pe[7]=0,pe[11]=0,pe[15]=1,pe}let ur=e.O();function cr(pe,y,N){let ie=e.O();if(!pe){let{vecSouth:Dt,vecEast:Gt}=Qr(y),Kt=n();Kt[0]=Gt[0],Kt[1]=Gt[1],Kt[2]=Dt[0],Kt[3]=Dt[1],fe=Kt,(ft=(Re=(be=Kt)[0])*(ut=be[3])-(Ze=be[2])*(je=be[1]))&&(fe[0]=ut*(ft=1/ft),fe[1]=-je*ft,fe[2]=-Ze*ft,fe[3]=Re*ft),ie[0]=Kt[0],ie[1]=Kt[1],ie[4]=Kt[2],ie[5]=Kt[3]}var fe,be,Re,je,Ze,ut,ft;return e.S(ie,ie,[1/N,1/N,1]),ie}function Rr(pe,y,N,ie){if(pe){let fe=e.O();if(!y){let{vecSouth:be,vecEast:Re}=Qr(N);fe[0]=Re[0],fe[1]=Re[1],fe[4]=be[0],fe[5]=be[1]}return e.S(fe,fe,[ie,ie,1]),fe}return N.pixelsToClipSpaceMatrix}function Qr(pe){let y=Math.cos(pe.rollInRadians),N=Math.sin(pe.rollInRadians),ie=Math.cos(pe.pitchInRadians),fe=Math.cos(pe.bearingInRadians),be=Math.sin(pe.bearingInRadians),Re=e.az();Re[0]=-fe*ie*N-be*y,Re[1]=-be*ie*N+fe*y;let je=e.aA(Re);je<1e-9?e.aB(Re):e.aC(Re,Re,1/je);let Ze=e.az();Ze[0]=fe*ie*y-be*N,Ze[1]=be*ie*y+fe*N;let ut=e.aA(Ze);return ut<1e-9?e.aB(Ze):e.aC(Ze,Ze,1/ut),{vecEast:Ze,vecSouth:Re}}function Zr(pe,y,N,ie){let fe;ie?(fe=[pe,y,ie(pe,y),1],e.aE(fe,fe,N)):(fe=[pe,y,0,1],Oa(fe,fe,N));let be=fe[3];return{point:new e.P(fe[0]/be,fe[1]/be),signedDistanceFromCamera:be,isOccluded:!1}}function ha(pe,y){return .5+pe/y*.5}function Pa(pe,y){return pe.x>=-y[0]&&pe.x<=y[0]&&pe.y>=-y[1]&&pe.y<=y[1]}function La(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt){let Kt=N?pe.textSizeData:pe.iconSizeData,st=e.aw(Kt,y.transform.zoom),It=[256/y.width*2+1,256/y.height*2+1],Ut=N?pe.text.dynamicLayoutVertexArray:pe.icon.dynamicLayoutVertexArray;Ut.clear();let ir=pe.lineVertexArray,dr=N?pe.text.placedSymbolArray:pe.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,hr=!1;for(let vr=0;vrMath.abs(N.x-y.x)*ie?{useVertical:!0}:(pe===e.ax.vertical?y.yN.x)?{needsFlipping:!0}:null}function ja(pe){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:N,symbol:ie,fontSize:fe,flip:be,keepUpright:Re,glyphOffsetArray:je,dynamicLayoutVertexArray:Ze,aspectRatio:ut,rotateToLine:ft}=pe,Dt=fe/24,Gt=ie.lineOffsetX*Dt,Kt=ie.lineOffsetY*Dt,st;if(ie.numGlyphs>1){let It=ie.glyphStartIndex+ie.numGlyphs,Ut=ie.lineStartIndex,ir=ie.lineStartIndex+ie.lineLength,dr=un(Dt,je,Gt,Kt,be,ie,ft,y);if(!dr)return{notEnoughRoom:!0};let Ar=li(dr.first.point.x,dr.first.point.y,y,N),hr=li(dr.last.point.x,dr.last.point.y,y,N);if(Re&&!be){let vr=Xa(ie.writingMode,Ar,hr,ut);if(vr)return vr}st=[dr.first];for(let vr=ie.glyphStartIndex+1;vr0?Ar.point:Nn(y.tileAnchorPoint,dr,Ut,1,y),vr=li(Ut.x,Ut.y,y,N),Or=li(hr.x,hr.y,y,N),Cr=Xa(ie.writingMode,vr,Or,ut);if(Cr)return Cr}let It=vi(Dt*je.getoffsetX(ie.glyphStartIndex),Gt,Kt,be,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ft);if(!It||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};st=[It]}for(let It of st)e.aD(Ze,It.point,It.angle);return{}}function Nn(pe,y,N,ie,fe){let be=pe.add(pe.sub(y)._unit()),Re=Un(be.x,be.y,fe).point,je=N.sub(Re);return N.add(je._mult(ie/je.mag()))}function yn(pe,y,N){let ie=y.projectionCache;if(ie.projections[pe])return ie.projections[pe];let fe=new e.P(y.lineVertexArray.getx(pe),y.lineVertexArray.gety(pe)),be=Un(fe.x,fe.y,y);if(be.signedDistanceFromCamera>0)return ie.projections[pe]=be.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=be.isOccluded),be.point;let Re=pe-N.direction;return Nn(N.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(Re),y.lineVertexArray.gety(Re)),fe,N.previousVertex,N.absOffsetX-N.distanceFromAnchor+1,y)}function Un(pe,y,N){let ie=pe+N.translation[0],fe=y+N.translation[1],be;return N.pitchWithMap?(be=Zr(ie,fe,N.pitchedLabelPlaneMatrix,N.getElevation),be.isOccluded=!1):(be=N.transform.projectTileCoordinates(ie,fe,N.unwrappedTileID,N.getElevation),be.point.x=(.5*be.point.x+.5)*N.width,be.point.y=(.5*-be.point.y+.5)*N.height),be}function li(pe,y,N,ie){if(N.pitchWithMap){let fe=[pe,y,0,1];return e.aE(fe,fe,ie),N.transform.projectTileCoordinates(fe[0]/fe[3],fe[1]/fe[3],N.unwrappedTileID,N.getElevation).point}return{x:pe/N.width*2-1,y:1-y/N.height*2}}function Yn(pe,y,N){return N.transform.projectTileCoordinates(pe,y,N.unwrappedTileID,N.getElevation)}function on(pe,y,N){return pe._unit()._perp()._mult(y*N)}function en(pe,y,N,ie,fe,be,Re,je,Ze){if(je.projectionCache.offsets[pe])return je.projectionCache.offsets[pe];let ut=N.add(y);if(pe+Ze.direction=fe)return je.projectionCache.offsets[pe]=ut,ut;let ft=yn(pe+Ze.direction,je,Ze),Dt=on(ft.sub(N),Re,Ze.direction),Gt=N.add(Dt),Kt=ft.add(Dt);return je.projectionCache.offsets[pe]=e.aF(be,ut,Gt,Kt)||ut,je.projectionCache.offsets[pe]}function vi(pe,y,N,ie,fe,be,Re,je,Ze){let ut=ie?pe-y:pe+y,ft=ut>0?1:-1,Dt=0;ie&&(ft*=-1,Dt=Math.PI),ft<0&&(Dt+=Math.PI);let Gt,Kt=ft>0?be+fe:be+fe+1;je.projectionCache.cachedAnchorPoint?Gt=je.projectionCache.cachedAnchorPoint:(Gt=Un(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=Gt);let st,It,Ut=Gt,ir=Gt,dr=0,Ar=0,hr=Math.abs(ut),vr=[],Or;for(;dr+Ar<=hr;){if(Kt+=ft,Kt=Re)return null;dr+=Ar,ir=Ut,It=st;let ka={absOffsetX:hr,direction:ft,distanceFromAnchor:dr,previousVertex:ir};if(Ut=yn(Kt,je,ka),N===0)vr.push(ir),Or=Ut.sub(ir);else{let Ta,Ra=Ut.sub(ir);Ta=Ra.mag()===0?on(yn(Kt+ft,je,ka).sub(Ut),N,ft):on(Ra,N,ft),It||(It=ir.add(Ta)),st=en(Kt,Ta,Ut,be,Re,It,N,je,ka),vr.push(It),Or=st.sub(It)}Ar=Or.mag()}let Cr=Or._mult((hr-dr)/Ar)._add(It||ir),ta=Dt+Math.atan2(Ut.y-ir.y,Ut.x-ir.x);return vr.push(Cr),{point:Cr,angle:Ze?ta:0,path:vr}}let Yi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ja(pe,y){for(let N=0;N=1;za--)ma.push(ua.path[za]);for(let za=1;zakn.signedDistanceFromCamera<=0)?[]:za.map(kn=>kn.point)}let Fa=[];if(ma.length>0){let za=ma[0].clone(),kn=ma[0].clone();for(let Dn=1;Dn=ka.x&&kn.x<=Ta.x&&za.y>=ka.y&&kn.y<=Ta.y?[ma]:kn.xTa.x||kn.yTa.y?[]:e.aG([ma],ka.x,ka.y,Ta.x,Ta.y)}for(let za of Fa){Ra.reset(za,.25*ta);let kn=0;kn=Ra.length<=.5*ta?1:Math.ceil(Ra.paddedLength/da)+1;for(let Dn=0;Dn{let Ze=Zr(je.x,je.y,Re,be.getElevation),ut=be.transform.projectTileCoordinates(Ze.point.x,Ze.point.y,be.unwrappedTileID,be.getElevation);return ut.point.x=(.5*ut.point.x+.5)*be.width,ut.point.y=(.5*-ut.point.y+.5)*be.height,ut})}(y,N);return function(fe){let be=0,Re=0,je=0,Ze=0;for(let ut=0;utRe&&(Re=Ze,be=je));return fe.slice(be,be+Re)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let N=[],ie=new e.a8;for(let Dt of y){let Gt=new e.P(Dt.x+lt,Dt.y+lt);ie.extend(Gt),N.push(Gt)}let{minX:fe,minY:be,maxX:Re,maxY:je}=ie,Ze=this.grid.query(fe,be,Re,je).concat(this.ignoredGrid.query(fe,be,Re,je)),ut={},ft={};for(let Dt of Ze){let Gt=Dt.key;if(ut[Gt.bucketInstanceId]===void 0&&(ut[Gt.bucketInstanceId]={}),ut[Gt.bucketInstanceId][Gt.featureIndex])continue;let Kt=[new e.P(Dt.x1,Dt.y1),new e.P(Dt.x2,Dt.y1),new e.P(Dt.x2,Dt.y2),new e.P(Dt.x1,Dt.y2)];e.aH(N,Kt)&&(ut[Gt.bucketInstanceId][Gt.featureIndex]=!0,ft[Gt.bucketInstanceId]===void 0&&(ft[Gt.bucketInstanceId]=[]),ft[Gt.bucketInstanceId].push(Gt.featureIndex))}return ft}insertCollisionBox(y,N,ie,fe,be,Re){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,N,ie,fe,be,Re){let je=ie?this.ignoredGrid:this.grid,Ze={bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N};for(let ut=0;ut=this.screenRightBoundary||fethis.screenBottomBoundary}isInsideGrid(y,N,ie,fe){return ie>=0&&y=0&&Nthis.projectAndGetPerspectiveRatio(da.x,da.y,fe,ut,Dt));ia=ma.some(da=>!da.isOccluded),ua=ma.map(da=>new e.P(da.x,da.y))}else ia=!0;return{box:e.aI(ua),allPointsOccluded:!ia}}}class fr{constructor(y,N,ie,fe){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?N:-N))):fe&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class lr{constructor(y,N,ie,fe,be){this.text=new fr(y?y.text:null,N,ie,be),this.icon=new fr(y?y.icon:null,N,fe,be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,N,ie){this.text=y,this.icon=N,this.skipFade=ie}}class Ir{constructor(y,N,ie,fe,be){this.bucketInstanceId=y,this.featureIndex=N,this.sourceLayerIndex=ie,this.bucketIndex=fe,this.tileID=be}}class Dr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let N=++this.maxGroupID;this.collisionGroups[y]={ID:N,predicate:ie=>ie.collisionGroupID===N}}return this.collisionGroups[y]}}function ot(pe,y,N,ie,fe){let{horizontalAlign:be,verticalAlign:Re}=e.aP(pe);return new e.P(-(be-.5)*y+ie[0]*fe,-(Re-.5)*N+ie[1]*fe)}class kt{constructor(y,N,ie,fe,be){this.transform=y.clone(),this.terrain=N,this.collisionIndex=new rt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Dr(fe),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=be,be&&(be.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let N=this.terrain;return N?(ie,fe)=>N.getElevation(y,ie,fe):null}getBucketParts(y,N,ie,fe){let be=ie.getBucket(N),Re=ie.latestFeatureIndex;if(!be||!Re||N.id!==be.layerIds[0])return;let je=ie.collisionBoxArray,Ze=be.layers[0].layout,ut=be.layers[0].paint,ft=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Dt=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Kt=Ze.get("text-rotation-alignment")==="map",st=e.aK(ie,1,this.transform.zoom),It=e.aL(this.collisionIndex.transform,ie,ut.get("text-translate"),ut.get("text-translate-anchor")),Ut=e.aL(this.collisionIndex.transform,ie,ut.get("icon-translate"),ut.get("icon-translate-anchor")),ir=cr(Kt,this.transform,st);this.retainedQueryData[be.bucketInstanceId]=new Ir(be.bucketInstanceId,Re,be.sourceLayerIndex,be.index,ie.tileID);let dr={bucket:be,layout:Ze,translationText:It,translationIcon:Ut,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:ir,scale:ft,textPixelRatio:Dt,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:e.aw(be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(be.sourceID)};if(fe)for(let Ar of be.sortKeyRanges){let{sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or}=Ar;y.push({sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or,parameters:dr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:be.symbolInstances.length,parameters:dr})}attemptAnchorPlacement(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar,hr){var vr,Or,Cr;let ta=e.aM[y.textAnchor],ka=[y.textOffset0,y.textOffset1],Ta=ot(ta,ie,fe,ka,be),Ra=this.collisionIndex.placeCollisionBox(N,Gt,Ze,ut,ft,je,Re,Ut,Dt.predicate,Ar,Ta,hr);if((!dr||this.collisionIndex.placeCollisionBox(dr,Gt,Ze,ut,ft,je,Re,ir,Dt.predicate,Ar,Ta,hr).placeable)&&Ra.placeable){let ua;if(!((vr=this.prevPlacement)===null||vr===void 0)&&vr.variableOffsets[Kt.crossTileID]&&(!((Cr=(Or=this.prevPlacement)===null||Or===void 0?void 0:Or.placements[Kt.crossTileID])===null||Cr===void 0)&&Cr.text)&&(ua=this.prevPlacement.variableOffsets[Kt.crossTileID].anchor),Kt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Kt.crossTileID]={textOffset:ka,width:ie,height:fe,anchor:ta,textBoxScale:be,prevAnchor:ua},this.markUsedJustification(st,ta,Kt,It),st.allowVerticalPlacement&&(this.markUsedOrientation(st,It,Kt),this.placedOrientations[Kt.crossTileID]=It),{shift:Ta,placedGlyphBoxes:Ra}}}placeLayerBucketPart(y,N,ie){let{bucket:fe,layout:be,translationText:Re,translationIcon:je,unwrappedTileID:Ze,pitchedLabelPlaneMatrix:ut,textPixelRatio:ft,holdingForFade:Dt,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Kt,collisionGroup:st}=y.parameters,It=be.get("text-optional"),Ut=be.get("icon-optional"),ir=e.aN(be,"text-overlap","text-allow-overlap"),dr=ir==="always",Ar=e.aN(be,"icon-overlap","icon-allow-overlap"),hr=Ar==="always",vr=be.get("text-rotation-alignment")==="map",Or=be.get("text-pitch-alignment")==="map",Cr=be.get("icon-text-fit")!=="none",ta=be.get("symbol-z-order")==="viewport-y",ka=dr&&(hr||!fe.hasIconData()||Ut),Ta=hr&&(dr||!fe.hasTextData()||It);!fe.collisionArrays&&Gt&&fe.deserializeCollisionBoxes(Gt);let Ra=this.retainedQueryData[fe.bucketInstanceId].tileID,ua=this._getTerrainElevationFunc(Ra),ia=this.transform.getFastPathSimpleProjectionMatrix(Ra),ma=(da,Fa,za)=>{var kn,Dn;if(N[da.crossTileID])return;if(Dt)return void(this.placements[da.crossTileID]=new Tr(!1,!1,!1));let ui=!1,cn=!1,sn=!0,ei=null,Pn={box:null,placeable:!1,offscreen:null,occluded:!1},Rn={placeable:!1},In=null,Jn=null,Ei=null,so=0,ti=0,bi=0;Fa.textFeatureIndex?so=Fa.textFeatureIndex:da.useRuntimeCollisionCircles&&(so=da.featureIndex),Fa.verticalTextFeatureIndex&&(ti=Fa.verticalTextFeatureIndex);let Wi=Fa.textBox;if(Wi){let Bs=es=>{let $o=e.ax.horizontal;if(fe.allowVerticalPlacement&&!es&&this.prevPlacement){let _s=this.prevPlacement.placedOrientations[da.crossTileID];_s&&(this.placedOrientations[da.crossTileID]=_s,$o=_s,this.markUsedOrientation(fe,$o,da))}return $o},So=(es,$o)=>{if(fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&Fa.verticalTextBox){for(let _s of fe.writingModes)if(_s===e.ax.vertical?(Pn=$o(),Rn=Pn):Pn=es(),Pn?.placeable)break}else Pn=es()},Ws=da.textAnchorOffsetStartIndex,Zo=da.textAnchorOffsetEndIndex;if(Zo===Ws){let es=($o,_s)=>{let Go=this.collisionIndex.placeCollisionBox($o,ir,ft,Ra,Ze,Or,vr,Re,st.predicate,ua,void 0,ia);return Go?.placeable&&(this.markUsedOrientation(fe,_s,da),this.placedOrientations[da.crossTileID]=_s),Go};So(()=>es(Wi,e.ax.horizontal),()=>{let $o=Fa.verticalTextBox;return fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&$o?es($o,e.ax.vertical):{box:null,offscreen:null}}),Bs(Pn?.placeable)}else{let es=e.aM[(Dn=(kn=this.prevPlacement)===null||kn===void 0?void 0:kn.variableOffsets[da.crossTileID])===null||Dn===void 0?void 0:Dn.anchor],$o=(Go,Ys,Ll)=>{let mo=Go.x2-Go.x1,ru=Go.y2-Go.y1,Rs=da.textBoxScale,Yu=Cr&&Ar==="never"?Ys:null,Ul=null,ql=ir==="never"?1:2,fo="never";es&&ql++;for(let Xo=0;Xo$o(Wi,Fa.iconBox,e.ax.horizontal),()=>{let Go=Fa.verticalTextBox;return fe.allowVerticalPlacement&&!Pn?.placeable&&da.numVerticalGlyphVertices>0&&Go?$o(Go,Fa.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Pn&&(ui=Pn.placeable,sn=Pn.offscreen);let _s=Bs(Pn?.placeable);if(!ui&&this.prevPlacement){let Go=this.prevPlacement.variableOffsets[da.crossTileID];Go&&(this.variableOffsets[da.crossTileID]=Go,this.markUsedJustification(fe,Go.anchor,da,_s))}}}if(In=Pn,ui=In?.placeable,sn=In?.offscreen,da.useRuntimeCollisionCircles&&da.centerJustifiedTextSymbolIndex>=0){let Bs=fe.text.placedSymbolArray.get(da.centerJustifiedTextSymbolIndex),So=e.ay(fe.textSizeData,Kt,Bs),Ws=be.get("text-padding");Jn=this.collisionIndex.placeCollisionCircles(ir,Bs,fe.lineVertexArray,fe.glyphOffsetArray,So,Ze,ut,ie,Or,st.predicate,da.collisionCircleDiameter,Ws,Re,ua),Jn.circles.length&&Jn.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),ui=dr||Jn.circles.length>0&&!Jn.collisionDetected,sn&&(sn=Jn.offscreen)}if(Fa.iconFeatureIndex&&(bi=Fa.iconFeatureIndex),Fa.iconBox){let Bs=So=>this.collisionIndex.placeCollisionBox(So,Ar,ft,Ra,Ze,Or,vr,je,st.predicate,ua,Cr&&ei?ei:void 0,ia);Rn&&Rn.placeable&&Fa.verticalIconBox?(Ei=Bs(Fa.verticalIconBox),cn=Ei.placeable):(Ei=Bs(Fa.iconBox),cn=Ei.placeable),sn&&(sn=Ei.offscreen)}let ro=It||da.numHorizontalGlyphVertices===0&&da.numVerticalGlyphVertices===0,Mo=Ut||da.numIconVertices===0;ro||Mo?Mo?ro||cn&&(cn=ui):ui=cn&&ui:cn=ui=cn&&ui;let zs=cn&&Ei.placeable;if(ui&&In.placeable&&this.collisionIndex.insertCollisionBox(In.box,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,Rn&&Rn.placeable&&ti?ti:so,st.ID),zs&&this.collisionIndex.insertCollisionBox(Ei.box,Ar,be.get("icon-ignore-placement"),fe.bucketInstanceId,bi,st.ID),Jn&&ui&&this.collisionIndex.insertCollisionCircles(Jn.circles,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,so,st.ID),ie&&this.storeCollisionData(fe.bucketInstanceId,za,Fa,In,Ei,Jn),da.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(fe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[da.crossTileID]=new Tr((ui||ka)&&!In?.occluded,(cn||Ta)&&!Ei?.occluded,sn||fe.justReloaded),N[da.crossTileID]=!0};if(ta){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let da=fe.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Fa=da.length-1;Fa>=0;--Fa){let za=da[Fa];ma(fe.symbolInstances.get(za),fe.collisionArrays[za],za)}}else for(let da=y.symbolInstanceStart;da=0&&(y.text.placedSymbolArray.get(je).crossTileID=be>=0&&je!==be?0:ie.crossTileID)}markUsedOrientation(y,N,ie){let fe=N===e.ax.horizontal||N===e.ax.horizontalOnly?N:0,be=N===e.ax.vertical?N:0,Re=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let je of Re)y.text.placedSymbolArray.get(je).placedOrientation=fe;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=be)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let N=this.prevPlacement,ie=!1;this.prevZoomAdjustment=N?N.zoomAdjustment(this.transform.zoom):0;let fe=N?N.symbolFadeChange(y):1,be=N?N.opacities:{},Re=N?N.variableOffsets:{},je=N?N.placedOrientations:{};for(let Ze in this.placements){let ut=this.placements[Ze],ft=be[Ze];ft?(this.opacities[Ze]=new lr(ft,fe,ut.text,ut.icon),ie||(ie=ut.text!==ft.text.placed),ie||(ie=ut.icon!==ft.icon.placed)):(this.opacities[Ze]=new lr(null,fe,ut.text,ut.icon,ut.skipFade),ie||(ie=ut.text||ut.icon))}for(let Ze in be){let ut=be[Ze];if(!this.opacities[Ze]){let ft=new lr(ut,fe,!1,!1);ft.isHidden()||(this.opacities[Ze]=ft,ie||(ie=ut.text.placed),ie||(ie=ut.icon.placed))}}for(let Ze in Re)this.variableOffsets[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.variableOffsets[Ze]=Re[Ze]);for(let Ze in je)this.placedOrientations[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.placedOrientations[Ze]=je[Ze]);if(N&&N.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=N?N.lastPlacementChangeTime:y)}updateLayerOpacities(y,N){let ie={};for(let fe of N){let be=fe.getBucket(y);be&&fe.latestFeatureIndex&&y.id===be.layerIds[0]&&this.updateBucketOpacities(be,fe.tileID,ie,fe.collisionBoxArray)}}updateBucketOpacities(y,N,ie,fe){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let be=y.layers[0],Re=be.layout,je=new lr(null,0,!1,!1,!0),Ze=Re.get("text-allow-overlap"),ut=Re.get("icon-allow-overlap"),ft=be._unevaluatedLayout.hasValue("text-variable-anchor")||be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dt=Re.get("text-rotation-alignment")==="map",Gt=Re.get("text-pitch-alignment")==="map",Kt=Re.get("icon-text-fit")!=="none",st=new lr(null,0,Ze&&(ut||!y.hasIconData()||Re.get("icon-optional")),ut&&(Ze||!y.hasTextData()||Re.get("text-optional")),!0);!y.collisionArrays&&fe&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(fe);let It=(ir,dr,Ar)=>{for(let hr=0;hr0,ta=this.placedOrientations[dr.crossTileID],ka=ta===e.ax.vertical,Ta=ta===e.ax.horizontal||ta===e.ax.horizontalOnly;if(Ar>0||hr>0){let ua=wa(Or.text);It(y.text,Ar,ka?pn:ua),It(y.text,hr,Ta?pn:ua);let ia=Or.text.isHidden(),ma=[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex];for(let za of ma)za>=0&&(y.text.placedSymbolArray.get(za).hidden=ia||ka?1:0);dr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=ia||Ta?1:0);let da=this.variableOffsets[dr.crossTileID];da&&this.markUsedJustification(y,da.anchor,dr,ta);let Fa=this.placedOrientations[dr.crossTileID];Fa&&(this.markUsedJustification(y,"left",dr,Fa),this.markUsedOrientation(y,Fa,dr))}if(Cr){let ua=wa(Or.icon),ia=!(Kt&&dr.verticalPlacedIconSymbolIndex&&ka);dr.placedIconSymbolIndex>=0&&(It(y.icon,dr.numIconVertices,ia?ua:pn),y.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Or.icon.isHidden()),dr.verticalPlacedIconSymbolIndex>=0&&(It(y.icon,dr.numVerticalIconVertices,ia?pn:ua),y.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Ra=Ut?.has(ir)?Ut.get(ir):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let ua=y.collisionArrays[ir];if(ua){let ia=new e.P(0,0);if(ua.textBox||ua.verticalTextBox){let ma=!0;if(ft){let da=this.variableOffsets[vr];da?(ia=ot(da.anchor,da.width,da.height,da.textOffset,da.textBoxScale),Dt&&ia._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):ma=!1}if(ua.textBox||ua.verticalTextBox){let da;ua.textBox&&(da=ka),ua.verticalTextBox&&(da=Ta),jt(y.textCollisionBox.collisionVertexArray,Or.text.placed,!ma||da,Ra.text,ia.x,ia.y)}}if(ua.iconBox||ua.verticalIconBox){let ma=!!(!Ta&&ua.verticalIconBox),da;ua.iconBox&&(da=ma),ua.verticalIconBox&&(da=!ma),jt(y.iconCollisionBox.collisionVertexArray,Or.icon.placed,da,Ra.icon,Kt?ia.x:0,Kt?ia.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),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.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function jt(pe,y,N,ie,fe,be){ie&&ie.length!==0||(ie=[0,0,0,0]);let Re=ie[0]-lt,je=ie[1]-lt,Ze=ie[2]-lt,ut=ie[3]-lt;pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,ut),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,ut)}let ar=Math.pow(2,25),Er=Math.pow(2,24),xr=Math.pow(2,17),zr=Math.pow(2,16),Lr=Math.pow(2,9),aa=Math.pow(2,8),Sa=Math.pow(2,1);function wa(pe){if(pe.opacity===0&&!pe.placed)return 0;if(pe.opacity===1&&pe.placed)return 4294967295;let y=pe.placed?1:0,N=Math.floor(127*pe.opacity);return N*ar+y*Er+N*xr+y*zr+N*Lr+y*aa+N*Sa+y}let pn=0;class tn{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,N,ie,fe,be){let Re=this._bucketParts;for(;this._currentTileIndexje.sortKey-Ze.sortKey));this._currentPartIndex!this._forceFullPlacement&&m()-fe>2;for(;this._currentPlacementIndex>=0;){let Re=N[y[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(e.aQ(Re)&&Re.layout&&(!Re.minzoom||Re.minzoom<=je)&&(!Re.maxzoom||Re.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new tn(Re)),this._inProgressLayer.continuePlacement(ie[Re.source],this.placement,this._showCollisionBoxes,Re,be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let rn=512/e.a6/2;class Ri{constructor(y,N,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let fe=new Map;for(let be=0;be({x:Math.floor(Ze.anchorX*rn),y:Math.floor(Ze.anchorY*rn)})),crossTileIDs:Re.map(Ze=>Ze.crossTileID)};if(je.positions.length>128){let Ze=new e.aR(je.positions.length,16,Uint16Array);for(let{x:ut,y:ft}of je.positions)Ze.add(ut,ft);Ze.finish(),delete je.positions,je.index=Ze}this._symbolsByKey[be]=je}}getScaledCoordinates(y,N){let{x:ie,y:fe,z:be}=this.tileID.canonical,{x:Re,y:je,z:Ze}=N.canonical,ut=rn/Math.pow(2,Ze-be),ft=(je*e.a6+y.anchorY)*ut,Dt=fe*e.a6*rn;return{x:Math.floor((Re*e.a6+y.anchorX)*ut-ie*e.a6*rn),y:Math.floor(ft-Dt)}}findMatches(y,N,ie){let fe=this.tileID.canonical.zy)}}class Gn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class no{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let N=Math.round((y-this.lng)/360);if(N!==0)for(let ie in this.indexes){let fe=this.indexes[ie],be={};for(let Re in fe){let je=fe[Re];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+N),be[je.tileID.key]=je}this.indexes[ie]=be}this.lng=y}addBucket(y,N,ie){var fe,be,Re;if(!((fe=this.indexes[y.overscaledZ])===null||fe===void 0)&&fe[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===N.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ze=0;Zey.overscaledZ)for(let ft in ut){let Dt=ut[ft];Dt.tileID.isChildOf(y)&&Dt.findMatches(N.symbolInstances,y,je)}else{let ft=ut[y.scaledTo(Number(Ze)).key];ft&&ft.findMatches(N.symbolInstances,y,je)}}for(let Ze=0;Ze850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),x&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=T);var I=z.split(", ");return I}}}),Jq=ze({"src/traces/scattermap/plot.js"(J,V){"use strict";var p=Nr(),b=Kq(),E=Av().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,n,r,a){this.type="scattermap",this.subplot=t,this.uid=n,this.clusterEnabled=r,this.isHidden=a,this.sourceIds={fill:"source-"+n+"-fill",line:"source-"+n+"-line",circle:"source-"+n+"-circle",symbol:"source-"+n+"-symbol",cluster:"source-"+n+"-circle",clusterCount:"source-"+n+"-circle"},this.layerIds={fill:E+n+"-fill",line:E+n+"-line",circle:E+n+"-circle",symbol:E+n+"-symbol",cluster:E+n+"-cluster",clusterCount:E+n+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,n,r){var a={type:"geojson",data:n.geojson};r&&r.enabled&&p.extendFlat(a,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(n.geojson):this.subplot.map.addSource(this.sourceIds[t],a)},e.setSourceData=function(t,n){this.subplot.map.getSource(this.sourceIds[t]).setData(n.geojson)},e.addLayer=function(t,n,r){var a={type:n.type,id:this.layerIds[t],source:this.sourceIds[t],layout:n.layout,paint:n.paint};n.filter&&(a.filter=n.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),m=0;m=0;x--){var z=A[x];o.removeLayer(v.layerIds[z])}u||o.removeSource(v.sourceIds.circle)}function w(u){for(var A=k.nonCluster,x=0;x=0;x--){var z=A[x];o.removeLayer(v.layerIds[z]),u||o.removeSource(v.sourceIds[z])}}function M(u){h?i(u):S(u)}function C(u){m?g(u):w(u)}function _(){for(var u=m?k.cluster:k.nonCluster,A=0;A=0;a--){var o=r[a];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},V.exports=function(n,r){var a=r[0].trace,o=a.cluster&&a.cluster.enabled,s=a.visible!==!0,c=new l(n,a.uid,o,s),m=b(n.gd,r),h=c.below=n.belowLookup["trace-"+a.uid],v,g,i;if(o)for(c.addSource("circle",m.circle,a.cluster),v=0;v=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),C=M*360,_=a-C;function T(B){var F=B.lonlat;if(F[0]===l||w&&g.indexOf(B.i+1)===-1)return 1/0;var P=b.modHalf(F[0],360),j=F[1],U=v.project([P,j]),$=U.x-m.c2p([_,j]),Q=U.y-h.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt($*$+Q*Q)-re,1-3/re)}if(p.getClosest(s,T,r),r.index!==!1){var f=s[r.index],u=f.lonlat,A=[b.modHalf(u[0],360)+C,u[1]],x=m.c2p(A),z=h.c2p(A),I=f.mrc||1;r.x0=x-I,r.x1=x+I,r.y0=z-I,r.y1=z+I;var O={};O[c.subplot]={_subplot:v};var D=c._module.formatLabels(f,c,O);return r.lonLabel=D.lonLabel,r.latLabel=D.latLabel,r.color=E(c,f),r.extraText=n(c,f,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function n(r,a,o){if(r.hovertemplate)return;var s=a.hi||r.hoverinfo,c=s.split("+"),m=c.indexOf("all")!==-1,h=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,g=a.lonlat,i=[];function w(S){return S+"\xB0"}return m||h&&v?i.push("("+w(g[1])+", "+w(g[0])+")"):h?i.push(o.lon+w(g[0])):v&&i.push(o.lat+w(g[1])),(m||c.indexOf("text")!==-1)&&k(a,r,i),i.join("
")}V.exports={hoverPoints:t,getExtraText:n}}}),Qq=ze({"src/traces/scattermap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b}}}),eV=ze({"src/traces/scattermap/select.js"(J,V){"use strict";var p=Nr(),b=el(),{BADNUM:E}=No();V.exports=function(l,e){var t;let{cd:n,xaxis:r,yaxis:a}=l,{trace:o}=n[0];if(!b.hasMarkers(o))return[];if(e===!1){for(let h of n)h.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,m=[];for(let h=0;h1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=n(o);let c,m;function h(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function v(){if(m==null&&(m=!1,h())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let W=0;W<5*5;W++){let te=4*W;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(W%5,Math.floor(W/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&L[W]!==W){m=!0;break}}}return m||!1}var g=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function w(){var R=new i(9);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function S(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function M(){var R=new i(3);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function C(R){var d=R[0],L=R[1],W=R[2];return Math.sqrt(d*d+L*L+W*W)}function _(R,d,L){var W=new i(3);return W[0]=R,W[1]=d,W[2]=L,W}function T(R,d,L){return R[0]=d[0]+L[0],R[1]=d[1]+L[1],R[2]=d[2]+L[2],R}function f(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R}function u(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[0],ge=L[1],Ce=L[2];return R[0]=te*Ce-ue*ge,R[1]=ue*me-W*Ce,R[2]=W*ge-te*me,R}var A,x=C;function z(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3];return R[0]=L[0]*W+L[4]*te+L[8]*ue+L[12]*me,R[1]=L[1]*W+L[5]*te+L[9]*ue+L[13]*me,R[2]=L[2]*W+L[6]*te+L[10]*ue+L[14]*me,R[3]=L[3]*W+L[7]*te+L[11]*ue+L[15]*me,R}function I(){var R=new i(4);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R[3]=1,R}function O(R,d,L,W){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",ue=Math.PI/360;d*=ue,W*=ue,L*=ue;var me=Math.sin(d),ge=Math.cos(d),Ce=Math.sin(L),Te=Math.cos(L),Oe=Math.sin(W),Pe=Math.cos(W);switch(te){case"xyz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"xzy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yxz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yzx":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zxy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zyx":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;default:throw new Error("Unknown angle order "+te)}return R}function D(){var R=new i(2);return i!=Float32Array&&(R[0]=0,R[1]=0),R}function B(R,d){var L=new i(2);return L[0]=R,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),w(),D();let F=8192;function P(R,d,L){return d*(F/(R.tileSize*Math.pow(2,L-R.tileID.overscaledZ)))}function j(R){return R instanceof Error?R:new Error(typeof R=="string"?R:String(R))}function U(R,d){return(R%d+d)%d}function $(R,d,L){return R*(1-L)+d*L}function Q(R){if(R<=0)return 0;if(R>=1)return 1;let d=R*R,L=d*R;return 4*(R<.5?L:3*(R-d)+L-.75)}function re(R,d,L,W){let te=new s(R,d,L,W);return ue=>te.solve(ue)}let ne=re(.25,.1,.25,1);function se(R,d,L){return Math.min(L,Math.max(d,R))}function G(R,d,L){let W=L-d,te=((R-d)%W+W)%W+d;return te===d?L:te}function X(R,...d){for(let L of d)for(let W in L)R[W]=L[W];return R}let K=1;function H(R,d,L){let W={};for(let te in R)W[te]=d.call(this,R[te],te,R);return W}function Y(R,d,L){let W={};for(let te in R)d.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?H(R,q):R}let Z={};function ee(R){Z[R]||(typeof console<"u"&&console.warn(R),Z[R]=!0)}function ae(R,d,L){return(L.y-R.y)*(d.x-R.x)>(d.y-R.y)*(L.x-R.x)}function he(R){return typeof WorkerGlobalScope<"u"&&R!==void 0&&R instanceof WorkerGlobalScope}let xe=null;function we(R){return typeof ImageBitmap<"u"&&R instanceof ImageBitmap}let Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Se(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ue=new VideoFrame(R,{timestamp:0});try{let me=ue?.format;if(!me||!me.startsWith("BGR")&&!me.startsWith("RGB"))throw new Error(`Unrecognized format ${me}`);let ge=me.startsWith("BGR"),Ce=new Uint8ClampedArray(W*te*4);if(yield ue.copyTo(Ce,function(Te,Oe,Pe,it,He){let bt=4*Math.max(-Oe,0),Et=(Math.max(0,Pe)-Pe)*it*4+bt,Qt=4*it,er=Math.max(0,Oe),br=Math.max(0,Pe);return{rect:{x:er,y:br,width:Math.min(Te.width,Oe+it)-er,height:Math.min(Te.height,Pe+He)-br},layout:[{offset:Et,stride:Qt}]}}(R,d,L,W,te)),ge)for(let Te=0;Te{R.removeEventListener(d,L,W)}}}function ke(R){return R*Math.PI/180}function _e(R){return R/Math.PI*180}let ce={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},le="AbortError";class Ae extends Error{constructor(d=le){super(d instanceof Error?d.message:d),this.name=le,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Be(R){return R instanceof Error&&R.name===le}function Xe(R){if(R.aborted)throw new Ae(R.reason)}let Ye={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function yt(R){return Ye.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf("://"))]}let gt="global-dispatcher";class Tt extends Error{constructor(d,L,W,te){super(`AJAXError: ${L} (${d}): ${W}`),this.status=d,this.statusText=L,this.url=W,this.body=te}}let At=()=>{var R;return he(self)?(R=self.worker)===null||R===void 0?void 0:R.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},$t=function(R,d){return e(this,void 0,void 0,function*(){var L,W;if(R.url.includes("://")&&!/^https?:|^file:/.test(R.url)){let te=yt(R.url);if(te){let ue=yield te(R,d);return ue.data||R.type!=="arrayBuffer"?ue:X(ue,{data:new ArrayBuffer(0)})}if(he(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:gt},d)}if(!(te=>{var ue;return te.startsWith("file:")||((ue=At())===null||ue===void 0?void 0:ue.startsWith("file:"))&&!/^\w+:/.test(te)})(R.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,ue){return e(this,void 0,void 0,function*(){let me=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:ue.signal}),ge,Ce;te.type!=="json"||me.headers.has("Accept")||me.headers.set("Accept","application/json");try{ge=yield fetch(me)}catch(Oe){throw Be(Oe)?Oe:new Tt(0,j(Oe).message,te.url,new Blob)}if(!ge.ok){let Oe=yield ge.blob();throw new Tt(ge.status,ge.statusText,te.url,Oe)}Ce=te.type==="arrayBuffer"||te.type==="image"?ge.arrayBuffer():te.type==="json"?ge.json():ge.text();let Te=yield Ce;return Xe(ue.signal),{data:Te,cacheControl:ge.headers.get("Cache-Control"),expires:ge.headers.get("Expires"),etag:ge.headers.get("ETag")}})}(R,d);if(he(self)&&(!((W=self.worker)===null||W===void 0)&&W.actor))return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:gt},d)}return function(te,ue){return new Promise((me,ge)=>{var Ce;let Te=new XMLHttpRequest;Te.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(Te.responseType="arraybuffer");for(let Oe in te.headers)Te.setRequestHeader(Oe,te.headers[Oe]);te.type==="json"&&(Te.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||Te.setRequestHeader("Accept","application/json")),Te.withCredentials=te.credentials==="include",Te.onerror=()=>{ge(new Error(Te.statusText))},Te.onload=()=>{if(!ue.signal.aborted)if((Te.status>=200&&Te.status<300||Te.status===0)&&Te.response!==null){let Oe=Te.response;if(te.type==="json")try{Oe=JSON.parse(Te.response)}catch(Pe){return void ge(Pe)}me({data:Oe,cacheControl:Te.getResponseHeader("Cache-Control"),expires:Te.getResponseHeader("Expires"),etag:Te.getResponseHeader("ETag")})}else{let Oe=new Blob([Te.response],{type:Te.getResponseHeader("Content-Type")});ge(new Tt(Te.status,Te.statusText,te.url,Oe))}},ue.signal.addEventListener("abort",()=>{Te.abort(),ge(new Ae(ue.signal.reason))}),Te.send(te.body)})}(R,d)})};function rr(R){if(!R||R.indexOf("://")<=0||R.startsWith("data:image/")||R.startsWith("blob:"))return!0;let d=new URL(R),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(R,d,L){var W;!((W=L[R])===null||W===void 0)&&W.includes(d)||(L[R]||(L[R]=[]),L[R].push(d))}function Xt(R,d,L){if(L?.[R]){let W=L[R].indexOf(d);W!==-1&&L[R].splice(W,1)}}class or{constructor(d,L={}){X(this,L),this.type=d}}class Ot extends or{constructor(d,L={}){super("error",X({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Xt(d,L,this._listeners),Xt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(W=>this.once(d,W))}fire(d,L){var W,te;typeof d=="string"&&(d=new or(d,L||{}));let ue=d.type;if(this.listens(ue)){d.target=this;let me=!((W=this._listeners)===null||W===void 0)&&W[ue]?this._listeners[ue].slice():[];for(let Te of me)Te.call(this,d);let ge=!((te=this._oneTimeListeners)===null||te===void 0)&&te[ue]?this._oneTimeListeners[ue].slice():[];for(let Te of ge)Xt(ue,Te,this._oneTimeListeners),Te.call(this,d);let Ce=this._eventedParent;Ce&&(X(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,W,te,ue,me;return((W=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||W===void 0?void 0:W.length)>0||((ue=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||ue===void 0?void 0:ue.length)>0||((me=this._eventedParent)===null||me===void 0?void 0:me.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},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},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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:"filter"},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:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:"expression_name",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:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","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","feature"]},"property-type":"cross-faded-data-driven"},"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"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let De=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ne(R,d){let L={};for(let W in R)W!=="ref"&&(L[W]=R[W]);return De.forEach(W=>{W in d&&(L[W]=d[W])}),L}function We(R,d){if(Array.isArray(R)){if(!Array.isArray(d)||R.length!==d.length)return!1;for(let L=0;L`:R.itemType.kind==="value"?"array":`array<${d}>`}return R.kind}let li=[Yt,Rt,nr,ur,cr,Rr,Pa,Qr,yn(Zr),La,Xa,un,ja,Nn];function Yn(R,d){if(d.kind==="error")return null;if(R.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!Yn(R.itemType,d.itemType))&&(typeof R.N!="number"||R.N===d.N))return null}else{if(R.kind===d.kind)return null;if(R.kind==="value"){for(let L of li)if(!Yn(L,d))return null}}return`Expected ${Un(R)} but found ${Un(d)} instead.`}function on(R,d){return d.some(L=>L.kind===R.kind)}function en(R,d){return d.some(L=>L==="null"?R===null:L==="array"?Array.isArray(R):L==="object"?R&&!Array.isArray(R)&&typeof R=="object":L===typeof R)}function vi(R,d){return R.kind==="array"&&d.kind==="array"?R.itemType.kind===d.itemType.kind&&typeof R.N=="number":R.kind===d.kind}let Yi=.96422,Ja=.82521,Oa=4/29,lt=6/29,rt=3*lt*lt,fr=lt*lt*lt,lr=Math.PI/180,Tr=180/Math.PI;function Ir(R){return(R%=360)<0&&(R+=360),R}function Dr([R,d,L,W]){let te,ue,me=kt((.2225045*(R=ot(R))+.7168786*(d=ot(d))+.0606169*(L=ot(L)))/1);R===d&&d===L?te=ue=me:(te=kt((.4360747*R+.3850649*d+.1430804*L)/Yi),ue=kt((.0139322*R+.0971045*d+.7141733*L)/Ja));let ge=116*me-16;return[ge<0?0:ge,500*(te-me),200*(me-ue),W]}function ot(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function kt(R){return R>fr?Math.pow(R,1/3):R/rt+Oa}function jt([R,d,L,W]){let te=(R+16)/116,ue=isNaN(d)?te:te+d/500,me=isNaN(L)?te:te-L/200;return te=1*Er(te),ue=Yi*Er(ue),me=Ja*Er(me),[ar(3.1338561*ue-1.6168667*te-.4906146*me),ar(-.9787684*ue+1.9161415*te+.033454*me),ar(.0719453*ue-.2289914*te+1.4052427*me),W]}function ar(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Er(R){return R>lt?R*R*R:rt*(R-Oa)}let xr=Object.hasOwn||function(R,d){return Object.prototype.hasOwnProperty.call(R,d)};function zr(R,d){return xr(R,d)?R[d]:void 0}function Lr(R){return parseInt(R.padEnd(2,R),16)/255}function aa(R,d){return Sa(d?R/100:R,0,1)}function Sa(R,d,L){return Math.min(Math.max(d,R),L)}function wa(R){return!R.some(Number.isNaN)}let pn={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]};function tn(R,d,L){return R+L*(d-R)}function ai(R,d,L){return R.map((W,te)=>tn(W,d[te],L))}class rn{constructor(d,L,W,te=1,ue=!0){this.r=d,this.g=L,this.b=W,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,W,te]))}static parse(d){if(d instanceof rn)return d;if(typeof d!="string")return;let L=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=zr(pn,W);if(te){let[me,ge,Ce]=te;return[me/255,ge/255,Ce/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let me=W.length<6?1:2,ge=1;return[Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+me)||"ff")]}if(W.startsWith("rgb")){let me=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(me){let[ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br]=me,sr=[Oe||" ",He||" ",Qt].join("");if(sr===" "||sr===" /"||sr===",,"||sr===",,,"){let Mr=[Te,it,Et].join(""),qr=Mr==="%%%"?100:Mr===""?255:0;if(qr){let $r=[Sa(+Ce/qr,0,1),Sa(+Pe/qr,0,1),Sa(+bt/qr,0,1),er?aa(+er,br):1];if(wa($r))return $r}}return}}let ue=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[me,ge,Ce,Te,Oe,Pe,it,He,bt]=ue,Et=[Ce||" ",Oe||" ",it].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let Qt=[+ge,Sa(+Te,0,100),Sa(+Pe,0,100),He?aa(+He,bt):1];if(wa(Qt))return function([er,br,sr,Mr]){function qr($r){let _a=($r+er/30)%12,Ca=br*Math.min(sr,1-sr);return sr-Ca*Math.max(-1,Math.min(_a-3,9-_a,1))}return er=Ir(er),br/=100,sr/=100,[qr(0),qr(8),qr(4),Mr]}(Qt)}}}(d);return L?new rn(...L,!1):void 0}get rgb(){let{r:d,g:L,b:W,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[d/ue,L/ue,W/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,W,te,ue]=Dr(d),me=Math.sqrt(W*W+te*te);return[Math.round(1e4*me)?Ir(Math.atan2(te,W)*Tr):NaN,me,L,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Dr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,W,te]=this.rgb;return`rgba(${[d,L,W].map(ue=>Math.round(255*ue)).join(",")},${te})`}static interpolate(d,L,W,te="rgb"){switch(te){case"rgb":{let[ue,me,ge,Ce]=ai(d.rgb,L.rgb,W);return new rn(ue,me,ge,Ce,!1)}case"hcl":{let[ue,me,ge,Ce]=d.hcl,[Te,Oe,Pe,it]=L.hcl,He,bt;if(isNaN(ue)||isNaN(Te))isNaN(ue)?isNaN(Te)?He=NaN:(He=Te,ge!==1&&ge!==0||(bt=Oe)):(He=ue,Pe!==1&&Pe!==0||(bt=me));else{let sr=Te-ue;Te>ue&&sr>180?sr-=360:Te180&&(sr+=360),He=ue+W*sr}let[Et,Qt,er,br]=function([sr,Mr,qr,$r]){return sr=isNaN(sr)?0:sr*lr,jt([qr,Math.cos(sr)*Mr,Math.sin(sr)*Mr,$r])}([He,bt??tn(me,Oe,W),tn(ge,Pe,W),tn(Ce,it,W)]);return new rn(Et,Qt,er,br,!1)}case"lab":{let[ue,me,ge,Ce]=jt(ai(d.lab,L.lab,W));return new rn(ue,me,ge,Ce,!1)}}}}rn.black=new rn(0,0,0,1),rn.white=new rn(1,1,1,1),rn.transparent=new rn(0,0,0,0),rn.red=new rn(1,0,0,1);class Ri{constructor(d,L,W){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let Gn=["bottom","center","top"];class no{constructor(d,L,W,te,ue,me){this.text=d,this.image=L,this.scale=W,this.fontStack=te,this.textColor=ue,this.verticalAlign=me}}class Di{constructor(d){this.sections=d}static fromString(d){return new Di([new no(d,null,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 Di?d:Di.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class fn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof fn)return d;if(typeof d=="number")return new fn([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="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 fn(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new fn(ai(d.values,L.values,W))}}class Ai{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Ai)return d;if(typeof d=="number")return new Ai([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Ai(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Ai(ai(d.values,L.values,W))}}class jn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof jn)return d;if(typeof d=="string"){let W=rn.parse(d);return W?new jn([W]):void 0}if(!Array.isArray(d))return;let L=[];for(let W of d){if(typeof W!="string")return;let te=rn.parse(W);if(!te)return;L.push(te)}return new jn(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W,te="rgb"){let ue=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let me=0;me=0&&R<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,d,L,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,d,L,W]:[R,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Vn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof io||R instanceof rn||R instanceof Ri||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi)return!0;if(Array.isArray(R)){for(let d of R)if(!Vn(d))return!1;return!0}if(typeof R=="object"){for(let d in R)if(!Vn(R[d]))return!1;return!0}return!1}function qn(R){if(R===null)return Yt;if(typeof R=="string")return nr;if(typeof R=="boolean")return ur;if(typeof R=="number")return Rt;if(R instanceof rn)return cr;if(R instanceof io)return Rr;if(R instanceof Ri)return ha;if(R instanceof Di)return Pa;if(R instanceof fn)return La;if(R instanceof Ai)return Xa;if(R instanceof jn)return un;if(R instanceof gi)return Nn;if(R instanceof qi)return ja;if(Array.isArray(R)){let d=R.length,L;for(let W of R){let te=qn(W);if(L){if(L===te)continue;L=Zr;break}L=te}return yn(L||Zr,d)}return Qr}function Hi(R){let d=typeof R;return R===null?"":d==="string"||d==="number"||d==="boolean"?String(R):R instanceof rn||R instanceof io||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi?R.toString():JSON.stringify(R)}class Mi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!Vn(d[1]))return L.error("invalid value");let W=d[1],te=qn(W),ue=L.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new Mi(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ro={string:nr,number:Rt,boolean:ur,object:Qr};class go{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W,te=1,ue=d[0];if(ue==="array"){let ge,Ce;if(d.length>2){let Te=d[1];if(typeof Te!="string"||!(Te in Ro)||Te==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);ge=Ro[Te],te++}else ge=Zr;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}W=yn(ge,Ce)}else{if(!Ro[ue])throw new Error(`Types doesn't contain name = ${ue}`);W=Ro[ue]}let me=[];for(;ted.outputDefined())}}let Eo={"to-boolean":ur,"to-color":cr,"to-number":Rt,"to-string":nr};class Ao{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[0];if(!Eo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=Eo[W],ue=[];for(let me=1;me4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:oo(L[0],L[1],L[2],L[3]),!W))return new rn(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new Xn(W||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let W of this.args){L=W.evaluate(d);let te=fn.parse(L);if(te)return te}throw new Xn(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=Ai.parse(L);if(te)return te}throw new Xn(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=jn.parse(L);if(te)return te}throw new Xn(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let W of this.args){L=W.evaluate(d);let te=gi.parse(L);if(te)return te}throw new Xn(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let W of this.args){if(L=W.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new Xn(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return Di.fromString(Hi(this.args[0].evaluate(d)));case"resolvedImage":return qi.fromString(Hi(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return Hi(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ds=["Unknown","Point","LineString","Polygon"];class jo{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,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"?ds[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 L=this._parseColorCache.get(d);return L||(L=rn.parse(d),this._parseColorCache.set(d,L)),L}}class Wo{constructor(d,L,W=[],te,ue=new Kr,me=[]){this.registry=d,this.path=W,this.key=W.map(ge=>`[${ge}]`).join(""),this.scope=ue,this.errors=me,this.expectedType=te,this._isConstant=L}parse(d,L,W,te,ue={}){return L?this.concat(L,W,te)._parse(d,ue):this._parse(d,ue)}_parse(d,L){function W(te,ue,me){return me==="assert"?new go(ue,[te]):me==="coerce"?new Ao(ue,[te]):te}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 te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let me=ue.parse(d,this);if(!me)return null;if(this.expectedType){let ge=this.expectedType,Ce=me.type;if(ge.kind!=="string"&&ge.kind!=="number"&&ge.kind!=="boolean"&&ge.kind!=="object"&&ge.kind!=="array"||Ce.kind!=="value"){if(ge.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(ge.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(ge.kind)&&["value","number","array"].includes(Ce.kind)||ge.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||ge.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))me=W(me,ge,L.typeAnnotation||"coerce");else if(this.checkSubtype(ge,Ce))return null}else me=W(me,ge,L.typeAnnotation||"assert")}if(!(me instanceof Mi)&&me.type.kind!=="resolvedImage"&&this._isConstant(me)){let ge=new jo;try{me=new Mi(me.type,me.evaluate(ge))}catch(Ce){return this.error(Ce.message),null}}return me}return this.error(`Unknown expression "${te}". 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,L,W){let te=typeof d=="number"?this.path.concat(d):this.path,ue=W?this.scope.concat(W):this.scope;return new Wo(this.registry,this._isConstant,te,L||null,ue,this.errors)}error(d,...L){let W=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(W,d))}checkSubtype(d,L){let W=Yn(d,L);return W&&this.error(W),W}}class to{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let W=[];for(let ue=1;ue=W.length)throw new Xn(`Array index out of bounds: ${L} > ${W.length-1}.`);if(L!==Math.floor(L))throw new Xn(`Array index must be an integer, but found ${L} instead.`);return W[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class Vi{constructor(d,L){this.type=ur,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);return W&&te?on(W.type,[ur,nr,Rt,Yt,Zr])?new Vi(W,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!W)return!1;if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);if(!en(W,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`);return W.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Io{constructor(d,L,W){this.type=Rt,this.needle=d,this.haystack=L,this.fromIndex=W}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);if(!W||!te)return null;if(!on(W.type,[ur,nr,Rt,Yt,Zr]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Io(W,te,ue):null}return new Io(W,te)}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),en(W,["string"])){let ue=W.indexOf(L,te);return ue===-1?-1:[...W.slice(0,ue)].length}if(en(W,["array"]))return W.indexOf(L,te);throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class Xi{constructor(d,L,W,te,ue,me){this.inputType=d,this.type=L,this.input=W,this.cases=te,this.outputs=ue,this.otherwise=me}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let W,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let ue={},me=[];for(let Te=2;TeNumber.MAX_SAFE_INTEGER)return it.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return it.error("Numeric branch labels must be integer values.");if(W){if(it.checkSubtype(W,qn(bt)))return null}else W=qn(bt);if(ue[String(bt)]!==void 0)return it.error("Branch labels must be unique.");ue[String(bt)]=me.length}let He=L.parse(Pe,Te,te);if(!He)return null;te=te||He.type,me.push(He)}let ge=L.parse(d[1],1,Zr);if(!ge)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?ge.type.kind!=="value"&&L.concat(1).checkSubtype(W,ge.type)?null:new Xi(W,te,ge,ue,me,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(qn(L)===this.inputType&&this.outputs[this.cases[L]]||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 Ko{constructor(d,L,W){this.type=d,this.branches=L,this.otherwise=W}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let W;L.expectedType&&L.expectedType.kind!=="value"&&(W=L.expectedType);let te=[];for(let me=1;meL.outputDefined())&&this.otherwise.outputDefined()}}class Uo{constructor(d,L,W,te){this.type=d,this.input=L,this.beginIndex=W,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Rt);if(!W||!te)return null;if(!on(W.type,[yn(Zr),nr,Zr]))return L.error(`Expected first argument to be of type array or string, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Uo(W.type,W,te,ue):null}return new Uo(W.type,W,te)}evaluate(d){let L=this.input.evaluate(d),W=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),en(L,["string"]))return[...L].slice(W,te).join("");if(en(L,["array"]))return L.slice(W,te);throw new Xn(`Expected first argument to be of type array or string, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function Ls(R,d){let L=R.length-1,W,te,ue=0,me=L,ge=0;for(;ue<=me;)if(ge=Math.floor((ue+me)/2),W=R[ge],te=R[ge+1],W<=d){if(ge===L||dd))throw new Xn("Input is not a number.");me=ge-1}return 0}class Ss{constructor(d,L,W){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,ue]of W)this.labels.push(te),this.outputs.push(ue)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=[],ue=null;L.expectedType&&L.expectedType.kind!=="value"&&(ue=L.expectedType);for(let me=1;me=ge)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Te);let Pe=L.parse(Ce,Oe,ue);if(!Pe)return null;ue=ue||Pe.type,te.push([ge,Pe])}return new Ss(ue,W,te)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;return te>=L[ue-1]?W[ue-1].evaluate(d):W[Ls(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Vo(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var Vs,Ts,Bo=function(){if(Ts)return Vs;function R(d,L,W,te){this.cx=3*d,this.bx=3*(W-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=W,this.p2y=te}return Ts=1,Vs=R,R.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Vs}(),_o=Vo(Bo);class Pi{constructor(d,L,W,te,ue){this.type=d,this.operator=L,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[me,ge]of ue)this.labels.push(me),this.outputs.push(ge)}static interpolationFactor(d,L,W,te){let ue=0;if(d.name==="exponential")ue=yo(L,d.base,W,te);else if(d.name==="linear")ue=yo(L,1,W,te);else if(d.name==="cubic-bezier"){let me=d.controlPoints;ue=new _o(me[0],me[1],me[2],me[3]).solve(yo(L,1,W,te))}return ue}static parse(d,L){let[W,te,ue,...me]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let Te=te[1];if(typeof Te!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:Te}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let Te=te.slice(1);if(Te.length!==4||Te.some(Oe=>typeof Oe!="number"||Oe<0||Oe>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:Te}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(ue=L.parse(ue,2,Rt),!ue)return null;let ge=[],Ce=null;W!=="interpolate-hcl"&&W!=="interpolate-lab"||L.expectedType==un?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=cr;for(let Te=0;Te=Oe)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',it);let bt=L.parse(Pe,He,Ce);if(!bt)return null;Ce=Ce||bt.type,ge.push([Oe,bt])}return vi(Ce,Rt)||vi(Ce,Rr)||vi(Ce,cr)||vi(Ce,La)||vi(Ce,Xa)||vi(Ce,un)||vi(Ce,Nn)||vi(Ce,yn(Rt))?new Pi(Ce,W,te,ue,ge):L.error(`Type ${Un(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;if(te>=L[ue-1])return W[ue-1].evaluate(d);let me=Ls(L,te),ge=Pi.interpolationFactor(this.interpolation,te,L[me],L[me+1]),Ce=W[me].evaluate(d),Te=W[me+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return tn(Ce,Te,ge);case"color":return rn.interpolate(Ce,Te,ge);case"padding":return fn.interpolate(Ce,Te,ge);case"colorArray":return jn.interpolate(Ce,Te,ge);case"numberArray":return Ai.interpolate(Ce,Te,ge);case"variableAnchorOffsetCollection":return gi.interpolate(Ce,Te,ge);case"array":return ai(Ce,Te,ge);case"projectionDefinition":return io.interpolate(Ce,Te,ge)}case"interpolate-hcl":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"hcl");case"colorArray":return jn.interpolate(Ce,Te,ge,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"lab");case"colorArray":return jn.interpolate(Ce,Te,ge,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function yo(R,d,L,W){let te=W-L,ue=R-L;return te===0?0:d===1?ue/te:(Math.pow(d,ue)-1)/(Math.pow(d,te)-1)}let bs={color:rn.interpolate,number:tn,padding:fn.interpolate,numberArray:Ai.interpolate,colorArray:jn.interpolate,variableAnchorOffsetCollection:gi.interpolate,array:ai};class Dl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=null,te=L.expectedType;te&&te.kind!=="value"&&(W=te);let ue=[];for(let ge of d.slice(1)){let Ce=L.parse(ge,1+ue.length,W,void 0,{typeAnnotation:"omit"});if(!Ce)return null;W=W||Ce.type,ue.push(Ce)}if(!W)throw new Error("No output type");let me=te&&ue.some(ge=>Yn(te,ge.type));return new Dl(me?Zr:W,ue)}evaluate(d){let L,W=null,te=0;for(let ue of this.args)if(te++,W=ue.evaluate(d),W&&W instanceof qi&&!W.available&&(L||(L=W.name),W=null,te===this.args.length&&(W=L)),W!==null)break;return W}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function hl(R,d){return R==="=="||R==="!="?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 ps(R,d,L,W){return W.compare(d,L)===0}function dl(R,d,L){let W=R!=="=="&&R!=="!=";return class ER{constructor(ue,me,ge){this.type=ur,this.lhs=ue,this.rhs=me,this.collator=ge,this.hasUntypedArgument=ue.type.kind==="value"||me.type.kind==="value"}static parse(ue,me){if(ue.length!==3&&ue.length!==4)return me.error("Expected two or three arguments.");let ge=ue[0],Ce=me.parse(ue[1],1,Zr);if(!Ce)return null;if(!hl(ge,Ce.type))return me.concat(1).error(`"${ge}" comparisons are not supported for type '${Un(Ce.type)}'.`);let Te=me.parse(ue[2],2,Zr);if(!Te)return null;if(!hl(ge,Te.type))return me.concat(2).error(`"${ge}" comparisons are not supported for type '${Un(Te.type)}'.`);if(Ce.type.kind!==Te.type.kind&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error(`Cannot compare types '${Un(Ce.type)}' and '${Un(Te.type)}'.`);W&&(Ce.type.kind==="value"&&Te.type.kind!=="value"?Ce=new go(Te.type,[Ce]):Ce.type.kind!=="value"&&Te.type.kind==="value"&&(Te=new go(Ce.type,[Te])));let Oe=null;if(ue.length===4){if(Ce.type.kind!=="string"&&Te.type.kind!=="string"&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error("Cannot use collator to compare non-string types.");if(Oe=me.parse(ue[3],3,ha),!Oe)return null}return new ER(Ce,Te,Oe)}evaluate(ue){let me=this.lhs.evaluate(ue),ge=this.rhs.evaluate(ue);if(W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!==Te.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new Xn(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ce.kind}, ${Te.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!=="string"||Te.kind!=="string")return d(ue,me,ge)}return this.collator?L(ue,me,ge,this.collator.evaluate(ue)):d(ue,me,ge)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let wu=dl("==",function(R,d,L){return d===L},ps),lu=dl("!=",function(R,d,L){return d!==L},function(R,d,L,W){return!ps(0,d,L,W)}),xc=dl("<",function(R,d,L){return d",function(R,d,L){return d>L},function(R,d,L,W){return W.compare(d,L)>0}),pl=dl("<=",function(R,d,L){return d<=L},function(R,d,L,W){return W.compare(d,L)<=0}),$u=dl(">=",function(R,d,L){return d>=L},function(R,d,L,W){return W.compare(d,L)>=0});class uu{constructor(d,L,W){this.type=ha,this.locale=W,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let W=d[1];if(typeof W!="object"||Array.isArray(W))return L.error("Collator options argument must be an object.");let te=L.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,ur);if(!te)return null;let ue=L.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,ur);if(!ue)return null;let me=null;return W.locale&&(me=L.parse(W.locale,1,nr),!me)?null:new uu(te,ue,me)}evaluate(d){return new Ri(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 tl{constructor(d,L,W,te,ue,me){this.type=nr,this.number=d,this.locale=L,this.currency=W,this.unit=te,this.minFractionDigits=ue,this.maxFractionDigits=me}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=L.parse(te.locale,1,nr),!ue))return null;let me=null;if(te.currency&&(me=L.parse(te.currency,1,nr),!me))return null;let ge=null;if(te.unit&&(ge=L.parse(te.unit,1,nr),!ge))return null;if(me&&ge)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,Rt),!Ce))return null;let Te=null;return te["max-fraction-digits"]&&(Te=L.parse(te["max-fraction-digits"],1,Rt),!Te)?null:new tl(W,ue,me,ge,Ce,Te)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.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.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class vs{constructor(d){this.type=Pa,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[1];if(!Array.isArray(W)&&typeof W=="object")return L.error("First argument must be an image or text section.");let te=[],ue=!1;for(let me=1;me<=d.length-1;++me){let ge=d[me];if(ue&&typeof ge=="object"&&!Array.isArray(ge)){ue=!1;let Ce=null;if(ge["font-scale"]&&(Ce=L.parse(ge["font-scale"],1,Rt),!Ce))return null;let Te=null;if(ge["text-font"]&&(Te=L.parse(ge["text-font"],1,yn(nr)),!Te))return null;let Oe=null;if(ge["text-color"]&&(Oe=L.parse(ge["text-color"],1,cr),!Oe))return null;let Pe=null;if(ge["vertical-align"]){if(typeof ge["vertical-align"]=="string"&&!Gn.includes(ge["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${ge["vertical-align"]}' instead.`);if(Pe=L.parse(ge["vertical-align"],1,nr),!Pe)return null}let it=te[te.length-1];it.scale=Ce,it.font=Te,it.textColor=Oe,it.verticalAlign=Pe}else{let Ce=L.parse(d[me],1,Zr);if(!Ce)return null;let Te=Ce.type.kind;if(Te!=="string"&&Te!=="value"&&Te!=="null"&&Te!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new vs(te)}evaluate(d){return new Di(this.sections.map(L=>{let W=L.content.evaluate(d);return qn(W)===ja?new no("",W,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new no(Hi(W),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class os{constructor(d){this.type=ja,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let W=L.parse(d[1],1,nr);return W?new os(W):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),W=qi.fromString(L);return W&&d.availableImages&&(W.available=d.availableImages.indexOf(L)>-1),W}eachChild(d){d(this.input)}outputDefined(){return!1}}class ms{constructor(d){this.type=Rt,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=L.parse(d[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${Un(W.type)} instead.`):new ms(W):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new Xn(`Expected value to be of type string or array, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let rl=8192;function Fu(R,d){let L=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*rl),Math.round(W*te*rl)]}function zu(R,d){let L=Math.pow(2,d.z);return[(te=(R[0]/rl+d.x)/L,360*te-180),(W=(R[1]/rl+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Ku(R,d){R[0]=Math.min(R[0],d[0]),R[1]=Math.min(R[1],d[1]),R[2]=Math.max(R[2],d[0]),R[3]=Math.max(R[3],d[1])}function bc(R,d){return!(R[0]<=d[0]||R[2]>=d[2]||R[1]<=d[1]||R[3]>=d[3])}function Lh(R,d,L){let W=R[0]-d[0],te=R[1]-d[1],ue=R[0]-L[0],me=R[1]-L[1];return W*me-ue*te==0&&W*ue<=0&&te*me<=0}function rh(R,d,L,W){return(te=[W[0]-L[0],W[1]-L[1]])[0]*(ue=[d[0]-R[0],d[1]-R[1]])[1]-te[1]*ue[0]!=0&&!(!Nf(R,d,L,W)||!Nf(L,W,R,d));var te,ue}function Ju(R,d,L){for(let W of L)for(let te=0;te(te=R)[1]!=(me=ge[Ce+1])[1]>te[1]&&te[0]<(me[0]-ue[0])*(te[1]-ue[1])/(me[1]-ue[1])+ue[0]&&(W=!W)}var te,ue,me;return W}function ah(R,d){for(let L of d)if(ss(R,L))return!0;return!1}function wc(R,d){for(let L of R)if(!ss(L,d))return!1;for(let L=0;L0&&ge<0||me<0&&ge>0}function Bu(R,d,L){let W=[];for(let te=0;teL[2]){let te=.5*W,ue=R[0]-L[0]>te?-W:L[0]-R[0]>te?W:0;ue===0&&(ue=R[0]-L[2]>te?-W:L[2]-R[0]>te?W:0),R[0]+=ue}Ku(d,R)}function Gc(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let ge of R)for(let Ce of ge){let Te=[Ce.x+ue[0],Ce.y+ue[1]];Ou(Te,d,L,te),me.push(Te)}return me}function pf(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let Ce of R){let Te=[];for(let Oe of Ce){let Pe=[Oe.x+ue[0],Oe.y+ue[1]];Ku(d,Pe),Te.push(Pe)}me.push(Te)}if(d[2]-d[0]<=te/2){(ge=d)[0]=ge[1]=1/0,ge[2]=ge[3]=-1/0;for(let Ce of me)for(let Te of Ce)Ou(Te,d,L,te)}var ge;return me}class $l{constructor(d,L){this.type=ur,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection"){let te=[];for(let ue of W.features){let{type:me,coordinates:ge}=ue.geometry;me==="Polygon"&&te.push(ge),me==="MultiPolygon"&&te.push(...ge)}if(te.length)return new $l(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new $l(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new $l(W,W)}return L.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(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ss(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ah(Te,ge))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!wc(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!pc(Te,ge))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let jf=class{constructor(R=[],d=(L,W)=>LW?1:0){if(this.data=R,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:d,compare:L}=this,W=d[R];for(;R>0;){let te=R-1>>1,ue=d[te];if(L(W,ue)>=0)break;d[R]=ue,R=te}d[R]=W}_down(R){let{data:d,compare:L}=this,W=this.length>>1,te=d[R];for(;R=0)break;d[R]=d[ue],R=ue}d[R]=te}};function Hc(R,d,L=0,W=R.length-1,te=Qu){for(;W>L;){if(W-L>600){let Ce=W-L+1,Te=d-L+1,Oe=Math.log(Ce),Pe=.5*Math.exp(2*Oe/3),it=.5*Math.sqrt(Oe*Pe*(Ce-Pe)/Ce)*(Te-Ce/2<0?-1:1);Hc(R,d,Math.max(L,Math.floor(d-Te*Pe/Ce+it)),Math.min(W,Math.floor(d+(Ce-Te)*Pe/Ce+it)),te)}let ue=R[d],me=L,ge=W;for(Wc(R,L,d),te(R[W],ue)>0&&Wc(R,L,W);me0;)ge--}te(R[L],ue)===0?Wc(R,L,ge):(ge++,Wc(R,ge,W)),ge<=d&&(L=ge+1),d<=ge&&(W=ge-1)}}function Wc(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function Qu(R,d){return Rd?1:0}function Yc(R,d){if(R.length<=1)return[R];let L=[],W,te;for(let ue of R){let me=Uf(ue);me!==0&&(ue.area=Math.abs(me),te===void 0&&(te=me<0),te===me<0?(W&&L.push(W),W=[ue]):W.push(ue))}if(W&&L.push(W),d>1)for(let ue=0;ue1?(Te=d[Ce+1][0],Oe=d[Ce+1][1]):He>0&&(Te+=Pe/this.kx*He,Oe+=it/this.ky*He)),Pe=this.wrap(L[0]-Te)*this.kx,it=(L[1]-Oe)*this.ky;let bt=Pe*Pe+it*it;bt180;)d-=360;return d}}function Zc(R,d){return d[0]-R[0]}function ec(R){return R[1]-R[0]+1}function cu(R,d){return R[1]>=R[0]&&R[1]R[1])return[null,null];let L=ec(R);if(d){if(L===2)return[R,null];let te=Math.floor(L/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(L===1)return[R,null];let W=Math.floor(L/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function vf(R,d){if(!cu(d,R.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let W=d[0];W<=d[1];++W)Ku(L,R[W]);return L}function Tu(R){let d=[1/0,1/0,-1/0,-1/0];for(let L of R)for(let W of L)Ku(d,W);return d}function nh(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function vl(R,d,L){if(!nh(R)||!nh(d))return NaN;let W=0,te=0;return R[2]d[2]&&(W=R[0]-d[2]),R[1]>d[3]&&(te=R[1]-d[3]),R[3]=W)return W;if(bc(te,ue)){if(mf(R,d))return 0}else if(mf(d,R))return 0;let me=1/0;for(let ge of R)for(let Ce=0,Te=ge.length,Oe=Te-1;Ce0;){let Ce=me.pop();if(Ce[0]>=ue)continue;let Te=Ce[1],Oe=d?50:100;if(ec(Te)<=Oe){if(!cu(Te,R.length))return NaN;if(d){let Pe=Mc(R,Te,L,W);if(isNaN(Pe)||Pe===0)return Pe;ue=Math.min(ue,Pe)}else for(let Pe=Te[0];Pe<=Te[1];++Pe){let it=ac(R[Pe],L,W);if(ue=Math.min(ue,it),ue===0)return 0}}else{let Pe=tc(Te,d);ih(me,ue,W,R,ge,Pe[0]),ih(me,ue,W,R,ge,Pe[1])}}return ue}function El(R,d,L,W,te,ue=1/0){let me=Math.min(ue,te.distance(R[0],L[0]));if(me===0)return me;let ge=new jf([[0,[0,R.length-1],[0,L.length-1]]],Zc);for(;ge.length>0;){let Ce=ge.pop();if(Ce[0]>=me)continue;let Te=Ce[1],Oe=Ce[2],Pe=d?50:100,it=W?50:100;if(ec(Te)<=Pe&&ec(Oe)<=it){if(!cu(Te,R.length)&&cu(Oe,L.length))return NaN;let He;if(d&&W)He=yl(R,Te,L,Oe,te),me=Math.min(me,He);else if(d&&!W){let bt=R.slice(Te[0],Te[1]+1);for(let Et=Oe[0];Et<=Oe[1];++Et)if(He=ml(L[Et],bt,te),me=Math.min(me,He),me===0)return me}else if(!d&&W){let bt=L.slice(Oe[0],Oe[1]+1);for(let Et=Te[0];Et<=Te[1];++Et)if(He=ml(R[Et],bt,te),me=Math.min(me,He),me===0)return me}else He=qf(R,Te,L,Oe,te),me=Math.min(me,He)}else{let He=tc(Te,d),bt=tc(Oe,W);fu(ge,me,te,R,L,He[0],bt[0]),fu(ge,me,te,R,L,He[0],bt[1]),fu(ge,me,te,R,L,He[1],bt[0]),fu(ge,me,te,R,L,He[1],bt[1])}}return me}function oh(R){return R.type==="MultiPolygon"?R.coordinates.map(d=>({type:"Polygon",coordinates:d})):R.type==="MultiLineString"?R.coordinates.map(d=>({type:"LineString",coordinates:d})):R.type==="MultiPoint"?R.coordinates.map(d=>({type:"Point",coordinates:d})):[R]}class Au{constructor(d,L){this.type=Rt,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection")return new Au(W,W.features.map(te=>oh(te.geometry)).flat());if(W.type==="Feature")return new Au(W,oh(W.geometry));if("type"in W&&"coordinates"in W)return new Au(W,oh(W))}return L.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(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!1,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!1,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!1,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!0,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!0,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!0,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,W){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Yc(te,0).map(Ce=>Ce.map(Te=>Te.map(Oe=>zu([Oe.x,Oe.y],L.canonical)))),me=new Ac(ue[0][0][0][1]),ge=1/0;for(let Ce of W)for(let Te of ue){switch(Ce.type){case"Point":ge=Math.min(ge,Sl([Ce.coordinates],!1,Te,me,ge));break;case"LineString":ge=Math.min(ge,Sl(Ce.coordinates,!0,Te,me,ge));break;case"Polygon":ge=Math.min(ge,Jo(Te,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class $c{constructor(d){this.type=Zr,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=d[1];return W==null?L.error("Global state property must be defined."):typeof W!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new $c(W)}evaluate(d){var L;let W=(L=d.globals)===null||L===void 0?void 0:L.globalState;return W&&Object.keys(W).length!==0?zr(W,this.key):null}eachChild(){}outputDefined(){return!1}}let _l={"==":wu,"!=":lu,">":Fl,"<":xc,">=":$u,"<=":pl,array:go,at:pi,boolean:go,case:Ko,coalesce:Dl,collator:uu,format:vs,image:os,in:Vi,"index-of":Io,interpolate:Pi,"interpolate-hcl":Pi,"interpolate-lab":Pi,length:ms,let:to,literal:Mi,match:Xi,number:go,"number-format":tl,object:go,slice:Uo,step:Ss,string:go,"to-boolean":Ao,"to-color":Ao,"to-number":Ao,"to-string":Ao,var:wo,within:$l,distance:Au,"global-state":$c};class nl{constructor(d,L,W,te){this.name=d,this.type=L,this._evaluate=W,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let W=d[0],te=nl.definitions[W];if(!te)return L.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,me=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,ge=me.filter(([Te])=>!Array.isArray(Te)||Te.length===d.length-1),Ce=null;for(let[Te,Oe]of ge){Ce=new Wo(L.registry,Uu,L.path,null,L.scope);let Pe=[],it=!1;for(let He=1;He{return it=Pe,Array.isArray(it)?`(${it.map(Un).join(", ")})`:`(${Un(it.type)}...)`;var it}).join(" | "),Oe=[];for(let Pe=1;Pe{L=d?L&&Uu(W):L&&W instanceof Mi}),!!L&&qu(R)&&yf(R,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function qu(R){if(R instanceof nl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof $l||R instanceof Au)return!1;let d=!0;return R.eachChild(L=>{d&&!qu(L)&&(d=!1)}),d}function nc(R){if(R instanceof nl&&R.name==="feature-state")return!1;let d=!0;return R.eachChild(L=>{d&&!nc(L)&&(d=!1)}),d}function yf(R,d){if(R instanceof nl&&d.indexOf(R.name)>=0)return!1;let L=!0;return R.eachChild(W=>{L&&!yf(W,d)&&(L=!1)}),L}function _f(R){return{result:"success",value:R}}function Mu(R){return{result:"error",value:R}}function ic(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Sc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Vu(R){return!!R.expression&&R.expression.interpolated}function xo(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Ec(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&qn(R)===Qr}function xh(R){return R}function Vf(R,d){let L=R.stops&&typeof R.stops[0][0]=="object",W=L||!(L||R.property!==void 0),te=R.type||(Vu(d)?"exponential":"interval"),ue=function(Oe){switch(Oe.type){case"color":return rn.parse;case"padding":return fn.parse;case"numberArray":return Ai.parse;case"colorArray":return jn.parse;default:return null}}(d);if(ue&&((R=Ht({},R)).stops&&(R.stops=R.stops.map(Oe=>[Oe[0],ue(Oe[1])])),R.default=ue(R.default?R.default:d.default)),R.colorSpace&&(me=R.colorSpace)!=="rgb"&&me!=="hcl"&&me!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var me;let ge=function(Oe){switch(Oe){case"exponential":return Hf;case"interval":return bh;case"categorical":return Gf;case"identity":return il;default:throw new Error(`Unknown function type "${Oe}"`)}}(te),Ce,Te;if(te==="categorical"){Ce=Object.create(null);for(let Oe of R.stops)Ce[Oe[0]]=Oe[1];Te=typeof R.stops[0][0]}if(L){let Oe={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>Hf({stops:it,base:R.base},d,bt).evaluate(bt,Et)}}if(W){let Oe=te==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Oe,interpolationFactor:Pi.interpolationFactor.bind(void 0,Oe),zoomStops:R.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>ge(R,d,Pe,Ce,Te)}}return{kind:"source",evaluate(Oe,Pe){let it=Pe&&Pe.properties?Pe.properties[R.property]:void 0;return it===void 0?xf(R.default,d.default):ge(R,d,it,Ce,Te)}}}function xf(R,d,L){return R!==void 0?R:d!==void 0?d:L!==void 0?L:void 0}function Gf(R,d,L,W,te){return xf(typeof L===te?W[L]:void 0,R.default,d.default)}function bh(R,d,L){if(xo(L)!=="number")return xf(R.default,d.default);let W=R.stops.length;if(W===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[W-1][0])return R.stops[W-1][1];let te=Ls(R.stops.map(ue=>ue[0]),L);return R.stops[te][1]}function Hf(R,d,L){let W=R.base!==void 0?R.base:1;if(xo(L)!=="number")return xf(R.default,d.default);let te=R.stops.length;if(te===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[te-1][0])return R.stops[te-1][1];let ue=Ls(R.stops.map(Oe=>Oe[0]),L),me=function(Oe,Pe,it,He){let bt=He-it,Et=Oe-it;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,W,R.stops[ue][0],R.stops[ue+1][0]),ge=R.stops[ue][1],Ce=R.stops[ue+1][1],Te=bs[d.type]||xh;return typeof ge.evaluate=="function"?{evaluate(...Oe){let Pe=ge.evaluate.apply(void 0,Oe),it=Ce.evaluate.apply(void 0,Oe);if(Pe!==void 0&&it!==void 0)return Te(Pe,it,me,R.colorSpace)}}:Te(ge,Ce,me,R.colorSpace)}function il(R,d,L){switch(d.type){case"color":L=rn.parse(L);break;case"formatted":L=Di.fromString(L.toString());break;case"resolvedImage":L=qi.fromString(L.toString());break;case"padding":L=fn.parse(L);break;case"colorArray":L=jn.parse(L);break;case"numberArray":L=Ai.parse(L);break;default:xo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return xf(L,R.default,d.default)}nl.register(_l,{error:[{kind:"error"},[nr],(R,[d])=>{throw new Xn(d.evaluate(R))}],typeof:[nr,[Zr],(R,[d])=>Un(qn(d.evaluate(R)))],"to-rgba":[yn(Rt,4),[cr],(R,[d])=>{let[L,W,te,ue]=d.evaluate(R).rgb;return[255*L,255*W,255*te,ue]}],rgb:[cr,[Rt,Rt,Rt],gf],rgba:[cr,[Rt,Rt,Rt,Rt],gf],has:{type:ur,overloads:[[[nr],(R,[d])=>Kc(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>Kc(d.evaluate(R),L.evaluate(R))]]},get:{type:Zr,overloads:[[[nr],(R,[d])=>sh(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>sh(d.evaluate(R),L.evaluate(R))]]},"feature-state":[Zr,[nr],(R,[d])=>sh(d.evaluate(R),R.featureState||{})],properties:[Qr,[],R=>R.properties()],"geometry-type":[nr,[],R=>R.geometryType()],id:[Zr,[],R=>R.id()],zoom:[Rt,[],R=>R.globals.zoom],"heatmap-density":[Rt,[],R=>R.globals.heatmapDensity||0],elevation:[Rt,[],R=>R.globals.elevation||0],"line-progress":[Rt,[],R=>R.globals.lineProgress||0],accumulated:[Zr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[Rt,hu(Rt),(R,d)=>{let L=0;for(let W of d)L+=W.evaluate(R);return L}],"*":[Rt,hu(Rt),(R,d)=>{let L=1;for(let W of d)L*=W.evaluate(R);return L}],"-":{type:Rt,overloads:[[[Rt,Rt],(R,[d,L])=>d.evaluate(R)-L.evaluate(R)],[[Rt],(R,[d])=>-d.evaluate(R)]]},"/":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)/L.evaluate(R)],"%":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)%L.evaluate(R)],ln2:[Rt,[],()=>Math.LN2],pi:[Rt,[],()=>Math.PI],e:[Rt,[],()=>Math.E],"^":[Rt,[Rt,Rt],(R,[d,L])=>Math.pow(d.evaluate(R),L.evaluate(R))],sqrt:[Rt,[Rt],(R,[d])=>Math.sqrt(d.evaluate(R))],log10:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN10],ln:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))],log2:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN2],sin:[Rt,[Rt],(R,[d])=>Math.sin(d.evaluate(R))],cos:[Rt,[Rt],(R,[d])=>Math.cos(d.evaluate(R))],tan:[Rt,[Rt],(R,[d])=>Math.tan(d.evaluate(R))],asin:[Rt,[Rt],(R,[d])=>Math.asin(d.evaluate(R))],acos:[Rt,[Rt],(R,[d])=>Math.acos(d.evaluate(R))],atan:[Rt,[Rt],(R,[d])=>Math.atan(d.evaluate(R))],min:[Rt,hu(Rt),(R,d)=>Math.min(...d.map(L=>L.evaluate(R)))],max:[Rt,hu(Rt),(R,d)=>Math.max(...d.map(L=>L.evaluate(R)))],abs:[Rt,[Rt],(R,[d])=>Math.abs(d.evaluate(R))],round:[Rt,[Rt],(R,[d])=>{let L=d.evaluate(R);return L<0?-Math.round(-L):Math.round(L)}],floor:[Rt,[Rt],(R,[d])=>Math.floor(d.evaluate(R))],ceil:[Rt,[Rt],(R,[d])=>Math.ceil(d.evaluate(R))],"filter-==":[ur,[nr,Zr],(R,[d,L])=>R.properties()[d.value]===L.value],"filter-id-==":[ur,[Zr],(R,[d])=>R.id()===d.value],"filter-type-==":[ur,[nr],(R,[d])=>R.geometryType()===d.value],"filter-<":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W{let L=R.id(),W=d.value;return typeof L==typeof W&&L":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>te}],"filter-id->":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>W}],"filter-<=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L<=W}],"filter->=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>=W}],"filter-has":[ur,[Zr],(R,[d])=>d.value in R.properties()],"filter-has-id":[ur,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[ur,[yn(nr)],(R,[d])=>d.value.indexOf(R.geometryType())>=0],"filter-id-in":[ur,[yn(Zr)],(R,[d])=>d.value.indexOf(R.id())>=0],"filter-in-small":[ur,[nr,yn(Zr)],(R,[d,L])=>L.value.indexOf(R.properties()[d.value])>=0],"filter-in-large":[ur,[nr,yn(Zr)],(R,[d,L])=>function(W,te,ue,me){for(;ue<=me;){let ge=ue+me>>1;if(te[ge]===W)return!0;te[ge]>W?me=ge-1:ue=ge+1}return!1}(R.properties()[d.value],L.value,0,L.value.length-1)],all:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)&&L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(!L.evaluate(R))return!1;return!0}]]},any:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)||L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(L.evaluate(R))return!0;return!1}]]},"!":[ur,[ur],(R,[d])=>!d.evaluate(R)],"is-supported-script":[ur,[nr],(R,[d])=>{let L=R.globals&&R.globals.isSupportedScript;return!L||L(d.evaluate(R))}],upcase:[nr,[nr],(R,[d])=>d.evaluate(R).toUpperCase()],downcase:[nr,[nr],(R,[d])=>d.evaluate(R).toLowerCase()],concat:[nr,hu(Zr),(R,d)=>d.map(L=>Hi(L.evaluate(R))).join("")],split:[yn(nr),[nr,nr],(R,[d,L])=>d.evaluate(R).split(L.evaluate(R))],join:[nr,[yn(nr),nr],(R,[d,L])=>d.evaluate(R).join(L.evaluate(R))],"resolved-locale":[nr,[ha],(R,[d])=>d.evaluate(R).resolvedLocale()]});class kl{constructor(d,L,W){this.expression=d,this._warningHistory={},this._evaluator=new jo,this._defaultValue=L?function(te){if(te.type==="color"&&Ec(te.default))return new rn(0,0,0,0);switch(te.type){case"color":return rn.parse(te.default)||null;case"padding":return fn.parse(te.default)||null;case"numberArray":return Ai.parse(te.default)||null;case"colorArray":return jn.parse(te.default)||null;case"variableAnchorOffsetCollection":return gi.parse(te.default)||null;case"projectionDefinition":return io.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me,this.expression.evaluate(this._evaluator)}evaluate(d,L,W,te,ue,me){this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me||null;try{let ge=this.expression.evaluate(this._evaluator);if(ge==null||typeof ge=="number"&&ge!=ge)return this._defaultValue;if(this._enumValues&&!(ge in this._enumValues))throw new Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(ge)} instead.`);return ge}catch(ge){return this._warningHistory[ge.message]||(this._warningHistory[ge.message]=!0,typeof console<"u"&&console.warn(ge.message)),this._defaultValue}}}function kc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in _l}function Cc(R,d,L){let W=new Wo(_l,Uu,[],d?function(ue){let me={color:cr,string:nr,number:Rt,enum:nr,boolean:ur,formatted:Pa,padding:La,numberArray:Xa,colorArray:un,projectionDefinition:Rr,resolvedImage:ja,variableAnchorOffsetCollection:Nn};return ue.type==="array"?yn(me[ue.value]||Zr,ue.length):me[ue.type]}(d):void 0),te=W.parse(R,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?_f(new kl(te,d,L)):Mu(W.errors)}class Lc{constructor(d,L,W){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}}class vc{constructor(d,L,W,te,ue){this.kind=d,this.zoomStops=W,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=ue}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}interpolationFactor(d,L,W){return this.interpolationType?Pi.interpolationFactor(this.interpolationType,d,L,W):0}}function Ft(R,d,L){let W=Cc(R,d,L);if(W.result==="error")return W;let te=W.value.expression,ue=qu(te);if(!ue&&!ic(d))return Mu([new Sr("","data expressions not supported")]);let me=yf(te,["zoom"]);if(!me&&!Sc(d))return Mu([new Sr("","zoom expressions not supported")]);let ge=Fr(te);return ge||me?ge instanceof Sr?Mu([ge]):ge instanceof Pi&&!Vu(d)?Mu([new Sr("",'"interpolate" expressions cannot be used with this property')]):_f(ge?new vc(ue?"camera":"composite",W.value,ge.labels,ge instanceof Pi?ge.interpolation:void 0,L):new Lc(ue?"constant":"source",W.value,L)):Mu([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class tr{constructor(d,L){this._parameters=d,this._specification=L,Ht(this,Vf(this._parameters,this._specification))}static deserialize(d){return new tr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Fr(R){let d=null;if(R instanceof to)d=Fr(R.result);else if(R instanceof Dl){for(let L of R.args)if(d=Fr(L),d)break}else(R instanceof Ss||R instanceof Pi)&&R.input instanceof nl&&R.input.name==="zoom"&&(d=R);return d instanceof Sr||R.eachChild(L=>{let W=Fr(L);W instanceof Sr?d=W:!d&&W?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&W&&d!==W&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(R,d=new Set){return R instanceof $c&&d.add(R.key),R.eachChild(L=>{wr(L,d)}),d}function ea(R,d){let{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge}=R??{};return{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge,globalState:d}}function ba(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let d of R.slice(1))if(!ba(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Ia={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Na(R,d){if(R==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};ba(R)||(R=Da(R));let L=Cc(R,Ia,d);if(L.result==="error")throw new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,te,ue)=>L.value.evaluate(W,te,{},ue),needGeometry:mn(R),getGlobalStateRefs:()=>wr(L.value.expression)}}function Za(R,d){return Rd?1:0}function mn(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?Ha(R[1],R[2],d):d==="any"?(L=R.slice(1),["any"].concat(L.map(Da))):d==="all"?["all"].concat(R.slice(1).map(Da)):d==="none"?["all"].concat(R.slice(1).map(Da).map(En)):d==="in"?$a(R[1],R.slice(2)):d==="!in"?En($a(R[1],R.slice(2))):d==="has"?vn(R[1]):d!=="!has"||En(vn(R[1]));var L}function Ha(R,d,L){switch(R){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,R,d]}}function $a(R,d){if(d.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",R,["literal",d.sort(Za)]]:["filter-in-small",R,["literal",d]]}}function vn(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function En(R){return["!",R]}function yi(R){let d=typeof R;if(d==="number"||d==="boolean"||d==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let ue of R)te+=`${yi(ue)},`;return`${te}]`}let L=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new Vt(d,L,`${L} is greater than the maximum value ${W.maximum}`)]:[]}function Co(R){let d=R.valueSpec,L=ri(R.value.type),W,te,ue,me={},ge=L!=="categorical"&&R.value.property===void 0,Ce=!ge,Te=xo(R.value.stops)==="array"&&xo(R.value.stops[0])==="array"&&xo(R.value.stops[0][0])==="object",Oe=Ln({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(He){if(L==="identity")return[new Vt(He.key,He.value,'identity function may not have a "stops" property')];let bt=[],Et=He.value;return bt=bt.concat(Ni({key:He.key,value:Et,valueSpec:He.valueSpec,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,arrayElementValidator:Pe})),xo(Et)==="array"&&Et.length===0&&bt.push(new Vt(He.key,Et,"array must have at least one stop")),bt},default:function(He){return He.validateSpec({key:He.key,value:He.value,valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec})}}});return L==="identity"&&ge&&Oe.push(new Vt(R.key,R.value,'missing required property "property"')),L==="identity"||R.value.stops||Oe.push(new Vt(R.key,R.value,'missing required property "stops"')),L==="exponential"&&R.valueSpec.expression&&!Vu(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ce&&!ic(R.valueSpec)?Oe.push(new Vt(R.key,R.value,"property functions not supported")):ge&&!Sc(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"zoom functions not supported"))),L!=="categorical"&&!Te||R.value.property!==void 0||Oe.push(new Vt(R.key,R.value,'"property" property is required')),Oe;function Pe(He){let bt=[],Et=He.value,Qt=He.key;if(xo(Et)!=="array")return[new Vt(Qt,Et,`array expected, ${xo(Et)} found`)];if(Et.length!==2)return[new Vt(Qt,Et,`array length 2 expected, length ${Et.length} found`)];if(Te){if(xo(Et[0])!=="object")return[new Vt(Qt,Et,`object expected, ${xo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Vt(Qt,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Vt(Qt,Et,"object stop key must have value")];if(ue&&ue>ri(Et[0].zoom))return[new Vt(Qt,Et[0].zoom,"stop zoom values must appear in ascending order")];ri(Et[0].zoom)!==ue&&(ue=ri(Et[0].zoom),te=void 0,me={}),bt=bt.concat(Ln({key:`${Qt}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,objectElementValidators:{zoom:Zi,value:it}}))}else bt=bt.concat(it({key:`${Qt}[0]`,value:Et[0],validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec},Et));return kc(kn(Et[1]))?bt.concat([new Vt(`${Qt}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(He.validateSpec({key:`${Qt}[1]`,value:Et[1],valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec}))}function it(He,bt){let Et=xo(He.value),Qt=ri(He.value),er=He.value!==null?He.value:bt;if(W){if(Et!==W)return[new Vt(He.key,er,`${Et} stop domain type must match previous stop domain type ${W}`)]}else W=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Vt(He.key,er,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let br=`number expected, ${Et} found`;return ic(d)&&L===void 0&&(br+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Vt(He.key,er,br)]}return L!=="categorical"||Et!=="number"||isFinite(Qt)&&Math.floor(Qt)===Qt?L!=="categorical"&&Et==="number"&&te!==void 0&&Qtnew Vt(`${R.key}${W.key}`,R.value,W.message));let L=d.value.expression||d.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!L.outputDefined())return[new Vt(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!yf(L,["zoom","feature-state"]))return[new Vt(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!qu(L))return[new Vt(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fo(R){let d=R.key,L=R.value,W=xo(L);return W!=="string"?[new Vt(d,L,`color expected, ${W} found`)]:rn.parse(String(L))?[]:[new Vt(d,L,`color expected, "${L}" found`)]}function Yo(R){let d=R.key,L=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${W.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(W.values).indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function bo(R){return ba(kn(R.value))?Do(Ht({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Gs(R)}function Gs(R){let d=R.value,L=R.key;if(xo(d)!=="array")return[new Vt(L,d,`array expected, ${xo(d)} found`)];let W=R.styleSpec,te,ue=[];if(d.length<1)return[new Vt(L,d,"filter array must have at least 1 element")];switch(ue=ue.concat(Yo({key:`${L}[0]`,value:d[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),ri(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&ri(d[1])==="$type"&&ue.push(new Vt(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&ue.push(new Vt(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=xo(d[1]),te!=="string"&&ue.push(new Vt(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let me=2;me{Pe in te&&W.push(new Vt(ue,te[Pe],`"${Pe}" is prohibited for ref layers`))}),me.layers.forEach(Pe=>{ri(Pe.id)===Te&&(Oe=Pe)}),Oe?Oe.ref?W.push(new Vt(ue,te.ref,"ref cannot reference another ref layer")):Ce=ri(Oe.type):W.push(new Vt(ue,te.ref,`ref layer "${Te}" not found`))}else if(Ce!=="background")if(te.source){let Oe=me.sources&&me.sources[te.source],Pe=Oe&&ri(Oe.type);Oe?Pe==="vector"&&Ce==="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?W.push(new Vt(ue,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&Oe.lineMetrics||W.push(new Vt(ue,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):W.push(new Vt(ue,te,`layer "${te.id}" must specify a "source-layer"`)):W.push(new Vt(ue,te.source,`source "${te.source}" not found`))}else W.push(new Vt(ue,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&W.push(new Vt(ue,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),W=W.concat(Ln({key:ue,value:te,valueSpec:ge.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${ue}.type`,value:te.type,valueSpec:ge.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:te,objectKey:"type"}),filter:bo,layout:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>Kn(Ht({layerType:Ce},Pe))}}),paint:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>ns(Ht({layerType:Ce},Pe))}})}})),W}function gs(R){let d=R.value,L=R.key,W=xo(d);return W!=="string"?[new Vt(L,d,`string expected, ${W} found`)]:[]}let js={promoteId:function({key:R,value:d}){if(xo(d)==="string")return gs({key:R,value:d});{let L=[];for(let W in d)L.push(...gs({key:`${R}.${W}`,value:d[W]}));return L}}};function Cl(R){let d=R.value,L=R.key,W=R.styleSpec,te=R.style,ue=R.validateSpec;if(!d.type)return[new Vt(L,d,'"type" is required')];let me=ri(d.type),ge;switch(me){case"vector":case"raster":return ge=Ln({key:L,value:d,valueSpec:W[`source_${me.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:js,validateSpec:ue}),ge;case"raster-dem":return ge=function(Ce){var Te;let Oe=(Te=Ce.sourceName)!==null&&Te!==void 0?Te:"",Pe=Ce.value,it=Ce.styleSpec,He=it.source_raster_dem,bt=Ce.style,Et=[],Qt=xo(Pe);if(Pe===void 0)return Et;if(Qt!=="object")return Et.push(new Vt("source_raster_dem",Pe,`object expected, ${Qt} found`)),Et;let er=ri(Pe.encoding)==="custom",br=["redFactor","greenFactor","blueFactor","baseShift"],sr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!er&&br.includes(Mr)?Et.push(new Vt(Mr,Pe[Mr],`In "${Oe}": "${Mr}" is only valid when "encoding" is set to "custom". ${sr} encoding found`)):He[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:He[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:it})):Et.push(new Vt(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:R.style,styleSpec:W,validateSpec:ue}),ge;case"geojson":if(ge=Ln({key:L,value:d,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:ue,objectElementValidators:js}),d.cluster)for(let Ce in d.clusterProperties){let[Te,Oe]=d.clusterProperties[Ce],Pe=typeof Te=="string"?[Te,["accumulated"],["get",Ce]]:Te;ge.push(...Do({key:`${L}.${Ce}.map`,value:Oe,expressionContext:"cluster-map"})),ge.push(...Do({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return ge;case"video":return Ln({key:L,value:d,valueSpec:W.source_video,style:te,validateSpec:ue,styleSpec:W});case"image":return Ln({key:L,value:d,valueSpec:W.source_image,style:te,validateSpec:ue,styleSpec:W});case"canvas":return[new Vt(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yo({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function zl(R){let d=R.value,L=R.styleSpec,W=L.light,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("light",d,`object expected, ${me} found`)]),ue;for(let ge in d){let Ce=ge.match(/^(.*)-transition$/);ue=ue.concat(Ce&&W[Ce[1]]&&W[Ce[1]].transition?R.validateSpec({key:ge,value:d[ge],valueSpec:L.transition,validateSpec:R.validateSpec,style:te,styleSpec:L}):W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)])}return ue}function Kl(R){let d=R.value,L=R.styleSpec,W=L.sky,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("sky",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me}function Gu(R){let d=R.value,L=R.styleSpec,W=L.terrain,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("terrain",d,`object expected, ${me} found`)]),ue;for(let ge in d)ue=ue.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return ue}function xl(R){let d=[],L=R.value,W=R.key;if(Array.isArray(L)){let te=[],ue=[];for(let me in L)L[me].id&&te.includes(L[me].id)&&d.push(new Vt(W,L,`all the sprites' ids must be unique, but ${L[me].id} is duplicated`)),te.push(L[me].id),L[me].url&&ue.includes(L[me].url)&&d.push(new Vt(W,L,`all the sprites' URLs must be unique, but ${L[me].url} is duplicated`)),ue.push(L[me].url),d=d.concat(Ln({key:`${W}[${me}]`,value:L[me],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return d}return gs({key:W,value:L})}function Hu(R){return!!R&&R.constructor===Object}function Su(R){return Hu(R.value)?[]:[new Vt(R.key,R.value,`object expected, ${xo(R.value)} found`)]}let mc={"*":()=>[],array:Ni,boolean:function(R){let d=R.value,L=R.key,W=xo(d);return W!=="boolean"?[new Vt(L,d,`boolean expected, ${W} found`)]:[]},number:Zi,color:Fo,constants:ki,enum:Yo,filter:bo,function:Co,layer:zo,object:Ln,source:Cl,light:zl,sky:Kl,terrain:Gu,projection:function(R){let d=R.value,L=R.styleSpec,W=L.projection,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("projection",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me},projectionDefinition:function(R){let d=R.key,L=R.value;L=L instanceof String?L.valueOf():L;let W=xo(L);return W!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(W)?[]:[new Vt(d,L,`projection expected, invalid type "${W}" found`)]:[new Vt(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:gs,formatted:function(R){return gs(R).length===0?[]:Do(R)},resolvedImage:function(R){return gs(R).length===0?[]:Do(R)},padding:function(R){let d=R.key,L=R.value;if(xo(L)==="array"){if(L.length<1||L.length>4)return[new Vt(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let W={type:"number"},te=[];for(let ue=0;ue[]}})),R.constants&&(L=L.concat(ki({key:"constants",value:R.constants}))),Ql(L)}function Jl(R){return function(d){return R(Object.assign({},d,{validateSpec:Jc}))}}function Ql(R){return[].concat(R).sort((d,L)=>d.line-L.line)}function Eu(R){return function(...d){return Ql(R.apply(this,d))}}du.source=Eu(Jl(Cl)),du.sprite=Eu(Jl(xl)),du.glyphs=Eu(Jl(oc)),du.light=Eu(Jl(zl)),du.sky=Eu(Jl(Kl)),du.terrain=Eu(Jl(Gu)),du.state=Eu(Jl(Su)),du.layer=Eu(Jl(zo)),du.filter=Eu(Jl(bo)),du.paintProperty=Eu(Jl(ns)),du.layoutProperty=Eu(Jl(Kn));let bf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class lh{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=Cc(d,bf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Pc=ht,Ks=du,Bl=Ks.light,Wu=Ks.sky,wf=Ks.paintProperty,Qc=Ks.layoutProperty;function ku(R,d){let L=!1;if(d?.length)for(let W of d)R.fire(new Ot(new Error(W.message))),L=!0;return L}class Ol{constructor(d,L,W){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let me=new Int32Array(this.arrayBuffer);d=me[0],this.d=(L=me[1])+2*(W=me[2]);for(let Ce=0;Ce=Pe[He+0]&&te>=Pe[He+1])?(ge[it]=!0,me.push(Oe[it])):ge[it]=!1}}}_forEachCell(d,L,W,te,ue,me,ge,Ce){let Te=this._convertToCellCoord(d),Oe=this._convertToCellCoord(L),Pe=this._convertToCellCoord(W),it=this._convertToCellCoord(te);for(let He=Te;He<=Pe;He++)for(let bt=Oe;bt<=it;bt++){let Et=this.d*bt+He;if((!Ce||Ce(this._convertFromCellCoord(He),this._convertFromCellCoord(bt),this._convertFromCellCoord(He+1),this._convertFromCellCoord(bt+1)))&&ue.call(this,d,L,W,te,Et,me,ge,Ce))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,L=3+this.cells.length+1+1,W=0;for(let me of this.cells)W+=me.length;let te=new Int32Array(L+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let ue=L;for(let me=0;meW?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let Jr=jr(["Arab","Dupl","Mong","Ougr","Syrc"]);function la(R){return!Jr.test(String.fromCodePoint(R))}function xa(R){return!(Wt(R)||(d=R,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Ba=jr(["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 an(R){return Ba.test(String.fromCodePoint(R))}function Tn(R,d){return!(!d&&an(R)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(R)))}function ii(R){for(let d of R)if(an(d.codePointAt(0)))return!0;return!1}let Si=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){if(Si.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(R,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(R.pluginStatus!=="loading")return this.setState(R),R;let L=R.pluginURL,W=new Promise(ue=>{this.loadScriptResolve=ue});d(L);let te=new Promise(ue=>setTimeout(()=>ue(),this.TIMEOUT));if(yield Promise.race([W,te]),this.isParsed()){let ue={pluginStatus:"loaded",pluginURL:L};return this.setState(ue),ue}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class oi{constructor(d,L){this.isSupportedScript=Ji,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Bt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),W=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*L}}}function Ji(R){return function(d,L){for(let W of d)if(!Tn(W.codePointAt(0),L))return!1;return!0}(R,Si.getRTLTextPluginStatus()==="loaded")}let Qi="-transition";class Oo{constructor(d,L,W){this.property=d,this.value=L,this.expression=function(te,ue,me){if(Ec(te))return new tr(te,ue);if(kc(te)){let ge=Ft(te,ue,me);if(ge.result==="error")throw new Error(ge.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return ge.value}{let ge=te;return ue.type==="color"&&typeof te=="string"?ge=rn.parse(te):ue.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?ue.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?ge=gi.parse(te):ue.type==="projectionDefinition"&&typeof te=="string"&&(ge=io.parse(te)):ge=jn.parse(te):ge=Ai.parse(te):ge=fn.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>ge}}}(L===void 0?d.specification.default:L,d.specification,W)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,W){return this.property.possiblyEvaluate(this,d,L,W)}}class Qo{constructor(d,L){this.property=d,this.value=new Oo(d,void 0,L)}transitioned(d,L){return new ys(this.property,this.value,L,X({},d.transition,this.transition),d.now)}untransitioned(){return new ys(this.property,this.value,null,{},0)}}class vo{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].value=new Oo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let W=this.getValue(L);W!==void 0&&(d[L]=W);let te=this.getTransition(L);te!==void 0&&(d[`${L}${Qi}`]=te)}return d}transitioned(d,L){let W=new ol(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(d,L._values[te]);return W}untransitioned(){let d=new ol(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class ys{constructor(d,L,W,te,ue){this.property=d,this.value=L,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(d,L,W){let te=d.now||0,ue=this.value.possiblyEvaluate(d,L,W),me=this.prior;if(me){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class sc{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let ue=d.expression.evaluate(L,null,{},W,te);return this._calculate(ue,ue,ue,L)}return this._calculate(d.expression.evaluate(new oi(Math.floor(L.zoom-1),L)),d.expression.evaluate(new oi(Math.floor(L.zoom),L)),d.expression.evaluate(new oi(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){return!!d.expression.evaluate(L,null,{},W,te)}interpolate(){return!1}}class Ps{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let W=d[L];W.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Oo(W,void 0,void 0),ue=this.defaultTransitionablePropertyValues[L]=new Qo(W,void 0);this.defaultTransitioningPropertyValues[L]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}fi("DataDrivenProperty",wi),fi("DataConstantProperty",hi),fi("CrossFadedDataDrivenProperty",sl),fi("CrossFadedProperty",sc),fi("ColorRampProperty",tu);let gc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",pu=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class ll extends vt{constructor(d,L,W){if(super(),this.id=d.id,this.type=d.type,this._globalState=W,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,ue){return new lh(te,ue)}(this.visibility,W),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,this._featureFilter=Na(d.filter,W)),L.layout&&(this._unevaluatedLayout=new jl(L.layout,W)),L.paint)){this._transitionablePaint=new vo(L.paint,W);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Cu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Na(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+gc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let W=this._unevaluatedLayout._values[L];for(let te of W.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let W in this._transitionablePaint._values){let te=this._transitionablePaint._values[W].value;for(let ue of te.getGlobalStateRefs()){let me=(d=L.get(ue))!==null&&d!==void 0?d:[];me.push({name:W,value:te.value}),L.set(ue,me)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,W={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+gc))):L!=null&&this._validate(Qc,`layers.${this.id}.layout.${d}`,d,L,W)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,W;if(d.endsWith(Qi)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+pu);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((W=this._unevaluatedLayout)===null||W===void 0)&&W.hasProperty(d))throw new Error(d+pu);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,W={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+pu))),!1;if(L!=null&&this._validate(wf,`layers.${this.id}.paint.${d}`,d,L,W))return!1;if(d.endsWith(Qi))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let ue=this._transitionablePaint._values[d],me=ue.property.specification["property-type"]==="cross-faded-data-driven",ge=ue.value.isDataDriven(),Ce=ue.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let Te=this._transitionablePaint._values[d].value;return Te.isDataDriven()||ge||me||this._handleOverridablePaintPropertyUpdate(d,Ce,Te)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,W){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let W={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:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(W.layout||(W.layout={}),W.layout.visibility=this.visibility),Y(W,(te,ue)=>!(te===void 0||ue==="layout"&&!Object.keys(te).length||ue==="paint"&&!Object.keys(te).length))}_validate(d,L,W,te,ue={}){return ue?.validate!==!1&&ku(this,d.call(Ks,{key:L,layerType:this.type,objectKey:W,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Hs&&ic(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let ef;var de={get paint(){return ef=ef||new Ps({"raster-opacity":new hi(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new hi(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new hi(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new hi(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new hi(ht.paint_raster["raster-saturation"]),"raster-contrast":new hi(ht.paint_raster["raster-contrast"]),resampling:new hi(ht.paint_raster.resampling),"raster-resampling":new hi(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new hi(ht.paint_raster["raster-fade-duration"])})}};class Ee extends ll{constructor(d,L){super(d,de,L)}}let qe={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class tt{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class at{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_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 L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ct(R,d=1){let L=0,W=0;return{members:R.map(te=>{let ue=qe[te.type].BYTES_PER_ELEMENT,me=L=Nt(L,Math.max(d,ue)),ge=te.components||1;return W=Math.max(W,ue),L+=ue*ge,{name:te.name,type:te.type,components:ge,offset:me}}),size:Nt(L,Math.max(W,d)),alignment:d}}function Nt(R,d){return Math.ceil(R/d)*d}class St extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=W,d}}St.prototype.bytesPerElement=4,fi("StructArrayLayout2i4",St);class Jt extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.int16[ue+0]=L,this.int16[ue+1]=W,this.int16[ue+2]=te,d}}Jt.prototype.bytesPerElement=6,fi("StructArrayLayout3i6",Jt);class mr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.int16[me+0]=L,this.int16[me+1]=W,this.int16[me+2]=te,this.int16[me+3]=ue,d}}mr.prototype.bytesPerElement=8,fi("StructArrayLayout4i8",mr);class gr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}gr.prototype.bytesPerElement=12,fi("StructArrayLayout2i4i12",gr);class Hr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=4*d,Te=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.uint8[Te+4]=te,this.uint8[Te+5]=ue,this.uint8[Te+6]=me,this.uint8[Te+7]=ge,d}}Hr.prototype.bytesPerElement=8,fi("StructArrayLayout2i4ub8",Hr);class Vr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=W,d}}Vr.prototype.bytesPerElement=8,fi("StructArrayLayout2f8",Vr);class ca extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,W,te,ue,me,ge,Ce,Te,Oe)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=10*d;return this.uint16[it+0]=L,this.uint16[it+1]=W,this.uint16[it+2]=te,this.uint16[it+3]=ue,this.uint16[it+4]=me,this.uint16[it+5]=ge,this.uint16[it+6]=Ce,this.uint16[it+7]=Te,this.uint16[it+8]=Oe,this.uint16[it+9]=Pe,d}}ca.prototype.bytesPerElement=20,fi("StructArrayLayout10ui20",ca);class Aa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce){let Te=this.length;return this.resize(Te+1),this.emplace(Te,d,L,W,te,ue,me,ge,Ce)}emplace(d,L,W,te,ue,me,ge,Ce,Te){let Oe=8*d;return this.uint16[Oe+0]=L,this.uint16[Oe+1]=W,this.uint16[Oe+2]=te,this.uint16[Oe+3]=ue,this.uint16[Oe+4]=me,this.uint16[Oe+5]=ge,this.uint16[Oe+6]=Ce,this.uint16[Oe+7]=Te,d}}Aa.prototype.bytesPerElement=16,fi("StructArrayLayout8ui16",Aa);class Xr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it){let He=this.length;return this.resize(He+1),this.emplace(He,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=W,this.int16[bt+2]=te,this.int16[bt+3]=ue,this.uint16[bt+4]=me,this.uint16[bt+5]=ge,this.uint16[bt+6]=Ce,this.uint16[bt+7]=Te,this.int16[bt+8]=Oe,this.int16[bt+9]=Pe,this.int16[bt+10]=it,this.int16[bt+11]=He,d}}Xr.prototype.bytesPerElement=24,fi("StructArrayLayout4i4ui4i24",Xr);class oa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.float32[ue+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}oa.prototype.bytesPerElement=12,fi("StructArrayLayout3f12",oa);class fa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}fa.prototype.bytesPerElement=4,fi("StructArrayLayout1ul4",fa);class Ea extends at{_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,L,W,te,ue,me,ge,Ce,Te){let Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,d,L,W,te,ue,me,ge,Ce,Te)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=10*d,it=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=W,this.int16[Pe+2]=te,this.int16[Pe+3]=ue,this.int16[Pe+4]=me,this.int16[Pe+5]=ge,this.uint32[it+3]=Ce,this.uint16[Pe+8]=Te,this.uint16[Pe+9]=Oe,d}}Ea.prototype.bytesPerElement=20,fi("StructArrayLayout6i1ul2ui20",Ea);class Ma extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}Ma.prototype.bytesPerElement=12,fi("StructArrayLayout2i2i2i12",Ma);class sa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,ue)}emplace(d,L,W,te,ue,me){let ge=4*d,Ce=8*d;return this.float32[ge+0]=L,this.float32[ge+1]=W,this.float32[ge+2]=te,this.int16[Ce+6]=ue,this.int16[Ce+7]=me,d}}sa.prototype.bytesPerElement=16,fi("StructArrayLayout2f1f2i16",sa);class hn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=16*d,Te=4*d,Oe=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=W,this.float32[Te+1]=te,this.float32[Te+2]=ue,this.int16[Oe+6]=me,this.int16[Oe+7]=ge,d}}hn.prototype.bytesPerElement=16,fi("StructArrayLayout2ub2f2i16",hn);class An extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[ue+0]=L,this.uint16[ue+1]=W,this.uint16[ue+2]=te,d}}An.prototype.bytesPerElement=6,fi("StructArrayLayout3ui6",An);class zn extends at{_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,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er){let br=this.length;return this.resize(br+1),this.emplace(br,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br){let sr=24*d,Mr=12*d,qr=48*d;return this.int16[sr+0]=L,this.int16[sr+1]=W,this.uint16[sr+2]=te,this.uint16[sr+3]=ue,this.uint32[Mr+2]=me,this.uint32[Mr+3]=ge,this.uint32[Mr+4]=Ce,this.uint16[sr+10]=Te,this.uint16[sr+11]=Oe,this.uint16[sr+12]=Pe,this.float32[Mr+7]=it,this.float32[Mr+8]=He,this.uint8[qr+36]=bt,this.uint8[qr+37]=Et,this.uint8[qr+38]=Qt,this.uint32[Mr+10]=er,this.int16[sr+22]=br,d}}zn.prototype.bytesPerElement=48,fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",zn);class $n extends at{_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,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn){let gn=this.length;return this.resize(gn+1),this.emplace(gn,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn,gn){let Va=32*d,Hn=16*d;return this.int16[Va+0]=L,this.int16[Va+1]=W,this.int16[Va+2]=te,this.int16[Va+3]=ue,this.int16[Va+4]=me,this.int16[Va+5]=ge,this.int16[Va+6]=Ce,this.int16[Va+7]=Te,this.uint16[Va+8]=Oe,this.uint16[Va+9]=Pe,this.uint16[Va+10]=it,this.uint16[Va+11]=He,this.uint16[Va+12]=bt,this.uint16[Va+13]=Et,this.uint16[Va+14]=Qt,this.uint16[Va+15]=er,this.uint16[Va+16]=br,this.uint16[Va+17]=sr,this.uint16[Va+18]=Mr,this.uint16[Va+19]=qr,this.uint16[Va+20]=$r,this.uint16[Va+21]=_a,this.uint16[Va+22]=Ca,this.uint32[Hn+12]=nn,this.float32[Hn+13]=qa,this.float32[Hn+14]=bn,this.uint16[Va+30]=Fn,this.uint16[Va+31]=gn,d}}$n.prototype.bytesPerElement=64,fi("StructArrayLayout8i15ui1ul2f2ui64",$n);class xi extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}xi.prototype.bytesPerElement=4,fi("StructArrayLayout1f4",xi);class di extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[6*d+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}di.prototype.bytesPerElement=12,fi("StructArrayLayout1ui2f12",di);class uo extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=4*d;return this.uint32[2*d+0]=L,this.uint16[ue+2]=W,this.uint16[ue+3]=te,d}}uo.prototype.bytesPerElement=8,fi("StructArrayLayout1ul2ui8",uo);class pe extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=W,d}}pe.prototype.bytesPerElement=4,fi("StructArrayLayout2ui4",pe);class y extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,fi("StructArrayLayout1ui2",y);class N extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.float32[me+0]=L,this.float32[me+1]=W,this.float32[me+2]=te,this.float32[me+3]=ue,d}}N.prototype.bytesPerElement=16,fi("StructArrayLayout4f16",N);class ie extends tt{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 t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class fe extends Ea{get(d){return new ie(this,d)}}fi("CollisionBoxArray",fe);class be extends tt{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]}}be.prototype.size=48;class Re extends zn{get(d){return new be(this,d)}}fi("PlacedSymbolArray",Re);class je extends tt{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]}}je.prototype.size=64;class Ze extends $n{get(d){return new je(this,d)}}fi("SymbolInstanceArray",Ze);class ut extends xi{getoffsetX(d){return this.float32[1*d+0]}}fi("GlyphOffsetArray",ut);class ft extends Jt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}fi("SymbolLineVertexArray",ft);class Dt extends tt{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]}}Dt.prototype.size=12;class Gt extends di{get(d){return new Dt(this,d)}}fi("TextAnchorOffsetArray",Gt);class Kt extends tt{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]}}Kt.prototype.size=8;class st extends uo{get(d){return new Kt(this,d)}}fi("FeatureIndexArray",st);class It extends St{}class Ut extends St{}class ir extends St{}class dr extends gr{}class Ar extends Hr{}class hr extends Vr{}class vr extends ca{}class Or extends Aa{}class Cr extends Xr{}class ta extends oa{}class ka extends fa{}class Ta extends Ma{}class Ra extends hn{}class ua extends An{}class ia extends pe{}let ga=ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:da}=ga;class Fa{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,W,te){let ue=this.segments[this.segments.length-1];return d>Fa.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Fa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Fa.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!ue||ue.vertexLength+d>Fa.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te?this.createNewSegment(L,W,te):ue}createNewSegment(d,L,W){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return W!==void 0&&(te.sortKey=W),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,W){return this.prepareSegment(0,d,L,W)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,W,te){return new Fa([{vertexOffset:d,primitiveOffset:L,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function za(R,d){return 256*(R=se(Math.floor(R),0,255))+se(Math.floor(d),0,255)}Fa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fi("SegmentVector",Fa);let Cn=ct([{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"}]),Dn=ct([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var ui,cn,sn,ei={exports:{}},Pn={exports:{}},Rn={exports:{}},In=function(){if(sn)return ei.exports;sn=1;var R=(ui||(ui=1,Pn.exports=function(L,W){var te,ue,me,ge,Ce,Te,Oe,Pe;for(ue=L.length-(te=3&L.length),me=W,Ce=3432918353,Te=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295)<<13|me>>>19))+((5*(me>>>16)&65535)<<16)&4294967295))+((58964+(ge>>>16)&65535)<<16);switch(Oe=0,te){case 3:Oe^=(255&L.charCodeAt(Pe+2))<<16;case 2:Oe^=(255&L.charCodeAt(Pe+1))<<8;case 1:me^=Oe=(65535&(Oe=(Oe=(65535&(Oe^=255&L.charCodeAt(Pe)))*Ce+(((Oe>>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295}return me^=L.length,me=2246822507*(65535&(me^=me>>>16))+((2246822507*(me>>>16)&65535)<<16)&4294967295,me=3266489909*(65535&(me^=me>>>13))+((3266489909*(me>>>16)&65535)<<16)&4294967295,(me^=me>>>16)>>>0}),Pn.exports),d=(cn||(cn=1,Rn.exports=function(L,W){for(var te,ue=L.length,me=W^ue,ge=0;ue>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(ge)|(255&L.charCodeAt(++ge))<<8|(255&L.charCodeAt(++ge))<<16|(255&L.charCodeAt(++ge))<<24))+((1540483477*(te>>>16)&65535)<<16),me=1540483477*(65535&me)+((1540483477*(me>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),ue-=4,++ge;switch(ue){case 3:me^=(255&L.charCodeAt(ge+2))<<16;case 2:me^=(255&L.charCodeAt(ge+1))<<8;case 1:me=1540483477*(65535&(me^=255&L.charCodeAt(ge)))+((1540483477*(me>>>16)&65535)<<16)}return me=1540483477*(65535&(me^=me>>>13))+((1540483477*(me>>>16)&65535)<<16),(me^=me>>>15)>>>0}),Rn.exports);return ei.exports=R,ei.exports.murmur3=R,ei.exports.murmur2=d,ei.exports}(),Jn=n(In);class Ei{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,W,te){this.ids.push(so(d)),this.positions.push(L,W,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=so(d),W=0,te=this.ids.length-1;for(;W>1;this.ids[me]>=L?te=me:W=me+1}let ue=[];for(;this.ids[W]===L;)ue.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return ue}static serialize(d,L){let W=new Float64Array(d.ids),te=new Uint32Array(d.positions);return ti(W,te,0,W.length-1),L&&L.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(d){let L=new Ei;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function so(R){let d=+R;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:Jn(String(R))}function ti(R,d,L,W){for(;L>1],ue=L-1,me=W+1;for(;;){do ue++;while(R[ue]te);if(ue>=me)break;bi(R,ue,me),bi(d,3*ue,3*me),bi(d,3*ue+1,3*me+1),bi(d,3*ue+2,3*me+2)}me-L`u_${te}`),this.type=W}setUniform(d,L,W){d.set(W.constantOr(this.value))}getBinding(d,L,W){return this.type==="color"?new zs(d,L):new ro(d,L)}}class Zo{constructor(d,L){this.uniformNames=L.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,W,te){let ue=null;te==="u_pattern_to"?ue=this.patternTo:te==="u_pattern_from"?ue=this.patternFrom:te==="u_dasharray_to"?ue=this.dashTo:te==="u_dasharray_from"?ue=this.dashFrom:te==="u_pixel_ratio_to"?ue=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(ue=this.pixelRatioFrom),ue!==null&&d.set(ue)}getBinding(d,L,W){return W.startsWith("u_pattern")||W.startsWith("u_dasharray_")?new Mo(d,L):new ro(d,L)}}class es{constructor(d,L,W,te){this.expression=d,this.type=W,this.maxValue=0,this.paintVertexAttributes=L.map(ue=>({name:`a_${ue}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,W){let te=this.paintVertexArray.length,ue=this.expression.evaluate(new oi(0,W),L,{},W.canonical,[],W.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(0,ue),W,te);this._setPaintValue(d,L,me)}_setPaintValue(d,L,W){if(this.type==="color"){let te=So(W);for(let ue=d;ue`u_${ge}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=L.map(ge=>({name:`a_${ge}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new me}populatePaintArray(d,L,W){let te=this.expression.evaluate(new oi(this.zoom,W),L,{},W.canonical,[],W.formattedSection),ue=this.expression.evaluate(new oi(this.zoom+1,W),L,{},W.canonical,[],W.formattedSection),me=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(me,d,te,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(this.zoom,ue),W,te),ge=this.expression.evaluate(new oi(this.zoom+1,ue),W,te);this._setPaintValue(d,L,me,ge)}_setPaintValue(d,L,W,te){if(this.type==="color"){let ue=So(W),me=So(te);for(let ge=d;ge`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof es||W instanceof $o)for(let te of W.paintVertexAttributes)d.push(te.name);else if(W instanceof _s){let te=W.getVertexAttributes();for(let ue of te)d.push(ue.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof Ws||W instanceof Zo||W instanceof $o)for(let te of W.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let W=[];for(let te in this.binders){let ue=this.binders[te];if(ue instanceof Ws||ue instanceof Zo||ue instanceof $o){for(let me of ue.uniformNames)if(L[me]){let ge=ue.getBinding(d,L[me],me);W.push({name:me,property:te,binding:ge})}}}return W}setUniforms(d,L,W,te){for(let{name:ue,property:me,binding:ge}of L)this.binders[me].setUniform(ge,te,W.get(me),ue)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let W=this.binders[L];if(d&&W instanceof _s){let te=d.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof es||W instanceof $o)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(d){for(let L in this.binders){let W=this.binders[L];(W instanceof es||W instanceof $o||W instanceof _s)&&W.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof es||L instanceof $o||L instanceof _s)&&L.destroy()}}}class mo{constructor(d,L,W=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Ll(te,L,W);this.needsUpload=!1,this._featureMap=new Ei,this._bufferOffset=0}populatePaintArrays(d,L,W,te){for(let ue in this.programConfigurations)this.programConfigurations[ue].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,W,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,W,te){for(let ue of W)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(d,this._featureMap,L,ue,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(R,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-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${d}-`,"").replace(/-/g,"_")]}function Rs(R,d,L){let W={color:{source:Vr,composite:N},number:{source:xi,composite:Vr}},te=function(ue){return{"line-pattern":{source:vr,composite:vr},"fill-pattern":{source:vr,composite:vr},"fill-extrusion-pattern":{source:vr,composite:vr},"line-dasharray":{source:Or,composite:Or}}[ue]}(R);return te?.[L]||W[d][L]}fi("ConstantBinder",Ws),fi("CrossFadedConstantBinder",Zo),fi("SourceExpressionBinder",es),fi("CrossFadedPatternBinder",Go),fi("CrossFadedDasharrayBinder",Ys),fi("CompositeExpressionBinder",$o),fi("ProgramConfiguration",Ll,{omit:["_buffers"]}),fi("ProgramConfigurationSet",mo);let Yu=Math.pow(2,14)-1,Ul=-Yu-1;function ql(R){let d=F/R.extent,L=R.loadGeometry();for(let W of L)for(let te of W){let ue=Math.round(te.x*d),me=Math.round(te.y*d);te.x=se(ue,Ul,Yu),te.y=se(me,Ul,Yu),(uete.x+1||mete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function fo(R,d){return{type:R.type,id:R.id,properties:R.properties,geometry:d?ql(R):[]}}let Xo=-32768;function Os(R,d,L,W,te){R.emplaceBack(Xo+8*d+W,Xo+8*L+te)}class ra{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new Ut,this.indexArray=new ua,this.segments=new Fa,this.programConfigurations=new mo(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){let te=this.layers[0],ue=[],me=null,ge=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let Oe=te;me=Oe.layout.get("circle-sort-key"),ge=!me.isConstant(),Ce||(Ce=Oe.paint.get("circle-pitch-alignment")==="map")}let Te=Ce?L.subdivisionGranularity.circle:1;for(let{feature:Oe,id:Pe,index:it,sourceLayerIndex:He}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=fo(Oe,bt);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Et,W))continue;let Qt=ge?me.evaluate(Et,{},W):void 0,er={id:Pe,properties:Oe.properties,type:Oe.type,sourceLayerIndex:He,index:it,geometry:bt?Et.geometry:ql(Oe),patterns:{},sortKey:Qt};ue.push(er)}ge&&ue.sort((Oe,Pe)=>Oe.sortKey-Pe.sortKey);for(let Oe of ue){let{geometry:Pe,index:it,sourceLayerIndex:He}=Oe,bt=d[it].feature;this.addFeature(Oe,Pe,it,W,Te),L.featureIndex.insert(bt,Pe,it,He,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,da),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,L,W,te,ue=1){let me;switch(ue){case 1:me=[0,7];break;case 3:me=[0,2,5,7];break;case 5:me=[0,1,3,4,6,7];break;case 7:me=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${ue}; valid values are 1, 3, 5, 7.`)}let ge=me.length;for(let Ce of L)for(let Te of Ce){let Oe=Te.x,Pe=Te.y;if(Oe<0||Oe>=F||Pe<0||Pe>=F)continue;let it=this.segments.prepareSegment(ge*ge,this.layoutVertexArray,this.indexArray,d.sortKey),He=it.vertexLength;for(let bt=0;bt1){if(Is(R,d))return!0;for(let W of d)if(Wr(W,R,L))return!0}for(let W of R)if(Wr(W,d,L))return!0;return!1}function Is(R,d){if(R.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function pa(R,d){let L,W,te,ue=!1;for(let me of R){L=me;for(let ge=0,Ce=L.length-1;ged.y!=te.y>d.y&&d.x<(te.x-W.x)*(d.y-W.y)/(te.y-W.y)+W.x&&(ue=!ue)}return ue}function Wa(R,d){let L=!1;for(let W=0,te=R.length-1;Wd.y!=me.y>d.y&&d.x<(me.x-ue.x)*(d.y-ue.y)/(me.y-ue.y)+ue.x&&(L=!L)}return L}function ln(R,d,L){let W=L[0],te=L[2];if(R.xte.x&&d.x>te.x||R.yte.y&&d.y>te.y)return!1;let ue=ae(R,d,L[0]);return ue!==ae(R,d,L[1])||ue!==ae(R,d,L[2])||ue!==ae(R,d,L[3])}function Le(R,d,L){let W=d.paint.get(R).value;return W.kind==="constant"?W.value:L.programConfigurations.get(d.id).getMaxValue(R)}function Ue(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qe(R,d,L,W,te){if(!d[0]&&!d[1])return R;let ue=t.convert(d)._mult(te);L==="viewport"&&ue._rotate(-W);let me=[];for(let ge of R)me.push(ge.sub(ue));return me}function _t(R){let d=[];for(let L=0;LQa(sr,Qt,er,br))}(Te,ue,ge,Ce),bt=Oe),va({queryGeometry:He,size:bt,transform:ue,unwrappedTileID:ge,getElevation:Ce,pitchAlignment:it,pitchScale:Pe},te)}}class _n extends ra{}let Sn;fi("HeatmapBucket",_n,{omit:["layers"]});var Bn={get paint(){return Sn=Sn||new Ps({"heatmap-radius":new wi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new wi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new hi(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new hi(ht.paint_heatmap["heatmap-opacity"])})}};function Zn(R,{width:d,height:L},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*W}`)}else te=new Uint8Array(d*L*W);return R.width=d,R.height=L,R.data=te,R}function Ci(R,{width:d,height:L},W){if(d===R.width&&L===R.height)return;let te=Zn({},{width:d,height:L},W);qo(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,d),height:Math.min(R.height,L)},W),R.width=d,R.height=L,R.data=te.data}function qo(R,d,L,W,te,ue){if(te.width===0||te.height===0)return d;if(te.width>R.width||te.height>R.height||L.x>R.width-te.width||L.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||W.x>d.width-te.width||W.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let me=R.data,ge=d.data;if(me===ge)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[R.evaluationKey]=Ce;let Te=R.expression.evaluate(d);te.setPixel(me/4/L,ge/4,Te)};if(R.clips)for(let me=0,ge=0;methis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,W){return d*this.redFactor+L*this.greenFactor+W*this.blueFactor-this.baseShift}pack(d){return gp(d,this.getUnpackVector())}getPixels(){return new ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,W){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,ue=L*this.dim+this.dim,me=W*this.dim,ge=W*this.dim+this.dim;switch(L){case-1:te=ue-1;break;case 1:ue=te+1}switch(W){case-1:me=ge-1;break;case 1:ge=me+1}let Ce=-L*this.dim,Te=-W*this.dim;for(let Oe=me;Oe0)for(let me=d;me=d;me-=W)ue=m4(me/W|0,R[me],R[me+1],ue);return ue&&g0(ue,ue.next)&&(Ag(ue),ue=ue.next),ue}function Hd(R,d){if(!R)return R;d||(d=R);let L,W=R;do if(L=!1,W.steiner||!g0(W,W.next)&&Xu(W.prev,W,W.next)!==0)W=W.next;else{if(Ag(W),W=d=W.prev,W===W.next)break;L=!0}while(L||W!==d);return d}function _p(R,d,L,W,te,ue,me){if(!R)return;!me&&ue&&function(Ce,Te,Oe,Pe){let it=Ce;do it.z===0&&(it.z=t3(it.x,it.y,Te,Oe,Pe)),it.prevZ=it.prev,it.nextZ=it.next,it=it.next;while(it!==Ce);it.prevZ.nextZ=null,it.prevZ=null,function(He){let bt,Et=1;do{let Qt,er=He;He=null;let br=null;for(bt=0;er;){bt++;let sr=er,Mr=0;for(let $r=0;$r0||qr>0&&sr;)Mr!==0&&(qr===0||!sr||er.z<=sr.z)?(Qt=er,er=er.nextZ,Mr--):(Qt=sr,sr=sr.nextZ,qr--),br?br.nextZ=Qt:He=Qt,Qt.prevZ=br,br=Qt;er=sr}br.nextZ=null,Et*=2}while(bt>1)}(it)}(R,W,te,ue);let ge=R;for(;R.prev!==R.next;){let Ce=R.prev,Te=R.next;if(ue?GH(R,W,te,ue):bg(R))d.push(Ce.i,R.i,Te.i),Ag(R),R=Te.next,ge=Te.next;else if((R=Te)===ge){me?me===1?_p(R=HH(Hd(R),d),d,L,W,te,ue,2):me===2&&WH(R,d,L,W,te,ue):_p(Hd(R),d,L,W,te,ue,1);break}}}function bg(R){let d=R.prev,L=R,W=R.next;if(Xu(d,L,W)>=0)return!1;let te=d.x,ue=L.x,me=W.x,ge=d.y,Ce=L.y,Te=W.y,Oe=Math.min(te,ue,me),Pe=Math.min(ge,Ce,Te),it=Math.max(te,ue,me),He=Math.max(ge,Ce,Te),bt=W.next;for(;bt!==d;){if(bt.x>=Oe&&bt.x<=it&&bt.y>=Pe&&bt.y<=He&&wg(te,ge,ue,Ce,me,Te,bt.x,bt.y)&&Xu(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function GH(R,d,L,W){let te=R.prev,ue=R,me=R.next;if(Xu(te,ue,me)>=0)return!1;let ge=te.x,Ce=ue.x,Te=me.x,Oe=te.y,Pe=ue.y,it=me.y,He=Math.min(ge,Ce,Te),bt=Math.min(Oe,Pe,it),Et=Math.max(ge,Ce,Te),Qt=Math.max(Oe,Pe,it),er=t3(He,bt,d,L,W),br=t3(Et,Qt,d,L,W),sr=R.prevZ,Mr=R.nextZ;for(;sr&&sr.z>=er&&Mr&&Mr.z<=br;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0||(sr=sr.prevZ,Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;sr&&sr.z>=er;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0)return!1;sr=sr.prevZ}for(;Mr&&Mr.z<=br;){if(Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function HH(R,d){let L=R;do{let W=L.prev,te=L.next.next;!g0(W,te)&&p4(W,L,L.next,te)&&Tg(W,te)&&Tg(te,W)&&(d.push(W.i,L.i,te.i),Ag(L),Ag(L.next),L=R=te),L=L.next}while(L!==R);return Hd(L)}function WH(R,d,L,W,te,ue){let me=R;do{let ge=me.next.next;for(;ge!==me.prev;){if(me.i!==ge.i&&KH(me,ge)){let Ce=v4(me,ge);return me=Hd(me,me.next),Ce=Hd(Ce,Ce.next),_p(me,d,L,W,te,ue,0),void _p(Ce,d,L,W,te,ue,0)}ge=ge.next}me=me.next}while(me!==R)}function YH(R,d){let L=R.x-d.x;return L===0&&(L=R.y-d.y,L===0)&&(L=(R.next.y-R.y)/(R.next.x-R.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function XH(R,d){let L=function(te,ue){let me=ue,ge=te.x,Ce=te.y,Te,Oe=-1/0;if(g0(te,me))return me;do{if(g0(te,me.next))return me.next;if(Ce<=me.y&&Ce>=me.next.y&&me.next.y!==me.y){let Et=me.x+(Ce-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Et<=ge&&Et>Oe&&(Oe=Et,Te=me.x=me.x&&me.x>=it&&ge!==me.x&&d4(CeTe.x||me.x===Te.x&&ZH(Te,me)))&&(Te=me,bt=Et)}me=me.next}while(me!==Pe);return Te}(R,d);if(!L)return d;let W=v4(L,R);return Hd(W,W.next),Hd(L,L.next)}function ZH(R,d){return Xu(R.prev,R,d.prev)<0&&Xu(d.next,R,R.next)<0}function t3(R,d,L,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-L)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-W)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function $H(R){let d=R,L=R;do(d.x=(R-me)*(ue-ge)&&(R-me)*(W-ge)>=(L-me)*(d-ge)&&(L-me)*(ue-ge)>=(te-me)*(W-ge)}function wg(R,d,L,W,te,ue,me,ge){return!(R===me&&d===ge)&&d4(R,d,L,W,te,ue,me,ge)}function KH(R,d){return R.next.i!==d.i&&R.prev.i!==d.i&&!function(L,W){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==W.i&&te.next.i!==W.i&&p4(te,te.next,L,W))return!0;te=te.next}while(te!==L);return!1}(R,d)&&(Tg(R,d)&&Tg(d,R)&&function(L,W){let te=L,ue=!1,me=(L.x+W.x)/2,ge=(L.y+W.y)/2;do te.y>ge!=te.next.y>ge&&te.next.y!==te.y&&me<(te.next.x-te.x)*(ge-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==L);return ue}(R,d)&&(Xu(R.prev,R,d.prev)||Xu(R,d.prev,d))||g0(R,d)&&Xu(R.prev,R,R.next)>0&&Xu(d.prev,d,d.next)>0)}function Xu(R,d,L){return(d.y-R.y)*(L.x-d.x)-(d.x-R.x)*(L.y-d.y)}function g0(R,d){return R.x===d.x&&R.y===d.y}function p4(R,d,L,W){let te=fy(Xu(R,d,L)),ue=fy(Xu(R,d,W)),me=fy(Xu(L,W,R)),ge=fy(Xu(L,W,d));return te!==ue&&me!==ge||!(te!==0||!cy(R,L,d))||!(ue!==0||!cy(R,W,d))||!(me!==0||!cy(L,R,W))||!(ge!==0||!cy(L,d,W))}function cy(R,d,L){return d.x<=Math.max(R.x,L.x)&&d.x>=Math.min(R.x,L.x)&&d.y<=Math.max(R.y,L.y)&&d.y>=Math.min(R.y,L.y)}function fy(R){return R>0?1:R<0?-1:0}function Tg(R,d){return Xu(R.prev,R,R.next)<0?Xu(R,d,R.next)>=0&&Xu(R,R.prev,d)>=0:Xu(R,d,R.prev)<0||Xu(R,R.next,d)<0}function v4(R,d){let L=r3(R.i,R.x,R.y),W=r3(d.i,d.x,d.y),te=R.next,ue=d.prev;return R.next=d,d.prev=R,L.next=te,te.prev=L,W.next=L,L.prev=W,ue.next=W,W.prev=ue,W}function m4(R,d,L,W){let te=r3(R,d,L);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ag(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function r3(R,d,L){return{i:R,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class y0{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let W=0|Math.round(d),te=0|Math.round(L),ue=this._getKey(W,te);if(this._vertexDictionary.has(ue))return this._vertexDictionary.get(ue);let me=this._vertexBuffer.length/2;return this._vertexDictionary.set(ue,me),this._vertexBuffer.push(W,te),me}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,ue){let me=[];for(let ge=0;ge0?(me.push(Ce),me.push(Oe),me.push(Te)):(me.push(Ce),me.push(Te),me.push(Oe))}return me}(this._vertexBuffer,d);let L=[],W=d.length;for(let te=0;te=1||qr<=0)||er&&(Teue)){Pe>=te&&Pe<=ue&&me.push(W[(ge+1)%3]);continue}!er&&Mr>0&&me.push(this._vertexToIndex(Ce+bt*Mr,Te+Et*Mr));let $r=Ce+bt*Math.max(Mr,0),_a=Ce+bt*Math.min(qr,1);Qt||this._generateIntraEdgeVertices(me,Ce,Te,Oe,Pe,$r,_a),!er&&qr<1&&me.push(this._vertexToIndex(Ce+bt*qr,Te+Et*qr)),(er||Pe>=te&&Pe<=ue)&&me.push(W[(ge+1)%3]),!er&&(Pe<=te||Pe>=ue)&&this._generateInterEdgeVertices(me,Ce,Te,Oe,Pe,it,He,_a,te,ue)}return me}_generateIntraEdgeVertices(d,L,W,te,ue,me,ge){let Ce=te-L,Te=ue-W,Oe=Te===0,Pe=Oe?Math.min(L,te):Math.min(me,ge),it=Oe?Math.max(L,te):Math.max(me,ge),He=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(it/this._granularityCellSize)-1;if(Oe?L=He;Et--){let Qt=Et*this._granularityCellSize;d.push(this._vertexToIndex(Qt,W+Te*(Qt-L)/Ce))}}_generateInterEdgeVertices(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=ue-W,it=me-te,He=ge-ue,bt=(Te-ue)/He,Et=(Oe-ue)/He,Qt=Math.min(bt,Et),er=Math.max(bt,Et),br=te+it*Qt,sr=Math.floor(Math.min(br,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(br,Ce)/this._granularityCellSize)-1,qr=Ce=1||er<=0){let Ca=W-ge,nn=me+(L-me)*Math.min((Te-ge)/Ca,(Oe-ge)/Ca);sr=Math.floor(Math.min(nn,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(nn,Ce)/this._granularityCellSize)-1,qr=Ce0?Oe:Te;if(qr)for(let Ca=sr;Ca<=Mr;Ca++)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a));else for(let Ca=Mr;Ca>=sr;Ca--)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a))}_generateOutline(d){let L=[];for(let W of d){let te=Sv(W,this._granularity,!0),ue=this._pointArrayToIndices(te),me=[];for(let ge=1;geue!=(me===_0)?(d.push(L),d.push(W),d.push(this._vertexToIndex(te,me)),d.push(W),d.push(this._vertexToIndex(ue,me)),d.push(this._vertexToIndex(te,me))):(d.push(W),d.push(L),d.push(this._vertexToIndex(te,me)),d.push(this._vertexToIndex(ue,me)),d.push(W),d.push(this._vertexToIndex(te,me)))}_fillPoles(d,L,W){let te=this._vertexBuffer,ue=F,me=d.length;for(let ge=2;ge80*Pe){Qt=Te[0],er=Te[1];let sr=Qt,Mr=er;for(let qr=Pe;qrsr&&(sr=$r),_a>Mr&&(Mr=_a)}br=Math.max(sr-Qt,Mr-er),br=br!==0?32767/br:0}return _p(bt,Et,Pe,Qt,er,br,0),Et}(W,te),Ce=this._convertIndices(W,ge);ue=this._subdivideTrianglesScanline(Ce)}catch(ge){console.error(ge)}let me=[];return L&&(me=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(ue),{verticesFlattened:this._vertexBuffer,indicesTriangles:ue,indicesLineList:me}}_convertIndices(d,L){let W=[];for(let te of L)W.push(this._vertexToIndex(d[2*te],d[2*te+1]));return W}_pointArrayToIndices(d){let L=[];for(let W of d)L.push(this._vertexToIndex(W.x,W.y));return L}}function g4(R,d,L,W=!0){return new JH(L,d).subdividePolygonInternal(R,W)}function Sv(R,d,L=!1){if(!R||R.length<1)return[];if(R.length<2)return[];let W=R[0],te=R[R.length-1],ue=L&&(W.x!==te.x||W.y!==te.y);if(d<2)return ue?[...R,R[0]]:[...R];let me=Math.floor(F/d),ge=[];ge.push(new t(R[0].x,R[0].y));let Ce=R.length,Te=ue?Ce:Ce-1;for(let Oe=0;Oe0?(Math.floor(_a/me)+1)*me:(Math.ceil(_a/me)-1)*me,bn=Mr>0?(Math.floor(Ca/me)+1)*me:(Math.ceil(Ca/me)-1)*me,Fn=Math.abs(_a-qa),gn=Math.abs(Ca-bn),Va=Math.abs(_a-Et),Hn=Math.abs(Ca-Qt),ni=er?Fn/qr:Number.POSITIVE_INFINITY,Wn=br?gn/$r:Number.POSITIVE_INFINITY;if((Va<=Fn||!er)&&(Hn<=gn||!br))break;if(ni=0?me-1:ue-1,Te=(ge+1)%ue,Oe=R[2*d[Ce]],Pe=R[2*d[Te]],it=R[2*d[me]],He=R[2*d[me]+1],bt=R[2*d[ge]+1],Et=!1;if(OePe)Et=!1;else{let Qt=bt-He,er=-(R[2*d[ge]]-it),br=He((Pe-it)*Qt+(R[2*d[Te]+1]-He)*er)*br&&(Et=!0)}if(Et){let Qt=d[Ce],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),me--,me<0&&(me=ue-1)}else{let Qt=d[Te],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),ge++,ge>=ue&&(ge=0)}if(Ce===Te)break}}function y4(R,d,L,W,te,ue,me,ge,Ce){let Te=te.length/2,Oe=me&&ge&&Ce;if(TeFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,Fn=!0,qr=0);let gn=Sg(er,bt,Qt,br,_a,qa,Mr),Va=Sg(er,bt,Qt,br,Ca,bn,Mr),Hn=Sg(er,bt,Qt,br,nn,Fn,Mr);He.emplaceBack(qr+gn-sr,qr+Va-sr,qr+Hn-sr),Mr.primitiveLength++}})(d,L,W,te,ue,R),Oe&&function(Pe,it,He,bt,Et,Qt){let er=[];for(let $r=0;$rFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,qr=0);let Fn=Sg(er,bt,Qt,br,Ca,qa,Mr),gn=Sg(er,bt,Qt,br,nn,bn,Mr);He.emplaceBack(qr+Fn-sr,qr+gn-sr),Mr.primitiveLength++}}(me,L,ge,te,Ce,R),d.forceNewSegmentOnNextPrepare(),me?.forceNewSegmentOnNextPrepare()}function Sg(R,d,L,W,te,ue,me){if(ue){let ge=W.count;return L(d[2*te],d[2*te+1]),R[te]=W.count,W.count++,me.vertexLength++,ge}return R[te]}class a3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new ir,this.indexArray=new ua,this.indexArray2=new ia,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.segments2=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W,L.availableImages):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;if(this.hasDependencies){let Pe=v0("fill",this.layers,ge,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(ge,Ce,Te,W,{},L.subdivisionGranularity);L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}addFeatures(d,L,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,W,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,p0),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,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce=g4(ge,te,me.fill.getGranularityForZoomLevel(te.z)),Te=this.layoutVertexArray;y4((Oe,Pe)=>{Te.emplaceBack(Oe,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,canonical:te})}}let _4,x4;fi("FillBucket",a3,{omit:["layers","patternFeatures"]});var eW={get paint(){return x4=x4||new Ps({"fill-antialias":new hi(ht.paint_fill["fill-antialias"]),"fill-opacity":new wi(ht.paint_fill["fill-opacity"]),"fill-color":new wi(ht.paint_fill["fill-color"]),"fill-outline-color":new wi(ht.paint_fill["fill-outline-color"]),"fill-translate":new hi(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new hi(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new sl(ht.paint_fill["fill-pattern"])})},get layout(){return _4=_4||new Ps({"fill-sort-key":new wi(ht.layout_fill["fill-sort-key"])})}};class tW extends ll{constructor(d,L){super(d,eW,L)}recalculate(d,L){super.recalculate(d,L);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new a3(d)}queryRadius(){return Ue(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:W,pixelsToTileUnits:te}){return Bi(Qe(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-W.bearingInRadians,te),L)}isTileClipped(){return!0}}let rW=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),aW=ct([{name:"a_centroid",components:2,type:"Int16"}],4),{members:nW}=rW;class Eg{constructor(d,L,W,te,ue){this.properties={},this.extent=W,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=ue,d.readFields(iW,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=[],te,ue=1,me=0,ge=0,Ce=0;for(;d.pos>3}if(me--,ue===1||ue===2)ge+=d.readSVarint(),Ce+=d.readSVarint(),ue===1&&(te&&W.push(te),te=[]),te&&te.push(new t(ge,Ce));else{if(ue!==7)throw new Error(`unknown command ${ue}`);te&&te.push(te[0].clone())}}return te&&W.push(te),W}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=1,te=0,ue=0,me=0,ge=1/0,Ce=-1/0,Te=1/0,Oe=-1/0;for(;d.pos>3}if(te--,W===1||W===2)ue+=d.readSVarint(),me+=d.readSVarint(),ueCe&&(Ce=ue),meOe&&(Oe=me);else if(W!==7)throw new Error(`unknown command ${W}`)}return[ge,Te,Ce,Oe]}toGeoJSON(d,L,W){let te=this.extent*Math.pow(2,W),ue=this.extent*d,me=this.extent*L,ge=this.loadGeometry();function Ce(it){return[360*(it.x+ue)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(it.y+me)/te)*Math.PI))-90]}function Te(it){return it.map(Ce)}let Oe;if(this.type===1){let it=[];for(let bt of ge)it.push(bt[0]);let He=Te(it);Oe=it.length===1?{type:"Point",coordinates:He[0]}:{type:"MultiPoint",coordinates:He}}else if(this.type===2){let it=ge.map(Te);Oe=it.length===1?{type:"LineString",coordinates:it[0]}:{type:"MultiLineString",coordinates:it}}else{if(this.type!==3)throw new Error("unknown feature type");{let it=b4(ge),He=[];for(let bt of it)He.push(bt.map(Te));Oe=He.length===1?{type:"Polygon",coordinates:He[0]}:{type:"MultiPolygon",coordinates:He}}}let Pe={type:"Feature",geometry:Oe,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function iW(R,d,L){R===1?d.id=L.readVarint():R===2?function(W,te){let ue=W.readVarint()+W.pos;for(;W.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new Eg(this._pbf,L,this.extent,this._keys,this._values)}}function lW(R,d,L){R===15?d.version=L.readVarint():R===1?d.name=L.readString():R===5?d.extent=L.readVarint():R===2?d._features.push(L.pos):R===3?d._keys.push(L.readString()):R===4&&d._values.push(function(W){let te=null,ue=W.readVarint()+W.pos;for(;W.pos>3;te=me===1?W.readString():me===2?W.readFloat():me===3?W.readDouble():me===4?W.readVarint64():me===5?W.readVarint():me===6?W.readSVarint():me===7?W.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class w4{constructor(d,L){this.layers=d.readFields(uW,{},L)}}function uW(R,d,L){if(R===3){let W=new sW(L,L.readVarint()+L.pos);W.length&&(d[W.name]=W)}}let n3=Math.pow(2,13);function kg(R,d,L,W,te,ue,me,ge){R.emplaceBack(d,L,2*Math.floor(W*n3)+me,te*n3*2,ue*n3*2,Math.round(ge))}class i3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new dr,this.centroidVertexArray=new It,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.features=[],this.hasDependencies=Md("fill-extrusion",this.layers,L);for(let{feature:te,id:ue,index:me,sourceLayerIndex:ge}of d){let Ce=this.layers[0]._featureFilter.needGeometry,Te=fo(te,Ce);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Te,W))continue;let Oe={id:ue,sourceLayerIndex:ge,index:me,geometry:Ce?Te.geometry:ql(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(v0("fill-extrusion",this.layers,Oe,{zoom:this.zoom},L)):this.addFeature(Oe,Oe.geometry,me,W,{},L.subdivisionGranularity),L.featureIndex.insert(te,Oe.geometry,me,ge,this.index,!0)}}addFeatures(d,L,W){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,L,W,d.subdivisionGranularity)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}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,nW),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,aW.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,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce={x:0,y:0,sampleCount:0},Te=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,ge,me);let Oe=this.layoutVertexArray.length-Te,Pe=Math.floor(Ce.x/Ce.sampleCount),it=Math.floor(Ce.y/Ce.sampleCount);for(let He=0;He{kg(Oe,Pe,it,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,Te.verticesFlattened,Te.indicesTriangles)}_generateSideFaces(d,L){let W=0;for(let te=1;teFa.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ge=ue.sub(me)._perp()._unit(),Ce=me.dist(ue);W+Ce>32768&&(W=0),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,1,W),W+=Ce,kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,1,W);let Te=L.segment.vertexLength;this.indexArray.emplaceBack(Te,Te+2,Te+1),this.indexArray.emplaceBack(Te+1,Te+2,Te+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function cW(R,d){for(let L=0;LF)||R.y===d.y&&(R.y<0||R.y>F)}function T4(R){return R.every(d=>d.x<0)||R.every(d=>d.x>F)||R.every(d=>d.y<0)||R.every(d=>d.y>F)}let A4;fi("FillExtrusionBucket",i3,{omit:["layers","features"]});var hW={get paint(){return A4=A4||new Ps({"fill-extrusion-opacity":new hi(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new wi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new sl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new wi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new wi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new hi(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class dW extends ll{constructor(d,L){super(d,hW,L)}createBucket(d){return new i3(d)}queryRadius(){return Ue(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me,pixelPosMatrix:ge}){let Ce=Qe(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-ue.bearingInRadians,me),Te=this.paint.get("fill-extrusion-height").evaluate(L,W),Oe=this.paint.get("fill-extrusion-base").evaluate(L,W),Pe=function(He,bt){let Et=[];for(let Qt of He){let er=[Qt.x,Qt.y,0,1];z(er,er,bt),Et.push(new t(er[0]/er[3],er[1]/er[3]))}return Et}(Ce,ge),it=function(He,bt,Et,Qt){let er=[],br=[],sr=Qt[8]*bt,Mr=Qt[9]*bt,qr=Qt[10]*bt,$r=Qt[11]*bt,_a=Qt[8]*Et,Ca=Qt[9]*Et,nn=Qt[10]*Et,qa=Qt[11]*Et;for(let bn of He){let Fn=[],gn=[];for(let Va of bn){let Hn=Va.x,ni=Va.y,Wn=Qt[0]*Hn+Qt[4]*ni+Qt[12],si=Qt[1]*Hn+Qt[5]*ni+Qt[13],po=Qt[2]*Hn+Qt[6]*ni+Qt[14],cs=Qt[3]*Hn+Qt[7]*ni+Qt[15],Ds=po+qr,Xs=cs+$r,Mf=Wn+_a,vu=si+Ca,yc=po+nn,Dc=cs+qa,Hl=new t((Wn+sr)/Xs,(si+Mr)/Xs);Hl.z=Ds/Xs,Fn.push(Hl);let rf=new t(Mf/Dc,vu/Dc);rf.z=yc/Dc,gn.push(rf)}er.push(Fn),br.push(gn)}return[er,br]}(te,Oe,Te,ge);return function(He,bt,Et){let Qt=1/0;Bi(Et,bt)&&(Qt=M4(Et,bt[0]));for(let er=0;er>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=S4[15&W];if(!ue)throw new Error("Unrecognized array type.");let[me]=new Uint16Array(d,2,1),[ge]=new Uint32Array(d,4,1);return new dy(ge,me,ue,d)}constructor(d,L=64,W=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=W,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let ue=S4.indexOf(this.ArrayType),me=2*d*this.ArrayType.BYTES_PER_ELEMENT,ge=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-ge%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+me+ge+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=d,this.coords[this._pos++]=L,W}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return o3(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:me,nodeSize:ge}=this,Ce=[0,ue.length-1,0],Te=[];for(;Ce.length;){let Oe=Ce.pop()||0,Pe=Ce.pop()||0,it=Ce.pop()||0;if(Pe-it<=ge){for(let Qt=it;Qt<=Pe;Qt++){let er=me[2*Qt],br=me[2*Qt+1];er>=d&&er<=W&&br>=L&&br<=te&&Te.push(ue[Qt])}continue}let He=it+Pe>>1,bt=me[2*He],Et=me[2*He+1];bt>=d&&bt<=W&&Et>=L&&Et<=te&&Te.push(ue[He]),(Oe===0?d<=bt:L<=Et)&&(Ce.push(it),Ce.push(He-1),Ce.push(1-Oe)),(Oe===0?W>=bt:te>=Et)&&(Ce.push(He+1),Ce.push(Pe),Ce.push(1-Oe))}return Te}within(d,L,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:me}=this,ge=[0,te.length-1,0],Ce=[],Te=W*W;for(;ge.length;){let Oe=ge.pop()||0,Pe=ge.pop()||0,it=ge.pop()||0;if(Pe-it<=me){for(let Qt=it;Qt<=Pe;Qt++)k4(ue[2*Qt],ue[2*Qt+1],d,L)<=Te&&Ce.push(te[Qt]);continue}let He=it+Pe>>1,bt=ue[2*He],Et=ue[2*He+1];k4(bt,Et,d,L)<=Te&&Ce.push(te[He]),(Oe===0?d-W<=bt:L-W<=Et)&&(ge.push(it),ge.push(He-1),ge.push(1-Oe)),(Oe===0?d+W>=bt:L+W>=Et)&&(ge.push(He+1),ge.push(Pe),ge.push(1-Oe))}return Ce}}function o3(R,d,L,W,te,ue){if(te-W<=L)return;let me=W+te>>1;E4(R,d,me,W,te,ue),o3(R,d,L,W,me-1,1-ue),o3(R,d,L,me+1,te,1-ue)}function E4(R,d,L,W,te,ue){for(;te>W;){if(te-W>600){let Te=te-W+1,Oe=L-W+1,Pe=Math.log(Te),it=.5*Math.exp(2*Pe/3),He=.5*Math.sqrt(Pe*it*(Te-it)/Te)*(Oe-Te/2<0?-1:1);E4(R,d,L,Math.max(W,Math.floor(L-Oe*it/Te+He)),Math.min(te,Math.floor(L+(Te-Oe)*it/Te+He)),ue)}let me=d[2*L+ue],ge=W,Ce=te;for(Lg(R,d,W,L),d[2*te+ue]>me&&Lg(R,d,W,te);geme;)Ce--}d[2*W+ue]===me?Lg(R,d,W,Ce):(Ce++,Lg(R,d,Ce,te)),Ce<=L&&(W=Ce+1),L<=Ce&&(te=Ce-1)}}function Lg(R,d,L,W){s3(R,L,W),s3(d,2*L,2*W),s3(d,2*L+1,2*W+1)}function s3(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function k4(R,d,L,W){let te=R-L,ue=d-W;return te*te+ue*ue}function l3(R,d,L,W){let te=W,ue=d+(L-d>>1),me,ge=L-d,Ce=R[d],Te=R[d+1],Oe=R[L],Pe=R[L+1];for(let it=d+3;itte)me=it,te=He;else if(He===te){let bt=Math.abs(it-ue);btW&&(me-d>3&&l3(R,d,me,W),R[me+2]=te,L-me>3&&l3(R,me,L,W))}function pW(R,d,L,W,te,ue){let me=te-L,ge=ue-W;if(me!==0||ge!==0){let Ce=((R-L)*me+(d-W)*ge)/(me*me+ge*ge);Ce>1?(L=te,W=ue):Ce>0&&(L+=me*Ce,W+=ge*Ce)}return me=R-L,ge=d-W,me*me+ge*ge}function tf(R,d,L,W){let te={type:d,geom:L},ue={id:R??null,type:te.type,geometry:te.geom,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":Pg(ue,te.geom);break;case"LineString":Pg(ue,te.geom.points);break;case"Polygon":Pg(ue,te.geom[0].points);break;case"MultiLineString":for(let me of te.geom)Pg(ue,me.points);break;case"MultiPolygon":for(let me of te.geom)Pg(ue,me[0].points)}return ue}function u3(R){R.points.length>64&&(R.points=new Float64Array(R.points))}function Pg(R,d){for(let L=0;L0&&(me+=W?(te*Oe-Te*ue)/2:Math.sqrt(Math.pow(Te-te,2)+Math.pow(Oe-ue,2))),te=Te,ue=Oe}let ge=d.points.length-3;d.points[2]=1,L>0&&l3(d.points,0,ge,L),d.points[ge+2]=1,u3(d),d.size=Math.abs(me),d.start=0,d.end=d.size}function h3(R,d,L,W){for(let te=0;te1?1:L}function vy(R){let d={type:"Feature",geometry:vW(R),properties:R.tags};return R.id!=null&&(d.id=R.id),d}function vW(R){let{type:d,geometry:L}=R;switch(d){case"Point":return{type:d,coordinates:C4(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:my(L)};case"LineString":return{type:d,coordinates:my(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(W=>my(W.points))};case"MultiPolygon":return{type:d,coordinates:L.map(W=>W.map(te=>my(te.points)))}}}function my(R){let d=[];for(let L=0;L=(L/=d)&&me=W)return null;let Ce=[];for(let Te of R){let Oe=te===Wf.X?Te.minX:Te.minY,Pe=te===Wf.X?Te.maxX:Te.maxY;if(Oe>=L&&Pe=W))switch(Te.type){case"Point":case"MultiPoint":mW(Te,Ce,L,W,te);continue;case"LineString":gW(Te,Ce,L,W,te,ge);continue;case"MultiLineString":yW(Te,Ce,L,W,te);continue;case"Polygon":_W(Te,Ce,L,W,te);continue;case"MultiPolygon":xW(Te,Ce,L,W,te);continue}}return Ce.length?Ce:null}function mW(R,d,L,W,te){let ue=[];(function(me,ge,Ce,Te,Oe){for(let Pe=0;Pe=Ce&&it<=Te&&w0(ge,me[Pe],me[Pe+1],me[Pe+2])}})(R.geometry,ue,L,W,te),ue.length&&d.push(tf(R.id,ue.length===3?"Point":"MultiPoint",ue,R.tags))}function gW(R,d,L,W,te,ue){let me=[];if(R4(R.geometry,me,L,W,te,!1,ue.lineMetrics),me.length)if(ue.lineMetrics)for(let ge of me)d.push(tf(R.id,"LineString",ge,R.tags));else d.push(me.length>1?tf(R.id,"MultiLineString",me,R.tags):tf(R.id,"LineString",me[0],R.tags))}function yW(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!1),ue.length&&d.push(ue.length!==1?tf(R.id,"MultiLineString",ue,R.tags):tf(R.id,"LineString",ue[0],R.tags))}function _W(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!0),ue.length&&d.push(tf(R.id,"Polygon",ue,R.tags))}function xW(R,d,L,W,te){let ue=[];for(let me of R.geometry){let ge=[];d3(me,ge,L,W,te,!0),ge.length&&ue.push(ge)}ue.length&&d.push(tf(R.id,"MultiPolygon",ue,R.tags))}function R4(R,d,L,W,te,ue,me){let ge=I4(R),Ce=te===Wf.X?bW:wW,Te,Oe,Pe=R.start;for(let Qt=0;QtL&&(Oe=Ce(ge,er,br,Mr,qr,L),me&&(ge.start=Pe+Te*Oe)):$r>W?_a=L&&(Oe=Ce(ge,er,br,Mr,qr,L),Ca=!0),_a>W&&$r<=W&&(Oe=Ce(ge,er,br,Mr,qr,W),Ca=!0),!ue&&Ca&&(me&&(ge.end=Pe+Te*Oe),d.push(ge),ge=I4(R)),me&&(Pe+=Te)}let it=R.points.length-3,He=R.points[it],bt=R.points[it+1],Et=te===Wf.X?He:bt;Et>=L&&Et<=W&&w0(ge.points,He,bt,R.points[it+2]),it=ge.points.length-3,ue&&it>=3&&(ge.points[it]!==ge.points[0]||ge.points[it+1]!==ge.points[1])&&w0(ge.points,ge.points[0],ge.points[1],ge.points[2]),ge.points.length&&(u3(ge),d.push(ge))}function I4(R){return{points:[],size:R.size,start:R.start,end:R.end}}function d3(R,d,L,W,te,ue){for(let me of R)R4(me,d,L,W,te,ue,!1)}function w0(R,d,L,W){R.push(d,L,W)}function bW(R,d,L,W,te,ue){let me=(ue-d)/(W-d);return w0(R.points,ue,L+(te-L)*me,1),me}function wW(R,d,L,W,te,ue){let me=(ue-L)/(te-L);return w0(R.points,d+(W-d)*me,ue,1),me}function p3(R,d){let L=d.buffer/d.extent,W=R,te=Wd(R,1,-1-L,L,Wf.X,-1,2,d),ue=Wd(R,1,1-L,2+L,Wf.X,-1,2,d);return(te||ue)&&(W=Wd(R,1,-L,1+L,Wf.X,-1,2,d)||[],te&&(W=D4(te,1).concat(W)),ue&&(W=W.concat(D4(ue,-1)))),W}function D4(R,d){let L=[];for(let W of R)switch(W.type){case"Point":case"MultiPoint":{let te=TW(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"LineString":{let te=v3(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let ue of W.geometry)te.push(v3(ue,d));L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiPolygon":{let te=[];for(let ue of W.geometry){let me=[];for(let ge of ue)me.push(v3(ge,d));te.push(me)}L.push(tf(W.id,W.type,te,W.tags));continue}}return L}function TW(R,d){let L=[];for(let W=0;W0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(ue){let ge=R[0],Ce=c3({type:"FeatureCollection",features:[{type:"Feature",id:ge.id,geometry:d.newGeometry,properties:me?F4(ge.tags,d):ge.tags}]},L);return Ce=p3(Ce,L),Ce}if(me){let ge=[];for(let Ce of R){let Te=Li({},Ce);Te.tags=F4(Te.tags,d),ge.push(Te)}return ge}return R}function F4(R,d){if(d.removeAllProperties)return{};let L=Li({},R||{});if(d.removeProperties)for(let W of d.removeProperties)delete L[W];if(d.addOrUpdateProperties)for(let{key:W,value:te}of d.addOrUpdateProperties)L[W]=te;return L}(function(R){R[R.X=0]="X",R[R.Y=1]="Y"})(Wf||(Wf={}));let m3={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:R=>R};class MW{constructor(d){this.options=Object.assign(Object.create(m3),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let W of d){if(!W.geometry)continue;let[te,ue]=W.geometry.coordinates,[me,ge]=[x0(te),b0(ue)];L.push({id:W.id,type:"Point",geometry:[me,ge],tags:W.properties})}this.createIndex(L)}initialize(d){let L=[];for(let W of d)W.type==="Point"&&L.push(W);this.createIndex(L)}updateIndex(d,L,W){this.options=Object.assign(Object.create(m3),W.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:W,maxZoom:te}=this.options;L&&console.time("total time");let ue=`prepare ${d.length} points`;L&&console.time(ue),this.points=d;let me=[];for(let Ce=0;Ce=W;Ce--){let Te=Date.now();ge=this.trees[Ce]=this.createTree(this.cluster(ge,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,ge.numItems,Date.now()-Te)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(W=>vy(W))}getClustersInternal(d,L){let W=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),ue=d[2]===180?180:((d[2]+180)%360+360)%360-180,me=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)W=-180,ue=180;else if(W>ue){let Pe=this.getClustersInternal([W,te,180,me],L),it=this.getClustersInternal([-180,te,ue,me],L);return Pe.concat(it)}let ge=this.trees[this.limitZoom(L)],Ce=ge.range(x0(W),b0(me),x0(ue),b0(te)),Te=ge.flatData,Oe=[];for(let Pe of Ce){let it=this.stride*Pe;Oe.push(Te[it+5]>1?SW(Te,it,this.clusterProps):this.points[Te[it+3]])}return Oe}getChildren(d){let L=this.getOriginId(d),W=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),ue=this.trees[W];if(!ue)throw te;let me=ue.flatData;if(L*this.stride>=me.length)throw te;let ge=this.options.radius/(this.options.extent*Math.pow(2,W-1)),Ce=ue.within(me[L*this.stride],me[L*this.stride+1],ge),Te=[];for(let Oe of Ce){let Pe=Oe*this.stride;me[Pe+4]===d&&Te.push(me[Pe+5]>1?EW(me,Pe,this.clusterProps):vy(this.points[me[Pe+3]]))}if(Te.length===0)throw te;return Te}getLeaves(d,L,W){let te=[];return this.appendLeaves(te,d,L=L||10,W=W||0,0),te}getTile(d,L,W){let te=this.trees[this.limitZoom(d)];if(!te)return null;let ue=Math.pow(2,d),{extent:me,radius:ge}=this.options,Ce=ge/me,Te=(W-Ce)/ue,Oe=(W+1+Ce)/ue,Pe={transformed:!0,features:[],source:null,x:L,y:W,z:d};return this.addTileFeatures(te.range((L-Ce)/ue,Te,(L+1+Ce)/ue,Oe),te.flatData,L,W,ue,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/ue,Te,1,Oe),te.flatData,ue,W,ue,Pe),L===ue-1&&this.addTileFeatures(te.range(0,Te,Ce/ue,Oe),te.flatData,-1,W,ue,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,W,te,ue){let me=this.getChildren(L);for(let ge of me){let Ce=ge.properties;if(Ce?.cluster?ue+Ce.point_count<=te?ue+=Ce.point_count:ue=this.appendLeaves(d,Ce.cluster_id,W,te,ue):ue1,Oe,Pe,it;if(Te)Oe=g3(L,Ce,this.clusterProps),Pe=L[Ce],it=L[Ce+1];else{let Et=this.points[L[Ce+3]];Oe=Et.tags,[Pe,it]=Et.geometry}let He={type:1,geometry:[[Math.round(this.options.extent*(Pe*ue-W)),Math.round(this.options.extent*(it*ue-te))]],tags:Oe},bt;bt=Te||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(He.id=bt),me.features.push(He)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:W,extent:te,reduce:ue,minPoints:me}=this.options,ge=W/(te*Math.pow(2,L)),Ce=d.flatData,Te=[],Oe=this.stride;for(let Pe=0;PeL&&(Qt+=Ce[br+5])}if(Qt>Et&&Qt>=me){let er,br=it*Et,sr=He*Et,Mr=-1,qr=(Pe/Oe<<5)+(L+1)+this.points.length;for(let $r of bt){let _a=$r*Oe;if(Ce[_a+2]<=L)continue;Ce[_a+2]=L;let Ca=Ce[_a+5];br+=Ce[_a]*Ca,sr+=Ce[_a+1]*Ca,Ce[_a+4]=qr,ue&&(er||(er=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(er)),ue(er,this.map(Ce,_a)))}Ce[Pe+4]=qr,Te.push(br/Qt,sr/Qt,1/0,qr,-1,Qt),ue&&Te.push(Mr)}else{for(let er=0;er1)for(let er of bt){let br=er*Oe;if(!(Ce[br+2]<=L)){Ce[br+2]=L;for(let sr=0;sr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,W){if(d[L+5]>1){let me=this.clusterProps[d[L+6]];return W?Object.assign({},me):me}let te=this.points[d[L+3]].tags,ue=this.options.map(te);return W&&ue===te?Object.assign({},ue):ue}}function SW(R,d,L){return{id:R[d+3],type:"Point",tags:g3(R,d,L),geometry:[R[d],R[d+1]]}}function EW(R,d,L){return{type:"Feature",id:R[d+3],properties:g3(R,d,L),geometry:{type:"Point",coordinates:[L4(R[d]),P4(R[d+1])]}}}function g3(R,d,L){let W=R[d+5],te=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,ue=R[d+6],me=ue===-1?{}:Object.assign({},L[ue]);return Object.assign(me,{cluster:!0,cluster_id:R[d+3],point_count:W,point_count_abbreviated:te})}let y3="geojsonvt_clip_start",_3="geojsonvt_clip_end";function z4(R,d,L,W,te){let ue=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?me:W))return void(L.numPoints+=d.points.length/3);let ge=[];for(let Ce=0;Ceme)&&(L.numSimplified++,ge.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,Te){let Oe=0;for(let Pe=0,it=Ce.length,He=it-2;Pe0===Te)for(let Pe=0,it=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),W.debug>1&&console.timeEnd("invalidating");let[te,ue,me]=[0,0,0],ge=z4(d,te,ue,me,W);ge.source=d;let Ce=gy(te,ue,me);if(this.tiles[Ce]=ge,this.tileCoords.push({z:te,x:ue,y:me,id:Ce}),W.debug){let Te=`z${te}`;this.stats[Te]=(this.stats[Te]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,W){return null}getTile(d,L,W){let{extent:te,debug:ue}=this.options,me=1<1&&console.log("drilling down to z%d-%d-%d",d,L,W);let Ce,Te=d,Oe=L,Pe=W;for(;!Ce&&Te>0;)Te--,Oe>>=1,Pe>>=1,Ce=this.tiles[gy(Te,Oe,Pe)];return Ce?.source?(ue>1&&(console.log("found parent tile z%d-%d-%d",Te,Oe,Pe),console.time("drilling down")),this.splitTile(Ce.source,Te,Oe,Pe,d,L,W),ue>1&&console.timeEnd("drilling down"),this.tiles[ge]?B4(this.tiles[ge],te):null):null}splitTile(d,L,W,te,ue,me,ge){let Ce=[d,L,W,te],Te=this.options,Oe=Te.debug;for(;Ce.length;){te=Ce.pop(),W=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),He=this.tiles[it]=z4(d,L,W,te,Te),this.tileCoords.push({z:L,x:W,y:te,id:it}),Oe)){Oe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,W,te,He.numFeatures,He.numPoints,He.numSimplified),console.timeEnd("creation"));let Ca=`z${L}`;this.stats[Ca]=(this.stats[Ca]||0)+1,this.total++}if(He.source=d,ue==null){if(L===Te.indexMaxZoom||He.numPoints<=Te.indexMaxPoints)continue}else{if(L===Te.maxZoom||L===ue)continue;if(ue!=null){let Ca=ue-L;if(W!==me>>Ca||te!==ge>>Ca)continue}}if(He.source=null,!d.length)continue;Oe>1&&console.time("clipping");let bt=.5*Te.buffer/Te.extent,Et=.5-bt,Qt=.5+bt,er=1+bt,br=null,sr=null,Mr=null,qr=null,$r=Wd(d,Pe,W-bt,W+Qt,Wf.X,He.minX,He.maxX,Te),_a=Wd(d,Pe,W+Et,W+er,Wf.X,He.minX,He.maxX,Te);$r&&(br=Wd($r,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),sr=Wd($r,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),_a&&(Mr=Wd(_a,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),qr=Wd(_a,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),Oe>1&&console.timeEnd("clipping"),Ce.push(br||[],L+1,2*W,2*te),Ce.push(sr||[],L+1,2*W,2*te+1),Ce.push(Mr||[],L+1,2*W+1,2*te),Ce.push(qr||[],L+1,2*W+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:W}=L,te=1/0,ue=-1/0,me=1/0,ge=-1/0;for(let Oe of d)te=Math.min(te,Oe.minX),ue=Math.max(ue,Oe.maxX),me=Math.min(me,Oe.minY),ge=Math.max(ge,Oe.maxY);let Ce=L.buffer/L.extent,Te=new Set;for(let Oe in this.tiles){let Pe=this.tiles[Oe],it=1<=bt||ge=Qt)continue;let er=!1;for(let br of d)if(br.maxX>=He&&br.minX=Et&&br.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let br=`z${Pe.z}`;this.stats[br]=(this.stats[br]||0)-1,this.total--}delete this.tiles[Oe],Te.add(Oe)}}Te.size&&(this.tileCoords=this.tileCoords.filter(Oe=>!Te.has(Oe.id)))}}function gy(R,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new hr,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},dashes:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;this.hasDependencies?(Md("line",this.layers,L)?v0("line",this.layers,ge,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,ge,this.zoom,L),this.patternFeatures.push(ge)):this.addFeature(ge,Ce,Te,W,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W,dashPositions:te})}addFeatures(d,L,W,te){for(let ue of this.patternFeatures)this.addFeature(ue,ue.geometry,ue.index,L,W,te,d.subdivisionGranularity)}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,zW)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,DW),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.hasOwn(d.properties,y3)&&Object.hasOwn(d.properties,_3))return{start:+d.properties[y3],end:+d.properties[_3]}}addFeature(d,L,W,te,ue,me,ge){let Ce=this.layers[0].layout,Te=Ce.get("line-join").evaluate(d,{}),Oe=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),it=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let He of L)this.addLine(He,d,Te,Oe,Pe,it,te,ge);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,dashPositions:me,canonical:te})}addLine(d,L,W,te,ue,me,ge,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=Sv(d,ge?Ce.line.getGranularityForZoomLevel(ge.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let sr=0;sr=2&&d[Oe-1].equals(d[Oe-2]);)Oe--;let Pe=0;for(;Pe0;if(nn&&sr>Pe){let gn=bt.dist(Et);if(gn>2*it){let Va=bt.sub(bt.sub(Et)._mult(it/gn)._round());this.updateDistance(Et,Va),this.addCurrentVertex(Va,er,0,0,He),Et=Va}}let bn=Et&&Qt,Fn=bn?W:Te?"butt":te;if(bn&&Fn==="round"&&(_aue&&(Fn="bevel"),Fn==="bevel"&&(_a>2&&(Fn="flipbevel"),_a100)Mr=br.mult(-1);else{let gn=_a*er.add(br).mag()/er.sub(br).mag();Mr._perp()._mult(gn*(qa?-1:1))}this.addCurrentVertex(bt,Mr,0,0,He),this.addCurrentVertex(bt,Mr.mult(-1),0,0,He)}else if(Fn==="bevel"||Fn==="fakeround"){let gn=-Math.sqrt(_a*_a-1),Va=qa?gn:0,Hn=qa?0:gn;if(Et&&this.addCurrentVertex(bt,er,Va,Hn,He),Fn==="fakeround"){let ni=Math.round(180*Ca/Math.PI/20);for(let Wn=1;Wn2*it){let Va=bt.add(Qt.sub(bt)._mult(it/gn)._round());this.updateDistance(bt,Va),this.addCurrentVertex(Va,br,0,0,He),bt=Va}}}}addCurrentVertex(d,L,W,te,ue,me=!1){let ge=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*W,L.y-L.x*W,me,!1,W,ue),this.addHalfVertex(d,ge,Ce,me,!0,-te,ue),this.distance>N4/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,W,te,ue,me))}addHalfVertex({x:d,y:L},W,te,ue,me,ge,Ce){let Te=.5*(this.lineClips?this.scaledDistance*(N4-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(ue?1:0),(L<<1)+(me?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(ge===0?0:ge<0?-1:1)|(63&Te)<<2,Te>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Oe=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,Oe,this.e2),Ce.primitiveLength++),me?this.e2=Oe:this.e1=Oe}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let W=L.paint.get("line-dasharray");if(W&&!W.isConstant())return!0}return!1}addLineDashDependencies(d,L,W,te){for(let ue of d){let me=ue.paint.get("line-dasharray");if(!me||me.value.kind==="constant")continue;let ge=ue.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:me.value.evaluate({zoom:W-1},L,{}),round:ge},Te={dasharray:me.value.evaluate({zoom:W},L,{}),round:ge},Oe={dasharray:me.value.evaluate({zoom:W+1},L,{}),round:ge},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,it=`${Te.dasharray.join(",")},${Te.round}`,He=`${Oe.dasharray.join(",")},${Oe.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[it]=Te,te.dashDependencies[He]=Oe,L.dashes[ue.id]={min:Pe,mid:it,max:He}}}}let j4,U4;fi("LineBucket",b3,{omit:["layers","patternFeatures"]});var q4={get paint(){return U4=U4||new Ps({"line-opacity":new wi(ht.paint_line["line-opacity"]),"line-color":new wi(ht.paint_line["line-color"]),"line-translate":new hi(ht.paint_line["line-translate"]),"line-translate-anchor":new hi(ht.paint_line["line-translate-anchor"]),"line-width":new wi(ht.paint_line["line-width"]),"line-gap-width":new wi(ht.paint_line["line-gap-width"]),"line-offset":new wi(ht.paint_line["line-offset"]),"line-blur":new wi(ht.paint_line["line-blur"]),"line-dasharray":new sl(ht.paint_line["line-dasharray"]),"line-pattern":new sl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return j4=j4||new Ps({"line-cap":new wi(ht.layout_line["line-cap"]),"line-join":new wi(ht.layout_line["line-join"]),"line-miter-limit":new wi(ht.layout_line["line-miter-limit"]),"line-round-limit":new wi(ht.layout_line["line-round-limit"]),"line-sort-key":new wi(ht.layout_line["line-sort-key"])})}};class OW extends wi{possiblyEvaluate(d,L){return L=new oi(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,W,te){return L=X({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,W,te)}}let yy;class NW extends ll{constructor(d,L){super(d,q4,L),this.gradientVersion=0,yy||(yy=new OW(q4.paint.properties["line-width"].specification),yy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Ss,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=yy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new b3(d)}queryRadius(d){let L=d,W=V4(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return W/2+Math.abs(te)+Ue(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me}){let ge=Qe(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-ue.bearingInRadians,me),Ce=me/2*V4(this.paint.get("line-width").evaluate(L,W),this.paint.get("line-gap-width").evaluate(L,W)),Te=this.paint.get("line-offset").evaluate(L,W);return Te&&(te=function(Oe,Pe){let it=[];for(let He of Oe){let bt=_t(He),Et=[];for(let Qt=0;Qt=3){for(let bt of He)if(Wa(Oe,bt))return!0}if(rs(Oe,He,it))return!0}return!1}(ge,te,Ce)}isTileClipped(){return!0}}function V4(R,d){return d>0?d+2*R:R}let jW=ct([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),UW=ct([{name:"a_projected_pos",components:3,type:"Float32"}],4);ct([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let qW=ct([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ct([{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 G4=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VW=ct([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function GW(R,d,L){let W=d.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?R=R.toLocaleUpperCase():W==="lowercase"&&(R=R.toLocaleLowerCase()),Si.applyArabicShaping&&(R=Si.applyArabicShaping(R)),R}function HW(R,d,L){for(let W of R.sections)W.text=GW(W.text,d,L);return R}ct([{name:"triangle",components:3,type:"Uint16"}]),ct([{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"}]),ct([{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"}]),ct([{type:"Float32",name:"offsetX"}]),ct([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ct([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let Rg={"!":"\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","\u22EF":"\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"},WW={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},YW={40:!0};function H4(R,d,L,W,te,ue){if("fontStack"in d){let me=L[d.fontStack],ge=me?.[R];return ge?ge.metrics.advance*d.scale+te:0}{let me=W[d.imageName];return me?me.displaySize[0]*d.scale*Rc/ue+te:0}}function W4(R,d,L,W){let te=Math.pow(R-d,2);return W?RMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,W=0;for(let te=0;teW))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,W,te,ue){let me=[],ge=this.determineAverageLineWidth(d,L,W,te,ue),Ce=this.hasZeroWidthSpaces(),Te=0,Oe=0,Pe=this.text[Symbol.iterator](),it=Pe.next(),He=this.text[Symbol.iterator]();He.next();let bt=He.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let Qt=Et.next();for(;!it.done;){let er=this.getSection(Oe),br=it.value.codePointAt(0);if(Pr(br)||(Te+=H4(br,er,W,te,d,ue)),!bt.done){let sr=zt(br),Mr=bt.value.codePointAt(0);(WW[br]||sr||"imageName"in er||!Qt.done&&YW[Mr])&&me.push(Y4(Oe+1,Te,ge,me,XW(br,Mr,sr&&Ce),!1))}Oe++,it=Pe.next(),bt=He.next(),Qt=Et.next()}return X4(Y4(this.length(),Te,ge,me,0,!0))}determineAverageLineWidth(d,L,W,te,ue){let me=0,ge=0;for(let Ce of this.text){let Te=this.getSection(ge);me+=H4(Ce.codePointAt(0),Te,W,te,d,ue),ge++}return me/Math.max(1,Math.ceil(me/L))}}let w3=4294967296,Z4=1/w3,$4=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class _y{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,W=this.length){for(;this.pos>3,me=this.pos;this.type=7&te,d(ue,L,this),this.pos===me&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*w3;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*w3;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,W,te;return te=L[this.pos++],W=127&te,te<128?W:(te=L[this.pos++],W|=(127&te)<<7,te<128?W:(te=L[this.pos++],W|=(127&te)<<14,te<128?W:(te=L[this.pos++],W|=(127&te)<<21,te<128?W:(te=L[this.pos],W|=(15&te)<<28,function(ue,me,ge){let Ce=ge.buf,Te,Oe;if(Oe=Ce[ge.pos++],Te=(112&Oe)>>4,Oe<128||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<3,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<10,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<17,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<24,Oe<128)||(Oe=Ce[ge.pos++],Te|=(1&Oe)<<31,Oe<128))return A0(ue,Te,me);throw new Error("Expected varint not more than 10 bytes")}(W,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&$4?$4.decode(this.buf.subarray(L,d)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let W=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,W){let te,ue;if(L>=0?(te=L%4294967296|0,ue=L/4294967296|0):(te=~(-L%4294967296),ue=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,ue=ue+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(me,ge,Ce){Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,Ce.buf[Ce.pos]=127&(me>>>=7)}(te,0,W),function(me,ge){let Ce=(7&me)<<4;ge.buf[ge.pos++]|=Ce|((me>>>=3)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me)))))}(ue,W)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,ue,me){for(let ge,Ce,Te=0;Te55295&&ge<57344){if(!Ce){ge>56319||Te+1===ue.length?(te[me++]=239,te[me++]=191,te[me++]=189):Ce=ge;continue}if(ge<56320){te[me++]=239,te[me++]=191,te[me++]=189,Ce=ge;continue}ge=Ce-55296<<10|ge-56320|65536,Ce=null}else Ce&&(te[me++]=239,te[me++]=191,te[me++]=189,Ce=null);ge<128?te[me++]=ge:(ge<2048?te[me++]=ge>>6|192:(ge<65536?te[me++]=ge>>12|224:(te[me++]=ge>>18|240,te[me++]=ge>>12&63|128),te[me++]=ge>>6&63|128),te[me++]=63&ge|128)}return me}(this.buf,d,this.pos);let W=this.pos-L;W>=128&&K4(L,W,this),this.pos=L-1,this.writeVarint(W),this.pos+=W}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let W=0;W=128&&K4(W,te,this),this.pos=W-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,W){this.writeTag(d,2),this.writeRawMessage(L,W)}writePackedVarint(d,L){L.length&&this.writeMessage(d,ZW,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,$W,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,QW,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,KW,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,JW,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,eY,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,tY,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,rY,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,aY,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function A0(R,d,L){return L?4294967296*d+(R>>>0):4294967296*(d>>>0)+(R>>>0)}function K4(R,d,L){let W=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(W);for(let te=L.pos-1;te>=R;te--)L.buf[te+W]=L.buf[te]}function ZW(R,d){for(let L=0;Lge.h-me.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,ue=0;for(let me of R)for(let ge=W.length-1;ge>=0;ge--){let Ce=W[ge];if(!(me.w>Ce.w||me.h>Ce.h)){if(me.x=Ce.x,me.y=Ce.y,ue=Math.max(ue,me.y+me.h),te=Math.max(te,me.x+me.w),me.w===Ce.w&&me.h===Ce.h){let Te=W.pop();Te&&geEt.toCodeUnitIndex(_a));let $r=br(Et.toString(),er);for(let _a of $r){let Ca=[..._a].map(()=>0);Qt.push(new T0(_a,Et.sections,Ca))}}else if(sr){Qt=[],er=er.map(nn=>Et.toCodeUnitIndex(nn));let $r=0,_a=[];for(let nn of Et.text)_a.push(...Array(nn.length).fill(Et.sectionIndex[$r])),$r++;let Ca=sr(Et.text,_a,er);for(let nn of Ca){let qa=[],bn="";for(let Fn of nn[0])qa.push(nn[1][bn.length]),bn+=Fn;Qt.push(new T0(nn[0],Et.sections,qa))}}else Qt=function($r,_a){let Ca=[],nn=0;for(let qa of _a)Ca.push($r.substring(nn,qa)),nn=qa;return nn<$r.length()&&Ca.push($r.substring(nn,$r.length())),Ca}(Et,er);let Mr=[],qr={positionedLines:Mr,text:Et.toString(),top:Oe[1],bottom:Oe[1],left:Oe[0],right:Oe[0],writingMode:Pe,iconsInText:!1,verticalizable:!1};return function($r,_a,Ca,nn,qa,bn,Fn,gn,Va,Hn,ni,Wn){let si=0,po=0,cs=0,Ds=0,Xs=gn==="right"?1:gn==="left"?0:.5,Mf=Rc/Wn,vu=0;for(let Hl of qa){Hl.trim();let rf=Hl.getMaxScale(),Xf={positionedGlyphs:[],lineOffset:0};$r.positionedLines[vu]=Xf;let Zf=Xf.positionedGlyphs,Th=0;if(!Hl.length()){po+=bn,++vu;continue}let Sf=sY(nn,Hl,Mf),Ah=0;for(let Fc of Hl.text){let nu=Hl.getSection(Ah),lc=Fc.codePointAt(0),mu=lY(Va,ni,lc),zc={glyph:lc,imageName:null,x:si,y:po+-17,vertical:mu,scale:1,fontStack:"",sectionIndex:Hl.getSectionIndex(Ah),metrics:null,rect:null},Zd;if("fontStack"in nu){if(Zd=uY(nu,lc,mu,Sf,_a,Ca),!Zd)continue;zc.fontStack=nu.fontStack}else{if($r.iconsInText=!0,nu.scale*=Mf,Zd=cY(nu,mu,rf,Sf,nn),!Zd)continue;Th=Math.max(Th,Zd.imageOffset),zc.imageName=nu.imageName}let{rect:dd,metrics:Bg,baselineOffset:Ep}=Zd;zc.y+=Ep,zc.scale=nu.scale,zc.metrics=Bg,zc.rect=dd,Zf.push(zc),mu?($r.verticalizable=!0,si+=("imageName"in nu?Bg.advance:Rc)*nu.scale+Hn):si+=Bg.advance*nu.scale+Hn,Ah++}Zf.length!==0&&(cs=Math.max(si-Hn,cs),fY(Zf,0,Zf.length-1,Xs)),si=0,Xf.lineOffset=Math.max(Th,(rf-1)*Rc);let Hh=bn*rf+Th;po+=Hh,Ds=Math.max(Hh,Ds),++vu}let{horizontalAlign:yc,verticalAlign:Dc}=A3(Fn);(function(Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc){let nu=(rf-Xf)*Th,lc=0;lc=Sf!==Ah?-Hh*Zf- -17:-Zf*Fc*Ah+.5*Ah;for(let mu of Hl)for(let zc of mu.positionedGlyphs)zc.x+=nu,zc.y+=lc})($r.positionedLines,Xs,yc,Dc,cs,Ds,bn,po,qa.length),$r.top+=-Dc*po,$r.bottom=$r.top+po,$r.left+=-yc*cs,$r.right=$r.left+cs}(qr,d,L,W,Qt,me,ge,Ce,Pe,Te,it,bt),!function($r){for(let _a of $r)if(_a.positionedGlyphs.length!==0)return!1;return!0}(Mr)&&qr}function A3(R){let d=.5,L=.5;switch(R){case"right":case"top-right":case"bottom-right":d=1;break;case"left":case"top-left":case"bottom-left":d=0}switch(R){case"bottom":case"bottom-right":case"bottom-left":L=1;break;case"top":case"top-right":case"top-left":L=0}return{horizontalAlign:d,verticalAlign:L}}function sY(R,d,L){let W=d.getMaxScale()*Rc,{maxImageWidth:te,maxImageHeight:ue}=d.getMaxImageSize(R),me=Math.max(W,ue*L);return{verticalLineContentWidth:Math.max(W,te*L),horizontalLineContentHeight:me}}function eS(R){switch(R){case"top":return 0;case"center":return .5;default:return 1}}function lY(R,d,L){return!(R===l.ax.horizontal||!d&&!Wt(L)||d&&(Pr(L)||(W=L,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(W)))));var W}function uY(R,d,L,W,te,ue){let me=ue[R.fontStack],ge=function(Te,Oe,Pe,it){if(Te?.rect)return Te;let He=Oe[Pe.fontStack],bt=He?.[it];return bt?{rect:null,metrics:bt.metrics}:null}(me?.[d],te,R,d);if(ge===null)return null;let Ce;if(L)Ce=W.verticalLineContentWidth-R.scale*Rc;else{let Te=eS(R.verticalAlign);Ce=(W.horizontalLineContentHeight-R.scale*Rc)*Te}return{rect:ge.rect,metrics:ge.metrics,baselineOffset:Ce}}function cY(R,d,L,W,te){let ue=te[R.imageName];if(!ue)return null;let me=ue.paddedRect,ge=ue.displaySize,Ce={width:ge[0],height:ge[1],left:1,top:-3,advance:d?ge[1]:ge[0]},Te;if(d)Te=W.verticalLineContentWidth-ge[1]*R.scale;else{let Oe=eS(R.verticalAlign);Te=(W.horizontalLineContentHeight-ge[1]*R.scale)*Oe}return{rect:me,metrics:Ce,baselineOffset:Te,imageOffset:(d?ge[0]:ge[1])*R.scale-Rc*L}}function fY(R,d,L,W){if(W===0)return;let te=R[L],ue=(R[L].x+te.metrics.advance*te.scale)*W;for(let me=d;me<=L;me++)R[me].x-=ue}function hY(R,d,L){let{horizontalAlign:W,verticalAlign:te}=A3(L),ue=d[0]-R.displaySize[0]*W,me=d[1]-R.displaySize[1]*te;return{image:R,top:me,bottom:me+R.displaySize[1],left:ue,right:ue+R.displaySize[0]}}function tS(R){var d,L;let W=R.left,te=R.top,ue=R.right-W,me=R.bottom-te,ge=(d=R.image.textFitWidth)!==null&&d!==void 0?d:"stretchOrShrink",Ce=(L=R.image.textFitHeight)!==null&&L!==void 0?L:"stretchOrShrink",Te=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ce==="proportional"){if(ge==="stretchOnly"&&ue/meTe){let Oe=Math.ceil(ue/Te);te*=Oe/me,me=Oe}return{x1:W,y1:te,x2:W+ue,y2:te+me}}function rS(R,d,L,W,te,ue){let me=R.image,ge;if(me.content){let Qt=me.content,er=me.pixelRatio||1;ge=[Qt[0]/er,Qt[1]/er,me.displaySize[0]-Qt[2]/er,me.displaySize[1]-Qt[3]/er]}let Ce=d.left*ue,Te=d.right*ue,Oe,Pe,it,He;L==="width"||L==="both"?(He=te[0]+Ce-W[3],Pe=te[0]+Te+W[1]):(He=te[0]+(Ce+Te-me.displaySize[0])/2,Pe=He+me.displaySize[0]);let bt=d.top*ue,Et=d.bottom*ue;return L==="height"||L==="both"?(Oe=te[1]+bt-W[0],it=te[1]+Et+W[2]):(Oe=te[1]+(bt+Et-me.displaySize[1])/2,it=Oe+me.displaySize[1]),{image:me,top:Oe,right:Pe,bottom:it,left:He,collisionPadding:ge}}fi("ImagePosition",T3),fi("ImageAtlas",Q4),l.ax=void 0,(xp=l.ax||(l.ax={}))[xp.none=0]="none",xp[xp.horizontal=1]="horizontal",xp[xp.vertical=2]="vertical",xp[xp.horizontalOnly=3]="horizontalOnly";let Yd=128,bp=32640;function aS(R,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new oi(R+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=L,ue=0;for(;ueme.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=aS(this.zoom,L["text-size"]),this.iconSizeData=aS(this.zoom,L["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),ue=W.get("symbol-z-order");this.canOverlap=M3(W,"text-overlap","text-allow-overlap")!=="never"||M3(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(me=>l.ax[me])),this.stateDependentLayerIds=this.layers.filter(me=>me.isStateDependent()).map(me=>me.id),this.sourceID=d.sourceID}createArrays(){this.text=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new ut,this.lineVertexArray=new ft,this.symbolInstances=new Ze,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,W,te,ue){for(let me of d)if(L[me.codePointAt(0)]=!0,(W||te)&&ue){let ge=Rg[me];ge&&(L[ge.codePointAt(0)]=!0)}}populate(d,L,W){var te;let ue=this.layers[0],me=ue.layout,ge=me.get("text-font"),Ce=me.get("text-field"),Te=me.get("icon-image"),Oe=(Ce.value.kind!=="constant"||Ce.value.value instanceof Di&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(ge.value.kind!=="constant"||ge.value.value.length>0),Pe=Te.value.kind!=="constant"||!!Te.value.value||Object.keys(Te.parameters).length>0,it=me.get("symbol-sort-key");if(this.features=[],!Oe&&!Pe)return;let He=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,Qt=new oi(this.zoom);for(let{feature:er,id:br,index:sr,sourceLayerIndex:Mr}of d){let qr=ue._featureFilter.needGeometry,$r=fo(er,qr);if(!ue._featureFilter.filter(Qt,$r,W))continue;let _a,Ca;if(qr||($r.geometry=ql(er)),Oe){let qa=ue.getValueAndResolveTokens("text-field",$r,W,Et),bn=Di.factory(qa);this.hasRTLText||(this.hasRTLText=pY(bn)),(!this.hasRTLText||Si.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Si.isParsed())&&(_a=HW(bn,ue,$r))}if(Pe){let qa=ue.getValueAndResolveTokens("icon-image",$r,W,Et);Ca=qa instanceof qi?qa:qi.fromString(qa)}if(!_a&&!Ca)continue;let nn=this.sortFeaturesByKey?it.evaluate($r,{},W):void 0;if(this.features.push({id:br,text:_a,icon:Ca,index:sr,sourceLayerIndex:Mr,geometry:$r.geometry,properties:er.properties,type:Eg.types[er.type],sortKey:nn}),Ca&&(He[Ca.name]=!0),_a){let qa=ge.evaluate($r,{},W).join(","),bn=me.get("text-rotation-alignment")!=="viewport"&&me.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Fn of _a.sections)if(Fn.image)He[Fn.image.name]=!0;else{let gn=Br(_a.toString()),Va=Fn.fontStack||qa;bt[Va]||(bt[Va]={}),this.calculateGlyphDependencies(Fn.text,bt[Va],bn,this.allowVerticalPlacement,gn)}}}me.get("symbol-placement")==="line"&&(this.features=function(er){let br={},sr={},Mr=[],qr=0;function $r(qa){Mr.push(er[qa]),qr++}function _a(qa,bn,Fn){let gn=sr[qa];return delete sr[qa],sr[bn]=gn,Mr[gn].geometry[0].pop(),Mr[gn].geometry[0]=Mr[gn].geometry[0].concat(Fn[0]),gn}function Ca(qa,bn,Fn){let gn=br[bn];return delete br[bn],br[qa]=gn,Mr[gn].geometry[0].shift(),Mr[gn].geometry[0]=Fn[0].concat(Mr[gn].geometry[0]),gn}function nn(qa,bn,Fn){let gn=Fn?bn[0][bn[0].length-1]:bn[0][0];return`${qa}:${gn.x}:${gn.y}`}for(let qa=0;qaqa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((er,br)=>er.sortKey-br.sortKey)}update(d,L,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}))}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,L){let W=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),ue=d.dist(L[d.segment]),me={};for(let ge=d.segment+1;ge=0;ge--)me[ge]={x:L[ge].x,y:L[ge].y,tileUnitDistanceFromAnchor:ue},ge>0&&(ue+=L[ge-1].dist(L[ge]));for(let ge=0;ge0}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,L){let W=d.placedSymbolArray.get(L),te=W.vertexStartIndex+4*W.numGlyphs;for(let ue=W.vertexStartIndex;uete[ge]-te[Ce]||ue[Ce]-ue[ge]),me}addToSortKeyRanges(d,L){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W?.sortKey===L?W.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,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 L of this.symbolInstanceIndexes){let W=this.symbolInstances.get(L);this.featureSortOrder.push(W.featureIndex);let te=[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex];for(let ue=0;ue=0&&te.indexOf(me)===ue&&this.addIndicesForPlacedSymbol(this.text,me)}W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let nS,iS;fi("SymbolBucket",M0,{omit:["layers","collisionBoxArray","features","compareText"]}),M0.MAX_GLYPHS=65535,M0.addDynamicAttributes=S3;var C3={get paint(){return iS=iS||new Ps({"icon-opacity":new wi(ht.paint_symbol["icon-opacity"]),"icon-color":new wi(ht.paint_symbol["icon-color"]),"icon-halo-color":new wi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new wi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new wi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new hi(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new hi(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new wi(ht.paint_symbol["text-opacity"]),"text-color":new wi(ht.paint_symbol["text-color"],{runtimeType:cr,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new wi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new wi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new wi(ht.paint_symbol["text-halo-blur"]),"text-translate":new hi(ht.paint_symbol["text-translate"]),"text-translate-anchor":new hi(ht.paint_symbol["text-translate-anchor"])})},get layout(){return nS=nS||new Ps({"symbol-placement":new hi(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new hi(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new hi(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new wi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new hi(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new hi(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new hi(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new hi(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new hi(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new hi(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new wi(ht.layout_symbol["icon-size"]),"icon-text-fit":new hi(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new hi(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new wi(ht.layout_symbol["icon-image"]),"icon-rotate":new wi(ht.layout_symbol["icon-rotate"]),"icon-padding":new wi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new hi(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new wi(ht.layout_symbol["icon-offset"]),"icon-anchor":new wi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new hi(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new hi(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new hi(ht.layout_symbol["text-rotation-alignment"]),"text-field":new wi(ht.layout_symbol["text-field"]),"text-font":new wi(ht.layout_symbol["text-font"]),"text-size":new wi(ht.layout_symbol["text-size"]),"text-max-width":new wi(ht.layout_symbol["text-max-width"]),"text-line-height":new hi(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new wi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new wi(ht.layout_symbol["text-justify"]),"text-radial-offset":new wi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new hi(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new wi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new wi(ht.layout_symbol["text-anchor"]),"text-max-angle":new hi(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new hi(ht.layout_symbol["text-writing-mode"]),"text-rotate":new wi(ht.layout_symbol["text-rotate"]),"text-padding":new hi(ht.layout_symbol["text-padding"]),"text-keep-upright":new hi(ht.layout_symbol["text-keep-upright"]),"text-transform":new wi(ht.layout_symbol["text-transform"]),"text-offset":new wi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new hi(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new hi(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new hi(ht.layout_symbol["text-ignore-placement"]),"text-optional":new hi(ht.layout_symbol["text-optional"])})}};class oS{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:Yt,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.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}}fi("FormatSectionOverride",oS,{omit:["defaultValue"]});class wy extends ll{constructor(d,L){super(d,C3,L)}recalculate(d,L){if(super.recalculate(d,L),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let ue of W)te.includes(ue)||te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,W,te){let ue=this.layout.get(d).evaluate(L,{},W,te),me=this._unevaluatedLayout._values[d];return me.isDataDriven()||kc(me.value)||!ue?ue:function(ge,Ce){return Ce.replace(/{([^{}]+)}/g,(Te,Oe)=>ge&&Oe in ge?String(ge[Oe]):"")}(L.properties,ue)}createBucket(d){return new M0(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of C3.paint.overridableProperties){if(!wy.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),W=new oS(L),te=new kl(W,L.property.specification),ue=null;ue=L.value.kind==="constant"||L.value.kind==="source"?new Lc("source",te):new vc("composite",te,L.value.zoomStops),this.paint._values[d]=new Hs(L.property,ue,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,W){return!(!this.layout||L.isDataDriven()||W.isDataDriven())&&wy.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let W=d.get("text-field"),te=C3.paint.properties[L],ue=!1,me=ge=>{var Ce;for(let Te of ge)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(Te))return void(ue=!0)};if(W.value.kind==="constant"&&W.value.value instanceof Di)me(W.value.value.sections);else if(W.value.kind==="source"||W.value.kind==="composite"){let ge=Te=>{ue||(Te instanceof Mi&&qn(Te.value)===Pa?me(Te.value.sections):Te instanceof vs?me(Te.sections):Te.eachChild(ge))},Ce=W.value;Ce._styleExpression&&ge(Ce._styleExpression.expression)}return ue}}let sS;var vY={get paint(){return sS=sS||new Ps({"background-color":new hi(ht.paint_background["background-color"]),"background-pattern":new sc(ht.paint_background["background-pattern"]),"background-opacity":new hi(ht.paint_background["background-opacity"])})}};class mY extends ll{constructor(d,L){super(d,vY,L)}}class gY extends ll{constructor(d,L){super(d,{},L),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.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 yY{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let _Y={once:!0},L3=63710088e-1;class wp{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new wp(G(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,W=this.lat*L,te=d.lat*L,ue=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return L3*Math.acos(Math.min(ue,1))}static convert(d){if(d instanceof wp)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new wp(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new wp(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: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let lS=2*Math.PI*L3;function uS(R){return lS*Math.cos(R*Math.PI/180)}function cS(R){return(180+R)/360}function fS(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function hS(R,d){return R/uS(d)}function dS(R){return 360*R-180}function Ty(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}function pS(R,d){return R*uS(Ty(d))}class Ig{constructor(d,L,W=0){this.x=+d,this.y=+L,this.z=+W}static fromLngLat(d,L=0){let W=wp.convert(d);return new Ig(cS(W.lng),fS(W.lat),hS(L,W.lat))}toLngLat(){return new wp(dS(this.x),Ty(this.y))}toAltitude(){return pS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/lS*(d=Ty(this.y),1/Math.cos(d*Math.PI/180));var d}}function vS(R,d,L){var W=2*Math.PI*6378137/256/Math.pow(2,L);return[R*W-2*Math.PI*6378137/2,d*W-2*Math.PI*6378137/2]}class P3{constructor(d,L,W){if(!function(te,ue,me){return!(te<0||te>25||me<0||me>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(d,L,W))throw new Error(`x=${L}, y=${W}, 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=L,this.y=W,this.key=S0(0,d,d,L,W)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,W){let te=(me=this.y,ge=this.z,Ce=vS(256*(ue=this.x),256*(me=Math.pow(2,ge)-me-1),ge),Te=vS(256*(ue+1),256*(me+1),ge),Ce[0]+","+Ce[1]+","+Te[0]+","+Te[1]);var ue,me,ge,Ce,Te;let Oe=function(Pe,it,He){let bt="";for(let Et=Pe;Et>0;Et--){let Qt=1<1?"@2x":"").replace(/{quadkey}/g,Oe).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class mS{constructor(d,L){this.wrap=d,this.canonical=L,this.key=S0(d,L.z,L.z,L.x,L.y)}}class Ph{constructor(d,L,W,te,ue){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${W}`);this.overscaledZ=d,this.wrap=L,this.canonical=new P3(W,+te,+ue),this.key=S0(L,d,W,te,ue)}clone(){return new Ph(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 L=this.canonical.z-d;return d>this.canonical.z?new Ph(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ph(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-d;return d>this.canonical.z?S0(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):S0(this.wrap*+L,d,d,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new Ph(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new Ph(L,this.wrap,L,W,te),new Ph(L,this.wrap,L,W+1,te),new Ph(L,this.wrap,L,W,te+1),new Ph(L,this.wrap,L,W+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=Te)return null;let Pe=this.canonical.x+te,it=this.wrap;return Pe<0?(it-=Math.ceil(-Pe/Te),Pe=(Pe%Te+Te)%Te):Pe>=Te&&(it+=Math.floor(Pe/Te),Pe%=Te),{tileID:new Ph(this.overscaledZ,it,Ce,Pe,Oe),x:me,y:ge}}}function S0(R,d,L,W,te){(R*=2)<0&&(R=-1*R-1);let ue=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new Ev;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new Ev;for(let W of d)L.extend(W);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class gS{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=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 yS{constructor(d,L,W,te,ue){this.type="Feature",this._vectorTileFeature=d,this._x=W,this._y=te,this._z=L,this.properties=d.properties,this.id=ue}projectPoint(d,L,W,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+W)/te)*Math.PI))-90]}projectLine(d,L,W,te){return d.map(ue=>this.projectPoint(ue,L,W,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),W=d.extent*this._x,te=d.extent*this._y,ue=d.loadGeometry();switch(d.type){case 1:{let me=[];for(let Ce of ue)me.push(Ce[0]);let ge=this.projectLine(me,W,te,L);this._geometry=me.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge};break}case 2:{let me=ue.map(ge=>this.projectLine(ge,W,te,L));this._geometry=me.length===1?{type:"LineString",coordinates:me[0]}:{type:"MultiLineString",coordinates:me};break}case 3:{let me=b4(ue),ge=[];for(let Ce of me)ge.push(Ce.map(Te=>this.projectLine(Te,W,te,L)));this._geometry=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class E0{constructor(d,L,W){this._name=d,this.dataBuffer=L,typeof W=="number"?this._size=W:(this.nullabilityBuffer=W,this._size=W.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Ay extends E0{}class R3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class I3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class _S extends E0{constructor(d,L,W,te){super(d,L,te),this.delta=W}}class D3 extends _S{constructor(d,L,W,te){super(d,Int32Array.of(L),W,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class F3 extends E0{constructor(d,L,W,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),W)}getValueFromBuffer(d){return this.dataBuffer[0]}}class xY{constructor(d,L,W,te,ue=4096){this._name=d,this._geometryVector=L,this._idVector=W,this._propertyVectors=te,this._extent=ue}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let W=0;W>>32-R;let B3=z3,Xd=256;function O3(R,d){return R-R%d}function bY(R){let d=R>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let N3=function(){if(!Number.isFinite(65536))return 65536;let R=O3(Math.floor(65536),Xd);return R===0?Xd:R}(),wY=3*N3/Xd+N3|0;function bS(){let R=new Uint8Array(wY);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:R,byteContainerI32:new Int32Array(R.buffer,R.byteOffset,R.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function TY(R,d,L,W,te){switch(te){case 1:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=it>>>0&1,ge[Te++]=it>>>1&1,ge[Te++]=it>>>2&1,ge[Te++]=it>>>3&1,ge[Te++]=it>>>4&1,ge[Te++]=it>>>5&1,ge[Te++]=it>>>6&1,ge[Te++]=it>>>7&1,ge[Te++]=it>>>8&1,ge[Te++]=it>>>9&1,ge[Te++]=it>>>10&1,ge[Te++]=it>>>11&1,ge[Te++]=it>>>12&1,ge[Te++]=it>>>13&1,ge[Te++]=it>>>14&1,ge[Te++]=it>>>15&1,ge[Te++]=it>>>16&1,ge[Te++]=it>>>17&1,ge[Te++]=it>>>18&1,ge[Te++]=it>>>19&1,ge[Te++]=it>>>20&1,ge[Te++]=it>>>21&1,ge[Te++]=it>>>22&1,ge[Te++]=it>>>23&1,ge[Te++]=it>>>24&1,ge[Te++]=it>>>25&1,ge[Te++]=it>>>26&1,ge[Te++]=it>>>27&1,ge[Te++]=it>>>28&1,ge[Te++]=it>>>29&1,ge[Te++]=it>>>30&1,ge[Te++]=it>>>31&1}})(R,d,L,W);break;case 2:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0;ge[Te++]=it>>>0&3,ge[Te++]=it>>>2&3,ge[Te++]=it>>>4&3,ge[Te++]=it>>>6&3,ge[Te++]=it>>>8&3,ge[Te++]=it>>>10&3,ge[Te++]=it>>>12&3,ge[Te++]=it>>>14&3,ge[Te++]=it>>>16&3,ge[Te++]=it>>>18&3,ge[Te++]=it>>>20&3,ge[Te++]=it>>>22&3,ge[Te++]=it>>>24&3,ge[Te++]=it>>>26&3,ge[Te++]=it>>>28&3,ge[Te++]=it>>>30&3,ge[Te++]=He>>>0&3,ge[Te++]=He>>>2&3,ge[Te++]=He>>>4&3,ge[Te++]=He>>>6&3,ge[Te++]=He>>>8&3,ge[Te++]=He>>>10&3,ge[Te++]=He>>>12&3,ge[Te++]=He>>>14&3,ge[Te++]=He>>>16&3,ge[Te++]=He>>>18&3,ge[Te++]=He>>>20&3,ge[Te++]=He>>>22&3,ge[Te++]=He>>>24&3,ge[Te++]=He>>>26&3,ge[Te++]=He>>>28&3,ge[Te++]=He>>>30&3}})(R,d,L,W);break;case 3:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0;ge[Te++]=it>>>0&7,ge[Te++]=it>>>3&7,ge[Te++]=it>>>6&7,ge[Te++]=it>>>9&7,ge[Te++]=it>>>12&7,ge[Te++]=it>>>15&7,ge[Te++]=it>>>18&7,ge[Te++]=it>>>21&7,ge[Te++]=it>>>24&7,ge[Te++]=it>>>27&7,ge[Te++]=7&(it>>>30|(1&He)<<2),ge[Te++]=He>>>1&7,ge[Te++]=He>>>4&7,ge[Te++]=He>>>7&7,ge[Te++]=He>>>10&7,ge[Te++]=He>>>13&7,ge[Te++]=He>>>16&7,ge[Te++]=He>>>19&7,ge[Te++]=He>>>22&7,ge[Te++]=He>>>25&7,ge[Te++]=He>>>28&7,ge[Te++]=7&(He>>>31|(3&bt)<<1),ge[Te++]=bt>>>2&7,ge[Te++]=bt>>>5&7,ge[Te++]=bt>>>8&7,ge[Te++]=bt>>>11&7,ge[Te++]=bt>>>14&7,ge[Te++]=bt>>>17&7,ge[Te++]=bt>>>20&7,ge[Te++]=bt>>>23&7,ge[Te++]=bt>>>26&7,ge[Te++]=bt>>>29&7}})(R,d,L,W);break;case 4:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0;ge[Te++]=it>>>0&15,ge[Te++]=it>>>4&15,ge[Te++]=it>>>8&15,ge[Te++]=it>>>12&15,ge[Te++]=it>>>16&15,ge[Te++]=it>>>20&15,ge[Te++]=it>>>24&15,ge[Te++]=it>>>28&15,ge[Te++]=He>>>0&15,ge[Te++]=He>>>4&15,ge[Te++]=He>>>8&15,ge[Te++]=He>>>12&15,ge[Te++]=He>>>16&15,ge[Te++]=He>>>20&15,ge[Te++]=He>>>24&15,ge[Te++]=He>>>28&15,ge[Te++]=bt>>>0&15,ge[Te++]=bt>>>4&15,ge[Te++]=bt>>>8&15,ge[Te++]=bt>>>12&15,ge[Te++]=bt>>>16&15,ge[Te++]=bt>>>20&15,ge[Te++]=bt>>>24&15,ge[Te++]=bt>>>28&15,ge[Te++]=Et>>>0&15,ge[Te++]=Et>>>4&15,ge[Te++]=Et>>>8&15,ge[Te++]=Et>>>12&15,ge[Te++]=Et>>>16&15,ge[Te++]=Et>>>20&15,ge[Te++]=Et>>>24&15,ge[Te++]=Et>>>28&15}})(R,d,L,W);break;case 5:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0;ge[Te++]=it>>>0&31,ge[Te++]=it>>>5&31,ge[Te++]=it>>>10&31,ge[Te++]=it>>>15&31,ge[Te++]=it>>>20&31,ge[Te++]=it>>>25&31,ge[Te++]=31&(it>>>30|(7&He)<<2),ge[Te++]=He>>>3&31,ge[Te++]=He>>>8&31,ge[Te++]=He>>>13&31,ge[Te++]=He>>>18&31,ge[Te++]=He>>>23&31,ge[Te++]=31&(He>>>28|(1&bt)<<4),ge[Te++]=bt>>>1&31,ge[Te++]=bt>>>6&31,ge[Te++]=bt>>>11&31,ge[Te++]=bt>>>16&31,ge[Te++]=bt>>>21&31,ge[Te++]=bt>>>26&31,ge[Te++]=31&(bt>>>31|(15&Et)<<1),ge[Te++]=Et>>>4&31,ge[Te++]=Et>>>9&31,ge[Te++]=Et>>>14&31,ge[Te++]=Et>>>19&31,ge[Te++]=Et>>>24&31,ge[Te++]=31&(Et>>>29|(3&Qt)<<3),ge[Te++]=Qt>>>2&31,ge[Te++]=Qt>>>7&31,ge[Te++]=Qt>>>12&31,ge[Te++]=Qt>>>17&31,ge[Te++]=Qt>>>22&31,ge[Te++]=Qt>>>27&31}})(R,d,L,W);break;case 6:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0;ge[Te++]=it>>>0&63,ge[Te++]=it>>>6&63,ge[Te++]=it>>>12&63,ge[Te++]=it>>>18&63,ge[Te++]=it>>>24&63,ge[Te++]=63&(it>>>30|(15&He)<<2),ge[Te++]=He>>>4&63,ge[Te++]=He>>>10&63,ge[Te++]=He>>>16&63,ge[Te++]=He>>>22&63,ge[Te++]=63&(He>>>28|(3&bt)<<4),ge[Te++]=bt>>>2&63,ge[Te++]=bt>>>8&63,ge[Te++]=bt>>>14&63,ge[Te++]=bt>>>20&63,ge[Te++]=bt>>>26&63,ge[Te++]=Et>>>0&63,ge[Te++]=Et>>>6&63,ge[Te++]=Et>>>12&63,ge[Te++]=Et>>>18&63,ge[Te++]=Et>>>24&63,ge[Te++]=63&(Et>>>30|(15&Qt)<<2),ge[Te++]=Qt>>>4&63,ge[Te++]=Qt>>>10&63,ge[Te++]=Qt>>>16&63,ge[Te++]=Qt>>>22&63,ge[Te++]=63&(Qt>>>28|(3&er)<<4),ge[Te++]=er>>>2&63,ge[Te++]=er>>>8&63,ge[Te++]=er>>>14&63,ge[Te++]=er>>>20&63,ge[Te++]=er>>>26&63}})(R,d,L,W);break;case 7:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0;ge[Te++]=it>>>0&127,ge[Te++]=it>>>7&127,ge[Te++]=it>>>14&127,ge[Te++]=it>>>21&127,ge[Te++]=127&(it>>>28|(7&He)<<4),ge[Te++]=He>>>3&127,ge[Te++]=He>>>10&127,ge[Te++]=He>>>17&127,ge[Te++]=He>>>24&127,ge[Te++]=127&(He>>>31|(63&bt)<<1),ge[Te++]=bt>>>6&127,ge[Te++]=bt>>>13&127,ge[Te++]=bt>>>20&127,ge[Te++]=127&(bt>>>27|(3&Et)<<5),ge[Te++]=Et>>>2&127,ge[Te++]=Et>>>9&127,ge[Te++]=Et>>>16&127,ge[Te++]=Et>>>23&127,ge[Te++]=127&(Et>>>30|(31&Qt)<<2),ge[Te++]=Qt>>>5&127,ge[Te++]=Qt>>>12&127,ge[Te++]=Qt>>>19&127,ge[Te++]=127&(Qt>>>26|(1&er)<<6),ge[Te++]=er>>>1&127,ge[Te++]=er>>>8&127,ge[Te++]=er>>>15&127,ge[Te++]=er>>>22&127,ge[Te++]=127&(er>>>29|(15&br)<<3),ge[Te++]=br>>>4&127,ge[Te++]=br>>>11&127,ge[Te++]=br>>>18&127,ge[Te++]=br>>>25&127}})(R,d,L,W);break;case 8:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0,sr=ue[Oe++]>>>0;ge[Te++]=it>>>0&255,ge[Te++]=it>>>8&255,ge[Te++]=it>>>16&255,ge[Te++]=it>>>24&255,ge[Te++]=He>>>0&255,ge[Te++]=He>>>8&255,ge[Te++]=He>>>16&255,ge[Te++]=He>>>24&255,ge[Te++]=bt>>>0&255,ge[Te++]=bt>>>8&255,ge[Te++]=bt>>>16&255,ge[Te++]=bt>>>24&255,ge[Te++]=Et>>>0&255,ge[Te++]=Et>>>8&255,ge[Te++]=Et>>>16&255,ge[Te++]=Et>>>24&255,ge[Te++]=Qt>>>0&255,ge[Te++]=Qt>>>8&255,ge[Te++]=Qt>>>16&255,ge[Te++]=Qt>>>24&255,ge[Te++]=er>>>0&255,ge[Te++]=er>>>8&255,ge[Te++]=er>>>16&255,ge[Te++]=er>>>24&255,ge[Te++]=br>>>0&255,ge[Te++]=br>>>8&255,ge[Te++]=br>>>16&255,ge[Te++]=br>>>24&255,ge[Te++]=sr>>>0&255,ge[Te++]=sr>>>8&255,ge[Te++]=sr>>>16&255,ge[Te++]=sr>>>24&255}})(R,d,L,W);break;case 16:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<128;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=65535&it,ge[Te++]=it>>>16&65535}})(R,d,L,W);break;default:(function(ue,me,ge,Ce,Te){let Oe=B3[Te]>>>0,Pe=me,it=0,He=ue[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let Qt=0;Qt<32;Qt++)if(it+Te<=32)ge[bt+Qt]=He>>>it&Oe,it+=Te,it===32&&(it=0,Pe++,Qt!==31&&(He=ue[Pe]>>>0));else{let er=32-it,br=He>>>it;Pe++,He=ue[Pe]>>>0;let sr=Te-er;ge[bt+Qt]=(br|(He&-1>>>32-sr>>>0)<>>0)}})(R,d,L,W,te)}return d+(te<<3)|0}function AY(R,d,L,W){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${W} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=R[L++],ue=R[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${W} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:ue,bytePosIn:L}}function MY(R,d,L,W,te,ue,me,ge,Ce){let{maxBits:Te,exceptionBitWidth:Oe,bytePosIn:Pe}=function(Qt,er,br,sr,Mr,qr){if(br+1>er)throw new Error(`FastPFOR decode: exception header underflow at block=${qr} (need 1 byte for maxBits, bytePos=${br}, byteSize=${er})`);let $r=Qt[br++];if($r32)throw new Error(`FastPFOR decode: invalid maxBits=${$r} at block=${qr} (bitWidth=${sr}, expected ${sr}..32)`);let _a=$r-sr|0;if(_a<1||_a>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${_a} at block=${qr} (bitWidth=${sr}, maxBits=${$r})`);if(br+Mr>er)throw new Error(`FastPFOR decode: exception positions underflow at block=${qr} (need=${Mr}, have=${er-br})`);return{maxBits:$r,exceptionBitWidth:_a,bytePosIn:br}}(te,ue,me,L,W,Ce);if(me=Pe,Oe===1){let Qt=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${Oe} (ptr=${bt}, need ${W}, size=${Et}) at block ${Ce}`);for(let Qt=0;QtR.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${ge} at pageStart=${me} (expected > 0 and pageStart+whereMeta < encoded.length=${R.length})`);let Ce=me+1|0,Te=me+ge|0,Oe=R[Te]>>>0,Pe=Oe+3>>>2,it=Te+1,He=it+Pe;if(He>=R.length)throw new Error(`FastPFOR decode: invalid byteSize=${Oe} (metaInts=${Pe}, pageStart=${me}, packedEnd=${Te}, byteContainerStart=${it}) causes bitmapPos=${He} out of bounds (encoded.length=${R.length})`);let bt=function(er,br,sr,Mr){Mr.byteContainer.length>>2;if(3&qr.byteOffset)for(let Ca=0;Ca<$r;Ca=Ca+1|0){let nn=0|er[br+Ca|0],qa=Ca<<2;qr[qa]=255&nn,qr[qa+1|0]=nn>>>8&255,qr[qa+2|0]=nn>>>16&255,qr[qa+3|0]=nn>>>24&255}else{let Ca=Mr.byteContainerI32;(!Ca||Ca.buffer!==qr.buffer||Ca.byteOffset!==qr.byteOffset||Ca.length<$r)&&(Ca=Mr.byteContainerI32=new Int32Array(qr.buffer,qr.byteOffset,qr.byteLength>>>2)),Ca.set(er.subarray(br,br+$r))}let _a=3&sr;if(_a>0){let Ca=0|er[br+$r|0],nn=$r<<2;for(let qa=0;qa<_a;qa=qa+1|0)qr[nn+qa|0]=Ca>>>(qa<<3)&255}return qr}(R,it,Oe,ue),Et=Oe,Qt=function(er,br,sr){let Mr=0|er[br++],qr=sr.dataToBePacked;for(let $r=2;$r<=32;$r=$r+1|0){if(!(Mr>>>$r-1&1))continue;if(br>=er.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${$r}, streamWordIndex=${br}, needWords=1, availableWords=${er.length-br}, encodedWords=${er.length})`);let _a=er[br++]>>>0,Ca=O3(_a+31,32),nn=_a*$r+31>>>5;if(br+nn>er.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${$r}, size=${_a}, streamWordIndex=${br}, needWords=${nn}, availableWords=${er.length-br}, encodedWords=${er.length})`);let qa=qr[$r];(!qa||qa.length>>5)|0,sr.exceptionSizes[$r]=_a}return br}(R,He,ue);return ue.dataPointers.fill(0),function(er,br,sr,Mr,qr,$r,_a,Ca,nn,qa){let bn=0|sr,Fn=0;for(let gn=0;gn<_a;gn=gn+1|0){let Va=AY(Ca,nn,Fn,gn);Fn=Va.bytePosIn;let Hn=Va.bitWidth,ni=Va.exceptionCount,Wn=$r+gn*Xd|0;switch(Hn){case 0:qr.fill(0,Wn,Wn+Xd);break;case 32:for(let si=0;si0&&(Fn=MY(qr,Wn,Hn,ni,Ca,nn,Fn,qa,gn))}if(bn!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${br}, packedStart=${sr}, consumedPackedEnd=${bn}, expectedPackedEnd=${Mr}, packedWords=${Mr-sr}, encoded.length=${er.length})`)}(R,me,Ce,Te,d,0|W,te/Xd|0,bt,Et,ue),Qt}function EY(R,d,L,W,te){switch(te){case 2:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0;Pe[He++]=bt>>>0&3,Pe[He++]=bt>>>2&3,Pe[He++]=bt>>>4&3,Pe[He++]=bt>>>6&3,Pe[He++]=bt>>>8&3,Pe[He++]=bt>>>10&3,Pe[He++]=bt>>>12&3,Pe[He++]=bt>>>14&3,Pe[He++]=bt>>>16&3,Pe[He++]=bt>>>18&3,Pe[He++]=bt>>>20&3,Pe[He++]=bt>>>22&3,Pe[He++]=bt>>>24&3,Pe[He++]=bt>>>26&3,Pe[He++]=bt>>>28&3,Pe[He++]=bt>>>30&3,Pe[He++]=Et>>>0&3,Pe[He++]=Et>>>2&3,Pe[He++]=Et>>>4&3,Pe[He++]=Et>>>6&3,Pe[He++]=Et>>>8&3,Pe[He++]=Et>>>10&3,Pe[He++]=Et>>>12&3,Pe[He++]=Et>>>14&3,Pe[He++]=Et>>>16&3,Pe[He++]=Et>>>18&3,Pe[He++]=Et>>>20&3,Pe[He++]=Et>>>22&3,Pe[He++]=Et>>>24&3,Pe[He++]=Et>>>26&3,Pe[He++]=Et>>>28&3,Pe[He]=Et>>>30&3}(R,d,L,W);case 3:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0;Pe[He++]=bt>>>0&7,Pe[He++]=bt>>>3&7,Pe[He++]=bt>>>6&7,Pe[He++]=bt>>>9&7,Pe[He++]=bt>>>12&7,Pe[He++]=bt>>>15&7,Pe[He++]=bt>>>18&7,Pe[He++]=bt>>>21&7,Pe[He++]=bt>>>24&7,Pe[He++]=bt>>>27&7,Pe[He++]=7&(bt>>>30|(1&Et)<<2),Pe[He++]=Et>>>1&7,Pe[He++]=Et>>>4&7,Pe[He++]=Et>>>7&7,Pe[He++]=Et>>>10&7,Pe[He++]=Et>>>13&7,Pe[He++]=Et>>>16&7,Pe[He++]=Et>>>19&7,Pe[He++]=Et>>>22&7,Pe[He++]=Et>>>25&7,Pe[He++]=Et>>>28&7,Pe[He++]=7&(Et>>>31|(3&Qt)<<1),Pe[He++]=Qt>>>2&7,Pe[He++]=Qt>>>5&7,Pe[He++]=Qt>>>8&7,Pe[He++]=Qt>>>11&7,Pe[He++]=Qt>>>14&7,Pe[He++]=Qt>>>17&7,Pe[He++]=Qt>>>20&7,Pe[He++]=Qt>>>23&7,Pe[He++]=Qt>>>26&7,Pe[He]=Qt>>>29&7}(R,d,L,W);case 4:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0;Pe[He++]=bt>>>0&15,Pe[He++]=bt>>>4&15,Pe[He++]=bt>>>8&15,Pe[He++]=bt>>>12&15,Pe[He++]=bt>>>16&15,Pe[He++]=bt>>>20&15,Pe[He++]=bt>>>24&15,Pe[He++]=bt>>>28&15,Pe[He++]=Et>>>0&15,Pe[He++]=Et>>>4&15,Pe[He++]=Et>>>8&15,Pe[He++]=Et>>>12&15,Pe[He++]=Et>>>16&15,Pe[He++]=Et>>>20&15,Pe[He++]=Et>>>24&15,Pe[He++]=Et>>>28&15,Pe[He++]=Qt>>>0&15,Pe[He++]=Qt>>>4&15,Pe[He++]=Qt>>>8&15,Pe[He++]=Qt>>>12&15,Pe[He++]=Qt>>>16&15,Pe[He++]=Qt>>>20&15,Pe[He++]=Qt>>>24&15,Pe[He++]=Qt>>>28&15,Pe[He++]=er>>>0&15,Pe[He++]=er>>>4&15,Pe[He++]=er>>>8&15,Pe[He++]=er>>>12&15,Pe[He++]=er>>>16&15,Pe[He++]=er>>>20&15,Pe[He++]=er>>>24&15,Pe[He]=er>>>28&15}(R,d,L,W);case 5:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0;Pe[He++]=bt>>>0&31,Pe[He++]=bt>>>5&31,Pe[He++]=bt>>>10&31,Pe[He++]=bt>>>15&31,Pe[He++]=bt>>>20&31,Pe[He++]=bt>>>25&31,Pe[He++]=31&(bt>>>30|(7&Et)<<2),Pe[He++]=Et>>>3&31,Pe[He++]=Et>>>8&31,Pe[He++]=Et>>>13&31,Pe[He++]=Et>>>18&31,Pe[He++]=Et>>>23&31,Pe[He++]=31&(Et>>>28|(1&Qt)<<4),Pe[He++]=Qt>>>1&31,Pe[He++]=Qt>>>6&31,Pe[He++]=Qt>>>11&31,Pe[He++]=Qt>>>16&31,Pe[He++]=Qt>>>21&31,Pe[He++]=Qt>>>26&31,Pe[He++]=31&(Qt>>>31|(15&er)<<1),Pe[He++]=er>>>4&31,Pe[He++]=er>>>9&31,Pe[He++]=er>>>14&31,Pe[He++]=er>>>19&31,Pe[He++]=er>>>24&31,Pe[He++]=31&(er>>>29|(3&br)<<3),Pe[He++]=br>>>2&31,Pe[He++]=br>>>7&31,Pe[He++]=br>>>12&31,Pe[He++]=br>>>17&31,Pe[He++]=br>>>22&31,Pe[He]=br>>>27&31}(R,d,L,W);case 6:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0;Pe[He++]=bt>>>0&63,Pe[He++]=bt>>>6&63,Pe[He++]=bt>>>12&63,Pe[He++]=bt>>>18&63,Pe[He++]=bt>>>24&63,Pe[He++]=63&(bt>>>30|(15&Et)<<2),Pe[He++]=Et>>>4&63,Pe[He++]=Et>>>10&63,Pe[He++]=Et>>>16&63,Pe[He++]=Et>>>22&63,Pe[He++]=63&(Et>>>28|(3&Qt)<<4),Pe[He++]=Qt>>>2&63,Pe[He++]=Qt>>>8&63,Pe[He++]=Qt>>>14&63,Pe[He++]=Qt>>>20&63,Pe[He++]=Qt>>>26&63,Pe[He++]=er>>>0&63,Pe[He++]=er>>>6&63,Pe[He++]=er>>>12&63,Pe[He++]=er>>>18&63,Pe[He++]=er>>>24&63,Pe[He++]=63&(er>>>30|(15&br)<<2),Pe[He++]=br>>>4&63,Pe[He++]=br>>>10&63,Pe[He++]=br>>>16&63,Pe[He++]=br>>>22&63,Pe[He++]=63&(br>>>28|(3&sr)<<4),Pe[He++]=sr>>>2&63,Pe[He++]=sr>>>8&63,Pe[He++]=sr>>>14&63,Pe[He++]=sr>>>20&63,Pe[He]=sr>>>26&63}(R,d,L,W);case 7:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0;Pe[He++]=bt>>>0&127,Pe[He++]=bt>>>7&127,Pe[He++]=bt>>>14&127,Pe[He++]=bt>>>21&127,Pe[He++]=127&(bt>>>28|(7&Et)<<4),Pe[He++]=Et>>>3&127,Pe[He++]=Et>>>10&127,Pe[He++]=Et>>>17&127,Pe[He++]=Et>>>24&127,Pe[He++]=127&(Et>>>31|(63&Qt)<<1),Pe[He++]=Qt>>>6&127,Pe[He++]=Qt>>>13&127,Pe[He++]=Qt>>>20&127,Pe[He++]=127&(Qt>>>27|(3&er)<<5),Pe[He++]=er>>>2&127,Pe[He++]=er>>>9&127,Pe[He++]=er>>>16&127,Pe[He++]=er>>>23&127,Pe[He++]=127&(er>>>30|(31&br)<<2),Pe[He++]=br>>>5&127,Pe[He++]=br>>>12&127,Pe[He++]=br>>>19&127,Pe[He++]=127&(br>>>26|(1&sr)<<6),Pe[He++]=sr>>>1&127,Pe[He++]=sr>>>8&127,Pe[He++]=sr>>>15&127,Pe[He++]=sr>>>22&127,Pe[He++]=127&(sr>>>29|(15&Mr)<<3),Pe[He++]=Mr>>>4&127,Pe[He++]=Mr>>>11&127,Pe[He++]=Mr>>>18&127,Pe[He]=Mr>>>25&127}(R,d,L,W);case 8:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0;Pe[He++]=bt>>>0&255,Pe[He++]=bt>>>8&255,Pe[He++]=bt>>>16&255,Pe[He++]=bt>>>24&255,Pe[He++]=Et>>>0&255,Pe[He++]=Et>>>8&255,Pe[He++]=Et>>>16&255,Pe[He++]=Et>>>24&255,Pe[He++]=Qt>>>0&255,Pe[He++]=Qt>>>8&255,Pe[He++]=Qt>>>16&255,Pe[He++]=Qt>>>24&255,Pe[He++]=er>>>0&255,Pe[He++]=er>>>8&255,Pe[He++]=er>>>16&255,Pe[He++]=er>>>24&255,Pe[He++]=br>>>0&255,Pe[He++]=br>>>8&255,Pe[He++]=br>>>16&255,Pe[He++]=br>>>24&255,Pe[He++]=sr>>>0&255,Pe[He++]=sr>>>8&255,Pe[He++]=sr>>>16&255,Pe[He++]=sr>>>24&255,Pe[He++]=Mr>>>0&255,Pe[He++]=Mr>>>8&255,Pe[He++]=Mr>>>16&255,Pe[He++]=Mr>>>24&255,Pe[He++]=qr>>>0&255,Pe[He++]=qr>>>8&255,Pe[He++]=qr>>>16&255,Pe[He]=qr>>>24&255}(R,d,L,W);case 9:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0;Pe[He++]=bt>>>0&511,Pe[He++]=bt>>>9&511,Pe[He++]=bt>>>18&511,Pe[He++]=511&(bt>>>27|(15&Et)<<5),Pe[He++]=Et>>>4&511,Pe[He++]=Et>>>13&511,Pe[He++]=Et>>>22&511,Pe[He++]=511&(Et>>>31|(255&Qt)<<1),Pe[He++]=Qt>>>8&511,Pe[He++]=Qt>>>17&511,Pe[He++]=511&(Qt>>>26|(7&er)<<6),Pe[He++]=er>>>3&511,Pe[He++]=er>>>12&511,Pe[He++]=er>>>21&511,Pe[He++]=511&(er>>>30|(127&br)<<2),Pe[He++]=br>>>7&511,Pe[He++]=br>>>16&511,Pe[He++]=511&(br>>>25|(3&sr)<<7),Pe[He++]=sr>>>2&511,Pe[He++]=sr>>>11&511,Pe[He++]=sr>>>20&511,Pe[He++]=511&(sr>>>29|(63&Mr)<<3),Pe[He++]=Mr>>>6&511,Pe[He++]=Mr>>>15&511,Pe[He++]=511&(Mr>>>24|(1&qr)<<8),Pe[He++]=qr>>>1&511,Pe[He++]=qr>>>10&511,Pe[He++]=qr>>>19&511,Pe[He++]=511&(qr>>>28|(31&$r)<<4),Pe[He++]=$r>>>5&511,Pe[He++]=$r>>>14&511,Pe[He]=$r>>>23&511}(R,d,L,W);case 10:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0;Pe[He++]=bt>>>0&1023,Pe[He++]=bt>>>10&1023,Pe[He++]=bt>>>20&1023,Pe[He++]=1023&(bt>>>30|(255&Et)<<2),Pe[He++]=Et>>>8&1023,Pe[He++]=Et>>>18&1023,Pe[He++]=1023&(Et>>>28|(63&Qt)<<4),Pe[He++]=Qt>>>6&1023,Pe[He++]=Qt>>>16&1023,Pe[He++]=1023&(Qt>>>26|(15&er)<<6),Pe[He++]=er>>>4&1023,Pe[He++]=er>>>14&1023,Pe[He++]=1023&(er>>>24|(3&br)<<8),Pe[He++]=br>>>2&1023,Pe[He++]=br>>>12&1023,Pe[He++]=br>>>22&1023,Pe[He++]=sr>>>0&1023,Pe[He++]=sr>>>10&1023,Pe[He++]=sr>>>20&1023,Pe[He++]=1023&(sr>>>30|(255&Mr)<<2),Pe[He++]=Mr>>>8&1023,Pe[He++]=Mr>>>18&1023,Pe[He++]=1023&(Mr>>>28|(63&qr)<<4),Pe[He++]=qr>>>6&1023,Pe[He++]=qr>>>16&1023,Pe[He++]=1023&(qr>>>26|(15&$r)<<6),Pe[He++]=$r>>>4&1023,Pe[He++]=$r>>>14&1023,Pe[He++]=1023&($r>>>24|(3&_a)<<8),Pe[He++]=_a>>>2&1023,Pe[He++]=_a>>>12&1023,Pe[He]=_a>>>22&1023}(R,d,L,W);case 11:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0;Pe[He++]=bt>>>0&2047,Pe[He++]=bt>>>11&2047,Pe[He++]=2047&(bt>>>22|(1&Et)<<10),Pe[He++]=Et>>>1&2047,Pe[He++]=Et>>>12&2047,Pe[He++]=2047&(Et>>>23|(3&Qt)<<9),Pe[He++]=Qt>>>2&2047,Pe[He++]=Qt>>>13&2047,Pe[He++]=2047&(Qt>>>24|(7&er)<<8),Pe[He++]=er>>>3&2047,Pe[He++]=er>>>14&2047,Pe[He++]=2047&(er>>>25|(15&br)<<7),Pe[He++]=br>>>4&2047,Pe[He++]=br>>>15&2047,Pe[He++]=2047&(br>>>26|(31&sr)<<6),Pe[He++]=sr>>>5&2047,Pe[He++]=sr>>>16&2047,Pe[He++]=2047&(sr>>>27|(63&Mr)<<5),Pe[He++]=Mr>>>6&2047,Pe[He++]=Mr>>>17&2047,Pe[He++]=2047&(Mr>>>28|(127&qr)<<4),Pe[He++]=qr>>>7&2047,Pe[He++]=qr>>>18&2047,Pe[He++]=2047&(qr>>>29|(255&$r)<<3),Pe[He++]=$r>>>8&2047,Pe[He++]=$r>>>19&2047,Pe[He++]=2047&($r>>>30|(511&_a)<<2),Pe[He++]=_a>>>9&2047,Pe[He++]=_a>>>20&2047,Pe[He++]=2047&(_a>>>31|(1023&Ca)<<1),Pe[He++]=Ca>>>10&2047,Pe[He]=Ca>>>21&2047}(R,d,L,W);case 12:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0;Pe[He++]=bt>>>0&4095,Pe[He++]=bt>>>12&4095,Pe[He++]=4095&(bt>>>24|(15&Et)<<8),Pe[He++]=Et>>>4&4095,Pe[He++]=Et>>>16&4095,Pe[He++]=4095&(Et>>>28|(255&Qt)<<4),Pe[He++]=Qt>>>8&4095,Pe[He++]=Qt>>>20&4095,Pe[He++]=er>>>0&4095,Pe[He++]=er>>>12&4095,Pe[He++]=4095&(er>>>24|(15&br)<<8),Pe[He++]=br>>>4&4095,Pe[He++]=br>>>16&4095,Pe[He++]=4095&(br>>>28|(255&sr)<<4),Pe[He++]=sr>>>8&4095,Pe[He++]=sr>>>20&4095,Pe[He++]=Mr>>>0&4095,Pe[He++]=Mr>>>12&4095,Pe[He++]=4095&(Mr>>>24|(15&qr)<<8),Pe[He++]=qr>>>4&4095,Pe[He++]=qr>>>16&4095,Pe[He++]=4095&(qr>>>28|(255&$r)<<4),Pe[He++]=$r>>>8&4095,Pe[He++]=$r>>>20&4095,Pe[He++]=_a>>>0&4095,Pe[He++]=_a>>>12&4095,Pe[He++]=4095&(_a>>>24|(15&Ca)<<8),Pe[He++]=Ca>>>4&4095,Pe[He++]=Ca>>>16&4095,Pe[He++]=4095&(Ca>>>28|(255&nn)<<4),Pe[He++]=nn>>>8&4095,Pe[He]=nn>>>20&4095}(R,d,L,W);case 16:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0,qa=Te[Oe+12]>>>0,bn=Te[Oe+13]>>>0,Fn=Te[Oe+14]>>>0,gn=Te[Oe+15]>>>0;Pe[He++]=bt>>>0&65535,Pe[He++]=bt>>>16&65535,Pe[He++]=Et>>>0&65535,Pe[He++]=Et>>>16&65535,Pe[He++]=Qt>>>0&65535,Pe[He++]=Qt>>>16&65535,Pe[He++]=er>>>0&65535,Pe[He++]=er>>>16&65535,Pe[He++]=br>>>0&65535,Pe[He++]=br>>>16&65535,Pe[He++]=sr>>>0&65535,Pe[He++]=sr>>>16&65535,Pe[He++]=Mr>>>0&65535,Pe[He++]=Mr>>>16&65535,Pe[He++]=qr>>>0&65535,Pe[He++]=qr>>>16&65535,Pe[He++]=$r>>>0&65535,Pe[He++]=$r>>>16&65535,Pe[He++]=_a>>>0&65535,Pe[He++]=_a>>>16&65535,Pe[He++]=Ca>>>0&65535,Pe[He++]=Ca>>>16&65535,Pe[He++]=nn>>>0&65535,Pe[He++]=nn>>>16&65535,Pe[He++]=qa>>>0&65535,Pe[He++]=qa>>>16&65535,Pe[He++]=bn>>>0&65535,Pe[He++]=bn>>>16&65535,Pe[He++]=Fn>>>0&65535,Pe[He++]=Fn>>>16&65535,Pe[He++]=gn>>>0&65535,Pe[He]=gn>>>16&65535}(R,d,L,W);case 32:for(let Te=0;Te<32;Te=Te+1|0)L[W+Te|0]=0|R[d+Te|0];return}let ue=B3[te]>>>0,me=d,ge=0,Ce=R[me]>>>0;for(let Te=0;Te<32;Te++)if(ge+te<=32)L[W+Te]=Ce>>>ge&ue,ge+=te,ge===32&&(ge=0,me++,Te!==31&&(Ce=R[me]>>>0));else{let Oe=32-ge,Pe=Ce>>>ge;me++,Ce=R[me]>>>0,L[W+Te]=(Pe|(Ce&B3[te-Oe]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function CY(R,d){let L,W;return W=R[d.get()],d.increment(),L=127&W,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<7,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<14,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<21,W<128?L:(W=R[d.get()],L|=(15&W)<<28,function(te,ue,me){let ge,Ce;if(Ce=ue[me.get()],me.increment(),ge=(112&Ce)>>4,Ce<128||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<3,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<10,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<17,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<24,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(1&Ce)<<31,Ce<128))return 4294967296*ge+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,R,d)))))}function Js(R){return R>>>1^-(1&R)}function fh(R){return R>>BigInt("1")^-(BigInt("1")&R)}function C0(R){return R%2==1?(R+1)/-2:R/2}function j3(R,d,L){if(L===void 0){L=0;for(let ue=0;ue=4)for(;W=4)for(;W=4)for(let W=R[0];L>4],ge=null;switch(me){case Tf.DATA:ge={dictionaryType:Object.values(fd)[15&ue]};break;case Tf.OFFSET:ge={offsetType:Object.values(kv)[15&ue]};break;case Tf.LENGTH:ge={lengthType:Object.values(Rh)[15&ue]}}te.increment();let Ce=W[te.get()],Te=Object.values(us)[Ce>>5],Oe=Object.values(us)[Ce>>2&7],Pe=Object.values(Tp)[3&Ce];te.increment();let it=Yf(W,te,2),He=it[0];return{physicalStreamType:me,logicalStreamType:ge,logicalLevelTechnique1:Te,logicalLevelTechnique2:Oe,physicalLevelTechnique:Pe,numValues:He,byteLength:it[1],decompressedCount:He}}(R,d);return L.logicalLevelTechnique1===us.MORTON?function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:W.decompressedCount,numBits:me[0],coordinateShift:me[1]}}(L,R,d):us.RLE!==L.logicalLevelTechnique1&&us.RLE!==L.logicalLevelTechnique2||Tp.NONE===L.physicalLevelTechnique?L:function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:me[1],runs:me[0],numRleValues:me[1]}}(L,R,d)}(function(R){R.PRESENT="PRESENT",R.DATA="DATA",R.OFFSET="OFFSET",R.LENGTH="LENGTH"})(Tf||(Tf={})),function(R){R.NONE="NONE",R.SINGLE="SINGLE",R.SHARED="SHARED",R.VERTEX="VERTEX",R.MORTON="MORTON",R.FSST="FSST"}(fd||(fd={})),function(R){R.VERTEX="VERTEX",R.INDEX="INDEX",R.STRING="STRING",R.KEY="KEY"}(kv||(kv={})),function(R){R.VAR_BINARY="VAR_BINARY",R.GEOMETRIES="GEOMETRIES",R.PARTS="PARTS",R.RINGS="RINGS",R.TRIANGLES="TRIANGLES",R.SYMBOL="SYMBOL",R.DICTIONARY="DICTIONARY"}(Rh||(Rh={})),function(R){R[R.FLAT=0]="FLAT",R[R.CONST=1]="CONST",R[R.SEQUENCE=2]="SEQUENCE",R[R.DICTIONARY=3]="DICTIONARY",R[R.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Gl||(Gl={}));class hd{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let W=Math.floor(d/8);this.values[W]=this.values[W]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function L0(R,d,L){if(!d)return R;let W=d.size(),te=new R.constructor(W),ue=0;for(let me=0;me=4)for(;He>>0;for(let it=1;it>>0;return Pe}(me.logicalLevelTechnique2===us.RLE?j3(ue,me.runs,me.numRleValues):ue);break;case us.RLE:Te=j3(ue,me.runs,me.numRleValues);break;case us.MORTON:q3(ue),Te=ue;break;case us.COMPONENTWISE_DELTA:Te=function(Oe){if(Oe.length<2)return new Uint32Array(Oe);let Pe=new Uint32Array(Oe.length);Pe[0]=Js(Oe[0])>>>0,Pe[1]=Js(Oe[1])>>>0;for(let it=2;it>>0,Pe[it+1]=Pe[it-1]+Js(Oe[it+1])>>>0;return Pe}(ue);break;case us.NONE:Te=ue;break;default:throw new Error(`The specified Logical level technique is not supported: ${me.logicalLevelTechnique1}`)}return Ce?L0(Te,Ce,0):Te}(P0(R,d,L),L,0,te)}function Mp(R,d,L){return function(W,te){if(te.logicalLevelTechnique1===us.DELTA&&te.logicalLevelTechnique2===us.NONE)return function(ue){let me=new Int32Array(ue.length+1);me[0]=0,me[1]=Js(ue[0]);let ge=me[1];for(let Ce=2;Ce!==me.length;++Ce)ge+=Js(ue[Ce-1]),me[Ce]=me[Ce-1]+ge;return new Uint32Array(me)}(W);if(te.logicalLevelTechnique1===us.RLE&&te.logicalLevelTechnique2===us.NONE)return function(ue,me,ge){let Ce=new Uint32Array(ge+1);Ce[0]=0;let Te=1,Oe=Ce[0];for(let Pe=0;Pe>>2,Et=function(er,br){if(br<=er.encodedWords.length)return er.encodedWords;let sr=new Uint32Array(Math.max(16,2*br));return er.encodedWords=sr,sr}(it,bt);(function(er,br,sr,Mr){if(br<0||sr<0||br+sr>er.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${br}, byteLength=${sr}, bytes.length=${er.length})`);let qr=Math.floor(sr/4),$r=sr%4!=0,_a=$r?qr+1:qr;if(Mr.length<_a)throw new RangeError(`decodeBigEndianInt32sInto: out.length=${Mr.length} < ${_a}`);if(qr>0){let Ca=er.byteOffset+br;if(3&Ca)for(let nn=0;nn0){let Ca=0|er[Mr];if(Mr=Mr+1|0,255&Ca)throw new Error(`FastPFOR decode: invalid alignedLength=${Ca} (expected multiple of 256)`);if(qr+Ca>$r.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${qr}, alignedLength=${Ca}, out.length=${$r.length})`);Mr=function(nn,qa,bn,Fn,gn,Va){let Hn=Fn+O3(gn,Xd),ni=Fn,Wn=bn;for(;ni!==Hn;){let si=Math.min(N3,Hn-ni);Wn=SY(nn,qa,Wn,ni,si,Va),ni=ni+si|0}return Wn}(er,$r,Mr,qr,Ca,_a),qr=qr+Ca|0}return function(Ca,nn,qa,bn,Fn,gn){if(gn===0)return nn;let Va=0,Hn=nn,ni=nn+qa,Wn=Fn,si=Fn,po=Fn+gn,cs=0,Ds=0;for(;Hn>>Va&255;if(Va+=8,Hn+=Va>>>5,Va&=31,cs|=(127&Xs)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${Ds}, partial=${cs}, decoded=${si-Wn}/${gn}, inPos=${Hn}, inEnd=${ni})`)}if(si!==po)throw new Error(`FastPFOR VByte: truncated stream (decoded=${si-Wn}, expected=${gn}, consumedWords=${Hn-nn}/${qa}, vbyteStart=${nn}, vbyteEnd=${ni})`)}(er,Mr,er.length-Mr|0,$r,qr,br-qr|0),$r}(Et.subarray(0,bt),Te,it.decoderWorkspace);return Pe.add(Oe),Qt}(te,ue,me,ge,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let Te=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(Te),decoderWorkspace:bS()}}(me>>>2))}(R,L.numValues,L.byteLength,d);case Tp.VARINT:return Yf(R,d,L.numValues);case Tp.NONE:{let te=d.get();d.add(L.byteLength);let ue=R.subarray(te,d.get());return new Uint32Array(ue)}default:throw new Error(`Specified physicalLevelTechnique ${W} is not supported (yet).`)}}function G3(R,d,L){let W=P0(R,d,L);return W.length===1?W[0]:function(te){return te[1]}(W)}function SS(R,d,L){return function(W){if(W.length===2){let te=Js(W[1]);return[te,te]}return[Js(W[2]),Js(W[3])]}(P0(R,d,L))}function ES(R,d,L){return function(W){if(W.length===2){let te=fh(W[1]);return[te,te]}return[fh(W[2]),fh(W[3])]}(k0(R,d,L.numValues))}function kS(R,d,L,W){return function(te,ue,me){let ge;switch(ue.logicalLevelTechnique1){case us.DELTA:ge=function(Ce){let Te=new BigUint64Array(Ce.length);Te[0]=BigInt.asUintN(64,fh(Ce[0]));for(let Oe=1;Oe>1,d)-L}}function RS(R,d){let L=0;for(let W=0;W>W;return L}function R0(R,d,L,W,te,ue,me){return R===Ap.MORTON?function(ge,Ce,Te,Oe,Pe,it){let He=new Array(Pe?Oe+1:Oe);for(let bt=0;bt[qr]),W+=sr,te+=sr}break;case Ic.LINESTRING:{let sr,Mr;Qt?(sr=He[te]-He[te-1],te++):sr=it[W]-it[W-1],W++,Et?(Mr=I0(er,ge,sr,!1),ge+=2*sr):(Mr=R0(d.vertexBufferType,er,bt,Ce,sr,!1,Te),Ce+=sr),L[me++]=[Mr],Pe&&ue++}break;case Ic.POLYGON:{let sr=it[W]-it[W-1];W++;let Mr=new Array(sr-1),qr,$r=He[te]-He[te-1];if(te++,Et){qr=I0(er,ge,$r,!0),ge+=2*$r;for(let _a=0;_a0&&Et.push(Et[0]),it.push(Et)}d[Oe]=it,ue&&Te++}break;case Ic.MULTIPOLYGON:{let Pe=ue[Te]-ue[Te-1];Te++;let it=[];for(let He=0;He0&&er.push(er[0]),it.push(er)}}d[Oe]=it}}return d}[Symbol.iterator](){return null}}function BS(R,d,L,W,te,ue){return new LY(R,d,L,W,te,ue)}class LY extends zS{constructor(d,L,W,te,ue,me){super(W,te,ue,me),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function OS(R,d,L,W,te){return new PY(R,d,L,W,te)}class PY extends zS{constructor(d,L,W,te,ue){super(L,W,te,ue),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function RY(R,d,L,W,te){let ue=hh(R,L),me,ge,Ce,Te;if(My(ue,W,R,L)===Gl.CONST){let br=G3(R,L,ue),sr,Mr,qr,$r;for(let _a=0;_aL?d[ue++]:1);return W}function NS(R,d,L,W){let te=new Uint32Array(d[d.length-1]+1),ue=0;te[0]=ue;let me=1,ge=0;for(let Ce=0;Ce=it);){let He=me[Te.increment()];if(He<=127){let bt=He+3,Et=me[Te.increment()],Qt=Math.min(Pe+bt,ge);Oe.fill(Et,Pe,Qt),Pe=Qt}else{let bt=256-He;for(let Et=0;Et=12?FY.decode(R.subarray(d,L)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(R,d,L)}class X3 extends E0{constructor(d,L,W,te){super(d,W,te),this.offsetBuffer=L}}class US extends X3{constructor(d,L,W,te){super(d,L,W,te??L.length-1)}getValueFromBuffer(d){return Y3(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class D0 extends X3{constructor(d,L,W,te,ue){super(d,W,te,ue??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Y3(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class qS extends X3{constructor(d,L,W,te,ue,me,ge){super(d,W,te,ge),this.indexBuffer=L,this.symbolOffsetBuffer=ue,this.symbolTableBuffer=me}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(W,te,ue){let me=[],ge=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function HS(R){return R===30}function BY(R){if(R.type==="scalarType"){let d=R.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(R.type==="complexType"){let d=R.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",R),!1}function OY(R){var d;return R.type==="complexType"&&((d=R.complexType)==null?void 0:d.type)==="physicalType"&&R.complexType.physicalType===0}let NY=new TextDecoder;function Z3(R,d){let L=Yf(R,d,1)[0];if(L===0)return"";let W=d.get(),te=R.subarray(W,W+L);return d.add(L),NY.decode(te)}function WS(R,d){let L=Yf(R,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let W=VS(L);if(GS(L)&&(W.name=Z3(R,d)),HS(L)){let te=Yf(R,d,1)[0]>>>0;W.complexType.children=new Array(te);for(let ue=0;ue>>0,W=VS(L);if(!W)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(GS(L)?W.name=Z3(R,d):L>=0&&L<=3?W.name="id":L===4&&(W.name="geometry"),HS(L)){let te=Yf(R,d,1)[0]>>>0,ue=W.complexType;ue.children=new Array(te);for(let me=0;me>>0,ue=Yf(R,d,1)[0]>>>0;W.columns=new Array(ue);for(let me=0;me=4)for(;qr>>0,Pe=ge.get()+Oe;if(Pe>W.length)throw new Error(`Block overruns tile: ${Pe} > ${W.length}`);if(Yf(W,ge,1)[0]>>>0!=1){ge.set(Pe);continue}let[it,He]=UY(W,ge),bt=it.featureTables[0],Et=null,Qt=null,er=[],br=0;for(let Mr of bt.columns){let qr=Mr.name;if((Te=Mr).type==="scalarType"&&((me=Te.scalarType)==null?void 0:me.type)==="logicalType"&&Te.scalarType.logicalType===0){let $r=null;if(Mr.nullable){let Ca=hh(W,ge),nn=ge.get(),qa=Dg(W,Ca.numValues,Ca.byteLength,ge);ge.set(nn+Ca.byteLength),$r=new hd(qa,Ca.numValues)}let _a=hh(W,ge);br=$r?$r.size():_a.decompressedCount,Et=qY(W,Mr,ge,qr,_a,$r??br,ue)}else if(OY(Mr)){let $r=Yf(W,ge,1)[0];if(br===0){let _a=ge.get();br=hh(W,ge).decompressedCount,ge.set(_a)}Qt=RY(W,$r,ge,br)}else{let $r=BY(Mr)?Yf(W,ge,1)[0]:1;if($r===0)continue;let _a=zY(W,ge,Mr,$r,br);if(_a)if(Array.isArray(_a))for(let Ca of _a)er.push(Ca);else er.push(_a)}}let sr=new xY(bt.name,Qt,Et,er,He);Ce.push(sr),ge.set(Pe)}var Te;return Ce}(new Uint8Array(d));this.layers=L.reduce((W,te)=>Object.assign(Object.assign({},W),{[te.name]:new GY(te)}),{})}}class HY{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let W of L){let te=[];for(let ue of W)te.push(new t(ue[0],ue[1]));d.push(te)}return d}}let zg="_geojsonTileLayer";function WY(R,d,L=""){d.writeVarintField(15,R.version||1),d.writeStringField(1,R.name||""),d.writeVarintField(5,R.extent||4096);let W={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let me=0;me>31}function ZY(R,d){let L=R.loadGeometry(),W=R.type,te=0,ue=0;for(let me of L){let ge=1;W===1&&(ge=me.length),d.writeVarint($3(1,ge));let Ce=W===3?me.length-1:me.length;for(let Te=0;Te=0&&Oe[3]>=0&&Ce.insert(ge,Oe[0],Oe[1],Oe[2],Oe[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new w4(new _y(this.rawTileData)).layers:new YS(this.rawTileData).layers,this.sourceLayerCoder=new gS(this.vtLayers?Object.keys(this.vtLayers).sort():[zg])),this.vtLayers}query(d,L,W,te){this.loadVTLayers();let ue=d.params,me=F/d.tileSize/d.scale,ge=Na(ue.filter,ue.globalState),Ce=d.queryGeometry,Te=d.queryPadding*me,Oe=Ev.fromPoints(Ce),Pe=this.grid.query(Oe.minX-Te,Oe.minY-Te,Oe.maxX+Te,Oe.maxY+Te),it=Ev.fromPoints(d.cameraQueryGeometry).expandBy(Te),He=this.grid3D.query(it.minX,it.minY,it.maxX,it.maxY,(Qt,er,br,sr)=>function(Mr,qr,$r,_a,Ca){for(let qa of Mr)if(qr<=qa.x&&$r<=qa.y&&_a>=qa.x&&Ca>=qa.y)return!0;let nn=[new t(qr,$r),new t(qr,Ca),new t(_a,Ca),new t(_a,$r)];if(Mr.length>2){for(let qa of nn)if(Wa(Mr,qa))return!0}for(let qa=0;qa(br||(br=ql(sr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:sr,featureState:qr,geometry:br,zoom:this.z,transform:d.transform,pixelsToTileUnits:me,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=this.bucketLayerIDs[L];if(me&&!it.some(Qt=>me.has(Qt)))return;let He=this.sourceLayerCoder.decode(W),bt=this.vtLayers[He].feature(te);if(ue.needGeometry){let Qt=fo(bt,!0);if(!ue.filter(new oi(this.tileID.overscaledZ),Qt,this.tileID.canonical))return}else if(!ue.filter(new oi(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,He);for(let Qt of it){if(me&&!me.has(Qt))continue;let er=Ce[Qt];if(!er)continue;let br={};Et&&Oe&&(br=Oe.getState(er.sourceLayer||zg,Et));let sr=X({},Te[Qt]);sr.paint=$S(sr.paint,er.paint,bt,br,ge),sr.layout=$S(sr.layout,er.layout,bt,br,ge);let Mr=!Pe||Pe(bt,er,br);if(!Mr)continue;let qr=new yS(bt,this.z,this.x,this.y,Et);qr.layer=sr;let $r=d[Qt];$r===void 0&&($r=d[Qt]=[]),$r.push({featureIndex:te,feature:qr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,W,te,ue,me,ge,Ce){let Te={};this.loadVTLayers();let Oe=Na(ue.filterSpec,ue.globalState);for(let Pe of d)this.loadMatchingFeature(Te,W,te,Pe,Oe,me,ge,Ce,L);return Te}hasLayer(d){for(let L of this.bucketLayerIDs)for(let W of L)if(d===W)return!0;return!1}getId(d,L){var W;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((W=d.properties)===null||W===void 0)&&W.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function $S(R,d,L,W,te){return H(R,(ue,me)=>{let ge=d instanceof Cu?d.get(me):null;return ge?.evaluate?ge.evaluate(L,W,te):ge})}function KY(R,d){return d-R}function KS(R,d,L,W,te){let ue=[];for(let me of R){let ge;for(let Ce=0;Ce=W&&Oe.x>=W||(Te.x>=W?Te=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round():Oe.x>=W&&(Oe=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round()),Te.y>=te&&Oe.y>=te||(Te.y>=te?Te=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round():Oe.y>=te&&(Oe=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round()),ge&&Te.equals(ge[ge.length-1])||(ge=[Te],ue.push(ge)),ge.push(Oe)))))}}return ue}function JS(R,d,L,W,te){switch(d){case 1:return function(ue,me,ge,Ce){let Te=[];for(let Oe of ue)for(let Pe of Oe){let it=Ce===0?Pe.x:Pe.y;it>=me&&it<=ge&&Te.push([Pe])}return Te}(R,L,W,te);case 2:return QS(R,L,W,te,!1);case 3:return QS(R,L,W,te,!0)}return[]}function JY(R,d,L,W,te){let ue=W===0?QY:eX,me=[],ge=[];for(let Oe=0;Oed&&me.push(ue(Pe,it,d)):He>L?bt=d&&(me.push(ue(Pe,it,d)),Et=!0),bt>L&&He<=L&&(me.push(ue(Pe,it,L)),Et=!0),!te&&Et&&(ge.push(me),me=[])}let Ce=R.length-1,Te=W===0?R[Ce].x:R[Ce].y;return Te>=d&&Te<=L&&me.push(R[Ce]),te&&me.length>0&&!me[0].equals(me[me.length-1])&&me.push(new t(me[0].x,me[0].y)),me.length>0&&ge.push(me),ge}function QS(R,d,L,W,te){let ue=[];for(let me of R){let ge=JY(me,d,L,W,te);ge.length>0&&ue.push(...ge)}return ue}function QY(R,d,L){return new t(L,R.y+(L-R.x)/(d.x-R.x)*(d.y-R.y))}function eX(R,d,L){return new t(R.x+(L-R.y)/(d.y-R.y)*(d.x-R.x),L)}fi("FeatureIndex",ZS,{omit:["rawTileData","sourceLayerCoder"]});class Sp extends t{constructor(d,L,W,te){super(d,L),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new Sp(this.x,this.y,this.angle,this.segment)}}function eE(R,d,L,W,te){if(d.segment===void 0||L===0)return!0;let ue=d,me=d.segment+1,ge=0;for(;ge>-L/2;){if(me--,me<0)return!1;ge-=R[me].dist(ue),ue=R[me]}ge+=R[me].dist(R[me+1]),me++;let Ce=[],Te=0;for(;geW;)Te-=Ce.shift().angleDelta;if(Te>te)return!1;me++,ge+=Oe.dist(Pe)}return!0}function tE(R){let d=0;for(let L=0;LTe){let bt=(Te-Ce)/He,Et=bs.number(Pe.x,it.x,bt),Qt=bs.number(Pe.y,it.y,bt),er=new Sp(Et,Qt,it.angleTo(Pe),Oe);return er._round(),!me||eE(R,er,ge,me,d)?er:void 0}Ce+=He}}function rX(R,d,L,W,te,ue,me,ge,Ce){let Te=rE(W,ue,me),Oe=aE(W,te),Pe=Oe*me,it=R[0].x===0||R[0].x===Ce||R[0].y===0||R[0].y===Ce;return d-Pe=0&&Mr=0&&qr=0&&it+Te<=Oe){let $r=new Sp(Mr,qr,br,bt);$r._round(),W&&!eE(R,$r,ue,W,te)||He.push($r)}}Pe+=er}return ge||He.length||me||(He=nE(R,Pe/2,L,W,te,ue,me,!0,Ce)),He}function iE(R,d,L,W){let te=[],ue=R.image,me=ue.pixelRatio,ge=ue.paddedRect.w-2,Ce=ue.paddedRect.h-2,Te={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Oe=ue.stretchX||[[0,ge]],Pe=ue.stretchY||[[0,Ce]],it=(Va,Hn)=>Va+Hn[1]-Hn[0],He=Oe.reduce(it,0),bt=Pe.reduce(it,0),Et=ge-He,Qt=Ce-bt,er=0,br=He,sr=0,Mr=bt,qr=0,$r=Et,_a=0,Ca=Qt;if(ue.content&&W){let Va=ue.content,Hn=Va[2]-Va[0],ni=Va[3]-Va[1];(ue.textFitWidth||ue.textFitHeight)&&(Te=tS(R)),er=Sy(Oe,0,Va[0]),sr=Sy(Pe,0,Va[1]),br=Sy(Oe,Va[0],Va[2]),Mr=Sy(Pe,Va[1],Va[3]),qr=Va[0]-er,_a=Va[1]-sr,$r=Hn-br,Ca=ni-Mr}let nn=Te.x1,qa=Te.y1,bn=Te.x2-nn,Fn=Te.y2-qa,gn=(Va,Hn,ni,Wn)=>{let si=Ey(Va.stretch-er,br,bn,nn),po=ky(Va.fixed-qr,$r,Va.stretch,He),cs=Ey(Hn.stretch-sr,Mr,Fn,qa),Ds=ky(Hn.fixed-_a,Ca,Hn.stretch,bt),Xs=Ey(ni.stretch-er,br,bn,nn),Mf=ky(ni.fixed-qr,$r,ni.stretch,He),vu=Ey(Wn.stretch-sr,Mr,Fn,qa),yc=ky(Wn.fixed-_a,Ca,Wn.stretch,bt),Dc=new t(si,cs),Hl=new t(Xs,cs),rf=new t(Xs,vu),Xf=new t(si,vu),Zf=new t(po/me,Ds/me),Th=new t(Mf/me,yc/me),Sf=d*Math.PI/180;if(Sf){let Fc=Math.sin(Sf),nu=Math.cos(Sf),lc=[nu,-Fc,Fc,nu];Dc._matMult(lc),Hl._matMult(lc),Xf._matMult(lc),rf._matMult(lc)}let Ah=Va.stretch+Va.fixed,Hh=Hn.stretch+Hn.fixed;return{tl:Dc,tr:Hl,bl:Xf,br:rf,tex:{x:ue.paddedRect.x+1+Ah,y:ue.paddedRect.y+1+Hh,w:ni.stretch+ni.fixed-Ah,h:Wn.stretch+Wn.fixed-Hh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zf,pixelOffsetBR:Th,minFontScaleX:$r/me/bn,minFontScaleY:Ca/me/Fn,isSDF:L}};if(W&&(ue.stretchX||ue.stretchY)){let Va=oE(Oe,Et,He),Hn=oE(Pe,Qt,bt);for(let ni=0;ni0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let it=!((Pe=me.image)===null||Pe===void 0)&&Pe.content&&(me.image.textFitWidth||me.image.textFitHeight)?tS(me):{x1:me.left,y1:me.top,x2:me.right,y2:me.bottom};it.y1=it.y1*ge-Ce[0],it.y2=it.y2*ge+Ce[2],it.x1=it.x1*ge-Ce[3],it.x2=it.x2*ge+Ce[1];let He=me.collisionPadding;if(He&&(it.x1-=He[0]*ge,it.y1-=He[1]*ge,it.x2+=He[2]*ge,it.y2+=He[3]*ge),Oe){let bt=new t(it.x1,it.y1),Et=new t(it.x2,it.y1),Qt=new t(it.x1,it.y2),er=new t(it.x2,it.y2),br=Oe*Math.PI/180;bt._rotate(br),Et._rotate(br),Qt._rotate(br),er._rotate(br),it.x1=Math.min(bt.x,Et.x,Qt.x,er.x),it.x2=Math.max(bt.x,Et.x,Qt.x,er.x),it.y1=Math.min(bt.y,Et.y,Qt.y,er.y),it.y2=Math.max(bt.y,Et.y,Qt.y,er.y)}d.emplaceBack(L.x,L.y,it.x1,it.y1,it.x2,it.y2,W,te,ue)}this.boxEndIndex=d.length}}class aX{constructor(d=[],L=(W,te)=>Wte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:W}=this,te=L[d];for(;d>0;){let ue=d-1>>1,me=L[ue];if(W(te,me)>=0)break;L[d]=me,d=ue}L[d]=te}_down(d){let{data:L,compare:W}=this,te=this.length>>1,ue=L[d];for(;d=0)break;L[d]=L[me],d=me}L[d]=ue}}function nX(R,d=1){let L=Ev.fromPoints(R[0]),W=Math.min(L.width(),L.height()),te=W/2,ue=new aX([],iX),{minX:me,minY:ge,maxX:Ce,maxY:Te}=L;if(W===0)return new t(me,ge);for(let it=me;itPe.d||!Pe.d)&&(Pe=it),it.max-Pe.d<=d||(te=it.h/2,ue.push(new F0(it.p.x-te,it.p.y-te,te,R)),ue.push(new F0(it.p.x+te,it.p.y-te,te,R)),ue.push(new F0(it.p.x-te,it.p.y+te,te,R)),ue.push(new F0(it.p.x+te,it.p.y+te,te,R)))}return Oe.d>0&&Pe.d-Oe.d<=d?Oe.p:Pe.p}function iX(R,d){return d.max-R.max}class F0{constructor(d,L,W,te){this.p=new t(d,L),this.h=W,this.d=function(ue,me){let ge=!1,Ce=1/0;for(let Te of me)for(let Oe=0,Pe=Te.length,it=Pe-1;Oeue.y!=bt.y>ue.y&&ue.x<(bt.x-He.x)*(ue.y-He.y)/(bt.y-He.y)+He.x&&(ge=!ge),Ce=Math.min(Ce,na(ue,He,bt))}return(ge?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var Af;l.aM=void 0,(Af=l.aM||(l.aM={}))[Af.center=1]="center",Af[Af.left=2]="left",Af[Af.right=3]="right",Af[Af.top=4]="top",Af[Af.bottom=5]="bottom",Af[Af["top-left"]=6]="top-left",Af[Af["top-right"]=7]="top-right",Af[Af["bottom-left"]=8]="bottom-left",Af[Af["bottom-right"]=9]="bottom-right";let K3=Number.POSITIVE_INFINITY;function sE(R,d){return d[1]!==K3?function(L,W,te){let ue=0,me=0;switch(W=Math.abs(W),te=Math.abs(te),L){case"top-right":case"top-left":case"top":me=te-7;break;case"bottom-right":case"bottom-left":case"bottom":me=7-te}switch(L){case"top-right":case"bottom-right":case"right":ue=-W;break;case"top-left":case"bottom-left":case"left":ue=W}return[ue,me]}(R,d[0],d[1]):function(L,W){let te=0,ue=0;W<0&&(W=0);let me=W/Math.SQRT2;switch(L){case"top-right":case"top-left":ue=me-7;break;case"bottom-right":case"bottom-left":ue=7-me;break;case"bottom":ue=7-W;break;case"top":ue=W-7}switch(L){case"top-right":case"bottom-right":te=-me;break;case"top-left":case"bottom-left":te=me;break;case"left":te=W;break;case"right":te=-W}return[te,ue]}(R,d[0])}function lE(R,d,L){var W;let te=R.layout,ue=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(d,{},L);if(ue){let ge=ue.values,Ce=[];for(let Te=0;Teit*Rc);Oe.startsWith("top")?Pe[1]-=7:Oe.startsWith("bottom")&&(Pe[1]+=7),Ce[Te+1]=Pe}return new gi(Ce)}let me=te.get("text-variable-anchor");if(me){let ge;ge=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*Rc,K3]:te.get("text-offset").evaluate(d,{},L).map(Te=>Te*Rc);let Ce=[];for(let Te of me)Ce.push(Te,sE(Te,ge));return new gi(Ce)}return null}function J3(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function oX(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=ue.textMaxSize.evaluate(d,{});it===void 0&&(it=me);let He=R.layers[0].layout,bt=He.get("icon-offset").evaluate(d,{},Oe),Et=cE(L.horizontal),Qt=me/24,er=R.tilePixelRatio*Qt,br=R.tilePixelRatio*it/24,sr=R.tilePixelRatio*ge,Mr=R.tilePixelRatio*He.get("symbol-spacing"),qr=He.get("text-padding")*R.tilePixelRatio,$r=function(ni,Wn,si,po=1){let cs=ni.get("icon-padding").evaluate(Wn,{},si),Ds=cs?.values;return[Ds[0]*po,Ds[1]*po,Ds[2]*po,Ds[3]*po]}(He,d,Oe,R.tilePixelRatio),_a=He.get("text-max-angle")/180*Math.PI,Ca=He.get("text-rotation-alignment")!=="viewport"&&He.get("symbol-placement")!=="point",nn=He.get("icon-rotation-alignment")==="map"&&He.get("symbol-placement")!=="point",qa=He.get("symbol-placement"),bn=Mr/2,Fn=He.get("icon-text-fit"),gn;W&&Fn!=="none"&&(R.allowVerticalPlacement&&L.vertical&&(gn=rS(W,L.vertical,Fn,He.get("icon-text-fit-padding"),bt,Qt)),Et&&(W=rS(W,Et,Fn,He.get("icon-text-fit-padding"),bt,Qt)));let Va=Oe?Pe.line.getGranularityForZoomLevel(Oe.z):1,Hn=(ni,Wn)=>{Wn.x<0||Wn.x>=F||Wn.y<0||Wn.y>=F||function(si,po,cs,Ds,Xs,Mf,vu,yc,Dc,Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc,nu,lc,mu,zc,Zd,dd,Bg){let Ep=si.addToLineVertexArray(po,cs),Cv,z0,B0,O0,fE=0,hE=0,dE=0,pE=0,Q3=-1,ew=-1,$d={},vE=Jn("");if(si.allowVerticalPlacement&&Ds.vertical){let $f=yc.layout.get("text-rotate").evaluate(mu,{},dd)+90;B0=new Cy(Dc,po,Hl,rf,Xf,Ds.vertical,Zf,Th,Sf,$f),vu&&(O0=new Cy(Dc,po,Hl,rf,Xf,vu,Hh,Fc,Sf,$f))}if(Xs){let $f=yc.layout.get("icon-rotate").evaluate(mu,{}),Nh=yc.layout.get("icon-text-fit")!=="none",Lv=iE(Xs,$f,Zd,Nh),vd=vu?iE(vu,$f,Zd,Nh):void 0;z0=new Cy(Dc,po,Hl,rf,Xf,Xs,Hh,Fc,!1,$f),fE=4*Lv.length;let Pv=si.iconSizeData,Sd=null;Pv.kind==="source"?(Sd=[Yd*yc.layout.get("icon-size").evaluate(mu,{})],Sd[0]>bp&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Pv.kind==="composite"&&(Sd=[Yd*zc.compositeIconSizes[0].evaluate(mu,{},dd),Yd*zc.compositeIconSizes[1].evaluate(mu,{},dd)],(Sd[0]>bp||Sd[1]>bp)&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),si.addSymbols(si.icon,Lv,Sd,lc,nu,mu,l.ax.none,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),Q3=si.icon.placedSymbolArray.length-1,vd&&(hE=4*vd.length,si.addSymbols(si.icon,vd,Sd,lc,nu,mu,l.ax.vertical,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),ew=si.icon.placedSymbolArray.length-1)}let mE=Object.keys(Ds.horizontal);for(let $f of mE){let Nh=Ds.horizontal[$f];if(!Cv){vE=Jn(Nh.text);let vd=yc.layout.get("text-rotate").evaluate(mu,{},dd);Cv=new Cy(Dc,po,Hl,rf,Xf,Nh,Zf,Th,Sf,vd)}let Lv=Nh.positionedLines.length===1;if(dE+=uE(si,po,Nh,Mf,yc,Sf,mu,Ah,Ep,Ds.vertical?l.ax.horizontal:l.ax.horizontalOnly,Lv?mE:[$f],$d,Q3,zc,dd),Lv)break}Ds.vertical&&(pE+=uE(si,po,Ds.vertical,Mf,yc,Sf,mu,Ah,Ep,l.ax.vertical,["vertical"],$d,ew,zc,dd));let lX=Cv?Cv.boxStartIndex:si.collisionBoxArray.length,uX=Cv?Cv.boxEndIndex:si.collisionBoxArray.length,cX=B0?B0.boxStartIndex:si.collisionBoxArray.length,fX=B0?B0.boxEndIndex:si.collisionBoxArray.length,hX=z0?z0.boxStartIndex:si.collisionBoxArray.length,dX=z0?z0.boxEndIndex:si.collisionBoxArray.length,pX=O0?O0.boxStartIndex:si.collisionBoxArray.length,vX=O0?O0.boxEndIndex:si.collisionBoxArray.length,pd=-1,Ly=($f,Nh)=>$f?.circleDiameter?Math.max($f.circleDiameter,Nh):Nh;pd=Ly(Cv,pd),pd=Ly(B0,pd),pd=Ly(z0,pd),pd=Ly(O0,pd);let gE=pd>-1?1:0;gE&&(pd*=Bg/Rc),si.glyphOffsetArray.length>=M0.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mu.sortKey!==void 0&&si.addToSortKeyRanges(si.symbolInstances.length,mu.sortKey);let mX=lE(yc,mu,dd),[gX,yX]=function($f,Nh){let Lv=$f.length,vd=Nh?.values;if(vd?.length>0)for(let Pv=0;Pv=0?$d.right:-1,$d.center>=0?$d.center:-1,$d.left>=0?$d.left:-1,$d.vertical||-1,Q3,ew,vE,lX,uX,cX,fX,hX,dX,pX,vX,Hl,dE,pE,fE,hE,gE,0,Zf,pd,gX,yX)}(R,Wn,ni,L,W,te,gn,R.layers[0],R.collisionBoxArray,d.index,d.sourceLayerIndex,R.index,er,[qr,qr,qr,qr],Ca,Ce,sr,$r,nn,bt,d,ue,Te,Oe,me)};if(qa==="line")for(let ni of KS(d.geometry,0,0,F,F)){let Wn=Sv(ni,Va),si=rX(Wn,Mr,_a,L.vertical||Et,W,24,br,R.overscaling,F);for(let po of si)Et&&sX(R,Et.text,bn,po)||Hn(Wn,po)}else if(qa==="line-center"){for(let ni of d.geometry)if(ni.length>1){let Wn=Sv(ni,Va),si=tX(Wn,_a,L.vertical||Et,W,24,br);si&&Hn(Wn,si)}}else if(d.type==="Polygon")for(let ni of Yc(d.geometry,0)){let Wn=nX(ni,16);Hn(Sv(ni[0],Va,!0),new Sp(Wn.x,Wn.y,0))}else if(d.type==="LineString")for(let ni of d.geometry){let Wn=Sv(ni,Va);Hn(Wn,new Sp(Wn[0].x,Wn[0].y,0))}else if(d.type==="Point")for(let ni of d.geometry)for(let Wn of ni)Hn([Wn],new Sp(Wn.x,Wn.y,0))}function uE(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt){let Et=function(br,sr,Mr,qr,$r,_a,Ca,nn){let qa=qr.layout.get("text-rotate").evaluate(_a,{})*Math.PI/180,bn=[];for(let Fn of sr.positionedLines)for(let gn of Fn.positionedGlyphs){if(!gn.rect)continue;let Va=gn.rect||{},Hn=4,ni=!0,Wn=1,si=0,po=($r||nn)&&gn.vertical,cs=gn.metrics.advance*gn.scale/2;if(nn&&sr.verticalizable&&(si=Fn.lineOffset/2-(gn.imageName?-(Rc-gn.metrics.width*gn.scale)/2:(gn.scale-1)*Rc)),gn.imageName){let Fc=Ca[gn.imageName];ni=Fc.sdf,Wn=Fc.pixelRatio,Hn=1/Wn}let Ds=$r?[gn.x+cs,gn.y]:[0,0],Xs=$r?[0,0]:[gn.x+cs+Mr[0],gn.y+Mr[1]-si],Mf=[0,0];po&&(Mf=Xs,Xs=[0,0]);let vu=gn.metrics.isDoubleResolution?2:1,yc=(gn.metrics.left-Hn)*gn.scale-cs+Xs[0],Dc=(-gn.metrics.top-Hn)*gn.scale+Xs[1],Hl=yc+Va.w/vu*gn.scale/Wn,rf=Dc+Va.h/vu*gn.scale/Wn,Xf=new t(yc,Dc),Zf=new t(Hl,Dc),Th=new t(yc,rf),Sf=new t(Hl,rf);if(po){let Fc=new t(-cs,cs- -17),nu=-Math.PI/2,lc=12-cs,mu=new t(22-lc,-(gn.imageName?lc:0)),zc=new t(...Mf);Xf._rotateAround(nu,Fc)._add(mu)._add(zc),Zf._rotateAround(nu,Fc)._add(mu)._add(zc),Th._rotateAround(nu,Fc)._add(mu)._add(zc),Sf._rotateAround(nu,Fc)._add(mu)._add(zc)}if(qa){let Fc=Math.sin(qa),nu=Math.cos(qa),lc=[nu,-Fc,Fc,nu];Xf._matMult(lc),Zf._matMult(lc),Th._matMult(lc),Sf._matMult(lc)}let Ah=new t(0,0),Hh=new t(0,0);bn.push({tl:Xf,tr:Zf,bl:Th,br:Sf,tex:Va,writingMode:sr.writingMode,glyphOffset:Ds,sectionIndex:gn.sectionIndex,isSDF:ni,pixelOffsetTL:Ah,pixelOffsetBR:Hh,minFontScaleX:0,minFontScaleY:0})}return bn}(0,L,ge,te,ue,me,W,R.allowVerticalPlacement),Qt=R.textSizeData,er=null;Qt.kind==="source"?(er=[Yd*te.layout.get("text-size").evaluate(me,{})],er[0]>bp&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Qt.kind==="composite"&&(er=[Yd*He.compositeTextSizes[0].evaluate(me,{},bt),Yd*He.compositeTextSizes[1].evaluate(me,{},bt)],(er[0]>bp||er[1]>bp)&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),R.addSymbols(R.text,Et,er,ge,ue,me,Te,d,Ce.lineStartIndex,Ce.lineLength,it,bt);for(let br of Oe)Pe[br]=R.text.placedSymbolArray.length-1;return 4*Et.length}function cE(R){for(let d in R)return R[d];return null}function sX(R,d,L,W){let te=R.compareText;if(d in te){let ue=te[d];for(let me=ue.length-1;me>=0;me--)if(W.dist(ue[me])this.process()),this.subscription=Ge(this.target,"message",L=>this.receive(L),!1),this.globalScope=he(self)?R:window}registerMessageHandler(R,d){this.messageHandlers[R]=d}unregisterMessageHandler(R){delete this.messageHandlers[R]}sendAsync(R,d){return new Promise((L,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),ue=d?Ge(d.signal,"abort",()=>{ue?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},_Y):null;this.resolveRejects[te]={resolve:Ce=>{ue?.unsubscribe(),L(Ce)},reject:Ce=>{ue?.unsubscribe(),W(Ce)}};let me=[],ge=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:mt(R.data,me)});this.target.postMessage(ge,{transfer:me})})}receive(R){let d=R.data,L=d.id,W=["file://","resource://android","null"],te=[d.origin,location.origin],ue=d.origin===location.origin,me=te.some(ge=>W.includes(ge));if((ue||me)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let ge=this.abortControllers[L];return delete this.abortControllers[L],void(ge&&ge.abort())}if(he(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),d=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(R,d)}processTask(R,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(d.error?te.reject(j(xt(d.error))):te.resolve(xt(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=xt(d.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,j(te))}})}completeTask(R,d,L){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?mt(d):null,data:mt(L,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var R=new i(16);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},l.P=t,l.Q=function(R,d,L){var W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et=L[0],Qt=L[1],er=L[2];return d===R?(R[12]=d[0]*Et+d[4]*Qt+d[8]*er+d[12],R[13]=d[1]*Et+d[5]*Qt+d[9]*er+d[13],R[14]=d[2]*Et+d[6]*Qt+d[10]*er+d[14],R[15]=d[3]*Et+d[7]*Qt+d[11]*er+d[15]):(te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],R[0]=W=d[0],R[1]=te,R[2]=ue,R[3]=me,R[4]=ge,R[5]=Ce,R[6]=Te,R[7]=Oe,R[8]=Pe,R[9]=it,R[10]=He,R[11]=bt,R[12]=W*Et+ge*Qt+Pe*er+d[12],R[13]=te*Et+Ce*Qt+it*er+d[13],R[14]=ue*Et+Te*Qt+He*er+d[14],R[15]=me*Et+Oe*Qt+bt*er+d[15]),R},l.R=ls,l.S=function(R,d,L){var W=L[0],te=L[1],ue=L[2];return R[0]=d[0]*W,R[1]=d[1]*W,R[2]=d[2]*W,R[3]=d[3]*W,R[4]=d[4]*te,R[5]=d[5]*te,R[6]=d[6]*te,R[7]=d[7]*te,R[8]=d[8]*ue,R[9]=d[9]*ue,R[10]=d[10]*ue,R[11]=d[11]*ue,R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.T=vp,l.U=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],Et=d[12],Qt=d[13],er=d[14],br=d[15],sr=L[0],Mr=L[1],qr=L[2],$r=L[3];return R[0]=sr*W+Mr*ge+qr*Pe+$r*Et,R[1]=sr*te+Mr*Ce+qr*it+$r*Qt,R[2]=sr*ue+Mr*Te+qr*He+$r*er,R[3]=sr*me+Mr*Oe+qr*bt+$r*br,R[4]=(sr=L[4])*W+(Mr=L[5])*ge+(qr=L[6])*Pe+($r=L[7])*Et,R[5]=sr*te+Mr*Ce+qr*it+$r*Qt,R[6]=sr*ue+Mr*Te+qr*He+$r*er,R[7]=sr*me+Mr*Oe+qr*bt+$r*br,R[8]=(sr=L[8])*W+(Mr=L[9])*ge+(qr=L[10])*Pe+($r=L[11])*Et,R[9]=sr*te+Mr*Ce+qr*it+$r*Qt,R[10]=sr*ue+Mr*Te+qr*He+$r*er,R[11]=sr*me+Mr*Oe+qr*bt+$r*br,R[12]=(sr=L[12])*W+(Mr=L[13])*ge+(qr=L[14])*Pe+($r=L[15])*Et,R[13]=sr*te+Mr*Ce+qr*it+$r*Qt,R[14]=sr*ue+Mr*Te+qr*He+$r*er,R[15]=sr*me+Mr*Oe+qr*bt+$r*br,R},l.V=function(R,d){let L={};for(let W of d)W in R&&(L[W]=R[W]);return L},l.W=wp,l.X=G,l.Y=fS,l.Z=cS,l._=e,l.a=Ae,l.a$=function(R){var d=new i(3);return d[0]=R[0],d[1]=R[1],d[2]=R[2],d},l.a0=h,l.a1=v,l.a2=Se,l.a3=Ph,l.a4=dS,l.a5=Ty,l.a6=F,l.a7=Ig,l.a8=Ev,l.a9=25,l.aA=function(R){var d=R[0],L=R[1];return Math.sqrt(d*d+L*L)},l.aB=function(R){return R[0]=0,R[1]=0,R},l.aC=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R},l.aD=S3,l.aE=z,l.aF=function(R,d,L,W){let te=d.y-R.y,ue=d.x-R.x,me=W.y-L.y,ge=W.x-L.x,Ce=me*ue-ge*te;if(Ce===0)return null;let Te=(ge*(R.y-L.y)-me*(R.x-L.x))/Ce;return new t(R.x+Te*ue,R.y+Te*te)},l.aG=KS,l.aH=Ya,l.aI=function(R){let d=1/0,L=1/0,W=-1/0,te=-1/0;for(let ue of R)d=Math.min(d,ue.x),L=Math.min(L,ue.y),W=Math.max(W,ue.x),te=Math.max(te,ue.y);return[d,L,W,te]},l.aJ=Rc,l.aK=P,l.aL=function(R,d,L,W,te=!1){if(!L[0]&&!L[1])return[0,0];let ue=te?W==="map"?-R.bearingInRadians:0:W==="viewport"?R.bearingInRadians:0;if(ue){let me=Math.sin(ue),ge=Math.cos(ue);L=[L[0]*ge-L[1]*me,L[0]*me+L[1]*ge]}return[te?L[0]:P(d,L[0],R.zoom),te?L[1]:P(d,L[1],R.zoom)]},l.aN=M3,l.aO=J3,l.aP=A3,l.aQ=R=>R.type==="symbol",l.aR=dy,l.aS=ct,l.aT=hy,l.aU=It,l.aV=Fa,l.aW=ua,l.aX=_e,l.aY=pS,l.aZ=f,l.a_=T,l.aa=P3,l.ab=R=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let W of R){let te=window.document.createElement("source");rr(W)||(d.crossOrigin="Anonymous"),te.src=W,d.appendChild(te)}})},l.ac=Vt,l.ad=function(){return K++},l.ae=fe,l.af=M0,l.ag=zg,l.ah=Na,l.ai=fo,l.aj=yS,l.ak=function(R){let d={};if(R.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,W,te,ue)=>{let me=te||ue;return d[W]=!me||me.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=se,l.am=85.051129,l.an=ke,l.ao=function(R){return Math.pow(2,R)},l.ap=S,l.aq=hS,l.ar=function(R){return Math.log(R)/Math.LN2},l.as=function(R){var d=R[0],L=R[1];return d*d+L*L},l.at=function(R){if(!R.length)return new Set;let d=Math.max(...R.map(Ce=>Ce.canonical.z)),L=1/0,W=-1/0,te=1/0,ue=-1/0,me=[];for(let Ce of R){let{x:Te,y:Oe,z:Pe}=Ce.canonical,it=Math.pow(2,d-Pe),He=Te*it,bt=Oe*it;me.push({id:Ce,x:He,y:bt}),HeW&&(W=He),btue&&(ue=bt)}let ge=new Set;for(let Ce of me)Ce.x!==L&&Ce.x!==W&&Ce.y!==te&&Ce.y!==ue||ge.add(Ce.id);return ge},l.au=function(R,d){let L=Math.abs(2*R.wrap)-+(R.wrap<0),W=Math.abs(2*d.wrap)-+(d.wrap<0);return R.overscaledZ-d.overscaledZ||W-L||d.canonical.y-R.canonical.y||d.canonical.x-R.canonical.x},l.av=class{constructor(R,d){this.max=R,this.onRemove=d,this.reset()}reset(){for(let R in this.data)for(let d of this.data[R])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(R,d,L){let W=R.wrapped().key;this.data[W]===void 0&&(this.data[W]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(R,te)},L)),this.data[W].push(te),this.order.push(W),this.order.length>this.max){let ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}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 d=this.data[R].shift();return d.timeout&&clearTimeout(d.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),d.value}getByKey(R){let d=this.data[R];return d?d[0].value:null}get(R){return this.has(R)?this.data[R.wrapped().key][0].value:null}remove(R,d){if(!this.has(R))return this;let L=R.wrapped().key,W=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][W];return this.data[L].splice(W,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(R){for(this.max=R;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(R){let d=[];for(let L in this.data)for(let W of this.data[L])R(W.value)||d.push(W);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(R,d){let L=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:me}=R,ge=te?se(Pi.interpolationFactor(te,d,ue,me),0,1):0;R.kind==="camera"?W=bs.number(R.minSize,R.maxSize,ge):L=ge}return{uSizeT:L,uSize:W}},l.ay=function(R,{uSize:d,uSizeT:L},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/Yd:R.kind==="composite"?bs.number(W/Yd,te/Yd,L):d},l.az=D,l.b=we,l.b$=zs,l.b0=function(R,d,L){return R[0]=d[0]-L[0],R[1]=d[1]-L[1],R[2]=d[2]-L[2],R},l.b1=function(R,d){var L=d[0],W=d[1],te=d[2],ue=L*L+W*W+te*te;return ue>0&&(ue=1/Math.sqrt(ue)),R[0]=d[0]*ue,R[1]=d[1]*ue,R[2]=d[2]*ue,R},l.b2=u,l.b3=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]},l.b4=function(R,d,L){return R[0]=d[0]*L[0],R[1]=d[1]*L[1],R[2]=d[2]*L[2],R[3]=d[3]*L[3],R},l.b5=C,l.b6=function(R,d,L){let W=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return W===0?null:(-(R[0]*L[0]+R[1]*L[1]+R[2]*L[2])-L[3])/W},l.b7=x,l.b8=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R[3]=d[3]*L,R},l.b9=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]+R[3]},l.bA=O,l.bB=function(R,d,L){var W=L[0],te=L[1],ue=L[2],me=L[3],ge=d[0],Ce=d[1],Te=d[2],Oe=te*Te-ue*Ce,Pe=ue*ge-W*Te,it=W*Ce-te*ge;return R[0]=ge+me*(Oe+=Oe)+te*(it+=it)-ue*(Pe+=Pe),R[1]=Ce+me*Pe+ue*Oe-W*it,R[2]=Te+me*it+W*Pe-te*Oe,R},l.bC=function(R,d,L){let W=(te=[R[0],R[1],R[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((Oe=te[8])*(me=te[4])-(ge=te[5])*(Te=te[7]))+te[1]*(-Oe*(ue=te[3])+ge*(Ce=te[6]))+te[2]*(Te*ue-me*Ce);var te,ue,me,ge,Ce,Te,Oe;if(W===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),it=u([],[L[0],L[1],L[2]],[R[0],R[1],R[2]]),He=u([],[R[0],R[1],R[2]],[d[0],d[1],d[2]]),bt=f([],Pe,-R[3]);return T(bt,bt,f([],it,-d[3])),T(bt,bt,f([],He,-L[3])),f(bt,bt,1/W),bt},l.bD=L3,l.bE=function(){return new Float64Array(4)},l.bF=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0]*Math.cos(W)-te[1]*Math.sin(W),ue[1]=te[0]*Math.sin(W)+te[1]*Math.cos(W),ue[2]=te[2],R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bG=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0],ue[1]=te[1]*Math.cos(W)-te[2]*Math.sin(W),ue[2]=te[1]*Math.sin(W)+te[2]*Math.cos(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bH=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[2]*Math.sin(W)+te[0]*Math.cos(W),ue[1]=te[1],ue[2]=te[2]*Math.cos(W)-te[0]*Math.sin(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bI=function(R,d,L){var W=Math.sin(L),te=Math.cos(L),ue=d[0],me=d[1],ge=d[2],Ce=d[3],Te=d[8],Oe=d[9],Pe=d[10],it=d[11];return d!==R&&(R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15]),R[0]=ue*te-Te*W,R[1]=me*te-Oe*W,R[2]=ge*te-Pe*W,R[3]=Ce*te-it*W,R[8]=ue*W+Te*te,R[9]=me*W+Oe*te,R[10]=ge*W+Pe*te,R[11]=Ce*W+it*te,R},l.bJ=function(R,d){let L=U(R,360),W=U(d,360),te=W-L,ue=W>L?te-360:te+360;return Math.abs(te)0?me:-me},l.bM=function(R,d){let L=U(R,2*Math.PI),W=U(d,2*Math.PI);return Math.min(Math.abs(L-W),Math.abs(L-W+2*Math.PI),Math.abs(L-W-2*Math.PI))},l.bN=function(){let R={},d=ht.$version;for(let L in ht.$root){let W=ht.$root[L];if(W.required){let te=null;te=L==="version"?d:W.type==="array"?[]:{},te!=null&&(R[L]=te)}}return R},l.bO=At,l.bP=Bt,l.bQ=function R(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let W=0;WR.type==="raster",l.bV=q,l.bW=function(R,d){if(!R)return[{command:"setStyle",args:[d]}];let L=[];try{if(!We(R.version,d.version))return[{command:"setStyle",args:[d]}];We(R.center,d.center)||L.push({command:"setCenter",args:[d.center]}),We(R.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),We(R.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),We(R.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),We(R.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),We(R.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),We(R.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),We(R.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),We(R.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),We(R.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),We(R.light,d.light)||L.push({command:"setLight",args:[d.light]}),We(R.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),We(R.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),We(R.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let W={},te=[];(function(me,ge,Ce,Te){let Oe;for(Oe in ge=ge||{},me=me||{})Object.prototype.hasOwnProperty.call(me,Oe)&&(Object.prototype.hasOwnProperty.call(ge,Oe)||et(Oe,Ce,Te));for(Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&(Object.prototype.hasOwnProperty.call(me,Oe)?We(me[Oe],ge[Oe])||(me[Oe].type==="geojson"&&ge[Oe].type==="geojson"&&pt(me,ge,Oe)?Ke(Ce,{command:"setGeoJSONSourceData",args:[Oe,ge[Oe].data]}):Mt(Oe,ge,Ce,Te)):Je(Oe,ge,Ce))})(R.sources,d.sources,te,W);let ue=[];R.layers&&R.layers.forEach(me=>{"source"in me&&W[me.source]?L.push({command:"removeLayer",args:[me.id]}):ue.push(me)}),L=L.concat(te),function(me,ge,Ce){ge=ge||[];let Te=(me=me||[]).map(Ct),Oe=ge.map(Ct),Pe=me.reduce(qt,{}),it=ge.reduce(qt,{}),He=Te.slice(),bt=Object.create(null),Et,Qt,er,br,sr;for(let Mr=0,qr=0;Mrg?(te=Math.acos(ue),me=Math.sin(te),ge=Math.sin((1-W)*te)/me,Ce=Math.sin(W*te)/me):(ge=1-W,Ce=W),R[0]=ge*Te+Ce*He,R[1]=ge*Oe+Ce*bt,R[2]=ge*Pe+Ce*Et,R[3]=ge*it+Ce*Qt,R},l.bm=function(R){let d=new Float64Array(9);var L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr;Pe=(te=(W=R)[0])*(Ce=te+te),it=(ue=W[1])*Ce,bt=(me=W[2])*Ce,Et=me*(Te=ue+ue),er=(ge=W[3])*Ce,br=ge*Te,sr=ge*(Oe=me+me),(L=d)[0]=1-(He=ue*Te)-(Qt=me*Oe),L[3]=it-sr,L[6]=bt+br,L[1]=it+sr,L[4]=1-Pe-Qt,L[7]=Et-er,L[2]=bt-br,L[5]=Et+er,L[8]=1-Pe-He;let Mr=_e(-Math.asin(se(d[2],-1,1))),qr,$r;return Math.hypot(d[5],d[8])<.001?(qr=0,$r=-_e(Math.atan2(d[3],d[4]))):(qr=_e(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),$r=_e(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:qr,pitch:Mr+90,bearing:$r}},l.bn=function(R,d){return R.roll==d.roll&&R.pitch==d.pitch&&R.bearing==d.bearing},l.bo=rn,l.bp=ro,l.bq=_0,l.br=Mg,l.bs=y0,l.bt=$,l.bu=Q,l.bv=io,l.bw=function(R,d,L,W,te){return $(W,te,se((R-d)/(L-d),0,1))},l.bx=function(R,d,L,W){return R[0]=d[0]+L[0]*W,R[1]=d[1]+L[1]*W,R[2]=d[2]+L[2]*W,R},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ye,l.c$=Cc,l.c0=class extends Wi{constructor(R,d){super(R,d),this.current=Bs}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let d=1;d<16;d++)if(R[d]!==this.current[d]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},l.c1=Mo,l.c2=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},l.c3=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},l.c4=w,l.c5=function(R,d){var L=Math.sin(d),W=Math.cos(d);return R[0]=W,R[1]=L,R[2]=0,R[3]=-L,R[4]=W,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R},l.c6=function(R,d,L){var W=d[0],te=d[1],ue=d[2];return R[0]=W*L[0]+te*L[3]+ue*L[6],R[1]=W*L[1]+te*L[4]+ue*L[7],R[2]=W*L[2]+te*L[5]+ue*L[8],R},l.c7=function(R,d,L,W,te,ue,me){var ge=1/(d-L),Ce=1/(W-te),Te=1/(ue-me);return R[0]=-2*ge,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ce,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*Te,R[11]=0,R[12]=(d+L)*ge,R[13]=(te+W)*Ce,R[14]=(me+ue)*Te,R[15]=1,R},l.c8=class extends Wi{constructor(R,d){super(R,d),this.current=new Array}set(R){if(R!=this.current){this.current=R;let d=new Float32Array(4*R.length);for(let L=0;L25||W<0||W>=1||L<0||L>=1)},l.cE=function(R,d){return R[0]=d[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=d[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=d[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},l.cF=class extends Jt{},l.cG=Tt,l.cH=function(R,d){Ye.REGISTERED_PROTOCOLS[R]=d},l.cI=function(R){delete Ye.REGISTERED_PROTOCOLS[R]},l.cJ=function(R,d){let L={};for(let te=0;teHn*Rc)}let bn=Ce?"center":te.get("text-justify").evaluate(Pe,{},R.canonical),Fn=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},R.canonical)*Rc:1/0,gn=()=>{R.bucket.allowVerticalPlacement&&Br($r)&&(Qt.vertical=xy(er,R.glyphMap,R.glyphPositions,R.imagePositions,it,Fn,ge,nn,"left",Ca,sr,l.ax.vertical,!0,bt,He))};if(!Ce&&qa){let Va=new Set;if(bn==="auto")for(let ni=0;niWY(ge,Ce,ue),W.layers[me])}(R,L,d),L.finish()},l.cT=function(R,d,L,W,te,ue){let me=JS(R,d,L,te,0);return me=JS(me,d,W,ue,1),me},l.cU=class{constructor(R){this.maxEntries=R,this.map=new Map}get(R){let d=this.map.get(R);return d!==void 0&&(this.map.delete(R),this.map.set(R,d)),d}set(R,d){if(this.map.has(R))this.map.delete(R);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(R,d)}clear(){this.map.clear()}},l.cV=w4,l.cW=_y,l.cX=YS,l.cY=function(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(v())try{return yield Se(R,d,L,W,te)}catch{}return function(ue,me,ge,Ce,Te){let Oe=ue.width,Pe=ue.height;Ie&&Ve||(Ie=new OffscreenCanvas(Oe,Pe),Ve=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=Oe,Ie.height=Pe,Ve.drawImage(ue,0,0,Oe,Pe);let it=Ve.getImageData(me,ge,Ce,Te);return Ve.clearRect(0,0,Oe,Pe),it.data}(R,d,L,W,te)})},l.cZ=mp,l.c_=class{constructor(R,d){this.layers={[zg]:this},this.name=zg,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=R.length,this.features=R}feature(R){return new HY(this.features[R],this.extent)}},l.ca=class extends sa{},l.cb=VW,l.cc=class extends An{},l.cd=Lu,l.ce=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},l.cf=au,l.cg=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[3]*W+L[7]*te+L[11]*ue+L[15];return R[0]=(L[0]*W+L[4]*te+L[8]*ue+L[12])/(me=me||1),R[1]=(L[1]*W+L[5]*te+L[9]*ue+L[13])/me,R[2]=(L[2]*W+L[6]*te+L[10]*ue+L[14])/me,R},l.ch=class extends mr{},l.ci=class extends y{},l.cj=function(R,d){return R[0]===d[0]&&R[1]===d[1]&&R[2]===d[2]&&R[3]===d[3]&&R[4]===d[4]&&R[5]===d[5]&&R[6]===d[6]&&R[7]===d[7]&&R[8]===d[8]&&R[9]===d[9]&&R[10]===d[10]&&R[11]===d[11]&&R[12]===d[12]&&R[13]===d[13]&&R[14]===d[14]&&R[15]===d[15]},l.ck=function(R,d){var L=R[0],W=R[1],te=R[2],ue=R[3],me=R[4],ge=R[5],Ce=R[6],Te=R[7],Oe=R[8],Pe=R[9],it=R[10],He=R[11],bt=R[12],Et=R[13],Qt=R[14],er=R[15],br=d[0],sr=d[1],Mr=d[2],qr=d[3],$r=d[4],_a=d[5],Ca=d[6],nn=d[7],qa=d[8],bn=d[9],Fn=d[10],gn=d[11],Va=d[12],Hn=d[13],ni=d[14],Wn=d[15];return Math.abs(L-br)<=g*Math.max(1,Math.abs(L),Math.abs(br))&&Math.abs(W-sr)<=g*Math.max(1,Math.abs(W),Math.abs(sr))&&Math.abs(te-Mr)<=g*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(ue-qr)<=g*Math.max(1,Math.abs(ue),Math.abs(qr))&&Math.abs(me-$r)<=g*Math.max(1,Math.abs(me),Math.abs($r))&&Math.abs(ge-_a)<=g*Math.max(1,Math.abs(ge),Math.abs(_a))&&Math.abs(Ce-Ca)<=g*Math.max(1,Math.abs(Ce),Math.abs(Ca))&&Math.abs(Te-nn)<=g*Math.max(1,Math.abs(Te),Math.abs(nn))&&Math.abs(Oe-qa)<=g*Math.max(1,Math.abs(Oe),Math.abs(qa))&&Math.abs(Pe-bn)<=g*Math.max(1,Math.abs(Pe),Math.abs(bn))&&Math.abs(it-Fn)<=g*Math.max(1,Math.abs(it),Math.abs(Fn))&&Math.abs(He-gn)<=g*Math.max(1,Math.abs(He),Math.abs(gn))&&Math.abs(bt-Va)<=g*Math.max(1,Math.abs(bt),Math.abs(Va))&&Math.abs(Et-Hn)<=g*Math.max(1,Math.abs(Et),Math.abs(Hn))&&Math.abs(Qt-ni)<=g*Math.max(1,Math.abs(Qt),Math.abs(ni))&&Math.abs(er-Wn)<=g*Math.max(1,Math.abs(er),Math.abs(Wn))},l.cl=function(R,d){return R[0]=d[0],R[1]=d[1],R[2]=d[2],R[3]=d[3],R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[8]=d[8],R[9]=d[9],R[10]=d[10],R[11]=d[11],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.cm=R=>R.type==="circle",l.cn=R=>R.type==="heatmap",l.co=R=>R.type==="line",l.cp=R=>R.type==="fill",l.cq=R=>R.type==="fill-extrusion",l.cr=R=>R.type==="hillshade",l.cs=R=>R.type==="color-relief",l.ct=R=>R.type==="background",l.cu=R=>R.type==="custom",l.cv=re,l.cw=function(R,d,L){if(d<=0)return R;let W=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(R*W)/W:(L>0?Math.ceil(R*W-1e-9):Math.floor(R*W+1e-10))/W},l.cx=function(R,d,L){let W=B(d.x-L.x,d.y-L.y),te=B(R.x-L.x,R.y-L.y);var ue,me;return _e(Math.atan2(W[0]*te[1]-W[1]*te[0],(ue=W)[0]*(me=te)[0]+ue[1]*me[1]))},l.cy=ne,l.cz=function(R,d){var L;if(!ve[d])return!1;let W=R?.target,te=((L=W?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return R instanceof te.MouseEvent||R instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(R,d){let L=(d=this.options=Object.assign({},RW,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let W=c3(R,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),W=p3(W,d),d.updateable&&(this.source=W),this.initializeIndex(W,d)}initializeIndex(R,d){this.tileIndex=d.cluster?new MW(d.clusterOptions):new PW(d),R.length&&this.tileIndex.initialize(R)}getTile(R,d,L){return d=+d,L=+L,(R=+R)<0||R>24?null:this.tileIndex.getTile(R,d,L)}updateData(R,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:W,source:te}=function(ue,me,ge){let Ce=function(Oe,Pe){var it,He;return Oe?{removeAll:Oe.removeAll,remove:new Set(Oe.remove||[]),add:new Map((it=Oe.add)==null?void 0:it.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((He=Oe.update)==null?void 0:He.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(me,ge),Te=[];if(Ce.removeAll&&(Te=ue,ue=[]),Ce.remove.size||Ce.add.size){let Oe=[];for(let Pe of ue)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&Oe.push(Pe);if(Oe.length){Te.push(...Oe);let Pe=new Set(Oe.map(it=>it.id));ue=ue.filter(it=>!Pe.has(it.id))}if(Ce.add.size){let Pe=c3({type:"FeatureCollection",features:Array.from(Ce.add.values())},ge);Pe=p3(Pe,ge),Te.push(...Pe),ue.push(...Pe)}}if(Ce.update.size){let Oe=new Map,Pe=[];for(let it of ue)Ce.update.has(it.id)?Oe.set(it.id,[...Oe.get(it.id)||[],it]):Pe.push(it);for(let[it,He]of Ce.update){let bt=Oe.get(it);if(!bt||bt.length===0)continue;let Et=AW(bt,He,ge);Te.push(...bt,...Et),Pe.push(...Et)}ue=Pe}return{affected:Te,source:ue}}(this.source,R,L);d&&({affected:W,source:te}=this.filterUpdate(te,W,d)),W.length&&(this.source=te,this.tileIndex.updateIndex(te,W,L))}filterUpdate(R,d,L){let W=new Set;for(let te of R)te.id!=null&&(L(vy(te))||(d.push(te),W.add(te.id)));return{affected:d,source:R=R.filter(te=>!W.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(R=>vy(R))}}updateClusterOptions(R,d){let L=this.options.cluster;this.options.cluster=R,this.options.clusterOptions=d,L!=R?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(R){return this.tileIndex.getClusterExpansionZoom(R)}getClusterChildren(R){return this.tileIndex.getChildren(R)}getClusterLeaves(R,d,L){return this.tileIndex.getLeaves(R,d,L)}},l.d1=Si,l.e=X,l.f=rr,l.g=yt,l.h=R=>e(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=he,l.j=R=>new Promise((d,L)=>{let W=new Image;W.onload=()=>{d(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>W.src=Me)},W.onerror=()=>L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Me}),l.k=(R,d)=>$t(X(R,{type:"json"}),d),l.l=Ot,l.m=$t,l.n=or,l.o=(R,d)=>$t(X(R,{type:"arrayBuffer"}),d),l.p=J4,l.q=function(R){return new _y(R).readFields(nY,[])},l.r=function(R){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(R))},l.s=Ge,l.t=As,l.u=Ps,l.v=Pc,l.w=ee,l.x=ht,l.y=vo,l.z=Bl}),E("worker",["./shared"],function(l){"use strict";class e{constructor(T,f){this.keyCache={},T&&this.replace(T,f)}replace(T,f){this._layerConfigs={},this._layers={},this.update(T,[],f)}update(T,f,u){for(let x of T){this._layerConfigs[x.id]=x;let z=this._layers[x.id]=l.bT(x,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[x.id]&&delete this.keyCache[x.id]}for(let x of f)delete this.keyCache[x],delete this._layerConfigs[x],delete this._layers[x];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let x of A){let z=x.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let O=I.source||"",D=this.familiesBySource[O];D||(D=this.familiesBySource[O]={});let B=I.sourceLayer||l.ag,F=D[B];F||(F=D[B]=[]),F.push(z)}}}class t{constructor(T){let f={},u=[];for(let I in T){let O=T[I],D=f[I]={};for(let B in O){let F=O[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),D[B]={rect:P,metrics:F.metrics}}}let{w:A,h:x}=l.p(u),z=new l.t({width:A||1,height:x||1});for(let I in T){let O=T[I];for(let D in O){let B=O[+D];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=f[I][D].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=f}}l.cK("GlyphAtlas",t);class n{constructor(T){this.tileID=new l.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,f,u,A,x){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(T.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let O={},D={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:x},B=f.familiesBySource[this.source];for(let q in B){let Z=T.layers[q];if(!Z)continue;Z.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ae=[];for(let he=0;hewe.id)))}}let F=l.bY(D.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(D.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let $=Object.keys(D.patternDependencies),Q=Promise.resolve({});if($.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:$,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=D.dashDependencies,ne=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ne=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[se,G,X,K]=yield Promise.all([P,U,Q,ne]),H=new t(se),Y=new l.cN(G,X);for(let q in O){let Z=O[q];Z instanceof l.af?(r(Z.layers,this.zoom,u),l.cO({bucket:Z,glyphMap:se,glyphPositions:H.positions,imageMap:G,imagePositions:Y.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:D.subdivisionGranularity})):Z.hasDependencies&&(Z instanceof l.cP||Z instanceof l.cQ||Z instanceof l.cR)&&(r(Z.layers,this.zoom,u),Z.addFeatures(D,this.tileID.canonical,Y.patternPositions,K))}return this.status="done",{buckets:Object.values(O).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:H.image,imageAtlas:Y,dashPositions:K,glyphMap:this.returnDependencies?se:null,iconMap:this.returnDependencies?G:null,glyphPositions:this.returnDependencies?H.positions:null}})}}function r(_,T,f){let u=new l.J(T);for(let A of _)A.recalculate(u,f)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,f){this.loading[T]=f}finishLoading(T){delete this.loading[T]}abort(T){let f=this.loading[T];f?.abort&&(f.abort.abort(),delete this.loading[T])}setParsing(T,f){this.parsing[T]=f}consumeParsing(T){let f=this.parsing[T];if(f)return delete this.parsing[T],f}clearParsing(T){delete this.parsing[T]}markLoaded(T,f){this.loaded[T]=f}getLoaded(T){let f=this.loaded[T];if(f)return f}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class o{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class s{constructor(T,f,u,A,x){this.type=T,this.properties=u||{},this.extent=x,this.pointsArray=f,this.id=A}loadGeometry(){return this.pointsArray.map(T=>T.map(f=>new l.P(f.x,f.y)))}}class c{constructor(T,f,u){this.version=2,this._myFeatures=T,this.name=f,this.length=T.length,this.extent=u}feature(T){return this._myFeatures[T]}}class m{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function h(_){let T=l.cS(_);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:_,rawData:T.buffer}}function v(_,T,f){let{extent:u}=_,A=Math.pow(2,f.z-T.z),x=(f.x-T.x*A)*u,z=(f.y-T.y*A)*u,I=[];for(let O=0;O<_.length;O++){let D=_.feature(O),B=D.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-x,j.y=j.y*A-z;let F=128;B=l.cT(B,D.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(D.type,B,D.properties,D.id,u))}return new c(I,_.name,u)}class g{constructor(T,f,u){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(T,f){try{return{vectorTile:T.encoding!=="mlt"?new l.cV(new l.cW(f)):new l.cX(f),rawData:f}}catch(u){let A=new Uint8Array(f),x=`Unable to parse the tile at ${T.request.url}, `;throw x+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(x)}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,overzoomParameters:u}=T;u&&(T.request=u.overzoomRequest);let A=this._startRequestTiming(T),x=new n(T);this.tileState.startLoading(f,x);let z=new AbortController;x.abort=z;try{let I=yield l.o(T.request,z);if(T.etag&&T.etag===I.etag)return this.tileState.finishLoading(f),this._getEtagUnmodifiedResult(I,A);let O=this.loadVectorTile(T,I.data);if(this.tileState.finishLoading(f),!O)return null;let{vectorTile:D,rawData:B}=O;u&&({vectorTile:D,rawData:B}=this._getOverzoomTile(T,D));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);x.vectorTile=D,this.tileState.markLoaded(f,x);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(f,j);try{return yield this._parseWorkerTile(x,T,j)}finally{this.tileState.clearParsing(f)}}catch(I){throw this.tileState.finishLoading(f),x.status="done",this.tileState.markLoaded(f,x),I}})}_getEtagUnmodifiedResult(T,f){let u=this._getExpiryData(T),A=this._finishRequestTiming(f);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:x.slice(0),encoding:f.encoding},A,z,I)}return A})}_getExpiryData({expires:T,cacheControl:f,etag:u}){let A={};return T&&(A.expires=T),f&&(A.cacheControl=f),u&&(A.etag=u),A}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T){let f=T?.finish();return f?{resourceTiming:JSON.parse(JSON.stringify(f))}:{}}_getOverzoomTile(T,f){var u;let{tileID:A,source:x,overzoomParameters:z}=T,{maxZoomTileID:I}=z,O=`${I.key}_${A.key}_${(u=T.request)===null||u===void 0?void 0:u.url}`,D=this.overzoomedTileResultCache.get(O);if(D)return D;let B=new m,F=this.layerIndex.familiesBySource[x];for(let j in F){let U=f.layers[j];if(!U)continue;let $=v(U,I,A.canonical);$.length>0&&B.addLayer($)}let P=h(B);return this.overzoomedTileResultCache.set(O,P),P}reloadTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}}class i{constructor(){this.loaded={}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,encoding:u,rawImageData:A,redFactor:x,greenFactor:z,blueFactor:I,baseShift:O}=T,D=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:D,height:B},yield l.cY(A,-1,-1,D,B)):A,P=new l.cZ(f,F,u,x,z,I,O);return this.loaded||(this.loaded={}),this.loaded[f]=P,P})}removeTile(T){let f=this.loaded,u=T.uid;f?.[u]&&delete f[u]}}class w{constructor(T,f,u,A=S){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this._createGeoJSONIndex=A}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:f,x:u,y:A}=T.tileID.canonical,x=this._geoJSONIndex.getTile(f,u,A);return x?h(new l.c_(x.features,{version:2,extent:l.a6})):null}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f}=T,u=new n(T);u.abort=new AbortController;try{let A=this.loadVectorTile(T);if(!A)return null;let{vectorTile:x,rawData:z}=A;u.vectorTile=x,this.tileState.markLoaded(f,u);let I={rawData:z};this.tileState.setParsing(f,I);try{return yield this._parseWorkerTile(u,T,I)}finally{this.tileState.clearParsing(f)}}catch(A){throw u.status="done",this.tileState.markLoaded(f,u),A}})}_reloadLoadedTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x}=u;A=l.e({rawTileData:x.slice(0),encoding:"mvt"},A)}return A})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}loadData(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort();let u=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return T.request&&(A.data=T.data),this._finishRequestTiming(u,T,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T,f,u){let A=T?.finish();A&&(u.resourceTiming={[f.source]:JSON.parse(JSON.stringify(A))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,f){return l._(this,void 0,void 0,function*(){var u;if(T.request&&(T.data=(yield l.k(T.request,f)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,M(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(T,f){if(T.type!=="FeatureCollection")return T;let u=this._getFilterPredicate(f);return u?{type:"FeatureCollection",features:T.features.filter(A=>u(A))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!T?.length)return;let f=l.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(f.result==="error")throw new Error(f.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>f.value.evaluate({zoom:0},u)}removeSource(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort()})}getClusterExpansionZoom(T){return this._geoJSONIndex.getClusterExpansionZoom(T.clusterId)}getClusterChildren(T){return this._geoJSONIndex.getClusterChildren(T.clusterId)}getClusterLeaves(T){return this._geoJSONIndex.getClusterLeaves(T.clusterId,T.limit,T.offset)}}function S(_,T){let f=l.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(T)});return new l.d0(_,f)}function M({geojsonVtOptions:_,clusterProperties:T}){if(!T||!_.clusterOptions)return _.clusterOptions;let f={},u={},A={accumulated:null,zoom:0},x={properties:null},z=Object.keys(T);for(let I of z){let[O,D]=T[I],B=l.c$(D),F=l.c$(typeof O=="string"?[O,["accumulated"],["get",I]]:O);f[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{x.properties=I;let O={};for(let D of z)O[D]=f[D].evaluate(A,x);return O},_.clusterOptions.reduce=(I,O)=>{x.properties=O;for(let D of z)A.accumulated=I[D],I[D]=u[D].evaluate(A,x)},_.clusterOptions}class C{constructor(T){this.self=T,this.actor=new l.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(f,u)=>{if(this.externalWorkerSourceTypes[f])throw new Error(`Worker source with name "${f}" already registered.`);this.externalWorkerSourceTypes[f]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=f=>{l.d1.setMethods(f)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(f,u)=>this._getDEMWorkerSource(f,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(f,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(f,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(f,u)=>this._getWorkerSource(f,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(f,u)=>this._getWorkerSource(f,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(f,u)=>this._getWorkerSource(f,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(f,u)=>l._(this,void 0,void 0,function*(){var A,x;if(!(!((x=(A=this.workerSources[f])===null||A===void 0?void 0:A[u.type])===null||x===void 0)&&x[u.source]))return;let z=this.workerSources[f][u.type][u.source];delete this.workerSources[f][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",f=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[f],delete this.availableImages[f],delete this.workerSources[f],delete this.demWorkerSources[f],this.globalStates.delete(f)})),this.actor.registerMessageHandler("SR",(f,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(f,u)=>this._syncRTLPluginState(f,u)),this.actor.registerMessageHandler("IS",(f,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(f,u)=>this._setImages(f,u)),this.actor.registerMessageHandler("UL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).update(u.layers,u.removedIds,this._getGlobalState(f))})),this.actor.registerMessageHandler("UGS",(f,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(f);for(let x in u)A[x]=u[x]})),this.actor.registerMessageHandler("SL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).replace(u,this._getGlobalState(f))}))}_getGlobalState(T){let f=this.globalStates.get(T);return f||(f={},this.globalStates.set(T,f)),f}_setImages(T,f){return l._(this,void 0,void 0,function*(){this.availableImages[T]=f;for(let u in this.workerSources[T]){let A=this.workerSources[T][u];for(let x in A)A[x].availableImages=f}})}_syncRTLPluginState(T,f){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(f,this.self.importScripts)})}_getAvailableImages(T){let f=this.availableImages[T];return f||(f=[]),f}_getLayerIndex(T){let f=this.layerIndexes[T];return f||(f=this.layerIndexes[T]=new e),f}_getWorkerSource(T,f,u){var A,x;if((A=this.workerSources)[T]||(A[T]={}),(x=this.workerSources[T])[f]||(x[f]={}),!this.workerSources[T][f][u]){let z={sendAsync:(I,O)=>(I.targetMapId=T,this.actor.sendAsync(I,O))};switch(f){case"vector":this.workerSources[T][f][u]=new g(z,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][f][u]=new w(z,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][f][u]=new this.externalWorkerSourceTypes[f](z,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][f][u]}_getDEMWorkerSource(T,f){var u,A;return(u=this.demWorkerSources)[T]||(u[T]={}),(A=this.demWorkerSources[T])[f]||(A[f]=new i),this.demWorkerSources[T][f]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function n(){var pe=new e.A(4);return e.A!=Float32Array&&(pe[1]=0,pe[2]=0),pe[0]=1,pe[3]=1,pe}let r,a,o,s={frame(pe,y,N,ie){let fe=ie||window,be=fe.requestAnimationFrame(je=>{Re(),y(je)}),{unsubscribe:Re}=e.s(pe.signal,"abort",()=>{Re(),fe.cancelAnimationFrame(be),N(new e.a(pe.signal.reason))},!1)},frameAsync(pe,y){return new Promise((N,ie)=>{this.frame(pe,N,ie,y)})},getImageData(pe,y=0){return this.getImageCanvasContext(pe).getImageData(-y,-y,pe.width+2*y,pe.height+2*y)},getImageCanvasContext(pe){let y=window.document.createElement("canvas"),N=y.getContext("2d",{willReadFrequently:!0});if(!N)throw new Error("failed to create canvas 2d context");return y.width=pe.width,y.height=pe.height,N.drawImage(pe,0,0,pe.width,pe.height),N},resolveURL:pe=>(r||(r=document.createElement("a")),r.href=pe,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(a!=null||(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)},set prefersReducedMotion(pe){o=pe}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(pe){this._frozenAt=pe}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function m(){return c.getCurrentTime()}var h,v;class g{static create(y,N,ie){let fe=window.document.createElement(y);return N!==void 0&&(fe.className=N),ie&&ie.appendChild(fe),fe}static createNS(y,N){return window.document.createElementNS(y,N)}static disableDrag(){g.docStyle&&g.selectProp&&(g.userSelect=g.docStyle[g.selectProp],g.docStyle[g.selectProp]="none")}static enableDrag(){g.docStyle&&g.selectProp&&(g.docStyle[g.selectProp]=g.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",g.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",g.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",g.suppressClickInternal,!0)},0)}static getScale(y){let N=y.getBoundingClientRect();return{x:N.width/y.offsetWidth||1,y:N.height/y.offsetHeight||1,boundingClientRect:N}}static getPoint(y,N,ie){let fe=N.boundingClientRect;return new e.P((ie.clientX-fe.left)/N.x-y.clientLeft,(ie.clientY-fe.top)/N.y-y.clientTop)}static mousePos(y,N){let ie=g.getScale(y);return g.getPoint(y,ie,N)}static touchPos(y,N){let ie=[],fe=g.getScale(y);for(let be of N)ie.push(g.getPoint(y,fe,be));return ie}static sanitize(y){let N=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=N.querySelectorAll("script");for(let fe of ie)fe.remove();return g.clean(N),N.innerHTML}static isPossiblyDangerous(y,N){let ie=N.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let N=y.children;for(let ie of N)g.removeAttributes(ie),g.clean(ie)}static removeAttributes(y){for(let{name:N,value:ie}of y.attributes)g.isPossiblyDangerous(N,ie)&&y.removeAttribute(N)}}g.docStyle=typeof window<"u"&&((h=window.document)===null||h===void 0?void 0:h.documentElement.style),g.selectProp=!g.docStyle||"userSelect"in g.docStyle?"userSelect":"webkitUserSelect",function(pe){let y,N,ie,fe;pe.resetRequestQueue=()=>{y=[],N=0,ie=0,fe={}},pe.addThrottleControl=Ze=>{let ut=ie++;return fe[ut]=Ze,ut},pe.removeThrottleControl=Ze=>{delete fe[Ze],Re()},pe.getImage=(Ze,ut,ft=!0)=>new Promise((Dt,Gt)=>{Ze.headers||(Ze.headers={}),Ze.headers.accept="image/webp,*/*",e.e(Ze,{type:"image"}),y.push({abortController:ut,requestParameters:Ze,supportImageRefresh:ft,state:"queued",onError:Kt=>{Gt(Kt)},onSuccess:Kt=>{Dt(Kt)}}),Re()});let be=Ze=>e._(this,void 0,void 0,function*(){Ze.state="running";let{requestParameters:ut,supportImageRefresh:ft,onError:Dt,onSuccess:Gt,abortController:Kt}=Ze,st=ft===!1&&!e.i(self)&&!e.g(ut.url)&&(!ut.headers||Object.keys(ut.headers).reduce((ir,dr)=>ir&&dr==="accept",!0));N++;let It=st?je(ut,Kt):e.m(ut,Kt);try{let ir=yield It;delete Ze.abortController,Ze.state="completed",ir.data instanceof HTMLImageElement||e.b(ir.data)?Gt(ir):ir.data&&Gt({data:yield(Ut=ir.data,typeof createImageBitmap=="function"?e.h(Ut):e.j(Ut)),cacheControl:ir.cacheControl,expires:ir.expires})}catch(ir){delete Ze.abortController,Dt(e.d(ir))}finally{N--,Re()}var Ut}),Re=()=>{let Ze=(()=>{for(let ut of Object.keys(fe))if(fe[ut]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let ut=N;ut0;ut++){let ft=y.shift();ft.abortController.signal.aborted?ut--:be(ft)}},je=(Ze,ut)=>new Promise((ft,Dt)=>{let Gt=new Image,Kt=Ze.url,st=Ze.credentials;st&&st==="include"?Gt.crossOrigin="use-credentials":(st&&st==="same-origin"||!e.f(Kt))&&(Gt.crossOrigin="anonymous"),ut.signal.addEventListener("abort",()=>{Gt.src="",Dt(new e.a(ut.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ft({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,ut.signal.aborted||Dt(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."))},Gt.src=Kt})}(v||(v={})),v.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,N){return this._transformRequestFn&&this._transformRequestFn(y,N)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function w(pe){let y=[];if(typeof pe=="string")y.push({id:"default",url:pe});else if(pe&&pe.length>0){let N=[];for(let{id:ie,url:fe}of pe){let be=`${ie}${fe}`;N.includes(be)||(N.push(be),y.push({id:ie,url:fe}))}}return y}function S(pe,y,N){try{let ie=new URL(pe);return ie.pathname+=`${y}${N}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${pe}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(pe){let{userImage:y}=pe;return!(!y?.render||!y.render()||(pe.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:N,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(N));this.requestors=[]}}getImage(y){let N=this.images[y];if(N&&!N.data&&N.spriteData){let ie=N.spriteData;N.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),N.spriteData=null}return N}addImage(y,N){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,N)&&(this.images[y]=N)}_validate(y,N){let ie=!0,fe=N.data||N.spriteData;return this._validateStretch(N.stretchX,fe?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(N.stretchY,fe?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(N.content,N)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,N){if(!y)return!0;let ie=0;for(let fe of y){if(fe[0]=y[1]))}updateImage(y,N,ie=!0){let fe=this.getImage(y);if(ie&&(fe.data.width!==N.data.width||fe.data.height!==N.data.height))throw new Error(`size mismatch between old image (${fe.data.width}x${fe.data.height}) and new image (${N.data.width}x${N.data.height}).`);N.version=fe.version+1,this.images[y]=N,this.updatedImages[y]=!0}removeImage(y){var N;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((N=ie.userImage)===null||N===void 0)&&N.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((N,ie)=>{let fe=!0;if(!this.isLoaded())for(let be of y)this.images[be]||(fe=!1);this.isLoaded()||fe?N(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:N})})}_getImagesForIds(y){var N;let ie={};for(let fe of y){let be=this.getImage(fe);be||(this.fire(new e.n("styleimagemissing",{id:fe})),be=this.getImage(fe)),be?ie[fe]={data:be.data.clone(),pixelRatio:be.pixelRatio,sdf:be.sdf,version:be.version,stretchX:be.stretchX,stretchY:be.stretchY,content:be.content,textFitWidth:be.textFitWidth,textFitHeight:be.textFitHeight,hasRenderCallback:!!(!((N=be.userImage)===null||N===void 0)&&N.render)}:e.w(`Image "${fe}" 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 ie}getPixelSize(){let{width:y,height:N}=this.atlasImage;return{width:y,height:N}}getPattern(y){let N=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(N&&N.position.version===ie.version)return N.position;if(N)N.position.version=ie.version;else{let fe={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},be=new e.I(fe,ie);this.patterns[y]={bin:fe,position:be}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let N=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,N.RGBA),this.atlasTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let be in this.patterns)y.push(this.patterns[be].bin);let{w:N,h:ie}=e.p(y),fe=this.atlasImage;fe.resize({width:N||1,height:ie||1});for(let be in this.patterns){let{bin:Re}=this.patterns[be],je=Re.x+1,Ze=Re.y+1,ut=this.getImage(be).data,ft=ut.width,Dt=ut.height;e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze},{width:ft,height:Dt}),e.R.copy(ut,fe,{x:0,y:Dt-1},{x:je,y:Ze-1},{width:ft,height:1}),e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze+Dt},{width:ft,height:1}),e.R.copy(ut,fe,{x:ft-1,y:0},{x:je-1,y:Ze},{width:1,height:Dt}),e.R.copy(ut,fe,{x:0,y:0},{x:je+ft,y:Ze},{width:1,height:Dt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let N of y){if(this.callbackDispatchedThisFrame[N])continue;this.callbackDispatchedThisFrame[N]=!0;let ie=this.getImage(N);ie||e.w(`Image with ID: "${N}" was not found`),M(ie)&&this.updateImage(N,ie)}}cloneImages(){let y={};for(let N in this.images){let ie=this.images[N];y[N]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,T=new Float64Array(256);for(let pe=0;pe<256;pe++){let y=.5-Math.pow(pe/255,.45454545454545453);T[pe]=y*Math.abs(y)}function f(pe,y,N,ie,fe,be,Re,je,Ze){for(let ut=y;ut-1);Ze++,be[Ze]=je,Re[Ze]=ut,Re[Ze+1]=_}for(let je=0,Ze=0;je/[-\w]+/.test(fe)?fe:`'${CSS.escape(fe)}'`).join(",");return new x.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(N[0]),fontStyle:this._fontStyle(N[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let N={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[fe,be]of Object.entries(N))new RegExp(`\\b${fe}\\b`,"i").test(y)&&(ie=`${be}`);return ie}destroy(){for(let y in this.entries){let N=this.entries[y];N.tinySDF=null,N.ideographTinySDF=null,N.glyphs={},N.requests={},N.ranges={}}this.entries={}}}x.loadGlyphRange=function(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=256*y,be=fe+255,Re=yield ie.transformRequest(N.replace("{fontstack}",pe).replace("{range}",`${fe}-${be}`),"Glyphs"),je=yield e.o(Re,new AbortController);if(!je?.data)throw new Error(`Could not load glyph range. range: ${y}, ${fe}-${be}`);let Ze={};for(let ut of e.q(je.data))Ze[ut.id]=ut;return Ze})},x.TinySDF=class{constructor({fontSize:pe=24,buffer:y=3,radius:N=8,cutoff:ie=.25,fontFamily:fe="sans-serif",fontWeight:be="normal",fontStyle:Re="normal",lang:je=null}={}){this.buffer=y,this.radius=N,this.cutoff=ie,this.lang=je;let Ze=this.size=pe+4*y,ut=this._createCanvas(Ze),ft=this.ctx=ut.getContext("2d",{willReadFrequently:!0});ft.font=`${Re} ${be} ${pe}px ${fe}`,ft.textBaseline="alphabetic",ft.textAlign="left",ft.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(pe){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(pe,pe);let y=document.createElement("canvas");return y.width=y.height=pe,y}draw(pe){let{width:y,actualBoundingBoxAscent:N,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:fe,actualBoundingBoxRight:be}=this.ctx.measureText(pe),Re=Math.ceil(N),je=Math.floor(fe),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(be)-je)),ut=Math.max(0,Math.min(this.size-this.buffer,Re+Math.ceil(ie))),ft=Ze+2*this.buffer,Dt=ut+2*this.buffer,Gt=Math.max(ft*Dt,0),Kt=new Uint8ClampedArray(Gt),st={data:Kt,width:ft,height:Dt,glyphWidth:Ze,glyphHeight:ut,glyphTop:Re,glyphLeft:je,glyphAdvance:y};if(Ze===0||ut===0)return st;let{ctx:It,buffer:Ut,gridInner:ir,gridOuter:dr}=this;this.lang&&(It.lang=this.lang),It.clearRect(Ut,Ut,Ze,ut),It.fillText(pe,Ut-je,Ut+Re);let Ar=It.getImageData(Ut,Ut,Ze,ut);dr.fill(_,0,Gt),ir.fill(0,0,Gt);let hr=3;for(let Cr=0;Cr1&&(Ze=y[++je]);let ft=Math.abs(ut-Ze.left),Dt=Math.abs(ut-Ze.right),Gt=Math.min(ft,Dt),Kt,st=be/ie*(fe+1);if(Ze.isDash){let It=fe-Math.abs(st);Kt=Math.sqrt(Gt*Gt+It*It)}else Kt=fe-Math.sqrt(Gt*Gt+st*st);this.data[Re+ut]=Math.max(0,Math.min(255,Kt+128))}}}addRegularDash(y){for(let je=y.length-1;je>=0;--je){let Ze=y[je],ut=y[je+1];Ze.zeroLength?y.splice(je,1):ut&&ut.isDash===Ze.isDash&&(ut.left=Ze.left,y.splice(je,1))}let N=y[0],ie=y[y.length-1];N.isDash===ie.isDash&&(N.left=ie.left-this.width,ie.right=N.right+this.width);let fe=this.width*this.nextRow,be=0,Re=y[be];for(let je=0;je1&&(Re=y[++be]);let Ze=Math.abs(je-Re.left),ut=Math.abs(je-Re.right),ft=Math.min(Ze,ut);this.data[fe+je]=Math.max(0,Math.min(255,(Re.isDash?ft:-ft)+128))}}addDash(y,N){let ie=N?7:0,fe=2*ie+1;if(this.nextRow+fe>this.height)return e.w("LineAtlas out of space"),null;let be=0;for(let je of y)be+=je;if(be!==0){let je=this.width/be,Ze=this.getDashRanges(y,this.width,je);N?this.addRoundDash(Ze,je,ie):this.addRegularDash(Ze)}let Re={y:this.nextRow+ie,height:2*ie,width:be};return this.nextRow+=fe,this.dirty=!0,Re}bind(y){let N=y.gl;this.texture?(N.bindTexture(N.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,N.texSubImage2D(N.TEXTURE_2D,0,0,0,this.width,this.height,N.ALPHA,N.UNSIGNED_BYTE,this.data))):(this.texture=N.createTexture(),N.bindTexture(N.TEXTURE_2D,this.texture),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),N.texImage2D(N.TEXTURE_2D,0,N.ALPHA,this.width,this.height,0,N.ALPHA,N.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,N))),Q}function G(pe,y){let N=e.O();return e.Q(N,N,[1,1,0]),e.S(N,N,[.5*pe.width,.5*pe.height,1]),pe.calculatePosMatrix?e.U(N,N,pe.calculatePosMatrix(y.toUnwrapped())):N}function X(pe,y,N,ie,fe,be,Re){var je;let Ze=function(Gt,Kt,st){if(Gt)for(let It of Gt){let Ut=Kt[It];if(Ut?.source===st&&Ut.type==="fill-extrusion")return!0}else for(let It in Kt){let Ut=Kt[It];if(Ut.source===st&&Ut.type==="fill-extrusion")return!0}return!1}((je=fe?.layers)!==null&&je!==void 0?je:null,y,pe.id),ut=be.maxPitchScaleFactor(),ft=pe.tilesIn(ie,ut,Ze);ft.sort(K);let Dt=[];for(let Gt of ft)Dt.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,N,pe.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,fe,be,ut,G(be,Gt.tileID),Re?(Kt,st)=>Re(Gt.tileID,Kt,st):void 0)});return function(Gt,Kt){for(let st in Gt)for(let It of Gt[st])H(It,Kt);return Gt}(function(Gt){let Kt={},st={};for(let{queryResults:It,wrappedTileID:Ut}of Gt){st[Ut]||(st[Ut]={});let ir=st[Ut];for(let dr in It){let Ar=It[dr];ir[dr]||(ir[dr]={});let hr=ir[dr];Kt[dr]||(Kt[dr]=[]);for(let vr of Ar)hr[vr.featureIndex]||(hr[vr.featureIndex]=!0,Kt[dr].push(vr))}}return Kt}(Dt),pe)}function K(pe,y){let N=pe.tileID,ie=y.tileID;return N.overscaledZ-ie.overscaledZ||N.canonical.y-ie.canonical.y||N.wrap-ie.wrap||N.canonical.x-ie.canonical.x}function H(pe,y){let N=pe.feature,ie=y.getFeatureState(N.layer["source-layer"],N.id);N.source=N.layer.source,N.layer["source-layer"]&&(N.sourceLayer=N.layer["source-layer"]),N.state=ie}function Y(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=pe;if(pe.url?fe=(yield e.k(yield y.transformRequest(pe.url,"Source"),N)).data:yield s.frameAsync(N,ie),!fe)return null;let be=e.V(e.e(fe,pe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fe&&fe.vector_layers&&(be.vectorLayerIds=fe.vector_layers.map(Re=>Re.id)),be})}class q{constructor(y,N){y&&(N?this.setSouthWest(y).setNorthEast(N):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let N=this._sw,ie=this._ne,fe,be;if(y instanceof e.W)fe=y,be=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(fe=y._sw,be=y._ne,!fe||!be)return this}return N||ie?(N.lng=Math.min(fe.lng,N.lng),N.lat=Math.min(fe.lat,N.lat),ie.lng=Math.max(be.lng,ie.lng),ie.lat=Math.max(be.lat,ie.lat)):(this._sw=new e.W(fe.lng,fe.lat),this._ne=new e.W(be.lng,be.lat)),this}getCenter(){return new e.W((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 e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(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(y){let{lng:N,lat:ie}=e.W.convert(y),fe=this._sw.lng<=N&&N<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=N&&N>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&fe}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let N=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(N>=360||ie>=360)return!0;let fe=e.X(this.getWest(),-180,180),be=e.X(this.getEast(),-180,180),Re=e.X(y.getWest(),-180,180),je=e.X(y.getEast(),-180,180),Ze=fe>be,ut=Re>je;return!(!Ze||!ut)||(Ze?je>=fe||Re<=be:ut?be>=Re||fe<=je:Re<=be&&je>=fe)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,N=0){let ie=360*N/40075017,fe=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-fe,y.lat-ie),new e.W(y.lng+fe,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),N=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>N.lng?new e.W(N.lng+360,N.lat):N)}}class Z{constructor(y,N,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=N||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let N=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*N),fe=Math.floor(e.Y(this.bounds.getNorth())*N),be=Math.ceil(e.Z(this.bounds.getEast())*N),Re=Math.ceil(e.Y(this.bounds.getSouth())*N);return y.x>=ie&&y.x=fe&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(N,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let fe="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((be,Re)=>{y.reloadPromise={resolve:be,reject:Re}})}else y.actor=this.dispatcher.getActor(),fe="LT";y.abortController=new AbortController;try{let be=yield y.actor.sendAsync({type:fe,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,be);let Re={};return be?.etagUnmodified&&(Re.unmodified=!0),Re}catch(be){if(delete y.abortController,y.aborted)return;if(be&&be.status!==404)throw be;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let N=y.tileID.scaledTo(this.maxzoom).canonical,ie=N.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:N,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,N){if(N?.resourceTiming&&(y.resourceTiming=N.resourceTiming),N&&this.map._refreshExpiredTiles&&y.setExpiryData(N),y.etag=N?.etag,y.loadVectorData(N,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ae extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(fe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},N),e.e(this,e.V(N,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let N=yield Y(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,N&&(e.e(this,N),N.bounds&&(this.tileBounds=new Z(N.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(N){this._tileJSONRequest=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield v.getImage(yield this.map._requestManager.transformRequest(N,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let fe=this.map.painter.context,be=fe.gl,Re=ie.data;y.texture=this.map.painter.getTileTexture(Re.width),y.texture?y.texture.update(Re,{useMipmap:!0}):(y.texture=new e.T(fe,Re,be.RGBA,{useMipmap:!0}),y.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE,be.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class he extends ae{constructor(y,N,ie,fe){super(y,N,ie,fe),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},N),this.encoding=N.encoding||"mapbox",this.redFactor=N.redFactor,this.greenFactor=N.greenFactor,this.blueFactor=N.blueFactor,this.baseShift=N.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(N,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let fe=yield v.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(fe?.data){let be=fe.data;this.map._refreshExpiredTiles&&(fe.cacheControl||fe.expires)&&y.setExpiryData({cacheControl:fe.cacheControl,expires:fe.expires});let Re=e.b(be)&&e.a0()?be:yield this.readImageNow(be),je={type:this.type,uid:y.uid,source:this.id,rawImageData:Re,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:je}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(fe){if(delete y.abortController,y.aborted)y.state="unloaded";else if(fe)throw y.state="errored",fe}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let N=y.width+2,ie=y.height+2;try{return new e.R({width:N,height:ie},yield e.a2(y,-1,-1,N,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let N=y.canonical,ie=Math.pow(2,N.z),fe=(N.x-1+ie)%ie,be=N.x===0?y.wrap-1:y.wrap,Re=(N.x+1+ie)%ie,je=N.x+1===ie?y.wrap+1:y.wrap,Ze={};return Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y).key]={backfilled:!1},N.y>0&&(Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,y.wrap,N.z,N.x,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y-1).key]={backfilled:!1}),N.y+1be.key===ie);fe>-1&&pe.addOrUpdateProperties.splice(fe,1)}return(pe.removeAllProperties||y.removeAllProperties)&&(N.removeAllProperties=!0),(pe.removeProperties||y.removeProperties)&&(N.removeProperties=[...pe.removeProperties||[],...y.removeProperties||[]]),(pe.addOrUpdateProperties||y.addOrUpdateProperties)&&(N.addOrUpdateProperties=[...pe.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(pe.newGeometry||y.newGeometry)&&(N.newGeometry=y.newGeometry||pe.newGeometry),N}function Me(pe){var y,N;if(!pe)return{};let ie={};return ie.removeAll=pe.removeAll,ie.remove=new Set(pe.remove||[]),ie.add=new Map((y=pe.add)===null||y===void 0?void 0:y.map(fe=>[fe.id,fe])),ie.update=new Map((N=pe.update)===null||N===void 0?void 0:N.map(fe=>[fe.id,fe])),ie}function Se(pe){return pe&&pe.length!==0?typeof pe[0]=="number"?[pe]:pe.flatMap(y=>Se(y)):[]}function Ie(pe){return pe.type==="GeometryCollection"?pe.geometries.flatMap(y=>Ie(y)):Se(pe.coordinates)}function Ve(pe){let y=new q,N;switch(pe.type){case"FeatureCollection":N=pe.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":N=Ie(pe.geometry);break;default:N=Ie(pe)}if(N.length===0)return y;for(let ie of N){let[fe,be]=ie;y.extend([fe,be])}return y}class Ge extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:N.data},this.actor=ie.getActor(),this.setEventedParent(fe),this._data=typeof N.data=="string"?{url:N.data}:{geojson:N.data},this._options=e.e({},N),this._collectResourceTiming=N.collectResourceTiming,N.maxzoom!==void 0&&(this.maxzoom=N.maxzoom),N.type&&(this.type=N.type),N.attribution&&(this.attribution=N.attribution),this.promoteId=N.promoteId,N.clusterMaxZoom!==void 0&&this.maxzoom<=N.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${N.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(N.buffer!==void 0?N.buffer:128),tolerance:this._pixelsToTileUnits(N.tolerance!==void 0?N.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:N.lineMetrics||!1,generateId:N.generateId||!1,promoteId:typeof N.promoteId=="string"?N.promoteId:void 0,cluster:N.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(N.clusterMaxZoom),minPoints:Math.max(2,N.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(N.clusterRadius||50),log:!1,generateId:N.generateId||!1}},clusterProperties:N.clusterProperties,filter:N.filter},N.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let N=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${N}"`),N}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,N){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return N?ie:this}updateData(y,N){this._pendingWorkerUpdate.diff=function(fe,be){if(!fe)return be||{};if(!be)return fe||{};let Re=Me(fe),je=Me(be);(function(ut,ft){ft.removeAll&&(ut.add.clear(),ut.update.clear(),ut.remove.clear(),ft.remove.clear());for(let Dt of ft.remove)ut.add.delete(Dt),ut.update.delete(Dt);for(let[Dt,Gt]of ft.update){let Kt=ut.update.get(Dt);Kt&&(ft.update.set(Dt,we(Kt,Gt)),ut.update.delete(Dt))}})(Re,je);let Ze={};if((Re.removeAll||je.removeAll)&&(Ze.removeAll=!0),Ze.remove=new Set([...Re.remove,...je.remove]),Ze.add=new Map([...Re.add,...je.add]),Ze.update=new Map([...Re.update,...je.update]),Ze.remove.size&&Ze.add.size)for(let ut of Ze.add.keys())Ze.remove.delete(ut);return function(ut){let ft={};return ut.removeAll&&(ft.removeAll=ut.removeAll),ut.remove&&(ft.remove=Array.from(ut.remove)),ut.add&&(ft.add=Array.from(ut.add.values())),ut.update&&(ft.update=Array.from(ut.update.values())),ft}(Ze)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return N?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ve(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,N,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:N,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:N,updateCluster:ie}=this._pendingWorkerUpdate,fe=this._getLoadGeoJSONParameters(y,N,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:N?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(fe)})}_getLoadGeoJSONParameters(y,N,ie){return e._(this,void 0,void 0,function*(){let fe=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(fe.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming,fe):y!==void 0?(fe.data=y,fe):N?(fe.dataDiff=N,fe):ie?(fe.updateCluster=!0,fe):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let N=yield y,ie=yield this.actor.sendAsync({type:"LD",data:N});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let fe=this._applyDiffToSource(N.dataDiff),be=this._getShouldReloadTileOptions(fe),Re={dataType:"source"};this._applyResourceTiming(Re,ie),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"content",shouldReloadTileOptions:be})))}catch(N){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(N)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,N){var ie;if(!this._collectResourceTiming)return;let fe=(ie=N.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!fe)return;let be=fe.slice(0);be?.length&&e.e(y,{resourceTiming:be})}_applyDiffToSource(y){if(!y)return;let N=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let fe=function(be,Re){let je=new Map;if(be==null||be.type==null)return je;if(be.type==="Feature"){let Ze=xe(be,Re);return Ze==null?void 0:(je.set(Ze,be),je)}if(be.type==="FeatureCollection"){let Ze=new Set;for(let ut of be.features){let ft=xe(ut,Re);if(ft==null||Ze.has(ft))return;Ze.add(ft),je.set(ft,ut)}return je}}(this._data.geojson,N);if(!fe)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:fe}}if(!this._data.updateable)return;let ie=function(fe,be,Re){var je,Ze;let ut=[];if(be.removeAll)fe.clear();else if(be.remove)for(let ft of be.remove){let Dt=fe.get(ft);Dt&&(ut.push(Dt.geometry),fe.delete(ft))}if(be.add)for(let ft of be.add){let Dt=xe(ft,Re);if(Dt==null)continue;let Gt=fe.get(Dt);Gt&&ut.push(Gt.geometry),ut.push(ft.geometry),fe.set(Dt,ft)}if(be.update)for(let ft of be.update){let Dt=fe.get(ft.id);if(!Dt)continue;let Gt=!!ft.newGeometry,Kt=ft.removeAllProperties||((je=ft.removeProperties)===null||je===void 0?void 0:je.length)>0||((Ze=ft.addOrUpdateProperties)===null||Ze===void 0?void 0:Ze.length)>0;if(!Gt&&!Kt)continue;ut.push(Dt.geometry);let st=Object.assign({},Dt);if(fe.set(ft.id,st),Gt&&(ut.push(ft.newGeometry),st.geometry=ft.newGeometry),Kt){if(st.properties=ft.removeAllProperties?{}:Object.assign({},st.properties||{}),ft.removeProperties)for(let It of ft.removeProperties)delete st.properties[It];if(ft.addOrUpdateProperties)for(let{key:It,value:Ut}of ft.addOrUpdateProperties)st.properties[It]=Ut}}return ut}(this._data.updateable,y,N);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(N=>Ve(N))}}shouldReloadTile(y,{affectedBounds:N}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:fe}=this.workerOptions.geojsonVtOptions,be=function({x:Re,y:je,z:Ze},ut=0){let ft=e.a4((Re-ut)/Math.pow(2,Ze)),Dt=e.a5((je+1+ut)/Math.pow(2,Ze)),Gt=e.a4((Re+1+ut)/Math.pow(2,Ze)),Kt=e.a5((je-ut)/Math.pow(2,Ze));return new q([ft,Dt],[Gt,Kt])}(y.tileID.canonical,ie/fe);for(let Re of N)if(be.intersects(Re))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let fe=yield this.actor.sendAsync({type:N,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(fe,this.map.painter,N==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.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 e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,N,ie,fe){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=N}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let N=yield v.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,N?.data&&(this.image=N.data,y&&(this.coordinates=y),this._finishLoading())}catch(N){this._request=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let N=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(fe){let be=e.a8.fromPoints(fe),Re=be.width(),je=be.height(),Ze=Math.max(Re,je),ut=Math.max(0,Math.floor(-Math.log(Ze)/Math.LN2)),ft=Math.pow(2,ut);return new e.aa(ut,Math.floor((be.minX+be.maxX)/2*ft),Math.floor((be.minY+be.maxY)/2*ft))}(N),this.terrainTileRanges=this._getOverlappingTileRanges(N),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=N.map(fe=>this.tileID.getTilePoint(fe)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,N=y.gl;this.texture||(this.texture=new e.T(y,this.image,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var N;!((N=this.tileID)===null||N===void 0)&&N.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:N,minY:ie,maxX:fe,maxY:be}=e.a8.fromPoints(y),Re={};for(let je=0;je<=e.a9;je++){let Ze=Math.pow(2,je),ut=Math.floor(N*Ze),ft=Math.floor(ie*Ze),Dt=Math.floor(fe*Ze),Gt=Math.floor(be*Ze),Kt=(ut%Ze+Ze)%Ze,st=Dt%Ze,It=Math.floor(ut/Ze),Ut=Math.floor(Dt/Ze);Re[je]={minWrap:It,maxWrap:Ut,minTileXWrapped:Kt,maxTileXWrapped:st,minTileY:ft,maxTileY:Gt}}return Re}}class _e extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),this._onPlayingHandler=()=>{var be;(be=this.map)===null||be===void 0||be.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=N}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let N of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(N,"Source")).url);try{let N=yield e.ab(this.urls);if(this._loaded=!0,!N)return;this.video=N,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(N){this.fire(new e.l(e.d(N)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let N=this.video.seekable;yN.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${N.start(0)} and ${N.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,N=y.gl;this.texture?this.video.paused||(this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE),N.texSubImage2D(N.TEXTURE_2D,0,0,0,N.RGBA,N.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("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 ce extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),N.coordinates?Array.isArray(N.coordinates)&&N.coordinates.length===4&&!N.coordinates.some(be=>!Array.isArray(be)||be.length!==2||be.some(Re=>typeof Re!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas=="string"||N.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,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.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate===void 0||N.animate}load(){return e._(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 e.l(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(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let N=this.map.painter.context,ie=N.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(N,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let fe=!1;for(let be in this.tiles){let Re=this.tiles[be];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture,fe=!0)}fe&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},le=pe=>{switch(pe){case"geojson":return Ge;case"image":return ke;case"raster":return ae;case"raster-dem":return he;case"vector":return ee;case"video":return _e;case"canvas":return ce}return ve[pe]},Ae="RTLPluginLoaded";class Be extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=se()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(N=>{throw this.status="error",N})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(N,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(N),!this.url)throw new Error(`requested url ${N} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Ae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Xe=null;function Ye(){return Xe||(Xe=new Be),Xe}var yt,gt;(function(pe){pe[pe.Base=0]="Base",pe[pe.Parent=1]="Parent"})(yt||(yt={})),function(pe){pe[pe.Departing=0]="Departing",pe[pe.Incoming=1]="Incoming"}(gt||(gt={}));class Tt{constructor(y,N){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=N,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:N,fadingParentID:ie,fadeEndTime:fe}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=N,this.fadingParentID=ie,this.fadeEndTime=fe}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=m(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,N,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(fe,be){let Re={};if(!be)return Re;for(let je of fe){let Ze=je.layerIds.map(ut=>be.getLayer(ut)).filter(Boolean);if(Ze.length!==0){je.layers=Ze,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(ut=>Ze.filter(ft=>ft.id===ut)[0]));for(let ut of Ze)Re[ut.id]=je}}return Re}(y.buckets,N?.style),this.hasSymbolBuckets=!1;for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af&&be.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let fe in this.buckets){let be=this.buckets[fe];this.queryPadding=Math.max(this.queryPadding,N.style.getLayer(fe).queryRadius(be))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let fe=this.buckets[ie];fe.uploadPending()&&fe.upload(y)}let N=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,N.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,N.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:fe,cameraQueryGeometry:be,scale:Re,tileSize:this.tileSize,pixelPosMatrix:ft,transform:Ze,params:je,queryPadding:this.queryPadding*ut,getElevation:Dt},y,N,ie):{}}querySourceFeatures(y,N){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let fe=ie.loadVTLayers(),be=N?.sourceLayer?N.sourceLayer:"",Re=fe[e.ag]||fe[be];if(!Re)return;let je=e.ah(N?.filter,N?.globalState),{z:Ze,x:ut,y:ft}=this.tileID.canonical,Dt={z:Ze,x:ut,y:ft};for(let Gt=0;Gtie)fe=!1;else if(N)if(this.expirationTime({zoom:0,x:0,y:0,wrap:vr,fullyVisible:!1}),Ar=[],hr=[];if(pe.renderWorldCopies&&Re.allowWorldCopies())for(let vr=1;vr<=3;vr++)Ar.push(dr(-vr)),Ar.push(dr(vr));for(Ar.push(dr(0));Ar.length>0;){let vr=Ar.pop(),Or=vr.x,Cr=vr.y,ta=vr.fullyVisible,ka={x:Or,y:Cr,z:vr.zoom},Ta=Re.getTileBoundingVolume(ka,vr.wrap,pe.elevation,y);if(!ta){let ga=ht(N,Ta,ie);if(ga===0)continue;ta=ga===2}let Ra=Re.distanceToTile2d(fe.x,fe.y,ka,Ta),ua=Ze;je&&(ua=(y.calculateTileZoom||We)(pe.zoom+e.ar(pe.tileSize/y.tileSize),Ra,Ut,ir,pe.fov)),ua=(y.roundZoom?Math.round:Math.floor)(ua),ua=Math.max(0,ua);let ia=Math.min(ua,ft);if(vr.wrap=Re.getWrap(be,ka,vr.wrap),vr.zoom>=ia){if(vr.zoom>1),wrap:vr.wrap,fullyVisible:ta})}return hr.sort((vr,Or)=>vr.distanceSq-Or.distanceSq).map(vr=>vr.tileID)}let et=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(pe){return pe==="raster"||pe==="image"||pe==="video"}function pt(pe,y,N,ie,fe,be,Re){if(!y.hasData())return!1;let{tileID:je,fadingRole:Ze,fadingDirection:ut,fadingParentID:ft}=y;if(Ze===yt.Base&&ut===gt.Incoming&&ft)return N[ft.key]=ft,!0;let Dt=Math.max(je.overscaledZ-fe,be);for(let Gt=je.overscaledZ-1;Gt>=Dt;Gt--){let Kt=je.scaledTo(Gt),st=pe.getLoadedTile(Kt);if(st)return y.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Incoming,fadingParentID:st.tileID,fadeEndTime:ie+Re}),st.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Departing,fadeEndTime:ie+Re}),N[Kt.key]=Kt,!0}return!1}function Pt(pe,y,N,ie,fe,be){if(!y.hasData())return!1;let Re=y.tileID.children(fe),je=Ct(pe,y,Re,N,ie,fe,be);if(je)return!0;for(let Ze of Re)Ct(pe,y,Ze.children(fe),N,ie,fe,be)&&(je=!0);return je}function Ct(pe,y,N,ie,fe,be,Re){if(N[0].overscaledZ>=be)return!1;let je=!1;for(let Ze of N){let ut=pe.getLoadedTile(Ze);if(!ut)continue;let{fadingRole:ft,fadingDirection:Dt,fadingParentID:Gt}=ut;ft===yt.Base&&Dt===gt.Departing&&Gt||(ut.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Departing,fadingParentID:y.tileID,fadeEndTime:fe+Re}),y.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Incoming,fadeEndTime:fe+Re})),ie[Ze.key]=Ze,je=!0}return je}function qt(pe,y,N,ie){let fe=pe.tileID;return!!pe.selfFading||!pe.hasData()&&!!y.has(fe)&&(pe.setSelfFadeLogic(N+ie),!0)}function Vt(pe,y){var N;pe.needsHillshadePrepare=!0,pe.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-pe.tileID.canonical.x,fe=y.tileID.canonical.y-pe.tileID.canonical.y,be=Math.pow(2,pe.tileID.canonical.z),Re=y.tileID.key;ie===0&&fe===0||Math.abs(fe)>1||(Math.abs(ie)>1&&(Math.abs(ie+be)===1?ie+=be:Math.abs(ie-be)===1&&(ie-=be)),y.dem&&pe.dem&&(pe.dem.backfillBorder(y.dem,ie,fe),!((N=pe.neighboringTiles)===null||N===void 0)&&N[Re]&&(pe.neighboringTiles[Re].backfilled=!0)))}class Ht{constructor(){this._tiles={}}handleWrapJump(y){let N={};for(let ie in this._tiles){let fe=this._tiles[ie];fe.tileID=fe.tileID.unwrapTo(fe.tileID.wrap+y),N[fe.tileID.key]=fe}this._tiles=N}setFeatureState(y,N){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,N)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(N=>N.tileID).sort(e.au).map(N=>N.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,N){this._tiles[y]=N}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let N=this.getTileById(y.key);return N?.hasData()?N:null}isIdRenderable(y,N=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(N)}getRenderableIds(y=0,N){let ie=[];for(let fe of this.getAllIds())this.isIdRenderable(fe,N)&&ie.push(this.getTileById(fe));return N?ie.sort((fe,be)=>{let Re=fe.tileID,je=be.tileID,Ze=new e.P(Re.canonical.x,Re.canonical.y)._rotate(-y),ut=new e.P(je.canonical.x,je.canonical.y)._rotate(-y);return Re.overscaledZ-je.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(fe=>fe.tileID.key):ie.map(fe=>fe.tileID).sort(e.au).map(fe=>fe.key)}}class Sr extends e.E{constructor(y,N,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",fe=>{this._dataHandler(fe)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((fe,be,Re,je)=>{let Ze=new(le(be.type))(fe,be,Re,je);if(Ze.id!==fe)throw new Error(`Expected Source id to be ${fe} instead of ${Ze.id}`);return Ze})(y,N,ie,this),this._inViewTiles=new Ht,this._outOfViewCache=new e.av(0,fe=>this._unloadTile(fe)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var N;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((N=this._source)===null||N===void 0)&&N.onAdd&&this._source.onAdd(y)}onRemove(y){var N;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((N=this._source)===null||N===void 0)&&N.onRemove&&this._source.onRemove(y),this._inViewTiles=new Ht}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 y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,N,ie){return e._(this,void 0,void 0,function*(){try{let fe=yield this._source.loadTile(y);this._tileLoaded(y,N,ie,fe)}catch(fe){y.state="errored",fe.status!==404?this._source.fire(new e.l(e.d(fe),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let N of this._inViewTiles.getAllTiles())N.upload(y),N.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var N;return this._inViewTiles.getRenderableIds((N=this.transform)===null||N===void 0?void 0:N.bearingInRadians,y)}hasRenderableParent(y){let N=y.overscaledZ-1;if(N>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(N));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,N=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let fe=this._inViewTiles.getTileById(ie);N&&!this._source.shouldReloadTile(fe,N)||(y?this._reloadTile(ie,"expired"):fe.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,N){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=N),yield this._loadTile(ie,y,N))})}_tileLoaded(y,N,ie,fe){y.timeAdded=m(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(N,y),fe?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(be,Re){var je,Ze,ut;let ft=Re.getRenderableIds();for(let Dt of ft){if(!(!((je=be.neighboringTiles)===null||je===void 0)&&je[Dt]))continue;let Gt=Re.getTileById(Dt);be.neighboringTiles[Dt].backfilled||Vt(be,Gt),!((ut=(Ze=Gt.neighboringTiles)===null||Ze===void 0?void 0:Ze[be.tileID.key])===null||ut===void 0)&&ut.backfilled||Vt(Gt,be)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,N){let ie=this._getLoadedDescendents(N),fe=new Set;for(let be of N){let Re=ie[be.key];if(!Re?.length){fe.add(be);continue}let je=be.overscaledZ+Sr.maxOverzooming,Ze=Re.filter(Dt=>Dt.tileID.overscaledZ<=je);if(!Ze.length){fe.add(be);continue}let ut=Math.min(...Ze.map(Dt=>Dt.tileID.overscaledZ)),ft=Ze.filter(Dt=>Dt.tileID.overscaledZ===ut).map(Dt=>Dt.tileID);for(let Dt of ft)y[Dt.key]=Dt;this._areDescendentsComplete(ft,ut,be.overscaledZ)||fe.add(be)}return fe}_getLoadedDescendents(y){var N;let ie={};for(let fe of this._inViewTiles.getAllTiles().filter(be=>be.hasData()))for(let be of y)fe.tileID.isChildOf(be)&&(ie[N=be.key]||(ie[N]=[]),ie[be.key].push(fe));return ie}_areDescendentsComplete(y,N,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===N:Math.pow(4,N-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let N=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,fe=Math.floor(N*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,fe):fe;this._outOfViewCache.setMaxSize(be)}handleWrapJump(y){let N=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,N&&(this._inViewTiles.handleWrapJump(N),this._resetTileReloadTimers())}update(y,N){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=N,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ze=>new e.a3(Ze.canonical.z,Ze.wrap,Ze.canonical.z,Ze.canonical.x,Ze.canonical.y)):(ie=Je(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:N,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ze=>this._source.hasTile(Ze)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let fe=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,fe&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let be=Ke(y,this._source),Re=this._updateRetainedTiles(ie,be),je=Mt(this._source.type);je&&this._rasterFadeDuration>0&&!N&&function(Ze,ut,ft,Dt,Gt,Kt,st){let It=m(),Ut=e.at(ut);for(let ir of ut){let dr=Ze.getTileById(ir.key);dr.fadingDirection!==gt.Departing&&dr.fadeOpacity!==0||dr.resetFadeLogic(),pt(Ze,dr,ft,It,Dt,Gt,st)||Pt(Ze,dr,ft,It,Kt,st)||qt(dr,Ut,It,st)||dr.resetFadeLogic()}}(this._inViewTiles,ie,Re,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),je?this._cleanUpRasterTiles(Re):this._cleanUpVectorTiles(Re)}_cleanUpRasterTiles(y){for(let N of this._inViewTiles.getAllIds())y[N]||this._removeTile(N)}_cleanUpVectorTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);y[N]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(N):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(N)}}_addTerrainIdealTiles(y){let N=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let fe=ie.scaledTo(ie.canonical.z-1);N.push(fe);let be=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));N.push(be)}return y.concat(N)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,N){var ie;let fe=new Set;for(let ut of y)this._addTile(ut).hasData()||fe.add(ut);let be=y.reduce((ut,ft)=>(ut[ft.key]=ft,ut),{}),Re=this._retainLoadedChildren(be,fe),je={},Ze=Math.max(N-Sr.maxUnderzooming,this._source.minzoom);for(let ut of Re){let ft=this._inViewTiles.getTileById(ut.key),Dt=ft?.wasRequested();for(let Gt=ut.overscaledZ-1;Gt>=Ze;--Gt){let Kt=ut.scaledTo(Gt);if(je[Kt.key])break;if(je[Kt.key]=!0,ft=this.getTile(Kt),!ft&&Dt&&(ft=this._addTile(Kt)),ft){let st=ft.hasData();if((st||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Dt)&&(be[Kt.key]=Kt),Dt=ft.wasRequested(),st)break}}}return be}_addTile(y){let N=this._inViewTiles.getTileById(y.key);if(N)return N;N=this._outOfViewCache.getAndRemove(y),N&&(N.resetFadeLogic(),this._setTileReloadTimer(y.key,N),N.tileID=y,this._state.initializeTileState(N,this.map?this.map.painter:null));let ie=N;return N||(N=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(N,y.key,N.state)),N.uses++,this._inViewTiles.setTile(y.key,N),ie||this._source.fire(new e.n("dataloading",{tile:N,coord:N.tileID,dataType:"source"})),N}_setTileReloadTimer(y,N){this._clearTileReloadTimer(y);let ie=N.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let N=this._timers[y];N&&(clearTimeout(N),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,N)}}refreshTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);(this._inViewTiles.isIdRenderable(N)||ie.state=="errored")&&y.some(fe=>fe.equals(ie.tileID.canonical))&&this._reloadTile(N,"expired")}}_removeTile(y){let N=this._inViewTiles.getTileById(y);N&&(N.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),N.uses>0||(N.hasData()&&N.state!=="reloading"?this._outOfViewCache.add(N.tileID,N,N.getExpiryTimeout()):(N.aborted=!0,this._abortTile(N),this._unloadTile(N))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,N,ie){let fe=[],be=this.transform;if(!be)return fe;let Re=be.getCoveringTilesDetailsProvider().allowWorldCopies(),je=ie?be.getCameraQueryGeometry(y):y,Ze=Kt=>be.screenPointToMercatorCoordinate(Kt,this.terrain),ut=this.transformBbox(y,Ze,!Re),ft=this.transformBbox(je,Ze,!Re),Dt=this.getIds(),Gt=e.a8.fromPoints(ft);for(let Kt of Dt){let st=this._inViewTiles.getTileById(Kt);if(st.holdingForSymbolFade())continue;let It=Re?[st.tileID]:[st.tileID.unwrapTo(-1),st.tileID.unwrapTo(0)],Ut=Math.pow(2,be.zoom-st.tileID.overscaledZ),ir=N*st.queryPadding*e.a6/st.tileSize/Ut;for(let dr of It){let Ar=Gt.map(hr=>dr.getTilePoint(new e.a7(hr.x,hr.y)));if(Ar.expandBy(ir),Ar.intersects(et)){let hr=ut.map(Or=>dr.getTilePoint(Or)),vr=ft.map(Or=>dr.getTilePoint(Or));fe.push({tile:st,tileID:Re?dr:dr.unwrapTo(0),queryGeometry:hr,cameraQueryGeometry:vr,scale:Ut})}}}return fe}transformBbox(y,N,ie){let fe=y.map(N);if(ie){let be=e.a8.fromPoints(y);be.shrinkBy(.001*Math.min(be.width(),be.height()));let Re=be.map(N);e.a8.fromPoints(fe).covers(Re)||(fe=fe.map(je=>je.x>.5?new e.a7(je.x-1,je.y,je.z):je))}return fe}getVisibleCoordinates(y){let N=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(N),N}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,N){if(N<=0)return!1;let ie=m();for(let fe of y.getAllTiles())if(fe.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,N,ie){y||(y=e.ag),this._state.updateState(y,N,ie)}removeFeatureState(y,N,ie){y||(y=e.ag),this._state.removeFeatureState(y,N,ie)}getFeatureState(y,N){return y||(y=e.ag),this._state.getState(y,N)}setDependencies(y,N,ie){let fe=this._inViewTiles.getTileById(y);fe&&fe.setDependencies(N,ie)}reloadTilesForDependencies(y,N){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,N)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,N))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class Kr{constructor(y,N){this.reset(y,N)}reset(y,N){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(fe-Re)/je:0;return this.points[be].mult(1-Ze).add(this.points[N].mult(Ze))}}function Yt(pe,y){let N=!0;return pe==="always"||pe!=="never"&&y!=="never"||(N=!1),N}class Rt{constructor(y,N,ie){let fe=this.boxCells=[],be=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(N/ie);for(let Re=0;Rethis.width||fe<0||N>this.height)return[];let Ze=[];if(y<=0&&N<=0&&this.width<=ie&&this.height<=fe){if(be)return[{key:null,x1:y,y1:N,x2:ie,y2:fe}];for(let ut=0;ut0}hitTestCircle(y,N,ie,fe,be){let Re=y-ie,je=y+ie,Ze=N-ie,ut=N+ie;if(je<0||Re>this.width||ut<0||Ze>this.height)return!1;let ft=[];return this._forEachCell(Re,Ze,je,ut,this._queryCellCircle,ft,{hitTest:!0,overlapMode:fe,circle:{x:y,y:N,radius:ie},seenUids:{box:{},circle:{}}},be),ft.length>0}_queryCell(y,N,ie,fe,be,Re,je,Ze){let{seenUids:ut,hitTest:ft,overlapMode:Dt}=je,Gt=this.boxCells[be],Kt=1e-6;if(Gt!==null){let It=this.bboxes;for(let Ut of Gt)if(!ut.box[Ut]){ut.box[Ut]=!0;let ir=4*Ut,dr=this.boxKeys[Ut];if(y<=It[ir+2]+Kt&&N<=It[ir+3]+Kt&&ie>=It[ir+0]-Kt&&fe>=It[ir+1]-Kt&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))&&(Re.push({key:dr,x1:It[ir],y1:It[ir+1],x2:It[ir+2],y2:It[ir+3]}),ft))return!0}}let st=this.circleCells[be];if(st!==null){let It=this.circles;for(let Ut of st)if(!ut.circle[Ut]){ut.circle[Ut]=!0;let ir=3*Ut,dr=this.circleKeys[Ut];if(this._circleAndRectCollide(It[ir],It[ir+1],It[ir+2],y,N,ie,fe)&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))){let Ar=It[ir],hr=It[ir+1],vr=It[ir+2];if(Re.push({key:dr,x1:Ar-vr,y1:hr-vr,x2:Ar+vr,y2:hr+vr}),ft)return!0}}}return!1}_queryCellCircle(y,N,ie,fe,be,Re,je,Ze){let{circle:ut,seenUids:ft,overlapMode:Dt}=je,Gt=this.boxCells[be];if(Gt!==null){let st=this.bboxes;for(let It of Gt)if(!ft.box[It]){ft.box[It]=!0;let Ut=4*It,ir=this.boxKeys[It];if(this._circleAndRectCollide(ut.x,ut.y,ut.radius,st[Ut+0],st[Ut+1],st[Ut+2],st[Ut+3])&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}let Kt=this.circleCells[be];if(Kt!==null){let st=this.circles;for(let It of Kt)if(!ft.circle[It]){ft.circle[It]=!0;let Ut=3*It,ir=this.circleKeys[It];if(this._circlesCollide(st[Ut],st[Ut+1],st[Ut+2],ut.x,ut.y,ut.radius)&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}}_forEachCell(y,N,ie,fe,be,Re,je,Ze){let ut=this._convertToXCellCoord(y),ft=this._convertToYCellCoord(N),Dt=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(fe);for(let Kt=ut;Kt<=Dt;Kt++)for(let st=ft;st<=Gt;st++)if(be.call(this,y,N,ie,fe,this.xCellCount*st+Kt,Re,je,Ze))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,N,ie,fe,be,Re){let je=fe-y,Ze=be-N,ut=ie+Re;return ut*ut>je*je+Ze*Ze}_circleAndRectCollide(y,N,ie,fe,be,Re,je){let Ze=(Re-fe)/2,ut=Math.abs(y-(fe+Ze));if(ut>Ze+ie)return!1;let ft=(je-be)/2,Dt=Math.abs(N-(be+ft));if(Dt>ft+ie)return!1;if(ut<=Ze||Dt<=ft)return!0;let Gt=ut-Ze,Kt=Dt-ft;return Gt*Gt+Kt*Kt<=ie*ie}}function nr(pe,y){let N=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),fe=y[0]*N,be=y[4]*N,Re=y[8]*ie,je=y[1]*N,Ze=y[5]*N,ut=y[9]*ie,ft=y[2]*N,Dt=y[6]*N,Gt=y[10]*ie;pe[0]=fe,pe[1]=be,pe[2]=Re,pe[4]=je,pe[5]=Ze,pe[6]=ut,pe[8]=ft,pe[9]=Dt,pe[10]=Gt;let Kt=y[12],st=y[13],It=y[14];return pe[12]=-fe*Kt-je*st-ft*It,pe[13]=-be*Kt-Ze*st-Dt*It,pe[14]=-Re*Kt-ut*st-Gt*It,pe[3]=0,pe[7]=0,pe[11]=0,pe[15]=1,pe}let ur=e.O();function cr(pe,y,N){let ie=e.O();if(!pe){let{vecSouth:Dt,vecEast:Gt}=Qr(y),Kt=n();Kt[0]=Gt[0],Kt[1]=Gt[1],Kt[2]=Dt[0],Kt[3]=Dt[1],fe=Kt,(ft=(Re=(be=Kt)[0])*(ut=be[3])-(Ze=be[2])*(je=be[1]))&&(fe[0]=ut*(ft=1/ft),fe[1]=-je*ft,fe[2]=-Ze*ft,fe[3]=Re*ft),ie[0]=Kt[0],ie[1]=Kt[1],ie[4]=Kt[2],ie[5]=Kt[3]}var fe,be,Re,je,Ze,ut,ft;return e.S(ie,ie,[1/N,1/N,1]),ie}function Rr(pe,y,N,ie){if(pe){let fe=e.O();if(!y){let{vecSouth:be,vecEast:Re}=Qr(N);fe[0]=Re[0],fe[1]=Re[1],fe[4]=be[0],fe[5]=be[1]}return e.S(fe,fe,[ie,ie,1]),fe}return N.pixelsToClipSpaceMatrix}function Qr(pe){let y=Math.cos(pe.rollInRadians),N=Math.sin(pe.rollInRadians),ie=Math.cos(pe.pitchInRadians),fe=Math.cos(pe.bearingInRadians),be=Math.sin(pe.bearingInRadians),Re=e.az();Re[0]=-fe*ie*N-be*y,Re[1]=-be*ie*N+fe*y;let je=e.aA(Re);je<1e-9?e.aB(Re):e.aC(Re,Re,1/je);let Ze=e.az();Ze[0]=fe*ie*y-be*N,Ze[1]=be*ie*y+fe*N;let ut=e.aA(Ze);return ut<1e-9?e.aB(Ze):e.aC(Ze,Ze,1/ut),{vecEast:Ze,vecSouth:Re}}function Zr(pe,y,N,ie){let fe;ie?(fe=[pe,y,ie(pe,y),1],e.aE(fe,fe,N)):(fe=[pe,y,0,1],Oa(fe,fe,N));let be=fe[3];return{point:new e.P(fe[0]/be,fe[1]/be),signedDistanceFromCamera:be,isOccluded:!1}}function ha(pe,y){return .5+pe/y*.5}function Pa(pe,y){return pe.x>=-y[0]&&pe.x<=y[0]&&pe.y>=-y[1]&&pe.y<=y[1]}function La(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt){let Kt=N?pe.textSizeData:pe.iconSizeData,st=e.aw(Kt,y.transform.zoom),It=[256/y.width*2+1,256/y.height*2+1],Ut=N?pe.text.dynamicLayoutVertexArray:pe.icon.dynamicLayoutVertexArray;Ut.clear();let ir=pe.lineVertexArray,dr=N?pe.text.placedSymbolArray:pe.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,hr=!1;for(let vr=0;vrMath.abs(N.x-y.x)*ie?{useVertical:!0}:(pe===e.ax.vertical?y.yN.x)?{needsFlipping:!0}:null}function ja(pe){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:N,symbol:ie,fontSize:fe,flip:be,keepUpright:Re,glyphOffsetArray:je,dynamicLayoutVertexArray:Ze,aspectRatio:ut,rotateToLine:ft}=pe,Dt=fe/24,Gt=ie.lineOffsetX*Dt,Kt=ie.lineOffsetY*Dt,st;if(ie.numGlyphs>1){let It=ie.glyphStartIndex+ie.numGlyphs,Ut=ie.lineStartIndex,ir=ie.lineStartIndex+ie.lineLength,dr=un(Dt,je,Gt,Kt,be,ie,ft,y);if(!dr)return{notEnoughRoom:!0};let Ar=li(dr.first.point.x,dr.first.point.y,y,N),hr=li(dr.last.point.x,dr.last.point.y,y,N);if(Re&&!be){let vr=Xa(ie.writingMode,Ar,hr,ut);if(vr)return vr}st=[dr.first];for(let vr=ie.glyphStartIndex+1;vr0?Ar.point:Nn(y.tileAnchorPoint,dr,Ut,1,y),vr=li(Ut.x,Ut.y,y,N),Or=li(hr.x,hr.y,y,N),Cr=Xa(ie.writingMode,vr,Or,ut);if(Cr)return Cr}let It=vi(Dt*je.getoffsetX(ie.glyphStartIndex),Gt,Kt,be,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ft);if(!It||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};st=[It]}for(let It of st)e.aD(Ze,It.point,It.angle);return{}}function Nn(pe,y,N,ie,fe){let be=pe.add(pe.sub(y)._unit()),Re=Un(be.x,be.y,fe).point,je=N.sub(Re);return N.add(je._mult(ie/je.mag()))}function yn(pe,y,N){let ie=y.projectionCache;if(ie.projections[pe])return ie.projections[pe];let fe=new e.P(y.lineVertexArray.getx(pe),y.lineVertexArray.gety(pe)),be=Un(fe.x,fe.y,y);if(be.signedDistanceFromCamera>0)return ie.projections[pe]=be.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=be.isOccluded),be.point;let Re=pe-N.direction;return Nn(N.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(Re),y.lineVertexArray.gety(Re)),fe,N.previousVertex,N.absOffsetX-N.distanceFromAnchor+1,y)}function Un(pe,y,N){let ie=pe+N.translation[0],fe=y+N.translation[1],be;return N.pitchWithMap?(be=Zr(ie,fe,N.pitchedLabelPlaneMatrix,N.getElevation),be.isOccluded=!1):(be=N.transform.projectTileCoordinates(ie,fe,N.unwrappedTileID,N.getElevation),be.point.x=(.5*be.point.x+.5)*N.width,be.point.y=(.5*-be.point.y+.5)*N.height),be}function li(pe,y,N,ie){if(N.pitchWithMap){let fe=[pe,y,0,1];return e.aE(fe,fe,ie),N.transform.projectTileCoordinates(fe[0]/fe[3],fe[1]/fe[3],N.unwrappedTileID,N.getElevation).point}return{x:pe/N.width*2-1,y:1-y/N.height*2}}function Yn(pe,y,N){return N.transform.projectTileCoordinates(pe,y,N.unwrappedTileID,N.getElevation)}function on(pe,y,N){return pe._unit()._perp()._mult(y*N)}function en(pe,y,N,ie,fe,be,Re,je,Ze){if(je.projectionCache.offsets[pe])return je.projectionCache.offsets[pe];let ut=N.add(y);if(pe+Ze.direction=fe)return je.projectionCache.offsets[pe]=ut,ut;let ft=yn(pe+Ze.direction,je,Ze),Dt=on(ft.sub(N),Re,Ze.direction),Gt=N.add(Dt),Kt=ft.add(Dt);return je.projectionCache.offsets[pe]=e.aF(be,ut,Gt,Kt)||ut,je.projectionCache.offsets[pe]}function vi(pe,y,N,ie,fe,be,Re,je,Ze){let ut=ie?pe-y:pe+y,ft=ut>0?1:-1,Dt=0;ie&&(ft*=-1,Dt=Math.PI),ft<0&&(Dt+=Math.PI);let Gt,Kt=ft>0?be+fe:be+fe+1;je.projectionCache.cachedAnchorPoint?Gt=je.projectionCache.cachedAnchorPoint:(Gt=Un(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=Gt);let st,It,Ut=Gt,ir=Gt,dr=0,Ar=0,hr=Math.abs(ut),vr=[],Or;for(;dr+Ar<=hr;){if(Kt+=ft,Kt=Re)return null;dr+=Ar,ir=Ut,It=st;let ka={absOffsetX:hr,direction:ft,distanceFromAnchor:dr,previousVertex:ir};if(Ut=yn(Kt,je,ka),N===0)vr.push(ir),Or=Ut.sub(ir);else{let Ta,Ra=Ut.sub(ir);Ta=Ra.mag()===0?on(yn(Kt+ft,je,ka).sub(Ut),N,ft):on(Ra,N,ft),It||(It=ir.add(Ta)),st=en(Kt,Ta,Ut,be,Re,It,N,je,ka),vr.push(It),Or=st.sub(It)}Ar=Or.mag()}let Cr=Or._mult((hr-dr)/Ar)._add(It||ir),ta=Dt+Math.atan2(Ut.y-ir.y,Ut.x-ir.x);return vr.push(Cr),{point:Cr,angle:Ze?ta:0,path:vr}}let Yi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ja(pe,y){for(let N=0;N=1;za--)ga.push(ua.path[za]);for(let za=1;zaCn.signedDistanceFromCamera<=0)?[]:za.map(Cn=>Cn.point)}let Fa=[];if(ga.length>0){let za=ga[0].clone(),Cn=ga[0].clone();for(let Dn=1;Dn=ka.x&&Cn.x<=Ta.x&&za.y>=ka.y&&Cn.y<=Ta.y?[ga]:Cn.xTa.x||Cn.yTa.y?[]:e.aG([ga],ka.x,ka.y,Ta.x,Ta.y)}for(let za of Fa){Ra.reset(za,.25*ta);let Cn=0;Cn=Ra.length<=.5*ta?1:Math.ceil(Ra.paddedLength/da)+1;for(let Dn=0;Dn{let Ze=Zr(je.x,je.y,Re,be.getElevation),ut=be.transform.projectTileCoordinates(Ze.point.x,Ze.point.y,be.unwrappedTileID,be.getElevation);return ut.point.x=(.5*ut.point.x+.5)*be.width,ut.point.y=(.5*-ut.point.y+.5)*be.height,ut})}(y,N);return function(fe){let be=0,Re=0,je=0,Ze=0;for(let ut=0;utRe&&(Re=Ze,be=je));return fe.slice(be,be+Re)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let N=[],ie=new e.a8;for(let Dt of y){let Gt=new e.P(Dt.x+lt,Dt.y+lt);ie.extend(Gt),N.push(Gt)}let{minX:fe,minY:be,maxX:Re,maxY:je}=ie,Ze=this.grid.query(fe,be,Re,je).concat(this.ignoredGrid.query(fe,be,Re,je)),ut={},ft={};for(let Dt of Ze){let Gt=Dt.key;if(ut[Gt.bucketInstanceId]===void 0&&(ut[Gt.bucketInstanceId]={}),ut[Gt.bucketInstanceId][Gt.featureIndex])continue;let Kt=[new e.P(Dt.x1,Dt.y1),new e.P(Dt.x2,Dt.y1),new e.P(Dt.x2,Dt.y2),new e.P(Dt.x1,Dt.y2)];e.aH(N,Kt)&&(ut[Gt.bucketInstanceId][Gt.featureIndex]=!0,ft[Gt.bucketInstanceId]===void 0&&(ft[Gt.bucketInstanceId]=[]),ft[Gt.bucketInstanceId].push(Gt.featureIndex))}return ft}insertCollisionBox(y,N,ie,fe,be,Re){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,N,ie,fe,be,Re){let je=ie?this.ignoredGrid:this.grid,Ze={bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N};for(let ut=0;ut=this.screenRightBoundary||fethis.screenBottomBoundary}isInsideGrid(y,N,ie,fe){return ie>=0&&y=0&&Nthis.projectAndGetPerspectiveRatio(da.x,da.y,fe,ut,Dt));ia=ga.some(da=>!da.isOccluded),ua=ga.map(da=>new e.P(da.x,da.y))}else ia=!0;return{box:e.aI(ua),allPointsOccluded:!ia}}}class fr{constructor(y,N,ie,fe){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?N:-N))):fe&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class lr{constructor(y,N,ie,fe,be){this.text=new fr(y?y.text:null,N,ie,be),this.icon=new fr(y?y.icon:null,N,fe,be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,N,ie){this.text=y,this.icon=N,this.skipFade=ie}}class Ir{constructor(y,N,ie,fe,be){this.bucketInstanceId=y,this.featureIndex=N,this.sourceLayerIndex=ie,this.bucketIndex=fe,this.tileID=be}}class Dr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let N=++this.maxGroupID;this.collisionGroups[y]={ID:N,predicate:ie=>ie.collisionGroupID===N}}return this.collisionGroups[y]}}function ot(pe,y,N,ie,fe){let{horizontalAlign:be,verticalAlign:Re}=e.aP(pe);return new e.P(-(be-.5)*y+ie[0]*fe,-(Re-.5)*N+ie[1]*fe)}class kt{constructor(y,N,ie,fe,be){this.transform=y.clone(),this.terrain=N,this.collisionIndex=new rt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Dr(fe),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=be,be&&(be.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let N=this.terrain;return N?(ie,fe)=>N.getElevation(y,ie,fe):null}getBucketParts(y,N,ie,fe){let be=ie.getBucket(N),Re=ie.latestFeatureIndex;if(!be||!Re||N.id!==be.layerIds[0])return;let je=ie.collisionBoxArray,Ze=be.layers[0].layout,ut=be.layers[0].paint,ft=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Dt=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Kt=Ze.get("text-rotation-alignment")==="map",st=e.aK(ie,1,this.transform.zoom),It=e.aL(this.collisionIndex.transform,ie,ut.get("text-translate"),ut.get("text-translate-anchor")),Ut=e.aL(this.collisionIndex.transform,ie,ut.get("icon-translate"),ut.get("icon-translate-anchor")),ir=cr(Kt,this.transform,st);this.retainedQueryData[be.bucketInstanceId]=new Ir(be.bucketInstanceId,Re,be.sourceLayerIndex,be.index,ie.tileID);let dr={bucket:be,layout:Ze,translationText:It,translationIcon:Ut,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:ir,scale:ft,textPixelRatio:Dt,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:e.aw(be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(be.sourceID)};if(fe)for(let Ar of be.sortKeyRanges){let{sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or}=Ar;y.push({sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or,parameters:dr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:be.symbolInstances.length,parameters:dr})}attemptAnchorPlacement(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar,hr){var vr,Or,Cr;let ta=e.aM[y.textAnchor],ka=[y.textOffset0,y.textOffset1],Ta=ot(ta,ie,fe,ka,be),Ra=this.collisionIndex.placeCollisionBox(N,Gt,Ze,ut,ft,je,Re,Ut,Dt.predicate,Ar,Ta,hr);if((!dr||this.collisionIndex.placeCollisionBox(dr,Gt,Ze,ut,ft,je,Re,ir,Dt.predicate,Ar,Ta,hr).placeable)&&Ra.placeable){let ua;if(!((vr=this.prevPlacement)===null||vr===void 0)&&vr.variableOffsets[Kt.crossTileID]&&(!((Cr=(Or=this.prevPlacement)===null||Or===void 0?void 0:Or.placements[Kt.crossTileID])===null||Cr===void 0)&&Cr.text)&&(ua=this.prevPlacement.variableOffsets[Kt.crossTileID].anchor),Kt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Kt.crossTileID]={textOffset:ka,width:ie,height:fe,anchor:ta,textBoxScale:be,prevAnchor:ua},this.markUsedJustification(st,ta,Kt,It),st.allowVerticalPlacement&&(this.markUsedOrientation(st,It,Kt),this.placedOrientations[Kt.crossTileID]=It),{shift:Ta,placedGlyphBoxes:Ra}}}placeLayerBucketPart(y,N,ie){let{bucket:fe,layout:be,translationText:Re,translationIcon:je,unwrappedTileID:Ze,pitchedLabelPlaneMatrix:ut,textPixelRatio:ft,holdingForFade:Dt,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Kt,collisionGroup:st}=y.parameters,It=be.get("text-optional"),Ut=be.get("icon-optional"),ir=e.aN(be,"text-overlap","text-allow-overlap"),dr=ir==="always",Ar=e.aN(be,"icon-overlap","icon-allow-overlap"),hr=Ar==="always",vr=be.get("text-rotation-alignment")==="map",Or=be.get("text-pitch-alignment")==="map",Cr=be.get("icon-text-fit")!=="none",ta=be.get("symbol-z-order")==="viewport-y",ka=dr&&(hr||!fe.hasIconData()||Ut),Ta=hr&&(dr||!fe.hasTextData()||It);!fe.collisionArrays&&Gt&&fe.deserializeCollisionBoxes(Gt);let Ra=this.retainedQueryData[fe.bucketInstanceId].tileID,ua=this._getTerrainElevationFunc(Ra),ia=this.transform.getFastPathSimpleProjectionMatrix(Ra),ga=(da,Fa,za)=>{var Cn,Dn;if(N[da.crossTileID])return;if(Dt)return void(this.placements[da.crossTileID]=new Tr(!1,!1,!1));let ui=!1,cn=!1,sn=!0,ei=null,Pn={box:null,placeable:!1,offscreen:null,occluded:!1},Rn={placeable:!1},In=null,Jn=null,Ei=null,so=0,ti=0,bi=0;Fa.textFeatureIndex?so=Fa.textFeatureIndex:da.useRuntimeCollisionCircles&&(so=da.featureIndex),Fa.verticalTextFeatureIndex&&(ti=Fa.verticalTextFeatureIndex);let Wi=Fa.textBox;if(Wi){let Bs=es=>{let $o=e.ax.horizontal;if(fe.allowVerticalPlacement&&!es&&this.prevPlacement){let _s=this.prevPlacement.placedOrientations[da.crossTileID];_s&&(this.placedOrientations[da.crossTileID]=_s,$o=_s,this.markUsedOrientation(fe,$o,da))}return $o},So=(es,$o)=>{if(fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&Fa.verticalTextBox){for(let _s of fe.writingModes)if(_s===e.ax.vertical?(Pn=$o(),Rn=Pn):Pn=es(),Pn?.placeable)break}else Pn=es()},Ws=da.textAnchorOffsetStartIndex,Zo=da.textAnchorOffsetEndIndex;if(Zo===Ws){let es=($o,_s)=>{let Go=this.collisionIndex.placeCollisionBox($o,ir,ft,Ra,Ze,Or,vr,Re,st.predicate,ua,void 0,ia);return Go?.placeable&&(this.markUsedOrientation(fe,_s,da),this.placedOrientations[da.crossTileID]=_s),Go};So(()=>es(Wi,e.ax.horizontal),()=>{let $o=Fa.verticalTextBox;return fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&$o?es($o,e.ax.vertical):{box:null,offscreen:null}}),Bs(Pn?.placeable)}else{let es=e.aM[(Dn=(Cn=this.prevPlacement)===null||Cn===void 0?void 0:Cn.variableOffsets[da.crossTileID])===null||Dn===void 0?void 0:Dn.anchor],$o=(Go,Ys,Ll)=>{let mo=Go.x2-Go.x1,ru=Go.y2-Go.y1,Rs=da.textBoxScale,Yu=Cr&&Ar==="never"?Ys:null,Ul=null,ql=ir==="never"?1:2,fo="never";es&&ql++;for(let Xo=0;Xo$o(Wi,Fa.iconBox,e.ax.horizontal),()=>{let Go=Fa.verticalTextBox;return fe.allowVerticalPlacement&&!Pn?.placeable&&da.numVerticalGlyphVertices>0&&Go?$o(Go,Fa.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Pn&&(ui=Pn.placeable,sn=Pn.offscreen);let _s=Bs(Pn?.placeable);if(!ui&&this.prevPlacement){let Go=this.prevPlacement.variableOffsets[da.crossTileID];Go&&(this.variableOffsets[da.crossTileID]=Go,this.markUsedJustification(fe,Go.anchor,da,_s))}}}if(In=Pn,ui=In?.placeable,sn=In?.offscreen,da.useRuntimeCollisionCircles&&da.centerJustifiedTextSymbolIndex>=0){let Bs=fe.text.placedSymbolArray.get(da.centerJustifiedTextSymbolIndex),So=e.ay(fe.textSizeData,Kt,Bs),Ws=be.get("text-padding");Jn=this.collisionIndex.placeCollisionCircles(ir,Bs,fe.lineVertexArray,fe.glyphOffsetArray,So,Ze,ut,ie,Or,st.predicate,da.collisionCircleDiameter,Ws,Re,ua),Jn.circles.length&&Jn.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),ui=dr||Jn.circles.length>0&&!Jn.collisionDetected,sn&&(sn=Jn.offscreen)}if(Fa.iconFeatureIndex&&(bi=Fa.iconFeatureIndex),Fa.iconBox){let Bs=So=>this.collisionIndex.placeCollisionBox(So,Ar,ft,Ra,Ze,Or,vr,je,st.predicate,ua,Cr&&ei?ei:void 0,ia);Rn&&Rn.placeable&&Fa.verticalIconBox?(Ei=Bs(Fa.verticalIconBox),cn=Ei.placeable):(Ei=Bs(Fa.iconBox),cn=Ei.placeable),sn&&(sn=Ei.offscreen)}let ro=It||da.numHorizontalGlyphVertices===0&&da.numVerticalGlyphVertices===0,Mo=Ut||da.numIconVertices===0;ro||Mo?Mo?ro||cn&&(cn=ui):ui=cn&&ui:cn=ui=cn&&ui;let zs=cn&&Ei.placeable;if(ui&&In.placeable&&this.collisionIndex.insertCollisionBox(In.box,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,Rn&&Rn.placeable&&ti?ti:so,st.ID),zs&&this.collisionIndex.insertCollisionBox(Ei.box,Ar,be.get("icon-ignore-placement"),fe.bucketInstanceId,bi,st.ID),Jn&&ui&&this.collisionIndex.insertCollisionCircles(Jn.circles,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,so,st.ID),ie&&this.storeCollisionData(fe.bucketInstanceId,za,Fa,In,Ei,Jn),da.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(fe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[da.crossTileID]=new Tr((ui||ka)&&!In?.occluded,(cn||Ta)&&!Ei?.occluded,sn||fe.justReloaded),N[da.crossTileID]=!0};if(ta){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let da=fe.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Fa=da.length-1;Fa>=0;--Fa){let za=da[Fa];ga(fe.symbolInstances.get(za),fe.collisionArrays[za],za)}}else for(let da=y.symbolInstanceStart;da=0&&(y.text.placedSymbolArray.get(je).crossTileID=be>=0&&je!==be?0:ie.crossTileID)}markUsedOrientation(y,N,ie){let fe=N===e.ax.horizontal||N===e.ax.horizontalOnly?N:0,be=N===e.ax.vertical?N:0,Re=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let je of Re)y.text.placedSymbolArray.get(je).placedOrientation=fe;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=be)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let N=this.prevPlacement,ie=!1;this.prevZoomAdjustment=N?N.zoomAdjustment(this.transform.zoom):0;let fe=N?N.symbolFadeChange(y):1,be=N?N.opacities:{},Re=N?N.variableOffsets:{},je=N?N.placedOrientations:{};for(let Ze in this.placements){let ut=this.placements[Ze],ft=be[Ze];ft?(this.opacities[Ze]=new lr(ft,fe,ut.text,ut.icon),ie||(ie=ut.text!==ft.text.placed),ie||(ie=ut.icon!==ft.icon.placed)):(this.opacities[Ze]=new lr(null,fe,ut.text,ut.icon,ut.skipFade),ie||(ie=ut.text||ut.icon))}for(let Ze in be){let ut=be[Ze];if(!this.opacities[Ze]){let ft=new lr(ut,fe,!1,!1);ft.isHidden()||(this.opacities[Ze]=ft,ie||(ie=ut.text.placed),ie||(ie=ut.icon.placed))}}for(let Ze in Re)this.variableOffsets[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.variableOffsets[Ze]=Re[Ze]);for(let Ze in je)this.placedOrientations[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.placedOrientations[Ze]=je[Ze]);if(N&&N.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=N?N.lastPlacementChangeTime:y)}updateLayerOpacities(y,N){let ie={};for(let fe of N){let be=fe.getBucket(y);be&&fe.latestFeatureIndex&&y.id===be.layerIds[0]&&this.updateBucketOpacities(be,fe.tileID,ie,fe.collisionBoxArray)}}updateBucketOpacities(y,N,ie,fe){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let be=y.layers[0],Re=be.layout,je=new lr(null,0,!1,!1,!0),Ze=Re.get("text-allow-overlap"),ut=Re.get("icon-allow-overlap"),ft=be._unevaluatedLayout.hasValue("text-variable-anchor")||be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dt=Re.get("text-rotation-alignment")==="map",Gt=Re.get("text-pitch-alignment")==="map",Kt=Re.get("icon-text-fit")!=="none",st=new lr(null,0,Ze&&(ut||!y.hasIconData()||Re.get("icon-optional")),ut&&(Ze||!y.hasTextData()||Re.get("text-optional")),!0);!y.collisionArrays&&fe&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(fe);let It=(ir,dr,Ar)=>{for(let hr=0;hr0,ta=this.placedOrientations[dr.crossTileID],ka=ta===e.ax.vertical,Ta=ta===e.ax.horizontal||ta===e.ax.horizontalOnly;if(Ar>0||hr>0){let ua=wa(Or.text);It(y.text,Ar,ka?pn:ua),It(y.text,hr,Ta?pn:ua);let ia=Or.text.isHidden(),ga=[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex];for(let za of ga)za>=0&&(y.text.placedSymbolArray.get(za).hidden=ia||ka?1:0);dr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=ia||Ta?1:0);let da=this.variableOffsets[dr.crossTileID];da&&this.markUsedJustification(y,da.anchor,dr,ta);let Fa=this.placedOrientations[dr.crossTileID];Fa&&(this.markUsedJustification(y,"left",dr,Fa),this.markUsedOrientation(y,Fa,dr))}if(Cr){let ua=wa(Or.icon),ia=!(Kt&&dr.verticalPlacedIconSymbolIndex&&ka);dr.placedIconSymbolIndex>=0&&(It(y.icon,dr.numIconVertices,ia?ua:pn),y.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Or.icon.isHidden()),dr.verticalPlacedIconSymbolIndex>=0&&(It(y.icon,dr.numVerticalIconVertices,ia?pn:ua),y.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Ra=Ut?.has(ir)?Ut.get(ir):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let ua=y.collisionArrays[ir];if(ua){let ia=new e.P(0,0);if(ua.textBox||ua.verticalTextBox){let ga=!0;if(ft){let da=this.variableOffsets[vr];da?(ia=ot(da.anchor,da.width,da.height,da.textOffset,da.textBoxScale),Dt&&ia._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):ga=!1}if(ua.textBox||ua.verticalTextBox){let da;ua.textBox&&(da=ka),ua.verticalTextBox&&(da=Ta),jt(y.textCollisionBox.collisionVertexArray,Or.text.placed,!ga||da,Ra.text,ia.x,ia.y)}}if(ua.iconBox||ua.verticalIconBox){let ga=!!(!Ta&&ua.verticalIconBox),da;ua.iconBox&&(da=ga),ua.verticalIconBox&&(da=!ga),jt(y.iconCollisionBox.collisionVertexArray,Or.icon.placed,da,Ra.icon,Kt?ia.x:0,Kt?ia.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),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.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function jt(pe,y,N,ie,fe,be){ie&&ie.length!==0||(ie=[0,0,0,0]);let Re=ie[0]-lt,je=ie[1]-lt,Ze=ie[2]-lt,ut=ie[3]-lt;pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,ut),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,ut)}let ar=Math.pow(2,25),Er=Math.pow(2,24),xr=Math.pow(2,17),zr=Math.pow(2,16),Lr=Math.pow(2,9),aa=Math.pow(2,8),Sa=Math.pow(2,1);function wa(pe){if(pe.opacity===0&&!pe.placed)return 0;if(pe.opacity===1&&pe.placed)return 4294967295;let y=pe.placed?1:0,N=Math.floor(127*pe.opacity);return N*ar+y*Er+N*xr+y*zr+N*Lr+y*aa+N*Sa+y}let pn=0;class tn{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,N,ie,fe,be){let Re=this._bucketParts;for(;this._currentTileIndexje.sortKey-Ze.sortKey));this._currentPartIndex!this._forceFullPlacement&&m()-fe>2;for(;this._currentPlacementIndex>=0;){let Re=N[y[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(e.aQ(Re)&&Re.layout&&(!Re.minzoom||Re.minzoom<=je)&&(!Re.maxzoom||Re.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new tn(Re)),this._inProgressLayer.continuePlacement(ie[Re.source],this.placement,this._showCollisionBoxes,Re,be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let rn=512/e.a6/2;class Ri{constructor(y,N,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let fe=new Map;for(let be=0;be({x:Math.floor(Ze.anchorX*rn),y:Math.floor(Ze.anchorY*rn)})),crossTileIDs:Re.map(Ze=>Ze.crossTileID)};if(je.positions.length>128){let Ze=new e.aR(je.positions.length,16,Uint16Array);for(let{x:ut,y:ft}of je.positions)Ze.add(ut,ft);Ze.finish(),delete je.positions,je.index=Ze}this._symbolsByKey[be]=je}}getScaledCoordinates(y,N){let{x:ie,y:fe,z:be}=this.tileID.canonical,{x:Re,y:je,z:Ze}=N.canonical,ut=rn/Math.pow(2,Ze-be),ft=(je*e.a6+y.anchorY)*ut,Dt=fe*e.a6*rn;return{x:Math.floor((Re*e.a6+y.anchorX)*ut-ie*e.a6*rn),y:Math.floor(ft-Dt)}}findMatches(y,N,ie){let fe=this.tileID.canonical.zy)}}class Gn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class no{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let N=Math.round((y-this.lng)/360);if(N!==0)for(let ie in this.indexes){let fe=this.indexes[ie],be={};for(let Re in fe){let je=fe[Re];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+N),be[je.tileID.key]=je}this.indexes[ie]=be}this.lng=y}addBucket(y,N,ie){var fe,be,Re;if(!((fe=this.indexes[y.overscaledZ])===null||fe===void 0)&&fe[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===N.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ze=0;Zey.overscaledZ)for(let ft in ut){let Dt=ut[ft];Dt.tileID.isChildOf(y)&&Dt.findMatches(N.symbolInstances,y,je)}else{let ft=ut[y.scaledTo(Number(Ze)).key];ft&&ft.findMatches(N.symbolInstances,y,je)}}for(let Ze=0;Ze180?-360:N<-180?360:0}function qn(pe){return Math.max(0,Math.floor(pe))}class Hi{constructor(y,N){var ie;this.applyConstrain=(fe,be)=>this._constrainOverride!==null?this._constrainOverride(fe,be):this._callbacks.defaultConstrain(fe,be),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=N?.renderWorldCopies===void 0||!!N?.renderWorldCopies,this._minZoom=N?.minZoom||0,this._maxZoom=N?.maxZoom||22,this._minPitch=N?.minPitch==null?0:N?.minPitch,this._maxPitch=N?.maxPitch==null?60:N?.maxPitch,this._constrainOverride=(ie=N?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new oo,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,N,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new oo(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,N&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let N=e.X(y,-180,180)*Math.PI/180;var ie,fe,be,Re,je,Ze,ut,ft,Dt;this._bearingInRadians!==N&&(this._unmodified=!1,this._bearingInRadians=N,this._calcMatrices(),this._rotationMatrix=n(),ie=this._rotationMatrix,be=-this._bearingInRadians,Re=(fe=this._rotationMatrix)[0],je=fe[1],Ze=fe[2],ut=fe[3],ft=Math.sin(be),Dt=Math.cos(be),ie[0]=Re*Dt+Ze*ft,ie[1]=je*Dt+ut*ft,ie[2]=Re*-ft+Ze*Dt,ie[3]=je*-ft+ut*Dt)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let N=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==N&&(this._unmodified=!1,this._pitchInRadians=N,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let N=y/180*Math.PI;this._rollInRadians!==N&&(this._unmodified=!1,this._rollInRadians=N,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let N=this.applyConstrain(this._center,y).zoom;this._zoom!==N&&(this._unmodified=!1,this._zoom=N,this._tileZoom=Math.max(0,Math.floor(N)),this._scale=e.ao(N),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,N){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=N,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,N,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,N,ie),this.constrainInternal(),this._calcMatrices()}resize(y,N,ie=!0){this._width=y,this._height=N,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,N;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((N=this._lngRange)===null||N===void 0?void 0:N.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,N){if(N.length===1)return[N[0],y];{let{minX:ie,minY:fe,maxX:be,maxY:Re}=e.a8.fromPoints(N).extend(y);return[new e.P(ie,fe),new e.P(be,fe),new e.P(be,Re),new e.P(ie,Re),new e.P(ie,fe)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:N,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(N),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){let be=ie!==void 0?ie:this.bearing,Re=fe=fe!==void 0?fe:this.pitch,{distanceToCenter:je,clampedElevation:Ze}=this._distanceToCenterFromAltElevationPitch(N,this.elevation,Re),{x:ut,y:ft}=vt(Re,be),Dt=e.a7.fromLngLat(y,N),Gt,Kt,st=e.aY(1,Dt.y),It=0;do{if(It+=1,It>10)break;Kt=je/st,Gt=new e.a7(Dt.x+ut*Kt,Dt.y+ft*Kt),st=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(je-Kt*st)>1e-12);return{center:Gt.toLngLat(),elevation:Ze,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Kt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let N=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,fe=e.a7.fromLngLat(this.center,this.elevation),be=fe.x/N,Re=fe.y/N,je=fe.z/N,Ze=this.pitch,ut=this.bearing,{x:ft,y:Dt,z:Gt}=vt(Ze,ut),Kt=this.cameraToCenterDistance,st=be+Kt*-ft,It=Re+Kt*-Dt,Ut=je+Kt*Gt,{distanceToCenter:ir,clampedElevation:dr}=this._distanceToCenterFromAltElevationPitch(Ut/ie,y,Ze),Ar=ir*ie,hr=new e.a7((st+ft*Ar)*N,(It+Dt*Ar)*N,0).toLngLat(),vr=e.aq(1,hr.lat),Or=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/ir/vr/this.tileSize);this._elevation=dr,this._center=hr,this.setZoom(Or)}_distanceToCenterFromAltElevationPitch(y,N,ie){let fe=-Math.cos(e.an(ie)),be=y-N,Re,je=N;return fe*be>=0||Math.abs(fe)<.1?(Re=1e4,je=y+Re*fe):Re=-be/fe,{distanceToCenter:Re,clampedElevation:je}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let N=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(N+=y[fe]*this.min[fe],ie+=y[fe]*this.max[fe]):(ie+=y[fe]*this.min[fe],N+=y[fe]*this.max[fe]);return N>=0?2:ie<0?0:1}}class Ro{distanceToTile2d(y,N,ie,fe){let be=fe,Re=be.distanceX([y,N]),je=be.distanceY([y,N]);return Math.hypot(Re,je)}getWrap(y,N,ie){return ie}getTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ft=new e.a3(y.z,N,y.z,y.x,y.y),Dt=fe.terrain.getMinMaxElevation(ft);je=(be=Dt.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=Dt.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}let ut=1<fe}allowWorldCopies(){return!0}prepareNextFrame(){}}class go{constructor(y,N,ie){this.points=y,this.planes=N,this.aabb=ie}static fromInvProjectionMatrix(y,N=1,ie=0,fe,be){let Re=be?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],je=Math.pow(2,ie),Ze=[[-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(Gt=>function(Kt,st,It,Ut){let ir=e.aE([],Kt,st),dr=1/ir[3]/It*Ut;return e.b4(ir,ir,[dr,dr,1/ir[3],dr])}(Gt,y,N,je));fe&&function(Gt,Kt,st,It){let Ut=It?4:0,ir=It?0:4,dr=0,Ar=[],hr=[];for(let Cr=0;Cr<4;Cr++){let ta=e.b0([],Gt[Cr+ir],Gt[Cr+Ut]),ka=e.b5(ta);e.aZ(ta,ta,1/ka),Ar.push(ka),hr.push(ta)}for(let Cr=0;Cr<4;Cr++){let ta=e.b6(Gt[Cr+Ut],hr[Cr],st);dr=ta!==null&&ta>=0?Math.max(dr,ta):Math.max(dr,Ar[Cr])}let vr=function(Cr,ta){let ka=e.b0([],Cr[ta[0]],Cr[ta[1]]),Ta=e.b0([],Cr[ta[2]],Cr[ta[1]]),Ra=[0,0,0,0];return e.b1(Ra,e.b2([],ka,Ta)),Ra[3]=-e.b3(Ra,Cr[ta[0]]),Ra}(Gt,Kt),Or=function(Cr,ta){let ka=e.b7(Cr),Ta=e.b8([],Cr,1/ka),Ra=e.b0([],ta,e.aZ([],Ta,e.b3(ta,Ta))),ua=e.b7(Ra);if(ua>0){let ia=Math.sqrt(1-Ta[3]*Ta[3]),ma=e.aZ([],Ta,-Ta[3]),da=e.a_([],ma,e.aZ([],Ra,ia/ua));return e.b9(ta,da)}return null}(st,vr);if(Or!==null){let Cr=Or/e.b3(hr[0],vr);dr=Math.min(dr,Cr)}for(let Cr=0;Cr<4;Cr++){let ta=Math.min(dr,Ar[Cr]);Gt[Cr+ir]=[Gt[Cr+Ut][0]+hr[Cr][0]*ta,Gt[Cr+Ut][1]+hr[Cr][1]*ta,Gt[Cr+Ut][2]+hr[Cr][2]*ta,1]}}(Ze,Re[0],fe,be);let ut=Re.map(Gt=>{let Kt=e.b0([],Ze[Gt[0]],Ze[Gt[1]]),st=e.b0([],Ze[Gt[2]],Ze[Gt[1]]),It=e.b1([],e.b2([],Kt,st)),Ut=-e.b3(It,Ze[Gt[1]]);return It.concat(Ut)}),ft=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Dt=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ze)for(let Kt=0;Kt<3;Kt++)ft[Kt]=Math.min(ft[Kt],Gt[Kt]),Dt[Kt]=Math.max(Dt[Kt],Gt[Kt]);return new go(Ze,ut,new Mi(ft,Dt))}}class Eo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,N){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(N,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let fe={center:new e.W(N.lng,N.lat),zoom:ie},be=this._helper._lngRange;if(!this._helper._renderWorldCopies&&be===null){let hr=179.9999999999;be=[-hr,hr]}let Re=this.tileSize*e.ao(fe.zoom),je=0,Ze=Re,ut=0,ft=Re,Dt=0,Gt=0,{x:Kt,y:st}=this.size;if(this._helper._latRange){let hr=this._helper._latRange;je=e.Y(hr[1])*Re,Ze=e.Y(hr[0])*Re,Ze-jeZe&&(dr=Ze-hr)}if(be){let hr=(ut+ft)/2,vr=It;this._helper._renderWorldCopies&&(vr=e.X(It,hr-Re/2,hr+Re/2));let Or=Kt/2;vr-Orft&&(ir=ft-Or)}if(ir!==void 0||dr!==void 0){let hr=new e.P(ir??It,dr??Ut);fe.center=_r(Re,hr).wrap()}return fe},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new Ro}clone(){let y=new Eo;return y.apply(this,!1),y}apply(y,N,ie){this._helper.apply(y,N,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let N=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),fe=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),be=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),Re=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),je=Math.floor(Math.min(ie.x,fe.x,be.x,Re.x)),Ze=Math.floor(Math.max(ie.x,fe.x,be.x,Re.x)),ut=1;for(let ft=je-ut;ft<=Ze+ut;ft++)ft!==0&&N.push(new e.ba(ft,y))}return N}getCameraFrustum(){return go.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let N=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(N,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,N){let ie=e.aq(this.elevation,this.center.lat),fe=this.screenPointToMercatorCoordinateAtZ(N,ie),be=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),Re=e.a7.fromLngLat(y),je=new e.a7(Re.x-(fe.x-be.x),Re.y-(fe.y-be.y));this.setCenter(je?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,N){return N?this.coordinatePoint(e.a7.fromLngLat(y),N.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,N){var ie;return(ie=this.screenPointToMercatorCoordinate(y,N))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,N){if(N){let ie=N.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,N){let ie=N||0,fe=[y.x,y.y,0,1],be=[y.x,y.y,1,1];e.aE(fe,fe,this._pixelMatrixInverse),e.aE(be,be,this._pixelMatrixInverse);let Re=fe[3],je=be[3],Ze=fe[1]/Re,ut=be[1]/je,ft=fe[2]/Re,Dt=be[2]/je,Gt=ft===Dt?0:(ie-ft)/(Dt-ft);return new e.a7(e.H.number(fe[0]/Re,be[0]/je,Gt)/this.worldSize,e.H.number(Ze,ut,Gt)/this.worldSize,ie)}coordinatePoint(y,N=0,ie=this._pixelMatrix){let fe=[y.x*this.worldSize,y.y*this.worldSize,N,1];return e.aE(fe,fe,ie),new e.P(fe[0]/fe[3],fe[1]/fe[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Xt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,N){return N?N.pointCoordinate(y)!=null:y.y>this.height/2-Xt(this)}calculatePosMatrix(y,N=!1,ie){var fe;let be=(fe=y.key)!==null&&fe!==void 0?fe:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),Re=N?this._alignedPosMatrixCache:this._posMatrixCache;if(Re.has(be)){let ut=Re.get(be);return ie?ut.f32:ut.f64}let je=or(y,this.worldSize);e.U(je,N?this._alignedProjMatrix:this._viewProjMatrix,je);let Ze={f64:je,f32:new Float32Array(je)};return Re.set(be,Ze),ie?Ze.f32:Ze.f64}calculateFogMatrix(y){let N=y.key,ie=this._fogMatrixCacheF32;if(ie.has(N))return ie.get(N);let fe=or(y,this.worldSize);return e.U(fe,this._fogMatrix,fe),ie.set(N,new Float32Array(fe)),ie.get(N)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}_calculateNearFarZIfNeeded(y,N,ie){if(!this._helper.autoCalculateNearFarZ)return;let fe=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),be=y-fe*this._helper._pixelPerMeter/Math.cos(N),Re=fe<0?be:y,je=Math.PI/2+this.pitchInRadians,Ze=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),ut=Math.sin(Ze)*Re/Math.sin(e.al(Math.PI-je-Ze,.01,Math.PI-.01)),ft=Xt(this),Dt=Math.atan(ft/this._helper.cameraToCenterDistance),Gt=e.an(.75),Kt=Dt>Gt?2*Dt*(.5+ie.y/(2*ft)):Gt,st=Math.sin(Kt)*Re/Math.sin(e.al(Math.PI-je-Kt,.01,Math.PI-.01)),It=Math.min(ut,st);this._helper._farZ=1.01*(Math.cos(Math.PI/2-N)*It+Re),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,N=rr(this.worldSize,this.center),ie=N.x,fe=N.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let be=e.an(Math.min(this.pitch,$t)),Re=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(be)),je;var Ze,ut;this._calculateNearFarZIfNeeded(Re,be,y),je=new Float64Array(16),e.bc(je,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ze=this._invProjMatrix)[0]=1/(ut=je)[0],Ze[1]=0,Ze[2]=0,Ze[3]=0,Ze[4]=0,Ze[5]=1/ut[5],Ze[6]=0,Ze[7]=0,Ze[8]=0,Ze[9]=0,Ze[10]=0,Ze[11]=1/ut[14],Ze[12]=0,Ze[13]=0,Ze[14]=-1,Ze[15]=ut[10]/ut[14],je[8]=2*-y.x/this._helper._width,je[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(je),e.S(je,je,[1,-1,1]),e.Q(je,je,[0,0,-this._helper.cameraToCenterDistance]),e.be(je,je,-this.rollInRadians),e.bf(je,je,this.pitchInRadians),e.be(je,je,-this.bearingInRadians),e.Q(je,je,[-ie,-fe,0]),this._mercatorMatrix=e.S([],je,[this.worldSize,this.worldSize,this.worldSize]),e.S(je,je,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je),e.Q(je,je,[0,0,-this.elevation]),this._viewProjMatrix=je,this._invViewProjMatrix=e.bg([],je);let ft=[0,0,-1,1];e.aE(ft,ft,this._invViewProjMatrix),this._cameraPosition=[ft[0]/ft[3],ft[1]/ft[3],ft[2]/ft[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,Re,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-fe,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je);let Dt=this._helper._width%2/2,Gt=this._helper._height%2/2,Kt=Math.cos(this.bearingInRadians),st=Math.sin(-this.bearingInRadians),It=ie-Math.round(ie)+Kt*Dt+st*Gt,Ut=fe-Math.round(fe)+Kt*Gt+st*Dt,ir=new Float64Array(je);if(e.Q(ir,ir,[It>.5?It-1:It,Ut>.5?Ut-1:Ut,0]),this._alignedProjMatrix=ir,je=e.bg(new Float64Array(16),this._pixelMatrix),!je)throw new Error("failed to invert matrix");this._pixelMatrixInverse=je,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),N=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(N,N,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,N){let ie=e.a7.fromLngLat(y),fe=[ie.x*this.worldSize,ie.y*this.worldSize,N,1];return e.aE(fe,fe,this._viewProjMatrix),fe[2]/fe[3]}getProjectionData(y){let{overscaledTileID:N,aligned:ie,applyTerrainMatrix:fe}=y,be=this._helper.getMercatorTileCoordinates(N),Re=N?this.calculatePosMatrix(N,ie,!0):null,je;return je=N?.terrainRttPosMatrix32f&&fe?N.terrainRttPosMatrix32f:Re||e.bh(),{mainMatrix:je,tileMercatorCoords:be,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:je}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,N,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,N,ie,fe){let be=this.calculatePosMatrix(ie),Re;fe?(Re=[y,N,fe(y,N),1],e.aE(Re,Re,be)):(Re=[y,N,0,1],Oa(Re,Re,be));let je=Re[3];return{point:new e.P(Re[0]/je,Re[1]/je),signedDistanceFromCamera:je,isOccluded:!1}}populateCache(y){for(let N of y)this.calculatePosMatrix(N)}getMatrixForModel(y,N){let ie=e.a7.fromLngLat(y,N),fe=ie.meterInMercatorCoordinateUnits(),be=e.bi();return e.Q(be,be,[ie.x,ie.y,ie.z]),e.be(be,be,Math.PI),e.bf(be,be,Math.PI/2),e.S(be,be,[-fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:N,applyGlobeMatrix:y}),fe=or(N,this.worldSize);e.U(fe,this._viewProjMatrix,fe),ie.tileMercatorCoords=[0,0,1,1];let be=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],Re=e.bj();return e.S(Re,fe,be),ie.fallbackMatrix=Re,ie.mainMatrix=Re,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Ao(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ds(pe){if(pe.useSlerp)if(pe.k<1){let y=e.bk(pe.startEulerAngles.roll,pe.startEulerAngles.pitch,pe.startEulerAngles.bearing),N=e.bk(pe.endEulerAngles.roll,pe.endEulerAngles.pitch,pe.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,N,pe.k);let fe=e.bm(ie);pe.tr.setRoll(fe.roll),pe.tr.setPitch(fe.pitch),pe.tr.setBearing(fe.bearing)}else pe.tr.setRoll(pe.endEulerAngles.roll),pe.tr.setPitch(pe.endEulerAngles.pitch),pe.tr.setBearing(pe.endEulerAngles.bearing);else pe.tr.setRoll(e.H.number(pe.startEulerAngles.roll,pe.endEulerAngles.roll,pe.k)),pe.tr.setPitch(e.H.number(pe.startEulerAngles.pitch,pe.endEulerAngles.pitch,pe.k)),pe.tr.setBearing(e.H.number(pe.startEulerAngles.bearing,pe.endEulerAngles.bearing,pe.k))}function jo(pe,y,N,ie,fe){let be=fe.padding,Re=rr(fe.worldSize,N.getNorthWest()),je=rr(fe.worldSize,N.getNorthEast()),Ze=rr(fe.worldSize,N.getSouthEast()),ut=rr(fe.worldSize,N.getSouthWest()),ft=e.an(-ie),Dt=Re.rotate(ft),Gt=je.rotate(ft),Kt=Ze.rotate(ft),st=ut.rotate(ft),It=new e.P(Math.max(Dt.x,Gt.x,st.x,Kt.x),Math.max(Dt.y,Gt.y,st.y,Kt.y)),Ut=new e.P(Math.min(Dt.x,Gt.x,st.x,Kt.x),Math.min(Dt.y,Gt.y,st.y,Kt.y)),ir=It.sub(Ut),dr=(fe.width-(be.left+be.right+y.left+y.right))/ir.x,Ar=(fe.height-(be.top+be.bottom+y.top+y.bottom))/ir.y;if(Ar<0||dr<0)return void Ao();let hr=Math.min(e.ar(fe.scale*Math.min(dr,Ar)),pe.maxZoom),vr=e.P.convert(pe.offset),Or=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Cr=vr.add(Or).mult(fe.scale/e.ao(hr));return{center:_r(fe.worldSize,Re.add(Ze).div(2).sub(Cr)),zoom:hr,bearing:ie}}class Wo{get useGlobeControls(){return!1}handlePanInertia(y,N){let ie=y.mag(),fe=Math.abs(Xt(N));return{easingOffset:y.mult(Math.min(.75*fe/ie,1)),easingCenter:N.center}}handleMapControlsRollPitchBearingZoom(y,N){y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta),y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta)}handleMapControlsPan(y,N,ie){y.around.distSqr(N.centerPoint)<.01||N.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,N,ie,fe,be){return jo(y,N,ie,fe,be)}handleJumpToCenterZoom(y,N){y.zoom!==(N.zoom!==void 0?+N.zoom:y.zoom)&&y.setZoom(+N.zoom),N.center!==void 0&&y.setCenter(e.W.convert(N.center))}handleEaseTo(y,N){let ie=y.zoom,fe=y.padding,be={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Re={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},je=N.zoom!==void 0,Ze=!y.isPaddingEqual(N.padding),ut=!1,ft=je?+N.zoom:y.zoom,Dt=y.centerPoint.add(N.offsetAsPoint),Gt=y.screenPointToLocation(Dt),{center:Kt,zoom:st}=y.applyConstrain(e.W.convert(N.center||Gt),ft??ie);Vn(y,Kt);let It=rr(y.worldSize,Gt),Ut=rr(y.worldSize,Kt).sub(It),ir=e.ao(st-ie);return ut=st!==ie,{easeFunc:dr=>{if(ut&&y.setZoom(e.H.number(ie,st,dr)),e.bn(be,Re)||ds({startEulerAngles:be,endEulerAngles:Re,tr:y,k:dr,useSlerp:be.roll!=Re.roll}),Ze&&(y.interpolatePadding(fe,N.padding,dr),Dt=y.centerPoint.add(N.offsetAsPoint)),N.around)y.setLocationAtPoint(N.around,N.aroundPoint);else{let Ar=e.ao(y.zoom-ie),hr=st>ie?Math.min(2,ir):Math.max(.5,ir),vr=Math.pow(hr,1-dr),Or=_r(y.worldSize,It.add(Ut.mult(dr*vr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?Or.wrap():Or,Dt)}},isZooming:ut,elevationCenter:Kt}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.zoom,be=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),ie?+N.zoom:fe),Re=be.center,je=be.zoom;Vn(y,Re);let Ze=rr(y.worldSize,N.locationAtOffset),ut=rr(y.worldSize,Re).sub(Ze),ft=ut.mag(),Dt=e.ao(je-fe),Gt;if(N.minZoom!==void 0){let Kt=Math.min(+N.minZoom,fe,je),st=y.applyConstrain(Re,Kt).zoom;Gt=e.ao(st-fe)}return{easeFunc:(Kt,st,It,Ut)=>{y.setZoom(Kt===1?je:fe+e.ar(st));let ir=Kt===1?Re:_r(y.worldSize,Ze.add(ut.mult(It)).mult(st));y.setLocationAtPoint(y.renderWorldCopies?ir.wrap():ir,Ut)},scaleOfZoom:Dt,targetCenter:Re,scaleOfMinZoom:Gt,pixelPathLength:ft}}}class to{constructor(y,N,ie){this.blendFunction=y,this.blendColor=N,this.mask=ie}}to.Replace=[1,0],to.disabled=new to(to.Replace,e.bo.transparent,[!1,!1,!1,!1]),to.unblended=new to(to.Replace,e.bo.transparent,[!0,!0,!0,!0]),to.alphaBlended=new to([1,771],e.bo.transparent,[!0,!0,!0,!0]);let wo=2305;class pi{constructor(y,N,ie){this.enable=y,this.mode=N,this.frontFace=ie}}pi.disabled=new pi(!1,1029,wo),pi.backCCW=new pi(!0,1029,wo),pi.frontCCW=new pi(!0,1028,wo);class Vi{constructor(y,N,ie){this.func=y,this.mask=N,this.range=ie}}Vi.ReadOnly=!1,Vi.ReadWrite=!0,Vi.disabled=new Vi(519,Vi.ReadOnly,[0,1]);let Io=7680;class Xi{constructor(y,N,ie,fe,be,Re){this.test=y,this.ref=N,this.mask=ie,this.fail=fe,this.depthFail=be,this.pass=Re}}function Ko(pe){return typeof WebGL2RenderingContext<"u"&&pe instanceof WebGL2RenderingContext}Xi.disabled=new Xi({func:519,mask:0},0,0,Io,Io,Io);class Uo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let N=y.context,ie=N.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let fe=new e.aU;fe.emplaceBack(-1,-1),fe.emplaceBack(2,-1),fe.emplaceBack(-1,2);let be=new e.aW;be.emplaceBack(0,1,2),this._fullscreenTriangle=new Xn(N.createVertexBuffer(fe,eo.members),N.createIndexBuffer(be),e.aV.simpleSegment(0,0,fe.length,be.length)),this._resultBuffer=new Uint8Array(4),N.activeTexture.set(ie.TEXTURE1);let Re=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,Re),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=N.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(Re),Ko(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,N){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,N),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,N=y.gl;y.activeTexture.set(N.TEXTURE1),N.bindTexture(N.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,N){let ie=this._cachedRenderContext.context,fe=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,fe.TRIANGLES,Vi.disabled,Xi.disabled,to.unblended,pi.disabled,((be,Re)=>({u_input:be,u_output_expected:Re}))(y,N),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ko(fe)){fe.bindBuffer(fe.PIXEL_PACK_BUFFER,this._pbo),fe.readBuffer(fe.COLOR_ATTACHMENT0),fe.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),fe.bindBuffer(fe.PIXEL_PACK_BUFFER,null);let be=fe.fenceSync(fe.SYNC_GPU_COMMANDS_COMPLETE,0);fe.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:be}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ko(y)){let N=y.clientWaitSync(this._readbackQueue.sync,0,0);if(N===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(N===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Uo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let N=0;return N+=y[0]/256,N+=y[1]/65536,N+=y[2]/16777216,y[3]<127&&(N=-N),N/128}}let Ls=e.a6/128;function Ss(pe,y){let N=pe.granularity!==void 0?Math.max(pe.granularity,1):1,ie=N+(pe.generateBorders?2:0),fe=N+(pe.extendToNorthPole||pe.generateBorders?1:0)+(pe.extendToSouthPole||pe.generateBorders?1:0),be=ie+1,Re=fe+1,je=pe.generateBorders?-1:0,Ze=pe.generateBorders||pe.extendToNorthPole?-1:0,ut=N+(pe.generateBorders?1:0),ft=N+(pe.generateBorders||pe.extendToSouthPole?1:0),Dt=be*Re,Gt=ie*fe*6,Kt=be*Re>65536;if(Kt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let st=Kt||y==="32bit",It=new Int16Array(2*Dt),Ut=0;for(let Ar=Ze;Ar<=ft;Ar++)for(let hr=je;hr<=ut;hr++){let vr=hr/N*e.a6;hr===-1&&(vr=-Ls),hr===N+1&&(vr=e.a6+Ls);let Or=Ar/N*e.a6;Ar===-1&&(Or=pe.extendToNorthPole?e.bq:-Ls),Ar===N+1&&(Or=pe.extendToSouthPole?e.br:e.a6+Ls),It[Ut++]=vr,It[Ut++]=Or}let ir=st?new Uint32Array(Gt):new Uint16Array(Gt),dr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,N,ie,fe,be){return this.currentProjection.getMeshFromTileID(y,N,ie,fe,be)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function _o(pe){let y=bs(pe.worldSize,pe.center.lat);return 2*Math.PI*y}function Pi(pe,y,N,ie,fe){let be=1/(1<1e-6){let ie=pe[0]/N,fe=Math.acos(pe[2]/N),be=(ie>0?fe:-fe)/Math.PI*180;return new e.W(e.X(be,-180,180),y)}return new e.W(0,y)}function hl(pe){return Math.cos(pe*Math.PI/180)}function ps(pe,y){let N=hl(pe),ie=hl(y);return e.ar(ie/N)}function dl(pe,y){let N=pe.rotate(y.bearingInRadians),ie=y.zoom+ps(y.center.lat,0),fe=e.bt(1/hl(y.center.lat),1/hl(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),be=360/_o({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-N.x*be*fe,e.al(y.center.lat+N.y*be,-e.am,e.am))}function wu(pe){let y=.5*pe,N=Math.sin(y),ie=Math.cos(y);return Math.log(N+ie)-Math.log(ie-N)}function lu(pe,y,N,ie){let fe=pe.lat+N*ie;if(Math.abs(N)>1){let be=(Math.sign(pe.lat+N)!==Math.sign(pe.lat)?-Math.abs(pe.lat):Math.abs(pe.lat))*Math.PI/180,Re=Math.abs(pe.lat+N)*Math.PI/180,je=wu(be+ie*(Re-be)),Ze=wu(be),ut=wu(Re);return new e.W(pe.lng+y*((je-Ze)/(ut-Ze)),fe)}return new e.W(pe.lng+y*ie,fe)}class xc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,N,ie,fe){let be=`${y.z}_${y.x}_${y.y}_${fe?.terrain?"t":""}`,Re=this._cache.get(be);if(Re)return Re;let je=this._cachePrevious.get(be);if(je)return this._cache.set(be,je),je;let Ze=this._boundingVolumeFactory(y,N,ie,fe);return this._cache.set(be,Ze),this._hadAnyChanges=!0,Ze}}class Fl{constructor(y,N,ie,fe){this.min=ie,this.max=fe,this.points=y,this.planes=N}static fromAabb(y,N){let ie=[];for(let fe=0;fe<8;fe++)ie.push([1&~fe?y[0]:N[0],(fe>>1&1)==1?N[1]:y[1],(fe>>2&1)==1?N[2]:y[2]]);return new Fl(ie,[[-1,0,0,N[0]],[1,0,0,-y[0]],[0,-1,0,N[1]],[0,1,0,-y[1]],[0,0,-1,N[2]],[0,0,1,-y[2]]],y,N)}static fromCenterSizeAngles(y,N,ie){let fe=e.bA([],ie[0],ie[1],ie[2]),be=e.bB([],[N[0],0,0],fe),Re=e.bB([],[0,N[1],0],fe),je=e.bB([],[0,0,N[2]],fe),Ze=[...y],ut=[...y];for(let Dt=0;Dt<8;Dt++)for(let Gt=0;Gt<3;Gt++){let Kt=y[Gt]+be[Gt]*(1&~Dt?-1:1)+Re[Gt]*((Dt>>1&1)==1?1:-1)+je[Gt]*((Dt>>2&1)==1?1:-1);Ze[Gt]=Math.min(Ze[Gt],Kt),ut[Gt]=Math.max(ut[Gt],Kt)}let ft=[];for(let Dt=0;Dt<8;Dt++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],be,1&~Dt?-1:1)),e.a_(Gt,Gt,e.aZ([],Re,(Dt>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],je,(Dt>>2&1)==1?1:-1)),ft.push(Gt)}return new Fl(ft,[[...be,-e.b3(be,ft[0])],[...Re,-e.b3(Re,ft[0])],[...je,-e.b3(je,ft[0])],[-be[0],-be[1],-be[2],-e.b3(be,ft[7])],[-Re[0],-Re[1],-Re[2],-e.b3(Re,ft[7])],[-je[0],-je[1],-je[2],-e.b3(je,ft[7])]],Ze,ut)}intersectsFrustum(y){let N=!0,ie=this.points.length,fe=this.planes.length,be=y.planes.length,Re=y.points.length;for(let je=0;je=0&&ut++}if(ut===0)return 0;ut=0&&ut++}if(ut===0)return 0}return 1}intersectsPlane(y){let N=this.points.length,ie=0;for(let fe=0;fe=0&&ie++}return ie===N?2:ie===0?0:1}}function pl(pe,y,N){let ie=pe-y;return ie<0?-ie:Math.max(0,ie-N)}function $u(pe,y,N,ie,fe){let be=pe-N,Re;return Re=be<0?Math.min(-be,1+be-fe):be>fe?Math.min(Math.max(be-fe,0),1-be):0,Math.max(Re,pl(y,ie,fe))}class uu{constructor(){this._boundingVolumeCache=new xc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,N,ie,fe){let be=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,N,ie,fe){return this._boundingVolumeCache.getTileBoundingVolume(y,N,ie,fe)}_computeTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ut=new e.a3(y.z,N,y.z,y.x,y.y),ft=fe.terrain.getMinMaxElevation(ut);je=(be=ft.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=ft.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}if(je/=e.bD,Ze/=e.bD,je+=1,Ze+=1,y.z<=0)return Fl.fromAabb([-Ze,-Ze,-Ze],[Ze,Ze,Ze]);if(y.z===1)return Fl.fromAabb([y.x===0?-Ze:0,y.y===0?0:-Ze,-Ze],[y.x===0?0:Ze,y.y===0?Ze:0,Ze]);{let ut=[Pi(0,0,y.x,y.y,y.z),Pi(e.a6,0,y.x,y.y,y.z),Pi(e.a6,e.a6,y.x,y.y,y.z),Pi(0,e.a6,y.x,y.y,y.z)],ft=[];for(let Ra of ut)ft.push(e.aZ([],Ra,Ze));if(Ze!==je)for(let Ra of ut)ft.push(e.aZ([],Ra,je));y.y===0&&ft.push([0,1,0]),y.y===(1<=(1<{let fe=e.al(N.lat,-e.am,e.am),be=e.al(+ie,this.minZoom+ps(0,fe),this.maxZoom);return{center:new e.W(N.lng,fe),zoom:be}},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new uu}clone(){let y=new vs;return y.apply(this,!1),y}apply(y,N,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,N)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:N,applyGlobeMatrix:ie}=y,fe=this._helper.getMercatorTileCoordinates(N);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:fe,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let N=this.pitchInRadians,ie=this.cameraToCenterDistance/y,fe=Math.sin(N)*ie,be=Math.cos(N)*ie+1,Re=1/Math.sqrt(fe*fe+be*be)*1,je=-fe,Ze=be,ut=Math.sqrt(je*je+Ze*Ze);je/=ut,Ze/=ut;let ft=[0,je,Ze];e.bF(ft,ft,[0,0,0],-this.bearingInRadians),e.bG(ft,ft,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ft,ft,[0,0,0],this.center.lng*Math.PI/180);let Dt=1/e.b5(ft);return e.aZ(ft,ft,Dt),[...ft,-Re*Dt]}isLocationOccluded(y){return!this.isSurfacePointVisible(yo(y))}transformLightDirection(y){let N=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,fe=Math.cos(ie),be=[Math.sin(N)*fe,Math.sin(ie),Math.cos(N)*fe],Re=[be[2],0,-be[0]],je=[0,0,0];e.b2(je,Re,be),e.b1(Re,Re),e.b1(je,je);let Ze=[0,0,0];return e.b1(Ze,[Re[0]*y[0]+je[0]*y[1]+be[0]*y[2],Re[1]*y[0]+je[1]*y[1]+be[1]*y[2],Re[2]*y[0]+je[2]*y[1]+be[2]*y[2]]),Ze}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,N,ie){let fe=function(je,Ze,ut){let ft=1/(1<be&&(be=Gt),Ktje&&(je=Kt)}let ft=[ut.lng+Re,ut.lat+Ze,ut.lng+be,ut.lat+je];return this.isSurfacePointOnScreen([0,1,0])&&(ft[3]=90,ft[0]=-180,ft[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ft[1]=-90,ft[0]=-180,ft[2]=180),new q(ft)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){let ie=yo(this.unprojectScreenPoint(N)),fe=yo(y),be=e.bz();e.bK(be);let Re=e.bz();e.bH(Re,ie,be,-this.center.lng*Math.PI/180),e.bG(Re,Re,be,this.center.lat*Math.PI/180);let je=fe[0]*fe[0]+fe[2]*fe[2],Ze=Re[0]*Re[0];if(je=-ir&&st<=ir,Ar=Ut>=-ir&&Ut<=ir,hr,vr;if(dr&&Ar){let ka=this.center.lng*Math.PI/180,Ta=this.center.lat*Math.PI/180;e.bM(Dt,ka)+e.bM(st,Ta)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let N=e.bE();return e.aE(N,[...y,1],this._globeViewProjMatrixNoCorrection),N[0]/=N[3],N[1]/=N[3],N[2]/=N[3],N[0]>-1&&N[0]<1&&N[1]>-1&&N[1]<1&&N[2]>-1&&N[2]<1}rayPlanetIntersection(y,N){let ie=e.b3(y,N),fe=e.bz(),be=e.bz();e.aZ(be,N,ie),e.b0(fe,y,be);let Re=1-e.b3(fe,fe);if(Re<0)return null;let je=e.b3(y,y)-1,Ze=-ie+(ie<0?1:-1)*Math.sqrt(Re),ut=je/Ze,ft=Ze;return{tMin:Math.min(ut,ft),tMax:Math.max(ut,ft)}}unprojectScreenPoint(y){let N=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),fe=this.rayPlanetIntersection(N,ie);if(fe){let ft=e.bz();e.a_(ft,N,[ie[0]*fe.tMin,ie[1]*fe.tMin,ie[2]*fe.tMin]);let Dt=e.bz();return e.b1(Dt,ft),Dl(Dt)}let be=this._cachedClippingPlane,Re=be[0]*ie[0]+be[1]*ie[1]+be[2]*ie[2],je=-e.b9(be,N)/Re,Ze=e.bz();if(je>0)e.a_(Ze,N,[ie[0]*je,ie[1]*je,ie[2]*je]);else{let ft=e.bz();e.a_(ft,N,[2*ie[0],2*ie[1],2*ie[2]]);let Dt=e.b9(this._cachedClippingPlane,ft);e.b0(Ze,ft,[this._cachedClippingPlane[0]*Dt,this._cachedClippingPlane[1]*Dt,this._cachedClippingPlane[2]*Dt])}let ut=function(ft){let Dt=e.bz();return Dt[0]=ft[0]*-ft[3],Dt[1]=ft[1]*-ft[3],Dt[2]=ft[2]*-ft[3],{center:Dt,radius:Math.sqrt(1-ft[3]*ft[3])}}(be);return Dl(function(ft,Dt,Gt){let Kt=e.bz();e.b0(Kt,Gt,ft);let st=e.bz();return e.bx(st,ft,Kt,Dt/e.b7(Kt)),st}(ut.center,ut.radius,Ze))}getMatrixForModel(y,N){let ie=e.W.convert(y),fe=1/e.bD,be=e.bi();return e.bI(be,be,ie.lng/180*Math.PI),e.bf(be,be,-ie.lat/180*Math.PI),e.Q(be,be,[0,0,1+N/e.bD]),e.bf(be,be,.5*Math.PI),e.S(be,be,[fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return N.tileMercatorCoords=[0,0,1,1],N}getFastPathSimpleProjectionMatrix(y){}}class os{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,N){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=N,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(N,ie)=>this.currentTransform.defaultConstrain(N,ie),this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._globeness=1,this._mercatorTransform=new Eo,this._verticalPerspectiveTransform=new vs}clone(){let y=new os;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,N){this._helper.apply(y,N),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let N=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:N.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:N.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,N,ie){let fe=this._mercatorTransform.getPitchedTextCorrection(y,N,ie),be=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,N,ie);return e.bt(fe,be,this._globeness)}projectTileCoordinates(y,N,ie,fe){return this.currentTransform.projectTileCoordinates(y,N,ie,fe)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,N){return this.currentTransform.lngLatToCameraDepth(y,N)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,N),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,N),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,N){return this.currentTransform.locationToScreenPoint(y,N)}screenPointToMercatorCoordinate(y,N){return this.currentTransform.screenPointToMercatorCoordinate(y,N)}screenPointToLocation(y,N){return this.currentTransform.screenPointToLocation(y,N)}isPointOnMapSurface(y,N){return this.currentTransform.isPointOnMapSurface(y,N)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,N){return this.currentTransform.getMatrixForModel(y,N)}getProjectionDataForCustomLayer(y=!0){let N=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return N;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=N.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class ms{get useGlobeControls(){return!0}handlePanInertia(y,N){let ie=dl(y,N);return Math.abs(ie.lng-N.center.lng)>180&&(ie.lng=N.center.lng+179.5*Math.sign(ie.lng-N.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,N){let ie=y.around,fe=N.screenPointToLocation(ie);y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta);let be=N.zoom;y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta);let Re=N.zoom-be;if(Re===0)return;let je=e.bJ(N.center.lng,fe.lng),Ze=je/(Math.abs(je/180)+1),ut=e.bJ(N.center.lat,fe.lat),ft=N.getRayDirectionFromPixel(ie),Dt=N.cameraPosition,Gt=-1*e.b3(Dt,ft),Kt=e.bz();e.a_(Kt,Dt,[ft[0]*Gt,ft[1]*Gt,ft[2]*Gt]);let st=e.b5(Kt)-1,It=Math.exp(.5*-Math.max(st-.3,0)),Ut=bs(N.worldSize,N.center.lat)/Math.min(N.width,N.height),ir=e.bw(Ut,.9,.5,1,.25),dr=(1-e.ao(-Re))*Math.min(It,ir),Ar=N.center.lat,hr=N.zoom,vr=new e.W(N.center.lng+Ze*dr,e.al(N.center.lat+ut*dr,-e.am,e.am));N.setLocationAtPoint(fe,ie);let Or=N.center,Cr=e.bw(Math.abs(je),45,85,0,1),ta=e.bw(Ut,.75,.35,0,1),ka=Math.pow(Math.max(Cr,ta),.25),Ta=e.bJ(Or.lng,vr.lng),Ra=e.bJ(Or.lat,vr.lat);N.setCenter(new e.W(Or.lng+Ta*ka,Or.lat+Ra*ka).wrap()),N.setZoom(hr+ps(Ar,N.center.lat))}handleMapControlsPan(y,N,ie){if(!y.panDelta)return;let fe=N.center.lat,be=N.zoom;N.setCenter(dl(y.panDelta,N).wrap()),N.setZoom(be+ps(fe,N.center.lat))}cameraForBoxAndBearing(y,N,ie,fe,be){let Re=jo(y,N,ie,fe,be),je=N.left/be.width*2-1,Ze=(be.width-N.right)/be.width*2-1,ut=N.top/be.height*-2+1,ft=(be.height-N.bottom)/be.height*-2+1,Dt=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Dt?ie.getEast():ie.getWest(),Kt=Dt?ie.getWest():ie.getEast(),st=Math.max(ie.getNorth(),ie.getSouth()),It=Math.min(ie.getNorth(),ie.getSouth()),Ut=Gt+.5*e.bJ(Gt,Kt),ir=st+.5*e.bJ(st,It),dr=be.clone();dr.setCenter(Re.center),dr.setBearing(Re.bearing),dr.setPitch(0),dr.setRoll(0),dr.setZoom(Re.zoom);let Ar=dr.modelViewProjectionMatrix,hr=[yo(ie.getNorthWest()),yo(ie.getNorthEast()),yo(ie.getSouthWest()),yo(ie.getSouthEast()),yo(new e.W(Kt,ir)),yo(new e.W(Gt,ir)),yo(new e.W(Ut,st)),yo(new e.W(Ut,It))],vr=yo(Re.center),Or=Number.POSITIVE_INFINITY;for(let Cr of hr)je<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",je))),Ze>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",Ze))),ut>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ut))),ft<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ft)));if(Number.isFinite(Or)&&Or!==0)return Re.zoom=Math.min(dr.zoom+e.ar(Or),y.maxZoom),Re;Ao()}handleJumpToCenterZoom(y,N){let ie=y.center.lat,fe=y.applyConstrain(N.center?e.W.convert(N.center):y.center,y.zoom).center;y.setCenter(fe.wrap());let be=N.zoom!==void 0?+N.zoom:y.zoom+ps(ie,fe.lat);y.zoom!==be&&y.setZoom(be)}handleEaseTo(y,N){let ie=y.zoom,fe=y.center,be=y.padding,Re={roll:y.roll,pitch:y.pitch,bearing:y.bearing},je={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},Ze=N.zoom!==void 0,ut=!y.isPaddingEqual(N.padding),ft=!1,Dt=N.center?e.W.convert(N.center):fe,Gt=y.applyConstrain(Dt,ie).center;Vn(y,Gt);let Kt=y.clone();Kt.setCenter(Gt),Kt.setZoom(Ze?+N.zoom:ie+ps(fe.lat,Dt.lat)),Kt.setBearing(N.bearing);let st=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));Kt.setLocationAtPoint(Gt,st);let It=(N.offset&&N.offsetAsPoint.mag())>0?Kt.center:Gt,Ut=Ze?+N.zoom:ie+ps(fe.lat,It.lat),ir=ie+ps(fe.lat,0),dr=Ut+ps(It.lat,0),Ar=e.bJ(fe.lng,It.lng),hr=e.bJ(fe.lat,It.lat),vr=e.ao(dr-ir);return ft=Ut!==ie,{easeFunc:Or=>{if(e.bn(Re,je)||ds({startEulerAngles:Re,endEulerAngles:je,tr:y,k:Or,useSlerp:Re.roll!=je.roll}),ut&&y.interpolatePadding(be,N.padding,Or),N.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(N.around,N.aroundPoint);else{let Cr=dr>ir?Math.min(2,vr):Math.max(.5,vr),ta=Math.pow(Cr,1-Or),ka=lu(fe,Ar,hr,Or*ta);y.setCenter(ka.wrap())}if(ft){let Cr=e.H.number(ir,dr,Or)+ps(0,y.center.lat);y.setZoom(Cr)}},isZooming:ft,elevationCenter:It}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.center,be=y.zoom,Re=y.padding,je=!y.isPaddingEqual(N.padding),Ze=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),be).center,ut=ie?+N.zoom:y.zoom+ps(y.center.lat,Ze.lat),ft=y.clone();ft.setCenter(Ze),ft.setZoom(ut),ft.setBearing(N.bearing);let Dt=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));ft.setLocationAtPoint(Ze,Dt);let Gt=ft.center;Vn(y,Gt);let Kt=function(hr,vr,Or){let Cr=yo(vr),ta=yo(Or),ka=e.b3(Cr,ta),Ta=Math.acos(ka),Ra=_o(hr);return Ta/(2*Math.PI)*Ra}(y,fe,Gt),st=be+ps(fe.lat,0),It=ut+ps(Gt.lat,0),Ut=e.ao(It-st),ir;if(typeof N.minZoom=="number"){let hr=+N.minZoom+ps(Gt.lat,0),vr=Math.min(hr,st,It)+ps(0,Gt.lat),Or=y.applyConstrain(Gt,vr).zoom+ps(Gt.lat,0);ir=e.ao(Or-st)}let dr=e.bJ(fe.lng,Gt.lng),Ar=e.bJ(fe.lat,Gt.lat);return{easeFunc:(hr,vr,Or,Cr)=>{let ta=lu(fe,dr,Ar,Or);je&&y.interpolatePadding(Re,N.padding,hr);let ka=hr===1?Gt:ta;y.setCenter(ka.wrap());let Ta=st+e.ar(vr);y.setZoom(hr===1?ut:Ta+ps(0,ka.lat))},scaleOfZoom:Ut,targetCenter:Gt,scaleOfMinZoom:ir,pixelPathLength:Kt}}static solveVectorScale(y,N,ie,fe,be){let Re=fe==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],je=[ie[3],ie[7],ie[11],ie[15]],Ze=y[0]*Re[0]+y[1]*Re[1]+y[2]*Re[2],ut=y[0]*je[0]+y[1]*je[1]+y[2]*je[2],ft=N[0]*Re[0]+N[1]*Re[1]+N[2]*Re[2],Dt=N[0]*je[0]+N[1]*je[1]+N[2]*je[2];return ft+be*ut===Ze+be*Dt||je[3]*(Ze-ft)+Re[3]*(Dt-ut)+Ze*Dt==ft*ut?null:(ft+Re[3]-be*Dt-be*je[3])/(ft-Ze-be*Dt+be*ut)}static getLesserNonNegativeNonNull(y,N){return N!==null&&N>=0&&Ne.C(pe,y?.filter(N=>N.identifier!=="source.canvas")),zu=e.bN();class Ku extends e.E{constructor(y,N={}){var ie,fe;super(),this._rtlPluginLoaded=()=>{for(let Re in this.tileManagers){let je=this.tileManagers[Re].getSource().type;je!=="vector"&&je!=="geojson"||this.tileManagers[Re].reload()}},this.map=y,this.dispatcher=new ne(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,je)=>this.getGlyphs(Re,je)),this.dispatcher.registerMessageHandler("GI",(Re,je)=>this.getImages(Re,je)),this.dispatcher.registerMessageHandler("GDA",(Re,je)=>this.getDashes(Re,je)),this.imageManager=new C,this.imageManager.setEventedParent(this);let be=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((fe=document.documentElement)===null||fe===void 0?void 0:fe.lang)||void 0;this.glyphManager=new x(y._requestManager,N.localIdeographFontFamily,be),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new Di,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ye().on(Ae,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;let je=this.tileManagers[Re.sourceId];if(!je)return;let Ze=je.getSource();if(Ze?.vectorLayerIds)for(let ut in this._layers){let ft=this._layers[ut];ft.source===Ze.id&&this._validateLayer(ft)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,N){var ie,fe,be;this._checkLoaded();let Re=N===null?(be=(fe=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||fe===void 0?void 0:fe.default)!==null&&be!==void 0?be:null:N;if(e.bQ(Re,this._globalState[y]))return this;this._globalState[y]=Re,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let N=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(N.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(N)}_applyGlobalStateChanges(y){if(y.length===0)return;let N=new Set,ie={};for(let fe of y){ie[fe]=this._globalState[fe];for(let be in this._layers){let Re=this._layers[be],je=Re.getLayoutAffectingGlobalStateRefs(),Ze=Re.getPaintAffectingGlobalStateRefs(),ut=Re.getVisibilityAffectingGlobalStateRefs();if(je.has(fe)&&N.add(Re.source),Ze.has(fe))for(let{name:ft,value:Dt}of Ze.get(fe))this._updatePaintProperty(Re,ft,Dt);ut?.has(fe)&&(Re.recalculateVisibility(),this._updateLayer(Re))}}this.dispatcher.broadcast("UGS",ie);for(let fe in this.tileManagers)N.has(fe)&&(this._reloadSource(fe),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(N,ie={},fe){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let be=this._loadStyleRequest;try{let Re=yield this.map._requestManager.transformRequest(N,"Style");e.bR(be.signal);let je=yield e.k(Re,be);this._loadStyleRequest===be&&(this._loadStyleRequest=null),this._load(je.data,ie,fe)}catch(Re){this._loadStyleRequest===be&&(this._loadStyleRequest=null),Re&&!be.signal.aborted&&this.fire(new e.l(e.d(Re)))}})}loadJSON(y,N={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,N.validate=N.validate!==!1,this._load(y,N,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(zu,{validate:!1})}_load(y,N,ie){var fe,be;let Re=N.transformStyle?N.transformStyle(ie,y):y;if(!N.validate||!Fu(this,e.F(Re))){Re=Object.assign({},Re),this._loaded=!0,this.stylesheet=Re;for(let je in Re.sources)this.addSource(je,Re.sources[je],{validate:!1});Re.sprite?this._loadSprite(Re.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Re.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this._setProjectionInternal(((fe=this.stylesheet.projection)===null||fe===void 0?void 0:fe.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((be=this.stylesheet.terrain)!==null&&be!==void 0?be:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,N,ie;let fe=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",fe),this._order=fe.map(be=>be.id),this._layers={},this._serializedLayers=null;for(let be of fe){let Re=e.bT(be,this._globalState);if(Re.setEventedParent(this,{layer:{id:be.id}}),this._layers[be.id]=Re,e.bU(Re)&&this.tileManagers[Re.source]){let je=(ie=(N=be.paint)===null||N===void 0?void 0:N["raster-fade-duration"])!==null&&ie!==void 0?ie:Re.paint.get("raster-fade-duration");this.tileManagers[Re.source].setRasterFadeDuration(je)}}}_loadSprite(y,N=!1,ie=void 0){this.imageManager.setLoaded(!1);let fe=new AbortController,be;this._spriteRequest=fe,function(Re,je,Ze,ut){return e._(this,void 0,void 0,function*(){let ft=w(Re),Dt=Ze>1?"@2x":"",Gt={},Kt={};for(let{id:st,url:It}of ft){let Ut=yield je.transformRequest(S(It,Dt,".json"),"SpriteJSON");Gt[st]=e.k(Ut,ut);let ir=yield je.transformRequest(S(It,Dt,".png"),"SpriteImage");Kt[st]=v.getImage(ir,ut)}return yield Promise.all([...Object.values(Gt),...Object.values(Kt)]),function(st,It){return e._(this,void 0,void 0,function*(){let Ut={};for(let ir in st){Ut[ir]={};let dr=s.getImageCanvasContext((yield It[ir]).data),Ar=(yield st[ir]).data;for(let hr in Ar){let{width:vr,height:Or,x:Cr,y:ta,sdf:ka,pixelRatio:Ta,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ma,textFitHeight:da}=Ar[hr];Ut[ir][hr]={data:null,pixelRatio:Ta,sdf:ka,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ma,textFitHeight:da,spriteData:{width:vr,height:Or,x:Cr,y:ta,context:dr}}}}return Ut})}(Gt,Kt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Re=>{if(this._spriteRequest=null,Re)for(let je in Re){this._spritesImagesIds[je]=[];let Ze=this._spritesImagesIds[je]?this._spritesImagesIds[je].filter(ut=>!(ut in Re)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in Re[je]){let ft=je==="default"?ut:`${je}:${ut}`;this._spritesImagesIds[je].push(ft),ft in this.imageManager.images?this.imageManager.updateImage(ft,Re[je][ut],!1):this.imageManager.addImage(ft,Re[je][ut]),N&&(this._changedImages[ft]=!0)}}}).catch(Re=>{this._spriteRequest=null,be=Re,fe.signal.aborted||this.fire(new e.l(be))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),N&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(be)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let N=this.tileManagers[y.source];if(!N)return;let ie=y.sourceLayer;if(!ie)return;let fe=N.getSource();(fe.type==="geojson"||fe.vectorLayerIds&&!fe.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${fe.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,N=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(N?e.bV(ie):ie);let fe=[];for(let be of y)if(ie[be]){let Re=N?e.bV(ie[be]):ie[be];fe.push(Re)}return fe}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let N=Object.keys(this._layers);for(let ie of N){let fe=this._layers[ie];fe.type!=="custom"&&(y[ie]=fe.serialize())}return y}hasTransitions(){var y,N,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((N=this.sky)===null||N===void 0)&&N.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let fe in this.tileManagers)if(this.tileManagers[fe].hasTransition())return!0;for(let fe in this._layers)if(this._layers[fe].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let N=this._changed;if(N){let fe=Object.keys(this._updatedLayers),be=Object.keys(this._removedLayers);(fe.length||be.length)&&this._updateWorkerLayers(fe,be);for(let Re in this._updatedSources){let je=this._updatedSources[Re];if(je==="reload")this._reloadSource(Re);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);this._clearSource(Re)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Re in this._updatedPaintProps)this._layers[Re].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let fe in this.tileManagers){let be=this.tileManagers[fe];ie[fe]=be.used,be.used=!1}for(let fe of this._order){let be=this._layers[fe];be.recalculate(y,this._availableImages),!be.isHidden(y.zoom)&&be.source&&(this.tileManagers[be.source].used=!0)}for(let fe in ie){let be=this.tileManagers[fe];!!ie[fe]!=!!be.used&&be.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:fe}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,N&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let N in this.tileManagers)this.tileManagers[N].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,N){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:N})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,N={}){var ie;this._checkLoaded();let fe=this.serialize();if(y=N.transformStyle?N.transformStyle(fe,y):y,((ie=N.validate)===null||ie===void 0||ie)&&Fu(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let be=e.bW(fe,y),Re=this._getOperationsToPerform(be);if(Re.unimplemented.length>0)throw new Error(`Unimplemented: ${Re.unimplemented.join(", ")}.`);if(Re.operations.length===0)return!1;for(let je of Re.operations)je();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let N=[],ie=[];for(let fe of y)switch(fe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":N.push(()=>this.addLayer.apply(this,fe.args));break;case"removeLayer":N.push(()=>this.removeLayer.apply(this,fe.args));break;case"setPaintProperty":N.push(()=>this.setPaintProperty.apply(this,fe.args));break;case"setLayoutProperty":N.push(()=>this.setLayoutProperty.apply(this,fe.args));break;case"setFilter":N.push(()=>this.setFilter.apply(this,fe.args));break;case"addSource":N.push(()=>this.addSource.apply(this,fe.args));break;case"removeSource":N.push(()=>this.removeSource.apply(this,fe.args));break;case"setLayerZoomRange":N.push(()=>this.setLayerZoomRange.apply(this,fe.args));break;case"setLight":N.push(()=>this.setLight.apply(this,fe.args));break;case"setGeoJSONSourceData":N.push(()=>this.setGeoJSONSourceData.apply(this,fe.args));break;case"setGlyphs":N.push(()=>this.setGlyphs.apply(this,fe.args));break;case"setSprite":N.push(()=>this.setSprite.apply(this,fe.args));break;case"setTerrain":N.push(()=>this.map.setTerrain.apply(this,fe.args));break;case"setSky":N.push(()=>this.setSky.apply(this,fe.args));break;case"setProjection":this.setProjection.apply(this,fe.args);break;case"setGlobalState":N.push(()=>this.setGlobalState.apply(this,fe.args));break;case"setTransition":N.push(()=>{});break;default:ie.push(fe.command)}return{operations:N,unimplemented:ie}}addImage(y,N){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,N),this._afterImageUpdated(y)}updateImage(y,N){this.imageManager.updateImage(y,N)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,N,ie={}){var fe;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!N.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(N).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(N.type)&&this._validate(e.F.source,`sources.${y}`,N,null,ie))return;!((fe=this.map)===null||fe===void 0)&&fe._collectResourceTiming&&(N.collectResourceTiming=!0);let be=this.tileManagers[y]=new Sr(y,N,this.dispatcher);be.style=this,be.setEventedParent(this,()=>({isSourceLoaded:be.loaded(),source:be.serialize(),sourceId:y})),be.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let N=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],N.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),N.setEventedParent(null),N.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,N){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(N),this._changed=!0}getSource(y){var N;return(N=this.tileManagers[y])===null||N===void 0?void 0:N.getSource()}addLayer(y,N,ie={}){this._checkLoaded();let fe=y.id;if(this.getLayer(fe))return void this.fire(new e.l(new Error(`Layer "${fe}" already exists on this map.`)));let be;if(y.type==="custom"){if(Fu(this,e.bX(y)))return;be=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(fe,y.source),y=e.bV(y),y=e.e(y,{source:fe})),this._validate(e.F.layer,`layers.${fe}`,y,{arrayIndex:-1},ie))return;be=e.bT(y,this._globalState),this._validateLayer(be),be.setEventedParent(this,{layer:{id:fe}})}let Re=N?this._order.indexOf(N):this._order.length;if(N&&Re===-1)this.fire(new e.l(new Error(`Cannot add layer "${fe}" before non-existing layer "${N}".`)));else{if(this._order.splice(Re,0,fe),this._layerOrderChanged=!0,this._layers[fe]=be,this._removedLayers[fe]&&be.source&&be.type!=="custom"){let je=this._removedLayers[fe];delete this._removedLayers[fe],je.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.tileManagers[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)}}moveLayer(y,N){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===N)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let fe=N?this._order.indexOf(N):this._order.length;N&&fe===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${N}".`))):(this._order.splice(fe,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let N=this._layers[y];if(!N)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));N.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=N,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],N.onRemove&&N.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,N,ie){this._checkLoaded();let fe=this.getLayer(y);fe?fe.minzoom===N&&fe.maxzoom===ie||(N!=null&&(fe.minzoom=N),ie!=null&&(fe.maxzoom=ie),this._updateLayer(fe)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,N,ie={}){this._checkLoaded();let fe=this.getLayer(y);if(fe){if(!e.bQ(fe.filter,N))return N==null?(fe.setFilter(void 0),void this._updateLayer(fe)):void(this._validate(e.F.filter,`layers.${fe.id}.filter`,N,null,ie)||(fe.setFilter(e.bV(N)),this._updateLayer(fe)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getLayoutProperty(N),ie)||(be.setLayoutProperty(N,ie,fe),this._updateLayer(be)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,N){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(N);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getPaintProperty(N),ie)||this._updatePaintProperty(be,N,ie,fe):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,N,ie,fe={}){y.setPaintProperty(N,ie,fe)&&this._updateLayer(y),e.bU(y)&&N==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,N){return this.getLayer(y).getPaintProperty(N)}setFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=y.sourceLayer,be=this.tileManagers[ie];if(be===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let Re=be.getSource().type;Re==="geojson"&&fe?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Re!=="vector"||fe?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),be.setFeatureState(fe,y.id,N)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=this.tileManagers[ie];if(fe===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let be=fe.getSource().type,Re=be==="vector"?y.sourceLayer:void 0;be!=="vector"||Re?N&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):fe.removeFeatureState(Re,y.id,N):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let N=y.source,ie=y.sourceLayer,fe=this.tileManagers[N];if(fe!==void 0)return fe.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),fe.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${N}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,be=>be.serialize()),N=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,fe=this.stylesheet;return e.bZ({version:fe.version,name:fe.name,metadata:fe.metadata,light:fe.light,sky:fe.sky,center:fe.center,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,sprite:fe.sprite,glyphs:fe.glyphs,transition:fe.transition,projection:fe.projection,sources:y,layers:N,terrain:ie},be=>be!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let N=Re=>this._layers[Re].type==="fill-extrusion",ie={},fe=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je)){ie[je]=Re;for(let Ze of y){let ut=Ze[je];if(ut)for(let ft of ut)fe.push(ft)}}}fe.sort((Re,je)=>je.intersectionZ-Re.intersectionZ);let be=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je))for(let Ze=fe.length-1;Ze>=0;Ze--){let ut=fe[Ze].feature;if(ie[ut.layer.id]this.map.terrain.getElevation(ft,Dt,Gt):void 0));return this.placement&&be.push(function(ut,ft,Dt,Gt,Kt,st,It){let Ut={},ir=st.queryRenderedSymbols(Gt),dr=[];for(let Ar of Object.keys(ir).map(Number))dr.push(It[Ar]);dr.sort(K);for(let Ar of dr){let hr=Ar.featureIndex.lookupSymbolFeatures(ir[Ar.bucketInstanceId],ft,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Kt.filter,globalState:Kt.globalState},Kt.layers,Kt.availableImages,ut);for(let vr in hr){Ut[vr]||(Ut[vr]=[]);let Or=hr[vr];Or.sort((Cr,ta)=>{let ka=Ar.featureSortOrder;if(ka){let Ta=ka.indexOf(Cr.featureIndex);return ka.indexOf(ta.featureIndex)-Ta}return ta.featureIndex-Cr.featureIndex});for(let Cr of Or)Ut[vr].push(Cr)}}return function(Ar,hr,vr){for(let Or in Ar)for(let Cr of Ar[Or])H(Cr,vr[hr[Or].source]);return Ar}(Ut,ut,Dt)}(this._layers,Re,this.tileManagers,y,Ze,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(be)}querySourceFeatures(y,N){N?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",N.filter,null,N);let ie=this.tileManagers[y];return ie?function(fe,be){let Re=fe.getRenderableIds().map(ut=>fe.getTileByID(ut)),je=[],Ze={};for(let ut of Re){let ft=ut.tileID.canonical.key;Ze[ft]||(Ze[ft]=!0,ut.querySourceFeatures(je,be))}return je}(ie,N?Object.assign(Object.assign({},N),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,N={}){this._checkLoaded();let ie=this.light.getLight(),fe=!1;for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,N),this.light.updateTransitions(be)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let N=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===N.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(N.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,N={}){this._checkLoaded();let ie=this.getSky(),fe=!1;if(!y&&!ie)return;if(y&&!ie)fe=!0;else if(!y&&ie)fe=!0;else for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,N),this.sky.updateTransitions(be)}_setProjectionInternal(y){let N=function(ie,fe){let be={constrainOverride:fe};if(Array.isArray(ie)){let Re=new Bo({type:ie});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}switch(ie){case"mercator":return{projection:new io,transform:new Eo(be),cameraHelper:new Wo};case"globe":{let Re=new Bo({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}case"vertical-perspective":return{projection:new Vs,transform:new vs(be),cameraHelper:new ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new io,transform:new Eo(be),cameraHelper:new Wo}}}(y,this.map.transformConstrain);this.projection=N.projection,this.map.migrateProjection(N.transform,N.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,N,ie,fe,be={}){return be?.validate!==!1&&Fu(this,y.call(e.F,e.e({key:N,style:this.serialize(),value:ie,styleSpec:e.x},fe)))}_remove(y=!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),Ye().off(Ae,this._rtlPluginLoaded);for(let N in this._layers)this._layers[N].setEventedParent(null);for(let N in this.tileManagers){let ie=this.tileManagers[N];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let N in this.tileManagers)this.tileManagers[N].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,N,ie,fe,be=!1){let Re=!1,je=!1,Ze={};for(let ut of this._order){let ft=this._layers[ut];if(ft.type!=="symbol")continue;if(!Ze[ft.source]){let Gt=this.tileManagers[ft.source];Ze[ft.source]=Gt.getRenderableIds(!0).map(Kt=>Gt.getTileByID(Kt)).sort((Kt,st)=>st.tileID.overscaledZ-Kt.tileID.overscaledZ||(Kt.tileID.isLessThan(st.tileID)?-1:1))}let Dt=this.crossTileSymbolIndex.addLayer(ft,Ze[ft.source],y.center.lng);Re||(Re=Dt)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),be||(be=this._layerOrderChanged||ie===0),(be||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(m(),y.zoom))&&(this.pauseablePlacement=new ai(y,this.map.terrain,this._order,be,N,ie,fe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ze),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(m()),je=!0),Re&&this.pauseablePlacement.placement.setStale()),je||Re)for(let ut of this._order){let ft=this._layers[ut];ft.type==="symbol"&&this.placement.updateLayerOpacities(ft,Ze[ft.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(m())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(N.icons);this._updateTilesForChangedImages();let fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,N.icons),ie})}getGlyphs(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(N.stacks),fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,N={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,N)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,N){return e._(this,void 0,void 0,function*(){let ie={};for(let[fe,be]of Object.entries(N.dashes))ie[fe]=this.lineAtlas.getDash(be.dasharray,be.round);return ie})}addSprite(y,N,ie={},fe){this._checkLoaded();let be=[{id:y,url:N}],Re=[...w(this.stylesheet.sprite),...be];this._validate(e.F.sprite,"sprite",Re,null,ie)||(this.stylesheet.sprite=Re,this._loadSprite(be,!0,fe))}removeSprite(y){this._checkLoaded();let N=w(this.stylesheet.sprite);if(N.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;N.splice(N.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=N.length>0?N:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(y,N={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,N)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let N=this.tileManagers[y];N.setEventedParent(null),N.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let N=this._layers[y];N.setEventedParent(null),N.onRemove&&N.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var bc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Lh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,N,ie,fe,be,Re,je,Ze,ut){this.context=y;let ft=this.boundPaintVertexBuffers.length!==fe.length;for(let Dt=0;!ft&&Dt({u_texture:0,u_ele_delta:pe,u_fog_matrix:y,u_fog_color:N?N.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:N?N.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fe?0:N?N.calculateFogBlendOpacity(ie):0,u_horizon_color:N?N.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:N?N.properties.get("horizon-fog-blend"):1,u_is_globe_mode:fe?1:0}),Ju={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ss(pe){let y=[];for(let N of pe){if(N===null)continue;let ie=N.split(" ");y.push(ie.pop())}return y}class ah{constructor(y,N,ie,fe,be,Re,je,Ze,ut=[]){let ft=y.gl;this.program=ft.createProgram();let Dt=ss(N.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Kt=Dt.concat(Gt),st=Ai.prelude.staticUniforms?ss(Ai.prelude.staticUniforms):[],It=je.staticUniforms?ss(je.staticUniforms):[],Ut=N.staticUniforms?ss(N.staticUniforms):[],ir=ie?ie.getBinderUniforms():[],dr=st.concat(It).concat(Ut).concat(ir),Ar=[];for(let Ta of dr)Ar.includes(Ta)||Ar.push(Ta);let hr=ie?ie.defines():[];Ko(ft)&&hr.unshift("#version 300 es"),be&&hr.push("#define OVERDRAW_INSPECTOR;"),Re&&hr.push("#define TERRAIN3D;"),Ze&&hr.push(Ze),ut&&hr.push(...ut);let vr=hr.concat(Ai.prelude.fragmentSource,je.fragmentSource,N.fragmentSource).join(` +`}),staticAttributes:ie,staticUniforms:Re}}class Xn{constructor(y,N,ie){this.vertexBuffer=y,this.indexBuffer=N,this.segments=ie}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var eo=e.aS([{name:"a_pos",type:"Int16",components:2}]);let gi="#define PROJECTION_MERCATOR",qi="mercator";class io{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return qi}get shaderDefine(){return gi}get shaderPreludeCode(){return Ai.projectionMercator}get vertexShaderPreludeCode(){return Ai.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(y){}getMeshFromTileID(y,N,ie,fe,be){if(this._cachedMesh)return this._cachedMesh;let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(e.a6,0),Re.emplaceBack(0,e.a6),Re.emplaceBack(e.a6,e.a6);let je=y.createVertexBuffer(Re,eo.members),Ze=e.aV.simpleSegment(0,0,4,2),ut=new e.aW;ut.emplaceBack(1,0,2),ut.emplaceBack(1,2,3);let ft=y.createIndexBuffer(ut);return this._cachedMesh=new Xn(je,ft,Ze),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(y){}}class oo{constructor(y=0,N=0,ie=0,fe=0){if(isNaN(y)||y<0||isNaN(N)||N<0||isNaN(ie)||ie<0||isNaN(fe)||fe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=y,this.bottom=N,this.left=ie,this.right=fe}interpolate(y,N,ie){return N.top!=null&&y.top!=null&&(this.top=e.H.number(y.top,N.top,ie)),N.bottom!=null&&y.bottom!=null&&(this.bottom=e.H.number(y.bottom,N.bottom,ie)),N.left!=null&&y.left!=null&&(this.left=e.H.number(y.left,N.left,ie)),N.right!=null&&y.right!=null&&(this.right=e.H.number(y.right,N.right,ie)),this}getCenter(y,N){let ie=e.al((this.left+y-this.right)/2,0,y),fe=e.al((this.top+N-this.bottom)/2,0,N);return new e.P(ie,fe)}equals(y){return this.top===y.top&&this.bottom===y.bottom&&this.left===y.left&&this.right===y.right}clone(){return new oo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Vn(pe,y){if(!pe.renderWorldCopies||pe.lngRange)return;let N=y.lng-pe.center.lng;y.lng+=N>180?-360:N<-180?360:0}function qn(pe){return Math.max(0,Math.floor(pe))}class Hi{constructor(y,N){var ie;this.applyConstrain=(fe,be)=>this._constrainOverride!==null?this._constrainOverride(fe,be):this._callbacks.defaultConstrain(fe,be),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=N?.renderWorldCopies===void 0||!!N?.renderWorldCopies,this._minZoom=N?.minZoom||0,this._maxZoom=N?.maxZoom||22,this._minPitch=N?.minPitch==null?0:N?.minPitch,this._maxPitch=N?.maxPitch==null?60:N?.maxPitch,this._constrainOverride=(ie=N?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new oo,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,N,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new oo(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,N&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let N=e.X(y,-180,180)*Math.PI/180;var ie,fe,be,Re,je,Ze,ut,ft,Dt;this._bearingInRadians!==N&&(this._unmodified=!1,this._bearingInRadians=N,this._calcMatrices(),this._rotationMatrix=n(),ie=this._rotationMatrix,be=-this._bearingInRadians,Re=(fe=this._rotationMatrix)[0],je=fe[1],Ze=fe[2],ut=fe[3],ft=Math.sin(be),Dt=Math.cos(be),ie[0]=Re*Dt+Ze*ft,ie[1]=je*Dt+ut*ft,ie[2]=Re*-ft+Ze*Dt,ie[3]=je*-ft+ut*Dt)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let N=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==N&&(this._unmodified=!1,this._pitchInRadians=N,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let N=y/180*Math.PI;this._rollInRadians!==N&&(this._unmodified=!1,this._rollInRadians=N,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let N=this.applyConstrain(this._center,y).zoom;this._zoom!==N&&(this._unmodified=!1,this._zoom=N,this._tileZoom=Math.max(0,Math.floor(N)),this._scale=e.ao(N),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,N){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=N,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,N,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,N,ie),this.constrainInternal(),this._calcMatrices()}resize(y,N,ie=!0){this._width=y,this._height=N,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,N;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((N=this._lngRange)===null||N===void 0?void 0:N.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,N){if(N.length===1)return[N[0],y];{let{minX:ie,minY:fe,maxX:be,maxY:Re}=e.a8.fromPoints(N).extend(y);return[new e.P(ie,fe),new e.P(be,fe),new e.P(be,Re),new e.P(ie,Re),new e.P(ie,fe)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:N,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(N),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){let be=ie!==void 0?ie:this.bearing,Re=fe=fe!==void 0?fe:this.pitch,{distanceToCenter:je,clampedElevation:Ze}=this._distanceToCenterFromAltElevationPitch(N,this.elevation,Re),{x:ut,y:ft}=vt(Re,be),Dt=e.a7.fromLngLat(y,N),Gt,Kt,st=e.aY(1,Dt.y),It=0;do{if(It+=1,It>10)break;Kt=je/st,Gt=new e.a7(Dt.x+ut*Kt,Dt.y+ft*Kt),st=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(je-Kt*st)>1e-12);return{center:Gt.toLngLat(),elevation:Ze,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Kt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let N=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,fe=e.a7.fromLngLat(this.center,this.elevation),be=fe.x/N,Re=fe.y/N,je=fe.z/N,Ze=this.pitch,ut=this.bearing,{x:ft,y:Dt,z:Gt}=vt(Ze,ut),Kt=this.cameraToCenterDistance,st=be+Kt*-ft,It=Re+Kt*-Dt,Ut=je+Kt*Gt,{distanceToCenter:ir,clampedElevation:dr}=this._distanceToCenterFromAltElevationPitch(Ut/ie,y,Ze),Ar=ir*ie,hr=new e.a7((st+ft*Ar)*N,(It+Dt*Ar)*N,0).toLngLat(),vr=e.aq(1,hr.lat),Or=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/ir/vr/this.tileSize);this._elevation=dr,this._center=hr,this.setZoom(Or)}_distanceToCenterFromAltElevationPitch(y,N,ie){let fe=-Math.cos(e.an(ie)),be=y-N,Re,je=N;return fe*be>=0||Math.abs(fe)<.1?(Re=1e4,je=y+Re*fe):Re=-be/fe,{distanceToCenter:Re,clampedElevation:je}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let N=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(N+=y[fe]*this.min[fe],ie+=y[fe]*this.max[fe]):(ie+=y[fe]*this.min[fe],N+=y[fe]*this.max[fe]);return N>=0?2:ie<0?0:1}}class Ro{distanceToTile2d(y,N,ie,fe){let be=fe,Re=be.distanceX([y,N]),je=be.distanceY([y,N]);return Math.hypot(Re,je)}getWrap(y,N,ie){return ie}getTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ft=new e.a3(y.z,N,y.z,y.x,y.y),Dt=fe.terrain.getMinMaxElevation(ft);je=(be=Dt.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=Dt.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}let ut=1<fe}allowWorldCopies(){return!0}prepareNextFrame(){}}class go{constructor(y,N,ie){this.points=y,this.planes=N,this.aabb=ie}static fromInvProjectionMatrix(y,N=1,ie=0,fe,be){let Re=be?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],je=Math.pow(2,ie),Ze=[[-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(Gt=>function(Kt,st,It,Ut){let ir=e.aE([],Kt,st),dr=1/ir[3]/It*Ut;return e.b4(ir,ir,[dr,dr,1/ir[3],dr])}(Gt,y,N,je));fe&&function(Gt,Kt,st,It){let Ut=It?4:0,ir=It?0:4,dr=0,Ar=[],hr=[];for(let Cr=0;Cr<4;Cr++){let ta=e.b0([],Gt[Cr+ir],Gt[Cr+Ut]),ka=e.b5(ta);e.aZ(ta,ta,1/ka),Ar.push(ka),hr.push(ta)}for(let Cr=0;Cr<4;Cr++){let ta=e.b6(Gt[Cr+Ut],hr[Cr],st);dr=ta!==null&&ta>=0?Math.max(dr,ta):Math.max(dr,Ar[Cr])}let vr=function(Cr,ta){let ka=e.b0([],Cr[ta[0]],Cr[ta[1]]),Ta=e.b0([],Cr[ta[2]],Cr[ta[1]]),Ra=[0,0,0,0];return e.b1(Ra,e.b2([],ka,Ta)),Ra[3]=-e.b3(Ra,Cr[ta[0]]),Ra}(Gt,Kt),Or=function(Cr,ta){let ka=e.b7(Cr),Ta=e.b8([],Cr,1/ka),Ra=e.b0([],ta,e.aZ([],Ta,e.b3(ta,Ta))),ua=e.b7(Ra);if(ua>0){let ia=Math.sqrt(1-Ta[3]*Ta[3]),ga=e.aZ([],Ta,-Ta[3]),da=e.a_([],ga,e.aZ([],Ra,ia/ua));return e.b9(ta,da)}return null}(st,vr);if(Or!==null){let Cr=Or/e.b3(hr[0],vr);dr=Math.min(dr,Cr)}for(let Cr=0;Cr<4;Cr++){let ta=Math.min(dr,Ar[Cr]);Gt[Cr+ir]=[Gt[Cr+Ut][0]+hr[Cr][0]*ta,Gt[Cr+Ut][1]+hr[Cr][1]*ta,Gt[Cr+Ut][2]+hr[Cr][2]*ta,1]}}(Ze,Re[0],fe,be);let ut=Re.map(Gt=>{let Kt=e.b0([],Ze[Gt[0]],Ze[Gt[1]]),st=e.b0([],Ze[Gt[2]],Ze[Gt[1]]),It=e.b1([],e.b2([],Kt,st)),Ut=-e.b3(It,Ze[Gt[1]]);return It.concat(Ut)}),ft=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Dt=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ze)for(let Kt=0;Kt<3;Kt++)ft[Kt]=Math.min(ft[Kt],Gt[Kt]),Dt[Kt]=Math.max(Dt[Kt],Gt[Kt]);return new go(Ze,ut,new Mi(ft,Dt))}}class Eo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,N){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(N,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let fe={center:new e.W(N.lng,N.lat),zoom:ie},be=this._helper._lngRange;if(!this._helper._renderWorldCopies&&be===null){let hr=179.9999999999;be=[-hr,hr]}let Re=this.tileSize*e.ao(fe.zoom),je=0,Ze=Re,ut=0,ft=Re,Dt=0,Gt=0,{x:Kt,y:st}=this.size;if(this._helper._latRange){let hr=this._helper._latRange;je=e.Y(hr[1])*Re,Ze=e.Y(hr[0])*Re,Ze-jeZe&&(dr=Ze-hr)}if(be){let hr=(ut+ft)/2,vr=It;this._helper._renderWorldCopies&&(vr=e.X(It,hr-Re/2,hr+Re/2));let Or=Kt/2;vr-Orft&&(ir=ft-Or)}if(ir!==void 0||dr!==void 0){let hr=new e.P(ir??It,dr??Ut);fe.center=_r(Re,hr).wrap()}return fe},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new Ro}clone(){let y=new Eo;return y.apply(this,!1),y}apply(y,N,ie){this._helper.apply(y,N,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let N=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),fe=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),be=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),Re=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),je=Math.floor(Math.min(ie.x,fe.x,be.x,Re.x)),Ze=Math.floor(Math.max(ie.x,fe.x,be.x,Re.x)),ut=1;for(let ft=je-ut;ft<=Ze+ut;ft++)ft!==0&&N.push(new e.ba(ft,y))}return N}getCameraFrustum(){return go.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let N=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(N,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,N){let ie=e.aq(this.elevation,this.center.lat),fe=this.screenPointToMercatorCoordinateAtZ(N,ie),be=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),Re=e.a7.fromLngLat(y),je=new e.a7(Re.x-(fe.x-be.x),Re.y-(fe.y-be.y));this.setCenter(je?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,N){return N?this.coordinatePoint(e.a7.fromLngLat(y),N.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,N){var ie;return(ie=this.screenPointToMercatorCoordinate(y,N))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,N){if(N){let ie=N.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,N){let ie=N||0,fe=[y.x,y.y,0,1],be=[y.x,y.y,1,1];e.aE(fe,fe,this._pixelMatrixInverse),e.aE(be,be,this._pixelMatrixInverse);let Re=fe[3],je=be[3],Ze=fe[1]/Re,ut=be[1]/je,ft=fe[2]/Re,Dt=be[2]/je,Gt=ft===Dt?0:(ie-ft)/(Dt-ft);return new e.a7(e.H.number(fe[0]/Re,be[0]/je,Gt)/this.worldSize,e.H.number(Ze,ut,Gt)/this.worldSize,ie)}coordinatePoint(y,N=0,ie=this._pixelMatrix){let fe=[y.x*this.worldSize,y.y*this.worldSize,N,1];return e.aE(fe,fe,ie),new e.P(fe[0]/fe[3],fe[1]/fe[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Xt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,N){return N?N.pointCoordinate(y)!=null:y.y>this.height/2-Xt(this)}calculatePosMatrix(y,N=!1,ie){var fe;let be=(fe=y.key)!==null&&fe!==void 0?fe:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),Re=N?this._alignedPosMatrixCache:this._posMatrixCache;if(Re.has(be)){let ut=Re.get(be);return ie?ut.f32:ut.f64}let je=or(y,this.worldSize);e.U(je,N?this._alignedProjMatrix:this._viewProjMatrix,je);let Ze={f64:je,f32:new Float32Array(je)};return Re.set(be,Ze),ie?Ze.f32:Ze.f64}calculateFogMatrix(y){let N=y.key,ie=this._fogMatrixCacheF32;if(ie.has(N))return ie.get(N);let fe=or(y,this.worldSize);return e.U(fe,this._fogMatrix,fe),ie.set(N,new Float32Array(fe)),ie.get(N)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}_calculateNearFarZIfNeeded(y,N,ie){if(!this._helper.autoCalculateNearFarZ)return;let fe=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),be=y-fe*this._helper._pixelPerMeter/Math.cos(N),Re=fe<0?be:y,je=Math.PI/2+this.pitchInRadians,Ze=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),ut=Math.sin(Ze)*Re/Math.sin(e.al(Math.PI-je-Ze,.01,Math.PI-.01)),ft=Xt(this),Dt=Math.atan(ft/this._helper.cameraToCenterDistance),Gt=e.an(.75),Kt=Dt>Gt?2*Dt*(.5+ie.y/(2*ft)):Gt,st=Math.sin(Kt)*Re/Math.sin(e.al(Math.PI-je-Kt,.01,Math.PI-.01)),It=Math.min(ut,st);this._helper._farZ=1.01*(Math.cos(Math.PI/2-N)*It+Re),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,N=rr(this.worldSize,this.center),ie=N.x,fe=N.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let be=e.an(Math.min(this.pitch,$t)),Re=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(be)),je;var Ze,ut;this._calculateNearFarZIfNeeded(Re,be,y),je=new Float64Array(16),e.bc(je,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ze=this._invProjMatrix)[0]=1/(ut=je)[0],Ze[1]=0,Ze[2]=0,Ze[3]=0,Ze[4]=0,Ze[5]=1/ut[5],Ze[6]=0,Ze[7]=0,Ze[8]=0,Ze[9]=0,Ze[10]=0,Ze[11]=1/ut[14],Ze[12]=0,Ze[13]=0,Ze[14]=-1,Ze[15]=ut[10]/ut[14],je[8]=2*-y.x/this._helper._width,je[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(je),e.S(je,je,[1,-1,1]),e.Q(je,je,[0,0,-this._helper.cameraToCenterDistance]),e.be(je,je,-this.rollInRadians),e.bf(je,je,this.pitchInRadians),e.be(je,je,-this.bearingInRadians),e.Q(je,je,[-ie,-fe,0]),this._mercatorMatrix=e.S([],je,[this.worldSize,this.worldSize,this.worldSize]),e.S(je,je,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je),e.Q(je,je,[0,0,-this.elevation]),this._viewProjMatrix=je,this._invViewProjMatrix=e.bg([],je);let ft=[0,0,-1,1];e.aE(ft,ft,this._invViewProjMatrix),this._cameraPosition=[ft[0]/ft[3],ft[1]/ft[3],ft[2]/ft[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,Re,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-fe,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je);let Dt=this._helper._width%2/2,Gt=this._helper._height%2/2,Kt=Math.cos(this.bearingInRadians),st=Math.sin(-this.bearingInRadians),It=ie-Math.round(ie)+Kt*Dt+st*Gt,Ut=fe-Math.round(fe)+Kt*Gt+st*Dt,ir=new Float64Array(je);if(e.Q(ir,ir,[It>.5?It-1:It,Ut>.5?Ut-1:Ut,0]),this._alignedProjMatrix=ir,je=e.bg(new Float64Array(16),this._pixelMatrix),!je)throw new Error("failed to invert matrix");this._pixelMatrixInverse=je,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),N=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(N,N,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,N){let ie=e.a7.fromLngLat(y),fe=[ie.x*this.worldSize,ie.y*this.worldSize,N,1];return e.aE(fe,fe,this._viewProjMatrix),fe[2]/fe[3]}getProjectionData(y){let{overscaledTileID:N,aligned:ie,applyTerrainMatrix:fe}=y,be=this._helper.getMercatorTileCoordinates(N),Re=N?this.calculatePosMatrix(N,ie,!0):null,je;return je=N?.terrainRttPosMatrix32f&&fe?N.terrainRttPosMatrix32f:Re||e.bh(),{mainMatrix:je,tileMercatorCoords:be,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:je}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,N,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,N,ie,fe){let be=this.calculatePosMatrix(ie),Re;fe?(Re=[y,N,fe(y,N),1],e.aE(Re,Re,be)):(Re=[y,N,0,1],Oa(Re,Re,be));let je=Re[3];return{point:new e.P(Re[0]/je,Re[1]/je),signedDistanceFromCamera:je,isOccluded:!1}}populateCache(y){for(let N of y)this.calculatePosMatrix(N)}getMatrixForModel(y,N){let ie=e.a7.fromLngLat(y,N),fe=ie.meterInMercatorCoordinateUnits(),be=e.bi();return e.Q(be,be,[ie.x,ie.y,ie.z]),e.be(be,be,Math.PI),e.bf(be,be,Math.PI/2),e.S(be,be,[-fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:N,applyGlobeMatrix:y}),fe=or(N,this.worldSize);e.U(fe,this._viewProjMatrix,fe),ie.tileMercatorCoords=[0,0,1,1];let be=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],Re=e.bj();return e.S(Re,fe,be),ie.fallbackMatrix=Re,ie.mainMatrix=Re,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Ao(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ds(pe){if(pe.useSlerp)if(pe.k<1){let y=e.bk(pe.startEulerAngles.roll,pe.startEulerAngles.pitch,pe.startEulerAngles.bearing),N=e.bk(pe.endEulerAngles.roll,pe.endEulerAngles.pitch,pe.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,N,pe.k);let fe=e.bm(ie);pe.tr.setRoll(fe.roll),pe.tr.setPitch(fe.pitch),pe.tr.setBearing(fe.bearing)}else pe.tr.setRoll(pe.endEulerAngles.roll),pe.tr.setPitch(pe.endEulerAngles.pitch),pe.tr.setBearing(pe.endEulerAngles.bearing);else pe.tr.setRoll(e.H.number(pe.startEulerAngles.roll,pe.endEulerAngles.roll,pe.k)),pe.tr.setPitch(e.H.number(pe.startEulerAngles.pitch,pe.endEulerAngles.pitch,pe.k)),pe.tr.setBearing(e.H.number(pe.startEulerAngles.bearing,pe.endEulerAngles.bearing,pe.k))}function jo(pe,y,N,ie,fe){let be=fe.padding,Re=rr(fe.worldSize,N.getNorthWest()),je=rr(fe.worldSize,N.getNorthEast()),Ze=rr(fe.worldSize,N.getSouthEast()),ut=rr(fe.worldSize,N.getSouthWest()),ft=e.an(-ie),Dt=Re.rotate(ft),Gt=je.rotate(ft),Kt=Ze.rotate(ft),st=ut.rotate(ft),It=new e.P(Math.max(Dt.x,Gt.x,st.x,Kt.x),Math.max(Dt.y,Gt.y,st.y,Kt.y)),Ut=new e.P(Math.min(Dt.x,Gt.x,st.x,Kt.x),Math.min(Dt.y,Gt.y,st.y,Kt.y)),ir=It.sub(Ut),dr=(fe.width-(be.left+be.right+y.left+y.right))/ir.x,Ar=(fe.height-(be.top+be.bottom+y.top+y.bottom))/ir.y;if(Ar<0||dr<0)return void Ao();let hr=Math.min(e.ar(fe.scale*Math.min(dr,Ar)),pe.maxZoom),vr=e.P.convert(pe.offset),Or=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Cr=vr.add(Or).mult(fe.scale/e.ao(hr));return{center:_r(fe.worldSize,Re.add(Ze).div(2).sub(Cr)),zoom:hr,bearing:ie}}class Wo{get useGlobeControls(){return!1}handlePanInertia(y,N){let ie=y.mag(),fe=Math.abs(Xt(N));return{easingOffset:y.mult(Math.min(.75*fe/ie,1)),easingCenter:N.center}}handleMapControlsRollPitchBearingZoom(y,N){y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta),y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta)}handleMapControlsPan(y,N,ie){y.around.distSqr(N.centerPoint)<.01||N.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,N,ie,fe,be){return jo(y,N,ie,fe,be)}handleJumpToCenterZoom(y,N){y.zoom!==(N.zoom!==void 0?+N.zoom:y.zoom)&&y.setZoom(+N.zoom),N.center!==void 0&&y.setCenter(e.W.convert(N.center))}handleEaseTo(y,N){let ie=y.zoom,fe=y.padding,be={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Re={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},je=N.zoom!==void 0,Ze=!y.isPaddingEqual(N.padding),ut=!1,ft=je?+N.zoom:y.zoom,Dt=y.centerPoint.add(N.offsetAsPoint),Gt=y.screenPointToLocation(Dt),{center:Kt,zoom:st}=y.applyConstrain(e.W.convert(N.center||Gt),ft??ie);Vn(y,Kt);let It=rr(y.worldSize,Gt),Ut=rr(y.worldSize,Kt).sub(It),ir=e.ao(st-ie);return ut=st!==ie,{easeFunc:dr=>{if(ut&&y.setZoom(e.H.number(ie,st,dr)),e.bn(be,Re)||ds({startEulerAngles:be,endEulerAngles:Re,tr:y,k:dr,useSlerp:be.roll!=Re.roll}),Ze&&(y.interpolatePadding(fe,N.padding,dr),Dt=y.centerPoint.add(N.offsetAsPoint)),N.around)y.setLocationAtPoint(N.around,N.aroundPoint);else{let Ar=e.ao(y.zoom-ie),hr=st>ie?Math.min(2,ir):Math.max(.5,ir),vr=Math.pow(hr,1-dr),Or=_r(y.worldSize,It.add(Ut.mult(dr*vr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?Or.wrap():Or,Dt)}},isZooming:ut,elevationCenter:Kt}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.zoom,be=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),ie?+N.zoom:fe),Re=be.center,je=be.zoom;Vn(y,Re);let Ze=rr(y.worldSize,N.locationAtOffset),ut=rr(y.worldSize,Re).sub(Ze),ft=ut.mag(),Dt=e.ao(je-fe),Gt;if(N.minZoom!==void 0){let Kt=Math.min(+N.minZoom,fe,je),st=y.applyConstrain(Re,Kt).zoom;Gt=e.ao(st-fe)}return{easeFunc:(Kt,st,It,Ut)=>{y.setZoom(Kt===1?je:fe+e.ar(st));let ir=Kt===1?Re:_r(y.worldSize,Ze.add(ut.mult(It)).mult(st));y.setLocationAtPoint(y.renderWorldCopies?ir.wrap():ir,Ut)},scaleOfZoom:Dt,targetCenter:Re,scaleOfMinZoom:Gt,pixelPathLength:ft}}}class to{constructor(y,N,ie){this.blendFunction=y,this.blendColor=N,this.mask=ie}}to.Replace=[1,0],to.disabled=new to(to.Replace,e.bo.transparent,[!1,!1,!1,!1]),to.unblended=new to(to.Replace,e.bo.transparent,[!0,!0,!0,!0]),to.alphaBlended=new to([1,771],e.bo.transparent,[!0,!0,!0,!0]);let wo=2305;class pi{constructor(y,N,ie){this.enable=y,this.mode=N,this.frontFace=ie}}pi.disabled=new pi(!1,1029,wo),pi.backCCW=new pi(!0,1029,wo),pi.frontCCW=new pi(!0,1028,wo);class Vi{constructor(y,N,ie){this.func=y,this.mask=N,this.range=ie}}Vi.ReadOnly=!1,Vi.ReadWrite=!0,Vi.disabled=new Vi(519,Vi.ReadOnly,[0,1]);let Io=7680;class Xi{constructor(y,N,ie,fe,be,Re){this.test=y,this.ref=N,this.mask=ie,this.fail=fe,this.depthFail=be,this.pass=Re}}function Ko(pe){return typeof WebGL2RenderingContext<"u"&&pe instanceof WebGL2RenderingContext}Xi.disabled=new Xi({func:519,mask:0},0,0,Io,Io,Io);class Uo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let N=y.context,ie=N.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let fe=new e.aU;fe.emplaceBack(-1,-1),fe.emplaceBack(2,-1),fe.emplaceBack(-1,2);let be=new e.aW;be.emplaceBack(0,1,2),this._fullscreenTriangle=new Xn(N.createVertexBuffer(fe,eo.members),N.createIndexBuffer(be),e.aV.simpleSegment(0,0,fe.length,be.length)),this._resultBuffer=new Uint8Array(4),N.activeTexture.set(ie.TEXTURE1);let Re=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,Re),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=N.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(Re),Ko(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,N){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,N),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,N=y.gl;y.activeTexture.set(N.TEXTURE1),N.bindTexture(N.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,N){let ie=this._cachedRenderContext.context,fe=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,fe.TRIANGLES,Vi.disabled,Xi.disabled,to.unblended,pi.disabled,((be,Re)=>({u_input:be,u_output_expected:Re}))(y,N),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ko(fe)){fe.bindBuffer(fe.PIXEL_PACK_BUFFER,this._pbo),fe.readBuffer(fe.COLOR_ATTACHMENT0),fe.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),fe.bindBuffer(fe.PIXEL_PACK_BUFFER,null);let be=fe.fenceSync(fe.SYNC_GPU_COMMANDS_COMPLETE,0);fe.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:be}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ko(y)){let N=y.clientWaitSync(this._readbackQueue.sync,0,0);if(N===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(N===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Uo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let N=0;return N+=y[0]/256,N+=y[1]/65536,N+=y[2]/16777216,y[3]<127&&(N=-N),N/128}}let Ls=e.a6/128;function Ss(pe,y){let N=pe.granularity!==void 0?Math.max(pe.granularity,1):1,ie=N+(pe.generateBorders?2:0),fe=N+(pe.extendToNorthPole||pe.generateBorders?1:0)+(pe.extendToSouthPole||pe.generateBorders?1:0),be=ie+1,Re=fe+1,je=pe.generateBorders?-1:0,Ze=pe.generateBorders||pe.extendToNorthPole?-1:0,ut=N+(pe.generateBorders?1:0),ft=N+(pe.generateBorders||pe.extendToSouthPole?1:0),Dt=be*Re,Gt=ie*fe*6,Kt=be*Re>65536;if(Kt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let st=Kt||y==="32bit",It=new Int16Array(2*Dt),Ut=0;for(let Ar=Ze;Ar<=ft;Ar++)for(let hr=je;hr<=ut;hr++){let vr=hr/N*e.a6;hr===-1&&(vr=-Ls),hr===N+1&&(vr=e.a6+Ls);let Or=Ar/N*e.a6;Ar===-1&&(Or=pe.extendToNorthPole?e.bq:-Ls),Ar===N+1&&(Or=pe.extendToSouthPole?e.br:e.a6+Ls),It[Ut++]=vr,It[Ut++]=Or}let ir=st?new Uint32Array(Gt):new Uint16Array(Gt),dr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,N,ie,fe,be){return this.currentProjection.getMeshFromTileID(y,N,ie,fe,be)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function _o(pe){let y=bs(pe.worldSize,pe.center.lat);return 2*Math.PI*y}function Pi(pe,y,N,ie,fe){let be=1/(1<1e-6){let ie=pe[0]/N,fe=Math.acos(pe[2]/N),be=(ie>0?fe:-fe)/Math.PI*180;return new e.W(e.X(be,-180,180),y)}return new e.W(0,y)}function hl(pe){return Math.cos(pe*Math.PI/180)}function ps(pe,y){let N=hl(pe),ie=hl(y);return e.ar(ie/N)}function dl(pe,y){let N=pe.rotate(y.bearingInRadians),ie=y.zoom+ps(y.center.lat,0),fe=e.bt(1/hl(y.center.lat),1/hl(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),be=360/_o({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-N.x*be*fe,e.al(y.center.lat+N.y*be,-e.am,e.am))}function wu(pe){let y=.5*pe,N=Math.sin(y),ie=Math.cos(y);return Math.log(N+ie)-Math.log(ie-N)}function lu(pe,y,N,ie){let fe=pe.lat+N*ie;if(Math.abs(N)>1){let be=(Math.sign(pe.lat+N)!==Math.sign(pe.lat)?-Math.abs(pe.lat):Math.abs(pe.lat))*Math.PI/180,Re=Math.abs(pe.lat+N)*Math.PI/180,je=wu(be+ie*(Re-be)),Ze=wu(be),ut=wu(Re);return new e.W(pe.lng+y*((je-Ze)/(ut-Ze)),fe)}return new e.W(pe.lng+y*ie,fe)}class xc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,N,ie,fe){let be=`${y.z}_${y.x}_${y.y}_${fe?.terrain?"t":""}`,Re=this._cache.get(be);if(Re)return Re;let je=this._cachePrevious.get(be);if(je)return this._cache.set(be,je),je;let Ze=this._boundingVolumeFactory(y,N,ie,fe);return this._cache.set(be,Ze),this._hadAnyChanges=!0,Ze}}class Fl{constructor(y,N,ie,fe){this.min=ie,this.max=fe,this.points=y,this.planes=N}static fromAabb(y,N){let ie=[];for(let fe=0;fe<8;fe++)ie.push([1&~fe?y[0]:N[0],(fe>>1&1)==1?N[1]:y[1],(fe>>2&1)==1?N[2]:y[2]]);return new Fl(ie,[[-1,0,0,N[0]],[1,0,0,-y[0]],[0,-1,0,N[1]],[0,1,0,-y[1]],[0,0,-1,N[2]],[0,0,1,-y[2]]],y,N)}static fromCenterSizeAngles(y,N,ie){let fe=e.bA([],ie[0],ie[1],ie[2]),be=e.bB([],[N[0],0,0],fe),Re=e.bB([],[0,N[1],0],fe),je=e.bB([],[0,0,N[2]],fe),Ze=[...y],ut=[...y];for(let Dt=0;Dt<8;Dt++)for(let Gt=0;Gt<3;Gt++){let Kt=y[Gt]+be[Gt]*(1&~Dt?-1:1)+Re[Gt]*((Dt>>1&1)==1?1:-1)+je[Gt]*((Dt>>2&1)==1?1:-1);Ze[Gt]=Math.min(Ze[Gt],Kt),ut[Gt]=Math.max(ut[Gt],Kt)}let ft=[];for(let Dt=0;Dt<8;Dt++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],be,1&~Dt?-1:1)),e.a_(Gt,Gt,e.aZ([],Re,(Dt>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],je,(Dt>>2&1)==1?1:-1)),ft.push(Gt)}return new Fl(ft,[[...be,-e.b3(be,ft[0])],[...Re,-e.b3(Re,ft[0])],[...je,-e.b3(je,ft[0])],[-be[0],-be[1],-be[2],-e.b3(be,ft[7])],[-Re[0],-Re[1],-Re[2],-e.b3(Re,ft[7])],[-je[0],-je[1],-je[2],-e.b3(je,ft[7])]],Ze,ut)}intersectsFrustum(y){let N=!0,ie=this.points.length,fe=this.planes.length,be=y.planes.length,Re=y.points.length;for(let je=0;je=0&&ut++}if(ut===0)return 0;ut=0&&ut++}if(ut===0)return 0}return 1}intersectsPlane(y){let N=this.points.length,ie=0;for(let fe=0;fe=0&&ie++}return ie===N?2:ie===0?0:1}}function pl(pe,y,N){let ie=pe-y;return ie<0?-ie:Math.max(0,ie-N)}function $u(pe,y,N,ie,fe){let be=pe-N,Re;return Re=be<0?Math.min(-be,1+be-fe):be>fe?Math.min(Math.max(be-fe,0),1-be):0,Math.max(Re,pl(y,ie,fe))}class uu{constructor(){this._boundingVolumeCache=new xc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,N,ie,fe){let be=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,N,ie,fe){return this._boundingVolumeCache.getTileBoundingVolume(y,N,ie,fe)}_computeTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ut=new e.a3(y.z,N,y.z,y.x,y.y),ft=fe.terrain.getMinMaxElevation(ut);je=(be=ft.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=ft.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}if(je/=e.bD,Ze/=e.bD,je+=1,Ze+=1,y.z<=0)return Fl.fromAabb([-Ze,-Ze,-Ze],[Ze,Ze,Ze]);if(y.z===1)return Fl.fromAabb([y.x===0?-Ze:0,y.y===0?0:-Ze,-Ze],[y.x===0?0:Ze,y.y===0?Ze:0,Ze]);{let ut=[Pi(0,0,y.x,y.y,y.z),Pi(e.a6,0,y.x,y.y,y.z),Pi(e.a6,e.a6,y.x,y.y,y.z),Pi(0,e.a6,y.x,y.y,y.z)],ft=[];for(let Ra of ut)ft.push(e.aZ([],Ra,Ze));if(Ze!==je)for(let Ra of ut)ft.push(e.aZ([],Ra,je));y.y===0&&ft.push([0,1,0]),y.y===(1<=(1<{let fe=e.al(N.lat,-e.am,e.am),be=e.al(+ie,this.minZoom+ps(0,fe),this.maxZoom);return{center:new e.W(N.lng,fe),zoom:be}},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new uu}clone(){let y=new vs;return y.apply(this,!1),y}apply(y,N,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,N)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:N,applyGlobeMatrix:ie}=y,fe=this._helper.getMercatorTileCoordinates(N);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:fe,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let N=this.pitchInRadians,ie=this.cameraToCenterDistance/y,fe=Math.sin(N)*ie,be=Math.cos(N)*ie+1,Re=1/Math.sqrt(fe*fe+be*be)*1,je=-fe,Ze=be,ut=Math.sqrt(je*je+Ze*Ze);je/=ut,Ze/=ut;let ft=[0,je,Ze];e.bF(ft,ft,[0,0,0],-this.bearingInRadians),e.bG(ft,ft,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ft,ft,[0,0,0],this.center.lng*Math.PI/180);let Dt=1/e.b5(ft);return e.aZ(ft,ft,Dt),[...ft,-Re*Dt]}isLocationOccluded(y){return!this.isSurfacePointVisible(yo(y))}transformLightDirection(y){let N=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,fe=Math.cos(ie),be=[Math.sin(N)*fe,Math.sin(ie),Math.cos(N)*fe],Re=[be[2],0,-be[0]],je=[0,0,0];e.b2(je,Re,be),e.b1(Re,Re),e.b1(je,je);let Ze=[0,0,0];return e.b1(Ze,[Re[0]*y[0]+je[0]*y[1]+be[0]*y[2],Re[1]*y[0]+je[1]*y[1]+be[1]*y[2],Re[2]*y[0]+je[2]*y[1]+be[2]*y[2]]),Ze}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,N,ie){let fe=function(je,Ze,ut){let ft=1/(1<be&&(be=Gt),Ktje&&(je=Kt)}let ft=[ut.lng+Re,ut.lat+Ze,ut.lng+be,ut.lat+je];return this.isSurfacePointOnScreen([0,1,0])&&(ft[3]=90,ft[0]=-180,ft[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ft[1]=-90,ft[0]=-180,ft[2]=180),new q(ft)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){let ie=yo(this.unprojectScreenPoint(N)),fe=yo(y),be=e.bz();e.bK(be);let Re=e.bz();e.bH(Re,ie,be,-this.center.lng*Math.PI/180),e.bG(Re,Re,be,this.center.lat*Math.PI/180);let je=fe[0]*fe[0]+fe[2]*fe[2],Ze=Re[0]*Re[0];if(je=-ir&&st<=ir,Ar=Ut>=-ir&&Ut<=ir,hr,vr;if(dr&&Ar){let ka=this.center.lng*Math.PI/180,Ta=this.center.lat*Math.PI/180;e.bM(Dt,ka)+e.bM(st,Ta)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let N=e.bE();return e.aE(N,[...y,1],this._globeViewProjMatrixNoCorrection),N[0]/=N[3],N[1]/=N[3],N[2]/=N[3],N[0]>-1&&N[0]<1&&N[1]>-1&&N[1]<1&&N[2]>-1&&N[2]<1}rayPlanetIntersection(y,N){let ie=e.b3(y,N),fe=e.bz(),be=e.bz();e.aZ(be,N,ie),e.b0(fe,y,be);let Re=1-e.b3(fe,fe);if(Re<0)return null;let je=e.b3(y,y)-1,Ze=-ie+(ie<0?1:-1)*Math.sqrt(Re),ut=je/Ze,ft=Ze;return{tMin:Math.min(ut,ft),tMax:Math.max(ut,ft)}}unprojectScreenPoint(y){let N=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),fe=this.rayPlanetIntersection(N,ie);if(fe){let ft=e.bz();e.a_(ft,N,[ie[0]*fe.tMin,ie[1]*fe.tMin,ie[2]*fe.tMin]);let Dt=e.bz();return e.b1(Dt,ft),Dl(Dt)}let be=this._cachedClippingPlane,Re=be[0]*ie[0]+be[1]*ie[1]+be[2]*ie[2],je=-e.b9(be,N)/Re,Ze=e.bz();if(je>0)e.a_(Ze,N,[ie[0]*je,ie[1]*je,ie[2]*je]);else{let ft=e.bz();e.a_(ft,N,[2*ie[0],2*ie[1],2*ie[2]]);let Dt=e.b9(this._cachedClippingPlane,ft);e.b0(Ze,ft,[this._cachedClippingPlane[0]*Dt,this._cachedClippingPlane[1]*Dt,this._cachedClippingPlane[2]*Dt])}let ut=function(ft){let Dt=e.bz();return Dt[0]=ft[0]*-ft[3],Dt[1]=ft[1]*-ft[3],Dt[2]=ft[2]*-ft[3],{center:Dt,radius:Math.sqrt(1-ft[3]*ft[3])}}(be);return Dl(function(ft,Dt,Gt){let Kt=e.bz();e.b0(Kt,Gt,ft);let st=e.bz();return e.bx(st,ft,Kt,Dt/e.b7(Kt)),st}(ut.center,ut.radius,Ze))}getMatrixForModel(y,N){let ie=e.W.convert(y),fe=1/e.bD,be=e.bi();return e.bI(be,be,ie.lng/180*Math.PI),e.bf(be,be,-ie.lat/180*Math.PI),e.Q(be,be,[0,0,1+N/e.bD]),e.bf(be,be,.5*Math.PI),e.S(be,be,[fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return N.tileMercatorCoords=[0,0,1,1],N}getFastPathSimpleProjectionMatrix(y){}}class os{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,N){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=N,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(N,ie)=>this.currentTransform.defaultConstrain(N,ie),this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._globeness=1,this._mercatorTransform=new Eo,this._verticalPerspectiveTransform=new vs}clone(){let y=new os;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,N){this._helper.apply(y,N),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let N=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:N.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:N.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,N,ie){let fe=this._mercatorTransform.getPitchedTextCorrection(y,N,ie),be=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,N,ie);return e.bt(fe,be,this._globeness)}projectTileCoordinates(y,N,ie,fe){return this.currentTransform.projectTileCoordinates(y,N,ie,fe)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,N){return this.currentTransform.lngLatToCameraDepth(y,N)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,N),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,N),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,N){return this.currentTransform.locationToScreenPoint(y,N)}screenPointToMercatorCoordinate(y,N){return this.currentTransform.screenPointToMercatorCoordinate(y,N)}screenPointToLocation(y,N){return this.currentTransform.screenPointToLocation(y,N)}isPointOnMapSurface(y,N){return this.currentTransform.isPointOnMapSurface(y,N)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,N){return this.currentTransform.getMatrixForModel(y,N)}getProjectionDataForCustomLayer(y=!0){let N=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return N;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=N.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class ms{get useGlobeControls(){return!0}handlePanInertia(y,N){let ie=dl(y,N);return Math.abs(ie.lng-N.center.lng)>180&&(ie.lng=N.center.lng+179.5*Math.sign(ie.lng-N.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,N){let ie=y.around,fe=N.screenPointToLocation(ie);y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta);let be=N.zoom;y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta);let Re=N.zoom-be;if(Re===0)return;let je=e.bJ(N.center.lng,fe.lng),Ze=je/(Math.abs(je/180)+1),ut=e.bJ(N.center.lat,fe.lat),ft=N.getRayDirectionFromPixel(ie),Dt=N.cameraPosition,Gt=-1*e.b3(Dt,ft),Kt=e.bz();e.a_(Kt,Dt,[ft[0]*Gt,ft[1]*Gt,ft[2]*Gt]);let st=e.b5(Kt)-1,It=Math.exp(.5*-Math.max(st-.3,0)),Ut=bs(N.worldSize,N.center.lat)/Math.min(N.width,N.height),ir=e.bw(Ut,.9,.5,1,.25),dr=(1-e.ao(-Re))*Math.min(It,ir),Ar=N.center.lat,hr=N.zoom,vr=new e.W(N.center.lng+Ze*dr,e.al(N.center.lat+ut*dr,-e.am,e.am));N.setLocationAtPoint(fe,ie);let Or=N.center,Cr=e.bw(Math.abs(je),45,85,0,1),ta=e.bw(Ut,.75,.35,0,1),ka=Math.pow(Math.max(Cr,ta),.25),Ta=e.bJ(Or.lng,vr.lng),Ra=e.bJ(Or.lat,vr.lat);N.setCenter(new e.W(Or.lng+Ta*ka,Or.lat+Ra*ka).wrap()),N.setZoom(hr+ps(Ar,N.center.lat))}handleMapControlsPan(y,N,ie){if(!y.panDelta)return;let fe=N.center.lat,be=N.zoom;N.setCenter(dl(y.panDelta,N).wrap()),N.setZoom(be+ps(fe,N.center.lat))}cameraForBoxAndBearing(y,N,ie,fe,be){let Re=jo(y,N,ie,fe,be),je=N.left/be.width*2-1,Ze=(be.width-N.right)/be.width*2-1,ut=N.top/be.height*-2+1,ft=(be.height-N.bottom)/be.height*-2+1,Dt=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Dt?ie.getEast():ie.getWest(),Kt=Dt?ie.getWest():ie.getEast(),st=Math.max(ie.getNorth(),ie.getSouth()),It=Math.min(ie.getNorth(),ie.getSouth()),Ut=Gt+.5*e.bJ(Gt,Kt),ir=st+.5*e.bJ(st,It),dr=be.clone();dr.setCenter(Re.center),dr.setBearing(Re.bearing),dr.setPitch(0),dr.setRoll(0),dr.setZoom(Re.zoom);let Ar=dr.modelViewProjectionMatrix,hr=[yo(ie.getNorthWest()),yo(ie.getNorthEast()),yo(ie.getSouthWest()),yo(ie.getSouthEast()),yo(new e.W(Kt,ir)),yo(new e.W(Gt,ir)),yo(new e.W(Ut,st)),yo(new e.W(Ut,It))],vr=yo(Re.center),Or=Number.POSITIVE_INFINITY;for(let Cr of hr)je<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",je))),Ze>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",Ze))),ut>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ut))),ft<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ft)));if(Number.isFinite(Or)&&Or!==0)return Re.zoom=Math.min(dr.zoom+e.ar(Or),y.maxZoom),Re;Ao()}handleJumpToCenterZoom(y,N){let ie=y.center.lat,fe=y.applyConstrain(N.center?e.W.convert(N.center):y.center,y.zoom).center;y.setCenter(fe.wrap());let be=N.zoom!==void 0?+N.zoom:y.zoom+ps(ie,fe.lat);y.zoom!==be&&y.setZoom(be)}handleEaseTo(y,N){let ie=y.zoom,fe=y.center,be=y.padding,Re={roll:y.roll,pitch:y.pitch,bearing:y.bearing},je={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},Ze=N.zoom!==void 0,ut=!y.isPaddingEqual(N.padding),ft=!1,Dt=N.center?e.W.convert(N.center):fe,Gt=y.applyConstrain(Dt,ie).center;Vn(y,Gt);let Kt=y.clone();Kt.setCenter(Gt),Kt.setZoom(Ze?+N.zoom:ie+ps(fe.lat,Dt.lat)),Kt.setBearing(N.bearing);let st=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));Kt.setLocationAtPoint(Gt,st);let It=(N.offset&&N.offsetAsPoint.mag())>0?Kt.center:Gt,Ut=Ze?+N.zoom:ie+ps(fe.lat,It.lat),ir=ie+ps(fe.lat,0),dr=Ut+ps(It.lat,0),Ar=e.bJ(fe.lng,It.lng),hr=e.bJ(fe.lat,It.lat),vr=e.ao(dr-ir);return ft=Ut!==ie,{easeFunc:Or=>{if(e.bn(Re,je)||ds({startEulerAngles:Re,endEulerAngles:je,tr:y,k:Or,useSlerp:Re.roll!=je.roll}),ut&&y.interpolatePadding(be,N.padding,Or),N.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(N.around,N.aroundPoint);else{let Cr=dr>ir?Math.min(2,vr):Math.max(.5,vr),ta=Math.pow(Cr,1-Or),ka=lu(fe,Ar,hr,Or*ta);y.setCenter(ka.wrap())}if(ft){let Cr=e.H.number(ir,dr,Or)+ps(0,y.center.lat);y.setZoom(Cr)}},isZooming:ft,elevationCenter:It}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.center,be=y.zoom,Re=y.padding,je=!y.isPaddingEqual(N.padding),Ze=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),be).center,ut=ie?+N.zoom:y.zoom+ps(y.center.lat,Ze.lat),ft=y.clone();ft.setCenter(Ze),ft.setZoom(ut),ft.setBearing(N.bearing);let Dt=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));ft.setLocationAtPoint(Ze,Dt);let Gt=ft.center;Vn(y,Gt);let Kt=function(hr,vr,Or){let Cr=yo(vr),ta=yo(Or),ka=e.b3(Cr,ta),Ta=Math.acos(ka),Ra=_o(hr);return Ta/(2*Math.PI)*Ra}(y,fe,Gt),st=be+ps(fe.lat,0),It=ut+ps(Gt.lat,0),Ut=e.ao(It-st),ir;if(typeof N.minZoom=="number"){let hr=+N.minZoom+ps(Gt.lat,0),vr=Math.min(hr,st,It)+ps(0,Gt.lat),Or=y.applyConstrain(Gt,vr).zoom+ps(Gt.lat,0);ir=e.ao(Or-st)}let dr=e.bJ(fe.lng,Gt.lng),Ar=e.bJ(fe.lat,Gt.lat);return{easeFunc:(hr,vr,Or,Cr)=>{let ta=lu(fe,dr,Ar,Or);je&&y.interpolatePadding(Re,N.padding,hr);let ka=hr===1?Gt:ta;y.setCenter(ka.wrap());let Ta=st+e.ar(vr);y.setZoom(hr===1?ut:Ta+ps(0,ka.lat))},scaleOfZoom:Ut,targetCenter:Gt,scaleOfMinZoom:ir,pixelPathLength:Kt}}static solveVectorScale(y,N,ie,fe,be){let Re=fe==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],je=[ie[3],ie[7],ie[11],ie[15]],Ze=y[0]*Re[0]+y[1]*Re[1]+y[2]*Re[2],ut=y[0]*je[0]+y[1]*je[1]+y[2]*je[2],ft=N[0]*Re[0]+N[1]*Re[1]+N[2]*Re[2],Dt=N[0]*je[0]+N[1]*je[1]+N[2]*je[2];return ft+be*ut===Ze+be*Dt||je[3]*(Ze-ft)+Re[3]*(Dt-ut)+Ze*Dt==ft*ut?null:(ft+Re[3]-be*Dt-be*je[3])/(ft-Ze-be*Dt+be*ut)}static getLesserNonNegativeNonNull(y,N){return N!==null&&N>=0&&Ne.C(pe,y?.filter(N=>N.identifier!=="source.canvas")),zu=e.bN();class Ku extends e.E{constructor(y,N={}){var ie,fe;super(),this._rtlPluginLoaded=()=>{for(let Re in this.tileManagers){let je=this.tileManagers[Re].getSource().type;je!=="vector"&&je!=="geojson"||this.tileManagers[Re].reload()}},this.map=y,this.dispatcher=new ne(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,je)=>this.getGlyphs(Re,je)),this.dispatcher.registerMessageHandler("GI",(Re,je)=>this.getImages(Re,je)),this.dispatcher.registerMessageHandler("GDA",(Re,je)=>this.getDashes(Re,je)),this.imageManager=new C,this.imageManager.setEventedParent(this);let be=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((fe=document.documentElement)===null||fe===void 0?void 0:fe.lang)||void 0;this.glyphManager=new x(y._requestManager,N.localIdeographFontFamily,be),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new Di,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ye().on(Ae,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;let je=this.tileManagers[Re.sourceId];if(!je)return;let Ze=je.getSource();if(Ze?.vectorLayerIds)for(let ut in this._layers){let ft=this._layers[ut];ft.source===Ze.id&&this._validateLayer(ft)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,N){var ie,fe,be;this._checkLoaded();let Re=N===null?(be=(fe=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||fe===void 0?void 0:fe.default)!==null&&be!==void 0?be:null:N;if(e.bQ(Re,this._globalState[y]))return this;this._globalState[y]=Re,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let N=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(N.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(N)}_applyGlobalStateChanges(y){if(y.length===0)return;let N=new Set,ie={};for(let fe of y){ie[fe]=this._globalState[fe];for(let be in this._layers){let Re=this._layers[be],je=Re.getLayoutAffectingGlobalStateRefs(),Ze=Re.getPaintAffectingGlobalStateRefs(),ut=Re.getVisibilityAffectingGlobalStateRefs();if(je.has(fe)&&N.add(Re.source),Ze.has(fe))for(let{name:ft,value:Dt}of Ze.get(fe))this._updatePaintProperty(Re,ft,Dt);ut?.has(fe)&&(Re.recalculateVisibility(),this._updateLayer(Re))}}this.dispatcher.broadcast("UGS",ie);for(let fe in this.tileManagers)N.has(fe)&&(this._reloadSource(fe),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(N,ie={},fe){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let be=this._loadStyleRequest;try{let Re=yield this.map._requestManager.transformRequest(N,"Style");e.bR(be.signal);let je=yield e.k(Re,be);this._loadStyleRequest===be&&(this._loadStyleRequest=null),this._load(je.data,ie,fe)}catch(Re){this._loadStyleRequest===be&&(this._loadStyleRequest=null),Re&&!be.signal.aborted&&this.fire(new e.l(e.d(Re)))}})}loadJSON(y,N={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,N.validate=N.validate!==!1,this._load(y,N,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(zu,{validate:!1})}_load(y,N,ie){var fe,be;let Re=N.transformStyle?N.transformStyle(ie,y):y;if(!N.validate||!Fu(this,e.F(Re))){Re=Object.assign({},Re),this._loaded=!0,this.stylesheet=Re;for(let je in Re.sources)this.addSource(je,Re.sources[je],{validate:!1});Re.sprite?this._loadSprite(Re.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Re.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this._setProjectionInternal(((fe=this.stylesheet.projection)===null||fe===void 0?void 0:fe.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((be=this.stylesheet.terrain)!==null&&be!==void 0?be:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,N,ie;let fe=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",fe),this._order=fe.map(be=>be.id),this._layers={},this._serializedLayers=null;for(let be of fe){let Re=e.bT(be,this._globalState);if(Re.setEventedParent(this,{layer:{id:be.id}}),this._layers[be.id]=Re,e.bU(Re)&&this.tileManagers[Re.source]){let je=(ie=(N=be.paint)===null||N===void 0?void 0:N["raster-fade-duration"])!==null&&ie!==void 0?ie:Re.paint.get("raster-fade-duration");this.tileManagers[Re.source].setRasterFadeDuration(je)}}}_loadSprite(y,N=!1,ie=void 0){this.imageManager.setLoaded(!1);let fe=new AbortController,be;this._spriteRequest=fe,function(Re,je,Ze,ut){return e._(this,void 0,void 0,function*(){let ft=w(Re),Dt=Ze>1?"@2x":"",Gt={},Kt={};for(let{id:st,url:It}of ft){let Ut=yield je.transformRequest(S(It,Dt,".json"),"SpriteJSON");Gt[st]=e.k(Ut,ut);let ir=yield je.transformRequest(S(It,Dt,".png"),"SpriteImage");Kt[st]=v.getImage(ir,ut)}return yield Promise.all([...Object.values(Gt),...Object.values(Kt)]),function(st,It){return e._(this,void 0,void 0,function*(){let Ut={};for(let ir in st){Ut[ir]={};let dr=s.getImageCanvasContext((yield It[ir]).data),Ar=(yield st[ir]).data;for(let hr in Ar){let{width:vr,height:Or,x:Cr,y:ta,sdf:ka,pixelRatio:Ta,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ga,textFitHeight:da}=Ar[hr];Ut[ir][hr]={data:null,pixelRatio:Ta,sdf:ka,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ga,textFitHeight:da,spriteData:{width:vr,height:Or,x:Cr,y:ta,context:dr}}}}return Ut})}(Gt,Kt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Re=>{if(this._spriteRequest=null,Re)for(let je in Re){this._spritesImagesIds[je]=[];let Ze=this._spritesImagesIds[je]?this._spritesImagesIds[je].filter(ut=>!(ut in Re)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in Re[je]){let ft=je==="default"?ut:`${je}:${ut}`;this._spritesImagesIds[je].push(ft),ft in this.imageManager.images?this.imageManager.updateImage(ft,Re[je][ut],!1):this.imageManager.addImage(ft,Re[je][ut]),N&&(this._changedImages[ft]=!0)}}}).catch(Re=>{this._spriteRequest=null,be=Re,fe.signal.aborted||this.fire(new e.l(be))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),N&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(be)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let N=this.tileManagers[y.source];if(!N)return;let ie=y.sourceLayer;if(!ie)return;let fe=N.getSource();(fe.type==="geojson"||fe.vectorLayerIds&&!fe.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${fe.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,N=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(N?e.bV(ie):ie);let fe=[];for(let be of y)if(ie[be]){let Re=N?e.bV(ie[be]):ie[be];fe.push(Re)}return fe}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let N=Object.keys(this._layers);for(let ie of N){let fe=this._layers[ie];fe.type!=="custom"&&(y[ie]=fe.serialize())}return y}hasTransitions(){var y,N,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((N=this.sky)===null||N===void 0)&&N.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let fe in this.tileManagers)if(this.tileManagers[fe].hasTransition())return!0;for(let fe in this._layers)if(this._layers[fe].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let N=this._changed;if(N){let fe=Object.keys(this._updatedLayers),be=Object.keys(this._removedLayers);(fe.length||be.length)&&this._updateWorkerLayers(fe,be);for(let Re in this._updatedSources){let je=this._updatedSources[Re];if(je==="reload")this._reloadSource(Re);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);this._clearSource(Re)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Re in this._updatedPaintProps)this._layers[Re].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let fe in this.tileManagers){let be=this.tileManagers[fe];ie[fe]=be.used,be.used=!1}for(let fe of this._order){let be=this._layers[fe];be.recalculate(y,this._availableImages),!be.isHidden(y.zoom)&&be.source&&(this.tileManagers[be.source].used=!0)}for(let fe in ie){let be=this.tileManagers[fe];!!ie[fe]!=!!be.used&&be.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:fe}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,N&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let N in this.tileManagers)this.tileManagers[N].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,N){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:N})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,N={}){var ie;this._checkLoaded();let fe=this.serialize();if(y=N.transformStyle?N.transformStyle(fe,y):y,((ie=N.validate)===null||ie===void 0||ie)&&Fu(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let be=e.bW(fe,y),Re=this._getOperationsToPerform(be);if(Re.unimplemented.length>0)throw new Error(`Unimplemented: ${Re.unimplemented.join(", ")}.`);if(Re.operations.length===0)return!1;for(let je of Re.operations)je();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let N=[],ie=[];for(let fe of y)switch(fe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":N.push(()=>this.addLayer.apply(this,fe.args));break;case"removeLayer":N.push(()=>this.removeLayer.apply(this,fe.args));break;case"setPaintProperty":N.push(()=>this.setPaintProperty.apply(this,fe.args));break;case"setLayoutProperty":N.push(()=>this.setLayoutProperty.apply(this,fe.args));break;case"setFilter":N.push(()=>this.setFilter.apply(this,fe.args));break;case"addSource":N.push(()=>this.addSource.apply(this,fe.args));break;case"removeSource":N.push(()=>this.removeSource.apply(this,fe.args));break;case"setLayerZoomRange":N.push(()=>this.setLayerZoomRange.apply(this,fe.args));break;case"setLight":N.push(()=>this.setLight.apply(this,fe.args));break;case"setGeoJSONSourceData":N.push(()=>this.setGeoJSONSourceData.apply(this,fe.args));break;case"setGlyphs":N.push(()=>this.setGlyphs.apply(this,fe.args));break;case"setSprite":N.push(()=>this.setSprite.apply(this,fe.args));break;case"setTerrain":N.push(()=>this.map.setTerrain.apply(this,fe.args));break;case"setSky":N.push(()=>this.setSky.apply(this,fe.args));break;case"setProjection":this.setProjection.apply(this,fe.args);break;case"setGlobalState":N.push(()=>this.setGlobalState.apply(this,fe.args));break;case"setTransition":N.push(()=>{});break;default:ie.push(fe.command)}return{operations:N,unimplemented:ie}}addImage(y,N){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,N),this._afterImageUpdated(y)}updateImage(y,N){this.imageManager.updateImage(y,N)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,N,ie={}){var fe;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!N.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(N).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(N.type)&&this._validate(e.F.source,`sources.${y}`,N,null,ie))return;!((fe=this.map)===null||fe===void 0)&&fe._collectResourceTiming&&(N.collectResourceTiming=!0);let be=this.tileManagers[y]=new Sr(y,N,this.dispatcher);be.style=this,be.setEventedParent(this,()=>({isSourceLoaded:be.loaded(),source:be.serialize(),sourceId:y})),be.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let N=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],N.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),N.setEventedParent(null),N.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,N){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(N),this._changed=!0}getSource(y){var N;return(N=this.tileManagers[y])===null||N===void 0?void 0:N.getSource()}addLayer(y,N,ie={}){this._checkLoaded();let fe=y.id;if(this.getLayer(fe))return void this.fire(new e.l(new Error(`Layer "${fe}" already exists on this map.`)));let be;if(y.type==="custom"){if(Fu(this,e.bX(y)))return;be=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(fe,y.source),y=e.bV(y),y=e.e(y,{source:fe})),this._validate(e.F.layer,`layers.${fe}`,y,{arrayIndex:-1},ie))return;be=e.bT(y,this._globalState),this._validateLayer(be),be.setEventedParent(this,{layer:{id:fe}})}let Re=N?this._order.indexOf(N):this._order.length;if(N&&Re===-1)this.fire(new e.l(new Error(`Cannot add layer "${fe}" before non-existing layer "${N}".`)));else{if(this._order.splice(Re,0,fe),this._layerOrderChanged=!0,this._layers[fe]=be,this._removedLayers[fe]&&be.source&&be.type!=="custom"){let je=this._removedLayers[fe];delete this._removedLayers[fe],je.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.tileManagers[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)}}moveLayer(y,N){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===N)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let fe=N?this._order.indexOf(N):this._order.length;N&&fe===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${N}".`))):(this._order.splice(fe,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let N=this._layers[y];if(!N)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));N.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=N,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],N.onRemove&&N.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,N,ie){this._checkLoaded();let fe=this.getLayer(y);fe?fe.minzoom===N&&fe.maxzoom===ie||(N!=null&&(fe.minzoom=N),ie!=null&&(fe.maxzoom=ie),this._updateLayer(fe)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,N,ie={}){this._checkLoaded();let fe=this.getLayer(y);if(fe){if(!e.bQ(fe.filter,N))return N==null?(fe.setFilter(void 0),void this._updateLayer(fe)):void(this._validate(e.F.filter,`layers.${fe.id}.filter`,N,null,ie)||(fe.setFilter(e.bV(N)),this._updateLayer(fe)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getLayoutProperty(N),ie)||(be.setLayoutProperty(N,ie,fe),this._updateLayer(be)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,N){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(N);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getPaintProperty(N),ie)||this._updatePaintProperty(be,N,ie,fe):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,N,ie,fe={}){y.setPaintProperty(N,ie,fe)&&this._updateLayer(y),e.bU(y)&&N==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,N){return this.getLayer(y).getPaintProperty(N)}setFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=y.sourceLayer,be=this.tileManagers[ie];if(be===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let Re=be.getSource().type;Re==="geojson"&&fe?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Re!=="vector"||fe?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),be.setFeatureState(fe,y.id,N)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=this.tileManagers[ie];if(fe===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let be=fe.getSource().type,Re=be==="vector"?y.sourceLayer:void 0;be!=="vector"||Re?N&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):fe.removeFeatureState(Re,y.id,N):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let N=y.source,ie=y.sourceLayer,fe=this.tileManagers[N];if(fe!==void 0)return fe.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),fe.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${N}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,be=>be.serialize()),N=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,fe=this.stylesheet;return e.bZ({version:fe.version,name:fe.name,metadata:fe.metadata,light:fe.light,sky:fe.sky,center:fe.center,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,sprite:fe.sprite,glyphs:fe.glyphs,transition:fe.transition,projection:fe.projection,sources:y,layers:N,terrain:ie},be=>be!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let N=Re=>this._layers[Re].type==="fill-extrusion",ie={},fe=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je)){ie[je]=Re;for(let Ze of y){let ut=Ze[je];if(ut)for(let ft of ut)fe.push(ft)}}}fe.sort((Re,je)=>je.intersectionZ-Re.intersectionZ);let be=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je))for(let Ze=fe.length-1;Ze>=0;Ze--){let ut=fe[Ze].feature;if(ie[ut.layer.id]this.map.terrain.getElevation(ft,Dt,Gt):void 0));return this.placement&&be.push(function(ut,ft,Dt,Gt,Kt,st,It){let Ut={},ir=st.queryRenderedSymbols(Gt),dr=[];for(let Ar of Object.keys(ir).map(Number))dr.push(It[Ar]);dr.sort(K);for(let Ar of dr){let hr=Ar.featureIndex.lookupSymbolFeatures(ir[Ar.bucketInstanceId],ft,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Kt.filter,globalState:Kt.globalState},Kt.layers,Kt.availableImages,ut);for(let vr in hr){Ut[vr]||(Ut[vr]=[]);let Or=hr[vr];Or.sort((Cr,ta)=>{let ka=Ar.featureSortOrder;if(ka){let Ta=ka.indexOf(Cr.featureIndex);return ka.indexOf(ta.featureIndex)-Ta}return ta.featureIndex-Cr.featureIndex});for(let Cr of Or)Ut[vr].push(Cr)}}return function(Ar,hr,vr){for(let Or in Ar)for(let Cr of Ar[Or])H(Cr,vr[hr[Or].source]);return Ar}(Ut,ut,Dt)}(this._layers,Re,this.tileManagers,y,Ze,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(be)}querySourceFeatures(y,N){N?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",N.filter,null,N);let ie=this.tileManagers[y];return ie?function(fe,be){let Re=fe.getRenderableIds().map(ut=>fe.getTileByID(ut)),je=[],Ze={};for(let ut of Re){let ft=ut.tileID.canonical.key;Ze[ft]||(Ze[ft]=!0,ut.querySourceFeatures(je,be))}return je}(ie,N?Object.assign(Object.assign({},N),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,N={}){this._checkLoaded();let ie=this.light.getLight(),fe=!1;for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,N),this.light.updateTransitions(be)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let N=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===N.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(N.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,N={}){this._checkLoaded();let ie=this.getSky(),fe=!1;if(!y&&!ie)return;if(y&&!ie)fe=!0;else if(!y&&ie)fe=!0;else for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,N),this.sky.updateTransitions(be)}_setProjectionInternal(y){let N=function(ie,fe){let be={constrainOverride:fe};if(Array.isArray(ie)){let Re=new Bo({type:ie});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}switch(ie){case"mercator":return{projection:new io,transform:new Eo(be),cameraHelper:new Wo};case"globe":{let Re=new Bo({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}case"vertical-perspective":return{projection:new Vs,transform:new vs(be),cameraHelper:new ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new io,transform:new Eo(be),cameraHelper:new Wo}}}(y,this.map.transformConstrain);this.projection=N.projection,this.map.migrateProjection(N.transform,N.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,N,ie,fe,be={}){return be?.validate!==!1&&Fu(this,y.call(e.F,e.e({key:N,style:this.serialize(),value:ie,styleSpec:e.x},fe)))}_remove(y=!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),Ye().off(Ae,this._rtlPluginLoaded);for(let N in this._layers)this._layers[N].setEventedParent(null);for(let N in this.tileManagers){let ie=this.tileManagers[N];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let N in this.tileManagers)this.tileManagers[N].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,N,ie,fe,be=!1){let Re=!1,je=!1,Ze={};for(let ut of this._order){let ft=this._layers[ut];if(ft.type!=="symbol")continue;if(!Ze[ft.source]){let Gt=this.tileManagers[ft.source];Ze[ft.source]=Gt.getRenderableIds(!0).map(Kt=>Gt.getTileByID(Kt)).sort((Kt,st)=>st.tileID.overscaledZ-Kt.tileID.overscaledZ||(Kt.tileID.isLessThan(st.tileID)?-1:1))}let Dt=this.crossTileSymbolIndex.addLayer(ft,Ze[ft.source],y.center.lng);Re||(Re=Dt)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),be||(be=this._layerOrderChanged||ie===0),(be||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(m(),y.zoom))&&(this.pauseablePlacement=new ai(y,this.map.terrain,this._order,be,N,ie,fe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ze),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(m()),je=!0),Re&&this.pauseablePlacement.placement.setStale()),je||Re)for(let ut of this._order){let ft=this._layers[ut];ft.type==="symbol"&&this.placement.updateLayerOpacities(ft,Ze[ft.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(m())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(N.icons);this._updateTilesForChangedImages();let fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,N.icons),ie})}getGlyphs(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(N.stacks),fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,N={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,N)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,N){return e._(this,void 0,void 0,function*(){let ie={};for(let[fe,be]of Object.entries(N.dashes))ie[fe]=this.lineAtlas.getDash(be.dasharray,be.round);return ie})}addSprite(y,N,ie={},fe){this._checkLoaded();let be=[{id:y,url:N}],Re=[...w(this.stylesheet.sprite),...be];this._validate(e.F.sprite,"sprite",Re,null,ie)||(this.stylesheet.sprite=Re,this._loadSprite(be,!0,fe))}removeSprite(y){this._checkLoaded();let N=w(this.stylesheet.sprite);if(N.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;N.splice(N.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=N.length>0?N:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(y,N={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,N)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let N=this.tileManagers[y];N.setEventedParent(null),N.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let N=this._layers[y];N.setEventedParent(null),N.onRemove&&N.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var bc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Lh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,N,ie,fe,be,Re,je,Ze,ut){this.context=y;let ft=this.boundPaintVertexBuffers.length!==fe.length;for(let Dt=0;!ft&&Dt({u_texture:0,u_ele_delta:pe,u_fog_matrix:y,u_fog_color:N?N.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:N?N.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fe?0:N?N.calculateFogBlendOpacity(ie):0,u_horizon_color:N?N.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:N?N.properties.get("horizon-fog-blend"):1,u_is_globe_mode:fe?1:0}),Ju={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ss(pe){let y=[];for(let N of pe){if(N===null)continue;let ie=N.split(" ");y.push(ie.pop())}return y}class ah{constructor(y,N,ie,fe,be,Re,je,Ze,ut=[]){let ft=y.gl;this.program=ft.createProgram();let Dt=ss(N.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Kt=Dt.concat(Gt),st=Ai.prelude.staticUniforms?ss(Ai.prelude.staticUniforms):[],It=je.staticUniforms?ss(je.staticUniforms):[],Ut=N.staticUniforms?ss(N.staticUniforms):[],ir=ie?ie.getBinderUniforms():[],dr=st.concat(It).concat(Ut).concat(ir),Ar=[];for(let Ta of dr)Ar.includes(Ta)||Ar.push(Ta);let hr=ie?ie.defines():[];Ko(ft)&&hr.unshift("#version 300 es"),be&&hr.push("#define OVERDRAW_INSPECTOR;"),Re&&hr.push("#define TERRAIN3D;"),Ze&&hr.push(Ze),ut&&hr.push(...ut);let vr=hr.concat(Ai.prelude.fragmentSource,je.fragmentSource,N.fragmentSource).join(` `),Or=hr.concat(Ai.prelude.vertexSource,je.vertexSource,N.vertexSource).join(` -`);Ko(ft)||(vr=function(Ta){return Ta.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(vr),Or=function(Ta){return Ta.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Or));let Cr=ft.createShader(ft.FRAGMENT_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(Cr,vr),ft.compileShader(Cr),!ft.getShaderParameter(Cr,ft.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ft.getShaderInfoLog(Cr)}`);ft.attachShader(this.program,Cr);let ta=ft.createShader(ft.VERTEX_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(ta,Or),ft.compileShader(ta),!ft.getShaderParameter(ta,ft.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ft.getShaderInfoLog(ta)}`);ft.attachShader(this.program,ta),this.attributes={};let ka={};this.numAttributes=Kt.length;for(let Ta=0;Ta({u_depth:new e.b_(Ta,Ra.u_depth),u_terrain:new e.b_(Ta,Ra.u_terrain),u_terrain_dim:new e.bp(Ta,Ra.u_terrain_dim),u_terrain_matrix:new e.c0(Ta,Ra.u_terrain_matrix),u_terrain_unpack:new e.c1(Ta,Ra.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Ta,Ra.u_terrain_exaggeration)}))(y,ka),this.projectionUniforms=((Ta,Ra)=>({u_projection_matrix:new e.c0(Ta,Ra.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Ta,Ra.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Ta,Ra.u_projection_clipping_plane),u_projection_transition:new e.bp(Ta,Ra.u_projection_transition),u_projection_fallback_matrix:new e.c0(Ta,Ra.u_projection_fallback_matrix)}))(y,ka),this.binderUniforms=ie?ie.getUniforms(y,ka):[]}draw(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar){var hr;let vr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(fe),y.setColorMode(be),y.setCullFace(Re),Ze){y.activeTexture.set(vr.TEXTURE2),vr.bindTexture(vr.TEXTURE_2D,Ze.depthTexture),y.activeTexture.set(vr.TEXTURE3),vr.bindTexture(vr.TEXTURE_2D,Ze.texture);for(let Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(Ze[Cr])}if(ut)for(let Cr in ut)this.projectionUniforms[Ju[Cr]].set(ut[Cr]);if(je)for(let Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(je[Cr]);Ut&&Ut.setUniforms(y,this.binderUniforms,st,{zoom:It});let Or=0;switch(N){case vr.LINES:Or=2;break;case vr.TRIANGLES:Or=3;break;case vr.LINE_STRIP:Or=1}for(let Cr of Kt.get())Cr.vaos||(Cr.vaos={}),(hr=Cr.vaos)[ft]||(hr[ft]=new Lh),Cr.vaos[ft].bind(y,this,Dt,Ut?Ut.getPaintVertexBuffers():[],Gt,Cr.vertexOffset,ir,dr,Ar),vr.drawElements(N,Cr.primitiveLength*Or,vr.UNSIGNED_SHORT,Cr.primitiveOffset*Or*2)}}function wc(pe,y,N){let ie=1/e.aK(N,1,y.transform.tileZoom),fe=Math.pow(2,N.tileID.overscaledZ),be=N.tileSize*Math.pow(2,y.transform.tileZoom)/fe,Re=be*(N.tileID.canonical.x+N.tileID.wrap*fe),je=be*N.tileID.canonical.y;return{u_image:0,u_texsize:N.imageAtlasTexture.size,u_scale:[ie,pe.fromScale,pe.toScale],u_fade:pe.t,u_pixel_coord_upper:[Re>>16,je>>16],u_pixel_coord_lower:[65535&Re,65535&je]}}let pc=(pe,y,N,ie)=>{let fe=pe.style.light,be=fe.properties.get("position"),Re=[be.x,be.y,be.z],je=e.c4();fe.properties.get("anchor")==="viewport"&&e.c5(je,pe.transform.bearingInRadians),e.c6(Re,Re,je);let Ze=pe.transform.transformLightDirection(Re),ut=fe.properties.get("color");return{u_lightpos:Re,u_lightpos_globe:Ze,u_lightintensity:fe.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+y,u_opacity:N,u_fill_translate:ie}},Nf=(pe,y,N,ie,fe,be,Re)=>e.e(pc(pe,y,N,ie),wc(be,pe,Re),{u_height_factor:-Math.pow(2,fe.overscaledZ)/Re.tileSize/8}),Bu=(pe,y,N,ie)=>e.e(wc(y,pe,N),{u_fill_translate:ie}),Tc=(pe,y)=>({u_world:pe,u_fill_translate:y}),Ou=(pe,y,N,ie,fe)=>e.e(Bu(pe,y,N,fe),{u_world:ie}),Gc=(pe,y,N,ie,fe)=>{let be=pe.transform,Re,je,Ze=0;if(N.paint.get("circle-pitch-alignment")==="map"){let ut=e.aK(y,1,be.zoom);Re=!0,je=[ut,ut],Ze=ut/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*fe}else Re=!1,je=be.pixelsToGLUnits;return{u_camera_to_center_distance:be.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+Re,u_device_pixel_ratio:pe.pixelRatio,u_extrude_scale:je,u_globe_extrude_scale:Ze,u_translate:ie}},pf=pe=>({u_pixel_extrude_scale:[1/pe.width,1/pe.height]}),$l=pe=>({u_viewport_size:[pe.width,pe.height]}),jf=(pe,y=1)=>({u_color:pe,u_overlay:0,u_overlay_scale:y}),Hc=(pe,y,N,ie)=>{let fe=e.aK(pe,1,y)/(e.a6*Math.pow(2,pe.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(pe,1,y),u_intensity:N,u_globe_extrude_scale:fe}},Wc=(pe,y,N,ie)=>{let fe=e.O();e.c7(fe,0,pe.width,pe.height,0,0,1);let be=pe.context.gl;return{u_matrix:fe,u_world:[be.drawingBufferWidth,be.drawingBufferHeight],u_image:N,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Qu=(pe,y,N)=>{let ie=N.paint.get("hillshade-accent-color"),fe;switch(N.paint.get("hillshade-method")){case"basic":fe=4;break;case"combined":fe=1;break;case"igor":fe=2;break;case"multidirectional":fe=3;break;default:fe=0}let be=N.getIlluminationProperties();for(let Re=0;Re{let N=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[N,N],u_zoom:pe.overscaledZ,u_unpack:y.getUnpackVector()}};function Nu(pe,y){let N=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/N).toLngLat().lat,new e.a7(0,(ie+1)/N).toLngLat().lat]}let Uf=(pe,y,N=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:N,u_opacity:pe.paint.get("color-relief-opacity")}),al=(pe,y,N,ie)=>{let fe=pe.transform;return{u_translation:cu(pe,y,N),u_ratio:ie/e.aK(y,1,fe.zoom),u_device_pixel_ratio:pe.pixelRatio,u_units_to_pixels:[1/fe.pixelsToGLUnits[0],1/fe.pixelsToGLUnits[1]]}},Xc=(pe,y,N,ie,fe)=>e.e(al(pe,y,N,ie),{u_image:0,u_image_height:fe}),ju=(pe,y,N,ie,fe)=>{let be=pe.transform,Re=ec(y,be);return{u_translation:cu(pe,y,N),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,be.zoom),u_device_pixel_ratio:pe.pixelRatio,u_image:0,u_scale:[Re,fe.fromScale,fe.toScale],u_fade:fe.t,u_units_to_pixels:[1/be.pixelsToGLUnits[0],1/be.pixelsToGLUnits[1]]}},Ac=(pe,y,N,ie,fe)=>{let be=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_tileratio:be,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image:0,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})},Zc=(pe,y,N,ie,fe,be)=>{let Re=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_image:0,u_image_height:be,u_tileratio:Re,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image_dash:1,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})};function ec(pe,y){return 1/e.aK(pe,1,y.tileZoom)}function cu(pe,y,N){return e.aL(pe.transform,y,N.paint.get("line-translate"),N.paint.get("line-translate-anchor"))}let tc=(pe,y,N,ie,fe)=>{return{u_tl_parent:pe,u_scale_parent:y,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(Re=ie.paint.get("raster-saturation"),Re>0?1-1/(1.001-Re):-Re),u_contrast_factor:(be=ie.paint.get("raster-contrast"),be>0?1/(1-be):1+be),u_spin_weights:vf(ie.paint.get("raster-hue-rotate")),u_coords_top:[fe[0].x,fe[0].y,fe[1].x,fe[1].y],u_coords_bottom:[fe[3].x,fe[3].y,fe[2].x,fe[2].y]};var be,Re};function vf(pe){pe*=Math.PI/180;let y=Math.sin(pe),N=Math.cos(pe);return[(2*N+1)/3,(-Math.sqrt(3)*y-N+1)/3,(Math.sqrt(3)*y-N+1)/3]}let Tu=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>{let Kt=Re.transform;return{u_is_size_zoom_constant:+(pe==="constant"||pe==="source"),u_is_size_feature_constant:+(pe==="constant"||pe==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+N,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:Re.options.fadeDuration?Re.symbolFadeChange:1,u_label_plane_matrix:je,u_coord_matrix:Ze,u_is_text:+ft,u_pitch_with_map:+ie,u_is_along_line:fe,u_is_variable_anchor:be,u_texsize:Dt,u_texture:0,u_translation:ut,u_pitched_scale:Gt}},nh=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt)=>{let st=Re.transform;return e.e(Tu(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Kt),{u_gamma_scale:ie?Math.cos(st.pitch*Math.PI/180)*st.cameraToCenterDistance:1,u_device_pixel_ratio:Re.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},vl=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>e.e(nh(pe,y,N,ie,fe,be,Re,je,Ze,ut,!0,ft,!0,Gt),{u_texsize_icon:Dt,u_texture_icon:1}),ml=(pe,y)=>({u_opacity:pe,u_color:y}),rc=(pe,y,N,ie,fe)=>e.e(function(be,Re,je,Ze){let ut=je.imageManager.getPattern(be.from.toString()),ft=je.imageManager.getPattern(be.to.toString()),{width:Dt,height:Gt}=je.imageManager.getPixelSize(),Kt=Math.pow(2,Ze.tileID.overscaledZ),st=Ze.tileSize*Math.pow(2,je.transform.tileZoom)/Kt,It=st*(Ze.tileID.canonical.x+Ze.tileID.wrap*Kt),Ut=st*Ze.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ut.tl,u_pattern_br_a:ut.br,u_pattern_tl_b:ft.tl,u_pattern_br_b:ft.br,u_texsize:[Dt,Gt],u_mix:Re.t,u_pattern_size_a:ut.displaySize,u_pattern_size_b:ft.displaySize,u_scale_a:Re.fromScale,u_scale_b:Re.toScale,u_tile_units_to_pixels:1/e.aK(Ze,1,je.transform.tileZoom),u_pixel_coord_upper:[It>>16,Ut>>16],u_pixel_coord_lower:[65535&It,65535&Ut]}}(N,fe,y,ie),{u_opacity:pe}),yl=(pe,y)=>{},qf={fillExtrusion:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillExtrusionPattern:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_height_factor:new e.bp(pe,y.u_height_factor),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),fill:(pe,y)=>({u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillPattern:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutline:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutlinePattern:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),circle:(pe,y)=>({u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(pe,y.u_scale_with_map),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_extrude_scale:new e.c3(pe,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale),u_translate:new e.c3(pe,y.u_translate)}),collisionBox:(pe,y)=>({u_pixel_extrude_scale:new e.c3(pe,y.u_pixel_extrude_scale)}),collisionCircle:(pe,y)=>({u_viewport_size:new e.c3(pe,y.u_viewport_size)}),debug:(pe,y)=>({u_color:new e.b$(pe,y.u_color),u_overlay:new e.b_(pe,y.u_overlay),u_overlay_scale:new e.bp(pe,y.u_overlay_scale)}),depth:yl,clippingMask:yl,heatmap:(pe,y)=>({u_extrude_scale:new e.bp(pe,y.u_extrude_scale),u_intensity:new e.bp(pe,y.u_intensity),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale)}),heatmapTexture:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_color_ramp:new e.b_(pe,y.u_color_ramp),u_opacity:new e.bp(pe,y.u_opacity)}),hillshade:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_latrange:new e.c3(pe,y.u_latrange),u_exaggeration:new e.bp(pe,y.u_exaggeration),u_altitudes:new e.c9(pe,y.u_altitudes),u_azimuths:new e.c9(pe,y.u_azimuths),u_accent:new e.b$(pe,y.u_accent),u_method:new e.b_(pe,y.u_method),u_shadows:new e.c8(pe,y.u_shadows),u_highlights:new e.c8(pe,y.u_highlights)}),hillshadePrepare:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_image:new e.b_(pe,y.u_image),u_dimension:new e.c3(pe,y.u_dimension),u_zoom:new e.bp(pe,y.u_zoom),u_unpack:new e.c1(pe,y.u_unpack)}),colorRelief:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_unpack:new e.c1(pe,y.u_unpack),u_dimension:new e.c3(pe,y.u_dimension),u_elevation_stops:new e.b_(pe,y.u_elevation_stops),u_color_stops:new e.b_(pe,y.u_color_stops),u_color_ramp_size:new e.b_(pe,y.u_color_ramp_size),u_opacity:new e.bp(pe,y.u_opacity)}),line:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels)}),lineGradient:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height)}),linePattern:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_texsize:new e.c3(pe,y.u_texsize),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_image:new e.b_(pe,y.u_image),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),lineSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_mix:new e.bp(pe,y.u_mix),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),lineGradientSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_image_dash:new e.b_(pe,y.u_image_dash),u_mix:new e.bp(pe,y.u_mix),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),raster:(pe,y)=>({u_tl_parent:new e.c3(pe,y.u_tl_parent),u_scale_parent:new e.bp(pe,y.u_scale_parent),u_buffer_scale:new e.bp(pe,y.u_buffer_scale),u_fade_t:new e.bp(pe,y.u_fade_t),u_opacity:new e.bp(pe,y.u_opacity),u_image0:new e.b_(pe,y.u_image0),u_image1:new e.b_(pe,y.u_image1),u_brightness_low:new e.bp(pe,y.u_brightness_low),u_brightness_high:new e.bp(pe,y.u_brightness_high),u_saturation_factor:new e.bp(pe,y.u_saturation_factor),u_contrast_factor:new e.bp(pe,y.u_contrast_factor),u_spin_weights:new e.c2(pe,y.u_spin_weights),u_coords_top:new e.c1(pe,y.u_coords_top),u_coords_bottom:new e.c1(pe,y.u_coords_bottom)}),symbolIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolSDF:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_is_plain:new e.b_(pe,y.u_is_plain),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolTextAndIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texsize_icon:new e.c3(pe,y.u_texsize_icon),u_texture:new e.b_(pe,y.u_texture),u_texture_icon:new e.b_(pe,y.u_texture_icon),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),background:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_color:new e.b$(pe,y.u_color)}),backgroundPattern:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_image:new e.b_(pe,y.u_image),u_pattern_tl_a:new e.c3(pe,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(pe,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(pe,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(pe,y.u_pattern_br_b),u_texsize:new e.c3(pe,y.u_texsize),u_mix:new e.bp(pe,y.u_mix),u_pattern_size_a:new e.c3(pe,y.u_pattern_size_a),u_pattern_size_b:new e.c3(pe,y.u_pattern_size_b),u_scale_a:new e.bp(pe,y.u_scale_a),u_scale_b:new e.bp(pe,y.u_scale_b),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(pe,y.u_tile_units_to_pixels)}),terrain:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_ele_delta:new e.bp(pe,y.u_ele_delta),u_fog_matrix:new e.c0(pe,y.u_fog_matrix),u_fog_color:new e.b$(pe,y.u_fog_color),u_fog_ground_blend:new e.bp(pe,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(pe,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon_fog_blend:new e.bp(pe,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(pe,y.u_is_globe_mode)}),terrainDepth:(pe,y)=>({u_ele_delta:new e.bp(pe,y.u_ele_delta)}),terrainCoords:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_terrain_coords_id:new e.bp(pe,y.u_terrain_coords_id),u_ele_delta:new e.bp(pe,y.u_ele_delta)}),projectionErrorMeasurement:(pe,y)=>({u_input:new e.bp(pe,y.u_input),u_output_expected:new e.bp(pe,y.u_output_expected)}),atmosphere:(pe,y)=>({u_sun_pos:new e.c2(pe,y.u_sun_pos),u_atmosphere_blend:new e.bp(pe,y.u_atmosphere_blend),u_globe_position:new e.c2(pe,y.u_globe_position),u_globe_radius:new e.bp(pe,y.u_globe_radius),u_inv_proj_matrix:new e.c0(pe,y.u_inv_proj_matrix)}),sky:(pe,y)=>({u_sky_color:new e.b$(pe,y.u_sky_color),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon:new e.c3(pe,y.u_horizon),u_horizon_normal:new e.c3(pe,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(pe,y.u_sky_horizon_blend),u_sky_blend:new e.bp(pe,y.u_sky_blend)})};class ac{constructor(y,N,ie){this.context=y;let fe=y.gl;this.buffer=fe.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),fe.bufferData(fe.ELEMENT_ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?fe.DYNAMIC_DRAW:fe.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let N=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),N.bufferSubData(N.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Mc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class mf{constructor(y,N,ie,fe){this.length=N.length,this.attributes=ie,this.itemSize=N.bytesPerElement,this.dynamicDraw=fe,this.context=y;let be=y.gl;this.buffer=be.createBuffer(),y.bindVertexBuffer.set(this.buffer),be.bufferData(be.ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?be.DYNAMIC_DRAW:be.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let N=this.context.gl;this.bind(),N.bufferSubData(N.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,N){for(let ie of this.attributes){let fe=N.attributes[ie.name];fe!==void 0&&y.enableVertexAttribArray(fe)}}setVertexAttribPointers(y,N,ie){for(let fe of this.attributes){let be=N.attributes[fe.name];be!==void 0&&y.vertexAttribPointer(be,fe.components,y[Mc[fe.type]],!1,this.itemSize,fe.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Jo{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ih extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class fu extends Jo{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Sl extends Jo{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class El extends Jo{getDefault(){return[!0,!0,!0,!0]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class oh extends Jo{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class Au extends Jo{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class $c extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let N=this.current;(y.func!==N.func||y.ref!==N.ref||y.mask!==N.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class _l extends Jo{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class nl extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.STENCIL_TEST):N.disable(N.STENCIL_TEST),this.current=y,this.dirty=!1}}class gf extends Jo{getDefault(){return[0,1]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Kc extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.DEPTH_TEST):N.disable(N.DEPTH_TEST),this.current=y,this.dirty=!1}}class sh extends Jo{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class hu extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.BLEND):N.disable(N.BLEND),this.current=y,this.dirty=!1}}class Uu extends Jo{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class qu extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class nc extends Jo{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class yf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.CULL_FACE):N.disable(N.CULL_FACE),this.current=y,this.dirty=!1}}class _f extends Jo{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class Mu extends Jo{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class ic extends Jo{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class Sc extends Jo{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Vu extends Jo{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class xo extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class Ec extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindRenderbuffer(N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class xh extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindTexture(N.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class Vf extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindBuffer(N.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class xf extends Jo{getDefault(){return null}set(y){let N=this.gl;N.bindBuffer(N.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class Gf extends Jo{getDefault(){return null}set(y){var N;if(y===this.current&&!this.dirty)return;let ie=this.gl;Ko(ie)?ie.bindVertexArray(y):(N=ie.getExtension("OES_vertex_array_object"))===null||N===void 0||N.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class bh extends Jo{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class Hf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class il extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class kl extends Jo{constructor(y,N){super(y),this.context=y,this.parent=N}getDefault(){return null}}class kc extends kl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class Cc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Lc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_STENCIL_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let vc="Framebuffer is not complete";class Ft{constructor(y,N,ie,fe,be){this.context=y,this.width=N,this.height=ie;let Re=y.gl,je=this.framebuffer=Re.createFramebuffer();if(this.colorAttachment=new kc(y,je),fe)this.depthAttachment=be?new Lc(y,je):new Cc(y,je);else if(be)throw new Error("Stencil cannot be set without depth");if(Re.checkFramebufferStatus(Re.FRAMEBUFFER)!==Re.FRAMEBUFFER_COMPLETE)throw new Error(vc)}destroy(){let y=this.context.gl,N=this.colorAttachment.get();if(N&&y.deleteTexture(N),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class tr{constructor(y){var N,ie;if(this.gl=y,this.clearColor=new ih(this),this.clearDepth=new fu(this),this.clearStencil=new Sl(this),this.colorMask=new El(this),this.depthMask=new oh(this),this.stencilMask=new Au(this),this.stencilFunc=new $c(this),this.stencilOp=new _l(this),this.stencilTest=new nl(this),this.depthRange=new gf(this),this.depthTest=new Kc(this),this.depthFunc=new sh(this),this.blend=new hu(this),this.blendFunc=new Uu(this),this.blendColor=new qu(this),this.blendEquation=new nc(this),this.cullFace=new yf(this),this.cullFaceSide=new _f(this),this.frontFace=new Mu(this),this.program=new ic(this),this.activeTexture=new Sc(this),this.viewport=new Vu(this),this.bindFramebuffer=new xo(this),this.bindRenderbuffer=new Ec(this),this.bindTexture=new xh(this),this.bindVertexBuffer=new Vf(this),this.bindElementBuffer=new xf(this),this.bindVertexArray=new Gf(this),this.pixelStoreUnpack=new bh(this),this.pixelStoreUnpackPremultiplyAlpha=new Hf(this),this.pixelStoreUnpackFlipY=new il(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),Ko(y)){this.HALF_FLOAT=y.HALF_FLOAT;let fe=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(N=y.RGBA16F)!==null&&N!==void 0?N:fe?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:fe?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let fe=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=fe?.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(y,N){return new ac(this,y,N)}createVertexBuffer(y,N,ie){return new mf(this,y,N,ie)}createRenderbuffer(y,N,ie){let fe=this.gl,be=fe.createRenderbuffer();return this.bindRenderbuffer.set(be),fe.renderbufferStorage(fe.RENDERBUFFER,y,N,ie),this.bindRenderbuffer.set(null),be}createFramebuffer(y,N,ie,fe){return new Ft(this,y,N,ie,fe)}clear({color:y,depth:N,stencil:ie}){let fe=this.gl,be=0;y&&(be|=fe.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),N!==void 0&&(be|=fe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(N),this.depthMask.set(!0)),ie!==void 0&&(be|=fe.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),fe.clear(be)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(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})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,to.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return Ko(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var N;Ko(this.gl)?this.gl.deleteVertexArray(y):(N=this.gl.getExtension("OES_vertex_array_object"))===null||N===void 0||N.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Fr;function wr(pe,y,N,ie,fe){var be,Re;let je=pe.context,Ze=pe.transform,ut=je.gl,ft=pe.useProgram("collisionBox"),Dt=[],Gt=0,Kt=0;for(let Ar of ie){let hr=y.getTile(Ar).getBucket(N);if(!hr)continue;let vr=fe?hr.textCollisionBox:hr.iconCollisionBox,Or=hr.collisionCircleArray;Or.length>0&&(Dt.push({circleArray:Or,circleOffset:Kt,coord:Ar}),Gt+=Or.length/4,Kt=Gt),vr&&ft.draw(je,ut.LINES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,pf(pe.transform),(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),Ze.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),N.id,vr.layoutVertexBuffer,vr.indexBuffer,vr.segments,null,pe.transform.zoom,null,null,vr.collisionVertexBuffer)}if(!fe||!Dt.length)return;let st=pe.useProgram("collisionCircle"),It=new e.ca;It.resize(4*Gt),It._trim();let Ut=0;for(let Ar of Dt)for(let hr=0;hr=0&&(It[ir.associatedIconIndex]={shiftedAnchor:da,angle:Fa})}else Ja(ir.numGlyphs,Kt)}if(Ze){st.clear();let Ut=pe.icon.placedSymbolArray;for(let ir=0;irpe.style.map.terrain.getElevation(ma,mo,ru):null,Ll=N.layout.get("text-rotation-alignment")==="map";La(Fa,pe,fe,Wi,Go,Ar,ut,Ll,ma.toUnwrapped(),ir.width,ir.height,Mo,Ys)}let Ws=fe&&ka||So,Zo=hr||Ws?ea:Ar?Wi:pe.transform.clipSpaceToPixelsMatrix,es=Dn&&N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,$o;$o=Dn?Fa.iconsInText?vl(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,Rn,so,Ra):nh(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,es,Ra):Tu(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,Ra);let _s={program:sn,buffers:za,uniformValues:$o,projectionData:zs,atlasTexture:In,atlasTextureIcon:ti,atlasInterpolation:Jn,atlasInterpolationIcon:Ei,isSDF:Dn,hasHalo:es};if(Or&&Fa.canOverlap){Cr=!0;let Go=za.segments.get();for(let Ys of Go)Ta.push({segments:new e.aV([Ys]),sortKey:Ys.sortKey,state:_s,terrainData:Pn})}else Ta.push({segments:za.segments,sortKey:0,state:_s,terrainData:Pn})}Cr&&Ta.sort((ma,da)=>ma.sortKey-da.sortKey);let ua=(st=N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&st!==void 0?st:1/0,ia=N.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||ua>1;for(let ma of Ta){let da=ma.state;It.activeTexture.set(Ut.TEXTURE0),da.atlasTexture.bind(da.atlasInterpolation,Ut.CLAMP_TO_EDGE),da.atlasTextureIcon&&(It.activeTexture.set(Ut.TEXTURE1),da.atlasTextureIcon&&da.atlasTextureIcon.bind(da.atlasInterpolationIcon,Ut.CLAMP_TO_EDGE));let Fa=da.isSDF&&da.hasHalo;if(Fa){let za=da.uniformValues;za.u_is_halo=1,ia&&(za.u_is_plain=0,Da(da.buffers,ma.segments,N,pe,da.program,ta,ft,Dt,za,da.projectionData,ma.terrainData),za.u_is_halo=0,za.u_is_plain=1)}Da(da.buffers,ma.segments,N,pe,da.program,ta,ft,Dt,da.uniformValues,da.projectionData,ma.terrainData),Fa&&!ia&&(da.uniformValues.u_is_halo=0)}}function Da(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft){let Dt=ie.context;fe.draw(Dt,Dt.gl.TRIANGLES,be,Re,je,pi.backCCW,Ze,ft,ut,N.id,pe.layoutVertexBuffer,pe.indexBuffer,y,N.paint,ie.transform.zoom,pe.programConfigurations.get(N.id),pe.dynamicLayoutVertexBuffer,pe.opacityVertexBuffer)}function Ha(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=Xi.disabled,Ze=new to([Re.ONE,Re.ONE],e.bo.transparent,[!0,!0,!0,!0]),ut=y.getBucket(N);if(!ut)return;let ft=ie.key,Dt=N.heatmapFbos.get(ft);Dt||(Dt=vn(be,y.tileSize,y.tileSize),N.heatmapFbos.set(ft,Dt)),be.bindFramebuffer.set(Dt.framebuffer),be.viewport.set([0,0,y.tileSize,y.tileSize]),be.clear({color:e.bo.transparent});let Gt=ut.programConfigurations.get(N.id),Kt=pe.useProgram("heatmap",Gt,!fe),st=pe.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),It=pe.style.map.terrain.getTerrainData(ie);Kt.draw(be,Re.TRIANGLES,Vi.disabled,je,Ze,pi.disabled,Hc(y,pe.transform.zoom,N.paint.get("heatmap-intensity"),1),It,st,N.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,N.paint,pe.transform.zoom,Gt)}function $a(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=pe.transform;be.setColorMode(pe.colorModeForRenderPass());let Ze=Sn(be,y),ut=N.key,ft=y.heatmapFbos.get(ut);if(!ft)return;be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,ft.colorAttachment.get()),be.activeTexture.set(Re.TEXTURE1),Ze.bind(Re.LINEAR,Re.CLAMP_TO_EDGE);let Dt=je.getProjectionData({overscaledTileID:N,applyTerrainMatrix:fe,applyGlobeMatrix:!ie});pe.useProgram("heatmapTexture").draw(be,Re.TRIANGLES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,Wc(pe,y,0,1),null,Dt,y.id,pe.rasterBoundsBuffer,pe.quadTriangleIndexBuffer,pe.rasterBoundsSegments,y.paint,je.zoom),ft.destroy(),y.heatmapFbos.delete(ut)}function vn(pe,y,N){var ie,fe;let be=pe.gl,Re=be.createTexture();be.bindTexture(be.TEXTURE_2D,Re),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_S,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_T,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MIN_FILTER,be.LINEAR),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MAG_FILTER,be.LINEAR);let je=(ie=pe.HALF_FLOAT)!==null&&ie!==void 0?ie:be.UNSIGNED_BYTE,Ze=(fe=pe.RGBA16F)!==null&&fe!==void 0?fe:be.RGBA;be.texImage2D(be.TEXTURE_2D,0,Ze,y,N,0,be.RGBA,je,null);let ut=pe.createFramebuffer(y,N,!1,!1);return ut.colorAttachment.set(Re),ut}function Sn(pe,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(pe,y.colorRamp,pe.gl.RGBA)),y.colorRampTexture}function yi(pe,y,N,ie,fe,be,Re,je){let Ze=256;if(fe.stepInterpolant){let ut=y.getSource().maxzoom,ft=Re.canonical.z===ut?Math.ceil(1<pe.options.anisotropicFilterPitch&&Kt.texParameterf(Kt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let ma=(ft=pe.style.map.terrain)===null||ft===void 0?void 0:ft.getTerrainData(Cr),da=It.getProjectionData({overscaledTileID:Cr,aligned:dr,applyGlobeMatrix:!ut,applyTerrainMatrix:!0}),Fa=tc(ua,Ra,ia.fadeMix,N,je),za=Ut.getMeshFromTileID(Gt,Cr.canonical,be,Re,"raster");st.draw(Gt,Kt.TRIANGLES,ta,fe?fe[Cr.overscaledZ]:Xi.disabled,ir,Ze?pi.frontCCW:pi.backCCW,Fa,ma,da,N.id,za.vertexBuffer,za.indexBuffer,za.segments)}}function Gs(pe,y,N,ie){let fe={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(N===0||ie)return fe;if(pe.fadingParentID){let be=y.getLoadedTile(pe.fadingParentID);if(!be)return fe;let Re=Math.pow(2,be.tileID.overscaledZ-pe.tileID.overscaledZ),je=[pe.tileID.canonical.x*Re%1,pe.tileID.canonical.y*Re%1],Ze=function(ut,ft,Dt){let Gt=m(),Kt=(Gt-ft.timeAdded)/Dt,st=ut.fadingDirection===gt.Incoming,It=e.al((Gt-ut.timeAdded)/Dt,0,1),Ut=e.al(1-Kt,0,1),ir=st?It:Ut;return{tileOpacity:ir,parentTileOpacity:st?Ut:It,fadeMix:{opacity:1,mix:1-ir}}}(pe,be,N);return{parentTile:be,parentScaleBy:Re,parentTopLeft:je,fadeValues:Ze}}if(pe.selfFading){let be=function(Re,je){let Ze=(m()-Re.timeAdded)/je,ut=e.al(Ze,0,1);return{tileOpacity:ut,fadeMix:{opacity:ut,mix:0}}}(pe,N);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:be}}return fe}let Es=new e.bo(1,0,0,1),ns=new e.bo(0,1,0,1),Kn=new e.bo(0,0,1,1),zo=new e.bo(1,0,1,1),gs=new e.bo(0,1,1,1);function js(pe,y,N,ie){zl(pe,0,y+N/2,pe.transform.width,N,ie)}function Cl(pe,y,N,ie){zl(pe,y-N/2,0,N,pe.transform.height,ie)}function zl(pe,y,N,ie,fe,be){let Re=pe.context,je=Re.gl;je.enable(je.SCISSOR_TEST),je.scissor(y*pe.pixelRatio,N*pe.pixelRatio,ie*pe.pixelRatio,fe*pe.pixelRatio),Re.clear({color:be}),je.disable(je.SCISSOR_TEST)}function Kl(pe,y,N){var ie;let fe=pe.context,be=fe.gl,Re=pe.useProgram("debug"),je=Vi.disabled,Ze=Xi.disabled,ut=pe.colorModeForRenderPass(),ft="$debug",Dt=(ie=pe.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(N);fe.activeTexture.set(be.TEXTURE0);let Gt=y.getTileByID(N.key).latestRawTileData,Kt=Math.floor((Gt?.byteLength||0)/1024),st=y.getTile(N).tileSize,It=512/Math.min(st,512)*(N.overscaledZ/pe.transform.zoom)*.5,Ut=N.canonical.toString();N.overscaledZ!==N.canonical.z&&(Ut+=` => ${N.overscaledZ}`),function(dr,Ar){dr.initDebugOverlayCanvas();let hr=dr.debugOverlayCanvas,vr=dr.context.gl,Or=dr.debugOverlayCanvas.getContext("2d");Or.clearRect(0,0,hr.width,hr.height),Or.shadowColor="white",Or.shadowBlur=2,Or.lineWidth=1.5,Or.strokeStyle="white",Or.textBaseline="top",Or.font="bold 36px Open Sans, sans-serif",Or.fillText(Ar,5,5),Or.strokeText(Ar,5,5),dr.debugOverlayTexture.update(hr),dr.debugOverlayTexture.bind(vr.LINEAR,vr.CLAMP_TO_EDGE)}(pe,`${Ut} ${Kt}kB`);let ir=pe.transform.getProjectionData({overscaledTileID:N,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(fe,be.TRIANGLES,je,Ze,to.alphaBlended,pi.disabled,jf(e.bo.transparent,It),null,ir,ft,pe.debugBuffer,pe.quadTriangleIndexBuffer,pe.debugSegments),Re.draw(fe,be.LINE_STRIP,je,Ze,ut,pi.disabled,jf(e.bo.red),Dt,ir,ft,pe.debugBuffer,pe.tileBorderIndexBuffer,pe.debugSegments)}function Gu(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=be.gl,je=pe.transform,Ze=pe.colorModeForRenderPass(),ut=pe.getDepthModeFor3D(),ft=pe.useProgram("terrain");be.bindFramebuffer.set(null),be.viewport.set([0,0,pe.width,pe.height]);for(let Dt of N){let Gt=y.getTerrainMesh(Dt.tileID),Kt=pe.renderToTexture.getTexture(Dt),st=y.getTerrainData(Dt.tileID);be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,Kt.texture);let It=y.getMeshFrameDelta(je.zoom),Ut=je.calculateFogMatrix(Dt.tileID.toUnwrapped()),ir=rh(It,Ut,pe.style.sky,je.pitch,fe),dr=je.getProjectionData({overscaledTileID:Dt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ft.draw(be,Re.TRIANGLES,ut,Xi.disabled,Ze,pi.backCCW,ir,st,dr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function xl(pe,y){if(!y.mesh){let N=new e.aU;N.emplaceBack(-1,-1),N.emplaceBack(1,-1),N.emplaceBack(1,1),N.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new Xn(pe.createVertexBuffer(N,eo.members),pe.createIndexBuffer(ie),e.aV.simpleSegment(0,0,N.length,ie.length))}return y.mesh}let Hu={symbol:function(pe,y,N,ie,fe,be){if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=be,je=Xi.disabled,Ze=pe.colorModeForRenderPass();(N._unevaluatedLayout.hasValue("text-variable-anchor")||N._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ut,ft,Dt,Gt,Kt,st,It,Ut,ir){var dr;let Ar=ft.transform,hr=ft.style.map.terrain,vr=Kt==="map",Or=st==="map";for(let Cr of ut){let ta=Gt.getTile(Cr),ka=ta.getBucket(Dt);if(!(!((dr=ka?.text)===null||dr===void 0)&&dr.segments.get().length))continue;let Ta=e.aw(ka.textSizeData,Ar.zoom),Ra=e.aK(ta,1,ft.transform.zoom),ua=cr(vr,ft.transform,Ra),ia=Dt.layout.get("icon-text-fit")!=="none"&&ka.hasIconData();if(Ta){let ma=Math.pow(2,Ar.zoom-ta.tileID.overscaledZ),da=hr?(Fa,za)=>hr.getElevation(Cr,Fa,za):null;Na(ka,vr,Or,ir,Ar,ua,ma,Ta,ia,e.aL(Ar,ta,It,Ut),Cr.toUnwrapped(),da)}}}(ie,pe,N,y,N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),fe),N.paint.get("icon-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!1,N.paint.get("icon-translate"),N.paint.get("icon-translate-anchor"),N.layout.get("icon-rotation-alignment"),N.layout.get("icon-pitch-alignment"),N.layout.get("icon-keep-upright"),je,Ze,Re),N.paint.get("text-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!0,N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.layout.get("text-keep-upright"),je,Ze,Re),y.map.showCollisionBoxes&&(wr(pe,y,N,ie,!0),wr(pe,y,N,ie,!1))},circle:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("circle-opacity"),Ze=N.paint.get("circle-stroke-width"),ut=N.paint.get("circle-stroke-opacity"),ft=!N.layout.get("circle-sort-key").isConstant();if(je.constantOr(1)===0&&(Ze.constantOr(1)===0||ut.constantOr(1)===0))return;let Dt=pe.context,Gt=Dt.gl,Kt=pe.transform,st=pe.getDepthModeForSublayer(0,Vi.ReadOnly),It=Xi.disabled,Ut=pe.colorModeForRenderPass(),ir=[],dr=Kt.getCircleRadiusCorrection();for(let Ar of ie){let hr=y.getTile(Ar),vr=hr.getBucket(N);if(!vr)continue;let Or=N.paint.get("circle-translate"),Cr=N.paint.get("circle-translate-anchor"),ta=e.aL(Kt,hr,Or,Cr),ka=vr.programConfigurations.get(N.id),Ta=pe.useProgram("circle",ka),Ra=vr.layoutVertexBuffer,ua=vr.indexBuffer,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),ma={programConfiguration:ka,program:Ta,layoutVertexBuffer:Ra,indexBuffer:ua,uniformValues:Gc(pe,hr,N,ta,dr),terrainData:ia,projectionData:Kt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!Re,applyTerrainMatrix:!0})};if(ft){let da=vr.segments.get();for(let Fa of da)ir.push({segments:new e.aV([Fa]),sortKey:Fa.sortKey,state:ma})}else ir.push({segments:vr.segments,sortKey:0,state:ma})}ft&&ir.sort((Ar,hr)=>Ar.sortKey-hr.sortKey);for(let Ar of ir){let{programConfiguration:hr,program:vr,layoutVertexBuffer:Or,indexBuffer:Cr,uniformValues:ta,terrainData:ka,projectionData:Ta}=Ar.state;vr.draw(Dt,Gt.TRIANGLES,st,It,Ut,pi.backCCW,ta,ka,Ta,N.id,Or,Cr,Ar.segments,N.paint,pe.transform.zoom,hr)}},heatmap:function(pe,y,N,ie,fe){if(N.paint.get("heatmap-opacity")===0)return;let be=pe.context,{isRenderingToTexture:Re,isRenderingGlobe:je}=fe;if(pe.style.map.terrain){for(let Ze of ie){let ut=y.getTile(Ze);y.hasRenderableParent(Ze)||(pe.renderPass==="offscreen"?Ha(pe,ut,N,Ze,je):pe.renderPass==="translucent"&&$a(pe,N,Ze,Re,je))}be.viewport.set([0,0,pe.width,pe.height])}else pe.renderPass==="offscreen"?function(Ze,ut,ft,Dt){let Gt=Ze.context,Kt=Gt.gl,st=Ze.transform,It=Xi.disabled,Ut=new to([Kt.ONE,Kt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(ir,dr,Ar){let hr=ir.gl;ir.activeTexture.set(hr.TEXTURE1),ir.viewport.set([0,0,dr.width/4,dr.height/4]);let vr=Ar.heatmapFbos.get(e.cd);vr?(hr.bindTexture(hr.TEXTURE_2D,vr.colorAttachment.get()),ir.bindFramebuffer.set(vr.framebuffer)):(vr=vn(ir,dr.width/4,dr.height/4),Ar.heatmapFbos.set(e.cd,vr))})(Gt,Ze,ft),Gt.clear({color:e.bo.transparent});for(let ir of Dt){if(ut.hasRenderableParent(ir))continue;let dr=ut.getTile(ir),Ar=dr.getBucket(ft);if(!Ar)continue;let hr=Ar.programConfigurations.get(ft.id),vr=Ze.useProgram("heatmap",hr),Or=st.getProjectionData({overscaledTileID:ir,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Cr=st.getCircleRadiusCorrection();vr.draw(Gt,Kt.TRIANGLES,Vi.disabled,It,Ut,pi.backCCW,Hc(dr,st.zoom,ft.paint.get("heatmap-intensity"),Cr),null,Or,ft.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ft.paint,st.zoom,hr)}Gt.viewport.set([0,0,Ze.width,Ze.height])}(pe,y,N,ie):pe.renderPass==="translucent"&&function(Ze,ut){let ft=Ze.context,Dt=ft.gl;ft.setColorMode(Ze.colorModeForRenderPass());let Gt=ut.heatmapFbos.get(e.cd);Gt&&(ft.activeTexture.set(Dt.TEXTURE0),Dt.bindTexture(Dt.TEXTURE_2D,Gt.colorAttachment.get()),ft.activeTexture.set(Dt.TEXTURE1),Sn(ft,ut).bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(ft,Dt.TRIANGLES,Vi.disabled,Xi.disabled,Ze.colorModeForRenderPass(),pi.disabled,Wc(Ze,ut,0,1),null,null,ut.id,Ze.viewportBuffer,Ze.quadTriangleIndexBuffer,Ze.viewportSegments,ut.paint,Ze.transform.zoom))}(pe,N)},line:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("line-opacity"),Ze=N.paint.get("line-width");if(je.constantOr(1)===0||Ze.constantOr(1)===0)return;let ut=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ft=pe.colorModeForRenderPass(),Dt=N.paint.get("line-dasharray"),Gt=Dt.constantOr(1),Kt=N.paint.get("line-pattern"),st=Kt.constantOr(1),It=N.paint.get("line-gradient"),Ut=N.getCrossfadeParameters(),ir;ir=st?"linePattern":Gt&&It?"lineGradientSDF":Gt?"lineSDF":It?"lineGradient":"line";let dr=pe.context,Ar=dr.gl,hr=pe.transform,vr=!0;for(let Or of ie){let Cr=y.getTile(Or);if(st&&!Cr.patternsLoaded())continue;let ta=Cr.getBucket(N);if(!ta)continue;let ka=ta.programConfigurations.get(N.id),Ta=pe.context.program.get(),Ra=pe.useProgram(ir,ka),ua=vr||Ra.program!==Ta,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),ma=Kt.constantOr(null),da=Dt?.constantOr(null);if(ma&&Cr.imageAtlas){let ui=Cr.imageAtlas,cn=ui.patternPositions[ma.to.toString()],sn=ui.patternPositions[ma.from.toString()];cn&&sn&&ka.setConstantPatternPositions(cn,sn)}else if(da){let ui=N.layout.get("line-cap").constantOr(null)==="round",cn=pe.lineAtlas.getDash(da.to,ui),sn=pe.lineAtlas.getDash(da.from,ui);ka.setConstantDashPositions(cn,sn)}let Fa=hr.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Re,applyTerrainMatrix:!0}),za=hr.getPixelScale(),kn;st?(kn=ju(pe,Cr,N,za,Ut),_i(dr,Ar,Cr,ka,Ut)):Gt&&It?(kn=Zc(pe,Cr,N,za,Ut,ta.lineClipsArray.length),En(pe,y,dr,Ar,N,ta,Or,ka,Ut)):Gt?(kn=Ac(pe,Cr,N,za,Ut),ki(pe,dr,Ar,ka,ua,Ut)):It?(kn=Xc(pe,Cr,N,za,ta.lineClipsArray.length),ri(pe,y,dr,Ar,N,ta,Or)):kn=al(pe,Cr,N,za);let Dn=pe.stencilModeForClipping(Or);Ra.draw(dr,Ar.TRIANGLES,ut,Dn,ft,pi.disabled,kn,ia,Fa,N.id,ta.layoutVertexBuffer,ta.indexBuffer,ta.segments,N.paint,pe.transform.zoom,ka,ta.layoutVertexBuffer2),vr=!1}},fill:function(pe,y,N,ie,fe){let be=N.paint.get("fill-color"),Re=N.paint.get("fill-opacity");if(Re.constantOr(1)===0)return;let{isRenderingToTexture:je}=fe,Ze=pe.colorModeForRenderPass(),ut=N.paint.get("fill-pattern"),ft=pe.opaquePassEnabledForLayer()&&!ut.constantOr(1)&&be.constantOr(e.bo.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(pe.renderPass===ft){let Dt=pe.getDepthModeForSublayer(1,pe.renderPass==="opaque"?Vi.ReadWrite:Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!1,je)}if(pe.renderPass==="translucent"&&N.paint.get("fill-antialias")){let Dt=pe.getDepthModeForSublayer(N.getPaintProperty("fill-outline-color")?2:0,Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!0,je)}},fillExtrusion:function(pe,y,N,ie,fe){let be=N.paint.get("fill-extrusion-opacity");if(be===0)return;let{isRenderingToTexture:Re}=fe;if(pe.renderPass==="translucent"){let je=new Vi(pe.context.gl.LEQUAL,Vi.ReadWrite,pe.depthRangeFor3D);if(be!==1||N.paint.get("fill-extrusion-pattern").constantOr(1))Zi(pe,y,N,ie,je,Xi.disabled,to.disabled,Re),Zi(pe,y,N,ie,je,pe.stencilModeFor3D(),pe.colorModeForRenderPass(),Re);else{let Ze=pe.colorModeForRenderPass();Zi(pe,y,N,ie,je,Xi.disabled,Ze,Re)}}},hillshade:function(pe,y,N,ie,fe){if(pe.renderPass!=="offscreen"&&pe.renderPass!=="translucent")return;let{isRenderingToTexture:be}=fe,Re=pe.context,je=pe.style.projection.useSubdivision,Ze=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ut=pe.colorModeForRenderPass();if(pe.renderPass==="offscreen")(function(ft,Dt,Gt,Kt,st,It,Ut){let ir=ft.context,dr=ir.gl,Ar=Kt.paint.get("resampling")==="nearest"?dr.NEAREST:dr.LINEAR;for(let hr of Gt){let vr=Dt.getTile(hr),Or=vr.dem;if(!Or?.data||!vr.needsHillshadePrepare)continue;let Cr=Or.dim,ta=Or.stride,ka=Or.getPixels();if(ir.activeTexture.set(dr.TEXTURE1),ir.pixelStoreUnpackPremultiplyAlpha.set(!1),vr.demTexture||(vr.demTexture=ft.getTileTexture(ta)),vr.demTexture){let Ra=vr.demTexture;Ra.update(ka,{premultiply:!1}),Ra.bind(dr.NEAREST,dr.CLAMP_TO_EDGE)}else vr.demTexture=new e.T(ir,ka,dr.RGBA,{premultiply:!1}),vr.demTexture.bind(dr.NEAREST,dr.CLAMP_TO_EDGE);ir.activeTexture.set(dr.TEXTURE0);let Ta=vr.fbo;if(!Ta){let Ra=new e.T(ir,{width:Cr,height:Cr,data:null},dr.RGBA);Ra.bind(Ar,dr.CLAMP_TO_EDGE),Ta=vr.fbo=ir.createFramebuffer(Cr,Cr,!0,!1),Ta.colorAttachment.set(Ra.texture)}ir.bindFramebuffer.set(Ta.framebuffer),ir.viewport.set([0,0,Cr,Cr]),ft.useProgram("hillshadePrepare").draw(ir,dr.TRIANGLES,st,It,Ut,pi.disabled,Yc(vr.tileID,Or),null,null,Kt.id,ft.rasterBoundsBuffer,ft.quadTriangleIndexBuffer,ft.rasterBoundsSegments),vr.needsHillshadePrepare=!1}})(pe,y,ie,N,Ze,Xi.disabled,ut),Re.viewport.set([0,0,pe.width,pe.height]);else if(pe.renderPass==="translucent")if(je){let[ft,Dt,Gt]=pe.stencilConfigForOverlapTwoPass(ie);Co(pe,y,N,Gt,ft,Ze,ut,!1,be),Co(pe,y,N,Gt,Dt,Ze,ut,!0,be)}else{let[ft,Dt]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Co(pe,y,N,Dt,ft,Ze,ut,!1,be)}},colorRelief:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=pe.style.projection.useSubdivision,je=pe.getDepthModeForSublayer(0,Vi.ReadOnly),Ze=pe.colorModeForRenderPass();if(Re){let[ut,ft,Dt]=pe.stencilConfigForOverlapTwoPass(ie);Fo(pe,y,N,Dt,ut,je,Ze,!1,be),Fo(pe,y,N,Dt,ft,je,Ze,!0,be)}else{let[ut,ft]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Fo(pe,y,N,ft,ut,je,Ze,!1,be)}},raster:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||N.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=y.getSource(),je=pe.style.projection.useSubdivision;if(Re instanceof ke)bo(pe,y,N,ie,null,!1,!1,Re.tileCoords,Re.flippedWindingOrder,be);else if(je){let[Ze,ut,ft]=pe.stencilConfigForOverlapTwoPass(ie);bo(pe,y,N,ft,Ze,!1,!0,Yo,!1,be),bo(pe,y,N,ft,ut,!0,!0,Yo,!1,be)}else{let[Ze,ut]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);bo(pe,y,N,ut,Ze,!1,!0,Yo,!1,be)}},background:function(pe,y,N,ie,fe){var be;let Re=N.paint.get("background-color"),je=N.paint.get("background-opacity");if(je===0)return;let{isRenderingToTexture:Ze}=fe,ut=pe.context,ft=ut.gl,Dt=pe.style.projection,Gt=pe.transform,Kt=Gt.tileSize,st=N.paint.get("background-pattern");if(pe.isPatternMissing(st))return;let It=!st&&Re.a===1&&je===1&&pe.opaquePassEnabledForLayer()?"opaque":"translucent";if(pe.renderPass!==It)return;let Ut=Xi.disabled,ir=pe.getDepthModeForSublayer(0,It==="opaque"?Vi.ReadWrite:Vi.ReadOnly),dr=pe.colorModeForRenderPass(),Ar=pe.useProgram(st?"backgroundPattern":"background"),hr=ie||Je(Gt,{tileSize:Kt,terrain:pe.style.map.terrain});st&&(ut.activeTexture.set(ft.TEXTURE0),pe.imageManager.bind(pe.context));let vr=N.getCrossfadeParameters();for(let Or of hr){let Cr=Gt.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Ze,applyTerrainMatrix:!0}),ta=st?rc(je,pe,st,{tileID:Or,tileSize:Kt},vr):ml(je,Re),ka=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),Ta=Dt.getMeshFromTileID(ut,Or.canonical,!1,!0,"raster");Ar.draw(ut,ft.TRIANGLES,ir,Ut,dr,pi.backCCW,ta,ka,Cr,N.id,Ta.vertexBuffer,Ta.indexBuffer,Ta.segments)}},sky:function(pe,y){let N=pe.context,ie=N.gl,fe=((ft,Dt,Gt)=>{let Kt=Math.cos(Dt.rollInRadians),st=Math.sin(Dt.rollInRadians),It=Xt(Dt),Ut=Dt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ft.properties.get("sky-color"),u_horizon_color:ft.properties.get("horizon-color"),u_horizon:[(Dt.width/2-It*st)*Gt,(Dt.height/2+It*Kt)*Gt],u_horizon_normal:[-st,Kt],u_sky_horizon_blend:ft.properties.get("sky-horizon-blend")*Dt.height/2*Gt,u_sky_blend:Ut}})(y,pe.style.map.transform,pe.pixelRatio),be=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),Re=Xi.disabled,je=pe.colorModeForRenderPass(),Ze=pe.useProgram("sky"),ut=xl(N,y);Ze.draw(N,ie.TRIANGLES,be,Re,je,pi.disabled,fe,null,void 0,"sky",ut.vertexBuffer,ut.indexBuffer,ut.segments)},atmosphere:function(pe,y,N){let ie=pe.context,fe=ie.gl,be=pe.useProgram("atmosphere"),Re=new Vi(fe.LEQUAL,Vi.ReadOnly,[0,1]),je=pe.transform,Ze=function(Ut,ir){let dr=Ut.properties.get("position"),Ar=[-dr.x,-dr.y,-dr.z],hr=e.ap(new Float64Array(16));return Ut.properties.get("anchor")==="map"&&(e.be(hr,hr,ir.rollInRadians),e.bf(hr,hr,-ir.pitchInRadians),e.be(hr,hr,ir.bearingInRadians),e.bf(hr,hr,ir.center.lat*Math.PI/180),e.bI(hr,hr,-ir.center.lng*Math.PI/180)),e.cg(Ar,Ar,hr),Ar}(N,pe.transform),ut=je.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=y.properties.get("atmosphere-blend")*ut.projectionTransition;if(ft===0)return;let Dt=bs(je.worldSize,je.center.lat),Gt=je.inverseProjectionMatrix,Kt=new Float64Array(4);Kt[3]=1,e.aE(Kt,Kt,je.modelViewProjectionMatrix),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1,e.aE(Kt,Kt,Gt),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1;let st=((Ut,ir,dr,Ar,hr)=>({u_sun_pos:Ut,u_atmosphere_blend:ir,u_globe_position:dr,u_globe_radius:Ar,u_inv_proj_matrix:hr}))(Ze,ft,[Kt[0],Kt[1],Kt[2]],Dt,Gt),It=xl(ie,y);be.draw(ie,fe.TRIANGLES,Re,Xi.disabled,to.alphaBlended,pi.disabled,st,null,null,"atmosphere",It.vertexBuffer,It.indexBuffer,It.segments)},custom:function(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=N.implementation,je=pe.style.projection,Ze=pe.transform,ut=Ze.getProjectionDataForCustomLayer(fe),ft={farZ:Ze.farZ,nearZ:Ze.nearZ,fov:Ze.fov*Math.PI/180,modelViewProjectionMatrix:Ze.modelViewProjectionMatrix,projectionMatrix:Ze.projectionMatrix,shaderData:{variantName:je.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +`);Ko(ft)||(vr=function(Ta){return Ta.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(vr),Or=function(Ta){return Ta.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Or));let Cr=ft.createShader(ft.FRAGMENT_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(Cr,vr),ft.compileShader(Cr),!ft.getShaderParameter(Cr,ft.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ft.getShaderInfoLog(Cr)}`);ft.attachShader(this.program,Cr);let ta=ft.createShader(ft.VERTEX_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(ta,Or),ft.compileShader(ta),!ft.getShaderParameter(ta,ft.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ft.getShaderInfoLog(ta)}`);ft.attachShader(this.program,ta),this.attributes={};let ka={};this.numAttributes=Kt.length;for(let Ta=0;Ta({u_depth:new e.b_(Ta,Ra.u_depth),u_terrain:new e.b_(Ta,Ra.u_terrain),u_terrain_dim:new e.bp(Ta,Ra.u_terrain_dim),u_terrain_matrix:new e.c0(Ta,Ra.u_terrain_matrix),u_terrain_unpack:new e.c1(Ta,Ra.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Ta,Ra.u_terrain_exaggeration)}))(y,ka),this.projectionUniforms=((Ta,Ra)=>({u_projection_matrix:new e.c0(Ta,Ra.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Ta,Ra.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Ta,Ra.u_projection_clipping_plane),u_projection_transition:new e.bp(Ta,Ra.u_projection_transition),u_projection_fallback_matrix:new e.c0(Ta,Ra.u_projection_fallback_matrix)}))(y,ka),this.binderUniforms=ie?ie.getUniforms(y,ka):[]}draw(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar){var hr;let vr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(fe),y.setColorMode(be),y.setCullFace(Re),Ze){y.activeTexture.set(vr.TEXTURE2),vr.bindTexture(vr.TEXTURE_2D,Ze.depthTexture),y.activeTexture.set(vr.TEXTURE3),vr.bindTexture(vr.TEXTURE_2D,Ze.texture);for(let Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(Ze[Cr])}if(ut)for(let Cr in ut)this.projectionUniforms[Ju[Cr]].set(ut[Cr]);if(je)for(let Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(je[Cr]);Ut&&Ut.setUniforms(y,this.binderUniforms,st,{zoom:It});let Or=0;switch(N){case vr.LINES:Or=2;break;case vr.TRIANGLES:Or=3;break;case vr.LINE_STRIP:Or=1}for(let Cr of Kt.get())Cr.vaos||(Cr.vaos={}),(hr=Cr.vaos)[ft]||(hr[ft]=new Lh),Cr.vaos[ft].bind(y,this,Dt,Ut?Ut.getPaintVertexBuffers():[],Gt,Cr.vertexOffset,ir,dr,Ar),vr.drawElements(N,Cr.primitiveLength*Or,vr.UNSIGNED_SHORT,Cr.primitiveOffset*Or*2)}}function wc(pe,y,N){let ie=1/e.aK(N,1,y.transform.tileZoom),fe=Math.pow(2,N.tileID.overscaledZ),be=N.tileSize*Math.pow(2,y.transform.tileZoom)/fe,Re=be*(N.tileID.canonical.x+N.tileID.wrap*fe),je=be*N.tileID.canonical.y;return{u_image:0,u_texsize:N.imageAtlasTexture.size,u_scale:[ie,pe.fromScale,pe.toScale],u_fade:pe.t,u_pixel_coord_upper:[Re>>16,je>>16],u_pixel_coord_lower:[65535&Re,65535&je]}}let pc=(pe,y,N,ie)=>{let fe=pe.style.light,be=fe.properties.get("position"),Re=[be.x,be.y,be.z],je=e.c4();fe.properties.get("anchor")==="viewport"&&e.c5(je,pe.transform.bearingInRadians),e.c6(Re,Re,je);let Ze=pe.transform.transformLightDirection(Re),ut=fe.properties.get("color");return{u_lightpos:Re,u_lightpos_globe:Ze,u_lightintensity:fe.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+y,u_opacity:N,u_fill_translate:ie}},Nf=(pe,y,N,ie,fe,be,Re)=>e.e(pc(pe,y,N,ie),wc(be,pe,Re),{u_height_factor:-Math.pow(2,fe.overscaledZ)/Re.tileSize/8}),Bu=(pe,y,N,ie)=>e.e(wc(y,pe,N),{u_fill_translate:ie}),Tc=(pe,y)=>({u_world:pe,u_fill_translate:y}),Ou=(pe,y,N,ie,fe)=>e.e(Bu(pe,y,N,fe),{u_world:ie}),Gc=(pe,y,N,ie,fe)=>{let be=pe.transform,Re,je,Ze=0;if(N.paint.get("circle-pitch-alignment")==="map"){let ut=e.aK(y,1,be.zoom);Re=!0,je=[ut,ut],Ze=ut/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*fe}else Re=!1,je=be.pixelsToGLUnits;return{u_camera_to_center_distance:be.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+Re,u_device_pixel_ratio:pe.pixelRatio,u_extrude_scale:je,u_globe_extrude_scale:Ze,u_translate:ie}},pf=pe=>({u_pixel_extrude_scale:[1/pe.width,1/pe.height]}),$l=pe=>({u_viewport_size:[pe.width,pe.height]}),jf=(pe,y=1)=>({u_color:pe,u_overlay:0,u_overlay_scale:y}),Hc=(pe,y,N,ie)=>{let fe=e.aK(pe,1,y)/(e.a6*Math.pow(2,pe.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(pe,1,y),u_intensity:N,u_globe_extrude_scale:fe}},Wc=(pe,y,N,ie)=>{let fe=e.O();e.c7(fe,0,pe.width,pe.height,0,0,1);let be=pe.context.gl;return{u_matrix:fe,u_world:[be.drawingBufferWidth,be.drawingBufferHeight],u_image:N,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Qu=(pe,y,N)=>{let ie=N.paint.get("hillshade-accent-color"),fe;switch(N.paint.get("hillshade-method")){case"basic":fe=4;break;case"combined":fe=1;break;case"igor":fe=2;break;case"multidirectional":fe=3;break;default:fe=0}let be=N.getIlluminationProperties();for(let Re=0;Re{let N=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[N,N],u_zoom:pe.overscaledZ,u_unpack:y.getUnpackVector()}};function Nu(pe,y){let N=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/N).toLngLat().lat,new e.a7(0,(ie+1)/N).toLngLat().lat]}let Uf=(pe,y,N=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:N,u_opacity:pe.paint.get("color-relief-opacity")}),al=(pe,y,N,ie)=>{let fe=pe.transform;return{u_translation:cu(pe,y,N),u_ratio:ie/e.aK(y,1,fe.zoom),u_device_pixel_ratio:pe.pixelRatio,u_units_to_pixels:[1/fe.pixelsToGLUnits[0],1/fe.pixelsToGLUnits[1]]}},Xc=(pe,y,N,ie,fe)=>e.e(al(pe,y,N,ie),{u_image:0,u_image_height:fe}),ju=(pe,y,N,ie,fe)=>{let be=pe.transform,Re=ec(y,be);return{u_translation:cu(pe,y,N),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,be.zoom),u_device_pixel_ratio:pe.pixelRatio,u_image:0,u_scale:[Re,fe.fromScale,fe.toScale],u_fade:fe.t,u_units_to_pixels:[1/be.pixelsToGLUnits[0],1/be.pixelsToGLUnits[1]]}},Ac=(pe,y,N,ie,fe)=>{let be=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_tileratio:be,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image:0,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})},Zc=(pe,y,N,ie,fe,be)=>{let Re=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_image:0,u_image_height:be,u_tileratio:Re,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image_dash:1,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})};function ec(pe,y){return 1/e.aK(pe,1,y.tileZoom)}function cu(pe,y,N){return e.aL(pe.transform,y,N.paint.get("line-translate"),N.paint.get("line-translate-anchor"))}let tc=(pe,y,N,ie,fe)=>{return{u_tl_parent:pe,u_scale_parent:y,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(Re=ie.paint.get("raster-saturation"),Re>0?1-1/(1.001-Re):-Re),u_contrast_factor:(be=ie.paint.get("raster-contrast"),be>0?1/(1-be):1+be),u_spin_weights:vf(ie.paint.get("raster-hue-rotate")),u_coords_top:[fe[0].x,fe[0].y,fe[1].x,fe[1].y],u_coords_bottom:[fe[3].x,fe[3].y,fe[2].x,fe[2].y]};var be,Re};function vf(pe){pe*=Math.PI/180;let y=Math.sin(pe),N=Math.cos(pe);return[(2*N+1)/3,(-Math.sqrt(3)*y-N+1)/3,(Math.sqrt(3)*y-N+1)/3]}let Tu=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>{let Kt=Re.transform;return{u_is_size_zoom_constant:+(pe==="constant"||pe==="source"),u_is_size_feature_constant:+(pe==="constant"||pe==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+N,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:Re.options.fadeDuration?Re.symbolFadeChange:1,u_label_plane_matrix:je,u_coord_matrix:Ze,u_is_text:+ft,u_pitch_with_map:+ie,u_is_along_line:fe,u_is_variable_anchor:be,u_texsize:Dt,u_texture:0,u_translation:ut,u_pitched_scale:Gt}},nh=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt)=>{let st=Re.transform;return e.e(Tu(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Kt),{u_gamma_scale:ie?Math.cos(st.pitch*Math.PI/180)*st.cameraToCenterDistance:1,u_device_pixel_ratio:Re.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},vl=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>e.e(nh(pe,y,N,ie,fe,be,Re,je,Ze,ut,!0,ft,!0,Gt),{u_texsize_icon:Dt,u_texture_icon:1}),ml=(pe,y)=>({u_opacity:pe,u_color:y}),rc=(pe,y,N,ie,fe)=>e.e(function(be,Re,je,Ze){let ut=je.imageManager.getPattern(be.from.toString()),ft=je.imageManager.getPattern(be.to.toString()),{width:Dt,height:Gt}=je.imageManager.getPixelSize(),Kt=Math.pow(2,Ze.tileID.overscaledZ),st=Ze.tileSize*Math.pow(2,je.transform.tileZoom)/Kt,It=st*(Ze.tileID.canonical.x+Ze.tileID.wrap*Kt),Ut=st*Ze.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ut.tl,u_pattern_br_a:ut.br,u_pattern_tl_b:ft.tl,u_pattern_br_b:ft.br,u_texsize:[Dt,Gt],u_mix:Re.t,u_pattern_size_a:ut.displaySize,u_pattern_size_b:ft.displaySize,u_scale_a:Re.fromScale,u_scale_b:Re.toScale,u_tile_units_to_pixels:1/e.aK(Ze,1,je.transform.tileZoom),u_pixel_coord_upper:[It>>16,Ut>>16],u_pixel_coord_lower:[65535&It,65535&Ut]}}(N,fe,y,ie),{u_opacity:pe}),yl=(pe,y)=>{},qf={fillExtrusion:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillExtrusionPattern:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_height_factor:new e.bp(pe,y.u_height_factor),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),fill:(pe,y)=>({u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillPattern:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutline:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutlinePattern:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),circle:(pe,y)=>({u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(pe,y.u_scale_with_map),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_extrude_scale:new e.c3(pe,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale),u_translate:new e.c3(pe,y.u_translate)}),collisionBox:(pe,y)=>({u_pixel_extrude_scale:new e.c3(pe,y.u_pixel_extrude_scale)}),collisionCircle:(pe,y)=>({u_viewport_size:new e.c3(pe,y.u_viewport_size)}),debug:(pe,y)=>({u_color:new e.b$(pe,y.u_color),u_overlay:new e.b_(pe,y.u_overlay),u_overlay_scale:new e.bp(pe,y.u_overlay_scale)}),depth:yl,clippingMask:yl,heatmap:(pe,y)=>({u_extrude_scale:new e.bp(pe,y.u_extrude_scale),u_intensity:new e.bp(pe,y.u_intensity),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale)}),heatmapTexture:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_color_ramp:new e.b_(pe,y.u_color_ramp),u_opacity:new e.bp(pe,y.u_opacity)}),hillshade:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_latrange:new e.c3(pe,y.u_latrange),u_exaggeration:new e.bp(pe,y.u_exaggeration),u_altitudes:new e.c9(pe,y.u_altitudes),u_azimuths:new e.c9(pe,y.u_azimuths),u_accent:new e.b$(pe,y.u_accent),u_method:new e.b_(pe,y.u_method),u_shadows:new e.c8(pe,y.u_shadows),u_highlights:new e.c8(pe,y.u_highlights)}),hillshadePrepare:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_image:new e.b_(pe,y.u_image),u_dimension:new e.c3(pe,y.u_dimension),u_zoom:new e.bp(pe,y.u_zoom),u_unpack:new e.c1(pe,y.u_unpack)}),colorRelief:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_unpack:new e.c1(pe,y.u_unpack),u_dimension:new e.c3(pe,y.u_dimension),u_elevation_stops:new e.b_(pe,y.u_elevation_stops),u_color_stops:new e.b_(pe,y.u_color_stops),u_color_ramp_size:new e.b_(pe,y.u_color_ramp_size),u_opacity:new e.bp(pe,y.u_opacity)}),line:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels)}),lineGradient:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height)}),linePattern:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_texsize:new e.c3(pe,y.u_texsize),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_image:new e.b_(pe,y.u_image),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),lineSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_mix:new e.bp(pe,y.u_mix),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),lineGradientSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_image_dash:new e.b_(pe,y.u_image_dash),u_mix:new e.bp(pe,y.u_mix),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),raster:(pe,y)=>({u_tl_parent:new e.c3(pe,y.u_tl_parent),u_scale_parent:new e.bp(pe,y.u_scale_parent),u_buffer_scale:new e.bp(pe,y.u_buffer_scale),u_fade_t:new e.bp(pe,y.u_fade_t),u_opacity:new e.bp(pe,y.u_opacity),u_image0:new e.b_(pe,y.u_image0),u_image1:new e.b_(pe,y.u_image1),u_brightness_low:new e.bp(pe,y.u_brightness_low),u_brightness_high:new e.bp(pe,y.u_brightness_high),u_saturation_factor:new e.bp(pe,y.u_saturation_factor),u_contrast_factor:new e.bp(pe,y.u_contrast_factor),u_spin_weights:new e.c2(pe,y.u_spin_weights),u_coords_top:new e.c1(pe,y.u_coords_top),u_coords_bottom:new e.c1(pe,y.u_coords_bottom)}),symbolIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolSDF:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_is_plain:new e.b_(pe,y.u_is_plain),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolTextAndIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texsize_icon:new e.c3(pe,y.u_texsize_icon),u_texture:new e.b_(pe,y.u_texture),u_texture_icon:new e.b_(pe,y.u_texture_icon),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),background:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_color:new e.b$(pe,y.u_color)}),backgroundPattern:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_image:new e.b_(pe,y.u_image),u_pattern_tl_a:new e.c3(pe,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(pe,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(pe,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(pe,y.u_pattern_br_b),u_texsize:new e.c3(pe,y.u_texsize),u_mix:new e.bp(pe,y.u_mix),u_pattern_size_a:new e.c3(pe,y.u_pattern_size_a),u_pattern_size_b:new e.c3(pe,y.u_pattern_size_b),u_scale_a:new e.bp(pe,y.u_scale_a),u_scale_b:new e.bp(pe,y.u_scale_b),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(pe,y.u_tile_units_to_pixels)}),terrain:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_ele_delta:new e.bp(pe,y.u_ele_delta),u_fog_matrix:new e.c0(pe,y.u_fog_matrix),u_fog_color:new e.b$(pe,y.u_fog_color),u_fog_ground_blend:new e.bp(pe,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(pe,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon_fog_blend:new e.bp(pe,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(pe,y.u_is_globe_mode)}),terrainDepth:(pe,y)=>({u_ele_delta:new e.bp(pe,y.u_ele_delta)}),terrainCoords:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_terrain_coords_id:new e.bp(pe,y.u_terrain_coords_id),u_ele_delta:new e.bp(pe,y.u_ele_delta)}),projectionErrorMeasurement:(pe,y)=>({u_input:new e.bp(pe,y.u_input),u_output_expected:new e.bp(pe,y.u_output_expected)}),atmosphere:(pe,y)=>({u_sun_pos:new e.c2(pe,y.u_sun_pos),u_atmosphere_blend:new e.bp(pe,y.u_atmosphere_blend),u_globe_position:new e.c2(pe,y.u_globe_position),u_globe_radius:new e.bp(pe,y.u_globe_radius),u_inv_proj_matrix:new e.c0(pe,y.u_inv_proj_matrix)}),sky:(pe,y)=>({u_sky_color:new e.b$(pe,y.u_sky_color),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon:new e.c3(pe,y.u_horizon),u_horizon_normal:new e.c3(pe,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(pe,y.u_sky_horizon_blend),u_sky_blend:new e.bp(pe,y.u_sky_blend)})};class ac{constructor(y,N,ie){this.context=y;let fe=y.gl;this.buffer=fe.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),fe.bufferData(fe.ELEMENT_ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?fe.DYNAMIC_DRAW:fe.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let N=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),N.bufferSubData(N.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Mc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class mf{constructor(y,N,ie,fe){this.length=N.length,this.attributes=ie,this.itemSize=N.bytesPerElement,this.dynamicDraw=fe,this.context=y;let be=y.gl;this.buffer=be.createBuffer(),y.bindVertexBuffer.set(this.buffer),be.bufferData(be.ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?be.DYNAMIC_DRAW:be.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let N=this.context.gl;this.bind(),N.bufferSubData(N.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,N){for(let ie of this.attributes){let fe=N.attributes[ie.name];fe!==void 0&&y.enableVertexAttribArray(fe)}}setVertexAttribPointers(y,N,ie){for(let fe of this.attributes){let be=N.attributes[fe.name];be!==void 0&&y.vertexAttribPointer(be,fe.components,y[Mc[fe.type]],!1,this.itemSize,fe.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Jo{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ih extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class fu extends Jo{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Sl extends Jo{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class El extends Jo{getDefault(){return[!0,!0,!0,!0]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class oh extends Jo{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class Au extends Jo{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class $c extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let N=this.current;(y.func!==N.func||y.ref!==N.ref||y.mask!==N.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class _l extends Jo{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class nl extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.STENCIL_TEST):N.disable(N.STENCIL_TEST),this.current=y,this.dirty=!1}}class gf extends Jo{getDefault(){return[0,1]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Kc extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.DEPTH_TEST):N.disable(N.DEPTH_TEST),this.current=y,this.dirty=!1}}class sh extends Jo{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class hu extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.BLEND):N.disable(N.BLEND),this.current=y,this.dirty=!1}}class Uu extends Jo{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class qu extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class nc extends Jo{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class yf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.CULL_FACE):N.disable(N.CULL_FACE),this.current=y,this.dirty=!1}}class _f extends Jo{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class Mu extends Jo{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class ic extends Jo{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class Sc extends Jo{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Vu extends Jo{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class xo extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class Ec extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindRenderbuffer(N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class xh extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindTexture(N.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class Vf extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindBuffer(N.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class xf extends Jo{getDefault(){return null}set(y){let N=this.gl;N.bindBuffer(N.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class Gf extends Jo{getDefault(){return null}set(y){var N;if(y===this.current&&!this.dirty)return;let ie=this.gl;Ko(ie)?ie.bindVertexArray(y):(N=ie.getExtension("OES_vertex_array_object"))===null||N===void 0||N.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class bh extends Jo{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class Hf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class il extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class kl extends Jo{constructor(y,N){super(y),this.context=y,this.parent=N}getDefault(){return null}}class kc extends kl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class Cc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Lc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_STENCIL_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let vc="Framebuffer is not complete";class Ft{constructor(y,N,ie,fe,be){this.context=y,this.width=N,this.height=ie;let Re=y.gl,je=this.framebuffer=Re.createFramebuffer();if(this.colorAttachment=new kc(y,je),fe)this.depthAttachment=be?new Lc(y,je):new Cc(y,je);else if(be)throw new Error("Stencil cannot be set without depth");if(Re.checkFramebufferStatus(Re.FRAMEBUFFER)!==Re.FRAMEBUFFER_COMPLETE)throw new Error(vc)}destroy(){let y=this.context.gl,N=this.colorAttachment.get();if(N&&y.deleteTexture(N),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class tr{constructor(y){var N,ie;if(this.gl=y,this.clearColor=new ih(this),this.clearDepth=new fu(this),this.clearStencil=new Sl(this),this.colorMask=new El(this),this.depthMask=new oh(this),this.stencilMask=new Au(this),this.stencilFunc=new $c(this),this.stencilOp=new _l(this),this.stencilTest=new nl(this),this.depthRange=new gf(this),this.depthTest=new Kc(this),this.depthFunc=new sh(this),this.blend=new hu(this),this.blendFunc=new Uu(this),this.blendColor=new qu(this),this.blendEquation=new nc(this),this.cullFace=new yf(this),this.cullFaceSide=new _f(this),this.frontFace=new Mu(this),this.program=new ic(this),this.activeTexture=new Sc(this),this.viewport=new Vu(this),this.bindFramebuffer=new xo(this),this.bindRenderbuffer=new Ec(this),this.bindTexture=new xh(this),this.bindVertexBuffer=new Vf(this),this.bindElementBuffer=new xf(this),this.bindVertexArray=new Gf(this),this.pixelStoreUnpack=new bh(this),this.pixelStoreUnpackPremultiplyAlpha=new Hf(this),this.pixelStoreUnpackFlipY=new il(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),Ko(y)){this.HALF_FLOAT=y.HALF_FLOAT;let fe=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(N=y.RGBA16F)!==null&&N!==void 0?N:fe?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:fe?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let fe=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=fe?.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(y,N){return new ac(this,y,N)}createVertexBuffer(y,N,ie){return new mf(this,y,N,ie)}createRenderbuffer(y,N,ie){let fe=this.gl,be=fe.createRenderbuffer();return this.bindRenderbuffer.set(be),fe.renderbufferStorage(fe.RENDERBUFFER,y,N,ie),this.bindRenderbuffer.set(null),be}createFramebuffer(y,N,ie,fe){return new Ft(this,y,N,ie,fe)}clear({color:y,depth:N,stencil:ie}){let fe=this.gl,be=0;y&&(be|=fe.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),N!==void 0&&(be|=fe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(N),this.depthMask.set(!0)),ie!==void 0&&(be|=fe.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),fe.clear(be)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(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})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,to.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return Ko(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var N;Ko(this.gl)?this.gl.deleteVertexArray(y):(N=this.gl.getExtension("OES_vertex_array_object"))===null||N===void 0||N.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Fr;function wr(pe,y,N,ie,fe){var be,Re;let je=pe.context,Ze=pe.transform,ut=je.gl,ft=pe.useProgram("collisionBox"),Dt=[],Gt=0,Kt=0;for(let Ar of ie){let hr=y.getTile(Ar).getBucket(N);if(!hr)continue;let vr=fe?hr.textCollisionBox:hr.iconCollisionBox,Or=hr.collisionCircleArray;Or.length>0&&(Dt.push({circleArray:Or,circleOffset:Kt,coord:Ar}),Gt+=Or.length/4,Kt=Gt),vr&&ft.draw(je,ut.LINES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,pf(pe.transform),(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),Ze.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),N.id,vr.layoutVertexBuffer,vr.indexBuffer,vr.segments,null,pe.transform.zoom,null,null,vr.collisionVertexBuffer)}if(!fe||!Dt.length)return;let st=pe.useProgram("collisionCircle"),It=new e.ca;It.resize(4*Gt),It._trim();let Ut=0;for(let Ar of Dt)for(let hr=0;hr=0&&(It[ir.associatedIconIndex]={shiftedAnchor:da,angle:Fa})}else Ja(ir.numGlyphs,Kt)}if(Ze){st.clear();let Ut=pe.icon.placedSymbolArray;for(let ir=0;irpe.style.map.terrain.getElevation(ga,mo,ru):null,Ll=N.layout.get("text-rotation-alignment")==="map";La(Fa,pe,fe,Wi,Go,Ar,ut,Ll,ga.toUnwrapped(),ir.width,ir.height,Mo,Ys)}let Ws=fe&&ka||So,Zo=hr||Ws?ea:Ar?Wi:pe.transform.clipSpaceToPixelsMatrix,es=Dn&&N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,$o;$o=Dn?Fa.iconsInText?vl(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,Rn,so,Ra):nh(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,es,Ra):Tu(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,Ra);let _s={program:sn,buffers:za,uniformValues:$o,projectionData:zs,atlasTexture:In,atlasTextureIcon:ti,atlasInterpolation:Jn,atlasInterpolationIcon:Ei,isSDF:Dn,hasHalo:es};if(Or&&Fa.canOverlap){Cr=!0;let Go=za.segments.get();for(let Ys of Go)Ta.push({segments:new e.aV([Ys]),sortKey:Ys.sortKey,state:_s,terrainData:Pn})}else Ta.push({segments:za.segments,sortKey:0,state:_s,terrainData:Pn})}Cr&&Ta.sort((ga,da)=>ga.sortKey-da.sortKey);let ua=(st=N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&st!==void 0?st:1/0,ia=N.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||ua>1;for(let ga of Ta){let da=ga.state;It.activeTexture.set(Ut.TEXTURE0),da.atlasTexture.bind(da.atlasInterpolation,Ut.CLAMP_TO_EDGE),da.atlasTextureIcon&&(It.activeTexture.set(Ut.TEXTURE1),da.atlasTextureIcon&&da.atlasTextureIcon.bind(da.atlasInterpolationIcon,Ut.CLAMP_TO_EDGE));let Fa=da.isSDF&&da.hasHalo;if(Fa){let za=da.uniformValues;za.u_is_halo=1,ia&&(za.u_is_plain=0,Da(da.buffers,ga.segments,N,pe,da.program,ta,ft,Dt,za,da.projectionData,ga.terrainData),za.u_is_halo=0,za.u_is_plain=1)}Da(da.buffers,ga.segments,N,pe,da.program,ta,ft,Dt,da.uniformValues,da.projectionData,ga.terrainData),Fa&&!ia&&(da.uniformValues.u_is_halo=0)}}function Da(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft){let Dt=ie.context;fe.draw(Dt,Dt.gl.TRIANGLES,be,Re,je,pi.backCCW,Ze,ft,ut,N.id,pe.layoutVertexBuffer,pe.indexBuffer,y,N.paint,ie.transform.zoom,pe.programConfigurations.get(N.id),pe.dynamicLayoutVertexBuffer,pe.opacityVertexBuffer)}function Ha(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=Xi.disabled,Ze=new to([Re.ONE,Re.ONE],e.bo.transparent,[!0,!0,!0,!0]),ut=y.getBucket(N);if(!ut)return;let ft=ie.key,Dt=N.heatmapFbos.get(ft);Dt||(Dt=vn(be,y.tileSize,y.tileSize),N.heatmapFbos.set(ft,Dt)),be.bindFramebuffer.set(Dt.framebuffer),be.viewport.set([0,0,y.tileSize,y.tileSize]),be.clear({color:e.bo.transparent});let Gt=ut.programConfigurations.get(N.id),Kt=pe.useProgram("heatmap",Gt,!fe),st=pe.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),It=pe.style.map.terrain.getTerrainData(ie);Kt.draw(be,Re.TRIANGLES,Vi.disabled,je,Ze,pi.disabled,Hc(y,pe.transform.zoom,N.paint.get("heatmap-intensity"),1),It,st,N.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,N.paint,pe.transform.zoom,Gt)}function $a(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=pe.transform;be.setColorMode(pe.colorModeForRenderPass());let Ze=En(be,y),ut=N.key,ft=y.heatmapFbos.get(ut);if(!ft)return;be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,ft.colorAttachment.get()),be.activeTexture.set(Re.TEXTURE1),Ze.bind(Re.LINEAR,Re.CLAMP_TO_EDGE);let Dt=je.getProjectionData({overscaledTileID:N,applyTerrainMatrix:fe,applyGlobeMatrix:!ie});pe.useProgram("heatmapTexture").draw(be,Re.TRIANGLES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,Wc(pe,y,0,1),null,Dt,y.id,pe.rasterBoundsBuffer,pe.quadTriangleIndexBuffer,pe.rasterBoundsSegments,y.paint,je.zoom),ft.destroy(),y.heatmapFbos.delete(ut)}function vn(pe,y,N){var ie,fe;let be=pe.gl,Re=be.createTexture();be.bindTexture(be.TEXTURE_2D,Re),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_S,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_T,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MIN_FILTER,be.LINEAR),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MAG_FILTER,be.LINEAR);let je=(ie=pe.HALF_FLOAT)!==null&&ie!==void 0?ie:be.UNSIGNED_BYTE,Ze=(fe=pe.RGBA16F)!==null&&fe!==void 0?fe:be.RGBA;be.texImage2D(be.TEXTURE_2D,0,Ze,y,N,0,be.RGBA,je,null);let ut=pe.createFramebuffer(y,N,!1,!1);return ut.colorAttachment.set(Re),ut}function En(pe,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(pe,y.colorRamp,pe.gl.RGBA)),y.colorRampTexture}function yi(pe,y,N,ie,fe,be,Re,je){let Ze=256;if(fe.stepInterpolant){let ut=y.getSource().maxzoom,ft=Re.canonical.z===ut?Math.ceil(1<pe.options.anisotropicFilterPitch&&Kt.texParameterf(Kt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let ga=(ft=pe.style.map.terrain)===null||ft===void 0?void 0:ft.getTerrainData(Cr),da=It.getProjectionData({overscaledTileID:Cr,aligned:dr,applyGlobeMatrix:!ut,applyTerrainMatrix:!0}),Fa=tc(ua,Ra,ia.fadeMix,N,je),za=Ut.getMeshFromTileID(Gt,Cr.canonical,be,Re,"raster");st.draw(Gt,Kt.TRIANGLES,ta,fe?fe[Cr.overscaledZ]:Xi.disabled,ir,Ze?pi.frontCCW:pi.backCCW,Fa,ga,da,N.id,za.vertexBuffer,za.indexBuffer,za.segments)}}function Gs(pe,y,N,ie){let fe={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(N===0||ie)return fe;if(pe.fadingParentID){let be=y.getLoadedTile(pe.fadingParentID);if(!be)return fe;let Re=Math.pow(2,be.tileID.overscaledZ-pe.tileID.overscaledZ),je=[pe.tileID.canonical.x*Re%1,pe.tileID.canonical.y*Re%1],Ze=function(ut,ft,Dt){let Gt=m(),Kt=(Gt-ft.timeAdded)/Dt,st=ut.fadingDirection===gt.Incoming,It=e.al((Gt-ut.timeAdded)/Dt,0,1),Ut=e.al(1-Kt,0,1),ir=st?It:Ut;return{tileOpacity:ir,parentTileOpacity:st?Ut:It,fadeMix:{opacity:1,mix:1-ir}}}(pe,be,N);return{parentTile:be,parentScaleBy:Re,parentTopLeft:je,fadeValues:Ze}}if(pe.selfFading){let be=function(Re,je){let Ze=(m()-Re.timeAdded)/je,ut=e.al(Ze,0,1);return{tileOpacity:ut,fadeMix:{opacity:ut,mix:0}}}(pe,N);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:be}}return fe}let Es=new e.bo(1,0,0,1),ns=new e.bo(0,1,0,1),Kn=new e.bo(0,0,1,1),zo=new e.bo(1,0,1,1),gs=new e.bo(0,1,1,1);function js(pe,y,N,ie){zl(pe,0,y+N/2,pe.transform.width,N,ie)}function Cl(pe,y,N,ie){zl(pe,y-N/2,0,N,pe.transform.height,ie)}function zl(pe,y,N,ie,fe,be){let Re=pe.context,je=Re.gl;je.enable(je.SCISSOR_TEST),je.scissor(y*pe.pixelRatio,N*pe.pixelRatio,ie*pe.pixelRatio,fe*pe.pixelRatio),Re.clear({color:be}),je.disable(je.SCISSOR_TEST)}function Kl(pe,y,N){var ie;let fe=pe.context,be=fe.gl,Re=pe.useProgram("debug"),je=Vi.disabled,Ze=Xi.disabled,ut=pe.colorModeForRenderPass(),ft="$debug",Dt=(ie=pe.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(N);fe.activeTexture.set(be.TEXTURE0);let Gt=y.getTileByID(N.key).latestRawTileData,Kt=Math.floor((Gt?.byteLength||0)/1024),st=y.getTile(N).tileSize,It=512/Math.min(st,512)*(N.overscaledZ/pe.transform.zoom)*.5,Ut=N.canonical.toString();N.overscaledZ!==N.canonical.z&&(Ut+=` => ${N.overscaledZ}`),function(dr,Ar){dr.initDebugOverlayCanvas();let hr=dr.debugOverlayCanvas,vr=dr.context.gl,Or=dr.debugOverlayCanvas.getContext("2d");Or.clearRect(0,0,hr.width,hr.height),Or.shadowColor="white",Or.shadowBlur=2,Or.lineWidth=1.5,Or.strokeStyle="white",Or.textBaseline="top",Or.font="bold 36px Open Sans, sans-serif",Or.fillText(Ar,5,5),Or.strokeText(Ar,5,5),dr.debugOverlayTexture.update(hr),dr.debugOverlayTexture.bind(vr.LINEAR,vr.CLAMP_TO_EDGE)}(pe,`${Ut} ${Kt}kB`);let ir=pe.transform.getProjectionData({overscaledTileID:N,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(fe,be.TRIANGLES,je,Ze,to.alphaBlended,pi.disabled,jf(e.bo.transparent,It),null,ir,ft,pe.debugBuffer,pe.quadTriangleIndexBuffer,pe.debugSegments),Re.draw(fe,be.LINE_STRIP,je,Ze,ut,pi.disabled,jf(e.bo.red),Dt,ir,ft,pe.debugBuffer,pe.tileBorderIndexBuffer,pe.debugSegments)}function Gu(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=be.gl,je=pe.transform,Ze=pe.colorModeForRenderPass(),ut=pe.getDepthModeFor3D(),ft=pe.useProgram("terrain");be.bindFramebuffer.set(null),be.viewport.set([0,0,pe.width,pe.height]);for(let Dt of N){let Gt=y.getTerrainMesh(Dt.tileID),Kt=pe.renderToTexture.getTexture(Dt),st=y.getTerrainData(Dt.tileID);be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,Kt.texture);let It=y.getMeshFrameDelta(je.zoom),Ut=je.calculateFogMatrix(Dt.tileID.toUnwrapped()),ir=rh(It,Ut,pe.style.sky,je.pitch,fe),dr=je.getProjectionData({overscaledTileID:Dt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ft.draw(be,Re.TRIANGLES,ut,Xi.disabled,Ze,pi.backCCW,ir,st,dr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function xl(pe,y){if(!y.mesh){let N=new e.aU;N.emplaceBack(-1,-1),N.emplaceBack(1,-1),N.emplaceBack(1,1),N.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new Xn(pe.createVertexBuffer(N,eo.members),pe.createIndexBuffer(ie),e.aV.simpleSegment(0,0,N.length,ie.length))}return y.mesh}let Hu={symbol:function(pe,y,N,ie,fe,be){if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=be,je=Xi.disabled,Ze=pe.colorModeForRenderPass();(N._unevaluatedLayout.hasValue("text-variable-anchor")||N._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ut,ft,Dt,Gt,Kt,st,It,Ut,ir){var dr;let Ar=ft.transform,hr=ft.style.map.terrain,vr=Kt==="map",Or=st==="map";for(let Cr of ut){let ta=Gt.getTile(Cr),ka=ta.getBucket(Dt);if(!(!((dr=ka?.text)===null||dr===void 0)&&dr.segments.get().length))continue;let Ta=e.aw(ka.textSizeData,Ar.zoom),Ra=e.aK(ta,1,ft.transform.zoom),ua=cr(vr,ft.transform,Ra),ia=Dt.layout.get("icon-text-fit")!=="none"&&ka.hasIconData();if(Ta){let ga=Math.pow(2,Ar.zoom-ta.tileID.overscaledZ),da=hr?(Fa,za)=>hr.getElevation(Cr,Fa,za):null;Na(ka,vr,Or,ir,Ar,ua,ga,Ta,ia,e.aL(Ar,ta,It,Ut),Cr.toUnwrapped(),da)}}}(ie,pe,N,y,N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),fe),N.paint.get("icon-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!1,N.paint.get("icon-translate"),N.paint.get("icon-translate-anchor"),N.layout.get("icon-rotation-alignment"),N.layout.get("icon-pitch-alignment"),N.layout.get("icon-keep-upright"),je,Ze,Re),N.paint.get("text-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!0,N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.layout.get("text-keep-upright"),je,Ze,Re),y.map.showCollisionBoxes&&(wr(pe,y,N,ie,!0),wr(pe,y,N,ie,!1))},circle:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("circle-opacity"),Ze=N.paint.get("circle-stroke-width"),ut=N.paint.get("circle-stroke-opacity"),ft=!N.layout.get("circle-sort-key").isConstant();if(je.constantOr(1)===0&&(Ze.constantOr(1)===0||ut.constantOr(1)===0))return;let Dt=pe.context,Gt=Dt.gl,Kt=pe.transform,st=pe.getDepthModeForSublayer(0,Vi.ReadOnly),It=Xi.disabled,Ut=pe.colorModeForRenderPass(),ir=[],dr=Kt.getCircleRadiusCorrection();for(let Ar of ie){let hr=y.getTile(Ar),vr=hr.getBucket(N);if(!vr)continue;let Or=N.paint.get("circle-translate"),Cr=N.paint.get("circle-translate-anchor"),ta=e.aL(Kt,hr,Or,Cr),ka=vr.programConfigurations.get(N.id),Ta=pe.useProgram("circle",ka),Ra=vr.layoutVertexBuffer,ua=vr.indexBuffer,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),ga={programConfiguration:ka,program:Ta,layoutVertexBuffer:Ra,indexBuffer:ua,uniformValues:Gc(pe,hr,N,ta,dr),terrainData:ia,projectionData:Kt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!Re,applyTerrainMatrix:!0})};if(ft){let da=vr.segments.get();for(let Fa of da)ir.push({segments:new e.aV([Fa]),sortKey:Fa.sortKey,state:ga})}else ir.push({segments:vr.segments,sortKey:0,state:ga})}ft&&ir.sort((Ar,hr)=>Ar.sortKey-hr.sortKey);for(let Ar of ir){let{programConfiguration:hr,program:vr,layoutVertexBuffer:Or,indexBuffer:Cr,uniformValues:ta,terrainData:ka,projectionData:Ta}=Ar.state;vr.draw(Dt,Gt.TRIANGLES,st,It,Ut,pi.backCCW,ta,ka,Ta,N.id,Or,Cr,Ar.segments,N.paint,pe.transform.zoom,hr)}},heatmap:function(pe,y,N,ie,fe){if(N.paint.get("heatmap-opacity")===0)return;let be=pe.context,{isRenderingToTexture:Re,isRenderingGlobe:je}=fe;if(pe.style.map.terrain){for(let Ze of ie){let ut=y.getTile(Ze);y.hasRenderableParent(Ze)||(pe.renderPass==="offscreen"?Ha(pe,ut,N,Ze,je):pe.renderPass==="translucent"&&$a(pe,N,Ze,Re,je))}be.viewport.set([0,0,pe.width,pe.height])}else pe.renderPass==="offscreen"?function(Ze,ut,ft,Dt){let Gt=Ze.context,Kt=Gt.gl,st=Ze.transform,It=Xi.disabled,Ut=new to([Kt.ONE,Kt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(ir,dr,Ar){let hr=ir.gl;ir.activeTexture.set(hr.TEXTURE1),ir.viewport.set([0,0,dr.width/4,dr.height/4]);let vr=Ar.heatmapFbos.get(e.cd);vr?(hr.bindTexture(hr.TEXTURE_2D,vr.colorAttachment.get()),ir.bindFramebuffer.set(vr.framebuffer)):(vr=vn(ir,dr.width/4,dr.height/4),Ar.heatmapFbos.set(e.cd,vr))})(Gt,Ze,ft),Gt.clear({color:e.bo.transparent});for(let ir of Dt){if(ut.hasRenderableParent(ir))continue;let dr=ut.getTile(ir),Ar=dr.getBucket(ft);if(!Ar)continue;let hr=Ar.programConfigurations.get(ft.id),vr=Ze.useProgram("heatmap",hr),Or=st.getProjectionData({overscaledTileID:ir,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Cr=st.getCircleRadiusCorrection();vr.draw(Gt,Kt.TRIANGLES,Vi.disabled,It,Ut,pi.backCCW,Hc(dr,st.zoom,ft.paint.get("heatmap-intensity"),Cr),null,Or,ft.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ft.paint,st.zoom,hr)}Gt.viewport.set([0,0,Ze.width,Ze.height])}(pe,y,N,ie):pe.renderPass==="translucent"&&function(Ze,ut){let ft=Ze.context,Dt=ft.gl;ft.setColorMode(Ze.colorModeForRenderPass());let Gt=ut.heatmapFbos.get(e.cd);Gt&&(ft.activeTexture.set(Dt.TEXTURE0),Dt.bindTexture(Dt.TEXTURE_2D,Gt.colorAttachment.get()),ft.activeTexture.set(Dt.TEXTURE1),En(ft,ut).bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(ft,Dt.TRIANGLES,Vi.disabled,Xi.disabled,Ze.colorModeForRenderPass(),pi.disabled,Wc(Ze,ut,0,1),null,null,ut.id,Ze.viewportBuffer,Ze.quadTriangleIndexBuffer,Ze.viewportSegments,ut.paint,Ze.transform.zoom))}(pe,N)},line:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("line-opacity"),Ze=N.paint.get("line-width");if(je.constantOr(1)===0||Ze.constantOr(1)===0)return;let ut=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ft=pe.colorModeForRenderPass(),Dt=N.paint.get("line-dasharray"),Gt=Dt.constantOr(1),Kt=N.paint.get("line-pattern"),st=Kt.constantOr(1),It=N.paint.get("line-gradient"),Ut=N.getCrossfadeParameters(),ir;ir=st?"linePattern":Gt&&It?"lineGradientSDF":Gt?"lineSDF":It?"lineGradient":"line";let dr=pe.context,Ar=dr.gl,hr=pe.transform,vr=!0;for(let Or of ie){let Cr=y.getTile(Or);if(st&&!Cr.patternsLoaded())continue;let ta=Cr.getBucket(N);if(!ta)continue;let ka=ta.programConfigurations.get(N.id),Ta=pe.context.program.get(),Ra=pe.useProgram(ir,ka),ua=vr||Ra.program!==Ta,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),ga=Kt.constantOr(null),da=Dt?.constantOr(null);if(ga&&Cr.imageAtlas){let ui=Cr.imageAtlas,cn=ui.patternPositions[ga.to.toString()],sn=ui.patternPositions[ga.from.toString()];cn&&sn&&ka.setConstantPatternPositions(cn,sn)}else if(da){let ui=N.layout.get("line-cap").constantOr(null)==="round",cn=pe.lineAtlas.getDash(da.to,ui),sn=pe.lineAtlas.getDash(da.from,ui);ka.setConstantDashPositions(cn,sn)}let Fa=hr.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Re,applyTerrainMatrix:!0}),za=hr.getPixelScale(),Cn;st?(Cn=ju(pe,Cr,N,za,Ut),_i(dr,Ar,Cr,ka,Ut)):Gt&&It?(Cn=Zc(pe,Cr,N,za,Ut,ta.lineClipsArray.length),kn(pe,y,dr,Ar,N,ta,Or,ka,Ut)):Gt?(Cn=Ac(pe,Cr,N,za,Ut),ki(pe,dr,Ar,ka,ua,Ut)):It?(Cn=Xc(pe,Cr,N,za,ta.lineClipsArray.length),ri(pe,y,dr,Ar,N,ta,Or)):Cn=al(pe,Cr,N,za);let Dn=pe.stencilModeForClipping(Or);Ra.draw(dr,Ar.TRIANGLES,ut,Dn,ft,pi.disabled,Cn,ia,Fa,N.id,ta.layoutVertexBuffer,ta.indexBuffer,ta.segments,N.paint,pe.transform.zoom,ka,ta.layoutVertexBuffer2),vr=!1}},fill:function(pe,y,N,ie,fe){let be=N.paint.get("fill-color"),Re=N.paint.get("fill-opacity");if(Re.constantOr(1)===0)return;let{isRenderingToTexture:je}=fe,Ze=pe.colorModeForRenderPass(),ut=N.paint.get("fill-pattern"),ft=pe.opaquePassEnabledForLayer()&&!ut.constantOr(1)&&be.constantOr(e.bo.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(pe.renderPass===ft){let Dt=pe.getDepthModeForSublayer(1,pe.renderPass==="opaque"?Vi.ReadWrite:Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!1,je)}if(pe.renderPass==="translucent"&&N.paint.get("fill-antialias")){let Dt=pe.getDepthModeForSublayer(N.getPaintProperty("fill-outline-color")?2:0,Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!0,je)}},fillExtrusion:function(pe,y,N,ie,fe){let be=N.paint.get("fill-extrusion-opacity");if(be===0)return;let{isRenderingToTexture:Re}=fe;if(pe.renderPass==="translucent"){let je=new Vi(pe.context.gl.LEQUAL,Vi.ReadWrite,pe.depthRangeFor3D);if(be!==1||N.paint.get("fill-extrusion-pattern").constantOr(1))Zi(pe,y,N,ie,je,Xi.disabled,to.disabled,Re),Zi(pe,y,N,ie,je,pe.stencilModeFor3D(),pe.colorModeForRenderPass(),Re);else{let Ze=pe.colorModeForRenderPass();Zi(pe,y,N,ie,je,Xi.disabled,Ze,Re)}}},hillshade:function(pe,y,N,ie,fe){if(pe.renderPass!=="offscreen"&&pe.renderPass!=="translucent")return;let{isRenderingToTexture:be}=fe,Re=pe.context,je=pe.style.projection.useSubdivision,Ze=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ut=pe.colorModeForRenderPass();if(pe.renderPass==="offscreen")(function(ft,Dt,Gt,Kt,st,It,Ut){let ir=ft.context,dr=ir.gl,Ar=Kt.paint.get("resampling")==="nearest"?dr.NEAREST:dr.LINEAR;for(let hr of Gt){let vr=Dt.getTile(hr),Or=vr.dem;if(!Or?.data||!vr.needsHillshadePrepare)continue;let Cr=Or.dim,ta=Or.stride,ka=Or.getPixels();if(ir.activeTexture.set(dr.TEXTURE1),ir.pixelStoreUnpackPremultiplyAlpha.set(!1),vr.demTexture||(vr.demTexture=ft.getTileTexture(ta)),vr.demTexture){let Ra=vr.demTexture;Ra.update(ka,{premultiply:!1}),Ra.bind(dr.NEAREST,dr.CLAMP_TO_EDGE)}else vr.demTexture=new e.T(ir,ka,dr.RGBA,{premultiply:!1}),vr.demTexture.bind(dr.NEAREST,dr.CLAMP_TO_EDGE);ir.activeTexture.set(dr.TEXTURE0);let Ta=vr.fbo;if(!Ta){let Ra=new e.T(ir,{width:Cr,height:Cr,data:null},dr.RGBA);Ra.bind(Ar,dr.CLAMP_TO_EDGE),Ta=vr.fbo=ir.createFramebuffer(Cr,Cr,!0,!1),Ta.colorAttachment.set(Ra.texture)}ir.bindFramebuffer.set(Ta.framebuffer),ir.viewport.set([0,0,Cr,Cr]),ft.useProgram("hillshadePrepare").draw(ir,dr.TRIANGLES,st,It,Ut,pi.disabled,Yc(vr.tileID,Or),null,null,Kt.id,ft.rasterBoundsBuffer,ft.quadTriangleIndexBuffer,ft.rasterBoundsSegments),vr.needsHillshadePrepare=!1}})(pe,y,ie,N,Ze,Xi.disabled,ut),Re.viewport.set([0,0,pe.width,pe.height]);else if(pe.renderPass==="translucent")if(je){let[ft,Dt,Gt]=pe.stencilConfigForOverlapTwoPass(ie);Co(pe,y,N,Gt,ft,Ze,ut,!1,be),Co(pe,y,N,Gt,Dt,Ze,ut,!0,be)}else{let[ft,Dt]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Co(pe,y,N,Dt,ft,Ze,ut,!1,be)}},colorRelief:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=pe.style.projection.useSubdivision,je=pe.getDepthModeForSublayer(0,Vi.ReadOnly),Ze=pe.colorModeForRenderPass();if(Re){let[ut,ft,Dt]=pe.stencilConfigForOverlapTwoPass(ie);Fo(pe,y,N,Dt,ut,je,Ze,!1,be),Fo(pe,y,N,Dt,ft,je,Ze,!0,be)}else{let[ut,ft]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Fo(pe,y,N,ft,ut,je,Ze,!1,be)}},raster:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||N.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=y.getSource(),je=pe.style.projection.useSubdivision;if(Re instanceof ke)bo(pe,y,N,ie,null,!1,!1,Re.tileCoords,Re.flippedWindingOrder,be);else if(je){let[Ze,ut,ft]=pe.stencilConfigForOverlapTwoPass(ie);bo(pe,y,N,ft,Ze,!1,!0,Yo,!1,be),bo(pe,y,N,ft,ut,!0,!0,Yo,!1,be)}else{let[Ze,ut]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);bo(pe,y,N,ut,Ze,!1,!0,Yo,!1,be)}},background:function(pe,y,N,ie,fe){var be;let Re=N.paint.get("background-color"),je=N.paint.get("background-opacity");if(je===0)return;let{isRenderingToTexture:Ze}=fe,ut=pe.context,ft=ut.gl,Dt=pe.style.projection,Gt=pe.transform,Kt=Gt.tileSize,st=N.paint.get("background-pattern");if(pe.isPatternMissing(st))return;let It=!st&&Re.a===1&&je===1&&pe.opaquePassEnabledForLayer()?"opaque":"translucent";if(pe.renderPass!==It)return;let Ut=Xi.disabled,ir=pe.getDepthModeForSublayer(0,It==="opaque"?Vi.ReadWrite:Vi.ReadOnly),dr=pe.colorModeForRenderPass(),Ar=pe.useProgram(st?"backgroundPattern":"background"),hr=ie||Je(Gt,{tileSize:Kt,terrain:pe.style.map.terrain});st&&(ut.activeTexture.set(ft.TEXTURE0),pe.imageManager.bind(pe.context));let vr=N.getCrossfadeParameters();for(let Or of hr){let Cr=Gt.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Ze,applyTerrainMatrix:!0}),ta=st?rc(je,pe,st,{tileID:Or,tileSize:Kt},vr):ml(je,Re),ka=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),Ta=Dt.getMeshFromTileID(ut,Or.canonical,!1,!0,"raster");Ar.draw(ut,ft.TRIANGLES,ir,Ut,dr,pi.backCCW,ta,ka,Cr,N.id,Ta.vertexBuffer,Ta.indexBuffer,Ta.segments)}},sky:function(pe,y){let N=pe.context,ie=N.gl,fe=((ft,Dt,Gt)=>{let Kt=Math.cos(Dt.rollInRadians),st=Math.sin(Dt.rollInRadians),It=Xt(Dt),Ut=Dt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ft.properties.get("sky-color"),u_horizon_color:ft.properties.get("horizon-color"),u_horizon:[(Dt.width/2-It*st)*Gt,(Dt.height/2+It*Kt)*Gt],u_horizon_normal:[-st,Kt],u_sky_horizon_blend:ft.properties.get("sky-horizon-blend")*Dt.height/2*Gt,u_sky_blend:Ut}})(y,pe.style.map.transform,pe.pixelRatio),be=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),Re=Xi.disabled,je=pe.colorModeForRenderPass(),Ze=pe.useProgram("sky"),ut=xl(N,y);Ze.draw(N,ie.TRIANGLES,be,Re,je,pi.disabled,fe,null,void 0,"sky",ut.vertexBuffer,ut.indexBuffer,ut.segments)},atmosphere:function(pe,y,N){let ie=pe.context,fe=ie.gl,be=pe.useProgram("atmosphere"),Re=new Vi(fe.LEQUAL,Vi.ReadOnly,[0,1]),je=pe.transform,Ze=function(Ut,ir){let dr=Ut.properties.get("position"),Ar=[-dr.x,-dr.y,-dr.z],hr=e.ap(new Float64Array(16));return Ut.properties.get("anchor")==="map"&&(e.be(hr,hr,ir.rollInRadians),e.bf(hr,hr,-ir.pitchInRadians),e.be(hr,hr,ir.bearingInRadians),e.bf(hr,hr,ir.center.lat*Math.PI/180),e.bI(hr,hr,-ir.center.lng*Math.PI/180)),e.cg(Ar,Ar,hr),Ar}(N,pe.transform),ut=je.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=y.properties.get("atmosphere-blend")*ut.projectionTransition;if(ft===0)return;let Dt=bs(je.worldSize,je.center.lat),Gt=je.inverseProjectionMatrix,Kt=new Float64Array(4);Kt[3]=1,e.aE(Kt,Kt,je.modelViewProjectionMatrix),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1,e.aE(Kt,Kt,Gt),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1;let st=((Ut,ir,dr,Ar,hr)=>({u_sun_pos:Ut,u_atmosphere_blend:ir,u_globe_position:dr,u_globe_radius:Ar,u_inv_proj_matrix:hr}))(Ze,ft,[Kt[0],Kt[1],Kt[2]],Dt,Gt),It=xl(ie,y);be.draw(ie,fe.TRIANGLES,Re,Xi.disabled,to.alphaBlended,pi.disabled,st,null,null,"atmosphere",It.vertexBuffer,It.indexBuffer,It.segments)},custom:function(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=N.implementation,je=pe.style.projection,Ze=pe.transform,ut=Ze.getProjectionDataForCustomLayer(fe),ft={farZ:Ze.farZ,nearZ:Ze.nearZ,fov:Ze.fov*Math.PI/180,modelViewProjectionMatrix:Ze.modelViewProjectionMatrix,projectionMatrix:Ze.projectionMatrix,shaderData:{variantName:je.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; uniform mat4 u_projection_matrix; -${je.shaderPreludeCode.vertexSource}`,define:je.shaderDefine},defaultProjectionData:ut},Dt=Re.renderingMode?Re.renderingMode:"2d";if(pe.renderPass==="offscreen"){let Gt=Re.prerender;Gt&&(pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),Gt.call(Re,be.gl,ft),be.setDirty(),pe.setBaseState())}else if(pe.renderPass==="translucent"){pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),be.setStencilMode(Xi.disabled);let Gt=Dt==="3d"?pe.getDepthModeFor3D():pe.getDepthModeForSublayer(0,Vi.ReadOnly);be.setDepthMode(Gt),Re.render(be.gl,ft),be.setDirty(),pe.setBaseState(),be.bindFramebuffer.set(null)}},debug:function(pe,y,N){for(let ie of N)Kl(pe,y,ie)},debugPadding:function(pe){let y=pe.transform.padding;js(pe,pe.transform.height-(y.top||0),3,Es),js(pe,y.bottom||0,3,ns),Cl(pe,y.left||0,3,Kn),Cl(pe,pe.transform.width-(y.right||0),3,zo);let N=pe.transform.centerPoint;(function(ie,fe,be,Re){zl(ie,fe-1,be-10,2,20,Re),zl(ie,fe-10,be-1,20,2,Re)})(pe,N.x,pe.transform.height-N.y,gs)},terrainDepth:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.tileManager.getRenderableTiles(),Ze=pe.useProgram("terrainDepth");N.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1});for(let ut of je){let ft=y.getTerrainMesh(ut.tileID),Dt=y.getTerrainData(ut.tileID),Gt=fe.getProjectionData({overscaledTileID:ut.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Kt={u_ele_delta:y.getMeshFrameDelta(fe.zoom)};Ze.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Dt,Gt,"terrain",ft.vertexBuffer,ft.indexBuffer,ft.segments)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])},terrainCoords:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.getCoordsTexture(),Ze=y.tileManager.getRenderableTiles(),ut=pe.useProgram("terrainCoords");N.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ft of Ze){let Dt=y.getTerrainMesh(ft.tileID),Gt=y.getTerrainData(ft.tileID);N.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,je.texture);let Kt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(fe.zoom)},st=fe.getProjectionData({overscaledTileID:ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ut.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Gt,st,"terrain",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments),y.coordsIndex.push(ft.tileID.key)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])}};class Su{constructor(y,N){this.drawFunctions=Hu,this.context=new tr(y),this.transform=N,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Di}resize(y,N,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(N*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let fe of this.style._order)this.style._layers[fe].resize()}setup(){let y=this.context,N=new e.aU;N.emplaceBack(0,0),N.emplaceBack(e.a6,0),N.emplaceBack(0,e.a6),N.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(N,eo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,eo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let fe=new e.ch;fe.emplaceBack(0,0,0,0),fe.emplaceBack(e.a6,0,e.a6,0),fe.emplaceBack(0,e.a6,0,e.a6),fe.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(fe,bc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let be=new e.aU;be.emplaceBack(0,0),be.emplaceBack(e.a6,0),be.emplaceBack(0,e.a6),be.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(be,eo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(Re,eo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let je=new e.ci;je.emplaceBack(0),je.emplaceBack(1),je.emplaceBack(3),je.emplaceBack(2),je.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(je);let Ze=new e.aW;Ze.emplaceBack(1,0,2),Ze.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Xi({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO),this.tileExtentMesh=new Xn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,N=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[N.drawingBufferWidth,N.drawingBufferHeight,0]);let fe={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,N.TRIANGLES,Vi.disabled,this.stencilClearMode,to.disabled,pi.disabled,null,null,fe,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,N,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!N?.length)return;this.currentStencilSource=y.source,this.nextStencilID+N.length>256&&this.clearStencil();let fe=this.context;fe.setColorMode(to.disabled),fe.setDepthMode(Vi.disabled);let be={};for(let Re of N)be[Re.key]=this.nextStencilID++;this._renderTileMasks(be,N,ie,!0),this._renderTileMasks(be,N,ie,!1),this._tileClippingMaskIDs=be}_renderTileMasks(y,N,ie,fe){var be;let Re=this.context,je=Re.gl,Ze=this.style.projection,ut=this.transform,ft=this.useProgram("clippingMask");for(let Dt of N){let Gt=y[Dt.key],Kt=(be=this.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Dt),st=Ze.getMeshFromTileID(this.context,Dt.canonical,fe,!0,"stencil"),It=ut.getProjectionData({overscaledTileID:Dt,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ft.draw(Re,je.TRIANGLES,Vi.disabled,new Xi({func:je.ALWAYS,mask:0},Gt,255,je.KEEP,je.KEEP,je.REPLACE),to.disabled,ie?pi.disabled:pi.backCCW,null,Kt,It,"$clipping",st.vertexBuffer,st.indexBuffer,st.segments)}}_renderTilesDepthBuffer(){var y;let N=this.context,ie=N.gl,fe=this.style.projection,be=this.transform,Re=this.useProgram("depth"),je=this.getDepthModeFor3D(),Ze=Je(be,{tileSize:be.tileSize});for(let ut of Ze){let ft=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(ut),Dt=fe.getMeshFromTileID(this.context,ut.canonical,!0,!0,"raster"),Gt=be.getProjectionData({overscaledTileID:ut,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(N,ie.TRIANGLES,je,Xi.disabled,to.disabled,pi.backCCW,null,ft,Gt,"$clipping",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,N=this.context.gl;return new Xi({func:N.NOTEQUAL,mask:255},y,255,N.KEEP,N.KEEP,N.REPLACE)}stencilModeForClipping(y){let N=this.context.gl;return new Xi({func:N.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,N.KEEP,N.KEEP,N.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let N=this.context.gl,ie=y.sort((Re,je)=>je.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(be>1){this.currentStencilSource=void 0,this.nextStencilID+be>256&&this.clearStencil();let Re={};for(let je=0;jeje.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(this.clearStencil(),be>1){let Re={},je={};for(let Ze=0;Ze0};for(let Kt in je){let st=je[Kt];st.used&&st.prepare(this.context),Ze[Kt]=st.getVisibleCoordinates(!1),ut[Kt]=Ze[Kt].slice().reverse(),ft[Kt]=st.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Kt=0;Ktthis.useProgram(Kt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:N.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=N.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){let Kt=this.style._layers[Re[this.currentLayer]],st=je[Kt.source],It=Ze[Kt.source];this._renderTileClippingMasks(Kt,It,!1),this.renderLayer(this,st,Kt,It,Dt)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayervr.source&&!vr.isHidden(It)?[st.tileManagers[vr.source]]:[]),dr=ir.filter(vr=>vr.getSource().type==="vector"),Ar=ir.filter(vr=>vr.getSource().type!=="vector"),hr=vr=>{(!Ut||Ut.getSource().maxzoom0?N.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let N=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!N||!ie}useProgram(y,N,ie=!1,fe=[]){var be;this.cache||(this.cache={});let Re=!!this.style.map.terrain,je=this.style.projection,Ze=ie?Ai.projectionMercator:je.shaderPreludeCode,ut=ie?gi:je.shaderDefine,ft=y+(N?N.cacheKey:"")+`/${ie?qi:je.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(Re?"/terrain":"")+(fe?`/${fe.join("/")}`:"");return(be=this.cache)[ft]||(be[ft]=new ah(this.context,Ai[y],N,qf[y],this._showOverdrawInspector,Re,Ze,ut,fe)),this.cache[ft]}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 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)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,N;if(this._tileTextures){for(let ie in this._tileTextures){let fe=this._tileTextures[ie];if(fe)for(let be of fe)be.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((N=this.tileExtentMesh.indexBuffer)===null||N===void 0||N.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let fe=this.cache[ie];fe?.program&&this.context.gl.deleteProgram(fe.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:N}=this.context.gl;return this.width!==y||this.height!==N}}function mc(pe,y){let N,ie=!1,fe=null,be=()=>{fe=null,ie&&(pe(...N),fe=setTimeout(be,y),ie=!1)};return(...Re)=>(ie=!0,N=Re,fe||be(),fe)}Su.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Jc{constructor(y){this._getCurrentHash=()=>{let N=window.location.hash.replace("#","");if(this._hashName){let ie,fe=N.split("&").map(be=>be.split("="));for(let be of fe)be[0]===this._hashName&&(ie=be);return(ie&&ie[1]||"").split("/")}return N.split("/")},this._onHashChange=()=>{let N=this._getCurrentHash();if(!this._isValidHash(N))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(N[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+N[2],+N[1]],zoom:+N[0],bearing:ie,pitch:+(N[4]||0)}),!0},this._updateHashUnthrottled=()=>{let N=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,N)},this._removeHash=()=>{let N=this._getCurrentHash();if(N.length===0)return;let ie=N.join("/"),fe=ie;fe.split("&").length>0&&(fe=fe.split("&")[0]),this._hashName&&(fe=`${this._hashName}=${ie}`);let be=window.location.hash.replace(fe,"");be.startsWith("#&")?be=be.slice(0,1)+be.slice(2):be==="#"&&(be="");let Re=window.location.href.replace(/(#.+)?$/,be);Re=Re.replace("&&","&"),window.history.replaceState(window.history.state,null,Re)},this._updateHash=mc(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,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(y){let N=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,fe=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),be=Math.pow(10,fe),Re=Math.round(N.lng*be)/be,je=Math.round(N.lat*be)/be,Ze=this._map.getBearing(),ut=this._map.getPitch(),ft="";if(ft+=y?`/${Re}/${je}/${ie}`:`${ie}/${je}/${Re}`,(Ze||ut)&&(ft+="/"+Math.round(10*Ze)/10),ut&&(ft+=`/${Math.round(ut)}`),this._hashName){let Dt=this._hashName,Gt=!1,Kt=window.location.hash.slice(1).split("&").map(st=>{let It=st.split("=")[0];return It===Dt?(Gt=!0,`${It}=${ft}`):st}).filter(st=>st);return Gt||Kt.push(`${Dt}=${ft}`),`#${Kt.join("&")}`}return`#${ft}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let N=+y[0],ie=+(y[3]||0),fe=+(y[4]||0);return N>=this._map.getMinZoom()&&N<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&fe>=this._map.getMinPitch()&&fe<=this._map.getMaxPitch()}}let oc={linearity:.3,easing:e.cv(0,0,.3,1)},du=e.e({deceleration:2500,maxSpeed:1400},oc),Jl=e.e({deceleration:20,maxSpeed:1400},oc),Ql=e.e({deceleration:1e3,maxSpeed:360},oc),Eu=e.e({deceleration:1e3,maxSpeed:90},oc),bf=e.e({deceleration:1e3,maxSpeed:360},oc);class lh{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:m(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,N=m();for(;y.length>0&&N-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let N={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:be}of this._inertiaBuffer)N.zoom+=be.zoomDelta||0,N.bearing+=be.bearingDelta||0,N.pitch+=be.pitchDelta||0,N.roll+=be.rollDelta||0,be.panDelta&&N.pan._add(be.panDelta),be.around&&(N.around=be.around),be.pinchAround&&(N.pinchAround=be.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,fe={};if(N.pan.mag()){let be=Ks(N.pan.mag(),ie,e.e({},du,y||{})),Re=N.pan.mult(be.amount/N.pan.mag()),je=this._map.cameraHelper.handlePanInertia(Re,this._map.transform);fe.center=je.easingCenter,fe.offset=je.easingOffset,Pc(fe,be)}if(N.zoom){let be=Ks(N.zoom,ie,Jl);fe.zoom=e.cw(this._map.transform.zoom+be.amount,this._map.getZoomSnap(),be.amount),Pc(fe,be)}if(N.bearing){let be=Ks(N.bearing,ie,Ql);fe.bearing=this._map.transform.bearing+e.al(be.amount,-179,179),Pc(fe,be)}if(N.pitch){let be=Ks(N.pitch,ie,Eu);fe.pitch=this._map.transform.pitch+be.amount,Pc(fe,be)}if(N.roll){let be=Ks(N.roll,ie,bf);fe.roll=this._map.transform.roll+e.al(be.amount,-179,179),Pc(fe,be)}if(fe.zoom||fe.bearing){let be=N.pinchAround===void 0?N.around:N.pinchAround;fe.around=be?this._map.unproject(be):this._map.getCenter()}return this.clear(),e.e(fe,{noMoveStart:!0})}}function Pc(pe,y){(!pe.duration||pe.durationN.unproject(Ze)),je=be.reduce((Ze,ut,ft,Dt)=>Ze.add(ut.div(Dt.length)),new e.P(0,0));super(y,{points:be,point:je,lngLats:Re,lngLat:N.unproject(je),originalEvent:ie}),this._defaultPrevented=!1}}class wf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,N,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class Qc{constructor(y,N){this._map=y,this._clickTolerance=N.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new wf(y.type,this._map,y))}mousedown(y,N){return this._mousedownPos=N,this._firePreventable(new Bl(y.type,this._map,y))}mouseup(y){this._map.fire(new Bl(y.type,this._map,y))}click(y,N){this._mousedownPos&&this._mousedownPos.dist(N)>=this._clickTolerance||this._map.fire(new Bl(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Bl(y.type,this._map,y))}mouseover(y){this._map.fire(new Bl(y.type,this._map,y))}mouseout(y){this._map.fire(new Bl(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Wu(y.type,this._map,y))}touchmove(y){this._map.fire(new Wu(y.type,this._map,y))}touchend(y){this._map.fire(new Wu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Wu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ku{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Bl(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Bl(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ol{constructor(y){this._map=y}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(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Nl{constructor(y,N){this._map=y,this._tr=new Ol(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=N.clickTolerance||1,N.boxZoom&&typeof N.boxZoom=="object"&&(this._boxZoomEnd=N.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,N){this.isEnabled()&&y.shiftKey&&y.button===0&&(g.disableDrag(),this._startPos=this._lastPos=N,this._active=!0)}mousemoveWindow(y,N){if(!this._active)return;let ie=N;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)be.fitScreenCoordinates(ie,fe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),g.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,N){return this._map.fire(new e.n(y,{originalEvent:N}))}}function fi(pe,y){if(pe.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${pe.length}, points ${y.length}`);let N={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(fe){let be=new e.P(0,0);for(let Re of fe)be._add(Re);return be.div(fe.length)}(N),this.touches=fi(ie,N)))}touchmove(y,N,ie){if(this.aborted||!this.centroid)return;let fe=fi(ie,N);for(let be in this.touches){let Re=fe[be];(!Re||Re.dist(this.touches[be])>30)&&(this.aborted=!0)}}touchend(y,N,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let fe=!this.aborted&&this.centroid;if(this.reset(),fe)return fe}}}class $e{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,N,ie){this.singleTap.touchstart(y,N,ie)}touchmove(y,N,ie){this.singleTap.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this.singleTap.touchend(y,N,ie);if(fe){let be=y.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(fe)<30;if(be&&Re||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=fe,this.count===this.numTaps)return this.reset(),fe}}}class nt{constructor(y){this._tr=new Ol(y),this._zoomIn=new $e({numTouches:1,numTaps:2}),this._zoomOut=new $e({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,N,ie){this._zoomIn.touchstart(y,N,ie),this._zoomOut.touchstart(y,N,ie)}touchmove(y,N,ie){this._zoomIn.touchmove(y,N,ie),this._zoomOut.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this._zoomIn.touchend(y,N,ie),be=this._zoomOut.touchend(y,N,ie),Re=this._tr;return fe?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom+1,je.getZoomSnap()),around:Re.unproject(fe)},{originalEvent:y})}):be?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom-1,je.getZoomSnap()),around:Re.unproject(be)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let N=this._moveFunction(...y);if(N.bearingDelta||N.pitchDelta||N.rollDelta||N.around||N.panDelta)return this._active=!0,N}dragStart(y,N){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(N)?N[0]:N,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,N){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let fe=Array.isArray(N)?N[0]:N;return!this._moved&&fe.dist(ie)!0}),N=new Pr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=N}_executeRelevantHandler(y,N,ie){return y instanceof MouseEvent?N(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.startMove(N)},N=>{this.oneFingerTouchMoveStateManager.startMove(N)})}endMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.endMove(N)},N=>{this.oneFingerTouchMoveStateManager.endMove(N)})}isValidStartEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidStartEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidStartEvent(N))}isValidMoveEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidMoveEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(N))}isValidEndEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidEndEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidEndEvent(N))}}let kr=pe=>{pe.mousedown=pe.dragStart,pe.mousemoveWindow=pe.dragMove,pe.mouseup=pe.dragEnd,pe.contextmenu=y=>{y.preventDefault()}};class jr{constructor(y,N){this._clickTolerance=y.clickTolerance||1,this._map=N,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,N,ie){return this._calculateTransform(y,N,ie)}touchmove(y,N,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,N,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,N,ie){this._calculateTransform(y,N,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,N,ie){ie.length>0&&(this._active=!0);let fe=fi(ie,N),be=new e.P(0,0),Re=new e.P(0,0),je=0;for(let ut in fe){let ft=fe[ut],Dt=this._touches[ut];Dt&&(be._add(ft),Re._add(ft.sub(Dt)),je++,fe[ut]=ft)}if(this._touches=fe,this._shouldBePrevented(je)||!Re.mag())return;let Ze=Re.div(je);return this._sum._add(Ze),this._sum.mag()Math.abs(pe.x)}class Si extends Jr{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,N,ie){super.touchstart(y,N,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,ii(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,N,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let fe=y[0].sub(this._lastPoints[0]),be=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(fe,be,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(fe.y+be.y)/2*-.5}):void 0}gestureBeginsVertically(y,N,ie){if(this._valid!==void 0)return this._valid;let fe=y.mag()>=2,be=N.mag()>=2;if(!fe&&!be)return;if(!fe||!be)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let Re=y.y>0==N.y>0;return ii(y)&&ii(N)&&Re}}let oi={panStep:100,bearingStep:15,pitchStep:10};class Ji{constructor(y){this._tr=new Ol(y);let N=oi;this._panStep=N.panStep,this._bearingStep=N.bearingStep,this._pitchStep=N.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let N=0,ie=0,fe=0,be=0,Re=0;switch(y.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),be=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),be=1);break;case 38:y.shiftKey?fe=1:(y.preventDefault(),Re=-1);break;case 40:y.shiftKey?fe=-1:(y.preventDefault(),Re=1);break;default:return}return this._rotationDisabled&&(ie=0,fe=0),{cameraAnimation:je=>{let Ze=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:Qi,zoom:N?e.cw(Ze.zoom+N*(y.shiftKey?2:1),je.getZoomSnap()):Ze.zoom,bearing:Ze.bearing+ie*this._bearingStep,pitch:Ze.pitch+fe*this._pitchStep,offset:[-be*this._panStep,-Re*this._panStep],center:Ze.center},{originalEvent:y})}}}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 Qi(pe){return pe*(2-pe)}let Oo=4.000244140625,Qo=1/450;class vo{constructor(y,N){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new Ol(y),this._triggerRenderFrame=N,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Qo}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let N=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=m(),fe=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,N!==0&&N%Oo==0?this._type="wheel":N!==0&&Math.abs(N)<4?this._type="trackpad":fe>400?(this._type=null,this._lastValue=N,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(fe*N)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,N+=this._lastValue)),y.shiftKey&&N&&(N/=4),this._type&&(this._lastWheelEvent=y,this._delta-=N,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let N=g.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):N,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let je=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=je),typeof this._targetZoom=="number"&&(this._targetZoom+=je)}if(this._delta!==0){let je=this._type==="wheel"&&Math.abs(this._delta)>Oo?this._wheelZoomRate:this._defaultZoomRate,Ze=2/(1+Math.exp(-Math.abs(this._delta*je)));this._delta<0&&Ze!==0&&(Ze=1/Ze);let ut=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ft=y.applyConstrain(y.getCameraLngLat(),e.ar(ut*Ze)).zoom,Dt=this._map.getZoomSnap();if(this._type==="wheel"&&Dt>0){let Gt=e.cw(y.zoom,Dt);this._targetZoom=e.cw(ft,Dt,ft-Gt)}else this._targetZoom=ft;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let N=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,fe=this._easing,be,Re=!1;if(this._type==="wheel"&&ie&&fe){let je=m()-this._lastWheelEventTime,Ze=Math.min((je+5)/200,1),ut=fe(Ze);be=e.H.number(ie,N,ut),Ze<1?this._needsRerender=!0:Re=!0}else be=N,Re=!0;return this._active=!0,Re&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=be,{noInertia:!0,needsRenderFrame:!Re,zoomDelta:be-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let N=e.cy;if(this._prevEase){let ie=this._prevEase,fe=(m()-ie.start)/ie.duration,be=ie.easing(fe+.01)-ie.easing(fe),Re=.27/Math.sqrt(be*be+1e-4)*.01,je=Math.sqrt(.0729-Re*Re);N=e.cv(Re,je,.25,1)}return this._prevEase={start:m(),duration:y,easing:N},N}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ys{constructor(y,N){this._clickZoom=y,this._tapZoom=N}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 ol{constructor(y){this._tr=new Ol(y),this.reset()}reset(){this._active=!1}dblclick(y,N){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(N)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class jl{constructor(){this._tap=new $e({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,N,ie){if(!this._swipePoint)if(this._tapTime){let fe=N[0],be=y.timeStamp-this._tapTime<500,Re=this._tapPoint.dist(fe)<30;be&&Re?ie.length>0&&(this._swipePoint=fe,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,N,ie)}touchmove(y,N,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let fe=N[0],be=fe.y-this._swipePoint.y;return this._swipePoint=fe,y.preventDefault(),this._active=!0,{zoomDelta:be/128*this._zoomRate}}}else this._tap.touchmove(y,N,ie)}touchend(y,N,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let fe=this._tap.touchend(y,N,ie);fe&&(this._tapTime=y.timeStamp,this._tapPoint=fe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hs{constructor(y,N,ie){this._el=y,this._mousePan=N,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},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 Cu{constructor(y,N,ie,fe){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=N,this._mousePitch=ie,this._mouseRoll=fe}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class hi{constructor(y,N,ie,fe){this._el=y,this._touchZoom=N,this._touchRotate=ie,this._tapDragZoom=fe,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),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()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class wi{constructor(y,N){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=N,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=g.create("div","maplibregl-cooperative-gesture-screen",y);let N=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(N=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),fe=document.createElement("div");fe.className="maplibregl-desktop-message",fe.textContent=N,this._container.appendChild(fe);let be=document.createElement("div");be.className="maplibregl-mobile-message",be.textContent=ie,this._container.appendChild(be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),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(y){return y[this._bypassKey]}notifyGestureBlocked(y,N){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:N})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let sl=pe=>pe.zoom||pe.drag||pe.roll||pe.pitch||pe.rotate;class sc extends e.n{}function tu(pe){var y;return((y=pe.panDelta)===null||y===void 0?void 0:y.mag())||pe.zoomDelta||pe.bearingDelta||pe.pitchDelta||pe.rollDelta}class Ps{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,N;return((N=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||N===void 0?void 0:N.defaultView)||window}constructor(y,N){this.handleWindowEvent=fe=>{this.handleEvent(fe,`${fe.type}Window`)},this.handleEvent=(fe,be)=>{if(fe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Re=fe.type==="renderFrame"?void 0:fe,je={needsRenderFrame:!1},Ze={},ut={};for(let{handlerName:Gt,handler:Kt,allowed:st}of this._handlers){if(!Kt.isEnabled())continue;let It;if(this._blockedByActive(ut,st,Gt))Kt.reset();else if(Kt[be||fe.type]){if(e.cz(fe,be||fe.type)){let Ut=g.mousePos(this._map.getCanvas(),fe);It=Kt[be||fe.type](fe,Ut)}else if(e.cA(fe,be||fe.type)){let Ut=this._getMapTouches(fe.touches),ir=g.touchPos(this._map.getCanvas(),Ut);It=Kt[be||fe.type](fe,ir,Ut)}else e.cB(be||fe.type)||(It=Kt[be||fe.type](fe));this.mergeHandlerResult(je,Ze,It,Gt,Re),It?.needsRenderFrame&&this._triggerRenderFrame()}(It||Kt.isActive())&&(ut[Gt]=Kt)}let ft={};for(let Gt in this._previousActiveHandlers)ut[Gt]||(ft[Gt]=Re);this._previousActiveHandlers=ut,(Object.keys(ft).length||tu(je))&&(this._changes.push([je,Ze,ft]),this._triggerRenderFrame()),(Object.keys(ut).length||tu(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Dt}=je;Dt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Dt(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lh(y),this._bearingSnap=N.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(N);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[fe,be,Re]of this._listeners)fe.addEventListener(be,fe===this._ownerDocument?this.handleWindowEvent:this.handleEvent,Re)}destroy(){for(let[y,N,ie]of this._listeners)y.removeEventListener(N,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let N=this._map,ie=N.getCanvasContainer();this._add("mapEvent",new Qc(N,y));let fe=N.boxZoom=new Nl(N,y);this._add("boxZoom",fe),y.interactive&&y.boxZoom&&fe.enable();let be=N.cooperativeGestures=new wi(N,y.cooperativeGestures);this._add("cooperativeGestures",be),y.cooperativeGestures&&be.enable();let Re=new nt(N),je=new ol(N);N.doubleClickZoom=new ys(je,Re),this._add("tapZoom",Re),this._add("clickZoom",je),y.interactive&&y.doubleClickZoom&&N.doubleClickZoom.enable();let Ze=new jl;this._add("tapDragZoom",Ze);let ut=N.touchPitch=new Si(N);this._add("touchPitch",ut),y.interactive&&y.touchPitch&&N.touchPitch.enable(y.touchPitch);let ft=()=>N.project(N.getCenter()),Dt=function({enable:hr,clickTolerance:vr,aroundCenter:Or=!0,minPixelCenterThreshold:Cr=100,rotateDegreesPerPixelMoved:ta=.8},ka){let Ta=new Wt({checkCorrectEvent:Ra=>Ra.button===0&&Ra.ctrlKey||Ra.button===2&&!Ra.ctrlKey});return new mt({clickTolerance:vr,move:(Ra,ua)=>{let ia=ka();if(Or&&Math.abs(ia.y-Ra.y)>Cr)return{bearingDelta:e.cx(new e.P(Ra.x,ua.y),ua,ia)};let ma=(ua.x-Ra.x)*ta;return Or&&ua.yta.button===0&&ta.ctrlKey||ta.button===2});return new mt({clickTolerance:vr,move:(ta,ka)=>({pitchDelta:(ka.y-ta.y)*Or}),moveStateManager:Cr,enable:hr,assignEvents:kr})}(y),Kt=function({enable:hr,clickTolerance:vr,rollDegreesPerPixelMoved:Or=.3},Cr){let ta=new Wt({checkCorrectEvent:ka=>ka.button===2&&ka.ctrlKey});return new mt({clickTolerance:vr,move:(ka,Ta)=>{let Ra=Cr(),ua=(Ta.x-ka.x)*Or;return Ta.yCr.button===0&&!Cr.ctrlKey});return new mt({clickTolerance:vr,move:(Cr,ta)=>({around:ta,panDelta:ta.sub(Cr)}),activateOnStart:!0,moveStateManager:Or,enable:hr,assignEvents:kr})}(y),It=new jr(y,N);N.dragPan=new Hs(ie,st,It),this._add("mousePan",st),this._add("touchPan",It,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&N.dragPan.enable(y.dragPan);let Ut=new wn,ir=new Ba;N.touchZoomRotate=new hi(ie,ir,Ut,Ze),this._add("touchRotate",Ut,["touchPan","touchZoom"]),this._add("touchZoom",ir,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&N.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new ku(N));let dr=N.scrollZoom=new vo(N,()=>this._triggerRenderFrame());this._add("scrollZoom",dr,["mousePan"]),y.interactive&&y.scrollZoom&&N.scrollZoom.enable(y.scrollZoom);let Ar=N.keyboard=new Ji(N);this._add("keyboard",Ar),y.interactive&&y.keyboard&&N.keyboard.enable()}_add(y,N,ie){this._handlers.push({handlerName:y,handler:N,allowed:ie}),this._handlersById[y]=N}stop(y){if(!this._updatingCamera){for(let{handler:N}of this._handlers)N.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!sl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,N,ie){for(let fe in y)if(fe!==ie&&!N?.includes(fe))return!0;return!1}_getMapTouches(y){let N=[];for(let ie of y)this._el.contains(ie.target)&&N.push(ie);return N}mergeHandlerResult(y,N,ie,fe,be){if(!ie)return;e.e(y,ie);let Re={handlerName:fe,originalEvent:ie.originalEvent||be};ie.zoomDelta!==void 0&&(N.zoom=Re),ie.panDelta!==void 0&&(N.drag=Re),ie.rollDelta!==void 0&&(N.roll=Re),ie.pitchDelta!==void 0&&(N.pitch=Re),ie.bearingDelta!==void 0&&(N.rotate=Re)}_applyChanges(){let y={},N={},ie={};for(let[fe,be,Re]of this._changes)fe.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(fe.panDelta)),fe.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+fe.zoomDelta),fe.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+fe.bearingDelta),fe.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+fe.pitchDelta),fe.rollDelta&&(y.rollDelta=(y.rollDelta||0)+fe.rollDelta),fe.around!==void 0&&(y.around=fe.around),fe.pinchAround!==void 0&&(y.pinchAround=fe.pinchAround),fe.noInertia&&(y.noInertia=fe.noInertia),e.e(N,be),e.e(ie,Re);this._updateMapTransform(y,N,ie),this._changes=[]}_updateMapTransform(y,N,ie){let fe=this._map,be=fe._getTransformForUpdate(),Re=fe.terrain;if(!(tu(y)||Re&&this._terrainMovement))return void this._fireEvents(N,ie,!0);fe._stop(!0);let{panDelta:je,zoomDelta:Ze,bearingDelta:ut,pitchDelta:ft,rollDelta:Dt,around:Gt,pinchAround:Kt}=y;Kt!==void 0&&(Gt=Kt),Gt||(Gt=fe.transform.centerPoint),Re&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let st={panDelta:je,zoomDelta:Ze,rollDelta:Dt,pitchDelta:ft,bearingDelta:ut,around:Gt};this._map.cameraHelper.useGlobeControls&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let It=Gt.distSqr(be.centerPoint)<.01?be.center:be.screenPointToLocation(je?Gt.sub(je):Gt);this._handleMapControls({terrain:Re,tr:be,deltasForHelper:st,preZoomAroundLoc:It,combinedEventsInProgress:N,panDelta:je}),fe._applyUpdatedTransform(be),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(N,ie,!0)}_handleMapControls({terrain:y,tr:N,deltasForHelper:ie,preZoomAroundLoc:fe,combinedEventsInProgress:be,panDelta:Re}){let je=this._map.cameraHelper;if(je.handleMapControlsRollPitchBearingZoom(ie,N),y)return je.useGlobeControls?(this._terrainMovement||!be.drag&&!be.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void je.handleMapControlsPan(ie,N,fe)):this._terrainMovement||!be.drag&&!be.zoom?void(be.drag&&this._terrainMovement&&Re?N.setCenter(N.screenPointToLocation(N.centerPoint.sub(Re))):je.handleMapControlsPan(ie,N,fe)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void je.handleMapControlsPan(ie,N,fe));je.handleMapControlsPan(ie,N,fe)}_fireEvents(y,N,ie){let fe=sl(this._eventsInProgress),be=sl(y),Re={};for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._eventsInProgress[Dt]||(Re[`${Dt}start`]=Gt),this._eventsInProgress[Dt]=y[Dt]}!fe&&be&&this._fireEvent("movestart",be.originalEvent);for(let Dt in Re)this._fireEvent(Dt,Re[Dt]);be&&this._fireEvent("move",be.originalEvent);for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._fireEvent(Dt,Gt)}let je={},Ze;for(let Dt in this._eventsInProgress){let{handlerName:Gt,originalEvent:Kt}=this._eventsInProgress[Dt];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Dt],Ze=N[Gt]||Kt,je[`${Dt}end`]=Ze)}for(let Dt in je)this._fireEvent(Dt,je[Dt]);let ut=sl(this._eventsInProgress),ft=(fe||be)&&!ut;if(ft&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Dt=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Dt.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Dt)}if(ie&&ft){this._updatingCamera=!0;let Dt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Kt=>Kt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new sc("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class gc extends e.E{constructor(y,N,ie){super(),this._renderFrameCallback=()=>{let fe=Math.min((m()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(fe)),fe<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=N,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,N){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=N}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,N){return this.jumpTo({center:y},N)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,N){return this.jumpTo({elevation:y},N),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,N,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},N),ie)}panTo(y,N,ie){return this.easeTo(e.e({center:y},N),ie)}getZoom(){return this.transform.zoom}setZoom(y,N){return this.jumpTo({zoom:y},N),this}zoomTo(y,N,ie){return this.easeTo(e.e({zoom:y},N),ie)}zoomIn(y,N){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,N),this}zoomOut(y,N){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,N),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,N){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",N)).fire(new e.n("move",N)).fire(new e.n("moveend",N))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,N){return this.jumpTo({bearing:y},N),this}getPadding(){return this.transform.padding}setPadding(y,N){return this.jumpTo({padding:y},N),this}rotateTo(y,N,ie){return this.easeTo(e.e({bearing:y},N),ie)}resetNorth(y,N){return this.rotateTo(0,e.e({duration:1e3},y),N),this}resetNorthPitch(y,N){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),N),this}snapToNorth(y,N){return Math.abs(this.getBearing()){It.easeFunc(Ut),this.terrain&&!y.freezeElevation&&this._updateElevation(Ut),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},Ut=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N,Ut)},y),this}_prepareEase(y,N,ie={}){this._moving=!0,N||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let N=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&N!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(N-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=N}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let N=y.getCameraLngLat(),ie=y.getCameraAltitude(),fe=this.terrain?this.terrain.getElevationForLngLatZoom(N,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(fe)),this.transformCameraUpdate&&N.push(fe=>this.transformCameraUpdate(fe)),!N.length)return;let ie=y.clone();for(let fe of N){let be=ie.clone(),{center:Re,zoom:je,roll:Ze,pitch:ut,bearing:ft,elevation:Dt}=fe(be);Re&&be.setCenter(Re),Dt!==void 0&&be.setElevation(Dt),je!==void 0&&be.setZoom(je),Ze!==void 0&&be.setRoll(Ze),ut!==void 0&&be.setPitch(ut),ft!==void 0&&be.setBearing(ft),ie.apply(be,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,N){if(this._easeId&&N&&this._easeId===N)return;delete this._easeId;let ie=this._zooming,fe=this._rotating,be=this._pitching,Re=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),fe&&this.fire(new e.n("rotateend",y)),be&&this.fire(new e.n("pitchend",y)),Re&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,N){if(!y.essential&&s.prefersReducedMotion){let ua=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(ua,N)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),fe=ie.bearing,be=ie.pitch,Re=ie.roll,je=ie.padding,Ze="bearing"in y?this._normalizeBearing(y.bearing,fe):fe,ut="pitch"in y?+y.pitch:be,ft="roll"in y?this._normalizeBearing(y.roll,Re):Re,Dt="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Kt=ie.centerPoint.add(Gt),st=ie.screenPointToLocation(Kt),It=this.cameraHelper.handleFlyTo(ie,{bearing:Ze,pitch:ut,roll:ft,padding:Dt,locationAtOffset:st,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),Ut=y.curve,ir=Math.max(ie.width,ie.height),dr=ir/It.scaleOfZoom,Ar=It.pixelPathLength;typeof It.scaleOfMinZoom=="number"&&(Ut=Math.sqrt(ir/It.scaleOfMinZoom/Ar*2));let hr=Ut*Ut;function vr(ua){let ia=(dr*dr-ir*ir+(ua?-1:1)*hr*hr*Ar*Ar)/(2*(ua?dr:ir)*hr*Ar);return Math.log(Math.sqrt(ia*ia+1)-ia)}function Or(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function Cr(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let ta=vr(!1),ka=function(ua){return Cr(ta)/Cr(ta+Ut*ua)},Ta=function(ua){return ir*((Cr(ta)*(Or(ia=ta+Ut*ua)/Cr(ia))-Or(ta))/hr)/Ar;var ia},Ra=(vr(!0)-ta)/Ut;if(Math.abs(Ar)<2e-6||!isFinite(Ra)){if(Math.abs(ir-dr)<1e-6)return this.easeTo(y,N);let ua=dr0,ka=ia=>Math.exp(ua*Ut*ia)}return y.duration="duration"in y?+y.duration:1e3*Ra/("screenSpeed"in y?+y.screenSpeed/Ut:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=fe!==Ze,this._pitching=ut!==be,this._rolling=ft!==Re,this._padding=!ie.isPaddingEqual(Dt),this._prepareEase(N,!1),this.terrain&&this._prepareElevation(It.targetCenter),this._ease(ua=>{let ia=ua*Ra,ma=1/ka(ia),da=Ta(ia);this._rotating&&ie.setBearing(e.H.number(fe,Ze,ua)),this._pitching&&ie.setPitch(e.H.number(be,ut,ua)),this._rolling&&ie.setRoll(e.H.number(Re,ft,ua)),this._padding&&(ie.interpolatePadding(je,Dt,ua),Kt=ie.centerPoint.add(Gt)),It.easeFunc(ua,ma,da,Kt),this.terrain&&!y.freezeElevation&&this._updateElevation(ua),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,N){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let fe=this._onEaseEnd;delete this._onEaseEnd,fe.call(this,N)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,N,ie){ie.animate===!1||ie.duration===0?(y(1),N()):(this._easeStart=m(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=N,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,N){y=e.X(y,-180,180);let ie=Math.abs(y-N);return Math.abs(y-360-N)MapLibre'};class ll{constructor(y=pu){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=N=>{!N||N.sourceDataType!=="metadata"&&N.sourceDataType!=="visibility"&&N.dataType!=="style"&&N.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=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=g.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=g.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=g.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(){this._container.remove(),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(y,N){let ie=this._map._getUIString(`AttributionControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(fe=>typeof fe!="string"?"":fe)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let fe=this._map.style.stylesheet;this.styleOwner=fe.owner,this.styleId=fe.id}let N=this._map.style.tileManagers;for(let fe in N){let be=N[fe];if(be.used||be.usedForTerrain){let Re=be.getSource();Re.attribution&&!y.includes(Re.attribution)&&y.push(Re.attribution)}}y=y.filter(fe=>String(fe).trim()),y.sort((fe,be)=>fe.length-be.length),y=y.filter((fe,be)=>{for(let Re=be+1;Re{let N=this._container.children;if(N.length){let ie=N[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var N;this._map=y,this._compact=(N=this.options)===null||N===void 0?void 0:N.compact,this._container=g.create("div","maplibregl-ctrl");let ie=g.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class de{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let N=++this._id;return this._queue.push({callback:y,id:N,cancelled:!1}),N}remove(y){let N=this._currentlyRunning,ie=N?this._queue.concat(N):this._queue;for(let fe of ie)if(fe.id===y)return void(fe.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let N=this._currentlyRunning=this._queue;this._queue=[];for(let ie of N)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ee=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class qe extends e.E{constructor(y){super(),this._lastTilesetChange=m(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,N){this.tileManager.update(y,N),this._renderableTilesKeys=[];let ie={};for(let fe of Je(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:N,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[fe.key]=!0,this._renderableTilesKeys.push(fe.key),this._tiles[fe.key]||(fe.terrainRttPosMatrix32f=new Float64Array(16),e.c7(fe.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[fe.key]=new Tt(fe,this.tileSize),this._lastTilesetChange=m());for(let fe in this._tiles)ie[fe]||delete this._tiles[fe]}freeRtt(y){for(let N in this._tiles){let ie=this._tiles[N];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,N){return N?this._getTerrainCoordsForTileRanges(y,N):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let N={};for(let ie of this._renderableTilesKeys){let fe=this._tiles[ie].tileID,be=y.clone(),Re=e.bj();if(fe.canonical.equals(y.canonical))e.c7(Re,0,e.a6,e.a6,0,0,1);else if(fe.canonical.isChildOf(y.canonical)){let je=fe.canonical.z-y.canonical.z,Ze=fe.canonical.x-(fe.canonical.x>>je<>je<>je;e.c7(Re,0,ft,ft,0,0,1),e.Q(Re,Re,[-Ze*ft,-ut*ft,0])}else{if(!y.canonical.isChildOf(fe.canonical))continue;{let je=y.canonical.z-fe.canonical.z,Ze=y.canonical.x-(y.canonical.x>>je<>je<>je;e.c7(Re,0,e.a6,e.a6,0,0,1),e.Q(Re,Re,[Ze*ft,ut*ft,0]),e.S(Re,Re,[1/2**je,1/2**je,0])}}be.terrainRttPosMatrix32f=new Float32Array(Re),N[ie]=be}return N}_getTerrainCoordsForTileRanges(y,N){let ie={};for(let fe of this._renderableTilesKeys){let be=this._tiles[fe].tileID;if(!this._isWithinTileRanges(be,N))continue;let Re=y.clone(),je=e.bj();if(be.canonical.z===y.canonical.z){let Ze=y.canonical.x-be.canonical.x+y.wrap*(1<y.canonical.z){let Ze=be.canonical.z-y.canonical.z,ut=be.canonical.x-(be.canonical.x>>Ze<>Ze<>Ze),Gt=y.canonical.y-(be.canonical.y>>Ze),Kt=e.a6>>Ze;e.c7(je,0,Kt,Kt,0,0,1),e.Q(je,je,[-ut*Kt+Dt*e.a6,-ft*Kt+Gt*e.a6,0])}else{let Ze=y.canonical.z-be.canonical.z,ut=y.canonical.x-(y.canonical.x>>Ze<>Ze<>Ze)-be.canonical.x,Gt=(y.canonical.y>>Ze)-be.canonical.y,Kt=e.a6<be.maxzoom&&(Re=be.maxzoom),Re=be.minzoom&&!je?.dem;)je=this.findTileInCaches(y.scaledTo(Re--).key);return je}findTileInCaches(y){let N=this.tileManager.getTileByID(y);return N||(N=this.tileManager._outOfViewCache.getByKey(y),N)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,N){let ie=N[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class tt{constructor(y,N,ie){this._meshCache={},this.painter=y,this.tileManager=new qe(N),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,N,ie,fe=e.a6){var be;let Re=y.normalizeCoordinates(N,ie,fe);if(!Re)return 0;let je=this.getTerrainData(Re.tileID),Ze=(be=je.tile)===null||be===void 0?void 0:be.dem;if(!Ze)return 0;let ut=e.cC([],[Re.x/fe*e.a6,Re.y/fe*e.a6],je.u_terrain_matrix),ft=[ut[0]*Ze.dim,ut[1]*Ze.dim],Dt=Math.floor(ft[0]),Gt=Math.floor(ft[1]),Kt=ft[0]-Dt,st=ft[1]-Gt;return Ze.get(Dt,Gt)*(1-Kt)*(1-st)+Ze.get(Dt+1,Gt)*Kt*(1-st)+Ze.get(Dt,Gt+1)*(1-Kt)*st+Ze.get(Dt+1,Gt+1)*Kt*st}getElevationForLngLatZoom(y,N){if(!e.cD(N,y.wrap()))return 0;let{tileID:ie,mercatorX:fe,mercatorY:be}=this._getOverscaledTileIDFromLngLatZoom(y,N);return this.getElevation(ie,fe%e.a6,be%e.a6,e.a6)}getElevationForLngLat(y,N){let ie=Je(N,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),fe=0;for(let be of ie)be.canonical.z>fe&&(fe=Math.min(be.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,fe)}getElevation(y,N,ie,fe=e.a6){return this.getDEMElevation(y,N,ie,fe)*this.exaggeration}getTerrainData(y){var N,ie;if(!this._emptyDemTexture){let Re=this.painter.context,je=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(Re,je,Re.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(Re,new e.R({width:1,height:1}),Re.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let fe=this.tileManager.getSourceTile(y,!0);if(fe?.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){let Re=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new e.T(Re,fe.dem.getPixels(),Re.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}let be=fe&&fe.toString()+fe.tileID.key+y.key;if(be&&!this._demMatrixCache[be]){let Re=this.tileManager.getSource().maxzoom,je=y.canonical.z-fe.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=Re?je=y.canonical.z-Re:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ze=y.canonical.x-(y.canonical.x>>je<>je<>8<<4|be>>8,N[Re+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(N.buffer)),fe=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return fe.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=fe,fe}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let N=new Uint8Array(4),ie=this.painter.context,fe=ie.gl,be=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),Re=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),fe.readPixels(be,je-Re-1,1,1,fe.RGBA,fe.UNSIGNED_BYTE,N),ie.bindFramebuffer.set(null);let Ze=N[0]+(N[2]>>4<<8),ut=N[1]+((15&N[2])<<8),ft=this.coordsIndex[255-N[3]],Dt=ft&&this.tileManager.getTileByID(ft);if(!Dt)return null;let Gt=this._coordsTextureSize,Kt=(1<0,fe=ie&&y.canonical.y===0,be=ie&&y.canonical.y===(1<y.id!==N),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let N of this._recentlyUsed)if(!this._objects[N].inUse)return this._objects[N];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ct={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Nt{constructor(y,N){this.painter=y,this.terrain=N,this.pool=new at(y.context,30,N.tileManager.tileSize*N.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,N){var ie,fe,be;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(Re=>!y._layers[Re].isHidden(N)),this._coordsAscending={};for(let Re in y.tileManagers){this._coordsAscending[Re]={};let je=y.tileManagers[Re].getVisibleCoordinates(),Ze=y.tileManagers[Re].getSource(),ut=Ze instanceof ke?Ze.terrainTileRanges:null;for(let ft of je){let Dt=this.terrain.tileManager.getTerrainCoords(ft,ut);for(let Gt in Dt)(be=this._coordsAscending[Re])[Gt]||(be[Gt]=[]),this._coordsAscending[Re][Gt].push(Dt[Gt])}}this._rttFingerprints={};for(let Re of y._order){let je=y._layers[Re],Ze=je.source;if(ct[je.type]&&!this._rttFingerprints[Ze]){this._rttFingerprints[Ze]={};let ut=(fe=(ie=y.tileManagers[Ze])===null||ie===void 0?void 0:ie.getState().revision)!==null&&fe!==void 0?fe:0;for(let ft in this._coordsAscending[Ze])this._rttFingerprints[Ze][ft]=`${this._coordsAscending[Ze][ft].map(Dt=>Dt.key).sort().join()}#${ut}`}}for(let Re of this._renderableTiles)for(let je in this._rttFingerprints){let Ze=this._rttFingerprints[je][Re.tileID.key];Ze&&Ze!==Re.rttFingerprint[je]&&(Re.rtt=[])}}renderLayer(y,N){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},N),{isRenderingToTexture:!0}),fe=y.type,be=this.painter,Re=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ct[fe]&&(this._prevType&&ct[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(y.id),!Re))return!0;if(ct[this._prevType]||ct[fe]&&Re){this._prevType=fe;let je=this._stacks.length-1,Ze=this._stacks[je]||[];for(let ut of this._renderableTiles){if(this.pool.isFull()&&(Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ut),ut.rtt[je]){let Dt=this.pool.getObjectForId(ut.rtt[je].id);if(Dt.stamp===ut.rtt[je].stamp){this.pool.useObject(Dt);continue}}let ft=this.pool.getOrCreateFreeObject();this.pool.useObject(ft),this.pool.stampObject(ft),ut.rtt[je]={id:ft.id,stamp:ft.stamp},be.context.bindFramebuffer.set(ft.fbo.framebuffer),be.context.clear({color:e.bo.transparent,stencil:0}),be.currentStencilSource=void 0;for(let Dt of Ze){let Gt=be.style._layers[Dt],Kt=Gt.source?this._coordsAscending[Gt.source][ut.tileID.key]:[ut.tileID];be.context.viewport.set([0,0,ft.fbo.width,ft.fbo.height]),be._renderTileClippingMasks(Gt,Kt,!0),be.renderLayer(be,be.style.tileManagers[Gt.source],Gt,Kt,ie),Gt.source&&(ut.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][ut.tileID.key])}}return Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ct[fe]}return!1}}let St={"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":"Drag to rotate map, click to reset 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","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","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"},Jt=t,mr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:pu,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 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],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},gr=class extends gc{get _ownerWindow(){var pe,y;return((y=(pe=this._container)===null||pe===void 0?void 0:pe.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(pe){var y,N,ie;let fe=Object.assign(Object.assign(Object.assign({},mr),pe),{canvasContextAttributes:Object.assign(Object.assign({},mr.canvasContextAttributes),pe.canvasContextAttributes)});if(fe.minZoom!=null&&fe.maxZoom!=null&&fe.minZoom>fe.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(fe.minPitch!=null&&fe.maxPitch!=null&&fe.minPitch>fe.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(fe.minPitch!=null&&fe.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(fe.maxPitch!=null&&fe.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let be=new Eo,Re=new Wo;fe.minZoom!==void 0&&be.setMinZoom(fe.minZoom),fe.maxZoom!==void 0&&be.setMaxZoom(fe.maxZoom),fe.minPitch!==void 0&&be.setMinPitch(fe.minPitch),fe.maxPitch!==void 0&&be.setMaxPitch(fe.maxPitch),fe.renderWorldCopies!==void 0&&be.setRenderWorldCopies(fe.renderWorldCopies),fe.transformConstrain!==null&&be.setConstrainOverride(fe.transformConstrain),super(be,Re,{bearingSnap:fe.bearingSnap,zoomSnap:fe.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new de,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ze=>{if(Ze.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let ut of Object.values(this.style._layers))if(ut.type==="custom"&&console.warn(`Custom layer with id '${ut.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),ut._listeners)for(let[ft]of Object.entries(ut._listeners))console.warn(`Custom layer with id '${ut.id}' had event listeners for event '${ft}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))},this._contextRestored=Ze=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ze}))},this._onMapScroll=Ze=>{if(Ze.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fe.interactive,this._maxTileCacheSize=fe.maxTileCacheSize,this._maxTileCacheZoomLevels=fe.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},fe.canvasContextAttributes),this._trackResize=fe.trackResize===!0,this._bearingSnap=fe.bearingSnap,this._zoomSnap=fe.zoomSnap,this._centerClampedToGround=fe.centerClampedToGround,this._refreshExpiredTiles=fe.refreshExpiredTiles===!0,this._fadeDuration=fe.fadeDuration,this._crossSourceCollisions=fe.crossSourceCollisions===!0,this._collectResourceTiming=fe.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),fe.locale),this._clickTolerance=fe.clickTolerance,this._overridePixelRatio=fe.pixelRatio,this._maxCanvasSize=fe.maxCanvasSize,this._zoomLevelsToOverscale=fe.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=fe.transformCameraUpdate,this.transformConstrain=fe.transformConstrain,this.cancelPendingTileRequestsWhileZooming=fe.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(fe.anisotropicFilterPitch),fe.reduceMotion!==void 0&&(s.prefersReducedMotion=fe.reduceMotion),this._imageQueueHandle=v.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(fe.transformRequest),this._container=this._resolveContainer(fe.container),fe.maxBounds&&this.setMaxBounds(fe.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Ps(this,fe),this._hash=fe.hash?new Jc(typeof fe.hash=="string"&&fe.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:fe.center,elevation:fe.elevation,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,roll:fe.roll}),fe.bounds&&(this.resize(),this.fitBounds(fe.bounds,e.e({},fe.fitBoundsOptions,{duration:0}))));let je=typeof fe.style=="string"||((ie=(N=fe.style)===null||N===void 0?void 0:N.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,je),this._localIdeographFontFamily=fe.localIdeographFontFamily,this._validateStyle=fe.validateStyle,fe.style&&this.setStyle(fe.style,{localIdeographFontFamily:fe.localIdeographFontFamily}),fe.attributionControl&&this.addControl(new ll(typeof fe.attributionControl=="boolean"?void 0:fe.attributionControl)),fe.maplibreLogo&&this.addControl(new ef,fe.logoPosition),this.on("style.load",()=>{if(je||this._resizeTransform(),this.transform.unmodified){let Ze=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ze)}}),this.on("data",Ze=>{this._update(Ze.dataType==="style"),this.fire(new e.n(`${Ze.dataType}data`,Ze))}),this.on("dataloading",Ze=>{this.fire(new e.n(`${Ze.dataType}dataloading`,Ze))}),this.on("dataabort",Ze=>{this.fire(new e.n("sourcedataabort",Ze))})}_getMapId(){return this._mapId}setGlobalStateProperty(pe,y){return this.style.setGlobalStateProperty(pe,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(pe,y){if(y===void 0&&(y=pe.getDefaultPosition?pe.getDefaultPosition():"top-right"),!pe?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let N=pe.onAdd(this);this._controls.push(pe);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(N,ie.firstChild):ie.appendChild(N),this}removeControl(pe){if(!pe?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(pe);return y>-1&&this._controls.splice(y,1),pe.onRemove(this),this}hasControl(pe){return this._controls.includes(pe)}coveringTiles(pe){return Je(this.transform,pe)}calculateCameraOptionsFromTo(pe,y,N,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(N,this.transform)),super.calculateCameraOptionsFromTo(pe,y,N,ie)}resize(pe,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let N=!this._moving;return N&&(this.stop(),this.fire(new e.n("movestart",pe)).fire(new e.n("move",pe))),this.fire(new e.n("resize",pe)),N&&this.fire(new e.n("moveend",pe)),this}_resizeInternal(pe=!0){let[y,N]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,N);if(this._resizeCanvas(y,N,ie),this.painter.resize(y,N,ie),this.painter.overLimit()){let fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];let be=this._getClampedPixelRatio(y,N);this._resizeCanvas(y,N,be),this.painter.resize(y,N,be)}this._resizeTransform(pe)}_resizeTransform(pe=!0){var y;let[N,ie]=this._containerDimensions();this.transform.resize(N,ie,pe),(y=this._requestedCameraState)===null||y===void 0||y.resize(N,ie,pe)}_getClampedPixelRatio(pe,y){let{0:N,1:ie}=this._maxCanvasSize,fe=this.getPixelRatio(),be=pe*fe,Re=y*fe;return Math.min(be>N?N/be:1,Re>ie?ie/Re:1)*fe}getPixelRatio(){var pe;return(pe=this._overridePixelRatio)!==null&&pe!==void 0?pe:devicePixelRatio}setPixelRatio(pe){this._overridePixelRatio=pe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(pe){return this.transform.setMaxBounds(q.convert(pe)),this._update()}setMinZoom(pe){if((pe=pe??-2)>=-2&&pe<=this.transform.maxZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMinZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(pe){if((pe=pe??22)>=this.transform.minZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMaxZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(pe){if((pe=pe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(pe>=0&&pe<=this.transform.maxPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMinPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(pe){if((pe=pe??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(pe>=this.transform.minPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMaxPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(pe){if((pe=pe??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(pe<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=pe,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(pe){return this.transform.setRenderWorldCopies(pe),this._update()}setTransformConstrain(pe){return this.transform.setConstrainOverride(pe),this._update()}project(pe){return this.transform.locationToScreenPoint(e.W.convert(pe),this.style&&this.terrain)}unproject(pe){return this.transform.screenPointToLocation(e.P.convert(pe),this.terrain)}isMoving(){var pe;return this._moving||((pe=this.handlers)===null||pe===void 0?void 0:pe.isMoving())}isZooming(){var pe;return this._zooming||((pe=this.handlers)===null||pe===void 0?void 0:pe.isZooming())}isRotating(){var pe;return this._rotating||((pe=this.handlers)===null||pe===void 0?void 0:pe.isRotating())}_createDelegatedListener(pe,y,N){if(pe==="mouseenter"||pe==="mouseover"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:be=>{let Re=y.filter(Ze=>this.getLayer(Ze)),je=Re.length!==0?this.queryRenderedFeatures(be.point,{layers:Re}):[];je.length?ie||(ie=!0,N.call(this,new Bl(pe,this,be.originalEvent,{features:je}))):ie=!1},mouseout:()=>{ie=!1}}}}if(pe==="mouseleave"||pe==="mouseout"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:Re=>{let je=y.filter(Ze=>this.getLayer(Ze));(je.length!==0?this.queryRenderedFeatures(Re.point,{layers:je}):[]).length?ie=!0:ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))},mouseout:Re=>{ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))}}}}{let ie=fe=>{let be=y.filter(je=>this.getLayer(je)),Re=be.length!==0?this.queryRenderedFeatures(fe.point,{layers:be}):[];Re.length&&(fe.features=Re,N.call(this,fe),delete fe.features)};return{layers:y,listener:N,delegates:{[pe]:ie}}}}_saveDelegatedListener(pe,y){var N;this._delegatedListeners||(this._delegatedListeners={}),(N=this._delegatedListeners)[pe]||(N[pe]=[]),this._delegatedListeners[pe].push(y)}_removeDelegatedListener(pe,y,N){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[pe]))return;let fe=this._delegatedListeners[pe];for(let be=0;bey.includes(je))){for(let je in Re.delegates)this.off(je,Re.delegates[je]);return void fe.splice(be,1)}}}on(pe,y,N){if(N===void 0)return super.on(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.on(be,fe.delegates[be]);return{unsubscribe:()=>{this._removeDelegatedListener(pe,ie,N)}}}once(pe,y,N){if(N===void 0)return super.once(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);for(let be in fe.delegates){let Re=fe.delegates[be];fe.delegates[be]=(...je)=>{this._removeDelegatedListener(pe,ie,N),Re(...je)}}this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.once(be,fe.delegates[be]);return this}off(pe,y,N){return N===void 0?super.off(pe,y):(this._removeDelegatedListener(pe,typeof y=="string"?[y]:y,N),this)}queryRenderedFeatures(pe,y){if(!this.style)return[];let N,ie=pe instanceof e.P||Array.isArray(pe),fe=ie?pe:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:pe)||{}),fe instanceof e.P||typeof fe[0]=="number")N=[e.P.convert(fe)];else{let be=e.P.convert(fe[0]),Re=e.P.convert(fe[1]);N=[be,new e.P(Re.x,be.y),Re,new e.P(be.x,Re.y),be]}return this.style.queryRenderedFeatures(N,y,this.transform)}querySourceFeatures(pe,y){return this.style.querySourceFeatures(pe,y)}setStyle(pe,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&pe?(this._diffStyle(pe,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(pe,y))}setTransformRequest(pe){return this._requestManager.setTransformRequest(pe),this}_getUIString(pe){let y=this._locale[pe];if(y==null)throw new Error(`Missing UI string '${pe}'`);return y}_updateStyle(pe,y){var N,ie,fe;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(pe,y));let be=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!pe)),pe?(this.style=new Ku(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof pe=="string"?this.style.loadURL(pe,y,be):this.style.loadJSON(pe,y,be),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(fe=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||fe===void 0||fe.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ku(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(pe,y){return e._(this,void 0,void 0,function*(){var N;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),typeof pe=="string"){let ie=pe;this._diffStyleRequest=new AbortController;let fe=this._diffStyleRequest;try{let be=yield this._requestManager.transformRequest(ie,"Style");if(fe.signal.aborted)return void(this._diffStyleRequest=null);let Re=yield e.k(be,fe);this._diffStyleRequest=null,this._updateDiff(Re.data,y)}catch(be){this._diffStyleRequest=null,e.$(be)||this.fire(new e.l(e.d(be)))}}else typeof pe=="object"&&(this._diffStyleRequest=null,this._updateDiff(pe,y))})}_updateDiff(pe,y){try{this.style.setState(pe,y)&&this._update(!0)}catch(N){e.w(`Unable to perform style diff: ${e.d(N).message}. Rebuilding the style from scratch.`),this._updateStyle(pe,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(pe,y){return this._lazyInitEmptyStyle(),this.style.addSource(pe,y),this._update(!0)}isSourceLoaded(pe){var y;let N=(y=this.style)===null||y===void 0?void 0:y.tileManagers[pe];if(N!==void 0)return N.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${pe}'`)))}setTerrain(pe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),pe){let y=this.style.tileManagers[pe.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${pe.source}`);this.terrain===null&&y.reload();for(let N in this.style._layers){let ie=this.style._layers[N];ie.type==="hillshade"&&ie.source===pe.source&&e.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."),ie.type==="color-relief"&&ie.source===pe.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new tt(this.painter,y,pe),this.painter.renderToTexture=new Nt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=N=>{var ie;N.dataType==="style"?this.terrain.tileManager.freeRtt():N.dataType==="source"&&N.tile&&(N.sourceId!==pe.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=N.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(N.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:pe})),this}getTerrain(){var pe,y;return(y=(pe=this.terrain)===null||pe===void 0?void 0:pe.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var pe;let y=(pe=this.style)===null||pe===void 0?void 0:pe.tileManagers;for(let N of Object.values(y))if(!N.areTilesLoaded())return!1;return!0}removeSource(pe){return this.style.removeSource(pe),this._update(!0)}getSource(pe){return this.style.getSource(pe)}setSourceTileLodParams(pe,y,N){if(N){let ie=this.getSource(N);if(!ie)throw new Error(`There is no source with ID "${N}", cannot set LOD parameters`);ie.calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y));return this._update(!0),this}refreshTiles(pe,y){let N=this.style.tileManagers[pe];if(!N)throw new Error(`There is no tile manager with ID "${pe}", cannot refresh tile`);y===void 0?N.reload(!0):N.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(pe,y,N={}){let{pixelRatio:ie=1,sdf:fe=!1,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut}=N;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(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:ft,height:Dt,data:Gt}=y,Kt=y;return this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},new Uint8Array(Gt)),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0,userImage:Kt}),Kt.onAdd&&Kt.onAdd(this,pe),this}}{let{width:ft,height:Dt,data:Gt}=s.getImageData(y);this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},Gt),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0})}}updateImage(pe,y){let N=this.style.getImage(pe);if(!N)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:fe,height:be,data:Re}=ie;if(fe===void 0||be===void 0)return this.fire(new e.l(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(fe!==N.data.width||be!==N.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let je=!(y instanceof HTMLImageElement||e.b(y));return N.data.replace(Re,je),this.style.updateImage(pe,N),this}getImage(pe){return this.style.getImage(pe)}hasImage(pe){return pe?!!this.style.getImage(pe):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(pe){this.style.removeImage(pe)}loadImage(pe){return e._(this,void 0,void 0,function*(){return v.getImage(yield this._requestManager.transformRequest(pe,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(pe,y){return this._lazyInitEmptyStyle(),this.style.addLayer(pe,y),this._update(!0)}moveLayer(pe,y){return this.style.moveLayer(pe,y),this._update(!0)}removeLayer(pe){return this.style.removeLayer(pe),this._update(!0)}getLayer(pe){return this.style.getLayer(pe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(pe,y,N){return this.style.setLayerZoomRange(pe,y,N),this._update(!0)}setFilter(pe,y,N={}){return this.style.setFilter(pe,y,N),this._update(!0)}getFilter(pe){return this.style.getFilter(pe)}setPaintProperty(pe,y,N,ie={}){return this.style.setPaintProperty(pe,y,N,ie),this._update(!0)}getPaintProperty(pe,y){return this.style.getPaintProperty(pe,y)}setLayoutProperty(pe,y,N,ie={}){return this.style.setLayoutProperty(pe,y,N,ie),this._update(!0)}getLayoutProperty(pe,y){return this.style.getLayoutProperty(pe,y)}setGlyphs(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(pe,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(pe,y,N={}){return this._lazyInitEmptyStyle(),this.style.addSprite(pe,y,N,ie=>{ie||this._update(!0)}),this}removeSprite(pe){return this._lazyInitEmptyStyle(),this.style.removeSprite(pe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(pe,y,N=>{N||this._update(!0)}),this}setLight(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(pe,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(pe,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(pe,y){return this.style.setFeatureState(pe,y),this._update()}removeFeatureState(pe,y){return this.style.removeFeatureState(pe,y),this._update()}getFeatureState(pe){return this.style.getFeatureState(pe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let pe=0,y=0;return this._container&&(pe=this._container.clientWidth||400,y=this._container.clientHeight||300),[pe,y]}_setupResizeObserver(){var pe;let y=!1,N=mc(fe=>{this._trackResize&&!this._removed&&(this.resize(fe),this.redraw())},50),ie=(pe=this._ownerWindow.ResizeObserver)!==null&&pe!==void 0?pe:ResizeObserver;this._resizeObserver=new ie(fe=>{y?N(fe):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(pe){if(typeof pe=="string"){let y=document.getElementById(pe);if(!y)throw new Error(`Container '${pe}' not found.`);return y}if(pe instanceof HTMLElement||pe&&typeof pe=="object"&&pe.nodeType===1)return pe;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let pe=this._container;pe.classList.add("maplibregl-map");let y=this._canvasContainer=g.create("div","maplibregl-canvas-container",pe);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=g.create("canvas","maplibregl-canvas",y),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 N=this._containerDimensions(),ie=this._getClampedPixelRatio(N[0],N[1]);this._resizeCanvas(N[0],N[1],ie);let fe=this._controlContainer=g.create("div","maplibregl-control-container",pe),be=this._controlPositions={};for(let Re of["top-left","top-right","bottom-left","bottom-right"])be[Re]=g.create("div",`maplibregl-ctrl-${Re} `,fe);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(pe,y,N){this._canvas.width=Math.floor(N*pe),this._canvas.height=Math.floor(N*y),this._canvas.style.width=`${pe}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let pe=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:pe},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let N=null;if(N=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,pe):this._canvas.getContext("webgl2",pe)||this._canvas.getContext("webgl",pe),!N){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new Su(N,this.transform)}migrateProjection(pe,y){super.migrateProjection(pe,y),this.painter.transform=pe,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(pe){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=pe),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(pe){return this._update(),this._renderTaskQueue.add(pe)}_cancelRenderFrame(pe){this._renderTaskQueue.remove(pe)}_render(pe){var y,N,ie,fe,be,Re;let je=this._idleTriggered?this._fadeDuration:0,Ze=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(pe),this._removed)return;let ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Kt=m();this.style.zoomHistory.update(Gt,Kt);let st=new e.J(Gt,{now:Kt,fadeDuration:je,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),It=st.crossFadingFactor();It===1&&It===this._crossFadingFactor||(ut=!0,this._crossFadingFactor=It),this.style.update(st)}let ft=((N=this.style.projection)===null||N===void 0?void 0:N.transitionState)>0!==Ze;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((fe=this.style.projection)===null||fe===void 0?void 0:fe.transitionState,(be=this.style.projection)===null||be===void 0?void 0:be.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ft)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(Re=this.style)===null||Re===void 0?void 0:Re._updatePlacement(this.transform,this.showCollisionBoxes,je,this._crossSourceCollisions,ft),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:je,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Dt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Dt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Dt||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var pe,y;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(pe=this._diffStyleRequest)===null||pe===void 0||pe.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),v.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let N=this.painter.context.gl.getExtension("WEBGL_lose_context");N?.loseContext&&N.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,pe=>{this._frameRequest=null;try{this._render(pe)}catch(y){if(!e.$(y)&&!function(N){return N.message===vc}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(pe){this._showTileBoundaries!==pe&&(this._showTileBoundaries=pe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(pe){this._showPadding!==pe&&(this._showPadding=pe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(pe){this._showCollisionBoxes!==pe&&(this._showCollisionBoxes=pe,pe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(pe){this._showOverdrawInspector!==pe&&(this._showOverdrawInspector=pe,this._update())}get repaint(){return!!this._repaint}set repaint(pe){this._repaint!==pe&&(this._repaint=pe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(pe){this._vertices=pe,this._update()}get version(){return Jt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(pe){return this._lazyInitEmptyStyle(),this.style.setProjection(pe),this._update(!0)}},Hr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Vr{constructor(y,N,ie=!1){this.mousedown=be=>{this.startMove(be,g.mousePos(this.element,be)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=be=>{this.move(be,g.mousePos(this.element,be))},this.mouseup=be=>{this._rotatePitchHandler.dragEnd(be),this.offTemp()},this.touchstart=be=>{be.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.startMove(be,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=be=>{be.targetTouches.length!==1?this.reset():(this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.move(be,this._lastPos))},this.touchend=be=>{be.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=N;let fe=new Br;this._rotatePitchHandler=new mt({clickTolerance:3,move:(be,Re)=>{let je=N.getBoundingClientRect(),Ze=new e.P((je.bottom-je.top)/2,(je.right-je.left)/2);return{bearingDelta:e.cx(new e.P(be.x,Re.y),Re,Ze),pitchDelta:ie?-.5*(Re.y-be.y):void 0}},moveStateManager:fe,enable:!0,assignEvents:()=>{}}),this.map=y,N.addEventListener("mousedown",this.mousedown),N.addEventListener("touchstart",this.touchstart,{passive:!1}),N.addEventListener("touchcancel",this.reset)}startMove(y,N){this._rotatePitchHandler.dragStart(y,N),g.disableDrag()}move(y,N){let ie=this.map,{bearingDelta:fe,pitchDelta:be}=this._rotatePitchHandler.dragMove(y,N)||{};fe&&ie.setBearing(ie.getBearing()+fe),be&&ie.setPitch(ie.getPitch()+be)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){g.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let ca;function Aa(pe,y,N,ie=!1){if(ie||!N.getCoveringTilesDetailsProvider().allowWorldCopies())return pe?.wrap();let fe=new e.W(pe.lng,pe.lat);if(pe=new e.W(pe.lng,pe.lat),y){let be=new e.W(pe.lng-360,pe.lat),Re=new e.W(pe.lng+360,pe.lat),je=N.locationToScreenPoint(pe).distSqr(y);N.locationToScreenPoint(be).distSqr(y)180;){let be=N.locationToScreenPoint(pe);if(be.x>=0&&be.y>=0&&be.x<=N.width&&be.y<=N.height)break;pe.lng>N.center.lng?pe.lng-=360:pe.lng+=360}return pe.lng!==fe.lng&&N.isPointOnMapSurface(N.locationToScreenPoint(pe))?pe:fe}let Yr={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 oa(pe,y,N){let ie=pe.classList;for(let fe in Yr)ie.remove(`maplibregl-${N}-anchor-${fe}`);ie.add(`maplibregl-${N}-anchor-${y}`)}class fa extends e.E{constructor(y){if(super(),this._onClick=N=>{this.fire(new e.n("click",{originalEvent:N}))},this._onKeyPress=N=>{N.code!=="Space"&&N.code!=="Enter"||this.togglePopup()},this._onMapClick=N=>{let ie=N.originalEvent.target,fe=this._element;this._popup&&(ie===fe||fe.contains(ie))&&this.togglePopup()},this._update=N=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(N?.type==="terrain"||N?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let fe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?fe=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(fe=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let be="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?be="rotateX(0deg)":this._pitchAlignment==="map"&&(be=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||N&&N.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${Yr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${be} ${fe}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(N?.type==="moveend")}).catch(()=>{})},this._onMove=N=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=N.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=N.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("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 e.n("dragend")),this._state="inactive"},this._addDragHandler=N=>{this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=g.create("div");let N=g.createNS("http://www.w3.org/2000/svg","svg"),ie=41,fe=27;N.setAttributeNS(null,"display","block"),N.setAttributeNS(null,"height",`${ie}px`),N.setAttributeNS(null,"width",`${fe}px`),N.setAttributeNS(null,"viewBox",`0 0 ${fe} ${ie}`);let be=g.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"stroke","none"),be.setAttributeNS(null,"stroke-width","1"),be.setAttributeNS(null,"fill","none"),be.setAttributeNS(null,"fill-rule","evenodd");let Re=g.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");let je=g.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let Ze=[{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 ir of Ze){let dr=g.createNS("http://www.w3.org/2000/svg","ellipse");dr.setAttributeNS(null,"opacity","0.04"),dr.setAttributeNS(null,"cx","10.5"),dr.setAttributeNS(null,"cy","5.80029008"),dr.setAttributeNS(null,"rx",ir.rx),dr.setAttributeNS(null,"ry",ir.ry),je.appendChild(dr)}let ut=g.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"fill",this._color);let ft=g.createNS("http://www.w3.org/2000/svg","path");ft.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"),ut.appendChild(ft);let Dt=g.createNS("http://www.w3.org/2000/svg","g");Dt.setAttributeNS(null,"opacity","0.25"),Dt.setAttributeNS(null,"fill","#000000");let Gt=g.createNS("http://www.w3.org/2000/svg","path");Gt.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"),Dt.appendChild(Gt);let Kt=g.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Kt.setAttributeNS(null,"fill","#FFFFFF");let st=g.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"transform","translate(8.0, 8.0)");let It=g.createNS("http://www.w3.org/2000/svg","circle");It.setAttributeNS(null,"fill","#000000"),It.setAttributeNS(null,"opacity","0.25"),It.setAttributeNS(null,"cx","5.5"),It.setAttributeNS(null,"cy","5.5"),It.setAttributeNS(null,"r","5.4999962");let Ut=g.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"),st.appendChild(It),st.appendChild(Ut),Re.appendChild(je),Re.appendChild(ut),Re.appendChild(Dt),Re.appendChild(Kt),Re.appendChild(st),N.appendChild(Re),N.setAttributeNS(null,"height",ie*this._scale+"px"),N.setAttributeNS(null,"width",fe*this._scale+"px"),this._element.appendChild(N),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",N=>{N.preventDefault()}),this._element.addEventListener("mousedown",N=>{N.preventDefault()}),oa(this._element,this._anchor,"marker"),y?.className)for(let N of y.className.split(" "))this._element.classList.add(N);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),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("projectiontransition",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),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let fe=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[fe,-1*(38.1-13.5+fe)],"bottom-right":[-fe,-1*(38.1-13.5+fe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var N,ie;let fe=(N=this._map)===null||N===void 0?void 0:N.terrain,be=this._map.transform.isLocationOccluded(this._lngLat);if(!fe||be){let Kt=be?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Kt&&(this._element.style.opacity=Kt,this._element.classList.toggle("maplibregl-marker-covered",be)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Re=this._map,je=Re.terrain.depthAtPoint(this._pos),Ze=Re.terrain.getElevationForLngLat(this._lngLat,Re.transform);if(Re.transform.lngLatToCameraDepth(this._lngLat,Ze)-je<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let ut=-this._offset.y/Re.transform.pixelsPerMeter,ft=Math.sin(Re.getPitch()*Math.PI/180)*ut,Dt=Re.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=Re.transform.lngLatToCameraDepth(this._lngLat,Ze+ft)-Dt>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(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(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,N){return(this._opacity===void 0||y===void 0&&N===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),N!==void 0&&(this._opacityWhenCovered=String(N)),this._map&&this._updateOpacity(!0),this}}let Ea={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ma=0,sa=!1,hn={maxWidth:100,unit:"metric"};function Tn(pe,y,N){let ie=N?.maxWidth||100,fe=pe._container.clientHeight/2,be=pe._container.clientWidth/2,Re=pe.unproject([be-ie/2,fe]),je=pe.unproject([be+ie/2,fe]),Ze=Math.round(pe.project(je).x-pe.project(Re).x),ut=Math.min(ie,Ze,pe._container.clientWidth),ft=Re.distanceTo(je);if(N?.unit==="imperial"){let Dt=3.2808*ft;Dt>5280?zn(y,ut,Dt/5280,pe._getUIString("ScaleControl.Miles")):zn(y,ut,Dt,pe._getUIString("ScaleControl.Feet"))}else N?.unit==="nautical"?zn(y,ut,ft/1852,pe._getUIString("ScaleControl.NauticalMiles")):ft>=1e3?zn(y,ut,ft/1e3,pe._getUIString("ScaleControl.Kilometers")):zn(y,ut,ft,pe._getUIString("ScaleControl.Meters"))}function zn(pe,y,N,ie){let fe=function(be){let Re=Math.pow(10,`${Math.floor(be)}`.length-1),je=be/Re;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(Ze){let ut=Math.pow(10,Math.ceil(-Math.log(Ze)/Math.LN10));return Math.round(Ze*ut)/ut}(je),Re*je}(N);pe.style.width=y*(fe/N)+"px",pe.innerHTML=`${fe} ${ie}`}let $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},xi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function di(pe){if(pe){if(typeof pe=="number"){let y=Math.round(Math.abs(pe)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,pe),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-pe),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(pe,0),right:new e.P(-pe,0)}}if(pe instanceof e.P||Array.isArray(pe)){let y=e.P.convert(pe);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(pe.center||[0,0]),top:e.P.convert(pe.top||[0,0]),"top-left":e.P.convert(pe["top-left"]||[0,0]),"top-right":e.P.convert(pe["top-right"]||[0,0]),bottom:e.P.convert(pe.bottom||[0,0]),"bottom-left":e.P.convert(pe["bottom-left"]||[0,0]),"bottom-right":e.P.convert(pe["bottom-right"]||[0,0]),left:e.P.convert(pe.left||[0,0]),right:e.P.convert(pe.right||[0,0])}}return di(new e.P(0,0))}let uo=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=ll,l.BoxZoomHandler=Nl,l.CanvasSource=ce,l.CooperativeGesturesHandler=wi,l.DoubleClickZoomHandler=ys,l.DragPanHandler=Hs,l.DragRotateHandler=Cu,l.EdgeInsets=oo,l.FullscreenControl=class extends e.E{constructor(pe={}){var y;super(),this._onFullscreenChange=()=>{var N;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((N=ie?.shadowRoot)===null||N===void 0)&&N.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=pe.pseudo)!==null&&y!==void 0&&y,pe?.container&&(pe.container instanceof HTMLElement?this._container=pe.container:e.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(pe){return this._map=pe,this._container||(this._container=this._map.getContainer()),this._controlContainer=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let pe=this._fullscreenButton=g.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);g.create("span","maplibregl-ctrl-icon",pe).setAttribute("aria-hidden","true"),pe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let pe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",pe),this._fullscreenButton.title=pe}_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 e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=Ge,l.GeolocateControl=class extends e.E{constructor(pe){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,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(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let N=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,fe=this._map.getBearing(),be=e.e({bearing:fe},this.options.fitBoundsOptions),Re=q.fromLngLat(N,ie);this._map.fitBounds(Re,be,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let N=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(N).addTo(this._map),this._userLocationDotMarker.setLngLat(N).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.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 N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&sa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let N=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||N||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=g.create("button","maplibregl-ctrl-geolocate",this._container),g.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}else{let N=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=g.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new fa({element:this._dotElement}),this._circleElement=g.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new fa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Ea,pe)}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(ca!==void 0&&!y)return ca;if(window.navigator.permissions===void 0)return ca=!!window.navigator.geolocation,ca;try{ca=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ca=!!window.navigator.geolocation}return ca})}().then(y=>this._finishSetupUI(y)),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(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ma=0,sa=!1}_isOutOfMapMaxBounds(pe){let y=this._map.getMaxBounds(),N=pe.coords;return y&&(N.longitudey.getEast()||N.latitudey.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":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let pe=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&pe))return;let y=this._map.project(pe),N=this._map.unproject([y.x+100,y.y]),ie=pe.distanceTo(N)/100,fe=2*this._accuracy/ie;this._circleElement.style.width=`${fe.toFixed(2)}px`,this._circleElement.style.height=`${fe.toFixed(2)}px`}trigger(){if(!this._setup)return e.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 e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ma--,sa=!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 e.n("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 e.n("trackuserlocationstart")),this.fire(new e.n("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 pe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ma++,Ma>1?(pe={maximumAge:6e5,timeout:0},sa=!0):(pe=this.options.positionOptions,sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,pe)}}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)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var pe;let y=(pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var pe;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=g.create("button","maplibregl-ctrl-globe",this._container),g.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Jc,l.ImageSource=ke,l.KeyboardHandler=Ji,l.LngLatBounds=q,l.LogoControl=ef,l.Map=gr,l.MapLibreMap=gr,l.MapMouseEvent=Bl,l.MapTouchEvent=Wu,l.MapWheelEvent=wf,l.Marker=fa,l.NavigationControl=class{constructor(pe){this._updateZoomButtons=()=>{let y=this._map.getZoom(),N=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=N,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",N.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,N)=>{let ie=this._map._getUIString(`NavigationControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Hr,pe),this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=g.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(pe){return this._map=pe,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.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(pe,y){let N=g.create("button",pe,this._container);return N.type="button",N.addEventListener("click",y),N}},l.Popup=class extends e.E{constructor(pe){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=g.create("div","maplibregl-popup",this._map.getContainer()),this._tip=g.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let N;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(N=y.point),this._trackPointer&&!N)return;let ie=this._flatPos=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&N?N:this._map.transform.locationToScreenPoint(this._lngLat));let fe=this.options.anchor,be=di(this.options.offset);if(!fe){let je=this._container.offsetWidth,Ze=this._container.offsetHeight,ut=function(Dt){var Gt,Kt,st,It;return Dt?{top:(Gt=Dt.top)!==null&&Gt!==void 0?Gt:0,right:(Kt=Dt.right)!==null&&Kt!==void 0?Kt:0,bottom:(st=Dt.bottom)!==null&&st!==void 0?st:0,left:(It=Dt.left)!==null&&It!==void 0?It:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ft;ft=ie.y+be.bottom.ythis._map.transform.height-Ze-ut.bottom?["bottom"]:[],ie.xthis._map.transform.width-je/2-ut.right&&ft.push("right"),fe=ft.length===0?"bottom":ft.join("-")}let Re=ie.add(be[fe]);this.options.subpixelPositioning||(Re=Re.round()),this._container.style.transform=`${Yr[fe]} translate(${Re.x}px,${Re.y}px)`,oa(this._container,fe,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create($n),pe)}addTo(pe){return this._map&&this.remove(),this._map=pe,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._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),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 e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(pe){return this._lngLat=e.W.convert(pe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),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._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(pe){return this.setDOMContent(document.createTextNode(pe))}setHTML(pe){let y=document.createDocumentFragment(),N=document.createElement("body"),ie;for(N.innerHTML=pe;ie=N.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var pe;return(pe=this._container)===null||pe===void 0?void 0:pe.style.maxWidth}setMaxWidth(pe){return this.options.maxWidth=pe,this._update(),this}setDOMContent(pe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=g.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(pe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(pe){return this._container&&this._container.classList.add(pe),this}removeClassName(pe){return this._container&&this._container.classList.remove(pe),this}setOffset(pe){return this.options.offset=pe,this._update(),this}toggleClassName(pe){if(this._container)return this._container.classList.toggle(pe)}setSubpixelPositioning(pe){this.options.subpixelPositioning=pe}setPadding(pe){this.options.padding=pe,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=g.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let pe=this._container.querySelector(xi);pe&&pe.focus()}},l.RasterDEMTileSource=he,l.RasterTileSource=ae,l.ScaleControl=class{constructor(pe){this._onMove=()=>{Tn(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,Tn(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hn),pe)}getDefaultPosition(){return"bottom-left"}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-scale",pe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=vo,l.Style=Ku,l.TerrainControl=class{constructor(pe){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=pe}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=g.create("button","maplibregl-ctrl-terrain",this._container),g.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(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Si,l.TwoFingersTouchRotateHandler=wn,l.TwoFingersTouchZoomHandler=Ba,l.TwoFingersTouchZoomRotateHandler=hi,l.VectorTileSource=ee,l.VideoSource=_e,l.addSourceType=(pe,y)=>e._(void 0,void 0,void 0,function*(){if(le(pe))throw new Error(`A source type called "${pe}" already exists.`);((N,ie)=>{ve[N]=ie})(pe,y)}),l.clearPrewarmedResources=function(){let pe=$;pe&&(pe.isPreloaded()&&pe.numActive()===1?(pe.release(P),$=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()"))},l.createTileMesh=Ss,l.getGlobalDispatcher=se,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},l.getVersion=function(){return uo},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(pe){return se().broadcast("IS",pe)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=m,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(pe){e.c.MAX_PARALLEL_IMAGE_REQUESTS=pe},l.setNow=function(pe){c.setNow(pe)},l.setRTLTextPlugin=function(pe,y){return Ye().setRTLTextPlugin(pe,y)},l.setWorkerCount=function(pe){j.workerCount=pe},l.setWorkerUrl=function(pe){e.c.WORKER_URL=pe}});var k=p;return k})}}),rV=ze({"src/plots/map/layers.js"(J,V){"use strict";var p=Nr(),b=Cs().sanitizeHTML,E=kM(),k=Av();function l(a,o){this.subplot=a,this.uid=a.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(a){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&a.sourcetype==="image"&&(this.source!==a.source||JSON.stringify(this.coordinates)!==JSON.stringify(a.coordinates))},e.needsNewSource=function(a){return this.sourceType!==a.sourcetype||JSON.stringify(this.source)!==JSON.stringify(a.source)||this.layerType!==a.type},e.needsNewLayer=function(a){return this.layerType!==a.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(a){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:a.source,coordinates:a.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(a){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=a.sourcetype,this.source=a.source,!!t(a)){var s=r(a);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(a){if(a==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function n(a){var o={},s={};switch(a.type){case"circle":p.extendFlat(s,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":p.extendFlat(s,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":p.extendFlat(s,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,m=E(c.textposition,c.iconsize);p.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":m.anchor,"text-offset":m.offset,"symbol-placement":c.placement}),p.extendFlat(s,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":p.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:o,paint:s}}function r(a){var o=a.sourcetype,s=a.source,c={type:o},m;return o==="geojson"?m="data":o==="vector"?m=typeof s=="string"?"url":"tiles":o==="raster"?(m="tiles",c.tileSize=256):o==="image"&&(m="url",c.coordinates=a.coordinates),c[m]=s,a.sourceattribution&&(c.attribution=b(a.sourceattribution)),c}V.exports=function(o,s,c){var m=new l(o,s);return m.update(c),m}}}),aV=ze({"src/plots/map/map.js"(J,V){"use strict";var p=tV(),b=Nr(),E=hp(),k=mi(),l=Gi(),e=_h(),t=Zl(),n=Fd(),r=n.drawMode,a=n.selectMode,o=_c().prepSelect,s=_c().clearOutline,c=_c().clearSelectionsCache,m=_c().selectOnClick,h=Av(),v=rV();function g(T,f){this.id=f,this.gd=T;var u=T._fullLayout,A=T._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=g.prototype;i.plot=function(T,f,u){var A=this,x;A.map?x=new Promise(function(z,I){A.updateMap(T,f,z,I)}):x=new Promise(function(z,I){A.createMap(T,f,z,I)}),u.push(x)},i.createMap=function(T,f,u,A){var x=this,z=f[x.id],I=x.styleObj=C(z.style),O=z.bounds,D=O?[[O.west,O.south],[O.east,O.north]]:null;let B={container:x.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:D,interactive:!x.isStatic,canvasContextAttributes:{preserveDrawingBuffer:x.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:h.fitBoundsPadding});let P=x.map=new p.Map(B).addControl(new p.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function($){var Q=$.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function($){return $=$.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:$}}),P._canvas.style.left="0px",P._canvas.style.top="0px",x.rejectOnError(A),x.isStatic||x.initFx(T,f);var U=[];U.push(new Promise(function($){P.once("load",$)})),U=U.concat(E.fetchTraceGeoData(T)),Promise.all(U).then(function(){F&&w(x,z),S(x,z),x.fillBelowLookup(T,f),x.updateData(T),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)},i.updateMap=function(T,f,u,A){var x=this,z=x.map,I=f[this.id];x.rejectOnError(A);var O=[],D=C(I.style);JSON.stringify(x.styleObj)!==JSON.stringify(D)&&(x.styleObj=D,z.setStyle(D.style),x.traceHash={},O.push(new Promise(function(B){z.once("styledata",B)}))),O=O.concat(E.fetchTraceGeoData(T)),Promise.all(O).then(function(){x.fillBelowLookup(T,f),x.updateData(T);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:h.fitBoundsPadding,animate:!1}),w(x,I),S(x,I)),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)};function w(T,f){let{center:u,zoom:A}=T.getView();f._input.center=f.center=u,f._input.zoom=f.zoom=A,f._input._fitView={center:Li({},u),zoom:A}}function S(T,f){let u=T.getView();T.viewInitial={center:b.extendFlat({},u.center),bearing:f.bearing,pitch:f.pitch,zoom:u.zoom}}i.fillBelowLookup=function(T,f){var u=f[this.id],A=u.layers,x,z,I=this.belowLookup={},O=!1;for(x=0;x1)for(x=0;x<$.length;x++)j=$[x],j.indexOf("trace-")===0?(U=j.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):j.indexOf("layout-")===0&&(U=j.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var M={choroplethmap:0,densitymap:1,scattermap:2};i.updateData=function(T){var f=this.traceHash,u,A,x,z,I=T.slice().sort(function(P,j){return M[P[0].trace.type]-M[j[0].trace.type]});for(x=0;xf.project(A).x,_subplot:f},f.yaxis={_id:"y",c2p:A=>f.project(A).y,_subplot:f},f.updateFramework(T),f.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(f.mockAxis,T)},i.initFx=function(T,f){var u=this,A=u.gd,x=u.map;x.on("moveend",function(O){if(u.map){var D=A._fullLayout;if(O.originalEvent||u.wheeling){var B=D[u.id];k.call("_storeDirectGUIEdit",A.layout,D._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}O.originalEvent&&O.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),D&&D._rehover&&D._rehover()}}),x.on("wheel",function(){u.wheeling=!0}),x.on("mousemove",function(O){var D=u.div.getBoundingClientRect(),B=[O.originalEvent.offsetX,O.originalEvent.offsetY];O.target.getBoundingClientRect=function(){return D},u.xaxis.p2c=function(){return x.unproject(B).lng},u.yaxis.p2c=function(){return x.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,O,u.id)},t.hover(A,O,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(f._hoverlayer)}x.on("dragstart",function(){u.dragging=!0,z()}),x.on("zoomstart",z),x.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var O=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(O))}x.on("drag",I),x.on("zoom",I),x.on("dblclick",function(){var O=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(O));var D=u.viewInitial;x.setCenter(_(D.center)),x.setZoom(D.zoom),x.setBearing(D.bearing),x.setPitch(D.pitch);var B=u.getView();O._input.center=O.center=B.center,O._input.zoom=O.zoom=B.zoom,O._input.bearing=O.bearing=B.bearing,O._input.pitch=O.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(O){return function(D){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&m(D.originalEvent,A,[u.xaxis],[u.yaxis],u.id,O),B.indexOf("event")>-1&&t.click(A,D.originalEvent)}}},i.updateFx=function(T){var f=this,u=f.map,A=f.gd;if(f.isStatic)return;function x(D){var B=f.map.unproject(D);return[B.lng,B.lat]}var z=T.dragmode,I;I=function(D,B){if(B.isRect){var F=D.range={};F[f.id]=[x([B.xmin,B.ymin]),x([B.xmax,B.ymax])]}else{var P=D.lassoPoints={};P[f.id]=B.map(x)}};var O=f.dragOptions;f.dragOptions=b.extendDeep(O||{},{dragmode:T.dragmode,element:f.div,gd:A,plotinfo:{id:f.id,domain:T[f.id].domain,xaxis:f.xaxis,yaxis:f.yaxis,fillRangeItems:I},xaxes:[f.xaxis],yaxes:[f.yaxis],subplot:f.id}),u.off("click",f.onClickInPanHandler),a(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",f.clearOutline),f.dragOptions.prepFn=function(D,B,F){o(D,B,F,f.dragOptions,z)},e.init(f.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",f.clearOutline),f.div.onmousedown=null,f.div.ontouchstart=null,f.div.removeEventListener("touchstart",f.div._ontouchstart),f.onClickInPanHandler=f.onClickInPanFn(f.dragOptions),u.on("click",f.onClickInPanHandler))},i.updateFramework=function(T){var f=T[this.id].domain,u=T._size,A=this.div.style;A.width=u.w*(f.x[1]-f.x[0])+"px",A.height=u.h*(f.y[1]-f.y[0])+"px",A.left=u.l+f.x[0]*u.w+"px",A.top=u.t+(1-f.y[1])*u.h+"px",this.xaxis._offset=u.l+f.x[0]*u.w,this.xaxis._length=u.w*(f.x[1]-f.x[0]),this.yaxis._offset=u.t+(1-f.y[1])*u.h,this.yaxis._length=u.h*(f.y[1]-f.y[0])},i.updateLayers=function(T){var f=T[this.id],u=f.layers,A=this.layerList,x;if(u.length!==A.length){for(x=0;xnV});function nV(J,V){let p=[];for(let t of J){if(t.subplot!==V||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:n,lon:r}=t;if(!r||!n)continue;let a=Math.min(r.length,n.length);for(let o=0;of/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,a),T=e.bBox(_.node())}_.attr("transform",p(-3,-T.height+8)),C.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;T.width+6>f&&(A=f/(T.width+6));var x=[c.l+c.w*v.x[1],c.t+c.h*(1-v.y[0])];C.attr("transform",p(x[0],x[1])+b(A))}},J.updateFx=function(a){for(var o=a._fullLayout,s=o._subplots[r],c=0;c=0;n--)e.removeLayer(t[n][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,n){var r=n[0].trace,a=new k(t,r.uid),o=a.sourceId,s=p(n),c=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,c),n[0].trace._glTrace=a,a}}}),fV=ze({"src/traces/choroplethmap/index.js"(J,V){"use strict";V.exports={attributes:PM(),supplyDefaults:uV(),colorbar:ag(),calc:IA(),plot:cV(),hoverPoints:DA(),eventData:FA(),selectPoints:zA(),styleOnSelect:function(p,b){if(b){var E=b[0].trace;E._glTrace.updateOnSelect(b)}},getBelow:function(p,b){for(var E=b.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+v[m]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),T=_.reversescale?k.flipScale(_.colorscale):_.colorscale,f=T[0][1],u=E.opacity(f)<1?f:E.addOpacity(f,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(m=1;m=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},V.exports=function(e,t){var n=t[0].trace,r=new E(e,n.uid),a=r.sourceId,o=p(t),s=r.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),gV=ze({"src/traces/densitymap/hover.js"(J,V){"use strict";var p=Gi(),b=V2().hoverPoints,E=V2().getExtraText;V.exports=function(l,e,t){var n=b(l,e,t);if(n){var r=n[0],a=r.cd,o=a[0].trace,s=a[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=p.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,a[0].t.labels),[r]}}}}),yV=ze({"src/traces/densitymap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b.z=E.z,b}}}),_V=ze({"src/traces/densitymap/index.js"(J,V){"use strict";V.exports={attributes:IM(),supplyDefaults:dV(),colorbar:ag(),formatLabels:EM(),calc:pV(),plot:mV(),hoverPoints:gV(),eventData:yV(),getBelow:function(p,b){for(var E=b.getMapLayers(),k=0;kw[z%w.length];i("color",g.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=a.link||{},C=e.newContainer(o,"link");function _(z,I){return p.coerce(M,C,b.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",a.hoverinfo),l(M,C,_,h),_("hovertemplate"),_("sort");var T=E.luminosity(c.paper_bgcolor)<.333,f=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",f);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):T?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:n}),k(o,c,m),m("orientation"),m("direction"),m("valueformat"),m("valuesuffix");let x=g.x.length&&g.y.length?"freeform":void 0;m("arrangement",x),p.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function n(r,a){function o(s,c){return p.coerce(r,a,b.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),FM=ze({"node_modules/strongly-connected-components/scc.js"(J,V){"use strict";V.exports=p;function p(b){for(var E=b.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),n=new Array(E),r=new Array(E),a=0;a0;){i=S[S.length-1];var M=b[i];if(t[i]=0&&r[i].push(n[_])}t[i]=C}else{if(l[i]===k[i]){for(var T=[],f=[],u=0,C=w.length-1;C>=0;--C){var A=w[C];if(e[A]=!1,T.push(A),f.push(r[A]),u+=r[A].length,n[A]=s.length,A===i){w.length=C;break}}s.push(T);for(var x=new Array(u),C=0;C_&&(_=o.source[w]),o.target[w]>_&&(_=o.target[w]);var T=_+1;r.node._count=T;var f,u=r.node.groups,A={};for(w=0;w0&&l(B,T)&&l(F,T)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,v[B]=v[F]=!0;var P="";o.label&&o.label[w]&&(P=o.label[w]);var j=null;P&&g.hasOwnProperty(P)&&(j=g[P]),s.push({pointNumber:w,label:P,color:c?o.color[w]:o.color,hovercolor:m?o.hovercolor[w]:o.hovercolor,customdata:h?o.customdata[w]:o.customdata,concentrationscale:j,source:B,target:F,value:+D}),O.source.push(B),O.target.push(F)}}var U=T+u.length,$=k(a.color),Q=k(a.customdata),re=[];for(w=0;wT-1,childrenNodes:[],pointNumber:w,label:ne,color:$?a.color[w]:a.color,customdata:Q?a.customdata[w]:a.customdata})}var se=!1;return n(U,O.source,O.target)&&(se=!0),{circular:se,links:s,nodes:re,groups:u,groupLookup:A}}function n(r,a,o){for(var s=b.init2dArray(r,0),c=0;c1})}V.exports=function(a,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),TV=ze({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){var f=+this._x.call(null,T),u=+this._y.call(null,T);return E(this.cover(f,u),f,u,T)}function E(T,f,u,A){if(isNaN(f)||isNaN(u))return T;var x,z=T._root,I={data:A},O=T._x0,D=T._y0,B=T._x1,F=T._y1,P,j,U,$,Q,re,ne,se;if(!z)return T._root=I,T;for(;z.length;)if((Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j,x=z,!(z=z[ne=re<<1|Q]))return x[ne]=I,T;if(U=+T._x.call(null,z.data),$=+T._y.call(null,z.data),f===U&&u===$)return I.next=z,x?x[ne]=I:T._root=I,T;do x=x?x[ne]=new Array(4):T._root=new Array(4),(Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j;while((ne=re<<1|Q)===(se=($>=j)<<1|U>=P));return x[se]=z,x[ne]=I,T}function k(T){var f,u,A=T.length,x,z,I=new Array(A),O=new Array(A),D=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=x),zP&&(P=z));if(D>F||B>P)return this;for(this.cover(D,B).cover(F,P),u=0;uT||T>=x||A>f||f>=z;)switch(B=(fF||(O=$.y0)>P||(D=$.x1)=ne)<<1|T>=re)&&($=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=$)}else{var se=T-+this._x.call(null,U.data),G=f-+this._y.call(null,U.data),X=se*se+G*G;if(X=(j=(I+D)/2))?I=j:D=j,(Q=P>=(U=(O+B)/2))?O=U:B=U,f=u,!(u=u[re=Q<<1|$]))return this;if(!u.length)break;(f[re+1&3]||f[re+2&3]||f[re+3&3])&&(A=f,ne=re)}for(;u.data!==T;)if(x=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,x?(z?x.next=z:delete x.next,this):f?(z?f[re]=z:delete f[re],(u=f[0]||f[1]||f[2]||f[3])&&u===(f[3]||f[2]||f[1]||f[0])&&!u.length&&(A?A[ne]=u:this._root=u),this):(this._root=z,this)}function o(T){for(var f=0,u=T.length;f=v.length)return i!=null&&_.sort(i),w!=null?w(_):_;for(var A=-1,x=_.length,z=v[T++],I,O,D=k(),B,F=f();++Av.length)return _;var f,u=g[T-1];return w!=null&&T>=v.length?f=_.entries():(f=[],_.each(function(A,x){f.push({key:x,values:C(A,T)})})),u!=null?f.sort(function(A,x){return u(A.key,x.key)}):f}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,n,r)},entries:function(_){return C(M(_,0,n,r),0)},key:function(_){return v.push(_),S},sortKeys:function(_){return g[v.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return w=_,S}}}function e(){return{}}function t(v,g,i){v[g]=i}function n(){return k()}function r(v,g,i){v.set(g,i)}function a(){}var o=k.prototype;a.prototype=s.prototype={constructor:a,has:o.has,add:function(v){return v+="",this[b+v]=v,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(v,g){var i=new a;if(v instanceof a)v.each(function(M){i.add(M)});else if(v){var w=-1,S=v.length;if(g==null)for(;++w=0&&(o=a.slice(s+1),a=a.slice(0,s)),a&&!r.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:o}})}k.prototype=E.prototype={constructor:k,on:function(n,r){var a=this._,o=l(n+"",a),s,c=-1,m=o.length;if(arguments.length<2){for(;++c0)for(var a=new Array(s),o=0,s,c;o=0&&T._call.call(null,f),T=T._next;--b}function i(){r=(n=o.now())+a,b=E=0;try{g()}finally{b=0,S(),r=0}}function w(){var T=o.now(),f=T-n;f>l&&(a-=f,n=T)}function S(){for(var T,f=e,u,A=1/0;f;)f._call?(A>f._time&&(A=f._time),T=f,f=f._next):(u=f._next,f._next=null,f=T?T._next=u:e=u);t=T,M(A)}function M(T){if(!b){E&&(E=clearTimeout(E));var f=T-r;f>24?(T<1/0&&(E=setTimeout(i,T-o.now()-a)),k&&(k=clearInterval(k))):(k||(n=o.now(),k=setInterval(w,l)),b=1,s(i))}}function C(T,f,u){var A=new h;return f=f==null?0:+f,A.restart(function(x){A.stop(),T(x+f)},f,u),A}function _(T,f,u){var A=new h,x=f;return f==null?(A.restart(T,f,u),A):(f=+f,u=u==null?c():+u,A.restart(function z(I){I+=x,A.restart(z,x+=f,u),T(I)},f,u),A)}p.interval=_,p.now=c,p.timeout=C,p.timer=v,p.timerFlush=g,Object.defineProperty(p,"__esModule",{value:!0})})}}),SV=ze({"node_modules/d3-force/dist/d3-force.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,TV(),zM(),AV(),MV()):b(p.d3=p.d3||{},p.d3,p.d3,p.d3,p.d3)})(J,function(p,b,E,k,l){"use strict";function e(T,f){var u;T==null&&(T=0),f==null&&(f=0);function A(){var x,z=u.length,I,O=0,D=0;for(x=0;xP.index){var ee=j-Y.x-Y.vx,ae=U-Y.y-Y.vy,he=ee*ee+ae*ae;hej+Z||KU+Z||HD.r&&(D.r=D[B].r)}function O(){if(f){var D,B=f.length,F;for(u=new Array(B),D=0;D1?(Q==null?O.remove($):O.set($,U(Q)),f):O.get($)},find:function($,Q,re){var ne=0,se=T.length,G,X,K,H,Y;for(re==null?re=1/0:re*=re,ne=0;ne1?(B.on($,Q),f):B.on($)}}}function S(){var T,f,u,A=t(-30),x,z=1,I=1/0,O=.81;function D(j){var U,$=T.length,Q=b.quadtree(T,h,v).visitAfter(F);for(u=j,U=0;U<$;++U)f=T[U],Q.visit(P)}function B(){if(T){var j,U=T.length,$;for(x=new Array(U),j=0;j=I)return;(j.data!==f||j.next)&&(re===0&&(re=n(),G+=re*re),ne===0&&(ne=n(),G+=ne*ne),GRt?1:Yt>=Rt?0:NaN}function E(Yt){let Rt=Yt,nr=Yt;Yt.length===1&&(Rt=(Qr,Zr)=>Yt(Qr)-Zr,nr=k(Yt));function ur(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)<0?ha=La+1:Pa=La}return ha}function cr(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)>0?Pa=La:ha=La+1}return ha}function Rr(Qr,Zr,ha,Pa){ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);let La=ur(Qr,Zr,ha,Pa-1);return La>ha&&Rt(Qr[La-1],Zr)>-Rt(Qr[La],Zr)?La-1:La}return{left:ur,center:Rr,right:cr}}function k(Yt){return(Rt,nr)=>b(Yt(Rt),nr)}function l(Yt){return Yt===null?NaN:+Yt}function*e(Yt,Rt){if(Rt===void 0)for(let nr of Yt)nr!=null&&(nr=+nr)>=nr&&(yield nr);else{let nr=-1;for(let ur of Yt)(ur=Rt(ur,++nr,Yt))!=null&&(ur=+ur)>=ur&&(yield ur)}}let t=E(b),n=t.right,r=t.left,a=E(l).center;function o(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)ur!=null&&(ur=+ur)>=ur&&++nr;else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(cr=+cr)>=cr&&++nr}return nr}function s(Yt){return Yt.length|0}function c(Yt){return!(Yt>0)}function m(Yt){return typeof Yt!="object"||"length"in Yt?Yt:Array.from(Yt)}function h(Yt){return Rt=>Yt(...Rt)}function v(...Yt){let Rt=typeof Yt[Yt.length-1]=="function"&&h(Yt.pop());Yt=Yt.map(m);let nr=Yt.map(s),ur=Yt.length-1,cr=new Array(ur+1).fill(0),Rr=[];if(ur<0||nr.some(c))return Rr;for(;;){Rr.push(cr.map((Zr,ha)=>Yt[ha][Zr]));let Qr=ur;for(;++cr[Qr]===nr[Qr];){if(Qr===0)return Rt?Rr.map(Rt):Rr;cr[Qr--]=0}}}function g(Yt,Rt){var nr=0,ur=0;return Float64Array.from(Yt,Rt===void 0?cr=>nr+=+cr||0:cr=>nr+=+Rt(cr,ur++,Yt)||0)}function i(Yt,Rt){return RtYt?1:Rt>=Yt?0:NaN}function w(Yt,Rt){let nr=0,ur,cr=0,Rr=0;if(Rt===void 0)for(let Qr of Yt)Qr!=null&&(Qr=+Qr)>=Qr&&(ur=Qr-cr,cr+=ur/++nr,Rr+=ur*(Qr-cr));else{let Qr=-1;for(let Zr of Yt)(Zr=Rt(Zr,++Qr,Yt))!=null&&(Zr=+Zr)>=Zr&&(ur=Zr-cr,cr+=ur/++nr,Rr+=ur*(Zr-cr))}if(nr>1)return Rr/(nr-1)}function S(Yt,Rt){let nr=w(Yt,Rt);return nr&&Math.sqrt(nr)}function M(Yt,Rt){let nr,ur;if(Rt===void 0)for(let cr of Yt)cr!=null&&(nr===void 0?cr>=cr&&(nr=ur=cr):(nr>cr&&(nr=cr),ur=Rr&&(nr=ur=Rr):(nr>Rr&&(nr=Rr),ur0){for(Qr=Rt[--nr];nr>0&&(ur=Qr,cr=Rt[--nr],Qr=ur+cr,Rr=cr-(Qr-ur),!Rr););nr>0&&(Rr<0&&Rt[nr-1]<0||Rr>0&&Rt[nr-1]>0)&&(cr=Rr*2,ur=Qr+cr,cr==ur-Qr&&(Qr=ur))}return Qr}}function _(Yt,Rt){let nr=new C;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&nr.add(ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&nr.add(cr)}return+nr}function T(Yt,Rt){let nr=new C,ur=-1;return Float64Array.from(Yt,Rt===void 0?cr=>nr.add(+cr||0):cr=>nr.add(+Rt(cr,++ur,Yt)||0))}class f extends Map{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let[ur,cr]of Rt)this.set(ur,cr)}get(Rt){return super.get(A(this,Rt))}has(Rt){return super.has(A(this,Rt))}set(Rt,nr){return super.set(x(this,Rt),nr)}delete(Rt){return super.delete(z(this,Rt))}}class u extends Set{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let ur of Rt)this.add(ur)}has(Rt){return super.has(A(this,Rt))}add(Rt){return super.add(x(this,Rt))}delete(Rt){return super.delete(z(this,Rt))}}function A({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):nr}function x({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):(Yt.set(ur,nr),nr)}function z({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)&&(nr=Yt.get(nr),Yt.delete(ur)),nr}function I(Yt){return Yt!==null&&typeof Yt=="object"?Yt.valueOf():Yt}function O(Yt){return Yt}function D(Yt,...Rt){return Q(Yt,O,O,Rt)}function B(Yt,...Rt){return Q(Yt,Array.from,O,Rt)}function F(Yt,Rt,...nr){return Q(Yt,O,Rt,nr)}function P(Yt,Rt,...nr){return Q(Yt,Array.from,Rt,nr)}function j(Yt,...Rt){return Q(Yt,O,$,Rt)}function U(Yt,...Rt){return Q(Yt,Array.from,$,Rt)}function $(Yt){if(Yt.length!==1)throw new Error("duplicate key");return Yt[0]}function Q(Yt,Rt,nr,ur){return function cr(Rr,Qr){if(Qr>=ur.length)return nr(Rr);let Zr=new f,ha=ur[Qr++],Pa=-1;for(let La of Rr){let un=ha(La,++Pa,Rr),Xa=Zr.get(un);Xa?Xa.push(La):Zr.set(un,[La])}for(let[La,un]of Zr)Zr.set(La,cr(un,Qr));return Rt(Zr)}(Yt,0)}function re(Yt,Rt){return Array.from(Rt,nr=>Yt[nr])}function ne(Yt,...Rt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Yt=Array.from(Yt);let[nr=b]=Rt;if(nr.length===1||Rt.length>1){let ur=Uint32Array.from(Yt,(cr,Rr)=>Rr);return Rt.length>1?(Rt=Rt.map(cr=>Yt.map(cr)),ur.sort((cr,Rr)=>{for(let Qr of Rt){let Zr=b(Qr[cr],Qr[Rr]);if(Zr)return Zr}})):(nr=Yt.map(nr),ur.sort((cr,Rr)=>b(nr[cr],nr[Rr]))),re(Yt,ur)}return Yt.sort(nr)}function se(Yt,Rt,nr){return(Rt.length===1?ne(F(Yt,Rt,nr),([ur,cr],[Rr,Qr])=>b(cr,Qr)||b(ur,Rr)):ne(D(Yt,nr),([ur,cr],[Rr,Qr])=>Rt(cr,Qr)||b(ur,Rr))).map(([ur])=>ur)}var G=Array.prototype,X=G.slice;function K(Yt){return function(){return Yt}}var H=Math.sqrt(50),Y=Math.sqrt(10),q=Math.sqrt(2);function Z(Yt,Rt,nr){var ur,cr=-1,Rr,Qr,Zr;if(Rt=+Rt,Yt=+Yt,nr=+nr,Yt===Rt&&nr>0)return[Yt];if((ur=Rt0){let ha=Math.round(Yt/Zr),Pa=Math.round(Rt/Zr);for(ha*ZrRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++crRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++cr=0?(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)*Math.pow(10,cr):-Math.pow(10,-cr)/(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)}function ae(Yt,Rt,nr){var ur=Math.abs(Rt-Yt)/Math.max(0,nr),cr=Math.pow(10,Math.floor(Math.log(ur)/Math.LN10)),Rr=ur/cr;return Rr>=H?cr*=10:Rr>=Y?cr*=5:Rr>=q&&(cr*=2),Rt0?(Yt=Math.floor(Yt/cr)*cr,Rt=Math.ceil(Rt/cr)*cr):cr<0&&(Yt=Math.ceil(Yt*cr)/cr,Rt=Math.floor(Rt*cr)/cr),ur=cr}}function xe(Yt){return Math.ceil(Math.log(o(Yt))/Math.LN2)+1}function we(){var Yt=O,Rt=M,nr=xe;function ur(cr){Array.isArray(cr)||(cr=Array.from(cr));var Rr,Qr=cr.length,Zr,ha=new Array(Qr);for(Rr=0;Rr=un)if(Un>=un&&Rt===M){let Yn=ee(La,un,li);isFinite(Yn)&&(Yn>0?un=(Math.floor(un/Yn)+1)*Yn:Yn<0&&(un=(Math.ceil(un*-Yn)+1)/-Yn))}else Xa.pop()}for(var ja=Xa.length;Xa[0]<=La;)Xa.shift(),--ja;for(;Xa[ja-1]>un;)Xa.pop(),--ja;var Nn=new Array(ja+1),yn;for(Rr=0;Rr<=ja;++Rr)yn=Nn[Rr]=[],yn.x0=Rr>0?Xa[Rr-1]:La,yn.x1=Rr=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr=cr)&&(nr=cr)}return nr}function Se(Yt,Rt){let nr;if(Rt===void 0)for(let ur of Yt)ur!=null&&(nr>ur||nr===void 0&&ur>=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr>cr||nr===void 0&&cr>=cr)&&(nr=cr)}return nr}function Ie(Yt,Rt,nr=0,ur=Yt.length-1,cr=b){for(;ur>nr;){if(ur-nr>600){let ha=ur-nr+1,Pa=Rt-nr+1,La=Math.log(ha),un=.5*Math.exp(2*La/3),Xa=.5*Math.sqrt(La*un*(ha-un)/ha)*(Pa-ha/2<0?-1:1),ja=Math.max(nr,Math.floor(Rt-Pa*un/ha+Xa)),Nn=Math.min(ur,Math.floor(Rt+(ha-Pa)*un/ha+Xa));Ie(Yt,Rt,ja,Nn,cr)}let Rr=Yt[Rt],Qr=nr,Zr=ur;for(Ve(Yt,nr,Rt),cr(Yt[ur],Rr)>0&&Ve(Yt,nr,ur);Qr0;)--Zr}cr(Yt[nr],Rr)===0?Ve(Yt,nr,Zr):(++Zr,Ve(Yt,Zr,ur)),Zr<=Rt&&(nr=Zr+1),Rt<=Zr&&(ur=Zr-1)}return Yt}function Ve(Yt,Rt,nr){let ur=Yt[Rt];Yt[Rt]=Yt[nr],Yt[nr]=ur}function Ge(Yt,Rt,nr){if(Yt=Float64Array.from(e(Yt,nr)),!!(ur=Yt.length)){if((Rt=+Rt)<=0||ur<2)return Se(Yt);if(Rt>=1)return Me(Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=Me(Ie(Yt,Rr).subarray(0,Rr+1)),Zr=Se(Yt.subarray(Rr+1));return Qr+(Zr-Qr)*(cr-Rr)}}function ke(Yt,Rt,nr=l){if(ur=Yt.length){if((Rt=+Rt)<=0||ur<2)return+nr(Yt[0],0,Yt);if(Rt>=1)return+nr(Yt[ur-1],ur-1,Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=+nr(Yt[Rr],Rr,Yt),Zr=+nr(Yt[Rr+1],Rr+1,Yt);return Qr+(Zr-Qr)*(cr-Rr)}}function _e(Yt,Rt,nr){return Math.ceil((nr-Rt)/(2*(Ge(Yt,.75)-Ge(Yt,.25))*Math.pow(o(Yt),-1/3)))}function ce(Yt,Rt,nr){return Math.ceil((nr-Rt)/(3.5*S(Yt)*Math.pow(o(Yt),-1/3)))}function ve(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr=Rr)&&(nr=Rr,ur=cr);return ur}function le(Yt,Rt){let nr=0,ur=0;if(Rt===void 0)for(let cr of Yt)cr!=null&&(cr=+cr)>=cr&&(++nr,ur+=cr);else{let cr=-1;for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(Rr=+Rr)>=Rr&&(++nr,ur+=Rr)}if(nr)return ur/nr}function Ae(Yt,Rt){return Ge(Yt,.5,Rt)}function*Be(Yt){for(let Rt of Yt)yield*ad(Rt)}function Xe(Yt){return Array.from(Be(Yt))}function Ye(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);return ur}function yt(Yt,Rt=gt){let nr=[],ur,cr=!1;for(let Rr of Yt)cr&&nr.push(Rt(ur,Rr)),ur=Rr,cr=!0;return nr}function gt(Yt,Rt){return[Yt,Rt]}function Tt(Yt,Rt,nr){Yt=+Yt,Rt=+Rt,nr=(cr=arguments.length)<2?(Rt=Yt,Yt=0,1):cr<3?1:+nr;for(var ur=-1,cr=Math.max(0,Math.ceil((Rt-Yt)/nr))|0,Rr=new Array(cr);++ur0:b(Qr,Qr)===0)&&(nr=Rr,cr=Qr,ur=!0)}}else for(let cr of Yt)(ur?Rt(cr,nr)>0:Rt(cr,cr)===0)&&(nr=cr,ur=!0);return nr}function _r(Yt,Rt=b){if(Rt.length===1)return ve(Yt,Rt);let nr,ur=-1,cr=-1;for(let Rr of Yt)++cr,(ur<0?Rt(Rr,Rr)===0:Rt(Rr,nr)>0)&&(nr=Rr,ur=cr);return ur}function Xt(Yt,Rt){let nr=$t(Yt,Rt);return nr<0?void 0:nr}var or=Ot(Math.random);function Ot(Yt){return function(nr,ur=0,cr=nr.length){let Rr=cr-(ur=+ur);for(;Rr;){let Qr=Yt()*Rr--|0,Zr=nr[Rr+ur];nr[Rr+ur]=nr[Qr+ur],nr[Qr+ur]=Zr}return nr}}function vt(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&(nr+=ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&(nr+=cr)}return nr}function ht(Yt){if(!(Rr=Yt.length))return[];for(var Rt=-1,nr=Se(Yt,De),ur=new Array(nr);++RtRt(nr,ur,Yt))}function Mt(Yt,Rt,nr){if(typeof Rt!="function")throw new TypeError("reducer is not a function");let ur=Yt[Symbol.iterator](),cr,Rr,Qr=-1;if(arguments.length<3){if({done:cr,value:nr}=ur.next(),cr)return;++Qr}for(;{done:cr,value:Rr}=ur.next(),!cr;)nr=Rt(nr,Rr,++Qr,Yt);return nr}function pt(Yt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Yt).reverse()}function Pt(Yt,...Rt){Yt=new Set(Yt);for(let nr of Rt)for(let ur of nr)Yt.delete(ur);return Yt}function Ct(Yt,Rt){let nr=Rt[Symbol.iterator](),ur=new Set;for(let cr of Yt){if(ur.has(cr))return!1;let Rr,Qr;for(;({value:Rr,done:Qr}=nr.next())&&!Qr;){if(Object.is(cr,Rr))return!1;ur.add(Rr)}}return!0}function qt(Yt){return Yt instanceof Set?Yt:new Set(Yt)}function Vt(Yt,...Rt){Yt=new Set(Yt),Rt=Rt.map(qt);e:for(let nr of Yt)for(let ur of Rt)if(!ur.has(nr)){Yt.delete(nr);continue e}return Yt}function Ht(Yt,Rt){let nr=Yt[Symbol.iterator](),ur=new Set;for(let cr of Rt){if(ur.has(cr))continue;let Rr,Qr;for(;{value:Rr,done:Qr}=nr.next();){if(Qr)return!1;if(ur.add(Rr),Object.is(cr,Rr))break}}return!0}function Sr(Yt,Rt){return Ht(Rt,Yt)}function Kr(...Yt){let Rt=new Set;for(let nr of Yt)for(let ur of nr)Rt.add(ur);return Rt}p.Adder=C,p.InternMap=f,p.InternSet=u,p.ascending=b,p.bin=we,p.bisect=n,p.bisectCenter=a,p.bisectLeft=r,p.bisectRight=n,p.bisector=E,p.count=o,p.cross=v,p.cumsum=g,p.descending=i,p.deviation=S,p.difference=Pt,p.disjoint=Ct,p.every=We,p.extent=M,p.fcumsum=T,p.filter=Je,p.fsum=_,p.greatest=rr,p.greatestIndex=_r,p.group=D,p.groupSort=se,p.groups=B,p.histogram=we,p.index=j,p.indexes=U,p.intersection=Vt,p.least=At,p.leastIndex=$t,p.map=et,p.max=Me,p.maxIndex=ve,p.mean=le,p.median=Ae,p.merge=Xe,p.min=Se,p.minIndex=Ye,p.nice=he,p.pairs=yt,p.permute=re,p.quantile=Ge,p.quantileSorted=ke,p.quickselect=Ie,p.range=Tt,p.reduce=Mt,p.reverse=pt,p.rollup=F,p.rollups=P,p.scan=Xt,p.shuffle=or,p.shuffler=Ot,p.some=Ke,p.sort=ne,p.subset=Sr,p.sum=vt,p.superset=Ht,p.thresholdFreedmanDiaconis=_e,p.thresholdScott=ce,p.thresholdSturges=xe,p.tickIncrement=ee,p.tickStep=ae,p.ticks=Z,p.transpose=ht,p.union=Kr,p.variance=w,p.zip=Ne,Object.defineProperty(p,"__esModule",{value:!0})})}}),kV=ze({"node_modules/d3-path/dist/d3-path.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";var b=Math.PI,E=2*b,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(n,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,r){this._+="L"+(this._x1=+n)+","+(this._y1=+r)},quadraticCurveTo:function(n,r,a,o){this._+="Q"+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},bezierCurveTo:function(n,r,a,o,s,c){this._+="C"+ +n+","+ +r+","+ +a+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(n,r,a,o,s){n=+n,r=+r,a=+a,o=+o,s=+s;var c=this._x1,m=this._y1,h=a-n,v=o-r,g=c-n,i=m-r,w=g*g+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=r);else if(w>k)if(!(Math.abs(i*h-v*g)>k)||!s)this._+="L"+(this._x1=n)+","+(this._y1=r);else{var S=a-c,M=o-m,C=h*h+v*v,_=S*S+M*M,T=Math.sqrt(C),f=Math.sqrt(w),u=s*Math.tan((b-Math.acos((C+w-_)/(2*T*f)))/2),A=u/f,x=u/T;Math.abs(A-1)>k&&(this._+="L"+(n+A*g)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>g*M)+","+(this._x1=n+x*h)+","+(this._y1=r+x*v)}},arc:function(n,r,a,o,s,c){n=+n,r=+r,a=+a,c=!!c;var m=a*Math.cos(o),h=a*Math.sin(o),v=n+m,g=r+h,i=1^c,w=c?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+v+","+g:(Math.abs(this._x1-v)>k||Math.abs(this._y1-g)>k)&&(this._+="L"+v+","+g),a&&(w<0&&(w=w%E+E),w>l?this._+="A"+a+","+a+",0,1,"+i+","+(n-m)+","+(r-h)+"A"+a+","+a+",0,1,"+i+","+(this._x1=v)+","+(this._y1=g):w>k&&(this._+="A"+a+","+a+",0,"+ +(w>=b)+","+i+","+(this._x1=n+a*Math.cos(s))+","+(this._y1=r+a*Math.sin(s))))},rect:function(n,r,a,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)+"h"+ +a+"v"+ +o+"h"+-a+"Z"},toString:function(){return this._}},p.path=t,Object.defineProperty(p,"__esModule",{value:!0})})}}),BM=ze({"node_modules/d3-shape/dist/d3-shape.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kV()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(ot){return function(){return ot}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,n=Math.min,r=Math.sin,a=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,m=2*s;function h(ot){return ot>1?0:ot<-1?s:Math.acos(ot)}function v(ot){return ot>=1?c:ot<=-1?-c:Math.asin(ot)}function g(ot){return ot.innerRadius}function i(ot){return ot.outerRadius}function w(ot){return ot.startAngle}function S(ot){return ot.endAngle}function M(ot){return ot&&ot.padAngle}function C(ot,kt,jt,ar,Er,xr,zr,Lr){var aa=jt-ot,Sa=ar-kt,wa=zr-Er,pn=Lr-xr,tn=pn*aa-wa*Sa;if(!(tn*tnHi*Hi+Mi*Mi&&(gi=io,qi=oo),{cx:gi,cy:qi,x01:-wa,y01:-pn,x11:gi*(Er/jn-1),y11:qi*(Er/jn-1)}}function T(){var ot=g,kt=i,jt=E(0),ar=null,Er=w,xr=S,zr=M,Lr=null;function aa(){var Sa,wa,pn=+ot.apply(this,arguments),tn=+kt.apply(this,arguments),ai=Er.apply(this,arguments)-c,rn=xr.apply(this,arguments)-c,Ri=k(rn-ai),Gn=rn>ai;if(Lr||(Lr=Sa=b.path()),tno))Lr.moveTo(0,0);else if(Ri>m-o)Lr.moveTo(tn*e(ai),tn*r(ai)),Lr.arc(0,0,tn,ai,rn,!Gn),pn>o&&(Lr.moveTo(pn*e(rn),pn*r(rn)),Lr.arc(0,0,pn,rn,ai,Gn));else{var no=ai,Di=rn,fn=ai,Ai=rn,jn=Ri,Xn=Ri,eo=zr.apply(this,arguments)/2,gi=eo>o&&(ar?+ar.apply(this,arguments):a(pn*pn+tn*tn)),qi=n(k(tn-pn)/2,+jt.apply(this,arguments)),io=qi,oo=qi,Vn,qn;if(gi>o){var Hi=v(gi/pn*r(eo)),Mi=v(gi/tn*r(eo));(jn-=Hi*2)>o?(Hi*=Gn?1:-1,fn+=Hi,Ai-=Hi):(jn=0,fn=Ai=(ai+rn)/2),(Xn-=Mi*2)>o?(Mi*=Gn?1:-1,no+=Mi,Di-=Mi):(Xn=0,no=Di=(ai+rn)/2)}var Ro=tn*e(no),go=tn*r(no),Eo=pn*e(Ai),Ao=pn*r(Ai);if(qi>o){var ds=tn*e(Di),jo=tn*r(Di),Wo=pn*e(fn),to=pn*r(fn),wo;if(Rio?oo>o?(Vn=_(Wo,to,Ro,go,tn,oo,Gn),qn=_(ds,jo,Eo,Ao,tn,oo,Gn),Lr.moveTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),ooo)||!(jn>o)?Lr.lineTo(Eo,Ao):io>o?(Vn=_(Eo,Ao,ds,jo,pn,-io,Gn),qn=_(Ro,go,Wo,to,pn,-io,Gn),Lr.lineTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),io=tn;--ai)Lr.point(Di[ai],fn[ai]);Lr.lineEnd(),Lr.areaEnd()}Gn&&(Di[pn]=+ot(Ri,pn,wa),fn[pn]=+jt(Ri,pn,wa),Lr.point(kt?+kt(Ri,pn,wa):Di[pn],ar?+ar(Ri,pn,wa):fn[pn]))}if(no)return Lr=null,no+""||null}function Sa(){return z().defined(Er).curve(zr).context(xr)}return aa.x=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),kt=null,aa):ot},aa.x0=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),aa):ot},aa.x1=function(wa){return arguments.length?(kt=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):kt},aa.y=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),ar=null,aa):jt},aa.y0=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),aa):jt},aa.y1=function(wa){return arguments.length?(ar=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):ar},aa.lineX0=aa.lineY0=function(){return Sa().x(ot).y(jt)},aa.lineY1=function(){return Sa().x(ot).y(ar)},aa.lineX1=function(){return Sa().x(kt).y(jt)},aa.defined=function(wa){return arguments.length?(Er=typeof wa=="function"?wa:E(!!wa),aa):Er},aa.curve=function(wa){return arguments.length?(zr=wa,xr!=null&&(Lr=zr(xr)),aa):zr},aa.context=function(wa){return arguments.length?(wa==null?xr=Lr=null:Lr=zr(xr=wa),aa):xr},aa}function O(ot,kt){return ktot?1:kt>=ot?0:NaN}function D(ot){return ot}function B(){var ot=D,kt=O,jt=null,ar=E(0),Er=E(m),xr=E(0);function zr(Lr){var aa,Sa=Lr.length,wa,pn,tn=0,ai=new Array(Sa),rn=new Array(Sa),Ri=+ar.apply(this,arguments),Gn=Math.min(m,Math.max(-m,Er.apply(this,arguments)-Ri)),no,Di=Math.min(Math.abs(Gn)/Sa,xr.apply(this,arguments)),fn=Di*(Gn<0?-1:1),Ai;for(aa=0;aa0&&(tn+=Ai);for(kt!=null?ai.sort(function(jn,Xn){return kt(rn[jn],rn[Xn])}):jt!=null&&ai.sort(function(jn,Xn){return jt(Lr[jn],Lr[Xn])}),aa=0,pn=tn?(Gn-Sa*fn)/tn:0;aa0?Ai*pn:0)+fn,rn[wa]={data:Lr[wa],index:aa,value:Ai,startAngle:Ri,endAngle:no,padAngle:Di};return rn}return zr.value=function(Lr){return arguments.length?(ot=typeof Lr=="function"?Lr:E(+Lr),zr):ot},zr.sortValues=function(Lr){return arguments.length?(kt=Lr,jt=null,zr):kt},zr.sort=function(Lr){return arguments.length?(jt=Lr,kt=null,zr):jt},zr.startAngle=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.endAngle=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.padAngle=function(Lr){return arguments.length?(xr=typeof Lr=="function"?Lr:E(+Lr),zr):xr},zr}var F=j(u);function P(ot){this._curve=ot}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ot,kt){this._curve.point(kt*Math.sin(ot),kt*-Math.cos(ot))}};function j(ot){function kt(jt){return new P(ot(jt))}return kt._curve=ot,kt}function U(ot){var kt=ot.curve;return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot.curve=function(jt){return arguments.length?kt(j(jt)):kt()._curve},ot}function $(){return U(z().curve(F))}function Q(){var ot=I().curve(F),kt=ot.curve,jt=ot.lineX0,ar=ot.lineX1,Er=ot.lineY0,xr=ot.lineY1;return ot.angle=ot.x,delete ot.x,ot.startAngle=ot.x0,delete ot.x0,ot.endAngle=ot.x1,delete ot.x1,ot.radius=ot.y,delete ot.y,ot.innerRadius=ot.y0,delete ot.y0,ot.outerRadius=ot.y1,delete ot.y1,ot.lineStartAngle=function(){return U(jt())},delete ot.lineX0,ot.lineEndAngle=function(){return U(ar())},delete ot.lineX1,ot.lineInnerRadius=function(){return U(Er())},delete ot.lineY0,ot.lineOuterRadius=function(){return U(xr())},delete ot.lineY1,ot.curve=function(zr){return arguments.length?kt(j(zr)):kt()._curve},ot}function re(ot,kt){return[(kt=+kt)*Math.cos(ot-=Math.PI/2),kt*Math.sin(ot)]}var ne=Array.prototype.slice;function se(ot){return ot.source}function G(ot){return ot.target}function X(ot){var kt=se,jt=G,ar=A,Er=x,xr=null;function zr(){var Lr,aa=ne.call(arguments),Sa=kt.apply(this,aa),wa=jt.apply(this,aa);if(xr||(xr=Lr=b.path()),ot(xr,+ar.apply(this,(aa[0]=Sa,aa)),+Er.apply(this,aa),+ar.apply(this,(aa[0]=wa,aa)),+Er.apply(this,aa)),Lr)return xr=null,Lr+""||null}return zr.source=function(Lr){return arguments.length?(kt=Lr,zr):kt},zr.target=function(Lr){return arguments.length?(jt=Lr,zr):jt},zr.x=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.y=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.context=function(Lr){return arguments.length?(xr=Lr??null,zr):xr},zr}function K(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt=(kt+ar)/2,jt,kt,Er,ar,Er)}function H(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt,jt=(jt+Er)/2,ar,jt,ar,Er)}function Y(ot,kt,jt,ar,Er){var xr=re(kt,jt),zr=re(kt,jt=(jt+Er)/2),Lr=re(ar,jt),aa=re(ar,Er);ot.moveTo(xr[0],xr[1]),ot.bezierCurveTo(zr[0],zr[1],Lr[0],Lr[1],aa[0],aa[1])}function q(){return X(K)}function Z(){return X(H)}function ee(){var ot=X(Y);return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot}var ae={draw:function(ot,kt){var jt=Math.sqrt(kt/s);ot.moveTo(jt,0),ot.arc(0,0,jt,0,m)}},he={draw:function(ot,kt){var jt=Math.sqrt(kt/5)/2;ot.moveTo(-3*jt,-jt),ot.lineTo(-jt,-jt),ot.lineTo(-jt,-3*jt),ot.lineTo(jt,-3*jt),ot.lineTo(jt,-jt),ot.lineTo(3*jt,-jt),ot.lineTo(3*jt,jt),ot.lineTo(jt,jt),ot.lineTo(jt,3*jt),ot.lineTo(-jt,3*jt),ot.lineTo(-jt,jt),ot.lineTo(-3*jt,jt),ot.closePath()}},xe=Math.sqrt(1/3),we=xe*2,Me={draw:function(ot,kt){var jt=Math.sqrt(kt/we),ar=jt*xe;ot.moveTo(0,-jt),ot.lineTo(ar,0),ot.lineTo(0,jt),ot.lineTo(-ar,0),ot.closePath()}},Se=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ve=Math.sin(m/10)*Ie,Ge=-Math.cos(m/10)*Ie,ke={draw:function(ot,kt){var jt=Math.sqrt(kt*Se),ar=Ve*jt,Er=Ge*jt;ot.moveTo(0,-jt),ot.lineTo(ar,Er);for(var xr=1;xr<5;++xr){var zr=m*xr/5,Lr=Math.cos(zr),aa=Math.sin(zr);ot.lineTo(aa*jt,-Lr*jt),ot.lineTo(Lr*ar-aa*Er,aa*ar+Lr*Er)}ot.closePath()}},_e={draw:function(ot,kt){var jt=Math.sqrt(kt),ar=-jt/2;ot.rect(ar,ar,jt,jt)}},ce=Math.sqrt(3),ve={draw:function(ot,kt){var jt=-Math.sqrt(kt/(ce*3));ot.moveTo(0,jt*2),ot.lineTo(-ce*jt,-jt),ot.lineTo(ce*jt,-jt),ot.closePath()}},le=-.5,Ae=Math.sqrt(3)/2,Be=1/Math.sqrt(12),Xe=(Be/2+1)*3,Ye={draw:function(ot,kt){var jt=Math.sqrt(kt/Xe),ar=jt/2,Er=jt*Be,xr=ar,zr=jt*Be+jt,Lr=-xr,aa=zr;ot.moveTo(ar,Er),ot.lineTo(xr,zr),ot.lineTo(Lr,aa),ot.lineTo(le*ar-Ae*Er,Ae*ar+le*Er),ot.lineTo(le*xr-Ae*zr,Ae*xr+le*zr),ot.lineTo(le*Lr-Ae*aa,Ae*Lr+le*aa),ot.lineTo(le*ar+Ae*Er,le*Er-Ae*ar),ot.lineTo(le*xr+Ae*zr,le*zr-Ae*xr),ot.lineTo(le*Lr+Ae*aa,le*aa-Ae*Lr),ot.closePath()}},yt=[ae,he,Me,_e,ke,ve,Ye];function gt(){var ot=E(ae),kt=E(64),jt=null;function ar(){var Er;if(jt||(jt=Er=b.path()),ot.apply(this,arguments).draw(jt,+kt.apply(this,arguments)),Er)return jt=null,Er+""||null}return ar.type=function(Er){return arguments.length?(ot=typeof Er=="function"?Er:E(Er),ar):ot},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(jt=Er??null,ar):jt},ar}function Tt(){}function At(ot,kt,jt){ot._context.bezierCurveTo((2*ot._x0+ot._x1)/3,(2*ot._y0+ot._y1)/3,(ot._x0+2*ot._x1)/3,(ot._y0+2*ot._y1)/3,(ot._x0+4*ot._x1+kt)/6,(ot._y0+4*ot._y1+jt)/6)}function $t(ot){this._context=ot}$t.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:At(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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);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:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function rr(ot){return new $t(ot)}function _r(ot){this._context=ot}_r.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x2=ot,this._y2=kt;break;case 1:this._point=2,this._x3=ot,this._y3=kt;break;case 2:this._point=3,this._x4=ot,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+ot)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Xt(ot){return new _r(ot)}function or(ot){this._context=ot}or.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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var jt=(this._x0+4*this._x1+ot)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(jt,ar):this._context.moveTo(jt,ar);break;case 3:this._point=4;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Ot(ot){return new or(ot)}function vt(ot,kt){this._basis=new $t(ot),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length-1;if(jt>0)for(var ar=ot[0],Er=kt[0],xr=ot[jt]-ar,zr=kt[jt]-Er,Lr=-1,aa;++Lr<=jt;)aa=Lr/jt,this._basis.point(this._beta*ot[Lr]+(1-this._beta)*(ar+aa*xr),this._beta*kt[Lr]+(1-this._beta)*(Er+aa*zr));this._x=this._y=null,this._basis.lineEnd()},point:function(ot,kt){this._x.push(+ot),this._y.push(+kt)}};var ht=function ot(kt){function jt(ar){return kt===1?new $t(ar):new vt(ar,kt)}return jt.beta=function(ar){return ot(+ar)},jt}(.85);function De(ot,kt,jt){ot._context.bezierCurveTo(ot._x1+ot._k*(ot._x2-ot._x0),ot._y1+ot._k*(ot._y2-ot._y0),ot._x2+ot._k*(ot._x1-kt),ot._y2+ot._k*(ot._y1-jt),ot._x2,ot._y2)}function Ne(ot,kt){this._context=ot,this._k=(1-kt)/6}Ne.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:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2,this._x1=ot,this._y1=kt;break;case 2:this._point=3;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var We=function ot(kt){function jt(ar){return new Ne(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function Ke(ot,kt){this._context=ot,this._k=(1-kt)/6}Ke.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Je=function ot(kt){function jt(ar){return new Ke(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function et(ot,kt){this._context=ot,this._k=(1-kt)/6}et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,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:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function ot(kt){function jt(ar){return new et(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function pt(ot,kt,jt){var ar=ot._x1,Er=ot._y1,xr=ot._x2,zr=ot._y2;if(ot._l01_a>o){var Lr=2*ot._l01_2a+3*ot._l01_a*ot._l12_a+ot._l12_2a,aa=3*ot._l01_a*(ot._l01_a+ot._l12_a);ar=(ar*Lr-ot._x0*ot._l12_2a+ot._x2*ot._l01_2a)/aa,Er=(Er*Lr-ot._y0*ot._l12_2a+ot._y2*ot._l01_2a)/aa}if(ot._l23_a>o){var Sa=2*ot._l23_2a+3*ot._l23_a*ot._l12_a+ot._l12_2a,wa=3*ot._l23_a*(ot._l23_a+ot._l12_a);xr=(xr*Sa+ot._x1*ot._l23_2a-kt*ot._l12_2a)/wa,zr=(zr*Sa+ot._y1*ot._l23_2a-jt*ot._l12_2a)/wa}ot._context.bezierCurveTo(ar,Er,xr,zr,ot._x2,ot._y2)}function Pt(ot,kt){this._context=ot,this._alpha=kt}Pt.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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:pt(this,ot,kt);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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function ot(kt){function jt(ar){return kt?new Pt(ar,kt):new Ne(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function qt(ot,kt){this._context=ot,this._alpha=kt}qt.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:pt(this,ot,kt);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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Vt=function ot(kt){function jt(ar){return kt?new qt(ar,kt):new Ke(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Ht(ot,kt){this._context=ot,this._alpha=kt}Ht.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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,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:pt(this,ot,kt);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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function ot(kt){function jt(ar){return kt?new Ht(ar,kt):new et(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Kr(ot){this._context=ot}Kr.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ot,kt){ot=+ot,kt=+kt,this._point?this._context.lineTo(ot,kt):(this._point=1,this._context.moveTo(ot,kt))}};function Yt(ot){return new Kr(ot)}function Rt(ot){return ot<0?-1:1}function nr(ot,kt,jt){var ar=ot._x1-ot._x0,Er=kt-ot._x1,xr=(ot._y1-ot._y0)/(ar||Er<0&&-0),zr=(jt-ot._y1)/(Er||ar<0&&-0),Lr=(xr*Er+zr*ar)/(ar+Er);return(Rt(xr)+Rt(zr))*Math.min(Math.abs(xr),Math.abs(zr),.5*Math.abs(Lr))||0}function ur(ot,kt){var jt=ot._x1-ot._x0;return jt?(3*(ot._y1-ot._y0)/jt-kt)/2:kt}function cr(ot,kt,jt){var ar=ot._x0,Er=ot._y0,xr=ot._x1,zr=ot._y1,Lr=(xr-ar)/3;ot._context.bezierCurveTo(ar+Lr,Er+Lr*kt,xr-Lr,zr-Lr*jt,xr,zr)}function Rr(ot){this._context=ot}Rr.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:cr(this,this._t0,ur(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){var jt=NaN;if(ot=+ot,kt=+kt,!(ot===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,cr(this,ur(this,jt=nr(this,ot,kt)),jt);break;default:cr(this,this._t0,jt=nr(this,ot,kt));break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt,this._t0=jt}}};function Qr(ot){this._context=new Zr(ot)}(Qr.prototype=Object.create(Rr.prototype)).point=function(ot,kt){Rr.prototype.point.call(this,kt,ot)};function Zr(ot){this._context=ot}Zr.prototype={moveTo:function(ot,kt){this._context.moveTo(kt,ot)},closePath:function(){this._context.closePath()},lineTo:function(ot,kt){this._context.lineTo(kt,ot)},bezierCurveTo:function(ot,kt,jt,ar,Er,xr){this._context.bezierCurveTo(kt,ot,ar,jt,xr,Er)}};function ha(ot){return new Rr(ot)}function Pa(ot){return new Qr(ot)}function La(ot){this._context=ot}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length;if(jt)if(this._line?this._context.lineTo(ot[0],kt[0]):this._context.moveTo(ot[0],kt[0]),jt===2)this._context.lineTo(ot[1],kt[1]);else for(var ar=un(ot),Er=un(kt),xr=0,zr=1;zr=0;--kt)Er[kt]=(zr[kt]-Er[kt+1])/xr[kt];for(xr[jt-1]=(ot[jt]+Er[jt-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(ot,kt);else{var jt=this._x*(1-this._t)+ot*this._t;this._context.lineTo(jt,this._y),this._context.lineTo(jt,kt)}break}}this._x=ot,this._y=kt}};function Nn(ot){return new ja(ot,.5)}function yn(ot){return new ja(ot,0)}function Un(ot){return new ja(ot,1)}function li(ot,kt){if((zr=ot.length)>1)for(var jt=1,ar,Er,xr=ot[kt[0]],zr,Lr=xr.length;jt=0;)jt[kt]=kt;return jt}function on(ot,kt){return ot[kt]}function en(){var ot=E([]),kt=Yn,jt=li,ar=on;function Er(xr){var zr=ot.apply(this,arguments),Lr,aa=xr.length,Sa=zr.length,wa=new Array(Sa),pn;for(Lr=0;Lr0){for(var jt,ar,Er=0,xr=ot[0].length,zr;Er0)for(var jt,ar=0,Er,xr,zr,Lr,aa,Sa=ot[kt[0]].length;ar0?(Er[0]=zr,Er[1]=zr+=xr):xr<0?(Er[1]=Lr,Er[0]=Lr+=xr):(Er[0]=0,Er[1]=xr)}function Ja(ot,kt){if((Er=ot.length)>0){for(var jt=0,ar=ot[kt[0]],Er,xr=ar.length;jt0)||!((xr=(Er=ot[kt[0]]).length)>0))){for(var jt=0,ar=1,Er,xr,zr;arxr&&(xr=Er,jt=kt);return jt}function fr(ot){var kt=ot.map(lr);return Yn(ot).sort(function(jt,ar){return kt[jt]-kt[ar]})}function lr(ot){for(var kt=0,jt=-1,ar=ot.length,Er;++jt[I(Ve,Ge,Me),Ve]));for(let[Ve,Ge]of Se.entries()){Ge.index=Ve;let{source:ke,target:_e}=Ge;typeof ke!="object"&&(ke=Ge.source=g(Ie,ke)),typeof _e!="object"&&(_e=Ge.target=g(Ie,_e)),ke.sourceLinks.push(Ge),_e.targetLinks.push(Ge)}if(B!=null)for(let{sourceLinks:Ve,targetLinks:Ge}of Me)Ve.sort(B),Ge.sort(B)}function re({nodes:Me}){for(let Se of Me)Se.value=Se.fixedValue===void 0?Math.max(b.sum(Se.sourceLinks,c),b.sum(Se.targetLinks,c)):Se.fixedValue}function ne({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.depth=Ge;for(let{target:_e}of ke.sourceLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function se({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.height=Ge;for(let{source:_e}of ke.targetLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function G({nodes:Me}){let Se=b.max(Me,Ge=>Ge.depth)+1,Ie=(f-_-A)/(Se-1),Ve=new Array(Se);for(let Ge of Me){let ke=Math.max(0,Math.min(Se-1,Math.floor(O.call(null,Ge,Se))));Ge.layer=ke,Ge.x0=_+ke*Ie,Ge.x1=Ge.x0+A,Ve[ke]?Ve[ke].push(Ge):Ve[ke]=[Ge]}if(D)for(let Ge of Ve)Ge.sort(D);return Ve}function X(Me){let Se=b.min(Me,Ie=>(u-T-(Ie.length-1)*z)/b.sum(Ie,c));for(let Ie of Me){let Ve=T;for(let Ge of Ie){Ge.y0=Ve,Ge.y1=Ve+Ge.value*Se,Ve=Ge.y1+z;for(let ke of Ge.sourceLinks)ke.width=ke.value*Se}Ve=(u-Ve+z)/(Ie.length+1);for(let Ge=0;GeIe.length)-1)),X(Se);for(let Ie=0;Ie0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function Y(Me,Se,Ie){for(let Ve=Me.length,Ge=Ve-2;Ge>=0;--Ge){let ke=Me[Ge];for(let _e of ke){let ce=0,ve=0;for(let{target:Ae,value:Be}of _e.sourceLinks){let Xe=Be*(Ae.layer-_e.layer);ce+=we(_e,Ae)*Xe,ve+=Xe}if(!(ve>0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function q(Me,Se){let Ie=Me.length>>1,Ve=Me[Ie];ee(Me,Ve.y0-z,Ie-1,Se),Z(Me,Ve.y1+z,Ie+1,Se),ee(Me,u,Me.length-1,Se),Z(Me,T,0,Se)}function Z(Me,Se,Ie,Ve){for(;Ie1e-6&&(Ge.y0+=ke,Ge.y1+=ke),Se=Ge.y1+z}}function ee(Me,Se,Ie,Ve){for(;Ie>=0;--Ie){let Ge=Me[Ie],ke=(Ge.y1-Se)*Ve;ke>1e-6&&(Ge.y0-=ke,Ge.y1-=ke),Se=Ge.y0-z}}function ae({sourceLinks:Me,targetLinks:Se}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Se)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Me)Ie.sort(a)}}function he(Me){if(B===void 0)for(let{sourceLinks:Se,targetLinks:Ie}of Me)Se.sort(o),Ie.sort(a)}function xe(Me,Se){let Ie=Me.y0-(Me.sourceLinks.length-1)*z/2;for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie+=Ge+z}for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie-=Ge}return Ie}function we(Me,Se){let Ie=Se.y0-(Se.targetLinks.length-1)*z/2;for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie+=Ge+z}for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie-=Ge}return Ie}return $}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}p.sankey=w,p.sankeyCenter=n,p.sankeyJustify=t,p.sankeyLeft=l,p.sankeyLinkHorizontal=C,p.sankeyRight=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),LV=ze({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q=M})}function h(M){m(M);for(var C=E,_=p(C),T=_.components.filter(function(O){return O.length>1}),f=1/0,u,A=0;A"u"?"undefined":s(Ne))!=="object"&&(Ne=ht.source=_(vt,Ne)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=ht.target=_(vt,We)),Ne.sourceLinks.push(ht),We.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(b.sum(vt.sourceLinks,v),b.sum(vt.targetLinks,v)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function $t(Ot){var vt=0,ht=0,De=0,Ne=0,We=b.max(Ot.nodes,function(Ke){return Ke.column});return Ot.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?vt=vt+Ke.width:ht=ht+Ke.width,Ke.target.column==0&&(Ne=Ne+Ke.width),Ke.source.column==We&&(De=De+Ke.width))}),vt=vt>0?vt+f+u:vt,ht=ht>0?ht+f+u:ht,De=De>0?De+f+u:De,Ne=Ne>0?Ne+f+u:Ne,{top:vt,bottom:ht,left:Ne,right:De}}function rr(Ot,vt){var ht=b.max(Ot.nodes,function(Mt){return Mt.column}),De=Ve-Se,Ne=Ge-Ie,We=De+vt.right+vt.left,Ke=Ne+vt.top+vt.bottom,Je=De/We,et=Ne/Ke;return Se=Se*Je+vt.left,Ve=vt.right==0?Ve:Ve*Je,Ie=Ie*et+vt.top,Ge=Ge*et,Ot.nodes.forEach(function(Mt){Mt.x0=Se+Mt.column*((Ve-Se-ke)/ht),Mt.x1=Mt.x0+ke}),et}function _r(Ot){var vt,ht,De;for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.depth=De,Ne.sourceLinks.forEach(function(We){ht.indexOf(We.target)<0&&!We.circular&&ht.push(We.target)})});for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.height=De,Ne.targetLinks.forEach(function(We){ht.indexOf(We.source)<0&&!We.circular&&ht.push(We.source)})});Ot.nodes.forEach(function(Ne){Ne.column=Math.floor(ve.call(null,Ne,De))})}function Xt(Ot,vt,ht){var De=E.nest().key(function(Mt){return Mt.column}).sortKeys(b.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});Ke(ht),et();for(var Ne=1,We=vt;We>0;--We)Je(Ne*=.99,ht),et();function Ke(Mt){if(Ye){var pt=1/0;De.forEach(function(Vt){var Ht=Ge*Ye/(Vt.length+1);pt=Ht0))if(Vt==0&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else if(Vt==Pt-1&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else{var Kr=0,Yt=b.mean(Ht.sourceLinks,w),Rt=b.mean(Ht.targetLinks,i);Yt&&Rt?Kr=(Yt+Rt)/2:Kr=Yt||Rt;var nr=(Kr-g(Ht))*Mt;Ht.y0+=nr,Ht.y1+=nr}})})}function et(){De.forEach(function(Mt){var pt,Pt,Ct=Ie,qt=Mt.length,Vt;for(Mt.sort(h),Vt=0;Vt0&&(pt.y0+=Pt,pt.y1+=Pt),Ct=pt.y1+_e;if(Pt=Ct-_e-Ge,Pt>0)for(Ct=pt.y0-=Pt,pt.y1-=Pt,Vt=qt-2;Vt>=0;--Vt)pt=Mt[Vt],Pt=pt.y1+_e-Ct,Pt>0&&(pt.y0-=Pt,pt.y1-=Pt),Ct=pt.y0})}}function or(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(m),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,De=ht,Ne=vt.y1,We=Ne;vt.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Ne-Ke.width/2,Ne=Ne-Ke.width):(Ke.y0=ht+Ke.width/2,ht+=Ke.width)}),vt.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=De+Ke.width/2,De+=Ke.width)})})}return gt}function z(Se,Ie,Ve){var Ge=0;if(Ve===null){for(var ke=[],_e=0;_eIe.source.column)}function B(Se,Ie){var Ve=0;Se.sourceLinks.forEach(function(ke){Ve=ke.circular&&!we(ke,Ie)?Ve+1:Ve});var Ge=0;return Se.targetLinks.forEach(function(ke){Ge=ke.circular&&!we(ke,Ie)?Ge+1:Ge}),Ve+Ge}function F(Se){var Ie=Se.source.sourceLinks,Ve=0;Ie.forEach(function(_e){Ve=_e.circular?Ve+1:Ve});var Ge=Se.target.targetLinks,ke=0;return Ge.forEach(function(_e){ke=_e.circular?ke+1:ke}),!(Ve>1||ke>1)}function P(Se,Ie,Ve){return Se.sort($),Se.forEach(function(Ge,ke){var _e=0;if(we(Ge,Ve)&&F(Ge))Ge.circularPathData.verticalBuffer=_e+Ge.width/2;else{var ce=0;for(ce;ce_e?ve:_e}Ge.circularPathData.verticalBuffer=_e+Ge.width/2}}),Se}function j(Se,Ie,Ve,Ge){var ke=5,_e=b.min(Se.links,function(le){return le.source.y0});Se.links.forEach(function(le){le.circular&&(le.circularPathData={})});var ce=Se.links.filter(function(le){return le.circularLinkType=="top"});P(ce,Ie,Ge);var ve=Se.links.filter(function(le){return le.circularLinkType=="bottom"});P(ve,Ie,Ge),Se.links.forEach(function(le){if(le.circular){if(le.circularPathData.arcRadius=le.width+u,le.circularPathData.leftNodeBuffer=ke,le.circularPathData.rightNodeBuffer=ke,le.circularPathData.sourceWidth=le.source.x1-le.source.x0,le.circularPathData.sourceX=le.source.x0+le.circularPathData.sourceWidth,le.circularPathData.targetX=le.target.x0,le.circularPathData.sourceY=le.y0,le.circularPathData.targetY=le.y1,we(le,Ge)&&F(le))le.circularPathData.leftSmallArcRadius=u+le.width/2,le.circularPathData.leftLargeArcRadius=u+le.width/2,le.circularPathData.rightSmallArcRadius=u+le.width/2,le.circularPathData.rightLargeArcRadius=u+le.width/2,le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=le.source.y1+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=le.source.y0-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius);else{var Ae=le.source.column,Be=le.circularLinkType,Xe=Se.links.filter(function(gt){return gt.source.column==Ae&>.circularLinkType==Be});le.circularLinkType=="bottom"?Xe.sort(re):Xe.sort(Q);var Ye=0;Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.leftSmallArcRadius=u+le.width/2+Ye,le.circularPathData.leftLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),Ae=le.target.column,Xe=Se.links.filter(function(gt){return gt.target.column==Ae&>.circularLinkType==Be}),le.circularLinkType=="bottom"?Xe.sort(se):Xe.sort(ne),Ye=0,Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.rightSmallArcRadius=u+le.width/2+Ye,le.circularPathData.rightLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=Math.max(Ve,le.source.y1,le.target.y1)+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=_e-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius)}le.circularPathData.leftInnerExtent=le.circularPathData.sourceX+le.circularPathData.leftNodeBuffer,le.circularPathData.rightInnerExtent=le.circularPathData.targetX-le.circularPathData.rightNodeBuffer,le.circularPathData.leftFullExtent=le.circularPathData.sourceX+le.circularPathData.leftLargeArcRadius+le.circularPathData.leftNodeBuffer,le.circularPathData.rightFullExtent=le.circularPathData.targetX-le.circularPathData.rightLargeArcRadius-le.circularPathData.rightNodeBuffer}if(le.circular)le.path=U(le);else{var yt=k.linkHorizontal().source(function(gt){var Tt=gt.source.x0+(gt.source.x1-gt.source.x0),At=gt.y0;return[Tt,At]}).target(function(gt){var Tt=gt.target.x0,At=gt.y1;return[Tt,At]});le.path=yt(le)}})}function U(Se){var Ie="";return Se.circularLinkType=="top"?Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ie}function $(Se,Ie){return G(Se)==G(Ie)?Se.circularLinkType=="bottom"?re(Se,Ie):Q(Se,Ie):G(Ie)-G(Se)}function Q(Se,Ie){return Se.y0-Ie.y0}function re(Se,Ie){return Ie.y0-Se.y0}function ne(Se,Ie){return Se.y1-Ie.y1}function se(Se,Ie){return Ie.y1-Se.y1}function G(Se){return Se.target.column-Se.source.column}function X(Se){return Se.target.x0-Se.source.x1}function K(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1+Ge:Se.y1-Ge;return ke}function H(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1-Ge:Se.y1+Ge;return ke}function Y(Se,Ie,Ve,Ge){Se.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var _e=ke.source.column+1,ce=ke.target.column-1,ve=1,le=ce-_e+1;for(ve=1;_e<=ce;_e++,ve++)Se.nodes.forEach(function(Ae){if(Ae.column==_e){var Be=ve/(le+1),Xe=Math.pow(1-Be,3),Ye=3*Be*Math.pow(1-Be,2),yt=3*Math.pow(Be,2)*(1-Be),gt=Math.pow(Be,3),Tt=Xe*ke.y0+Ye*ke.y0+yt*ke.y1+gt*ke.y1,At=Tt-ke.width/2,$t=Tt+ke.width/2,rr;At>Ae.y0&&AtAe.y0&&$tAe.y1&&Z(_r,rr,Ie,Ve)})):AtAe.y1&&(rr=$t-Ae.y0+10,Ae=Z(Ae,rr,Ie,Ve),Se.nodes.forEach(function(_r){T(_r,Ge)==T(Ae,Ge)||_r.column!=Ae.column||_r.y0Ae.y1&&Z(_r,rr,Ie,Ve)}))}})}})}function q(Se,Ie){return Se.y0>Ie.y0&&Se.y0Ie.y0&&Se.y1Ie.y1}function Z(Se,Ie,Ve,Ge){return Se.y0+Ie>=Ve&&Se.y1+Ie<=Ge&&(Se.y0=Se.y0+Ie,Se.y1=Se.y1+Ie,Se.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Se.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Se}function ee(Se,Ie,Ve,Ge){Se.nodes.forEach(function(ke){Ge&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var _e=Se.links.filter(function(le){return T(le.source,Ve)==T(ke,Ve)}),ce=_e.length;ce>1&&_e.sort(function(le,Ae){if(!le.circular&&!Ae.circular){if(le.target.column==Ae.target.column)return le.y1-Ae.y1;if(he(le,Ae)){if(le.target.column>Ae.target.column){var Be=H(Ae,le);return le.y1-Be}if(Ae.target.column>le.target.column){var Xe=H(le,Ae);return Xe-Ae.y1}}else return le.y1-Ae.y1}if(le.circular&&!Ae.circular)return le.circularLinkType=="top"?-1:1;if(Ae.circular&&!le.circular)return Ae.circularLinkType=="top"?1:-1;if(le.circular&&Ae.circular)return le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="top"?le.target.column===Ae.target.column?le.target.y1-Ae.target.y1:Ae.target.column-le.target.column:le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="bottom"?le.target.column===Ae.target.column?Ae.target.y1-le.target.y1:le.target.column-Ae.target.column:le.circularLinkType=="top"?-1:1});var ve=ke.y0;_e.forEach(function(le){le.y0=ve+le.width/2,ve=ve+le.width}),_e.forEach(function(le,Ae){if(le.circularLinkType=="bottom"){var Be=Ae+1,Xe=0;for(Be;Be1&&ke.sort(function(ve,le){if(!ve.circular&&!le.circular){if(ve.source.column==le.source.column)return ve.y0-le.y0;if(he(ve,le)){if(le.source.column0?"up":"down"}function we(Se,Ie){return T(Se.source,Ie)==T(Se.target,Ie)}function Me(Se,Ie,Ve){var Ge=Se.nodes,ke=Se.links,_e=!1,ce=!1;if(ke.forEach(function(Ye){Ye.circularLinkType=="top"?_e=!0:Ye.circularLinkType=="bottom"&&(ce=!0)}),_e==!1||ce==!1){var ve=b.min(Ge,function(Ye){return Ye.y0}),le=b.max(Ge,function(Ye){return Ye.y1}),Ae=le-ve,Be=Ve-Ie,Xe=Be/Ae;Ge.forEach(function(Ye){var yt=(Ye.y1-Ye.y0)*Xe;Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=Ye.y0+yt}),ke.forEach(function(Ye){Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=(Ye.y1-ve)*Xe,Ye.width=Ye.width*Xe})}}p.sankeyCircular=x,p.sankeyCenter=a,p.sankeyLeft=t,p.sankeyRight=n,p.sankeyJustify=r,Object.defineProperty(p,"__esModule",{value:!0})})}}),OM=ze({"src/traces/sankey/constants.js"(J,V){"use strict";V.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"}}}}),IV=ze({"src/traces/sankey/render.js"(J,V){"use strict";var p=SV(),b=(l0(),Po(_v)).interpolateNumber,E=ci(),k=CV(),l=RV(),e=OM(),t=Qn(),n=$i(),r=Nr(),a=r.strTranslate,o=r.strRotate,s=Vd(),c=s.keyFun,m=s.repeat,h=s.unwrap,v=Cs(),g=mi(),i=dc(),w=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(X,K,H){var Y=h(K),q=Y.trace,Z=q.domain,ee=q.orientation==="h",ae=q.direction==="reversed",he=q.node.pad,xe=q.node.thickness,we={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Me=X.width*(Z.x[1]-Z.x[0]),Se=X.height*(Z.y[1]-Z.y[0]),Ie=Y._nodes,Ve=Y._links,Ge=Y.circular,ke;Ge?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Me,Se]:[Se,Me]).nodeWidth(xe).nodePadding(he).nodeId(function(Xt){return Xt.pointNumber}).nodeAlign(we).nodes(Ie).links(Ve);function _e(Xt){q[Xt].sort==="input"&&(Ge?r.warn(`Circular Sankey diagrams do not support the "input" ${Xt}.sort mode; falling back to the default sort.`):ke[`${Xt}Sort`](null))}_e("link"),_e("node");var ce=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+he})}function At(Xt){var or=Xt.map(function(Ke,Je){return{x0:Ke.x0,index:Je}}).sort(function(Ke,Je){return Ke.x0-Je.x0}),Ot=[],vt=-1,ht,De=-1/0,Ne;for(ve=0;veDe+xe&&(vt+=1,ht=We.x0),De=We.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(We),Ne=ht-We.x0,We.x0+=Ne,We.x1+=Ne}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(H="M "+(q.targetX-K)+" "+(q.targetY-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightSmallArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent-Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Y-K)+" "+q.verticalRightInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-Y-K)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent+Y-K-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent-K-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.leftFullExtent+Y+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+Y)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Y)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent,H+=" L "+(q.leftFullExtent+Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftSmallArcRadius+Y)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY+Y)+" L "+q.leftInnerExtent+" "+(q.sourceY+Y)+" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Y)+" "+q.verticalLeftInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.rightFullExtent+Y-K+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent-K-Y)+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:H+=" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftLargeArcRadius-Y)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightLargeArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent,H+=" L "+(q.rightFullExtent+Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+Y)+" L "+(q.targetX-K)+" "+(q.targetY+Y)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),H}function f(){var X=.5;function K(H){var Y=H.linkArrowLength;if(H.link.circular)return T(H.link,Y);var q=Math.abs((H.link.target.x0-H.link.source.x1)/2);Y>q&&(Y=q);var Z=H.link.source.x1,ee=H.link.target.x0-Y,ae=b(Z,ee),he=ae(X),xe=ae(1-X),we=H.link.y0-H.link.width/2,Me=H.link.y0+H.link.width/2,Se=H.link.y1-H.link.width/2,Ie=H.link.y1+H.link.width/2,Ve="M"+Z+","+we,Ge="C"+he+","+we+" "+xe+","+Se+" "+ee+","+Se,ke="C"+xe+","+Ie+" "+he+","+Me+" "+Z+","+Me,_e=Y>0?"L"+(ee+Y)+","+(Se+H.link.width/2):"";return _e+="L"+ee+","+Ie,Ve+Ge+_e+ke+"Z"}return K}function u(X,K){var H=e.nodePadAcross,Y=X.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,Z=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=X.trace,K.curveNumber=X.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:X.key,trace:X.trace,node:K,nodePad:X.nodePad,nodeLineColor:X.nodeLineColor,nodeLineWidth:X.nodeLineWidth,textFont:X.textFont,size:X.horizontal?X.height:X.width,visibleWidth:Math.ceil(q),visibleHeight:Z,zoneX:-H,zoneY:-Y,zoneWidth:q+2*H,zoneHeight:Z+2*Y,labelY:X.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:X.width,forceLayouts:X.forceLayouts,horizontal:X.horizontal,reversed:X.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:X.valueFormat,valueSuffix:X.valueSuffix,sankey:X.sankey,graph:X.graph,arrangement:X.arrangement,uniqueNodeLabelPathId:[X.guid,X.key,ee].join("_"),interactionState:X.interactionState,figure:X}}function A(X){X.attr("transform",function(K){return a(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function x(X){X.call(A)}function z(X,K){X.call(x),K.attr("d",f())}function I(X){X.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function O(X){return X.link.width>1||X.linkLineWidth>0}function D(X){return X.horizontal?X.reversed?a(X.translateX+X.width,X.translateY)+"matrix(-1 0 0 1 0 0)":a(X.translateX,X.translateY)+"matrix(1 0 0 1 0 0)":X.reversed?a(X.translateX,X.translateY+X.height)+"matrix(0 -1 1 0 0 0)":a(X.translateX,X.translateY)+"matrix(0 1 1 0 0 0)"}function B(X,K,H){X.on(".basic",null).on("mouseover.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.hover(this,Y,K),Y.interactionState.hovered=[this,Y])}).on("mousemove.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.follow(this,Y),Y.interactionState.hovered=[this,Y])}).on("mouseout.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1)}).on("click.basic",function(Y){Y.interactionState.hovered&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1),!Y.interactionState.dragInProgress&&!Y.partOfGroup&&H.select(this,Y,K)})}function F(X,K,H,Y){var q=E.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(r.ensureSingle(Y._fullLayout._infolayer,"g","dragcover",function(ae){Y._fullLayout._dragCover=ae}),r.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,re(Z.node),Z.interactionState.hovered&&(H.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var ee=Z.traceId+"|"+Z.key;Z.forceLayouts[ee]?Z.forceLayouts[ee].alpha(1):P(X,ee,Z,Y),j(X,K,Z,ee,Y)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var ee=E.event.x,ae=E.event.y;Z.arrangement==="snap"?(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2,Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2),ae=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,ae)),Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2),re(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(X.filter(ne(Z)),K))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var ee=0;ee0)window.requestAnimationFrame(Z);else{var he=H.node.originalX;H.node.x0=he-H.visibleWidth/2,H.node.x1=he+H.visibleWidth/2,$(H,q)}})}function U(X,K,H,Y){return function(){for(var Z=0,ee=0;ee0&&Y.forceLayouts[K].alpha(0)}}function $(X,K){for(var H=[],Y=[],q=0;qO(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>O(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>O(ke)?ke.linkLineWidth:1).attr("d",f()),Me.style("opacity",function(){return X._context.staticPlot||ee||ae?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Me.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=xe.selectAll("."+e.cn.sankeyNodeSet).data(m,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Se.selectAll("."+e.cn.sankeyNode).data(function(ke){var _e=ke.graph.nodes;return Q(_e),_e.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(X._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,xe,q.nodeEvents).call(F,Me,q,X),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ve=Ie.selectAll("."+e.cn.nodeRect).data(m);Ve.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ve.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ve.transition().ease(e.ease).duration(e.duration).call(I);var Ge=Ie.selectAll("."+e.cn.nodeLabel).data(m);Ge.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),Ge.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var _e=E.select(this);n.font(_e,ke.textFont),v.convertToTspans(_e,X)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var _e=E.select(this),ce=v.lineCount(_e),ve=ke.textFont.size*((ce-1)*S-w),le=ke.nodeLineWidth/2+M;if(!ke.horizontal){var Xe=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Ae=ke.reversed?o(90):"scale(-1,1)"+o(90);return a(Xe,le)+Ae}var Be=le,Xe=(ke.visibleHeight-ve)/2;return ke.left?Be=-Be:Be+=ke.visibleWidth,a(Be,Xe)+(ke.reversed?"scale(-1,1)":"")}),Ge.transition().ease(e.ease).duration(e.duration)}}}),NM=ze({"src/traces/sankey/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=b.numberFormat,k=IV(),l=Zl(),e=Qn(),t=OM().cn,n=b._;function r(S){return S!==""}function a(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){p.select(S).select("path").style("fill-opacity",M),p.select(S).select("rect").style("fill-opacity",M)}function s(S){p.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function m(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function h(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(g.bind(0,M,C,!1))}function v(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function g(S,M,C,_){_.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&a(M,S).selectAll("."+t.sankeyNode).filter(m(S)).call(h)}function i(S,M,C,_){_.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&a(M,S).selectAll(t.sankeyNode).filter(m(S)).call(v)}function w(S,M){var C=S.hoverlabel||{},_=b.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}V.exports=function(M,C){for(var _=M._fullLayout,T=_._paper,f=_._size,u=0;u"),color:w(G,"bgcolor")||e.addOpacity(q.color,1),borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:p.event.x"),color:w(G,"bgcolor")||se.rgb,borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:ee,eventData:[se.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(xe,.85),s(xe)}}},re=function(ne,se,G){M._fullLayout.hovermode!==!1&&(p.select(ne).call(v,se,G),se.node.trace.node.hoverinfo!=="skip"&&(se.node.fullData=se.node.trace,M.emit("plotly_unhover",{event:p.event,points:[se.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,T,C,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:x},nodeEvents:{hover:$,follow:Q,unhover:re,select:U}})}}}),DV=ze({"src/traces/sankey/base_plot.js"(J){"use strict";var V=Al().overrideAll,p=zf().getModuleCalcData,b=NM(),E=rv(),k=gd(),l=_h(),e=_c().prepSelect,t=Nr(),n=mi(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=V({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=p(o.calcdata,r)[0];b(o,s),J.updateFx(o)},J.clean=function(o,s,c,m){var h=m._has&&m._has(r),v=s._has&&s._has(r);h&&!v&&(m._paperdiv.selectAll(".sankey").remove(),m._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}V.exports=function(D,B,F,P){var j=D._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function($){var Q=$[0],re=Q.trace,ne=p.select(this),se=re._hasGauge,G=re._isAngular,X=re._isBullet,K=re.domain,H={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},Y=H.l+H.w/2,q=H.t+H.h/2,Z=Math.min(H.w/2,H.h),ee=a.innerRadius*Z,ae,he,xe,we=re.align||"center";if(he=q,!se)ae=H.l+i[we]*H.w,xe=function(le){return A(le,H.w,H.h)};else if(G&&(ae=Y,he=q+Z/2,xe=function(le){return x(le,.9*ee)}),X){var Me=a.bulletPadding,Se=1-a.bulletNumberDomainSize+Me;ae=H.l+(Se+(1-Se)*i[we])*H.w,xe=function(le){return A(le,(a.bulletNumberDomainSize-Me)*H.w,H.h)}}_(D,ne,$,{numbersX:ae,numbersY:he,numbersScaler:xe,transitionOpts:F,onComplete:U});var Ie,Ve;se&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ve={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var Ge=ne.selectAll("g.angular").data(G?$:[]);Ge.exit().remove();var ke=ne.selectAll("g.angularaxis").data(G?$:[]);ke.exit().remove(),G&&C(D,ne,$,{radius:Z,innerRadius:ee,gauge:Ge,layer:ke,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var _e=ne.selectAll("g.bullet").data(X?$:[]);_e.exit().remove();var ce=ne.selectAll("g.bulletaxis").data(X?$:[]);ce.exit().remove(),X&&M(D,ne,$,{gauge:_e,layer:ce,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var ve=ne.selectAll("text.title").data($);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return X?g.right:g[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,D),ve.attr("transform",function(){var le=H.l+H.w*i[re.title.align],Ae,Be=a.titlePadding,Xe=r.bBox(ve.node());if(se){if(G)if(re.gauge.axis.visible){var Ye=r.bBox(ke.node());Ae=Ye.top-Be-Xe.bottom}else Ae=H.t+H.h/2-Z/2-Xe.bottom-Be;X&&(Ae=he-(Xe.top+Xe.bottom)/2,le=H.l-a.bulletPadding*H.w)}else Ae=re._numbersTop-Be-Xe.bottom;return e(le,Ae)})})};function M(O,D,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,$=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ne=P.domain,se=F.transitionOpts,G=F.onComplete,X,K,H,Y,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var Z=re.h,ee=P.gauge.bar.thickness*Z,ae=ne.x[0],he=ne.x[0]+(ne.x[1]-ne.x[0])*(P._hasNumber||P._hasDelta?1-a.bulletNumberDomainSize:1);X=u(O,P.gauge.axis),X._id="xbulletaxis",X.domain=[ae,he],X.setScale(),K=s.calcTicks(X),H=s.makeTransTickFn(X),Y=s.getTickSigns(X)[2],q=re.t+re.h,X.visible&&(s.drawTicks(O,X,{vals:X.ticks==="inside"?s.clipEnds(X,K):K,layer:U,path:s.makeTickPath(X,q,Y),transFn:H}),s.drawLabels(O,X,{vals:K,layer:U,transFn:H,labelFns:s.makeLabelFns(X,q)}));function xe(ke){ke.attr("width",function(_e){return Math.max(0,X.c2p(_e.range[1])-X.c2p(_e.range[0]))}).attr("x",function(_e){return X.c2p(_e.range[0])}).attr("y",function(_e){return .5*(1-_e.thickness)*Z}).attr("height",function(_e){return _e.thickness*Z})}var we=[$].concat(P.gauge.steps),Me=j.selectAll("g.bg-bullet").data(we);Me.enter().append("g").classed("bg-bullet",!0).append("rect"),Me.select("rect").call(xe).call(T),Me.exit().remove();var Se=j.selectAll("g.value-bullet").data([P.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",ee).attr("y",(Z-ee)/2).call(T),S(se)?Se.select("rect").transition().duration(se.duration).ease(se.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Se.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Se.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ve=j.selectAll("g.threshold-bullet").data(Ie);Ve.enter().append("g").classed("threshold-bullet",!0).append("line"),Ve.select("line").attr("x1",X.c2p(P.gauge.threshold.value)).attr("x2",X.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*Z).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*Z).call(v.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ve.exit().remove();var Ge=j.selectAll("g.gauge-outline").data([Q]);Ge.enter().append("g").classed("gauge-outline",!0).append("rect"),Ge.select("rect").call(xe).call(T),Ge.exit().remove()}function C(O,D,B,F){var P=B[0].trace,j=F.size,U=F.radius,$=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ne=[j.l+j.w/2,j.t+j.h/2+U/2],se=F.gauge,G=F.layer,X=F.transitionOpts,K=F.onComplete,H=Math.PI/2;function Y(yt){var gt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(yt-gt)/(Tt-gt)*Math.PI-H;return At<-H?-H:At>H?H:At}function q(yt){return p.svg.arc().innerRadius(($+U)/2-yt/2*(U-$)).outerRadius(($+U)/2+yt/2*(U-$)).startAngle(-H)}function Z(yt){yt.attr("d",function(gt){return q(gt.thickness).startAngle(Y(gt.range[0])).endAngle(Y(gt.range[1]))()})}var ee,ae,he,xe;se.enter().append("g").classed("angular",!0),se.attr("transform",e(ne[0],ne[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),ee=u(O,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var we=function(yt){return(ee.range[0]-yt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Me={},Se=s.makeLabelFns(ee,0),Ie=Se.labelStandoff;Me.xFn=function(yt){var gt=we(yt);return Math.cos(gt)*Ie},Me.yFn=function(yt){var gt=we(yt),Tt=Math.sin(gt)>0?.2:1;return-Math.sin(gt)*(Ie+yt.fontSize*Tt)+Math.abs(Math.cos(gt))*(yt.fontSize*n)},Me.anchorFn=function(yt){var gt=we(yt),Tt=Math.cos(gt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Me.heightFn=function(yt,gt,Tt){var At=we(yt);return-.5*(1+Math.sin(At))*Tt};var Ve=function(yt){return e(ne[0]+U*Math.cos(yt),ne[1]-U*Math.sin(yt))};he=function(yt){return Ve(we(yt))};var Ge=function(yt){var gt=we(yt);return Ve(gt)+"rotate("+-t(gt)+")"};if(ae=s.calcTicks(ee),xe=s.getTickSigns(ee)[2],ee.visible){xe=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(O,ee,{vals:ae,layer:G,path:"M"+xe*ke+",0h"+xe*ee.ticklen,transFn:Ge}),s.drawLabels(O,ee,{vals:ae,layer:G,transFn:he,labelFns:Me})}var _e=[Q].concat(P.gauge.steps),ce=se.selectAll("g.bg-arc").data(_e);ce.enter().append("g").classed("bg-arc",!0).append("path"),ce.select("path").call(Z).call(T),ce.exit().remove();var ve=q(P.gauge.bar.thickness),le=se.selectAll("g.value-arc").data([P.gauge.bar]);le.enter().append("g").classed("value-arc",!0).append("path");var Ae=le.select("path");S(X)?(Ae.transition().duration(X.duration).ease(X.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",f(ve,Y(B[0].lastY),Y(B[0].y))),P._lastValue=B[0].y):Ae.attr("d",typeof B[0].y=="number"?ve.endAngle(Y(B[0].y)):"M0,0Z"),Ae.call(T),le.exit().remove(),_e=[];var Be=P.gauge.threshold.value;(Be||Be===0)&&_e.push({range:[Be,Be],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var Xe=se.selectAll("g.threshold-arc").data(_e);Xe.enter().append("g").classed("threshold-arc",!0).append("path"),Xe.select("path").call(Z).call(T),Xe.exit().remove();var Ye=se.selectAll("g.gauge-outline").data([re]);Ye.enter().append("g").classed("gauge-outline",!0).append("path"),Ye.select("path").call(Z).call(T),Ye.exit().remove()}function _(O,D,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,$=P.align||"center",Q=g[$],re=F.transitionOpts,ne=F.onComplete,se=k.ensureSingle(D,"g","numbers"),G,X,K,H=[];P._hasNumber&&H.push("number"),P._hasDelta&&(H.push("delta"),P.delta.position==="left"&&H.reverse());var Y=se.selectAll("text").data(H);Y.enter().append("text"),Y.attr("text-anchor",function(){return Q}).attr("class",function(Ve){return Ve}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function q(Ve,Ge,ke,_e){if(Ve.match("s")&&ke>=0!=_e>=0&&!Ge(ke).slice(-1).match(w)&&!Ge(_e).slice(-1).match(w)){var ce=Ve.slice().replace("s","f").replace(/\d+/,function(le){return parseInt(le)-1}),ve=u(O,{tickformat:ce});return function(le){return Math.abs(le)<1?s.tickText(ve,le).text:Ge(le)}}else return Ge}function Z(){var Ve=u(O,{tickformat:P.number.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(le){return s.tickText(Ve,le).text},ke=P.number.suffix,_e=P.number.prefix,ce=se.select("text.number");function ve(){var le=typeof B[0].y=="number"?_e+Ge(B[0].y)+ke:"-";ce.text(le).call(r.font,P.number.font).call(o.convertToTspans,O)}return S(re)?ce.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ne&&ne()}).each("interrupt",function(){ve(),ne&&ne()}).attrTween("text",function(){var le=p.select(this),Ae=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Be=q(P.number.valueformat,Ge,B[0].lastY,B[0].y);return function(Xe){le.text(_e+Be(Ae(Xe))+ke)}}):ve(),G=z(_e+Ge(B[0].y)+ke,P.number.font,Q,O),ce}function ee(){var Ve=u(O,{tickformat:P.delta.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(Xe){return s.tickText(Ve,Xe).text},ke=P.delta.suffix,_e=P.delta.prefix,ce=function(Xe){var Ye=P.delta.relative?Xe.relativeDelta:Xe.delta;return Ye},ve=function(Xe,Ye){return Xe===0||typeof Xe!="number"||isNaN(Xe)?"-":(Xe>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+_e+Ye(Xe)+ke},le=function(Xe){return Xe.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ce(B[0]));var Ae=se.select("text.delta");Ae.call(r.font,P.delta.font).call(v.fill,le({delta:P._deltaLastValue}));function Be(){Ae.text(ve(ce(B[0]),Ge)).call(v.fill,le(B[0])).call(o.convertToTspans,O)}return S(re)?Ae.transition().duration(re.duration).ease(re.easing).tween("text",function(){var Xe=p.select(this),Ye=ce(B[0]),yt=P._deltaLastValue,gt=q(P.delta.valueformat,Ge,yt,Ye),Tt=E(yt,Ye);return P._deltaLastValue=Ye,function(At){Xe.text(ve(Tt(At),gt)),Xe.call(v.fill,le({delta:Tt(At)}))}}).each("end",function(){Be(),ne&&ne()}).each("interrupt",function(){Be(),ne&&ne()}):Be(),X=z(ve(ce(B[0]),Ge),P.delta.font,Q,O),Ae}var ae=P.mode+P.align,he;if(P._hasDelta&&(he=ee(),ae+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ae+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=X),P._hasNumber&&(Z(),ae+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=G),P._hasDelta&&P._hasNumber){var xe=[(G.left+G.right)/2,(G.top+G.bottom)/2],we=[(X.left+X.right)/2,(X.top+X.bottom)/2],Me,Se,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Me=I(P,"deltaPos",0,-1*(G.width*i[P.align]+X.width*(1-i[P.align])+Ie),ae,Math.min),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:X.left+Me,right:G.right,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="right"&&(Me=I(P,"deltaPos",0,G.width*(1-i[P.align])+X.width*i[P.align]+Ie,ae,Math.max),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:G.left,right:X.right+Me,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="bottom"&&(Me=null,Se=X.height,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height,bottom:G.bottom+X.height}),P.delta.position==="top"&&(Me=null,Se=G.top,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height-X.height,bottom:G.bottom}),he.attr({dx:Me,dy:Se})}(P._hasNumber||P._hasDelta)&&se.attr("transform",function(){var Ve=F.numbersScaler(K);ae+=Ve[2];var Ge=I(P,"numbersScale",1,Ve[0],ae,Math.min),ke;P._scaleNumbers||(Ge=1),P._isAngular?ke=U-Ge*K.bottom:ke=U-Ge*(K.top+K.bottom)/2,P._numbersTop=Ge*K.top+ke;var _e=K[$];$==="center"&&(_e=(K.left+K.right)/2);var ce=j-Ge*_e;return ce=I(P,"numbersTranslate",0,ce,ae,Math.max),e(ce,ke)+l(Ge)})}function T(O){O.each(function(D){v.stroke(p.select(this),D.line.color)}).each(function(D){v.fill(p.select(this),D.color)}).style("stroke-width",function(D){return D.line.width})}function f(O,D,B){return function(){var F=b(D,B);return function(P){return O.endAngle(F(P))()}}}function u(O,D,B){var F=O._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},D),j={type:"linear",_id:"x"+D._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function $(Q,re){return k.coerce(P,j,h,Q,re)}return c(P,j,$,U,F),m(P,j,$,U),j}function A(O,D,B){var F=Math.min(D/O.width,B/O.height);return[F,O,D+"x"+B]}function x(O,D){var B=Math.sqrt(O.width/2*(O.width/2)+O.height*O.height),F=D/B;return[F,O,D]}function z(O,D,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=p.select(P);return j.text(O).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",O).call(o.convertToTspans,F).call(r.font,D),r.bBox(j.node())}function I(O,D,B,F,P,j){var U="_cache"+D;O[U]&&O[U].key===P||(O[U]={key:P,value:B});var $=k.aggNums(j,null,[O[U].value,F],2);return O[U].value=$,$}}}),qV=ze({"src/traces/indicator/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:OV(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:jM(),supplyDefaults:NV().supplyDefaults,calc:jV().calc,plot:UV(),meta:{}}}}),VV=ze({"lib/indicator.js"(J,V){"use strict";V.exports=qV()}}),qM=ze({"src/traces/table/attributes.js"(J,V){"use strict";var p=fv(),b=Ki().extendFlat,E=Al().overrideAll,k=Qs(),l=Ml().attributes,e=Il().descriptionOnlyNumbers,t=V.exports=E({domain:l({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:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},p.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:b({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},p.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:b({},k({arrayOk:!0}))}},"calc","from-root")}}),GV=ze({"src/traces/table/defaults.js"(J,V){"use strict";var p=Nr(),b=qM(),E=Ml().defaults;function k(l,e){for(var t=l.columnorder||[],n=l.header.values.length,r=t.slice(0,n),a=r.slice().sort(function(c,m){return c-m}),o=r.map(function(c){return a.indexOf(c)}),s=o.length;s",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"}}}}),WV=ze({"src/traces/table/data_preparation_helper.js"(J,V){"use strict";var p=VM(),b=Ki().extendFlat,E=ao(),k=Ff().isTypedArray,l=Ff().isArrayOrTypedArray;V.exports=function(h,v){var g=n(v.cells.values),i=function(Q){return Q.slice(v.header.values.length,Q.length)},w=n(v.header.values);w.length&&!w[0].length&&(w[0]=[""],w=n(w));var S=w.concat(i(g).map(function(){return r((w[0]||[""]).length)})),M=v.domain,C=Math.floor(h._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(h._fullLayout._size.h*(M.y[1]-M.y[0])),T=v.header.values.length?S[0].map(function(){return v.header.height}):[p.emptyHeaderHeight],f=g.length?g[0].map(function(){return v.cells.height}):[],u=T.reduce(t,0),A=_-u,x=A+p.uplift,z=s(f,x),I=s(T,u),O=o(I,[]),D=o(z,O),B={},F=v.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(g.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ne=l(v.columnwidth)?v.columnwidth[Math.min(re,v.columnwidth.length-1)]:v.columnwidth;return E(ne)?Number(ne):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(v.header.line.width),e(v.cells.line.width)),$={key:v.uid+h._context.staticPlot,translateX:M.x[0]*h._fullLayout._size.w,translateY:h._fullLayout._size.h*(1-M.y[1]),size:h._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:D,headerRowBlocks:O,scrollY:0,cells:b({},v.cells,{values:g}),headerCells:b({},v.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ne=B[Q];B[Q]=(ne||0)+1;var se=Q+"__"+B[Q];return{key:se,label:Q,specIndex:re,xIndex:F[re],xScale:a,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return $.columns.forEach(function(Q){Q.calcdata=$,Q.x=a(Q)}),$};function e(m){if(l(m)){for(var h=0,v=0;v=h||_===m.length-1)&&(v[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=w,M=_+1,w=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),YV=ze({"src/traces/table/data_split_helpers.js"(J){"use strict";var V=Ki().extendFlat;J.splitToPanels=function(b){var E=[0,0],k=V({},b,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:V({},b.calcdata,{cells:b.calcdata.headerCells})}),l=V({},b,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),e=V({},b,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(b){var E=p(b);return(b.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:k}})};function p(b){var E=b.rowBlocks[b.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),GM=ze({"src/traces/table/plot.js"(J,V){"use strict";var p=VM(),b=ci(),E=Nr(),k=E.numberFormat,l=Vd(),e=$i(),t=Cs(),n=Nr().raiseToTop,r=Nr().strTranslate,a=Nr().cancelTransition,o=WV(),s=YV(),c=Qn();V.exports=function(ae,he){var xe=!ae._context.staticPlot,we=ae._fullLayout._paper.selectAll("."+p.cn.table).data(he.map(function(Ye){var yt=l.unwrap(Ye),gt=yt.trace;return o(ae,gt)}),l.keyFun);we.exit().remove(),we.enter().append("g").classed(p.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"),we.attr("width",function(Ye){return Ye.width+Ye.size.l+Ye.size.r}).attr("height",function(Ye){return Ye.height+Ye.size.t+Ye.size.b}).attr("transform",function(Ye){return r(Ye.translateX,Ye.translateY)});var Me=we.selectAll("."+p.cn.tableControlView).data(l.repeat,l.keyFun),Se=Me.enter().append("g").classed(p.cn.tableControlView,!0).style("box-sizing","content-box");if(xe){var Ie="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(Ye){Me.filter(function(yt){return Ye===yt}).call(i,ae)}).on(Ie,function(Ye){if(!Ye.scrollbarState.wheeling){Ye.scrollbarState.wheeling=!0;var yt=Ye.scrollY+b.event.deltaY,gt=Q(ae,Me,null,yt)(Ye);gt||(b.event.stopPropagation(),b.event.preventDefault()),Ye.scrollbarState.wheeling=!1}}).call(i,ae,!0)}Me.attr("transform",function(Ye){return r(Ye.size.l,Ye.size.t)});var Ve=Me.selectAll("."+p.cn.scrollBackground).data(l.repeat,l.keyFun);Ve.enter().append("rect").classed(p.cn.scrollBackground,!0).attr("fill","none"),Ve.attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}),Me.each(function(Ye){e.setClipUrl(b.select(this),h(ae,Ye),ae)});var Ge=Me.selectAll("."+p.cn.yColumn).data(function(Ye){return Ye.columns},l.keyFun);Ge.enter().append("g").classed(p.cn.yColumn,!0),Ge.exit().remove(),Ge.attr("transform",function(Ye){return r(Ye.x,0)}),xe&&Ge.call(b.behavior.drag().origin(function(Ye){var yt=b.select(this);return B(yt,Ye,-p.uplift),n(this),Ye.calcdata.columnDragInProgress=!0,i(Me.filter(function(gt){return Ye.calcdata.key===gt.key}),ae),Ye}).on("drag",function(Ye){var yt=b.select(this),gt=function($t){return(Ye===$t?b.event.x:$t.x)+$t.columnWidth/2};Ye.x=Math.max(-p.overdrag,Math.min(Ye.calcdata.width+p.overdrag-Ye.columnWidth,b.event.x));var Tt=g(Ge).filter(function($t){return $t.calcdata.key===Ye.calcdata.key}),At=Tt.sort(function($t,rr){return gt($t)-gt(rr)});At.forEach(function($t,rr){$t.xIndex=rr,$t.x=Ye===$t?$t.x:$t.xScale($t)}),Ge.filter(function($t){return Ye!==$t}).transition().ease(p.transitionEase).duration(p.transitionDuration).attr("transform",function($t){return r($t.x,0)}),yt.call(a).attr("transform",r(Ye.x,-p.uplift))}).on("dragend",function(Ye){var yt=b.select(this),gt=Ye.calcdata;Ye.x=Ye.xScale(Ye),Ye.calcdata.columnDragInProgress=!1,B(yt,Ye,0),O(ae,gt,gt.columns.map(function(Tt){return Tt.xIndex}))})),Ge.each(function(Ye){e.setClipUrl(b.select(this),v(ae,Ye),ae)});var ke=Ge.selectAll("."+p.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(p.cn.columnBlock,!0).attr("id",function(Ye){return Ye.key}),ke.style("cursor",function(Ye){return Ye.dragHandle?"ew-resize":Ye.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var _e=ke.filter(P),ce=ke.filter(F);xe&&ce.call(b.behavior.drag().origin(function(Ye){return b.event.stopPropagation(),Ye}).on("drag",Q(ae,Me,-1)).on("dragend",function(){})),w(ae,Me,_e,ke),w(ae,Me,ce,ke);var ve=Me.selectAll("."+p.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(p.cn.scrollAreaClip,!0).attr("id",function(Ye){return h(ae,Ye)});var le=ve.selectAll("."+p.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);le.enter().append("rect").classed(p.cn.scrollAreaClipRect,!0).attr("x",-p.overdrag).attr("y",-p.uplift).attr("fill","none"),le.attr("width",function(Ye){return Ye.width+2*p.overdrag}).attr("height",function(Ye){return Ye.height+p.uplift});var Ae=Ge.selectAll("."+p.cn.columnBoundary).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(p.cn.columnBoundary,!0);var Be=Ge.selectAll("."+p.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Be.enter().append("clipPath").classed(p.cn.columnBoundaryClippath,!0),Be.attr("id",function(Ye){return v(ae,Ye)});var Xe=Be.selectAll("."+p.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Xe.enter().append("rect").classed(p.cn.columnBoundaryRect,!0).attr("fill","none"),Xe.attr("width",function(Ye){return Ye.columnWidth+2*m(Ye)}).attr("height",function(Ye){return Ye.calcdata.height+2*m(Ye)+p.uplift}).attr("x",function(Ye){return-m(Ye)}).attr("y",function(Ye){return-m(Ye)}),$(null,ce,Me)};function m(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function h(ee,ae){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function v(ee,ae){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function g(ee){return[].concat.apply([],ee.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function i(ee,ae,he){function xe(Ge){var ke=Ge.rowBlocks;return K(ke,ke.length-1)+(ke.length?H(ke[ke.length-1],1/0):1)}var we=ee.selectAll("."+p.cn.scrollbarKit).data(l.repeat,l.keyFun);we.enter().append("g").classed(p.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),we.each(function(Ge){var ke=Ge.scrollbarState;ke.totalHeight=xe(Ge),ke.scrollableAreaHeight=Ge.groupHeight-j(Ge),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,p.goldenRatio*p.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:Ge.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(Ge){var ke=Ge.width+p.scrollbarWidth/2+p.scrollbarOffset;return r(ke,j(Ge))});var Me=we.selectAll("."+p.cn.scrollbar).data(l.repeat,l.keyFun);Me.enter().append("g").classed(p.cn.scrollbar,!0);var Se=Me.selectAll("."+p.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(p.cn.scrollbarSlider,!0),Se.attr("transform",function(Ge){return r(0,Ge.scrollbarState.topY||0)});var Ie=Se.selectAll("."+p.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(p.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",p.scrollbarWidth).attr("stroke-linecap","round").attr("y1",p.scrollbarWidth/2),Ie.attr("y2",function(Ge){return Ge.scrollbarState.barLength-p.scrollbarWidth/2}).attr("stroke-opacity",function(Ge){return Ge.columnDragInProgress||!Ge.scrollbarState.barWiggleRoom||he?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(p.scrollbarHideDelay).duration(p.scrollbarHideDuration).attr("stroke-opacity",0);var Ve=Me.selectAll("."+p.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ve.enter().append("line").classed(p.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",p.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ge){var ke=b.event.y,_e=this.getBoundingClientRect(),ce=Ge.scrollbarState,ve=ke-_e.top,le=b.scale.linear().domain([0,ce.scrollableAreaHeight]).range([0,ce.totalHeight]).clamp(!0);ce.topY<=ve&&ve<=ce.bottomY||Q(ae,ee,null,le(ve-ce.barLength/2))(Ge)}).call(b.behavior.drag().origin(function(Ge){return b.event.stopPropagation(),Ge.scrollbarState.scrollbarScrollInProgress=!0,Ge}).on("drag",Q(ae,ee)).on("dragend",function(){})),Ve.attr("y2",function(Ge){return Ge.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(Ie.remove(),Ve.remove())}function w(ee,ae,he,xe){var we=S(he),Me=M(we);f(Me);var Se=C(Me);A(Se);var Ie=T(Me),Ve=_(Ie);u(Ve),x(Ve,ae,xe,ee),X(Me)}function S(ee){var ae=ee.selectAll("."+p.cn.columnCells).data(l.repeat,l.keyFun);return ae.enter().append("g").classed(p.cn.columnCells,!0),ae.exit().remove(),ae}function M(ee){var ae=ee.selectAll("."+p.cn.columnCell).data(s.splitToCells,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.columnCell,!0),ae.exit().remove(),ae}function C(ee){var ae=ee.selectAll("."+p.cn.cellRect).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("rect").classed(p.cn.cellRect,!0),ae}function _(ee){var ae=ee.selectAll("."+p.cn.cellText).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("text").classed(p.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function T(ee){var ae=ee.selectAll("."+p.cn.cellTextHolder).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function f(ee){ee.each(function(ae,he){var xe=ae.calcdata.cells.font,we=ae.column.specIndex,Me={size:D(xe.size,we,he),color:D(xe.color,we,he),family:D(xe.family,we,he),weight:D(xe.weight,we,he),style:D(xe.style,we,he),variant:D(xe.variant,we,he),textcase:D(xe.textcase,we,he),lineposition:D(xe.lineposition,we,he),shadow:D(xe.shadow,we,he)};ae.rowNumber=ae.key,ae.align=D(ae.calcdata.cells.align,we,he),ae.cellBorderWidth=D(ae.calcdata.cells.line.width,we,he),ae.font=Me})}function u(ee){ee.each(function(ae){e.font(b.select(this),ae.font)})}function A(ee){ee.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var he=b.select(this);c.stroke(he,D(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),c.fill(he,D(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function x(ee,ae,he,xe){ee.text(function(we){var Me=we.column.specIndex,Se=we.rowNumber,Ie=we.value,Ve=typeof Ie=="string",Ge=Ve&&Ie.match(/
/i),ke=!Ve||Ge;we.mayHaveMarkup=Ve&&Ie.match(/[<&>]/);var _e=z(Ie);we.latex=_e;var ce=_e?"":D(we.calcdata.cells.prefix,Me,Se)||"",ve=_e?"":D(we.calcdata.cells.suffix,Me,Se)||"",le=_e?null:D(we.calcdata.cells.format,Me,Se)||null,Ae=ce+(le?k(le)(we.value):we.value)+ve,Be;we.wrappingNeeded=!we.wrapped&&!ke&&!_e&&(Be=I(Ae)),we.cellHeightMayIncrease=Ge||_e||we.mayHaveMarkup||(Be===void 0?I(Ae):Be),we.needsConvertToTspans=we.mayHaveMarkup||we.wrappingNeeded||we.latex;var Xe;if(we.wrappingNeeded){var Ye=p.wrapSplitCharacter===" "?Ae.replace(/we&&xe.push(Me),we+=Ve}return xe}function $(ee,ae,he){var xe=g(ae)[0];if(xe!==void 0){var we=xe.rowBlocks,Me=xe.calcdata,Se=K(we,we.length),Ie=xe.calcdata.groupHeight-j(xe),Ve=Me.scrollY=Math.max(0,Math.min(Se-Ie,Me.scrollY)),Ge=U(we,Ve,Ie);Ge.length===1&&(Ge[0]===we.length-1?Ge.unshift(Ge[0]-1):Ge.push(Ge[0]+1)),Ge[0]%2&&Ge.reverse(),ae.each(function(ke,_e){ke.page=Ge[_e],ke.scrollY=Ve}),ae.attr("transform",function(ke){var _e=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,_e)}),ee&&(re(ee,he,ae,Ge,xe.prevPages,xe,0),re(ee,he,ae,Ge,xe.prevPages,xe,1),i(he,ee))}}function Q(ee,ae,he,xe){return function(Me){var Se=Me.calcdata?Me.calcdata:Me,Ie=ae.filter(function(_e){return Se.key===_e.key}),Ve=he||Se.scrollbarState.dragMultiplier,Ge=Se.scrollY;Se.scrollY=xe===void 0?Se.scrollY+Ve*b.event.dy:xe;var ke=Ie.selectAll("."+p.cn.yColumn).selectAll("."+p.cn.columnBlock).filter(F);return $(ee,ke,Ie),Se.scrollY===Ge}}function re(ee,ae,he,xe,we,Me,Se){var Ie=xe[Se]!==we[Se];Ie&&(clearTimeout(Me.currentRepaint[Se]),Me.currentRepaint[Se]=setTimeout(function(){var Ve=he.filter(function(Ge,ke){return ke===Se&&xe[ke]!==we[ke]});w(ee,ae,Ve,he),we[Se]=xe[Se]}))}function ne(ee,ae,he,xe){return function(){var Me=b.select(ae.parentNode);Me.each(function(Se){var Ie=Se.fragments;Me.selectAll("tspan.line").each(function(Ae,Be){Ie[Be].width=this.getComputedTextLength()});var Ve=Ie[Ie.length-1].width,Ge=Ie.slice(0,-1),ke=[],_e,ce,ve=0,le=Se.column.columnWidth-2*p.cellPad;for(Se.value="";Ge.length;)_e=Ge.shift(),ce=_e.width+Ve,ve+ce>le&&(Se.value+=ke.join(p.wrapSpacer)+p.lineBreaker,ke=[],ve=0),ke.push(_e.text),ve+=ce;ve&&(Se.value+=ke.join(p.wrapSpacer)),Se.wrapped=!0}),Me.selectAll("tspan.line").remove(),x(Me.select("."+p.cn.cellText),he,ee,xe),b.select(ae.parentNode.parentNode).call(X)}}function se(ee,ae,he,xe,we){return function(){if(!we.settledY){var Se=b.select(ae.parentNode),Ie=q(we),Ve=we.key-Ie.firstRowIndex,Ge=Ie.rows[Ve].rowHeight,ke=we.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*p.cellPad:Ge,_e=Math.max(ke,Ge),ce=_e-Ie.rows[Ve].rowHeight;ce&&(Ie.rows[Ve].rowHeight=_e,ee.selectAll("."+p.cn.columnCell).call(X),$(null,ee.filter(F),0),i(he,xe,!0)),Se.attr("transform",function(){var ve=this,le=ve.parentNode,Ae=le.getBoundingClientRect(),Be=b.select(ve.parentNode).select("."+p.cn.cellRect).node().getBoundingClientRect(),Xe=ve.transform.baseVal.consolidate(),Ye=Be.top-Ae.top+(Xe?Xe.matrix.f:p.cellPad);return r(G(we,b.select(ve.parentNode).select("."+p.cn.cellTextHolder).node().getBoundingClientRect().width),Ye)}),we.settledY=!0}}}function G(ee,ae){switch(ee.align){case"left":return p.cellPad;case"right":return ee.column.columnWidth-(ae||0)-p.cellPad;case"center":return(ee.column.columnWidth-(ae||0))/2;default:return p.cellPad}}function X(ee){ee.attr("transform",function(ae){var he=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ie){return Se+H(Ie,1/0)},0),xe=q(ae),we=H(xe,ae.key),Me=we+he;return r(0,Me)}).selectAll("."+p.cn.cellRect).attr("height",function(ae){return Z(q(ae),ae.key).rowHeight})}function K(ee,ae){for(var he=0,xe=ae-1;xe>=0;xe--)he+=Y(ee[xe]);return he}function H(ee,ae){for(var he=0,xe=0;xek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(h-=180,a=-a),{angle:h,flip:a,p:b.c2p(l,E,k),offsetMultplier:o}}}}),aG=ze({"src/traces/carpet/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=HM(),k=WM(),l=rG(),e=Cs(),t=Nr(),n=t.strRotate,r=t.strTranslate,a=dc();V.exports=function(w,S,M,C){var _=w._context.staticPlot,T=S.xaxis,f=S.yaxis,u=w._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace,D=O.aaxis,B=O.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",O.opacity),s(T,f,P,D,"a",D._gridlines,!0,_),s(T,f,P,B,"b",B._gridlines,!0,_),s(T,f,F,D,"a",D._minorgridlines,!0,_),s(T,f,F,B,"b",B._minorgridlines,!0,_),s(T,f,j,D,"a-boundary",D._boundarylines,_),s(T,f,j,B,"b-boundary",B._boundarylines,_);var $=c(w,T,f,O,I,U,D._labels,"a-label"),Q=c(w,T,f,O,I,U,B._labels,"b-label");m(w,U,O,I,T,f,$,Q),o(O,I,A,T,f)})};function o(i,w,S,M,C){var _,T,f,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var x=t.ensureSingle(A,"path","carpetboundary"),z=w.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(b.font,z.font).text(z.text).call(e.convertToTspans,i),P=b.bBox(this);F.attr("transform",r(O.p[0],O.p[1])+n(O.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),x.maxExtent=A,x}function m(i,w,S,M,C,_,T,f){var u,A,x,z,I=t.aggNums(Math.min,null,S.a),O=t.aggNums(Math.max,null,S.a),D=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+O),A=D,x=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),T.angle===void 0&&t.extendFlat(T,l(S,C,_,x,S.dxydb_rough(u,A))),g(i,w,S,M,x,z,S.aaxis,C,_,T,"a-title"),u=I,A=.5*(D+B),x=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),f.angle===void 0&&t.extendFlat(f,l(S,C,_,x,S.dxyda_rough(u,A))),g(i,w,S,M,x,z,S.baxis,C,_,f,"b-title")}var h=a.LINE_SPACING,v=(1-a.MID_SHIFT)/h+1;function g(i,w,S,M,C,_,T,f,u,A,x){var z=[];T.title.text&&z.push(T.title.text);var I=w.selectAll("text."+x).data(z),O=A.maxExtent;I.enter().append("text").classed(x,!0),I.each(function(){var D=l(S,f,u,C,_);["start","both"].indexOf(T.showticklabels)===-1&&(O=0);var B=T.title.font.size;O+=B+T.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-D.angle+450)%360,j=P>90&&P<270,U=p.select(this);U.text(T.title.text).call(e.convertToTspans,i),j&&(O=(-e.lineCount(U)+v)*h*B-O),U.attr("transform",r(D.p[0],D.p[1])+n(D.angle)+r(0,O)).attr("text-anchor","middle").call(b.font,T.title.font)}),I.exit().remove()}}}),nG=ze({"src/traces/carpet/cheater_basis.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k){var l,e,t,n,r,a,o=[],s=p(b)?b.length:b,c=p(E)?E.length:E,m=p(b)?b:null,h=p(E)?E:null;m&&(t=(m.length-1)/(m[m.length-1]-m[0])/(s-1)),h&&(n=(h.length-1)/(h[h.length-1]-h[0])/(c-1));var v,g=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,n=0;n0&&(H=k.dxydi([],$-1,re,0,ne),ee.push(se[0]+H[0]/3),ae.push(se[1]+H[1]/3),Y=k.dxydi([],$-1,re,1,ne),ee.push(K[0]-Y[0]/3),ae.push(K[1]-Y[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;else for($=k.a2i(U),G=Math.floor(Math.max(0,Math.min(D-2,$))),X=$-G,he.length=D,he.crossLength=B,he.xy=function(xe){return k.evalxy([],$,xe)},he.dxy=function(xe,we){return k.dxydj([],G,xe,X,we)},Q=0;Q0&&(q=k.dxydj([],G,Q-1,X,0),ee.push(se[0]+q[0]/3),ae.push(se[1]+q[1]/3),Z=k.dxydj([],G,Q-1,X,1),ee.push(K[0]-Z[0]/3),ae.push(K[1]-Z[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;return he.axisLetter=l,he.axis=C,he.crossAxis=A,he.value=U,he.constvar=e,he.index=m,he.x=ee,he.y=ae,he.smoothing=A.smoothing,he}function j(U){var $,Q,re,ne,se,G=[],X=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),se=Math.min(1,Math.max(0,U-re)),K.xy=function(H){return k.evalxy([],H,U)},K.dxy=function(H,Y){return k.dxydi([],H,re,Y,se)},$=0;$M.length-1)&&_.push(b(j(n),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s;mM.length-1)&&!(g<0||g>M.length-1))for(i=M[r],w=M[g],t=0;tM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&f.push(b(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(a=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+a)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+a))].sort(function(U,$){return U-$}),s=o[0],c=o[1],m=s;m<=c;m++)h=C.tick0+C.dtick*m,_.push(b(P(h),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s-1;mM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&f.push(b(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),sG=ze({"src/traces/carpet/calc_labels.js"(J,V){"use strict";var p=Gi(),b=Ki().extendFlat;V.exports=function(k,l){var e,t,n,r,a,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=b[c][e],n[s-e]=E[c][e];for(r.push({x:t,y:n,bicubic:a}),e=c,t=[],n=[];e>=0;e--)t[c-e]=b[e][0],n[c-e]=E[e][0];return r.push({x:t,y:n,bicubic:o}),r}}}),uG=ze({"src/traces/carpet/smooth_fill_2d_array.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l){var e,t,n,r=[],a=[],o=E[0].length,s=E.length;function c(Q,re){var ne=0,se,G=0;return Q>0&&(se=E[re][Q-1])!==void 0&&(G++,ne+=se),Q0&&(se=E[re-1][Q])!==void 0&&(G++,ne+=se),re0&&t0&&eu);return p.log("Smoother converged to",A,"after",z,"iterations"),E}}}),cG=ze({"src/traces/carpet/constants.js"(J,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),fG=ze({"src/traces/carpet/catmull_rom.js"(J,V){"use strict";var p=.5;V.exports=function(E,k,l,e){var t=E[0]-k[0],n=E[1]-k[1],r=l[0]-k[0],a=l[1]-k[1],o=Math.pow(t*t+n*n,p/2),s=Math.pow(r*r+a*a,p/2),c=(s*s*t-o*o*r)*e,m=(s*s*n-o*o*a)*e,h=s*(o+s)*3,v=o*(o+s)*3;return[[k[0]+(h&&c/h),k[1]+(h&&m/h)],[k[0]-(v&&c/v),k[1]-(v&&m/v)]]}}}),hG=ze({"src/traces/carpet/compute_control_points.js"(J,V){"use strict";var p=fG(),b=Nr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],n=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*n+k[1])/3]}V.exports=function(l,e,t,n,r,a){var o,s,c,m,h,v,g,i,w,S,M=t[0].length,C=t.length,_=r?3*M-2:M,T=a?3*C-2:C;for(l=b(l,T),e=b(e,T),c=0;ch&&_g&&Tv||Ti},n.setScale=function(){var _=n._x,T=n._y,f=E(n._xctrl,n._yctrl,_,T,c.smoothing,m.smoothing);n._xctrl=f[0],n._yctrl=f[1],n.evalxy=k([n._xctrl,n._yctrl],o,s,c.smoothing,m.smoothing),n.dxydi=l([n._xctrl,n._yctrl],c.smoothing,m.smoothing),n.dxydj=e([n._xctrl,n._yctrl],c.smoothing,m.smoothing)},n.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),o-2),f=_[0]-T;return(1-f)*r[T]+f*r[T+1]},n.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),o-2),f=_[1]-T;return(1-f)*a[T]+f*a[T+1]},n.ij2ab=function(_){return[n.i2a(_[0]),n.j2b(_[1])]},n.a2i=function(_){var T=Math.max(0,Math.min(b(_,r),o-2)),f=r[T],u=r[T+1];return Math.max(0,Math.min(o-1,T+(_-f)/(u-f)))},n.b2j=function(_){var T=Math.max(0,Math.min(b(_,a),s-2)),f=a[T],u=a[T+1];return Math.max(0,Math.min(s-1,T+(_-f)/(u-f)))},n.ab2ij=function(_){return[n.a2i(_[0]),n.b2j(_[1])]},n.i2c=function(_,T){return n.evalxy([],_,T)},n.ab2xy=function(_,T,f){if(!f&&(_r[o-1]|Ta[s-1]))return[!1,!1];var u=n.a2i(_),A=n.b2j(T),x=n.evalxy([],u,A);if(f){var z=0,I=0,O=[],D,B,F,P;_r[o-1]?(D=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(D=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-D),Ta[s-1]?(F=s-2,P=1,I=(T-a[s-1])/(a[s-1]-a[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(n.dxydi(O,D,F,B,P),x[0]+=O[0]*z,x[1]+=O[1]*z),I&&(n.dxydj(O,D,F,B,P),x[0]+=O[0]*I,x[1]+=O[1]*I)}return x},n.c2p=function(_,T,f){return[T.c2p(_[0]),f.c2p(_[1])]},n.p2x=function(_,T,f){return[T.p2c(_[0]),f.p2c(_[1])]},n.dadi=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},n.dbdj=function(_){var T=Math.max(0,Math.min(a.length-2,_));return a[T+1]-a[T]},n.dxyda=function(_,T,f,u){var A=n.dxydi(null,_,T,f,u),x=n.dadi(_,f);return[A[0]/x,A[1]/x]},n.dxydb=function(_,T,f,u){var A=n.dxydj(null,_,T,f,u),x=n.dbdj(T,u);return[A[0]/x,A[1]/x]},n.dxyda_rough=function(_,T,f){var u=w*(f||.1),A=n.ab2xy(_+u,T,!0),x=n.ab2xy(_-u,T,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dxydb_rough=function(_,T,f){var u=S*(f||.1),A=n.ab2xy(_,T+u,!0),x=n.ab2xy(_,T-u,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dpdx=function(_){return _._m},n.dpdy=function(_){return _._m}}}}),gG=ze({"src/traces/carpet/calc.js"(J,V){"use strict";var p=Gi(),b=Nr().isArray1D,E=nG(),k=iG(),l=oG(),e=sG(),t=lG(),n=lb(),r=uG(),a=sb(),o=mG();V.exports=function(c,m){var h=p.getFromId(c,m.xaxis),v=p.getFromId(c,m.yaxis),g=m.aaxis,i=m.baxis,w=m.x,S=m.y,M=[];w&&b(w)&&M.push("x"),S&&b(S)&&M.push("y"),M.length&&a(m,g,i,"a","b",M);var C=m._a=m._a||m.a,_=m._b=m._b||m.b;w=m._x||m.x,S=m._y||m.y;var T={};if(m._cheater){var f=g.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;w=E(f,u,m.cheaterslope)}m._x=w=n(w),m._y=S=n(S),r(w,C,_),r(S,C,_),o(m),m.setScale();var A=k(w),x=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),O=.5*(x[1]-x[0]),D=.5*(x[1]+x[0]),B=1.3;return A=[I-z*B,I+z*B],x=[D-O*B,D+O*B],m._extremes[h._id]=p.findExtremes(h,A,{padded:!0}),m._extremes[v._id]=p.findExtremes(v,x,{padded:!0}),l(m,"a","b"),l(m,"b","a"),e(m,g),e(m,i),T.clipsegments=t(m._xctrl,m._yctrl,g,i),T.x=w,T.y=S,T.a=C,T.b=_,[T]}}}),yG=ze({"src/traces/carpet/index.js"(J,V){"use strict";V.exports={attributes:H2(),supplyDefaults:tG(),plot:aG(),calc:gG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Du(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),_G=ze({"lib/carpet.js"(J,V){"use strict";V.exports=yG()}}),YM=ze({"src/traces/scattercarpet/attributes.js"(J,V){"use strict";var p=Bd(),b=su(),E=ws(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=qs(),n=Ki().extendFlat,r=b.marker,a=b.line,o=r.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},b.mode,{dflt:"markers"}),text:n({},b.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:n({},b.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:n({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:n({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:p(),marker:n({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:n({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:n({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:b.zorder}}}),xG=ze({"src/traces/scattercarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=YM();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}h("carpet"),s.xaxis="x",s.yaxis="y";var v=h("a"),g=h("b"),i=Math.min(v.length,g.length);if(!i){s.visible=!1;return}s._length=i,h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext");var w=i0?T=C.labelprefix.replace(/ = $/,""):T=C._hovertitle,i.push(T+": "+_.toFixed(3)+C.labelsuffix)}if(!h.hovertemplate){var S=m.hi||h.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&w(v.aaxis,m.a),M.indexOf("b")!==-1&&w(v.baxis,m.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&b(m,h,i),r.extraText=i.join("
")}return n}}}),MG=ze({"src/traces/scattercarpet/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=l[e];return b.a=t.a,b.b=t.b,b.y=t.y,b}}}),SG=ze({"src/traces/scattercarpet/index.js"(J,V){"use strict";V.exports={attributes:YM(),supplyDefaults:xG(),colorbar:Of(),formatLabels:bG(),calc:wG(),plot:TG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:AG(),selectPoints:Yv(),eventData:MG(),moduleType:"trace",name:"scattercarpet",basePlotModule:Du(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),EG=ze({"lib/scattercarpet.js"(J,V){"use strict";V.exports=SG()}}),XM=ze({"src/traces/contourcarpet/attributes.js"(J,V){"use strict";var p=rg(),b=M1(),E=qs(),k=Ki().extendFlat,l=b.contours;V.exports=k({carpet:{valType:"string",editType:"calc"},z:p.z,a:p.x,a0:p.x0,da:p.dx,b:p.y,b0:p.y0,db:p.dy,text:p.text,hovertext:p.hovertext,transpose:p.transpose,atype:p.xtype,btype:p.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),ZM=ze({"src/traces/contourcarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=XM(),k=hT(),l=xb(),e=bb();V.exports=function(n,r,a,o){function s(v,g){return p.coerce(n,r,E,v,g)}function c(v){return p.coerce2(n,r,E,v)}if(s("carpet"),n.a&&n.b){var m=b(n,r,s,o,"a","b");if(!m){r.visible=!1;return}s("text");var h=s("contours.type")==="constraint";h?k(n,r,s,o,a,{hasHover:!1}):(l(n,r,s,c),e(n,r,s,o,{hasHover:!1}))}else r._defaultColor=a,r._length=null;s("zorder")}}}),kG=ze({"src/traces/contourcarpet/calc.js"(J,V){"use strict";var p=Qf(),b=Nr(),E=sb(),k=lb(),l=ub(),e=cb(),t=$5(),n=ZM(),r=W2(),a=aT();V.exports=function(c,m){var h=m._carpetTrace=r(c,m);if(!(!h||!h.visible||h.visible==="legendonly")){if(!m.a||!m.b){var v=c.data[h.index],g=c.data[m.index];g.a||(g.a=v.a),g.b||(g.b=v.b),n(g,m,m._defaultColor,c._fullLayout)}var i=o(c,m);return a(m,m._z),i}};function o(s,c){var m=c._carpetTrace,h=m.aaxis,v=m.baxis,g,i,w,S,M,C,_;h._minDtick=0,v._minDtick=0,b.isArray1D(c.z)&&E(c,h,v,"a","b",["z"]),g=c._a=c._a||c.a,S=c._b=c._b||c.b,g=g?h.makeCalcdata(c,"_a"):[],S=S?v.makeCalcdata(c,"_b"):[],i=c.a0||0,w=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var T=b.maxRowLength(_),f=c.xtype==="scaled"?"":g,u=t(c,f,i,w,T,h),A=c.ytype==="scaled"?"":S,x=t(c,A,M,C,_.length,v),z={a:u,b:x,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&p(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),CG=ze({"src/traces/carpet/axis_aligned_line.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k,l){var e,t,n,r,a,o,s,c,m,h,v,g,i,w=p(k)?"a":"b",S=w==="a"?b.aaxis:b.baxis,M=S.smoothing,C=w==="a"?b.a2i:b.b2j,_=w==="a"?k:l,T=w==="a"?l:k,f=w==="a"?E.a.length:E.b.length,u=w==="a"?E.b.length:E.a.length,A=Math.floor(w==="a"?b.b2j(T):b.a2i(T)),x=w==="a"?function(re){return b.evalxy([],re,A)}:function(re){return b.evalxy([],A,re)};M&&(n=Math.max(0,Math.min(u-2,A)),r=A-n,t=w==="a"?function(re,ne){return b.dxydi([],re,n,ne,r)}:function(re,ne){return b.dxydj([],n,re,r,ne)});var z=C(_[0]),I=C(_[1]),O=z0?Math.floor:Math.ceil,F=O>0?Math.ceil:Math.floor,P=O>0?Math.min:Math.max,j=O>0?Math.max:Math.min,U=B(z+D),$=F(I-D);s=x(z);var Q=[[s]];for(e=U;e*O<$*O;e+=O)a=[],v=j(z,e),g=P(I,e+O),i=g-v,o=Math.max(0,Math.min(f-2,Math.floor(.5*(v+g)))),c=x(g),M&&(m=t(o,v-o),h=t(o,g-o),a.push([s[0]+m[0]/3*i,s[1]+m[1]/3*i]),a.push([c[0]-h[0]/3*i,c[1]-h[1]/3*i])),a.push(c),Q.push(a),s=c;return Q}}}),LG=ze({"src/traces/contourcarpet/plot.js"(J,V){"use strict";var p=ci(),b=HM(),E=WM(),k=$i(),l=Nr(),e=iT(),t=oT(),n=wb(),r=E1(),a=lT(),o=sT(),s=uT(),c=W2(),m=CG();V.exports=function(f,u,A,x){var z=u.xaxis,I=u.yaxis;l.makeTraceGroups(x,A,"contour").each(function(O){var D=p.select(this),B=O[0],F=B.trace,P=F._carpetTrace=c(f,F),j=f.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var U=B.a,$=B.b,Q=F.contours,re=o(Q,u,B),ne=Q.type==="constraint",se=Q._operation,G=ne?se==="="?"lines":"fill":Q.coloring;function X(Me){var Se=P.ab2xy(Me[0],Me[1],!0);return[z.c2p(Se[0]),I.c2p(Se[1])]}var K=[[U[0],$[$.length-1]],[U[U.length-1],$[$.length-1]],[U[U.length-1],$[0]],[U[0],$[0]]];e(re);var H=(U[U.length-1]-U[0])*1e-8,Y=($[$.length-1]-$[0])*1e-8;t(re,H,Y);var q=re;Q.type==="constraint"&&(q=a(re,se)),h(re,X);var Z,ee,ae,he,xe=[];for(he=j.clipsegments.length-1;he>=0;he--)Z=j.clipsegments[he],ee=b([],Z.x,z.c2p),ae=b([],Z.y,I.c2p),ee.reverse(),ae.reverse(),xe.push(E(ee,ae,Z.bicubic));var we="M"+xe.join("L")+"Z";M(D,j.clipsegments,z,I,ne,G),C(F,D,z,I,q,K,X,P,j,G,we),v(D,re,f,B,Q,u,P),k.setClipUrl(D,P._clipPathId,f)})};function h(T,f){var u,A,x,z,I,O,D,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(T,f,u){var A=T.getPointAtLength(f),x=T.getPointAtLength(u),z=x.x-A.x,I=x.y-A.y,O=Math.sqrt(z*z+I*I);return[z/O,I/O]}function w(T){var f=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/f,T[1]/f]}function S(T,f){var u=Math.abs(T[0]*f[0]+T[1]*f[1]),A=Math.sqrt(1-u*u);return A/u}function M(T,f,u,A,x,z){var I,O,D,B,F=l.ensureSingle(T,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!x?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===f.edgepaths.length){l.log("unclosed perimeter path");break}D=Q,P=F.indexOf(D)===-1,P&&(D=F[0],B+=q(j,U)+"Z",j=null)}for(D=0;D_):C=O>x,_=O;var D=h(x,z,I,O);D.pos=A,D.yc=(x+O)/2,D.i=u,D.dir=C?"increasing":"decreasing",D.x=D.pos,D.y=[I,z],T&&(D.orig_p=s[u]),S&&(D.tx=o.text[u]),M&&(D.htx=o.hovertext[u]),f.push(D)}else f.push({pos:A,empty:!0})}return o._extremes[m._id]=E.findExtremes(m,p.concat(i,g),{padded:!0}),f.length&&(f[0].t={labels:{open:b(a,"open:")+" ",high:b(a,"high:")+" ",low:b(a,"low:")+" ",close:b(a,"close:")+" "}}),f}function r(a,o,s){var c=s._minDiff;if(!c){var m=a._fullData,h=[];c=1/0;var v;for(v=0;v"+w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat)):(I=b.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=x,I.yLabel=w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat),I.name="",S.push(I),f[x]=I)}return S}function o(s,c,m,h){var v=s.cd,g=s.ya,i=v[0].trace,w=v[0].t,S=r(s,c,m,h);if(!S)return[];var M=S.index,C=v[M],_=S.index=C.i,T=C.dir;function f(D){return w.labels[D]+p.hoverLabelText(g,i[D][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),x=u==="all",z=x||A.indexOf("y")!==-1,I=x||A.indexOf("text")!==-1,O=z?[f("open"),f("high"),f("low"),f("close")+" "+t[T]]:[];return I&&l(C,i,O),S.extraText=O.join("
"),S.y0=S.y1=g.c2p(C.yc,!0),[S]}V.exports={hoverPoints:n,hoverSplit:a,hoverOnPoints:o}}}),QM=ze({"src/traces/ohlc/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r=k[0].t.bPos||0;if(E===!1)for(n=0;nc?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var w=r.c2l(i)-s;return(g(w)?w:0)+v},r.g2c=function(i){return r.l2c(i+s-v)},r.g2p=function(i){return i*h},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,a){return a==="degrees"?E(r):r}function t(r,a){return a==="degrees"?k(r):r}function n(r,a){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(m,h){return e(s(m),h)},r.c2d=function(m,h){return c(t(m,h))}}r.makeCalcdata=function(m,h){var v=m[h],g=m._length,i,w,S=function(f){return r.d2c(f,m.thetaunit)};if(v)for(i=new Array(g),w=0;w0?f:1/0},C=E(S,M),_=p.mod(C+1,S.length);return[S[C],S[_]]}function h(w){return Math.abs(w)>1e-10?w:0}function v(w,S,M){S=S||0,M=M||0;for(var C=w.length,_=new Array(C),T=0;T0?1:0}function b(t){var n=t[0],r=t[1];if(!isFinite(n)||!isFinite(r))return[1,0];var a=(n+1)*(n+1)+r*r;return[(n*n+r*r-1)/a,2*r/a]}function E(t,n){var r=n[0],a=n[1];return[r*t.radius+t.cx,-a*t.radius+t.cy]}function k(t,n){return n*t.radius}function l(t,n,r,a){var o=E(t,b([r,n])),s=o[0],c=o[1],m=E(t,b([a,n])),h=m[0],v=m[1];if(n===0)return["M"+s+","+c,"L"+h+","+v].join(" ");var g=k(t,1/Math.abs(n));return["M"+s+","+c,"A"+g+","+g+" 0 0,"+(n<0?1:0)+" "+h+","+v].join(" ")}function e(t,n,r,a){var o=k(t,1/(n+1)),s=E(t,b([n,r])),c=s[0],m=s[1],h=E(t,b([n,a])),v=h[0],g=h[1];if(p(r)!==p(a)){var i=E(t,b([n,0])),w=i[0],S=i[1];return["M"+c+","+m,"A"+o+","+o+" 0 0,"+(0Ie?(Ve=ee,Ge=ee*Ie,ce=(ae-Ge)/K.h/2,ke=[q[0],q[1]],_e=[Z[0]+ce,Z[1]-ce]):(Ve=ae/Ie,Ge=ae,ce=(ee-Ve)/K.w/2,ke=[q[0]+ce,q[1]-ce],_e=[Z[0],Z[1]]),G.xLength2=Ve,G.yLength2=Ge,G.xDomain2=ke,G.yDomain2=_e;var ve=G.xOffset2=K.l+K.w*ke[0],le=G.yOffset2=K.t+K.h*(1-_e[1]),Ae=G.radius=Ve/we,Be=G.innerRadius=G.getHole(se)*Ae,Xe=G.cx=ve-Ae*xe[0],Ye=G.cy=le+Ae*xe[3],yt=G.cxx=Xe-ve,gt=G.cyy=Ye-le,Tt=H.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),G.radialAxis=G.mockAxis(ne,se,H,{_id:"x",side:Tt,_trueSide:At,domain:[Be/K.w,Ae/K.w]}),G.angularAxis=G.mockAxis(ne,se,Y,{side:"right",domain:[0,Math.PI],autorange:!1}),G.doAutoRange(ne,se),G.updateAngularAxis(ne,se),G.updateRadialAxis(ne,se),G.updateRadialAxisTitle(ne,se),G.xaxis=G.mockCartesianAxis(ne,se,{_id:"x",domain:ke}),G.yaxis=G.mockCartesianAxis(ne,se,{_id:"y",domain:_e});var $t=G.pathSubplot();G.clipPaths.forTraces.select("path").attr("d",$t).attr("transform",l(yt,gt)),X.frontplot.attr("transform",l(ve,le)).call(t.setClipUrl,G._hasClipOnAxisFalse?null:G.clipIds.forTraces,G.gd),X.bg.attr("d",$t).attr("transform",l(Xe,Ye)).call(e.fill,se.bgcolor)},j.mockAxis=function(ne,se,G,X){var K=E.extendFlat({},G,X);return o(K,se,ne),K},j.mockCartesianAxis=function(ne,se,G){var X=this,K=X.isSmith,H=G._id,Y=E.extendFlat({type:"linear"},G);a(Y,ne);var q={x:[0,2],y:[1,3]};return Y.setRange=function(){var Z=X.sectorBBox,ee=q[H],ae=X.radialAxis._rl,he=(ae[1]-ae[0])/(1-X.getHole(se));Y.range=[Z[ee[0]]*he,Z[ee[1]]*he]},Y.isPtWithinRange=H==="x"&&!K?function(Z){return X.isPtInside(Z)}:function(){return!0},Y.setRange(),Y.setScale(),Y},j.doAutoRange=function(ne,se){var G=this,X=G.gd,K=G.radialAxis,H=G.getRadial(se);s(X,K);var Y=K.range;if(H.range=Y.slice(),H._input.range=Y.slice(),K._rl=[K.r2l(Y[0],null,"gregorian"),K.r2l(Y[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var Z=K.r2l(K.maxallowed);K._rl[0]90&&ae<=270&&(he.tickangle=180);var Me=we?function(Ae){var Be=I(G,A([Ae.x,0]));return l(Be[0]-q,Be[1]-Z)}:function(Ae){return l(he.l2p(Ae.x)+Y,0)},Se=we?function(Ae){return z(G,Ae.x,-1/0,1/0)}:function(Ae){return G.pathArc(he.r2p(Ae.x)+Y)},Ie=U(ee);if(G.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),G.radialTickLayout=Ie),xe){he.setScale();var Ve=0,Ge=we?(he.tickvals||[]).filter(function(Ae){return Ae>=0}).map(function(Ae){return r.tickText(he,Ae,!0,!1)}):r.calcTicks(he),ke=we?Ge:r.clipEnds(he,Ge),_e=r.getTickSigns(he)[2];we&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(_e=-_e),he.ticks==="top"&&he.side==="top"&&(Ve=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ve=he.ticklen)),r.drawTicks(X,he,{vals:Ge,layer:K["radial-axis"],path:r.makeTickPath(he,0,_e),transFn:Me,crisp:!1}),r.drawGrid(X,he,{vals:ke,layer:K["radial-grid"],path:Se,transFn:E.noop,crisp:!1}),r.drawLabels(X,he,{vals:Ge,layer:K["radial-axis"],transFn:Me,labelFns:r.makeLabelFns(he,Ve)})}var ce=G.radialAxisAngle=G.vangles?F(Q(B(ee.angle),G.vangles)):ee.angle,ve=l(q,Z),le=ve+k(-ce);re(K["radial-axis"],xe&&(ee.showticklabels||ee.ticks),{transform:le}),re(K["radial-grid"],xe&&ee.showgrid,{transform:we?"":ve}),re(K["radial-line"].select("line"),xe&&ee.showline,{x1:we?-H:Y,y1:0,x2:H,y2:0,transform:le}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ne,se,G){if(!this.isSmith){var X=this,K=X.gd,H=X.radius,Y=X.cx,q=X.cy,Z=X.getRadial(se),ee=X.id+"title",ae=0;if(Z.title){var he=t.bBox(X.layers["radial-axis"].node()).height,xe=Z.title.font.size,we=Z.side;ae=we==="top"?xe:we==="counterclockwise"?-(he+xe*.4):he+xe*.8}var Me=G!==void 0?G:X.radialAxisAngle,Se=B(Me),Ie=Math.cos(Se),Ve=Math.sin(Se),Ge=Y+H/2*Ie+ae*Ve,ke=q-H/2*Ve+ae*Ie;X.layers["radial-axis-title"]=v.draw(K,ee,{propContainer:Z,propName:X.id+".radialaxis.title.text",placeholder:O(K,"Click to enter radial axis title"),attributes:{x:Ge,y:ke,"text-anchor":"middle"},transform:{rotate:-Me}})}},j.updateAngularAxis=function(ne,se){var G=this,X=G.gd,K=G.layers,H=G.radius,Y=G.innerRadius,q=G.cx,Z=G.cy,ee=G.getAngular(se),ae=G.angularAxis,he=G.isSmith;he||(G.fillViewInitialKey("angularaxis.rotation",ee.rotation),ae.setGeometry(),ae.setScale());var xe=he?function(Be){var Xe=I(G,A([0,Be.x]));return Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2}:function(Be){return ae.t2g(Be.x)};ae.type==="linear"&&ae.thetaunit==="radians"&&(ae.tick0=F(ae.tick0),ae.dtick=F(ae.dtick));var we=function(Be){return l(q+H*Math.cos(Be),Z-H*Math.sin(Be))},Me=he?function(Be){var Xe=I(G,A([0,Be.x]));return l(Xe[0],Xe[1])}:function(Be){return we(xe(Be))},Se=he?function(Be){var Xe=I(G,A([0,Be.x])),Ye=Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2;return l(Xe[0],Xe[1])+k(-F(Ye))}:function(Be){var Xe=xe(Be);return we(Xe)+k(-F(Xe))},Ie=he?function(Be){return x(G,Be.x,0,1/0)}:function(Be){var Xe=xe(Be),Ye=Math.cos(Xe),yt=Math.sin(Xe);return"M"+[q+Y*Ye,Z-Y*yt]+"L"+[q+H*Ye,Z-H*yt]},Ve=r.makeLabelFns(ae,0),Ge=Ve.labelStandoff,ke={};ke.xFn=function(Be){var Xe=xe(Be);return Math.cos(Xe)*Ge},ke.yFn=function(Be){var Xe=xe(Be),Ye=Math.sin(Xe)>0?.2:1;return-Math.sin(Xe)*(Ge+Be.fontSize*Ye)+Math.abs(Math.cos(Xe))*(Be.fontSize*_)},ke.anchorFn=function(Be){var Xe=xe(Be),Ye=Math.cos(Xe);return Math.abs(Ye)<.1?"middle":Ye>0?"start":"end"},ke.heightFn=function(Be,Xe,Ye){var yt=xe(Be);return-.5*(1+Math.sin(yt))*Ye};var _e=U(ee);G.angularTickLayout!==_e&&(K["angular-axis"].selectAll("."+ae._id+"tick").remove(),G.angularTickLayout=_e);var ce=he?[1/0].concat(ae.tickvals||[]).map(function(Be){return r.tickText(ae,Be,!0,!1)}):r.calcTicks(ae);he&&(ce[0].text="\u221E",ce[0].fontSize*=1.75);var ve;if(se.gridshape==="linear"?(ve=ce.map(xe),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,G.vangles=ve,ae.type==="category"&&(ce=ce.filter(function(Be){return E.isAngleInsideSector(xe(Be),G.sectorInRad)})),ae.visible){var le=ae.ticks==="inside"?-1:1,Ae=(ae.linewidth||1)/2;r.drawTicks(X,ae,{vals:ce,layer:K["angular-axis"],path:"M"+le*Ae+",0h"+le*ae.ticklen,transFn:Se,crisp:!1}),r.drawGrid(X,ae,{vals:ce,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(X,ae,{vals:ce,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Me,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:G.pathSubplot(),transform:l(q,Z)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ne,se){if(!this.gd._context.staticPlot){var G=!this.isSmith;G&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,se,0),this.updateRadialDrag(ne,se,1)),this.updateHoverAndMainDrag(ne)}},j.updateHoverAndMainDrag=function(ne){var se=this,G=se.isSmith,X=se.gd,K=se.layers,H=ne._zoomlayer,Y=T.MINZOOM,q=T.OFFEDGE,Z=se.radius,ee=se.innerRadius,ae=se.cx,he=se.cy,xe=se.cxx,we=se.cyy,Me=se.sectorInRad,Se=se.vangles,Ie=se.radialAxis,Ve=f.clampTiny,Ge=f.findXYatLength,ke=f.findEnclosingVertexAngles,_e=T.cornerHalfWidth,ce=T.cornerLen/2,ve,le,Ae=c.makeDragger(K,"path","maindrag",ne.dragmode===!1?"none":"crosshair");p.select(Ae).attr("d",se.pathSubplot()).attr("transform",l(ae,he)),Ae.onmousemove=function(qt){h.hover(X,qt,se.id),X._fullLayout._lasthover=Ae,X._fullLayout._hoversubplot=se.id},Ae.onmouseout=function(qt){X._dragging||m.unhover(X,qt)};var Be={element:Ae,gd:X,subplot:se.id,plotinfo:{id:se.id,xaxis:se.xaxis,yaxis:se.yaxis},xaxes:[se.xaxis],yaxes:[se.yaxis]},Xe,Ye,yt,gt,Tt,At,$t,rr,_r;function Xt(qt,Vt){return Math.sqrt(qt*qt+Vt*Vt)}function or(qt,Vt){return Xt(qt-xe,Vt-we)}function Ot(qt,Vt){return Math.atan2(we-Vt,qt-xe)}function vt(qt,Vt){return[qt*Math.cos(Vt),qt*Math.sin(-Vt)]}function ht(qt,Vt){if(qt===0)return se.pathSector(2*_e);var Ht=ce/qt,Sr=Vt-Ht,Kr=Vt+Ht,Yt=Math.max(0,Math.min(qt,Z)),Rt=Yt-_e,nr=Yt+_e;return"M"+vt(Rt,Sr)+"A"+[Rt,Rt]+" 0,0,0 "+vt(Rt,Kr)+"L"+vt(nr,Kr)+"A"+[nr,nr]+" 0,0,1 "+vt(nr,Sr)+"Z"}function De(qt,Vt,Ht){if(qt===0)return se.pathSector(2*_e);var Sr=vt(qt,Vt),Kr=vt(qt,Ht),Yt=Ve((Sr[0]+Kr[0])/2),Rt=Ve((Sr[1]+Kr[1])/2),nr,ur;if(Yt&&Rt){var cr=Rt/Yt,Rr=-1/cr,Qr=Ge(_e,cr,Yt,Rt);nr=Ge(ce,Rr,Qr[0][0],Qr[0][1]),ur=Ge(ce,Rr,Qr[1][0],Qr[1][1])}else{var Zr,ha;Rt?(Zr=ce,ha=_e):(Zr=_e,ha=ce),nr=[[Yt-Zr,Rt-ha],[Yt+Zr,Rt-ha]],ur=[[Yt-Zr,Rt+ha],[Yt+Zr,Rt+ha]]}return"M"+nr.join("L")+"L"+ur.reverse().join("L")+"Z"}function Ne(){yt=null,gt=null,Tt=se.pathSubplot(),At=!1;var qt=X._fullLayout[se.id];$t=e.luminosity(qt.bgcolor),rr=c.makeZoombox(H,$t,ae,he,Tt),rr.attr("fill-rule","evenodd"),_r=c.makeCorners(H,ae,he),w(X)}function We(qt,Vt){return Vt=Math.max(Math.min(Vt,Z),ee),qtY?(qt-1&&qt===1&&i(Vt,X,[se.xaxis],[se.yaxis],se.id,Be),Ht.indexOf("event")>-1&&h.click(X,Vt,se.id)}Be.prepFn=function(qt,Vt,Ht){var Sr=X._fullLayout.dragmode,Kr=Ae.getBoundingClientRect();X._fullLayout._calcInverseTransform(X);var Yt=X._fullLayout._invTransform;ve=X._fullLayout._invScaleX,le=X._fullLayout._invScaleY;var Rt=E.apply3DTransform(Yt)(Vt-Kr.left,Ht-Kr.top);if(Xe=Rt[0],Ye=Rt[1],Se){var nr=f.findPolygonOffset(Z,Me[0],Me[1],Se);Xe+=xe+nr[0],Ye+=we+nr[1]}switch(Sr){case"zoom":Be.clickFn=Ct,G||(Se?Be.moveFn=Mt:Be.moveFn=Je,Be.doneFn=pt,Ne(qt,Vt,Ht));break;case"select":case"lasso":g(qt,Vt,Ht,Be,Sr);break}},m.init(Be)},j.updateRadialDrag=function(ne,se,G){var X=this,K=X.gd,H=X.layers,Y=X.radius,q=X.innerRadius,Z=X.cx,ee=X.cy,ae=X.radialAxis,he=T.radialDragBoxSize,xe=he/2;if(!ae.visible)return;var we=B(X.radialAxisAngle),Me=ae._rl,Se=Me[0],Ie=Me[1],Ve=Me[G],Ge=.75*(Me[1]-Me[0])/(1-X.getHole(se))/Y,ke,_e,ce;G?(ke=Z+(Y+xe)*Math.cos(we),_e=ee-(Y+xe)*Math.sin(we),ce="radialdrag"):(ke=Z+(q-xe)*Math.cos(we),_e=ee-(q-xe)*Math.sin(we),ce="radialdrag-inner");var ve=c.makeRectDragger(H,ce,"crosshair",-xe,-xe,he,he),le={element:ve,gd:K};ne.dragmode===!1&&(le.dragmode=!1),re(p.select(ve),ae.visible&&q0!=(G?Xe>Se:Xe=90||K>90&&H>=450?we=1:q<=0&&ee<=0?we=0:we=Math.max(q,ee),K<=180&&H>=180||K>180&&H>=540?ae=-1:Y>=0&&Z>=0?ae=0:ae=Math.min(Y,Z),K<=270&&H>=270||K>270&&H>=630?he=-1:q>=0&&ee>=0?he=0:he=Math.min(q,ee),H>=360?xe=1:Y<=0&&Z<=0?xe=0:xe=Math.max(Y,Z),[ae,he,xe,we]}function Q(ne,se){var G=function(K){return E.angleDist(ne,K)},X=E.findIndexOfMin(se,G);return se[X]}function re(ne,se,G){return se?(ne.attr("display",null),ne.attr(G)):ne&&ne.attr("display","none"),ne}}}),n4=ze({"src/plots/polar/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),n={visible:k({},b.visible,{dflt:!0}),type:k({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:k({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},b.minallowed,{editType:"plot"}),maxallowed:k({},b.maxallowed,{editType:"plot"}),range:k({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},b.title.text,{editType:"plot",dflt:""}),font:k({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(n,e,t);var r={visible:k({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.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:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),V.exports={domain:E({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:p.background},radialaxis:n,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),qG=ze({"src/plots/polar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=Uv(),t=Ym(),n=ov(),r=sv(),a=Hx(),o=g1(),s=Jw(),c=Xm(),m=n4(),h=t4(),v=X2(),g=v.axisNames;function i(S,M,C,_){var T=C("bgcolor");_.bgColor=b.combine(T,_.paper_bgcolor);var f=C("sector");C("hole");var u=l(_.fullData,v.name,_.id),A=_.layoutOut,x;function z(xe,we){return C(x+"."+xe,we)}for(var I=0;I")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),HG=ze({"src/traces/scatterpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:$2(),categories:["polar","symbols","showLegend","scatter-like"],attributes:uy(),supplyDefaults:K2().supplyDefaults,colorbar:Of(),formatLabels:J2(),calc:VG(),plot:GG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:Q2().hoverPoints,selectPoints:Yv(),meta:{}}}}),WG=ze({"lib/scatterpolar.js"(J,V){"use strict";V.exports=HG()}}),i4=ze({"src/traces/scatterpolargl/attributes.js"(J,V){"use strict";var p=uy(),{cliponaxis:b,hoveron:E}=p,k=Lo(p,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:n},fill:r,fillcolor:a,marker:o,textfont:s,textposition:c}=ty();V.exports=lo(Li({},k),{connectgaps:l,fill:r,fillcolor:a,line:{color:e,dash:t,editType:"calc",width:n},marker:o,textfont:s,textposition:c})}}),YG=ze({"src/traces/scatterpolargl/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=K2().handleRThetaDefaults,k=id(),l=_d(),e=xd(),t=Od(),n=zd().PTS_LINESONLY,r=i4();V.exports=function(o,s,c,m){function h(g,i){return p.coerce(o,s,r,g,i)}var v=E(o,s,m,h);if(!v){s.visible=!1;return}h("thetaunit"),h("mode",v=t&&(_.marker.cluster=w.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(a,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(a,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(a,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(a,i,_.text,_.markerUnsel))),_.fill&&!h.fill2d&&(h.fill2d=!0),_.marker&&!h.scatter2d&&(h.scatter2d=!0),_.line&&!h.line2d&&(h.line2d=!0),_.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(_.line),h.fillOptions.push(_.fill),h.markerOptions.push(_.marker),h.markerSelectedOptions.push(_.markerSel),h.markerUnselectedOptions.push(_.markerUnsel),h.textOptions.push(_.text),h.textSelectedOptions.push(_.textSel),h.textUnselectedOptions.push(_.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),w.x=x,w.y=z,w.rawx=x,w.rawy=z,w.r=M,w.theta=C,w.positions=A,w._scene=h,w.index=h.count,h.count++}}),E(a,o,s)}},V.exports.reglPrecompiled=n}}),QG=ze({"src/traces/scatterpolargl/index.js"(J,V){"use strict";var p=KG();p.plot=JG(),V.exports=p}}),eH=ze({"lib/scatterpolargl.js"(J,V){"use strict";V.exports=QG()}}),o4=ze({"src/traces/barpolar/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,templatefallbackAttrs:b}=xs(),E=Ki().extendFlat,k=uy(),l=jd();V.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:p(),hovertemplatefallback:b(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),s4=ze({"src/traces/barpolar/layout_attributes.js"(J,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),tH=ze({"src/traces/barpolar/defaults.js"(J,V){"use strict";var p=Nr(),b=K2().handleRThetaDefaults,E=eb(),k=o4();V.exports=function(e,t,n,r){function a(s,c){return p.coerce(e,t,k,s,c)}var o=b(e,t,r,a);if(!o){t.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),E(e,t,a,n,r),p.coerceSelectionMarkerOpacity(t,a)}}}),rH=ze({"src/traces/barpolar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=s4();V.exports=function(E,k,l){var e={},t;function n(o,s){return p.coerce(E[t]||{},k[t],b,o,s)}for(var r=0;r0?(m=s,h=c):(m=c,h=s);var v=l.findEnclosingVertexAngles(m,t.vangles)[0],g=l.findEnclosingVertexAngles(h,t.vangles)[1],i=[v,(m+h)/2,g];return l.pathPolygonAnnulus(a,o,m,h,i,n,r)}:function(a,o,s,c){return E.pathAnnulus(a,o,s,c,n,r)}}}}),nH=ze({"src/traces/barpolar/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=eg().getTraceColor,k=b.fillText,l=Q2().makeHoverPointText,e=Z2().isPtInsidePolygon;V.exports=function(n,r,a){var o=n.cd,s=o[0].trace,c=n.subplot,m=c.radialAxis,h=c.angularAxis,v=c.vangles,g=v?e:b.isPtInsideSector,i=n.maxHoverDistance,w=h._period||2*Math.PI,S=Math.abs(m.g2p(Math.sqrt(r*r+a*a))),M=Math.atan2(a,r);m.range[0]>m.range[1]&&(M+=Math.PI);var C=function(u){return g(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],v)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/w)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(p.getClosest(o,C,n),n.index!==!1){var _=n.index,T=o[_];n.x0=n.x1=T.ct[0],n.y0=n.y1=T.ct[1];var f=b.extendFlat({},T,{r:T.s,theta:T.p});return k(T,s,n),l(f,s,c,n),n.hovertemplate=s.hovertemplate,n.color=E(s,T),n.xLabelVal=n.yLabelVal=void 0,T.s<0&&(n.idealAlign="left"),[n]}}}}),iH=ze({"src/traces/barpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:$2(),categories:["polar","bar","showLegend"],attributes:o4(),layoutAttributes:s4(),supplyDefaults:tH(),supplyLayoutDefaults:rH(),calc:l4().calc,crossTraceCalc:l4().crossTraceCalc,plot:aH(),colorbar:Of(),formatLabels:J2(),style:ld().style,styleOnSelect:ld().styleOnSelect,hoverPoints:nH(),selectPoints:tg(),meta:{}}}}),oH=ze({"lib/barpolar.js"(J,V){"use strict";V.exports=iH()}}),u4=ze({"src/plots/smith/constants.js"(J,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),c4=ze({"src/plots/smith/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({ticklen:b.ticklen,tickwidth:k({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),n=k({visible:k({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},e,t);V.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:p.background},realaxis:n,imaginaryaxis:r,editType:"calc"}}}),sH=ze({"src/plots/smith/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=sv(),t=ov(),n=g1(),r=Dd(),a=c4(),o=u4(),s=o.axisNames,c=h(function(v){return p.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(g){return-g}).concat([0]).concat(v)},String);function m(v,g,i,w){var S=i("bgcolor");w.bgColor=b.combine(S,w.paper_bgcolor);var M=l(w.fullData,o.name,w.id),C=w.layoutOut,_;function T(U,$){return i(_+"."+U,$)}for(var f=0;f")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),pH=ze({"src/traces/scattersmith/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:lH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:f4(),supplyDefaults:uH(),colorbar:Of(),formatLabels:cH(),calc:fH(),plot:hH(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:dH().hoverPoints,selectPoints:Yv(),meta:{}}}}),vH=ze({"lib/scattersmith.js"(J,V){"use strict";V.exports=pH()}}),h4=ze({"src/traces/quiver/attributes.js"(J,V){"use strict";var p=ws(),b=xs().hovertemplateAttrs,E=Il().axisHoverFormat,k=Ki().extendFlat,l=qs(),e=Uc().dash,t=fv(),n=su(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:n.x0,dx:n.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:n.y0,dy:n.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},p.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:b({},{keys:["x","y","u","v","text","name"]}),text:n.text,textposition:n.textposition,textfont:n.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};V.exports=r}}),mH=ze({"src/traces/quiver/defaults.js"(J,V){"use strict";var p=Nr(),b=h4(),E=Gv(),k=Bf().hasColorscale,l=qc();V.exports=function(t,n,r,a){function o(S,M){return p.coerce(t,n,b,S,M)}var s=E(t,n,a,o);if(!s){n.visible=!1;return}var c=o("u"),m=o("v");if(!p.isArrayOrTypedArray(c)||c.length===0){n.u=new Array(s);for(var h=0;hO&&(O=c[Q]),m[Q]B&&(B=m[Q]),GP&&(P=G),XU&&(U=X);var K=Math.sqrt(G*G+X*X);if(K>i&&(i=K),KS&&(S=H))}}else re.x=k,re.y=k}if(a._maxNorm=i,u==="scaled"||A==="paper"){let Me=O-I,Se=B-D;var Y;Me===0&&Se===0?Y=1:Y=(Me+Se+Math.sqrt((Me-Se)*(Me-Se)+4*$*Me*Se))/(2*($-1)),Y*=t,a._scaleFactor=Y/a._maxNorm}else a._scaleFactor=1;a._scaleFactor*=a.lengthfactor;let q=new Array(h),Z=new Array(h),ee=new Array(h),ae=new Array(h);for(var he,xe,Q=0;Qm.i&&isFinite(h[m.i]))v=h[m.i];else{var g=o.u&&o.u[m.i]||0,i=o.v&&o.v[m.i]||0;v=Math.sqrt(g*g+i*i)}return c(v)})}function t(a){var o=p.select(a).selectAll("g.trace.quiver");o.each(function(s){r(a,s,p.select(this))})}function n(a,o,s){r(a,o,s)}function r(a,o,s){var c=o[0].trace,m=c.marker||{},h=m.line||{},v=b.isArrayOrTypedArray(m.color)?void 0:m.color,g=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},w=(c.unselected||{}).marker||{},S=i.line||{},M=w.line||{};s.selectAll("path.js-line").each(function(_){var T=p.select(this),f=!_.selected,u=f?w.color:i.color,A=f?M.width!==void 0?M.width:h.width:S.width!==void 0?S.width:h.width;u?(E.lineGroupStyle(T,A,u,h.dash),T.style("stroke-opacity",1)):(E.lineGroupStyle(T,A,v,h.dash),g&&e(T,c),T.style("stroke-opacity",f?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,h.width,v,h.dash),g&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,a)}}V.exports={style:t,styleOnSelect:n,colorscaleStroke:e}}}),_H=ze({"src/traces/quiver/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=e3().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,n=.7;V.exports=function(o,s,c,m,h,v){var g,i,w=!h,S=!!h&&h.duration>0;if(g=m.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),g.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),g.order(),S){v&&(i=v());var M=p.transition().duration(h.duration).ease(h.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){m.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,h)})})}else g.each(function(C,_){r(o,_,s,C,c,this,h)});w&&g.exit().remove()};function r(a,o,s,c,m,h,v){var g=c[0].trace,i=s.xaxis,w=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=p.select(h);var S=p.select(h).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,a);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:T}=g,f=T==="paper"?g._scaleFactor*Math.sqrt(Math.abs(i._m*w._m)):g._scaleFactor,u=g.marker.arrowsize;M.each(function(B){let F=p.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(T==="paper"?B._u*Math.sign(i._m):p.round(i._m*B._u))*f,j=(T==="paper"?B._v*Math.sign(w._m):p.round(w._m*B._v))*f,U=(g._input.marker||{}).arrowsize!==void 0;var $,Q,re,ne;C==="tip"?($=i.c2p(B.x)-P,re=w.c2p(B.y)-j,Q=i.c2p(B.x),ne=w.c2p(B.y)):C==="center"?($=i.c2p(B.x)-P/2,re=w.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ne=w.c2p(B.y)+j/2):($=i.c2p(B.x),re=w.c2p(B.y),Q=i.c2p(B.x)+P,ne=w.c2p(B.y)+j),B._px0=$,B._py0=re,B._px1=Q,B._py1=ne;var se=g.marker.line.width;U||(se=Math.max(se,t));let G=Math.sqrt((Q-$)*(Q-$)+(ne-re)*(ne-re)),X=n*G,K=Math.min(e*u*se,X),H=Math.atan2(ne-re,Q-$),Y=Q-K*Math.cos(H-l),q=ne-K*Math.sin(H-l),Z=Q-K*Math.cos(H+l),ee=ne-K*Math.sin(H+l),ae="M"+$+","+re+"L"+Q+","+ne+"L"+Y+","+q+"L"+Q+","+ne+"L"+Z+","+ee;F.attr("d",ae)});var A=g.marker||{},x=A.line||{},z=b.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,x.width,z,x.dash),g._hasColorscale&&k(M,g);var I=p.select(h).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,a);var O=I.selectAll("g.textpoint").data(c);if(O.enter().append("g").classed("textpoint",!0).append("text"),O.exit().remove(),O.each(function(B){var F=p.select(this),P=E.translatePoint(B,F.select("text"),i,w);P||F.remove()}),O.selectAll("text").call(E.textPointStyle,g,a).each(function(B){var F=i.c2p(B.x),P=w.c2p(B.y);p.select(this).selectAll("tspan.line").each(function(){p.select(this).attr({x:F,y:P})})}),v&&v.duration>0){var D=p.transition().duration(v.duration).ease(v.easing);M.transition(D).style("opacity",1)}}}}),xH=ze({"src/traces/quiver/hover.js"(J,V){"use strict";var p=Nr(),b=Zl(),E=Jm();function k(l,e,t,n,r,a){let o=r-t,s=a-n,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-n)*(e-n));var m=((l-t)*o+(e-n)*s)/c;m=Math.max(0,Math.min(1,m));let h=t+m*o,v=n+m*s;return Math.sqrt((l-h)*(l-h)+(e-v)*(e-v))}V.exports=function(e,t,n,r){var a=e.cd,o=a[0].trace,s=e.xa,c=e.ya,m=s.c2p(t),h=c.c2p(n),v=function(T){return T._px0===void 0?1/0:k(m,h,T._px0,T._py0,T._px1,T._py1)};if(b.getClosest(a,v,e),e.index!==!1){var g=a[e.index],i=s.c2p(g.x,!0),w=c.c2p(g.y,!0),S=Math.sqrt((m-i)*(m-i)+(h-w)*(h-w));e.index=g.i;var M=o.u?o.u[g.i]:0,C=o.v?o.v[g.i]:0,_="u: "+M+", v: "+C;return p.extendFlat(e,{color:E(o,g),x0:i-3,x1:i+3,xLabelVal:g.x,y0:w-3,y1:w+3,yLabelVal:g.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),p.fillText(g,o,e),[e]}}}}),bH=ze({"src/traces/quiver/format_labels.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(k,l,e){var t={},n={_fullLayout:e},r=p.getFromTrace(n,l,"x"),a=p.getFromTrace(n,l,"y"),o=k.x,s=k.y;t.xLabel=p.tickText(r,r.c2l(o),!0).text,t.yLabel=p.tickText(a,a.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,m=l.v?l.v[k.i]:0,h=l.uhoverformat,v=l.vhoverformat;return t.uLabel=h?b.numberFormat(h)(c):String(c),t.vLabel=v?b.numberFormat(v)(m):String(m),t}}}),wH=ze({"src/traces/quiver/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){return b.x=E.x,b.y=E.y,b.u=k.u?k.u[e]:void 0,b.v=k.v?k.v[e]:void 0,b}}}),TH=ze({"src/traces/quiver/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"quiver",basePlotModule:Du(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:h4(),supplyDefaults:mH(),calc:gH(),crossTraceCalc:yH(),plot:_H(),style:e3().style,styleOnSelect:e3().styleOnSelect,hoverPoints:xH(),formatLabels:bH(),eventData:wH(),selectPoints:Yv(),colorbar:Of(),animatable:!0,meta:{}}}}),AH=ze({"lib/quiver.js"(J,V){"use strict";V.exports=TH()}}),th=ze({"node_modules/world-calendars/dist/main.js"(J,V){var p=Vc();function b(){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={}}p(b.prototype,{instance:function(n,r){n=(n||"gregorian").toLowerCase(),r=r||"";var a=this._localCals[n+"-"+r];if(!a&&this.calendars[n]&&(a=new this.calendars[n](r),this._localCals[n+"-"+r]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,n);return a},newDate:function(n,r,a,o,s){return o=(n!=null&&n.year?n.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(n,r,a)},substituteDigits:function(n){return function(r){return(r+"").replace(/[0-9]/g,function(a){return n[a]})}},substituteChineseDigits:function(n,r){return function(a){for(var o="",s=0;a>0;){var c=a%10;o=(c===0?"":n[c]+r[s])+o,s++,a=Math.floor(a/10)}return o.indexOf(n[1]+r[1])===0&&(o=o.substr(1)),o||n[0]}}});function E(n,r,a,o){if(this._calendar=n,this._year=r,this._month=a,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(n,r){return n=""+n,"000000".substring(0,r-n.length)+n}p(E.prototype,{newDate:function(n,r,a){return this._calendar.newDate(n??this,r,a)},year:function(n){return arguments.length===0?this._year:this.set(n,"y")},month:function(n){return arguments.length===0?this._month:this.set(n,"m")},day:function(n){return arguments.length===0?this._day:this.set(n,"d")},date:function(n,r,a){if(!this._calendar.isValid(n,r,a))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=n,this._month=r,this._day=a,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(n,r){return this._calendar.add(this,n,r)},set:function(n,r){return this._calendar.set(this,n,r)},compareTo:function(n){if(this._calendar.name!==n._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,n._calendar.local.name);var r=this._year!==n._year?this._year-n._year:this._month!==n._month?this.monthOfYear()-n.monthOfYear():this._day-n._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(n){return this._calendar.fromJD(n)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(n){return this._calendar.fromJSDate(n)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}p(l.prototype,{_validateLevel:0,newDate:function(n,r,a){return n==null?this.today():(n.year&&(this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=n.day(),r=n.month(),n=n.year()),new E(this,n,r,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(n,r){var a=this._validate(n,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(n,r){var a=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(n)+this.minMonth;return this._validate(n,a,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),a},daysInYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(n,r,a){return this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(n,r,a){return this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(n,this._add(n,r,a),r,a)},_add:function(n,r,a){if(this._validateLevel++,a==="d"||a==="w"){var o=n.toJD()+r*(a==="w"?this.daysInWeek():1),s=n.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=n.year()+(a==="y"?r:0),m=n.monthOfYear()+(a==="m"?r:0),s=n.day(),h=function(i){for(;mw-1+i.minMonth;)c++,m-=w,w=i.monthsInYear(c)};a==="y"?(n.month()!==this.fromMonthOfYear(c,m)&&(m=this.newDate(c,n.month(),this.minDay).monthOfYear()),m=Math.min(m,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m)))):a==="m"&&(h(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m))));var v=[c,this.fromMonthOfYear(c,m),s];return this._validateLevel--,v}catch(g){throw this._validateLevel--,g}},_correctAdd:function(n,r,a,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||n.year()>0!=r[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"]}[o],c=a<0?-1:1;r=this._add(n,a*s[0]+c*s[1],s[2])}return n.date(r[0],r[1],r[2])},set:function(n,r,a){this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=a==="y"?r:n.year(),s=a==="m"?r:n.month(),c=a==="d"?r:n.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),n.date(o,s,c)},isValid:function(n,r,a){this._validateLevel++;var o=this.hasYearZero||n!==0;if(o){var s=this.newDate(n,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),g=s-(v>2.5?4716:4715);return g<=0&&g--,this.newDate(g,v,h)},toJSDate:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.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(n){return this.newDate(n.getFullYear(),n.getMonth()+1,n.getDate())}});var t=V.exports=new b;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),MH=ze({"node_modules/world-calendars/dist/plus.js"(){var J=Vc(),V=th();J(V.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"}),V.local=V.regionalOptions[""],J(V.cdate.prototype,{formatDate:function(p,b){return typeof p!="string"&&(b=p,p=""),this._calendar.formatDate(p||"",this,b)}}),J(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.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(p,b,E){if(typeof p!="string"&&(E=b,b=p,p=""),!b)return"";if(b.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;p=p||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,n=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,a=function(M,C){for(var _=1;S+_1},o=function(M,C,_,T){var f=""+C;if(a(M,T))for(;f.length<_;)f="0"+f;return f},s=function(M,C,_,T){return a(M)?T[C]:_[C]},c=this,m=function(M){return typeof e=="function"?e.call(c,M,a("m")):g(o("m",M.month(),2))},h=function(M,C){return C?typeof n=="function"?n.call(c,M):n[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},v=this.local.digits,g=function(M){return E.localNumbers&&v?v(M):M},i="",w=!1,S=0;S1},w=function(z,I){var O=i(z,I),D=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+D+"}"),F=b.substring(f).match(B);if(!F)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof n=="function"){i("m");var z=n.call(S,b.substring(f));return f+=z.length,z}return w("m")},C=function(z,I,O,D){for(var B=i(z,D)?O:I,F=0;F-1){c=1,m=h;for(var x=this.daysInMonth(s,c);m>x;x=this.daysInMonth(s,c))c++,m-=x}return o>-1?this.fromJD(o):this.newDate(s,c,m)},determineDate:function(p,b,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(n){try{return e.parseDate(k,n,l)}catch{}n=n.toLowerCase();for(var r=(n.match(/^c/)&&E?E.newDate():null)||e.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=a.exec(n);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=a.exec(n);return r};return b=b?b.newDate():null,p=p==null?b:typeof p=="string"?t(p):typeof p=="number"?isNaN(p)||p===1/0||p===-1/0?b:e.today().add(p,"d"):e.newDate(p),p}})}}),SH=ze({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=th(),V=Vc(),p=J.instance();function b(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var m=this._validateYear(o),h=o.month(),v=""+this.toChineseMonth(m,h);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(m,h)&&(v+="i"),v},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),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"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),m;if(isNaN(c))s[0]==="\u95F0"&&(m=!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 h=s[s.length-1];m=h==="i"||h==="I"}var v=this.toMonthIndex(o,c,m);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(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var m=this.intercalaryMonth(o),h=c&&s!==m;if(h||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return m?!c&&s<=m?v=s-1:v=s:v=s-1,v},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),m=c?12:11;if(s<0||s>m)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var m=this._validateYear(o,J.local.invalidyear),h=n[m-n[0]],v=h>>9&4095,g=h>>5&15,i=h&31,w;w=p.newDate(v,g,i),w.add(4-(w.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-w.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],m=c>>13,h=m?12:11;if(s>h)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=c&1<<12-s?30:29;return v},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var m=this._validate(o,v,c,J.local.invalidDate);o=this._validateYear(m.year()),s=m.month(),c=m.day();var h=this.isIntercalaryMonth(o,s),v=this.toChineseMonth(o,s),g=a(o,v,c,h);return p.toJD(g.year,g.month,g.day)},fromJD:function(o){var s=p.fromJD(o),c=r(s.year(),s.month(),s.day()),m=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,m,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),m=+s[2],h=!!s[3],v=this.toMonthIndex(c,m,h),g=+s[4];return this.newDate(c,v,g)},add:function(o,s,c){var m=o.year(),h=o.month(),v=this.isIntercalaryMonth(m,h),g=this.toChineseMonth(m,h),i=Object.getPrototypeOf(b.prototype).add.call(this,o,s,c);if(c==="y"){var w=i.year(),S=i.month(),M=this.isIntercalaryMonth(w,g),C=v&&M?this.toMonthIndex(w,g,!0):this.toMonthIndex(w,g,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=b;var t=[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],n=[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 r(o,s,c,m){var h,v;if(typeof o=="object")h=o,v=s||{};else{var g=typeof o=="number"&&o>=1888&&o<=2111;if(!g)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=31;if(!w)throw new Error("Solar day outside range 1 - 31");h={year:o,month:s,day:c},v=m||{}}var S=n[h.year-n[0]],M=h.year<<9|h.month<<5|h.day;v.year=M>=S?h.year:h.year-1,S=n[v.year-n[0]];var C=S>>9&4095,_=S>>5&15,T=S&31,f,u=new Date(C,_-1,T),A=new Date(h.year,h.month-1,h.day);f=Math.round((A-u)/(24*3600*1e3));var x=t[v.year-t[0]],z;for(z=0;z<13;z++){var I=x&1<<12-z?30:29;if(f>13;return!O||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var w=typeof s=="number"&&s>=1&&s<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof m=="object"?(M=!1,v=m):(M=!!m,v=h||{}),g={year:o,month:s,day:c,isIntercalary:M}}var C;C=g.day-1;var _=t[g.year-t[0]],T=_>>13,f;T&&(g.month>T||g.isIntercalary)?f=g.month:f=g.month-1;for(var u=0;u>9&4095,I=x>>5&15,O=x&31,D=new Date(z,I-1,O+C);return v.year=D.getFullYear(),v.month=1+D.getMonth(),v.day=D.getDate(),v}}}),EH=ze({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=p}}),kH=ze({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:b[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var b={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=p}}),CH=ze({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=p}}),LH=ze({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,b(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&b(this.daysInYear(E),10)===5?30:k===9&&b(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,n=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)n+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function b(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=p}}),PH=ze({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==5},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b=b<=0?b+1:b,k+Math.ceil(29.5*(E-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var E=Math.floor((30*(b-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((b-29-this.toJD(E,1,1))/29.5)+1),l=b-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=p}}),RH=ze({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b<0&&b++,E<=2&&(b--,E+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(b){var E=Math.floor(b+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),n=t-Math.floor(t<14?1:13),r=l-Math.floor(n>2?4716:4715),a=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,n,a)}}),J.calendars.julian=p}}),IH=ze({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=th(),V=Vc();function p(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),n=t.toJD(),r=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=b(k+8+17*20,365);return[Math.floor(l/20)+1,b(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function b(k,l){return k-l*Math.floor(k/l)}function E(k,l){return b(k-1,l)+1}J.calendars.mayan=p}}),DH=ze({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar;var b=J.instance("gregorian");V(p.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return b.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var n=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=p}}),FH=ze({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);if(b=E.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[b][l];return k},daysInMonth:function(b,E){return b.year&&(E=b.month(),b=b.year()),this._validate(b,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[b][E]},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);b=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,n=E,r=b;this._createMissingCalendarData(b);var a=b-(n>9||n===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,n--);n!==9;)n<=0&&(n=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][n],n--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(a))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(a,1,1).add(t,"d").toJD()},fromJD:function(b){var E=J.instance(),k=E.fromJD(b),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var n=9,r=this.NEPALI_CALENDAR_DATA[t][0],a=this.NEPALI_CALENDAR_DATA[t][n]-r+1;e>a;)n++,n>12&&(n=1,t++),a+=this.NEPALI_CALENDAR_DATA[t][n];var o=this.NEPALI_CALENDAR_DATA[t][n]-(a-e);return this.newDate(t,n,o)},_createMissingCalendarData:function(b){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=b-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],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]}}),J.calendars.nepali=p}}),zH=ze({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function b(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),n=e-Math.floor(e),r=t-Math.floor(t);return n>r}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return b(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var n=1;n0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,b(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),n=E-this.toJD(l,t,1)+1;return this.newDate(l,t,n)}}),J.calendars.persian=p,J.calendars.jalali=p}}),BH=ze({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=b}}),OH=ze({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=b}}),NH=ze({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,n=0;ne)return b[t]-b[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,n=e.day()+b[t-1]-1;return n+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,n=Math.floor((t-1)/12),r=n+1,a=t-12*n,o=k-b[l-1]+1;return this.newDate(r,a,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=p;var b=[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]}}),jH=ze({"src/components/calendars/calendars.js"(J,V){"use strict";V.exports=th(),MH(),SH(),EH(),kH(),CH(),LH(),PH(),RH(),IH(),DH(),FH(),zH(),BH(),OH(),NH()}}),UH=ze({"src/components/calendars/index.js"(J,V){"use strict";var p=jH(),b=Nr(),E=No(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:b.sortObjectKeys(p.calendars),editType:"calc",dflt:"gregorian"},t=function(_,T,f,u){var A={};return A[f]=e,b.coerce(_,T,A,f,u)},n=function(_,T,f,u){for(var A=0;A0){if(++ye>=n$)return arguments[0]}else ye=0;return oe.apply(void 0,arguments)}}var qy=s$;var l$=qy(Fy),Vy=l$;var u$=/\{\n\/\* \[wrapped with (.+)\] \*/,c$=/,? & /;function f$(oe){var ye=oe.match(u$);return ye?ye[1].split(c$):[]}var zE=f$;var h$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function d$(oe,ye){var Fe=ye.length;if(!Fe)return oe;var dt=Fe-1;return ye[dt]=(Fe>1?"& ":"")+ye[dt],ye=ye.join(Fe>2?", ":" "),oe.replace(h$,`{ +${je.shaderPreludeCode.vertexSource}`,define:je.shaderDefine},defaultProjectionData:ut},Dt=Re.renderingMode?Re.renderingMode:"2d";if(pe.renderPass==="offscreen"){let Gt=Re.prerender;Gt&&(pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),Gt.call(Re,be.gl,ft),be.setDirty(),pe.setBaseState())}else if(pe.renderPass==="translucent"){pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),be.setStencilMode(Xi.disabled);let Gt=Dt==="3d"?pe.getDepthModeFor3D():pe.getDepthModeForSublayer(0,Vi.ReadOnly);be.setDepthMode(Gt),Re.render(be.gl,ft),be.setDirty(),pe.setBaseState(),be.bindFramebuffer.set(null)}},debug:function(pe,y,N){for(let ie of N)Kl(pe,y,ie)},debugPadding:function(pe){let y=pe.transform.padding;js(pe,pe.transform.height-(y.top||0),3,Es),js(pe,y.bottom||0,3,ns),Cl(pe,y.left||0,3,Kn),Cl(pe,pe.transform.width-(y.right||0),3,zo);let N=pe.transform.centerPoint;(function(ie,fe,be,Re){zl(ie,fe-1,be-10,2,20,Re),zl(ie,fe-10,be-1,20,2,Re)})(pe,N.x,pe.transform.height-N.y,gs)},terrainDepth:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.tileManager.getRenderableTiles(),Ze=pe.useProgram("terrainDepth");N.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1});for(let ut of je){let ft=y.getTerrainMesh(ut.tileID),Dt=y.getTerrainData(ut.tileID),Gt=fe.getProjectionData({overscaledTileID:ut.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Kt={u_ele_delta:y.getMeshFrameDelta(fe.zoom)};Ze.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Dt,Gt,"terrain",ft.vertexBuffer,ft.indexBuffer,ft.segments)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])},terrainCoords:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.getCoordsTexture(),Ze=y.tileManager.getRenderableTiles(),ut=pe.useProgram("terrainCoords");N.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ft of Ze){let Dt=y.getTerrainMesh(ft.tileID),Gt=y.getTerrainData(ft.tileID);N.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,je.texture);let Kt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(fe.zoom)},st=fe.getProjectionData({overscaledTileID:ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ut.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Gt,st,"terrain",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments),y.coordsIndex.push(ft.tileID.key)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])}};class Su{constructor(y,N){this.drawFunctions=Hu,this.context=new tr(y),this.transform=N,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Di}resize(y,N,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(N*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let fe of this.style._order)this.style._layers[fe].resize()}setup(){let y=this.context,N=new e.aU;N.emplaceBack(0,0),N.emplaceBack(e.a6,0),N.emplaceBack(0,e.a6),N.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(N,eo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,eo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let fe=new e.ch;fe.emplaceBack(0,0,0,0),fe.emplaceBack(e.a6,0,e.a6,0),fe.emplaceBack(0,e.a6,0,e.a6),fe.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(fe,bc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let be=new e.aU;be.emplaceBack(0,0),be.emplaceBack(e.a6,0),be.emplaceBack(0,e.a6),be.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(be,eo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(Re,eo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let je=new e.ci;je.emplaceBack(0),je.emplaceBack(1),je.emplaceBack(3),je.emplaceBack(2),je.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(je);let Ze=new e.aW;Ze.emplaceBack(1,0,2),Ze.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Xi({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO),this.tileExtentMesh=new Xn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,N=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[N.drawingBufferWidth,N.drawingBufferHeight,0]);let fe={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,N.TRIANGLES,Vi.disabled,this.stencilClearMode,to.disabled,pi.disabled,null,null,fe,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,N,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!N?.length)return;this.currentStencilSource=y.source,this.nextStencilID+N.length>256&&this.clearStencil();let fe=this.context;fe.setColorMode(to.disabled),fe.setDepthMode(Vi.disabled);let be={};for(let Re of N)be[Re.key]=this.nextStencilID++;this._renderTileMasks(be,N,ie,!0),this._renderTileMasks(be,N,ie,!1),this._tileClippingMaskIDs=be}_renderTileMasks(y,N,ie,fe){var be;let Re=this.context,je=Re.gl,Ze=this.style.projection,ut=this.transform,ft=this.useProgram("clippingMask");for(let Dt of N){let Gt=y[Dt.key],Kt=(be=this.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Dt),st=Ze.getMeshFromTileID(this.context,Dt.canonical,fe,!0,"stencil"),It=ut.getProjectionData({overscaledTileID:Dt,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ft.draw(Re,je.TRIANGLES,Vi.disabled,new Xi({func:je.ALWAYS,mask:0},Gt,255,je.KEEP,je.KEEP,je.REPLACE),to.disabled,ie?pi.disabled:pi.backCCW,null,Kt,It,"$clipping",st.vertexBuffer,st.indexBuffer,st.segments)}}_renderTilesDepthBuffer(){var y;let N=this.context,ie=N.gl,fe=this.style.projection,be=this.transform,Re=this.useProgram("depth"),je=this.getDepthModeFor3D(),Ze=Je(be,{tileSize:be.tileSize});for(let ut of Ze){let ft=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(ut),Dt=fe.getMeshFromTileID(this.context,ut.canonical,!0,!0,"raster"),Gt=be.getProjectionData({overscaledTileID:ut,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(N,ie.TRIANGLES,je,Xi.disabled,to.disabled,pi.backCCW,null,ft,Gt,"$clipping",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,N=this.context.gl;return new Xi({func:N.NOTEQUAL,mask:255},y,255,N.KEEP,N.KEEP,N.REPLACE)}stencilModeForClipping(y){let N=this.context.gl;return new Xi({func:N.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,N.KEEP,N.KEEP,N.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let N=this.context.gl,ie=y.sort((Re,je)=>je.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(be>1){this.currentStencilSource=void 0,this.nextStencilID+be>256&&this.clearStencil();let Re={};for(let je=0;jeje.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(this.clearStencil(),be>1){let Re={},je={};for(let Ze=0;Ze0};for(let Kt in je){let st=je[Kt];st.used&&st.prepare(this.context),Ze[Kt]=st.getVisibleCoordinates(!1),ut[Kt]=Ze[Kt].slice().reverse(),ft[Kt]=st.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Kt=0;Ktthis.useProgram(Kt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:N.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=N.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){let Kt=this.style._layers[Re[this.currentLayer]],st=je[Kt.source],It=Ze[Kt.source];this._renderTileClippingMasks(Kt,It,!1),this.renderLayer(this,st,Kt,It,Dt)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayervr.source&&!vr.isHidden(It)?[st.tileManagers[vr.source]]:[]),dr=ir.filter(vr=>vr.getSource().type==="vector"),Ar=ir.filter(vr=>vr.getSource().type!=="vector"),hr=vr=>{(!Ut||Ut.getSource().maxzoom0?N.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let N=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!N||!ie}useProgram(y,N,ie=!1,fe=[]){var be;this.cache||(this.cache={});let Re=!!this.style.map.terrain,je=this.style.projection,Ze=ie?Ai.projectionMercator:je.shaderPreludeCode,ut=ie?gi:je.shaderDefine,ft=y+(N?N.cacheKey:"")+`/${ie?qi:je.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(Re?"/terrain":"")+(fe?`/${fe.join("/")}`:"");return(be=this.cache)[ft]||(be[ft]=new ah(this.context,Ai[y],N,qf[y],this._showOverdrawInspector,Re,Ze,ut,fe)),this.cache[ft]}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 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)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,N;if(this._tileTextures){for(let ie in this._tileTextures){let fe=this._tileTextures[ie];if(fe)for(let be of fe)be.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((N=this.tileExtentMesh.indexBuffer)===null||N===void 0||N.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let fe=this.cache[ie];fe?.program&&this.context.gl.deleteProgram(fe.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:N}=this.context.gl;return this.width!==y||this.height!==N}}function mc(pe,y){let N,ie=!1,fe=null,be=()=>{fe=null,ie&&(pe(...N),fe=setTimeout(be,y),ie=!1)};return(...Re)=>(ie=!0,N=Re,fe||be(),fe)}Su.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Jc{constructor(y){this._getCurrentHash=()=>{let N=window.location.hash.replace("#","");if(this._hashName){let ie,fe=N.split("&").map(be=>be.split("="));for(let be of fe)be[0]===this._hashName&&(ie=be);return(ie&&ie[1]||"").split("/")}return N.split("/")},this._onHashChange=()=>{let N=this._getCurrentHash();if(!this._isValidHash(N))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(N[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+N[2],+N[1]],zoom:+N[0],bearing:ie,pitch:+(N[4]||0)}),!0},this._updateHashUnthrottled=()=>{let N=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,N)},this._removeHash=()=>{let N=this._getCurrentHash();if(N.length===0)return;let ie=N.join("/"),fe=ie;fe.split("&").length>0&&(fe=fe.split("&")[0]),this._hashName&&(fe=`${this._hashName}=${ie}`);let be=window.location.hash.replace(fe,"");be.startsWith("#&")?be=be.slice(0,1)+be.slice(2):be==="#"&&(be="");let Re=window.location.href.replace(/(#.+)?$/,be);Re=Re.replace("&&","&"),window.history.replaceState(window.history.state,null,Re)},this._updateHash=mc(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,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(y){let N=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,fe=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),be=Math.pow(10,fe),Re=Math.round(N.lng*be)/be,je=Math.round(N.lat*be)/be,Ze=this._map.getBearing(),ut=this._map.getPitch(),ft="";if(ft+=y?`/${Re}/${je}/${ie}`:`${ie}/${je}/${Re}`,(Ze||ut)&&(ft+="/"+Math.round(10*Ze)/10),ut&&(ft+=`/${Math.round(ut)}`),this._hashName){let Dt=this._hashName,Gt=!1,Kt=window.location.hash.slice(1).split("&").map(st=>{let It=st.split("=")[0];return It===Dt?(Gt=!0,`${It}=${ft}`):st}).filter(st=>st);return Gt||Kt.push(`${Dt}=${ft}`),`#${Kt.join("&")}`}return`#${ft}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let N=+y[0],ie=+(y[3]||0),fe=+(y[4]||0);return N>=this._map.getMinZoom()&&N<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&fe>=this._map.getMinPitch()&&fe<=this._map.getMaxPitch()}}let oc={linearity:.3,easing:e.cv(0,0,.3,1)},du=e.e({deceleration:2500,maxSpeed:1400},oc),Jl=e.e({deceleration:20,maxSpeed:1400},oc),Ql=e.e({deceleration:1e3,maxSpeed:360},oc),Eu=e.e({deceleration:1e3,maxSpeed:90},oc),bf=e.e({deceleration:1e3,maxSpeed:360},oc);class lh{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:m(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,N=m();for(;y.length>0&&N-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let N={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:be}of this._inertiaBuffer)N.zoom+=be.zoomDelta||0,N.bearing+=be.bearingDelta||0,N.pitch+=be.pitchDelta||0,N.roll+=be.rollDelta||0,be.panDelta&&N.pan._add(be.panDelta),be.around&&(N.around=be.around),be.pinchAround&&(N.pinchAround=be.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,fe={};if(N.pan.mag()){let be=Ks(N.pan.mag(),ie,e.e({},du,y||{})),Re=N.pan.mult(be.amount/N.pan.mag()),je=this._map.cameraHelper.handlePanInertia(Re,this._map.transform);fe.center=je.easingCenter,fe.offset=je.easingOffset,Pc(fe,be)}if(N.zoom){let be=Ks(N.zoom,ie,Jl);fe.zoom=e.cw(this._map.transform.zoom+be.amount,this._map.getZoomSnap(),be.amount),Pc(fe,be)}if(N.bearing){let be=Ks(N.bearing,ie,Ql);fe.bearing=this._map.transform.bearing+e.al(be.amount,-179,179),Pc(fe,be)}if(N.pitch){let be=Ks(N.pitch,ie,Eu);fe.pitch=this._map.transform.pitch+be.amount,Pc(fe,be)}if(N.roll){let be=Ks(N.roll,ie,bf);fe.roll=this._map.transform.roll+e.al(be.amount,-179,179),Pc(fe,be)}if(fe.zoom||fe.bearing){let be=N.pinchAround===void 0?N.around:N.pinchAround;fe.around=be?this._map.unproject(be):this._map.getCenter()}return this.clear(),e.e(fe,{noMoveStart:!0})}}function Pc(pe,y){(!pe.duration||pe.durationN.unproject(Ze)),je=be.reduce((Ze,ut,ft,Dt)=>Ze.add(ut.div(Dt.length)),new e.P(0,0));super(y,{points:be,point:je,lngLats:Re,lngLat:N.unproject(je),originalEvent:ie}),this._defaultPrevented=!1}}class wf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,N,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class Qc{constructor(y,N){this._map=y,this._clickTolerance=N.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new wf(y.type,this._map,y))}mousedown(y,N){return this._mousedownPos=N,this._firePreventable(new Bl(y.type,this._map,y))}mouseup(y){this._map.fire(new Bl(y.type,this._map,y))}click(y,N){this._mousedownPos&&this._mousedownPos.dist(N)>=this._clickTolerance||this._map.fire(new Bl(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Bl(y.type,this._map,y))}mouseover(y){this._map.fire(new Bl(y.type,this._map,y))}mouseout(y){this._map.fire(new Bl(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Wu(y.type,this._map,y))}touchmove(y){this._map.fire(new Wu(y.type,this._map,y))}touchend(y){this._map.fire(new Wu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Wu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ku{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Bl(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Bl(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ol{constructor(y){this._map=y}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(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Nl{constructor(y,N){this._map=y,this._tr=new Ol(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=N.clickTolerance||1,N.boxZoom&&typeof N.boxZoom=="object"&&(this._boxZoomEnd=N.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,N){this.isEnabled()&&y.shiftKey&&y.button===0&&(g.disableDrag(),this._startPos=this._lastPos=N,this._active=!0)}mousemoveWindow(y,N){if(!this._active)return;let ie=N;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)be.fitScreenCoordinates(ie,fe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),g.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,N){return this._map.fire(new e.n(y,{originalEvent:N}))}}function fi(pe,y){if(pe.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${pe.length}, points ${y.length}`);let N={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(fe){let be=new e.P(0,0);for(let Re of fe)be._add(Re);return be.div(fe.length)}(N),this.touches=fi(ie,N)))}touchmove(y,N,ie){if(this.aborted||!this.centroid)return;let fe=fi(ie,N);for(let be in this.touches){let Re=fe[be];(!Re||Re.dist(this.touches[be])>30)&&(this.aborted=!0)}}touchend(y,N,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let fe=!this.aborted&&this.centroid;if(this.reset(),fe)return fe}}}class $e{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,N,ie){this.singleTap.touchstart(y,N,ie)}touchmove(y,N,ie){this.singleTap.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this.singleTap.touchend(y,N,ie);if(fe){let be=y.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(fe)<30;if(be&&Re||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=fe,this.count===this.numTaps)return this.reset(),fe}}}class nt{constructor(y){this._tr=new Ol(y),this._zoomIn=new $e({numTouches:1,numTaps:2}),this._zoomOut=new $e({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,N,ie){this._zoomIn.touchstart(y,N,ie),this._zoomOut.touchstart(y,N,ie)}touchmove(y,N,ie){this._zoomIn.touchmove(y,N,ie),this._zoomOut.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this._zoomIn.touchend(y,N,ie),be=this._zoomOut.touchend(y,N,ie),Re=this._tr;return fe?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom+1,je.getZoomSnap()),around:Re.unproject(fe)},{originalEvent:y})}):be?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom-1,je.getZoomSnap()),around:Re.unproject(be)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let N=this._moveFunction(...y);if(N.bearingDelta||N.pitchDelta||N.rollDelta||N.around||N.panDelta)return this._active=!0,N}dragStart(y,N){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(N)?N[0]:N,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,N){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let fe=Array.isArray(N)?N[0]:N;return!this._moved&&fe.dist(ie)!0}),N=new Pr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=N}_executeRelevantHandler(y,N,ie){return y instanceof MouseEvent?N(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.startMove(N)},N=>{this.oneFingerTouchMoveStateManager.startMove(N)})}endMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.endMove(N)},N=>{this.oneFingerTouchMoveStateManager.endMove(N)})}isValidStartEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidStartEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidStartEvent(N))}isValidMoveEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidMoveEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(N))}isValidEndEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidEndEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidEndEvent(N))}}let kr=pe=>{pe.mousedown=pe.dragStart,pe.mousemoveWindow=pe.dragMove,pe.mouseup=pe.dragEnd,pe.contextmenu=y=>{y.preventDefault()}};class jr{constructor(y,N){this._clickTolerance=y.clickTolerance||1,this._map=N,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,N,ie){return this._calculateTransform(y,N,ie)}touchmove(y,N,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,N,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,N,ie){this._calculateTransform(y,N,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,N,ie){ie.length>0&&(this._active=!0);let fe=fi(ie,N),be=new e.P(0,0),Re=new e.P(0,0),je=0;for(let ut in fe){let ft=fe[ut],Dt=this._touches[ut];Dt&&(be._add(ft),Re._add(ft.sub(Dt)),je++,fe[ut]=ft)}if(this._touches=fe,this._shouldBePrevented(je)||!Re.mag())return;let Ze=Re.div(je);return this._sum._add(Ze),this._sum.mag()Math.abs(pe.x)}class Si extends Jr{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,N,ie){super.touchstart(y,N,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,ii(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,N,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let fe=y[0].sub(this._lastPoints[0]),be=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(fe,be,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(fe.y+be.y)/2*-.5}):void 0}gestureBeginsVertically(y,N,ie){if(this._valid!==void 0)return this._valid;let fe=y.mag()>=2,be=N.mag()>=2;if(!fe&&!be)return;if(!fe||!be)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let Re=y.y>0==N.y>0;return ii(y)&&ii(N)&&Re}}let oi={panStep:100,bearingStep:15,pitchStep:10};class Ji{constructor(y){this._tr=new Ol(y);let N=oi;this._panStep=N.panStep,this._bearingStep=N.bearingStep,this._pitchStep=N.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let N=0,ie=0,fe=0,be=0,Re=0;switch(y.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),be=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),be=1);break;case 38:y.shiftKey?fe=1:(y.preventDefault(),Re=-1);break;case 40:y.shiftKey?fe=-1:(y.preventDefault(),Re=1);break;default:return}return this._rotationDisabled&&(ie=0,fe=0),{cameraAnimation:je=>{let Ze=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:Qi,zoom:N?e.cw(Ze.zoom+N*(y.shiftKey?2:1),je.getZoomSnap()):Ze.zoom,bearing:Ze.bearing+ie*this._bearingStep,pitch:Ze.pitch+fe*this._pitchStep,offset:[-be*this._panStep,-Re*this._panStep],center:Ze.center},{originalEvent:y})}}}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 Qi(pe){return pe*(2-pe)}let Oo=4.000244140625,Qo=1/450;class vo{constructor(y,N){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new Ol(y),this._triggerRenderFrame=N,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Qo}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let N=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=m(),fe=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,N!==0&&N%Oo==0?this._type="wheel":N!==0&&Math.abs(N)<4?this._type="trackpad":fe>400?(this._type=null,this._lastValue=N,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(fe*N)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,N+=this._lastValue)),y.shiftKey&&N&&(N/=4),this._type&&(this._lastWheelEvent=y,this._delta-=N,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let N=g.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):N,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let je=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=je),typeof this._targetZoom=="number"&&(this._targetZoom+=je)}if(this._delta!==0){let je=this._type==="wheel"&&Math.abs(this._delta)>Oo?this._wheelZoomRate:this._defaultZoomRate,Ze=2/(1+Math.exp(-Math.abs(this._delta*je)));this._delta<0&&Ze!==0&&(Ze=1/Ze);let ut=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ft=y.applyConstrain(y.getCameraLngLat(),e.ar(ut*Ze)).zoom,Dt=this._map.getZoomSnap();if(this._type==="wheel"&&Dt>0){let Gt=e.cw(y.zoom,Dt);this._targetZoom=e.cw(ft,Dt,ft-Gt)}else this._targetZoom=ft;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let N=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,fe=this._easing,be,Re=!1;if(this._type==="wheel"&&ie&&fe){let je=m()-this._lastWheelEventTime,Ze=Math.min((je+5)/200,1),ut=fe(Ze);be=e.H.number(ie,N,ut),Ze<1?this._needsRerender=!0:Re=!0}else be=N,Re=!0;return this._active=!0,Re&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=be,{noInertia:!0,needsRenderFrame:!Re,zoomDelta:be-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let N=e.cy;if(this._prevEase){let ie=this._prevEase,fe=(m()-ie.start)/ie.duration,be=ie.easing(fe+.01)-ie.easing(fe),Re=.27/Math.sqrt(be*be+1e-4)*.01,je=Math.sqrt(.0729-Re*Re);N=e.cv(Re,je,.25,1)}return this._prevEase={start:m(),duration:y,easing:N},N}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ys{constructor(y,N){this._clickZoom=y,this._tapZoom=N}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 ol{constructor(y){this._tr=new Ol(y),this.reset()}reset(){this._active=!1}dblclick(y,N){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(N)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class jl{constructor(){this._tap=new $e({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,N,ie){if(!this._swipePoint)if(this._tapTime){let fe=N[0],be=y.timeStamp-this._tapTime<500,Re=this._tapPoint.dist(fe)<30;be&&Re?ie.length>0&&(this._swipePoint=fe,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,N,ie)}touchmove(y,N,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let fe=N[0],be=fe.y-this._swipePoint.y;return this._swipePoint=fe,y.preventDefault(),this._active=!0,{zoomDelta:be/128*this._zoomRate}}}else this._tap.touchmove(y,N,ie)}touchend(y,N,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let fe=this._tap.touchend(y,N,ie);fe&&(this._tapTime=y.timeStamp,this._tapPoint=fe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hs{constructor(y,N,ie){this._el=y,this._mousePan=N,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},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 Cu{constructor(y,N,ie,fe){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=N,this._mousePitch=ie,this._mouseRoll=fe}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class hi{constructor(y,N,ie,fe){this._el=y,this._touchZoom=N,this._touchRotate=ie,this._tapDragZoom=fe,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),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()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class wi{constructor(y,N){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=N,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=g.create("div","maplibregl-cooperative-gesture-screen",y);let N=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(N=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),fe=document.createElement("div");fe.className="maplibregl-desktop-message",fe.textContent=N,this._container.appendChild(fe);let be=document.createElement("div");be.className="maplibregl-mobile-message",be.textContent=ie,this._container.appendChild(be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),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(y){return y[this._bypassKey]}notifyGestureBlocked(y,N){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:N})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let sl=pe=>pe.zoom||pe.drag||pe.roll||pe.pitch||pe.rotate;class sc extends e.n{}function tu(pe){var y;return((y=pe.panDelta)===null||y===void 0?void 0:y.mag())||pe.zoomDelta||pe.bearingDelta||pe.pitchDelta||pe.rollDelta}class Ps{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,N;return((N=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||N===void 0?void 0:N.defaultView)||window}constructor(y,N){this.handleWindowEvent=fe=>{this.handleEvent(fe,`${fe.type}Window`)},this.handleEvent=(fe,be)=>{if(fe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Re=fe.type==="renderFrame"?void 0:fe,je={needsRenderFrame:!1},Ze={},ut={};for(let{handlerName:Gt,handler:Kt,allowed:st}of this._handlers){if(!Kt.isEnabled())continue;let It;if(this._blockedByActive(ut,st,Gt))Kt.reset();else if(Kt[be||fe.type]){if(e.cz(fe,be||fe.type)){let Ut=g.mousePos(this._map.getCanvas(),fe);It=Kt[be||fe.type](fe,Ut)}else if(e.cA(fe,be||fe.type)){let Ut=this._getMapTouches(fe.touches),ir=g.touchPos(this._map.getCanvas(),Ut);It=Kt[be||fe.type](fe,ir,Ut)}else e.cB(be||fe.type)||(It=Kt[be||fe.type](fe));this.mergeHandlerResult(je,Ze,It,Gt,Re),It?.needsRenderFrame&&this._triggerRenderFrame()}(It||Kt.isActive())&&(ut[Gt]=Kt)}let ft={};for(let Gt in this._previousActiveHandlers)ut[Gt]||(ft[Gt]=Re);this._previousActiveHandlers=ut,(Object.keys(ft).length||tu(je))&&(this._changes.push([je,Ze,ft]),this._triggerRenderFrame()),(Object.keys(ut).length||tu(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Dt}=je;Dt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Dt(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lh(y),this._bearingSnap=N.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(N);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[fe,be,Re]of this._listeners)fe.addEventListener(be,fe===this._ownerDocument?this.handleWindowEvent:this.handleEvent,Re)}destroy(){for(let[y,N,ie]of this._listeners)y.removeEventListener(N,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let N=this._map,ie=N.getCanvasContainer();this._add("mapEvent",new Qc(N,y));let fe=N.boxZoom=new Nl(N,y);this._add("boxZoom",fe),y.interactive&&y.boxZoom&&fe.enable();let be=N.cooperativeGestures=new wi(N,y.cooperativeGestures);this._add("cooperativeGestures",be),y.cooperativeGestures&&be.enable();let Re=new nt(N),je=new ol(N);N.doubleClickZoom=new ys(je,Re),this._add("tapZoom",Re),this._add("clickZoom",je),y.interactive&&y.doubleClickZoom&&N.doubleClickZoom.enable();let Ze=new jl;this._add("tapDragZoom",Ze);let ut=N.touchPitch=new Si(N);this._add("touchPitch",ut),y.interactive&&y.touchPitch&&N.touchPitch.enable(y.touchPitch);let ft=()=>N.project(N.getCenter()),Dt=function({enable:hr,clickTolerance:vr,aroundCenter:Or=!0,minPixelCenterThreshold:Cr=100,rotateDegreesPerPixelMoved:ta=.8},ka){let Ta=new Wt({checkCorrectEvent:Ra=>Ra.button===0&&Ra.ctrlKey||Ra.button===2&&!Ra.ctrlKey});return new mt({clickTolerance:vr,move:(Ra,ua)=>{let ia=ka();if(Or&&Math.abs(ia.y-Ra.y)>Cr)return{bearingDelta:e.cx(new e.P(Ra.x,ua.y),ua,ia)};let ga=(ua.x-Ra.x)*ta;return Or&&ua.yta.button===0&&ta.ctrlKey||ta.button===2});return new mt({clickTolerance:vr,move:(ta,ka)=>({pitchDelta:(ka.y-ta.y)*Or}),moveStateManager:Cr,enable:hr,assignEvents:kr})}(y),Kt=function({enable:hr,clickTolerance:vr,rollDegreesPerPixelMoved:Or=.3},Cr){let ta=new Wt({checkCorrectEvent:ka=>ka.button===2&&ka.ctrlKey});return new mt({clickTolerance:vr,move:(ka,Ta)=>{let Ra=Cr(),ua=(Ta.x-ka.x)*Or;return Ta.yCr.button===0&&!Cr.ctrlKey});return new mt({clickTolerance:vr,move:(Cr,ta)=>({around:ta,panDelta:ta.sub(Cr)}),activateOnStart:!0,moveStateManager:Or,enable:hr,assignEvents:kr})}(y),It=new jr(y,N);N.dragPan=new Hs(ie,st,It),this._add("mousePan",st),this._add("touchPan",It,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&N.dragPan.enable(y.dragPan);let Ut=new Tn,ir=new Ba;N.touchZoomRotate=new hi(ie,ir,Ut,Ze),this._add("touchRotate",Ut,["touchPan","touchZoom"]),this._add("touchZoom",ir,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&N.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new ku(N));let dr=N.scrollZoom=new vo(N,()=>this._triggerRenderFrame());this._add("scrollZoom",dr,["mousePan"]),y.interactive&&y.scrollZoom&&N.scrollZoom.enable(y.scrollZoom);let Ar=N.keyboard=new Ji(N);this._add("keyboard",Ar),y.interactive&&y.keyboard&&N.keyboard.enable()}_add(y,N,ie){this._handlers.push({handlerName:y,handler:N,allowed:ie}),this._handlersById[y]=N}stop(y){if(!this._updatingCamera){for(let{handler:N}of this._handlers)N.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!sl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,N,ie){for(let fe in y)if(fe!==ie&&!N?.includes(fe))return!0;return!1}_getMapTouches(y){let N=[];for(let ie of y)this._el.contains(ie.target)&&N.push(ie);return N}mergeHandlerResult(y,N,ie,fe,be){if(!ie)return;e.e(y,ie);let Re={handlerName:fe,originalEvent:ie.originalEvent||be};ie.zoomDelta!==void 0&&(N.zoom=Re),ie.panDelta!==void 0&&(N.drag=Re),ie.rollDelta!==void 0&&(N.roll=Re),ie.pitchDelta!==void 0&&(N.pitch=Re),ie.bearingDelta!==void 0&&(N.rotate=Re)}_applyChanges(){let y={},N={},ie={};for(let[fe,be,Re]of this._changes)fe.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(fe.panDelta)),fe.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+fe.zoomDelta),fe.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+fe.bearingDelta),fe.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+fe.pitchDelta),fe.rollDelta&&(y.rollDelta=(y.rollDelta||0)+fe.rollDelta),fe.around!==void 0&&(y.around=fe.around),fe.pinchAround!==void 0&&(y.pinchAround=fe.pinchAround),fe.noInertia&&(y.noInertia=fe.noInertia),e.e(N,be),e.e(ie,Re);this._updateMapTransform(y,N,ie),this._changes=[]}_updateMapTransform(y,N,ie){let fe=this._map,be=fe._getTransformForUpdate(),Re=fe.terrain;if(!(tu(y)||Re&&this._terrainMovement))return void this._fireEvents(N,ie,!0);fe._stop(!0);let{panDelta:je,zoomDelta:Ze,bearingDelta:ut,pitchDelta:ft,rollDelta:Dt,around:Gt,pinchAround:Kt}=y;Kt!==void 0&&(Gt=Kt),Gt||(Gt=fe.transform.centerPoint),Re&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let st={panDelta:je,zoomDelta:Ze,rollDelta:Dt,pitchDelta:ft,bearingDelta:ut,around:Gt};this._map.cameraHelper.useGlobeControls&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let It=Gt.distSqr(be.centerPoint)<.01?be.center:be.screenPointToLocation(je?Gt.sub(je):Gt);this._handleMapControls({terrain:Re,tr:be,deltasForHelper:st,preZoomAroundLoc:It,combinedEventsInProgress:N,panDelta:je}),fe._applyUpdatedTransform(be),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(N,ie,!0)}_handleMapControls({terrain:y,tr:N,deltasForHelper:ie,preZoomAroundLoc:fe,combinedEventsInProgress:be,panDelta:Re}){let je=this._map.cameraHelper;if(je.handleMapControlsRollPitchBearingZoom(ie,N),y)return je.useGlobeControls?(this._terrainMovement||!be.drag&&!be.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void je.handleMapControlsPan(ie,N,fe)):this._terrainMovement||!be.drag&&!be.zoom?void(be.drag&&this._terrainMovement&&Re?N.setCenter(N.screenPointToLocation(N.centerPoint.sub(Re))):je.handleMapControlsPan(ie,N,fe)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void je.handleMapControlsPan(ie,N,fe));je.handleMapControlsPan(ie,N,fe)}_fireEvents(y,N,ie){let fe=sl(this._eventsInProgress),be=sl(y),Re={};for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._eventsInProgress[Dt]||(Re[`${Dt}start`]=Gt),this._eventsInProgress[Dt]=y[Dt]}!fe&&be&&this._fireEvent("movestart",be.originalEvent);for(let Dt in Re)this._fireEvent(Dt,Re[Dt]);be&&this._fireEvent("move",be.originalEvent);for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._fireEvent(Dt,Gt)}let je={},Ze;for(let Dt in this._eventsInProgress){let{handlerName:Gt,originalEvent:Kt}=this._eventsInProgress[Dt];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Dt],Ze=N[Gt]||Kt,je[`${Dt}end`]=Ze)}for(let Dt in je)this._fireEvent(Dt,je[Dt]);let ut=sl(this._eventsInProgress),ft=(fe||be)&&!ut;if(ft&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Dt=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Dt.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Dt)}if(ie&&ft){this._updatingCamera=!0;let Dt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Kt=>Kt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new sc("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class gc extends e.E{constructor(y,N,ie){super(),this._renderFrameCallback=()=>{let fe=Math.min((m()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(fe)),fe<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=N,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,N){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=N}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,N){return this.jumpTo({center:y},N)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,N){return this.jumpTo({elevation:y},N),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,N,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},N),ie)}panTo(y,N,ie){return this.easeTo(e.e({center:y},N),ie)}getZoom(){return this.transform.zoom}setZoom(y,N){return this.jumpTo({zoom:y},N),this}zoomTo(y,N,ie){return this.easeTo(e.e({zoom:y},N),ie)}zoomIn(y,N){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,N),this}zoomOut(y,N){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,N),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,N){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",N)).fire(new e.n("move",N)).fire(new e.n("moveend",N))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,N){return this.jumpTo({bearing:y},N),this}getPadding(){return this.transform.padding}setPadding(y,N){return this.jumpTo({padding:y},N),this}rotateTo(y,N,ie){return this.easeTo(e.e({bearing:y},N),ie)}resetNorth(y,N){return this.rotateTo(0,e.e({duration:1e3},y),N),this}resetNorthPitch(y,N){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),N),this}snapToNorth(y,N){return Math.abs(this.getBearing()){It.easeFunc(Ut),this.terrain&&!y.freezeElevation&&this._updateElevation(Ut),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},Ut=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N,Ut)},y),this}_prepareEase(y,N,ie={}){this._moving=!0,N||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let N=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&N!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(N-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=N}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let N=y.getCameraLngLat(),ie=y.getCameraAltitude(),fe=this.terrain?this.terrain.getElevationForLngLatZoom(N,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(fe)),this.transformCameraUpdate&&N.push(fe=>this.transformCameraUpdate(fe)),!N.length)return;let ie=y.clone();for(let fe of N){let be=ie.clone(),{center:Re,zoom:je,roll:Ze,pitch:ut,bearing:ft,elevation:Dt}=fe(be);Re&&be.setCenter(Re),Dt!==void 0&&be.setElevation(Dt),je!==void 0&&be.setZoom(je),Ze!==void 0&&be.setRoll(Ze),ut!==void 0&&be.setPitch(ut),ft!==void 0&&be.setBearing(ft),ie.apply(be,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,N){if(this._easeId&&N&&this._easeId===N)return;delete this._easeId;let ie=this._zooming,fe=this._rotating,be=this._pitching,Re=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),fe&&this.fire(new e.n("rotateend",y)),be&&this.fire(new e.n("pitchend",y)),Re&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,N){if(!y.essential&&s.prefersReducedMotion){let ua=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(ua,N)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),fe=ie.bearing,be=ie.pitch,Re=ie.roll,je=ie.padding,Ze="bearing"in y?this._normalizeBearing(y.bearing,fe):fe,ut="pitch"in y?+y.pitch:be,ft="roll"in y?this._normalizeBearing(y.roll,Re):Re,Dt="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Kt=ie.centerPoint.add(Gt),st=ie.screenPointToLocation(Kt),It=this.cameraHelper.handleFlyTo(ie,{bearing:Ze,pitch:ut,roll:ft,padding:Dt,locationAtOffset:st,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),Ut=y.curve,ir=Math.max(ie.width,ie.height),dr=ir/It.scaleOfZoom,Ar=It.pixelPathLength;typeof It.scaleOfMinZoom=="number"&&(Ut=Math.sqrt(ir/It.scaleOfMinZoom/Ar*2));let hr=Ut*Ut;function vr(ua){let ia=(dr*dr-ir*ir+(ua?-1:1)*hr*hr*Ar*Ar)/(2*(ua?dr:ir)*hr*Ar);return Math.log(Math.sqrt(ia*ia+1)-ia)}function Or(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function Cr(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let ta=vr(!1),ka=function(ua){return Cr(ta)/Cr(ta+Ut*ua)},Ta=function(ua){return ir*((Cr(ta)*(Or(ia=ta+Ut*ua)/Cr(ia))-Or(ta))/hr)/Ar;var ia},Ra=(vr(!0)-ta)/Ut;if(Math.abs(Ar)<2e-6||!isFinite(Ra)){if(Math.abs(ir-dr)<1e-6)return this.easeTo(y,N);let ua=dr0,ka=ia=>Math.exp(ua*Ut*ia)}return y.duration="duration"in y?+y.duration:1e3*Ra/("screenSpeed"in y?+y.screenSpeed/Ut:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=fe!==Ze,this._pitching=ut!==be,this._rolling=ft!==Re,this._padding=!ie.isPaddingEqual(Dt),this._prepareEase(N,!1),this.terrain&&this._prepareElevation(It.targetCenter),this._ease(ua=>{let ia=ua*Ra,ga=1/ka(ia),da=Ta(ia);this._rotating&&ie.setBearing(e.H.number(fe,Ze,ua)),this._pitching&&ie.setPitch(e.H.number(be,ut,ua)),this._rolling&&ie.setRoll(e.H.number(Re,ft,ua)),this._padding&&(ie.interpolatePadding(je,Dt,ua),Kt=ie.centerPoint.add(Gt)),It.easeFunc(ua,ga,da,Kt),this.terrain&&!y.freezeElevation&&this._updateElevation(ua),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,N){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let fe=this._onEaseEnd;delete this._onEaseEnd,fe.call(this,N)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,N,ie){ie.animate===!1||ie.duration===0?(y(1),N()):(this._easeStart=m(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=N,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,N){y=e.X(y,-180,180);let ie=Math.abs(y-N);return Math.abs(y-360-N)MapLibre
'};class ll{constructor(y=pu){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=N=>{!N||N.sourceDataType!=="metadata"&&N.sourceDataType!=="visibility"&&N.dataType!=="style"&&N.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=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=g.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=g.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=g.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(){this._container.remove(),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(y,N){let ie=this._map._getUIString(`AttributionControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(fe=>typeof fe!="string"?"":fe)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let fe=this._map.style.stylesheet;this.styleOwner=fe.owner,this.styleId=fe.id}let N=this._map.style.tileManagers;for(let fe in N){let be=N[fe];if(be.used||be.usedForTerrain){let Re=be.getSource();Re.attribution&&!y.includes(Re.attribution)&&y.push(Re.attribution)}}y=y.filter(fe=>String(fe).trim()),y.sort((fe,be)=>fe.length-be.length),y=y.filter((fe,be)=>{for(let Re=be+1;Re{let N=this._container.children;if(N.length){let ie=N[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var N;this._map=y,this._compact=(N=this.options)===null||N===void 0?void 0:N.compact,this._container=g.create("div","maplibregl-ctrl");let ie=g.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class de{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let N=++this._id;return this._queue.push({callback:y,id:N,cancelled:!1}),N}remove(y){let N=this._currentlyRunning,ie=N?this._queue.concat(N):this._queue;for(let fe of ie)if(fe.id===y)return void(fe.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let N=this._currentlyRunning=this._queue;this._queue=[];for(let ie of N)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ee=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class qe extends e.E{constructor(y){super(),this._lastTilesetChange=m(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,N){this.tileManager.update(y,N),this._renderableTilesKeys=[];let ie={};for(let fe of Je(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:N,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[fe.key]=!0,this._renderableTilesKeys.push(fe.key),this._tiles[fe.key]||(fe.terrainRttPosMatrix32f=new Float64Array(16),e.c7(fe.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[fe.key]=new Tt(fe,this.tileSize),this._lastTilesetChange=m());for(let fe in this._tiles)ie[fe]||delete this._tiles[fe]}freeRtt(y){for(let N in this._tiles){let ie=this._tiles[N];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,N){return N?this._getTerrainCoordsForTileRanges(y,N):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let N={};for(let ie of this._renderableTilesKeys){let fe=this._tiles[ie].tileID,be=y.clone(),Re=e.bj();if(fe.canonical.equals(y.canonical))e.c7(Re,0,e.a6,e.a6,0,0,1);else if(fe.canonical.isChildOf(y.canonical)){let je=fe.canonical.z-y.canonical.z,Ze=fe.canonical.x-(fe.canonical.x>>je<>je<>je;e.c7(Re,0,ft,ft,0,0,1),e.Q(Re,Re,[-Ze*ft,-ut*ft,0])}else{if(!y.canonical.isChildOf(fe.canonical))continue;{let je=y.canonical.z-fe.canonical.z,Ze=y.canonical.x-(y.canonical.x>>je<>je<>je;e.c7(Re,0,e.a6,e.a6,0,0,1),e.Q(Re,Re,[Ze*ft,ut*ft,0]),e.S(Re,Re,[1/2**je,1/2**je,0])}}be.terrainRttPosMatrix32f=new Float32Array(Re),N[ie]=be}return N}_getTerrainCoordsForTileRanges(y,N){let ie={};for(let fe of this._renderableTilesKeys){let be=this._tiles[fe].tileID;if(!this._isWithinTileRanges(be,N))continue;let Re=y.clone(),je=e.bj();if(be.canonical.z===y.canonical.z){let Ze=y.canonical.x-be.canonical.x+y.wrap*(1<y.canonical.z){let Ze=be.canonical.z-y.canonical.z,ut=be.canonical.x-(be.canonical.x>>Ze<>Ze<>Ze),Gt=y.canonical.y-(be.canonical.y>>Ze),Kt=e.a6>>Ze;e.c7(je,0,Kt,Kt,0,0,1),e.Q(je,je,[-ut*Kt+Dt*e.a6,-ft*Kt+Gt*e.a6,0])}else{let Ze=y.canonical.z-be.canonical.z,ut=y.canonical.x-(y.canonical.x>>Ze<>Ze<>Ze)-be.canonical.x,Gt=(y.canonical.y>>Ze)-be.canonical.y,Kt=e.a6<be.maxzoom&&(Re=be.maxzoom),Re=be.minzoom&&!je?.dem;)je=this.findTileInCaches(y.scaledTo(Re--).key);return je}findTileInCaches(y){let N=this.tileManager.getTileByID(y);return N||(N=this.tileManager._outOfViewCache.getByKey(y),N)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,N){let ie=N[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class tt{constructor(y,N,ie){this._meshCache={},this.painter=y,this.tileManager=new qe(N),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,N,ie,fe=e.a6){var be;let Re=y.normalizeCoordinates(N,ie,fe);if(!Re)return 0;let je=this.getTerrainData(Re.tileID),Ze=(be=je.tile)===null||be===void 0?void 0:be.dem;if(!Ze)return 0;let ut=e.cC([],[Re.x/fe*e.a6,Re.y/fe*e.a6],je.u_terrain_matrix),ft=[ut[0]*Ze.dim,ut[1]*Ze.dim],Dt=Math.floor(ft[0]),Gt=Math.floor(ft[1]),Kt=ft[0]-Dt,st=ft[1]-Gt;return Ze.get(Dt,Gt)*(1-Kt)*(1-st)+Ze.get(Dt+1,Gt)*Kt*(1-st)+Ze.get(Dt,Gt+1)*(1-Kt)*st+Ze.get(Dt+1,Gt+1)*Kt*st}getElevationForLngLatZoom(y,N){if(!e.cD(N,y.wrap()))return 0;let{tileID:ie,mercatorX:fe,mercatorY:be}=this._getOverscaledTileIDFromLngLatZoom(y,N);return this.getElevation(ie,fe%e.a6,be%e.a6,e.a6)}getElevationForLngLat(y,N){let ie=Je(N,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),fe=0;for(let be of ie)be.canonical.z>fe&&(fe=Math.min(be.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,fe)}getElevation(y,N,ie,fe=e.a6){return this.getDEMElevation(y,N,ie,fe)*this.exaggeration}getTerrainData(y){var N,ie;if(!this._emptyDemTexture){let Re=this.painter.context,je=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(Re,je,Re.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(Re,new e.R({width:1,height:1}),Re.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let fe=this.tileManager.getSourceTile(y,!0);if(fe?.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){let Re=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new e.T(Re,fe.dem.getPixels(),Re.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}let be=fe&&fe.toString()+fe.tileID.key+y.key;if(be&&!this._demMatrixCache[be]){let Re=this.tileManager.getSource().maxzoom,je=y.canonical.z-fe.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=Re?je=y.canonical.z-Re:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ze=y.canonical.x-(y.canonical.x>>je<>je<>8<<4|be>>8,N[Re+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(N.buffer)),fe=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return fe.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=fe,fe}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let N=new Uint8Array(4),ie=this.painter.context,fe=ie.gl,be=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),Re=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),fe.readPixels(be,je-Re-1,1,1,fe.RGBA,fe.UNSIGNED_BYTE,N),ie.bindFramebuffer.set(null);let Ze=N[0]+(N[2]>>4<<8),ut=N[1]+((15&N[2])<<8),ft=this.coordsIndex[255-N[3]],Dt=ft&&this.tileManager.getTileByID(ft);if(!Dt)return null;let Gt=this._coordsTextureSize,Kt=(1<0,fe=ie&&y.canonical.y===0,be=ie&&y.canonical.y===(1<y.id!==N),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let N of this._recentlyUsed)if(!this._objects[N].inUse)return this._objects[N];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ct={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Nt{constructor(y,N){this.painter=y,this.terrain=N,this.pool=new at(y.context,30,N.tileManager.tileSize*N.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,N){var ie,fe,be;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(Re=>!y._layers[Re].isHidden(N)),this._coordsAscending={};for(let Re in y.tileManagers){this._coordsAscending[Re]={};let je=y.tileManagers[Re].getVisibleCoordinates(),Ze=y.tileManagers[Re].getSource(),ut=Ze instanceof ke?Ze.terrainTileRanges:null;for(let ft of je){let Dt=this.terrain.tileManager.getTerrainCoords(ft,ut);for(let Gt in Dt)(be=this._coordsAscending[Re])[Gt]||(be[Gt]=[]),this._coordsAscending[Re][Gt].push(Dt[Gt])}}this._rttFingerprints={};for(let Re of y._order){let je=y._layers[Re],Ze=je.source;if(ct[je.type]&&!this._rttFingerprints[Ze]){this._rttFingerprints[Ze]={};let ut=(fe=(ie=y.tileManagers[Ze])===null||ie===void 0?void 0:ie.getState().revision)!==null&&fe!==void 0?fe:0;for(let ft in this._coordsAscending[Ze])this._rttFingerprints[Ze][ft]=`${this._coordsAscending[Ze][ft].map(Dt=>Dt.key).sort().join()}#${ut}`}}for(let Re of this._renderableTiles)for(let je in this._rttFingerprints){let Ze=this._rttFingerprints[je][Re.tileID.key];Ze&&Ze!==Re.rttFingerprint[je]&&(Re.rtt=[])}}renderLayer(y,N){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},N),{isRenderingToTexture:!0}),fe=y.type,be=this.painter,Re=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ct[fe]&&(this._prevType&&ct[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(y.id),!Re))return!0;if(ct[this._prevType]||ct[fe]&&Re){this._prevType=fe;let je=this._stacks.length-1,Ze=this._stacks[je]||[];for(let ut of this._renderableTiles){if(this.pool.isFull()&&(Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ut),ut.rtt[je]){let Dt=this.pool.getObjectForId(ut.rtt[je].id);if(Dt.stamp===ut.rtt[je].stamp){this.pool.useObject(Dt);continue}}let ft=this.pool.getOrCreateFreeObject();this.pool.useObject(ft),this.pool.stampObject(ft),ut.rtt[je]={id:ft.id,stamp:ft.stamp},be.context.bindFramebuffer.set(ft.fbo.framebuffer),be.context.clear({color:e.bo.transparent,stencil:0}),be.currentStencilSource=void 0;for(let Dt of Ze){let Gt=be.style._layers[Dt],Kt=Gt.source?this._coordsAscending[Gt.source][ut.tileID.key]:[ut.tileID];be.context.viewport.set([0,0,ft.fbo.width,ft.fbo.height]),be._renderTileClippingMasks(Gt,Kt,!0),be.renderLayer(be,be.style.tileManagers[Gt.source],Gt,Kt,ie),Gt.source&&(ut.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][ut.tileID.key])}}return Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ct[fe]}return!1}}let St={"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":"Drag to rotate map, click to reset 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","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","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"},Jt=t,mr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:pu,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 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],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},gr=class extends gc{get _ownerWindow(){var pe,y;return((y=(pe=this._container)===null||pe===void 0?void 0:pe.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(pe){var y,N,ie;let fe=Object.assign(Object.assign(Object.assign({},mr),pe),{canvasContextAttributes:Object.assign(Object.assign({},mr.canvasContextAttributes),pe.canvasContextAttributes)});if(fe.minZoom!=null&&fe.maxZoom!=null&&fe.minZoom>fe.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(fe.minPitch!=null&&fe.maxPitch!=null&&fe.minPitch>fe.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(fe.minPitch!=null&&fe.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(fe.maxPitch!=null&&fe.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let be=new Eo,Re=new Wo;fe.minZoom!==void 0&&be.setMinZoom(fe.minZoom),fe.maxZoom!==void 0&&be.setMaxZoom(fe.maxZoom),fe.minPitch!==void 0&&be.setMinPitch(fe.minPitch),fe.maxPitch!==void 0&&be.setMaxPitch(fe.maxPitch),fe.renderWorldCopies!==void 0&&be.setRenderWorldCopies(fe.renderWorldCopies),fe.transformConstrain!==null&&be.setConstrainOverride(fe.transformConstrain),super(be,Re,{bearingSnap:fe.bearingSnap,zoomSnap:fe.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new de,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ze=>{if(Ze.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let ut of Object.values(this.style._layers))if(ut.type==="custom"&&console.warn(`Custom layer with id '${ut.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),ut._listeners)for(let[ft]of Object.entries(ut._listeners))console.warn(`Custom layer with id '${ut.id}' had event listeners for event '${ft}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))},this._contextRestored=Ze=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ze}))},this._onMapScroll=Ze=>{if(Ze.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fe.interactive,this._maxTileCacheSize=fe.maxTileCacheSize,this._maxTileCacheZoomLevels=fe.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},fe.canvasContextAttributes),this._trackResize=fe.trackResize===!0,this._bearingSnap=fe.bearingSnap,this._zoomSnap=fe.zoomSnap,this._centerClampedToGround=fe.centerClampedToGround,this._refreshExpiredTiles=fe.refreshExpiredTiles===!0,this._fadeDuration=fe.fadeDuration,this._crossSourceCollisions=fe.crossSourceCollisions===!0,this._collectResourceTiming=fe.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),fe.locale),this._clickTolerance=fe.clickTolerance,this._overridePixelRatio=fe.pixelRatio,this._maxCanvasSize=fe.maxCanvasSize,this._zoomLevelsToOverscale=fe.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=fe.transformCameraUpdate,this.transformConstrain=fe.transformConstrain,this.cancelPendingTileRequestsWhileZooming=fe.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(fe.anisotropicFilterPitch),fe.reduceMotion!==void 0&&(s.prefersReducedMotion=fe.reduceMotion),this._imageQueueHandle=v.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(fe.transformRequest),this._container=this._resolveContainer(fe.container),fe.maxBounds&&this.setMaxBounds(fe.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Ps(this,fe),this._hash=fe.hash?new Jc(typeof fe.hash=="string"&&fe.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:fe.center,elevation:fe.elevation,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,roll:fe.roll}),fe.bounds&&(this.resize(),this.fitBounds(fe.bounds,e.e({},fe.fitBoundsOptions,{duration:0}))));let je=typeof fe.style=="string"||((ie=(N=fe.style)===null||N===void 0?void 0:N.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,je),this._localIdeographFontFamily=fe.localIdeographFontFamily,this._validateStyle=fe.validateStyle,fe.style&&this.setStyle(fe.style,{localIdeographFontFamily:fe.localIdeographFontFamily}),fe.attributionControl&&this.addControl(new ll(typeof fe.attributionControl=="boolean"?void 0:fe.attributionControl)),fe.maplibreLogo&&this.addControl(new ef,fe.logoPosition),this.on("style.load",()=>{if(je||this._resizeTransform(),this.transform.unmodified){let Ze=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ze)}}),this.on("data",Ze=>{this._update(Ze.dataType==="style"),this.fire(new e.n(`${Ze.dataType}data`,Ze))}),this.on("dataloading",Ze=>{this.fire(new e.n(`${Ze.dataType}dataloading`,Ze))}),this.on("dataabort",Ze=>{this.fire(new e.n("sourcedataabort",Ze))})}_getMapId(){return this._mapId}setGlobalStateProperty(pe,y){return this.style.setGlobalStateProperty(pe,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(pe,y){if(y===void 0&&(y=pe.getDefaultPosition?pe.getDefaultPosition():"top-right"),!pe?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let N=pe.onAdd(this);this._controls.push(pe);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(N,ie.firstChild):ie.appendChild(N),this}removeControl(pe){if(!pe?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(pe);return y>-1&&this._controls.splice(y,1),pe.onRemove(this),this}hasControl(pe){return this._controls.includes(pe)}coveringTiles(pe){return Je(this.transform,pe)}calculateCameraOptionsFromTo(pe,y,N,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(N,this.transform)),super.calculateCameraOptionsFromTo(pe,y,N,ie)}resize(pe,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let N=!this._moving;return N&&(this.stop(),this.fire(new e.n("movestart",pe)).fire(new e.n("move",pe))),this.fire(new e.n("resize",pe)),N&&this.fire(new e.n("moveend",pe)),this}_resizeInternal(pe=!0){let[y,N]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,N);if(this._resizeCanvas(y,N,ie),this.painter.resize(y,N,ie),this.painter.overLimit()){let fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];let be=this._getClampedPixelRatio(y,N);this._resizeCanvas(y,N,be),this.painter.resize(y,N,be)}this._resizeTransform(pe)}_resizeTransform(pe=!0){var y;let[N,ie]=this._containerDimensions();this.transform.resize(N,ie,pe),(y=this._requestedCameraState)===null||y===void 0||y.resize(N,ie,pe)}_getClampedPixelRatio(pe,y){let{0:N,1:ie}=this._maxCanvasSize,fe=this.getPixelRatio(),be=pe*fe,Re=y*fe;return Math.min(be>N?N/be:1,Re>ie?ie/Re:1)*fe}getPixelRatio(){var pe;return(pe=this._overridePixelRatio)!==null&&pe!==void 0?pe:devicePixelRatio}setPixelRatio(pe){this._overridePixelRatio=pe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(pe){return this.transform.setMaxBounds(q.convert(pe)),this._update()}setMinZoom(pe){if((pe=pe??-2)>=-2&&pe<=this.transform.maxZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMinZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(pe){if((pe=pe??22)>=this.transform.minZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMaxZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(pe){if((pe=pe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(pe>=0&&pe<=this.transform.maxPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMinPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(pe){if((pe=pe??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(pe>=this.transform.minPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMaxPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(pe){if((pe=pe??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(pe<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=pe,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(pe){return this.transform.setRenderWorldCopies(pe),this._update()}setTransformConstrain(pe){return this.transform.setConstrainOverride(pe),this._update()}project(pe){return this.transform.locationToScreenPoint(e.W.convert(pe),this.style&&this.terrain)}unproject(pe){return this.transform.screenPointToLocation(e.P.convert(pe),this.terrain)}isMoving(){var pe;return this._moving||((pe=this.handlers)===null||pe===void 0?void 0:pe.isMoving())}isZooming(){var pe;return this._zooming||((pe=this.handlers)===null||pe===void 0?void 0:pe.isZooming())}isRotating(){var pe;return this._rotating||((pe=this.handlers)===null||pe===void 0?void 0:pe.isRotating())}_createDelegatedListener(pe,y,N){if(pe==="mouseenter"||pe==="mouseover"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:be=>{let Re=y.filter(Ze=>this.getLayer(Ze)),je=Re.length!==0?this.queryRenderedFeatures(be.point,{layers:Re}):[];je.length?ie||(ie=!0,N.call(this,new Bl(pe,this,be.originalEvent,{features:je}))):ie=!1},mouseout:()=>{ie=!1}}}}if(pe==="mouseleave"||pe==="mouseout"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:Re=>{let je=y.filter(Ze=>this.getLayer(Ze));(je.length!==0?this.queryRenderedFeatures(Re.point,{layers:je}):[]).length?ie=!0:ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))},mouseout:Re=>{ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))}}}}{let ie=fe=>{let be=y.filter(je=>this.getLayer(je)),Re=be.length!==0?this.queryRenderedFeatures(fe.point,{layers:be}):[];Re.length&&(fe.features=Re,N.call(this,fe),delete fe.features)};return{layers:y,listener:N,delegates:{[pe]:ie}}}}_saveDelegatedListener(pe,y){var N;this._delegatedListeners||(this._delegatedListeners={}),(N=this._delegatedListeners)[pe]||(N[pe]=[]),this._delegatedListeners[pe].push(y)}_removeDelegatedListener(pe,y,N){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[pe]))return;let fe=this._delegatedListeners[pe];for(let be=0;bey.includes(je))){for(let je in Re.delegates)this.off(je,Re.delegates[je]);return void fe.splice(be,1)}}}on(pe,y,N){if(N===void 0)return super.on(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.on(be,fe.delegates[be]);return{unsubscribe:()=>{this._removeDelegatedListener(pe,ie,N)}}}once(pe,y,N){if(N===void 0)return super.once(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);for(let be in fe.delegates){let Re=fe.delegates[be];fe.delegates[be]=(...je)=>{this._removeDelegatedListener(pe,ie,N),Re(...je)}}this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.once(be,fe.delegates[be]);return this}off(pe,y,N){return N===void 0?super.off(pe,y):(this._removeDelegatedListener(pe,typeof y=="string"?[y]:y,N),this)}queryRenderedFeatures(pe,y){if(!this.style)return[];let N,ie=pe instanceof e.P||Array.isArray(pe),fe=ie?pe:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:pe)||{}),fe instanceof e.P||typeof fe[0]=="number")N=[e.P.convert(fe)];else{let be=e.P.convert(fe[0]),Re=e.P.convert(fe[1]);N=[be,new e.P(Re.x,be.y),Re,new e.P(be.x,Re.y),be]}return this.style.queryRenderedFeatures(N,y,this.transform)}querySourceFeatures(pe,y){return this.style.querySourceFeatures(pe,y)}setStyle(pe,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&pe?(this._diffStyle(pe,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(pe,y))}setTransformRequest(pe){return this._requestManager.setTransformRequest(pe),this}_getUIString(pe){let y=this._locale[pe];if(y==null)throw new Error(`Missing UI string '${pe}'`);return y}_updateStyle(pe,y){var N,ie,fe;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(pe,y));let be=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!pe)),pe?(this.style=new Ku(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof pe=="string"?this.style.loadURL(pe,y,be):this.style.loadJSON(pe,y,be),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(fe=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||fe===void 0||fe.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ku(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(pe,y){return e._(this,void 0,void 0,function*(){var N;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),typeof pe=="string"){let ie=pe;this._diffStyleRequest=new AbortController;let fe=this._diffStyleRequest;try{let be=yield this._requestManager.transformRequest(ie,"Style");if(fe.signal.aborted)return void(this._diffStyleRequest=null);let Re=yield e.k(be,fe);this._diffStyleRequest=null,this._updateDiff(Re.data,y)}catch(be){this._diffStyleRequest=null,e.$(be)||this.fire(new e.l(e.d(be)))}}else typeof pe=="object"&&(this._diffStyleRequest=null,this._updateDiff(pe,y))})}_updateDiff(pe,y){try{this.style.setState(pe,y)&&this._update(!0)}catch(N){e.w(`Unable to perform style diff: ${e.d(N).message}. Rebuilding the style from scratch.`),this._updateStyle(pe,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(pe,y){return this._lazyInitEmptyStyle(),this.style.addSource(pe,y),this._update(!0)}isSourceLoaded(pe){var y;let N=(y=this.style)===null||y===void 0?void 0:y.tileManagers[pe];if(N!==void 0)return N.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${pe}'`)))}setTerrain(pe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),pe){let y=this.style.tileManagers[pe.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${pe.source}`);this.terrain===null&&y.reload();for(let N in this.style._layers){let ie=this.style._layers[N];ie.type==="hillshade"&&ie.source===pe.source&&e.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."),ie.type==="color-relief"&&ie.source===pe.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new tt(this.painter,y,pe),this.painter.renderToTexture=new Nt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=N=>{var ie;N.dataType==="style"?this.terrain.tileManager.freeRtt():N.dataType==="source"&&N.tile&&(N.sourceId!==pe.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=N.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(N.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:pe})),this}getTerrain(){var pe,y;return(y=(pe=this.terrain)===null||pe===void 0?void 0:pe.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var pe;let y=(pe=this.style)===null||pe===void 0?void 0:pe.tileManagers;for(let N of Object.values(y))if(!N.areTilesLoaded())return!1;return!0}removeSource(pe){return this.style.removeSource(pe),this._update(!0)}getSource(pe){return this.style.getSource(pe)}setSourceTileLodParams(pe,y,N){if(N){let ie=this.getSource(N);if(!ie)throw new Error(`There is no source with ID "${N}", cannot set LOD parameters`);ie.calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y));return this._update(!0),this}refreshTiles(pe,y){let N=this.style.tileManagers[pe];if(!N)throw new Error(`There is no tile manager with ID "${pe}", cannot refresh tile`);y===void 0?N.reload(!0):N.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(pe,y,N={}){let{pixelRatio:ie=1,sdf:fe=!1,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut}=N;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(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:ft,height:Dt,data:Gt}=y,Kt=y;return this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},new Uint8Array(Gt)),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0,userImage:Kt}),Kt.onAdd&&Kt.onAdd(this,pe),this}}{let{width:ft,height:Dt,data:Gt}=s.getImageData(y);this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},Gt),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0})}}updateImage(pe,y){let N=this.style.getImage(pe);if(!N)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:fe,height:be,data:Re}=ie;if(fe===void 0||be===void 0)return this.fire(new e.l(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(fe!==N.data.width||be!==N.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let je=!(y instanceof HTMLImageElement||e.b(y));return N.data.replace(Re,je),this.style.updateImage(pe,N),this}getImage(pe){return this.style.getImage(pe)}hasImage(pe){return pe?!!this.style.getImage(pe):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(pe){this.style.removeImage(pe)}loadImage(pe){return e._(this,void 0,void 0,function*(){return v.getImage(yield this._requestManager.transformRequest(pe,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(pe,y){return this._lazyInitEmptyStyle(),this.style.addLayer(pe,y),this._update(!0)}moveLayer(pe,y){return this.style.moveLayer(pe,y),this._update(!0)}removeLayer(pe){return this.style.removeLayer(pe),this._update(!0)}getLayer(pe){return this.style.getLayer(pe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(pe,y,N){return this.style.setLayerZoomRange(pe,y,N),this._update(!0)}setFilter(pe,y,N={}){return this.style.setFilter(pe,y,N),this._update(!0)}getFilter(pe){return this.style.getFilter(pe)}setPaintProperty(pe,y,N,ie={}){return this.style.setPaintProperty(pe,y,N,ie),this._update(!0)}getPaintProperty(pe,y){return this.style.getPaintProperty(pe,y)}setLayoutProperty(pe,y,N,ie={}){return this.style.setLayoutProperty(pe,y,N,ie),this._update(!0)}getLayoutProperty(pe,y){return this.style.getLayoutProperty(pe,y)}setGlyphs(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(pe,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(pe,y,N={}){return this._lazyInitEmptyStyle(),this.style.addSprite(pe,y,N,ie=>{ie||this._update(!0)}),this}removeSprite(pe){return this._lazyInitEmptyStyle(),this.style.removeSprite(pe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(pe,y,N=>{N||this._update(!0)}),this}setLight(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(pe,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(pe,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(pe,y){return this.style.setFeatureState(pe,y),this._update()}removeFeatureState(pe,y){return this.style.removeFeatureState(pe,y),this._update()}getFeatureState(pe){return this.style.getFeatureState(pe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let pe=0,y=0;return this._container&&(pe=this._container.clientWidth||400,y=this._container.clientHeight||300),[pe,y]}_setupResizeObserver(){var pe;let y=!1,N=mc(fe=>{this._trackResize&&!this._removed&&(this.resize(fe),this.redraw())},50),ie=(pe=this._ownerWindow.ResizeObserver)!==null&&pe!==void 0?pe:ResizeObserver;this._resizeObserver=new ie(fe=>{y?N(fe):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(pe){if(typeof pe=="string"){let y=document.getElementById(pe);if(!y)throw new Error(`Container '${pe}' not found.`);return y}if(pe instanceof HTMLElement||pe&&typeof pe=="object"&&pe.nodeType===1)return pe;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let pe=this._container;pe.classList.add("maplibregl-map");let y=this._canvasContainer=g.create("div","maplibregl-canvas-container",pe);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=g.create("canvas","maplibregl-canvas",y),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 N=this._containerDimensions(),ie=this._getClampedPixelRatio(N[0],N[1]);this._resizeCanvas(N[0],N[1],ie);let fe=this._controlContainer=g.create("div","maplibregl-control-container",pe),be=this._controlPositions={};for(let Re of["top-left","top-right","bottom-left","bottom-right"])be[Re]=g.create("div",`maplibregl-ctrl-${Re} `,fe);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(pe,y,N){this._canvas.width=Math.floor(N*pe),this._canvas.height=Math.floor(N*y),this._canvas.style.width=`${pe}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let pe=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:pe},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let N=null;if(N=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,pe):this._canvas.getContext("webgl2",pe)||this._canvas.getContext("webgl",pe),!N){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new Su(N,this.transform)}migrateProjection(pe,y){super.migrateProjection(pe,y),this.painter.transform=pe,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(pe){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=pe),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(pe){return this._update(),this._renderTaskQueue.add(pe)}_cancelRenderFrame(pe){this._renderTaskQueue.remove(pe)}_render(pe){var y,N,ie,fe,be,Re;let je=this._idleTriggered?this._fadeDuration:0,Ze=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(pe),this._removed)return;let ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Kt=m();this.style.zoomHistory.update(Gt,Kt);let st=new e.J(Gt,{now:Kt,fadeDuration:je,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),It=st.crossFadingFactor();It===1&&It===this._crossFadingFactor||(ut=!0,this._crossFadingFactor=It),this.style.update(st)}let ft=((N=this.style.projection)===null||N===void 0?void 0:N.transitionState)>0!==Ze;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((fe=this.style.projection)===null||fe===void 0?void 0:fe.transitionState,(be=this.style.projection)===null||be===void 0?void 0:be.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ft)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(Re=this.style)===null||Re===void 0?void 0:Re._updatePlacement(this.transform,this.showCollisionBoxes,je,this._crossSourceCollisions,ft),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:je,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Dt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Dt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Dt||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var pe,y;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(pe=this._diffStyleRequest)===null||pe===void 0||pe.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),v.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let N=this.painter.context.gl.getExtension("WEBGL_lose_context");N?.loseContext&&N.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,pe=>{this._frameRequest=null;try{this._render(pe)}catch(y){if(!e.$(y)&&!function(N){return N.message===vc}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(pe){this._showTileBoundaries!==pe&&(this._showTileBoundaries=pe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(pe){this._showPadding!==pe&&(this._showPadding=pe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(pe){this._showCollisionBoxes!==pe&&(this._showCollisionBoxes=pe,pe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(pe){this._showOverdrawInspector!==pe&&(this._showOverdrawInspector=pe,this._update())}get repaint(){return!!this._repaint}set repaint(pe){this._repaint!==pe&&(this._repaint=pe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(pe){this._vertices=pe,this._update()}get version(){return Jt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(pe){return this._lazyInitEmptyStyle(),this.style.setProjection(pe),this._update(!0)}},Hr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Vr{constructor(y,N,ie=!1){this.mousedown=be=>{this.startMove(be,g.mousePos(this.element,be)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=be=>{this.move(be,g.mousePos(this.element,be))},this.mouseup=be=>{this._rotatePitchHandler.dragEnd(be),this.offTemp()},this.touchstart=be=>{be.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.startMove(be,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=be=>{be.targetTouches.length!==1?this.reset():(this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.move(be,this._lastPos))},this.touchend=be=>{be.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=N;let fe=new Br;this._rotatePitchHandler=new mt({clickTolerance:3,move:(be,Re)=>{let je=N.getBoundingClientRect(),Ze=new e.P((je.bottom-je.top)/2,(je.right-je.left)/2);return{bearingDelta:e.cx(new e.P(be.x,Re.y),Re,Ze),pitchDelta:ie?-.5*(Re.y-be.y):void 0}},moveStateManager:fe,enable:!0,assignEvents:()=>{}}),this.map=y,N.addEventListener("mousedown",this.mousedown),N.addEventListener("touchstart",this.touchstart,{passive:!1}),N.addEventListener("touchcancel",this.reset)}startMove(y,N){this._rotatePitchHandler.dragStart(y,N),g.disableDrag()}move(y,N){let ie=this.map,{bearingDelta:fe,pitchDelta:be}=this._rotatePitchHandler.dragMove(y,N)||{};fe&&ie.setBearing(ie.getBearing()+fe),be&&ie.setPitch(ie.getPitch()+be)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){g.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let ca;function Aa(pe,y,N,ie=!1){if(ie||!N.getCoveringTilesDetailsProvider().allowWorldCopies())return pe?.wrap();let fe=new e.W(pe.lng,pe.lat);if(pe=new e.W(pe.lng,pe.lat),y){let be=new e.W(pe.lng-360,pe.lat),Re=new e.W(pe.lng+360,pe.lat),je=N.locationToScreenPoint(pe).distSqr(y);N.locationToScreenPoint(be).distSqr(y)180;){let be=N.locationToScreenPoint(pe);if(be.x>=0&&be.y>=0&&be.x<=N.width&&be.y<=N.height)break;pe.lng>N.center.lng?pe.lng-=360:pe.lng+=360}return pe.lng!==fe.lng&&N.isPointOnMapSurface(N.locationToScreenPoint(pe))?pe:fe}let Xr={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 oa(pe,y,N){let ie=pe.classList;for(let fe in Xr)ie.remove(`maplibregl-${N}-anchor-${fe}`);ie.add(`maplibregl-${N}-anchor-${y}`)}class fa extends e.E{constructor(y){if(super(),this._onClick=N=>{this.fire(new e.n("click",{originalEvent:N}))},this._onKeyPress=N=>{N.code!=="Space"&&N.code!=="Enter"||this.togglePopup()},this._onMapClick=N=>{let ie=N.originalEvent.target,fe=this._element;this._popup&&(ie===fe||fe.contains(ie))&&this.togglePopup()},this._update=N=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(N?.type==="terrain"||N?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let fe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?fe=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(fe=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let be="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?be="rotateX(0deg)":this._pitchAlignment==="map"&&(be=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||N&&N.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${Xr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${be} ${fe}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(N?.type==="moveend")}).catch(()=>{})},this._onMove=N=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=N.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=N.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("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 e.n("dragend")),this._state="inactive"},this._addDragHandler=N=>{this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=g.create("div");let N=g.createNS("http://www.w3.org/2000/svg","svg"),ie=41,fe=27;N.setAttributeNS(null,"display","block"),N.setAttributeNS(null,"height",`${ie}px`),N.setAttributeNS(null,"width",`${fe}px`),N.setAttributeNS(null,"viewBox",`0 0 ${fe} ${ie}`);let be=g.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"stroke","none"),be.setAttributeNS(null,"stroke-width","1"),be.setAttributeNS(null,"fill","none"),be.setAttributeNS(null,"fill-rule","evenodd");let Re=g.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");let je=g.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let Ze=[{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 ir of Ze){let dr=g.createNS("http://www.w3.org/2000/svg","ellipse");dr.setAttributeNS(null,"opacity","0.04"),dr.setAttributeNS(null,"cx","10.5"),dr.setAttributeNS(null,"cy","5.80029008"),dr.setAttributeNS(null,"rx",ir.rx),dr.setAttributeNS(null,"ry",ir.ry),je.appendChild(dr)}let ut=g.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"fill",this._color);let ft=g.createNS("http://www.w3.org/2000/svg","path");ft.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"),ut.appendChild(ft);let Dt=g.createNS("http://www.w3.org/2000/svg","g");Dt.setAttributeNS(null,"opacity","0.25"),Dt.setAttributeNS(null,"fill","#000000");let Gt=g.createNS("http://www.w3.org/2000/svg","path");Gt.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"),Dt.appendChild(Gt);let Kt=g.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Kt.setAttributeNS(null,"fill","#FFFFFF");let st=g.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"transform","translate(8.0, 8.0)");let It=g.createNS("http://www.w3.org/2000/svg","circle");It.setAttributeNS(null,"fill","#000000"),It.setAttributeNS(null,"opacity","0.25"),It.setAttributeNS(null,"cx","5.5"),It.setAttributeNS(null,"cy","5.5"),It.setAttributeNS(null,"r","5.4999962");let Ut=g.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"),st.appendChild(It),st.appendChild(Ut),Re.appendChild(je),Re.appendChild(ut),Re.appendChild(Dt),Re.appendChild(Kt),Re.appendChild(st),N.appendChild(Re),N.setAttributeNS(null,"height",ie*this._scale+"px"),N.setAttributeNS(null,"width",fe*this._scale+"px"),this._element.appendChild(N),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",N=>{N.preventDefault()}),this._element.addEventListener("mousedown",N=>{N.preventDefault()}),oa(this._element,this._anchor,"marker"),y?.className)for(let N of y.className.split(" "))this._element.classList.add(N);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),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("projectiontransition",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),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let fe=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[fe,-1*(38.1-13.5+fe)],"bottom-right":[-fe,-1*(38.1-13.5+fe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var N,ie;let fe=(N=this._map)===null||N===void 0?void 0:N.terrain,be=this._map.transform.isLocationOccluded(this._lngLat);if(!fe||be){let Kt=be?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Kt&&(this._element.style.opacity=Kt,this._element.classList.toggle("maplibregl-marker-covered",be)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Re=this._map,je=Re.terrain.depthAtPoint(this._pos),Ze=Re.terrain.getElevationForLngLat(this._lngLat,Re.transform);if(Re.transform.lngLatToCameraDepth(this._lngLat,Ze)-je<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let ut=-this._offset.y/Re.transform.pixelsPerMeter,ft=Math.sin(Re.getPitch()*Math.PI/180)*ut,Dt=Re.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=Re.transform.lngLatToCameraDepth(this._lngLat,Ze+ft)-Dt>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(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(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,N){return(this._opacity===void 0||y===void 0&&N===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),N!==void 0&&(this._opacityWhenCovered=String(N)),this._map&&this._updateOpacity(!0),this}}let Ea={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ma=0,sa=!1,hn={maxWidth:100,unit:"metric"};function An(pe,y,N){let ie=N?.maxWidth||100,fe=pe._container.clientHeight/2,be=pe._container.clientWidth/2,Re=pe.unproject([be-ie/2,fe]),je=pe.unproject([be+ie/2,fe]),Ze=Math.round(pe.project(je).x-pe.project(Re).x),ut=Math.min(ie,Ze,pe._container.clientWidth),ft=Re.distanceTo(je);if(N?.unit==="imperial"){let Dt=3.2808*ft;Dt>5280?zn(y,ut,Dt/5280,pe._getUIString("ScaleControl.Miles")):zn(y,ut,Dt,pe._getUIString("ScaleControl.Feet"))}else N?.unit==="nautical"?zn(y,ut,ft/1852,pe._getUIString("ScaleControl.NauticalMiles")):ft>=1e3?zn(y,ut,ft/1e3,pe._getUIString("ScaleControl.Kilometers")):zn(y,ut,ft,pe._getUIString("ScaleControl.Meters"))}function zn(pe,y,N,ie){let fe=function(be){let Re=Math.pow(10,`${Math.floor(be)}`.length-1),je=be/Re;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(Ze){let ut=Math.pow(10,Math.ceil(-Math.log(Ze)/Math.LN10));return Math.round(Ze*ut)/ut}(je),Re*je}(N);pe.style.width=y*(fe/N)+"px",pe.innerHTML=`${fe} ${ie}`}let $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},xi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function di(pe){if(pe){if(typeof pe=="number"){let y=Math.round(Math.abs(pe)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,pe),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-pe),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(pe,0),right:new e.P(-pe,0)}}if(pe instanceof e.P||Array.isArray(pe)){let y=e.P.convert(pe);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(pe.center||[0,0]),top:e.P.convert(pe.top||[0,0]),"top-left":e.P.convert(pe["top-left"]||[0,0]),"top-right":e.P.convert(pe["top-right"]||[0,0]),bottom:e.P.convert(pe.bottom||[0,0]),"bottom-left":e.P.convert(pe["bottom-left"]||[0,0]),"bottom-right":e.P.convert(pe["bottom-right"]||[0,0]),left:e.P.convert(pe.left||[0,0]),right:e.P.convert(pe.right||[0,0])}}return di(new e.P(0,0))}let uo=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=ll,l.BoxZoomHandler=Nl,l.CanvasSource=ce,l.CooperativeGesturesHandler=wi,l.DoubleClickZoomHandler=ys,l.DragPanHandler=Hs,l.DragRotateHandler=Cu,l.EdgeInsets=oo,l.FullscreenControl=class extends e.E{constructor(pe={}){var y;super(),this._onFullscreenChange=()=>{var N;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((N=ie?.shadowRoot)===null||N===void 0)&&N.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=pe.pseudo)!==null&&y!==void 0&&y,pe?.container&&(pe.container instanceof HTMLElement?this._container=pe.container:e.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(pe){return this._map=pe,this._container||(this._container=this._map.getContainer()),this._controlContainer=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let pe=this._fullscreenButton=g.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);g.create("span","maplibregl-ctrl-icon",pe).setAttribute("aria-hidden","true"),pe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let pe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",pe),this._fullscreenButton.title=pe}_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 e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=Ge,l.GeolocateControl=class extends e.E{constructor(pe){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,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(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let N=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,fe=this._map.getBearing(),be=e.e({bearing:fe},this.options.fitBoundsOptions),Re=q.fromLngLat(N,ie);this._map.fitBounds(Re,be,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let N=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(N).addTo(this._map),this._userLocationDotMarker.setLngLat(N).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.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 N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&sa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let N=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||N||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=g.create("button","maplibregl-ctrl-geolocate",this._container),g.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}else{let N=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=g.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new fa({element:this._dotElement}),this._circleElement=g.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new fa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Ea,pe)}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(ca!==void 0&&!y)return ca;if(window.navigator.permissions===void 0)return ca=!!window.navigator.geolocation,ca;try{ca=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ca=!!window.navigator.geolocation}return ca})}().then(y=>this._finishSetupUI(y)),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(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ma=0,sa=!1}_isOutOfMapMaxBounds(pe){let y=this._map.getMaxBounds(),N=pe.coords;return y&&(N.longitudey.getEast()||N.latitudey.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":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let pe=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&pe))return;let y=this._map.project(pe),N=this._map.unproject([y.x+100,y.y]),ie=pe.distanceTo(N)/100,fe=2*this._accuracy/ie;this._circleElement.style.width=`${fe.toFixed(2)}px`,this._circleElement.style.height=`${fe.toFixed(2)}px`}trigger(){if(!this._setup)return e.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 e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ma--,sa=!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 e.n("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 e.n("trackuserlocationstart")),this.fire(new e.n("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 pe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ma++,Ma>1?(pe={maximumAge:6e5,timeout:0},sa=!0):(pe=this.options.positionOptions,sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,pe)}}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)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var pe;let y=(pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var pe;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=g.create("button","maplibregl-ctrl-globe",this._container),g.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Jc,l.ImageSource=ke,l.KeyboardHandler=Ji,l.LngLatBounds=q,l.LogoControl=ef,l.Map=gr,l.MapLibreMap=gr,l.MapMouseEvent=Bl,l.MapTouchEvent=Wu,l.MapWheelEvent=wf,l.Marker=fa,l.NavigationControl=class{constructor(pe){this._updateZoomButtons=()=>{let y=this._map.getZoom(),N=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=N,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",N.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,N)=>{let ie=this._map._getUIString(`NavigationControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Hr,pe),this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=g.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(pe){return this._map=pe,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.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(pe,y){let N=g.create("button",pe,this._container);return N.type="button",N.addEventListener("click",y),N}},l.Popup=class extends e.E{constructor(pe){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=g.create("div","maplibregl-popup",this._map.getContainer()),this._tip=g.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let N;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(N=y.point),this._trackPointer&&!N)return;let ie=this._flatPos=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&N?N:this._map.transform.locationToScreenPoint(this._lngLat));let fe=this.options.anchor,be=di(this.options.offset);if(!fe){let je=this._container.offsetWidth,Ze=this._container.offsetHeight,ut=function(Dt){var Gt,Kt,st,It;return Dt?{top:(Gt=Dt.top)!==null&&Gt!==void 0?Gt:0,right:(Kt=Dt.right)!==null&&Kt!==void 0?Kt:0,bottom:(st=Dt.bottom)!==null&&st!==void 0?st:0,left:(It=Dt.left)!==null&&It!==void 0?It:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ft;ft=ie.y+be.bottom.ythis._map.transform.height-Ze-ut.bottom?["bottom"]:[],ie.xthis._map.transform.width-je/2-ut.right&&ft.push("right"),fe=ft.length===0?"bottom":ft.join("-")}let Re=ie.add(be[fe]);this.options.subpixelPositioning||(Re=Re.round()),this._container.style.transform=`${Xr[fe]} translate(${Re.x}px,${Re.y}px)`,oa(this._container,fe,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create($n),pe)}addTo(pe){return this._map&&this.remove(),this._map=pe,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._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),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 e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(pe){return this._lngLat=e.W.convert(pe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),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._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(pe){return this.setDOMContent(document.createTextNode(pe))}setHTML(pe){let y=document.createDocumentFragment(),N=document.createElement("body"),ie;for(N.innerHTML=pe;ie=N.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var pe;return(pe=this._container)===null||pe===void 0?void 0:pe.style.maxWidth}setMaxWidth(pe){return this.options.maxWidth=pe,this._update(),this}setDOMContent(pe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=g.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(pe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(pe){return this._container&&this._container.classList.add(pe),this}removeClassName(pe){return this._container&&this._container.classList.remove(pe),this}setOffset(pe){return this.options.offset=pe,this._update(),this}toggleClassName(pe){if(this._container)return this._container.classList.toggle(pe)}setSubpixelPositioning(pe){this.options.subpixelPositioning=pe}setPadding(pe){this.options.padding=pe,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=g.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let pe=this._container.querySelector(xi);pe&&pe.focus()}},l.RasterDEMTileSource=he,l.RasterTileSource=ae,l.ScaleControl=class{constructor(pe){this._onMove=()=>{An(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,An(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hn),pe)}getDefaultPosition(){return"bottom-left"}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-scale",pe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=vo,l.Style=Ku,l.TerrainControl=class{constructor(pe){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=pe}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=g.create("button","maplibregl-ctrl-terrain",this._container),g.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(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Si,l.TwoFingersTouchRotateHandler=Tn,l.TwoFingersTouchZoomHandler=Ba,l.TwoFingersTouchZoomRotateHandler=hi,l.VectorTileSource=ee,l.VideoSource=_e,l.addSourceType=(pe,y)=>e._(void 0,void 0,void 0,function*(){if(le(pe))throw new Error(`A source type called "${pe}" already exists.`);((N,ie)=>{ve[N]=ie})(pe,y)}),l.clearPrewarmedResources=function(){let pe=$;pe&&(pe.isPreloaded()&&pe.numActive()===1?(pe.release(P),$=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()"))},l.createTileMesh=Ss,l.getGlobalDispatcher=se,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},l.getVersion=function(){return uo},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(pe){return se().broadcast("IS",pe)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=m,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(pe){e.c.MAX_PARALLEL_IMAGE_REQUESTS=pe},l.setNow=function(pe){c.setNow(pe)},l.setRTLTextPlugin=function(pe,y){return Ye().setRTLTextPlugin(pe,y)},l.setWorkerCount=function(pe){j.workerCount=pe},l.setWorkerUrl=function(pe){e.c.WORKER_URL=pe}});var k=p;return k})}}),rV=ze({"src/plots/map/layers.js"(J,V){"use strict";var p=Nr(),b=Cs().sanitizeHTML,E=kM(),k=Av();function l(a,o){this.subplot=a,this.uid=a.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(a){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&a.sourcetype==="image"&&(this.source!==a.source||JSON.stringify(this.coordinates)!==JSON.stringify(a.coordinates))},e.needsNewSource=function(a){return this.sourceType!==a.sourcetype||JSON.stringify(this.source)!==JSON.stringify(a.source)||this.layerType!==a.type},e.needsNewLayer=function(a){return this.layerType!==a.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(a){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:a.source,coordinates:a.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(a){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=a.sourcetype,this.source=a.source,!!t(a)){var s=r(a);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(a){if(a==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function n(a){var o={},s={};switch(a.type){case"circle":p.extendFlat(s,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":p.extendFlat(s,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":p.extendFlat(s,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,m=E(c.textposition,c.iconsize);p.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":m.anchor,"text-offset":m.offset,"symbol-placement":c.placement}),p.extendFlat(s,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":p.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:o,paint:s}}function r(a){var o=a.sourcetype,s=a.source,c={type:o},m;return o==="geojson"?m="data":o==="vector"?m=typeof s=="string"?"url":"tiles":o==="raster"?(m="tiles",c.tileSize=256):o==="image"&&(m="url",c.coordinates=a.coordinates),c[m]=s,a.sourceattribution&&(c.attribution=b(a.sourceattribution)),c}V.exports=function(o,s,c){var m=new l(o,s);return m.update(c),m}}}),aV=ze({"src/plots/map/map.js"(J,V){"use strict";var p=tV(),b=Nr(),E=hp(),k=mi(),l=Gi(),e=_h(),t=Zl(),n=Fd(),r=n.drawMode,a=n.selectMode,o=_c().prepSelect,s=_c().clearOutline,c=_c().clearSelectionsCache,m=_c().selectOnClick,h=Av(),v=rV();function g(T,f){this.id=f,this.gd=T;var u=T._fullLayout,A=T._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=g.prototype;i.plot=function(T,f,u){var A=this,x;A.map?x=new Promise(function(z,I){A.updateMap(T,f,z,I)}):x=new Promise(function(z,I){A.createMap(T,f,z,I)}),u.push(x)},i.createMap=function(T,f,u,A){var x=this,z=f[x.id],I=x.styleObj=C(z.style),O=z.bounds,D=O?[[O.west,O.south],[O.east,O.north]]:null;let B={container:x.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:D,interactive:!x.isStatic,canvasContextAttributes:{preserveDrawingBuffer:x.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:h.fitBoundsPadding});let P=x.map=new p.Map(B).addControl(new p.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function($){var Q=$.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function($){return $=$.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:$}}),P._canvas.style.left="0px",P._canvas.style.top="0px",x.rejectOnError(A),x.isStatic||x.initFx(T,f);var U=[];U.push(new Promise(function($){P.once("load",$)})),U=U.concat(E.fetchTraceGeoData(T)),Promise.all(U).then(function(){F&&w(x,z),S(x,z),x.fillBelowLookup(T,f),x.updateData(T),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)},i.updateMap=function(T,f,u,A){var x=this,z=x.map,I=f[this.id];x.rejectOnError(A);var O=[],D=C(I.style);JSON.stringify(x.styleObj)!==JSON.stringify(D)&&(x.styleObj=D,z.setStyle(D.style),x.traceHash={},O.push(new Promise(function(B){z.once("styledata",B)}))),O=O.concat(E.fetchTraceGeoData(T)),Promise.all(O).then(function(){x.fillBelowLookup(T,f),x.updateData(T);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:h.fitBoundsPadding,animate:!1}),w(x,I),S(x,I)),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)};function w(T,f){let{center:u,zoom:A}=T.getView();f._input.center=f.center=u,f._input.zoom=f.zoom=A,f._input._fitView={center:Li({},u),zoom:A}}function S(T,f){let u=T.getView();T.viewInitial={center:b.extendFlat({},u.center),bearing:f.bearing,pitch:f.pitch,zoom:u.zoom}}i.fillBelowLookup=function(T,f){var u=f[this.id],A=u.layers,x,z,I=this.belowLookup={},O=!1;for(x=0;x1)for(x=0;x<$.length;x++)j=$[x],j.indexOf("trace-")===0?(U=j.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):j.indexOf("layout-")===0&&(U=j.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var M={choroplethmap:0,densitymap:1,scattermap:2};i.updateData=function(T){var f=this.traceHash,u,A,x,z,I=T.slice().sort(function(P,j){return M[P[0].trace.type]-M[j[0].trace.type]});for(x=0;xf.project(A).x,_subplot:f},f.yaxis={_id:"y",c2p:A=>f.project(A).y,_subplot:f},f.updateFramework(T),f.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(f.mockAxis,T)},i.initFx=function(T,f){var u=this,A=u.gd,x=u.map;x.on("moveend",function(O){if(u.map){var D=A._fullLayout;if(O.originalEvent||u.wheeling){var B=D[u.id];k.call("_storeDirectGUIEdit",A.layout,D._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}O.originalEvent&&O.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),D&&D._rehover&&D._rehover()}}),x.on("wheel",function(){u.wheeling=!0}),x.on("mousemove",function(O){var D=u.div.getBoundingClientRect(),B=[O.originalEvent.offsetX,O.originalEvent.offsetY];O.target.getBoundingClientRect=function(){return D},u.xaxis.p2c=function(){return x.unproject(B).lng},u.yaxis.p2c=function(){return x.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,O,u.id)},t.hover(A,O,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(f._hoverlayer)}x.on("dragstart",function(){u.dragging=!0,z()}),x.on("zoomstart",z),x.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var O=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(O))}x.on("drag",I),x.on("zoom",I),x.on("dblclick",function(){var O=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(O));var D=u.viewInitial;x.setCenter(_(D.center)),x.setZoom(D.zoom),x.setBearing(D.bearing),x.setPitch(D.pitch);var B=u.getView();O._input.center=O.center=B.center,O._input.zoom=O.zoom=B.zoom,O._input.bearing=O.bearing=B.bearing,O._input.pitch=O.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(O){return function(D){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&m(D.originalEvent,A,[u.xaxis],[u.yaxis],u.id,O),B.indexOf("event")>-1&&t.click(A,D.originalEvent)}}},i.updateFx=function(T){var f=this,u=f.map,A=f.gd;if(f.isStatic)return;function x(D){var B=f.map.unproject(D);return[B.lng,B.lat]}var z=T.dragmode,I;I=function(D,B){if(B.isRect){var F=D.range={};F[f.id]=[x([B.xmin,B.ymin]),x([B.xmax,B.ymax])]}else{var P=D.lassoPoints={};P[f.id]=B.map(x)}};var O=f.dragOptions;f.dragOptions=b.extendDeep(O||{},{dragmode:T.dragmode,element:f.div,gd:A,plotinfo:{id:f.id,domain:T[f.id].domain,xaxis:f.xaxis,yaxis:f.yaxis,fillRangeItems:I},xaxes:[f.xaxis],yaxes:[f.yaxis],subplot:f.id}),u.off("click",f.onClickInPanHandler),a(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",f.clearOutline),f.dragOptions.prepFn=function(D,B,F){o(D,B,F,f.dragOptions,z)},e.init(f.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",f.clearOutline),f.div.onmousedown=null,f.div.ontouchstart=null,f.div.removeEventListener("touchstart",f.div._ontouchstart),f.onClickInPanHandler=f.onClickInPanFn(f.dragOptions),u.on("click",f.onClickInPanHandler))},i.updateFramework=function(T){var f=T[this.id].domain,u=T._size,A=this.div.style;A.width=u.w*(f.x[1]-f.x[0])+"px",A.height=u.h*(f.y[1]-f.y[0])+"px",A.left=u.l+f.x[0]*u.w+"px",A.top=u.t+(1-f.y[1])*u.h+"px",this.xaxis._offset=u.l+f.x[0]*u.w,this.xaxis._length=u.w*(f.x[1]-f.x[0]),this.yaxis._offset=u.t+(1-f.y[1])*u.h,this.yaxis._length=u.h*(f.y[1]-f.y[0])},i.updateLayers=function(T){var f=T[this.id],u=f.layers,A=this.layerList,x;if(u.length!==A.length){for(x=0;xnV});function nV(J,V){let p=[];for(let t of J){if(t.subplot!==V||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:n,lon:r}=t;if(!r||!n)continue;let a=Math.min(r.length,n.length);for(let o=0;of/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,a),T=e.bBox(_.node())}_.attr("transform",p(-3,-T.height+8)),C.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;T.width+6>f&&(A=f/(T.width+6));var x=[c.l+c.w*v.x[1],c.t+c.h*(1-v.y[0])];C.attr("transform",p(x[0],x[1])+b(A))}},J.updateFx=function(a){for(var o=a._fullLayout,s=o._subplots[r],c=0;c=0;n--)e.removeLayer(t[n][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,n){var r=n[0].trace,a=new k(t,r.uid),o=a.sourceId,s=p(n),c=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,c),n[0].trace._glTrace=a,a}}}),fV=ze({"src/traces/choroplethmap/index.js"(J,V){"use strict";V.exports={attributes:PM(),supplyDefaults:uV(),colorbar:ag(),calc:IA(),plot:cV(),hoverPoints:DA(),eventData:FA(),selectPoints:zA(),styleOnSelect:function(p,b){if(b){var E=b[0].trace;E._glTrace.updateOnSelect(b)}},getBelow:function(p,b){for(var E=b.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+v[m]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),T=_.reversescale?k.flipScale(_.colorscale):_.colorscale,f=T[0][1],u=E.opacity(f)<1?f:E.addOpacity(f,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(m=1;m=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},V.exports=function(e,t){var n=t[0].trace,r=new E(e,n.uid),a=r.sourceId,o=p(t),s=r.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),gV=ze({"src/traces/densitymap/hover.js"(J,V){"use strict";var p=Gi(),b=V2().hoverPoints,E=V2().getExtraText;V.exports=function(l,e,t){var n=b(l,e,t);if(n){var r=n[0],a=r.cd,o=a[0].trace,s=a[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=p.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,a[0].t.labels),[r]}}}}),yV=ze({"src/traces/densitymap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b.z=E.z,b}}}),_V=ze({"src/traces/densitymap/index.js"(J,V){"use strict";V.exports={attributes:IM(),supplyDefaults:dV(),colorbar:ag(),formatLabels:EM(),calc:pV(),plot:mV(),hoverPoints:gV(),eventData:yV(),getBelow:function(p,b){for(var E=b.getMapLayers(),k=0;kw[z%w.length];i("color",g.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=a.link||{},C=e.newContainer(o,"link");function _(z,I){return p.coerce(M,C,b.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",a.hoverinfo),l(M,C,_,h),_("hovertemplate"),_("sort");var T=E.luminosity(c.paper_bgcolor)<.333,f=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",f);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):T?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:n}),k(o,c,m),m("orientation"),m("direction"),m("valueformat"),m("valuesuffix");let x=g.x.length&&g.y.length?"freeform":void 0;m("arrangement",x),p.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function n(r,a){function o(s,c){return p.coerce(r,a,b.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),FM=ze({"node_modules/strongly-connected-components/scc.js"(J,V){"use strict";V.exports=p;function p(b){for(var E=b.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),n=new Array(E),r=new Array(E),a=0;a0;){i=S[S.length-1];var M=b[i];if(t[i]=0&&r[i].push(n[_])}t[i]=C}else{if(l[i]===k[i]){for(var T=[],f=[],u=0,C=w.length-1;C>=0;--C){var A=w[C];if(e[A]=!1,T.push(A),f.push(r[A]),u+=r[A].length,n[A]=s.length,A===i){w.length=C;break}}s.push(T);for(var x=new Array(u),C=0;C_&&(_=o.source[w]),o.target[w]>_&&(_=o.target[w]);var T=_+1;r.node._count=T;var f,u=r.node.groups,A={};for(w=0;w0&&l(B,T)&&l(F,T)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,v[B]=v[F]=!0;var P="";o.label&&o.label[w]&&(P=o.label[w]);var j=null;P&&g.hasOwnProperty(P)&&(j=g[P]),s.push({pointNumber:w,label:P,color:c?o.color[w]:o.color,hovercolor:m?o.hovercolor[w]:o.hovercolor,customdata:h?o.customdata[w]:o.customdata,concentrationscale:j,source:B,target:F,value:+D}),O.source.push(B),O.target.push(F)}}var U=T+u.length,$=k(a.color),Q=k(a.customdata),re=[];for(w=0;wT-1,childrenNodes:[],pointNumber:w,label:ne,color:$?a.color[w]:a.color,customdata:Q?a.customdata[w]:a.customdata})}var se=!1;return n(U,O.source,O.target)&&(se=!0),{circular:se,links:s,nodes:re,groups:u,groupLookup:A}}function n(r,a,o){for(var s=b.init2dArray(r,0),c=0;c1})}V.exports=function(a,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),TV=ze({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){var f=+this._x.call(null,T),u=+this._y.call(null,T);return E(this.cover(f,u),f,u,T)}function E(T,f,u,A){if(isNaN(f)||isNaN(u))return T;var x,z=T._root,I={data:A},O=T._x0,D=T._y0,B=T._x1,F=T._y1,P,j,U,$,Q,re,ne,se;if(!z)return T._root=I,T;for(;z.length;)if((Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j,x=z,!(z=z[ne=re<<1|Q]))return x[ne]=I,T;if(U=+T._x.call(null,z.data),$=+T._y.call(null,z.data),f===U&&u===$)return I.next=z,x?x[ne]=I:T._root=I,T;do x=x?x[ne]=new Array(4):T._root=new Array(4),(Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j;while((ne=re<<1|Q)===(se=($>=j)<<1|U>=P));return x[se]=z,x[ne]=I,T}function k(T){var f,u,A=T.length,x,z,I=new Array(A),O=new Array(A),D=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=x),zP&&(P=z));if(D>F||B>P)return this;for(this.cover(D,B).cover(F,P),u=0;uT||T>=x||A>f||f>=z;)switch(B=(fF||(O=$.y0)>P||(D=$.x1)=ne)<<1|T>=re)&&($=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=$)}else{var se=T-+this._x.call(null,U.data),G=f-+this._y.call(null,U.data),X=se*se+G*G;if(X=(j=(I+D)/2))?I=j:D=j,(Q=P>=(U=(O+B)/2))?O=U:B=U,f=u,!(u=u[re=Q<<1|$]))return this;if(!u.length)break;(f[re+1&3]||f[re+2&3]||f[re+3&3])&&(A=f,ne=re)}for(;u.data!==T;)if(x=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,x?(z?x.next=z:delete x.next,this):f?(z?f[re]=z:delete f[re],(u=f[0]||f[1]||f[2]||f[3])&&u===(f[3]||f[2]||f[1]||f[0])&&!u.length&&(A?A[ne]=u:this._root=u),this):(this._root=z,this)}function o(T){for(var f=0,u=T.length;f=v.length)return i!=null&&_.sort(i),w!=null?w(_):_;for(var A=-1,x=_.length,z=v[T++],I,O,D=k(),B,F=f();++Av.length)return _;var f,u=g[T-1];return w!=null&&T>=v.length?f=_.entries():(f=[],_.each(function(A,x){f.push({key:x,values:C(A,T)})})),u!=null?f.sort(function(A,x){return u(A.key,x.key)}):f}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,n,r)},entries:function(_){return C(M(_,0,n,r),0)},key:function(_){return v.push(_),S},sortKeys:function(_){return g[v.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return w=_,S}}}function e(){return{}}function t(v,g,i){v[g]=i}function n(){return k()}function r(v,g,i){v.set(g,i)}function a(){}var o=k.prototype;a.prototype=s.prototype={constructor:a,has:o.has,add:function(v){return v+="",this[b+v]=v,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(v,g){var i=new a;if(v instanceof a)v.each(function(M){i.add(M)});else if(v){var w=-1,S=v.length;if(g==null)for(;++w=0&&(o=a.slice(s+1),a=a.slice(0,s)),a&&!r.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:o}})}k.prototype=E.prototype={constructor:k,on:function(n,r){var a=this._,o=l(n+"",a),s,c=-1,m=o.length;if(arguments.length<2){for(;++c0)for(var a=new Array(s),o=0,s,c;o=0&&T._call.call(null,f),T=T._next;--b}function i(){r=(n=o.now())+a,b=E=0;try{g()}finally{b=0,S(),r=0}}function w(){var T=o.now(),f=T-n;f>l&&(a-=f,n=T)}function S(){for(var T,f=e,u,A=1/0;f;)f._call?(A>f._time&&(A=f._time),T=f,f=f._next):(u=f._next,f._next=null,f=T?T._next=u:e=u);t=T,M(A)}function M(T){if(!b){E&&(E=clearTimeout(E));var f=T-r;f>24?(T<1/0&&(E=setTimeout(i,T-o.now()-a)),k&&(k=clearInterval(k))):(k||(n=o.now(),k=setInterval(w,l)),b=1,s(i))}}function C(T,f,u){var A=new h;return f=f==null?0:+f,A.restart(function(x){A.stop(),T(x+f)},f,u),A}function _(T,f,u){var A=new h,x=f;return f==null?(A.restart(T,f,u),A):(f=+f,u=u==null?c():+u,A.restart(function z(I){I+=x,A.restart(z,x+=f,u),T(I)},f,u),A)}p.interval=_,p.now=c,p.timeout=C,p.timer=v,p.timerFlush=g,Object.defineProperty(p,"__esModule",{value:!0})})}}),SV=ze({"node_modules/d3-force/dist/d3-force.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,TV(),zM(),AV(),MV()):b(p.d3=p.d3||{},p.d3,p.d3,p.d3,p.d3)})(J,function(p,b,E,k,l){"use strict";function e(T,f){var u;T==null&&(T=0),f==null&&(f=0);function A(){var x,z=u.length,I,O=0,D=0;for(x=0;xP.index){var ee=j-Y.x-Y.vx,ae=U-Y.y-Y.vy,he=ee*ee+ae*ae;hej+Z||KU+Z||HD.r&&(D.r=D[B].r)}function O(){if(f){var D,B=f.length,F;for(u=new Array(B),D=0;D1?(Q==null?O.remove($):O.set($,U(Q)),f):O.get($)},find:function($,Q,re){var ne=0,se=T.length,G,X,K,H,Y;for(re==null?re=1/0:re*=re,ne=0;ne1?(B.on($,Q),f):B.on($)}}}function S(){var T,f,u,A=t(-30),x,z=1,I=1/0,O=.81;function D(j){var U,$=T.length,Q=b.quadtree(T,h,v).visitAfter(F);for(u=j,U=0;U<$;++U)f=T[U],Q.visit(P)}function B(){if(T){var j,U=T.length,$;for(x=new Array(U),j=0;j=I)return;(j.data!==f||j.next)&&(re===0&&(re=n(),G+=re*re),ne===0&&(ne=n(),G+=ne*ne),GRt?1:Yt>=Rt?0:NaN}function E(Yt){let Rt=Yt,nr=Yt;Yt.length===1&&(Rt=(Qr,Zr)=>Yt(Qr)-Zr,nr=k(Yt));function ur(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)<0?ha=La+1:Pa=La}return ha}function cr(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)>0?Pa=La:ha=La+1}return ha}function Rr(Qr,Zr,ha,Pa){ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);let La=ur(Qr,Zr,ha,Pa-1);return La>ha&&Rt(Qr[La-1],Zr)>-Rt(Qr[La],Zr)?La-1:La}return{left:ur,center:Rr,right:cr}}function k(Yt){return(Rt,nr)=>b(Yt(Rt),nr)}function l(Yt){return Yt===null?NaN:+Yt}function*e(Yt,Rt){if(Rt===void 0)for(let nr of Yt)nr!=null&&(nr=+nr)>=nr&&(yield nr);else{let nr=-1;for(let ur of Yt)(ur=Rt(ur,++nr,Yt))!=null&&(ur=+ur)>=ur&&(yield ur)}}let t=E(b),n=t.right,r=t.left,a=E(l).center;function o(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)ur!=null&&(ur=+ur)>=ur&&++nr;else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(cr=+cr)>=cr&&++nr}return nr}function s(Yt){return Yt.length|0}function c(Yt){return!(Yt>0)}function m(Yt){return typeof Yt!="object"||"length"in Yt?Yt:Array.from(Yt)}function h(Yt){return Rt=>Yt(...Rt)}function v(...Yt){let Rt=typeof Yt[Yt.length-1]=="function"&&h(Yt.pop());Yt=Yt.map(m);let nr=Yt.map(s),ur=Yt.length-1,cr=new Array(ur+1).fill(0),Rr=[];if(ur<0||nr.some(c))return Rr;for(;;){Rr.push(cr.map((Zr,ha)=>Yt[ha][Zr]));let Qr=ur;for(;++cr[Qr]===nr[Qr];){if(Qr===0)return Rt?Rr.map(Rt):Rr;cr[Qr--]=0}}}function g(Yt,Rt){var nr=0,ur=0;return Float64Array.from(Yt,Rt===void 0?cr=>nr+=+cr||0:cr=>nr+=+Rt(cr,ur++,Yt)||0)}function i(Yt,Rt){return RtYt?1:Rt>=Yt?0:NaN}function w(Yt,Rt){let nr=0,ur,cr=0,Rr=0;if(Rt===void 0)for(let Qr of Yt)Qr!=null&&(Qr=+Qr)>=Qr&&(ur=Qr-cr,cr+=ur/++nr,Rr+=ur*(Qr-cr));else{let Qr=-1;for(let Zr of Yt)(Zr=Rt(Zr,++Qr,Yt))!=null&&(Zr=+Zr)>=Zr&&(ur=Zr-cr,cr+=ur/++nr,Rr+=ur*(Zr-cr))}if(nr>1)return Rr/(nr-1)}function S(Yt,Rt){let nr=w(Yt,Rt);return nr&&Math.sqrt(nr)}function M(Yt,Rt){let nr,ur;if(Rt===void 0)for(let cr of Yt)cr!=null&&(nr===void 0?cr>=cr&&(nr=ur=cr):(nr>cr&&(nr=cr),ur=Rr&&(nr=ur=Rr):(nr>Rr&&(nr=Rr),ur0){for(Qr=Rt[--nr];nr>0&&(ur=Qr,cr=Rt[--nr],Qr=ur+cr,Rr=cr-(Qr-ur),!Rr););nr>0&&(Rr<0&&Rt[nr-1]<0||Rr>0&&Rt[nr-1]>0)&&(cr=Rr*2,ur=Qr+cr,cr==ur-Qr&&(Qr=ur))}return Qr}}function _(Yt,Rt){let nr=new C;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&nr.add(ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&nr.add(cr)}return+nr}function T(Yt,Rt){let nr=new C,ur=-1;return Float64Array.from(Yt,Rt===void 0?cr=>nr.add(+cr||0):cr=>nr.add(+Rt(cr,++ur,Yt)||0))}class f extends Map{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let[ur,cr]of Rt)this.set(ur,cr)}get(Rt){return super.get(A(this,Rt))}has(Rt){return super.has(A(this,Rt))}set(Rt,nr){return super.set(x(this,Rt),nr)}delete(Rt){return super.delete(z(this,Rt))}}class u extends Set{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let ur of Rt)this.add(ur)}has(Rt){return super.has(A(this,Rt))}add(Rt){return super.add(x(this,Rt))}delete(Rt){return super.delete(z(this,Rt))}}function A({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):nr}function x({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):(Yt.set(ur,nr),nr)}function z({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)&&(nr=Yt.get(nr),Yt.delete(ur)),nr}function I(Yt){return Yt!==null&&typeof Yt=="object"?Yt.valueOf():Yt}function O(Yt){return Yt}function D(Yt,...Rt){return Q(Yt,O,O,Rt)}function B(Yt,...Rt){return Q(Yt,Array.from,O,Rt)}function F(Yt,Rt,...nr){return Q(Yt,O,Rt,nr)}function P(Yt,Rt,...nr){return Q(Yt,Array.from,Rt,nr)}function j(Yt,...Rt){return Q(Yt,O,$,Rt)}function U(Yt,...Rt){return Q(Yt,Array.from,$,Rt)}function $(Yt){if(Yt.length!==1)throw new Error("duplicate key");return Yt[0]}function Q(Yt,Rt,nr,ur){return function cr(Rr,Qr){if(Qr>=ur.length)return nr(Rr);let Zr=new f,ha=ur[Qr++],Pa=-1;for(let La of Rr){let un=ha(La,++Pa,Rr),Xa=Zr.get(un);Xa?Xa.push(La):Zr.set(un,[La])}for(let[La,un]of Zr)Zr.set(La,cr(un,Qr));return Rt(Zr)}(Yt,0)}function re(Yt,Rt){return Array.from(Rt,nr=>Yt[nr])}function ne(Yt,...Rt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Yt=Array.from(Yt);let[nr=b]=Rt;if(nr.length===1||Rt.length>1){let ur=Uint32Array.from(Yt,(cr,Rr)=>Rr);return Rt.length>1?(Rt=Rt.map(cr=>Yt.map(cr)),ur.sort((cr,Rr)=>{for(let Qr of Rt){let Zr=b(Qr[cr],Qr[Rr]);if(Zr)return Zr}})):(nr=Yt.map(nr),ur.sort((cr,Rr)=>b(nr[cr],nr[Rr]))),re(Yt,ur)}return Yt.sort(nr)}function se(Yt,Rt,nr){return(Rt.length===1?ne(F(Yt,Rt,nr),([ur,cr],[Rr,Qr])=>b(cr,Qr)||b(ur,Rr)):ne(D(Yt,nr),([ur,cr],[Rr,Qr])=>Rt(cr,Qr)||b(ur,Rr))).map(([ur])=>ur)}var G=Array.prototype,X=G.slice;function K(Yt){return function(){return Yt}}var H=Math.sqrt(50),Y=Math.sqrt(10),q=Math.sqrt(2);function Z(Yt,Rt,nr){var ur,cr=-1,Rr,Qr,Zr;if(Rt=+Rt,Yt=+Yt,nr=+nr,Yt===Rt&&nr>0)return[Yt];if((ur=Rt0){let ha=Math.round(Yt/Zr),Pa=Math.round(Rt/Zr);for(ha*ZrRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++crRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++cr=0?(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)*Math.pow(10,cr):-Math.pow(10,-cr)/(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)}function ae(Yt,Rt,nr){var ur=Math.abs(Rt-Yt)/Math.max(0,nr),cr=Math.pow(10,Math.floor(Math.log(ur)/Math.LN10)),Rr=ur/cr;return Rr>=H?cr*=10:Rr>=Y?cr*=5:Rr>=q&&(cr*=2),Rt0?(Yt=Math.floor(Yt/cr)*cr,Rt=Math.ceil(Rt/cr)*cr):cr<0&&(Yt=Math.ceil(Yt*cr)/cr,Rt=Math.floor(Rt*cr)/cr),ur=cr}}function xe(Yt){return Math.ceil(Math.log(o(Yt))/Math.LN2)+1}function we(){var Yt=O,Rt=M,nr=xe;function ur(cr){Array.isArray(cr)||(cr=Array.from(cr));var Rr,Qr=cr.length,Zr,ha=new Array(Qr);for(Rr=0;Rr=un)if(Un>=un&&Rt===M){let Yn=ee(La,un,li);isFinite(Yn)&&(Yn>0?un=(Math.floor(un/Yn)+1)*Yn:Yn<0&&(un=(Math.ceil(un*-Yn)+1)/-Yn))}else Xa.pop()}for(var ja=Xa.length;Xa[0]<=La;)Xa.shift(),--ja;for(;Xa[ja-1]>un;)Xa.pop(),--ja;var Nn=new Array(ja+1),yn;for(Rr=0;Rr<=ja;++Rr)yn=Nn[Rr]=[],yn.x0=Rr>0?Xa[Rr-1]:La,yn.x1=Rr=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr=cr)&&(nr=cr)}return nr}function Se(Yt,Rt){let nr;if(Rt===void 0)for(let ur of Yt)ur!=null&&(nr>ur||nr===void 0&&ur>=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr>cr||nr===void 0&&cr>=cr)&&(nr=cr)}return nr}function Ie(Yt,Rt,nr=0,ur=Yt.length-1,cr=b){for(;ur>nr;){if(ur-nr>600){let ha=ur-nr+1,Pa=Rt-nr+1,La=Math.log(ha),un=.5*Math.exp(2*La/3),Xa=.5*Math.sqrt(La*un*(ha-un)/ha)*(Pa-ha/2<0?-1:1),ja=Math.max(nr,Math.floor(Rt-Pa*un/ha+Xa)),Nn=Math.min(ur,Math.floor(Rt+(ha-Pa)*un/ha+Xa));Ie(Yt,Rt,ja,Nn,cr)}let Rr=Yt[Rt],Qr=nr,Zr=ur;for(Ve(Yt,nr,Rt),cr(Yt[ur],Rr)>0&&Ve(Yt,nr,ur);Qr0;)--Zr}cr(Yt[nr],Rr)===0?Ve(Yt,nr,Zr):(++Zr,Ve(Yt,Zr,ur)),Zr<=Rt&&(nr=Zr+1),Rt<=Zr&&(ur=Zr-1)}return Yt}function Ve(Yt,Rt,nr){let ur=Yt[Rt];Yt[Rt]=Yt[nr],Yt[nr]=ur}function Ge(Yt,Rt,nr){if(Yt=Float64Array.from(e(Yt,nr)),!!(ur=Yt.length)){if((Rt=+Rt)<=0||ur<2)return Se(Yt);if(Rt>=1)return Me(Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=Me(Ie(Yt,Rr).subarray(0,Rr+1)),Zr=Se(Yt.subarray(Rr+1));return Qr+(Zr-Qr)*(cr-Rr)}}function ke(Yt,Rt,nr=l){if(ur=Yt.length){if((Rt=+Rt)<=0||ur<2)return+nr(Yt[0],0,Yt);if(Rt>=1)return+nr(Yt[ur-1],ur-1,Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=+nr(Yt[Rr],Rr,Yt),Zr=+nr(Yt[Rr+1],Rr+1,Yt);return Qr+(Zr-Qr)*(cr-Rr)}}function _e(Yt,Rt,nr){return Math.ceil((nr-Rt)/(2*(Ge(Yt,.75)-Ge(Yt,.25))*Math.pow(o(Yt),-1/3)))}function ce(Yt,Rt,nr){return Math.ceil((nr-Rt)/(3.5*S(Yt)*Math.pow(o(Yt),-1/3)))}function ve(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr=Rr)&&(nr=Rr,ur=cr);return ur}function le(Yt,Rt){let nr=0,ur=0;if(Rt===void 0)for(let cr of Yt)cr!=null&&(cr=+cr)>=cr&&(++nr,ur+=cr);else{let cr=-1;for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(Rr=+Rr)>=Rr&&(++nr,ur+=Rr)}if(nr)return ur/nr}function Ae(Yt,Rt){return Ge(Yt,.5,Rt)}function*Be(Yt){for(let Rt of Yt)yield*ad(Rt)}function Xe(Yt){return Array.from(Be(Yt))}function Ye(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);return ur}function yt(Yt,Rt=gt){let nr=[],ur,cr=!1;for(let Rr of Yt)cr&&nr.push(Rt(ur,Rr)),ur=Rr,cr=!0;return nr}function gt(Yt,Rt){return[Yt,Rt]}function Tt(Yt,Rt,nr){Yt=+Yt,Rt=+Rt,nr=(cr=arguments.length)<2?(Rt=Yt,Yt=0,1):cr<3?1:+nr;for(var ur=-1,cr=Math.max(0,Math.ceil((Rt-Yt)/nr))|0,Rr=new Array(cr);++ur0:b(Qr,Qr)===0)&&(nr=Rr,cr=Qr,ur=!0)}}else for(let cr of Yt)(ur?Rt(cr,nr)>0:Rt(cr,cr)===0)&&(nr=cr,ur=!0);return nr}function _r(Yt,Rt=b){if(Rt.length===1)return ve(Yt,Rt);let nr,ur=-1,cr=-1;for(let Rr of Yt)++cr,(ur<0?Rt(Rr,Rr)===0:Rt(Rr,nr)>0)&&(nr=Rr,ur=cr);return ur}function Xt(Yt,Rt){let nr=$t(Yt,Rt);return nr<0?void 0:nr}var or=Ot(Math.random);function Ot(Yt){return function(nr,ur=0,cr=nr.length){let Rr=cr-(ur=+ur);for(;Rr;){let Qr=Yt()*Rr--|0,Zr=nr[Rr+ur];nr[Rr+ur]=nr[Qr+ur],nr[Qr+ur]=Zr}return nr}}function vt(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&(nr+=ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&(nr+=cr)}return nr}function ht(Yt){if(!(Rr=Yt.length))return[];for(var Rt=-1,nr=Se(Yt,De),ur=new Array(nr);++RtRt(nr,ur,Yt))}function Mt(Yt,Rt,nr){if(typeof Rt!="function")throw new TypeError("reducer is not a function");let ur=Yt[Symbol.iterator](),cr,Rr,Qr=-1;if(arguments.length<3){if({done:cr,value:nr}=ur.next(),cr)return;++Qr}for(;{done:cr,value:Rr}=ur.next(),!cr;)nr=Rt(nr,Rr,++Qr,Yt);return nr}function pt(Yt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Yt).reverse()}function Pt(Yt,...Rt){Yt=new Set(Yt);for(let nr of Rt)for(let ur of nr)Yt.delete(ur);return Yt}function Ct(Yt,Rt){let nr=Rt[Symbol.iterator](),ur=new Set;for(let cr of Yt){if(ur.has(cr))return!1;let Rr,Qr;for(;({value:Rr,done:Qr}=nr.next())&&!Qr;){if(Object.is(cr,Rr))return!1;ur.add(Rr)}}return!0}function qt(Yt){return Yt instanceof Set?Yt:new Set(Yt)}function Vt(Yt,...Rt){Yt=new Set(Yt),Rt=Rt.map(qt);e:for(let nr of Yt)for(let ur of Rt)if(!ur.has(nr)){Yt.delete(nr);continue e}return Yt}function Ht(Yt,Rt){let nr=Yt[Symbol.iterator](),ur=new Set;for(let cr of Rt){if(ur.has(cr))continue;let Rr,Qr;for(;{value:Rr,done:Qr}=nr.next();){if(Qr)return!1;if(ur.add(Rr),Object.is(cr,Rr))break}}return!0}function Sr(Yt,Rt){return Ht(Rt,Yt)}function Kr(...Yt){let Rt=new Set;for(let nr of Yt)for(let ur of nr)Rt.add(ur);return Rt}p.Adder=C,p.InternMap=f,p.InternSet=u,p.ascending=b,p.bin=we,p.bisect=n,p.bisectCenter=a,p.bisectLeft=r,p.bisectRight=n,p.bisector=E,p.count=o,p.cross=v,p.cumsum=g,p.descending=i,p.deviation=S,p.difference=Pt,p.disjoint=Ct,p.every=We,p.extent=M,p.fcumsum=T,p.filter=Je,p.fsum=_,p.greatest=rr,p.greatestIndex=_r,p.group=D,p.groupSort=se,p.groups=B,p.histogram=we,p.index=j,p.indexes=U,p.intersection=Vt,p.least=At,p.leastIndex=$t,p.map=et,p.max=Me,p.maxIndex=ve,p.mean=le,p.median=Ae,p.merge=Xe,p.min=Se,p.minIndex=Ye,p.nice=he,p.pairs=yt,p.permute=re,p.quantile=Ge,p.quantileSorted=ke,p.quickselect=Ie,p.range=Tt,p.reduce=Mt,p.reverse=pt,p.rollup=F,p.rollups=P,p.scan=Xt,p.shuffle=or,p.shuffler=Ot,p.some=Ke,p.sort=ne,p.subset=Sr,p.sum=vt,p.superset=Ht,p.thresholdFreedmanDiaconis=_e,p.thresholdScott=ce,p.thresholdSturges=xe,p.tickIncrement=ee,p.tickStep=ae,p.ticks=Z,p.transpose=ht,p.union=Kr,p.variance=w,p.zip=Ne,Object.defineProperty(p,"__esModule",{value:!0})})}}),kV=ze({"node_modules/d3-path/dist/d3-path.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";var b=Math.PI,E=2*b,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(n,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,r){this._+="L"+(this._x1=+n)+","+(this._y1=+r)},quadraticCurveTo:function(n,r,a,o){this._+="Q"+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},bezierCurveTo:function(n,r,a,o,s,c){this._+="C"+ +n+","+ +r+","+ +a+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(n,r,a,o,s){n=+n,r=+r,a=+a,o=+o,s=+s;var c=this._x1,m=this._y1,h=a-n,v=o-r,g=c-n,i=m-r,w=g*g+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=r);else if(w>k)if(!(Math.abs(i*h-v*g)>k)||!s)this._+="L"+(this._x1=n)+","+(this._y1=r);else{var S=a-c,M=o-m,C=h*h+v*v,_=S*S+M*M,T=Math.sqrt(C),f=Math.sqrt(w),u=s*Math.tan((b-Math.acos((C+w-_)/(2*T*f)))/2),A=u/f,x=u/T;Math.abs(A-1)>k&&(this._+="L"+(n+A*g)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>g*M)+","+(this._x1=n+x*h)+","+(this._y1=r+x*v)}},arc:function(n,r,a,o,s,c){n=+n,r=+r,a=+a,c=!!c;var m=a*Math.cos(o),h=a*Math.sin(o),v=n+m,g=r+h,i=1^c,w=c?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+v+","+g:(Math.abs(this._x1-v)>k||Math.abs(this._y1-g)>k)&&(this._+="L"+v+","+g),a&&(w<0&&(w=w%E+E),w>l?this._+="A"+a+","+a+",0,1,"+i+","+(n-m)+","+(r-h)+"A"+a+","+a+",0,1,"+i+","+(this._x1=v)+","+(this._y1=g):w>k&&(this._+="A"+a+","+a+",0,"+ +(w>=b)+","+i+","+(this._x1=n+a*Math.cos(s))+","+(this._y1=r+a*Math.sin(s))))},rect:function(n,r,a,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)+"h"+ +a+"v"+ +o+"h"+-a+"Z"},toString:function(){return this._}},p.path=t,Object.defineProperty(p,"__esModule",{value:!0})})}}),BM=ze({"node_modules/d3-shape/dist/d3-shape.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kV()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(ot){return function(){return ot}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,n=Math.min,r=Math.sin,a=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,m=2*s;function h(ot){return ot>1?0:ot<-1?s:Math.acos(ot)}function v(ot){return ot>=1?c:ot<=-1?-c:Math.asin(ot)}function g(ot){return ot.innerRadius}function i(ot){return ot.outerRadius}function w(ot){return ot.startAngle}function S(ot){return ot.endAngle}function M(ot){return ot&&ot.padAngle}function C(ot,kt,jt,ar,Er,xr,zr,Lr){var aa=jt-ot,Sa=ar-kt,wa=zr-Er,pn=Lr-xr,tn=pn*aa-wa*Sa;if(!(tn*tnHi*Hi+Mi*Mi&&(gi=io,qi=oo),{cx:gi,cy:qi,x01:-wa,y01:-pn,x11:gi*(Er/jn-1),y11:qi*(Er/jn-1)}}function T(){var ot=g,kt=i,jt=E(0),ar=null,Er=w,xr=S,zr=M,Lr=null;function aa(){var Sa,wa,pn=+ot.apply(this,arguments),tn=+kt.apply(this,arguments),ai=Er.apply(this,arguments)-c,rn=xr.apply(this,arguments)-c,Ri=k(rn-ai),Gn=rn>ai;if(Lr||(Lr=Sa=b.path()),tno))Lr.moveTo(0,0);else if(Ri>m-o)Lr.moveTo(tn*e(ai),tn*r(ai)),Lr.arc(0,0,tn,ai,rn,!Gn),pn>o&&(Lr.moveTo(pn*e(rn),pn*r(rn)),Lr.arc(0,0,pn,rn,ai,Gn));else{var no=ai,Di=rn,fn=ai,Ai=rn,jn=Ri,Xn=Ri,eo=zr.apply(this,arguments)/2,gi=eo>o&&(ar?+ar.apply(this,arguments):a(pn*pn+tn*tn)),qi=n(k(tn-pn)/2,+jt.apply(this,arguments)),io=qi,oo=qi,Vn,qn;if(gi>o){var Hi=v(gi/pn*r(eo)),Mi=v(gi/tn*r(eo));(jn-=Hi*2)>o?(Hi*=Gn?1:-1,fn+=Hi,Ai-=Hi):(jn=0,fn=Ai=(ai+rn)/2),(Xn-=Mi*2)>o?(Mi*=Gn?1:-1,no+=Mi,Di-=Mi):(Xn=0,no=Di=(ai+rn)/2)}var Ro=tn*e(no),go=tn*r(no),Eo=pn*e(Ai),Ao=pn*r(Ai);if(qi>o){var ds=tn*e(Di),jo=tn*r(Di),Wo=pn*e(fn),to=pn*r(fn),wo;if(Rio?oo>o?(Vn=_(Wo,to,Ro,go,tn,oo,Gn),qn=_(ds,jo,Eo,Ao,tn,oo,Gn),Lr.moveTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),ooo)||!(jn>o)?Lr.lineTo(Eo,Ao):io>o?(Vn=_(Eo,Ao,ds,jo,pn,-io,Gn),qn=_(Ro,go,Wo,to,pn,-io,Gn),Lr.lineTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),io=tn;--ai)Lr.point(Di[ai],fn[ai]);Lr.lineEnd(),Lr.areaEnd()}Gn&&(Di[pn]=+ot(Ri,pn,wa),fn[pn]=+jt(Ri,pn,wa),Lr.point(kt?+kt(Ri,pn,wa):Di[pn],ar?+ar(Ri,pn,wa):fn[pn]))}if(no)return Lr=null,no+""||null}function Sa(){return z().defined(Er).curve(zr).context(xr)}return aa.x=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),kt=null,aa):ot},aa.x0=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),aa):ot},aa.x1=function(wa){return arguments.length?(kt=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):kt},aa.y=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),ar=null,aa):jt},aa.y0=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),aa):jt},aa.y1=function(wa){return arguments.length?(ar=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):ar},aa.lineX0=aa.lineY0=function(){return Sa().x(ot).y(jt)},aa.lineY1=function(){return Sa().x(ot).y(ar)},aa.lineX1=function(){return Sa().x(kt).y(jt)},aa.defined=function(wa){return arguments.length?(Er=typeof wa=="function"?wa:E(!!wa),aa):Er},aa.curve=function(wa){return arguments.length?(zr=wa,xr!=null&&(Lr=zr(xr)),aa):zr},aa.context=function(wa){return arguments.length?(wa==null?xr=Lr=null:Lr=zr(xr=wa),aa):xr},aa}function O(ot,kt){return ktot?1:kt>=ot?0:NaN}function D(ot){return ot}function B(){var ot=D,kt=O,jt=null,ar=E(0),Er=E(m),xr=E(0);function zr(Lr){var aa,Sa=Lr.length,wa,pn,tn=0,ai=new Array(Sa),rn=new Array(Sa),Ri=+ar.apply(this,arguments),Gn=Math.min(m,Math.max(-m,Er.apply(this,arguments)-Ri)),no,Di=Math.min(Math.abs(Gn)/Sa,xr.apply(this,arguments)),fn=Di*(Gn<0?-1:1),Ai;for(aa=0;aa0&&(tn+=Ai);for(kt!=null?ai.sort(function(jn,Xn){return kt(rn[jn],rn[Xn])}):jt!=null&&ai.sort(function(jn,Xn){return jt(Lr[jn],Lr[Xn])}),aa=0,pn=tn?(Gn-Sa*fn)/tn:0;aa0?Ai*pn:0)+fn,rn[wa]={data:Lr[wa],index:aa,value:Ai,startAngle:Ri,endAngle:no,padAngle:Di};return rn}return zr.value=function(Lr){return arguments.length?(ot=typeof Lr=="function"?Lr:E(+Lr),zr):ot},zr.sortValues=function(Lr){return arguments.length?(kt=Lr,jt=null,zr):kt},zr.sort=function(Lr){return arguments.length?(jt=Lr,kt=null,zr):jt},zr.startAngle=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.endAngle=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.padAngle=function(Lr){return arguments.length?(xr=typeof Lr=="function"?Lr:E(+Lr),zr):xr},zr}var F=j(u);function P(ot){this._curve=ot}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ot,kt){this._curve.point(kt*Math.sin(ot),kt*-Math.cos(ot))}};function j(ot){function kt(jt){return new P(ot(jt))}return kt._curve=ot,kt}function U(ot){var kt=ot.curve;return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot.curve=function(jt){return arguments.length?kt(j(jt)):kt()._curve},ot}function $(){return U(z().curve(F))}function Q(){var ot=I().curve(F),kt=ot.curve,jt=ot.lineX0,ar=ot.lineX1,Er=ot.lineY0,xr=ot.lineY1;return ot.angle=ot.x,delete ot.x,ot.startAngle=ot.x0,delete ot.x0,ot.endAngle=ot.x1,delete ot.x1,ot.radius=ot.y,delete ot.y,ot.innerRadius=ot.y0,delete ot.y0,ot.outerRadius=ot.y1,delete ot.y1,ot.lineStartAngle=function(){return U(jt())},delete ot.lineX0,ot.lineEndAngle=function(){return U(ar())},delete ot.lineX1,ot.lineInnerRadius=function(){return U(Er())},delete ot.lineY0,ot.lineOuterRadius=function(){return U(xr())},delete ot.lineY1,ot.curve=function(zr){return arguments.length?kt(j(zr)):kt()._curve},ot}function re(ot,kt){return[(kt=+kt)*Math.cos(ot-=Math.PI/2),kt*Math.sin(ot)]}var ne=Array.prototype.slice;function se(ot){return ot.source}function G(ot){return ot.target}function X(ot){var kt=se,jt=G,ar=A,Er=x,xr=null;function zr(){var Lr,aa=ne.call(arguments),Sa=kt.apply(this,aa),wa=jt.apply(this,aa);if(xr||(xr=Lr=b.path()),ot(xr,+ar.apply(this,(aa[0]=Sa,aa)),+Er.apply(this,aa),+ar.apply(this,(aa[0]=wa,aa)),+Er.apply(this,aa)),Lr)return xr=null,Lr+""||null}return zr.source=function(Lr){return arguments.length?(kt=Lr,zr):kt},zr.target=function(Lr){return arguments.length?(jt=Lr,zr):jt},zr.x=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.y=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.context=function(Lr){return arguments.length?(xr=Lr??null,zr):xr},zr}function K(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt=(kt+ar)/2,jt,kt,Er,ar,Er)}function H(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt,jt=(jt+Er)/2,ar,jt,ar,Er)}function Y(ot,kt,jt,ar,Er){var xr=re(kt,jt),zr=re(kt,jt=(jt+Er)/2),Lr=re(ar,jt),aa=re(ar,Er);ot.moveTo(xr[0],xr[1]),ot.bezierCurveTo(zr[0],zr[1],Lr[0],Lr[1],aa[0],aa[1])}function q(){return X(K)}function Z(){return X(H)}function ee(){var ot=X(Y);return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot}var ae={draw:function(ot,kt){var jt=Math.sqrt(kt/s);ot.moveTo(jt,0),ot.arc(0,0,jt,0,m)}},he={draw:function(ot,kt){var jt=Math.sqrt(kt/5)/2;ot.moveTo(-3*jt,-jt),ot.lineTo(-jt,-jt),ot.lineTo(-jt,-3*jt),ot.lineTo(jt,-3*jt),ot.lineTo(jt,-jt),ot.lineTo(3*jt,-jt),ot.lineTo(3*jt,jt),ot.lineTo(jt,jt),ot.lineTo(jt,3*jt),ot.lineTo(-jt,3*jt),ot.lineTo(-jt,jt),ot.lineTo(-3*jt,jt),ot.closePath()}},xe=Math.sqrt(1/3),we=xe*2,Me={draw:function(ot,kt){var jt=Math.sqrt(kt/we),ar=jt*xe;ot.moveTo(0,-jt),ot.lineTo(ar,0),ot.lineTo(0,jt),ot.lineTo(-ar,0),ot.closePath()}},Se=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ve=Math.sin(m/10)*Ie,Ge=-Math.cos(m/10)*Ie,ke={draw:function(ot,kt){var jt=Math.sqrt(kt*Se),ar=Ve*jt,Er=Ge*jt;ot.moveTo(0,-jt),ot.lineTo(ar,Er);for(var xr=1;xr<5;++xr){var zr=m*xr/5,Lr=Math.cos(zr),aa=Math.sin(zr);ot.lineTo(aa*jt,-Lr*jt),ot.lineTo(Lr*ar-aa*Er,aa*ar+Lr*Er)}ot.closePath()}},_e={draw:function(ot,kt){var jt=Math.sqrt(kt),ar=-jt/2;ot.rect(ar,ar,jt,jt)}},ce=Math.sqrt(3),ve={draw:function(ot,kt){var jt=-Math.sqrt(kt/(ce*3));ot.moveTo(0,jt*2),ot.lineTo(-ce*jt,-jt),ot.lineTo(ce*jt,-jt),ot.closePath()}},le=-.5,Ae=Math.sqrt(3)/2,Be=1/Math.sqrt(12),Xe=(Be/2+1)*3,Ye={draw:function(ot,kt){var jt=Math.sqrt(kt/Xe),ar=jt/2,Er=jt*Be,xr=ar,zr=jt*Be+jt,Lr=-xr,aa=zr;ot.moveTo(ar,Er),ot.lineTo(xr,zr),ot.lineTo(Lr,aa),ot.lineTo(le*ar-Ae*Er,Ae*ar+le*Er),ot.lineTo(le*xr-Ae*zr,Ae*xr+le*zr),ot.lineTo(le*Lr-Ae*aa,Ae*Lr+le*aa),ot.lineTo(le*ar+Ae*Er,le*Er-Ae*ar),ot.lineTo(le*xr+Ae*zr,le*zr-Ae*xr),ot.lineTo(le*Lr+Ae*aa,le*aa-Ae*Lr),ot.closePath()}},yt=[ae,he,Me,_e,ke,ve,Ye];function gt(){var ot=E(ae),kt=E(64),jt=null;function ar(){var Er;if(jt||(jt=Er=b.path()),ot.apply(this,arguments).draw(jt,+kt.apply(this,arguments)),Er)return jt=null,Er+""||null}return ar.type=function(Er){return arguments.length?(ot=typeof Er=="function"?Er:E(Er),ar):ot},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(jt=Er??null,ar):jt},ar}function Tt(){}function At(ot,kt,jt){ot._context.bezierCurveTo((2*ot._x0+ot._x1)/3,(2*ot._y0+ot._y1)/3,(ot._x0+2*ot._x1)/3,(ot._y0+2*ot._y1)/3,(ot._x0+4*ot._x1+kt)/6,(ot._y0+4*ot._y1+jt)/6)}function $t(ot){this._context=ot}$t.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:At(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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);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:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function rr(ot){return new $t(ot)}function _r(ot){this._context=ot}_r.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x2=ot,this._y2=kt;break;case 1:this._point=2,this._x3=ot,this._y3=kt;break;case 2:this._point=3,this._x4=ot,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+ot)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Xt(ot){return new _r(ot)}function or(ot){this._context=ot}or.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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var jt=(this._x0+4*this._x1+ot)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(jt,ar):this._context.moveTo(jt,ar);break;case 3:this._point=4;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Ot(ot){return new or(ot)}function vt(ot,kt){this._basis=new $t(ot),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length-1;if(jt>0)for(var ar=ot[0],Er=kt[0],xr=ot[jt]-ar,zr=kt[jt]-Er,Lr=-1,aa;++Lr<=jt;)aa=Lr/jt,this._basis.point(this._beta*ot[Lr]+(1-this._beta)*(ar+aa*xr),this._beta*kt[Lr]+(1-this._beta)*(Er+aa*zr));this._x=this._y=null,this._basis.lineEnd()},point:function(ot,kt){this._x.push(+ot),this._y.push(+kt)}};var ht=function ot(kt){function jt(ar){return kt===1?new $t(ar):new vt(ar,kt)}return jt.beta=function(ar){return ot(+ar)},jt}(.85);function De(ot,kt,jt){ot._context.bezierCurveTo(ot._x1+ot._k*(ot._x2-ot._x0),ot._y1+ot._k*(ot._y2-ot._y0),ot._x2+ot._k*(ot._x1-kt),ot._y2+ot._k*(ot._y1-jt),ot._x2,ot._y2)}function Ne(ot,kt){this._context=ot,this._k=(1-kt)/6}Ne.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:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2,this._x1=ot,this._y1=kt;break;case 2:this._point=3;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var We=function ot(kt){function jt(ar){return new Ne(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function Ke(ot,kt){this._context=ot,this._k=(1-kt)/6}Ke.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Je=function ot(kt){function jt(ar){return new Ke(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function et(ot,kt){this._context=ot,this._k=(1-kt)/6}et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,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:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function ot(kt){function jt(ar){return new et(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function pt(ot,kt,jt){var ar=ot._x1,Er=ot._y1,xr=ot._x2,zr=ot._y2;if(ot._l01_a>o){var Lr=2*ot._l01_2a+3*ot._l01_a*ot._l12_a+ot._l12_2a,aa=3*ot._l01_a*(ot._l01_a+ot._l12_a);ar=(ar*Lr-ot._x0*ot._l12_2a+ot._x2*ot._l01_2a)/aa,Er=(Er*Lr-ot._y0*ot._l12_2a+ot._y2*ot._l01_2a)/aa}if(ot._l23_a>o){var Sa=2*ot._l23_2a+3*ot._l23_a*ot._l12_a+ot._l12_2a,wa=3*ot._l23_a*(ot._l23_a+ot._l12_a);xr=(xr*Sa+ot._x1*ot._l23_2a-kt*ot._l12_2a)/wa,zr=(zr*Sa+ot._y1*ot._l23_2a-jt*ot._l12_2a)/wa}ot._context.bezierCurveTo(ar,Er,xr,zr,ot._x2,ot._y2)}function Pt(ot,kt){this._context=ot,this._alpha=kt}Pt.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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:pt(this,ot,kt);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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function ot(kt){function jt(ar){return kt?new Pt(ar,kt):new Ne(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function qt(ot,kt){this._context=ot,this._alpha=kt}qt.prototype={areaStart:Tt,areaEnd:Tt,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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:pt(this,ot,kt);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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Vt=function ot(kt){function jt(ar){return kt?new qt(ar,kt):new Ke(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Ht(ot,kt){this._context=ot,this._alpha=kt}Ht.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(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,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:pt(this,ot,kt);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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function ot(kt){function jt(ar){return kt?new Ht(ar,kt):new et(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Kr(ot){this._context=ot}Kr.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ot,kt){ot=+ot,kt=+kt,this._point?this._context.lineTo(ot,kt):(this._point=1,this._context.moveTo(ot,kt))}};function Yt(ot){return new Kr(ot)}function Rt(ot){return ot<0?-1:1}function nr(ot,kt,jt){var ar=ot._x1-ot._x0,Er=kt-ot._x1,xr=(ot._y1-ot._y0)/(ar||Er<0&&-0),zr=(jt-ot._y1)/(Er||ar<0&&-0),Lr=(xr*Er+zr*ar)/(ar+Er);return(Rt(xr)+Rt(zr))*Math.min(Math.abs(xr),Math.abs(zr),.5*Math.abs(Lr))||0}function ur(ot,kt){var jt=ot._x1-ot._x0;return jt?(3*(ot._y1-ot._y0)/jt-kt)/2:kt}function cr(ot,kt,jt){var ar=ot._x0,Er=ot._y0,xr=ot._x1,zr=ot._y1,Lr=(xr-ar)/3;ot._context.bezierCurveTo(ar+Lr,Er+Lr*kt,xr-Lr,zr-Lr*jt,xr,zr)}function Rr(ot){this._context=ot}Rr.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:cr(this,this._t0,ur(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){var jt=NaN;if(ot=+ot,kt=+kt,!(ot===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,cr(this,ur(this,jt=nr(this,ot,kt)),jt);break;default:cr(this,this._t0,jt=nr(this,ot,kt));break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt,this._t0=jt}}};function Qr(ot){this._context=new Zr(ot)}(Qr.prototype=Object.create(Rr.prototype)).point=function(ot,kt){Rr.prototype.point.call(this,kt,ot)};function Zr(ot){this._context=ot}Zr.prototype={moveTo:function(ot,kt){this._context.moveTo(kt,ot)},closePath:function(){this._context.closePath()},lineTo:function(ot,kt){this._context.lineTo(kt,ot)},bezierCurveTo:function(ot,kt,jt,ar,Er,xr){this._context.bezierCurveTo(kt,ot,ar,jt,xr,Er)}};function ha(ot){return new Rr(ot)}function Pa(ot){return new Qr(ot)}function La(ot){this._context=ot}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length;if(jt)if(this._line?this._context.lineTo(ot[0],kt[0]):this._context.moveTo(ot[0],kt[0]),jt===2)this._context.lineTo(ot[1],kt[1]);else for(var ar=un(ot),Er=un(kt),xr=0,zr=1;zr=0;--kt)Er[kt]=(zr[kt]-Er[kt+1])/xr[kt];for(xr[jt-1]=(ot[jt]+Er[jt-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(ot,kt);else{var jt=this._x*(1-this._t)+ot*this._t;this._context.lineTo(jt,this._y),this._context.lineTo(jt,kt)}break}}this._x=ot,this._y=kt}};function Nn(ot){return new ja(ot,.5)}function yn(ot){return new ja(ot,0)}function Un(ot){return new ja(ot,1)}function li(ot,kt){if((zr=ot.length)>1)for(var jt=1,ar,Er,xr=ot[kt[0]],zr,Lr=xr.length;jt=0;)jt[kt]=kt;return jt}function on(ot,kt){return ot[kt]}function en(){var ot=E([]),kt=Yn,jt=li,ar=on;function Er(xr){var zr=ot.apply(this,arguments),Lr,aa=xr.length,Sa=zr.length,wa=new Array(Sa),pn;for(Lr=0;Lr0){for(var jt,ar,Er=0,xr=ot[0].length,zr;Er0)for(var jt,ar=0,Er,xr,zr,Lr,aa,Sa=ot[kt[0]].length;ar0?(Er[0]=zr,Er[1]=zr+=xr):xr<0?(Er[1]=Lr,Er[0]=Lr+=xr):(Er[0]=0,Er[1]=xr)}function Ja(ot,kt){if((Er=ot.length)>0){for(var jt=0,ar=ot[kt[0]],Er,xr=ar.length;jt0)||!((xr=(Er=ot[kt[0]]).length)>0))){for(var jt=0,ar=1,Er,xr,zr;arxr&&(xr=Er,jt=kt);return jt}function fr(ot){var kt=ot.map(lr);return Yn(ot).sort(function(jt,ar){return kt[jt]-kt[ar]})}function lr(ot){for(var kt=0,jt=-1,ar=ot.length,Er;++jt[I(Ve,Ge,Me),Ve]));for(let[Ve,Ge]of Se.entries()){Ge.index=Ve;let{source:ke,target:_e}=Ge;typeof ke!="object"&&(ke=Ge.source=g(Ie,ke)),typeof _e!="object"&&(_e=Ge.target=g(Ie,_e)),ke.sourceLinks.push(Ge),_e.targetLinks.push(Ge)}if(B!=null)for(let{sourceLinks:Ve,targetLinks:Ge}of Me)Ve.sort(B),Ge.sort(B)}function re({nodes:Me}){for(let Se of Me)Se.value=Se.fixedValue===void 0?Math.max(b.sum(Se.sourceLinks,c),b.sum(Se.targetLinks,c)):Se.fixedValue}function ne({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.depth=Ge;for(let{target:_e}of ke.sourceLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function se({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.height=Ge;for(let{source:_e}of ke.targetLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function G({nodes:Me}){let Se=b.max(Me,Ge=>Ge.depth)+1,Ie=(f-_-A)/(Se-1),Ve=new Array(Se);for(let Ge of Me){let ke=Math.max(0,Math.min(Se-1,Math.floor(O.call(null,Ge,Se))));Ge.layer=ke,Ge.x0=_+ke*Ie,Ge.x1=Ge.x0+A,Ve[ke]?Ve[ke].push(Ge):Ve[ke]=[Ge]}if(D)for(let Ge of Ve)Ge.sort(D);return Ve}function X(Me){let Se=b.min(Me,Ie=>(u-T-(Ie.length-1)*z)/b.sum(Ie,c));for(let Ie of Me){let Ve=T;for(let Ge of Ie){Ge.y0=Ve,Ge.y1=Ve+Ge.value*Se,Ve=Ge.y1+z;for(let ke of Ge.sourceLinks)ke.width=ke.value*Se}Ve=(u-Ve+z)/(Ie.length+1);for(let Ge=0;GeIe.length)-1)),X(Se);for(let Ie=0;Ie0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function Y(Me,Se,Ie){for(let Ve=Me.length,Ge=Ve-2;Ge>=0;--Ge){let ke=Me[Ge];for(let _e of ke){let ce=0,ve=0;for(let{target:Ae,value:Be}of _e.sourceLinks){let Xe=Be*(Ae.layer-_e.layer);ce+=we(_e,Ae)*Xe,ve+=Xe}if(!(ve>0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function q(Me,Se){let Ie=Me.length>>1,Ve=Me[Ie];ee(Me,Ve.y0-z,Ie-1,Se),Z(Me,Ve.y1+z,Ie+1,Se),ee(Me,u,Me.length-1,Se),Z(Me,T,0,Se)}function Z(Me,Se,Ie,Ve){for(;Ie1e-6&&(Ge.y0+=ke,Ge.y1+=ke),Se=Ge.y1+z}}function ee(Me,Se,Ie,Ve){for(;Ie>=0;--Ie){let Ge=Me[Ie],ke=(Ge.y1-Se)*Ve;ke>1e-6&&(Ge.y0-=ke,Ge.y1-=ke),Se=Ge.y0-z}}function ae({sourceLinks:Me,targetLinks:Se}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Se)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Me)Ie.sort(a)}}function he(Me){if(B===void 0)for(let{sourceLinks:Se,targetLinks:Ie}of Me)Se.sort(o),Ie.sort(a)}function xe(Me,Se){let Ie=Me.y0-(Me.sourceLinks.length-1)*z/2;for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie+=Ge+z}for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie-=Ge}return Ie}function we(Me,Se){let Ie=Se.y0-(Se.targetLinks.length-1)*z/2;for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie+=Ge+z}for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie-=Ge}return Ie}return $}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}p.sankey=w,p.sankeyCenter=n,p.sankeyJustify=t,p.sankeyLeft=l,p.sankeyLinkHorizontal=C,p.sankeyRight=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),LV=ze({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q=M})}function h(M){m(M);for(var C=E,_=p(C),T=_.components.filter(function(O){return O.length>1}),f=1/0,u,A=0;A"u"?"undefined":s(Ne))!=="object"&&(Ne=ht.source=_(vt,Ne)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=ht.target=_(vt,We)),Ne.sourceLinks.push(ht),We.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(b.sum(vt.sourceLinks,v),b.sum(vt.targetLinks,v)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function $t(Ot){var vt=0,ht=0,De=0,Ne=0,We=b.max(Ot.nodes,function(Ke){return Ke.column});return Ot.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?vt=vt+Ke.width:ht=ht+Ke.width,Ke.target.column==0&&(Ne=Ne+Ke.width),Ke.source.column==We&&(De=De+Ke.width))}),vt=vt>0?vt+f+u:vt,ht=ht>0?ht+f+u:ht,De=De>0?De+f+u:De,Ne=Ne>0?Ne+f+u:Ne,{top:vt,bottom:ht,left:Ne,right:De}}function rr(Ot,vt){var ht=b.max(Ot.nodes,function(Mt){return Mt.column}),De=Ve-Se,Ne=Ge-Ie,We=De+vt.right+vt.left,Ke=Ne+vt.top+vt.bottom,Je=De/We,et=Ne/Ke;return Se=Se*Je+vt.left,Ve=vt.right==0?Ve:Ve*Je,Ie=Ie*et+vt.top,Ge=Ge*et,Ot.nodes.forEach(function(Mt){Mt.x0=Se+Mt.column*((Ve-Se-ke)/ht),Mt.x1=Mt.x0+ke}),et}function _r(Ot){var vt,ht,De;for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.depth=De,Ne.sourceLinks.forEach(function(We){ht.indexOf(We.target)<0&&!We.circular&&ht.push(We.target)})});for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.height=De,Ne.targetLinks.forEach(function(We){ht.indexOf(We.source)<0&&!We.circular&&ht.push(We.source)})});Ot.nodes.forEach(function(Ne){Ne.column=Math.floor(ve.call(null,Ne,De))})}function Xt(Ot,vt,ht){var De=E.nest().key(function(Mt){return Mt.column}).sortKeys(b.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});Ke(ht),et();for(var Ne=1,We=vt;We>0;--We)Je(Ne*=.99,ht),et();function Ke(Mt){if(Ye){var pt=1/0;De.forEach(function(Vt){var Ht=Ge*Ye/(Vt.length+1);pt=Ht0))if(Vt==0&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else if(Vt==Pt-1&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else{var Kr=0,Yt=b.mean(Ht.sourceLinks,w),Rt=b.mean(Ht.targetLinks,i);Yt&&Rt?Kr=(Yt+Rt)/2:Kr=Yt||Rt;var nr=(Kr-g(Ht))*Mt;Ht.y0+=nr,Ht.y1+=nr}})})}function et(){De.forEach(function(Mt){var pt,Pt,Ct=Ie,qt=Mt.length,Vt;for(Mt.sort(h),Vt=0;Vt0&&(pt.y0+=Pt,pt.y1+=Pt),Ct=pt.y1+_e;if(Pt=Ct-_e-Ge,Pt>0)for(Ct=pt.y0-=Pt,pt.y1-=Pt,Vt=qt-2;Vt>=0;--Vt)pt=Mt[Vt],Pt=pt.y1+_e-Ct,Pt>0&&(pt.y0-=Pt,pt.y1-=Pt),Ct=pt.y0})}}function or(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(m),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,De=ht,Ne=vt.y1,We=Ne;vt.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Ne-Ke.width/2,Ne=Ne-Ke.width):(Ke.y0=ht+Ke.width/2,ht+=Ke.width)}),vt.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=De+Ke.width/2,De+=Ke.width)})})}return gt}function z(Se,Ie,Ve){var Ge=0;if(Ve===null){for(var ke=[],_e=0;_eIe.source.column)}function B(Se,Ie){var Ve=0;Se.sourceLinks.forEach(function(ke){Ve=ke.circular&&!we(ke,Ie)?Ve+1:Ve});var Ge=0;return Se.targetLinks.forEach(function(ke){Ge=ke.circular&&!we(ke,Ie)?Ge+1:Ge}),Ve+Ge}function F(Se){var Ie=Se.source.sourceLinks,Ve=0;Ie.forEach(function(_e){Ve=_e.circular?Ve+1:Ve});var Ge=Se.target.targetLinks,ke=0;return Ge.forEach(function(_e){ke=_e.circular?ke+1:ke}),!(Ve>1||ke>1)}function P(Se,Ie,Ve){return Se.sort($),Se.forEach(function(Ge,ke){var _e=0;if(we(Ge,Ve)&&F(Ge))Ge.circularPathData.verticalBuffer=_e+Ge.width/2;else{var ce=0;for(ce;ce_e?ve:_e}Ge.circularPathData.verticalBuffer=_e+Ge.width/2}}),Se}function j(Se,Ie,Ve,Ge){var ke=5,_e=b.min(Se.links,function(le){return le.source.y0});Se.links.forEach(function(le){le.circular&&(le.circularPathData={})});var ce=Se.links.filter(function(le){return le.circularLinkType=="top"});P(ce,Ie,Ge);var ve=Se.links.filter(function(le){return le.circularLinkType=="bottom"});P(ve,Ie,Ge),Se.links.forEach(function(le){if(le.circular){if(le.circularPathData.arcRadius=le.width+u,le.circularPathData.leftNodeBuffer=ke,le.circularPathData.rightNodeBuffer=ke,le.circularPathData.sourceWidth=le.source.x1-le.source.x0,le.circularPathData.sourceX=le.source.x0+le.circularPathData.sourceWidth,le.circularPathData.targetX=le.target.x0,le.circularPathData.sourceY=le.y0,le.circularPathData.targetY=le.y1,we(le,Ge)&&F(le))le.circularPathData.leftSmallArcRadius=u+le.width/2,le.circularPathData.leftLargeArcRadius=u+le.width/2,le.circularPathData.rightSmallArcRadius=u+le.width/2,le.circularPathData.rightLargeArcRadius=u+le.width/2,le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=le.source.y1+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=le.source.y0-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius);else{var Ae=le.source.column,Be=le.circularLinkType,Xe=Se.links.filter(function(gt){return gt.source.column==Ae&>.circularLinkType==Be});le.circularLinkType=="bottom"?Xe.sort(re):Xe.sort(Q);var Ye=0;Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.leftSmallArcRadius=u+le.width/2+Ye,le.circularPathData.leftLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),Ae=le.target.column,Xe=Se.links.filter(function(gt){return gt.target.column==Ae&>.circularLinkType==Be}),le.circularLinkType=="bottom"?Xe.sort(se):Xe.sort(ne),Ye=0,Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.rightSmallArcRadius=u+le.width/2+Ye,le.circularPathData.rightLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=Math.max(Ve,le.source.y1,le.target.y1)+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=_e-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius)}le.circularPathData.leftInnerExtent=le.circularPathData.sourceX+le.circularPathData.leftNodeBuffer,le.circularPathData.rightInnerExtent=le.circularPathData.targetX-le.circularPathData.rightNodeBuffer,le.circularPathData.leftFullExtent=le.circularPathData.sourceX+le.circularPathData.leftLargeArcRadius+le.circularPathData.leftNodeBuffer,le.circularPathData.rightFullExtent=le.circularPathData.targetX-le.circularPathData.rightLargeArcRadius-le.circularPathData.rightNodeBuffer}if(le.circular)le.path=U(le);else{var yt=k.linkHorizontal().source(function(gt){var Tt=gt.source.x0+(gt.source.x1-gt.source.x0),At=gt.y0;return[Tt,At]}).target(function(gt){var Tt=gt.target.x0,At=gt.y1;return[Tt,At]});le.path=yt(le)}})}function U(Se){var Ie="";return Se.circularLinkType=="top"?Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ie}function $(Se,Ie){return G(Se)==G(Ie)?Se.circularLinkType=="bottom"?re(Se,Ie):Q(Se,Ie):G(Ie)-G(Se)}function Q(Se,Ie){return Se.y0-Ie.y0}function re(Se,Ie){return Ie.y0-Se.y0}function ne(Se,Ie){return Se.y1-Ie.y1}function se(Se,Ie){return Ie.y1-Se.y1}function G(Se){return Se.target.column-Se.source.column}function X(Se){return Se.target.x0-Se.source.x1}function K(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1+Ge:Se.y1-Ge;return ke}function H(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1-Ge:Se.y1+Ge;return ke}function Y(Se,Ie,Ve,Ge){Se.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var _e=ke.source.column+1,ce=ke.target.column-1,ve=1,le=ce-_e+1;for(ve=1;_e<=ce;_e++,ve++)Se.nodes.forEach(function(Ae){if(Ae.column==_e){var Be=ve/(le+1),Xe=Math.pow(1-Be,3),Ye=3*Be*Math.pow(1-Be,2),yt=3*Math.pow(Be,2)*(1-Be),gt=Math.pow(Be,3),Tt=Xe*ke.y0+Ye*ke.y0+yt*ke.y1+gt*ke.y1,At=Tt-ke.width/2,$t=Tt+ke.width/2,rr;At>Ae.y0&&AtAe.y0&&$tAe.y1&&Z(_r,rr,Ie,Ve)})):AtAe.y1&&(rr=$t-Ae.y0+10,Ae=Z(Ae,rr,Ie,Ve),Se.nodes.forEach(function(_r){T(_r,Ge)==T(Ae,Ge)||_r.column!=Ae.column||_r.y0Ae.y1&&Z(_r,rr,Ie,Ve)}))}})}})}function q(Se,Ie){return Se.y0>Ie.y0&&Se.y0Ie.y0&&Se.y1Ie.y1}function Z(Se,Ie,Ve,Ge){return Se.y0+Ie>=Ve&&Se.y1+Ie<=Ge&&(Se.y0=Se.y0+Ie,Se.y1=Se.y1+Ie,Se.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Se.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Se}function ee(Se,Ie,Ve,Ge){Se.nodes.forEach(function(ke){Ge&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var _e=Se.links.filter(function(le){return T(le.source,Ve)==T(ke,Ve)}),ce=_e.length;ce>1&&_e.sort(function(le,Ae){if(!le.circular&&!Ae.circular){if(le.target.column==Ae.target.column)return le.y1-Ae.y1;if(he(le,Ae)){if(le.target.column>Ae.target.column){var Be=H(Ae,le);return le.y1-Be}if(Ae.target.column>le.target.column){var Xe=H(le,Ae);return Xe-Ae.y1}}else return le.y1-Ae.y1}if(le.circular&&!Ae.circular)return le.circularLinkType=="top"?-1:1;if(Ae.circular&&!le.circular)return Ae.circularLinkType=="top"?1:-1;if(le.circular&&Ae.circular)return le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="top"?le.target.column===Ae.target.column?le.target.y1-Ae.target.y1:Ae.target.column-le.target.column:le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="bottom"?le.target.column===Ae.target.column?Ae.target.y1-le.target.y1:le.target.column-Ae.target.column:le.circularLinkType=="top"?-1:1});var ve=ke.y0;_e.forEach(function(le){le.y0=ve+le.width/2,ve=ve+le.width}),_e.forEach(function(le,Ae){if(le.circularLinkType=="bottom"){var Be=Ae+1,Xe=0;for(Be;Be1&&ke.sort(function(ve,le){if(!ve.circular&&!le.circular){if(ve.source.column==le.source.column)return ve.y0-le.y0;if(he(ve,le)){if(le.source.column0?"up":"down"}function we(Se,Ie){return T(Se.source,Ie)==T(Se.target,Ie)}function Me(Se,Ie,Ve){var Ge=Se.nodes,ke=Se.links,_e=!1,ce=!1;if(ke.forEach(function(Ye){Ye.circularLinkType=="top"?_e=!0:Ye.circularLinkType=="bottom"&&(ce=!0)}),_e==!1||ce==!1){var ve=b.min(Ge,function(Ye){return Ye.y0}),le=b.max(Ge,function(Ye){return Ye.y1}),Ae=le-ve,Be=Ve-Ie,Xe=Be/Ae;Ge.forEach(function(Ye){var yt=(Ye.y1-Ye.y0)*Xe;Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=Ye.y0+yt}),ke.forEach(function(Ye){Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=(Ye.y1-ve)*Xe,Ye.width=Ye.width*Xe})}}p.sankeyCircular=x,p.sankeyCenter=a,p.sankeyLeft=t,p.sankeyRight=n,p.sankeyJustify=r,Object.defineProperty(p,"__esModule",{value:!0})})}}),OM=ze({"src/traces/sankey/constants.js"(J,V){"use strict";V.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"}}}}),IV=ze({"src/traces/sankey/render.js"(J,V){"use strict";var p=SV(),b=(l0(),Po(_v)).interpolateNumber,E=ci(),k=CV(),l=RV(),e=OM(),t=Qn(),n=$i(),r=Nr(),a=r.strTranslate,o=r.strRotate,s=Vd(),c=s.keyFun,m=s.repeat,h=s.unwrap,v=Cs(),g=mi(),i=dc(),w=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(X,K,H){var Y=h(K),q=Y.trace,Z=q.domain,ee=q.orientation==="h",ae=q.direction==="reversed",he=q.node.pad,xe=q.node.thickness,we={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Me=X.width*(Z.x[1]-Z.x[0]),Se=X.height*(Z.y[1]-Z.y[0]),Ie=Y._nodes,Ve=Y._links,Ge=Y.circular,ke;Ge?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Me,Se]:[Se,Me]).nodeWidth(xe).nodePadding(he).nodeId(function(Xt){return Xt.pointNumber}).nodeAlign(we).nodes(Ie).links(Ve);function _e(Xt){q[Xt].sort==="input"&&(Ge?r.warn(`Circular Sankey diagrams do not support the "input" ${Xt}.sort mode; falling back to the default sort.`):ke[`${Xt}Sort`](null))}_e("link"),_e("node");var ce=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+he})}function At(Xt){var or=Xt.map(function(Ke,Je){return{x0:Ke.x0,index:Je}}).sort(function(Ke,Je){return Ke.x0-Je.x0}),Ot=[],vt=-1,ht,De=-1/0,Ne;for(ve=0;veDe+xe&&(vt+=1,ht=We.x0),De=We.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(We),Ne=ht-We.x0,We.x0+=Ne,We.x1+=Ne}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(H="M "+(q.targetX-K)+" "+(q.targetY-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightSmallArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent-Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Y-K)+" "+q.verticalRightInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-Y-K)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent+Y-K-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent-K-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.leftFullExtent+Y+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+Y)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Y)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent,H+=" L "+(q.leftFullExtent+Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftSmallArcRadius+Y)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY+Y)+" L "+q.leftInnerExtent+" "+(q.sourceY+Y)+" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Y)+" "+q.verticalLeftInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.rightFullExtent+Y-K+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent-K-Y)+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:H+=" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftLargeArcRadius-Y)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightLargeArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent,H+=" L "+(q.rightFullExtent+Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+Y)+" L "+(q.targetX-K)+" "+(q.targetY+Y)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),H}function f(){var X=.5;function K(H){var Y=H.linkArrowLength;if(H.link.circular)return T(H.link,Y);var q=Math.abs((H.link.target.x0-H.link.source.x1)/2);Y>q&&(Y=q);var Z=H.link.source.x1,ee=H.link.target.x0-Y,ae=b(Z,ee),he=ae(X),xe=ae(1-X),we=H.link.y0-H.link.width/2,Me=H.link.y0+H.link.width/2,Se=H.link.y1-H.link.width/2,Ie=H.link.y1+H.link.width/2,Ve="M"+Z+","+we,Ge="C"+he+","+we+" "+xe+","+Se+" "+ee+","+Se,ke="C"+xe+","+Ie+" "+he+","+Me+" "+Z+","+Me,_e=Y>0?"L"+(ee+Y)+","+(Se+H.link.width/2):"";return _e+="L"+ee+","+Ie,Ve+Ge+_e+ke+"Z"}return K}function u(X,K){var H=e.nodePadAcross,Y=X.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,Z=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=X.trace,K.curveNumber=X.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:X.key,trace:X.trace,node:K,nodePad:X.nodePad,nodeLineColor:X.nodeLineColor,nodeLineWidth:X.nodeLineWidth,textFont:X.textFont,size:X.horizontal?X.height:X.width,visibleWidth:Math.ceil(q),visibleHeight:Z,zoneX:-H,zoneY:-Y,zoneWidth:q+2*H,zoneHeight:Z+2*Y,labelY:X.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:X.width,forceLayouts:X.forceLayouts,horizontal:X.horizontal,reversed:X.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:X.valueFormat,valueSuffix:X.valueSuffix,sankey:X.sankey,graph:X.graph,arrangement:X.arrangement,uniqueNodeLabelPathId:[X.guid,X.key,ee].join("_"),interactionState:X.interactionState,figure:X}}function A(X){X.attr("transform",function(K){return a(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function x(X){X.call(A)}function z(X,K){X.call(x),K.attr("d",f())}function I(X){X.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function O(X){return X.link.width>1||X.linkLineWidth>0}function D(X){return X.horizontal?X.reversed?a(X.translateX+X.width,X.translateY)+"matrix(-1 0 0 1 0 0)":a(X.translateX,X.translateY)+"matrix(1 0 0 1 0 0)":X.reversed?a(X.translateX,X.translateY+X.height)+"matrix(0 -1 1 0 0 0)":a(X.translateX,X.translateY)+"matrix(0 1 1 0 0 0)"}function B(X,K,H){X.on(".basic",null).on("mouseover.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.hover(this,Y,K),Y.interactionState.hovered=[this,Y])}).on("mousemove.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.follow(this,Y),Y.interactionState.hovered=[this,Y])}).on("mouseout.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1)}).on("click.basic",function(Y){Y.interactionState.hovered&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1),!Y.interactionState.dragInProgress&&!Y.partOfGroup&&H.select(this,Y,K)})}function F(X,K,H,Y){var q=E.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(r.ensureSingle(Y._fullLayout._infolayer,"g","dragcover",function(ae){Y._fullLayout._dragCover=ae}),r.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,re(Z.node),Z.interactionState.hovered&&(H.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var ee=Z.traceId+"|"+Z.key;Z.forceLayouts[ee]?Z.forceLayouts[ee].alpha(1):P(X,ee,Z,Y),j(X,K,Z,ee,Y)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var ee=E.event.x,ae=E.event.y;Z.arrangement==="snap"?(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2,Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2),ae=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,ae)),Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2),re(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(X.filter(ne(Z)),K))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var ee=0;ee0)window.requestAnimationFrame(Z);else{var he=H.node.originalX;H.node.x0=he-H.visibleWidth/2,H.node.x1=he+H.visibleWidth/2,$(H,q)}})}function U(X,K,H,Y){return function(){for(var Z=0,ee=0;ee0&&Y.forceLayouts[K].alpha(0)}}function $(X,K){for(var H=[],Y=[],q=0;qO(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>O(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>O(ke)?ke.linkLineWidth:1).attr("d",f()),Me.style("opacity",function(){return X._context.staticPlot||ee||ae?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Me.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=xe.selectAll("."+e.cn.sankeyNodeSet).data(m,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Se.selectAll("."+e.cn.sankeyNode).data(function(ke){var _e=ke.graph.nodes;return Q(_e),_e.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(X._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,xe,q.nodeEvents).call(F,Me,q,X),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ve=Ie.selectAll("."+e.cn.nodeRect).data(m);Ve.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ve.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ve.transition().ease(e.ease).duration(e.duration).call(I);var Ge=Ie.selectAll("."+e.cn.nodeLabel).data(m);Ge.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),Ge.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var _e=E.select(this);n.font(_e,ke.textFont),v.convertToTspans(_e,X)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var _e=E.select(this),ce=v.lineCount(_e),ve=ke.textFont.size*((ce-1)*S-w),le=ke.nodeLineWidth/2+M;if(!ke.horizontal){var Xe=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Ae=ke.reversed?o(90):"scale(-1,1)"+o(90);return a(Xe,le)+Ae}var Be=le,Xe=(ke.visibleHeight-ve)/2;return ke.left?Be=-Be:Be+=ke.visibleWidth,a(Be,Xe)+(ke.reversed?"scale(-1,1)":"")}),Ge.transition().ease(e.ease).duration(e.duration)}}}),NM=ze({"src/traces/sankey/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=b.numberFormat,k=IV(),l=Zl(),e=Qn(),t=OM().cn,n=b._;function r(S){return S!==""}function a(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){p.select(S).select("path").style("fill-opacity",M),p.select(S).select("rect").style("fill-opacity",M)}function s(S){p.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function m(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function h(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(g.bind(0,M,C,!1))}function v(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function g(S,M,C,_){_.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&a(M,S).selectAll("."+t.sankeyNode).filter(m(S)).call(h)}function i(S,M,C,_){_.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&a(M,S).selectAll(t.sankeyNode).filter(m(S)).call(v)}function w(S,M){var C=S.hoverlabel||{},_=b.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}V.exports=function(M,C){for(var _=M._fullLayout,T=_._paper,f=_._size,u=0;u"),color:w(G,"bgcolor")||e.addOpacity(q.color,1),borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:p.event.x"),color:w(G,"bgcolor")||se.rgb,borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:ee,eventData:[se.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(xe,.85),s(xe)}}},re=function(ne,se,G){M._fullLayout.hovermode!==!1&&(p.select(ne).call(v,se,G),se.node.trace.node.hoverinfo!=="skip"&&(se.node.fullData=se.node.trace,M.emit("plotly_unhover",{event:p.event,points:[se.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,T,C,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:x},nodeEvents:{hover:$,follow:Q,unhover:re,select:U}})}}}),DV=ze({"src/traces/sankey/base_plot.js"(J){"use strict";var V=Al().overrideAll,p=zf().getModuleCalcData,b=NM(),E=rv(),k=gd(),l=_h(),e=_c().prepSelect,t=Nr(),n=mi(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=V({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=p(o.calcdata,r)[0];b(o,s),J.updateFx(o)},J.clean=function(o,s,c,m){var h=m._has&&m._has(r),v=s._has&&s._has(r);h&&!v&&(m._paperdiv.selectAll(".sankey").remove(),m._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}V.exports=function(D,B,F,P){var j=D._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function($){var Q=$[0],re=Q.trace,ne=p.select(this),se=re._hasGauge,G=re._isAngular,X=re._isBullet,K=re.domain,H={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},Y=H.l+H.w/2,q=H.t+H.h/2,Z=Math.min(H.w/2,H.h),ee=a.innerRadius*Z,ae,he,xe,we=re.align||"center";if(he=q,!se)ae=H.l+i[we]*H.w,xe=function(le){return A(le,H.w,H.h)};else if(G&&(ae=Y,he=q+Z/2,xe=function(le){return x(le,.9*ee)}),X){var Me=a.bulletPadding,Se=1-a.bulletNumberDomainSize+Me;ae=H.l+(Se+(1-Se)*i[we])*H.w,xe=function(le){return A(le,(a.bulletNumberDomainSize-Me)*H.w,H.h)}}_(D,ne,$,{numbersX:ae,numbersY:he,numbersScaler:xe,transitionOpts:F,onComplete:U});var Ie,Ve;se&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ve={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var Ge=ne.selectAll("g.angular").data(G?$:[]);Ge.exit().remove();var ke=ne.selectAll("g.angularaxis").data(G?$:[]);ke.exit().remove(),G&&C(D,ne,$,{radius:Z,innerRadius:ee,gauge:Ge,layer:ke,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var _e=ne.selectAll("g.bullet").data(X?$:[]);_e.exit().remove();var ce=ne.selectAll("g.bulletaxis").data(X?$:[]);ce.exit().remove(),X&&M(D,ne,$,{gauge:_e,layer:ce,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var ve=ne.selectAll("text.title").data($);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return X?g.right:g[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,D),ve.attr("transform",function(){var le=H.l+H.w*i[re.title.align],Ae,Be=a.titlePadding,Xe=r.bBox(ve.node());if(se){if(G)if(re.gauge.axis.visible){var Ye=r.bBox(ke.node());Ae=Ye.top-Be-Xe.bottom}else Ae=H.t+H.h/2-Z/2-Xe.bottom-Be;X&&(Ae=he-(Xe.top+Xe.bottom)/2,le=H.l-a.bulletPadding*H.w)}else Ae=re._numbersTop-Be-Xe.bottom;return e(le,Ae)})})};function M(O,D,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,$=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ne=P.domain,se=F.transitionOpts,G=F.onComplete,X,K,H,Y,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var Z=re.h,ee=P.gauge.bar.thickness*Z,ae=ne.x[0],he=ne.x[0]+(ne.x[1]-ne.x[0])*(P._hasNumber||P._hasDelta?1-a.bulletNumberDomainSize:1);X=u(O,P.gauge.axis),X._id="xbulletaxis",X.domain=[ae,he],X.setScale(),K=s.calcTicks(X),H=s.makeTransTickFn(X),Y=s.getTickSigns(X)[2],q=re.t+re.h,X.visible&&(s.drawTicks(O,X,{vals:X.ticks==="inside"?s.clipEnds(X,K):K,layer:U,path:s.makeTickPath(X,q,Y),transFn:H}),s.drawLabels(O,X,{vals:K,layer:U,transFn:H,labelFns:s.makeLabelFns(X,q)}));function xe(ke){ke.attr("width",function(_e){return Math.max(0,X.c2p(_e.range[1])-X.c2p(_e.range[0]))}).attr("x",function(_e){return X.c2p(_e.range[0])}).attr("y",function(_e){return .5*(1-_e.thickness)*Z}).attr("height",function(_e){return _e.thickness*Z})}var we=[$].concat(P.gauge.steps),Me=j.selectAll("g.bg-bullet").data(we);Me.enter().append("g").classed("bg-bullet",!0).append("rect"),Me.select("rect").call(xe).call(T),Me.exit().remove();var Se=j.selectAll("g.value-bullet").data([P.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",ee).attr("y",(Z-ee)/2).call(T),S(se)?Se.select("rect").transition().duration(se.duration).ease(se.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Se.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Se.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ve=j.selectAll("g.threshold-bullet").data(Ie);Ve.enter().append("g").classed("threshold-bullet",!0).append("line"),Ve.select("line").attr("x1",X.c2p(P.gauge.threshold.value)).attr("x2",X.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*Z).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*Z).call(v.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ve.exit().remove();var Ge=j.selectAll("g.gauge-outline").data([Q]);Ge.enter().append("g").classed("gauge-outline",!0).append("rect"),Ge.select("rect").call(xe).call(T),Ge.exit().remove()}function C(O,D,B,F){var P=B[0].trace,j=F.size,U=F.radius,$=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ne=[j.l+j.w/2,j.t+j.h/2+U/2],se=F.gauge,G=F.layer,X=F.transitionOpts,K=F.onComplete,H=Math.PI/2;function Y(yt){var gt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(yt-gt)/(Tt-gt)*Math.PI-H;return At<-H?-H:At>H?H:At}function q(yt){return p.svg.arc().innerRadius(($+U)/2-yt/2*(U-$)).outerRadius(($+U)/2+yt/2*(U-$)).startAngle(-H)}function Z(yt){yt.attr("d",function(gt){return q(gt.thickness).startAngle(Y(gt.range[0])).endAngle(Y(gt.range[1]))()})}var ee,ae,he,xe;se.enter().append("g").classed("angular",!0),se.attr("transform",e(ne[0],ne[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),ee=u(O,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var we=function(yt){return(ee.range[0]-yt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Me={},Se=s.makeLabelFns(ee,0),Ie=Se.labelStandoff;Me.xFn=function(yt){var gt=we(yt);return Math.cos(gt)*Ie},Me.yFn=function(yt){var gt=we(yt),Tt=Math.sin(gt)>0?.2:1;return-Math.sin(gt)*(Ie+yt.fontSize*Tt)+Math.abs(Math.cos(gt))*(yt.fontSize*n)},Me.anchorFn=function(yt){var gt=we(yt),Tt=Math.cos(gt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Me.heightFn=function(yt,gt,Tt){var At=we(yt);return-.5*(1+Math.sin(At))*Tt};var Ve=function(yt){return e(ne[0]+U*Math.cos(yt),ne[1]-U*Math.sin(yt))};he=function(yt){return Ve(we(yt))};var Ge=function(yt){var gt=we(yt);return Ve(gt)+"rotate("+-t(gt)+")"};if(ae=s.calcTicks(ee),xe=s.getTickSigns(ee)[2],ee.visible){xe=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(O,ee,{vals:ae,layer:G,path:"M"+xe*ke+",0h"+xe*ee.ticklen,transFn:Ge}),s.drawLabels(O,ee,{vals:ae,layer:G,transFn:he,labelFns:Me})}var _e=[Q].concat(P.gauge.steps),ce=se.selectAll("g.bg-arc").data(_e);ce.enter().append("g").classed("bg-arc",!0).append("path"),ce.select("path").call(Z).call(T),ce.exit().remove();var ve=q(P.gauge.bar.thickness),le=se.selectAll("g.value-arc").data([P.gauge.bar]);le.enter().append("g").classed("value-arc",!0).append("path");var Ae=le.select("path");S(X)?(Ae.transition().duration(X.duration).ease(X.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",f(ve,Y(B[0].lastY),Y(B[0].y))),P._lastValue=B[0].y):Ae.attr("d",typeof B[0].y=="number"?ve.endAngle(Y(B[0].y)):"M0,0Z"),Ae.call(T),le.exit().remove(),_e=[];var Be=P.gauge.threshold.value;(Be||Be===0)&&_e.push({range:[Be,Be],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var Xe=se.selectAll("g.threshold-arc").data(_e);Xe.enter().append("g").classed("threshold-arc",!0).append("path"),Xe.select("path").call(Z).call(T),Xe.exit().remove();var Ye=se.selectAll("g.gauge-outline").data([re]);Ye.enter().append("g").classed("gauge-outline",!0).append("path"),Ye.select("path").call(Z).call(T),Ye.exit().remove()}function _(O,D,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,$=P.align||"center",Q=g[$],re=F.transitionOpts,ne=F.onComplete,se=k.ensureSingle(D,"g","numbers"),G,X,K,H=[];P._hasNumber&&H.push("number"),P._hasDelta&&(H.push("delta"),P.delta.position==="left"&&H.reverse());var Y=se.selectAll("text").data(H);Y.enter().append("text"),Y.attr("text-anchor",function(){return Q}).attr("class",function(Ve){return Ve}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function q(Ve,Ge,ke,_e){if(Ve.match("s")&&ke>=0!=_e>=0&&!Ge(ke).slice(-1).match(w)&&!Ge(_e).slice(-1).match(w)){var ce=Ve.slice().replace("s","f").replace(/\d+/,function(le){return parseInt(le)-1}),ve=u(O,{tickformat:ce});return function(le){return Math.abs(le)<1?s.tickText(ve,le).text:Ge(le)}}else return Ge}function Z(){var Ve=u(O,{tickformat:P.number.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(le){return s.tickText(Ve,le).text},ke=P.number.suffix,_e=P.number.prefix,ce=se.select("text.number");function ve(){var le=typeof B[0].y=="number"?_e+Ge(B[0].y)+ke:"-";ce.text(le).call(r.font,P.number.font).call(o.convertToTspans,O)}return S(re)?ce.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ne&&ne()}).each("interrupt",function(){ve(),ne&&ne()}).attrTween("text",function(){var le=p.select(this),Ae=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Be=q(P.number.valueformat,Ge,B[0].lastY,B[0].y);return function(Xe){le.text(_e+Be(Ae(Xe))+ke)}}):ve(),G=z(_e+Ge(B[0].y)+ke,P.number.font,Q,O),ce}function ee(){var Ve=u(O,{tickformat:P.delta.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(Xe){return s.tickText(Ve,Xe).text},ke=P.delta.suffix,_e=P.delta.prefix,ce=function(Xe){var Ye=P.delta.relative?Xe.relativeDelta:Xe.delta;return Ye},ve=function(Xe,Ye){return Xe===0||typeof Xe!="number"||isNaN(Xe)?"-":(Xe>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+_e+Ye(Xe)+ke},le=function(Xe){return Xe.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ce(B[0]));var Ae=se.select("text.delta");Ae.call(r.font,P.delta.font).call(v.fill,le({delta:P._deltaLastValue}));function Be(){Ae.text(ve(ce(B[0]),Ge)).call(v.fill,le(B[0])).call(o.convertToTspans,O)}return S(re)?Ae.transition().duration(re.duration).ease(re.easing).tween("text",function(){var Xe=p.select(this),Ye=ce(B[0]),yt=P._deltaLastValue,gt=q(P.delta.valueformat,Ge,yt,Ye),Tt=E(yt,Ye);return P._deltaLastValue=Ye,function(At){Xe.text(ve(Tt(At),gt)),Xe.call(v.fill,le({delta:Tt(At)}))}}).each("end",function(){Be(),ne&&ne()}).each("interrupt",function(){Be(),ne&&ne()}):Be(),X=z(ve(ce(B[0]),Ge),P.delta.font,Q,O),Ae}var ae=P.mode+P.align,he;if(P._hasDelta&&(he=ee(),ae+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ae+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=X),P._hasNumber&&(Z(),ae+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=G),P._hasDelta&&P._hasNumber){var xe=[(G.left+G.right)/2,(G.top+G.bottom)/2],we=[(X.left+X.right)/2,(X.top+X.bottom)/2],Me,Se,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Me=I(P,"deltaPos",0,-1*(G.width*i[P.align]+X.width*(1-i[P.align])+Ie),ae,Math.min),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:X.left+Me,right:G.right,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="right"&&(Me=I(P,"deltaPos",0,G.width*(1-i[P.align])+X.width*i[P.align]+Ie,ae,Math.max),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:G.left,right:X.right+Me,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="bottom"&&(Me=null,Se=X.height,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height,bottom:G.bottom+X.height}),P.delta.position==="top"&&(Me=null,Se=G.top,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height-X.height,bottom:G.bottom}),he.attr({dx:Me,dy:Se})}(P._hasNumber||P._hasDelta)&&se.attr("transform",function(){var Ve=F.numbersScaler(K);ae+=Ve[2];var Ge=I(P,"numbersScale",1,Ve[0],ae,Math.min),ke;P._scaleNumbers||(Ge=1),P._isAngular?ke=U-Ge*K.bottom:ke=U-Ge*(K.top+K.bottom)/2,P._numbersTop=Ge*K.top+ke;var _e=K[$];$==="center"&&(_e=(K.left+K.right)/2);var ce=j-Ge*_e;return ce=I(P,"numbersTranslate",0,ce,ae,Math.max),e(ce,ke)+l(Ge)})}function T(O){O.each(function(D){v.stroke(p.select(this),D.line.color)}).each(function(D){v.fill(p.select(this),D.color)}).style("stroke-width",function(D){return D.line.width})}function f(O,D,B){return function(){var F=b(D,B);return function(P){return O.endAngle(F(P))()}}}function u(O,D,B){var F=O._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},D),j={type:"linear",_id:"x"+D._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function $(Q,re){return k.coerce(P,j,h,Q,re)}return c(P,j,$,U,F),m(P,j,$,U),j}function A(O,D,B){var F=Math.min(D/O.width,B/O.height);return[F,O,D+"x"+B]}function x(O,D){var B=Math.sqrt(O.width/2*(O.width/2)+O.height*O.height),F=D/B;return[F,O,D]}function z(O,D,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=p.select(P);return j.text(O).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",O).call(o.convertToTspans,F).call(r.font,D),r.bBox(j.node())}function I(O,D,B,F,P,j){var U="_cache"+D;O[U]&&O[U].key===P||(O[U]={key:P,value:B});var $=k.aggNums(j,null,[O[U].value,F],2);return O[U].value=$,$}}}),qV=ze({"src/traces/indicator/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:OV(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:jM(),supplyDefaults:NV().supplyDefaults,calc:jV().calc,plot:UV(),meta:{}}}}),VV=ze({"lib/indicator.js"(J,V){"use strict";V.exports=qV()}}),qM=ze({"src/traces/table/attributes.js"(J,V){"use strict";var p=fv(),b=Ki().extendFlat,E=Al().overrideAll,k=Qs(),l=Ml().attributes,e=Il().descriptionOnlyNumbers,t=V.exports=E({domain:l({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:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},p.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:b({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},p.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:b({},k({arrayOk:!0}))}},"calc","from-root")}}),GV=ze({"src/traces/table/defaults.js"(J,V){"use strict";var p=Nr(),b=qM(),E=Ml().defaults;function k(l,e){for(var t=l.columnorder||[],n=l.header.values.length,r=t.slice(0,n),a=r.slice().sort(function(c,m){return c-m}),o=r.map(function(c){return a.indexOf(c)}),s=o.length;s",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"}}}}),WV=ze({"src/traces/table/data_preparation_helper.js"(J,V){"use strict";var p=VM(),b=Ki().extendFlat,E=ao(),k=Ff().isTypedArray,l=Ff().isArrayOrTypedArray;V.exports=function(h,v){var g=n(v.cells.values),i=function(Q){return Q.slice(v.header.values.length,Q.length)},w=n(v.header.values);w.length&&!w[0].length&&(w[0]=[""],w=n(w));var S=w.concat(i(g).map(function(){return r((w[0]||[""]).length)})),M=v.domain,C=Math.floor(h._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(h._fullLayout._size.h*(M.y[1]-M.y[0])),T=v.header.values.length?S[0].map(function(){return v.header.height}):[p.emptyHeaderHeight],f=g.length?g[0].map(function(){return v.cells.height}):[],u=T.reduce(t,0),A=_-u,x=A+p.uplift,z=s(f,x),I=s(T,u),O=o(I,[]),D=o(z,O),B={},F=v.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(g.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ne=l(v.columnwidth)?v.columnwidth[Math.min(re,v.columnwidth.length-1)]:v.columnwidth;return E(ne)?Number(ne):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(v.header.line.width),e(v.cells.line.width)),$={key:v.uid+h._context.staticPlot,translateX:M.x[0]*h._fullLayout._size.w,translateY:h._fullLayout._size.h*(1-M.y[1]),size:h._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:D,headerRowBlocks:O,scrollY:0,cells:b({},v.cells,{values:g}),headerCells:b({},v.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ne=B[Q];B[Q]=(ne||0)+1;var se=Q+"__"+B[Q];return{key:se,label:Q,specIndex:re,xIndex:F[re],xScale:a,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return $.columns.forEach(function(Q){Q.calcdata=$,Q.x=a(Q)}),$};function e(m){if(l(m)){for(var h=0,v=0;v=h||_===m.length-1)&&(v[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=w,M=_+1,w=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),YV=ze({"src/traces/table/data_split_helpers.js"(J){"use strict";var V=Ki().extendFlat;J.splitToPanels=function(b){var E=[0,0],k=V({},b,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:V({},b.calcdata,{cells:b.calcdata.headerCells})}),l=V({},b,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),e=V({},b,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(b){var E=p(b);return(b.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:k}})};function p(b){var E=b.rowBlocks[b.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),GM=ze({"src/traces/table/plot.js"(J,V){"use strict";var p=VM(),b=ci(),E=Nr(),k=E.numberFormat,l=Vd(),e=$i(),t=Cs(),n=Nr().raiseToTop,r=Nr().strTranslate,a=Nr().cancelTransition,o=WV(),s=YV(),c=Qn();V.exports=function(ae,he){var xe=!ae._context.staticPlot,we=ae._fullLayout._paper.selectAll("."+p.cn.table).data(he.map(function(Ye){var yt=l.unwrap(Ye),gt=yt.trace;return o(ae,gt)}),l.keyFun);we.exit().remove(),we.enter().append("g").classed(p.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"),we.attr("width",function(Ye){return Ye.width+Ye.size.l+Ye.size.r}).attr("height",function(Ye){return Ye.height+Ye.size.t+Ye.size.b}).attr("transform",function(Ye){return r(Ye.translateX,Ye.translateY)});var Me=we.selectAll("."+p.cn.tableControlView).data(l.repeat,l.keyFun),Se=Me.enter().append("g").classed(p.cn.tableControlView,!0).style("box-sizing","content-box");if(xe){var Ie="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(Ye){Me.filter(function(yt){return Ye===yt}).call(i,ae)}).on(Ie,function(Ye){if(!Ye.scrollbarState.wheeling){Ye.scrollbarState.wheeling=!0;var yt=Ye.scrollY+b.event.deltaY,gt=Q(ae,Me,null,yt)(Ye);gt||(b.event.stopPropagation(),b.event.preventDefault()),Ye.scrollbarState.wheeling=!1}}).call(i,ae,!0)}Me.attr("transform",function(Ye){return r(Ye.size.l,Ye.size.t)});var Ve=Me.selectAll("."+p.cn.scrollBackground).data(l.repeat,l.keyFun);Ve.enter().append("rect").classed(p.cn.scrollBackground,!0).attr("fill","none"),Ve.attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}),Me.each(function(Ye){e.setClipUrl(b.select(this),h(ae,Ye),ae)});var Ge=Me.selectAll("."+p.cn.yColumn).data(function(Ye){return Ye.columns},l.keyFun);Ge.enter().append("g").classed(p.cn.yColumn,!0),Ge.exit().remove(),Ge.attr("transform",function(Ye){return r(Ye.x,0)}),xe&&Ge.call(b.behavior.drag().origin(function(Ye){var yt=b.select(this);return B(yt,Ye,-p.uplift),n(this),Ye.calcdata.columnDragInProgress=!0,i(Me.filter(function(gt){return Ye.calcdata.key===gt.key}),ae),Ye}).on("drag",function(Ye){var yt=b.select(this),gt=function($t){return(Ye===$t?b.event.x:$t.x)+$t.columnWidth/2};Ye.x=Math.max(-p.overdrag,Math.min(Ye.calcdata.width+p.overdrag-Ye.columnWidth,b.event.x));var Tt=g(Ge).filter(function($t){return $t.calcdata.key===Ye.calcdata.key}),At=Tt.sort(function($t,rr){return gt($t)-gt(rr)});At.forEach(function($t,rr){$t.xIndex=rr,$t.x=Ye===$t?$t.x:$t.xScale($t)}),Ge.filter(function($t){return Ye!==$t}).transition().ease(p.transitionEase).duration(p.transitionDuration).attr("transform",function($t){return r($t.x,0)}),yt.call(a).attr("transform",r(Ye.x,-p.uplift))}).on("dragend",function(Ye){var yt=b.select(this),gt=Ye.calcdata;Ye.x=Ye.xScale(Ye),Ye.calcdata.columnDragInProgress=!1,B(yt,Ye,0),O(ae,gt,gt.columns.map(function(Tt){return Tt.xIndex}))})),Ge.each(function(Ye){e.setClipUrl(b.select(this),v(ae,Ye),ae)});var ke=Ge.selectAll("."+p.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(p.cn.columnBlock,!0).attr("id",function(Ye){return Ye.key}),ke.style("cursor",function(Ye){return Ye.dragHandle?"ew-resize":Ye.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var _e=ke.filter(P),ce=ke.filter(F);xe&&ce.call(b.behavior.drag().origin(function(Ye){return b.event.stopPropagation(),Ye}).on("drag",Q(ae,Me,-1)).on("dragend",function(){})),w(ae,Me,_e,ke),w(ae,Me,ce,ke);var ve=Me.selectAll("."+p.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(p.cn.scrollAreaClip,!0).attr("id",function(Ye){return h(ae,Ye)});var le=ve.selectAll("."+p.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);le.enter().append("rect").classed(p.cn.scrollAreaClipRect,!0).attr("x",-p.overdrag).attr("y",-p.uplift).attr("fill","none"),le.attr("width",function(Ye){return Ye.width+2*p.overdrag}).attr("height",function(Ye){return Ye.height+p.uplift});var Ae=Ge.selectAll("."+p.cn.columnBoundary).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(p.cn.columnBoundary,!0);var Be=Ge.selectAll("."+p.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Be.enter().append("clipPath").classed(p.cn.columnBoundaryClippath,!0),Be.attr("id",function(Ye){return v(ae,Ye)});var Xe=Be.selectAll("."+p.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Xe.enter().append("rect").classed(p.cn.columnBoundaryRect,!0).attr("fill","none"),Xe.attr("width",function(Ye){return Ye.columnWidth+2*m(Ye)}).attr("height",function(Ye){return Ye.calcdata.height+2*m(Ye)+p.uplift}).attr("x",function(Ye){return-m(Ye)}).attr("y",function(Ye){return-m(Ye)}),$(null,ce,Me)};function m(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function h(ee,ae){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function v(ee,ae){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function g(ee){return[].concat.apply([],ee.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function i(ee,ae,he){function xe(Ge){var ke=Ge.rowBlocks;return K(ke,ke.length-1)+(ke.length?H(ke[ke.length-1],1/0):1)}var we=ee.selectAll("."+p.cn.scrollbarKit).data(l.repeat,l.keyFun);we.enter().append("g").classed(p.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),we.each(function(Ge){var ke=Ge.scrollbarState;ke.totalHeight=xe(Ge),ke.scrollableAreaHeight=Ge.groupHeight-j(Ge),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,p.goldenRatio*p.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:Ge.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(Ge){var ke=Ge.width+p.scrollbarWidth/2+p.scrollbarOffset;return r(ke,j(Ge))});var Me=we.selectAll("."+p.cn.scrollbar).data(l.repeat,l.keyFun);Me.enter().append("g").classed(p.cn.scrollbar,!0);var Se=Me.selectAll("."+p.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(p.cn.scrollbarSlider,!0),Se.attr("transform",function(Ge){return r(0,Ge.scrollbarState.topY||0)});var Ie=Se.selectAll("."+p.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(p.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",p.scrollbarWidth).attr("stroke-linecap","round").attr("y1",p.scrollbarWidth/2),Ie.attr("y2",function(Ge){return Ge.scrollbarState.barLength-p.scrollbarWidth/2}).attr("stroke-opacity",function(Ge){return Ge.columnDragInProgress||!Ge.scrollbarState.barWiggleRoom||he?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(p.scrollbarHideDelay).duration(p.scrollbarHideDuration).attr("stroke-opacity",0);var Ve=Me.selectAll("."+p.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ve.enter().append("line").classed(p.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",p.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ge){var ke=b.event.y,_e=this.getBoundingClientRect(),ce=Ge.scrollbarState,ve=ke-_e.top,le=b.scale.linear().domain([0,ce.scrollableAreaHeight]).range([0,ce.totalHeight]).clamp(!0);ce.topY<=ve&&ve<=ce.bottomY||Q(ae,ee,null,le(ve-ce.barLength/2))(Ge)}).call(b.behavior.drag().origin(function(Ge){return b.event.stopPropagation(),Ge.scrollbarState.scrollbarScrollInProgress=!0,Ge}).on("drag",Q(ae,ee)).on("dragend",function(){})),Ve.attr("y2",function(Ge){return Ge.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(Ie.remove(),Ve.remove())}function w(ee,ae,he,xe){var we=S(he),Me=M(we);f(Me);var Se=C(Me);A(Se);var Ie=T(Me),Ve=_(Ie);u(Ve),x(Ve,ae,xe,ee),X(Me)}function S(ee){var ae=ee.selectAll("."+p.cn.columnCells).data(l.repeat,l.keyFun);return ae.enter().append("g").classed(p.cn.columnCells,!0),ae.exit().remove(),ae}function M(ee){var ae=ee.selectAll("."+p.cn.columnCell).data(s.splitToCells,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.columnCell,!0),ae.exit().remove(),ae}function C(ee){var ae=ee.selectAll("."+p.cn.cellRect).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("rect").classed(p.cn.cellRect,!0),ae}function _(ee){var ae=ee.selectAll("."+p.cn.cellText).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("text").classed(p.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function T(ee){var ae=ee.selectAll("."+p.cn.cellTextHolder).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function f(ee){ee.each(function(ae,he){var xe=ae.calcdata.cells.font,we=ae.column.specIndex,Me={size:D(xe.size,we,he),color:D(xe.color,we,he),family:D(xe.family,we,he),weight:D(xe.weight,we,he),style:D(xe.style,we,he),variant:D(xe.variant,we,he),textcase:D(xe.textcase,we,he),lineposition:D(xe.lineposition,we,he),shadow:D(xe.shadow,we,he)};ae.rowNumber=ae.key,ae.align=D(ae.calcdata.cells.align,we,he),ae.cellBorderWidth=D(ae.calcdata.cells.line.width,we,he),ae.font=Me})}function u(ee){ee.each(function(ae){e.font(b.select(this),ae.font)})}function A(ee){ee.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var he=b.select(this);c.stroke(he,D(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),c.fill(he,D(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function x(ee,ae,he,xe){ee.text(function(we){var Me=we.column.specIndex,Se=we.rowNumber,Ie=we.value,Ve=typeof Ie=="string",Ge=Ve&&Ie.match(/
/i),ke=!Ve||Ge;we.mayHaveMarkup=Ve&&Ie.match(/[<&>]/);var _e=z(Ie);we.latex=_e;var ce=_e?"":D(we.calcdata.cells.prefix,Me,Se)||"",ve=_e?"":D(we.calcdata.cells.suffix,Me,Se)||"",le=_e?null:D(we.calcdata.cells.format,Me,Se)||null,Ae=ce+(le?k(le)(we.value):we.value)+ve,Be;we.wrappingNeeded=!we.wrapped&&!ke&&!_e&&(Be=I(Ae)),we.cellHeightMayIncrease=Ge||_e||we.mayHaveMarkup||(Be===void 0?I(Ae):Be),we.needsConvertToTspans=we.mayHaveMarkup||we.wrappingNeeded||we.latex;var Xe;if(we.wrappingNeeded){var Ye=p.wrapSplitCharacter===" "?Ae.replace(/we&&xe.push(Me),we+=Ve}return xe}function $(ee,ae,he){var xe=g(ae)[0];if(xe!==void 0){var we=xe.rowBlocks,Me=xe.calcdata,Se=K(we,we.length),Ie=xe.calcdata.groupHeight-j(xe),Ve=Me.scrollY=Math.max(0,Math.min(Se-Ie,Me.scrollY)),Ge=U(we,Ve,Ie);Ge.length===1&&(Ge[0]===we.length-1?Ge.unshift(Ge[0]-1):Ge.push(Ge[0]+1)),Ge[0]%2&&Ge.reverse(),ae.each(function(ke,_e){ke.page=Ge[_e],ke.scrollY=Ve}),ae.attr("transform",function(ke){var _e=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,_e)}),ee&&(re(ee,he,ae,Ge,xe.prevPages,xe,0),re(ee,he,ae,Ge,xe.prevPages,xe,1),i(he,ee))}}function Q(ee,ae,he,xe){return function(Me){var Se=Me.calcdata?Me.calcdata:Me,Ie=ae.filter(function(_e){return Se.key===_e.key}),Ve=he||Se.scrollbarState.dragMultiplier,Ge=Se.scrollY;Se.scrollY=xe===void 0?Se.scrollY+Ve*b.event.dy:xe;var ke=Ie.selectAll("."+p.cn.yColumn).selectAll("."+p.cn.columnBlock).filter(F);return $(ee,ke,Ie),Se.scrollY===Ge}}function re(ee,ae,he,xe,we,Me,Se){var Ie=xe[Se]!==we[Se];Ie&&(clearTimeout(Me.currentRepaint[Se]),Me.currentRepaint[Se]=setTimeout(function(){var Ve=he.filter(function(Ge,ke){return ke===Se&&xe[ke]!==we[ke]});w(ee,ae,Ve,he),we[Se]=xe[Se]}))}function ne(ee,ae,he,xe){return function(){var Me=b.select(ae.parentNode);Me.each(function(Se){var Ie=Se.fragments;Me.selectAll("tspan.line").each(function(Ae,Be){Ie[Be].width=this.getComputedTextLength()});var Ve=Ie[Ie.length-1].width,Ge=Ie.slice(0,-1),ke=[],_e,ce,ve=0,le=Se.column.columnWidth-2*p.cellPad;for(Se.value="";Ge.length;)_e=Ge.shift(),ce=_e.width+Ve,ve+ce>le&&(Se.value+=ke.join(p.wrapSpacer)+p.lineBreaker,ke=[],ve=0),ke.push(_e.text),ve+=ce;ve&&(Se.value+=ke.join(p.wrapSpacer)),Se.wrapped=!0}),Me.selectAll("tspan.line").remove(),x(Me.select("."+p.cn.cellText),he,ee,xe),b.select(ae.parentNode.parentNode).call(X)}}function se(ee,ae,he,xe,we){return function(){if(!we.settledY){var Se=b.select(ae.parentNode),Ie=q(we),Ve=we.key-Ie.firstRowIndex,Ge=Ie.rows[Ve].rowHeight,ke=we.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*p.cellPad:Ge,_e=Math.max(ke,Ge),ce=_e-Ie.rows[Ve].rowHeight;ce&&(Ie.rows[Ve].rowHeight=_e,ee.selectAll("."+p.cn.columnCell).call(X),$(null,ee.filter(F),0),i(he,xe,!0)),Se.attr("transform",function(){var ve=this,le=ve.parentNode,Ae=le.getBoundingClientRect(),Be=b.select(ve.parentNode).select("."+p.cn.cellRect).node().getBoundingClientRect(),Xe=ve.transform.baseVal.consolidate(),Ye=Be.top-Ae.top+(Xe?Xe.matrix.f:p.cellPad);return r(G(we,b.select(ve.parentNode).select("."+p.cn.cellTextHolder).node().getBoundingClientRect().width),Ye)}),we.settledY=!0}}}function G(ee,ae){switch(ee.align){case"left":return p.cellPad;case"right":return ee.column.columnWidth-(ae||0)-p.cellPad;case"center":return(ee.column.columnWidth-(ae||0))/2;default:return p.cellPad}}function X(ee){ee.attr("transform",function(ae){var he=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ie){return Se+H(Ie,1/0)},0),xe=q(ae),we=H(xe,ae.key),Me=we+he;return r(0,Me)}).selectAll("."+p.cn.cellRect).attr("height",function(ae){return Z(q(ae),ae.key).rowHeight})}function K(ee,ae){for(var he=0,xe=ae-1;xe>=0;xe--)he+=Y(ee[xe]);return he}function H(ee,ae){for(var he=0,xe=0;xek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(h-=180,a=-a),{angle:h,flip:a,p:b.c2p(l,E,k),offsetMultplier:o}}}}),aG=ze({"src/traces/carpet/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=HM(),k=WM(),l=rG(),e=Cs(),t=Nr(),n=t.strRotate,r=t.strTranslate,a=dc();V.exports=function(w,S,M,C){var _=w._context.staticPlot,T=S.xaxis,f=S.yaxis,u=w._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace,D=O.aaxis,B=O.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",O.opacity),s(T,f,P,D,"a",D._gridlines,!0,_),s(T,f,P,B,"b",B._gridlines,!0,_),s(T,f,F,D,"a",D._minorgridlines,!0,_),s(T,f,F,B,"b",B._minorgridlines,!0,_),s(T,f,j,D,"a-boundary",D._boundarylines,_),s(T,f,j,B,"b-boundary",B._boundarylines,_);var $=c(w,T,f,O,I,U,D._labels,"a-label"),Q=c(w,T,f,O,I,U,B._labels,"b-label");m(w,U,O,I,T,f,$,Q),o(O,I,A,T,f)})};function o(i,w,S,M,C){var _,T,f,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var x=t.ensureSingle(A,"path","carpetboundary"),z=w.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(b.font,z.font).text(z.text).call(e.convertToTspans,i),P=b.bBox(this);F.attr("transform",r(O.p[0],O.p[1])+n(O.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),x.maxExtent=A,x}function m(i,w,S,M,C,_,T,f){var u,A,x,z,I=t.aggNums(Math.min,null,S.a),O=t.aggNums(Math.max,null,S.a),D=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+O),A=D,x=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),T.angle===void 0&&t.extendFlat(T,l(S,C,_,x,S.dxydb_rough(u,A))),g(i,w,S,M,x,z,S.aaxis,C,_,T,"a-title"),u=I,A=.5*(D+B),x=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),f.angle===void 0&&t.extendFlat(f,l(S,C,_,x,S.dxyda_rough(u,A))),g(i,w,S,M,x,z,S.baxis,C,_,f,"b-title")}var h=a.LINE_SPACING,v=(1-a.MID_SHIFT)/h+1;function g(i,w,S,M,C,_,T,f,u,A,x){var z=[];T.title.text&&z.push(T.title.text);var I=w.selectAll("text."+x).data(z),O=A.maxExtent;I.enter().append("text").classed(x,!0),I.each(function(){var D=l(S,f,u,C,_);["start","both"].indexOf(T.showticklabels)===-1&&(O=0);var B=T.title.font.size;O+=B+T.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-D.angle+450)%360,j=P>90&&P<270,U=p.select(this);U.text(T.title.text).call(e.convertToTspans,i),j&&(O=(-e.lineCount(U)+v)*h*B-O),U.attr("transform",r(D.p[0],D.p[1])+n(D.angle)+r(0,O)).attr("text-anchor","middle").call(b.font,T.title.font)}),I.exit().remove()}}}),nG=ze({"src/traces/carpet/cheater_basis.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k){var l,e,t,n,r,a,o=[],s=p(b)?b.length:b,c=p(E)?E.length:E,m=p(b)?b:null,h=p(E)?E:null;m&&(t=(m.length-1)/(m[m.length-1]-m[0])/(s-1)),h&&(n=(h.length-1)/(h[h.length-1]-h[0])/(c-1));var v,g=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,n=0;n0&&(H=k.dxydi([],$-1,re,0,ne),ee.push(se[0]+H[0]/3),ae.push(se[1]+H[1]/3),Y=k.dxydi([],$-1,re,1,ne),ee.push(K[0]-Y[0]/3),ae.push(K[1]-Y[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;else for($=k.a2i(U),G=Math.floor(Math.max(0,Math.min(D-2,$))),X=$-G,he.length=D,he.crossLength=B,he.xy=function(xe){return k.evalxy([],$,xe)},he.dxy=function(xe,we){return k.dxydj([],G,xe,X,we)},Q=0;Q0&&(q=k.dxydj([],G,Q-1,X,0),ee.push(se[0]+q[0]/3),ae.push(se[1]+q[1]/3),Z=k.dxydj([],G,Q-1,X,1),ee.push(K[0]-Z[0]/3),ae.push(K[1]-Z[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;return he.axisLetter=l,he.axis=C,he.crossAxis=A,he.value=U,he.constvar=e,he.index=m,he.x=ee,he.y=ae,he.smoothing=A.smoothing,he}function j(U){var $,Q,re,ne,se,G=[],X=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),se=Math.min(1,Math.max(0,U-re)),K.xy=function(H){return k.evalxy([],H,U)},K.dxy=function(H,Y){return k.dxydi([],H,re,Y,se)},$=0;$M.length-1)&&_.push(b(j(n),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s;mM.length-1)&&!(g<0||g>M.length-1))for(i=M[r],w=M[g],t=0;tM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&f.push(b(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(a=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+a)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+a))].sort(function(U,$){return U-$}),s=o[0],c=o[1],m=s;m<=c;m++)h=C.tick0+C.dtick*m,_.push(b(P(h),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s-1;mM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&f.push(b(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),sG=ze({"src/traces/carpet/calc_labels.js"(J,V){"use strict";var p=Gi(),b=Ki().extendFlat;V.exports=function(k,l){var e,t,n,r,a,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=b[c][e],n[s-e]=E[c][e];for(r.push({x:t,y:n,bicubic:a}),e=c,t=[],n=[];e>=0;e--)t[c-e]=b[e][0],n[c-e]=E[e][0];return r.push({x:t,y:n,bicubic:o}),r}}}),uG=ze({"src/traces/carpet/smooth_fill_2d_array.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l){var e,t,n,r=[],a=[],o=E[0].length,s=E.length;function c(Q,re){var ne=0,se,G=0;return Q>0&&(se=E[re][Q-1])!==void 0&&(G++,ne+=se),Q0&&(se=E[re-1][Q])!==void 0&&(G++,ne+=se),re0&&t0&&eu);return p.log("Smoother converged to",A,"after",z,"iterations"),E}}}),cG=ze({"src/traces/carpet/constants.js"(J,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),fG=ze({"src/traces/carpet/catmull_rom.js"(J,V){"use strict";var p=.5;V.exports=function(E,k,l,e){var t=E[0]-k[0],n=E[1]-k[1],r=l[0]-k[0],a=l[1]-k[1],o=Math.pow(t*t+n*n,p/2),s=Math.pow(r*r+a*a,p/2),c=(s*s*t-o*o*r)*e,m=(s*s*n-o*o*a)*e,h=s*(o+s)*3,v=o*(o+s)*3;return[[k[0]+(h&&c/h),k[1]+(h&&m/h)],[k[0]-(v&&c/v),k[1]-(v&&m/v)]]}}}),hG=ze({"src/traces/carpet/compute_control_points.js"(J,V){"use strict";var p=fG(),b=Nr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],n=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*n+k[1])/3]}V.exports=function(l,e,t,n,r,a){var o,s,c,m,h,v,g,i,w,S,M=t[0].length,C=t.length,_=r?3*M-2:M,T=a?3*C-2:C;for(l=b(l,T),e=b(e,T),c=0;ch&&_g&&Tv||Ti},n.setScale=function(){var _=n._x,T=n._y,f=E(n._xctrl,n._yctrl,_,T,c.smoothing,m.smoothing);n._xctrl=f[0],n._yctrl=f[1],n.evalxy=k([n._xctrl,n._yctrl],o,s,c.smoothing,m.smoothing),n.dxydi=l([n._xctrl,n._yctrl],c.smoothing,m.smoothing),n.dxydj=e([n._xctrl,n._yctrl],c.smoothing,m.smoothing)},n.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),o-2),f=_[0]-T;return(1-f)*r[T]+f*r[T+1]},n.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),o-2),f=_[1]-T;return(1-f)*a[T]+f*a[T+1]},n.ij2ab=function(_){return[n.i2a(_[0]),n.j2b(_[1])]},n.a2i=function(_){var T=Math.max(0,Math.min(b(_,r),o-2)),f=r[T],u=r[T+1];return Math.max(0,Math.min(o-1,T+(_-f)/(u-f)))},n.b2j=function(_){var T=Math.max(0,Math.min(b(_,a),s-2)),f=a[T],u=a[T+1];return Math.max(0,Math.min(s-1,T+(_-f)/(u-f)))},n.ab2ij=function(_){return[n.a2i(_[0]),n.b2j(_[1])]},n.i2c=function(_,T){return n.evalxy([],_,T)},n.ab2xy=function(_,T,f){if(!f&&(_r[o-1]|Ta[s-1]))return[!1,!1];var u=n.a2i(_),A=n.b2j(T),x=n.evalxy([],u,A);if(f){var z=0,I=0,O=[],D,B,F,P;_r[o-1]?(D=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(D=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-D),Ta[s-1]?(F=s-2,P=1,I=(T-a[s-1])/(a[s-1]-a[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(n.dxydi(O,D,F,B,P),x[0]+=O[0]*z,x[1]+=O[1]*z),I&&(n.dxydj(O,D,F,B,P),x[0]+=O[0]*I,x[1]+=O[1]*I)}return x},n.c2p=function(_,T,f){return[T.c2p(_[0]),f.c2p(_[1])]},n.p2x=function(_,T,f){return[T.p2c(_[0]),f.p2c(_[1])]},n.dadi=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},n.dbdj=function(_){var T=Math.max(0,Math.min(a.length-2,_));return a[T+1]-a[T]},n.dxyda=function(_,T,f,u){var A=n.dxydi(null,_,T,f,u),x=n.dadi(_,f);return[A[0]/x,A[1]/x]},n.dxydb=function(_,T,f,u){var A=n.dxydj(null,_,T,f,u),x=n.dbdj(T,u);return[A[0]/x,A[1]/x]},n.dxyda_rough=function(_,T,f){var u=w*(f||.1),A=n.ab2xy(_+u,T,!0),x=n.ab2xy(_-u,T,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dxydb_rough=function(_,T,f){var u=S*(f||.1),A=n.ab2xy(_,T+u,!0),x=n.ab2xy(_,T-u,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dpdx=function(_){return _._m},n.dpdy=function(_){return _._m}}}}),gG=ze({"src/traces/carpet/calc.js"(J,V){"use strict";var p=Gi(),b=Nr().isArray1D,E=nG(),k=iG(),l=oG(),e=sG(),t=lG(),n=lb(),r=uG(),a=sb(),o=mG();V.exports=function(c,m){var h=p.getFromId(c,m.xaxis),v=p.getFromId(c,m.yaxis),g=m.aaxis,i=m.baxis,w=m.x,S=m.y,M=[];w&&b(w)&&M.push("x"),S&&b(S)&&M.push("y"),M.length&&a(m,g,i,"a","b",M);var C=m._a=m._a||m.a,_=m._b=m._b||m.b;w=m._x||m.x,S=m._y||m.y;var T={};if(m._cheater){var f=g.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;w=E(f,u,m.cheaterslope)}m._x=w=n(w),m._y=S=n(S),r(w,C,_),r(S,C,_),o(m),m.setScale();var A=k(w),x=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),O=.5*(x[1]-x[0]),D=.5*(x[1]+x[0]),B=1.3;return A=[I-z*B,I+z*B],x=[D-O*B,D+O*B],m._extremes[h._id]=p.findExtremes(h,A,{padded:!0}),m._extremes[v._id]=p.findExtremes(v,x,{padded:!0}),l(m,"a","b"),l(m,"b","a"),e(m,g),e(m,i),T.clipsegments=t(m._xctrl,m._yctrl,g,i),T.x=w,T.y=S,T.a=C,T.b=_,[T]}}}),yG=ze({"src/traces/carpet/index.js"(J,V){"use strict";V.exports={attributes:H2(),supplyDefaults:tG(),plot:aG(),calc:gG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Du(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),_G=ze({"lib/carpet.js"(J,V){"use strict";V.exports=yG()}}),YM=ze({"src/traces/scattercarpet/attributes.js"(J,V){"use strict";var p=Bd(),b=su(),E=ws(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=qs(),n=Ki().extendFlat,r=b.marker,a=b.line,o=r.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},b.mode,{dflt:"markers"}),text:n({},b.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:n({},b.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:n({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:n({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:p(),marker:n({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:n({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:n({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:b.zorder}}}),xG=ze({"src/traces/scattercarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=YM();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}h("carpet"),s.xaxis="x",s.yaxis="y";var v=h("a"),g=h("b"),i=Math.min(v.length,g.length);if(!i){s.visible=!1;return}s._length=i,h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext");var w=i0?T=C.labelprefix.replace(/ = $/,""):T=C._hovertitle,i.push(T+": "+_.toFixed(3)+C.labelsuffix)}if(!h.hovertemplate){var S=m.hi||h.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&w(v.aaxis,m.a),M.indexOf("b")!==-1&&w(v.baxis,m.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&b(m,h,i),r.extraText=i.join("
")}return n}}}),MG=ze({"src/traces/scattercarpet/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=l[e];return b.a=t.a,b.b=t.b,b.y=t.y,b}}}),SG=ze({"src/traces/scattercarpet/index.js"(J,V){"use strict";V.exports={attributes:YM(),supplyDefaults:xG(),colorbar:Of(),formatLabels:bG(),calc:wG(),plot:TG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:AG(),selectPoints:Yv(),eventData:MG(),moduleType:"trace",name:"scattercarpet",basePlotModule:Du(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),EG=ze({"lib/scattercarpet.js"(J,V){"use strict";V.exports=SG()}}),XM=ze({"src/traces/contourcarpet/attributes.js"(J,V){"use strict";var p=rg(),b=M1(),E=qs(),k=Ki().extendFlat,l=b.contours;V.exports=k({carpet:{valType:"string",editType:"calc"},z:p.z,a:p.x,a0:p.x0,da:p.dx,b:p.y,b0:p.y0,db:p.dy,text:p.text,hovertext:p.hovertext,transpose:p.transpose,atype:p.xtype,btype:p.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),ZM=ze({"src/traces/contourcarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=XM(),k=hT(),l=xb(),e=bb();V.exports=function(n,r,a,o){function s(v,g){return p.coerce(n,r,E,v,g)}function c(v){return p.coerce2(n,r,E,v)}if(s("carpet"),n.a&&n.b){var m=b(n,r,s,o,"a","b");if(!m){r.visible=!1;return}s("text");var h=s("contours.type")==="constraint";h?k(n,r,s,o,a,{hasHover:!1}):(l(n,r,s,c),e(n,r,s,o,{hasHover:!1}))}else r._defaultColor=a,r._length=null;s("zorder")}}}),kG=ze({"src/traces/contourcarpet/calc.js"(J,V){"use strict";var p=Qf(),b=Nr(),E=sb(),k=lb(),l=ub(),e=cb(),t=$5(),n=ZM(),r=W2(),a=aT();V.exports=function(c,m){var h=m._carpetTrace=r(c,m);if(!(!h||!h.visible||h.visible==="legendonly")){if(!m.a||!m.b){var v=c.data[h.index],g=c.data[m.index];g.a||(g.a=v.a),g.b||(g.b=v.b),n(g,m,m._defaultColor,c._fullLayout)}var i=o(c,m);return a(m,m._z),i}};function o(s,c){var m=c._carpetTrace,h=m.aaxis,v=m.baxis,g,i,w,S,M,C,_;h._minDtick=0,v._minDtick=0,b.isArray1D(c.z)&&E(c,h,v,"a","b",["z"]),g=c._a=c._a||c.a,S=c._b=c._b||c.b,g=g?h.makeCalcdata(c,"_a"):[],S=S?v.makeCalcdata(c,"_b"):[],i=c.a0||0,w=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var T=b.maxRowLength(_),f=c.xtype==="scaled"?"":g,u=t(c,f,i,w,T,h),A=c.ytype==="scaled"?"":S,x=t(c,A,M,C,_.length,v),z={a:u,b:x,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&p(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),CG=ze({"src/traces/carpet/axis_aligned_line.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k,l){var e,t,n,r,a,o,s,c,m,h,v,g,i,w=p(k)?"a":"b",S=w==="a"?b.aaxis:b.baxis,M=S.smoothing,C=w==="a"?b.a2i:b.b2j,_=w==="a"?k:l,T=w==="a"?l:k,f=w==="a"?E.a.length:E.b.length,u=w==="a"?E.b.length:E.a.length,A=Math.floor(w==="a"?b.b2j(T):b.a2i(T)),x=w==="a"?function(re){return b.evalxy([],re,A)}:function(re){return b.evalxy([],A,re)};M&&(n=Math.max(0,Math.min(u-2,A)),r=A-n,t=w==="a"?function(re,ne){return b.dxydi([],re,n,ne,r)}:function(re,ne){return b.dxydj([],n,re,r,ne)});var z=C(_[0]),I=C(_[1]),O=z0?Math.floor:Math.ceil,F=O>0?Math.ceil:Math.floor,P=O>0?Math.min:Math.max,j=O>0?Math.max:Math.min,U=B(z+D),$=F(I-D);s=x(z);var Q=[[s]];for(e=U;e*O<$*O;e+=O)a=[],v=j(z,e),g=P(I,e+O),i=g-v,o=Math.max(0,Math.min(f-2,Math.floor(.5*(v+g)))),c=x(g),M&&(m=t(o,v-o),h=t(o,g-o),a.push([s[0]+m[0]/3*i,s[1]+m[1]/3*i]),a.push([c[0]-h[0]/3*i,c[1]-h[1]/3*i])),a.push(c),Q.push(a),s=c;return Q}}}),LG=ze({"src/traces/contourcarpet/plot.js"(J,V){"use strict";var p=ci(),b=HM(),E=WM(),k=$i(),l=Nr(),e=iT(),t=oT(),n=wb(),r=E1(),a=lT(),o=sT(),s=uT(),c=W2(),m=CG();V.exports=function(f,u,A,x){var z=u.xaxis,I=u.yaxis;l.makeTraceGroups(x,A,"contour").each(function(O){var D=p.select(this),B=O[0],F=B.trace,P=F._carpetTrace=c(f,F),j=f.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var U=B.a,$=B.b,Q=F.contours,re=o(Q,u,B),ne=Q.type==="constraint",se=Q._operation,G=ne?se==="="?"lines":"fill":Q.coloring;function X(Me){var Se=P.ab2xy(Me[0],Me[1],!0);return[z.c2p(Se[0]),I.c2p(Se[1])]}var K=[[U[0],$[$.length-1]],[U[U.length-1],$[$.length-1]],[U[U.length-1],$[0]],[U[0],$[0]]];e(re);var H=(U[U.length-1]-U[0])*1e-8,Y=($[$.length-1]-$[0])*1e-8;t(re,H,Y);var q=re;Q.type==="constraint"&&(q=a(re,se)),h(re,X);var Z,ee,ae,he,xe=[];for(he=j.clipsegments.length-1;he>=0;he--)Z=j.clipsegments[he],ee=b([],Z.x,z.c2p),ae=b([],Z.y,I.c2p),ee.reverse(),ae.reverse(),xe.push(E(ee,ae,Z.bicubic));var we="M"+xe.join("L")+"Z";M(D,j.clipsegments,z,I,ne,G),C(F,D,z,I,q,K,X,P,j,G,we),v(D,re,f,B,Q,u,P),k.setClipUrl(D,P._clipPathId,f)})};function h(T,f){var u,A,x,z,I,O,D,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(T,f,u){var A=T.getPointAtLength(f),x=T.getPointAtLength(u),z=x.x-A.x,I=x.y-A.y,O=Math.sqrt(z*z+I*I);return[z/O,I/O]}function w(T){var f=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/f,T[1]/f]}function S(T,f){var u=Math.abs(T[0]*f[0]+T[1]*f[1]),A=Math.sqrt(1-u*u);return A/u}function M(T,f,u,A,x,z){var I,O,D,B,F=l.ensureSingle(T,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!x?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===f.edgepaths.length){l.log("unclosed perimeter path");break}D=Q,P=F.indexOf(D)===-1,P&&(D=F[0],B+=q(j,U)+"Z",j=null)}for(D=0;D_):C=O>x,_=O;var D=h(x,z,I,O);D.pos=A,D.yc=(x+O)/2,D.i=u,D.dir=C?"increasing":"decreasing",D.x=D.pos,D.y=[I,z],T&&(D.orig_p=s[u]),S&&(D.tx=o.text[u]),M&&(D.htx=o.hovertext[u]),f.push(D)}else f.push({pos:A,empty:!0})}return o._extremes[m._id]=E.findExtremes(m,p.concat(i,g),{padded:!0}),f.length&&(f[0].t={labels:{open:b(a,"open:")+" ",high:b(a,"high:")+" ",low:b(a,"low:")+" ",close:b(a,"close:")+" "}}),f}function r(a,o,s){var c=s._minDiff;if(!c){var m=a._fullData,h=[];c=1/0;var v;for(v=0;v"+w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat)):(I=b.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=x,I.yLabel=w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat),I.name="",S.push(I),f[x]=I)}return S}function o(s,c,m,h){var v=s.cd,g=s.ya,i=v[0].trace,w=v[0].t,S=r(s,c,m,h);if(!S)return[];var M=S.index,C=v[M],_=S.index=C.i,T=C.dir;function f(D){return w.labels[D]+p.hoverLabelText(g,i[D][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),x=u==="all",z=x||A.indexOf("y")!==-1,I=x||A.indexOf("text")!==-1,O=z?[f("open"),f("high"),f("low"),f("close")+" "+t[T]]:[];return I&&l(C,i,O),S.extraText=O.join("
"),S.y0=S.y1=g.c2p(C.yc,!0),[S]}V.exports={hoverPoints:n,hoverSplit:a,hoverOnPoints:o}}}),QM=ze({"src/traces/ohlc/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r=k[0].t.bPos||0;if(E===!1)for(n=0;nc?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var w=r.c2l(i)-s;return(g(w)?w:0)+v},r.g2c=function(i){return r.l2c(i+s-v)},r.g2p=function(i){return i*h},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,a){return a==="degrees"?E(r):r}function t(r,a){return a==="degrees"?k(r):r}function n(r,a){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(m,h){return e(s(m),h)},r.c2d=function(m,h){return c(t(m,h))}}r.makeCalcdata=function(m,h){var v=m[h],g=m._length,i,w,S=function(f){return r.d2c(f,m.thetaunit)};if(v)for(i=new Array(g),w=0;w0?f:1/0},C=E(S,M),_=p.mod(C+1,S.length);return[S[C],S[_]]}function h(w){return Math.abs(w)>1e-10?w:0}function v(w,S,M){S=S||0,M=M||0;for(var C=w.length,_=new Array(C),T=0;T0?1:0}function b(t){var n=t[0],r=t[1];if(!isFinite(n)||!isFinite(r))return[1,0];var a=(n+1)*(n+1)+r*r;return[(n*n+r*r-1)/a,2*r/a]}function E(t,n){var r=n[0],a=n[1];return[r*t.radius+t.cx,-a*t.radius+t.cy]}function k(t,n){return n*t.radius}function l(t,n,r,a){var o=E(t,b([r,n])),s=o[0],c=o[1],m=E(t,b([a,n])),h=m[0],v=m[1];if(n===0)return["M"+s+","+c,"L"+h+","+v].join(" ");var g=k(t,1/Math.abs(n));return["M"+s+","+c,"A"+g+","+g+" 0 0,"+(n<0?1:0)+" "+h+","+v].join(" ")}function e(t,n,r,a){var o=k(t,1/(n+1)),s=E(t,b([n,r])),c=s[0],m=s[1],h=E(t,b([n,a])),v=h[0],g=h[1];if(p(r)!==p(a)){var i=E(t,b([n,0])),w=i[0],S=i[1];return["M"+c+","+m,"A"+o+","+o+" 0 0,"+(0Ie?(Ve=ee,Ge=ee*Ie,ce=(ae-Ge)/K.h/2,ke=[q[0],q[1]],_e=[Z[0]+ce,Z[1]-ce]):(Ve=ae/Ie,Ge=ae,ce=(ee-Ve)/K.w/2,ke=[q[0]+ce,q[1]-ce],_e=[Z[0],Z[1]]),G.xLength2=Ve,G.yLength2=Ge,G.xDomain2=ke,G.yDomain2=_e;var ve=G.xOffset2=K.l+K.w*ke[0],le=G.yOffset2=K.t+K.h*(1-_e[1]),Ae=G.radius=Ve/we,Be=G.innerRadius=G.getHole(se)*Ae,Xe=G.cx=ve-Ae*xe[0],Ye=G.cy=le+Ae*xe[3],yt=G.cxx=Xe-ve,gt=G.cyy=Ye-le,Tt=H.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),G.radialAxis=G.mockAxis(ne,se,H,{_id:"x",side:Tt,_trueSide:At,domain:[Be/K.w,Ae/K.w]}),G.angularAxis=G.mockAxis(ne,se,Y,{side:"right",domain:[0,Math.PI],autorange:!1}),G.doAutoRange(ne,se),G.updateAngularAxis(ne,se),G.updateRadialAxis(ne,se),G.updateRadialAxisTitle(ne,se),G.xaxis=G.mockCartesianAxis(ne,se,{_id:"x",domain:ke}),G.yaxis=G.mockCartesianAxis(ne,se,{_id:"y",domain:_e});var $t=G.pathSubplot();G.clipPaths.forTraces.select("path").attr("d",$t).attr("transform",l(yt,gt)),X.frontplot.attr("transform",l(ve,le)).call(t.setClipUrl,G._hasClipOnAxisFalse?null:G.clipIds.forTraces,G.gd),X.bg.attr("d",$t).attr("transform",l(Xe,Ye)).call(e.fill,se.bgcolor)},j.mockAxis=function(ne,se,G,X){var K=E.extendFlat({},G,X);return o(K,se,ne),K},j.mockCartesianAxis=function(ne,se,G){var X=this,K=X.isSmith,H=G._id,Y=E.extendFlat({type:"linear"},G);a(Y,ne);var q={x:[0,2],y:[1,3]};return Y.setRange=function(){var Z=X.sectorBBox,ee=q[H],ae=X.radialAxis._rl,he=(ae[1]-ae[0])/(1-X.getHole(se));Y.range=[Z[ee[0]]*he,Z[ee[1]]*he]},Y.isPtWithinRange=H==="x"&&!K?function(Z){return X.isPtInside(Z)}:function(){return!0},Y.setRange(),Y.setScale(),Y},j.doAutoRange=function(ne,se){var G=this,X=G.gd,K=G.radialAxis,H=G.getRadial(se);s(X,K);var Y=K.range;if(H.range=Y.slice(),H._input.range=Y.slice(),K._rl=[K.r2l(Y[0],null,"gregorian"),K.r2l(Y[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var Z=K.r2l(K.maxallowed);K._rl[0]90&&ae<=270&&(he.tickangle=180);var Me=we?function(Ae){var Be=I(G,A([Ae.x,0]));return l(Be[0]-q,Be[1]-Z)}:function(Ae){return l(he.l2p(Ae.x)+Y,0)},Se=we?function(Ae){return z(G,Ae.x,-1/0,1/0)}:function(Ae){return G.pathArc(he.r2p(Ae.x)+Y)},Ie=U(ee);if(G.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),G.radialTickLayout=Ie),xe){he.setScale();var Ve=0,Ge=we?(he.tickvals||[]).filter(function(Ae){return Ae>=0}).map(function(Ae){return r.tickText(he,Ae,!0,!1)}):r.calcTicks(he),ke=we?Ge:r.clipEnds(he,Ge),_e=r.getTickSigns(he)[2];we&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(_e=-_e),he.ticks==="top"&&he.side==="top"&&(Ve=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ve=he.ticklen)),r.drawTicks(X,he,{vals:Ge,layer:K["radial-axis"],path:r.makeTickPath(he,0,_e),transFn:Me,crisp:!1}),r.drawGrid(X,he,{vals:ke,layer:K["radial-grid"],path:Se,transFn:E.noop,crisp:!1}),r.drawLabels(X,he,{vals:Ge,layer:K["radial-axis"],transFn:Me,labelFns:r.makeLabelFns(he,Ve)})}var ce=G.radialAxisAngle=G.vangles?F(Q(B(ee.angle),G.vangles)):ee.angle,ve=l(q,Z),le=ve+k(-ce);re(K["radial-axis"],xe&&(ee.showticklabels||ee.ticks),{transform:le}),re(K["radial-grid"],xe&&ee.showgrid,{transform:we?"":ve}),re(K["radial-line"].select("line"),xe&&ee.showline,{x1:we?-H:Y,y1:0,x2:H,y2:0,transform:le}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ne,se,G){if(!this.isSmith){var X=this,K=X.gd,H=X.radius,Y=X.cx,q=X.cy,Z=X.getRadial(se),ee=X.id+"title",ae=0;if(Z.title){var he=t.bBox(X.layers["radial-axis"].node()).height,xe=Z.title.font.size,we=Z.side;ae=we==="top"?xe:we==="counterclockwise"?-(he+xe*.4):he+xe*.8}var Me=G!==void 0?G:X.radialAxisAngle,Se=B(Me),Ie=Math.cos(Se),Ve=Math.sin(Se),Ge=Y+H/2*Ie+ae*Ve,ke=q-H/2*Ve+ae*Ie;X.layers["radial-axis-title"]=v.draw(K,ee,{propContainer:Z,propName:X.id+".radialaxis.title.text",placeholder:O(K,"Click to enter radial axis title"),attributes:{x:Ge,y:ke,"text-anchor":"middle"},transform:{rotate:-Me}})}},j.updateAngularAxis=function(ne,se){var G=this,X=G.gd,K=G.layers,H=G.radius,Y=G.innerRadius,q=G.cx,Z=G.cy,ee=G.getAngular(se),ae=G.angularAxis,he=G.isSmith;he||(G.fillViewInitialKey("angularaxis.rotation",ee.rotation),ae.setGeometry(),ae.setScale());var xe=he?function(Be){var Xe=I(G,A([0,Be.x]));return Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2}:function(Be){return ae.t2g(Be.x)};ae.type==="linear"&&ae.thetaunit==="radians"&&(ae.tick0=F(ae.tick0),ae.dtick=F(ae.dtick));var we=function(Be){return l(q+H*Math.cos(Be),Z-H*Math.sin(Be))},Me=he?function(Be){var Xe=I(G,A([0,Be.x]));return l(Xe[0],Xe[1])}:function(Be){return we(xe(Be))},Se=he?function(Be){var Xe=I(G,A([0,Be.x])),Ye=Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2;return l(Xe[0],Xe[1])+k(-F(Ye))}:function(Be){var Xe=xe(Be);return we(Xe)+k(-F(Xe))},Ie=he?function(Be){return x(G,Be.x,0,1/0)}:function(Be){var Xe=xe(Be),Ye=Math.cos(Xe),yt=Math.sin(Xe);return"M"+[q+Y*Ye,Z-Y*yt]+"L"+[q+H*Ye,Z-H*yt]},Ve=r.makeLabelFns(ae,0),Ge=Ve.labelStandoff,ke={};ke.xFn=function(Be){var Xe=xe(Be);return Math.cos(Xe)*Ge},ke.yFn=function(Be){var Xe=xe(Be),Ye=Math.sin(Xe)>0?.2:1;return-Math.sin(Xe)*(Ge+Be.fontSize*Ye)+Math.abs(Math.cos(Xe))*(Be.fontSize*_)},ke.anchorFn=function(Be){var Xe=xe(Be),Ye=Math.cos(Xe);return Math.abs(Ye)<.1?"middle":Ye>0?"start":"end"},ke.heightFn=function(Be,Xe,Ye){var yt=xe(Be);return-.5*(1+Math.sin(yt))*Ye};var _e=U(ee);G.angularTickLayout!==_e&&(K["angular-axis"].selectAll("."+ae._id+"tick").remove(),G.angularTickLayout=_e);var ce=he?[1/0].concat(ae.tickvals||[]).map(function(Be){return r.tickText(ae,Be,!0,!1)}):r.calcTicks(ae);he&&(ce[0].text="\u221E",ce[0].fontSize*=1.75);var ve;if(se.gridshape==="linear"?(ve=ce.map(xe),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,G.vangles=ve,ae.type==="category"&&(ce=ce.filter(function(Be){return E.isAngleInsideSector(xe(Be),G.sectorInRad)})),ae.visible){var le=ae.ticks==="inside"?-1:1,Ae=(ae.linewidth||1)/2;r.drawTicks(X,ae,{vals:ce,layer:K["angular-axis"],path:"M"+le*Ae+",0h"+le*ae.ticklen,transFn:Se,crisp:!1}),r.drawGrid(X,ae,{vals:ce,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(X,ae,{vals:ce,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Me,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:G.pathSubplot(),transform:l(q,Z)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ne,se){if(!this.gd._context.staticPlot){var G=!this.isSmith;G&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,se,0),this.updateRadialDrag(ne,se,1)),this.updateHoverAndMainDrag(ne)}},j.updateHoverAndMainDrag=function(ne){var se=this,G=se.isSmith,X=se.gd,K=se.layers,H=ne._zoomlayer,Y=T.MINZOOM,q=T.OFFEDGE,Z=se.radius,ee=se.innerRadius,ae=se.cx,he=se.cy,xe=se.cxx,we=se.cyy,Me=se.sectorInRad,Se=se.vangles,Ie=se.radialAxis,Ve=f.clampTiny,Ge=f.findXYatLength,ke=f.findEnclosingVertexAngles,_e=T.cornerHalfWidth,ce=T.cornerLen/2,ve,le,Ae=c.makeDragger(K,"path","maindrag",ne.dragmode===!1?"none":"crosshair");p.select(Ae).attr("d",se.pathSubplot()).attr("transform",l(ae,he)),Ae.onmousemove=function(qt){h.hover(X,qt,se.id),X._fullLayout._lasthover=Ae,X._fullLayout._hoversubplot=se.id},Ae.onmouseout=function(qt){X._dragging||m.unhover(X,qt)};var Be={element:Ae,gd:X,subplot:se.id,plotinfo:{id:se.id,xaxis:se.xaxis,yaxis:se.yaxis},xaxes:[se.xaxis],yaxes:[se.yaxis]},Xe,Ye,yt,gt,Tt,At,$t,rr,_r;function Xt(qt,Vt){return Math.sqrt(qt*qt+Vt*Vt)}function or(qt,Vt){return Xt(qt-xe,Vt-we)}function Ot(qt,Vt){return Math.atan2(we-Vt,qt-xe)}function vt(qt,Vt){return[qt*Math.cos(Vt),qt*Math.sin(-Vt)]}function ht(qt,Vt){if(qt===0)return se.pathSector(2*_e);var Ht=ce/qt,Sr=Vt-Ht,Kr=Vt+Ht,Yt=Math.max(0,Math.min(qt,Z)),Rt=Yt-_e,nr=Yt+_e;return"M"+vt(Rt,Sr)+"A"+[Rt,Rt]+" 0,0,0 "+vt(Rt,Kr)+"L"+vt(nr,Kr)+"A"+[nr,nr]+" 0,0,1 "+vt(nr,Sr)+"Z"}function De(qt,Vt,Ht){if(qt===0)return se.pathSector(2*_e);var Sr=vt(qt,Vt),Kr=vt(qt,Ht),Yt=Ve((Sr[0]+Kr[0])/2),Rt=Ve((Sr[1]+Kr[1])/2),nr,ur;if(Yt&&Rt){var cr=Rt/Yt,Rr=-1/cr,Qr=Ge(_e,cr,Yt,Rt);nr=Ge(ce,Rr,Qr[0][0],Qr[0][1]),ur=Ge(ce,Rr,Qr[1][0],Qr[1][1])}else{var Zr,ha;Rt?(Zr=ce,ha=_e):(Zr=_e,ha=ce),nr=[[Yt-Zr,Rt-ha],[Yt+Zr,Rt-ha]],ur=[[Yt-Zr,Rt+ha],[Yt+Zr,Rt+ha]]}return"M"+nr.join("L")+"L"+ur.reverse().join("L")+"Z"}function Ne(){yt=null,gt=null,Tt=se.pathSubplot(),At=!1;var qt=X._fullLayout[se.id];$t=e.luminosity(qt.bgcolor),rr=c.makeZoombox(H,$t,ae,he,Tt),rr.attr("fill-rule","evenodd"),_r=c.makeCorners(H,ae,he),w(X)}function We(qt,Vt){return Vt=Math.max(Math.min(Vt,Z),ee),qtY?(qt-1&&qt===1&&i(Vt,X,[se.xaxis],[se.yaxis],se.id,Be),Ht.indexOf("event")>-1&&h.click(X,Vt,se.id)}Be.prepFn=function(qt,Vt,Ht){var Sr=X._fullLayout.dragmode,Kr=Ae.getBoundingClientRect();X._fullLayout._calcInverseTransform(X);var Yt=X._fullLayout._invTransform;ve=X._fullLayout._invScaleX,le=X._fullLayout._invScaleY;var Rt=E.apply3DTransform(Yt)(Vt-Kr.left,Ht-Kr.top);if(Xe=Rt[0],Ye=Rt[1],Se){var nr=f.findPolygonOffset(Z,Me[0],Me[1],Se);Xe+=xe+nr[0],Ye+=we+nr[1]}switch(Sr){case"zoom":Be.clickFn=Ct,G||(Se?Be.moveFn=Mt:Be.moveFn=Je,Be.doneFn=pt,Ne(qt,Vt,Ht));break;case"select":case"lasso":g(qt,Vt,Ht,Be,Sr);break}},m.init(Be)},j.updateRadialDrag=function(ne,se,G){var X=this,K=X.gd,H=X.layers,Y=X.radius,q=X.innerRadius,Z=X.cx,ee=X.cy,ae=X.radialAxis,he=T.radialDragBoxSize,xe=he/2;if(!ae.visible)return;var we=B(X.radialAxisAngle),Me=ae._rl,Se=Me[0],Ie=Me[1],Ve=Me[G],Ge=.75*(Me[1]-Me[0])/(1-X.getHole(se))/Y,ke,_e,ce;G?(ke=Z+(Y+xe)*Math.cos(we),_e=ee-(Y+xe)*Math.sin(we),ce="radialdrag"):(ke=Z+(q-xe)*Math.cos(we),_e=ee-(q-xe)*Math.sin(we),ce="radialdrag-inner");var ve=c.makeRectDragger(H,ce,"crosshair",-xe,-xe,he,he),le={element:ve,gd:K};ne.dragmode===!1&&(le.dragmode=!1),re(p.select(ve),ae.visible&&q0!=(G?Xe>Se:Xe=90||K>90&&H>=450?we=1:q<=0&&ee<=0?we=0:we=Math.max(q,ee),K<=180&&H>=180||K>180&&H>=540?ae=-1:Y>=0&&Z>=0?ae=0:ae=Math.min(Y,Z),K<=270&&H>=270||K>270&&H>=630?he=-1:q>=0&&ee>=0?he=0:he=Math.min(q,ee),H>=360?xe=1:Y<=0&&Z<=0?xe=0:xe=Math.max(Y,Z),[ae,he,xe,we]}function Q(ne,se){var G=function(K){return E.angleDist(ne,K)},X=E.findIndexOfMin(se,G);return se[X]}function re(ne,se,G){return se?(ne.attr("display",null),ne.attr(G)):ne&&ne.attr("display","none"),ne}}}),n4=ze({"src/plots/polar/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),n={visible:k({},b.visible,{dflt:!0}),type:k({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:k({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},b.minallowed,{editType:"plot"}),maxallowed:k({},b.maxallowed,{editType:"plot"}),range:k({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},b.title.text,{editType:"plot",dflt:""}),font:k({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(n,e,t);var r={visible:k({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.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:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),V.exports={domain:E({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:p.background},radialaxis:n,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),qG=ze({"src/plots/polar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=Uv(),t=Ym(),n=ov(),r=sv(),a=Hx(),o=g1(),s=Jw(),c=Xm(),m=n4(),h=t4(),v=X2(),g=v.axisNames;function i(S,M,C,_){var T=C("bgcolor");_.bgColor=b.combine(T,_.paper_bgcolor);var f=C("sector");C("hole");var u=l(_.fullData,v.name,_.id),A=_.layoutOut,x;function z(xe,we){return C(x+"."+xe,we)}for(var I=0;I")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),HG=ze({"src/traces/scatterpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:$2(),categories:["polar","symbols","showLegend","scatter-like"],attributes:uy(),supplyDefaults:K2().supplyDefaults,colorbar:Of(),formatLabels:J2(),calc:VG(),plot:GG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:Q2().hoverPoints,selectPoints:Yv(),meta:{}}}}),WG=ze({"lib/scatterpolar.js"(J,V){"use strict";V.exports=HG()}}),i4=ze({"src/traces/scatterpolargl/attributes.js"(J,V){"use strict";var p=uy(),{cliponaxis:b,hoveron:E}=p,k=Lo(p,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:n},fill:r,fillcolor:a,marker:o,textfont:s,textposition:c}=ty();V.exports=lo(Li({},k),{connectgaps:l,fill:r,fillcolor:a,line:{color:e,dash:t,editType:"calc",width:n},marker:o,textfont:s,textposition:c})}}),YG=ze({"src/traces/scatterpolargl/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=K2().handleRThetaDefaults,k=id(),l=_d(),e=xd(),t=Od(),n=zd().PTS_LINESONLY,r=i4();V.exports=function(o,s,c,m){function h(g,i){return p.coerce(o,s,r,g,i)}var v=E(o,s,m,h);if(!v){s.visible=!1;return}h("thetaunit"),h("mode",v=t&&(_.marker.cluster=w.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(a,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(a,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(a,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(a,i,_.text,_.markerUnsel))),_.fill&&!h.fill2d&&(h.fill2d=!0),_.marker&&!h.scatter2d&&(h.scatter2d=!0),_.line&&!h.line2d&&(h.line2d=!0),_.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(_.line),h.fillOptions.push(_.fill),h.markerOptions.push(_.marker),h.markerSelectedOptions.push(_.markerSel),h.markerUnselectedOptions.push(_.markerUnsel),h.textOptions.push(_.text),h.textSelectedOptions.push(_.textSel),h.textUnselectedOptions.push(_.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),w.x=x,w.y=z,w.rawx=x,w.rawy=z,w.r=M,w.theta=C,w.positions=A,w._scene=h,w.index=h.count,h.count++}}),E(a,o,s)}},V.exports.reglPrecompiled=n}}),QG=ze({"src/traces/scatterpolargl/index.js"(J,V){"use strict";var p=KG();p.plot=JG(),V.exports=p}}),eH=ze({"lib/scatterpolargl.js"(J,V){"use strict";V.exports=QG()}}),o4=ze({"src/traces/barpolar/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,templatefallbackAttrs:b}=xs(),E=Ki().extendFlat,k=uy(),l=jd();V.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:p(),hovertemplatefallback:b(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),s4=ze({"src/traces/barpolar/layout_attributes.js"(J,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),tH=ze({"src/traces/barpolar/defaults.js"(J,V){"use strict";var p=Nr(),b=K2().handleRThetaDefaults,E=eb(),k=o4();V.exports=function(e,t,n,r){function a(s,c){return p.coerce(e,t,k,s,c)}var o=b(e,t,r,a);if(!o){t.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),E(e,t,a,n,r),p.coerceSelectionMarkerOpacity(t,a)}}}),rH=ze({"src/traces/barpolar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=s4();V.exports=function(E,k,l){var e={},t;function n(o,s){return p.coerce(E[t]||{},k[t],b,o,s)}for(var r=0;r0?(m=s,h=c):(m=c,h=s);var v=l.findEnclosingVertexAngles(m,t.vangles)[0],g=l.findEnclosingVertexAngles(h,t.vangles)[1],i=[v,(m+h)/2,g];return l.pathPolygonAnnulus(a,o,m,h,i,n,r)}:function(a,o,s,c){return E.pathAnnulus(a,o,s,c,n,r)}}}}),nH=ze({"src/traces/barpolar/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=eg().getTraceColor,k=b.fillText,l=Q2().makeHoverPointText,e=Z2().isPtInsidePolygon;V.exports=function(n,r,a){var o=n.cd,s=o[0].trace,c=n.subplot,m=c.radialAxis,h=c.angularAxis,v=c.vangles,g=v?e:b.isPtInsideSector,i=n.maxHoverDistance,w=h._period||2*Math.PI,S=Math.abs(m.g2p(Math.sqrt(r*r+a*a))),M=Math.atan2(a,r);m.range[0]>m.range[1]&&(M+=Math.PI);var C=function(u){return g(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],v)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/w)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(p.getClosest(o,C,n),n.index!==!1){var _=n.index,T=o[_];n.x0=n.x1=T.ct[0],n.y0=n.y1=T.ct[1];var f=b.extendFlat({},T,{r:T.s,theta:T.p});return k(T,s,n),l(f,s,c,n),n.hovertemplate=s.hovertemplate,n.color=E(s,T),n.xLabelVal=n.yLabelVal=void 0,T.s<0&&(n.idealAlign="left"),[n]}}}}),iH=ze({"src/traces/barpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:$2(),categories:["polar","bar","showLegend"],attributes:o4(),layoutAttributes:s4(),supplyDefaults:tH(),supplyLayoutDefaults:rH(),calc:l4().calc,crossTraceCalc:l4().crossTraceCalc,plot:aH(),colorbar:Of(),formatLabels:J2(),style:ld().style,styleOnSelect:ld().styleOnSelect,hoverPoints:nH(),selectPoints:tg(),meta:{}}}}),oH=ze({"lib/barpolar.js"(J,V){"use strict";V.exports=iH()}}),u4=ze({"src/plots/smith/constants.js"(J,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),c4=ze({"src/plots/smith/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({ticklen:b.ticklen,tickwidth:k({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),n=k({visible:k({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},e,t);V.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:p.background},realaxis:n,imaginaryaxis:r,editType:"calc"}}}),sH=ze({"src/plots/smith/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=sv(),t=ov(),n=g1(),r=Dd(),a=c4(),o=u4(),s=o.axisNames,c=h(function(v){return p.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(g){return-g}).concat([0]).concat(v)},String);function m(v,g,i,w){var S=i("bgcolor");w.bgColor=b.combine(S,w.paper_bgcolor);var M=l(w.fullData,o.name,w.id),C=w.layoutOut,_;function T(U,$){return i(_+"."+U,$)}for(var f=0;f")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),pH=ze({"src/traces/scattersmith/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:lH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:f4(),supplyDefaults:uH(),colorbar:Of(),formatLabels:cH(),calc:fH(),plot:hH(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:dH().hoverPoints,selectPoints:Yv(),meta:{}}}}),vH=ze({"lib/scattersmith.js"(J,V){"use strict";V.exports=pH()}}),h4=ze({"src/traces/quiver/attributes.js"(J,V){"use strict";var p=ws(),b=xs().hovertemplateAttrs,E=Il().axisHoverFormat,k=Ki().extendFlat,l=qs(),e=Uc().dash,t=fv(),n=su(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:n.x0,dx:n.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:n.y0,dy:n.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},p.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:b({},{keys:["x","y","u","v","text","name"]}),text:n.text,textposition:n.textposition,textfont:n.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};V.exports=r}}),mH=ze({"src/traces/quiver/defaults.js"(J,V){"use strict";var p=Nr(),b=h4(),E=Gv(),k=Bf().hasColorscale,l=qc();V.exports=function(t,n,r,a){function o(S,M){return p.coerce(t,n,b,S,M)}var s=E(t,n,a,o);if(!s){n.visible=!1;return}var c=o("u"),m=o("v");if(!p.isArrayOrTypedArray(c)||c.length===0){n.u=new Array(s);for(var h=0;hO&&(O=c[Q]),m[Q]B&&(B=m[Q]),GP&&(P=G),XU&&(U=X);var K=Math.sqrt(G*G+X*X);if(K>i&&(i=K),KS&&(S=H))}}else re.x=k,re.y=k}if(a._maxNorm=i,u==="scaled"||A==="paper"){let Me=O-I,Se=B-D;var Y;Me===0&&Se===0?Y=1:Y=(Me+Se+Math.sqrt((Me-Se)*(Me-Se)+4*$*Me*Se))/(2*($-1)),Y*=t,a._scaleFactor=Y/a._maxNorm}else a._scaleFactor=1;a._scaleFactor*=a.lengthfactor;let q=new Array(h),Z=new Array(h),ee=new Array(h),ae=new Array(h);for(var he,xe,Q=0;Qm.i&&isFinite(h[m.i]))v=h[m.i];else{var g=o.u&&o.u[m.i]||0,i=o.v&&o.v[m.i]||0;v=Math.sqrt(g*g+i*i)}return c(v)})}function t(a){var o=p.select(a).selectAll("g.trace.quiver");o.each(function(s){r(a,s,p.select(this))})}function n(a,o,s){r(a,o,s)}function r(a,o,s){var c=o[0].trace,m=c.marker||{},h=m.line||{},v=b.isArrayOrTypedArray(m.color)?void 0:m.color,g=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},w=(c.unselected||{}).marker||{},S=i.line||{},M=w.line||{};s.selectAll("path.js-line").each(function(_){var T=p.select(this),f=!_.selected,u=f?w.color:i.color,A=f?M.width!==void 0?M.width:h.width:S.width!==void 0?S.width:h.width;u?(E.lineGroupStyle(T,A,u,h.dash),T.style("stroke-opacity",1)):(E.lineGroupStyle(T,A,v,h.dash),g&&e(T,c),T.style("stroke-opacity",f?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,h.width,v,h.dash),g&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,a)}}V.exports={style:t,styleOnSelect:n,colorscaleStroke:e}}}),_H=ze({"src/traces/quiver/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=e3().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,n=.7;V.exports=function(o,s,c,m,h,v){var g,i,w=!h,S=!!h&&h.duration>0;if(g=m.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),g.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),g.order(),S){v&&(i=v());var M=p.transition().duration(h.duration).ease(h.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){m.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,h)})})}else g.each(function(C,_){r(o,_,s,C,c,this,h)});w&&g.exit().remove()};function r(a,o,s,c,m,h,v){var g=c[0].trace,i=s.xaxis,w=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=p.select(h);var S=p.select(h).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,a);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:T}=g,f=T==="paper"?g._scaleFactor*Math.sqrt(Math.abs(i._m*w._m)):g._scaleFactor,u=g.marker.arrowsize;M.each(function(B){let F=p.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(T==="paper"?B._u*Math.sign(i._m):p.round(i._m*B._u))*f,j=(T==="paper"?B._v*Math.sign(w._m):p.round(w._m*B._v))*f,U=(g._input.marker||{}).arrowsize!==void 0;var $,Q,re,ne;C==="tip"?($=i.c2p(B.x)-P,re=w.c2p(B.y)-j,Q=i.c2p(B.x),ne=w.c2p(B.y)):C==="center"?($=i.c2p(B.x)-P/2,re=w.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ne=w.c2p(B.y)+j/2):($=i.c2p(B.x),re=w.c2p(B.y),Q=i.c2p(B.x)+P,ne=w.c2p(B.y)+j),B._px0=$,B._py0=re,B._px1=Q,B._py1=ne;var se=g.marker.line.width;U||(se=Math.max(se,t));let G=Math.sqrt((Q-$)*(Q-$)+(ne-re)*(ne-re)),X=n*G,K=Math.min(e*u*se,X),H=Math.atan2(ne-re,Q-$),Y=Q-K*Math.cos(H-l),q=ne-K*Math.sin(H-l),Z=Q-K*Math.cos(H+l),ee=ne-K*Math.sin(H+l),ae="M"+$+","+re+"L"+Q+","+ne+"L"+Y+","+q+"L"+Q+","+ne+"L"+Z+","+ee;F.attr("d",ae)});var A=g.marker||{},x=A.line||{},z=b.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,x.width,z,x.dash),g._hasColorscale&&k(M,g);var I=p.select(h).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,a);var O=I.selectAll("g.textpoint").data(c);if(O.enter().append("g").classed("textpoint",!0).append("text"),O.exit().remove(),O.each(function(B){var F=p.select(this),P=E.translatePoint(B,F.select("text"),i,w);P||F.remove()}),O.selectAll("text").call(E.textPointStyle,g,a).each(function(B){var F=i.c2p(B.x),P=w.c2p(B.y);p.select(this).selectAll("tspan.line").each(function(){p.select(this).attr({x:F,y:P})})}),v&&v.duration>0){var D=p.transition().duration(v.duration).ease(v.easing);M.transition(D).style("opacity",1)}}}}),xH=ze({"src/traces/quiver/hover.js"(J,V){"use strict";var p=Nr(),b=Zl(),E=Jm();function k(l,e,t,n,r,a){let o=r-t,s=a-n,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-n)*(e-n));var m=((l-t)*o+(e-n)*s)/c;m=Math.max(0,Math.min(1,m));let h=t+m*o,v=n+m*s;return Math.sqrt((l-h)*(l-h)+(e-v)*(e-v))}V.exports=function(e,t,n,r){var a=e.cd,o=a[0].trace,s=e.xa,c=e.ya,m=s.c2p(t),h=c.c2p(n),v=function(T){return T._px0===void 0?1/0:k(m,h,T._px0,T._py0,T._px1,T._py1)};if(b.getClosest(a,v,e),e.index!==!1){var g=a[e.index],i=s.c2p(g.x,!0),w=c.c2p(g.y,!0),S=Math.sqrt((m-i)*(m-i)+(h-w)*(h-w));e.index=g.i;var M=o.u?o.u[g.i]:0,C=o.v?o.v[g.i]:0,_="u: "+M+", v: "+C;return p.extendFlat(e,{color:E(o,g),x0:i-3,x1:i+3,xLabelVal:g.x,y0:w-3,y1:w+3,yLabelVal:g.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),p.fillText(g,o,e),[e]}}}}),bH=ze({"src/traces/quiver/format_labels.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(k,l,e){var t={},n={_fullLayout:e},r=p.getFromTrace(n,l,"x"),a=p.getFromTrace(n,l,"y"),o=k.x,s=k.y;t.xLabel=p.tickText(r,r.c2l(o),!0).text,t.yLabel=p.tickText(a,a.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,m=l.v?l.v[k.i]:0,h=l.uhoverformat,v=l.vhoverformat;return t.uLabel=h?b.numberFormat(h)(c):String(c),t.vLabel=v?b.numberFormat(v)(m):String(m),t}}}),wH=ze({"src/traces/quiver/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){return b.x=E.x,b.y=E.y,b.u=k.u?k.u[e]:void 0,b.v=k.v?k.v[e]:void 0,b}}}),TH=ze({"src/traces/quiver/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"quiver",basePlotModule:Du(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:h4(),supplyDefaults:mH(),calc:gH(),crossTraceCalc:yH(),plot:_H(),style:e3().style,styleOnSelect:e3().styleOnSelect,hoverPoints:xH(),formatLabels:bH(),eventData:wH(),selectPoints:Yv(),colorbar:Of(),animatable:!0,meta:{}}}}),AH=ze({"lib/quiver.js"(J,V){"use strict";V.exports=TH()}}),th=ze({"node_modules/world-calendars/dist/main.js"(J,V){var p=Vc();function b(){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={}}p(b.prototype,{instance:function(n,r){n=(n||"gregorian").toLowerCase(),r=r||"";var a=this._localCals[n+"-"+r];if(!a&&this.calendars[n]&&(a=new this.calendars[n](r),this._localCals[n+"-"+r]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,n);return a},newDate:function(n,r,a,o,s){return o=(n!=null&&n.year?n.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(n,r,a)},substituteDigits:function(n){return function(r){return(r+"").replace(/[0-9]/g,function(a){return n[a]})}},substituteChineseDigits:function(n,r){return function(a){for(var o="",s=0;a>0;){var c=a%10;o=(c===0?"":n[c]+r[s])+o,s++,a=Math.floor(a/10)}return o.indexOf(n[1]+r[1])===0&&(o=o.substr(1)),o||n[0]}}});function E(n,r,a,o){if(this._calendar=n,this._year=r,this._month=a,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(n,r){return n=""+n,"000000".substring(0,r-n.length)+n}p(E.prototype,{newDate:function(n,r,a){return this._calendar.newDate(n??this,r,a)},year:function(n){return arguments.length===0?this._year:this.set(n,"y")},month:function(n){return arguments.length===0?this._month:this.set(n,"m")},day:function(n){return arguments.length===0?this._day:this.set(n,"d")},date:function(n,r,a){if(!this._calendar.isValid(n,r,a))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=n,this._month=r,this._day=a,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(n,r){return this._calendar.add(this,n,r)},set:function(n,r){return this._calendar.set(this,n,r)},compareTo:function(n){if(this._calendar.name!==n._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,n._calendar.local.name);var r=this._year!==n._year?this._year-n._year:this._month!==n._month?this.monthOfYear()-n.monthOfYear():this._day-n._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(n){return this._calendar.fromJD(n)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(n){return this._calendar.fromJSDate(n)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}p(l.prototype,{_validateLevel:0,newDate:function(n,r,a){return n==null?this.today():(n.year&&(this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=n.day(),r=n.month(),n=n.year()),new E(this,n,r,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(n,r){var a=this._validate(n,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(n,r){var a=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(n)+this.minMonth;return this._validate(n,a,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),a},daysInYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(n,r,a){return this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(n,r,a){return this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(n,this._add(n,r,a),r,a)},_add:function(n,r,a){if(this._validateLevel++,a==="d"||a==="w"){var o=n.toJD()+r*(a==="w"?this.daysInWeek():1),s=n.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=n.year()+(a==="y"?r:0),m=n.monthOfYear()+(a==="m"?r:0),s=n.day(),h=function(i){for(;mw-1+i.minMonth;)c++,m-=w,w=i.monthsInYear(c)};a==="y"?(n.month()!==this.fromMonthOfYear(c,m)&&(m=this.newDate(c,n.month(),this.minDay).monthOfYear()),m=Math.min(m,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m)))):a==="m"&&(h(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m))));var v=[c,this.fromMonthOfYear(c,m),s];return this._validateLevel--,v}catch(g){throw this._validateLevel--,g}},_correctAdd:function(n,r,a,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||n.year()>0!=r[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"]}[o],c=a<0?-1:1;r=this._add(n,a*s[0]+c*s[1],s[2])}return n.date(r[0],r[1],r[2])},set:function(n,r,a){this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=a==="y"?r:n.year(),s=a==="m"?r:n.month(),c=a==="d"?r:n.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),n.date(o,s,c)},isValid:function(n,r,a){this._validateLevel++;var o=this.hasYearZero||n!==0;if(o){var s=this.newDate(n,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),g=s-(v>2.5?4716:4715);return g<=0&&g--,this.newDate(g,v,h)},toJSDate:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.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(n){return this.newDate(n.getFullYear(),n.getMonth()+1,n.getDate())}});var t=V.exports=new b;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),MH=ze({"node_modules/world-calendars/dist/plus.js"(){var J=Vc(),V=th();J(V.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"}),V.local=V.regionalOptions[""],J(V.cdate.prototype,{formatDate:function(p,b){return typeof p!="string"&&(b=p,p=""),this._calendar.formatDate(p||"",this,b)}}),J(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.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(p,b,E){if(typeof p!="string"&&(E=b,b=p,p=""),!b)return"";if(b.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;p=p||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,n=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,a=function(M,C){for(var _=1;S+_1},o=function(M,C,_,T){var f=""+C;if(a(M,T))for(;f.length<_;)f="0"+f;return f},s=function(M,C,_,T){return a(M)?T[C]:_[C]},c=this,m=function(M){return typeof e=="function"?e.call(c,M,a("m")):g(o("m",M.month(),2))},h=function(M,C){return C?typeof n=="function"?n.call(c,M):n[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},v=this.local.digits,g=function(M){return E.localNumbers&&v?v(M):M},i="",w=!1,S=0;S1},w=function(z,I){var O=i(z,I),D=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+D+"}"),F=b.substring(f).match(B);if(!F)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof n=="function"){i("m");var z=n.call(S,b.substring(f));return f+=z.length,z}return w("m")},C=function(z,I,O,D){for(var B=i(z,D)?O:I,F=0;F-1){c=1,m=h;for(var x=this.daysInMonth(s,c);m>x;x=this.daysInMonth(s,c))c++,m-=x}return o>-1?this.fromJD(o):this.newDate(s,c,m)},determineDate:function(p,b,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(n){try{return e.parseDate(k,n,l)}catch{}n=n.toLowerCase();for(var r=(n.match(/^c/)&&E?E.newDate():null)||e.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=a.exec(n);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=a.exec(n);return r};return b=b?b.newDate():null,p=p==null?b:typeof p=="string"?t(p):typeof p=="number"?isNaN(p)||p===1/0||p===-1/0?b:e.today().add(p,"d"):e.newDate(p),p}})}}),SH=ze({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=th(),V=Vc(),p=J.instance();function b(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var m=this._validateYear(o),h=o.month(),v=""+this.toChineseMonth(m,h);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(m,h)&&(v+="i"),v},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),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"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),m;if(isNaN(c))s[0]==="\u95F0"&&(m=!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 h=s[s.length-1];m=h==="i"||h==="I"}var v=this.toMonthIndex(o,c,m);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(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var m=this.intercalaryMonth(o),h=c&&s!==m;if(h||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return m?!c&&s<=m?v=s-1:v=s:v=s-1,v},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),m=c?12:11;if(s<0||s>m)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var m=this._validateYear(o,J.local.invalidyear),h=n[m-n[0]],v=h>>9&4095,g=h>>5&15,i=h&31,w;w=p.newDate(v,g,i),w.add(4-(w.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-w.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],m=c>>13,h=m?12:11;if(s>h)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=c&1<<12-s?30:29;return v},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var m=this._validate(o,v,c,J.local.invalidDate);o=this._validateYear(m.year()),s=m.month(),c=m.day();var h=this.isIntercalaryMonth(o,s),v=this.toChineseMonth(o,s),g=a(o,v,c,h);return p.toJD(g.year,g.month,g.day)},fromJD:function(o){var s=p.fromJD(o),c=r(s.year(),s.month(),s.day()),m=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,m,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),m=+s[2],h=!!s[3],v=this.toMonthIndex(c,m,h),g=+s[4];return this.newDate(c,v,g)},add:function(o,s,c){var m=o.year(),h=o.month(),v=this.isIntercalaryMonth(m,h),g=this.toChineseMonth(m,h),i=Object.getPrototypeOf(b.prototype).add.call(this,o,s,c);if(c==="y"){var w=i.year(),S=i.month(),M=this.isIntercalaryMonth(w,g),C=v&&M?this.toMonthIndex(w,g,!0):this.toMonthIndex(w,g,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=b;var t=[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],n=[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 r(o,s,c,m){var h,v;if(typeof o=="object")h=o,v=s||{};else{var g=typeof o=="number"&&o>=1888&&o<=2111;if(!g)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=31;if(!w)throw new Error("Solar day outside range 1 - 31");h={year:o,month:s,day:c},v=m||{}}var S=n[h.year-n[0]],M=h.year<<9|h.month<<5|h.day;v.year=M>=S?h.year:h.year-1,S=n[v.year-n[0]];var C=S>>9&4095,_=S>>5&15,T=S&31,f,u=new Date(C,_-1,T),A=new Date(h.year,h.month-1,h.day);f=Math.round((A-u)/(24*3600*1e3));var x=t[v.year-t[0]],z;for(z=0;z<13;z++){var I=x&1<<12-z?30:29;if(f>13;return!O||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var w=typeof s=="number"&&s>=1&&s<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof m=="object"?(M=!1,v=m):(M=!!m,v=h||{}),g={year:o,month:s,day:c,isIntercalary:M}}var C;C=g.day-1;var _=t[g.year-t[0]],T=_>>13,f;T&&(g.month>T||g.isIntercalary)?f=g.month:f=g.month-1;for(var u=0;u>9&4095,I=x>>5&15,O=x&31,D=new Date(z,I-1,O+C);return v.year=D.getFullYear(),v.month=1+D.getMonth(),v.day=D.getDate(),v}}}),EH=ze({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=p}}),kH=ze({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:b[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var b={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=p}}),CH=ze({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=p}}),LH=ze({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,b(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&b(this.daysInYear(E),10)===5?30:k===9&&b(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,n=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)n+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function b(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=p}}),PH=ze({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==5},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b=b<=0?b+1:b,k+Math.ceil(29.5*(E-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var E=Math.floor((30*(b-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((b-29-this.toJD(E,1,1))/29.5)+1),l=b-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=p}}),RH=ze({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b<0&&b++,E<=2&&(b--,E+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(b){var E=Math.floor(b+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),n=t-Math.floor(t<14?1:13),r=l-Math.floor(n>2?4716:4715),a=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,n,a)}}),J.calendars.julian=p}}),IH=ze({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=th(),V=Vc();function p(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),n=t.toJD(),r=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=b(k+8+17*20,365);return[Math.floor(l/20)+1,b(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function b(k,l){return k-l*Math.floor(k/l)}function E(k,l){return b(k-1,l)+1}J.calendars.mayan=p}}),DH=ze({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar;var b=J.instance("gregorian");V(p.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return b.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var n=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=p}}),FH=ze({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);if(b=E.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[b][l];return k},daysInMonth:function(b,E){return b.year&&(E=b.month(),b=b.year()),this._validate(b,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[b][E]},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);b=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,n=E,r=b;this._createMissingCalendarData(b);var a=b-(n>9||n===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,n--);n!==9;)n<=0&&(n=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][n],n--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(a))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(a,1,1).add(t,"d").toJD()},fromJD:function(b){var E=J.instance(),k=E.fromJD(b),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var n=9,r=this.NEPALI_CALENDAR_DATA[t][0],a=this.NEPALI_CALENDAR_DATA[t][n]-r+1;e>a;)n++,n>12&&(n=1,t++),a+=this.NEPALI_CALENDAR_DATA[t][n];var o=this.NEPALI_CALENDAR_DATA[t][n]-(a-e);return this.newDate(t,n,o)},_createMissingCalendarData:function(b){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=b-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],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]}}),J.calendars.nepali=p}}),zH=ze({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function b(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),n=e-Math.floor(e),r=t-Math.floor(t);return n>r}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return b(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var n=1;n0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,b(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),n=E-this.toJD(l,t,1)+1;return this.newDate(l,t,n)}}),J.calendars.persian=p,J.calendars.jalali=p}}),BH=ze({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=b}}),OH=ze({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=b}}),NH=ze({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,n=0;ne)return b[t]-b[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,n=e.day()+b[t-1]-1;return n+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,n=Math.floor((t-1)/12),r=n+1,a=t-12*n,o=k-b[l-1]+1;return this.newDate(r,a,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=p;var b=[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]}}),jH=ze({"src/components/calendars/calendars.js"(J,V){"use strict";V.exports=th(),MH(),SH(),EH(),kH(),CH(),LH(),PH(),RH(),IH(),DH(),FH(),zH(),BH(),OH(),NH()}}),UH=ze({"src/components/calendars/index.js"(J,V){"use strict";var p=jH(),b=Nr(),E=No(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:b.sortObjectKeys(p.calendars),editType:"calc",dflt:"gregorian"},t=function(_,T,f,u){var A={};return A[f]=e,b.coerce(_,T,A,f,u)},n=function(_,T,f,u){for(var A=0;A0){if(++ye>=n$)return arguments[0]}else ye=0;return oe.apply(void 0,arguments)}}var qy=s$;var l$=qy(Fy),Vy=l$;var u$=/\{\n\/\* \[wrapped with (.+)\] \*/,c$=/,? & /;function f$(oe){var ye=oe.match(u$);return ye?ye[1].split(c$):[]}var zE=f$;var h$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function d$(oe,ye){var Fe=ye.length;if(!Fe)return oe;var dt=Fe-1;return ye[dt]=(Fe>1?"& ":"")+ye[dt],ye=ye.join(Fe>2?", ":" "),oe.replace(h$,`{ /* [wrapped with `+ye+`] */ -`)}var BE=d$;function p$(oe){return function(){return oe}}var G0=p$;var v$=function(){try{var oe=Fh(Object,"defineProperty");return oe({},"",{}),oe}catch{}}(),H0=v$;var m$=H0?function(oe,ye){return H0(oe,"toString",{configurable:!0,enumerable:!1,value:G0(ye),writable:!0})}:wl,OE=m$;var g$=qy(OE),W0=g$;function y$(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++Fe-1}var Rp=T$;var A$=1,M$=2,S$=8,E$=16,k$=32,C$=64,L$=128,P$=256,R$=512,I$=[["ary",L$],["bind",A$],["bindKey",M$],["curry",S$],["curryRight",E$],["flip",R$],["partial",k$],["partialRight",C$],["rearg",P$]];function D$(oe,ye){return af(I$,function(Fe){var dt="_."+Fe[0];ye&Fe[1]&&!Rp(oe,dt)&&oe.push(dt)}),oe.sort()}var jE=D$;function F$(oe,ye,Fe){var dt=ye+"";return W0(oe,BE(dt,jE(zE(dt),Fe)))}var Hy=F$;var z$=1,B$=2,O$=4,N$=8,UE=32,qE=64;function j$(oe,ye,Fe,dt,Zt,yr,Xr,ga,ya,Cn){var xn=ye&N$,On=xn?Xr:void 0,Fi=xn?void 0:Xr,ho=xn?yr:void 0,Li=xn?void 0:yr;ye|=xn?UE:qE,ye&=~(xn?qE:UE),ye&O$||(ye&=~(z$|B$));var lo=[oe,ye,Zt,ho,On,Li,Fi,ga,ya,Cn],Lo=Fe.apply(void 0,lo);return Ng(oe)&&Vy(Lo,lo),Lo.placeholder=dt,Hy(Lo,oe,ye)}var Wy=j$;function U$(oe){var ye=oe;return ye.placeholder}var Xh=U$;var q$=9007199254740991,V$=/^(?:0|[1-9]\d*)$/;function G$(oe,ye){var Fe=typeof oe;return ye=ye??q$,!!ye&&(Fe=="number"||Fe!="symbol"&&V$.test(oe))&&oe>-1&&oe%1==0&&oe1&&ze.reverse(),xn&&ya-1&&oe%1==0&&oe<=xK}var Ip=bK;function wK(oe){return oe!=null&&Ip(oe.length)&&!Ef(oe)}var Pl=wK;function TK(oe,ye,Fe){if(!as(Fe))return!1;var dt=typeof ye;return(dt=="number"?Pl(Fe)&&kf(ye,Fe.length):dt=="string"&&ye in Fe)?cc(Fe[ye],oe):!1}var Tl=TK;function AK(oe){return Ui(function(ye,Fe){var dt=-1,Zt=Fe.length,yr=Zt>1?Fe[Zt-1]:void 0,Xr=Zt>2?Fe[2]:void 0;for(yr=oe.length>3&&typeof yr=="function"?(Zt--,yr):void 0,Xr&&Tl(Fe[0],Fe[1],Xr)&&(yr=Zt<3?void 0:yr,Zt=1),ye=Object(ye);++dt-1}var w8=QJ;function eQ(oe,ye){var Fe=this.__data__,dt=Fp(Fe,oe);return dt<0?(++this.size,Fe.push([oe,ye])):Fe[dt][1]=ye,this}var T8=eQ;function Q0(oe){var ye=-1,Fe=oe==null?0:oe.length;for(this.clear();++ye0&&Fe(ga)?ye>1?I8(ga,ye-1,Fe,dt,Zt):vh(Zt,ga):dt||(Zt[Zt.length]=ga)}return Zt}var Zs=I8;function AQ(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,1):[]}var Qy=AQ;function MQ(oe){return W0(Xy(oe,void 0,Qy),oe+"")}var Rf=MQ;var SQ=Rf(rm),D8=SQ;var EQ=$y(Object.getPrototypeOf,Object),Np=EQ;var kQ="[object Object]",CQ=Function.prototype,LQ=Object.prototype,F8=CQ.toString,PQ=LQ.hasOwnProperty,RQ=F8.call(Object);function IQ(oe){if(!is(oe)||bl(oe)!=kQ)return!1;var ye=Np(oe);if(ye===null)return!0;var Fe=PQ.call(ye,"constructor")&&ye.constructor;return typeof Fe=="function"&&Fe instanceof Fe&&F8.call(Fe)==RQ}var Cd=IQ;var DQ="[object DOMException]",FQ="[object Error]";function zQ(oe){if(!is(oe))return!1;var ye=bl(oe);return ye==FQ||ye==DQ||typeof oe.message=="string"&&typeof oe.name=="string"&&!Cd(oe)}var am=zQ;var BQ=Ui(function(oe,ye){try{return gu(oe,void 0,ye)}catch(Fe){return am(Fe)?Fe:new Error(Fe)}}),e_=BQ;var OQ="Expected a function";function NQ(oe,ye){var Fe;if(typeof ye!="function")throw new TypeError(OQ);return oe=ji(oe),function(){return--oe>0&&(Fe=ye.apply(this,arguments)),oe<=1&&(ye=void 0),Fe}}var t_=NQ;var jQ=1,UQ=32,cw=Ui(function(oe,ye,Fe){var dt=jQ;if(Fe.length){var Zt=Mh(Fe,Xh(cw));dt|=UQ}return Cf(oe,dt,ye,Fe,Zt)});cw.placeholder={};var r_=cw;var qQ=Rf(function(oe,ye){return af(ye,function(Fe){Fe=Nc(Fe),Lf(oe,Fe,r_(oe[Fe],oe))}),oe}),z8=qQ;var VQ=1,GQ=2,HQ=32,fw=Ui(function(oe,ye,Fe){var dt=VQ|GQ;if(Fe.length){var Zt=Mh(Fe,Xh(fw));dt|=HQ}return Cf(ye,dt,oe,Fe,Zt)});fw.placeholder={};var B8=fw;function WQ(oe,ye,Fe){var dt=-1,Zt=oe.length;ye<0&&(ye=-ye>Zt?0:Zt+ye),Fe=Fe>Zt?Zt:Fe,Fe<0&&(Fe+=Zt),Zt=ye>Fe?0:Fe-ye>>>0,ye>>>=0;for(var yr=Array(Zt);++dt=dt?oe:Zu(oe,ye,Fe)}var mh=YQ;var XQ="\\ud800-\\udfff",ZQ="\\u0300-\\u036f",$Q="\\ufe20-\\ufe2f",KQ="\\u20d0-\\u20ff",JQ=ZQ+$Q+KQ,QQ="\\ufe0e\\ufe0f",eee="\\u200d",tee=RegExp("["+eee+XQ+JQ+QQ+"]");function ree(oe){return tee.test(oe)}var Kh=ree;function aee(oe){return oe.split("")}var O8=aee;var N8="\\ud800-\\udfff",nee="\\u0300-\\u036f",iee="\\ufe20-\\ufe2f",oee="\\u20d0-\\u20ff",see=nee+iee+oee,lee="\\ufe0e\\ufe0f",uee="["+N8+"]",hw="["+see+"]",dw="\\ud83c[\\udffb-\\udfff]",cee="(?:"+hw+"|"+dw+")",j8="[^"+N8+"]",U8="(?:\\ud83c[\\udde6-\\uddff]){2}",q8="[\\ud800-\\udbff][\\udc00-\\udfff]",fee="\\u200d",V8=cee+"?",G8="["+lee+"]?",hee="(?:"+fee+"(?:"+[j8,U8,q8].join("|")+")"+G8+V8+")*",dee=G8+V8+hee,pee="(?:"+[j8+hw+"?",hw,U8,q8,uee].join("|")+")",vee=RegExp(dw+"(?="+dw+")|"+pee+dee,"g");function mee(oe){return oe.match(vee)||[]}var H8=mee;function gee(oe){return Kh(oe)?H8(oe):O8(oe)}var nf=gee;function yee(oe){return function(ye){ye=To(ye);var Fe=Kh(ye)?nf(ye):void 0,dt=Fe?Fe[0]:ye.charAt(0),Zt=Fe?mh(Fe,1).join(""):ye.slice(1);return dt[oe]()+Zt}}var a_=yee;var _ee=a_("toUpperCase"),nm=_ee;function xee(oe){return nm(To(oe).toLowerCase())}var n_=xee;function bee(oe,ye,Fe,dt){var Zt=-1,yr=oe==null?0:oe.length;for(dt&&yr&&(Fe=oe[++Zt]);++Zt=ye?oe:ye)),oe}var Bh=xte;function bte(oe,ye,Fe){return Fe===void 0&&(Fe=ye,ye=void 0),Fe!==void 0&&(Fe=Bc(Fe),Fe=Fe===Fe?Fe:0),ye!==void 0&&(ye=Bc(ye),ye=ye===ye?ye:0),Bh(Bc(oe),ye,Fe)}var gk=bte;function wte(){this.__data__=new zp,this.size=0}var yk=wte;function Tte(oe){var ye=this.__data__,Fe=ye.delete(oe);return this.size=ye.size,Fe}var _k=Tte;function Ate(oe){return this.__data__.get(oe)}var xk=Ate;function Mte(oe){return this.__data__.has(oe)}var bk=Mte;var Ste=200;function Ete(oe,ye){var Fe=this.__data__;if(Fe instanceof zp){var dt=Fe.__data__;if(!Bp||dt.lengthga))return!1;var Cn=yr.get(oe),xn=yr.get(ye);if(Cn&&xn)return Cn==ye&&xn==oe;var On=-1,Fi=!0,ho=Fe&Eae?new Up:void 0;for(yr.set(oe,ye),yr.set(ye,oe);++On=ye||Oh<0||On&&ad>=yr}function zi(){var Po=wm();if(Lo(Po))return ze(Po);ga=setTimeout(zi,lo(Po))}function ze(Po){return ga=void 0,Fi&&dt?ho(Po):(dt=Zt=void 0,Xr)}function bu(){ga!==void 0&&clearTimeout(ga),Cn=0,dt=ya=Zt=ga=void 0}function uf(){return ga===void 0?Xr:ze(wm())}function Yl(){var Po=wm(),Oh=Lo(Po);if(dt=arguments,Zt=this,ya=Po,Oh){if(ga===void 0)return Li(ya);if(On)return clearTimeout(ga),ga=setTimeout(zi,ye),ho(ya)}return ga===void 0&&(ga=setTimeout(zi,ye)),Xr}return Yl.cancel=bu,Yl.flush=uf,Yl}var P_=jne;function Une(oe,ye){return oe==null||oe!==oe?ye:oe}var MC=Une;var SC=Object.prototype,qne=SC.hasOwnProperty,Vne=Ui(function(oe,ye){oe=Object(oe);var Fe=-1,dt=ye.length,Zt=dt>2?ye[2]:void 0;for(Zt&&Tl(ye[0],ye[1],Zt)&&(dt=1);++Fe=rie&&(yr=ep,Xr=!1,ye=new Up(ye));e:for(;++Zt=0&&oe.slice(Fe,Zt)==ye}var GC=bie;function wie(oe,ye){return ts(ye,function(Fe){return[Fe,oe[Fe]]})}var HC=wie;function Tie(oe){var ye=-1,Fe=Array(oe.size);return oe.forEach(function(dt){Fe[++ye]=[dt,dt]}),Fe}var WC=Tie;var Aie="[object Map]",Mie="[object Set]";function Sie(oe){return function(ye){var Fe=of(ye);return Fe==Aie?mm(ye):Fe==Mie?WC(ye):HC(ye,oe(ye))}}var B_=Sie;var Eie=B_(Ms),Xg=Eie;var kie=B_(Rl),Zg=kie;var Cie={"&":"&","<":"<",">":">",'"':""","'":"'"},Lie=om(Cie),YC=Lie;var XC=/[&<>"']/g,Pie=RegExp(XC.source);function Rie(oe){return oe=To(oe),oe&&Pie.test(oe)?oe.replace(XC,YC):oe}var O_=Rie;var ZC=/[\\^$.*+?()[\]{}|]/g,Iie=RegExp(ZC.source);function Die(oe){return oe=To(oe),oe&&Iie.test(oe)?oe.replace(ZC,"\\$&"):oe}var $C=Die;function Fie(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++FeZt?0:Zt+Fe),dt=dt===void 0||dt>Zt?Zt:ji(dt),dt<0&&(dt+=Zt),dt=Fe>dt?0:j_(dt);Fe-1?Zt[yr?ye[Xr]:Xr]:void 0}}var q_=Gie;var Hie=Math.max;function Wie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Hie(dt+Zt,0)),Pp(oe,Ti(ye,3),Zt)}var V_=Wie;var Yie=q_(V_),r7=Yie;function Xie(oe,ye,Fe){var dt;return Fe(oe,function(Zt,yr,Xr){if(ye(Zt,yr,Xr))return dt=yr,!1}),dt}var G_=Xie;function Zie(oe,ye){return G_(oe,Ti(ye,3),Df)}var a7=Zie;var $ie=Math.max,Kie=Math.min;function Jie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt-1;return Fe!==void 0&&(Zt=ji(Fe),Zt=Fe<0?$ie(dt+Zt,0):Kie(Zt,dt-1)),Pp(oe,Ti(ye,3),Zt,!0)}var H_=Jie;var Qie=q_(H_),n7=Qie;function eoe(oe,ye){return G_(oe,Ti(ye,3),Mm)}var i7=eoe;function toe(oe){return oe&&oe.length?oe[0]:void 0}var $g=toe;function roe(oe,ye){var Fe=-1,dt=Pl(oe)?Array(oe.length):[];return yh(oe,function(Zt,yr,Xr){dt[++Fe]=ye(Zt,yr,Xr)}),dt}var W_=roe;function aoe(oe,ye){var Fe=Ii(oe)?ts:W_;return Fe(oe,Ti(ye,3))}var Wp=aoe;function noe(oe,ye){return Zs(Wp(oe,ye),1)}var o7=noe;var ioe=1/0;function ooe(oe,ye){return Zs(Wp(oe,ye),ioe)}var s7=ooe;function soe(oe,ye,Fe){return Fe=Fe===void 0?1:ji(Fe),Zs(Wp(oe,ye),Fe)}var l7=soe;var loe=1/0;function uoe(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,loe):[]}var u7=uoe;function coe(oe,ye){var Fe=oe==null?0:oe.length;return Fe?(ye=ye===void 0?1:ji(ye),Zs(oe,ye)):[]}var c7=coe;var foe=512;function hoe(oe){return Cf(oe,foe)}var f7=hoe;var doe=lm("floor"),h7=doe;var poe="Expected a function",voe=8,moe=32,goe=128,yoe=256;function _oe(oe){return Rf(function(ye){var Fe=ye.length,dt=Fe,Zt=dh.prototype.thru;for(oe&&ye.reverse();dt--;){var yr=ye[dt];if(typeof yr!="function")throw new TypeError(poe);if(Zt&&!Xr&&V0(yr)=="wrapper")var Xr=new dh([],!0)}for(dt=Xr?dt:Fe;++dtye}var Sm=Ioe;function Doe(oe){return function(ye,Fe){return typeof ye=="string"&&typeof Fe=="string"||(ye=Bc(ye),Fe=Bc(Fe)),oe(ye,Fe)}}var Xp=Doe;var Foe=Xp(Sm),T7=Foe;var zoe=Xp(function(oe,ye){return oe>=ye}),A7=zoe;var Boe=Object.prototype,Ooe=Boe.hasOwnProperty;function Noe(oe,ye){return oe!=null&&Ooe.call(oe,ye)}var M7=Noe;function joe(oe,ye){return oe!=null&&M_(oe,ye,M7)}var S7=joe;var Uoe=Math.max,qoe=Math.min;function Voe(oe,ye,Fe){return oe>=qoe(ye,Fe)&&oe-1:!!Zt&&Yh(oe,ye,Fe)>-1}var C7=$oe;var Koe=Math.max;function Joe(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Koe(dt+Zt,0)),Yh(oe,ye,Zt)}var L7=Joe;function Qoe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,0,-1):[]}var P7=Qoe;var ese=Math.min;function tse(oe,ye,Fe){for(var dt=Fe?Am:Rp,Zt=oe[0].length,yr=oe.length,Xr=yr,ga=Array(yr),ya=1/0,Cn=[];Xr--;){var xn=oe[Xr];Xr&&ye&&(xn=ts(xn,_u(ye))),ya=ese(xn.length,ya),ga[Xr]=!Fe&&(ye||Zt>=120&&xn.length>=120)?new Up(Xr&&xn):void 0}xn=oe[0];var On=-1,Fi=ga[0];e:for(;++On=-l9&&oe<=l9}var u9=$se;function Kse(oe){return oe===void 0}var c9=Kse;var Jse="[object WeakMap]";function Qse(oe){return is(oe)&&of(oe)==Jse}var f9=Qse;var ele="[object WeakSet]";function tle(oe){return is(oe)&&bl(oe)==ele}var h9=tle;var rle=1;function ale(oe){return Ti(typeof oe=="function"?oe:If(oe,rle))}var d9=ale;var nle=Array.prototype,ile=nle.join;function ole(oe,ye){return oe==null?"":ile.call(oe,ye)}var p9=ole;var sle=Jh(function(oe,ye,Fe){return oe+(Fe?"-":"")+ye.toLowerCase()}),v9=sle;var lle=Gp(function(oe,ye,Fe){Lf(oe,Fe,ye)}),m9=lle;function ule(oe,ye,Fe){for(var dt=Fe+1;dt--;)if(oe[dt]===ye)return dt;return dt}var g9=ule;var cle=Math.max,fle=Math.min;function hle(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt;return Fe!==void 0&&(Zt=ji(Fe),Zt=Zt<0?cle(dt+Zt,0):fle(Zt,dt-1)),ye===ye?g9(oe,ye,Zt):Pp(oe,Gy,Zt,!0)}var y9=hle;var dle=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+ye.toLowerCase()}),_9=dle;var ple=a_("toLowerCase"),x9=ple;function vle(oe,ye){return oe=this.__values__.length,ye=oe?void 0:this.__values__[this.__index__++];return{done:oe,value:ye}}var O9=Hle;function Wle(oe,ye){var Fe=oe.length;if(Fe)return ye+=ye<0?Fe:0,kf(ye,Fe)?oe[ye]:void 0}var tx=Wle;function Yle(oe,ye){return oe&&oe.length?tx(oe,ji(ye)):void 0}var N9=Yle;function Xle(oe){return oe=ji(oe),Ui(function(ye){return tx(ye,oe)})}var j9=Xle;function Zle(oe,ye){return ye=ph(ye,oe),oe=Z_(oe,ye),oe==null||delete oe[Nc(xu(ye))]}var Im=Zle;function $le(oe){return Cd(oe)?void 0:oe}var U9=$le;var Kle=1,Jle=2,Qle=4,eue=Rf(function(oe,ye){var Fe={};if(oe==null)return Fe;var dt=!1;ye=ts(ye,function(yr){return yr=ph(yr,oe),dt||(dt=yr.length>1),yr}),Oc(oe,hm(oe),Fe),dt&&(Fe=If(Fe,Kle|Jle|Qle,U9));for(var Zt=ye.length;Zt--;)Im(Fe,ye[Zt]);return Fe}),q9=eue;function tue(oe,ye,Fe,dt){if(!as(oe))return oe;ye=ph(ye,oe);for(var Zt=-1,yr=ye.length,Xr=yr-1,ga=oe;ga!=null&&++Ztye||yr&&Xr&&ya&&!ga&&!Cn||dt&&Xr&&ya||!Fe&&ya||!Zt)return 1;if(!dt&&!yr&&!Cn&&oe=ga)return ya;var Cn=Fe[dt];return ya*(Cn=="desc"?-1:1)}}return oe.index-ye.index}var W9=lue;function uue(oe,ye,Fe){ye.length?ye=ts(ye,function(yr){return Ii(yr)?function(Xr){return zh(Xr,yr.length===1?yr[0]:yr)}:yr}):ye=[wl];var dt=-1;ye=ts(ye,_u(Ti));var Zt=W_(oe,function(yr,Xr,ga){var ya=ts(ye,function(Cn){return Cn(yr)});return{criteria:ya,index:++dt,value:yr}});return H9(Zt,function(yr,Xr){return W9(yr,Xr,Fe)})}var ix=uue;function cue(oe,ye,Fe,dt){return oe==null?[]:(Ii(ye)||(ye=ye==null?[]:[ye]),Fe=dt?void 0:Fe,Ii(Fe)||(Fe=Fe==null?[]:[Fe]),ix(oe,ye,Fe))}var Y9=cue;function fue(oe){return Rf(function(ye){return ye=ts(ye,_u(Ti)),Ui(function(Fe){var dt=this;return oe(ye,function(Zt){return gu(Zt,dt,Fe)})})})}var Dm=fue;var hue=Dm(ts),X9=hue;var due=Ui,Z9=due;var pue=Math.min,vue=Z9(function(oe,ye){ye=ye.length==1&&Ii(ye[0])?ts(ye[0],_u(Ti)):ts(Zs(ye,1),_u(Ti));var Fe=ye.length;return Ui(function(dt){for(var Zt=-1,yr=pue(dt.length,Fe);++Ztyue)return Fe;do ye%2&&(Fe+=oe),ye=_ue(ye/2),ye&&(oe+=oe);while(ye);return Fe}var Kg=xue;var bue=xm("length"),Q9=bue;var tL="\\ud800-\\udfff",wue="\\u0300-\\u036f",Tue="\\ufe20-\\ufe2f",Aue="\\u20d0-\\u20ff",Mue=wue+Tue+Aue,Sue="\\ufe0e\\ufe0f",Eue="["+tL+"]",yw="["+Mue+"]",_w="\\ud83c[\\udffb-\\udfff]",kue="(?:"+yw+"|"+_w+")",rL="[^"+tL+"]",aL="(?:\\ud83c[\\udde6-\\uddff]){2}",nL="[\\ud800-\\udbff][\\udc00-\\udfff]",Cue="\\u200d",iL=kue+"?",oL="["+Sue+"]?",Lue="(?:"+Cue+"(?:"+[rL,aL,nL].join("|")+")"+oL+iL+")*",Pue=oL+iL+Lue,Rue="(?:"+[rL+yw+"?",yw,aL,nL,Eue].join("|")+")",eL=RegExp(_w+"(?="+_w+")|"+Rue+Pue,"g");function Iue(oe){for(var ye=eL.lastIndex=0;eL.test(oe);)++ye;return ye}var sL=Iue;function Due(oe){return Kh(oe)?sL(oe):Q9(oe)}var ed=Due;var Fue=Math.ceil;function zue(oe,ye){ye=ye===void 0?" ":uc(ye);var Fe=ye.length;if(Fe<2)return Fe?Kg(ye,oe):ye;var dt=Kg(ye,Fue(oe/ed(ye)));return Kh(ye)?mh(nf(dt),0,oe).join(""):dt.slice(0,oe)}var Fv=zue;var Bue=Math.ceil,Oue=Math.floor;function Nue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;if(!ye||dt>=ye)return oe;var Zt=(ye-dt)/2;return Fv(Oue(Zt),Fe)+oe+Fv(Bue(Zt),Fe)}var lL=Nue;function jue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;return ye&&dt-1;)ga!==oe&&_L.call(ga,ya,1),_L.call(oe,ya,1);return oe}var Fm=ece;function tce(oe,ye){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye):oe}var sx=tce;var rce=Ui(sx),xL=rce;function ace(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,Ti(Fe,2)):oe}var bL=ace;function nce(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,void 0,Fe):oe}var wL=nce;var ice=Array.prototype,oce=ice.splice;function sce(oe,ye){for(var Fe=oe?ye.length:0,dt=Fe-1;Fe--;){var Zt=ye[Fe];if(Fe==dt||Zt!==yr){var yr=Zt;kf(Zt)?oce.call(oe,Zt,1):Im(oe,Zt)}}return oe}var lx=sce;var lce=Rf(function(oe,ye){var Fe=oe==null?0:oe.length,dt=rm(oe,ye);return lx(oe,ts(ye,function(Zt){return kf(Zt,Fe)?+Zt:Zt}).sort(nx)),dt}),TL=lce;var uce=Math.floor,cce=Math.random;function fce(oe,ye){return oe+uce(cce()*(ye-oe+1))}var zm=fce;var hce=parseFloat,dce=Math.min,pce=Math.random;function vce(oe,ye,Fe){if(Fe&&typeof Fe!="boolean"&&Tl(oe,ye,Fe)&&(ye=Fe=void 0),Fe===void 0&&(typeof ye=="boolean"?(Fe=ye,ye=void 0):typeof oe=="boolean"&&(Fe=oe,oe=void 0)),oe===void 0&&ye===void 0?(oe=0,ye=1):(oe=Dh(oe),ye===void 0?(ye=oe,oe=0):ye=Dh(ye)),oe>ye){var dt=oe;oe=ye,ye=dt}if(Fe||oe%1||ye%1){var Zt=pce();return dce(oe+Zt*(ye-oe+hce("1e-"+((Zt+"").length-1))),ye)}return zm(oe,ye)}var AL=vce;var mce=Math.ceil,gce=Math.max;function yce(oe,ye,Fe,dt){for(var Zt=-1,yr=gce(mce((ye-oe)/(Fe||1)),0),Xr=Array(yr);yr--;)Xr[dt?yr:++Zt]=oe,oe+=Fe;return Xr}var ML=yce;function _ce(oe){return function(ye,Fe,dt){return dt&&typeof dt!="number"&&Tl(ye,Fe,dt)&&(Fe=dt=void 0),ye=Dh(ye),Fe===void 0?(Fe=ye,ye=0):Fe=Dh(Fe),dt=dt===void 0?ye1&&Tl(oe,ye[0],ye[1])?ye=[]:Fe>2&&Tl(ye[0],ye[1],ye[2])&&(ye=[ye[0]]),ix(oe,Zs(ye,1),[])}),eP=nfe;var ife=4294967295,ofe=ife-1,sfe=Math.floor,lfe=Math.min;function ufe(oe,ye,Fe,dt){var Zt=0,yr=oe==null?0:oe.length;if(yr===0)return 0;ye=Fe(ye);for(var Xr=ye!==ye,ga=ye===null,ya=Ru(ye),Cn=ye===void 0;Zt>>1;function hfe(oe,ye,Fe){var dt=0,Zt=oe==null?dt:oe.length;if(typeof ye=="number"&&ye===ye&&Zt<=ffe){for(;dt>>1,Xr=oe[yr];Xr!==null&&!Ru(Xr)&&(Fe?Xr<=ye:Xr>>0,Fe?(oe=To(oe),oe&&(typeof ye=="string"||ye!=null&&!Lm(ye))&&(ye=uc(ye),!ye&&Kh(oe))?mh(nf(oe),0,Fe):oe.split(ye,Fe)):[]}var uP=Tfe;var Afe="Expected a function",Mfe=Math.max;function Sfe(oe,ye){if(typeof oe!="function")throw new TypeError(Afe);return ye=ye==null?0:Mfe(ji(ye),0),Ui(function(Fe){var dt=Fe[ye],Zt=mh(Fe,0,ye);return dt&&vh(Zt,dt),gu(oe,this,Zt)})}var cP=Sfe;var Efe=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+nm(ye)}),fP=Efe;function kfe(oe,ye,Fe){return oe=To(oe),Fe=Fe==null?0:Bh(ji(Fe),0,oe.length),ye=uc(ye),oe.slice(Fe,Fe+ye.length)==ye}var hP=kfe;function Cfe(){return{}}var dP=Cfe;function Lfe(){return""}var pP=Lfe;function Pfe(){return!0}var vP=Pfe;var Rfe=kp(function(oe,ye){return oe-ye},0),mP=Rfe;function Ife(oe){return oe&&oe.length?Rm(oe,wl):0}var gP=Ife;function Dfe(oe,ye){return oe&&oe.length?Rm(oe,Ti(ye,2)):0}var yP=Dfe;function Ffe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,1,ye):[]}var _P=Ffe;function zfe(oe,ye,Fe){return oe&&oe.length?(ye=Fe||ye===void 0?1:ji(ye),Zu(oe,0,ye<0?0:ye)):[]}var xP=zfe;function Bfe(oe,ye,Fe){var dt=oe==null?0:oe.length;return dt?(ye=Fe||ye===void 0?1:ji(ye),ye=dt-ye,Zu(oe,ye<0?0:ye,dt)):[]}var bP=Bfe;function Ofe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3),!1,!0):[]}var wP=Ofe;function Nfe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3)):[]}var TP=Nfe;function jfe(oe,ye){return ye(oe),oe}var AP=jfe;var MP=Object.prototype,Ufe=MP.hasOwnProperty;function qfe(oe,ye,Fe,dt){return oe===void 0||cc(oe,MP[Fe])&&!Ufe.call(dt,Fe)?ye:oe}var ww=qfe;var Vfe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Gfe(oe){return"\\"+Vfe[oe]}var SP=Gfe;var Hfe=/<%=([\s\S]+?)%>/g,dx=Hfe;var Wfe=/<%-([\s\S]+?)%>/g,EP=Wfe;var Yfe=/<%([\s\S]+?)%>/g,kP=Yfe;var Xfe={escape:EP,evaluate:kP,interpolate:dx,variable:"",imports:{_:{escape:O_}}},Qg=Xfe;var Zfe="Invalid `variable` option passed into `_.template`",$fe=/\b__p \+= '';/g,Kfe=/\b(__p \+=) '' \+/g,Jfe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qfe=/[()=,{}\[\]\/\s]/,ehe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,px=/($^)/,the=/['\n\r\u2028\u2029\\]/g,rhe=Object.prototype,CP=rhe.hasOwnProperty;function ahe(oe,ye,Fe){var dt=Qg.imports._.templateSettings||Qg;Fe&&Tl(oe,ye,Fe)&&(ye=void 0),oe=To(oe),ye=Dp({},ye,dt,ww);var Zt=Dp({},ye.imports,dt.imports,ww),yr=Ms(Zt),Xr=Em(Zt,yr),ga,ya,Cn=0,xn=ye.interpolate||px,On="__p += '",Fi=RegExp((ye.escape||px).source+"|"+xn.source+"|"+(xn===dx?ehe:px).source+"|"+(ye.evaluate||px).source+"|$","g"),ho=CP.call(ye,"sourceURL")?"//# sourceURL="+(ye.sourceURL+"").replace(/\s/g," ")+` -`:"";oe.replace(Fi,function(Lo,zi,ze,bu,uf,Yl){return ze||(ze=bu),On+=oe.slice(Cn,Yl).replace(the,SP),zi&&(ga=!0,On+=`' + +`)}var BE=d$;function p$(oe){return function(){return oe}}var G0=p$;var v$=function(){try{var oe=Fh(Object,"defineProperty");return oe({},"",{}),oe}catch{}}(),H0=v$;var m$=H0?function(oe,ye){return H0(oe,"toString",{configurable:!0,enumerable:!1,value:G0(ye),writable:!0})}:wl,OE=m$;var g$=qy(OE),W0=g$;function y$(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++Fe-1}var Rp=T$;var A$=1,M$=2,S$=8,E$=16,k$=32,C$=64,L$=128,P$=256,R$=512,I$=[["ary",L$],["bind",A$],["bindKey",M$],["curry",S$],["curryRight",E$],["flip",R$],["partial",k$],["partialRight",C$],["rearg",P$]];function D$(oe,ye){return af(I$,function(Fe){var dt="_."+Fe[0];ye&Fe[1]&&!Rp(oe,dt)&&oe.push(dt)}),oe.sort()}var jE=D$;function F$(oe,ye,Fe){var dt=ye+"";return W0(oe,BE(dt,jE(zE(dt),Fe)))}var Hy=F$;var z$=1,B$=2,O$=4,N$=8,UE=32,qE=64;function j$(oe,ye,Fe,dt,Zt,yr,Yr,ma,ya,wn){var xn=ye&N$,On=xn?Yr:void 0,Fi=xn?void 0:Yr,ho=xn?yr:void 0,Li=xn?void 0:yr;ye|=xn?UE:qE,ye&=~(xn?qE:UE),ye&O$||(ye&=~(z$|B$));var lo=[oe,ye,Zt,ho,On,Li,Fi,ma,ya,wn],Lo=Fe.apply(void 0,lo);return Ng(oe)&&Vy(Lo,lo),Lo.placeholder=dt,Hy(Lo,oe,ye)}var Wy=j$;function U$(oe){var ye=oe;return ye.placeholder}var Xh=U$;var q$=9007199254740991,V$=/^(?:0|[1-9]\d*)$/;function G$(oe,ye){var Fe=typeof oe;return ye=ye??q$,!!ye&&(Fe=="number"||Fe!="symbol"&&V$.test(oe))&&oe>-1&&oe%1==0&&oe1&&ze.reverse(),xn&&ya-1&&oe%1==0&&oe<=xK}var Ip=bK;function wK(oe){return oe!=null&&Ip(oe.length)&&!Ef(oe)}var Pl=wK;function TK(oe,ye,Fe){if(!as(Fe))return!1;var dt=typeof ye;return(dt=="number"?Pl(Fe)&&kf(ye,Fe.length):dt=="string"&&ye in Fe)?cc(Fe[ye],oe):!1}var Tl=TK;function AK(oe){return Ui(function(ye,Fe){var dt=-1,Zt=Fe.length,yr=Zt>1?Fe[Zt-1]:void 0,Yr=Zt>2?Fe[2]:void 0;for(yr=oe.length>3&&typeof yr=="function"?(Zt--,yr):void 0,Yr&&Tl(Fe[0],Fe[1],Yr)&&(yr=Zt<3?void 0:yr,Zt=1),ye=Object(ye);++dt-1}var w8=QJ;function eQ(oe,ye){var Fe=this.__data__,dt=Fp(Fe,oe);return dt<0?(++this.size,Fe.push([oe,ye])):Fe[dt][1]=ye,this}var T8=eQ;function Q0(oe){var ye=-1,Fe=oe==null?0:oe.length;for(this.clear();++ye0&&Fe(ma)?ye>1?I8(ma,ye-1,Fe,dt,Zt):vh(Zt,ma):dt||(Zt[Zt.length]=ma)}return Zt}var Zs=I8;function AQ(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,1):[]}var Qy=AQ;function MQ(oe){return W0(Xy(oe,void 0,Qy),oe+"")}var Rf=MQ;var SQ=Rf(rm),D8=SQ;var EQ=$y(Object.getPrototypeOf,Object),Np=EQ;var kQ="[object Object]",CQ=Function.prototype,LQ=Object.prototype,F8=CQ.toString,PQ=LQ.hasOwnProperty,RQ=F8.call(Object);function IQ(oe){if(!is(oe)||bl(oe)!=kQ)return!1;var ye=Np(oe);if(ye===null)return!0;var Fe=PQ.call(ye,"constructor")&&ye.constructor;return typeof Fe=="function"&&Fe instanceof Fe&&F8.call(Fe)==RQ}var Cd=IQ;var DQ="[object DOMException]",FQ="[object Error]";function zQ(oe){if(!is(oe))return!1;var ye=bl(oe);return ye==FQ||ye==DQ||typeof oe.message=="string"&&typeof oe.name=="string"&&!Cd(oe)}var am=zQ;var BQ=Ui(function(oe,ye){try{return gu(oe,void 0,ye)}catch(Fe){return am(Fe)?Fe:new Error(Fe)}}),e_=BQ;var OQ="Expected a function";function NQ(oe,ye){var Fe;if(typeof ye!="function")throw new TypeError(OQ);return oe=ji(oe),function(){return--oe>0&&(Fe=ye.apply(this,arguments)),oe<=1&&(ye=void 0),Fe}}var t_=NQ;var jQ=1,UQ=32,cw=Ui(function(oe,ye,Fe){var dt=jQ;if(Fe.length){var Zt=Mh(Fe,Xh(cw));dt|=UQ}return Cf(oe,dt,ye,Fe,Zt)});cw.placeholder={};var r_=cw;var qQ=Rf(function(oe,ye){return af(ye,function(Fe){Fe=Nc(Fe),Lf(oe,Fe,r_(oe[Fe],oe))}),oe}),z8=qQ;var VQ=1,GQ=2,HQ=32,fw=Ui(function(oe,ye,Fe){var dt=VQ|GQ;if(Fe.length){var Zt=Mh(Fe,Xh(fw));dt|=HQ}return Cf(ye,dt,oe,Fe,Zt)});fw.placeholder={};var B8=fw;function WQ(oe,ye,Fe){var dt=-1,Zt=oe.length;ye<0&&(ye=-ye>Zt?0:Zt+ye),Fe=Fe>Zt?Zt:Fe,Fe<0&&(Fe+=Zt),Zt=ye>Fe?0:Fe-ye>>>0,ye>>>=0;for(var yr=Array(Zt);++dt=dt?oe:Zu(oe,ye,Fe)}var mh=YQ;var XQ="\\ud800-\\udfff",ZQ="\\u0300-\\u036f",$Q="\\ufe20-\\ufe2f",KQ="\\u20d0-\\u20ff",JQ=ZQ+$Q+KQ,QQ="\\ufe0e\\ufe0f",eee="\\u200d",tee=RegExp("["+eee+XQ+JQ+QQ+"]");function ree(oe){return tee.test(oe)}var Kh=ree;function aee(oe){return oe.split("")}var O8=aee;var N8="\\ud800-\\udfff",nee="\\u0300-\\u036f",iee="\\ufe20-\\ufe2f",oee="\\u20d0-\\u20ff",see=nee+iee+oee,lee="\\ufe0e\\ufe0f",uee="["+N8+"]",hw="["+see+"]",dw="\\ud83c[\\udffb-\\udfff]",cee="(?:"+hw+"|"+dw+")",j8="[^"+N8+"]",U8="(?:\\ud83c[\\udde6-\\uddff]){2}",q8="[\\ud800-\\udbff][\\udc00-\\udfff]",fee="\\u200d",V8=cee+"?",G8="["+lee+"]?",hee="(?:"+fee+"(?:"+[j8,U8,q8].join("|")+")"+G8+V8+")*",dee=G8+V8+hee,pee="(?:"+[j8+hw+"?",hw,U8,q8,uee].join("|")+")",vee=RegExp(dw+"(?="+dw+")|"+pee+dee,"g");function mee(oe){return oe.match(vee)||[]}var H8=mee;function gee(oe){return Kh(oe)?H8(oe):O8(oe)}var nf=gee;function yee(oe){return function(ye){ye=To(ye);var Fe=Kh(ye)?nf(ye):void 0,dt=Fe?Fe[0]:ye.charAt(0),Zt=Fe?mh(Fe,1).join(""):ye.slice(1);return dt[oe]()+Zt}}var a_=yee;var _ee=a_("toUpperCase"),nm=_ee;function xee(oe){return nm(To(oe).toLowerCase())}var n_=xee;function bee(oe,ye,Fe,dt){var Zt=-1,yr=oe==null?0:oe.length;for(dt&&yr&&(Fe=oe[++Zt]);++Zt=ye?oe:ye)),oe}var Bh=xte;function bte(oe,ye,Fe){return Fe===void 0&&(Fe=ye,ye=void 0),Fe!==void 0&&(Fe=Bc(Fe),Fe=Fe===Fe?Fe:0),ye!==void 0&&(ye=Bc(ye),ye=ye===ye?ye:0),Bh(Bc(oe),ye,Fe)}var gk=bte;function wte(){this.__data__=new zp,this.size=0}var yk=wte;function Tte(oe){var ye=this.__data__,Fe=ye.delete(oe);return this.size=ye.size,Fe}var _k=Tte;function Ate(oe){return this.__data__.get(oe)}var xk=Ate;function Mte(oe){return this.__data__.has(oe)}var bk=Mte;var Ste=200;function Ete(oe,ye){var Fe=this.__data__;if(Fe instanceof zp){var dt=Fe.__data__;if(!Bp||dt.lengthma))return!1;var wn=yr.get(oe),xn=yr.get(ye);if(wn&&xn)return wn==ye&&xn==oe;var On=-1,Fi=!0,ho=Fe&Eae?new Up:void 0;for(yr.set(oe,ye),yr.set(ye,oe);++On=ye||Oh<0||On&&ad>=yr}function zi(){var Po=wm();if(Lo(Po))return ze(Po);ma=setTimeout(zi,lo(Po))}function ze(Po){return ma=void 0,Fi&&dt?ho(Po):(dt=Zt=void 0,Yr)}function bu(){ma!==void 0&&clearTimeout(ma),wn=0,dt=ya=Zt=ma=void 0}function uf(){return ma===void 0?Yr:ze(wm())}function Yl(){var Po=wm(),Oh=Lo(Po);if(dt=arguments,Zt=this,ya=Po,Oh){if(ma===void 0)return Li(ya);if(On)return clearTimeout(ma),ma=setTimeout(zi,ye),ho(ya)}return ma===void 0&&(ma=setTimeout(zi,ye)),Yr}return Yl.cancel=bu,Yl.flush=uf,Yl}var P_=jne;function Une(oe,ye){return oe==null||oe!==oe?ye:oe}var MC=Une;var SC=Object.prototype,qne=SC.hasOwnProperty,Vne=Ui(function(oe,ye){oe=Object(oe);var Fe=-1,dt=ye.length,Zt=dt>2?ye[2]:void 0;for(Zt&&Tl(ye[0],ye[1],Zt)&&(dt=1);++Fe=rie&&(yr=ep,Yr=!1,ye=new Up(ye));e:for(;++Zt=0&&oe.slice(Fe,Zt)==ye}var GC=bie;function wie(oe,ye){return ts(ye,function(Fe){return[Fe,oe[Fe]]})}var HC=wie;function Tie(oe){var ye=-1,Fe=Array(oe.size);return oe.forEach(function(dt){Fe[++ye]=[dt,dt]}),Fe}var WC=Tie;var Aie="[object Map]",Mie="[object Set]";function Sie(oe){return function(ye){var Fe=of(ye);return Fe==Aie?mm(ye):Fe==Mie?WC(ye):HC(ye,oe(ye))}}var B_=Sie;var Eie=B_(Ms),Xg=Eie;var kie=B_(Rl),Zg=kie;var Cie={"&":"&","<":"<",">":">",'"':""","'":"'"},Lie=om(Cie),YC=Lie;var XC=/[&<>"']/g,Pie=RegExp(XC.source);function Rie(oe){return oe=To(oe),oe&&Pie.test(oe)?oe.replace(XC,YC):oe}var O_=Rie;var ZC=/[\\^$.*+?()[\]{}|]/g,Iie=RegExp(ZC.source);function Die(oe){return oe=To(oe),oe&&Iie.test(oe)?oe.replace(ZC,"\\$&"):oe}var $C=Die;function Fie(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++FeZt?0:Zt+Fe),dt=dt===void 0||dt>Zt?Zt:ji(dt),dt<0&&(dt+=Zt),dt=Fe>dt?0:j_(dt);Fe-1?Zt[yr?ye[Yr]:Yr]:void 0}}var q_=Gie;var Hie=Math.max;function Wie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Hie(dt+Zt,0)),Pp(oe,Ti(ye,3),Zt)}var V_=Wie;var Yie=q_(V_),r7=Yie;function Xie(oe,ye,Fe){var dt;return Fe(oe,function(Zt,yr,Yr){if(ye(Zt,yr,Yr))return dt=yr,!1}),dt}var G_=Xie;function Zie(oe,ye){return G_(oe,Ti(ye,3),Df)}var a7=Zie;var $ie=Math.max,Kie=Math.min;function Jie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt-1;return Fe!==void 0&&(Zt=ji(Fe),Zt=Fe<0?$ie(dt+Zt,0):Kie(Zt,dt-1)),Pp(oe,Ti(ye,3),Zt,!0)}var H_=Jie;var Qie=q_(H_),n7=Qie;function eoe(oe,ye){return G_(oe,Ti(ye,3),Mm)}var i7=eoe;function toe(oe){return oe&&oe.length?oe[0]:void 0}var $g=toe;function roe(oe,ye){var Fe=-1,dt=Pl(oe)?Array(oe.length):[];return yh(oe,function(Zt,yr,Yr){dt[++Fe]=ye(Zt,yr,Yr)}),dt}var W_=roe;function aoe(oe,ye){var Fe=Ii(oe)?ts:W_;return Fe(oe,Ti(ye,3))}var Wp=aoe;function noe(oe,ye){return Zs(Wp(oe,ye),1)}var o7=noe;var ioe=1/0;function ooe(oe,ye){return Zs(Wp(oe,ye),ioe)}var s7=ooe;function soe(oe,ye,Fe){return Fe=Fe===void 0?1:ji(Fe),Zs(Wp(oe,ye),Fe)}var l7=soe;var loe=1/0;function uoe(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,loe):[]}var u7=uoe;function coe(oe,ye){var Fe=oe==null?0:oe.length;return Fe?(ye=ye===void 0?1:ji(ye),Zs(oe,ye)):[]}var c7=coe;var foe=512;function hoe(oe){return Cf(oe,foe)}var f7=hoe;var doe=lm("floor"),h7=doe;var poe="Expected a function",voe=8,moe=32,goe=128,yoe=256;function _oe(oe){return Rf(function(ye){var Fe=ye.length,dt=Fe,Zt=dh.prototype.thru;for(oe&&ye.reverse();dt--;){var yr=ye[dt];if(typeof yr!="function")throw new TypeError(poe);if(Zt&&!Yr&&V0(yr)=="wrapper")var Yr=new dh([],!0)}for(dt=Yr?dt:Fe;++dtye}var Sm=Ioe;function Doe(oe){return function(ye,Fe){return typeof ye=="string"&&typeof Fe=="string"||(ye=Bc(ye),Fe=Bc(Fe)),oe(ye,Fe)}}var Xp=Doe;var Foe=Xp(Sm),T7=Foe;var zoe=Xp(function(oe,ye){return oe>=ye}),A7=zoe;var Boe=Object.prototype,Ooe=Boe.hasOwnProperty;function Noe(oe,ye){return oe!=null&&Ooe.call(oe,ye)}var M7=Noe;function joe(oe,ye){return oe!=null&&M_(oe,ye,M7)}var S7=joe;var Uoe=Math.max,qoe=Math.min;function Voe(oe,ye,Fe){return oe>=qoe(ye,Fe)&&oe-1:!!Zt&&Yh(oe,ye,Fe)>-1}var C7=$oe;var Koe=Math.max;function Joe(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Koe(dt+Zt,0)),Yh(oe,ye,Zt)}var L7=Joe;function Qoe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,0,-1):[]}var P7=Qoe;var ese=Math.min;function tse(oe,ye,Fe){for(var dt=Fe?Am:Rp,Zt=oe[0].length,yr=oe.length,Yr=yr,ma=Array(yr),ya=1/0,wn=[];Yr--;){var xn=oe[Yr];Yr&&ye&&(xn=ts(xn,_u(ye))),ya=ese(xn.length,ya),ma[Yr]=!Fe&&(ye||Zt>=120&&xn.length>=120)?new Up(Yr&&xn):void 0}xn=oe[0];var On=-1,Fi=ma[0];e:for(;++On=-l9&&oe<=l9}var u9=$se;function Kse(oe){return oe===void 0}var c9=Kse;var Jse="[object WeakMap]";function Qse(oe){return is(oe)&&of(oe)==Jse}var f9=Qse;var ele="[object WeakSet]";function tle(oe){return is(oe)&&bl(oe)==ele}var h9=tle;var rle=1;function ale(oe){return Ti(typeof oe=="function"?oe:If(oe,rle))}var d9=ale;var nle=Array.prototype,ile=nle.join;function ole(oe,ye){return oe==null?"":ile.call(oe,ye)}var p9=ole;var sle=Jh(function(oe,ye,Fe){return oe+(Fe?"-":"")+ye.toLowerCase()}),v9=sle;var lle=Gp(function(oe,ye,Fe){Lf(oe,Fe,ye)}),m9=lle;function ule(oe,ye,Fe){for(var dt=Fe+1;dt--;)if(oe[dt]===ye)return dt;return dt}var g9=ule;var cle=Math.max,fle=Math.min;function hle(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt;return Fe!==void 0&&(Zt=ji(Fe),Zt=Zt<0?cle(dt+Zt,0):fle(Zt,dt-1)),ye===ye?g9(oe,ye,Zt):Pp(oe,Gy,Zt,!0)}var y9=hle;var dle=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+ye.toLowerCase()}),_9=dle;var ple=a_("toLowerCase"),x9=ple;function vle(oe,ye){return oe=this.__values__.length,ye=oe?void 0:this.__values__[this.__index__++];return{done:oe,value:ye}}var O9=Hle;function Wle(oe,ye){var Fe=oe.length;if(Fe)return ye+=ye<0?Fe:0,kf(ye,Fe)?oe[ye]:void 0}var tx=Wle;function Yle(oe,ye){return oe&&oe.length?tx(oe,ji(ye)):void 0}var N9=Yle;function Xle(oe){return oe=ji(oe),Ui(function(ye){return tx(ye,oe)})}var j9=Xle;function Zle(oe,ye){return ye=ph(ye,oe),oe=Z_(oe,ye),oe==null||delete oe[Nc(xu(ye))]}var Im=Zle;function $le(oe){return Cd(oe)?void 0:oe}var U9=$le;var Kle=1,Jle=2,Qle=4,eue=Rf(function(oe,ye){var Fe={};if(oe==null)return Fe;var dt=!1;ye=ts(ye,function(yr){return yr=ph(yr,oe),dt||(dt=yr.length>1),yr}),Oc(oe,hm(oe),Fe),dt&&(Fe=If(Fe,Kle|Jle|Qle,U9));for(var Zt=ye.length;Zt--;)Im(Fe,ye[Zt]);return Fe}),q9=eue;function tue(oe,ye,Fe,dt){if(!as(oe))return oe;ye=ph(ye,oe);for(var Zt=-1,yr=ye.length,Yr=yr-1,ma=oe;ma!=null&&++Ztye||yr&&Yr&&ya&&!ma&&!wn||dt&&Yr&&ya||!Fe&&ya||!Zt)return 1;if(!dt&&!yr&&!wn&&oe=ma)return ya;var wn=Fe[dt];return ya*(wn=="desc"?-1:1)}}return oe.index-ye.index}var W9=lue;function uue(oe,ye,Fe){ye.length?ye=ts(ye,function(yr){return Ii(yr)?function(Yr){return zh(Yr,yr.length===1?yr[0]:yr)}:yr}):ye=[wl];var dt=-1;ye=ts(ye,_u(Ti));var Zt=W_(oe,function(yr,Yr,ma){var ya=ts(ye,function(wn){return wn(yr)});return{criteria:ya,index:++dt,value:yr}});return H9(Zt,function(yr,Yr){return W9(yr,Yr,Fe)})}var ix=uue;function cue(oe,ye,Fe,dt){return oe==null?[]:(Ii(ye)||(ye=ye==null?[]:[ye]),Fe=dt?void 0:Fe,Ii(Fe)||(Fe=Fe==null?[]:[Fe]),ix(oe,ye,Fe))}var Y9=cue;function fue(oe){return Rf(function(ye){return ye=ts(ye,_u(Ti)),Ui(function(Fe){var dt=this;return oe(ye,function(Zt){return gu(Zt,dt,Fe)})})})}var Dm=fue;var hue=Dm(ts),X9=hue;var due=Ui,Z9=due;var pue=Math.min,vue=Z9(function(oe,ye){ye=ye.length==1&&Ii(ye[0])?ts(ye[0],_u(Ti)):ts(Zs(ye,1),_u(Ti));var Fe=ye.length;return Ui(function(dt){for(var Zt=-1,yr=pue(dt.length,Fe);++Ztyue)return Fe;do ye%2&&(Fe+=oe),ye=_ue(ye/2),ye&&(oe+=oe);while(ye);return Fe}var Kg=xue;var bue=xm("length"),Q9=bue;var tL="\\ud800-\\udfff",wue="\\u0300-\\u036f",Tue="\\ufe20-\\ufe2f",Aue="\\u20d0-\\u20ff",Mue=wue+Tue+Aue,Sue="\\ufe0e\\ufe0f",Eue="["+tL+"]",yw="["+Mue+"]",_w="\\ud83c[\\udffb-\\udfff]",kue="(?:"+yw+"|"+_w+")",rL="[^"+tL+"]",aL="(?:\\ud83c[\\udde6-\\uddff]){2}",nL="[\\ud800-\\udbff][\\udc00-\\udfff]",Cue="\\u200d",iL=kue+"?",oL="["+Sue+"]?",Lue="(?:"+Cue+"(?:"+[rL,aL,nL].join("|")+")"+oL+iL+")*",Pue=oL+iL+Lue,Rue="(?:"+[rL+yw+"?",yw,aL,nL,Eue].join("|")+")",eL=RegExp(_w+"(?="+_w+")|"+Rue+Pue,"g");function Iue(oe){for(var ye=eL.lastIndex=0;eL.test(oe);)++ye;return ye}var sL=Iue;function Due(oe){return Kh(oe)?sL(oe):Q9(oe)}var ed=Due;var Fue=Math.ceil;function zue(oe,ye){ye=ye===void 0?" ":uc(ye);var Fe=ye.length;if(Fe<2)return Fe?Kg(ye,oe):ye;var dt=Kg(ye,Fue(oe/ed(ye)));return Kh(ye)?mh(nf(dt),0,oe).join(""):dt.slice(0,oe)}var Fv=zue;var Bue=Math.ceil,Oue=Math.floor;function Nue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;if(!ye||dt>=ye)return oe;var Zt=(ye-dt)/2;return Fv(Oue(Zt),Fe)+oe+Fv(Bue(Zt),Fe)}var lL=Nue;function jue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;return ye&&dt-1;)ma!==oe&&_L.call(ma,ya,1),_L.call(oe,ya,1);return oe}var Fm=ece;function tce(oe,ye){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye):oe}var sx=tce;var rce=Ui(sx),xL=rce;function ace(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,Ti(Fe,2)):oe}var bL=ace;function nce(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,void 0,Fe):oe}var wL=nce;var ice=Array.prototype,oce=ice.splice;function sce(oe,ye){for(var Fe=oe?ye.length:0,dt=Fe-1;Fe--;){var Zt=ye[Fe];if(Fe==dt||Zt!==yr){var yr=Zt;kf(Zt)?oce.call(oe,Zt,1):Im(oe,Zt)}}return oe}var lx=sce;var lce=Rf(function(oe,ye){var Fe=oe==null?0:oe.length,dt=rm(oe,ye);return lx(oe,ts(ye,function(Zt){return kf(Zt,Fe)?+Zt:Zt}).sort(nx)),dt}),TL=lce;var uce=Math.floor,cce=Math.random;function fce(oe,ye){return oe+uce(cce()*(ye-oe+1))}var zm=fce;var hce=parseFloat,dce=Math.min,pce=Math.random;function vce(oe,ye,Fe){if(Fe&&typeof Fe!="boolean"&&Tl(oe,ye,Fe)&&(ye=Fe=void 0),Fe===void 0&&(typeof ye=="boolean"?(Fe=ye,ye=void 0):typeof oe=="boolean"&&(Fe=oe,oe=void 0)),oe===void 0&&ye===void 0?(oe=0,ye=1):(oe=Dh(oe),ye===void 0?(ye=oe,oe=0):ye=Dh(ye)),oe>ye){var dt=oe;oe=ye,ye=dt}if(Fe||oe%1||ye%1){var Zt=pce();return dce(oe+Zt*(ye-oe+hce("1e-"+((Zt+"").length-1))),ye)}return zm(oe,ye)}var AL=vce;var mce=Math.ceil,gce=Math.max;function yce(oe,ye,Fe,dt){for(var Zt=-1,yr=gce(mce((ye-oe)/(Fe||1)),0),Yr=Array(yr);yr--;)Yr[dt?yr:++Zt]=oe,oe+=Fe;return Yr}var ML=yce;function _ce(oe){return function(ye,Fe,dt){return dt&&typeof dt!="number"&&Tl(ye,Fe,dt)&&(Fe=dt=void 0),ye=Dh(ye),Fe===void 0?(Fe=ye,ye=0):Fe=Dh(Fe),dt=dt===void 0?ye1&&Tl(oe,ye[0],ye[1])?ye=[]:Fe>2&&Tl(ye[0],ye[1],ye[2])&&(ye=[ye[0]]),ix(oe,Zs(ye,1),[])}),eP=nfe;var ife=4294967295,ofe=ife-1,sfe=Math.floor,lfe=Math.min;function ufe(oe,ye,Fe,dt){var Zt=0,yr=oe==null?0:oe.length;if(yr===0)return 0;ye=Fe(ye);for(var Yr=ye!==ye,ma=ye===null,ya=Ru(ye),wn=ye===void 0;Zt>>1;function hfe(oe,ye,Fe){var dt=0,Zt=oe==null?dt:oe.length;if(typeof ye=="number"&&ye===ye&&Zt<=ffe){for(;dt>>1,Yr=oe[yr];Yr!==null&&!Ru(Yr)&&(Fe?Yr<=ye:Yr>>0,Fe?(oe=To(oe),oe&&(typeof ye=="string"||ye!=null&&!Lm(ye))&&(ye=uc(ye),!ye&&Kh(oe))?mh(nf(oe),0,Fe):oe.split(ye,Fe)):[]}var uP=Tfe;var Afe="Expected a function",Mfe=Math.max;function Sfe(oe,ye){if(typeof oe!="function")throw new TypeError(Afe);return ye=ye==null?0:Mfe(ji(ye),0),Ui(function(Fe){var dt=Fe[ye],Zt=mh(Fe,0,ye);return dt&&vh(Zt,dt),gu(oe,this,Zt)})}var cP=Sfe;var Efe=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+nm(ye)}),fP=Efe;function kfe(oe,ye,Fe){return oe=To(oe),Fe=Fe==null?0:Bh(ji(Fe),0,oe.length),ye=uc(ye),oe.slice(Fe,Fe+ye.length)==ye}var hP=kfe;function Cfe(){return{}}var dP=Cfe;function Lfe(){return""}var pP=Lfe;function Pfe(){return!0}var vP=Pfe;var Rfe=kp(function(oe,ye){return oe-ye},0),mP=Rfe;function Ife(oe){return oe&&oe.length?Rm(oe,wl):0}var gP=Ife;function Dfe(oe,ye){return oe&&oe.length?Rm(oe,Ti(ye,2)):0}var yP=Dfe;function Ffe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,1,ye):[]}var _P=Ffe;function zfe(oe,ye,Fe){return oe&&oe.length?(ye=Fe||ye===void 0?1:ji(ye),Zu(oe,0,ye<0?0:ye)):[]}var xP=zfe;function Bfe(oe,ye,Fe){var dt=oe==null?0:oe.length;return dt?(ye=Fe||ye===void 0?1:ji(ye),ye=dt-ye,Zu(oe,ye<0?0:ye,dt)):[]}var bP=Bfe;function Ofe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3),!1,!0):[]}var wP=Ofe;function Nfe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3)):[]}var TP=Nfe;function jfe(oe,ye){return ye(oe),oe}var AP=jfe;var MP=Object.prototype,Ufe=MP.hasOwnProperty;function qfe(oe,ye,Fe,dt){return oe===void 0||cc(oe,MP[Fe])&&!Ufe.call(dt,Fe)?ye:oe}var ww=qfe;var Vfe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Gfe(oe){return"\\"+Vfe[oe]}var SP=Gfe;var Hfe=/<%=([\s\S]+?)%>/g,dx=Hfe;var Wfe=/<%-([\s\S]+?)%>/g,EP=Wfe;var Yfe=/<%([\s\S]+?)%>/g,kP=Yfe;var Xfe={escape:EP,evaluate:kP,interpolate:dx,variable:"",imports:{_:{escape:O_}}},Qg=Xfe;var Zfe="Invalid `variable` option passed into `_.template`",$fe=/\b__p \+= '';/g,Kfe=/\b(__p \+=) '' \+/g,Jfe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qfe=/[()=,{}\[\]\/\s]/,ehe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,px=/($^)/,the=/['\n\r\u2028\u2029\\]/g,rhe=Object.prototype,CP=rhe.hasOwnProperty;function ahe(oe,ye,Fe){var dt=Qg.imports._.templateSettings||Qg;Fe&&Tl(oe,ye,Fe)&&(ye=void 0),oe=To(oe),ye=Dp({},ye,dt,ww);var Zt=Dp({},ye.imports,dt.imports,ww),yr=Ms(Zt),Yr=Em(Zt,yr),ma,ya,wn=0,xn=ye.interpolate||px,On="__p += '",Fi=RegExp((ye.escape||px).source+"|"+xn.source+"|"+(xn===dx?ehe:px).source+"|"+(ye.evaluate||px).source+"|$","g"),ho=CP.call(ye,"sourceURL")?"//# sourceURL="+(ye.sourceURL+"").replace(/\s/g," ")+` +`:"";oe.replace(Fi,function(Lo,zi,ze,bu,uf,Yl){return ze||(ze=bu),On+=oe.slice(wn,Yl).replace(the,SP),zi&&(ma=!0,On+=`' + __e(`+zi+`) + '`),uf&&(ya=!0,On+=`'; `+uf+`; __p += '`),ze&&(On+=`' + ((__t = (`+ze+`)) == null ? '' : __t) + -'`),Cn=Yl+Lo.length,Lo}),On+=`'; +'`),wn=Yl+Lo.length,Lo}),On+=`'; `;var Li=CP.call(ye,"variable")&&ye.variable;if(!Li)On=`with (obj) { `+On+` } `;else if(Qfe.test(Li))throw new Error(Zfe);On=(ya?On.replace($fe,""):On).replace(Kfe,"$1").replace(Jfe,"$1;"),On="function("+(Li||"obj")+`) { `+(Li?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ga?", __e = _.escape":"")+(ya?`, __j = Array.prototype.join; +`)+"var __t, __p = ''"+(ma?", __e = _.escape":"")+(ya?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+On+`return __p -}`;var lo=e_(function(){return Function(yr,ho+"return "+On).apply(void 0,Xr)});if(lo.source=On,am(lo))throw lo;return lo}var LP=ahe;var nhe="Expected a function";function ihe(oe,ye,Fe){var dt=!0,Zt=!0;if(typeof oe!="function")throw new TypeError(nhe);return as(Fe)&&(dt="leading"in Fe?!!Fe.leading:dt,Zt="trailing"in Fe?!!Fe.trailing:Zt),P_(oe,ye,{leading:dt,maxWait:ye,trailing:Zt})}var PP=ihe;function ohe(oe,ye){return ye(oe)}var rp=ohe;var she=9007199254740991,Tw=4294967295,lhe=Math.min;function uhe(oe,ye){if(oe=ji(oe),oe<1||oe>she)return[];var Fe=Tw,dt=lhe(oe,Tw);ye=jc(ye),oe-=Tw;for(var Zt=X0(dt,ye);++Fe-1;);return Fe}var mx=yhe;function _he(oe,ye){for(var Fe=-1,dt=oe.length;++Fe-1;);return Fe}var gx=_he;function xhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return Iy(oe);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=nf(ye),yr=gx(dt,Zt),Xr=mx(dt,Zt)+1;return mh(dt,yr,Xr).join("")}var jP=xhe;function bhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.slice(0,Ry(oe)+1);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=mx(dt,nf(ye))+1;return mh(dt,0,Zt).join("")}var UP=bhe;var whe=/^\s+/;function The(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.replace(whe,"");if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=gx(dt,nf(ye));return mh(dt,Zt).join("")}var qP=The;var Ahe=30,Mhe="...",She=/\w*$/;function Ehe(oe,ye){var Fe=Ahe,dt=Mhe;if(as(ye)){var Zt="separator"in ye?ye.separator:Zt;Fe="length"in ye?ji(ye.length):Fe,dt="omission"in ye?uc(ye.omission):dt}oe=To(oe);var yr=oe.length;if(Kh(oe)){var Xr=nf(oe);yr=Xr.length}if(Fe>=yr)return oe;var ga=Fe-ed(dt);if(ga<1)return dt;var ya=Xr?mh(Xr,0,ga).join(""):oe.slice(0,ga);if(Zt===void 0)return ya+dt;if(Xr&&(ga+=ya.length-ga),Lm(Zt)){if(oe.slice(ga).search(Zt)){var Cn,xn=ya;for(Zt.global||(Zt=RegExp(Zt.source,To(She.exec(Zt))+"g")),Zt.lastIndex=0;Cn=Zt.exec(xn);)var On=Cn.index;ya=ya.slice(0,On===void 0?ga:On)}}else if(oe.indexOf(uc(Zt),ga)!=ga){var Fi=ya.lastIndexOf(Zt);Fi>-1&&(ya=ya.slice(0,Fi))}return ya+dt}var VP=Ehe;function khe(oe){return Yy(oe,1)}var GP=khe;var Che={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lhe=om(Che),HP=Lhe;var WP=/&(?:amp|lt|gt|quot|#39);/g,Phe=RegExp(WP.source);function Rhe(oe){return oe=To(oe),oe&&Phe.test(oe)?oe.replace(WP,HP):oe}var YP=Rhe;var Ihe=1/0,Dhe=jp&&1/qp(new jp([,-0]))[1]==Ihe?function(oe){return new jp(oe)}:U0,XP=Dhe;var Fhe=200;function zhe(oe,ye,Fe){var dt=-1,Zt=Rp,yr=oe.length,Xr=!0,ga=[],ya=ga;if(Fe)Xr=!1,Zt=Am;else if(yr>=Fhe){var Cn=ye?null:XP(oe);if(Cn)return qp(Cn);Xr=!1,Zt=ep,ya=new Up}else ya=ye?[]:ga;e:for(;++dt1||this.__actions__.length||!(dt instanceof fs)||!kf(Fe)?this.thru(Zt):(dt=dt.slice(Fe,+Fe+(ye?1:0)),dt.__actions__.push({func:rp,args:[Zt],thisArg:void 0}),new dh(dt,this.__chain__).thru(function(yr){return ye&&!yr.length&&yr.push(void 0),yr}))}),uR=rde;function ade(){return s_(this)}var cR=ade;function nde(){var oe=this.__wrapped__;if(oe instanceof fs){var ye=oe;return this.__actions__.length&&(ye=new fs(this)),ye=ye.reverse(),ye.__actions__.push({func:rp,args:[Jg],thisArg:void 0}),new dh(ye,this.__chain__)}return this.thru(Jg)}var fR=nde;function ide(oe,ye,Fe){var dt=oe.length;if(dt<2)return dt?Eh(oe[0]):[];for(var Zt=-1,yr=Array(dt);++Zt1?oe[ye-1]:void 0;return Fe=typeof Fe=="function"?(oe.pop(),Fe):void 0,yx(oe,Fe)}),yR=dde;var co={chunk:mk,compact:tC,concat:rC,difference:FC,differenceBy:zC,differenceWith:BC,drop:NC,dropRight:jC,dropRightWhile:UC,dropWhile:qC,fill:e7,findIndex:V_,findLastIndex:H_,first:$g,flatten:Qy,flattenDeep:u7,flattenDepth:c7,fromPairs:_7,head:$g,indexOf:L7,initial:P7,intersection:R7,intersectionBy:I7,intersectionWith:D7,join:p9,last:xu,lastIndexOf:y9,nth:N9,pull:xL,pullAll:sx,pullAllBy:bL,pullAllWith:wL,pullAt:TL,remove:IL,reverse:Jg,slice:$L,sortedIndex:tP,sortedIndexBy:rP,sortedIndexOf:aP,sortedLastIndex:nP,sortedLastIndexBy:iP,sortedLastIndexOf:oP,sortedUniq:sP,sortedUniqBy:lP,tail:_P,take:xP,takeRight:bP,takeRightWhile:wP,takeWhile:TP,union:ZP,unionBy:$P,unionWith:KP,uniq:JP,uniqBy:QP,uniqWith:eR,unzip:Om,unzipWith:yx,without:sR,xor:hR,xorBy:dR,xorWith:pR,zip:vR,zipObject:mR,zipObjectDeep:gR,zipWith:yR};var ul={countBy:bC,each:Wg,eachRight:Yg,every:JC,filter:t7,find:r7,findLast:n7,flatMap:o7,flatMapDeep:s7,flatMapDepth:l7,forEach:Wg,forEachRight:Yg,groupBy:w7,includes:C7,invokeMap:j7,keyBy:m9,map:Wp,orderBy:Y9,partition:dL,reduce:CL,reduceRight:PL,reject:RL,sample:jL,sampleSize:VL,shuffle:XL,size:ZL,some:QL,sortBy:eP};var Aw={now:wm};var Iu={after:CE,ary:Yy,before:t_,bind:r_,bindKey:B8,curry:TC,curryRight:AC,debounce:P_,defer:IC,delay:DC,flip:f7,memoize:Ky,negate:tp,once:G9,overArgs:$9,partial:ox,partialRight:hL,rearg:kL,rest:zL,spread:cP,throttle:PP,unary:GP,wrap:lR};var ko={castArray:pk,clone:$k,cloneDeep:Kk,cloneDeepWith:Jk,cloneWith:Qk,conformsTo:yC,eq:cc,gt:T7,gte:A7,isArguments:jh,isArray:Ii,isArrayBuffer:V7,isArrayLike:Pl,isArrayLikeObject:Fs,isBoolean:G7,isBuffer:Sh,isDate:Y7,isElement:X7,isEmpty:Z7,isEqual:$7,isEqualWith:K7,isError:am,isFinite:J7,isFunction:Ef,isInteger:$_,isLength:Ip,isMap:m_,isMatch:Q7,isMatchWith:e9,isNaN:t9,isNative:a9,isNil:n9,isNull:i9,isNumber:K_,isObject:as,isObjectLike:is,isPlainObject:Cd,isRegExp:Lm,isSafeInteger:u9,isSet:g_,isString:Zp,isSymbol:Ru,isTypedArray:$h,isUndefined:c9,isWeakMap:f9,isWeakSet:h9,lt:b9,lte:w9,toArray:ex,toFinite:Dh,toInteger:ji,toLength:j_,toNumber:Bc,toPlainObject:R_,toSafeInteger:BP,toString:To};var Kf={add:SE,ceil:vk,divide:OC,floor:h7,max:E9,maxBy:k9,mean:C9,meanBy:L9,min:D9,minBy:F9,multiply:z9,round:OL,subtract:mP,sum:gP,sumBy:yP};var e1={clamp:gk,inRange:k7,random:AL};var Ho={assign:c8,assignIn:qg,assignInWith:Dp,assignWith:d8,at:D8,create:wC,defaults:EC,defaultsDeep:RC,entries:Xg,entriesIn:Zg,extend:qg,extendWith:Dp,findKey:a7,findLastKey:i7,forIn:v7,forInRight:m7,forOwn:g7,forOwnRight:y7,functions:x7,functionsIn:b7,get:tm,has:S7,hasIn:_m,invert:z7,invertBy:O7,invoke:N7,keys:Ms,keysIn:Rl,mapKeys:T9,mapValues:A9,merge:P9,mergeWith:I_,omit:q9,omitBy:V9,pick:vL,pickBy:ax,result:BL,set:GL,setWith:HL,toPairs:Xg,toPairsIn:Zg,transform:NP,unset:rR,update:aR,updateWith:nR,values:Qh,valuesIn:oR};var td={at:uR,chain:s_,commit:eC,lodash:Ur,next:O9,plant:mL,reverse:fR,tap:AP,thru:rp,toIterator:IP,toJSON:Qp,value:Qp,valueOf:Qp,wrapperChain:cR};var Us={camelCase:dk,capitalize:n_,deburr:i_,endsWith:GC,escape:O_,escapeRegExp:$C,kebabCase:v9,lowerCase:_9,lowerFirst:x9,pad:lL,padEnd:uL,padStart:cL,parseInt:fL,repeat:DL,replace:FL,snakeCase:KL,split:uP,startCase:fP,startsWith:hP,template:LP,templateSettings:Qg,toLower:DP,toUpper:OP,trim:jP,trimEnd:UP,trimStart:qP,truncate:VP,unescape:YP,upperCase:iR,upperFirst:nm,words:o_};var $s={attempt:e_,bindAll:z8,cond:vC,conforms:gC,constant:G0,defaultTo:MC,flow:d7,flowRight:p7,identity:wl,iteratee:d9,matches:M9,matchesProperty:S9,method:R9,methodOf:I9,mixin:Q_,noop:U0,nthArg:j9,over:X9,overEvery:K9,overSome:J9,property:E_,propertyOf:gL,range:SL,rangeRight:EL,stubArray:cm,stubFalse:Z0,stubObject:dP,stubString:pP,stubTrue:vP,times:RP,toPath:FP,uniqueId:tR};function pde(){var oe=new fs(this.__wrapped__);return oe.__actions__=iu(this.__actions__),oe.__dir__=this.__dir__,oe.__filtered__=this.__filtered__,oe.__iteratees__=iu(this.__iteratees__),oe.__takeCount__=this.__takeCount__,oe.__views__=iu(this.__views__),oe}var _R=pde;function vde(){if(this.__filtered__){var oe=new fs(this);oe.__dir__=-1,oe.__filtered__=!0}else oe=this.clone(),oe.__dir__*=-1;return oe}var xR=vde;var mde=Math.max,gde=Math.min;function yde(oe,ye,Fe){for(var dt=-1,Zt=Fe.length;++dt0||ye<0)?new fs(Fe):(oe<0?Fe=Fe.takeRight(-oe):oe&&(Fe=Fe.drop(oe)),ye!==void 0&&(ye=ji(ye),Fe=ye<0?Fe.dropRight(-ye):Fe.take(ye-oe)),Fe)};fs.prototype.takeRightWhile=function(oe){return this.reverse().takeWhile(oe).reverse()};fs.prototype.toArray=function(){return this.take(MR)};Df(fs.prototype,function(oe,ye){var Fe=/^(?:filter|find|map|reject)|While$/.test(ye),dt=/^(?:head|last)$/.test(ye),Zt=Ur[dt?"take"+(ye=="last"?"Right":""):ye],yr=dt||/^find/.test(ye);Zt&&(Ur.prototype[ye]=function(){var Xr=this.__wrapped__,ga=dt?[1]:arguments,ya=Xr instanceof fs,Cn=ga[0],xn=ya||Ii(Xr),On=function(zi){var ze=Zt.apply(Ur,vh([zi],ga));return dt&&Fi?ze[0]:ze};xn&&Fe&&typeof Cn=="function"&&Cn.length!=1&&(ya=xn=!1);var Fi=this.__chain__,ho=!!this.__actions__.length,Li=yr&&!Fi,lo=ya&&!ho;if(!yr&&xn){Xr=lo?Xr:new fs(this);var Lo=oe.apply(Xr,ga);return Lo.__actions__.push({func:rp,args:[On],thisArg:void 0}),new dh(Lo,Fi)}return Li&&lo?oe.apply(this,ga):(Lo=this.thru(On),Li?dt?Lo.value()[0]:Lo.value():Lo)})});af(["pop","push","shift","sort","splice","unshift"],function(oe){var ye=Ede[oe],Fe=/^(?:push|sort|unshift)$/.test(oe)?"tap":"thru",dt=/^(?:pop|shift)$/.test(oe);Ur.prototype[oe]=function(){var Zt=arguments;if(dt&&!this.__chain__){var yr=this.value();return ye.apply(Ii(yr)?yr:[],Zt)}return this[Fe](function(Xr){return ye.apply(Ii(Xr)?Xr:[],Zt)})}});Df(fs.prototype,function(oe,ye){var Fe=Ur[ye];if(Fe){var dt=Fe.name+"";SR.call(Lp,dt)||(Lp[dt]=[]),Lp[dt].push({name:ye,func:Fe})}});Lp[Y0(void 0,Ade).name]=[{name:"wrapper",func:void 0}];fs.prototype.clone=_R;fs.prototype.reverse=xR;fs.prototype.value=wR;Ur.prototype.at=td.at;Ur.prototype.chain=td.wrapperChain;Ur.prototype.commit=td.commit;Ur.prototype.next=td.next;Ur.prototype.plant=td.plant;Ur.prototype.reverse=td.reverse;Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=td.value;Ur.prototype.first=Ur.prototype.head;TR&&(Ur.prototype[TR]=td.toIterator);var Wl=Ur;var rd=SX(CR());window.PlotlyConfig={MathJaxConfig:"local"};var Sw=class{constructor(ye,Fe){this.model=ye,this.serializers=Fe}get(ye){let Fe=this.serializers[ye],dt=this.model.get(ye);return Fe?.deserialize?Fe.deserialize(dt):dt}set(ye,Fe){let dt=this.serializers[ye];dt?.serialize&&(Fe=dt.serialize(Fe)),this.model.set(ye,Fe)}on(ye,Fe){this.model.on(ye,Fe)}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(ye){if(ye==null){var Fe=this.model.get("_widget_data").length;ye=Wl.range(Fe)}return Array.isArray(ye)||(ye=[ye]),ye}do_data(){}do_layout(){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.trace_data;Wl.forEach(dt,function(Zt){Fe.push(Zt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this.model.get("_widget_data");Fe.slice().reverse().forEach(function(Zt){dt.splice(Zt,1)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.current_trace_inds,Zt=ye.new_trace_inds;Dde(Fe,dt,Zt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this._normalize_trace_indexes(ye.restyle_traces);PR(this.model.get("_widget_data"),Fe,dt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");ye!==null&&wx(this.model.get("_widget_layout"),ye.relayout_data)}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces);PR(this.model.get("_widget_data"),Fe,Zt),wx(this.model.get("_widget_layout"),dt)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){for(var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces),yr=0;yrthis.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 Fe=this.model.get("_last_layout_edit_id"),dt=this.model.get("_last_trace_edit_id");this.viewID=IR();var Zt=Wl.cloneDeep(this.model.get("_widget_data")),yr=Wl.cloneDeep(this.model.get("_widget_layout"));yr.height||(yr.height=360);var Xr=this.model.get("_config");Xr.editSelection=!1,rd.default.newPlot(ye.el,Zt,yr,Xr).then(function(){ye._sendTraceDeltas(dt),ye._sendLayoutDelta(Fe),ye.el.on("plotly_restyle",function(ya){ye.handle_plotly_restyle(ya)}),ye.el.on("plotly_relayout",function(ya){ye.handle_plotly_relayout(ya)}),ye.el.on("plotly_update",function(ya){ye.handle_plotly_update(ya)}),ye.el.on("plotly_click",function(ya){ye.handle_plotly_click(ya)}),ye.el.on("plotly_hover",function(ya){ye.handle_plotly_hover(ya)}),ye.el.on("plotly_unhover",function(ya){ye.handle_plotly_unhover(ya)}),ye.el.on("plotly_selected",function(ya){ye.handle_plotly_selected(ya)}),ye.el.on("plotly_deselect",function(ya){ye.handle_plotly_deselect(ya)}),ye.el.on("plotly_doubleclick",function(ya){ye.handle_plotly_doubleclick(ya)});var ga=new CustomEvent("plotlywidget-after-render",{detail:{element:ye.el,viewID:ye.viewID}});document.dispatchEvent(ga)})}_processLuminoMessage(ye,Fe){Fe.apply(this,arguments);var dt=this;switch(ye.type){case"before-attach":var Zt={showgrid:!1,showline:!1,tickvals:[]};rd.default.newPlot(dt.el,[],{xaxis:Zt,yaxis:Zt}),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 ye=this,Fe=ye.model.get("_widget_layout");(Wl.isNil(Fe)||Wl.isNil(Fe.width))&&rd.default.Plots.resize(ye.el).then(function(){var dt=ye.model.get("_last_layout_edit_id");ye._sendLayoutDelta(dt)})}remove(){rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Wl.mergeWith({},this.el._fullData,this.el.data,LR)}getFullLayout(){return Wl.mergeWith({},this.el._fullLayout,this.el.layout,LR)}buildPointsObject(ye){var Fe;if(ye.hasOwnProperty("points")){var dt=ye.points,Zt=dt.length,yr=!0;for(let xn=0;xn=0;Zt--)dt.splice(0,0,oe[ye[Zt]]),oe.splice(ye[Zt],1);var yr=Wl(Fe).zip(dt).sortBy(0).unzip().value();Fe=yr[0],dt=yr[1];for(var Xr=0;Xr0&&typeof yr[0]=="object"){Fe[dt]=new Array(yr.length);for(var Xr=0;Xr0&&(Fe[dt]=ga)}else typeof yr=="object"&&!Array.isArray(yr)?Fe[dt]=t1(yr,{}):yr!==void 0&&typeof yr!="function"&&(Fe[dt]=yr)}}return Fe}function IR(oe,ye,Fe,dt){if(Fe||(Fe=16),ye===void 0&&(ye=24),ye<=0)return"0";var Zt=Math.log(Math.pow(2,ye))/Math.log(Fe),yr="",Xr,ga,ya;for(Xr=2;Zt===1/0;Xr*=2)Zt=Math.log(Math.pow(2,ye/Xr))/Math.log(Fe)*Xr;var Cn=Zt-Math.floor(Zt);for(Xr=0;Xr=Math.pow(2,ye)?dt>10?(console.warn("randstr failed uniqueness"),yr):IR(oe,ye,Fe,(dt||0)+1):yr}var XWe=()=>{let oe;return{initialize(ye){oe=new Sw(ye.model,Lde),oe.initialize()},render({el:ye}){let Fe=new Ew(oe,ye);return Fe.perform_render(),()=>Fe.remove()}}};export{Sw as FigureModel,Ew as FigureView,XWe as default}; +}`;var lo=e_(function(){return Function(yr,ho+"return "+On).apply(void 0,Yr)});if(lo.source=On,am(lo))throw lo;return lo}var LP=ahe;var nhe="Expected a function";function ihe(oe,ye,Fe){var dt=!0,Zt=!0;if(typeof oe!="function")throw new TypeError(nhe);return as(Fe)&&(dt="leading"in Fe?!!Fe.leading:dt,Zt="trailing"in Fe?!!Fe.trailing:Zt),P_(oe,ye,{leading:dt,maxWait:ye,trailing:Zt})}var PP=ihe;function ohe(oe,ye){return ye(oe)}var rp=ohe;var she=9007199254740991,Tw=4294967295,lhe=Math.min;function uhe(oe,ye){if(oe=ji(oe),oe<1||oe>she)return[];var Fe=Tw,dt=lhe(oe,Tw);ye=jc(ye),oe-=Tw;for(var Zt=X0(dt,ye);++Fe-1;);return Fe}var mx=yhe;function _he(oe,ye){for(var Fe=-1,dt=oe.length;++Fe-1;);return Fe}var gx=_he;function xhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return Iy(oe);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=nf(ye),yr=gx(dt,Zt),Yr=mx(dt,Zt)+1;return mh(dt,yr,Yr).join("")}var jP=xhe;function bhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.slice(0,Ry(oe)+1);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=mx(dt,nf(ye))+1;return mh(dt,0,Zt).join("")}var UP=bhe;var whe=/^\s+/;function The(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.replace(whe,"");if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=gx(dt,nf(ye));return mh(dt,Zt).join("")}var qP=The;var Ahe=30,Mhe="...",She=/\w*$/;function Ehe(oe,ye){var Fe=Ahe,dt=Mhe;if(as(ye)){var Zt="separator"in ye?ye.separator:Zt;Fe="length"in ye?ji(ye.length):Fe,dt="omission"in ye?uc(ye.omission):dt}oe=To(oe);var yr=oe.length;if(Kh(oe)){var Yr=nf(oe);yr=Yr.length}if(Fe>=yr)return oe;var ma=Fe-ed(dt);if(ma<1)return dt;var ya=Yr?mh(Yr,0,ma).join(""):oe.slice(0,ma);if(Zt===void 0)return ya+dt;if(Yr&&(ma+=ya.length-ma),Lm(Zt)){if(oe.slice(ma).search(Zt)){var wn,xn=ya;for(Zt.global||(Zt=RegExp(Zt.source,To(She.exec(Zt))+"g")),Zt.lastIndex=0;wn=Zt.exec(xn);)var On=wn.index;ya=ya.slice(0,On===void 0?ma:On)}}else if(oe.indexOf(uc(Zt),ma)!=ma){var Fi=ya.lastIndexOf(Zt);Fi>-1&&(ya=ya.slice(0,Fi))}return ya+dt}var VP=Ehe;function khe(oe){return Yy(oe,1)}var GP=khe;var Che={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lhe=om(Che),HP=Lhe;var WP=/&(?:amp|lt|gt|quot|#39);/g,Phe=RegExp(WP.source);function Rhe(oe){return oe=To(oe),oe&&Phe.test(oe)?oe.replace(WP,HP):oe}var YP=Rhe;var Ihe=1/0,Dhe=jp&&1/qp(new jp([,-0]))[1]==Ihe?function(oe){return new jp(oe)}:U0,XP=Dhe;var Fhe=200;function zhe(oe,ye,Fe){var dt=-1,Zt=Rp,yr=oe.length,Yr=!0,ma=[],ya=ma;if(Fe)Yr=!1,Zt=Am;else if(yr>=Fhe){var wn=ye?null:XP(oe);if(wn)return qp(wn);Yr=!1,Zt=ep,ya=new Up}else ya=ye?[]:ma;e:for(;++dt1||this.__actions__.length||!(dt instanceof fs)||!kf(Fe)?this.thru(Zt):(dt=dt.slice(Fe,+Fe+(ye?1:0)),dt.__actions__.push({func:rp,args:[Zt],thisArg:void 0}),new dh(dt,this.__chain__).thru(function(yr){return ye&&!yr.length&&yr.push(void 0),yr}))}),uR=rde;function ade(){return s_(this)}var cR=ade;function nde(){var oe=this.__wrapped__;if(oe instanceof fs){var ye=oe;return this.__actions__.length&&(ye=new fs(this)),ye=ye.reverse(),ye.__actions__.push({func:rp,args:[Jg],thisArg:void 0}),new dh(ye,this.__chain__)}return this.thru(Jg)}var fR=nde;function ide(oe,ye,Fe){var dt=oe.length;if(dt<2)return dt?Eh(oe[0]):[];for(var Zt=-1,yr=Array(dt);++Zt1?oe[ye-1]:void 0;return Fe=typeof Fe=="function"?(oe.pop(),Fe):void 0,yx(oe,Fe)}),yR=dde;var co={chunk:mk,compact:tC,concat:rC,difference:FC,differenceBy:zC,differenceWith:BC,drop:NC,dropRight:jC,dropRightWhile:UC,dropWhile:qC,fill:e7,findIndex:V_,findLastIndex:H_,first:$g,flatten:Qy,flattenDeep:u7,flattenDepth:c7,fromPairs:_7,head:$g,indexOf:L7,initial:P7,intersection:R7,intersectionBy:I7,intersectionWith:D7,join:p9,last:xu,lastIndexOf:y9,nth:N9,pull:xL,pullAll:sx,pullAllBy:bL,pullAllWith:wL,pullAt:TL,remove:IL,reverse:Jg,slice:$L,sortedIndex:tP,sortedIndexBy:rP,sortedIndexOf:aP,sortedLastIndex:nP,sortedLastIndexBy:iP,sortedLastIndexOf:oP,sortedUniq:sP,sortedUniqBy:lP,tail:_P,take:xP,takeRight:bP,takeRightWhile:wP,takeWhile:TP,union:ZP,unionBy:$P,unionWith:KP,uniq:JP,uniqBy:QP,uniqWith:eR,unzip:Om,unzipWith:yx,without:sR,xor:hR,xorBy:dR,xorWith:pR,zip:vR,zipObject:mR,zipObjectDeep:gR,zipWith:yR};var ul={countBy:bC,each:Wg,eachRight:Yg,every:JC,filter:t7,find:r7,findLast:n7,flatMap:o7,flatMapDeep:s7,flatMapDepth:l7,forEach:Wg,forEachRight:Yg,groupBy:w7,includes:C7,invokeMap:j7,keyBy:m9,map:Wp,orderBy:Y9,partition:dL,reduce:CL,reduceRight:PL,reject:RL,sample:jL,sampleSize:VL,shuffle:XL,size:ZL,some:QL,sortBy:eP};var Aw={now:wm};var Iu={after:CE,ary:Yy,before:t_,bind:r_,bindKey:B8,curry:TC,curryRight:AC,debounce:P_,defer:IC,delay:DC,flip:f7,memoize:Ky,negate:tp,once:G9,overArgs:$9,partial:ox,partialRight:hL,rearg:kL,rest:zL,spread:cP,throttle:PP,unary:GP,wrap:lR};var ko={castArray:pk,clone:$k,cloneDeep:Kk,cloneDeepWith:Jk,cloneWith:Qk,conformsTo:yC,eq:cc,gt:T7,gte:A7,isArguments:jh,isArray:Ii,isArrayBuffer:V7,isArrayLike:Pl,isArrayLikeObject:Fs,isBoolean:G7,isBuffer:Sh,isDate:Y7,isElement:X7,isEmpty:Z7,isEqual:$7,isEqualWith:K7,isError:am,isFinite:J7,isFunction:Ef,isInteger:$_,isLength:Ip,isMap:m_,isMatch:Q7,isMatchWith:e9,isNaN:t9,isNative:a9,isNil:n9,isNull:i9,isNumber:K_,isObject:as,isObjectLike:is,isPlainObject:Cd,isRegExp:Lm,isSafeInteger:u9,isSet:g_,isString:Zp,isSymbol:Ru,isTypedArray:$h,isUndefined:c9,isWeakMap:f9,isWeakSet:h9,lt:b9,lte:w9,toArray:ex,toFinite:Dh,toInteger:ji,toLength:j_,toNumber:Bc,toPlainObject:R_,toSafeInteger:BP,toString:To};var Kf={add:SE,ceil:vk,divide:OC,floor:h7,max:E9,maxBy:k9,mean:C9,meanBy:L9,min:D9,minBy:F9,multiply:z9,round:OL,subtract:mP,sum:gP,sumBy:yP};var e1={clamp:gk,inRange:k7,random:AL};var Ho={assign:c8,assignIn:qg,assignInWith:Dp,assignWith:d8,at:D8,create:wC,defaults:EC,defaultsDeep:RC,entries:Xg,entriesIn:Zg,extend:qg,extendWith:Dp,findKey:a7,findLastKey:i7,forIn:v7,forInRight:m7,forOwn:g7,forOwnRight:y7,functions:x7,functionsIn:b7,get:tm,has:S7,hasIn:_m,invert:z7,invertBy:O7,invoke:N7,keys:Ms,keysIn:Rl,mapKeys:T9,mapValues:A9,merge:P9,mergeWith:I_,omit:q9,omitBy:V9,pick:vL,pickBy:ax,result:BL,set:GL,setWith:HL,toPairs:Xg,toPairsIn:Zg,transform:NP,unset:rR,update:aR,updateWith:nR,values:Qh,valuesIn:oR};var td={at:uR,chain:s_,commit:eC,lodash:Ur,next:O9,plant:mL,reverse:fR,tap:AP,thru:rp,toIterator:IP,toJSON:Qp,value:Qp,valueOf:Qp,wrapperChain:cR};var Us={camelCase:dk,capitalize:n_,deburr:i_,endsWith:GC,escape:O_,escapeRegExp:$C,kebabCase:v9,lowerCase:_9,lowerFirst:x9,pad:lL,padEnd:uL,padStart:cL,parseInt:fL,repeat:DL,replace:FL,snakeCase:KL,split:uP,startCase:fP,startsWith:hP,template:LP,templateSettings:Qg,toLower:DP,toUpper:OP,trim:jP,trimEnd:UP,trimStart:qP,truncate:VP,unescape:YP,upperCase:iR,upperFirst:nm,words:o_};var $s={attempt:e_,bindAll:z8,cond:vC,conforms:gC,constant:G0,defaultTo:MC,flow:d7,flowRight:p7,identity:wl,iteratee:d9,matches:M9,matchesProperty:S9,method:R9,methodOf:I9,mixin:Q_,noop:U0,nthArg:j9,over:X9,overEvery:K9,overSome:J9,property:E_,propertyOf:gL,range:SL,rangeRight:EL,stubArray:cm,stubFalse:Z0,stubObject:dP,stubString:pP,stubTrue:vP,times:RP,toPath:FP,uniqueId:tR};function pde(){var oe=new fs(this.__wrapped__);return oe.__actions__=iu(this.__actions__),oe.__dir__=this.__dir__,oe.__filtered__=this.__filtered__,oe.__iteratees__=iu(this.__iteratees__),oe.__takeCount__=this.__takeCount__,oe.__views__=iu(this.__views__),oe}var _R=pde;function vde(){if(this.__filtered__){var oe=new fs(this);oe.__dir__=-1,oe.__filtered__=!0}else oe=this.clone(),oe.__dir__*=-1;return oe}var xR=vde;var mde=Math.max,gde=Math.min;function yde(oe,ye,Fe){for(var dt=-1,Zt=Fe.length;++dt0||ye<0)?new fs(Fe):(oe<0?Fe=Fe.takeRight(-oe):oe&&(Fe=Fe.drop(oe)),ye!==void 0&&(ye=ji(ye),Fe=ye<0?Fe.dropRight(-ye):Fe.take(ye-oe)),Fe)};fs.prototype.takeRightWhile=function(oe){return this.reverse().takeWhile(oe).reverse()};fs.prototype.toArray=function(){return this.take(MR)};Df(fs.prototype,function(oe,ye){var Fe=/^(?:filter|find|map|reject)|While$/.test(ye),dt=/^(?:head|last)$/.test(ye),Zt=Ur[dt?"take"+(ye=="last"?"Right":""):ye],yr=dt||/^find/.test(ye);Zt&&(Ur.prototype[ye]=function(){var Yr=this.__wrapped__,ma=dt?[1]:arguments,ya=Yr instanceof fs,wn=ma[0],xn=ya||Ii(Yr),On=function(zi){var ze=Zt.apply(Ur,vh([zi],ma));return dt&&Fi?ze[0]:ze};xn&&Fe&&typeof wn=="function"&&wn.length!=1&&(ya=xn=!1);var Fi=this.__chain__,ho=!!this.__actions__.length,Li=yr&&!Fi,lo=ya&&!ho;if(!yr&&xn){Yr=lo?Yr:new fs(this);var Lo=oe.apply(Yr,ma);return Lo.__actions__.push({func:rp,args:[On],thisArg:void 0}),new dh(Lo,Fi)}return Li&&lo?oe.apply(this,ma):(Lo=this.thru(On),Li?dt?Lo.value()[0]:Lo.value():Lo)})});af(["pop","push","shift","sort","splice","unshift"],function(oe){var ye=Ede[oe],Fe=/^(?:push|sort|unshift)$/.test(oe)?"tap":"thru",dt=/^(?:pop|shift)$/.test(oe);Ur.prototype[oe]=function(){var Zt=arguments;if(dt&&!this.__chain__){var yr=this.value();return ye.apply(Ii(yr)?yr:[],Zt)}return this[Fe](function(Yr){return ye.apply(Ii(Yr)?Yr:[],Zt)})}});Df(fs.prototype,function(oe,ye){var Fe=Ur[ye];if(Fe){var dt=Fe.name+"";SR.call(Lp,dt)||(Lp[dt]=[]),Lp[dt].push({name:ye,func:Fe})}});Lp[Y0(void 0,Ade).name]=[{name:"wrapper",func:void 0}];fs.prototype.clone=_R;fs.prototype.reverse=xR;fs.prototype.value=wR;Ur.prototype.at=td.at;Ur.prototype.chain=td.wrapperChain;Ur.prototype.commit=td.commit;Ur.prototype.next=td.next;Ur.prototype.plant=td.plant;Ur.prototype.reverse=td.reverse;Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=td.value;Ur.prototype.first=Ur.prototype.head;TR&&(Ur.prototype[TR]=td.toIterator);var Wl=Ur;var rd=SX(CR());window.PlotlyConfig={MathJaxConfig:"local"};var Sw=class{constructor(ye,Fe){this.model=ye,this.serializers=Fe}get(ye){let Fe=this.serializers[ye],dt=this.model.get(ye);return Fe?.deserialize?Fe.deserialize(dt):dt}set(ye,Fe){let dt=this.serializers[ye];dt?.serialize&&(Fe=dt.serialize(Fe)),this.model.set(ye,Fe)}on(ye,Fe){this.model.on(ye,Fe)}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(ye){if(ye==null){var Fe=this.model.get("_widget_data").length;ye=Wl.range(Fe)}return Array.isArray(ye)||(ye=[ye]),ye}do_data(){}do_layout(){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.trace_data;Wl.forEach(dt,function(Zt){Fe.push(Zt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this.model.get("_widget_data");Fe.slice().reverse().forEach(function(Zt){dt.splice(Zt,1)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.current_trace_inds,Zt=ye.new_trace_inds;Dde(Fe,dt,Zt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this._normalize_trace_indexes(ye.restyle_traces);PR(this.model.get("_widget_data"),Fe,dt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");ye!==null&&wx(this.model.get("_widget_layout"),ye.relayout_data)}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces);PR(this.model.get("_widget_data"),Fe,Zt),wx(this.model.get("_widget_layout"),dt)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){for(var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces),yr=0;yrthis.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 Fe=this.model.get("_last_layout_edit_id"),dt=this.model.get("_last_trace_edit_id");this.viewID=IR();var Zt=Wl.cloneDeep(this.model.get("_widget_data")),yr=Wl.cloneDeep(this.model.get("_widget_layout"));yr.height||(yr.height=360);var Yr=this.model.get("_config");Yr.editSelection=!1,rd.default.newPlot(ye.el,Zt,yr,Yr).then(function(){ye._sendTraceDeltas(dt),ye._sendLayoutDelta(Fe),ye.el.on("plotly_restyle",function(ya){ye.handle_plotly_restyle(ya)}),ye.el.on("plotly_relayout",function(ya){ye.handle_plotly_relayout(ya)}),ye.el.on("plotly_update",function(ya){ye.handle_plotly_update(ya)}),ye.el.on("plotly_click",function(ya){ye.handle_plotly_click(ya)}),ye.el.on("plotly_hover",function(ya){ye.handle_plotly_hover(ya)}),ye.el.on("plotly_unhover",function(ya){ye.handle_plotly_unhover(ya)}),ye.el.on("plotly_selected",function(ya){ye.handle_plotly_selected(ya)}),ye.el.on("plotly_deselect",function(ya){ye.handle_plotly_deselect(ya)}),ye.el.on("plotly_doubleclick",function(ya){ye.handle_plotly_doubleclick(ya)});var ma=new CustomEvent("plotlywidget-after-render",{detail:{element:ye.el,viewID:ye.viewID}});document.dispatchEvent(ma)})}_processLuminoMessage(ye,Fe){Fe.apply(this,arguments);var dt=this;switch(ye.type){case"before-attach":var Zt={showgrid:!1,showline:!1,tickvals:[]};rd.default.newPlot(dt.el,[],{xaxis:Zt,yaxis:Zt}),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 ye=this,Fe=ye.model.get("_widget_layout");(Wl.isNil(Fe)||Wl.isNil(Fe.width))&&rd.default.Plots.resize(ye.el).then(function(){var dt=ye.model.get("_last_layout_edit_id");ye._sendLayoutDelta(dt)})}remove(){rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Wl.mergeWith({},this.el._fullData,this.el.data,LR)}getFullLayout(){return Wl.mergeWith({},this.el._fullLayout,this.el.layout,LR)}buildPointsObject(ye){var Fe;if(ye.hasOwnProperty("points")){var dt=ye.points,Zt=dt.length,yr=!0;for(let xn=0;xn/^x\d*$/.test(wn)),yr=Object.keys(dt||{}).some(wn=>/^y\d*$/.test(wn));if(!Zt||!yr)return null;Fe={type:"box",selector_state:dt}}else if(ye.hasOwnProperty("lassoPoints")){var Yr=ye.lassoPoints,ma=Object.keys(Yr||{}).some(wn=>/^x\d*$/.test(wn)),ya=Object.keys(Yr||{}).some(wn=>/^y\d*$/.test(wn));if(!ma||!ya)return null;Fe={type:"lasso",selector_state:Yr}}else Fe=null;return Fe}handle_plotly_restyle(ye){if(ye!=null&&!(ye[0]&&ye[0].hasOwnProperty("_doNotReportToPy"))){var Fe=ye[0],dt=ye[1],Zt={style_data:Fe,style_traces:dt,source_view_id:this.viewID};this.model.set("_js2py_restyle",Zt),this.touch()}}touch(){this.model.save_changes()}handle_plotly_relayout(ye){if(ye!=null&&!ye.hasOwnProperty("_doNotReportToPy")){var Fe={relayout_data:ye,source_view_id:this.viewID};this.model.set("_js2py_relayout",Fe),this.touch()}}handle_plotly_update(ye){if(ye!=null&&!(ye.data&&ye.data[0].hasOwnProperty("_doNotReportToPy"))){var Fe={style_data:ye.data[0],style_traces:ye.data[1],layout_data:ye.layout,source_view_id:this.viewID};this.model.set("_js2py_update",Fe),this.touch()}}handle_plotly_click(ye){this._send_points_callback_message(ye,"plotly_click")}handle_plotly_hover(ye){this._send_points_callback_message(ye,"plotly_hover")}handle_plotly_unhover(ye){this._send_points_callback_message(ye,"plotly_unhover")}handle_plotly_selected(ye){this._send_points_callback_message(ye,"plotly_selected")}handle_plotly_deselect(ye){ye={points:[]},this._send_points_callback_message(ye,"plotly_deselect")}_send_points_callback_message(ye,Fe){if(ye!=null){var dt={event_type:Fe,points:this.buildPointsObject(ye),device_state:this.buildInputDeviceStateObject(ye),selector:this.buildSelectorObject(ye)};dt.points!==null&&dt.points!==void 0&&(this.model.set("_js2py_pointsCallback",dt),this.touch())}}handle_plotly_doubleclick(ye){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this;rd.default.addTraces(this.el,ye.trace_data).then(function(){Fe._sendTraceDeltas(ye.trace_edit_id);var dt=ye.layout_edit_id;Fe._sendLayoutDelta(dt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this;rd.default.deleteTraces(this.el,Fe).then(function(){var Zt=ye.trace_edit_id;dt._sendTraceDeltas(Zt);var yr=ye.layout_edit_id;dt._sendLayoutDelta(yr)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=ye.current_trace_inds,dt=ye.new_trace_inds,Zt=Wl.isEqual(Fe,dt);Zt||rd.default.moveTraces(this.el,Fe,dt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this.model._normalize_trace_indexes(ye.restyle_traces);Fe._doNotReportToPy=!0,rd.default.restyle(this.el,Fe,dt),this._sendTraceDeltas(ye.trace_edit_id);var Zt=ye.layout_edit_id;this._sendLayoutDelta(Zt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");if(ye!==null){if(ye.source_view_id!==this.viewID){var Fe=ye.relayout_data;Fe._doNotReportToPy=!0,rd.default.relayout(this.el,ye.relayout_data)}var dt=ye.layout_edit_id;this._sendLayoutDelta(dt)}}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data||{},dt=ye.layout_data||{},Zt=this.model._normalize_trace_indexes(ye.style_traces);Fe._doNotReportToPy=!0,rd.default.update(this.el,Fe,dt,Zt),this._sendTraceDeltas(ye.trace_edit_id);var yr=ye.layout_edit_id;this._sendLayoutDelta(yr)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){var Fe=ye.animation_opts,dt=ye.style_data,Zt=ye.layout_data,yr=this.model._normalize_trace_indexes(ye.style_traces),Yr={data:dt,layout:Zt,traces:yr};Yr._doNotReportToPy=!0;var ma=this;rd.default.animate(this.el,Yr,Fe).then(function(){ma._sendTraceDeltas(ye.trace_edit_id);var ya=ye.layout_edit_id;ma._sendLayoutDelta(ya)})}}_sendLayoutDelta(ye){var Fe=t1(this.getFullLayout(),this.model.get("_widget_layout")),dt={layout_delta:Fe,layout_edit_id:ye};this.model.set("_js2py_widget_layoutDelta",dt),this.touch()}_sendTraceDeltas(ye){for(var Fe=this.model.get("_widget_data"),dt=Wl.range(Fe.length),Zt=new Array(dt.length),yr=this.getFullData(),Yr=0;Yr=0;Zt--)dt.splice(0,0,oe[ye[Zt]]),oe.splice(ye[Zt],1);var yr=Wl(Fe).zip(dt).sortBy(0).unzip().value();Fe=yr[0],dt=yr[1];for(var Yr=0;Yr0&&typeof yr[0]=="object"){Fe[dt]=new Array(yr.length);for(var Yr=0;Yr0&&(Fe[dt]=ma)}else typeof yr=="object"&&!Array.isArray(yr)?Fe[dt]=t1(yr,{}):yr!==void 0&&typeof yr!="function"&&(Fe[dt]=yr)}}return Fe}function IR(oe,ye,Fe,dt){if(Fe||(Fe=16),ye===void 0&&(ye=24),ye<=0)return"0";var Zt=Math.log(Math.pow(2,ye))/Math.log(Fe),yr="",Yr,ma,ya;for(Yr=2;Zt===1/0;Yr*=2)Zt=Math.log(Math.pow(2,ye/Yr))/Math.log(Fe)*Yr;var wn=Zt-Math.floor(Zt);for(Yr=0;Yr=Math.pow(2,ye)?dt>10?(console.warn("randstr failed uniqueness"),yr):IR(oe,ye,Fe,(dt||0)+1):yr}var XWe=()=>{let oe;return{initialize(ye){oe=new Sw(ye.model,Lde),oe.initialize()},render({el:ye}){let Fe=new Ew(oe,ye);return Fe.perform_render(),()=>Fe.remove()}}};export{Sw as FigureModel,Ew as FigureView,XWe as default}; /*! Bundled license information: plotly.js/dist/plotly.js: